I am trying to create a file using
File newFile = new File("myFile");
However no file called "myFile" is created. This is within a Web application Project i.e. proper form to be pakaged as a WAR but I am calling it as part of a main method (just to see how this works).
How can I make it so that a new file is created at a location ...
Hi All
I am currently working with converting Pycrypto over to Python 3.X
Whilst I seem to have the cryptography side working the same cannot be said for the tests
provided with the module :(
I have used the tests under Python 2.64 and all works fine.
I then ran '2to3' over the tests to generate new files in 3.X format.
There are seve...
I have a master page which references a style in the following manner:
<link rel="stylesheet" type="text/css" href="../../Content/Style.css" />
All my pages inherit from this master page. And this works well when the URL is http://www.domain.com/home/details/5, however the URL is http://www.domain.com/home/create, then, of course, St...
I have my UserControls in a ~/Controls folder in my solution:
/Controls/TheControl.ascx
If specify the following:
<a id="theId" runat="server" href="./?pg=1">link text</a>
ASP.Net seems to want to rewrite the path to point to the absolute location. For example, If the control is on site.com/products/fish/cans.aspx the link href wil...
I'm writing an iPhone app with a UIWebView which should display various html files I have in the app resource folder. In xcode my project overview, these html files are displayed like this:
dirA
|---> index.html
|---> a1.html
|---> a2.html
|---> my.css
|---> dirB
|---> b1.html
|---> b2.html
|---> dirC
|---> c1.html
...
I want to completely understand how to use relative and absolute url address in static and dynamic files.
~ :
/ :
.. : in a relative URL indicates the parent directory
. : refers to the current directory
/ : always replaces the entire pathname of the base URL
// : always replaces everything from the hostname onwards
This example ...
Let say I have the following folders:
/A/C
/D/B/E
/D/B/C (this is a symlink to /A/C created by ln -s)
When one of the makefiles tries to use the path /D/B/C/../E it gets a "no file or directory" error. I understand why this happens; /A/E does not exist. However I have to use symlinks to populate the B folder and create the build tre...
absolute="/foo/bar"
current="/foo/baz/foo"
# magic
relative="../../bar"
Can you help me with magic? (Hopefully not too complicated code...)
...
Hi,
I am trying to pass into an JavaScript function two paths for an XML and XSLT. It would appear that in the sample HTML below that the use of "../xsl/filename" does not work for me in the xslt() function. If I specify the path as being "./filename" though this does work.
Does anyone know how I can work around this or find some wa...
I'm having trouble with paths in a ASP.NET MVC application that's running behind a proxy.
Our IIS Application root path is for example http://server/MyApp/
meaning that all urls using the application root ("~/",Url.Action("MyAction","MyController")) are resolved to "/MyApp"
Now we're running behind a proxy server that forwards all req...
Title says it all, how do I do that?
...
I'm trying to specify a relative directory in the web.xml file. I basically want it to read the "data" folder underneath "web-inf", but nothing I've tried seems to work.
"/data" translates to the data folder in the root directory (I'm using windows).
"data" translates to "C:\Program Files\Eclipes\data"
"${CATALINA_HOME}/[etc...]" doe...
So I'm trying to display an image that is ouside the path of my application. I only have a relative image path such as "images/background.png" but my images are somewhere else, I might want to choose that base location at runtime so that the binding maps to the proper folder. Such as "e:\data\images\background.png" or "e:\data\theme\im...
Hello,
I am new at this so bare with me. I have just configured Apache and PHP to work on my local Mac OS X computer. Now PHP works fine, except when I try to load the files for my live sites. The live sites have separate directories and are sorted by client name etc.
I've created symlinks in the default root for the local web server ...
I have a user control that contains a GridView. The GridView has both a HyperLinkField column and a template column that contains a HyperLink control.
The ASP.NET project is structured as follows, with the Default.aspx page in each case using the user control.
Application Root
Controls
UserControl with GridView
SystemAdminFolder
D...
I have a JavaBean that reads and processes an XML file. The XML file lives in the WEB-INF/ folder in my application. A JSP file uses the JavaBean to pass it the XML file name using the setProperty method, and uses the context path to do so.
This works fine in my local development environment, but when deployed as a WAR on our test envir...
I am running a script from
/wp-content/themes/currenttheme/chat.php
I want to include in the above php another one located in
/forum/chat/index.php
The index.php includes its own files
I already tried
$root = $_SERVER['DOCUMENT_ROOT'];
include($root."/forum/chat/index.php");
but I get this error
Warning: require(D:/My Dro...
This will be simple for you guys:
var uri = new Uri("pack://application:,,,/LiftExperiment;component/pics/outside/elevator.jpg");
imageBitmap = new BitmapImage();
imageBitmap.BeginInit();
imageBitmap.UriSource = uri;
imageBitmap.EndInit();
image.Source = imageBitmap;
=> Works perfectly on a .jpg with
Build Action: Content
Copy to Out...
I noticed that there're some similar questions about this problem when I typed the title,but they seem not be in PHP.So what's the solution to it with a PHP function?
To be specified.
$a="/home/apache/a/a.php";
$b="/home/root/b/b.php";
$relpath = getRelativePath($a,$b);//needed function,should return '../../root/b/b.php'
Any good ide...
I have a jar file with resources (mainly configuration for caches, logging, etc) that I want to distribute.
I'm having a problem with the relative paths for those resources, so I did what I've found in another stackoverflow question, which said that this was a valid way:
ClassInTheSamePackageOfTheResource.class.getResourceAsStream('res...