Search Results

Search found 19093 results on 764 pages for 'max path'.

Page 10/764 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Mvc relative path using virtual directory..help!

    - by kevin
    When i drag and drop my image/script/css file into my view, relative path will automatically use to refer on the files. example: <link href="../../Content/style.css" rel="stylesheet" type="text/css" /> <script src="../../Scripts/jquery-min.js" type="text/javascript"></script> <img src="../../Images/logo.jpg" /> It is working fine when i host it on my root directory, but if i'm using virtual directory then only my css file able to refer correctly, the rest will return 404...as it will refer to http://{root}/Images/logo.jpg rather than http://{root}/{virtual directory}/Images/logo.jpg But why css file is working? and how to specify the relative path correctly for both root & virtual directory cases?

    Read the article

  • Kohana3: Absolute path to a file

    - by Svish
    Say I have a file in my kohana 3 website called assets/somefile.jpg. I can get the url to that file by doing echo Url::site('assets/somefile.jpg'); // /kohana/assets/somefile.jpg Is there a way I can get the absolute path to that file? Like if I want to fopen it or get the size of the file or something like that. In other words, I would like to get something like /var/www/kohana/assets/somefile.jpg or W:\www\kohana\assets\somefile.jpg or whatever is the absolute path.

    Read the article

  • php mkdir windows relative path

    - by Vish
    Hi, Want to create a directory on windows from a PHP script. My script is in www/Test directory of Apache and want to create a folder(fold1) inside www/downloads directory. Inside the script, using, $dirName = "../downloads/fold1"; mkdir("{$dirName}"); If we use the full path of dirName like C:\Apache\www\downloads\fold1, it works fine. But want to use relative path since this code will be sent to the client. Please let me know. Thanks, Vish.

    Read the article

  • Path String Concatenation Question in C#.

    - by Nano HE
    Hello. I want to output D:\Learning\CS\Resource\Tutorial\C#LangTutorial But can't work. Compiler error error CS0165: Use of unassigned local variable 'StrPathHead Please give me some advice about how to correct my code or other better solution for my case. Thank you. static void Main(string[] args) { string path = "D:\\Learning\\CS\\Resource\\Book\\C#InDeepth"; int n = 0; string[] words = path.Split('\\'); foreach (string word in words) { string StrPathHead; string StrPath; Console.WriteLine(word); if (word == "Resource") { StrPath = StrPathHead + word + "\\Tutorial\\C#LangTutorial"; } else { StrPathHead += words[n++] + "\\"; } } }

    Read the article

  • C++ argv path specifier

    - by sub
    In the interpreter for my programming languages I have to correctly handle the parts in case the import function is called. I then need to check if such a file is in the /libs folder (located at the same place as my executeable!) and if it doesn't exist I have to check in the directory of the current script. How can I get the exact path to the directory where the executeable is located from argv? What is the best way to remove the file from the end of a path, e.g: C:/a/b/c/file.exe should become C:/a/b/c/

    Read the article

  • What is __path__ useful for?

    - by Jason Baker
    I had never noticed the __path__ attribute that gets defined on some of my packages before today. According to the documentation: Packages support one more special attribute, __path__. This is initialized to be a list containing the name of the directory holding the package’s __init__.py before the code in that file is executed. This variable can be modified; doing so affects future searches for modules and subpackages contained in the package. While this feature is not often needed, it can be used to extend the set of modules found in a package. Could somebody explain to me what exactly this means and why I would ever want to use it?

    Read the article

  • Running python batch file that has a path with SPACE character

    - by prosseek
    The batch file is something like this, I put the python in some directory that has SPACE character in its path. C:\"Documents and Settings"\Administrator\Desktop\bracket\python\python C:\\"Documents and Settings"\\Administrator\\Desktop\\bracket\\[10,20]\\brackettest.py When I run this one, I get this error. C:\Documents and Settings\Administrator\Desktop\bracket\python\python: can't ope n file 'C:\Documents and Settings\\Administrator\\Desktop\\bracket\\[10,20]\\bra ckettest.py': [Errno 2] No such file or directory C:\Documents and Settings\Administrator\Desktop\bracket What might be wrong? Wrapping the path doesn't solve this problem. "C:\\Documents and Settings\\Administrator\\Desktop\\bracket\\[10,20]\\brackettest.py" Are the brackets ('[]') cause of the problem? On Mac, python works well with bracket character.

    Read the article

  • ASP.NET Setting Flash file path for Object tag inside a usercontrol

    - by Shyju
    I have a an ASP.NET user control where i wanto run a flash movie using flashplayer.How can i set the path of flash movie file properly so that this would work in all pages irrespective of the folders. ie; it should work inside a page in FolderA and a page in FolderASub1 which is in FolderA and a page in the Root folder too.My Flash file resides in a Folder called FlashGallery in root.My User control resides in a Subfolder in Root. I am not sure how can use ~ here .Since its(Object tag to play flash) not a server control. And infact i cant place the full relative path too. Anythoughts ?

    Read the article

  • How to normalize SVG path data (cross browser)?

    - by Timo
    I have tried to find a way to implement cross browser path normalizer. There IS a native way which is described here and functional example is here, but it works only in newest Opera (but not in IE, FF, Safari, Chrome). The native way uses pathElm.normalizedPathSegList and it converts all relative coordinates to absolute ones and represents all path segment types as a following subset of types: M,L,C,z. I have found only one javascript code and jsfiddled functional example of it, but it works only in IE and FF. Chrome gives "Uncaught Error: INDEX_SIZE_ERR: DOM Exception 1". How this could be fixed to work also in Opera, Safari and Chrome or is there any other way for normalizing SVG paths?

    Read the article

  • How do I get the path of the current executed file in python?

    - by Sorin Sbarnea
    This may seam a newbie question but it is not. It looks that common approaches are not always working: Currently I know only two options but none of them looks to work an all cases. sys.argv[0] This means using path = os.path.abspath(os.path.dirname(sys.argv[0])) but this does not work if you are running from another python script from another directory, and this can really happen in real life. __file__ this means that path = os.path.abspath(os.path.dirname(__file__)) but I found that this doesn't work: py2exe that doesn't have a __file__ attribute but there is an workaround. when you run from IDLE with execute() there is no __file__ attribute OS X 10.6 where I get NameError: global name '__file__' is not defined Related questions with incomplete answers: http://stackoverflow.com/questions/1296501/python-find-path-to-file-being-run http://stackoverflow.com/questions/1483827/python-path-to-current-file-depends-on-how-i-execute-the-program http://stackoverflow.com/questions/2259503/how-to-know-the-path-of-the-running-script-in-python http://stackoverflow.com/questions/509742/python-chdir-to-dir-the-py-script-is-in

    Read the article

  • How to know the full path of a file using SSH?

    - by Roy
    Hi I am beginner for SSH stuff but i want to dump a big sql file and for that i need to be able to navigate to the appropriate path in my hosting account. I managed to login to SSH and i typed pwdbut it gave me a shared hosting pathway like /home/content/r/o/s/roshanjonah How Can i go to the path where i upload my files to...i use FTP but in FTP path it just shows / so i cannot go any further back than that...so using SSH how can i come to this path in ftp... Thanks Roshan

    Read the article

  • 3DS Max 2012 OBJ file import missing polygons

    - by Vit
    I started learning OpenGL. I got to a point I want to import some "real" objects. After "Googling" I decided I will go with OBJ file for start, since it is simple to understand, and there are plenty of tutorials on how to read them properly. I have from university access to 3DS Max 2012. So I tried to create very simple model (just deformated cube) and exporting it using OBJ file, just to vertices and triangles for the moment, without textures, so I can examine its structure by myself. But if I imported it right back to 3DS from OBJ file, now it renders somewhat strange, like its smoothen, and with lightsource, even I have none in scene. But the geometry, its wireframe is intact. So I thought maybe it is problem of exporting only vertices and triangles so I downloaded Enterprise-D model from internet, exported with everything on (normals, textures everything), and again imported it. Now, some polygons are missing. So, I want to ask, am I doing something terribly wrong, or is there some incompatibility issue between .max and .obj file ? Even it is only simple textured model without any lightsources, animation etc.? Thanks. Edit: I tried objects with MeshLab, the first, deformated cube was absolutelly OK. But still bothers me that 3DS Max doesen´t render it properly. In Enterprise-D model, there are polygons missing even in MeshLab. I uploaded rar archive with .max model of Enterprise, same .obj model exported from 3DS, and obj model of deformated cube. Download here (2.5 MB, filesonic).

    Read the article

  • The dreaded Brightness issue (Fn keys + Max brightness)

    - by Adam
    I'm trying to get some control over the brightness of my Samsung QX411 (Integrated Intel and discrete Nvidia, though Ubuntu doesn't see the latter yet, I'll play around with Bumblebee later) Using the FN+up/down lowers the screen brightness from max to one peg down or back up. If I try to bring the brightness down any more, it just flickers and stays the same. I can lower the brightness in Settings, but that's delicate and gets reverted to max if I open up the brightness settings again, or log out. The closest I got was adding acpi_backlight=vendor to a line in /etc/default/grub, (source) I could consequently lower the brightness a couple of pegs down to the minimum with FN+down, but then it's as if the problem got inversed, and I'd get stuck in the bottom tier, I could only increase the brightness by one peg and back down. Rebooting would revert to max brightness. acpi_osi=, acpi_osi=Linux, acpi_osi=vendor, acpi_osi='!Windows 2012', acpi_backlight=Linux, acpi_backlight='!Windows 2012' don't do anything for me. I've also tried adding echo 2000 > /sys/class/backlight/intel_backlight/brightness to /etc/rc.local, where my max value from cat /sys/class/backlight/intel_backlight/brightness is 4648, which didn't do anything. (same result with echo 2000 > /sys/class/backlight/acpi_video0/brightness) source Samsung tools also didn't help in this regard. I've spent hours on this, it's getting quite frustrating. Any help would be greatly appreciated.

    Read the article

  • perl dynamic path given to 'use lib'

    - by Ed Hyer
    So, my code (Perl scripts and Perl modules) sits in a tree like this: trunk/ util/ process/ scripts/ The 'util' directory has, well, utilities, that things in the 'process/' dir need. They get access like this: use FindBin; use lib "$FindBin::Bin/../util"; use UtilityModule qw(all); That construct doesn't care where you start, as long as you're at the same level in the tree as "util/". But I decided that 'scripts/' was getting too crowded, so I created scripts/scripts1 scripts/scripts2 Now I see that this doesn't work. If I run a script 'trunk/scripts/scripts1/call_script.pl', and it calls '/trunk/process/process_script.pl', then 'process_script.pl' will fail trying to get the routines from UtilityModule(), because the path that FindBin returns is the path of the top-level calling script. The first ten ways I thought of to solve this all involved something like: use lib $path_that_came_from_elsewhere; but that seems to be something Perl doesn't like to do, except via that FindBin trick. I tried some things involving BEGIN{} blocks, but i don't really know what I'm doing there, and will likely just end up refactoring. But if someone has some clever insight into this type of problem, this would be a good chance to earn some points!

    Read the article

  • Why do Firefox and Opera ignore max-width inside of display: table-cell?

    - by brad
    The following code displays correctly in Chrome or IE (the image is 200px wide). In Firefox and Opera the max-width style is ignored completely. Why does this happen and is there a good work around? Also, which way is most standards compliant? Note One possible work around for this particular situation is to set max-width to 200px. However, this is a rather contrived example. I'm looking for a strategy for a variable width container. <!doctype html> <html> <head> <style> div { display: table-cell; padding: 15px; width: 200px; } div img { max-width: 100%; } </style> </head> <body> <div> <img src="http://farm4.static.flickr.com/3352/4644534211_b9c887b979.jpg" /> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec facilisis ante, facilisis posuere ligula feugiat ut. Fusce hendrerit vehicula congue. at ligula dolor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. leo metus, aliquam eget convallis eget, molestie at massa. </p> </div> </body> </html> [Update] As stated by mVChr below, the w3.org spec states that max-width does not apply to inline elements. I've tried using div img { max-width: 100%; display: block; }, but it does not seem to correct the issue.

    Read the article

  • NAnt exec relative path

    - by stacker
    How can I assign to trunk.dir property a relative path to the trunk location? This is my nant.build file: <?xml version="1.0" encoding="utf-8"?> <project name="ProjectName" default="build" xmlns="http://nant.sf.net/release/0.85/nant.xsd"> <!-- Directories --> <property name="trunk.dir" value="C:\Projects\ProjectName" /><!-- I want relative path over here! --> <property name="source.dir" value="${trunk.dir}src\" /> <!-- Working Files --> <property name="msbuild.exe" value="C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" /> <property name="solution.sln" value="${source.dir}ProjectName.sln" /> <!-- Called Externally --> <target name="compile"> <!-- Rebuild foces msbuild to clean and build --> <exec program="${msbuild.exe}" commandline="${solution.sln} /t:Rebuild /v:q" /> </target> </project>

    Read the article

  • wscript.shell running file with space in path with PHP

    - by ermac2014
    I was trying to use wscript.shell through COM objects with php to pass some cmd commands to cURL library (the DOS version). here is what I use to perform this task: function windExec($cmd,$mode=''){ // Setup the command to run from "run" $cmdline = "cmd /C $cmd"; // set-up the output and mode if ($mode=='FG'){ $outputfile = uniqid(time()) . ".txt"; $cmdline .= " > $outputfile"; $m = true; } else $m = false; // Make a new instance of the COM object $WshShell = new COM("WScript.Shell"); // Make the command window but dont show it. $oExec = $WshShell->Run($cmdline, 0, $m); if ($outputfile){ // Read the tmp file. $retStr = file_get_contents($outputfile); // Delete the temp_file. unlink($outputfile); } else $retStr = ""; return $retStr; } now when I run this function like: windExec("\"C:/Documents and Settings/ermac/Desktop/my project/curl\" http://www.google.com/", 'FG'); curl doesn't run because there is a problem with the path. but when I remove the spaces from the path it works great. windExec("\"C:/curl\" http://www.google.com/", 'FG'); so my question is how can I escape these spaces in wscript.shell commands? is there anyway I can fix this? thanks in advance :)

    Read the article

  • cocoa/c++ relative path to load resources

    - by moka
    Hi, I am currently working directly with cocoa for the first time, to built a screen saver. Now I came across a problem when trying to load resources from within the .saver bundle. I basically have a small c++ wrapper class to load .exr files using freeImage. That works as long as I use absoulte paths, but thats not very useful, is it? So basically I tried everything, putting the .exr file on the level of the .saver bundle itself, inside the bundles Resources folder and so on. Then I simply tried to load the .exr like this without success particleTex = [self loadExrTexture: "ball.exr"]; I also tried making it go to the .saver bundles location like this: particleTex = [self loadExrTexture: "../../../ball.exr"]; to maybe load the .exr from that location but without success. I then came across this: NSString * path = [[NSBundle mainBundle] pathForResource:@"ball" ofType:@"exr"]; const char * pChar = [path UTF8String]; which seems to be a common way to find resources in cocoa, but for some reason its emty in my case. any ideas about that? I really tried out anything that came to my mind without success so I would be glad about some input!

    Read the article

  • Relative path in JLabel HTML

    - by kroiz
    Hi, I am trying to make JLabel show an html which is referencing an image using a relative path. But I cannot make JLabel locate the image. It works fine when I am using absolute path. I have tried running the program from the command line or from eclipse and add dialog to show me where is the current working directory but for avail. I have therefor came to the conclusion that the image is not searched in the current directory - which brings me to the point. where is the image looked for? here is a test code that show what I am doing: import javax.swing.*; public class HTMLLabel extends JFrame { public HTMLLabel() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JOptionPane.showMessageDialog( this, System.getProperty("user.dir")); String html = "<html>\n" + " <body>\n" + " <div style=\"text-align: center;\">\n" + " <img src=\"file://s.png\">\n"+ " </div>\n"+ " </body>\n"+ "</html>"; JLabel label = new JLabel(html); add(label); pack(); setVisible(true); } public static void main(String[] args) { new HTMLLabel(); } }

    Read the article

  • Bash PATH: How long is too long?

    - by ajwood
    Hi, I'm currently designing a software quarantine pattern to use on Ubuntu. I'm not sure how standard "quarantine" is in this context, so here is what I hope to accomplish... Inside a particular quarantine is all of the stuff one needs to run an application (bin, share, lib, etc.). Ideally, the quarantine has no leaks, which means it's not relying on any code outside of itself on the system. A quarantine can be defined as a set of executables (and some environment settings needed to make them run). I think it will be beneficial to separate the built packages enough such that upgrading to a newer version of the quarantine won't require rebuilding the whole thing. I'll be able to update just a few packages, and then the new quarantine can use some of old parts and some of the new parts. One issue I'm wondering about is the environment variables I'll be setting up to use a particular quarantines. Is there a hard limit on how big PATH can be? (either in number of characters, or in the number of directories it contains) Might a path be so long that it affects performance? Thanks very much, Andrew p.s. Any other wisdom that might help my design would be greatly appreciated :)

    Read the article

  • NAnt and relative path execution

    - by stacker
    How can I assign to trunk.dir property a relative path to the trunk location? This is my nant.build file: <?xml version="1.0" encoding="utf-8"?> <project name="ProjectName" default="build" xmlns="http://nant.sf.net/release/0.85/nant.xsd"> <!-- Directories --> <property name="trunk.dir" value="C:\Projects\ProjectName" /><!-- I want relative path over here! --> <property name="source.dir" value="${trunk.dir}src\" /> <!-- Working Files --> <property name="msbuild.exe" value="C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\msbuild.exe" /> <property name="solution.sln" value="${source.dir}ProjectName.sln" /> <!-- Called Externally --> <target name="compile"> <!-- Rebuild foces msbuild to clean and build --> <exec program="${msbuild.exe}" commandline="${solution.sln} /t:Rebuild /v:q" /> </target> </project>

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >