Introduction: Make a real-time system of quantitative investment.
Comprehensive:
Add the record, the order changes, after refresh, can normal refresh? Can be refreshed normally, but in order to change back.
When using FS ReadFile in Express, you need to write the path with Path.join, and if you use a route, you will read out the numbers.
JSON reads and stores, Json.parse (data), becomes a JSON object, json.stringify (data), and JSON into a string, if it is written in the. JSON, there will be no appropriate
The indentation. So you need json.stringify (data, function (key, value) {return value;}, 4). Thanks to my solid basic skills, read the book fortunately did not forget.
But the feeling stringify function has a bit of a bad place, if not write the second argument (function), it will not work, it will not recognize the second is not a function, directly see it as the first
Three parameters?
data.constructor--can see the type of the function. Don't take everything as an object.
Fq on Mac, you have to BLCU. If you use 360WiFi, you will have a problem with the same application.
var item = {};for (var i=0; i<keys.length; i++) { (function (num) { console.log (' num: ' +num); item[' id '] = num; item[' reqstr '] = Keys[num]; Result_array.push (item); Console.log (' Result_array: ' +json.stringify (Result_array)); }) (i);} A similar closure occurs and the item initialization needs to be written in the closure.
Linux under/,win7 is \ \. Represents a path in a different way.
Use $.get, $post * (), to return JSON, or the success method will not be called.
Hget, because the returned value is already there, now. And I added one myself.
jquery UI:
When you use the dialog of the jquery UI, when you open the dialog box and press ENTER on your keyboard, the page refreshes. You need to capture the Enter event in open and cancel the event.
$ (this). Bind ("Keypress.ui-dialog", function (event) {if (Event.keycode = = $.ui.keycode.enter) { return false;}});
Try to still use jquery, jquery Ui.js,jqeury ui.css CDN, local words, some icons do not load.
Express
When using FS ReadFile in Express, you need to write the path with Path.join, and if you use a route, you will read out the numbers.
PROCESS.CWD () Express project root directory, Linux pwd command can also be seen in the root directory.
Json2.js generally only needs to be used in the client.
II: Nodejs+express+redis+bootstrap table+jquery UI