I am somewhat new to using NetLogo extensions and I'm having some trouble. I downloaded the csv extension from https://github.com/NetLogo/CSV-Extension/releases, copied the folder into the extensions folder of NetLogo, and added
extensions [ csv ]
to the beginning of my script. However, when I try to use the primitive csv:to-file, it is not recognized. I've tried other primitives as well but none of them seem to work. Any thoughts or suggestions are appreciated.
Recent versions of NetLogo include the CSV extension — it isn't something you need to separately download anymore.
If you're using an old version of NetLogo, upgrade.
If you're using a recent version of NetLogo that includes the CSV extension, remove the extra one you added. (At that point it should work, but if not, uninstall then re-install NetLogo to 100% ensure that the original state is restored.)
Related
I have a json file with some data that I want to ship with my application.
I want to include it on the folder /app/share/<app-name>/data/<file>.json.
I have researched, looked on the flatpak manifest documentation and the manifest of other applications, but I saw no mention to this option.
So, how would be the proper way of adding this file on the manifest?
You can do this by adding this file as part of the "sources" field in your module, and then installing it.
An example of this in the Flathub repo for Spotify. There, we definitely have a need for shipping separate files that make the integration into your DE seamless, as Spotify doesn't ship those. Concretely, let's look at the desktop launch file that is added:
The file can be found here: https://github.com/flathub/com.spotify.Client/blob/master/com.spotify.Client.desktop
You specify the relative path as a "file" source
Add the install command to the build-commands field of your module
In older versions of Squirrel-SQL, autocorrect data was stored in an XML file as documented in Where does Squirrel SQL store its auto correct entries?. After updating to a more recent version, this file no longer exists in the same "syntax" folder (C:\Program Files\SQuirreL SQL Client\plugins\syntax). Does anyone know where I might be able to locate this file?
Since there wasn't much to work with in the old "syntax" folder, I dug into the syntax.jar file in the "plugins" parent folder and found a bunch of .class files in the zipped folder "syntax\net\sourceforge\squirrel_sql\plugins\syntax" (peaking into the .jar file as it were). There were a few files that looked promising, such as
AutoCorrectData.class
AutoCorrectDataItem.class
AutoCorrectProviderImpl.class
But none of them contained autocorrect entries I have added to the client - although the last .class file listed above references an "autocorrectdata.xml" file, which is what I could not find in the first place.
Any help I can get on this would be much appreciated!
Doh! Turns out newer versions of Squirrel-SQL store user-defined autocorrect data in local user folders. Makes a lot of sense actually! Found my autocorrectdata.xml file in the following folder:
C:\Users\[My Username]\.squirrel-sql\plugins\syntax
It seems that the XYZ Studio has some problems with accepting files. The upload of .geojson and .csv files is recommended but it tells me i am trying to upload "unsupported file types". It still worked a few weeks ago but i cannot upload any .geojson and .csv files right now.
Kindly crosscheck the names in the header of your csv file. If the file does not have columns labelled Latitude and Longitude, the xyz studio may give you a message saying that you are trying to upload an unsupported file.
I ran into a similar issue. Turns out HERE Studio prefers comma (,) CSVs only. If modifying in excel and it gets saved as a caret (^) CSV, the uploader will only read the file as one wide column and pop out errors.
If HERE is listening, some documentation on properly formatted file types, formats, and limitations along with sample code for the .CSVs, json, shape, and GEOjson files would be immensely helpful to users of Studio as there is little in the way on the API/platform documentation.
I am able to find some information on how to read a csv file on a computer but is there any way I can modify one? In my chrome extension I need to add data to each row one at a time after scraping some websites. Is there any better way then read csv, store data as variable and rewrite is everytime? This becomes problematic when the file gets large. I am looking for a way to “append ” to a existing file or a work around. Any suggestions appreciated.
Update: From comment I see it is not possible to read from file system. But is there anyway to read from within the extension directory? How should I do so if the csv file is included with in the zip file of the extension? Can I access them somehow? Code snippets would be helpful.
I'm in the middle of creating something which might help you. Right now you can upload the CSV file and append a "modifier". You can adjust the code according to your requirement. Here's the repo https://github.com/amanrOnly/CSV_Modifier
I am trying to search for a string across files in a Mac. Sierra v10.12.5. Using the finder, I search for files of type 'json', then using the '+' for advanced search features, I select 'contents' and my string in the textbox. Nothing is returned. If I change the file extension from .json to .txt, the files containing the string in the textbox are returned. So this seems isolated to files of type .json
Today a visit to the genius bar confirmed what I saw. However, the 'genius' told me that's all he could tell me about the subject. I took his response as code for "you found a bug, too bad" He said to search the web to find an unsupported solution. Unfortunately, I haven't found a workaround. Does anyone have an idea?
For a file to show up in Spotlight search results, there needs to be a Spotlight importer which can read that type of file and index it. macOS ships with importers for a number of common file formats (such as .txt and .pdf), but there is no default importer for .json files, since there isn't really any standard way of opening and viewing them.
If you wanted, though, you could write an importer.