Live-server unable to access parent directory - npm-live-server

I'm using the live-server package to launch my page, and it seems parent directories cannot be accessed (for example, '../public/file.txt'). Placing this file into working directory, live-server will be able to load it.
Is there a way to allow access to parent directories?

Related

Path that is working with go run is not working with go install/calling the executable from bin

I'm starting to experiment with Go and I'm facing an issue that (I think) doesn't exist in languages that use a virtual machine.
I have a src/test/main.go file that references my templates inside src/test/views/ folder.
When I use go run main.go it runs but when do go install and then inside my bin folder run the executable (./test) I get an error:
views/edit.html: no such file or directory
So, how does Go compiles my project (file/folder structure related) and how to use paths in a way that allows me to use either go run and go install/executable?
If you specify a relative path in your code, as in views/edit.html it will also be looked up relative to the binary location. You need to either make the path absolute, or use some logic to determine where your templates will be located.
Another option would be to use https://github.com/jteeuwen/go-bindata or https://github.com/elazarl/go-bindata-assetfs that will save you the hassle.

No such file or directory in MAC Terminal

I want to access to a directory of an xcode project that contains cocoapods (firebase framework) in my Desktop! But I keep getting: No such file or directory!
I tried to access to another non-project folder and it worked.
It also worked when I tried to access to a project folder that does not contain cocoapods!
I don't know why I could not access to any project folder that contains cocoapods!
When I list the contents of the desktop I got:
There is an # in the properties
What does that means and how can I access to the folder?
I just want to upload it to the Github? any solutions?
BusinessWallet is probably a framework bundle, which means that it is actually just one file, but appears as a directory in Finder. You can copy individual files out of it in Finder.
If you need programmatic access to contents inside the bundle, take a look here: https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/AccessingaBundlesContents/AccessingaBundlesContents.html

cant get POM file to set the outputDirectoryas as the project root

I have a POM.xml file and when i compile it it spits out the files in a default directory within the project. Is there a way to specify the file output within the
<outputDirectory>.</outputDirectory>
field? I would likle the file output to be in the root of the project folder. i want the output directory to be able to work for multiple users wherever the project is located within a computer.so it must not be specific for a single user. Is this possible?

How to configure relative datasource file for SQLite?

I'm trying to configure a SQLite database for an Spring Web App. The thing is that I'm not able to reach the database file that I've created in src/main/resources using a relative path.
I've tried several configurations for the jdbc url but none of them worked:
jdbc:sqlite:mydb.sqlite (here I changed the file location to the project root)
jdbc:sqlite:${jdbc.url} (here I passed the url as a parameter thru PropertyPlaceholderConfigurer)
jdbc:sqlite:src/main/resources/mydb.sqlite
A weird thing that I realized about is that the app is using Eclipse's directory as the directory to find the database file. I mean, when I put jdbc:sqlite:mydb.sqlite it creates an mydb.sqlite on Eclipse's directory not in project's root.
Check the JVM system property named "user.dir" and set the path relative to it. It is the "current dir" of your java app. It can be different if you run from eclipse or from cmd line or inside webserver(tomcat).
So, System.getPropery("user.dir") will tell you current dir of your running app. Set the path to db relative to that directory.
I would say eclipse does not run your app from the project dir, as it should by default. Check your "run" settings in the eclipse.

How to package JMeter with Jar Bundler on Mac

I'm unable to use "Jar Bundler" on mac to create JMeter.app from ApacheJMeter.jar, I was wondering if anyone else had previous experience with configuring this tool? The problem for me seems to be that the lib folder being searched is set to an incorrect base path:
org.apache.jmeter.NewDriver: JMeter home directory was detected as: /Users/username/Applications/JMeter.app/Contents/Resources
I looked here: http://developer.apple.com/library/mac/#documentation/Java/Reference/Java_InfoplistRef/Articles/JavaDictionaryInfo.plistKeys.html
But no matter how I configured any of the said properties, the logs looked the same.
The real trick is making sure the bin and lib folders can be found. The only jar file you will need to add is ApacheJMeter.jar. Look in the bin/jmeter script for additional properties to put into the properties tab of the Jar Bundler. The java arguments in the bin/jmeter script should be copied into the VM Options field. Check Set Working Directory to Inside Application Package. Now create application. Open up the .app folder that was just created and copy the bin and lib folders into the Resources directory. Done.

Resources