« first day (1670 days earlier)      last day (3296 days later) » 

11:00 AM
you run the scripts on node?
 
Plus a lot of my stuff is in powershell
Which is just awful
 
@Neoares because cgi is meant for the... web, I think.
inb4 @FlorianMargaine corrects me on that
 
THE
omdays
you show people what you want they still don't understand
 
@THE We tell you what to use and you don't understand. We aren't going to write it for you.
 
THE
@RoelvanUden this is what i wanted
@AwalGarg my code reviewer tell me if i could improve it - jsfiddle.net/t77remtc/7
heard you are really good at it ;)
 
11:06 AM
@THE I am not your code reviewer but that fiddle is horrible :P
 
canvasjs.com/forums/topic/graph-a-csv-file/page/2/#post-8714 Can someone , help me auto update of my read file in this (last post)
 
And going against what I previously said, jsfiddle.net/t77remtc/11
 
@BenFortune @THE this is what it should be
 
You're not going to get them all on the same row unless you have 3 columns
Unless you want to make it really messy and split a td into two
 
THE
@BenFortune what ? I want them in a same row doesn't means I want them in a single line...
 
11:11 AM
@THE Do you know what a row is?
 
@THE same row => single line
a row is a line
 
THE
here we go again, where is common sense gone people ?
 
Common sense is hard when you're using words you don't understand.
 
Is the factory pattern useful in JS?
 
THE
@BenFortune world is so calm and nice when I put you on ignore, i just unblocked you, but going to do that again, bye bye
 
11:13 AM
@StevensHaen yes, why?
 
@StevensHaen Well, is the factory pattern useful for what you need to do?
 
SO needs an age limit.
 
THE
@JanDvorak exactly
 
@BenFortune it's 13
 
I dunno if you can just answer such a qustion with "Yes". It's personal preference I guess. I myself would call it useful.
 
11:14 AM
@BenjaminGruenbaum How did @THE bypass it then? :p
 
@JanDvorak I know they're widely used in class based OOP, wasn't sure about JS
 
@BenFortune oh wow unfunny snark I'm so impressed :P
 
@StevensHaen Sure you can have classes in Javascript
 
@BenFortune If you don't like @THE just don't interact with him. If you feel he's doing something wrong like vamping to much ping a RO and they'll make sure everything is under control.
If you want to insult him, please do it in a funny way. These things are only good if they're funny.
 
Lacking originality, sorry :)
Would've thought ignoring would work both ways
 
11:17 AM
wow, zoomed into jsfiddle at ~200% and it looks... prettyish.
 
@StevensHaen yes, it is useful, when you need to "prepare" the object when you initialize it.
 
THE
@BenjaminGruenbaum He is insulting me since I met him here and not even in a funny way, I am happy to keep him on ignore from now on, nothing personal but don't like people who pick up every single word you say
 
@tereško I looked at an example, and to me, the advantage over the constructor is that just by checking for one property it supplies the instance with the rest of them
 
@THE ok then.
 
I'm pretty sure this is the second time we've interacted, but okay.
 
11:19 AM
@StevensHaen that's not what factory is for
 
@tereško If we have different types of objects we'll like to instantiate on different occasions, no?
 
could you stop obsessively editing one single line ?!
3
 
@tereško OCD it's called
 
> the advantage over the constructor is that just by checking for one property it supplies the instance with the rest of them
 
THE
@tereško hahaha
 
11:21 AM
this has nothing to do with factory pattern
 
Could you elaborate?
 
which word ?
 
what is the factory pattern again? blatantly hiding the new keyword beneath a function call, right? ~_~
 
which is the best way to run javascript on linux servers? nodejs?
 
@AwalGarg It's more to it than that
 
11:24 AM
yes, or iojs is you want moar es6
 
It's giving you a seam with which you can control the creation of objects.
@Neoares iojs
 
@AwalGarg while it decouples your code from new, it also has useful properties: it lets several instances to share the same dependencies (like DB connection abstraction) and lets you perform operations on the instance before releasing in int the general application.
mind you, it is considered a bad practice to put "logic" in the constructor
 
@Neoares nodejs or iojs for headless, nwjs for guis ;P
 
IMO Electron > nwjs
 
@tereško but in JavaScript we can already share dependencies between instances via prototypal inheritance
 
11:27 AM
@BenFortune Oh yeah I've been reading about this, but it's not quite as straightforward to use as nwjs, is it? Mind you, I have no experience with electron. You can easily make binary bundles w/o having to compile and shit?
 
@AwalGarg yes, which is why I originally mentioned only the "prepare" part
 
@tereško also I am not sure what you mean by the second point, I am a bit of a noob at design patterns. Somewhere I can read about this in a bit less technical language?
 
lololol... just had a quick look into main_out.js from agar.io. The guy who created that has some questionable skins in there :P "hitler;german empire;satanist;nazi;stalin;prussia;isis;
wtf
 
@jAndy The gist I showed you had all the skins :p
 
@AwalGarg I personally liked this one: books.google.lv/books/about/…
 
11:29 AM
@RoelvanUden They're packed pretty much the same as nwjs are
 
I didn't read the gist completely, just found the variable in code
 
I find the API nicer than nwjs
 
@tereško nice, thanks
 
@BenFortune Ah, cool. I'll read up on Electron :)
 
Though wow, the lastest version of nwjs has added some really nice stuff: groups.google.com/forum/#!msg/nwjs-general/IqfH1RXNGlw/…
tl;dr Supports print preview, chrome apps and rich notifications
 
> Employees will never be poked with a sharp stick
 
"20+ days vacation" <-- lol wat
 
@darkyen00 will they let me write and expose a rest api for chat? :P
 
that's the legal minimum you can have over here
 
._.
in spain we have 30 natural days
 
11:47 AM
@AwalGarg dunno
@RoelvanUden i dont wanna know what they mean
 
Last year I took 8 weeks ^^
 
@ivarni Lol yes, and a lot of the other "advantages" are also normal here.
 
We get 28 days here
 
but hey, they won't poke you with a sharp stick
 
^
 
11:48 AM
In computer programming, an indent style is a convention governing the indentation of blocks of code to convey the program's structure. This article largely addresses the free-form languages, such as C programming language and its descendants, but can be (and frequently is) applied to most other programming languages (especially those in the curly bracket family), where whitespace is otherwise insignificant. Indent style is just one aspect of programming style. Indentation is not a requirement of most programming languages, where it is used as secondary notation. Rather, programmers indent to better...
 
nerd version of gagnam style?
 
@FlorianMargaine hahahahaha
user image
6
 
oh god
 
^ python programmer writing java
 
Love that image
 
11:50 AM
Omygawd
 
:D
 
hahahaha
 
That image is making me twitch
 
First i was like Oh for gods sake is this c++ 3011
then i realized the braces
 
I bet there exists a formatter to format all your code like that :D
 
11:53 AM
@AwalGarg inb4 PCG question
 
Minor edits are a PITA
could two other users here accept the edit of this question so that real edits get possible ?
0
Q: bluebird promises - how to return a promise out of callback?

Novellizatorlet's say I have the following function chrome.cookie.getAll({domain: 'google.com'}, callbackFn) where callbackFn should return all the cookies available now I have a big main() function(I must have this function) and this function must return the cookies of the given page(as a promise). How...

 
What if Windows went open source tomorrow?
Productivity would drop to zero due to laughter?
 
I approved
@dystroy why don't you just shortcircuit edit it?
 
@AwalGarg Because I can't (or because I'm too stupid and don't know how to do it)
 
@dystroy uh, why? You have over 2k rep right?
 
11:55 AM
@AwalGarg The pending edit locks the question
 
@dystroy instead of approve, select edit and approve
 
I suppose I need 1M rep in order to be able to bypass that
@AwalGarg too late
 
@darkyen00 Why would it provoke laughter?
 
@dystroy it's a dupe bro
 
11:57 AM
@BenjaminGruenbaum This closing towards a gigantic wall of doc feels like a RTFM
 
@RoelvanUden are you a microsoft fan ?
just wondering.
 
I'm more and more disliking those reference QA...
 
@dystroy it's not a RTFM and it's not a wall of doc, it's just 4 cases of converting APIs to promises in short code samples. One of them fits OP's case perfectly.
If you think you can explain the issue better - please do post an answer on the canonical. We gain nothing by hand-tailoring answers to the OP and everything by having strong references to point people to.
 
@dystroy yeah that's what it felt too, but dunno how SO should handle that. It's technically a duplicate, but I know I'd hate to be redirected to this canonical if I had a simple issue as this one
 
It would have been better with a focused QA. You're doing the job of blogs, not of SO
 
11:58 AM
I have <h1>Title</h1> and siblings <p>text here</p>, How can I wrap both of them with a div?
 
jQuery has nextUntil
 
with jQuery
 
@dystroy it is a focused QA, its focus is exactly these cases.
@FlorianMargaine but the canonical is about this simple issue.
 
@BenjaminGruenbaum I think closing like this should not be a "duplicate" because the question is not really a dupe. It should be more like - "closing so that the better content can be promoted, edit if you still feel those answers don't help"
 
@BenjaminGruenbaum and the answer is 300 lines-long
 
11:59 AM
@FlorianMargaine yes, but the OP can easily go to the part relevant to them.
@AwalGarg it is, OP is asking how to use a callback API as promises.
 
jsfiddle.net/Laep48ug - I wanna wrap it with a div
with jQuery
 
This is just like the closure loop question - sure, we can solve every single one but a lot of stuff gets missed if we do.
 
I am using generators and promise.coroutines now
code have became so much much much much readable
 
1 min ago, by Jan Dvorak
jQuery has nextUntil
 
A good answer should do many things in this context, it should point people to the canonical async Q&A in case they don't even know how async execution works, it should point to people in broad terms how promises work, it should point out there are different conventions and so on.
 
12:01 PM
@BenjaminGruenbaum from your pov, it is. Because you and I know the answer. OP doesn't.
 
If you want to rewrite that over and over then meh.
@AwalGarg from OP's PoV
!!afk
 
!!tell user jquery next
 
can you help me with the jsfiddle i have, so i see the example
 
@JanDvorak you just pinged ~5 users with that :/
 
12:02 PM
there is also the .wrap() thing
 
Is there a keyboard shortcut for selecting the address field in Chrome?
 
@AwalGarg They should have a name
 
but i want to wrap more than 1 thing
 
wrapAll
 
@darkyen00 A fan? Hmm, not exactly. But, admittedly, I have a preference for quite a few Microsoft products, including Office, Windows, Visual Studio, Azure, TypeScript and .NET. I don't categorize myself as a "Microsoft is the best thing ever!"-kind of guy though (as seemingly ever Apple product consumer is for Apple).
 
12:04 PM
a more manual solution would be to place them in a new div and then place the div where they were
 
but it's a different, i have h1 and p
and i want to wrap 2 different things
 
!!tell user jquery wrapall
 
@JanDvorak Command wrapall does not exist. (note that /tell works on commands, it's not an echo.)
 
anyway, that's not what i need
How can you wrap 2 different classes?
 
@darkyen00 That's a good read though. It can be interesting, but also potentially a disaster. :D
 
12:06 PM
@BenjaminGruenbaum TBH your QA is good and helping. And I'll probably use for closing next time.
 
@dystroy BenjaminGruenbaum is afk.
 
.wrapAll( wrappingElement )
you can use a selector
 
@CapricaSix I know but he'll read it later, shut up
 
I like the hello world example by jQuery
 
@RoelvanUden i hate everyone equally
 
12:08 PM
!!info
 
@rlemon I awoke on Thu, 07 May 2015 12:36:42 GMT (that's about 5 days ago), got invoked 349 times, learned 336 commands, but forgotten 2 commands
 
<p>Hello</p>
<p>cruel</p>
<p>World</p>
 
FF, just running cap in the chats, 5 days old. 800meg memory
 
Does returning true/false from a promise resolve it?
 
@dystroy does cap ping a user repeatedly for afk messages? Can you ping benji once more?
 
12:09 PM
@BenFortune no
 
@rlemon profiler ?
 
@BenFortune example?
 
@darkyen00 I can't be bothered to piss around with firebug
 
@AwalGarg I can't
 
return this.getRole({include: models.Permission})
    .then(function(role) {
        if(permission === role.name)
            return true;
        if(role.Permissions.map(function(perm) {
            return perm.name;
        }).indexOf(permission) !== -1)
            return true;
        return false;
    });
 
12:09 PM
@rlemon firebug is not the dev tool anymore isit ?
iirc it was an addon
 
what should it do for you?
 
w/e FF's dev tool is
it sucks
 
@dystroy ok... ._.
 
@BenFortune how would you use it?
 
@Neoares but i have 2 selectors, that's the problem
 
12:10 PM
user.can('edit_user').then(function(access) {

});
 
@rlemon just go to the performance tab and start recording
 
I am installing ffox now
 
@user 2 selectors? I only see 2 html elements
without ID or class
 
computerworld.com/article/2893514/… lets help an endangered specie
 
12:11 PM
TBH, results from the FF profiler are more streamlined and less junkier than the chrome ones.
 
@BenFortune yeah, that works
 
but chrome gives slightly more detailed reports
 
@Neoares I have the h1 and the p
I can't add class that's the problem
 
why? :S
 
I need to wrap it with jQuery
because i don't have access to the HTML file
now do you understand my situation? : )
 
12:14 PM
@AwalGarg I'm not recording and analyzing 5 days of profiles for cap
I know the chat has memory leaks
 
you can select h1 and p
 
@FlorianMargaine I'm #1 js .... in my city
Canada	128 / 7 084
 
@rlemon noice
Common Lisp ranking
Grenoble	1 / 1
France	4 / 42
Worldwide	302 / 3 120
Repos : 	13
Stars : 	10
 
@Neoares how?
 
12:18 PM
no.. that's not what i need
never mind, i'll figure it by myself
 
I know but you can use it
there is no way to do it if there are more h1 or p elements
 
what is this stupid ass love for document ready?
I never understood why everyone is so insistent on needlessly wrapping code in document.ready
 
it's OP as hell
neither me
 
@rlemon so that you wait for the document to load
 
but sometimes is useful
 
12:20 PM
$(function(){
    $("h1").click(function(){alert("click")});
});
you just did
 
I just used his code
 
@JanDvorak yes, I know what it does.
 
that was a version
 
@Neoares why? move your code to the end of the body. I'd rather structure my code to execute proper than tell parts of it to wait.
 
he said he doesn't have access to the HTML source
 
12:21 PM
@MadaraUchiha argues that your code should work whereever you place it. I disagree.
 
I also never understood that one. when do you guys not have access to the HTML on the page you're working on? and if this is a userscript you can inject the code anywhere.
@AwalGarg yea, that is stupid imo
 
@rlemon cms retarded users...
 
@FlorianMargaine github-awards.com/…
 
@rlemon woa, so many stars
 
@dystroy do feel free to post another answer there or edit mine. I want to improve it - I just want to remove duplication of content
 
12:24 PM
hmm, that site says I have 1 star. I don't think I have any :/
 
@FlorianMargaine ha! fork a super starred repo, make a change. boom. thousands of stars
just checked js in "waterloo" (the city I work, has two universities, so more programmers)
 
It says I have 4 repositories but I actually have 3 public ones and 3 private ones. what is this.
 
those top users have forked repo's giving them the stars
 
@rlemon uh? no
 
12:28 PM
phonegap is from new delhi india?
 
@FlorianMargaine yea nvm.
I just noticed it said bootstrap-modal and not bootstrap
damn sonsofbitches.
I need to setup up my git game
 
lol... even in my town I'm not among the highest ranked users on badly known languages ^^
 
I would be 5th in the city I work. I'm 1st in the city I live
 
@dystroy you're in France's 3rd biggest city
 
12:31 PM
guys, why can't I $slice when using $addToSet?
 
we can see our SO profile leagues sorter by place right? Anyone got a link to that?
 
hey guys ! good evenung !
i have a quick question ..
have a look at this fiddle
 
calclation done :)
 
crl
[MySQL] someone? I have a table with title UNIQUE, and I did
START TRANSACTION;
INSERT INTO article (title,content,id_user) VALUES ('t1', 'c1',1);
INSERT INTO article (title,content,id_user) VALUES ('t1', 'c1',2);
COMMIT;
but it inserted the first line, crashed on the second, it shouldn't have inserted the 1st right?
 
12:33 PM
i got that fiddle from this answer ! stackoverflow.com/a/4575011/4381665
can somebody tell me in the fiddle there is the following function :
$('#do').on('click', function () {
$('#status').text('calculating....');
long_running('#status');
});
which line is firing first ?? inside the on function ??
it certainly does't seem like $('#status').text('calculating....'); runs 1st even though it is placed 1st !
 
@FlorianMargaine I'm 36 on PHP in Lyon ^^
I don't even know how to PHP
 
you have a php repo, it seems...
 
@AlexanderSolonik It updates the status text, then it performs the computation, then the wndow repaints.
 
@crl Correct.
 
@dystroy "Chrall"
 
12:38 PM
@FlorianMargaine yes... my Go+JS repo got recognized as PHP because I had a phpbb thing...
 
HI all, i want to display the multiple div content line by line not in the same
 
AngularJS Q. Is there a way to apply the ng-class condition to the elements width? i.e. ng-class="if width < 50px ? 'blockClass' : 'inlineClass'"?
 
@JanDvorak , no it does't undate the status text .. At All , see the fiddle !
 
@AlexanderSolonik It does, in memory
 
@dystroy var foo = <?=$code?>; // this is how you php
 
12:39 PM
@JanDvorak , but not in the button :(
 
@AlexanderSolonik That's why it's labeled as the bad solution
 
see the 2nd peice of code that follows :
$('#do_ok').on('click', function () {
$('#status_ok').text('calculating....');
// This works on IE8. Works in Chrome
// Does NOT work in FireFox 25 with timeout =0 or =1
// DOES work in FF if you change timeout from 0 to 500
window.setTimeout(function (){ long_running('#status_ok') }, 0);
});
This works , the only difference is that , this has a setTimeout !
so why does the 1st example not work ?
 
format your code
 
The browser waits for your code to finish
 
crl
@RoelvanUden thanks, trying to figure out what I screwed up
 
12:44 PM
@crl BEGIN probably. I don't see it now that I look again.
@crl START TRANSACTION then BEGIN then your stuff, then `COMMIT
 
!!afk
 
@JanDvorak , so ur saying
with the following code
$('#do').on('click', function () {
$('#status').text('calculating....');
long_running('#status');
});
 
*you're
 
long_running('#status'); starts executing , even before $('#status').text('calculating....'); is executed .
sorry ! , my fingers are used to SMS language :D
 
This is not a SMS.
 
12:46 PM
@RoelvanUden hehe , ok :)
 
@AlexanderSolonik it is executed; the effects are just not visible to the user
 
@JanDvorak , and whats the reason for this mysterious behavior ? can you sum it up in a single line ?
 
@AlexanderSolonik Queuing up display updates until Javascript is done is usually faster
 
@JanDvorak , thanks for your time
guess i'll have to do a bit of reading !
 
@AwalGarg Why?
 
12:53 PM
@MadaraUchiha because js code that interacts with dom already has to be dependent on dom, like class names, ids etc.
 
@AwalGarg Yes, but you have a very convenient event that fires when everything is ready and waiting for you
 
HI all, i want to display the multiple div content line by line not in the same
 
crl
@RoelvanUden actually I'm still in the transation with this DB user, the transaction is not ended, I don't know how to end it... and if I select my table from another DB user the 1st line isn't here
 
So again, why rely on the implied behavior of putting things at the bottom of the <body>
 
12:54 PM
@MadaraUchiha we have a more convenient way to solve this, why not use it?
 
crl
darn MySQL
 
@AwalGarg It's not more convenient, unless you have a tool like html-dist that handles it for you.
 
@crl hail Postgres ?
 
@crl Of course not. A transaction is exclusive and isolated. Another query can't see changes that are isolated until they are committed. That's exactly the design; it's not a flaw.
 
Having to remember <script> tags above what you code, and having your <script> tag below what you want to interact with
All that remembering you need to do is anything but conveninent.
 
12:55 PM
@greenhorn on a non-flex browser just use tables ladders and chairs
 
@crl You never did a BEGIN for the transaction. Kick MySQL on/off, use BEGIN this time and VOILA!
 
If you have a build step that does this for you, like that guy from jspm shows in his talk, fine
 
crl
START TRANSACTION;
BEGIN;
INSERT INTO article (title,content,id_user) VALUES ('t1', 'c1',1);
INSERT INTO article (title,content,id_user) VALUES ('t1', 'c1',2);
COMMIT;
 
@MadaraUchiha I'd say just one tag because your code is all concatenated for the least, if not minified.
 
crl
If I do ROLLBACK I end that transaction, but I'd like to do it automatically when there's an error
 
12:57 PM
@AwalGarg In production, sure.
What about development?
Do you concatenate everything for dev too?
 
@crl Wait, wait, I may have made an error. looks up MySQL docs
 
@MadaraUchiha if I use sourcemaps, probably. But mostly not.
 
@AwalGarg lol
Have you ever worked on a large system before?
 
@crl Yeah BEGIN seems to be synonym for START TRANSACTION. This starts two. :S
(Screw MySQL)
 
@darkyen00 i can't get you
 
crl
12:58 PM
@RoelvanUden yea they are aliases
 
I'm talking requirejs, at least 40 modules and some 10+ libraries
 
@MadaraUchiha are you talking about library code? Then I never bundle that together.
 
Building that takes time. You don't want to do that every time you make a change to anything
 
my coding style tells me to put my application code in the end of the body. I never have to wrap anything unless I'm waiting for images to load. document.ready is completely useless to me
 

« first day (1670 days earlier)      last day (3296 days later) »