usb-drive

Portable Ruby on Rails environment

主宰稳场 提交于 2019-11-28 00:17:16
I got myself a new 8 gig USB key and I'm looking for a decent solution to have a portable RoR environment to learn on. I did the google on it and found a few possibilities, but I'm curious to hear some real life experiences and opinions. Thanks! I like InstantRails , very easy to use, no installer, and does not modify your system environment. InstantRails was replaced by [BitNami RubyStack] in 2007. http://bitnami.org/stack/rubystack CaughtOnNet How to create a portable environment based on RubyInstaller's binaries and Development kit: http://hcettech.blogspot.pt/2012/05/windows-portable-rails

Looking for C# code for detecting removable drive (usb flash)

蓝咒 提交于 2019-11-27 15:43:33
I'm looking for a C# code snippet to give me a notification for when a USB drive is plugged into my PC in Windows Vista (or win7) Powerlord There's a class called DriveDetector over at Codeproject that sounds like it does what you want. Look at WM_DEVICECHANGE . This message should be sent when a drive is inserted. Matt Warren I know this is not exactly what you asked for, but if you want to check what devices are available at any moment in time, there's another way. You can use the WMI classes in the System.Management namespace , I've used this method and it works well. If you take a look at

How to get serial number of USB-Stick in C#

那年仲夏 提交于 2019-11-27 11:09:16
How do I get the internal serial number of a USB-Stick or USB-HardDrive in C#? Yuval Adam Try this: // add a reference to the System.Management assembly and // import the System.Management namespace at the top in your "using" statement. // Then in a method, or on a button click: ManagementObjectSearcher theSearcher = new ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive WHERE InterfaceType='USB'"); foreach (ManagementObject currentObject in theSearcher.Get()) { ManagementObject theSerialNumberObjectQuery = new ManagementObject("Win32_PhysicalMedia.Tag='" + currentObject["DeviceID"] + "'"

Get serial number of usb storage device in .net core 2.1

只愿长相守 提交于 2019-11-27 02:21:38
How can I get the serial number of usb storage device in .net core 2.1 ? I found different solutions, but sadly they don't work due the lack of windows registry and wmi in .net core. In Powershell it really simple, but I wasn't able to find a implementation in Powershell Core . PS C:\> Get-Disk | Select-Object SerialNumber SerialNumber ------------ 0008_0D02_0021_9852. I prefer a solution with no extra installs on the clients (Win, Linux, Mac). This Class performs a series of queries on the WMI Win32_DiskDrive class and its associators: Win32_DiskDriveToDiskPartition and CIM

Version control on a 2GB USB drive

南楼画角 提交于 2019-11-26 23:56:45
问题 For my school work, I do a lot of switching computers (from labs to my laptop to the library). I'd kind of like to put this code under some kind of version control. Of course the problem is that I can't always install additional software on the computers I use. Is there any kind of version control system that I can keep on a thumb drive? I have a 2GB drive to put this on, but I can get a bigger one if necessary. The projects I'm doing aren't especially big FYI. EDIT: This needs to work under

Looking for C# code for detecting removable drive (usb flash)

懵懂的女人 提交于 2019-11-26 17:15:42
问题 I'm looking for a C# code snippet to give me a notification for when a USB drive is plugged into my PC in Windows Vista (or win7) 回答1: There's a class called DriveDetector over at Codeproject that sounds like it does what you want. 回答2: Look at WM_DEVICECHANGE. This message should be sent when a drive is inserted. 回答3: I know this is not exactly what you asked for, but if you want to check what devices are available at any moment in time, there's another way. You can use the WMI classes in

How to get serial number of USB-Stick in C#

橙三吉。 提交于 2019-11-26 15:26:54
问题 How do I get the internal serial number of a USB-Stick or USB-HardDrive in C#? 回答1: Try this: // add a reference to the System.Management assembly and // import the System.Management namespace at the top in your "using" statement. // Then in a method, or on a button click: ManagementObjectSearcher theSearcher = new ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive WHERE InterfaceType='USB'"); foreach (ManagementObject currentObject in theSearcher.Get()) { ManagementObject

How to detect a USB drive has been plugged in?

牧云@^-^@ 提交于 2019-11-26 15:08:55
I want to build a program that detects if a usb (or two or more) are plugged in (and copy all contents to any folder on a hard disk) Any ideas? I have this, using System.Runtime.InteropServices; But it is not the easy way (that I believe). I want something easy. I have another idea (if (folder exist) then copy) something -- but there may be a problem with that, and I want a good solution. There may also be a tool called SerialPort; can I use it? If so, how do I use it? Elian Ebbing It is easy to check for removable devices. However, there's no guarantee that it is a USB device: var drives =

Nexus 4 not showing files via MTP

帅比萌擦擦* 提交于 2019-11-26 12:14:24
I'm trying to simply write a simple XML file to the SD card and I noticed that my Nexus 4 does write the file, but it is not viewable via the MTP protocol using Windows 7. code: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); CustomerQueryRqType customerQueryRequest = new CustomerQueryRqType(); Serializer serializer = new Persister(); File myFile = new File(Environment.getExternalStorageDirectory() + "/customerQueryRequest.xml"); try { boolean created = myFile.createNewFile(); serializer.write(customerQueryRequest, myFile); }

Custom bootloader booted via USB drive produces incorrect output on some computers

六月ゝ 毕业季﹏ 提交于 2019-11-26 10:56:59
I am fairly new to assembly, but I'm trying to dive into the world of low level computing. I'm trying to learn how to write assembly code that would run as bootloader code; so independent of any other OS like Linux or Windows. After reading this page and a few other lists of x86 instruction sets, I came up with some assembly code that is supposed to print 10 A's on the screen and then 1 B. BITS 16 start: mov ax, 07C0h ; Set up 4K stack space after this bootloader add ax, 288 ; (4096 + 512) / 16 bytes per paragraph mov ss, ax mov sp, 4096 mov ax, 07C0h ; Set data segment to where we're loaded