Netlogo: how to get the path from which a model runs - path

another likely silly question from me, but I have searched everywhere in vain.
Assume I have a netlogo model in the folder 'C:\Temp\NLmodel'. I go to this folder and run the model. I would like netlogo to generate the string 'C:\Temp\NLmodel' (that is the output the path of where it is running from) which I can then write to an output file.
is there a way to do so?
thanks

The pathdir extension will give you that information, as well as some other useful directory stuff. NetLogo will load the extension for you if you put it in your extension list. Here is the direct link.
https://github.com/cstaelin/Pathdir-Extension
Charles

Related

JSON Error: Files or directories outside directory

I tried to submit an Edge extension. It is a simple extension that had three files: the manifest.json, background.js, and an icon.
When I sideload it in Edge, it works. When I tried to publish it, I got an error that says, Files or directories outside directory.
I have looked everywhere for documentation on what the folder directory should look like. Can someone point me to an example directory? Should there be more folders?
The solution was to create a zip file in another way. I found an online site, but if this was something important, I would find another computer.
Anyway, it seems that Big Sur adds something extra that MS doesn't like. Strange Google accepts it.

Blink.jl load(loadjs!/loadcss!/importhtml!) functions not working correctly

I hope someone here has used the Blink.jl package for building Julia and Electron apps.
I am having problems setting up and using it, though. The issue is with all of the functions in the api provided: load/loadcss/loadjs/importhtml. They do not seem to work, or I might be doing something wrong.
For example:
loadcss!(w, "styles.css")
does not apply any of the styles in the styles files in the directory.
importhtml!(w, 'index.html')
does not display the html page stored in the local directory. The app shows a blank screen.
I might be doing something wrong as i could not find documentation on how to use the package
I think I found out why, the methods take the full path and not the relative paths, even if files are inside the same folder. So, something like this works:
loadcss!(w, "D:\project\styles.css")
but this won't work:
loadcss!(w, "styles.css")

Stardog: Location of stardog.properties file

This must be a stupid question, because no one else has posted it and the explanation in stardog is very simple. It says 'Stardog Server’s behavior can also be configured via a stardog.properties—which is a Java Properties file—file in STARDOG_HOME.'
I am looking for the stardog.properties file. It is not in the folder I specified STARDOG_HOME to be. In fact, it is not anywhere. I have done a search of the entire computer.
What is going on?
*This question was answered below.
There is no default stardog.properties file which is why you cannot find it. You can create the file yourself in the STARDOG_HOME folder. You can find an example configuration file in the stardog-examples repo.

Generate html files using asciidoc in a rails application

I will try to explain my problem : I have a rails application which, for the moment, shows the files which are present in my public directory (there are only txt files). I would like to transform my txt files into html files using asciidoc command when I click on a button in my application (or automatically when I add a txt file in the directory) but I don’t know how to do that.
Thanks in advance.
I don't see this as being closed so...
The best way to go about this is to use asciidoctor, the ruby implementation of asciidoc. It is used in github and it plays quite well with rails.
To read all the files with .asciidoc extension you can google and find many useful answers, such as the one you pointed out in your comment.

Using resources for localization in MVC4

I'm following this tutorial that was given as answer in this question, however I'm stuck at displaying the resource.
Just like in tutorial I've created two files
App_GlobalResources
/Global.en.resx
/Global.ru.resx
I've made data annotation class that works and adds a cookie with no errors, it means it injects the local data into current thread properly. When I try to output resource it cannot find it.
I've tried to output it like this and none of these works:
#Global.HomeHello
#Global.en.HomeHello
#Resources.Global.Homhello
// The name 'Resources/Global/etc...' does not exist in the current context
Also, in this tutorial site I see no logic that will inject the proper resource file, how it can do something like (in tutorial) #Global.HomeHello and it will know that if url is /en/ he needs to use Global.en.resx
Please help, first time using resources and implementing multiple languages, feels 100 times more harder and confusing than using *.yml files in other frameworks/languages...
You took a bad example to follow I guess. Please look into the following article:
Resource Files and ASP.NET MVC Projects
Don't forget to change Custom Tool to PublicResXFileCodeGenerator and Custom Tool Namespace to Resources.
Hope this helps & good luck.

Resources