relative-path

Angular AOT Relative paths in components

♀尐吖头ヾ 提交于 2019-12-06 03:46:49
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", ---> "module": "es2015", "moduleResolution": "node", "sourceMap": true, "emitDecoratorMetadata": true,

How can I use relative paths to external response files for soapUI MockService

孤街醉人 提交于 2019-12-06 01:49:41
问题 What I've Done I am using soapUI (3.6.1 Free version) mock services to serve up specific data to 2 client applications I am testing. With some simple Groovy script I've set up some mock operations to fetch responses from specific files based on the requests made by the client applications. The static contents of the mock response is: ${responsefile} The groovy in the operation dispatch scripting pane is: def req = new XmlSlurper().parseText(mockRequest.requestContent) if (req =~ "CategoryA")

Using relative paths for Gnome launcher

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 00:44:10
We're developing an app that needs to run on a removable device (e.g. USB stick). On Linux, we're using Gnome launchers to place a shortcut to the app on the root of the device. However, we need to use relative paths for the executable and icon since we don't know in advance where the device will mount. In the .desktop file I have something like: Exec=../myapp/myexecutable Icon=../myapp/myicon.png Neither the executable or icon is found. I read the spec on icon lookup in .desktop files (http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html#icon_lookup) but it didn't

Python import modules, folder structures

假如想象 提交于 2019-12-05 21:31:15
问题 I have been looking for a way to solve this. I have a python project, and this is the folder structure I want: /project/main.py /project/src/models.py /project/test/tests.py I want to be able to run the tests by executing the tests.py in terminal. tests.py imports modules in /project/src/ for testing. First I solved this by adding sys.path.insert(0, '..') in tests.py. But then the paths used in models.py for opening text files had to be relative to the tests.py , etc. Which means the program

Relative Paths in Eclipse

帅比萌擦擦* 提交于 2019-12-05 19:30:16
I have an Eclipse workspace that is checked into a Subversion repository. However, if I change the name of the workspace directory, the project files don't load and I have to re-import them, as well as set any workspace related settings again. Does Eclipse work with relative paths? I am not the only team member on this project, and unfortunately the other guy refuses to follow a common directory organization scheme. EDIT These are all java projects at this point EDIT There are several files in the workspace matadata folder, though here is the first one I found in relation to the project

Running ASP.NET MVC application behind a proxy with different root relative path

蓝咒 提交于 2019-12-05 16:21:46
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 requests, but requires you to access the application through a URL like this: "/Secury/Proxy/RubbishUrl/MyApp" Because the proxy url is only available on the client, I thought of creating a cookie with the path prefix, and insert this before each generated URL on the

Relative path to SQLite DB in context.xml

做~自己de王妃 提交于 2019-12-05 15:48:44
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 attribute of the Resource tag currently specifies an absolute path to my.db. However, I am working on

webpack: Module not found: Error: Can't resolve (with relative path)

我们两清 提交于 2019-12-05 15:04:07
问题 I have this structure of an app ( node_modules dir excluded from this list): ├── actions.js ├── bundle.js ├── components │ ├── App.js │ ├── Footer.js │ ├── Link.js │ ├── Todo.js │ └── TodoList.js ├── Containers │ ├── AddTodo.js │ ├── FilterLink.js │ └── VisibleTodoList.js ├── index.html ├── index.js ├── main.js ├── package.json ├── package-lock.json ├── reducers.js └── webpack.config.js My webpack config looks like this: module.exports = { entry: "./main.js", output: { path: __dirname,

How to find USB storage path programmatically?

好久不见. 提交于 2019-12-05 13:34:10
I connected USB storage to my phone and I used getExternalFilesDirs(""); to find all directories including sdcard and USB. The path of sdcard comes out correctly, but USB path does not come out by the function. Is there anyway to find relative path of USB instead of absolute path? I've been stuck at this problem for few weeks, but got nothing. Due to Android permissions you may not be able to do this, but here's the recommendation anyways. Try to read the contents of /proc/mounts and grep "sda1". It'll show you the mount point of your USB drive. 来源: https://stackoverflow.com/questions/30976189

getResource with parent directory reference

夙愿已清 提交于 2019-12-05 11:34:26
I have a java app where I'm trying to load a text file that will be included in the jar. When I do getClass().getResource("/a/b/c/") , it's able to create the URL for that path and I can print it out and everything looks fine. However, if I try getClass().getResource(/a/b/../") , then I get a null URL back. It seems to not like the .. in the path. Anyone see what I'm doing wrong? I can post more code if it would be helpful. The normalize() methods (there are four of them) in the FilenameUtils class could help you. It's in the Apache Commons IO library . final String name = "/a/b/../"; final