Hello,
Suppose I have a path in a string called '/home/user/directory/HelloWorld.txt'. I would like to remove the HelloWorld.txt, and end up with '/home/user/directory'. What regex would I need.
Hello, is it any way to read path to current page? For example, I am at www.example.com/foo/bar/ - and I want to read '/foo/bar/'. But, all have to be done in template file without modyficating views. I have to many view files to edit each one.
Sorry for my english, hope everyone understand. Cheers.
Hello,
Why does ServletContext#getRealPath() not return me correct path if i use ../
This code works :-
System.out.println(context.getRealPath("/"));
This one doesn't :-
System.out.println(context.getRealPath("/.."));
How can i get one level up directory from getRealPath()?
Is it possible to create a "tree resolver" in SQL?
I have a table:
ID Name Parent
1 a
2 b 1
3 c 1
4 d 3
Now I want a SQL query that returns:
ID PATH
1 /a
2 /a/b
3 /a/c
4 /a/c/d
Is this possible with SQL? It would make many things easier for me. Any help would really be appreciated!
Assuming the current buffer is a file open for edit, so :e does not display E32: No file name.
I would like to yank one or all of:
The file name exactly as show on the status line, e.g. ~\myfile.txt
A full path to the file, e.g. c:\foo\bar\myfile.txt
Just the file name, e.g. myfile.txt
hi ,
Mine is similar to this question.
http://stackoverflow.com/questions/2042342/network-path-and-variables-in-python/2042376
The only difference is my network drive has a password protect with user name and password .
I need to copy files to a samba share using python and verify it.
if i manually login in then the code works but without logging in the shutil command does not work
Thanks
So I've found out that setting the PATH environment variable affects only the old command prompt, powershell seems to have different environment settings. How do I change the environment variables for powershell (v1)?
Note:
I want to make my changes permanent, so I don't have to set it every time I run powershell. Does powershell have a profile file? Something like bash profile on unix?
i am doing a project about shell, and i want the code that gives me the path the system() function uses.
example, when i enter the command
type dir
the reply will be
dir is external command (/bin/dir)
I need to make an animated gif 'fly over a page and follow a path. I'm thinking of using jQuery but would I be right in thinking the only way to do it is manually calculating the percentage of width/height where the shape layer should be placed, then using absolute positioning is the only way to do this? I know there are some amazing jQuery plugins available for this type of thing.
I have used the folllowing steps to add classes to my build path still i am geting errors as import not resolved.I had followed the following steps.
Select Create New Folder and name it
TpmWebUIClasses.
Click the Advanced button and
select the Link to folder in the
file system check box.
Browse for to the folder where you
have copied the classes
Make sure the selected folder is
listed and then click OK.
How can i resolve the error?
In a Windows command script, one can determine the directory path of the currently executing script using %~dp0. For example:
@echo Running from %~dp0
What would be the equivalent in a BASH script?
I can get the active window's process, but I have no idea how to get the location of that process, as far as I can see the process object only has ProcessName property which just returns like chrome instead of C:\pathtochrome\chrome.exe
How can I get the latter because I'm trying to get the process's File Description attribute, but I need the full path to it.
Hi everyone,
I have an entity which has relationships with other entities. Let say we have: user-menu-meal
My problem is that some of the users don't have a menu. So when I try to check: user.menu.meal == rice I get an error (path not found...)!
Thank you for your help!
I'm an experienced iOS programmer and have recently began to dabble in web development to expand my horizons. I've found it quite interesting and was wondering what learning path I should take through all the numerous languages. Here's what I planned on doing:
HTML+CSS- PHP/Jquery
Does that sound reasonable? Currently I'm nearly confident with my html/css abilities, and am planning to move ahead. Any good suggestions you guys could throw my way?
I have a directory named reports inside my winform project in .net. My project name is AccountingReports and inside that Directory reports exists. So i need the way to access this path via code. In Asp.net we use Request.PhysicalApplicationPath property. So is there any method or property exists that will give me the root of my project
I've got some code that runs on every (nearly) every admin request but doesn't have access to the 'request' object.
I need to find the path to Django installation. I could do:
import django
django_path = django.__file__
but that seems rather wasteful in the middle of a request.
Does putting the import at the start of the module waste memory? I'm fairly sure I'm missing an obvious trick here.
Hi there,
I have some styling based on the primary links active class. I would like to set the class of a link in the primary links to active (<a class="active"...>) based on either the content type or the path.
I have already done some research on this but haven't yet seen anything that seems to match my query.
Would be grateful for any help.
Ben
My path helpers (like data_path, users_path) are now translating itself to use '.' instead of '/'.
For example, data_path(@data) translates to:
data.%23<datareport:0x7fcaba0c2970>
instead of '/data/id'.
My routes look like:
map.resources :data
Hi,
I have a RoR application and model SomeModel. I have views for this model and I want to know - is there any method to get the view's path? Of course I can use for this model instance
m = SomeModel.new
v = m.class.class_name.pluralize.downcase
It's working, but maybe you know a better way? :)
Is there a way in symfony to get from a doctrine nested set the whole path/route from a specified by id element to the root element in a Doctrine_Collection or array ?
Is there a way to display the path of the solution in the Visual Studio window's name?
By default it displays (SolutionName) - Microsoft Visual Studio, I would like it to instead show something like (SolutionName) - (PathToSolution) - Microsoft Visual Studio.
The reason behind this is I can have multiple versions of a project checked out at a time (staging and trunk for example) and I'd like a quick way of checking without going through prompts etc.
Hello all
I have some path "c:\server\folderName1\another name\something\another folder\" .
How i can extract from there the last folder name ?
I have tried several things but they didn't work.
I just don't want to search for the last \ and then to take the rest .
Thanks.
I want to put my images to db but i want to have a link on each image.
So I have the idea to copy the image to the temp dir of tomcat (or weblogic).
But I must map the tempdir to a virtual path.
How do it ?