« first day (1434 days earlier)      last day (3512 days later) » 

9:00 AM
Mornin everyone :)
 
@BenjaminGruenbaum Apologies, but your blackfriday tricks no longer foil jsh
 
@Neil this I'm aware of but I want to add Q1 2015 if last quater is Q4 2014 else just incement the Quater
 
@Zirak wanna see me bypass it?
 
@BenjaminGruenbaum Yes!
 
9:02 AM
(...I really need a better url)
oh, where did you say does Paul Irish can be found on irc?
 
#fuckjavascript
 
@copy ?
 
Just sayin'
 
@AwalGarg regex101.com/r/mJ0gX9/1 for some reason it is valid here, but at the same time WebStorm doesn't like it this way and accepts only if it is like that regex101.com/r/mJ0gX9/2
 
9:12 AM
@Zirak addy osmani and on #yeoman
@Zirak once I assign to window.location it sort of freezes and all the following commands don't give me any feedback
 
@BenjaminGruenbaum Thanks, but why Osmani and not Irish?
 
@Zirak because I don't know how to find paul irish on IRC and they're about as useful in this regard :D
Paul Irish responds to tweets very fast though, I've seen him on IRC every now and then but it's not very consistent
 
@BenjaminGruenbaum Yes, you're changing the location, for one it might not be the same origin and then there's how the frame's probably not listening to the messages I sent it.
 
@Zirak then it should at least warn me.
Also, why doesn't it play the song then?
If I actually do switch the location it should play the song
 
Player bugs out because of origin stuff
 
9:17 AM
Oh, why would something like apt-reference-695.appspot.com/2e5up not work?
 
That actually is a good question, I don't know
createElement version does
 
Interesting
 
@BenjaminGruenbaum You lied to me, he's not there
 
Hi ! Still about my text map project, here is the latest version : s419743653.onlinehome.fr/things/…
I don't understand why window.onclick = function(e) { (line 36) doesn't work...
If the user clicks somewhere, a new SPAN should be displayed, why doesn't it work ?
 
9:28 AM
@BenjaminGruenbaum Are you still doing .NET stuff?
 
@Basj Your new span has no content
 
@AwalGarg okey. I think I got it finally.
 
It's there, you just don't see it
 
@Zirak I updated with content, but it's the same
 
If you do something like tb.textContent = 'blah', I can distinctly see the span in the top left
 
9:32 AM
@Zirak really ?
@Zirak oh that's right : it works... when zoom = normal.... If I click, a new textbox appears.... But if ZOOMED (with mousewheel) , when I click the textbox is badly positionned, do you have the same problem ?
 
uh, not really
Since you're just setting it to the top left, not much can go amiss
 
@Zirak, I just updated the file : http://s419743653.onlinehome.fr/things/TextboxesOnClick7%28Shmiddty%20powerful%20solution%20+zooming%29.htm

Can you try this : load the page, zoom out (mousewheel), then click on the background.... Is the textbox in a bad position ?
 
Yeppers
 
What's wrong ?
 
@Kippie yeah
 
9:39 AM
@BenjaminGruenbaum Mind having a really quick look at a question I posted that's not getting any answers?
 
@Kippie sure
 
0
Q: Need help understanding locking in ASP.NET

KippieI'm having some trouble understanding the basic concepts of locking in a multi-user / web application. When a user gets authorized by our federation, he'll return with a username claim, which we'll then use to retrieve some extra info about him like so: var claimsIdentity = (ClaimsIdentity)HttpC...

It seems like a common thing to do, but I can't figure out how to correctly handle concurrency in this case
 
@Basj Something in your code. Good luck
 
hello guys Does any one have used the Jail Plugin for lazy loading
 
@Kippie why are you locking?
@Kippie first of all, we avoid the asp.net identity provider so I haven't used it in about a year, still I don't understand your code too well
@Kippie I'm pretty sure asp.net locks it for you anyway so you don't have to lock it, but you're right that it's slow.
 
9:47 AM
Well, currently I'm not.
The problem is, the call to `retrieveUserId` could take some time.
So if a concurrent request by the same user were to occur during that call, `claimsIdentity.HasClaim(CustomClaims.UserId)` would still be false, meaning it'll retrieve and add twice
 
@Kippie are you sure HasClaim isn't thread safe already?
Ah wait, I get what you're doing nvm
We avoid httpcontext.current and all that, it's all kinds of clunky and uses globals and they'll probably kill it in asp.net vNext anyway.
 
javascript is not wonderful
its vanderfool
 
@QuanticProgramming Yes it is. It's also horrible but it's definitely wonderful :D
@Kippie whenever you have a doubt whether or not you should take a lock - take the lock and worry about performance later. Concurrency is hard to reason about, I've been writing multithreaded code for years and I'd definitely take the lock.
 
I don't disagree with you there, but it doesn't really matter in this case, I believe?
I could always use the CurrentPrincipal on the thread, but that would get me the same problems, I believe
@BenjaminGruenbaum In a normal sollution, I would agree, but the back-end developed by an external party is based on AX, and it's slow as all hell. Retrieving a user by an id could take up to 2 seconds (I wish I was kidding.)
 
@Kippie then instead of locking it lock a boolean (or use an atomic) and if you're already trying to claim a userid return an appropriate response (likely a 503)
 
9:54 AM
Current code is modified to do an extra check to hasclaim *after* retrieving the userid, and then either add or update it.
Still has a small chance of causing some issues, but should mostly be safe as everything happens in-memory, and as such is fast
 
lock {
    if(tryingToMakeClaim){
        skip following code and return 503 status, service not available - try later
    }
    tryingToMakeClaim = true
}
try {
    expensiveCodeActuallyMakingClaimAndLoggingIn
} finally {
    tryingToMakeClaim = false
}
Only, not with a boolean but with a Set containing userIds currently making claims.
 
Ah, like that
 
@Kippie I still really don't like it :P Do you recognize the actual concurrency problem with your code there?
 
@BenjaminGruenbaum Yeah, of course. It's just that I don't see any alternatives :p
 
@Kippie Trying to make the claim and checking if you have a claim are not one operation. That's the core issue.
I don't know how claims work or why you'd choose to use them, but I'm sure there is a way to do that.
Also, there is no reason whatsoever that retrieveUserId by name should take more than 50 miliseconds.
 
9:59 AM
@BenjaminGruenbaum Oh, neither do I. But WIF just supplies me some claims through SAML2, and I just add on that
 
Unless you have like more than a billion users.
 
http://stackoverflow.com/questions/25928088/how-to-stop-jquery-jail-plugin-to-reload-the-images-once-images-already-loaded

Please Help me out any one
 
Even with a billion
 
@BenjaminGruenbaum Yeah, the problem is there's not a specific call for just that. What it does is find a CUSTOMER based on a username, then aggregates all of his info in different tables, and returns a huge-ass object from which we only need one ID
I could ask for an RFC for this specific thing, though they'd probably charge € 40k for that, and we'd have to wait for the next release, being in march
 
Javascript is wonderful, but when you have such problems : stackoverflow.com/questions/25931263/… .... it really s**ks
 
10:03 AM
@Kippie It sounds like more than the API is broken if you have to wait for march :D
@Basj what does that have to do with JavaScript as a language?
 
@BenjaminGruenbaum Yeah, I've pretty much stopped caring. I'm only here as a consultant and I've made my opinion about the back-end clear enough times already. Now I just do as told, and tell the business off when they complain about performance
 
@BenjaminGruenbaum Nothing, but if JS was really wonderful, it would solve all surrounding problems ...
 
@Kippie ok then, but it sounds like whatever you're doing is fundamentally broken. Just so I don't sound ambiguous. This is not how you'd go about doing what you're doing in ASP.NET in general.
 
9 mins ago, by Kippie
@BenjaminGruenbaum Yeah, of course. It's just that I don't see any alternatives :p
But I'll talk it through with my colleagues on monday
 
Lol, I've seen enough broken systems to know it's usually a management problem
@SterlingArcher ^ about pre-emptive slaps
 
10:26 AM
How can i get the weight of Json object ?
4
in MB
 
@samitha A rough estimate or precise estimate?
 
@samitha What?
 
I'm doing an exam system with angular
and i'll use an object
i'll save it in the local storage
i know that local storage allow 5MB
i need to know rough estimate ?
@Neil
 
So, you want to know the size of the string that serializes the object?
 
yepz
 
10:30 AM
...you want to know how big a string is?
Tomfoolery at best
 
yeah
 
Like the length of an array, it's impossible to know
 
Length is a rough estimate, but it is at least that many bytes
Of course that doesn't help you much
I don't think you're really supposed to know. That sort of falls into the realm of implementation details
 
Ok so i'm working with this
i tested
@Neil will do something if necessary.I don't think never my object >> localStorage
 
@samitha Call it a limitation of javascript if you want
I don't think you should really expect such a scenario to occur
 
10:36 AM
what kind of think ?
 
It is a bit like allocating a strip of memory c++. It is perfectly possible that you can't obtain anymore memory, though not likely, unless memory is almost entirely consumed or you're asking for an extraordinarily lot amount of memory
 
i almost finished with it @Neil
i can run my question view layout with the local storage now
running 40 question through it
 
@samitha Nice that you incorporated it into angular like that
 
This is the console.log of localStorage object
if i restart the PC it kept as it was
@Neil
what do you think ? can i success my project with this architecture ?
 
10:42 AM
@samitha How often do you save?
You may get tremendous slowdown if you do it often since you have to serialize
 
how often mean ?
 
dat room name
 
@samitha I mean, if you increment counter, according to your example in angular, do you save?
By save, I mean, do you serialize the object to json and assign it to localStorage?
 
$scope.goExam = function(){
       $http({
            method: 'GET',
            url: 'php/index.php',
            params: {
                'course': 'DIBM',
                'module': 'DIBM-001'
            }
        }).
        success(function (data, status, headers, config) {
            $scope.$storage.quez = shuffle(data.AutoView.getSelect.question);
        });
};
@Neil what i do is here
 
@samitha So you save whenever you get information from the server? That's not terrible
I'm just thinking you ought to make a scenario where you're sending a lot of data
Is it going to slow everything down?
 
10:54 AM
not yet really
 
Can we close when the code is just a bunch of syntax errors ?
-2
Q: Complex jQuery if statements including operators

user3246460I would like to show a different div depending on what class my 3 span elems contain. If all span hasClass up or up1 the code would show a div with class allUp . If it hasClass up up1 and down then it would show a div with class twoUp. I wrote the following, but of course it doesn't work. var $...

 
@dystroy Off topic because of typos is what I'd do.
It's unlikely to help anyone ever.
 
yeah, people please close that
I don't know if this question should be answered or closed but if it should be answered then @Pointy's comment is probably at least half the answer. Maybe the other half would be that you can't write a script just by writing a bunch of random lines of code you don't understand and hope it will somehow work. — dystroy 2 mins ago
 
11:13 AM
@dystroy closed
 
11:31 AM
Is there a shorthand for "test if this variable exists, and if not throw an error"?
Something like var x = x || throw new Error(...) only that obviously doesn't work.
 
if (!x) ...
I don't know why you'd want to use anything other than an if
 
@SecondRikudo just use the variable
if it doesn't exist, it'll throw a referenceerror
 
@FlorianMargaine It's a parameter in an object that gets translated to a query string and gets sent with an API call
So qs will translate an empty value to ...&apiKey=&...
Which is unfavorable.
 
user image
4
 
@Zirak Spam Spam
 
11:34 AM
@Zirak lol
wondering why this doesn't work
var s = false || throw new Error('test');
SyntaxError: Unexpected token throw
var s = false || (throw new Error('test'));
SyntaxError: Unexpected token throw
var s = false || (throw new Error('test'), false);
SyntaxError: Unexpected token throw
 
throw is a statement, not an expression
Same reason you can't use return
 
js sucks
13
 
11:36 AM
Yes, yes it does.
 
All hail typescript!
 
I want everything to be an expression
 
!!s/js/C#/
 
@SecondRikudo C# sucks (source)
 
@CapricaSix That's simply not true
 
11:36 AM
Somewhere, right now, BenjaminGruenbaum just got goosebumps.
 
y u lyin to me gurl?
 
C# sucks less often than JS
 
var s = false || function(){throw new Error()}();
 
meh, most languages suck on this point: most have statements
 
:X
 
11:37 AM
@Mosho Also won't work, tried it :D
 
works for me
 
!!> var s = false || function(){throw new Error()}();
 
don't know why it wouldn't
 
@SecondRikudo "Error"
 
11:37 AM
^
 
(that means it works lul)
 
or... you know... the readable kind...
 
When I tried that it didn't work :o
 
var s = false || errorout('yo');

function errorout(message) {
    throw new Error(message);
}
 
though having all errors come from the same line could be annoying
if (!(s = false)) throw new Error()
derp
 
11:47 AM
13
Q: Why is it a security problem not to update ones browser?

ThomasI was hoping that someone could explain if it in general is a security problem not to update your browser. Firefox constantly prompts me to update my browser, but how dangerous is it to not update? As part of this question, I would like to know what that problem exactly is. What are the risks of...

security.stackexchange is really on a roll with Common Man questions.
There was a hilarious one some time back, about whether you can't be served viruses over https
 
ahahahahahah
 
Laughing not allowed
I want to hide/show fruit's description
based on the image clicked
but I am terrible with selectors
 
@CustomizedName hahahahahaha noooooob lololol
 
12:04 PM
how can you call me a noob :O, I gonna do it myself now, watch ! :P
 
@CustomizedName This is why lorem ipsem was invented. To prevent programmers everywhere from looking idiotic.
Though just being sympathetic, not poking fun. :)
 
@CustomizedName jsfiddle.net/76NNp/61
it'd be better if the td with the description had a class, but well
 
@Neil it took me ages to understand it's a dummy text, I thought it was some classic novel with old english words lol
 
@CustomizedName I thought it was latin, imagine my surprise
 
console.log( <%= JSON.stringify( data ); %> ); converts quotes into &quot;
@SomeKittens why?
 
12:12 PM
Automatic encoding?
 
http://jsfiddle.net/76NNp/63/

Wouldn't this be better ?
 
@Zirak seems like it
to the ejs docs!
:zooms off to docland:
@CustomizedName s/click/on('click' and s/closest/parents
$(".aaaabbbbb").on('click', function () {
    $('.fruit-Descr', this.parentNode).toggle();
});
probably even better
jQuery is funny.
 
@rlemon I still love it xD
 
!!s/it x//
 
@KendallFrey @rlemon I still love D (source)
2
 
12:16 PM
she sure does
 
I was in favour of space exploration until I realised what it'd mean for date time libraries
 
@CustomizedName it.. doesn't work?
@KendallFrey LOL
 
@FlorianMargaine I wanted to hide and show description, not the icon itself :(
 
Hi All, Good afternoon.
 
@vikky Afternoon have a nice morning :)
 
12:20 PM
I am new to writing Karma test cases.
just I have been try to write test case for angular custom controller but I am getting
Error: [$injector:unpr] Unknown provider: $routeProvider
@CustomizedName : GA.
Can we please help me if we have aware of this.
 
@vikky who is we vikky :P
I would help you
but I am going on break :(
 
first week of school? The Past
 
@vikky routeProvider isn't part of the standard angular library
You need to download it and add it to your page as a separate script
 
THIS SONG
 
12:36 PM
@rlemon check out your pings!
 
saw it on the can this morning
you always give me the best friday morning poopin music
 
@mikedidthis We'll flip for it :D
Free T-shirts are awesome
 
@rlemon lol
 
@SomeGuy nah, you have it man :D
 
@SomeGuy fuck that reminds me
I still haven't replied to Tim Post
 
12:38 PM
@rlemon Hahaha, it's been a while
 
just did
had to start the email with "Wow, I'm really bad at this email thing"
 
@Neil : Yes I have done that. Still no luck.
 
!!refresh
!!mute
 
@Zirak That didn't make much sense. Use the !!/help command to learn more.
 
@Zirak : Yes I done that and restart the karma.
But no luck Zirak
 
12:42 PM
Mute and unmute removed, hurray
@vikky uh, what?
 
\o/ I'm less fat now!
 
@SomeGuy They said they had 150 floppies. Maybe both of you can have 1, since most teams are of only 1 member
 
I've also simplified the command argument parser, it won't flip out on single quotes anymore.
 
Let's see!
 
!!tel rlemon isn't that awesome?
 
12:43 PM
@rlemon isn't that awesome?
 
!!tel Zirak yes, 'tis!
 
@Zirak yes, 'tis!
 
Before it would've thrown some archaic error
 
!!sandbox
 
You know, there was this funny idea once upon a time that people were supposed to test out commands and "play" in the sandbox
 
12:44 PM
ha, I'm so clever
 
no you arn't
 
@vikky Did you add ngRoute as a dependency of your module?
 
:'(
 
!!tel us about subliminal advertising
 
@us about subliminal advertising
 
12:44 PM
var app = angular.module('app', ['ngRoute']);
 
I'm watching some talks on youtube for javascript, and some guy is talking about ES7...
I guess they're shooting for annual releases now
 
@BenjaminGruenbaum github.com/Zirak/SO-ChatBot/issues/204 still interesting?
@NickDugger Yep, there're plans for ES7 already
 
annual releases ???
 
...no
 
I dunno if this guy knows what he's talking about
 
12:48 PM
do we have a definitive date for es6 yet?
 
6-8 weeks
 
es7 is in planning, I don't think anything is in any release cycles
 
It's not
 
are you sure?
Dugger says it is
 
Yes
 
12:49 PM
@NickDugger liar.
Zirak says you lied
 
No, I'm saying that some guy I'm watching on youtube is saying that it is. DOn't blame me
 
too late, blame put
 
> I guess [...]
 
technically if has a name, there is the intention to eventually come out with es7, so by definition it is in planning
 
Just relaying what I'm listening to. Don't get your undies in a bunch
 
12:50 PM
if only I wore them
 
Instead of eating them
but hey, commando simplifies the whole slide deal
 
flavoured undies
 
I've gotten to the point where I have to have coffee. I skipped coffee after lunch and my eyelids are closing
 
@NickDugger mine are
 
12:52 PM
Mine aren't edible, and they taste like poop
 
I think mine are the same
 
hot exit
 
@NickDugger You know you have to wipe when you're done doing poo poo.
 
the star queue is looking so interesting right now :D
> js sucks
 
@Neil wipe what? I just go at my desk
 
12:53 PM
lolololol
 
inb4flag
 
@KendallFrey I considered that, though I don't think I would have said it :P
 
Lobert Remon
my name isn't as interesting with the first letters reversed
 
Dichiel Mommerholt... Wut
 
12:54 PM
Fendall Krey
 
Heil Narmon
 
o/ ~ Heil Narmon!!!!!
 
o/ ~ Great leader!!!!!
 
o/
 
o/ ~ Lend me your ears
 
12:55 PM
o/
 
I gotta change my name
 
Should we close this ?
0
Q: Why all Open Source CMS ignore Foreign Key Concept?

Nitin SrivastavaAs a programmer I have always been trained and told that we should always design proper database structure and make sure that indexes, foreign key constraints etc are followed. I have used OpenCart, Magento, Prestashop, Wordpress and the surprising feature is - None of them have Foreign Key used ...

 
Goddamnit, Neil, you combo breaker :P
 
yes
@Cerbrus great leader can break whatever great leader wants.
 
12:56 PM
@Cerbrus *best Schwarzeneggar voice* I'm Heil now.
Welcome to Heil.
 
Heil, oh.
 
The welcome one is better :P
 
Heil go far in life.
 
Eh, nah... Too bad
 
@Zirak you got a script to clean up the access tab?
 
12:59 PM
@rlemon uhrm, maybe. It's on me.
 
we can probably axe the explicit crap
someone had a script
can't remember who now
 
I wrote one quite some time ago
 
Watching this javascript talk... I'm realizing how much I truly don't know, and now I feel like I know nothing.
 
what talk?
 

« first day (1434 days earlier)      last day (3512 days later) »