Hey all, sorry if this is a dumb question, I am trying to get some JSON data, below is an example of my code, this is running inside a method, reading the data doesnt throw an exception by when I try to retrieve it I get "the method getString(int) in the type JSONArray is not applicable for the arguements (string)" however the data I am trying to get is a string. I thought it was because the first data pair includes string and int values but I have tried running it on the author string value and I get the same thing - I have included an example of the data below. Any help appreciated
I was wondering if someone could help me with this as it's driving me nuts, I am trying to read a list of values from one file and write it to another as part of a larger project, here is my simplified code:
PrintWriter commits;
void setup() {
commits = createWriter("commits.txt");
String[] data = loadStrings("export.txt");
for (int i = 0; i < data.length; i++) {
commits.println(data);
}
commits.flush();
commits.close();
println("done");
}
which is all fine until I look at the output file which just contains repeated lines of this:
I am really new to processing and java so please excuse my ignorance..
I am trying to create an applet that uses the webcam and the open CV library. The script works fine in processing but when I try to run it in a browser I get the following error in the compliler window:
!!! required library not found : no OpenCV in java.library.path
Verify that the java.library.path property is correctly set and the '\path\to\OpenCV\bin' exists in your system PATH
Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: hypermedia.video.OpenCV.capture(III)V
at hypermedia.video.OpenCV.capture(Native Method)
at hypermedia.video.OpenCV.capture(OpenCV.java:945)
at MoveAmount.setup(MoveAmount.java:38)
at processing.core.PApplet.handleDraw(Unknown Source)
at processing.core.PApplet.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
The path exists in the system path, I have signed all the .jar files and the OpenCV library files are included in the applet folder. The only thing I am not sure about is the "OpenCV in java.library.path" or how to verify if it is correctly set. I have looked on all the forums but can only find a discussion about a similar error in the processing compiler, this is not happeneing in my case, only in the browser. Could anyone shed any light on this error and how I might go about fixing it? Much appreciated