Search Results

Search found 14344 results on 574 pages for 'path'.

Page 64/574 | < Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >

  • Java URL("file://") doesn't work on Windows XP

    - by Soumya Simanta
    For some reason the following code doesn't work on Windows XP. new URL("file://" + tempfile.getAbsolutePath()); I'm using Java 1.6. Java(TM) SE Runtime Environment (build 1.6.0_31-b05) Java HotSpot(TM) Client VM (build 20.6-b01, mixed mode, sharing) However, the same code just works fine in OS X (Lion) and Java 1.6 java version "1.6.0_29" Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-11M3527) Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode) Linux (Linux 2.6.32-38-generic #83-Ubuntu x86_64 GNU/Linux) with Java 1.6 java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode) Based on this the above code should work.

    Read the article

  • Web development - relative URLs without duplicating files

    - by eshriek
    I have a site with index.php in the root folder, images in /img , and overview.php in /content . I have a sidebar.php file that is included in both index.php and overview.php . How should I refer to /img/image.gif if I include a link in each file? The location of image.gif changes relative to the location of the file that references it. Using /img/image.gif in sidebar.php will work in index.php, but it fails for the file located at /content/overview.php. The only solution that I can see is to either include a seperate sidebar.php in each subdirectory, or include an /img directory in every sub-directory. The best suggestion that I can find is to use the <base html tag as suggested here: Change relative link paths for included content in PHP However, in the same link, SamGoody suggests that the <base tag "is no longer properly supported in Internet Explorer, since version 7." I'd like some insight on the matter before committing to a course of action. Thanks. EDIT: I am using the wrong approach below with "../" Example- root/index.php: ... <link rel="stylesheet" type="text/css" href="style.css" /> <title>title</title> </head> <body> <?php include('include/header.php'); ?> <?php include('include/menu.php'); ?> ... root/include/header.php: ... <div id="header"> <span class="fl"><img src="img/dun1.png"/></span><span class="fr"><img src="img/dun2.png"/></span> ... root/content/overview.php: ... <link rel="stylesheet" type="text/css" href="../style.css" media="screen" /> <title>Overview</title> </head> <body> <?php include('../include/header.php'); ?> <?php include('../include/menu.php'); ?> ...

    Read the article

  • SVNServ deny write access to a directory via wildcard match.

    - by Wes
    Hi, We have a requirement that every piece of code that makes it into production will be reviewed by a senior developer. The way I have envisioned this working is by a naming convention for branches that regular developers cannot check code into. Following the SVN recomended directory structure this translates into something like. [project-name]/trunk/ [project-name]/branches/ [project-name]/branches/development-01 [project-name]/branches/development-02 [project-name]/branches/task-increasefontsize [project-name]/branches/release-01 [project-name]/branches/release-02 [project-name]/tags/ So in the authz file I would like to have something like the following [/] @developers = rw [/*/branches/release-*] @developers = r @senior_developers = rw However I can't find any evidence that SVN supports * (or any other wildcard character). Is such a thing possible or do I need a pre-commit hook?

    Read the article

  • A question mark within a @PathVariable in Spring MVC?

    - by sp00m
    Within the @Controller of a search engine: @RequestMapping(value = "/search/{query}", method = RequestMethod.GET) public String search(@PathVariable String query) {} If a user wants to search /search/w?rld (wich should match world, warld, whrld, etc.), the variable query equals w, because of the question mark which indicated a GET var. I tried "/search/{query:.+}", but still doesn't work. Any idea how to solve that problem?

    Read the article

  • Boost BGL thread safety

    - by Budzoli
    Hi! I'd like multiple threads to use the dijkstra_shortest_paths and astar_search functions of the BGL, and then read the property maps of the result vertices and edges. I'm wondering wether I should use mutexes to ensure thread-safety. So here are my questions: 1., Are the dijkstra_shortest_paths and astar_search functions of the Boost.Graph thread safe? 2., If I only try to read the property maps of the graph from multiple threads, do I need to worry about thread safety?

    Read the article

  • HTML relative links with URL Rewrite

    - by Adam Kiss
    I have quickie: When you code/develop themes, how do you link to various files in your html/css code? Example: We at our firm use mostly <base target="http://whatever"> in our main template and then just <img src="./images/file.png"> in our html, "/category/page" as links and something alike in our css. However, when testing on different machines, we use ip address rather than localhost on main dev station of coder, so all base links don't work (because localhost goes to viewing machine, not coder's, in our network). Same thing happens when updating pages - on dev server, we have to edit base target, so browsing site won't take us to live site - this part is actually rather simple PHP (if ... echo else echo something else), but it still not solve problem of more coding-testing problems. So, my question is, how do YOU solve it? How do you use relative links, which basically don't care for what domain is the page on and don't care for url rewrite? (because ../images/ is different for / and different for /something/somethingElse/page)?

    Read the article

  • HTML relative links on various domains

    - by Adam Kiss
    I have quickie: When you code/develop themes, how do you link to various files in your html/css code? Example: We at our firm use mostly <base target="http://whatever"> in our main template and then just <img src="./images/file.png"> in our html, "/category/page" as links and something alike in our css. However, when testing on different machines, we use ip address rather than localhost on main dev station of coder, so all base links don't work (because localhost goes to viewing machine, not coder's, in our network). Same thing happens when updating pages - on dev server, we have to edit base target, so browsing site won't take us to live site - this part is actually rather simple PHP (if ... echo else echo something else), but it still not solve problem of more coding-testing problems. So, my question is, how do YOU solve it? How do you use relative links, which basically don't care for what domain is the page on and don't care for url rewrite? (because ../images/ is different for / and different for /something/somethingElse/page)?

    Read the article

  • Url.Content() equivalent in php?

    - by stacker
    What is the Url.Content() of asp.net mvc equivalent in php? I have a file that use my style.css from both pathes: 'artciles/123/name' 'artciles/123' How can I use links to static content, witout using absolute urls?

    Read the article

  • Enumerating all hamiltonian paths from start to end vertex in grid graph

    - by Eric
    Hello, I'm trying to count the number of Hamiltonian paths from a specified start vertex that end at another specified vertex in a grid graph. Right now I have a solution that uses backtracking recursion but is incredibly slow in practice (e.g. O(n!) / 3 hours for 7x7). I've tried a couple of speedup techniques such as maintaining a list of reachable nodes, making sure the end node is still reachable, and checking for isolated nodes, but all of these slowed my solution down. I know that the problem is NP-complete, but it seems like some reasonable speedups should be achievable in the grid structure. Since I'm trying to count all the paths, I'm sure that the search must be exhaustive, but I'm having trouble figuring out how to prune out paths that aren't promising. Does anyone have some suggestions for speeding the search up? Or an alternate search algorithm?

    Read the article

  • Finding most recently edited file in python

    - by zztpp5521
    I have a set of folders, and I want to be able to run a function that will find the most recently edited file and tell me the name of the file and the folder it is in. Folder layout: root Folder A File A File B Folder B File C File D etc... Any tips to get me started as i've hit a bit of a wall.

    Read the article

  • Wordpress paths issue

    - by Martin
    I have set a crawler up in wordpress which grabs stocks data and writes to file which when a user enters a symbol/ticker the variable is read and if it matches the data of a previous crawl for that particular companies data will echo the text file on page, if no data is found the crawler then sets off grabs it and writes to file to save for the next time that symbol is used. The problem im having is that everything works groovey apart from one thing, when the content is written to file it saves it in the WP root and not inside a subfolder of the theme, basicaly this means that root becomes untidy very quickly and also should the theme be used on another site then its not practical as some important info is missing. I have tried bloginfo and absolute both return the same failure. This is the code i am using to write to file, like i say it works apart from writing the file into root. <?php $CompDetails = "http://www.devserverurl.com/mattv1/wp-content/themes/stocks/tools/modules/Stock_Quote/company_details/$Symbol.txt"; if (file_exists($CompDetails)) {} else { include ('crawler_file.php'); $html = file_get_html("http://targeturl.com/research/stocks/snapshot/snapshot.asp?ticker=$Symbol:US"); $es = $html->find('div[class="detailsDataContainerLt"]'); $tickerdetails = ("$es[0]"); $FileHandle2 = fopen($CompDetails, 'w') or die("can't open file"); fwrite($FileHandle2, $tickerdetails); fclose($FileHandle2); } ?> edit below, have also tried this and the same happens as above <?php if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/wp-content/themes/stocks/tools/modules/Stock_Quote/company_details/$Symbol.txt")) {} else { include ('crawler_file.php'); $html = file_get_html("http://targeturl.com/research/stocks/snapshot/snapshot.asp?ticker=$Symbol:US"); $es = $html->find('div[class="detailsDataContainerLt"]'); $tickerdetails = ("$es[0]"); $FileHandle2 = fopen($_SERVER['DOCUMENT_ROOT'] . "/wp-content/themes/stocks/tools/modules/Stock_Quote/company_details/$Symbol.txt", 'w') or die("can't open file"); fwrite($FileHandle2, $tickerdetails); fclose($FileHandle2); } ?>

    Read the article

  • PHP/CGI: Portable and safe way to get PATH_INFO

    - by LiraNuna
    I'm seeking a portable way to receive the (handy) $_SERVER['PATH_INFO'] variable. After reading a while, it turns out PATH_INFO is originated from CGI/1.1, and my not always be present in all configuration. What is the best (mostly security-wise) way to get that variable - apart from extracting it manually (security concern).

    Read the article

  • set include_path for embed files like .js and .css?

    - by John Isaacks
    OK so I now know there is a way to put all my php files in a single place and have them be able to be included without a filepath by setting an include_path like so: php_value include_path .:/pathToPHPFiles OK so now as long as my PHP files are in this directory I can include them from any subdirectory as if they were in the same directory. I am wondering if there is a trick like this for other file types like .css and .js so I can put them all in single location and embed them in a page without worring about the filepath?

    Read the article

  • Get DLL's directory

    - by user296359
    Hi, I have a question about getting DLL's directory on Windows system. The situation is like this : I have a DLL and an EXE file. The exe file must load the DLL to run. These 2 modules are in different directories. Moreover, the directory of the DLL is changeable. Now I have to get the directory of the DLL in "run time". How could I do this? Thanks in advance.

    Read the article

  • How Do I Setup the Notepad++ Run Command for Ruby?

    - by EstanislaoStan
    I'm trying to setup the Notepad++ IDE so that when I press F6 the Ruby script I'm editing will run. After searching the internet I've found that putting [cmd /K ruby "$(FULL_CURRENT_PATH)"] without the brackets into the run dialogue box that pops up when I press F5 will run basic scripts in the Command Prompt (I'm using Windows 7). However, if my code loads any external data such as .txt files, or as I've found with Gosu, loads any image files, Ruby complains that things do not exist which do in fact exist. I know my code and Ruby installation (Ruby 1.9.3) are fine because prior to now I've been using FreeRIDE, an older, somewhat buggy IDE that I've grown tired of, and my code runs fine when I press F5 using that IDE. Some examples of the complaints follow. My Text Adventure: C:/Users/Estanislao/Dropbox/Allway Sync/My Important Documents/Text Focused Fold er/Ruby Scripts/Text Adventure/0.1.0/File Parser/DungeonContentFileParser.rb:8:i n `initialize': No such file or directory - Example Dungeon Creator File.txt (Er rno::ENOENT) from C:/Users/Estanislao/Dropbox/Allway Sync/My Important Documents/Text Focused Folder/Ruby Scripts/Text Adventure/0.1.0/File Parser/DungeonContentFile Parser.rb:8:in `open' from C:/Users/Estanislao/Dropbox/Allway Sync/My Important Documents/Text Focused Folder/Ruby Scripts/Text Adventure/0.1.0/File Parser/DungeonContentFile Parser.rb:8:in `encapsulate_method' from C:/Users/Estanislao/Dropbox/Allway Sync/My Important Documents/Text Focused Folder/Ruby Scripts/Text Adventure/0.1.0/File Parser/DungeonContentFile Parser.rb:117:in `sort_room_data_external_method' from C:/Users/Estanislao/Dropbox/Allway Sync/My Important Documents/Text Focused Folder/Ruby Scripts/Text Adventure/0.1.0/File Parser/DungeonContentFile Parser.rb:125:in `<main>' D:\Programming Stuff\Notepad++> My Gosu Program: C:/Users/Estanislao/Dropbox/Allway Sync/My Important Documents/Text Focused Fold er/Ruby Scripts/Game Development/Circular Motion.rb:10:in `initialize': Could no t load image media/Space2.png using either GDI+ or FreeImage: Unknown error (Run timeError) from C:/Users/Estanislao/Dropbox/Allway Sync/My Important Documents/Text Focused Folder/Ruby Scripts/Game Development/Circular Motion.rb:10:in `new' from C:/Users/Estanislao/Dropbox/Allway Sync/My Important Documents/Text Focused Folder/Ruby Scripts/Game Development/Circular Motion.rb:10:in `initiali ze' from C:/Users/Estanislao/Dropbox/Allway Sync/My Important Documents/Text Focused Folder/Ruby Scripts/Game Development/Circular Motion.rb:181:in `new' from C:/Users/Estanislao/Dropbox/Allway Sync/My Important Documents/Text Focused Folder/Ruby Scripts/Game Development/Circular Motion.rb:181:in `<main>' D:\Programming Stuff\Notepad++> If anyone could lend any help at all I'd really appreciate it.

    Read the article

  • Why does Ruby 1.9.2 remove "." from LOAD_PATH, and what's the alternative?

    - by John Feminella
    The latest changesets to Ruby 1.9.2 no longer make the current directory . part of your LOAD_PATH. I have a non-trivial number of Rakefiles that assume that . is part of the LOAD_PATH, so this broke them. Was there a particular justification for doing this? As for a fix, adding $: << "." everywhere works, but seems incredibly hacky and I don't want to do that. What's the preferred way to make my Rakefiles 1.9.2+ compatible?

    Read the article

  • Accessing JAR resources

    - by Pablo Fernandez
    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('resource.xml'); Sadly this does not work. Any ideas? Thanks! PS: Obviously I cannot use absolute paths, and I'd like to avoid environment variables if possible

    Read the article

  • How can code in a JavaScript file get the file's URL?

    - by dalbaeb
    I need to dynamically load a CSS stylesheet into a page that's on a different domain. How can I get the complete URL of the JS file to use in the href attribute of the stylesheet? For instance, here is the structure: http://bla.com/js/script.js http://bla.com/css/style.css I want to dynamically load the stylesheet into a page http://boo.net/index.html. The problem is, I don't know the bla.com bit in advance, just the fact that the stylesheet is in ../css/ relative to the JS file. The script is, of course, included on index.html. jQuery's fine too.

    Read the article

< Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >