w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Vim swap and backup files for encrypted drive
One way is to just make sure there's a Temp directory at the root of the encrypted drive: set backup set directory=/Temp//,C:/Temp// set backupdir=/Temp//,C:/Temp// If there isn't one, it will fall back to the Temp directory on the C drive.

Categories : Vim

Apache & OS X FileVault 2
I disabled FileVault, did a system reboot, and everything is back to normal. So apparently there are some issues with running Mac Apache and FileVault. Not much has been said about it online. Hopefully this thread can serve some purpose and we can figure out a solution.

Categories : Osx

Mac: Updated HOME environment variable in /etc/launchd.conf and now machine wont boot
I'll give you two options, but first a warning: both of these involve using the command line to undo the damage, and if you do it wrong there's a possibility you'll make it even worse. A backup would've been a good idea, but it's a little late for that (well, actually, there are still ways to do it, but they also involve a risk of getting it wrong...). So whatever your do, be careful. Option 1: use single-user mode (Command-S at startup). This will leave you running as root, which means you are not subject to normal file permissions; after remounting the startup disk for write access (mount -uw /) you should not get permissions errors. You said this didn't work; the most likely thing is that you mistyped the command (I see this happen a lot -- people either leave out the "/", or the space

Categories : Osx

FileVault in cq5 with GIT repository on Windows platform
Do yourself a favor and dump filevault ASAP - especially on Windows, it's slow and unstable, and has a tendency to mess up its .vlt files and end up nuking your files. Move towards a proper setup using maven for builds and deploys, it will save you a lot a lot of headaches in the long run. VLT should basically only be used for checking out the /lib and /apps/geometrixx, so you can look at Adobes demo (not "OOTB"!) components - they're a good reference for how not to do things :)

Categories : GIT

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

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

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

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

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

Random access to an encrypted file and write encrypted data into a specific offset in Android
The whole file has to be re-encrypted, with a new initialization vector, every time it is changed. Any other approach is insecure. ECB mode supports random access without re-encryption, but ECB does not satisfy the "secure" requirement per se. CBC mode does not support random access. CTR mode does support random access, but you must never use it this way, because it counts as nonce reuse, which results in plaintext recovery.

Categories : Android

Custom ClassLoader uses secret key to decrypt pre-encrypted class files (which had been encrypted with the secret key)
You already answered your own question: Your decrypting class loader still has to call defineClass. Anyone can launch your app launcher in their own class loader and simply hand your app launcher a version of java.lang.ClassLoader that will write out anything that is passed to defineClass. There is no way around defineClass (aside from native code, I suppose). If you are so worried about your classes being decompiled you're better off with an obfuscator (ProGuard or the like) or possibly an ahead of time native compiler (GCJ, Jet).

Categories : Java

How can I make my routes that start with /home always direct to the home controller and index action?
Sure, just remove the {action} part from your route definition so that the action is always Index: routes.MapRoute( name: "Default", url: "home/{anything}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } );

Categories : Asp Net Mvc

MVC image folder not accessible from Home/Contact but visible from Home/Index in _Layouts.cshtml
It has to do with the relative path to images folder. You likely have Index action and Home controller as default parameter values in a Default route. Therefore, the url that will invoke this action probably does not have controller and action included. Assuming that images folder is in website root directory, the relative path images takes us to the correct location. In case of Home/Contact url, same relative path would mean Home/Contact/images folder which does not exist. Use: <img src="<%= Url.Content("~/[path to images dir from website root dir (usually - content)]/images/logo.png") %>" ... Realized that you use Razor: <img src="@Url.Content("~/content/images/logo.png")" ...

Categories : Image

How do you create a transparent activity that can overlay the home screen but is not dismissed when the home or back button is pressed?
You can create a transparent activity with the help of 1.Make the background of layout in your xml file transparent by using android:background="@android:color/transparent" 2.And also,make the theme in your manifest file transparent for that particular acitivity <activity android:name="Your activity" android:label="@string/app_name" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" > </activity> 3.And for back press over ride OnBackPressed() Method and remove super.onBackPressed() @Override public void onBackPressed() { // TODO Auto-generated method stub }

Categories : Android

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

Using routes to link to home/subpage/THIS instead of home/THIS
You should use resources_entrepreneurship_path. Note the _ instead of the /. Also, you can nest routes inside a namespace like this: namespace 'resources' do get 'entrepreneurship', to: 'static_pages#entrepreneurship' end

Categories : HTML

Mounting sshfs on unreliable connection
You can play a little bit with the options of sshfs, for example, enabling the compression, the automatic reconnect and nodelay flag for tcp: -C equivalent to '-o compression=yes' -o reconnect -o workaround=LIST [no]nodelaysrv set nodelay tcp flag in ssh (default: off) sshfs server:/srv/homes /mnt/mountpoint -C -o reconnect -o workaround=nodelaysrv But what has give me better results is using NFS, I don't have the lags that I had with sshfs and is pretty standard in the *nix environment, you can export your directory with the read-only option giving you an extra speed. Server: # File: /etc/exports /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check) Client: mount server:/srv/homes /mnt/mountpoint

Categories : Misc

Delete mounting directory after umount -l
It should be safe to delete the directory after the umount if you check for the success of the umount command before but I would suggest to change you script to check if the mountpoint it's listed in the mount table instead with mount | grep sda1

Categories : Linux

Remotely mounting network drives not working
You should be able to connect the drive with something like this: $params = 'use', 'z:', "$global:NetDir", "/user:domain$global:username", "$global:password" net @params If you can't access the drive after connecting it you need to provide more details (particularly the error you're getting). "Does not work" is an insufficient problem description.

Categories : Windows

Use Webdav on Linux to get a file from SkyDrive *without* mounting
If you are downloading a specific file, and already know the exact path/URL to that file (as per your example), I'm not sure that you really need to worry about the DAV extensions. Have you tried downloading the file using a simple HTTP GET, through something like urllib2?

Categories : Python

Mounting NFS Folder on to a Remote Machine (Both machines are on Red Hat Linux)
Mounting with "mount" command is not permanent only until the next reboot. If you need a permanent mount you have to edit "/etc/fstab" i.e. usanfsdo1:/home/files /home/mount/files nfs rw 0 0

Categories : Linux

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

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

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

R - OSX Mountain Lion and CPU Limit
Tried ulimit... Appears I do not have access, even via sudo. I get the same output from ulimit -a -H before and after giving ulimit -t 12000 # sets cputime limit to 12000 seconds from 600 seconds SOLVED via Debian Virtual Machine. If someone has a Mountain Lionic solution, please let us know.

Categories : R

MAC OSX LION: gcc on mac not compiling wget
Honestly, even though it appears that gcc exists; but does it point to a valid install? It still sounds like it is not installed properly and with an upgrade to Mountain Lion, all your open source tools have been scrubbed away and pushed to Xcode and must be manually installed if necessary.

Categories : C++

Installing JDK on OSX Lion for Scala
Scala is a popular enough of a language for there to be plenty of information on how to get started from scratch. For example, googling for "scala installation" gave me (amongst other stuff) http://www.tutorialspoint.com/scala/scala_environment_setup.htm —they talk about JVM versions, how to install Scala, etc; i.e. all you need. If that page won't do, I'm sure you'll find many more.

Categories : Scala

Two versions of PHP - Mountain Lion
Your Apache is including libphp5.so of the wrong/the other installation. Option 1: See if you can find a libphp5.so file for your other PHP installation and point the Apache config to it (just put the whole path in the LoadModule line and restart Apache). If you cannot find such a file, the Apache module wasn't compiled for that PHP version. Compiling that may be a bit complicated, so in that case: Option 2: Figure out which PHP you're executing on the command line using which php and then just use the other one using the full path, e.g. instead of $ php ... use $ /usr/bin/php .... Note that you may still have different PHP configuration files for Apache and the CLI.

Categories : PHP

Will it be possible to upload to App Store from Lion?
Your Lion will be just fine as stated here: https://developer.apple.com/support/ios/ios-dev-center.html "To develop with the iOS SDK and Xcode, you must have an Intel-based Mac running Mac OS X Snow Leopard or later and you must be registered as an Apple Developer." Update July 2015 https://developer.apple.com/support/enrollment/ You must have an Intel-based Mac running OS X Yosemite (v10.10) or later.

Categories : IOS

Mac OSX Lion/X11/CImg Library
The header file Xlib.h is in /opt/X11/include, so add that path to the Header Search Paths in Xcode: You'll probably need to add libraries from /opt/X11/lib as well...

Categories : Xcode

SublimeClang OSX Mountain Lion C++11
It may be too late, but I found how to do it. This matter is because clang uses headers for gcc-4.2, which is quite old and doesn't support C++11. To complete C++11 code, you have to get newer gcc and copy the include path it uses. If you have homebrew, open terminal and type brew tap homebrew/versions brew install gcc48 You can install gcc-4.8 and new libstdc++ with these two lines. Now, create some c++ file and try to use g++-4.8 with -v option. g++-4.8 -v example.cpp -v option tell gcc to show detailed log. In the output, there should be some lines like this. #include <...> search starts here: /usr/local/Cellar/gcc48/4.8.1/gcc/lib/gcc/x86_64-apple-darwin12.4.1/4.8.1/../../../../include/c++/4.8.1 /usr/local/Cellar/gcc48/4.8.1/gcc/lib/gcc/x86_64-apple-darwin12.4.1/4.8.1/

Categories : C++

TideSDK Notifications in OSX Lion 10.7.5
Harry, I'm not too familiar with CoffeeScript, but the following code works for me in 10.7.5 and 10.8.4 - it seems similar to what you have: function showNotify(title, message) { var notification = Ti.Notification.createNotification({ 'title': title || 'No Title', 'message': message || 'No Message', 'timeout': 10 }); notification.show(); } showNotify("The Title", "The Message"); Hope it helps.

Categories : Misc

Where are the files generated with Xcode 4.5 in Lion?
This has nothing to do with Lion. Xcode puts generated files in: ~/Library/Developer/Xcode/DerivedData where ~ is your home directory. Keep in mind that the ~/Library directory is hidden by default in Lion (and later).

Categories : Xcode



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