w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to force the use of JRE7?
Set the JAVA_HOME environment variable and also point your path variable to the java 7 bin folder. Here is a visual rep of how to set up.(Note: make changes to paths according ur system and also use version numbers correctly)

Categories : Java

Generating Heap Dumps Java JRE7
You can do it manually, using Java JDK's jmap.exe. You get the PID of your process. Navigate to %JAVA_HOME%/bin/ (JDK) In the console (Command Prompt) type jmap.exe -dump:format=b,file=C:dumpdump.bin PID dump file is saved in the path you provide (in my example is C:dumpdump.bin) Then you can use NetBeans IDE to analyze this dump. It has an inbuilt tools, just import the dump.bin.

Categories : Java

WiX: Copy a file from local folder to installation folder
Actually I've figured out what the issue is. The problem is that the SourceDirectory of the CopyFile element supposed to point to the Directory tag id. Instead, I've used SourceProperty attribute of the CopyFlie tag, and also defined a Property separately, which made the use of the CopyFile element correct. So it worked.

Categories : Wix

Biopython installation issues: "ImportError: No module named bio"
I don't know much about python on windows, but you can try to give the full path of the library using the method described here. I'll paste that user's code so the answer can be complete: import imp foo = imp.load_source('module.name', 'C:Python27Lib') foo.MyClass() On windows, the default path should be something like: C:Python27Lib although if it was, you wouldn't have this issue (also not sure about the backslashes)... Backup solution (from same previous link)... import sys # the mock-0.3.1 dir contains testcase.py, testutils.py & mock.py sys.path.append('/foo/bar/mock-0.3.1')

Categories : Python

vb.net scan installation folder for rtf documents
Here's the code you can use to load the comboBox. After that, you can use the SelectedIndexChanged event (or other events) to read the file into the rich text box. I didn't test this, but it should be pretty close. dim ss() as string fPath = System.Windows.Forms.Application.UserAppDataPath ' or fPath = My.Computer.FileSystem.SpecialDirectories.MyDocuments, or other directory ss = Directory.GetFiles(fPath, "*.rtf") ComboBox1.items.clear() for each string s in ss ComboBox1.Items.add(s) next s

Categories : Vb.Net

Failed to unpack the installation folder
If you don't understand the terminal—or even if you do—you're going to be a lot happier using pip or easy_install than trying to do this manually. pip is better, but doesn't come built in with Apple's Python, so you'll have to install it first. Fortunately, that's pretty easy. So, let's do that: $ sudo easy_install pip And now: $ sudo pip install pyserial That will automatically download, build, and install the package for you, without you having to know anything about what directory things get downloaded to or how to run the tar command properly or anything. And let's test it just to make sure: $ python Python 2.7.2 (blah blah blah … ) >>> import serial >>> serial.VERSION '2.6'

Categories : Python

with mac's default php and apache installation, where is the www folder equivalent?
You can look in /etc/apache2/httpd.conf to find more settings and to change it but the default for OSX 10.8 is /Library/WebServer/Documents. Some more information on how to setup PHP to work with Apache on OSX can be found at: https://discussions.apple.com/docs/DOC-3083

Categories : PHP

How to change Installation Folder Url after publish the Appication
Atlast i figured it myself. Here is how : Create a batch file by copying the following commands and replace [PATH] -> Absolute path to mage.exe [path to current version]-> published folder having the current version [deploy path]-> published folder path having the exe file [New Installation Url]-> Installation url you want to update "[PATH]mage.exe" -Update "[path to current version]MyApp.application" -ProviderUrl "[New Installation Url]/MyApp.application" "[PATH]mage.exe" -Update "[path to current version]MyApp.application" -AppManifest "[path to current version]MyApp.exe.manifest" "[PATH]mage.exe" -Sign "[path to current version]MyApp.application" -CertFile "[path]TemporaryKey.pfx" -Password mypassword "[PATH]mage.exe" -Update [deploy path]MyApp.application" -ProviderUrl "[New

Categories : C#

How to use beautifulsoup without installation by keeping it in the project folder on Python?
Relative paths cannot be used that way to my knowledge. To append a relative path to sys.path you can do: import os, sys bspath = os.path.join(os.path.dirname(os.path.realpath(__file__),"beautifulsoup") sys.path.append(bspath) In your program/script you could then import the library like this: import bs4

Categories : Python

ImportError: No module named bs4 because in wrong python folder
Look, I suggest you download first the package of BeautifulSoup from its source in https://pypi.python.org/pypi/BeautifulSoup, once this has completed go to the folder where you download the compressed file , decompress the file and then inside you will see a python file named setup.py. This is the install file of the package, you need to run a command prompt in the folder and execute teh following line : python setup.py install This is another way of install Python packages without pip.

Categories : Python

python virtualenv and flask installation. No module named flask
I hope you had installed virtualenv and if you have create the virtual environment (virtualenv), you have to use . . venv/bin/activate command to activate the enviroment in unix or OSx. Hope you will get information from this source http://flask.pocoo.org/docs/installation/#installation

Categories : Python

Settting the ClickOnce installation folder URL in Visual Studio 2012
In order for ClickOnce to manage the caching of your application including handling updates, it will put it under the AppData folder. You will not be able to install it a folder of your choosing. It's the nature of the beast. Normally this isn't a big deal. You can still create a desktop icon for the user to access your program (if that was your concern):

Categories : C#

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

Firefox Extension To Save To Folder Named After Text On Webpage
Don't know if there is an existing extension that doing this, but yes you can easily use regular expressions in a firefox extension where firefox extension uses javascript which support regular expressions Developing a firefox extension is an easy task, you can search for tuts and here is a good one to begin with if you would like to http://blog.mozilla.org/addons/2009/01/28/how-to-develop-a-firefox-extension/ Also for sure you will need developer.mozilla for best details https://developer.mozilla.org/en/docs/Building_an_Extension

Categories : Regex

How do I suppress Xcode from generating a folder named after the build configuration in cmake?
You'll need to specify the target properties ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>, LIBRARY_OUTPUT_DIRECTORY_<CONFIG>, and/or RUNTIME_OUTPUT_DIRECTORY_<CONFIG> for each config type and each target you want to affect. To affect all targets, you can set variables named as these with CMAKE_ prepended. Any relevant target added after these have been set will be affected. So, for example you could either do: add_library(MyLib ${Sources}) set_target_properties(MyLib PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR} ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}) or you could do: set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}) add_library

Categories : Xcode

Creating file at a specific location inside windows store app installation folder
Just learnt that Apps don't have write access to their installed directory.

Categories : Javascript

.htaccess / mod_rewrite.c : CakePHP application in a subfolder where the root folder hosts a Wordpress installation
The following works for mydomain.com/cakeapp: (0) .htaccess in ROOT FOLDER #Action php /cgi-php52/php #AddHandler php52 .php # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^cakeapp/(.*)$ /cakeapp/$1 [L,QSA] RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress (1) .htaccess in the CAKEAPP-Folder <IfModule mod_rewrite.c> RewriteEngine on RewriteBase /cakeapp RewriteRule ^$ app/webroot/ [L] RewriteRule (.*) app/webroot/$1 [L] </IfModule> (2) .htaccess in the ROOT/CAKEAPP/APP-Folder <IfModule mod_rewrite.c> RewriteEngine on RewriteBase /cakeapp RewriteRule ^$ webroot/ [L] RewriteRule (.*) webroot/$

Categories : Wordpress

Loading all images from folder & make named Images from them
Find the 'real path' to that directory on the server. Use it to establish a File object. Create a FilenameFilter for PNG. Use File.listFiles(FilenameFilter) on that source directory. That will return a File[] containing references to the PNG files. That is assuming the images are on the class-path, as loose File resources. If they are in a Jar, we must iterate the ZipEntry objects of the Jar to dynamically discover what it contains.

Categories : Java

WiX Toolset - check for all installation prerequisites at once (conditional installation)
The WiX Condition element when used under a Fragment or Product element represents an entry in the LaunchCondition Table and is processed by the LaunchConditions Action. The behavior you see is a limitation of that underlying feature. Here's a blog article I wrote about this 7 years ago: Short Comings of LaunchConditions Sadly, Microsoft has never taken my recommendations for improvement. So instead of using the Condition element you'll have to write your own custom table and custom action to do the processing. I have sample code for this in InstallScript and C# but I've never written it in C/C++. Here is a stripped down example in InstallScript. Read it as pseudocode for refactoring in C/C++. You'll need to also create the custom table used by the SQL query, define and schedule

Categories : Wix

Redirect all non-model-named urls to named ones in Rails
I've tried solutions found here and elsewhere, but can't get my app to work properly. (I got the error Error 310 (net::ERR_TOO_MANY_REDIRECTS)) I've make simple solution, but this solution works well enough. If you are using to_param like this : def to_param [id, name.parameterize].join("-") end You just add some condition to action on controller looks like : def show @user = User.find(params[:id]) formal = @user.to_param if formal != params[:id] # on routes : match "/user/:id" => "users#show", :as => :show_user redirect_to show_user_path([@user.id, @user.firstname.parameterize].join("-")) end end

Categories : Ruby On Rails

Gem installation error during MYSQL gem installation in ruby
You need to install mysql before installing mysql gem. Follow this link on how to install mysql on windows

Categories : Mysql

Laravel 4: named routes in named groups
Route::group(['prefix' => 'admin', 'before' => 'adminAuth'], function(){ // If you do not want to repeat 'admin' in all route names, // define the value here $r = 'admin'; Route::get('users', ['as' => "{$r}.users", 'uses' => 'AdminController@users']); Route::get('/', ['as' => "{$r}.root", 'uses' => 'AdminController@index']); }); In yout views/redirect you can use URL::action('ControllerName@method) and Laravel will know where redirect/point to...

Categories : PHP

separating Model folder, view folder and controller folder in codeigniter
I am not sure that you can move views and models to different locations but you can change the location of application folder to the location of your choice. You can move your application directory to different location and then open your index.php file and set the $system_folder and $application_folder variables with the new path values, preferably with a full path, e.g. '/www/MyUser/system'. Reference: http://ellislab.com/codeigniter/user-guide/installation/index.html Hope this is helpful.

Categories : Codeigniter

Moving files from one folder to a hot folder BUT only move one at a time when the hot folder is empty
Pretty sure this should do what you want in vbscript: Set objFS = CreateObject("Scripting.FileSystemObject") set objFolderA = objFS.GetFolder("c:Folder A") set objFolderB = objFS.GetFolder("c:Folder B") For each objFile in objFolderA.Files Do While True If objFolderB.Files.Count = 0 Then objFS.MoveFile objFile.Path, ojbFolderB.Path & "" Exit Do End If Loop Next

Categories : Batch File

Using the Git folder as my main folder, or as a copy of the actual work folder?
Don't copy ! There's no point in doing it and it's prone to accident as you noticed. Simply do your git operations in your work repository, and use push/fetch operations to propagate to other repositories.

Categories : GIT

Installation Error - D/InstallAppProgress(): Installation error code: -25
Check the version number in your Manifest. If the version is less than the one on the device, you will not be able to over-install. You can install it using adb by using the -r flag. See here http://developer.android.com/tools/help/adb.html

Categories : Android

How to monitor specific folder and save content of each log file in that folder to mysql database
First of all, congratulations! You are in front of a beautiful problem. My suggestion is to use divide and conquer. Here are my considerations: Put the relevant folder(s) under version control (for example, GIT) Check via GIT commands the files that changed every X amount of time. Also obtain the differences between the prior version of each file, and the new ones, so you can update your database parsing the new info. Just in case, here are ways to call system commands from ruby. Hope that helps,

Categories : Mysql

android hide folder to sd card and share the image inside the hidden folder
If you want to hide folder in Android or any Linux based system just add . as prefix to folder or file name. However if you mount your SD card on Windows machine then these folders will be visible, with the . in front of the folder name, as a normal folder.

Categories : Android

Copying files from one folder to another & rename at destination folder using shell scripting
Write this script: #!/bin/sh for f in $1/*; do read -p "New name for $f:" g scp $f $2/$g done And then on the command line: ./my-script.sh folder-a folder-b

Categories : Linux

How to get src folder under project-root folder in github when staging from eclipse using egit
it cannot be done using eGit - it assumes the Eclipse project structure. But it can be accomplished by using git itself. Just create a repository under SimpleGit folder executing 'git init'. From that point on you'd have to manage your git repository by either git itself (command line) or some other UI. SourceTree works really well for me.

Categories : Eclipse

VB 2010 How can i use to return a random sub folder and open that folder in windows explorer
Try the following code Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click 'Directory info for the starting folder. Dim DirectoryInfo1 As New IO.DirectoryInfo("C: est") 'An array of all the subdirectories of the starting folder. Dim Directories1() As IO.DirectoryInfo = DirectoryInfo1.GetDirectories("*", IO.SearchOption.AllDirectories) 'Random number generator. Dim Random1 As New Random 'Gets a random index from the subdirectories array. Dim RandomIndex1 As Integer = Random1.Next(0, Directories1.Length - 1) 'Shows the path of a random directory. MsgBox(Directories1(RandomIndex1).FullName) 'Opens the random directory inside windows explorer. Process.Start("explorer.exe", Directories1(RandomIndex1)

Categories : Vb.Net

Automatically copy contents of FTP folder to local Windows folder without overwrite?
Use wget for Windows. If you want to include subdirectories (adjust the cut-dirs number according to the depth of your actual remote path): cd /d C:MyDestination wget.exe --mirror -np -nH --cut-dirs=2 ftp://UserName:Password@MyFtpServer.com/var/MyFolder If you don't want subdirectories: cd /d C:MyDestination wget.exe -nc ftp://UserName:Password@MyFtpServer.com/var/MyFolder/* The "magic" bit (for this second form) is the -nc option, which tells wget not to overwrite files that are already there locally. Do keep in mind that old files are also left alone, so if a file on your FTP server gets edited or updated, it won't get re-downloaded. If you want to also update files, use -N instead of -nc. (Note that you can also type wget instead of wget.exe, I just included the extension to poi

Categories : Shell

Copy entire directory to output folder maintaining the folder structure?
Try XCOPY instead of COPY; e.g. XCOPY "$(SolutionDir)ResourcesTemplate" "$(TargetDir)" /s /i /y More info on XCOPY here... http://www.computerhope.com/xcopyhlp.htm

Categories : Visual Studio

Why git don't ignore contents of surefire-reports folder in maven target folder?
If those files have previously been checked in to git, git will still pay attention to them even though they otherwise meet the criteria for ignoring. Since they have been modified, we know that they have been previously checked in. See here: Making git "forget" about a file that *was* tracked but is now ".gitignored" and Ignoring an already checked-in directory's contents? Short answer: this will do the job and not delete the file locally: git rm -r --cached <your directory>

Categories : GIT

application Support folder doest not iphone folder while creating a directory
make sure you're not searching for it because you will get the wrong application folder, you have to go to your "user name" folder and make it show hidden files and that will show the hidden library file so you can start navigating your way to that address... try that and anymore issues with it ill try and help further.

Categories : Objective C

"Target folder cannot be created" when trying to make Netbeans copy sources folder
As I had guessed, it was a Windows permissions issue. After doing pretty much the same thing over and over without the change sticking, it finally stuck, and I was able to get things working the way I wanted. Sigh...

Categories : PHP

Move Redirected User Documents to a new folder location at a different folder level
According to your description this should work: $csv = 'C:scriptsusernames.csv' $log = 'C:scriptsHomeDir_robocopy.log' Import-Csv $csv | % { $_.username } | % { $src = "\server1Users$_" $dst = "\server2Users$_My Documents" robocopy "$src" "$dst" /e /copyall /r:1 /w:5 /log+:"$log" }

Categories : Powershell

Eclipse, Java project - How do I add a source folder where the folder name is part of the package name?
My recommendation, especially if your source files are all in one - or just a few - director(ies): 1) Check out your CVS project into a temp folder 2) Create a new Eclipse project from scratch. It will create a "src" folder by default. 3) Create your package with Eclipse. It will automatically create subfolders representing your package name (e.g. com.foo.mypackage). 4) Drag/drop your source into the Eclipse package 5) Make sure everything builds 6) Save the new Eclipse folder tree to CVS (ideally, use the CVS plugin for Eclipse to do this). IMHO...

Categories : Java

A Shell script to find and cd into a folder taking a folder name as argument in one step
You must run cd in your current shell. Running it in another shell won't work, as you've seen. Create a function. Example: mycd (){ cd "${1}foo" }

Categories : Linux

RegEx to rewrite a multi-folder path and file name with unknown and varying folder depth
If you want to handle up to three levels you could use something like: RewriteRule ^ImageFolio4_files/1/([^/]+)/((?!AM|tn_|_cat)[^./]+.jpg)$ /ImageFolio4_files/cache/images/~$1~$2 [L,R=302,NC] RewriteRule ^ImageFolio4_files/1/([^/]+)/([^/]+)/((?!AM|tn_|_cat)[^./]+.jpg)$ /ImageFolio4_files/cache/images/~$1~$2~$3 [L,R=302,NC] RewriteRule ^ImageFolio4_files/1/([^/]+)/([^/]+)/([^/]+)/((?!AM|tn_|_cat)[^./]+.jpg)$ /ImageFolio4_files/cache/images/~$1~$2~$3~$4 [L,R=302,NC] Note the change of the expression for the file name: [^./]+ instead of [^.]+ so that it doesn't match any additional subfolders.

Categories : Regex



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