usb-flash-drive interview questions
Top usb-flash-drive frequently asked interview questions
EMC is marketing Solid State Flash Drives and my project is thinking about moving that direction in the future. Does anyone have any experience with replacing traditional disk storage with flash drives? Besides price, have you experienced any downsides to the technology?
Source: (StackOverflow)
I have a peculiar question.
The case is that I have a TV that can use as source a USB flash drive for playing movies.
Do you think it would be possible to directly connect a PC and the TV USB to USB and using some software interface to determine the PC to act like a flash drive.
I think it can be done with a hardware driver, but I'm wondering if it can be done without that.
Source: (StackOverflow)
I have batch files with the construct:
if exist F:\ copy /y Application.exe F:\
at the end of a compile, to copy the executable to a USB key if it is plugged in. It has worked fine with USB keys but when I had a USB multi card reader plugged in (this looks like drives E:..H:, and if there is no SD card plugged in, when I execute the above batch line, I get a "Windows - no disk" snag message.
If there is a card plugged in, I don't get the message, (and the file is copied), if the card reader is not plugged in, I don't get the message and the file is not copied (obviously), but in neither of these cases does the batch file stop running. It's only if the card reader is plugged in but there is no card in the drive.
Can I check quietly for no "disk" in these USB drives from a batch file?
Source: (StackOverflow)
This question already has an answer here:
I have a requirement to get VID and PID of removable Flash Drive in java? I have googled a lot I can not get any proper answer. Many of the communities there are few instructions but there is no proper instructions, which packages I have to import. Among most of the answer are written in C++.
Thanks in advance.
Source: (StackOverflow)
I was trying to run Python 3.3 off of my flash drive. I already tried Portable Python, but most of what it had wouldn't open, and it crashed my laptop.
So, I deleted it, and installed regular Python. Then, I wanted to start adding my favorite modules. And, I needed a way to start IDLE without the original shortcut.
To install modules, I added my Python install to my PATH variable.
To make all this easier, I made a batch file, using some code I found on this question.
So far, I have this. It also asks for the drive letter, because that changes from computer to computer.
@echo off
echo This only works if your Python install is added to the system-wide PATH variable
set /p Path="Enter the Drive Letter on this computer. No Symbols, Just the Letter, Capital"
cd %Path%:\Program Files\Python33
echo type this when python comes up...
echo import idlelib.PyShell
echo idlelib.PyShell.main()
echo.
echo.
echo.
echo.
python
It outputs this:
If you go on and follow the instructions and type what it says, it brings up IDLE.
I couldn't figure out how to get the batch file to actually type into the Python prompt, so I told it to tell the user to type what needed to be typed.
What I need to know is, how can I change the PATH variable from within the batch file. Also, how to I remove it when I'm done (this isn't as important, and could even be in a separate batch file).
Or, alternatively, is there a way just to shortcut to IDLE?
Also, is there a way to run .py files without the command line, with the Python install on my flash drive?
Thanks!
Source: (StackOverflow)
I am writing a mini-filter code for USB (Flash Drives) for blocking i.e (Access Denied).So, could someone help me out, how to detect or block USB or what methods to use in passThrough WDK sample code for USB detection and USB blocking?
I am trying to use *IOCTL_STORAGE_QUERY_PROPERTY in PFLT_INSTANCE_SETUP_CALLBACK*. Am i on right path?? if yes then how to use IOCTL_STORAGE_QUERY_PROPERTY in PFLT_INSTANCE_SETUP_CALLBACK???
Source: (StackOverflow)
I need to perform a check on all drives and see if any of the VIDs/PID match a specific one, if it does I need to get the drive letter of that flash drive.
Thanks to all!
Source: (StackOverflow)
This question already has an answer here:
I have a requirement to get VID and PID of removable Flash Drive in java? I have googled a lot I can not get any proper answer. Many of the communities there are few instructions but there is no proper instructions, which packages I have to import. Among most of the answer are written in C++.
Thanks in advance.
Source: (StackOverflow)
From the iPhone Programming Guide
When creating files or writing out
file data, keep the following
guidelines in mind:
- Minimize the amount of data you write to the disk. File operations are relatively slow and involve writing to the Flash disk, which has a limited lifespan. Some specific tips to help you minimize file-related operations include:
- Write only the portions of the file that changed, but aggregate changes when you can.
- Avoid writing out the entire file just to change a few bytes.
- When defining your file format, group frequently modified content together so as to minimize the overall number of blocks that need to be written to disk each time.
- If your data consists of structured content that is randomly accessed, store it in a Core Data persistent store or a SQLite database. This is especially important if the amount of data you are manipulating could grow to be more than a few megabytes in size.
- Avoid writing cache files to disk. The only exception to this rule is when your application quits and you need to write state information that can be used to put your application back into the same state when it is next launched.
I read an article a while back regarding intel SSDs (which I unfortunately can't find right now), which mentioned that the primary longevity concern was due to the fact that the OS didn't actually delete data, but just marked blocks as free, causing a rather painful slowdown when those 'free' blocks where written to (causing a read-modify-store, rather than just store). Does this hold for the iPhone as well, i.e. will the drive be more susceptible to slowdowns when files are deleted more frequently?
I'm considering a file format based on a redo-log, this way I can maintain a cross-session undo and I also have no random writes (always append), but at some point I suppose I'll have to consolidate at least a part of the log, to keep the file size at a reasonable level. My question in this case, which would be more efficient (in terms of drive longevity)? I have a couple of paths I've considered
- Overwrite the same file and
- truncate the space I don't need
- or leave that space (filled with old data) and overwrite it when I need it again
- or write a new file, and delete the old one
but I'm open to suggestions. I'm guessing the typical file size would range from a couple of kB to a couple of hundred kB, but the higher value is more speculation than anything else.
Source: (StackOverflow)
Is it possible to run Xcode 6 beta 6 off of a flash drive or external hard drive? I tried to copy Xcode 6 beta 6 from my computer to a flash drive and then run it on a different computer. Xcode 6 beta 6 would not open from the flash drive.
Source: (StackOverflow)
I have a board with ARM processor and micrium RTOS on it. I need to read/write files from the USB memory stick. For example standard function, which renames file is next -
int FS_Rename (const char * sExistingName,
const char * sNewName);
which path i need to write into sExistingName to point file on my USB memory stick?
Source: (StackOverflow)
is it possible to simulate usb flash drive with code (asp.net with c# is better - if not with php) or a software like virtual clone drive ?
i have a program with usb flash drive unlocker (4 my laptop) and i want to simulate that usb drive , so i can get rid of that usb flash from my laptop !
thanks in future advance
best regards
Source: (StackOverflow)
I am working on USB devices and can identify a usb device. But I have a theoretical question.Is it shows any usb device like portable cd drive or specifically flash drives? I could nt check all possibilities due to lack of these hardwares :). Is there any method to identify if it is a flash drive or another usb device.
Please don't beat with what you have tried. I googled regarding same but because of my least experience I couldn't find any.
Thanks
Source: (StackOverflow)
I'm new to git, so forgive me if I've missed the boat completely. I am coding sites on my laptop and in addition to Dropbox I would like to have a backup of everything that I've done stored elsewhere. This is when I learned about git. I understand that it keeps track of all of the changes made (and committed), but what happens to the actual files that I've changed? What I'm asking is probably best explained by an example.
I have set up a git repo on my laptop to manage all of the changes made to MySite/
and all of its files and folders (index.php
, img/
, css/
, etc.). I have also created a --bare
git repository on a flash drive. I have push
ed the original repo to that location. I am able to use git log
to successfully view the history, but when I access the flash drive I notice that the contents of MySite/
are not there (or at least viewable). What do you suggest that I do to be able to work from the flash drive and then later push those changes to the laptop while still being able to work from the laptop as I am used to?
Source: (StackOverflow)
I am working on an android application to read data from USB.
The usb can be connected to android with serial port and my app can find it.
Now, I want to read data files and folder from USB. I have read many articles. I found that they use this code :
Environment.getExternalStorageDirectory();
However in my case, I got that the path is /storage/emulated/0.
When I try to read all the files which are contained in the path, I got the following statements:
/storage/emulated/0/Android
/storage/emulated/0/Music
/storage/emulated/0/Podcasts
/storage/emulated/0/Ringtones
and etc.
but the path of my usb is not found. So, I'm not sure is it the correct way to read files from USB?
Here is my code :
File f = Environment.getExternalStorageDirectory();
File[] files = f.listFiles();
String fol = "";
for (File inFile : files) {
if (inFile.isDirectory()) {
fol += inFile.toString()+"\n";
}
}
TextView tv = (TextView) findViewById(R.id.demoTitle);
tv.setText(fol);
Source: (StackOverflow)