w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Adding a new hard drive to xampp
If you want to sort of "span" the drive, Windows has this handy feature (similar to linux's symlinking) called mklink which you can create a folder in the current directory that is just a symbolic link to the drive. Quick and easy way to span it. I am not sure of any downsides to do doing this, other than if the drive letter changes (if external drive). That way you should not have to add or change any of your paths in the config etc. Not sure if that is what you were looking for, but hopefully it helps. Also, did you try your 3rd config you pasted? Did it not work? From what I can see, as long as permissions are fine it should work that way.

Categories : PHP

how to shrink KVM hard drive image
Images can be sparsed, and your cp might not respect that for various reasons. I would: check the real file usage (du -sh vm.img or qemu-img info vm.img) use qemu-img convert -S to recreate a sparse image convert to qcow2 to have growing and versatile image instead

Categories : Misc

Is there a way to read directly from the hard drive to the GPU
The GPU is not directly connected to the system RAM. There's a bus inbetween, in current generation computers a PCI-Express bus. ATA storage has a controller inbetween. There is no direct connection between memories. BUT there is DMA, which allows certain periphials to directly access the system memory through DMA channels. DMA on PCI-Express also works between periphials. Theoretically a GPU could do DMA to the ATA controller. Practically this is of little use! Why? Because of filesystems. Even if there was some kind of driver support to let the GPU access a storage periphial directly, it'd still have to do all the filesystem business, which doesn't parallelize to the degree as GPUs are designed for. Alas regarding your question: In my OpenGL program I read from the header file t

Categories : Opengl

Methods for tracking changes to hard drive
For realtime tracking when file or directory changes you can use inotify on Linux or FileSystemWatcher on Windows. Combine with rsync to get delta.

Categories : Svn

Accessing a file on the server's hard drive
You cannot reach the file that is "above" the wwwroot folder by design. The way to do this is to a) copy the file there, b) setup a symbolic link (if on linux) or c) preferably, move / setup another web root folder. Alternatively, write a server script to dump the file contents.

Categories : Javascript

Unmount my external hard drive in bash
Searching for "Unmount Hard Drive Terminal" yields http://ubuntuforums.org/showthread.php?t=842698 as the first result. >.> russlar provides a solution: open terminal, and run df -h. this will tell you all the hard drives mounted. then, run sudo umount /dev/something, where somethign is the name of the hard drive that you want to unmount. Nothing wrong with asking, but when a solution is on the first Google result, it's a little... odd.

Categories : Misc

How to identify system hard drive using Win32_DiskDrive
The documentation you linked has the answer: string SerialNumber; uint32 Signature; Your management object will have those properties in it. If you're getting null for those values then the problem is that you're using a version of Windows that doesn't support them. SerialNumber ... Windows Server 2003 and Windows XP: This property is not available. In which case you have to use the Signature property, but this requires XP SP3 I believe.

Categories : C#

Save Work Done In MS Word To A Database Not On A Hard Drive
The method you are using is extremely inefficient and I wouldn't recommend the process, but the reason that you code is failing is your length.... when you are saving your MemoryStream you are setting the length int len = Application.ActiveDocument.Content.StoryLength; but when you try to retrieve it, you are setting it int len = int.MaxValue; which would be far past the end of the data stream.

Categories : C#

Remove files from a NetBeans project but not the hard drive
Solution working with Netbeans 7.3.1: right click on your project in the "Projects" window, click on "Properties", click on "Ignored folders" in the left panel called "Categories", click on "Add folder" and select the folders you want to ignore.

Categories : Misc

Is three a way for a Chrome App to reach user's file on hard drive with permission?
Streaming can be done using HTML5 Video tag. Please check : http://html5doctor.com/the-video-element/ Also, you can use plugins like : http://www.videojs.com/

Categories : HTML

How to remove file permissions on linux from an external hard drive?
To make the partition accessible under Linux run: sudo chmod -R 777 /media/<drive-name>/ this should make the mac drive accessible for you. Changing ownership would do about the same, but you need not worry about it.

Categories : Linux

Single git repo setup tracking multiple locations on hard drive
No, there is no mechanism in git for this. Git assumes that all files that it manages (the "working copy") live in a single directory (and subdirectories); there is no support for managing two separate directories in in repo. So you'll have to somehow keep everything in one directory, probably as subdirectories HTMLTemplates and theme or similar. You could use two git repos, but I'd strongly advise against this. A single repo should contain a whole "project", i.e. everything needed to build one piece of software (excluding things like external libraries). If you split your project across two repositories, you cannot usefully branch and merge (because you'd have to do it in both repos simultaneously), you cannot easily check out old versions etc.. To solve your problem, I see a few poss

Categories : Wordpress

Change my current working directory in Python to my external hard drive.
You are correct. >>> 'E:CollegeProject3dlife-gc-2013-dataset-hhi3dlife-gc-2013-dataset-hhi' 'E:\College\Projectx03dlife-gc-2013-dataset-hhix03dlife-gc-2013-dataset-hhi' Double the backslashes, use forward slashes, or use a raw string.

Categories : Python

How do I bind a WPF Image element to a PNG on the local hard drive using a relative filepath derived from a DB?
You need to use custom value converter to convert strings to images if you want to load files from the file system. Image.Source, when a string is passed, expects a file name from resources. You can find implementation of a such converter here: Display an image in WPF without holding the file open.

Categories : C#

Python upload an Image form my hard drive and show it on a canvas wideget.
There's a handy module for that: tkFileDialog! import tkFileDialog tkFileDialog.askopenfilename() The function will return the path to the file for you and theres a variety of options you can set here

Categories : Python

My Apple MacBook hard drive crashed - provisioning profiles lost, is there a way I can still update my app?
Create a new certificate if needed then create a new set of provisioning profiles. Install the updated profiles and update your apps to use the new profiles. That's it. Not that big of deal other than spending 30 minutes redoing this stuff.

Categories : IOS

Need Apps Script to Copy a File(s) from my Local Hard Drive to a Google Sites Folder
You have to write an UI to that allows the visitor to the site to upload the file. See https://developers.google.com/apps-script/reference/ui/file-upload for an example.

Categories : Google Apps Script

Serial Communication gets back wrong answer when something is running in the background (like browsing the hard drive)
Note: serialPort.Write(string) is a non-blocking store into the output buffer. That means the following won't guarantee you've even finished writing your request before you stop listening for a response: serialPort.Write(request); Thread.Sleep(50); _shouldStop = true; You could add: while( serialPort.BytesToWrite > 0 ) Thread.Sleep(1); // force blocking but it's ill advised. One thing I'm wondering. There is only a single serial port here. Why do you want many different threads to work with it when you could manage the entire serial port interaction with a single thread? (Or at worse, 1 thread for input 1 thread for output) To me it makes a lot more sense to store up requests into a queue of some kind and then peel them off one at a time for processing in a single threa

Categories : C#

Windows: How to symlink drive to another drive?
No, mklink isn't going to do it for you. What you need to do is to create a virtual hard drive (VHD) and copy the client's data to it. (Or modify the export script, which is the best thing to do.) I used Windows 7 to test my instructions below. Start-> run-> diskmgmt.msc (accept all defaults... I'm not doing anything special below) From the menu bar select Action -> Create VHD Choose the location and name the file (which will be the vhd) and specify the size and click OK. Right click on the Disk # (underneath will be Unknown and the size and "Not Initialized"). Select "Initialize Disk" & click OK Right click on the black bar of the unallocated disk space and select "new simple volume". A wizard opens up an on the second page it lets you assign the drive letter. Complete the wizar

Categories : Windows

How do I migrate an existing Windows Azure VM to a Windows Azure virtual network?
I haven't verified the flow, but it should be working fine. Follow these steps: Make sure you are not using static IP on your AD/DC. The IP Addresses in Azure shall always be DHCP allocated! Shut down the AD/DC Copy the VHD blob to a new blob! I strongly suggest that you have the OS Disk (VHD blob) in a storage account which is in the same affinity group as the Virtual Network. So, if the current OS Disk is not in a Storage Account, which is in the same affinity group as the VNet, create a new storage account and copy the original VHD there. Please note that you should copy the blob only when the VM is shut down! Create the sub-net you want to bring the VM in. (probably you already have created it). Create a new VM using the copied VHD as an OS Disk and selecting the Virtual Network and

Categories : Azure

Having a hard time with Ruby on Rails on Windows 7
Any particular reason for going with Cygwin? It's not the answer you probably want, but a much easier way would either be using Rails Installer if you really need to be on Windows. The other free and useful option is to download Virtual Box, install it, and then install a copy of Linux. Linux Mint is a really easy distro, or the old standby Ubnuntu.

Categories : Ruby On Rails

How to migrate Netbeans project (with Java DB) from Windows to Linux?
I find the solution. It's so easy, you must copy your database folder for example Database from the folder .netbeans.derby which is at your user folder. After you will go to paste it at the same direction on the other pc. You will open netbeans and you will connect your database which it will be at the services tab of netbeans. It will be included... You will connect with your username and password and it will be ok!

Categories : Java

How to: Migrate ASP.NET Web Service Code to the Windows Communication Foundation
Running svcutil will generate an interface that you can build your service from. So running this: svcutil http://mysite.edu/northwind.asmx?wsdl will ouput a .cs file that contains the interface that you need to implement in your WCF service class. Finally, you will need to host your service somewhere, a local process, IIS, etc.

Categories : C#

How to get the total size of hard disk of Windows machine?
Look at GetDiskFreeSpaceEx(), which has an lpTotalNumberOfBytes output parameter. It is subject to per-user disk quotas, though. If you need the raw byte size of the physical disk, use CreateFile() to open a handle to the desired disk and then use DeviceIoControl(), specifying the IOCTL_DISK_GET_LENGTH_INFO control code, to get the disk's total byte size.

Categories : Windows

windows azure virtual machine hard disk backups
Azure attached disks, just like the OS disk, is stored as a vhd, inside a blob in Azure Storage. This is durable storage: triple-replicated within the data center, and optionally geo-replicated to a neighboring data center. That said: If you delete something, it's instantly deleted. No going back. So... then the question is, how to deal with backups from an app-level perspective. To that end: You can make snapshots of the blob storing the vhd. A snapshot is basically a linked list of all the pages in use. In the event you make changes, then you start incurring additional storage, as additional page blobs are allocated. The neat thing is: you can take a snapshot, then in the future, copy the snapshot to its own vhd. Basically it's like rolling backups with little space used, in the event

Categories : Azure

Is there a way to avoid using hard-coded resw keys with the windows store app ResourceLoader?
You can use the T4 template below to automatically generate a C# wrapper around your resw file. This means you have no need to litter your code with magic-string resource keys to access translations from C# - all your keys are then known to be valid at compile-time, rather than run-time. The template generates the following code: internal static class Translation { public static ResourceLoader ResourceLoader { get; private set; } static Translation() { ResourceLoader = new ResourceLoader(); } public static string MyFirstString { get { return ResourceLoader.GetString("MyFirstString/Text"); } } } This is generated by the following T4 template: <#@ template debug="false" hostspecific="true" language="C#" #> <#@ assembly name="System.C

Categories : C#

How to add ubuntu 12.10 entry to grub menu list?
Assuming that you're using Grub2 per my comment above and have not installed a non-default bootloader, here is an example menu entry from /boot/grub/grub.cfg: menuentry 'Ubuntu, with Linux 3.5.0-23-generic' --class ubuntu --class gnu-linux --class gnu --class os { recordfail gfxmode $linux_gfx_mode insmod gzio insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set=root 862e9bd8-8641-478a-96a3-d5ad9a53b104 linux /boot/vmlinuz-3.5.0-23-generic root=UUID=862e9bd8-8641-478a-96a3-d5ad9a53b104 ro find_preseed=/preseed.cfg noprompt quiet initrd /boot/initrd.img-3.5.0-23-generic } As you can see, the root drives are set via uuid, so cutting and pasting a solution will not work for you.

Categories : Misc

How can I get the name of the drive on which the Windows is setup?
Press Windows + R Type cmd In the console, type set You can see the enviroment variables Probably you'll see something like SystemDrive So you can simply use System.getenv("SystemDrive")

Categories : Java

Read a .csv into pandas from F: drive on Windows 7
I cannot promise that this will work, but it's worth a shot: import pandas as pd import os trainFile = "F:/Projects/Python/coursera/intro-to-data-science/kaggle/data/train.csv" pwd = os.getcwd() os.chdir(os.path.dirname(trainFile)) trainData = pd.read_csv(os.path.basename(trainFile)) os.chdir(pwd)

Categories : Python

Auto formatting all drive in windows
You cannot delete or format the system and boot partitions from a running Windows. All other partitions can be deleted or formatted using diskpart with a script, e.g.: C:>type script.txt select volume 3 delete volume exit C:>diskpart /s script.txt Copyright (C) 1999-2008 Microsoft Corporation. On computer: FOOBAR Volume 3 is the selected volume. DiskPart successfully deleted the volume. Leaving DiskPart...

Categories : Windows

C# "Inject" drive to Windows explorer
For those who don't have any bad intentions and to answer the main Question: Yes, there is a way to "Inject" a virtual Drive by using the Win32 API: [DllImport("kernel32.dll", CharSet = CharSet.Auto)] private static extern bool DefineDosDevice( int dwFlags, string lpDeviceName, string lpTargetPath);

Categories : C#

Git installation in USB Drive that works in both OSX and windows?
Use a normal git repo on the usb drive. Use UTF-8 as encoding for all the files to make sure that you won't get any problems with that Before you go to your windows machine, make sure that you have checked out the branch that you want to work on. Use the checked out files and work with them. Back at your mac, you can commit and push and do whatever you like. OR Use your smartphone as usb drive. If you have Android, you can install botbrew on it and use git on your mobile. With that you can do your git operations while at your windows pc.

Categories : Osx

Capistrano deploy:migrate and db:migrate run all migrations every time
How did you "add a few rows to a table in the db"? I suspect your data loss results from mixing migrations and your own db changes. Rails expects you to do all the database changes via migrations. There's some debate on migrations in general in the Rails community, but right now (especially if you're a beginner) always use migrations to change your database. That way you have a complete blueprint for your db allowing you to deploy on several machines from scratch without fiddling with your db and to make sure other contributors have the same db to work with. I don't know a lot about these kinds of internals, but from what I understand your data loss resulted something like that: After your manual changes Rails couldn't match the db-layout to the result of any migration (via the timestamp

Categories : Ruby On Rails

How to search for a folder in all the available windows drive using the command prompt?
See if this works for you: it will report the last match found. @echo off for %%a in (c d e f g h i j k l m n o p q u r s t u v w x y z) do ( if exist "%%a:" dir %%a: /ad /b /s >>"%userprofile%desktopfolderlist.txt" ) find /i "opencvuildin" < "%userprofile%desktopfolderlist.txt" >"%userprofile%desktopfolderlistfound.txt" if exist "%userprofile%desktopfolderlistfound.txt" ( for /f "usebackq delims=" %%a in ("%userprofile%desktopfolderlistfound.txt") do ( set "foundfolder=%%a" echo found at "%%a" ) ) if defined foundfolder ( echo last folder matched at "%foundfolder%" ) else ( echo didn't find the "opencvuildin" )

Categories : Windows

How to find default drive of windows using batch file
This is stored in the variable %SystemDrive% echo %SystemDrive% But you probably want to use %SystemRoot% instead which includes the drive and the directory: echo %SystemRoot%

Categories : Batch File

Grub error 28: selected item cannot fit into memory when writing higher half kernel
In grub 0.97 source code, this error message came from stage2/common.c:89 [ERR_WONT_FIT] = "Selected item cannot fit into memory", This code is used a dozen of times: stage2/char_io.c:1215: errnum = ERR_WONT_FIT; stage2/boot.c:276: errnum = ERR_WONT_FIT; stage2/boot.c:280: errnum = ERR_WONT_FIT; stage2/shared.h:540: ERR_WONT_FIT, stage2/builtins.c:1822: errnum = ERR_WONT_FIT; stage2/builtins.c:2386: errnum = ERR_WONT_FIT; stage2/builtins.c:2498: errnum = ERR_WONT_FIT; stage2/builtins.c:2594: errnum = ERR_WONT_FIT; stage2/builtins.c:2932: errnum = ERR_WONT_FIT; stage2/builtins.c:3711: errnum = ERR_WONT_FIT; stage2/builtins.c:3744: errnum = ERR_WONT_FIT; Since you have this message during boot, let's take a deeper look at boot.c if (! big_linux &am

Categories : Assembly

System.Diagnostics.Process unable to launch file from Mapped Drive in Windows Form App
I tested your code and it runs properly for me. The only way I could reproduce your error is by running it with an unmapped drive (Changed to z: ext.txt which is not mapped). Make sure that the computer RUNNING the program has the specified mapped drive on their computer. Just because the program may reside on a server and the server has the required mapped drives, doesn't mean that the clients running the program have the same mapped drives.

Categories : Dotnet

google drive api - copyfile working only with permission for accessing all files in drive (but jst need to copy)
According to the documentation, Files.copy() requires at least one of the following three permissions: https://www.googleapis.com/auth/drive: "View and manage the files and documents in your Google Drive" which is the one you want to avoid https://www.googleapis.com/auth/drive.file: "View and manage Google Drive files that you have opened or created with this app." Which means you can freely create any file but only open the files your app created. You can only copy a file you created, but you cannot copy any other files even if it is public. https://www.googleapis.com/auth/drive.appdata: "View and manage its own configuration data in your Google Drive" Which only lets you control your application-specific Appdata folder which is probably not what you want. You can only copy a file with

Categories : Javascript

Google drive: Get (root) file and folders with javascript api (get only deleted files on drive)
Same situation as following question: google drive api, javascript list files returns nothing I needed to add to the scope the path 'drive' at authorizing, I had only drive.file which is intent to create/edit files only. The weird thing is that the API returns deleted files when you don't have permissions to view files, I think it's a bug in the API (a serious one). Post this bug on google drive: https://productforums.google.com/forum/#!searchin/drive/security$20issue$20permission$20view/drive/pupjKxTz9FU/cUarGIl_Ah0J

Categories : Javascript

Error while Retriving files from google drive using drive API. “Calling this from your main thread can lead to deadlock
You should do any code that could take a long time such as I/O or network activity on a different thread. In your situation your file retrieval would be best done within an ASyncTask. The reason for this warning is because when your code is being executed to retrieve the file from Drive, the code will block until the file retrieval has completed, this means that nothing else within the program will be able to respond, i.e. GUI will not update and input from the user trying to do stuff with the GUI will not be registered. After a few seconds, if the file retrieval still isn't complete, then the user will be presented with an ANR (Application Not Responding) message. This will either give the user the choice of waiting, if their patient, or most likely force closing your app.

Categories : Android



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.