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

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

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 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

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

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#

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

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 it safe to compare an (uint32_t) with an hard-coded value?
Is the following kind of code safe? Yes, it is. So do you know the type and size (by that I mean on how much bytes is it stored) of hard-coded "0x03000000" ? 0x03000000 is int on a system with 32-bit int and long on a system with 16-bit int. (As uint32_t is present here I assume two's complement and CHAR_BIT of 8. Also I don't know any system with 16-bit int and 64-bit long.) Is it possible that some systems consider 0x03000000 as an int and hence code it only on 2 bytes, which would be catastrophic? See above on a 16-bit int system, 0x03000000 is a long and is 32-bit. An hexadecimal constant in C is the first type in which it can be represented: int, unsigned int, long, unsigned long, long long, unsigned long long

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

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

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

Linux Shell Script: How to detect NFS Mount-point (or the Server) is dead?
"stat" command is a somewhat cleaner way: statresult=`stat /my/mountpoint 2>&1 | grep -i "stale"` if [ "${statresult}" != "" ]; then #result not empty: mountpoint is stale; remove it umount -f /my/mountpoint fi Additionally, you can use rpcinfo to detect whether the remote nfs share is available: rpcinfo -t remote.system.net nfs > /dev/null 2>&1 if [ $? -eq 0 ]; then echo Remote NFS share available. fi Added 2013-07-15T14:31:18-05:00: I looked into this further as I am also working on a script that needs to recognize stale mountpoints. Inspired by one of the replies to "Is there a good way to detect a stale NFS mount", I think the following may be the most reliable way to check for staleness of a specific mountpoint in bash: read -t1 < <(stat -t "/my/m

Categories : Linux

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#

linux: running self compiled kernel in qemu: VFS: Unable to mount root fs on unknown wn-block(0,0)
maybe your system image file is bad and can not be mounted. You may try these command to mount the image file and check if it is a valid root file system for linux. losetup /dev/loop0 /var/lib/libvirt/images/Debian.img kpartx -av /dev/loop0 mount /dev/mapper/loop0p1 /mnt/tmp

Categories : Linux

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

Will SQL Server treat a USB 3.0 External Drive as local?
I just used a USB 2.0 drive the other day to perform a restore to a test environment. I imagine that as long as Windows identifies the drive as a local disk and not removable storage, and the SQL Server service can access the directory, it should work just fine.

Categories : Sql Server

PHP - Run external function in 'safe mode'
It is possible using libraries that do some simple checking or limiting. Take a look at a PECL (PHP Extensions) extension called RunKit_Sandbox http://php.net/manual/en/runkit.sandbox.php or PHPSandbox. The key to look for on Google is PHP Sandbox, it will find you similar libraries.

Categories : PHP

Is it safe to use async with external js files?
You can use async safely with unrelated scripts. But if you need to load them in order (such as your example), you can't just put async on both of them and hope for the best — you'll be creating a race condition. I found this article on various ways to load scripts quite useful, FWIW.

Categories : Jquery

[Qt][Linux] List drive or partitions
You need to use platform specific code. And, please, read the docs! Returns a list of the root directories on this system. On Windows this returns a list of QFileInfo objects containing "C:/", "D:/", etc. On other operating systems, it returns a list containing just one root directory (i.e. "/").

Categories : C++

How to make an external HTML file not appear in the home page?
foo.php : <?php echo 'foo<br>'; ?> bar.php : <?php include 'foo.php'; echo 'bar<br>'; ?> Displaying bar.php outputs : foo bar Check your include order. Can't say more without a clearer / more detailed explaination and code.

Categories : PHP

Google Drive: read-only without authorisation on external site
It is be possible for a third party app to authorize requests without an access token. You can make requests from an allowed referrer/IP with an API key. https://developers.google.com/console/help/#generatingdevkeys Then, you should be allowed to GET the following public file: GET https://www.googleapis.com/drive/v2/files/1T_fVTiyyBVnfYKd_3gZzVfxqU5NbOhIlEG0nyReYh9w?key=[yourKey]

Categories : File

Working around a external .NET library that isn't thread-safe?
Using appdomains seems like the way to go. See How do I prevent static variable sharing in the .NET runtime? or In .Net is the 'Staticness' of a public static variable limited to an AppDomain or the whole process? for similar questions people had. The msdn guide can be found here http://msdn.microsoft.com/en-us/library/ms173138(v=vs.90).aspx Just keep in mind that AppDomain is a .net concept, unmanaged resources can still be an issue.

Categories : C#

Linux VSFTPD : Jail a "Specific User" to its home?
In /etc/vsftpd/vsftpd.conf file comment the chroot_local_user=YES or set to NO and enable the following arguments chroot_list_enable=YES chroot_list_file=/etc/vsftpd.chroot_list Put the particular user in the /etc/vsftpd.chroot_list, restart vsftpd with service vsftpd restart then that particular user would be jailed to his home directory. Thanks & Regards, Alok

Categories : Linux

Is standard C mktime thread safe on linux?
It's true that mktime has a side effect, but the side effect should be harmless in most programs. According to POSIX, the side effect will be as if tzset has been called, which in turn merely copies the timezone information from the TZ environment variable to the tzname array of C strings. If your application doesn't change TZ, you will have no problem with calling mktime() concurrently. In addition to this, GNU libc's tzset does use a mutex to protect the integrity of tzname. This is a quality-of-implementation addition not guaranteed by the standard.

Categories : C

Adding scripts to the external pages in jquery mobile other than the home file
How jQuery Mobile handles page changes To understand this situation you need to understand how jQuery Mobile works. It uses ajax to load other pages. First page is loaded normally. Its HEAD and BODY is loaded into the DOM, and they are there to await other content. When second page is loaded, only its BODY content is loaded into the DOM. Here's an official documentation: http://jquerymobile.com/demos/1.2.0/docs/pages/page-links.html Unfortunately you are not going to find this described in their documentation. Ether they think this is a common knowledge or they forgot to describe this like my other topics. (jQuery Mobile documentation is big but lacking many things). Solutions: In your second page, and every other page, move your SCRIPT tag into the BODY content, like this: Move al

Categories : Jquery

Linux VSFTPD : Jail a "Specific SFTP User" to its home?
Hi yes sftp works with ssh configuration on port 22, http:/thegeekstuff.com/2012/03/chroot-sftp-setup would make you jailroot the users. You have to modify ssh configuration file to jail root the users. Thanks & Regards, Alok

Categories : Linux

How can we use Linux from a small storage pen drive? Does it work on micro-controllers also?
I generally hear that LINUX OS can be downloaded on flash, pen drive (floppy disk?) etc. How > we can do that? If you can't get it to work on your own, you can buy a ready made Linux on a USB drive from a site like http://www.osdisc.com or http://www.cheapbytes.com Not all PCs, especially older PCs, can boot from the USB Drive. Even some newer PCs are beginning to ship with security features that can interfere with booting code. When it does work, you have to find out the proper way to boot the USB drive. You might have only a few seconds during reboot to enter the right key, or it will boot Windows (if Windows is installed). The key to get to the BIOS Boot Menu might be delete or escape or F10 or some other key (varies with PC motherboard manufacturer). A message on the screen

Categories : Linux

What g++/ld options make it safe to share STL containers across DSO's on Linux?
My google-ability returned to me, and thus I found http://gcc.gnu.org/wiki/Visibility, which I think tells me everything there is to know. It won't tell me about gory internals of STL, but I don't think it has to.

Categories : C++

Is there an async-signal-safe way of reading a directory listing on Linux?
If you know in advance which directory you need to read, you could call opendir() outside the signal handler (opendir() calls malloc(), so you can't run it from within the handler) and keep the DIR* in a static variable somewhere. When your signal handler runs, you should be able to get away with calling readdir_r() on that handle as long as you can guarantee that only that one signal handler would use the DIR* handle at any moment. There is a lock field in the DIR that is taken by readdir() and readdir_r(), so if, say, you used the DIR* from two signal handlers, or you registered the same handler to handle multiple signals, you may end up with a deadlock due to the lock never being released by the interrupted handler. A similar approach appears to also work to read a directory from a chi

Categories : Linux

Are Python [de]compression modules thread-safe on Linux? On Google App Engine?
Your question is basically meaningless, because you're misunderstanding some fundamental things and creating problems that don't exist. I tried answering in comments, but there's a limit to what you can do that way, so… I want to do everything without using file-like objects, because App Engine cannot provide conventional Python filenames for dynamic files. You don't need filenames, or files, for file-like objects. That's the whole idea behind file-like objects. App Engine does not provide a way to open a file-like object (unless the file was uploaded as part of the app). No, you are still confusing file objects and file-like objects. A file object represents an actual file on disk. GAE restricts those. A file-like object is any object with the same API—that is, an obje

Categories : Python

Java absolute path adds user.home property when adding quotes - Linux
From your description it seems that you are calling the File(java.lang.String pathname) constructor. If so, the String used to represent your path should not use quotes. Quotes are not considered as special characters in the abstract pathname definition, as described in the java.io.File documentation. An abstract pathname has two components: An optional system-dependent prefix string, such as a disk-drive specifier, "/" for the UNIX >root directory, or "\" for a Microsoft Windows UNC pathname, and A sequence of zero or more string names. Since quotes are not special characters, they are considered part of a name. Example: public static void main(String[] args) { File quotes = new File(""C:\myFolder""); File noQuotes = new File("C:\myFolder"); System.out

Categories : Java

Moved Wordpress site from Linux host to IIS7 - Home page works, everything else returns 404
Add the URL Rewriting extension: http://www.iis.net/downloads/microsoft/url-rewrite You'll need to convert your rules from Apache's mod_rewrite format to IIS's regular expressions, if you're using PHP's PATH_INFO then this is easy.

Categories : PHP

'rm'(linux) in the exec is not recognised as internal or external command.
Check what user the command is trying to execute as. Then check if it is in that user's $PATH if not add it to that user's $PATH. To log in as another user: sudo -u username /bin/bash you will now have a console as that user. Now try using the command. This is your reason. It is most probably based on your distribution - different distros have different "settings" for different programs.

Categories : Node Js



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