https://github.com/ncsoft
Author: belliny
Node.JS custom Callback function declare
http://stackoverflow.com/questions/2190850/create-a-custom-callback-in-javascript
|
Actually, your code will pretty much work as is, just declare your callback as an argument and you can call it directly using the argument name. The basics
That will call Note that it’s very important to pass the function reference ( More advanced stuffSometimes you want to call the callback so it sees a specific value for
You can also pass arguments:
Sometimes it’s useful to pass the arguments you want to give the callback as an array, rather than individually. You can use
|
|
It is good practice to make sure the callback is an actual function before attempting to execute it:
|
My 2 cent. Same but different…
<script>
dosomething("blaha", function(){
alert("Yay just like jQuery callbacks!");
});
function dosomething(damsg, callback){
alert(damsg);
if(typeof callback == "function")
callback();
}
</script>
Dr. House – Season 4, Episode 16
Badly Sad…
Registered IO, Windows 8
http://www.serverframework.com/asynchronousevents/2011/10/windows-8-registered-io-networking-extensions.html
Mac + Permanent Routing Table on Boot up
http://meinit.nl/add-permanent-static-route-mac-os-x
http://blog.irrashai.com/blog/2009/03/how-to-add-static-route-in-mac-os-x/
http://blog.irrashai.com/blog/2009/03/how-to-add-static-route-in-mac-os-x/
$ sudo mkdir /Library/StartupItems/AddRoute
# cd /Library/StartupItems/AddRoute
$ echo “{
Description = \”Add static routing tables\”;
Provides = (\”AddRoutes\”);
Requires = (\”Network\”);
OrderPreference = \”None\”;
}” > StartupParameters.plist
$ echo “#!/bin/sh
# Set up static routing tables
# Roark Holz, Thursday, April 6, 2006
. /etc/rc.common
StartService ()
{
ConsoleMessage “Adding Static Routing Tables”
sudo route add 10.0.0.0/8 192.168.200.15
}
StopService ()
{
return 0
}
RestartService ()
{
return 0
}
RunService “$1″” > AddRoutes
$ sudo chmod 755 AddRoutes
HanSoft w/ Synology
just using Linux binary, run as root
start script generated automatically during installation.
Synology & Confluence/Jira
install using installer – easiest & fastest way to install both.
use PostgreSQL, of course you may use MySQL, but need to modify my.inf to indicate default engine(however, i’m using docker for mysql, but the configuration is not so easy on the container console).
everything are smooth as expected but…
you should aware it that it consumes too much process power. 96% on installing, 60~70% on posting.
so?
you may use synology for hosting confluence/jira, but cpu will burn…
Synology & Confluence/Jira
install using installer – easiest & fastest way to install both.
use PostgreSQL, of course you may use MySQL, but need to modify my.inf to indicate default engine(however, i’m using docker for mysql, but the configuration is not so easy on the container console).
everything are smooth as expected but…
you should aware it that it consumes too much process power. 96% on installing, 60~70% on posting.
so?
you may use synology for hosting confluence/jira, but cpu will burn…
Perforce W/ Synology
Synology DS1515+ (DSM 6)
Perforce Binary : Helix Server Linux_86_64
useful start/stop script : https://forum.synology.com/enu/viewtopic.php?f=39&t=29558&p=310088#p310088


