« first day (1188 days earlier)      last day (3754 days later) » 

4:00 AM
So I'll be teaching the first two weeks of a programming bootcamp starting the 20th.
 
Take a video so we can see
 
Docs they gave me have new Array(), onclick and much more.
What's our canonical article for why onclick is bad?
 
It's not
But you can accidentally overwrite your previous handler
 
I think I just might work for the best company in the world. It's unbearably hot, so they buy us all Slurpees (even though we're in air con). There might be disruptions to public transport, so we're free to go home early (on the condition that we promise to take water with us). :D
 
Do you get beer and massages?
 
4:11 AM
That's a nice sounding company
 
Beer on Friday afternoons
 
Hello
 
Niiiice.
 
Plus we do End Of Month, were we all go out and do something together on the company's dime (optional or course)
 
Sounds like a good culture
 
4:14 AM
Yeah, I was pretty blown away when I started. Kept thinking what's the catch?
We're actually looking for a javascript guru at the moment if anyone wants to defect to Aus :P
 
I do consider myself an expert...
 
4:30 AM
@phenomnomnominal Wanna come work in Aus? :D
 
What is your reaction to encountering a complicated problem? (Right before trying to solve it)
1) Say "Hmmm"
2) Make noise by cracking joint
3) Say "Shit"
4) Cough
 
Google it.
 
I saw a guy starts to breath heavily when he encounters a complicated problem. He was weird.
 
I assign the ticket to the newest intern, get out my camera, then wait for the youtube magic to occur
 
4:46 AM
Good evening
 
5:22 AM
Yo
 
m59
5:54 AM
@SomeKittensUx2666 Persistent with bad answers is this one:
1
A: Inline Javascript with css

MistressDavidYou need it like this: <li class="bra" onPageload="myFunction( element.style.webkitTransform = 'skew(-25deg)'; "></li> ^ ^

You may recall - he tried to school us about how awesome inline js is.
 
0
Q: Unable to get Backbone.Marionette app running

Rahul DesaiI am new to Backbone.Marionette and I am working on a telephone directory app using the same. I referred this example. I am getting following error: TypeError: Backbone.Model.Extend is not a function index.html (line 109) listAll: function(){ My code so far: var MyApp ...

 
@nderscore I'm doing it backwards, building a string, then printing that at the end.
 
@m59 +1 (and tried to edit your css formatting, but edits can't be less than 6 characters long :S )
 
Can anyone please help me with my question? I am struggling with Backbone.Marionette :(
 
@RahulDesai I never was good at puppetry, sorry
 
6:09 AM
!!> importScripts("//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"); $;
 
@EnglishMaster "ReferenceError: importScript is not defined"
@EnglishMaster "[Exception... \"An invalid or illegal string was specified\" code: \"12\" nsresult: \"0x8053000c (SyntaxError)\" location: \"<unknown>\"]"
 
@JanDvorak I didnt get you, sorry.
 
A marionette is a puppet controlled from above using wires or strings depending on regional variations. A marionette's puppeteer is called a manipulator. Marionettes are operated with the puppeteer hidden or revealed to an audience by using a vertical or horizontal control bar in different forms of theatres or entertainment venues. They have also been used in films and on television. The attachment of the strings varies according to its character or purpose. Etymology In French. marionette = "little Mary". One of the first figures to be made into a marionette was the Virgin Mary, hence ...
 
lol
 
6:16 AM
I hate those cunts at gym use 1 machine forever and doesn't know how to move on to other exercise.
 
@m59 Don't remember that one.
 
Hi
Hello everyone. I'm having the issue of "No Access-Control-Allow-Origin' header is present on the requested" in Angula rJS
Does anyone have idea?
 
@Nizam Sounds like you're trying to AJAX to another domain.
 
No
 
Can you share the code?
 
6:25 AM
I'm calling the rest url from Angular code
yes sure
var myApp = angular.module('myModule',[]);

myApp.controller('Hello',function($scope,userRepository){
userRepository.getInformation().
success(function(data){
alert("Success");
}).
error(function(data){
alert("Error");
});

});
myApp.factory('userRepository',function($http){
return {
getInformation : function(){
var url = 'http://api.worldweatheronline.com/free/v1/weather.ashx?q=London&format=json&num_of_days=5&key=atf6ya6bbz3v5u5q8um82pev';
return $http.get(url);
}
}
});
That's my angular code
It goes into error call back function
 
What website are you executing this code on?
 
@Nizam Format your code - hit Ctrl+K before sending and see the faq
 
Json format
ok
 
i.e. what domain are you loading this from?
 
@SomeKittensUx2666, is the code clear?
 
6:27 AM
Yes, but what domain are you loading the code from? Localhost? A file on your system?
 
m59
@monners @RUJordan thanks for commenting!! It would just be an argument coming from me. I fixed the formatting, also.
When I use bad practices, I use bad practices like a boss, though right?
hehe
 
It's a simple angular js application. I'm running it from webstorm IDE.
 
@m59 When you use bad practices somewhere in the world a kitten dies
 
@monners Yeah!
@Nizam So you're trying to load data from api.worldweatheronline.com/free/v1/… when your code isn't from there?
 
Yet another reason to use best practices
 
m59
6:29 AM
well, I didn't use it personally and I encouraged him not to do what the second half of my answer stated, so I think the kitten was shown mercy.
 
But, the URL gives me JSON data, right?
 
m59
I'm just saying, I don't always answer a question that wants to use bad practices, but when I do, I use best practices with my bad practices lol
 
I need to fetch those records
 
@m59 Nope, its legs were broken and it was dumped on the side of the road. I saw to it personally.
 
m59
:)
I mean :(
^^^^^
 
6:29 AM
LOL
 
m59
I almost cried haha
 
You're a monster!
 
@SomeKittensUx2666, this is my fiddle jsfiddle.net/U3pVM/2654
 
@Nizam You can't access data from another domain unless the domain allows it. If they don't allow it, you'll get the error you're getting.
@monners BUT I LOVED YOU
 
But, I used to access it from Jquery ajax before..
I need to do the same in Angular JS
 
6:31 AM
@SomeKittensUx2666 Shoulda run faster.
 
@SomeKittensUx2666, or can you give a sample rest api and check it in the fiddle
@SomeKittensUx2666, Are you there?
 
Yeah.
Waiting for @monners to say something funny
 
Okay.
@SomeKittensUx2666, Can you help me in this regard if possible?
 
m59
@SomeKittensUx2666 this:
5
A: Why isn't function performing on button click?

m59You need to invoke the function with (). Like this: ayee(). However, you shouldn't be using inline-js at all. Instead, you should do this: Live demo here (click). <button id="myButton">My Button</button> JavaScript: var myButton = document.getElementById('myButton'); myButton.addEventListen...

the comments, is what I was referring to
 
Oh yeah!
 
m59
6:41 AM
Just funny that I ran into him again on the same topic
Oh gosh and I forgot the accept when to an inline js answer. Of course.
 
@rlemon It wouldn't be of all that much use, I think, but it'd still be fun to make, right?
And maybe the guys at math.SE will want the bot too
 
@SomeKittensUx2666. ????
 
@Nizam Are you just sitting there waiting for me to give an answer?
 
@SomeKittens I'm trying as well
 
What are you trying?
 
6:45 AM
@SomeKittensUx2666, how to overcome "Access-Control-Allow-Origin' header is present on the requested resource"
Im trying in that way
 
That's the query you're giving Google?
 
yes along with Angular js keyword
 
m59
Should this be cv?
0
Q: Screen resolution 1024px or 960px?

Vincent ChuaBack in the day we use to design website with resolution: 1024px(width) by 768px(height) but to avoid getting scrollbar from appearing from both sides we use a slightly smaller resolution, may be: 1000px(width) by 620px(height)---rectify me if I'm wrong on this one but my main concern is ho...

If not, someone answer it.
Or both, or whatever.
 
This sounds like a history question, not asking for opinions, but I can't answer it either.
I can only guess. A 20px margin on both sides, plus 24px for a scrollbar? — Jan Dvorak 14 secs ago
 
m59
Good guess, I think =D
 
7:01 AM
@Nizam I can't get it working with jQuery either
 
can anybody help me
http://stackoverflow.com/questions/7691430/howto-serialize-an-arrayd-checkbox-in-jquery
 
@SomeKittensUx2666, Thank you for your effort.
 
m59
@JanDvorak I posted the answer. It's basically because 960 has many more factors than 1000
and a little breathing room is nice
 
@m59 So you found a dupe and reposted the answer...?
 
@m59 can you help me pls
 
m59
7:10 AM
Oh, is that bad?
 
Yeah, kinda frowned upon
 
m59
When I last asked about that, it was encouraged as it could draw more attention to the correct answer for people searching
Notice that I credited the original post
So...I'm not sure who to believe =D
 
sorry above link is bad pls refer this stackoverflow.com/questions/21154419/…
 
m59
@Kalpit I need to get to sleep. That's waaay too much code.
It's best to only include what is required to demonstrate the issue.
 
removed unwanted code
 
m59
7:18 AM
@JanDvorak @SomeKittensUx2666 meta.stackoverflow.com/a/10844/243378
but if it's socially unacceptable, I can delete the answer.
 
fine, fine
nah, it's cool
 
m59
I think one of the arguments I heard in favor of it was that if you know you can post a good answer, go for it so that at least the post isn't potentially closed with only bad answers on it for future viewers to see. I can see it either way.
@Kalpit heh, I didn't want you to remove all of your html... If you're asking people for help, do us a favor and make your code as generic and light as possible.
If you don't know how to do that, take some time to consider what your issue is and practice removing code and leaving the issue.
 
ahh will take care of it from next time
 
m59
Like, "If I remove this line of html, do I have still have a problem?" If so, remove that line and continue. This will leave you with a nice code sample for someone to look at and help you with.
Alright, I have to sleep. Night all!
 
good night
 
m59
7:29 AM
 
Hello @m59 :)
 
7:51 AM
Oh, you're asleep. I'm sorry.
 
@monners ummm isn't it almost 50degrees? I think I'm good :P
 
@phenomnomnominal What?! :O
!!weather Melbourne, Australia
 
@SomeGuy Melbourne: 39.45C (312.6K), proximity shower rain
 
Jesus
 
7:55 AM
@SomeGuy yes?
 
if (currentVisitor.thoughts.hasWhatItTakes) { applyNow(); } <- this annoys me :P
 
@SomeKittensUx2666 Will you be uploading a recording of it?
 
Do you think conjoined twins actually do this or buy specially designed jackets?
 
Kind of creepy...
 
anyone plz help, i want pie chart like this, the7.dream-demo.com/shortcodes/counters-pie-charts i can create simple pie chart but i am not able to do that
my pie chart jsfiddle.net/TSmDV
 
8:14 AM
Are you really an English Master ? Or am I confused ?
 
Sorry
 
it's not every day that I answer on main
but when it is, it's a simple answer.
0
A: Synchronous promise resolution (bluebird vs. jQuery)

Florian MargaineThe point of promises is to make asynchronous code easier, i.e. closer to what you feel when using synchronous code. You're using synchronous code. Don't make it more complicated. function print( text ){ console.log( 'print -> %s', text ); return text; } function getSomeTextSimpleCas...

 
essiliaj and domenic are on the QA too... Now Ben and all bluebird masters will be...
> bluebird does not support the synchronous resolution of promise-objects
Really ? This would be totally useless but it's possible, no ?
 
return Promise.cast( text );
but you have to use then all the way if you want to keep in the same flow
that's what his question is about
 
0
Q: Unable to get Backbone.Marionette app running

Rahul DesaiI am new to Backbone.Marionette and I am working on a telephone directory app using the same. I referred this example. I am getting following error: TypeError: Backbone.Model.Extend is not a function index.html (line 109) listAll: function(){ My code so far: var MyApp ...

 
8:22 AM
OK, I see what he wants.
 
8:38 AM
@RahulDesai That's the third time you've posted that question in here. If people want to answer it, they will! Spamming the chat isn't going to help your cause.
 
sorry :/
I think I should update that question
 
@RahulDesai make a fiddle.
 
@phenomnomnominal Puts hair on your chest
 
wat
 
The heat
 
8:50 AM
Why are you pasting hair to his chest because of the heat? :p
 
@phenomnomnominal thats a good idea :)
 
What the hell?
 
Is Mozilla involved in this shit ? Did they tell if they'll implement it ?
 
@phenomnomnominal Here is the fiddle: jsfiddle.net/8jq3H
I made a simple one just to test button click event.
 
9:06 AM
@dystroy nope. W3C answer is basically: we want to standardize the least worse solution
 
@RahulDesai work out how to add Backbone and Marionette to it, then ping me again
 
@phenomnomnominal ah shit :/
@phenomnomnominal updated fiddle jsfiddle.net/8jq3H/3
0
Q: function not binding to the event

Rahul DesaiI am learning to Backbone.Marionette and this is an attempt to create a simple application where I am displaying some text on button click. Here is the fiddle. JS: var MyApp = new Backbone.Marionette.Application(); MyApp.addRegions({ mainRegion: "#container" }); MyAppModel = Backbone.Mod...

This is another attempt to my Backbone.Marionette app.
:/
@phenomnomnominal any idea?
 
@RahulDesai oh yeah, I don't care anymore
 
9:22 AM
@phenomnomnominal Is that because I posted another question?
 
@RahulDesai no, just doing other stuff
 
@phenomnomnominal Ok, please see whenever you get a chance.
 
Excessive ?
Is the discussion of vague biz terms on topic in SO ? Shouldn't this be moved elsewhere ? — dystroy 16 secs ago
 
10:02 AM
guuuuys
 
10:12 AM
Yes?
 
not much is happening in this chat...
what are you up to @SomeGuy?
 
Studying, you?
 
@SomeGuy oh, ok... I'll leave you then
 
those guys deserve upvotes... there
 
10:30 AM
This question appears to be off-topic because the asker demands a solution rather than help. — Jan Dvorak 1 min ago
 
Is this chat application open source? (didn't think so) anything close to it?
 
(and the author of miaou is in the room) (edit : thanks Florian)
damn...
 
All those keys... and you even have to put the letters in order... language is painful.
 
10:39 AM
@dystroy Haha, you could have just said the creator after the first few tries :p
 
...
afk boulangerie
 
(boulangerie = bakery, for non-french people)
 
10:59 AM
Is there a good pattern for instantiating “classes” depending on whether or not an element was found in the DOM?
I had an idea to write a hash of jQuery selectors mapped to “class” names, and then fast enumerate over that hash and instantiate for each element found
or is this bad design?
 
It's probably not a good idea to create classes for elements in the dom which you don't necessarily need to create classes for
 
@Neil: Is that not essentially what Backbone views are?
 
@JezenThomas I couldn't tell you, sorry
I would assume not though
Otherwise it would be a memory hog
 
would it be?
 
Imagine if you had a list inside a list.. that's n*m classes
And that includes everything you can't see
 
11:04 AM
it’s a common pattern in Backbone to instantiate a new view for every model in a collection
 
@JezenThomas Yes, but maybe that is optimized in some fashion
 
so if you have a table with a bunch of rows that represent some collection of stuff, you have an object for the table view, and an object for each row
 
Yes. However, at least you are delegating an object for the table and for each object
 
@Neil What sort of optimization did you have in mind?
 
What you're talking about is having a class for <table> tag, class for <thead> tag, class for <tbody> tag, class for <tr> tag, class for <td> tag, class for <div> tag within td tag..
That's a whole lot more than 1 class per row and 1 class for the table
 
11:07 AM
Hmm… I may have explained myself badly
I would only want to create an object for things that need behaviour and state attached to it
 
Could you give me an example of what you mean?
How would someone use your library?
 
@Neil Love your avatar
 
my idea is that I have a requirejs module for some collection page; this module contains a couple of constructors — one for the collection view, and one for each item in the collection
 
@monners Hah, thanks
 
and in my main js file, I instantiate all that stuff only if the element associated with the collection view object is found in the DOM
 
11:11 AM
Ok, off to bed to fall down the youtube rabbit hole
 
each view module in my application starts by searching the DOM for some elements, and then doing stuff with those elements
 
!!afk Chasing the YouTube dragon
 
Ok, hmm
 
it seems like a bad idea to just run all the modules on page load
 
You could use sizzle to find relevant dom elements, and for each, create a class for it
 
11:12 AM
…Create a class?
I’m assuming you mean an object
 
Just using the term you used. Javascript object
 
but yeah, that’s essentially what I’m trying
 
I don't think it's a bad idea to run this on page load
 
enumerate over a hash of sizzle/jQuery selectors, and create instances of the class they’re mapped to
 
What makes it a bad idea is if you're very generic with your selector
 
11:14 AM
yeah, absolutely; totally agree
the current codebase looks like

someModule.init();
somethingElse.init();
probablyNoMatchedElementsHere.init();
which runs on page load
 
I don't know if it'd apply to you, but you could check if component is not visible and in that case, maybe lazy load the component
If you were making a library, might be a good idea
depends entirely on how you intend on using these objects
 
and each of those modules would then go looking for DOM elements to apply their logic to
 
If you can help it, just use sizzle, and not jquery
 
jQuery is already a project dependency
 
Ah, then nvm
 
11:18 AM
and as convention, I/we would only use IDs during this initial instantiation iteration
but as you said, lazy-loading modules is the idea
I don’t want to query the DOM loads of times on page load in vain
 
No, if you do it right, you should select dom components once for each component
even lazy-load objects can hold the dom element and simply not do anything with it
 
yeah, when the collection object is created, the element it’s tied to will be cached in the object
 
11:34 AM
I think I might know what it would have been like back in the days in which you had to send your code in the mail on punchcards to be compiled
I'm having to create an installation package to be used on a machine in China, and due to its size, it takes roughly 4 hours to send
I have to add new features, so I'm sending something that I'm not even sure will work
I'll test it and know soon enough, but in the meantime, i'll have to begin transferring via ftp all the differences with respect to what I started sending in order to fix potential problems
 
@Neil large datacenters actually upload on flashcards or other media and send by snailmail or a delivery service
 
@JanDvorak Yeah, but they do that for security reasons I presume
 
@Neil negative. HTTPS is much safer than a van of harddrives
2
or you could exchange encryption keys while meeting in person
 
Then why?
 
faster data transfer
ten SSDs connected through different USB 3.0 ports = ten times the troughput of USB 3.0
 
11:40 AM
Yeah but you'd need to pay a guy to move around flash cards around all day
Man, what an awful job that would be.
 
even a single USB port is faster than upload on even expensive lines
@Neil machines can do that
A crate of MicroSD cards + some machinery = semi-automatic batch SD card reader/writer
 
I can't possibly think that the time it takes to copy to a flashcard and to copy from a flashcard and to switch from one pc to the next is faster than say, a bus connecting the two or something
you'd think there would be a faster way to do that
 
I'd call it an "microSD crate drive"
@Neil well, I haven't seen an PCIx operate on more than a few decimetres.
 
And to think that once upon a time we used tapes.. hah
 
and laying a private optic cable from Atlanta to Zhengxiang would be expensive.
g2g, sry
 
11:47 AM
@JanDvorak \o
 
12:02 PM
posted on January 16, 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) {} Whee!

 
12:27 PM
Question regarding IPV6. The company which bought mine and now serves my application doesn't handle IPV6. I could rewrite my apps to listen for IPV4 too but I wonder if not handling IPV6 at all (on their whole network) isn't hurting in some way. What's your opinion ?
 
why is there no proper tutorial on Backbone.Marionette? :(
 
@dystroy we don't have enough information, but it might be simpler to add an ipv4->ipv6 translator somewhere
honestly, it's more a business decision... which costs the less to build and maintain? rewrite parts of your application, or add some translator?
 
What I ask is if there are problems apart for my applications. I know my colleagues who are trapped in their networks have difficulties accessing some applications for example.
 
s. anyone here got some experience with firebase and could tell me if it was rather bad or good?
 
1:07 PM
@dystroy IPv6 is bound to grow in popularity ... eventually
 
1:19 PM
my IT team seems to be happy to only support IPV4... but in fact it doesn't matter, it's automatically accessible in IPV4 too
 
1:32 PM
@JanDvorak Don't know about that. Had we not used 192.168.* addresses, we'd all be using IPV6 by now
 
Had we all be using IPV6 by now, we wouldn't need to NAT everything
 
true
 
yes
but this NAT thing prevents network admins from unemployement
 
pretty smart idea if you think about it
We ought to all start using assembly to code
 
@Neil bad idea. Think about CPU designers
 
1:41 PM
@JanDvorak This way, also CPU designers are prevented from unemployment
 
No. I mean, we should do everything in hardware. Only a task author knows how many registers the CPU actually needs.
and which tasks must be able to run in parallel
 
1:54 PM
Hi coders!
 
Hi jan
Why do people do this?
0
A: Jquery stop repeat my code with after?

Maurice PerryOr: if (!$('input[name="fisrtName"]').hasClass("error")) { $('input[name="fisrtName"]').addClass("error"); $('input[name="fisrtName"]').after("<small class='error'/>"); } $('input[name="fisrtName"] small.error').text("Invalid entry");

It really really bugs me
 
most of those answers bug me
 
does mine?
 
doesn't after I added var
what do you think this is? php?
 
1:59 PM
Ha, yeah, thanks :)
No, I'm too used to coffeescript now, use it all the time
 

« first day (1188 days earlier)      last day (3754 days later) »