JSON.parse() not working

I dont think you should call JSON.parse(jsonObject) if the server is sending valid JSON as it will be parsed automatically when it retrieves the response. I believe that if You set the Content-type: application/json header it will be parsed automatically. Try using jsonObject as if it was already parsed, something like: Without calling JSON.parse before.

Error: Cannot find module html

I am assuming that test.html is a static file.To render static files use the static middleware like so. This tells express to look for static files in the public directory of the application. Once you have specified this simply point your browser to the location of the file and it should display. If however you want to … Read more

Randomize a List

Shuffle any (I)List with an extension method based on the Fisher-Yates shuffle: Usage: The code above uses the much criticised System.Random method to select swap candidates. It’s fast but not as random as it should be. If you need a better quality of randomness in your shuffles use the random number generator in System.Security.Cryptography like so: A simple … Read more

What causes a Python segmentation fault?

This happens when a python extension (written in C) tries to access a memory beyond reach. You can trace it in following ways. Add sys.settrace at the very first line of the code. Use gdb as described by Mark in this answer.. At the command promptgdb python (gdb) run /path/to/script.py ## wait for segfault ## (gdb) backtrace ## stack trace of the c code