relative-path

Using relative paths in gnuplot plot files

只谈情不闲聊 提交于 2019-12-05 11:29:49
In a gnuplot instruction file, is it possible to indicate relative paths for the data source files and for the output? The paths must be relative to the gnuplot instruction file path. Context I have large data files containing between 12 to 50 x-y curves that I process using PHP scripts and gnuplot in order to provide nice graphic views of the data. The views are generated using gnuplot and for each view, I have one .csv file, one gnuplot plotting instruction file and one graphic. Everything is nicely sorted into folders. Usually, in a folder, the graphics are at the top level, then in a

What is the correct way to launch slimerjs in casperjs (with an absolute path)?

戏子无情 提交于 2019-12-05 10:19:19
Well, i can launch slimerjs by specifying the path of the slimer.bat file : C:\bin\slimerjs\slimerjs.bat and then execute my file. But if i modify casperjs file (in bin\ ) and modify the default exec for slimer : 'env_varname': 'SLIMERJS_EXECUTABLE', 'default_exec' : 'C:\bin\slimerjs\slimerjs.bat' when i execute the casper command : casperjs --engine=slimerjs test.js It doesn't work, the path to slimerjs.bat seems to be ignored. I tried this too : https://github.com/laurentj/slimerjs/blob/master/BUILD.md But the slimerjs.exe alone isn't sufficient, i need to have application.ini and omni.ja in

wkhtmltopdf relative paths in HTML with redirected in/out streams won't work

做~自己de王妃 提交于 2019-12-05 08:06:20
I am using wkhtmltopdf.exe (version 0.12.0 final) to generate pdf files from html files, I do this with .NET C# My problem is getting javascript, stylesheets and images to work by only specifying relative paths in the html. Right now I have it working if I use absolute paths. But it doesn't work with relative paths, which makes the whole html generation a bit to complicated. I have boiled what I do down to the following example: string CMDPATH = @"C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe"; string HTML = string.Format( "<div><img src=\"{0}\" /></div><div><img src=\"{1}\" /></div><div>{2

Regular Expression to match relative URLs

最后都变了- 提交于 2019-12-05 06:10:14
问题 Looking for a regular expression that match the following relative URLs: All urls starts with /abc/ but we don't know where it ends and it doesn't have any file extension at the end. /abc/xyz /abc/part1/part2 /abc/red/blue/white/green/black and so on. Any help? 回答1: Try this regular expression: /abc/(?:[A-Za-z0-9-._~!$&'()*+,;=:@]|%[0-9a-fA-F]{2})*(?:/(?:[A-Za-z0-9-._~!$&'()*+,;=:@]|%[0-9a-fA-F]{2})*)* This is derived from the ABNF of a generic URI. 回答2: /^\/abc\// However my guess is you are

How to link your own articles on a Pelican blog?

大憨熊 提交于 2019-12-05 04:48:39
I tried to link with the html file name, but it works because they are on the same folder. [Title](./this-is-the-file.html) But it is possible that another article would appear on another folder because of the ARTICLE_URL pattern. Examples: [Title 1](/2014/02/article1.html) [Title 2](/2014/01/25/article2.html) Is it possible to link your own articles with a reference to the slug ? Any other better solution than the generated HTML file name ? Justin Mayer As noted in the documentation , you can link to other source content files via: [a link relative to content root]({filename}/this-is-the

Is there a simple way to specify a WPF databinding where the path is one “level” up?

99封情书 提交于 2019-12-05 02:57:45
This example is a admittedly a little contrived but I am doing something similar. Let's say I have the following simple classes: public class Person { public string Name { get; set; } public List<Alias> Aliases { get; set; } } public class Alias { public string AliasName { get; set; } } And let's say that I have Xaml with a LayoutRoot grid, and a DataGrid where I want to access the Name property within the DataGrid instead of the Aliases properties like in the second column here: <Grid x:Name="LayoutRoot" DataContext="PersonInstance"> <DataGrid ItemsSource="{Binding Aliases}"> <DataGrid

Path of current PHP script relative to document root

匆匆过客 提交于 2019-12-05 02:50:40
TL;DR : What alternatives to the last code sample on this page are there when trying to use relative links on pages included with PHP's include command? I'm trying to include() a file that links to a .css document, the problem is that I need to include this file from multiple (different) directories. My directory structure looks somewhat like this: www ├── (getpath.php) │ ├── css │ └── style.css ├── php │ └── header.php └── content ├── index.php └── posts └── index.php (I'm including header.php in both index.php files. header.php is the file that refers to style.css (which the browser needs to

How to get server path of physical path ?

本秂侑毒 提交于 2019-12-05 02:40:12
I want to convert this physical path "C:\bla\bla\Content\Upload\image.jpg" to server path like "/Content/Upload/image.jpg" . How can i do that ? you can use something like that : public static class Extensions { public static string RelativePath(this HttpServerUtility utility, string path, HttpRequest context) { return path.Replace(context.ServerVariables["APPL_PHYSICAL_PATH"], "/").Replace(@"\", "/"); } } and you call Server.RelativePath(path, Request); You can do the following to get the relative path. String filePath = @"C:\bla\bla\Content\Upload\image.jpg"; String serverPath = Request

How to use a relative path for LDFLAGS in golang

旧城冷巷雨未停 提交于 2019-12-04 21:46:33
问题 I am trying to build a golang program which uses a static lib (.a file) the directory struct for my project as below └─testserver ├─bin ├─pkg └─src ├─logging └─testserver ├─libtest.a └─test.go the flags for cgo in test.go as below // #cgo LDFLAGS: -L /home/test/testserver/src/testserver -ltest // #include "test.h" import "C" when I am using absolute path for LDFLAGS -L, it works fines, but when I change the path to a relative path, eg // #cgo LDFLAGS: -L ./testserver -ltest and then run the

Pycharm does not see files in relative path with ../

你。 提交于 2019-12-04 21:45:46
问题 I am developing a python project using pycharm. However, the problem is that it refuses to load files in which the relative path includes ../ . When I try self.image = pygame.image.load("../resources/img/prey.png").convert_alpha() I get: self.image = pygame.image.load("../resources/img/prey.png").convert_alpha() pygame.error: Couldn't open ../resources/img/prey.png The thing is that when running my code from the terminal, it works fine, meaning that the problem is with pycharm. Now, the