w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
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

Linux module to deny write permissions to BIOS?
Flashing the BIOS is typcially done not by using some driver but by accessing the SPI or I²C controller hardware directly. Some mainboards have hardware write protection switches/jumpers. Neither the kernel nor a rootkit could do anything about that. Some flash chips have a write protection that can only be enabled, but cannot be disabled without a reset, i.e., only the BIOS can do or allow flashing. Neither the kernel nor a rootkit could do anything about that. On most mainboards, the flash hardware has no write protection. There is nothing the kernel can do about that; any rootkit that has the capability to access the hardware is already in complete control and is also able to reverse any software protection measures attempted by the kernel.

Categories : C

qemu: could not load PC BIOS 'bios.bin' in Mountain Lion
I got the same error message on Windows when trying to run the x86 emulator. What worked for me was to find the "bios.bin" and "vgabios-cirrus.bin" files somewhere in C:, and copy them to the folder ....android-sdk-windows ools.

Categories : Android

RoboCopy , Virtual Hard Disk, or other?
I got the answer from a different thread. Basically, we are creating a Microsoft VHD (virtual Hard Disk) and filling in the files with RoboCopy and shipping the VHD. See: Unzip too slow for transfer of many files

Categories : Apache

should I let mongodb make use of the new hard disk in this way?
Unfortunately this one will not be that straightforward. Even if you succeed with the mounting it will not move the files at all. What you can do is to mount the disk elsewhere (mkdir /var/lib/mongodb1, mount /dev/sda3 /var/lib/mongodb1) stop mongo copy the files from /var/lib/mongodb to /var/lib/mongodb1 (only helps if the new disk is bigger) reconfigure mongo to use as db dir the new directory or swap the names with mv commands start mongo if everything went fine, mongo started and so on,(check it first!!!) you can delete the old data. If you have a disk which is the same size so with moving the data you will run into the same problem, if you need larger space then a single disk you should play around with RAID and/or LVM and more disks.

Categories : Mongodb

Reading boot Sector of the hard disk
The boot sector of the disk contains not ASCII data, but code. With high probability, one of the first bytes will be NULL and remaining possibly not printable codes (such as CR, LF, etc.). Trying to print the buffer by INT 10h, which prints ascii codes, and ending on 0 will result probably with nothing displayed at all. You should convert every byte of the buffer to hexadecimal string and then print these strings to the display. This way you will get simple hex dump of the boot sector.

Categories : Assembly

How can i add some bat files to my project so i will not need them anymore on the hard disk?
// create the dxdiag.bat file using (StreamWriter sw = new StreamWriter("dxdiag.bat")) { sw.WriteLine("........."); // ...... } Process proc = new Process(); proc.EnableRaisingEvents = true; proc.StartInfo.UseShellExecute = false; proc.StartInfo.FileName = "dxdiag.bat"; proc.StartInfo.CreateNoWindow = true; proc.Start(); proc.WaitForExit(); proc.Close(); //delete the file File.Delete("dxdiag.bat");

Categories : C#

CakePHP Support Legacy URL
You need to have the server respond with a permanent redirect 301 code to the new address. This will be cached by browsers, and also tell search engines to drop the old content from their indexes. The easiest and fastest approach would be to create a page.php file in your webroot that issues the redirect. <?php if(isset($_GET["hash"])) { $location = "/controller/action/hash:"+$_GET["hash"]; header ('HTTP/1.1 301 Moved Permanently'); header ('Location: '.$location); } else { header('HTTP/1.0 404 Not Found'); } I have no idea where it needs to redirect too, but that was just an example.

Categories : PHP

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

I want to use powershell to map a network hard disk on a remote machine
PSExec is not short for "PowerShell exec", it's "process exec". You cannot execute an PowerShell cmdlet directly from it. To use PSExec to execute a PowerShell command remotely, you must do the following (untested, as I don't have psexec): psexec \func2_web1 powershell.exe -command -nologo "New-PSDrive -Name x -PSProvider FileSystem -Root \argentodrops -Persist" Or, if you want to go the remoting route from within your local PowerShell session: invoke-command -computername func2_web1 -scriptblock {New-PSDrive -Name x -PSProvider FileSystem -Root \argentodrops -Persist} With the latter, you may have "double-hop" issues that need to be resolved via CredSSP.

Categories : Powershell

which widget to use to show hard disk sectors as hexadecimal?
How do they achieve this in a single scroll area It is not a "single scroll area" containing the entire disk. It is a scrollbar and dynamically generated content for whatever disk content you are showing at the time. Simply calculate the position based on the scroll location (unless your screen is 10000's of pixels tall, however, you will not be able to place the cursor EXACTLY on the disk sector you want). also provide the undo functionality in that.... Undo functionality, I expect (I haven't looked at the code) is done by holding "address changed, old value" in some sort of container. Pretty much the same way you'd do undo information for any other large dataset. which widget should be used to display such a huge amount of data.???? One which shows text and allows yo

Categories : C++

Serving Static content from local hard disk in jboss as 7
As of my knowledge, we dont have an option to access static files on the hard disk through JBOSS AS 7.1. The solution I have tried was , I have created a dummy web application and I have been storing the files into the dummy web application. Once the files are stored over there, they are accessed with URL pointing to newly created dummy web application. Though this is not the correct way for this kind of access, I find no other way for this. Pl. let me know if any other ideal way exists... Thanks....

Categories : Java

With PowerShell, is there a way to make an external hard disk attached to host available to VM?
I don't use Win8, so this is entirely untested. Judging from the description of Add-VMHardDiskDrive something like this might work, though: $usbdisk = gwmi Win32_DiskDrive | ? { $_.PNPDeviceID -like 'USBSTOR*' } Add-VMHardDiskDrive -VMName MyWin7PC -ControllerType IDE -ControllerNumber 0 ` -ControllerLocation 1 -DiskNumber $usbdisk.Index

Categories : Powershell

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

Write files into randomly non-contiguous hard disk positions
I think that the only way to do this is using some low-level OS commands No... RandomAccessFile has .seek(): final RandomAccessFile f = new RandomAccessFile(someFile, "rw"); f.seek(someRandomLong); f.write(...); Now, it is of course up to you to ensure that writes don't collide with one another. Another solution is to map the file in memory and set the buffer's position to some random position before writing.

Categories : Java

Why when loading html file from the hard disk through WebBrowser not everything is shown?
When you download the page, you download the source code of that page. However, when your browser downloads the page, there are a lot of stuff downloaded along with the HTML. For instance, there are JavaScript files, CSS files (for styling) and more. Even if you download them as well, you may need to modify your HTML to link those files to the HTML with a relative or absolute path (depending on your needs). In other words, the web page is not shown as you expect because the attachments are not downloaded and linked to the HTML. Update When you set the source of the document, the attached documents (css, js, etc.) relative to the HTML are not found and therefore not used in the web page. For instance: <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/stackoverflow/all.cs

Categories : C#

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

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

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

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

One line F# code is hard to understand
So lets try to understand what happens. let x x defines a function called x which takes an argument of x. `let x x = x + 2` means you have a function x which takes an argument also called x and returns x+2 The final part in x 2 calls the function with an argument of 2. So the function can be written as let f x = x + 2 f 2 which obviously returns 4.

Categories : F#

How can I resume connection between SQL Server and physical files after hard disk disabling?
Lets start saying that you are in a very bad shape and you should check your physical server ASAP. IMO, the best thing to do is backup the files as-is just in case you can't do anything else then one of the following options restart SQL Server service delete the broken database restore restore back ups to the latest transaction point If the above is impossible. restart SQL Server service hope that things will work

Categories : Dotnet

Read Streaming Excel file which is not saving content to hard disk
There is approch you can follow: open temp.xls with readonly flag with standard way: Workbooks.Open Method Perform your traitement on data. Peraphs copying content to another Workbook. detect changes on temp.xls using FileSystemWatcher Class and reopen it as 1st point Another thing can be useful is to detect end of process from abc.exe. Maybe it is only by detect non-existance of temp.xls or non-existance of abc.exe in table of process (via ManagementEventWatcher Class). Anyway at this point you should sniff everything passing thru temp.xls.

Categories : C#

getting size of multiple files located inside the hard disk using python
if item < 1000: size = str (item) + 'K' if item > 1000: #this will never execute #since you have already asserted that item < 1000

Categories : Python

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

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

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#

To find duplicate files on a hard disk by technique other than calculating hash on each file
You may want to use multiple levels of comparisons, with the fast ones coming first to avoid running the slower ones more than necessary. Suggestions: Compare the file lengths. Then compare the first 1K bytes of the files. Then compare the last 1K bytes of the files. (First and last parts of a file are more likely to contain signatures, internal checksums, modfication data, etc, that will change.) Compare the CRC32 checksums of the file. Use CRC rather than a cryptographic hash, unless you have security measures to be concerned about. CRC will be much faster.

Categories : File

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

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#

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

HTTP 400 - Hard to understand error code with minimal description
You can use a debugging proxy to view a client request and a server response to figure out what your client socket program needs to do. But first you need to create a simple web page that a browser displays, allows you to do a POST from the browser to the web server, and get a simple response back from the server.

Categories : Http

Learning Python the Hard Way ex40, don't understand Study Drill 2
I just think he means to do something like lyricsImagine = ["Imagine there's no countries","It isn't hard to do","Nothing to kill or die for"] songImagine = Song(lyricsImagine) songImagine.sing_me_a_song()

Categories : Python

How to simulate slow and no-read-cache disk drive
If you do have the sourcecode you can write a class that emulates the behaviour of the disk and replace all disk reading/writing code with calls to your class. You need to cache requests done by the application and execute them after some delay. If you don't have access to the code your hope is to find a driver which emulates a slow disk...ifsuch a thing exists.

Categories : Dotnet

How to find what device is connected to USB port (HID or Disk drive) in C++
I would recommend looking at the USBView sample in the WDK. If you are unfamiliar with this, simply run it - this tool walks the entire USB tree on the system and prints out information and descriptor listings for each device. In your case, I'd start at the RefreshTree() function in this sample, you can then follow the code to see how it enumerates the host controllers, hubs and finally devices. For each device that you find you can look at the bInterfaceClass in the interface descriptors to find out what types of interfaces it is advertising (in your case 0x03 for HID Interface Class and 0x08 for Mass Storage Class). The easiest way to get the source to this sample is to install the 7.1.0 WDK which is currently available here: http://www.microsoft.com/en-us/download/details.aspx?id=1180

Categories : C++

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

Provide uploading files, write the file on hard disk, get full path (string) to add in database CakePHP
While this may not give you a direct solution in CakePHP, you had asked for some ideas. I've outlines some pros and cons of storing a file on the filesystem (along with some other approaches) in this post. Hope that helps...

Categories : PHP

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#

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



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