« first day (1337 days earlier)      last day (3605 days later) » 

8:00 AM
I'm entirely convinced that w3resource === w3schools
@AwalGarg never heard of it
 
Yeah I haven't heard of it either
But don't trigger validation on empty
 
That just sounds obnoxious
 
so, can I use it?
 
!!> const fail = false; fail
 
8:02 AM
@JanDvorak false
 
Wow. That really does exist???
!!mdn javascript const
 
> The current implementation of const is a Mozilla-specific extension and is not part of ECMAScript 5 -- MDN
 
@JanDvorak ES6
 
so yeah... W3res fails again miserably.
 
8:03 AM
not sure chrome implements it yet
 
according to MDN, it does
I'm sure IE will barf at you, though
oh... since IE11
 
// Declaring multiple variables. Use one var statement and declare each variable on a new line. // Best Practices var emp_list = emplist(),      x = 12,      str1 = 'String1'; // Poor Practices var emp_code = emplist(); var x = 12 ; var str1 = 'String1';
 
oh yeah... and none of the current implementations even ensure constancy... which W3res claims otherwise
 
> <input onemptied="alert('what are you trying to do?')" value="Shrug">
Why is it not working?
 
!!mdn onemptied
 
angular.js or knockout.js is better for asp.net
??
 
Pick whichever you like more
 
the entire heading on const on W3R is total BS
 
What you do on the server shouldn't matter
 
ok...
 
8:07 AM
The return statement returns a value
Well...
 
!!> var x; var x = 3; x
 
@JanDvorak "TypeError: redeclaration of var x"
@JanDvorak 3
 
Oh. At least that works. In firefox at least.
> Numbers - Any numeric value. The numbers can be either positive or negative. - See more at: w3resource.com/javascript/variables-literals/…
because f* zero
 
They do a really bad job at explaining the with statement
 
@Meredith is that a bad thing?
 
8:12 AM
It's hard to say
 
@Meredith ironically, their jsbin at the end of the page says warning, don't use with
 
One hand it'll deter people from using it
 
the unformatted code sample baffles me, though
 
On the other, what if someone does use it
And doesn't understand why it's bad
 
@ArneRecknagel 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:14 AM
> Creating an empty array that has 5 elements.

var fruits = [5]

- See more at: http://www.w3resource.com/javascript/variables-literals/literals.php#sthash.JYiN7onY.dpuf
 
gotta go, bye!!
 
that's not only a total and utter bs, it's also factually wrong.
 
I must admit I wasn't even aware with exists
 
bye aval
any one from india
 
@jakubinf 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:16 AM
@JanDvorak They should test things first...
 
using Uppercase for property names in their object literal example = fail
 
@Mosho with is one of the 3 constructs that creates a new scope
 
@JanDvorak that site looks and smells about as bad as w3schools
 
using hyphens in property names in their object literal example = miserable fail
 
It really bothers me when they use meaningless variable names
 
8:19 AM
@Mosho don't worry, there's pretty much no acceptable reason to use it
 
20 mins ago, by Jan Dvorak
I'm entirely convinced that w3resource === w3schools
 
also, the lack of monospace formatting for code examples - wtf!
 
@Mosho do you know what the 2 others are?
 
@ThiefMaster only for some of them
string1 = "google" + ".com" is definitely a string literal... right?
 
And the authors of this site are clearly brain-dead
 
8:21 AM
@FlorianMargaine function and...
hmm
 
I have yet to find anywhere on the site where they say you need to validate input on the server
Even if you validated it on the client
 
pgsql has a native function for parametrized queries.. and they don't use it.. and neither do they escape strings
 
@Mosho that's the easy one, what's the last? :P
 
w3resource.com is created by a team of developers based in Burdwan, WestBengal, India. You may contact us on mail w3resource[at]yahoo[dot]com.
From their about page
 
@FlorianMargaine thinking :X
loading a page? :D
 
8:24 AM
> Hold on, this is waiting to be approved by w3resource.
WTF? That's NEVER an acceptable solution to get rid of PHP warnings.
 
But wait, there's more
> JavaScript : Color Values
 
meh, so i can't rant about them in comments :(
 
@Mosho nope
 
is it something I would even know
 
Can I get some red JavaScript please? Yeah, and a blue string literal while I'm at it.
 
8:25 AM
@Mosho yes
 
don't tell me
 
it's actually quite easy once you know it
 
@JohnB 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.
 
what order are the colors in?
 
@FlorianMargaine new?
 
8:26 AM
@Qantas94Heavy depends... what is your syntax highlighting scheme?
 
I really wouldn't mind if packet kiddies took down those shitty resources.. the net would be a better place without them.
 
still function, kind of
 
@Mosho new doesn't even create a new block
 
I meant constructing objects
 
8:27 AM
My syntax highlighting scheme is on the "monochrome" setting, but it doesn't work. How do I get red?
 
@Qantas94Heavy change your settings
 
@Mosho I said "creates a new scope"
:P
so you have with, function, and the last one is?
 
I want to say other things
 
do you want the answer?
 
but afraid you will laugh at me if I say something stupid :D
no :X
 
8:28 AM
I won't laugh, promise
 
@JanDvorak: I now have new doubt, I set thing called "greyscale" & it now still no work, plz halp
 
oh I know
declaring an object?
 
@Qantas94Heavy what other options do you have?
 
@FlorianMargaine var obj = {my:shizz}
 
8:30 AM
@Shmiddty urm thanks :/
 
@Mosho why does that declare a new scope?
 
guess it doesn't
ok, one more try
 
yeah, it doesn't
 
does anyone have a decent userscript to block certain domains from google search results? i know there's a chrome extension but i'm using firefox - and userscripts.org is dead
 
@ThiefMaster use chrome
 
8:32 AM
go away :p
interesting, on port 8080 userscripts.org is still accessible
 
@ThiefMaster I'm using the extension
 
@FlorianMargaine let?
 
Does Firefox not have extensions? :-D
 
i don't see the need for a full-blown extension to do something a userscript can do just fine ;)
 
@Mosho that's ES6. Good one, I have to update myself. It's now 4. What is the last one?
:P
 
8:35 AM
god damn it
 
just found a lightweight one though
 
Oh wait, you're actually taking this seriously. I'm so sorry.
 
I've never heard of an if-else loop — Jan Dvorak 13 secs ago
 
@Mosho you want the answer?
 
8:40 AM
fine, I give up
 
catch
the exception object is only available in the catch, hence it's a new scope
 
I also admit I have never used try-catch in JS
but good to know :D
 
I would've never guessed that
 
@Mosho it has its uses
 
@ukraine 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.
 
@Adam 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.
 
Any volunteers to give developer.mozilla.org/en-US/docs/Web/JavaScript/Getting_Started a refresher? While doing the Dutch translation for it, I found many outdated information (IE vs FF rather than <= IE8 vs standards). Chrome is not even mentioned
developer.mozilla.org/en-US/docs/Web/JavaScript/Guide seems better, but I would expect a "Getting Started" to give a quick overview of the possibilities and some tools to start off. A bit of HTML knowledge is also a pre-requestee and some details are treated without explaining (someone completely new to JS won't know what DOM means for example)
Or, alternatively, what JS tutorial would you recommend to a kid who has never programmed before?
 
maybe codecademy?
 
@Lekensteyn where does dutch come from ? I recommend the odin project to learn
 
@JanDvorak that requires (free) registration, I don't know how suitable it is? Have you seen some experience with it?
@WalleCyril Dutch is the language of people from the Netherlands if that is what you are asking?
 
8:53 AM
I was thaught to say Afrikaans or netherlandish not Dutch
 
@FlorianMargaine nice, although I can think of a slightly more graceful way to do that
 
@WalleCyril Afrikaans is a derived language, I have not heard of an English word "Netherlandisch". In Dutch, "Dutch" is called "nederlands" as in "nederlandse taal".
 
using exec and npm-ls
 
@WalleCyril I was looking already at it, it also seems to link to Codeacademy. It's looks like a book with exercises and references to other resources right? Unfortunately it is not in Dutch and I can't seem to translate it.
 
8:57 AM
I personnally learned English at the same time as reading Python tutorials
 
Chapters 2, 5 and 6 seems to be the details he need. I want to teach my kid brother modern JS development, but don't have the time to set up a full tutorial for him so this seems great
 
@Lekensteyn How old is the kid ? Does the kid have motivation for this ?
 
@WalleCyril he's 15, he does not have as strong motivation as I did at that time
but he does want to "do something"
 
@Mosho care to elaborate?
@Lekensteyn maybe show him a tutorial to make games in canvas?
Kids are usually interested in making games, even if they don't underdtand everything
Iirc there are canvas tutorials where you can just copy paste and it works. Then he can change values and stuff and make his own game
 
9:14 AM
@FlorianMargaine Actually, he tried to learn "JSON" as used by Minecraft's talkraw command. He did make some errors in understanding that so I was about to write a HTML page in which he could enter some details (color, text, effects, ...). Before continuing, I realized that this would be a great oppurtunity for him to learn about JS to write such programs
 
@FlorianMargaine I like this suggestion though, it may get him more motivated to learn about it
 
in this case you should make sure he plays with his new superpowers as soon as possible. When I started I was very exited because I could suddenly write powerful app in a step by step approach while having total understanding of what I was doing. By the way, the odin project is open source so you can surely propose to translate if you really want to. I like Florian Margaine Idea a lot because when you have immediate feedback at the screen it s more easy to understand. The combination of HTML+JS
is a bit harder to begin with
@Lekensteyn I started with Python turtle module it is similar to Canvas but more minimal
 
I started with HTML+JS myself and liked the immediate feedback, buttons, input elements, colors, etc. were all included already (HTML). Now I also tried to give him a Python tutorial, but maybe there needs be a more "fun" way to start with
 
@alvarog 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.
 
9:33 AM
Hi guys, does anybody have any idea how to send the XHR in another thread in javascript?
 
@TrungDQ Have you looked into Web Workers?
JS is otherwise single-threaded.
 
@TrungDQ why do it in another thread?
 
Ya, I know. I did try Web Workers but the requests are still processed in UI thread
I want to show some CSS animation when browser downloading images.
And since I have too many images to download at a time, the animation becom lag.
I use the Image object to send the request when set the src attribute.
For now, I can reduce the lag by scheduing sending the request, I limit the number of concurrent requests at a time, so the browser will only send 5 requests at a time. This could help a bit, but I am not sure if there is any better solution.
 
@FlorianMargaine run it npm-ls in your code on your server
generate a list of available modules
 
am I missing something, or Haskell totally lacks an unGetChar function?
oh. I can use hLookAhead. That's even better.
 
9:45 AM
@MarloKuisma 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.
 
people watching the game on their sofas
 
@pimguilherme 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.
 
hello all!
 
@Atabascael 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.
@JoshBode 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.
 
10:10 AM
Hey vimes =]
How're you?
 
10:43 AM
@possiblyLethal 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.
 
11:06 AM
@JamesHough 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.
 
11:33 AM
 
Hi All, how to call a child window function from parent window in jquery
 
what window
 
its page
browser window
 
11:52 AM
child window function?
like, a function in the global scope?
call it by name from wherever or use window.someFunc
having to say that makes me want to drink heavily
 
hmmm thanks :)
 
@Rayden78 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.
 
12:11 PM
Is it possible to see which database are they using? I can see that the server running is IIS.
I saw that from the Chrome Dev Tools Network Tab...
I can add comments here using curl...
 
12
Q: How can I deal with my colleagues making me do the dirtiest part of the job?

XenoMindI'm a software developer. I wasn't careful enough and fixed a couple of bugs in our system that nobody in the team could fix. And that was the beginning of the problem. Today I have to fix the most of toughest bugs... while another team members are creating the Cool New Features with Cool Present...

That top rated answer is so spot on it's not even funny
 
@peq 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.
 
12:41 PM
@BenjaminGruenbaum @FlorianMargaine @Mosho @rlemon @copy @RUJordan I've proposed the OSS ad :
12
Q: Open Source Advertising - Sidebar - 2H 2014

Grace NoteIt is now June 2014,thus a new edition of our Free Vote-Based Advertising for Open Source Projects. We are clearing the leaderboards for the second half of 2014. Here is your chance to create a Free Vote-Based Advertisement for an Open Source Project. Create a graphical ad for an open source pro...

5
 
@psal 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.
 
@MevinBabu 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.
 
12:59 PM
@dystroy awesome, please add a contributing.md etc
 
@BenjaminGruenbaum Good idea
 
@dystroy Done (also, downvoted the swift library because lol apple and open-source)
 
@BenjaminGruenbaum I'm just not so sure about what to put in it...
 
@dystroy how to contribute, coding style etc
channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2014/… @copy if you haven't already, I think you'll enjoy this
 
@copy I didn't downvote it but I find it very strange that such a library is available with pretty pages just a few days after we first heard about the language. Looks a lot like guys wanting to be first to grab a place...
 
1:03 PM
@dystroy that's completely understandable though
 
@BenjaminGruenbaum Will watch
 
@Tom 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.
 
@copy he is very sharp 95% of the talk and the rest 5% is ripping on Microsoft and Apple :D
 
@eraser2021999 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.
@25A0 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.
 
1:21 PM
Miaou... great job :)
 
Tom
Any ideas of where I can get a job doing either Javascript or Java remotely that isn't Elancer/Odesk and I don't have to be in the US?
 
You can get a job doing one of those in any country
 
@Tom what country are you from?
 
Tom
@BenjaminGruenbaum England
@copy any more specific ideas?
 
@Tom link to your GH?
 
Tom
1:23 PM
@BenjaminGruenbaum what is GH?
 
@Tom Companies? Or job sites?
 
Tom
@BenjaminGruenbaum I've only contributed to a few things: github.com/tom-adsfund
@copy job sites, I guess. somewhere to find specific work
 
I don't know, use a search engine
 
@Tom that's enough though, as long as you can actually deliver good code, you should not have any problems getting a job.
 
Tom
1:27 PM
@BenjaminGruenbaum right, but where can I find these jobs? Searching just turns up a pile of random things and I've found nothing applicable
 
careers.stackoverflow.com ?
 
w3resource.com/PostgreSQL/… - because newbies will totally read that...
 
@ThiefMaster did you read the reply they gave to your comment? lol!
 
i did.. and it's still stupid to post a tutorial with horribly insecure code
 
Tom
@BenjaminGruenbaum thanks, there are so many job sites, but they all seem to be the same: simple search on big blobs of job information
 
1:31 PM
especially since that page doesn't link to the sql injection page besides in the new comment
 
@ThiefMaster Why do you care
 
@ThiefMaster hehe, you should have mentioned that you are from this community, and that you are a mod here...
 
haha why?
@copy: Because stupid/newbie-ish people will end up using shitty code from that site.
 
have you noticed? They allow guest upvotes in the discussion, but they require login before letting you downvote
 
@ThiefMaster from the reply, it seems that they think you are a lil kid new to the topic and the link they supply is unknown to you :P
@JanDvorak hehe, nice strategy :)
It seems, to use someone else's se chat account, I just need to steal some cookies. no pwd, decoding etc required.
 
1:44 PM
@Tom fogcreek
 
@AwalGarg I'm using HTTP. Post a comment from my account, then email SE about the vulnerability.
 
other cool reccomended mindbegging film?
 
@JanDvorak post me a screenshot from the chrome dev tools showing the content of your cookies, I will do it :)
 
@AwalGarg That's not a vulnerability
 
@AwalGarg meh. Run a MITM, please.
 
1:46 PM
@copy haha, I know that. I was just doing some curl fun as a beginner. thanks for the sandbox room :P
 
Come to Prague, and tell me which WiFi I should connect through ;-)
 
what is MITM?
 
!!tell awal wiki mitm
 
@awal It means I aint got time to learn your $5 words.
 
ow, ok, no, I can't do that. I can't code JS properly and you expect me to do that man in middle attack?
 
1:48 PM
yep.
You could, of course, skip to the "email" part, but that's no fun.
 
haha. btw, Jan. I looked at learn.jquery.com for 3 hours. I did learn a few things, but jargons kept trailing. Please tell me what to do...
 
ask here, or look it up
 
should I use document.write or console.log?
 
console.log
 
is the why? question important here?
 
1:54 PM
@AwalGarg 1st: .write is modifying the dom which makes it really slow
2nd you can keep using the page if you use .log, while it gets deleted with .write
3rd cheese, our lord and saviour, loves you
 
oh, ok. Next Q: On the second page of the 101 section, they assign a function to a variable! Ew, I haven't ever done this. What is the use of it?
 
4th document.write doesn't automatically change line, making the result a mess, while console.log does
@AwalGarg how can't you?
 
@towc alright, thnx for the clarification...
@towc i didn't get that..
> var foo=function() {for(var i=0;i<10;i++){alert(i);}};foo();
 
5th document.write can only display strings
6th it expects an HTML
 
@PieterBos Are you a girl?
 
1:57 PM
can someone link him to the post about the difference between the different function declarations?
 
so is it just another way to declare a function?
 
@AwalGarg it works in almost the same way
 
@towc almost? whats the difference then?
 
but function defined with "function cheese(){}" is loaded before his calls
whilst "var cheese=function(){}" is only loaded at that part of the script
!!> foo(); function foo(){console.log('towc 42 cheese')}
 
@towc "SyntaxError: unterminated string literal"
@towc "undefined" Logged: "towc 42 cheese"
 
2:00 PM
it logged succesfully, even tho the function was declared after it's call
!!> foo(); var foo=function(){console.log(':P I will never get logged')}
 
@towc "TypeError: foo is not a function"
 
you see?
 
@DiegoPonciano 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.
 
!!>function foo(){console.log('towc 42 cheese')}; foo.name
 
@towc "foo"
 
2:01 PM
!!> foo(); function foo(){alert ('hello');}
 
!!>var foo=function(){console.log(':P I will never get logged')}; foo.name
 
@towc "undefined"
 
!!>var foo=function(){console.log(':P I will never get logged')}; foo.name
 
@towc ""
 
@towc thanks, I understand it now.
Is this trick used elsewhere as well? Other than functions I mean...
 
2:02 PM
you see? the one with function name(){} also has a name, whilst the variable one hasn't
@AwalGarg not that I can think of
 
they are both looking the same to me
why do they have different outputs?
 
@AwalGarg they're defined in 2 different ways
 
oh, ok. I get that! You iz great. Thanks man :)
 
I think that the first it's like an object described as "var cheese={}", whilst the second is "var cheese= new Object()"
you can google it
 
@towc it's not the same difference
 
2:08 PM
can i use console.log to declare variables? I mean:
`for(i=0; i<5; i++){console.log (var i=i;);}`
 
var doesn't work inside an expression
 
I want to take some dom elements and pass there values at once into different variables... possible?
 
how then?
> null and undefined are special types in JavaScript. Null types are values that represent the absence of a value, similar to many other programming languages. Undefined types represent a state in which no value has been assigned at all.
^what is the difference then?
 
2:12 PM
var els = ..., a=els[0], ...
 
@JanDvorak nope, I meant. There are about 22 dom elements. I don't want to manually type them all. Anyway to automatically do that?
 
@AwalGarg not much of
@AwalGarg have an array
or a hash
 
@JanDvorak but gives the idea, I guess
 
@JanDvorak can I use something like I use in php, i mean - $_POST or $_GET -> $_DOM
 
2:16 PM
 
voluntary human extintion movement
 
isn't that a southpark episode
 
@AwalGarg for(i=0; i<5; i++){ eval("var i" + i + " = " + i); }
 
was a good one
 
@MirkoCianfarani yeah, I wanna store the dom element pointer in them...
 
2:18 PM
@AwalGarg as in, store an array somewhere?
 
@JanDvorak yep. PHP automatically does that for me when I post or get a form. Is it possible in JS as well?
@copy I am sorry for a possible n00b question, but what does that do?
 
SOJSchat should define the standards of javascript from my point of thinking
2
let's take over w3c!
 
@AwalGarg It defines i0 = 0, i1 = 1, ...
 
@AwalGarg document.forms?
 
2:20 PM
@copy oh, alright. Great!
@JanDvorak will it store the pointer address or the literal value for me?
 
cool film anyone?
don't be shy, you will win a cookie
 
http://learn.jquery.com/javascript-101/types/#type-checking-with-jquery
They say this is with jquery. I run it without jquery, it still runs. Any point I am missing?
 
@AwalGarg only the last three are defined by jQuery
 
so typeof comes with purejs..
 
yep
 
2:30 PM
sorry, power off. bbiab
 
@AwalGarg btw, the whole of jquery comes from purejs
 
!!urban 2 bbiab
 
@JanDvorak bbiab abbv for be back in a bit
@JanDvorak No definition found for 2 bbiab
 
!!urban god
 
@towc God A guy who talked to some Jewish guys, some Christian guys, and some Islam guys, and accidentaly caused more people to die than anyone else in human history.
 
2:32 PM
^awesome
 
can we close his question?
 
@JanDvorak not out pro_blem
 
houston, we have a pro_blem
 
That filter is supposed to get you to write a better title, not a title that has a useless underscore. — Jan Dvorak 1 min ago
 
!!gym or lazy
 
2:36 PM
@Mosho lazy
 
<3
 
you should marry caprica
she deserves you
 
no one deserves me
 
2:53 PM
posted on June 14, 2014

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {} Hey geeks! If you ever wanted to get my gamebooks for super cheap, t

 

« first day (1337 days earlier)      last day (3605 days later) »