relative-path

Angular AOT Relative paths in components

泪湿孤枕 提交于 2019-12-10 10:16:59
问题 I'm asking here because I could't find complete documentation online. The example here is too simple. I've an app with several components and some modules. After compile with ngc, I had lot of errors. The way I found to fix them was use relative paths. So I use ' moduleId: module.id, ' in all my components. But now the compiler tells me: ' Cannot find name 'module' ' As I understand, that is becuase I'm declaring the following compile options for AoT: { "compilerOptions": { "target": "es5", -

PHP - include() or require() with relative paths won't work on windows, even when appending __DIR__

走远了吗. 提交于 2019-12-10 10:09:05
问题 I was reading here about problems in PHP when using include() or required() with relative paths and all the solutions I saw was to append DIR I'm currently working on Windows, and even though the error message displays the current value of DIR , then the relative path seems to be added as a string, rather than going one level up, for example: include(__DIR__ . "..\\another_folder\\file_2.php"); produces the following error: Warning: include(C:\xampp\htdocs\main_folder..\another_folder\file_2

Relative paths for source in Eclipse

牧云@^-^@ 提交于 2019-12-10 09:27:12
问题 So, Eclipse and relative paths... What I want to achieve is to share the project files with several users, where the exact location of the source can be different for each user. I.e, the src for project MyProject could be at c:\version_control_foo\MyProject\src or c:\version_control_bar\MyProject\src or even X:\foobar\MyProject\src and the same project should work for all. Heres what I've tried: I set a variable C_TMP in Eclipse pointing to c:\version_control_foo with the idea that user #2

Resolving a relative path without referencing the current directory on Windows

强颜欢笑 提交于 2019-12-10 09:19:05
问题 I have a windows cpp app and I want to resolve paths relative to a specific directory without changing the current directory. This means I can't use GetFullPathName since it resolves paths relative to the current directory. Since this is a security sensitive issue I would rather not roll my own but use a sanctioned API. I looked around for a good answer, but couldn't find anything. Surely this is a common issue for web servers or multithreaded environments. How do other people do this? Any

Relative path to SQLite DB in context.xml

China☆狼群 提交于 2019-12-10 06:44:36
问题 Is it possible to use a relative path to an SQLite database file in the context.xml file of a Java web application? At present, I have: <?xml version="1.0" encoding="UTF-8"?> <Context path="/mywebapp"> <Resource name="jdbc/mydb" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="myusername" password="mypassword" driverClassName="org.sqlite.JDBC" url="jdbc:sqlite://Users/me/NetBeansProjects/MyApp/web/my.db"/> </Context> As you can see, the url

Using relative paths in gnuplot plot files

狂风中的少年 提交于 2019-12-10 05:53:17
问题 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

Which directories does PHP check when including a relative path with include()?

那年仲夏 提交于 2019-12-09 16:36:12
问题 It's very odd,has anyone ever sum up with a conclusion yet? Sometimes it checks the directory of the included file,too. But sometimes not. D:\test\1.php <?php include('sub\2.php'); D:\test\2.php <?php include('3.php'); Where 3.php is in the same dir as 2.php . The above works,but why?The current directory should be D:\test ,but it can still find 3.php,which is in D:\test\sub More story ( final ) About a year ago I met this problem,and then I ended up fixed it with the hardcoding like below:

How to get a path from a directory in a C# console application?

ⅰ亾dé卋堺 提交于 2019-12-09 15:50:11
问题 Say I have this file structure Soultion-> Folder1 -> FileIwant.html So this could be something like C:\Soultion\Folder1\FilterIwant.html Now I need to read this file into my application. I can't just hardcode it since when I give it to someone else they might put it on F: drive or something. Or when I create a msi file the path might be completely different. So how can I say maybe take "Folder1\FilterIwant.html" and use that to get the folder path regardless of where they put it? Edit I tried

Java workspace and file path

烈酒焚心 提交于 2019-12-09 13:23:12
问题 I have a probably easy to solve problem. I am having a folder in my project and want to get it using the relative path: new File("/folder") this gives me FileNotFoundException if I try like this new File("d:/workspace/project/folder") it works I suspect that it does not work because of this: new File("").getAbsolutePath() returns : D:\eclipse So not the path of the workspace. Am I doing something wrong or do I need to change some settings in eclipse 回答1: Just found my answer in Run

netbeans : add library permanently

半腔热情 提交于 2019-12-09 13:03:22
问题 I work in a group project and after every checkout I have to remove and add the javamail api..(because the path is relative) how can i make it IN the Project folder? This is how i add the library : right click on librarys folder Add/jar Folder.. Choose the mail.jar But when my collegue checks this out... he get's problems. How can i make the path absolute ? 回答1: A better way to add library to Netbenas would be Tools -> Libraries -> New Library... After it: Project tab -> [your project] ->