This shows the execution order given JavaScript's Call Stack, Event Loop, and any asynchronous APIs provided in the JS execution environment (in this example; Web APIs in a Browser environment)
Given the code
while not quit do | |
read user input into string | |
parse string to struct using lexer() | |
if struct is type of SET do | |
generate key using base62 using struct data | |
insert key data into map | |
// Get all users | |
var url = 'https://reqres.in/api/users'; | |
var xhr = new XMLHttpRequest() | |
xhr.open('GET', url, true) | |
xhr.onload = function () { | |
var users = JSON.parse(xhr.responseText); | |
if (xhr.readyState == 4 && xhr.status == '200') { | |
console.table(users); | |
} else { | |
console.error(users); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Rxjs input file image compressed to base64</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/4.0.6/rx.all.js"></script> | |
<script src="https://unpkg.com/rx-dom@7.0.3/dist/rx.dom.js"></script> | |
<script src="https://cdn.rawgit.com/xkeshi/image-compressor/master/dist/image-compressor.js"></script> |
SET HTTP_PROXY=http://111.111.1.1:8080
git config --global http.proxy http://111.111.1.1:8080
git config --global --unset http.proxy
Oficial Documentation:
http://tools.ietf.org/html/rfc6455
How decode frames:
http://stackoverflow.com/questions/8125507/how-can-i-send-and-receive-websocket-messages-on-the-server-side
Shortcut to decode oficial doc:
https://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17#section-5
http://hackingoff.com/compilers/regular-expression-to-nfa-dfa | |
http://stackoverflow.com/questions/1084069/building-a-regex-engine-online-resources | |
https://swtch.com/~rsc/regexp/ | |
http://www.regular-expressions.info/engine.html |
Resource for cors | |
http://www.html5rocks.com/en/tutorials/cors/?redirect_from_locale=pt | |
http://techblog.constantcontact.com/software-development/using-cors-for-cross-domain-ajax-requests/ | |
https://www.soasta.com/blog/options-web-performance-with-single-page-applications/ | |
https://remysharp.com/2011/04/21/getting-cors-working | |
Jquery not use cross-domain requests with custom headers -> https://github.com/jquery/jquery/blob/a117dd05f638a078c21dc57f19966f4ae81f98f0/src/ajax/xhr.js#L55 |