« first day (1437 days earlier)      last day (3515 days later) » 

10:05 AM
Hi
 
Good mor-ning
Is there a simple way to detect of your site is beeing seen on mobile with jQuery? I searched here: stackoverflow.com/questions/3514784/… but I am not sure about the best solution.
 
10:18 AM
@Duikboot For what purpose?
 
How can i route a view after complete the ajax request in angular ?
 
10:33 AM
@Ravi I'll be here all week. Don't forget to tip your waitress
 
;)
 
@Duikboot: a popup with: "Are you visiting this site from a mobile device? Y/N" ;-)
 
@Cerbrus But you could lie
 
!!will I have a reversal today?
 
@SecondRikudo Definitely
 
10:41 AM
^_^
 
Ah, just oblige them to have their lie detector attached to the computer
You'll have to use another popup to ask if they have their lie detector test attached though
 
@Neil But if it's a mobile phone, you can't hook up the lie detector, it only hooks up to PCs
Just ask them "Are you a liar?", if they are indeed liers, the universe would implode.
 
@SecondRikudo So you ask them in a popup if it is a mobile phone so, that you know not to ask if they have the lie detector attached
Solid. Logic. QED.
 
me, having social background from facebook, really needs a like button!
 
Are you a liar? No. Divide by zero error. Universe will restart in 5..4..
 
10:44 AM
@Neil In Hack N' Slash, you can literally edit the source code of the game on the fly.
If you create a syntax error, the game gracefully crashes and shows you an error message: "The universe has collapsed. It gave the following message: "....." "
 
I recall Portal 2 where they try to stop Wheatley by spouting paradoxes
@SecondRikudo That must happen a lot then
 
@Neil And he was so stupid it didn't affect him :D
@Neil Yes, especially when dealing with assembly.
 
GLaDOS is my personal hero
 
I saw this video used to teach the difference between fusion and fission with GlaDOS
 
10:48 AM
It is supposed to be educational, but I found it humorous just the same
 
"Bring your Daughter to Work Day" still gives me the chills.
 
hi guys, I've got a strings like "((a+b) +(c+d))", "(a+{b})", "{a+b}{c+d}" "(c+[a+b]){a+b}" in each case I'm interested in the substring corresponding to the first bracket, any suggestion what is the way to handle this nested groupsp with javascript ? can I use regex ?
 
@Neil Awesome! Haven't seen this one
 
10:59 AM
this seems the code I'm looking for : blog.stevenlevithan.com/archives/javascript-match-nested
 
@Kasper A regex can't handle that. A simple recursive parser should be able to, though
 
@BenjaminGruenbaum Remind me in 2 days if you still get nothing, I'll setup bounties.
 
11:17 AM
@SwiftLang hey swift, are you guys following the #swift tag on SO? there's been interesting ones like http://stackoverflow.com/questions/25972622/whats-the-rationale-of-swifts-size-methods-taking-ints
 
I read "How can we deal with Java?" ;p
 
There are worse offenders among programming languages
 

PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
 
... meh
 
11:23 AM
ASP classic
 
I never tried ASP, I haven't seen ASP code, but still for some reason, I stay away from it. I know it is not good. Same with JAVA.
 
Why the hell would this fail? (This example is working, I can't repro in jsfiddle)
This is the actual code
$('.js-clientProperties-table').on('click', '[data-editable]', function () {
    var type = $(this).data('type').toLowerCase(),
        formControls = inputGenerators[type] ? inputGenerators[type]($(this)) : renderTextarea($(this)),
        originalText = $(this).text();
    $(this).parents('td').data('original', 'poop');
    renderInlineForm($(this), formControls);
    console.log("Clicked! %s with value of %s", type, $(this).text());
    console.log($(this).parents('td').data('original'));
});
The first console.log fires off flawlessly, with correct data.
Second is always undefined
 
@SecondRikudo not for me
 
2 mins ago, by Second Rikudo
Why the hell would this fail? (This example is working, I can't repro in jsfiddle)
Read it again...
 
ok
 
11:27 AM
@SecondRikudo I suspect renderInlineForm overwriting the TDs
which, ofc, loses the data
 
I suspect jQuery
 
@AwalGarg elaborate?
 
@JanDvorak He is using jquery. so bad things would happen. this is a sign that he should not use jquery.
 
@AwalGarg your correlation is unfounded
 
I have personal experience of jquery making me fail. It was the first and the last time I used it. I would never touch it again.
 
11:32 AM
@AwalGarg small sample size
 
@JanDvorak what? Are you asking for a sample? I don't have it now, it was long ago...
 
one observation is insufficient for a reliable observation
 
ok
 
@JanDvorak Ah, it was something similar
It overwrote $(this), and then $(this).parent was undefined
 
11:56 AM
TIL wrapping form elements in fieldsets is useful :D
 
@AwalGarg elaborate?
 
@Kippie TIL wrapping form elements in fieldsets is useful :D
 
That's just repeating what you've already said. In what way is it "useful" ?
 
@Kippie well, the code is looking better now, nothing more.
let us see if it is for some specific purpose
!!mdn fieldset
 
12:07 PM
this is nice, the third one
> fieldset . elements
Returns an HTMLFormControlsCollection of the form controls in the element.
this is cool
how did I not know this... ?
 
so... I finally changed the backwheel of my bike
which gave me many problems since it was almost perfectly oval
and didn't have good chain support
I forgot to re-install the brakes on the backwheel
the frontwheel's brakes really don't work
 
Did your face act as a brake?
 
this morning I tried to go to school
50m below my house
@Kippie pretty much
 
Nice.
That'll teach you for not living in a perfectly flat country
 
XD
at the end I managed to get to school without braking
but that consisted in going in tiny circles
and I did end up hitting a pole, because I couldn't stop
 
12:19 PM
HAMMERTIME!
 
I'd imagine you arriving in school with both your shoes on fire because of the friction
 
@CapricaSix I hammer'd the pole many times, yes -_-
@Kippie XD
 
Can someone please tell me why it is not pure black color ? jsbin.com/luvuq/2/edit
(the border)
 
@RoyiNamir could be because when you draw a line in non-integer positions, it occupies multiple pixels par point, diluiting the colours
 
I just made an idiot's promise mistake :(
 
12:23 PM
but can't see any non-integer values
 
In my code :D
 
@towc how can in make it black ?
 
@RoyiNamir trying to understand aswell
 
@BenjaminGruenbaum How do you use bluebird to solve that, though?
 
@RoyiNamir might be a canvas scaling problem, caused by jsbin
 
12:25 PM
@Kippie oh, I'm not using bluebird, no chance it'd work for me in this scenario
 
0
Q: IE-9 taking value of placeholder as a value

FreelancerI have HTML as: <input id="SLOCriteriaOtherText" name="SLOCriteriaOtherText" style="width: 100%;" type="text" data-role="autocomplete" placeholder="Enter name for 'other' metric..." class="k-input" autocomplete="off" role="textbox" aria-haspopup="true" aria-disabled="false" aria-readonly="false"...

plz help me.
 
don't use IE9 :-)
 
@RoyiNamir btw, you don't need clearrect or beginpath
 
@towc yes. you're right
 
@JanDvorak :)
 
m59
12:29 PM
@awalgarg there are tons of JS template libraries. Underscore, lodash, mustache...just google that or "JS data binding"
 
@RoyiNamir clueless
 
@Neil : Good Evening.
Tanks for Neil
@vikky Did you add ngRoute as a dependency of your module?
Its working for me right now.
@Neil : After this I am facing this issue Neil
Error: Expected 'Hello' to be undefined.
My controller is :
'use strict';
var AddUserCtrl = [
    '$scope',
    '$log',
    function ($scope, $log) {
        $log.info("***************AddUserCtrl******************");
        $scope.greeting = "Hello";
    }];
My test case file is :
describe("Testing the controller addUserCtrlTest", function () {
    // Load the module with addUserCtrl
    beforeEach(function () {
        module('ngResource');
        module('ngCookies');
        module('ngRoute');
        module('customDirective');
        module('CURDApp');
    });

    var ctrl;
    var scope;
    // inject the $controller and $rootScope services
    // in the beforeEach block
    beforeEach(inject(function($controller, $rootScope) {
        // Create a new scope that's a child of the $rootScope
But I am unable to understand what I did wrong here. Please help me ?
 
12:47 PM
@All - Can anybody help me here please ?
 
dat wall lol
 
@vikky apparently not
 
...
 
@AwalGarg Good call.
 
;p
@vikky bro sorry, I want to help but I don't use angular.
 
12:50 PM
@AwalGarg : Thanks Awal
 
so many people come here with library related problems. few do with VJS questions, out of which, I can only help few because of my limited knowledge.
 
@AwalGarg vanilla.js is easy
 
@JanDvorak and causes lesser problems. still people run for libraries and crap
 
Hi ! What's the offical way for parsing something like "12.23px" into a int or float variable?
container.style.left  // "12.23px"
container.style.left.toFloat() ?
 
> official way
?
 
12:57 PM
!!>parseFloat("12.23px")
 
@JanDvorak 12.23
 
better yet: don't read styles
 
@JanDvorak ok! I did not know if I should remove manually the two last letters "px" and then toFloat() or parseFloat() .... thanks for the answer
@JanDvorak why ?
 
@Basj separation of concerns. Your javascript shouldn't be worried about presentation.
 
@JanDvorak ok
 
1:16 PM
@vikky Oh I see. You wish me a good evening when you need something. I see how it is. ;)
@vikky Why would you expect greeting to be undefined? Lets start with that
 
music I should listen to anyone?
 
@towc I"m currently listening to Celtic Woman
 
good choice
 
@towc Me First and the Gimme Gimmes
!!youtube Me First and the Gimme Gimmes over the rainbow
 
1:22 PM
ahh now I think it will have to be a punk cover kinda day
 
@rlemon if I didn't know that there is a whole culture thing behind this song I would really be scared
at first I didn't get it was a cover, and seeing that girl with that voice...
 
ahaha
they cover songs you wouldn't think would sound good as punk
@towc you haven't seen the original Wizard of Oz?
 
@rlemon don't think so
 
watch it
 
I've only seen the sequel
 
1:24 PM
it is a good movie
 
oh! I did watch it
when I was 4 or something
didn't understand much
 
Man, Dorothy sure is an uggo
 
@rlemon Have you ever tried combining multiple canvases using <ifame> to see if there is any performance improvement?
 
why use an iframe?
 
well, currently I'm trying to do the homework I didn't do in the summer, so can't watch much right now
 
1:26 PM
Because I am wondering if they use different threads
 
use webworkers to do heavy calcs
passing between iframes sounds messy
 
So apparently using __proto__ is really slow. I have to rework some stuff then when I get home.
didn't mean to make that bold
 
That way you still have to draw on the main thread. It's just a thought. I think I might give it a shot
 
__proto__
 
Yes, that lol
 
1:27 PM
@Schoening webworkers is probably a better idea
seeings how, you know, that is what they are for.
@towc
 
A webworker can't draw onto a canvas
 
@Schoening no, but drawing to the canvas shouldn't be a performance restriction. doing the calculations generally is
 
@Schoening it can
can't it?
 
No
 
seriously. I've never had performance issues drawing
 
1:28 PM
not directly, it'd have to message to the main script the canvas again, but it can
 
issues are almost always doing calculations
 
@rlemon that's what kills most of my games
 
then you are doing it wrong :P
 
95% of the script runtime for games I did like dastul and systic are occupied by drawing
it can probably be enhanced by a lot, but it would still be pretty slow
 
@rlemon what if you have a lot of instances to be drawn?
 
1:39 PM
You could write the pixels into an ImageData array in web worker
Wouldn't recommend it, because there are far better ways of drawing a circle
 
Woulndt I have to pass the ImageData object between the worker and main thread and create a lot of garbage :o ? This is all hypothetical anyways.
 
@Schoening Hmm, You could just as easily use UInt8Array
Make it 3 times as long for red, green, and blue
 
Same thing tho, right? That buffer is thrown out after I send the data to the main thread?
 
everytime I read 'greek mathematicians' i process it as 'geek mathematicians'...
I already imagine myself going to the teacher saying:"the geek mathematicians discovered this and that"
wikipedia article about trisected angles:
> Angles may be trisected via a Neusis construction, but this uses tools outside the Greek framework of an unmarked straightedge and a compass.
wiki article about neusis construction
> The neusis is a geometric construction method that was used in antiquity by Greek mathematicians.
I'm confused
didn't they just say that it couldn't be used by greek?
 
how should a signup page look like?
 
1:54 PM
@AwalGarg Clean and simple
 
@AwalGarg like a signup page
 
Without asking for too much information
Use OpenID if possible
 

« first day (1437 days earlier)      last day (3515 days later) »