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

How to write inline assembly in FreeDOS
Things like for, address and printf are not part of assembly. You will have to rewrite that to actual assembly code or copy the macros and assembler you want to use to your freedos environment. If you want to use debug as included in freedos you can use the a command to start writing assembly instructions, the n command to give a name and w to write the code to the file. C:debug -a 06BC:0100 int 20 06BC:0102 -n ivtdump.com -rcx 2 -w Writing 0002 bytes. -q C: This sample program only exits the program through int 20. (The 2 after rcx indicates the length of the program to write to disk)

Categories : C

Running git init from within Google Drive dir
The problem is the space between the words "Google" and "Drive", when you do: cd Google Drive your shell tries to enter "Google" directory(That why the "No such file or directory" error). Change the directory name and run the command again.

Categories : Osx

Uploading files with Flask (running on App Engine) to Google Drive
Upload the form to blobstore with a callback into your frontend. If the file is very large you might need to go as far as a backend with resumable uploads done on chained backends (as backends could also go down in the middle of the upload for huge files)

Categories : Python

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#

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

Google Drive Javascript API: Detect drive changes - return changes only
Start with zero on your first call. Within the response is the current largest change id, which you need to store and use on the next request. In your code, it will materialise as "resp.largestChangeId".

Categories : Javascript

Monitoring changes in Google Drive files for whole domain using Drive API
Domain-wide delegation simplifies the authentication portion for your app but you'll still need to auth as each user to get their files and changes. It may be possible for your app to "grab" all files and make itself (or a special user) the owner, then you just have one user account to scan but the "grab" process would still need to run at regular intervals to find new files created or uploaded by end users. I believe most apps that need to scan content at this level do it via cron jobs or AppEngine task queues which make it easy to chunk up the scans throughout the day. Generally they expect to scan each user account once every 24 hours or so.

Categories : Google App Engine

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 create & edit a spreadsheet file on google drive using Google Drive APIs only from my Android app?
You should take a look at Google Spreadsheet API 3.0. It supports JAVA which you can use in your Android application.

Categories : Java

Google Drive sdk for android, Getting error 400 Bad Request when uploading file to Google Drive
You seem to be setting the mime type in the File object, but you need to set it in the FileContent object. When you create your file content, you can try passing in the type in the constructor new FileContent("image/jpeg", localFile); or using the method setType("image/jpeg"); but in your mediaContent instance, not in your body instance.

Categories : Android

Using Subclipse with share drive specifically an office-like share drive
You should start with the SVN book, chapter 1: http://svnbook.red-bean.com/en/1.7/svn.basic.html You need a SVN server and repository. That is what you will "share" with. All users that want to collaborate on the versions of a file will need to use a SVN client so that they can checkout and edit files stored in your repository and commit their changes back.

Categories : Eclipse

Oracle 11g startup and mount
fix it: Connect to DB: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> shutdown immediate; Database aready shutdown. Aready uninstall database. ORACLE instance aready close. SQL> startup nomount; ORA-12514: TNS: listner process can't recognize current service of connection describe string监听程序 SQL> startup nomount; ORA-24324: service handle not initialized ORA-01041: internal error, hostdef extension name not exists SQL> conn sys/sys as sysdba; Aready connect to idle instance SQL> startup; ORACLE instance started。 Total System Global Area 535662592 bytes Fixed Size 1334380 bytes Variable Size 234881940 bytes Data

Categories : Oracle

Mount other users hive with C# .net
You can call the RegLoadKey API method using platform invoke. [DllImport("advapi32.dll", SetLastError = true)] static extern Int32 RegLoadKey(IntPtr hKey, string lpSubKey, string lpFile);

Categories : C#

mount unmount without sudo
You must add /nfs entry to /etc/fstab on the server host. In the list of options of the entry must be option user or users (depends on that if you want that user could unmount the filesystem or not). Example: xx.xx.xx.xx:/ /nfs nfs rsize=4096,wsize=4096,user 0 0

Categories : Linux

How to mount an attached EC2 volume in CLI?
I'm not sure if this is a good answer, try running: lsblk /dev/sdi And it may list partitions that exists on that drive like this: sdi |--sdi1 |--sdi2 |--sdi3 If you have something like sdi1 you can try to mount it: mount /dev/sdi1 /your/folder/here Hope it helps.

Categories : Linux

How to mount a snapshot from boto?
The attach_volume method takes an instance_id and a volume_id but you are passing objects. Try this: c.attach_volume(volume.id, instance.id, "/dev/sdh") The device_name should be a reasonable device name for the OS you are using. You can find more about what that value should be here. boto uses standard Python logging so you can configure it to log as much or as little as you want. This gist shows a shortcut approach to get full debug logging. However, boto can only log what it has access to and it's possible the response from EC2 just doesn't provide much information.

Categories : Amazon

how to determine if the mount successful in QT code
You can check last error of a QProcess by using error and state functions (Documentation for "error" Documentation for "state"). "What if there is an error that is not in my condition." You can add something like this in your code: else if(connectSamba.state() == QProcess::NotRunning && connectSamba.error() >= 0) { LogWrite("Unknown error", Qt::red); return false; } Or, if you want to give more specific information, you can create a condition for each error code separately. Here's a list of codes. Alternatively, don't add the above block to the error checking code. Instead, create a slot to which you connect the error signal of connectSamba class: // add this line below "QProcess connectSamba;" line in mwDm::mountFolder connect(&connectSamba, SIGNAL(error(QPro

Categories : Qt

Scripted truecrypt mount, without using /dev/ or UUID
Use Disk ID instead: #!/bin/bash # Run this script as root to avoid entering the root password twice secret=0xa52f2c38 # Generate tempfile tempfile=fdisk.tmp sudo fdisk -l > $tempfile # -------------------------------------------------------------------------- # Locate secret drive and mount it # -------------------------------------------------------------------------- num=$[ $(grep -n "^Disk identifier: $secret" $tempfile | cut -f1 -d:) - 5 ] if [ $num > 0 ] # num will be greater than 0 if drive exists then # Get line containing /dev # ---------------------------------------------------------------------- dev=$(sed -n "${num}p" $tempfile | cut -f2 -d' ' | sed 's/://') truecrypt $dev /media/secret # Check (Create .truecrypt on the mounted volumen beforehand) # -----------

Categories : Misc

Attempt to mount remote nfs only when it is accessed
You can use automount for this. https://help.ubuntu.com/community/Autofs The example there shows how to automount an NFS share.

Categories : Misc

mount: nfs access denied by server
Is there a config file on the NAS where to put allowances for clients? E.g. in debian based OS the config file is "/etc/exports" and you would put there "/volume2/Asterisk_Recordings 192.168.1.1(rw,sync)" and activate this with "exportfs -a" (your NAS may do this automatically if you update the config via a web interface, I guess.) Check also Mounting NFS results in access denied by server.

Categories : Misc

Icecast dont see mount point
Hey it looks like you made an error configuring Nicecast. You might want to read the following guide. Please note that Nicecast has an built-in Icecast server, make sure you are not using this one. As well not that Nicecast for some reason will kill any running Icecast server on the same machine where Nicecast is started. So you have to first start Nicecast and only afterwards start your Icecast Server. (This should not happen anymore after you have disable the built-in server though) Another issue I experience with some versions of Nicecast is that the Settings or at least some (like the Mountpoint Name) only take effect after restarting Nicecast. Additionally make sure your Mountpoint name is not /, as this is an impossible mountpoint name (it conflicts with the web interface).

Categories : Misc

LSF - Mount a cgroups.cpuset for jobs
Support for cpuset was released in LSF 9.1.1.1 (GA July 31, 2013). The feature adds a new parameter to lsf.conf LSB_RESOURCE_ENFORCE. You can set it to cpu, memory or both. You need to enable the cpu and memory affinity feature of LSF to use cpuset.

Categories : Linux

Mount to local directory without Fuse.
In short, no. If your host wont enable FUSE or any other kernel module that allows you to mount filesystems in user space, then there's nothing you can run yourself. Your best bet is to check if your VPS has a module installed specifically for FTP filesystems, or get the host to install one, or get the host to enable FUSE.. or just move on to a different host.

Categories : Linux

Mount Windows shared filder to AIX
Two options 1) The easiest would be to install the bos.cifs fileset and use smit to mount the share as a filesystem: http://www-01.ibm.com/support/docview.wss?uid=isg1fileset-1244257370 2) I would not recommend this for "newbies", but you may have better luck getting this to work by installing samba: www.samba.org

Categories : Unix

Android - Mount a Samba share in code
Probably smbfs/cifs are currently not supported by your kernel. As Delyan said, ensure your kernel can mount these filesystem : $ cat /proc/filesystems nodev sysfs nodev rootfs nodev bdev nodev proc nodev cgroup nodev tmpfs nodev debugfs nodev sockfs nodev usbfs .... If they are not listed, you should try to do a modprobing (sometimes the module you want just have to be activated), get root access then : # modprobe <modulename(without.ko)> e.g. : # modprobe cifs If it doesn't work you will have to change or recompile your kernel (including appropriate modules).

Categories : Android

mount remote windows share from centos
The mount.cifs file is provided by the samba-client package. This can be installed from the standard CentOS yum repository by running the following command: yum install samba samba-client Once installed, you can mount a Windows SMB share on your CentOS server by running the following command: Syntax: mount.cifs //SERVER_ADDRESS/SHARE_NAME MOUNT_POINT -o user=USERNAME SERVER_ADDRESS: Windows system’s IP address or hostname SHARE_NAME: The name of the shared folder configured on the Windows system USERNAME: Windows user that has access to this share MOUNT_POINT: The local mount point on your CentOS server I am mounting to a share from \10.11.10.26snaps Make a directory under mount for your reference mkdir /mnt/mymount Now I am mounting the snaps folder from indiafps02, User

Categories : Linux

C - How do I move a file from a cifs mount to local hdd
In all likelihood, if you interrogate errno after rename fails, you will find that it is set to EXDEV. May I suggest that you add that information or confirm that it is EXDEV. If you are getting EXDEV, then it is because of the Linux limitation that rename() only works if oldpath and newpath are on the same mounted file system. From rename(2) EXDEV oldpath and newpath are not on the same mounted file system. (Linux permits a file system to be mounted at multiple points, but rename() does not work across different mount points, even if the same file system is mounted on both.)

Categories : C

Listing of all folders of Google Drive through IOS Google Drive SDK
Assuming this code works, there is a problem in the query. Multiple queries should be combined by and. query.q = @"mimeType='application/vnd.google-apps.folder' and trashed=false"; For more examples of sample queries, take a look at Search for Files in official documentation. Also, in case this code doesn't work, you want to use Files.list() with query above. Check the link and there is a sample code for Object-c you might want to use.

Categories : Objective C

fusermount call similar to mount --bind for local directories?
Well, came back to this question, Googled, saw the FUSE manual, this post, then bindfs which does exactly what I had wanted. This usage worked for me: bindfs -n ~+/src ~+/dest Without -n, --no-allow-other, then FUSE gave me an error: fusermount: failed to open /etc/fuse.conf: Permission denied fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf Odd that it wants to allow other users by default. It's available in Ubuntu 12.04, sudo apt-get install bindfs

Categories : Misc

Mount S3 (s3fs) on EC2 with dynamic files - Persistent Public Permission
In my php script that PUT files to S3 using AWK SDK for PHP, I had to add in the meta data, as shown below, which did the trick: $response = $s3->create_object('bucketname', 'mountpoint/'.$filename, array( 'body' => $json_data, 'contentType' => 'application/json', 'acl' => AmazonS3::ACL_PUBLIC, 'meta' => array( 'mode' => '33188', // x-amz-meta-mode ) )); The mode "33188" defined the permissions "rw-r--r--" instead of "---------" in S3 bucket (but reflected only in the EC2 mounted folder), which was later inherited by the EC2 mounted drive. Hope this helps someone. Let me know!

Categories : Amazon

How to rename a MOUNT (mounted shared folder from Windows named mnt)
Follow these steps: Unmount: umount /mnt Create another folder /my_new_mount Mount again: mount -t cifs -o username=myusername,password=mypassword //10.80.50.50/Share /my_new_mount Update in /etc/fstab

Categories : Linux

Serving static files with CherryPy ignores mount point?
This is how I solved it: [/] tools.staticdir.root: os.path.abspath("public/") tools.encode.on: False tools.gzip.on: True tools.gzip.mime_types: ['text/html', 'text/plain', 'application/json', 'text/javascript', 'application/javascript'] [/static] tools.etags.on: True tools.staticdir.on: True tools.staticdir.dir: "public" [/js] tools.staticdir.on: True tools.staticdir.dir: 'js' [/css] tools.staticdir.on: True tools.staticdir.dir: 'css' [/images] tools.staticdir.on: True tools.staticdir.dir: 'images'

Categories : Python

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

Mounting shared folder in KVM VM error: mount: unknown filesystem type '9p'
I have a kvm guest(centos 6.4) and below you can see the result grep CONFIG_9P_FS /boot/config-$(uname -r) # CONFIG_9P_FS is not set [root@client ~]# cat /etc/redhat-release CentOS release 6.4 (Final) For more information you can look this link http://wiki.qemu.org/Documentation/9psetup Thanks

Categories : Linux

Running a .py script from bash, how can I pass a python variable back to the terminal once the .py is done running?
You can write your variable and its value into an ini file from the python script. In Values.ini file my_var="value" After executing python script, just invoke Values.ini using . operator . Values.ini Now your shell variable $my_var will be having the assigned value. The advantage with this method is that you can assign any number of variables like this. var1="value1" var2="value2" var3="value3"

Categories : Python

Is it bad to let CSS3 infinite animations running, and leave the page. Is the animation still running invisibly?
If the user leaves the page completely (e.g. navigates to a whole new page or closes that tab) then the animations shouldn't keep running. If they somehow do keep being updated, it's because of a browser bug and you shouldn't worry about it anyway. However, CSS3 animations for hidden elements (display: none;, for instance) still get evaluated, since they are keyframe-based, and there might be a keyframe sometime in the future that would cause the element to become visible again. Imagine wanting to animate a box by first hiding it, then showing it again and making it flash. If CSS transitions would suddenly become disabled when the box is hidden, the animation would stop and the box would never appear again. And that's not what you want. Note: profiling your web page can be done e.g. in

Categories : CSS

Calculate latency for touch screen UI running on ARM controller board running Linux
There are 3 latencies involved in the above scenario 1. Time taken for the touchscreen to register the finger and raise an input-event. Usually a few milliseconds. Enable FTRACE and log the following with timestamps -- ISR -- Entry of Bottom-half -- Invoking of input_report() 2. Time taken by the app responsible for the GUI to update it. Depending upon the app/framework, usually the most significant contributor to latency. Add normal console logs with timestamps in the GUI app's code -- upon receiving the input event -- just before the command to modify the GUI 3. The time taken by the display to update. Usually within 15-30 milliseconds The final latency is a sum-total of the above 3 latencies.

Categories : Linux



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