Poll

700!!!!!!!

wow
59 (42.1%)
yow
48 (34.3%)
now
33 (23.6%)

Total Members Voted: 140

Author Topic: e̶l̶e̶c̶t̶r̶k̶'̶s day discussion topic i guess [day 1234]  (Read 1646639 times)


OSU vs. Wisconsin game starting now I hope everyone roots for the superior school (my school)

show people what it's like to go thru the military
"and to summarize, my entire 15 week training cycle could have been compressed down to 8 weeks" "it sucks" "korea sucks" "kuwait sucks" "deployment is better than garrison" "why the forget did i sign up for this stuff" etc etc
« Last Edit: December 02, 2017, 09:12:13 PM by Frankie² »


okay since the programming megathread is dead, and google isn't really doing it justice, can someone or everyone explain callback functions to me in javascript? I'd like to genuinely get what they are at an intuitive level

Code: [Select]
function read(file, callback) {
    fs.readFile(file, 'utf8', function(err, data) {
        if (err) {
            console.log(err);
        }
        callback(data);
    });
}

if(message.content.startsWith(prefix + "help")) {
read('help.txt', function(data) {
message.reply(data);
});
}

as I understand it, callback(data) passes the variable back to the second parameter in the read function. when I put a function parameter into that read function, it sends the variable to that function? I feel like this code may be overcomplicated though, I know I can use => too but I want to keep it simple at first here
reposting this from the night discussion topic about to be locked shortly

EDIT: it's ok I got it
« Last Edit: December 03, 2017, 01:01:44 PM by Maxwell. »

i wanna drink the vodka i bought but my dad and i are to prepare dinner soon and i dont wanna show up smashed what do






i wanna drink the vodka i bought but my dad and i are to prepare dinner soon and i dont wanna show up smashed what do
chug it all


yes drink while eating resonte
no
drink resonate and eat jello-vodka