« first day (1845 days earlier)      last day (3121 days later) » 

crl
12:00 AM
@Mosho help please, for this, why does it says cannot read name of undefined since it's not undefined in console.. maybe I'm getting tired
 
why me lol
 
crl
because
 
are you implying I'm the foremost authority on JS in this room?
 
crl
react at least
 
finally I have made something of myself
 
12:02 AM
Congratulations for your greatest accomplishment!
 
@BenFortune the expansion of D3 is awesome
 
crl
@m59 could you have a quick look, I'm struggling for some time jsbin.com/covemi/edit?html,js, the error may be obvious but don't get it
 
@crl it's undefined
I mean, I see undefined in the console
 
crl
I saw that too, thanks, but nvm, maybe I found it, but the error msg was really far away
 
use an actual editor with an actual debugger
anyway, what are you making?
 
crl
12:08 AM
a tree
 
aight
 
crl
same thing than this angular one
 
@Neoares Yeah, played it before. My WD is still absolutely OP as balls
 
crl
@Mosho how can I create a component dynamically, React.createElement(Ul, { children: this.props.data.children }) where Ul would be this.props.data.template
eval :)?
will need an object {Ul: Ul, ..}, no choice
 
12:31 AM
Anyone know how to do this?
 
m59
12:46 AM
@crl sup?
I'm not sure what you need.
 
1:07 AM
question about semantic versioning
if I increment the minor field, do I reset the patch to 0?
or does each field get incremented completely separately forever?
nvm, that wouldn't make any sense
 
@Cereal there are a few unknowns. The car is going at 7 m/s then the 34 kw or engine but how much was the current power ? By what factor power reduced ? And How does that translate to the new slower speed ?
Also the hill is 40 m high but what is the slant ?
 
@bhantol Information in that screenshot is all the information provided
 
I can't see figure 1
 
figure 1!
 
Kinetic energy will be 0.5 * 1300 * sqr(7)
This is equal to the other half
4550 was the initial KE
Half of it will be dissipated by going up hill so we have 2275 used for going up
2275 is exactly the remaining energy that is being used to go uphil
2275 = 1/2 * 1300 * v *v
will give new velocity
But based on the Figure 1 - I can't calculate the distance to go up
 
1:34 AM
I made the design, but @rlemon is gone :(
 
my..calculations are off its not 4550 it should be 31850
4.9 m/s is the new speed
That Hill looks like Parabola
@Cereal you have any thoughts ?
 
@bhantol It's my girlfriend's problem. I sent her your comments on it
"no idea how he got 31850 from 4550"
"whoaa I see it"
"dood we made the same mistake"
 
@rlemon Me need to go, so don't forget to check your email ;)
 
"nope still wrong"
 
31850 = (1/2) mass * square of velocity
mass = 1300 kg
velocity is 7 m/s
31850 = 0.5 * 1300 * 7 * 7
? makes sense
But in order to save gas the engine is not much at work and the problem states that the car produces power which is half of this KE
half of 31850 is 4550
sorry wrong
KE = 15925
15925 = (1/2) * 1300 * newVelocity * newVelocity
newVelocity = 4.94 m/s
Does this make sense so far ?
The next step is to find the length of the half curve whose height is 20 m
i.e.
time = lengthOfCurve / newVelocity;
I am stuck at lengthOfCurve. Does she/he have any ideas of how to find that length ?
 
2:00 AM
she said she got that far
but dunno what o do after
 
Ask her to dig formulas for Parameteric Curves
It will go from 0 to Pi and the Delta T would be 20 (meters)
But I am not entirely sure how to calculate that after
Good luck
I give up
 
she said they didn't do anything with curves
 
I forgot this stuff...been many years...since college
Bye now
 
thanks for your help
 
 
3 hours later…
4:52 AM
wth is "JavaStick" ?
 
 
2 hours later…
7:21 AM
o/
 
o/
 
nein
 
@CSᵠ Referring to this post someone made depicting a stick vs 1000 marines
Someone concluded that stick would always win
so someone changed the room name as a result
 
@Neil that is true, however the room title change went too far
 
7:37 AM
can't beat the javastick
 
programming in JavaStick, where would i even start
how's a "wello horld" program look like?
 
10 'use bello'; 20 print 'wello world'; 30 goto 20;
 
I like it.. lets push for javastick instead of javascript
 
7:55 AM
I better write in avaScriptJay by hand
 
Guys.... Look at the answers of that guy...

https://stackoverflow.com/questions/21819467/php-list-all-html-files-in-folder-with-a-tags/33512620#33512620

https://stackoverflow.com/questions/2418068/php-spl-recursivedirectoryiterator-recursiveiteratoriterator-retrieving-the-full/33512539#33512539

https://stackoverflow.com/questions/27798667/php-list-files-in-a-directory-and-remove-extention/33512489#33512489

https://stackoverflow.com/questions/3738270/listing-all-images-in-a-directory-using-php/33512410#33512410
 
@DenysSéguret this is embarrassing.... WTF is he doing ?
Never seen such thing....
The amount of work in order for this to work......
 
@RoyiNamir I don't know. But it looks like he really really likes his own face..
 
:-)
 
I can't clean all of them. I wonder whether a flag is in order here
@ThiefMaster opinion about that ?
 
8:03 AM
@DenysSéguret Yeah flag is fine, I see someone else has flagged
 
I saw it on reddit, so there might be some noise about it
The link he gives as web site in his profile isn't better ^^
 
must be a cry for help
to much picture
 
@CSᵠ Hu ?
 
noclue
 
Definitely going to set my background to a picture of his face
 
8:11 AM
A clue from his "web site": "I'm looking for a job"
 
.herokuapp.com
I mean, hosting on heroku is fine, but at least set up DNS...
 
@crl you can just do that if you want
though I doubt I would do it like that
 
Guys, let vs var in a block?
I mean we have 3 types of variables. I hardly see people using let
 
8:26 AM
Three types of variables?
 
@Sheepy I mean we have var, let and const
I dont see anyone using let though when creating function only for that block
or const for constants
 
you should always use let/const
const has useful "compile" time checks and let/const is just overall better and safer than var
 
@Mosho there is the point
now im struggling to decide if I should stay old school and use vars for everything for const and let
 
Edge is hiding let behind a flag, Firefox is hiding let behing a script type, and Safari (plus all iOS browsers I assume) does not support let at all.
 
the latter two are es6
so support is not so good
 
8:30 AM
@Sheepy do you even babel
 
Im already bothered with the fact that we cant even use the lamda arrow function
@Mosho but installing babel for the sake of 1 or 2 things?
 
@Mosho I do, but obviously Asperger don't, and it would be nice if you introduce it to him/her.
 
@Asperger I think you get a discount if you use it for just 1 or 2 things
70% off or something
@Sheepy not so obviously it would seem :P
 
is onchange an event listener?
 
@刘哲诚 Welcome to the JavaScript chat! Please review the room pseudo-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.
 
8:35 AM
yes
@刘哲诚 yes it is
 
followup question: what does it mean to set and event listener for an event?
 
@Asperger You will use more when you babel. Arrow functions, new object syntax, template string, Set and Map, default parameter, these are the easier ones.
 
addEventListener("change", .....);
@Sheepy ya but I mean the browser/computer has to process babel first
slows down processing time
 
I'd rather say onchange is an event handler property.
 
is there a best practice for using one module in node and one in the browser with the same name? each bundler seems to have a different approach
 
8:37 AM
@Sheepy you are right
 
@Asperger thanks. this is the full question for better context just to make sure I'm asking it right..
Show three different ways to set the event listener for the “onchange” event of a slider element in JavaScript.
 
@刘哲诚 do it via html, eventListener or onchange = fn() way
 
in your example, slider specified in html code without the eventlistener, eventlistener is added to the slider inside js code?
@Asperger that means its safe to say its not asking for onchange vs. oninput?
 
@Asperger We run babel before deployment, perhaps even during development. The browser just sees plain old es5.
 
@刘哲诚 because the slider wont work without it. Onchange simply changes something visually the dom when some value has changed.
@Sheepy so its not like Modernizr where we add a script to our html then
when do you think ES6 will be ready or supported by browsers?
 
8:42 AM
like onchange changes the position of the slider and if there's a change in value, the DOM changes as well?
 
@刘哲诚 Lets say you have two inputs that add numbers together and an output field. As soon as you type something in, the onchange reacts and displays the output
If you wouldnt have had the onchange property inside the eventListener then you wouldnt see the change.
For sliders I dont see how onchange fits. Usually you use click, hover, drag, touch events
 
wait but didn't you say onchange is an eventlistener? does that mean you have an eventlistener inside an eventlistener?
 
No, its a property of an eventListener
 
yeaaa
 
but ya
 
8:45 AM
wew
 
@Asperger I can't say. All browser vendors are on the ship - except Apple. Apple goes as far as banning advanced JS engines on iOS.
 
crl
@Mosho thanks, question: how can I pass a state in jsx to a child component? via the props also? (and hello, just woke up)
 
@Sheepy for real? What is apple thinking?
 
Apple wants the web to die
 
@crl <this.props.whatever />
 
8:47 AM
All hail the appstore
 
but I don't recommend it
 
I mean for real.
 
@Asp
zzz
 
So they are banning js engines that are advanced. So no ES6?
 
I would pass a type identifier, and let the component import the components and pick one accordingly
 
crl
8:47 AM
type identifier?
 
a string
whatever
 
crl
propTypes?
ah ok, thanks
 
@Sheepy I thought that changed recently.
 
@Asperger I see that they (w3schools--probs not the best place to cite stuff) list it(onchange) as a form event
 
@Asperger For real. All browsers on iOS must use the "mature" WebKit, both HTML and JS. And when Nitro were out, only Safari could use it to boost JS speed.
 
8:49 AM
anyway, if I were to specify three different ways, would this qualify?
<element onchange="">
 
@刘哲诚 ya
 
object.onchange=funtion(){};
object.addEventListener("change",script);
 
@RoelvanUden I heard that browsers can now use Nitro. But WebKit Core?
 
@刘哲诚 indeed. If w3schools says so. I recommend check out the mozilla documentation
 
that's what my teacher says too... (not the same one )
 
8:50 AM
<element onchange="myFunction()">
object.onchange = myFunction;
object.addEventListener("change", myFunction);
 
@刘哲诚 This is absolutely right. I prefer to keep my html clean from any scripts though
 
To be precise.
 
sorry >.<
 
So all 3 are right
 
Right? No. But all 3 work.
 
8:50 AM
My favorite one is 2 and 3
 
Use addEventListener
 
yea... this is a Cal State so our teachers are developing websites based on hacks
 
It's not only ES6 that iOS is hurting. HTML5 suffers in general, on the platform that boosted it into orbit. No WebRTC, for example.
 
addEventListener is the only correct way
 
yo I have a random question to ask, is Thomas Powell famous in this circle?
 
8:51 AM
@刘哲诚 I hate the first method
@RoelvanUden thats the only one I use as addEventListener simply is the big standard
 
@Sheepy True. Safari/iOS are terrible because of this. At least Android can get Crosswalk and such, no such thing yet for iOS
 
well, it's worth 2.5pts so I'm leaving that in there
 
addEventListener is also the only one that allows multiple listeners for the same event on the same element. (afaik)
 
but I would take your advice and not ever use it if I had to implement it
 
Oh ya just use addEventListener if you can
 
8:53 AM
does that mean if I have <slider oninput onchange> that's a no no and I would have to do it through addEventListener?
 
oh ya please. Keeps things clean.
Why do you have an onchange on your slider anyways?
 
want to solve a math problem while you're at it?
well
idk, I wanted to use ondrag for the assignment where a slider was implemented but I forgot about ondrag and just used onchange instead. My teacher used onchange in his demo code
that's why I ended up using onchange. But I have no idea why would he ask us to add the event listener onchange onto a slider in our assignment. Maybe he doesn't know better or it's just for illustrative purposes and he chose a random eventlistener and a random form input
also, this is actually a WebGL class so we don't focus much on how to html/js properly
hope that answers it
 
@刘哲诚 oh man
 
did I not follow etiquette
 
Sometimes teachers have no idea. If you want to drag something use ondrag
Use onChange for other stuff where you really need it
 
8:58 AM
oh yeah, he mentioned that in class when I asked him. Now that I think of it, it's likely he's just using a familiar example since the textbook example uses it
you wanna see the project where I used onchange for slider?
 
@刘哲诚 burn your textbook, they are outdated
I learn online :)
 
it says copyright 2015
._.
 
Im currently in my work (in an apprenticeship and I go to a professional school for programming) so I dont have much time but ya sure link it
 
Copyright 2015 doesn't mean it's written in 2015
 
9:00 AM
Ah!!!
Now onchange makes sense.
 
orly
 
Hi guys, is it possible to get all events bind to DOM by another library and remove them?
 
please enlighten me
 
@TrungDQ Remove all, yes, clone and replace the dom node. By a specific library, no, unless the library provides a way.
 
@刘哲诚 this looks good. Did you code this?
 
9:03 AM
the logic behind the cube: yes
boilerplate: no
 
I see you use TweenMax, great library. Im in the process of creating my own animation library :D
Im nearly done with a jquery alternative
 
@Sheepy at the end, every library uses .addEventListener to bind event to DOM, right? So we just need to somehow find the method reference, and then call .removeEventListener, will that work?
 
Cube logic is awesome
 
I have no idea what TweenMax is. omg that's 800 lines of garbage, how can you understand what it's doing at a glance
 
Just checked the source code :D
Tweenmax is the best library for animations
 
crl
9:04 AM
hypercubes logic is better
 
yea but still, you glanced at the source and you got what its doing
 
WebGL is awesome
 
my classmate says its on its way out since HTML5 will implement most of this stuff next year natively
 
@TrungDQ Assuming you can find the functions (you can't), you still don't know where the function comes from - it may be an anonymous function or a dynamically created top level function.
 
@刘哲诚 ya, the guys here in chat turned me insane and constantly hurt my feeling so it drove me mad in improving my programming skills in CSS, HTML, JS, and PHP
pretty harsh critics
@刘哲诚 support is pretty good for WebGL and canvas.
 
9:07 AM
jQuery can removes its own handlers, because it has a whole event subsystem that simulate unsupported events and that also keeps track of all handlers that go through it.
But even it cannot, say, remove events from a specific plugin unless the plugin tells it which functions to remove.
 
@Sheepy I see Chrome DevTools can list out all the Event Listeners of a specific node (very details, it has event types and handler references), can we do that with JavaScript?
 
omg is that what they do to newbs or just you cuz you're pretty close together
 
@TrungDQ Can't say for Chrome. In Firefox it is "yes, if you write a browser extension".
 
So it's a chrome thing, the Event Listeners list, we can't have that list just by using JavaScript, right?
 
@刘哲诚 well because I started 3 months ago with programming, had no prior experience. Those guys drove me mad in such an extent that I even refuse to use libraries and code everything from scratch
 
9:10 AM
^ One hell of a good way to learn
 
Ya they do that to nooblets
This place is like hell
 
C'mon. Admit it. You love it here.
 
wew
 
Well ya. I newly learned about the lamda arrow function from @crl here
 
@Sheepy thank you for your information.
 
9:12 AM
what is an lambda arrow function
 
@TrungDQ No. You can't list event handlers with standard DOM.
 
prior to that I didnt know what => meant and confused it with the equals and more than
 
are you going to a bootcamp right now
 
@Sheepy yeah, I just have a quick search for that. Thank you.
 
@刘哲诚 arrow function is cool.
 
crl
9:12 AM
!!> (o=>o+0)(1)
 
@crl 1
 
not sure if ASCII art or code
 
basically instead of doing:
 
@Asperger Of course. Welcome to JavaStick!
 
9:13 AM
x = function(p) {console.log(p)}
 
shift+enter is ur buddy
O_O
 
you can do x = p=> console.log(p)
 
x = {parameter => console.log(parameter)}; ?
ah I see
 
ya simpler
 
btw, why did you say using onchange makes sense?
 
9:16 AM
!!> var o; (boobies => (boobies => boobies ))( o )( o )
 
@Neil "undefined"
 
@刘哲诚 刘哲 哲诚 诚
 
how large a value before it becomes practical?
@Neoares sup
 
sup :D
I speak asian
2
 
ok
all of it?
 
9:18 AM
I guess
 
or just mandarin
 
!!>Number.MAX_VALUE
 
@CSᵠ That didn't make much sense. Use the !!/help command to learn more.
@CSᵠ 1.7976931348623157e+308
 
I was joking :d
 
@刘哲诚 ^^^
 
9:20 AM
@Asperger what happened to all your messages
also, it's 1:20 in the morning (4:20 EST) how are you still working at this hour???
 
crl
beat me if I'm doing bad things, hmm it just work like this output.jsbin.com/covemi
 
you can still use jsx btw
 
crl
stupid jsbin, but I'll need to code on my local computer a day
@Mosho for tat var list=React.createElement(templates[this.state.template||'ul'], { children: this.state.children });?
 
yeah
 
crl
would be curious how :)
<{templates[this.state.template||'ul']}> ? would be great
 
9:25 AM
@crl by the way, you are getting 200 + reputation
 
crl
oh, cool, will be less a noob :)
 
set a bounty but you are getting the points since you helped me a lot
 
crl
that's nice of you, don't feel obligated though, I liked to do that thing with you
 
I did that in order to get some more information but hell I learned a lot (delta, arrow function, collision, etc)
ya man, knowledge is gold so im glad if people help me undertand.
 
@crl <templates[this.state.template||'ul'] />
 
crl
9:38 AM
ok, thanks, is it bad to do a setState in render()? guess so, yeah totally
 
9:50 AM
@Asperger thanks again. Going to bed now
ciao
 
@刘哲诚 no problem
@Mosho babel is not free right?
 

« first day (1845 days earlier)      last day (3121 days later) »