JavaEar 专注于收集分享传播有价值的技术资料

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I am getting error Expecting value: line 1 column 1 (char 0) when trying to decode JSON. The URL I use for the API call works fine in the browser, but gives this error when done through a curl request. The following is the code I use for the curl request. The error happens at return si . . .阅读更多

How to parse base64 image from JSON

What's the reason that I can't parse a base64 string from a JSON request? when I make it a small string it works. To clarify a little: else if([connection isEqual:self.appearanceConnection]){ NSArray *arrayOfAppearances = [NSJSONSerialization JSONObjectWithData:[[[NSString . . .阅读更多

Mocha browser tests with Node.js command-line runner?

I have a suite of client-side Mocha tests that currently run with the browser test runner. But I also have a suite of server-side Mocha tests that run with the Node.js command-line test runner. I know I can run the client-side tests from the command-line in a headless browser like Phan . . .阅读更多

"document" is not defined in java ScriptEngine

i'm trying to call document in java using scriptEngine here is my code ScriptEngineManager scriptEngineManager=new ScriptEngineManager(); ScriptEngine scriptEngine=scriptEngineManager.getEngineByName("nashorn"); scriptEngine.eval("function func(){" + "document.locatio . . .阅读更多

ImportError: No module named FileDialog - after PyInstaller

I have written a program that I have tried to turn into an executable using PyInstaller. Pyinstaller appears to have finished without any errors and I end up with an application in /dist/my_program. However, when I try to run that application a console window flashes up for a second wi . . .阅读更多

Freetype not compiling on windows with MinGW

I open cygwin and navigate to the freetype-2.5.3 folder I got from the website: http://www.freetype.org/developer.html Once I'm there, I run ./configure and it has done 1 of 3 three things so far, seemly at complete random. At first it was saying: builds/PaxHeaders.3009/detect.mk:1: ** . . .阅读更多