« first day (2023 days earlier)      last day (2911 days later) » 

6:41 PM
Can someone help me to include angular.js in my Project?
I wrote this peace of Code, but the binding doesn't work:
 
1 message moved to Trash can
@MatthiasHerrmann Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
 <body ng-app="ProjectTogether">
    <h1>{{search}}</h1>
    <input type="text" ng-model="{{search}}"/>
    <script src="Scripts/angular.min.js"></script>
</body>
@CapricaSix sry
 
@towc cute not logical in my opinion. I thought you meant contain the factor 3.
 
@rlemon You actually use publi.sh?
 
7:38 PM
is this the place for node.js?
 
@jamesson this is place for everything: from nodejs to shrek lovers
 
hah
someone could please help me with this error? ctrlv.in/746412
 
That's invalid syntax
See some nodejs intros and tutorials, you'll see the problem
 
hm.. i need react-like component references.
 
7:45 PM
looks nice, but not what i meant.
 
you're not looking for sources?
 
no. it was more toward Zirak, but I mean I need a feature of react's internals
 
@Zirak ty, odd, I got that from official doc
 
@Luggage did you try looking at the React monorepo or consulting the documentation?
 
shh. you have no idea what you are talking about
 
7:48 PM
sorry, can you explain what exactly is it that you need? "internals" is a bit broad
 
No. It wasn't a comment to you.
 
oh, might want to @ him then
 
ok, thanks for the help.
 
@Zirak isn't that the expectation?
if not, why is it there
 
*$#@%$, all the $#*&%ing pdfkit docs are in coffeescript
 
7:57 PM
right, now that explains the require 'foo' statements
 
which I know %@#$ all about
 
are you experienced with Node.js and JavaScript at least?
 
javascript pretty much, node is new
 
@jamesson why censor? speak freely
 
@aval shrug ok I just dont know the house rules
 
7:59 PM
@jamess if you're good with JS, then try the online CoffeeScript compiler: coffeescript.org/#try:require%20'foo';
 
!!s/[*$#@%]*/smurf/
 
@Luggage smurfjamess if you're good with JS, then try the online CoffeeScript compiler: coffeescript.org/…; (source)
 
damn :(
 
@FilipDupanović, that would help if the original docs (and therefore code samples) were in js
 
@jamesson granted, it won't get you far with all of CS' syntax because it's compiles to silly JS...
 
8:00 PM
censoring your own speech is silly everywhere, IMO. you wanna express something potentially abusive, but don't have the confidence to put it in clear words. so rather not use those potentially abusive words in any form. that's my thinking, though
 
@AwalGarg I dont know maybe y'all have some dumbass autoban script here
 
fair enough. thanks for the compliments :)
 
@jamesson are you using PDF kit in some build scripts in Node.js or are you running it in the browser?
 
@FilipDupanović node
 
If I ever write a dumbass autoban script, I'd make sure it autobans self-censored speech too
 
8:03 PM
if it's just build scripts, then you might get away with throwing in the CS compiler into your dependencies and following the docs closely if they clearly outline ALMOST all the use cases you need
actually, there's not much code in the docs
what example are you stuck with? I can transliterate it to JS
 
@FilipDupanović yes I think that is the best option, I am on pdfkit.org first example
@FilipDupanović line 39
 
.underline(100, 100, 160, 27, {color: "#0000FF"})
 
yea, says its missing parens or something
 
whoops, last line is messed up hastebin.com/xicokajuve.js
@jamesson try now, because L38 used CS-specific object literal syntax
 
yea now it complains about "fs.js:549
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^

Error: ENOENT: no such file or directory, open 'E:\port\node_js\fonts\PalatinoBo
ld.ttf'"
 
8:16 PM
huh? that is so strange
 
i think it just wants the file. let me try to give it
 
The cow(female) is attacking a horse.
 
Can i ask a quick question?
 
too slow
 
Do web servers usually have static or dynamic ip addreses
 
8:23 PM
@William why the _fuck would you do that to me in a public lab?!?!
 
I presume static
 
@Mr_Tree yes
 
oh sweet jesus
@AwalGarg excellent
 
Thank you
 
@FilipDupanović yes, I was correct it couldnt find the font
 
8:24 PM
@jamesson didn't think it was that bad. no cussing. From a childs point of view they are just playing pig back riding.
 
@William not so much the image as my entirely inappropriate laughter =P
 
@William usually you'd expect to get fertile offspring when you see mounting in nature
what to make of that there?
 
Yes that it why I was laughing. I'm not aware of any female species that mount other animals
It probably exists though
Both cross species and a female mounting a horse
 
!!wiki pseudo-penis
 
A pseudo-penis is any structure found on an animal that, while superficially appearing to be a penis, is derived from a different developmental path. == MammalsEdit == In mammals, all intact developmentally typical males have a penis, but the clitoris in the females of the following species is sufficiently enlarged that it is usually termed a pseudo-penis: spotted hyena, squirrel monkey, lemur, juvenile fossa and binturong. The enlarged clitoris in the fossa is supported by an os clitoridis, a bone similar to the os penis found in most mammals. However, the fossa's os clitoridis and pseudo-penis...
 
8:30 PM
@William I can't remember... do O'Reilly books ever leave a statement about the cover?
rofl I didn't see heading
 
@FilipDupanović your google is as good as mine. The layout of the real covers are the same but they are just summarizing the gist of the book in this example covers.oreilly.com/images/9781565924260/cat.gif
 
anyone install coffeescript on node? I try to run it and it says its undefined
 
if you're running CS scripts, then npm install -g coffee-script and then run coffee script.coffee
 
@FilipDupanović, I tried to install but it failed with error so I just downloaded tar
 
wait, you can't do that for all NPM repos; always use npm to fetch the package, unless you're developing it
 
8:46 PM
@FilipDupanović, installed fine but wont launch with node coffee, oddly the batch file it makes runs fine and gives coffee prompt
 
the installed command is coffee after you install the package globally with npm -g coffee-script
if everything went alright, this should give you some sensible output: coffee --version
 
@FilipDupanović, yea thats fine ty
 
Why do you install globally?
So it can be used by other applications?
Sorry for the stupid question. I am new and trying to learn.
 
install what globally?
 
The npm module
 
8:54 PM
@jamesson that's good, but the NPM package repositories you clone have sources that are distributed for development; be sure to run npm install at least, that works on most repositories
 
@FilipDupanović:? Isnt that what I just did?
 
@Mr_Tree some NPM packages export executables docs.npmjs.com/files/package.json#bin
these prefer to be installed globally, by passing the [-g|--global] flag to npm-install; your environment is usually configured to have the global node_modules/.bin on PATH
 
Is there any way to run 3 processes at the same time in node? like a background worker or something?
Like, have foo.js, bar.js, and red.js, and run them all at the same time?
 
running a process inside a process doesn't make much sense here. you probably want threading. if you want to fork the running process, then the cluster module will help.
 
@FilipDupanović, ty for all the help
 
9:06 PM
cluster? basically i have three chat bots, at do e same thing, so i have one script scanning the chat, that posts messages to the chat bots. the chat bots can do thhings at the same time.
kinda hard to explain.
 
@jamesson if you managed to get to the CoffeeScript prompt, yeah looks like everything is alright (y)
 
so you want threading. threading has a weird state in node...
 
oh.. okay i'm reading an aricle about it rn..
 
yea its fine. Now I get to go through the pdfkit docs bit by bit and convert back to JS. Exciting.
 
but some require that you do, say, npm prepublish or npm run build or make build (it's pretty much FFA) before you get modules that you can require from outside the package
you're going to have a problem with [1..10], because there is no type or syntax support for ranges in JS
 
9:10 PM
@AwalGarg I see.. thanks!
@AwalGarg so you cant make the worker code in a separate file?
 
@thepiercingarrow if you need a process manager npmjs.com/package/pm2
 
@thepiercingarrow you can, but they won't run parallely. node is single threaded. their are node-gyp modules to provide multithreading in node, though/
 
@FilipDupanović, yes thats pretty sad but cant I just compile with coffee shell or command-line?
 
k thanks
 
9:15 PM
@JanDvorak if I was too lazy to type an apostrophe do you really think I could muster the energy to read webcomics? Ive been up since 4:15 am
4
 
ouch, you should take a break
 
@jamesson So, you're too lazy to write and you expectus to tnot be too lasy to read?
 
Dvorak.. like the keyboard layout?
!!wiki Dvorak
 
hahaha
 
?? why does robot not work.
 
9:16 PM
good one @thepiercingarrow
 
can someone plz do !!unban thepiercingarrow ?
 
no.
 
@JanDvorak that hurt way more than the omitted apostrophes xD
 
:)
!!unban thepiercingarrow
 
no.jpg
 
Please? ^_^
Caprica Six is mean >:(
 
no cookie for juu
 
:(
no.jpg
 
wow.. it worked
!!wiki Dvorak
 
9:19 PM
@Zirak ^ this shouldn't have worked
(also, your CDN seems to be dead)
 
happy.jpg
no.jpg
 
5 RP your ban is going to get refreshed
 
huh?
RP?
 
I bet 5 rep your going to get banned again xD
 
9:23 PM
I wont
You mean room or bot?
 
Hello all . . . is it safe to ask a Javascript refactoring question here
 
@KevinOrin Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
thanks
I have a DNN site with boxes/div that have a learn more link. I would like to use Javascript to find the first link in the div and wrap the entire div with that href. How can I refactor this code so it does this?: jsfiddle.net
 
1) That's not refactoring.
2) Your link is wrong.
 
how so...this code actually works on the live site (wilshire.priworks.com/analytics) - i just need to revise the code, so I can then use JS to disable that code when logged into the admin. Because in DNN admin you need to click on the box to edit it...but the code as is causes issues
 
9:36 PM
Sounds like reimplementing to me
 
ok - how do I reimplement
 
sounds like you need to write some code
 
I have a node loop that occasionally pushes actions to a queue. How do I set a function to run everyone time something eneters the queue, but every run of the function has to be spaced ar least 15 seconds apart?
 
is there a function that continues down the script, but executes another function after some time, say, 15 seconds after the first function was called?
@KevinOrin it goes off the page for me
 
what goes off the page @thepiercingarrow
 
The text that shows up after you click learn more
All I see is "such page"
 
@thepiercingarrow naive {queue: [], add(action) { this.queue.push(action), Date.now() % 15e3 === 0 && this.every(); }, every() { console.log('STOJ'); }}
 
10:05 PM
naive?
 
this would only work from a infinite loop; it's just to give you an idea
 
but if its not the correct time, then it wont work..
maybe i didnt explain enough my question. i am making a chat bot on a site that restricts posts to once every 15 sec. I am pushing posts to a queue, and I want a function to run once it is pushed and it has been 15 sec since last post. so if i push 3 things to the queue, for example, the bot will finish after 30 seconds
 
@Filip Dupanović Thank you for your explanation
 
in a talk from a guy who writes the css specs, he said that IDs are always a bad idea, and classes should be the only selectors ( with :hover :checked :before and :after ), just making people in the room laugh as if it was obvious. What am I missing?
well, ID selectors, that is
and JS should usually only need to target using classes
 
IDs add an extra contract
The CSS specificity rules aren't done the best regarding IDs though.
 
10:21 PM
 
@thepiercingarrow the naive continuous version self.setTimeout(() => actions.length && actions.pop()()), 15e3)
 
is there something i should look up? i cant fine anything under 'naive continuous'..
oh.. i see what you mean!
thanks!
 
this doesn't care that you want to immediately run the first action added; it also doesn't care that it maybe wants to do that too, on the next batch, if the queue drained
you may need to add some conditional checks and more state
I am also secretly hinting that it's best if you can write your tasks so that they're continuous
 
continuous?
 
(it spares you the hellos and goodbyes)
 
10:28 PM
What does it mean to write my tasks so they are continuous
 
10:39 PM
avoid doing anything more than setTimeout(every, TICK) or n % THRESHOLD
because next thing you're adding state, then you're adding conditional checks... then you add a dozen tasks down the line... unibrow sad face |:(
 
Some valid points right there...
 
true, though I you carefully lump the current studies together, smarter people live happier lives
 
10:54 PM
Yeah Ik but c'mon, I was going to mail a -50 batch to you already, but why you have to have doubts...
 
@copy Which one? I've had a lot to cover recently. I've decided to cut the online crap and just move the engine I made in the past to use for a new story idea. - Also I'm not on here much anymore. My fault, but things happen.
 
Morgogengiñg
 
god morgon
 
11:45 PM
I feel dizzy S:
Been staring at my computer screen for 11 hours... and am ill, hmmm
 
@Krush you don't get paid enough
 
Does anyone know how I can figure out why react is updating my dom elements even tough the markup didn't change ?
 
@Shmiddty paid? cough what?
 
I thought this whole virtual dom thing was supposed to prevent that.
 
!!tell WillemD'Haeseleer google debugging react
 
@WillemD'Haeseleer the element is represented by the component's state, props and context; if any of these change, or if an update is forced, the DOM will be updated
 
I am calling forceUpdate without changing any of the props ( or state ), yet the whole dom element get's replaced by a new one. It says in the docs that even when calling forceUpdate, react will only update the dom if the markup changes, but the markup is identical. I'm trying to figure out how I can make react print the diff that's it thinks it's seeing ( and as such re render the whole thing in the dom )
 

« first day (2023 days earlier)      last day (2911 days later) »