This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install PostgreSQL: | |
Install PostgreSQL 9.6 via homebrew. | |
Before installation: | |
Uninstall PostgreSQL if you have installed it by homebrew with command: brew uninstall postgres. | |
Delete the database cluster, usually locates on /usr/local/var/postgres, or /usr/local/pgsql/data. | |
The command is: rm -rf /usr/local/var/postgres, or rm -rf /usr/local/pgsql/data. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
class Message { | |
doCallback(cb){ | |
cb("!!"); | |
} | |
doAnother(){ | |
console.log("??", this); // Message | |
} | |
doSomething() { | |
this.doCallback(function(message){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create event | |
var evt = document.createEvent("Event"); | |
// initializing the event | |
evt.initEvent("anyName", true, true); | |
// add event handler | |
document.addEventListener("anyName", function(e){ | |
// your handler logic | |
console.log("e.target: ", e.target); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Foo(){ | |
return this; | |
} | |
var fooThis = Foo(); // ? fooThis = | |
var fooThat = new Foo(); // ? fooThat = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
NewerOlder