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

Read from internal storage in Windows Phone 8?
I am not sure where specifically you mean by internal storage, but there are a few locations you can access on the device. Application Data (Formerly Isolated Storage) This is the bread and butter location for an app to access. It is your own private location to store settings or files that you may have. It can be accessed with: StorageFolder localRoot = ApplicationData.Current.LocalFolder: There is more documentation here with examples as well. Libraries These are common locations where apps are able to store and access media data. Accessing these requires declaring the capability for the area you are accessing and the file associations for the files you would like to see. For example getting the camera roll folder would require the following: In WMAppManifest: <Capability

Categories : C#

Python listing directories in Windows XP from Linux host
Windows sharing is implemented using smb protocol. Windows Explorer and most of the Linux file managers (like Nautilus) make it transparent to the user, so it is easy to do common file operations on filesfolders shared through smb. However, Linux (and thus Python that runs on top of it) does not add this abstraction by default on file system level (though you can mount smb share as part of your fs). So, in the end, to access those files you can: mount your share using mount -t cifs (man or google for details) and then access your share from Python as usual folder (to my mind this is rather kludgy solution) use library that deals specifically with smb, like pysmb (here is the relevant docs section) and do your file operations with it's help. Hope this will help.

Categories : Python

access mysql in host from guest virtualbox
Your external IP being static or not has no bearing to accessing a virtualized server on your LAN. Set VirtualBox to bridge mode. Simply determine your computer's DHCP-selected internal IP (usually 192.168.1.SOMETHING) and replace the last number with another that is less than 250. For example, if your computer was 192.168.1.6, 192.168.1.70 would work fine on the VM(pick a high number to void conflicts). Set it by using the control panel->adapter settings. Reboot the VM. Connect to MySQL at 192.168.1.70(or the address you picked earlier). Note: If your computer's address is in a different subnet (192.168.0.XXX, 10.XX.XX.XX, etc) change the last number and keep the first numbers the same as on the host.

Categories : Mysql

Ansible windows client or host with Ansible linux server? Possible?
There's no built-in Windows support for Ansible today. If you search the mailing list, you'll find some references to people having some minimal success with things like CygWin. You should probably check out the mailing list and stay tuned.

Categories : Windows

running rails on guest linux virtualbox: a database.yml issue
What you are describing is pretty much the setup that Vagrant is offering, so yeah, you are doing fine, everyone else is also doing it but they didn't set it up themselves (and by that probably get some really nice addons as well, you should take a look at Vagrant). For your second question: no. Not on the fly. Rails loads the database.yml end then connects to the database with that. When you change it while your Rails server is running, the changes won't get noticed. What you can do however is setup a new environment for your two different machines. Then you can switch between the different environments and depending on the environment, one or the other database gets accessed.

Categories : Ruby On Rails

Is it possible to address localhost from linux ubuntu to a virtualbox virtual machine
In the default network configuration (NAT) for VirtualBox you can accesss the host machine with the IP 10.0.2.2, so in the browser you would use that instead of localhost. (I can't find this in the official documentation though?)

Categories : Linux

Cannot connect to VM VirtualBox Linux Nginx server after restarting my computer
First make sure that the service is working using sudo service nginx status If it's not running try starting it manually sudo service nginx start If it fails to start, you can check the error log in /var/log/nginx/error.log or any other error log defined in the server config.

Categories : Linux

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

virtualbox (Win 7) network: guest trying to see guest on separate host
Got an answer to this on the virtualbox forum, The bridged adapter allows for this. https://forums.virtualbox.org/viewtopic.php?f=2&t=56403&p=261118#p261118

Categories : Networking

VirtualBox: "A disk read error occurred" after migrating Win XP to Virtualbox
I solved this, and thought i would share my solution: By comparing sectors to a working VM, I found that the following change was needed: Sector 63 offset 0x1A was 0xF0, and this byte needed to be changed to 0xFF. To do this: Attach the non booting drive image as a second drive on a working VM Boot the working VM, and install a low level sector editor (Google!) Run this editor, and look at sector 63 on the non-working drive image. Note that depending on how you select the disk, this is either sector 0, or sector 63 It the same physical sector on the disk Confirm the byte 0xF0 is at offset 0x1A (26), and change it to 0xFF and write the sector Shutdown the VM, and then in settings, detach the drive image from step 1 The disk image was healed - to a degree. It can now boot in recovery co

Categories : Windows

Windows 7 image to Oracle VirtualBox
The Windows 7 backup image is not intended to be bootable by all accounts. You will need to restore the image. Acronis appears to be able to restore the image to a partition, if you dont want to write 50 Gb to DVDs. the backup VHDs are not bootable in the form they are created with Windows backup. Reference

Categories : Windows

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

Debugging Windows Kernel with two VirtualBox hosts
Uncheck "Create Pipe" on one of the VMs (for best practice it should be a debugger target). For serial port redirection one VM acts as a server (the one that creates the pipe) and other acts as a client. Use some terminal application to check that you can pass the data between the VMs using com port. And only then setup kernel debugger.

Categories : Windows

VT-X on windows 7 cannot be recognized by Guest OS(Ubuntu 12.04) with virtualbox
Thanks for answering, I finally installed Ubuntu 12.04 with windows7 on the same hard disk. As for my issue, virtualbox don't support full virtuallization, so I could not see any VMX feature in my Guest OS, but vmware do, which suits me well.

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

Windows 7 on Virtualbox virtual machine: is it OpenGL 1.x compatible?
Yes, your guest VM will be able to run OpenGL 1.x and newer. Install the VirtualBox Guest Additions via the "Devices" menu in the virtual machine's menu bar VirtualBox has a handy menu item named "Install guest additions", which mounts the Guest Additions ISO file inside your virtual machine This will enable 3D hardware acceleration in your guest machine (OpenGL and Direct3D 8/9). VirtualBox states that because 3D support is still experimental at this time, it is disabled by default and must be manually enabled in the VM settings http://www.virtualbox.org/manual/ch04.html#guestadd-3d

Categories : Windows

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

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

Pre-allocating drive space for file storage
You can pre-allocate space by writing a large file, but to be honest I wouldn't bother. Performance will be pretty good/ probably better than you need. If you really needed performance, you'd be writing C++/C# and doing RAW I/O. But that's typically only done when writing an RDBMS engine, high-volume media capture or similar.

Categories : Java

Azure VM - Temporary Storage drive - a thing of the past?
When you are using Azure VMs - the OS drive & the Data drives are backed by Azure Blob Storage (the VHDs are Page Blobs). The OS disk size limit during most of the CTP was 10GB, but was raised around the time the feature shipped to the larger 128GB. The deciding factor for Data Drive/No Data Drive/Lots of Data Drives (Max = 16) for SQL is more a function of your IOPS requirements than either the size of the DB corpus or the relative drive size. For SQL workloads in a VM, I would strongly recommend reviewing: http://go.microsoft.com/fwlink/?LinkId=306266 This is a performance paper based on the latest Azure bits, developed by the SQL team (updated June 2013). Pat

Categories : Azure

What is internal storage on Android?
Internal Storage: Store private data on the device memory. If you want something private inside your app, store it here. If you store anything in the External Storage every app can access it. Read the docs.... http://developer.android.com/guide/topics/data/data-storage.html#filesInternal

Categories : Android

How safe is Internal Storage?
Using SharedPreferences is what you may want. It saves data in an XML file deep in the caverns of the /data/ directory. The user or other apps can't get there unless the phone has root permissions. http://developer.android.com/reference/android/content/SharedPreferences.html

Categories : Java

RandomAccessFile on internal storage
If you create a file and write to it, you have to close() it before re-opening. In addition, at least on some devices the file by default goes to the root directory. public void test() { try { RandomAccessFile access = new RandomAccessFile(new File(getFilesDir(),"xxx.txt"), "rw"); access.writeBytes("hello"); access.close(); } catch (IOException x) { x.printStackTrace(); } }

Categories : Android

Writing to internal storage in c++ from jni
More information would be helpful. Based on the path, I'm assuming you're on a Linux box. I would first check the permissions of the path. A few suggestions below 1) Try opening a file in your home directory and see if you have the same issue. 2) Try setting the file world writable using chmod 777 and see if that fixes the problem. Remember setting world writable is really INSECURE and you should change it to something more restrictive once you've found the problem.

Categories : Android

Opening port so that pgAdmin on Windows 7 can connect to PostgreSQL on Debian on VirtualBox
What about your pg_hba.conf file? Have you configured it to accept connections from hosts in the 192.168.56.0 network? Try to add this line and restart Postgres: # VitualBox Host-Only Adapter host all all 192.168.56.0/24 md5 If it's a testing environment you could even replace 192.168.56.0/24 with 0.0.0.0/0 and forget about it.

Categories : Postgresql

Windows Batch - Wait Until VirtualBox Finished Loading To Execute Next Command?
As you have observed, the VirtualBox/VBoxManage process will return and exit once the VM has actually turned on. There isn't a good way to hook into the guest at start, though one thing you can do is instruct VirtualBox to run a command and check for the exit code. I would insert this code in your batch file script right after starting the guest VM but before you want to start sh.exe: :CheckVBox VBoxManage guestcontrol Win8 exec --image c:WindowsSystem32ipconfig.exe --wait-exit --username Goyuix --password VirtualBoxRox IF NOT ERRORLEVEL 0 ( REM Do something to sleep here, pinging localhost or timeout GOTO CheckVBox ) REM VM Ready, go ahead and fire up other apps that depend on it Note: you will need to have the path to the VBoxManage executable in your PATH environment variable. On

Categories : Shell

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

Internal versus External Storage
"What is the best way to solve this? Force users to have external storage or are there other ways to solve this?"...I'm not certain, but I think you have no choice but to force users to have external storage to be able to email an attachment.

Categories : Android

Android: using XML layout from internal storage
probably you can create a XmlPullParser from the file you downloaded, inflate it through the XmlPullParser obect and pass it as paramter to setContentView. doc for XmlPullParser is here. The inflate method you should use is here. I have never triedm, but teorically seems possible Edit: A project of @RoundSparrowhilltx can be found here

Categories : Android

How to read .gif file from internal storage?
you can find the path of image following way File file= new File(Environment.getExternalStorageDirectory() + "/Images/a.gif"); But you can not set this gif image to ImageView the gif file is show in webView.

Categories : Android

Where is Android Emulator Internal Storage
They are stored in an img file inside the avd directory. If you are using Linux you can mount the img file via: sudo mount -o loop ~/.android/avd/<youremulator>/sdcard.img <mountpoint> Not sure if there is a way in Windows or Mac to view the contents of the img since they are either in ext3, ext4, or yaffs file system format (depending on what you are emulating) and windows doesn't easily support those file systems. Your best bet is to use adb to copy the file directly out of the emulator while it is running as shown in adb --help: adb pull <remote> [<local>] - copy file/dir from device

Categories : Android

Read an ArrayList from Internal Storage
you have to serialize/deserialize your object: Your MyClass must implments Serializable and all the member inside MyClass must be serializable public void saveToInternalStorage() { try { FileOutputStream fos = ctx.openFileOutput(STORAGE_FILENAME, Context.MODE_PRIVATE); ObjectOutputStream of = new ObjectOutputStream(fos); of.writeObject(aList); of.flush(); of.close(); fos.close(); } catch (Exception e) { Log.e("InternalStorage", e.getMessage()); } } to deserialize the object: public ArrayList<MyClass> readFromInternalStorage() { ArrayList<MyClass> toReturn; FileInputStream fis; try { fis = ctx.openFileInput(STORAGE_FILENAME); Objec

Categories : Android

Store remote PDF to Android Internal Storage
You can save files directly on the device's internal storage. By default, files saved to the internal storage are private to your application and other applications cannot access them. See http://developer.android.com/guide/topics/data/data-storage.html#filesInternal for full details. Read the answer to this question for a java example of how to download the file from the web. Android - downloading image from web, saving to internal memory in location private to app, displaying for list item

Categories : Android

Set default ringtone from private internal storage
In my testing (Android v.19), I can use RingtoneManager.setActualDefaultRingtoneUri() to point to a ringtone on private, internal app storage without exception. However, attempting to play this Ringtone simply plays the default sound. I'm betting the system application that plays Ringtones doesn't have access to your apps internal storage. Bad for this scenario, but good for security!

Categories : Android

How do I set this program up to use internal storage instead of external (android)
You can't, not taking the picture like this. You're using an intent and taking the picture from another app. That app can't access your internal memory (internal memory is per application). You either need to save to a common directory on external storage, or you need to take the picture yourself.

Categories : Android

Send email with attachment from internal storage
public void emailAttachments(String[] sendToList, String emailSubject, String emailBody, String attachmentsList[]) { try { Intent intent = new Intent( android.content.Intent.ACTION_SEND_MULTIPLE); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); if (sendToList != null && sendToList.length > 0) intent.putExtra(android.content.Intent.EXTRA_EMAIL, sendToList); if (!TextUtils.isEmpty(emailSubject)) intent.putExtra(android.content.Intent.EXTRA_SUBJECT, emailSubject); if (!TextUtils.isEmpty(emailBody)) intent.putExtra(android.content.Intent.EXTRA_TEXT, emailBody); intent.setType("image/

Categories : Android

Storing files on SD card/internal storage
Read this. Also in my opinion you either have a setting to select the storage, and then inform the user if there are no empty space left, but make shure that the recorded sound did not get lost( for example you recorded the first word of a kid, and then you lost the record because of no space), or you can throw a question on them, where to save, but for easy use, you should have a default place, so you dont need to browse directoryes after each recording.

Categories : Android

Create a public folder in internal storage
From this post : Correct way: Create a File for your desired directory (e.g., File path=new File(getFilesDir(),"myfolder");) Call mkdirs() on that File to create the directory if it does not exist Create a File for the output file (e.g., File mypath=new File(path,"myfile.txt");) Use standard Java I/O to write to that File (e.g., using new BufferedWriter(new FileWriter(mypath))) Enjoy. Also to create public file I use : /** * Context.MODE_PRIVATE will create the file (or replace a file of the same name) and make it private to your application. * Other modes available are: MODE_APPEND, MODE_WORLD_READABLE, and MODE_WORLD_WRITEABLE. */ public static void createInternalFile(Context theContext, String theFileName, byte[] theData, int theMode) { FileOutpu

Categories : Java

android parse internal storage output
On line 38 you declare: Context Context; but never set this variable anywhere, so it's default declaration will be null, so on line 62 when you call FileInputStream inputStream = Context.openFileInput(filename); The value of Context is null, hence the NullPointerException. You will need to get a value for the "Context" variable, maybe pass it into the constructor from an activity. I would also recommend renaming that variable to start with a lower case character. That would eliminate confusion here, and it wouldn't look like you were calling a static method on the Context class.

Categories : Android



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