« first day (1568 days earlier)      last day (3381 days later) » 
00:00 - 16:0016:00 - 00:00

4:00 PM
@NickDugger sol will you be able to help?
 
user1596138
@rlemon @KendallFrey @canadians Tim Horton's finally made it this far south! :D
 
4:15 PM
yes, cancer tends to spread
 
@Jhawins \o/
@Mosho So do your mom's legs
 
not always, she has a thing for canadian hillbillies
 
^ Explain that
 
Hi all. my first time here. Didn't there is chat here in SO. How is everyone :)
 
@Wayne 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.
 
4:30 PM
can anyone help?im using this theme view-source:preview.w3layouts.com/demos/… the issue i'm having is when page loads it takes forever to load so i'm assuming the issue is causes by having too many images so im trying to fix for it and the solution i came up with is when page open it will only display 3 images and when user scrolls down the user will see the other 3 images similar concept to the way its doing right now but after every 3 image
 
@darkyen00 polymer molecules are like instead of H-O-H for water or H-O-O-H for peroxide, you can have H-O-O-O-...-O-H as long as you want.
It doesn't happen for everything, and certainly not for water
 
@KendallFrey I know what polymer is, I wonder for all those images of polymers on wikipedia and linked here there everywhere
how the hecck did polymer-project.org logo showed up
 
here's my question. I have this file input. <input type=file accesskey="0" name="main-image" id="main-image" onchange="GetFilename()">it works OK when I load new filename. But if I load same file name. Let say I updated the image and want to see the updated image, it doesnt load because i think there is "no changed" happened. How can I make it so that everytime I load a file, even if it is the same file, getfilename() should be trigger
sorry for my english by the way.
 
@Wayne fix your grammer, : I didn't there is chat here
should be: I didn't know there was chat here.\
 
@wyatt 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.
 
4:35 PM
I'm not new here. . .
 
@wyatt, yup. sorry for that.
 
@wyatt When was the last time you were in this chat room?
 
Wouldn't have said anything if it wasn't the first thing I read
oh I'm in JavaScript
nvm then
 
I notice your first chat message:
in HTML / CSS / WebDesign, 2 days ago, by wyatt
Does anyone know a nice CSS library for putting color-coded javascript on an html page?
That's what I'm working on right now
 
xD
 
4:37 PM
using highlight.js
 
I tried to make one, but there was some huge error in looping through the elements with pure js
I don't like to use Jquery for things other peple use.
I think I'm gonna make a complete rewrite
 
5:19 PM
Mornin
Spent all day studying DB, fml
 
Databases?
 
Yeah, I'm taking a course in databases in the university since I did not take one until this semester and I figured I didn't understand how joins work.
Now I do, and just find it uninteresting :D
 
Oh, ready for a question on joins?
 
Sure thing
Also, all my knowledge is theoretical and likely outdated, so I'm probably going to be wrong :D
At least I know when indices maxe sense
 
Is it possible to join more than two tables with the same key, but the key is unique (that is, a value of x appears either in table A or B)
I want to write SELECT a JOIN b USING(k1) JOIN c USING(k1)
 
5:25 PM
@copy join them on what? Are you just looking for UNION ?
 
No, not UNION
I have two separate queries now, was just wondering if the above works
 
Why wouldn't it?
You can join multiple tables on the same key
 
@copy I think it will depend on the RDBMS, but it's likely that you wont be able to use USING statement
you will have to wire them directly with ON a.k1 = b.k1
 
Oh, I see
 
does anyone know how to use wookmark.js??
 
5:32 PM
SELECT first.a FROM
(SELECT 1 as a) as first JOIN
(SELECT 1 as a) as second USING(a) JOIN
(SELECT 1 as a) as third USING(a)
@copy runs just fine kripken.github.io/sql.js/GUI
Wait, why did I USING an uppercase A and it worked -_-?
Oh, stupid question, case insensitive stuff
 
yeah, sql is case insensitive
 
But an INNER JOIN only selects rows in which both rows are non-null
 
@FlorianMargaine naa, it depends on the DBMS, only the language is always case insensitive not the column names.
 
ah, true
my bad
 
@copy your example used JOIN so that's what I used.
Not only is it possible to join multiple tables in the same attributes, it's also optimized (at least in theory)
 
5:36 PM
JOIN is INNER JOIN by default iirc...
 
@BenjaminGruenbaum In my case, if the second table has 1, the third doesn't have it
It's probably not a case for INNER JOIN
 
@copy if the values are mutually exclusive and you're JOINing on them then the result would be empty.
What is the query trying to even get by joining those two on a mutually exclusive valued attribute?
 
The second and third table are pretty similar
Now I'm pretty sure doing two separate queries is the way to go
 
Sounds like it, a join on mutually exclusive values never makes sense
 
6:00 PM
anyone knows what event is being triggered if an input type=file was loaded by the same file that was already loaded on the input field?
nvm, I got it.
 
user4202350
6:21 PM
ᴵ ᶜᵃᶰ ˢᵉᵉ ᵐʸ ʰᵒᵘˢᵉ ᶠʳᵒᵐ ʰᵉʳᵉ﹗
 
can anyone help me inflinite scroll?
 
Pressing the scroll wheel helps
 
inflinite scroll
similar to load more as default only 3 will show up as you scroll 3 more will be added on scroll event
@copy can you help?
 
No, gotta keep my sanity
 
@copy also the end button is of great assistance in these dangerous scenarios
 
6:35 PM
Yes, but that's only for pros who use the keyboard a lot
 
oh right, my bad
 
Why does wordpress load all scripts in the head section? It powers 20% of the internet you'd expect it to have good defaults.
@underscore thanks for that, I clearly didn't see your message the last 3 times because I'm retarded and/or don't know how to use the chat - pinging me multiple times really helps. You should do it more.
 
> Why does wordpress
 
@BenjaminGruenbaum i need your help on this to go
 
6:38 PM
@copy it's not like it's an abandoned project and it does power a considerable portion of the internet.
 
On the other hand, it's wordpress
 
@underscore oh! You need my help! That changes everything, please go on.
@copy yeah, it's still funny to poke at it for doing retarded stuff.
 
OK. I'm partially in wonder here. Is this as bad an answer as I've been given feedback on? My thought is: Q is tagged chrome-extension, but also JavaScript. Thus I've addressed some of the faults in the core of the way OP do it wrong. Surely it can be done better etc. in regards to "The perfect extension" - but, isn't it as important to explain basic faults in the JS?
-2
A: Chrome Extension not running scripts on document start and not printing content

user13500 When you say window.open("blank.html"); you open a new tab where the URL is your extension. When you want to write to that window you have to say something like: var win = window.open("blank.html"); win.document.write('some HTML'); As google.com uses redirect to local domain you have to add nc...

 
I'm gonna create an alert module which is capable of displaying errors, warnings etc. I was think to use fixed element that prepend to the body tag ? .I'm using run block to prepend that . does it making any silly ? @BenjaminGruenbaum
 
When it comes to the "You can not XHR google.com" it is plain wrong. I have done it several times before, and for the sake of being thorough I did a test before posting answer.
 
6:43 PM
@user13500 reading
 
hmmm?
 
@user13500 not the issue, but you really don't need to do that silly IE6 .onreadystatechange shenanigans in modern AJAX. You can just .onload
 
It is not a good answer I guess, but Is it bad as I should delete.
@BenjaminGruenbaum: yes, that is why I added pt. 5
 
@user13500 let me read it, looks good to me so far
@user13500 no - I mean that when you do:
xhr.onreadystatechange = function(e){
    if(xhr.readyState === 4 && xhr.status === 200){
        // do stuff
    }
};
You really just want to do:
xhr.onload = function(){
    // do stuff
};
But better, use addEventListener, or even better write a short helper method promisifying it.
 
Ah. Thanks. Good.
 
6:46 PM
The answers looks fine to me, have a +1.
I understand why Xan is worried though, OP really has no idea what he's talking about.
 
Thank you very much. I was only wondering if I should delete it or not. As in it is a miss-guiding answer in some way.
And yes, OP seems to be on a copy+paste raid.
 
Xan is sort of being a douche there - don't worry about it.
Also his comment about google.com "refusing to service the request" is absolute FUD
In general - it's best to spend your time answering questions where the question itself is good - those are usually more rewarding too as they actually help a lot of people.
 
Yes. Indeed. But I have also experienced low quality question OP's raising to better both questions and code after some guidance. Not that this answer is the best in pushing that way. There was a bit to much to pick on.
 
Yeah, there are like 3 fundamental things that OP doesn't know there.
 
6:53 PM
@underscore ask your question on codereview.stackexchange or stackoverflow and I'll consider answering it.
 
Anyway, my main concern was if I was on a bad track with the answer and should delete it – but (to full of myself) to see it :P
 
i'm now angular addicted
@BenjaminGruenbaum
 
Angular is... ok-ish.
@user13500 your answer is just fine, people just got upset you answered a bad question.
 
OK. Yes, I see that one.
 
7:21 PM
jsfiddle.net/0jz8nhvt/2 how can i add infinite scroll to that?
 
Hey guys, is anyone with a somewhat strong machine willing to help me out test something?
There's this codecombat game, and I need to solve a certain level, but the provided method for drawing rectangles won't work, although it's stupid simple: addRect(x, y, width, height). Both my computers have a hard time even loading this game...have to refresh multiple times in any browser, so I think it might be a hardware thing...anyway if anyone's willing to help let me know to share the link here.
 
@Freelancer i will do it on one condition though
 
What would it be?
 
i need help as well
 
sure - with your fiddle above?
 
7:34 PM
i need help on adding infinite scroll
 
let me look into it now
 
thanks
 
for me it keeps adding new stuff
and the scroll-bar gets narrower accordingly - or did you mean something else?
 
i wana use similar function or method to the one i have for load more but using infinite scroll in example i have numbers from 1-25 repeated
 
will try something now
 
7:41 PM
so after the number 3 if you were to use scroll then next 3 will show up
@Freelancer does that makes sense?
 
I think i got it, will show you some code soon
 
thanks
 
almost done will be ready quickly
 
@Freelancer ping me on Wednesday I'll be at work
I can help you then if you'd like, have lots of fast hardware
 
thanks, will do if it's not solved by then
@Steve adding results works: jsfiddle.net/fj6yw28r/1
need to debug removing results
but please let me know if this is what you wanted, before i proceed
 
8:04 PM
@Freelancer what kinda hardware are we talking here?
 
Nothing big, it's just a javascript game...but my laptop starts losing breath as soon as I load it...and I need a few refreshes before it does
a few months ago it worked normally on this same machine, but the game may have changed since
 
@Freelancer I can give it a try
 
sure, thanks a lot...here's the link codecombat.com/play/level/gridmancer
after it loads go to GAME MENU on top, then CHANGE HERO, then switch language to javascript
click NEXT and PLAY
then START LEVEL, and then delete their example code
then just try this for example:
this.addRect(0, 0, 40, 40);
it should be drawing a rectangle, but on my end it just doesn't
 
delete everything?
 
yes...or you could try to run it...on my end it causes and error or crushes the browser
so yes, basically delete it
 
8:12 PM
on my end it doesn't create a rectangle, but it runs & gets submitted
 
@ItachiUchiha: then it must be problem on their end, thanks for the help
 
np :)
 
@Steve: thank you too...just debugged your code, should be working now
 
running through javascript prntscr.com/5zgk5w works fine
@Freelancer is there anything else you need to test?
 
8:19 PM
no thanks, that's all...btw....fixed another bug, so now here's your final, simpler code and it works
i've made it universal, so you can change the number of results to show and it will work still
 
i was trying to avoid using "load more" function so except for click on it when user scrolls down on the page rest of the stuff will show up in the example i showed numbers so only 3 of them show at each time
 
ouch, now i realize
let me recheck
you want stuff to show up automatially as user scrolls down?
 
so thats why i think infinate scrolls comes handy so user doesn't have to click on load more load more everytime since infinate scroll shows up rest of the content automatically
 
on it now
 
so as default when user goes to the page they will only see first 3 top that's it but they start to scroll then other 3 will start to show up like the way its working in example
 
8:27 PM
@Steve: done, keep scrolling down to see jsfiddle.net/fj6yw28r/5
 
woot, 3k :D let the cv's begin!
 
that optimism and sense of purpose will waer off by the time you hit 12k
 
@Freelancer i just did an update jsfiddle.net/fj6yw28r/6 okay so there are first 3 images and 4th image is different so when user opens the page i just want the user to see the first 3 images and when user starts 2 scroll down then rest of other 3 will show up
 
@tereško it will last forever then! sweet
 
@Steve it's not gonna work like that...if that's what you want: 1. remove all the <li> entries from your html that dont contain an image.... 2. in line 15. of your jQuery is where you put the line that with <li> and and <img> inside of it (this is to replace the current one with random number"
then it will work
 
8:42 PM
so my question now is as default with infinite scroll its not possible to show just the first 3 images and when u scroll the other images will start to show up like the way it works with button?
@Freelancer
 
@Mosho congrats :D
 
@BenjaminGruenbaum can i ask you quick question
 
You just did
 
okay
 
8:53 PM
@BenjaminGruenbaum That didn't make much sense. Maybe you meant: afk
 
so my question is for infinite scroll
 
nobody cares about infinite scroll
 
Surely you jest. Infinite scroll is one of the most advanced topics in JavaScript known only by true ninjas and samurai.
 
it's boring
 
People who tell you they don't care about infinite scroll usually simply lack the mental ability to grasp its depth and will make absurd claims like it being boring. Infinite scroll is fascinating and teaches us a lot about the nature of ourselves.
 
8:55 PM
you sound like Boyd from Justified
 
Is the scroll infinite, or is it our own thirst for knowledge? What is infinity anyway? You must be mentally prepared to unlock these secrets.
@FlorianMargaine didn't watch it, is it any good?
 
meh
it was the only thing on tv
 
im trying to understand it but im having a little conflict understanding the concept so if i have list from 1-10 is it possible to show just the 5 first and when user scrolls down and the other list will start to show 1 by 1 ?
 
it's amazing that with so many channels, there's always so much shit.
and so little good things.
 
@Steve ah! very good! Very few people make the observation! You can in fact do this. (p.s. the 1 by one part was a nice touch)
@FlorianMargaine I generally only watch shows that were recommended to me by friends and/or internet sites. I don't watch very much TV - I do go to the movies almost every week though.
 
8:57 PM
@BenjaminGruenbaum my wife and I sit on the sofa watching tv at nights
 
@FlorianMargaine my wife and I usually do other stuff at nights.
Like coding python for instance :D
 
lol
yeah, at least we can cuddle on the sofa :P
 
We watch tv together sometimes, but it's usually something like game of thrones or another "must watch".
@FlorianMargaine but can you fly?
 
@BenjaminGruenbaum will you help me troubleshoot someone was trying to help me earlier but no conclusion yet here is fiddle jsfiddle.net/fj6yw28r/6
 
@BenjaminGruenbaum if "sending to heaven" counts as flying...
 
9:00 PM
@Steve I will help you but you must refer to me as his majesty duke of the JavaScript room and you must swear an oath to protect me against heathens in this room. Is that understood?
 
@BenjaminGruenbaum how do i do that?
 
anyone want to help me again today with modal form handeling?
 
@Steve first of all, instead of tagging me you refer to me as "his majesty duke of the JavaScript room". Don't forget the oath too.
 
it refuses to handle the data grab: jsfiddle.net/36tuu41o
 
@FlorianMargaine haha :)
 
9:02 PM
sorry
 
@eyeLoveFiddle did you try reasoning with it?
 
or should i ask at a hackathon?
 
@eyeLoveFiddle why are you mixing jQuery with native XHR?
 
i have, but code can be very stubborn if it knows you want to reason with it
 
his majesty duke of the JavaScript room and you must swear an oath to protect me against heathens in this room
 
9:03 PM
someone wrote it to help me out with an issue i'm having
 
@Steve don't copy paste it, you must write it yourself and mean it. Only then you can unlock the infinity that is scroll.
 
his majesty duke of the JavaScript room and i must swear an oath to protect me against heathens in this room
 
@eyeLoveFiddle well, people here are generally not motivated to help people who have code they do not understand.
@Steve don't "must" swear and oath, make it.
 
i understand the back end, just not the front end
if i could ask, i would
 
@eyeLoveFiddle well, I highly recommend "Eloquent JavaScript" and "JavaScript: The Good Parts"
 
9:05 PM
i tried everything to lift ban-be
 
Well, you can try learning JavaScript :D
This looks like a good way to start codecademy.com/en/tracks/javascript
 
i am using a generic form grabber for the client side so i can worry about all the back end
 
And how is that working out for you so far :P?
 
i have learned how to do some javascript, but wish i had a front end master to help me
 
Mr. lord of the javascript. I'm in difficult situation can you please please help me troubleshoot the issue i'm having. im begging and i swear on the an oath of javascript his majesty duke of javascript please sir
is that betteR?
 
9:07 PM
Well, you can hire people to do that or you can learn it yourself, you don't need a master you just need a basic understanding of how things work?
@Steve much, do you swear to defend me when I put on my robe and wizard hat?
 
once i set it up, i can do all the manipulation on the back end
 
yes will do master
 
@Steve ok, what's your infinite scroll issue?
 
give me: PHP, PLCs, and maritime engineering, i'm the one you should ask, outside of that i'm stuck
 
@eyeLoveFiddle yes, we're all well aware of how front end and backend work. The point I'm making is that in just 10 hours you could be an ok'ish JavaScript developer with enough understanding to solve these things much faster yourself - you'll gain a lot of backend perspective this way too.
maritime engineering is fun, I used to do some of that at some point 6 years ago :D
 
9:10 PM
i have taken a javascript class about 9 years ago
 
JavaScript classes 9 years ago were horrible, no one understood the language very well back then.
Things have changed a lot since, it's definitely worth learning and knowing it will pay off super fast.
 
is a jquery class the same as a javascript class was?
i went to a small private school where you can't audit all the classes because they're offered once every other year
 
@eyeLoveFiddle jQuery is just a DOM manipulation library written in JavaScript - it deals with moving elements the document (how the HTML page is represented as a tree in your browser) around and it provides nice shims for things like ajax requests. It's mostly redundant in newer browsers.
You don't need to be particularly smart to learn JS, or have a strong programming background (which you do) - you just need to do that 10 hour course I linked to in codeacademy (if it's free, if it's not I'll send you a free one) and then read a 200 page short book (JavaScript: The Good Parts).
If you do those two things you'll likely be better than 50% of JS developers. Then you can read something about the DOM like Resig's secrets of a JS ninja which is also kind of ok - it's really just the decision and spending a few hours that's separating your world of frustration from having fun doing these things.
 
would being a prety good jser bring up my use to the federal govt?
 
It would bring up your use to pretty much everything coding related - learning more languages, paradigms and techniques is always helpful as a programmer.
 
9:16 PM
first all i would like to thank you in advance for helping me and the issue i'm having is like i asked you the question earlier like if its possible to show just the 5 first content and as user were to scroll down other content will try to show up so in this example jsfiddle.net/fj6yw28r/6
i have included 6 images and some text so what i'm trying to do is when user goes on page the first 3 images will show up and when user will scroll down using infinite scroll then 3 more images will show up and so on but in the example scroll only works when the content ends and it shows all of the content but i only want 3 at a time
 
hmm i will possibly do it when i get a "reasonable accommodation" under the fed
@steve, what is that?
 
@Steve yes, it is possible.
 
ohh an im trying avoid using load more buttons here is perfect example how it should work jsfiddle.net/fLfbn9ya but like i said earlier im trying to avoid using buttons so thats the reason why i want to add infinite scroll so can you help me with it?
jsfiddle.net/fLfbn9ya/1 i forgot to add images
@eyeLoveFiddle im trying to add infinite scroll similar to load more button concept jsfiddle.net/fLfbn9ya/1 except for clicking on load more i want to include infinite scroll so when user scrolls down rest of the content will show up automatically
 
like the one on okcupid?
 
@Steve - there's like a gazillion plugins for that
 
9:24 PM
i tried using them but they don't show just first 3 they show like more then 3 items
@adeneo
@BenjaminGruenbaum your majesty
 
very good. Like I said, it is indeed possible to make it that way.
 
will you be able to help me?
 
@BenjaminGruenbaum so... a more verbose version of brainfuck?
 
Yeah, basically it's a compile-to-brainfuck language.
 
9:39 PM
were you able to troubleshoot the issue at least? @BenjaminGruenbaum
 
doable in ~8 regexes I guess...
 
@Steve Sorry, I don't respond to pings to that name - please express yourself properly.
@FlorianMargaine yeah, but they actually have a nice little rust program - read it, wasn't the most exciting but was a quick nice rea.
 
@BenjaminGruenbaum this one your majasty jsfiddle.net/fj6yw28r/6
 
@BenjaminGruenbaum it seems very... procedural. And pattern matching.
 
9:41 PM
Yeah
 
can anyone help?
please
 
9:56 PM
tpb is up o_0
 
how is that
 
10:08 PM
@BenjaminGruenbaum something interesting: reddit.com/r/lisp/comments/2tvmm6/…
 
mildly :P
LISP operating systems are not really new by the way - given lisp machines and all that.
^ one badass computer
 
I know
but this one is not a lisp machine
 
Yeah, a lisp machine is cooler :D
 
Does it run chrome?
 
10:11 PM
I don't think so
 
@argentum47 cool. Also, did you get my email? Also, what help did you need at that time? Sorry I only get time on weekends these days :(
looks like you solved it, maybe.
 
10:57 PM
hallo
 
11:15 PM
guys, I have a question: if a machine can't solve the halting problem, why can a human?
 
@towc a human can't solve the halting problem
 
a human can say if any program will halt or not
 
A machine can say if a program containing as many instructions as there are atoms in the universe will halt.
 
HAMMERZEIT!
 
A human can't even comprehend that much information :D
 
11:17 PM
@BenjaminGruenbaum then the halting problem is solved?
 
In fact, even a regular expression can (just a really long one)
 
@BenjaminGruenbaum but he can model it
 
@towc no, it's not "solved". You can prove a turing machine can't device the HALT language - it can't be done in theory.
However, it is trivially solvable for any languages up to length N.
Where N can be for example - the number of atoms in the universe.
 
@BenjaminGruenbaum but a human can, if he had enough time to look at all of the instructions, right?
 
@towc yeah, but so can a machine.
Here is an algorithm for solving the halting problem for programs that take less than 10000 tb of memory using a turing machine:
- Run the program instructions named 1....N
- Keep a chart containing all the states of memory named 1....K
- If the program's memory and the program instruction have repeated - return false
- If the program terminates - return true.
- Since N and K are finite (since 10000TB is a finite amount of memory) this is bound to stop sometime. (since the memory step and instruction line will have to repeat itself)
The halting problem shows something interesting about what computers can or cannot express. It is like the liar's paradox. It doesn't have much to do with what people can solve.
 
11:23 PM
it's like how we check in hand-made division if the result is periodic?
 
Uhh... sure? You just keep a giant table and see if an entry repeated. The point is that if you have a finite fixed amount of state than the problem is uninteresting.
Also - there are computation models that can solve the halting problem - namely they're called oracles.
In complexity theory and computability theory, an oracle machine is an abstract machine used to study decision problems. It can be visualized as a Turing machine with a black box, called an oracle, which is able to decide certain decision problems in a single operation. The problem can be of any complexity class. Even undecidable problems, like the halting problem, can be used. == Oracles == An oracle machine can be conceived as a Turing machine connected to an oracle. The oracle, in this context, is an entity capable of solving some problem, which for example may be a decision problem or...
If this stuff interests you a computability and complexity course is something I'd highly recommend.
 
11:48 PM
thank you
 
sure
!!afk sleep
 
can anyone help im trying load more but for some reason its not working when list has divs jsfiddle.net/fjwbdm4e
 
00:00 - 16:0016:00 - 00:00

« first day (1568 days earlier)      last day (3381 days later) »