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

Perl module placing text in home folder
You could try something like this ... use File::HomeDir; my $home = File::HomeDir->my_home; open my $fh, '>', "$home/foo.txt"; print $fh 'bar'; close $fh; I didn't test this because I'm currently under windows where File::HomeDir is not completely implemented

Categories : Perl

Creating a private folder in home directory of each user
Everything is fine, you just have to change the owner of the new directory: for i in {1..100} do useradd -m -g student $i mkdir /home/$i/private //Creating a private folder chmod -R 700 /home/$i/private // chown $i:student /home/$i/private <------------------ new line echo "$i:123" | sudo chpasswd setquota -u $i 9 18 0 0 / done Note that as you are the user doing mkdir, the new dir belongs to you. Note also that I used chown $i:student so that the owner will be the user and the group will be student, which happens to be the group you are adding these users to.

Categories : Linux

Java relative path start from my home folder
If its in your jar, you can use getclassLoader().getResourceAsStream("music.xm") You can use this inputStream however you like. But remember, the path should be relative to classpath root of the classloader. In addition, if you are sure "music.xm" exists as an independent file on filesystem in a fixed relative location to your .class files you can also use : getclassLoader().getResource("music.xm") You can look on SO and here for documentation.

Categories : Java

How to access your /home/cpbackuptmp/cpbackup/daily folder cPanel
If you are having root access, First of all check Home »Backup »Backup Configuration From whm. There you can see whether the backups configured as remote ftp or standard. If its via ftp then there will be the location and ftp credentials If its via standard , files are backups are stores by default location /backup /backup can't access by any accounts by cPanel GUI. You need to ssh to the server to see the backups.

Categories : Mysql

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

Installing ROS on pcDuino (Lubuntu 12.04 ARM)
Follow http://www.ros.org/wiki/groovy/Installation/UbuntuARM is OK, just need to do a little modification, which you can follow http://yuanboshe.github.io/blog/2013/07/install_ros_groovy_in_pcduino.html. It's written in Chinese, but I think you can understand.

Categories : Ubuntu

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

fopen in Linux (Lubuntu) returns NULL when the file exists
Your problem is most likely coming from stray carriage returns (hex 0D, usually written as in C), which is common when using unix-y libraries to read windows-y files. Windows files have their lines terminated with CR-LF, hex 0D0A, while unix just uses a single LF, hex 0A' . Windows C stdio will map a CRLF onto a single LF ( `) for files not opened in binary mode. In Unix, it doesn't matter whether files are opened in binary or ascii modes, since no remapping happens. The consequence is that the same program compiled on Windows programs can read Windows files, and compiled on Unix can read Unix files; in both cases, the line-terminator will look like a single . Windows programs can usually read Unix files, too. But the Unix program reading a Windows file will see a stray CR, , hex 0D

Categories : C++

Find my app in Home Screen search by keyword
Spotlight searches the full app name, not only the one you see in the springboard but the one showed on iTunes. The full app name in this case is "barcoo ‐ Produktguide mit Barcode Reader & QR Scanner" so you can find it simply searching the word "scan" which is contained in "scanner"

Categories : Iphone

IntelliJ cannot find Gradle Home Location
AFAIK it is GRADLE_HOME not GRADLE_USER_HOME (see gradle installation http://www.gradle.org/installation). On the other hand I played a bit with Gradle support in Idea 13 Cardea and I think the gradle home is not automatically discover by Idea. If so you can file a issue in youtrack. Also, if you use gradle 1.6+ you can use the Graldle support for setting the build and wrapper. I think idea automatically discover the wrapper based gradle project. $ gradle setupBuild --type java-library $ gradle wrapper Note: Supported library types: basic, maven, java Regards

Categories : Java

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

Cron not running Python script is script not in home folder
cron is running crontab(5) entries from the home directory of the user. You need to change appropriately the directory i.e. to call the chdir(2) syscall (either thru the cd shell builtin, or inside your python script using os.chdir). You should query the current directory (using getcwd(3), or the pwd command, or the os.getcwd in Python) in your script. Also check your PATH if running commands.

Categories : Python

iPad fails to find apple-touch-icon.png for home page bookmark
The correct size for iPad is 144px , as 114px is for iPhone retina display. <link rel="apple-touch-icon" sizes="72x72" href="apple-touch-icon.png" /> <link rel="apple-touch-icon" sizes="144x144" href="apple-touch-icon-retina.png" />

Categories : IOS

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

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

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

My ADT Bundle says "could not find SDK folder"
Did you renamed the unzipped directory? If yes, don't do this. Or it may happen if you changed the location of unzipped directory. Solution (If you don't want to unzip ADT bundle again) In Eclipse:- goto Window->Preferences->Android and you will see "SDK Location". Browse to your SDK location and say OK.

Categories : Android

Find out a GIT link to a folder
Git isn't a Dropbox :-) When you initialize a repository on your computer, it is self contained and not published anywhere. To do so, you have different options, one of the simplest is to create a GitHub repo and push your repo to it. It will be then accessible from GitHub, and if you set it as public you can get the URL of any file tracked by Git, provided that you push your commits. Create a GitHub repo Add it as a remote and push (section 3 of the above page)

Categories : GIT

Eclipse can't find my project in folder
As Sotirios said, eclipse will look for a .project file to determine whether a project is located in that location. If you were given just the source, you could try just pasting all the source into a new android project, but if dependencies are complex it may cause you issues.

Categories : Java

Want to find path of a file from the application folder?
Since you want to access file which is lying in the same Directory and I am asumming you are using WPF you can use string _myDirectoryPath = Environment.CurrentDirectory.ToString().Substring(0, Environment.CurrentDirectory.ToString().Length - 10).ToString() + @"Myfile.txt"; StreamReader sr = new StreamReader(_myDirectoryPath); Update: I am not sure if other's will agree to this but I found a working solution.

Categories : C#

How to find all symbolic links pointing to a particular folder?
find tells you that you have no access to / directory. To search in a directory you have access to: find -L /home/thejobco -samefile /home/thejobco/public_html/JCCore/quick_job/

Categories : Linux

Find files in a folder that are not music, using bash
Using find: find /some/dir -type f ! -name "*.mp3" ! -name "*.mp4a" ! -name "*.mp4" ! -name "*.ogg" ! -name "*.wma" To delete, add -delete at the end: find /some/dir -type f ! -name "*.mp3" ! -name "*.mp4a" ! -name "*.mp4" ! -name "*.ogg" ! -name "*.wma" -delete

Categories : Linux

Find the filename with highest number in a folder
I'm pretty sure your regex is wrong. Split your code a little bit, create a function that pulls the number from a filename. Ex Function GetNumberFromFilename(ByVal filename As String) As Integer ' From the filename parameter, pull the number and return it End Function Then it'll be easy to test it Console.WriteLine(GetNumberFromFilename("JCR 2013-01 data.docx")) When you got that working, just loop all the files get the highest number Dim lastFileNo As Integer = 1 Dim files() As String = IO.Directory.GetFiles(frmMain.saveLocalTFPath, "*.docx") For Each file As String In files Dim number As Integer number = GetNumberFromFilename(file) If number > 0 And number < 1000 And number > lastFileNo Then lastFileNo = number End If Next

Categories : Regex

How to find files and save them to different folder in python
You can traverse the directory tree finding the files you want with this: import os, fnmatch def find_files(directory, pattern): for root, dirs, files in os.walk(directory): for basename in files: if fnmatch.fnmatch(basename, pattern): filename = os.path.join(root, basename) yield filename def find_files_to_list(directory, pattern): file_list = [] for root, dirs, files in os.walk(directory): for basename in files: if fnmatch.fnmatch(basename, pattern): filename = os.path.join(root, basename) file_list.append(filename) return file_list then copy the repository and do something like this: wanted_files = find_files_to_list('/original_project/', '*.html') for filename

Categories : Python

Find out whether a whole folder structure exists (CMD Batch)
Wouldn't for /L %%a in (1,1,6) do md Folder%%a be easier, and create the directories whether or not they already exist? for /L %%a in (1,1,6) do md Folder%%a 2>nul should suppress messages for already-existing directories.

Categories : Windows

Scripting Macro for Outlook to Find a Folder
You can try this code Private m_Folder As Outlook.MAPIFolder Private m_Find As String Private m_Wildcard As Boolean Public Sub FindFolder() Dim Name$ Dim Folders As Outlook.Folders Set m_Folder = Nothing m_Find = "" m_Wildcard = False Name = InputBox("Find Name:", "Search Folder") If Len(Trim$(Name)) = 0 Then Exit Sub m_Find = Name m_Find = LCase$(m_Find) m_Find = Replace(m_Find, "%", "*") m_Wildcard = (InStr(m_Find, "*")) Set Folders = Application.Session.Folders LoopFolders Folders If Not m_Folder Is Nothing Then If MsgBox("Activate Folder: " & vbCrLf & m_Folder.FolderPath, vbQuestion Or vbYesNo) = vbYes Then Set Application.ActiveExplorer.CurrentFolder = m_Folder End If Else MsgBox "Not Found", vbInformation End If End Sub

Categories : Vb.Net

how to make git find my files in the library folder, not ignored by gitignore?
I deleted the file. git, and make a new git init followed by git remote add origin https://github.com/ .... git add. && gitignore git add. && Git commit-a-m "go" && git push and it worked...

Categories : GIT

How can I find out the camera images folder of an Android phone?
Use getExternalStoragePublicDirectory() with parameter DIRECTORY_PICTURES (or, for other use cases, other similar parameters such as DIRECTORY_MOVIES)

Categories : Android

intellij how to find / search for a folder / directory / package name
If you try CTRL + SHIFT + F You can do a global file search (like eclipse CTRL + H). In the file search, you can select which folder to search for, what file type to search for, case sensitive etc, all the normal stuff. Global Replace is CTRL + SHIFT + R (Mac replace CTRL for CMD)

Categories : Intellij Idea

Where to find extensions installed folder for Google Chrome on Mac?
The default locations of Chrome's profile directory are defined at http://www.chromium.org/user-experience/user-data-directory. For Chrome on Mac, it's ~/Library/Application Support/Google/Chrome/Default The actual location can be different, by setting the --user-data-dir=path/to/directory flag. If only one user is registered in Chrome, look in the Default/Extensions subdirectory. Otherwise, look in the <profile user name>/Extensions directory. If that didn't help, you can always do a custom search. Go to chrome://extensions/, and find out the ID of an extension (32 lowercase letters) (if not done already, activate "Developer mode" first). Open the terminal, cd to the directory which is most likely a parent of your Chrome profile (if unsure, try ~ then /). Run find . -type

Categories : Osx

Can't find Samsung Galaxy s4 obb folder for Expansion Files
I actually asked this question so I could give an Answer for it. Basically what you want to do is.. DDMS Perspective in Eclipse. File Explorer Folder Path: /mnt/shell/emulated/obb/ Hope this helps! joshysav

Categories : Android

script to find number of rows in excel under a particular folder using vb
Make sure you're declaring the sub routine at the top with "Sub _()". Also, there are a few things that I believe are syntactically incorrect about this one. Try this instead: Sub blah() Dim objFSO, strFolder, objFolder, objFile, objExcel, objSheet, objRange, objRows As Object Dim strExtension As String Dim V_FilePath As String V_FilePath = " " ' Specify folder. strFolder = "c:\temp" objExcel = CreateObject("Excel.Application") ' Enumerate files in the folder. objFSO = CreateObject("Scripting.FileSystemObject") objFolder = objFSO.GetFolder(strFolder) For Each objFile In objFolder.Files ' Select only Excel spreadsheet file. strExtension = objFSO.GetExtensionName(objFile.Path)

Categories : Vb.Net

Find all occurrences of "int" or "integer" in all files in a folder and replace with "long"
find . -type f ( -name '*.xml' -o -name '*.java' ) -exec sed -ri.back 's/<int(eger)?>/long/g' {} + Or if you want to only process the files that do contain the string: find . -type f ( -name '*.xml' -o -name '*.java' ) -exec grep -ilZE '<int(eger)>' {} + | xargs -r0 sed -ri.back 's/<int(eger)?>/long/g' Note that the above sed, xargs and grep commands use non standard extensions but would work with the GNU variants as found on Linux distributions including RHEL5. The .back after -i is to save a backup copy of the original file and can be omitted if you don't need it.

Categories : Unix

Get Notified when files have been edited in a specific folder using UNIX "Find"
The default behavior of cron is to send an email if the command produces some output. That means you can just add the above command to your crontab. If you want to send the emails to specific email addresses, you can use the environment setting MAILTO. For example: MAILTO="foobar@example.com" # run five minutes after midnight, every day 5 0 * * * find /home/... -mtime -7

Categories : Bash

windows bat script find replace every file in folder and subfolders
Can you use sed for Windows? for /f "delims=" %%a in ('dir /B /S /A-D *.js') do sed -ibak "s/%var1%/%var2%/g" "%%~fa" Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]... -n, --quiet, --silent suppress automatic printing of pattern space -e script, --expression=script add the script to the commands to be executed -f script-file, --file=script-file add the contents of script-file to the commands to be executed -i[suffix], --in-place[=suffix] edit files in place (makes backup if extension supplied) -l N, --line-length=N specify the desired line-wrap length for the `l' command -r, --regexp-extended use extended regular expressions in the script. -s, --sep

Categories : Windows

How to find latestly added file in a folder by MATLAB code?
One possibility: % get a list of .txt files inside folder. You can specify images instead d = dir('*.txt'); % find the last modified file [~,idx] = max([d.datenum]); % name of file filename = d(idx).name; Another way is to listen to file system changes and respond to events as new files come in. See here for an example. The first method would be used with polling, the second is event-driven.

Categories : Matlab

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

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

Custom Home Screen with the properties like default Home Screen
The Android 4.x stock home screen uses a series of GridView widgets in a ViewPager, near as I can tell. You might be able to tell more by using Hierarchy View or uiautomatorviewer to inspect the UI of home screen.

Categories : Android

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