« first day (593 days earlier)      last day (4369 days later) » 

4:30 AM
Room looks empty :(
Ill ask anyways, anyone know if you can take a regular js object and make it callable with the new keyword?
 
 
1 hour later…
5:43 AM
window.MediaFileSystems proposal for enabling read/write access to local media files https://docs.google.com/document/pub?id=1KEue9_VB58xReYDAkUkOBnzPyx9MqWVOoaRht4OLS4w compare to https://wiki.mozilla.org/WebAPI/DeviceStorageAPI
 
 
1 hour later…
6:50 AM
"Quand je poste une réponse sur stackoverflow" = "When I add an answer on stackoverflow"
 
lol
 
hey, this blog is actually fun
 
7:10 AM
:D
 
"when I find a solution on stackoverflow" lesjoiesducode.tumblr.com/post/23008477011/…
that. is. so. true.
"when a project crashes 30 minutes before its presentation" lesjoiesducode.tumblr.com/post/22260317828/…
 
How I can make this code synchronous in javascript
app.post('/login', function (req, res) {

var login = req.body.login;
var pass = req.body.pass;
CheckUserValid(login, pass,function(callback){
res.send('test');
});
});
function CheckUserValid(login, pass,callback) {
var sql = "SELECT * FROM `user` WHERE login = ? AND pass= ?";
client.query(sql, [login, pass], function selectResutl(err, results, fields) {
console.log(results);
if (!err) return true;
else
throw err;

});

}
 
you can't
besides, why would you want to?
"when I read some answers on stackoverflow"
well, that was fun.
 
7:31 AM
HAHA
 
we agree, that's really fun :D
 
7:58 AM
0
Q: Add a class to links in the visual editor (how to get old dialog back)

amyNew: Old: In short, i want a list of some classes inside the add link dialog. Because this was default there might be a easy way to get it back like this? Long: I like to have the ability to add classes to themes. I have found 2 plugins for that. One breaks tinymce and the other add link c...

 
wordpress
> I like to have the ability to add classes to themes. I have found 2 plugins for that.
 
lul
how are you doing @Abhishek ? :)
 
pissed off loads :-x
Am doing okayish
 
pissed off? why? your shit works
 
8:14 AM
code never pisses me off
even if it doesnt works i stay happy :D
what pissed me off is :-/ WOMEN
 
@Abhishek if that's the case, you've came to the right place!
 
lol
there needs to be a room
"Debug - Women" lol
 
You do realize you need to have some knowledge of the system if you want to debug it? I'm afraid men are not able to debug women
we'd need a "Reverse engineering women" room
 
lol
we can de-bug jQuery :O we should be able to handle women!
 
is there a jquery.women plugin I'm not aware of?
 
8:35 AM
google give
jesus christ .. people in the world are so idiots :/
 
o/
@Abhishek hehe, i like the idea of that :D
 
lol
but but but they need higher resolution!
 
8:53 AM
and, don't be pissed off by women
not worth it
unless you want to end up like me the past year
 
9:04 AM
0
Q: How to Animate a DIV From Display None to Block in prototypejs

user1425871I need to display a div from display:none to display:block giving it a fade effect. How can I do this in prototypejs? Thanks. <div id="fadeId" style="display:none"> </div>

how come this kind of answer can be added?
 
hi
 
@FlorianMargaine first answer "you can use jQuery for this" -.-
 
you get that, even if you ask a PHP question sometimes people will tell you to use jQuery
 
he provided info that he uses prototype and even scriptacolous
 
yep
should I go post my CSS3 answer?
;)
 
9:12 AM
since he uses prototypejs, I don't think such a new feature will please him ;o)
 
hehe
 
added an answer using scriptaculous
this framework is horrible, I googled for some examples and really, the API is terrible
 
@Petah block - none ? with css3
 
@FlorianMargaine I had a recent debate on the www-style mailing list about how important it is to animate display.
 
omg css must be so awesome!:!:@:#!:#:!@#:!@:#@!
 
9:15 AM
you can't do block -> none with CSS3
 
yep, you usually play with opacity
and/or width/height
 
;-)
thats why i played with Petah lol
block -> none or vice versa will just JUMP!
 
of course you need to set it to block first and animate opacity
 
@AndyE i think display:none; removes the element from the rendering tree :P
right ?
 
9:16 AM
@AndyE what kind of discussion?
 
@Abhishek correct
 
so it would be utterly stupid to make it animatable
 
@FlorianMargaine a failed discussion. I argued that it is extremely difficult to animate certain box types, and that display should at least animate from none to any other value (and vice versa).
I thought a slide out animation would be better than no animation, but others were concerned about how it would affect height or width.
 
> 'display' isn't animatable because it only accepts keyword values, and
keywords aren't animatable yet. We'll allow animating keywords in
some manner in the future.
 
'display' shouldn't be animatable
consider the effects :P
block - > inline-block [this one would be cool as hell ]
 
9:20 AM
@Abhishek that's why I suggested just animating from none -> other values and any value -> none.
 
block -> none, yo wait we want to go from a real value to a non-existant state (as per the rendering engine )
None should be there rest could be good :P
 
@keyframes fade {
     from { display: block; opacity: 1; }
     99% { display: block; opacity: 0; }
     to { display: none }
}
 
wow, Synology's NAS web interface is very impressive.
 
hey out there
0
Q: Toggle two checkboxes with one click and without js

rekireIs there a way to toggle two combined checkboxes with one click? I have a small calander where I want to select weeks with checkboxes. One week can be in two month so I have two checkboxes for the same week. How can I combine them safe? I'm using this abstract HTML: <label for="aa"><i...

 
@FlorianMargaine: except that doesn't work. Putting display in there invalidates the entire animation.
 
9:23 AM
@AndyE yeah I know, just saying that'd be nice
 
...except it causes the content to jump, rather than animate smoothly.
 
Well I know this here is the js room but sometimes I has to run without^^
 
@Abhishek @AndyE you cant do block to none in a css3 transition, however the question was to fade in which can be achieved.
 
yes
 
@FlorianMargaine: I believe $fx is no longer being worked on, btw.
 
9:25 AM
.ele{
 opacity:0;
 -webkit-transition:opacity 200ms linear;
}

.ele:hover{
 opacity:1;
}
 
does it need to?
it's very small iirc
@Abhishek you need to animate width/height too
 
actually there is a far better way to do that @FlorianMargaine
but that will use bits of javascript :/
 
what's the "far better way" you mean?
with js
 
listening to the transitionEnd
event :P
 
jsfiddle pls :)
 
9:26 AM
okay
 
oh god, i hate that event :D
 
? why ?
 
prefixing css-stuff.... okay, but the need to have a function to prefix - stuff in javascript? me no likey
function whichTransitionEvent(){
	"use strict";
	var t,
		el = document.createElement('fakeelement'),
		transitions = {
		'transition':'transitionEnd',
		'OTransition':'oTransitionEnd',
		'MSTransition':'msTransitionEnd',
		'MozTransition':'transitionend',
		'WebkitTransition':'webkitTransitionEnd'
	};

	for(t in transitions){
		if( el.style[t] !== undefined ){
			return transitions[t];
		}
	}
}
^ ugly
 
the code style is ugly
:p
 
oh yes
and btw
if it doesnt have transition event support
 
9:30 AM
who needs to create an element btw?
 
Prefixing CSS stuff is much more annoying IMO. You have to define the same animation for 4 different rendering engines because they're all running from the same working draft, but have to be vendor prefixed.
 
do that with javascript
 
@FlorianMargaine paah! :D
 
you can use document.body, no need for the overhead of creating an element
 
poor use of undefined as well. Just use in.
 
9:31 AM
I never know when to use in :(
 
fyi, i didn't write that, it's just an example
 
when i try to use it, it's not the right moment
 
lol it looks like some code I wrote last night, though
55
A: Is there a way to detect if a browser window is not currently active?

Andy ESince originally writing this answer, a new specification has reached working draft status thanks to the W3C. The Page Visibility API now allows us to more accurately detect when a page is hidden to the user. Current browser support: Chrome 13 Internet Explorer 10 Firefox 10 The following co...

 
but it shows how screwed up that event with prefixing is
 
It's slightly better than using a lot of if statements.
 
9:33 AM
dunno how to use the compilation comments either
 
heh, lots of things I'm lacking in js.
 
@FlorianMargaine
 
dunno if there's a real use to learn compilation comments for IE tho
 
?
the conditional comments in IE ?
 
9:35 AM
/*@cc_on @*/
 
ah
 
but yeah, I get your point using js
 
"your way" is nicely done this way too jsfiddle.net/Ralt/JKq5t/6
@Abhishek you like justin bieber?
 
9:49 AM
yes i like justin beiber dead
 
y u so extremist :(
 
cause i hate her :0
 
> JSX offers a solid class system much like the Java programming language, freeing the developers from working with the too-primitive prototype-based inheritance system provided by JavaScript.
k.
 
why u like her ?
 
no, but you commented a post on fb saying "if you like bieber, comment"
 
10:01 AM
lol
Oh shit i think i ate spoilt food :/
women
 
10:22 AM
-1
Q: Web-based Chat Providers

NilsCan anybody recommend a free service to me that I can use to include a small web-based chat on my site? Ideally it should not require Java/Flash (e.g. just use JS). I also need to be able to set a password.

 
10:49 AM
hmm having difficulty configuring node on my Synology... 'env: python: No such file or directory'
I have python27 installed... I remember having the same problem on my old NAS and can't remember how I got around it.
 
@AndyE Do you have a link from python to python27 ?
 
No, I tried alias python=python27, thought that would work.
created a symbolic link, still the same message.
 
ln -s /usr/bin/python27 /usr/bin/python
This should work
 
yeah, I just came to the same conclusion after looking at the configure file lol
yep, that did it. Python was installed using optware, so I had to use ln -s /opt/bin/python2.7 /usr/bin/python
onto the next roadblock... thanks @copy
 
i want one of those
 
looks fun
 
hell yes.
 
although it's way more than just $25 for real use
you need the $35 version for network, and you need the SD card to boot
... you need around $50 to get something working
 
I've got about 5 1-2gb SD cards floating around on my desk anyway
I buy a new one every time I go on holiday and my SO forgets to bring one for the camera.
 
11:58 AM
hahaha
SO = StackOverflow? :x
 
lol "significant other". Stack Overflow doesn't come under that category any more :-p
 
oh ^^
didn't know this acronym
 
It's a weird acronym. I don't know many languages which have something similar.
Ehh, the acronym isn't weird. The term is :)
 
I can't really say gf because we've been together for 5 years and have kids, and partner sounds a bit gay... so...
 
haha
I know what you mean
 
12:05 PM
I'm not big on marriage, but I'm tempted just so I know how to refer to her :-p
 
you could say "concubine"
dunno if that sounds well in english though
 
@FlorianMargaine concubine sounds far more gay than Partner. trust me. :)
 
@freeall there's something like it in german
 
is it me or am i the only one not to like the answers?
0
Q: Result of getting next 12 months in Javascript is messed up

Jason EvansI have the following code for generating a list of the next 12 months (inclusive), starting from today's date: function DateUtilFunctions() { var self = this; var monthNames = new Array(); monthNames[0] = "January"; monthNames[1] = "February"; monthNames[2] = "March"; m...

they don't explain shit about why OP's code doesn't work
they just give the codez...
 
always funny to see someone reinvent a date library
it's extremely uninteresting anyway
 
12:16 PM
should I downvote the answers?
 
0
Q: Javascript: Safely upload a client data file

Jeffrey SweeneyI'm (still) working on a template-based XML editing program. It's a GUI-based XML editor that only allows users to add certain tags and attributes based off the requirements. You can see the current version here for an idea. Now, I'd like to allow users to upload their own data templates, but I'...

 
that's a meta question about SO :/
 
-1
Q: slideshow with fade-in and fade-out (jquery)

alighplease help me and tell me what's wrong here.... also i dont want to use jq plugin when i setInterval the code the pictures are coming with a different way sorry for my bad english <code> $(function(){ function slideshow(){ $('.img4').fadeOut(2800,null,function(){ ...

 
hahaha.
what is that ?
 
0
Q: Should I downvote "here is the codez" answers?

Florian MargaineRelated question: Result of getting next 12 months in Javascript is messed up So far, all the answers just give the code with a little sentence on the side with no comments whatsoever. I see this kind of answers quite often and am wondering: is it legitimate to downvote this kind of answer?

 
fuck the node compiler just crapped out with an error after 30 mins
 
When compiling node?
 
0
Q: jQuery setInterval

gkunnoI have a jQuery function that flips an element and then turn it back after a few seconds, however there is multiple elements with the same "flip" tag and the setInterval elements flip all the elements back after the first click. How could i implement the flip effect to turn only the elements that...

hide(0)...
 
is jQuery already smart enough to skip animating when someone does this crap?
 
@AndyE why 30 mins ? are you compiling on a sewing machine or just not using -jn ?
 
12:29 PM
@FlorianMargaine fixed that for you kinda - stackoverflow.com/a/10833631/6782
 
@OmeidHerat: compiling on a Synology DS212+... what does -jn do?
 
@Esailija Reinvent? But jQuery UI's was horribly broken until fairly recently.
 
I mean a date library, not datepicker
 
@Esailija And what library are you going to use if not jQuery? :P
 
@AndyE number of jobs, if you have like a core i5 or something like that. you should use -j4 or even -j5 if you not going to do anything else. this will make it n times faster.
 
12:30 PM
the OP's code in moment.js would be:
var l = 0,
    c = [];
while (l <= 12) {
    var a = moment();
    c.push(a.add("months", l).format("MMMM YYYY"))
    l++
}
 
@AndyE by -jn, he meant -j2 for 2 cores for example
 
I see... it's a single core ARM processor, so I guess that isn't an option.
 
and that's just by reading the docs for 2 mins
 
@Esailija I'd say that's actually more obscure then my simple answer
 
@Esailija jQuery UI provides a date library among other things, it was terribly, horribly broken. Tests failing at the end of every month, tests failing if certain days fell on certain days of the week, tests failing on leap years…
 
12:32 PM
momentjs.com bootstrap spotted
 
@gsnedders ah wasn't aware of that
 
@AndyE -j2 is probably still going to help, as it'll keep the CPU waiting for more jobs
 
@Alnitak the only obscure are the variable names because I wrote it quickly
:P
 
@gsnedders OK, I'll give it a try.
 
@AndyE Instead of the CPU finishing one compilation task, then having to wait for the next process to be started.
 
12:33 PM
what if you want in a different language?
with the library it's just set locale and you're done
.D
 
@Esailija internationalisation is indeed useful - I was just suggesting that learning a new API for such a trivial task might be a bit much
 
thing is, if you're caught writing var months = ["January", "February"...] you know you're just wasting time :D
 
( _as specified by the OP _)
 
@Esailija How so? You're not guaranteed you'll get those strings from any date function.
 
@Esailija not really, you're wasting time if you have to learn a new API if the solution is simple (like there, for example stackoverflow.com/questions/10794180/…)
 
12:36 PM
I wasted 2 mins learning api enough to do this task in a 5-liner
 
@Esailija JOOI - where' the localisation code in moment.js ? It's not in the source - that has hard coded english
 
I'm talking about a two-liners, including the line with the var months = [... :p
 
clone the repo, they have localisation files for like 20+ languages
 
Here is my two unwanted cents for this topic. both option can be the right choice based on your situation.
 
@gsnedders do you mean native function? I mean using a good date library which are out there
 
12:38 PM
@Esailija I mean from the built-ins, that that will have to exist somewhere.
 
if it's due tomorrow I am sure going to use a Lib and learn the API, even if it's going to take a bit longer to roll on my own, it's granted to work and is far more fail proof.
 
ok, think I found the problem... compiling again, going to make a sandwich.
 
in any event, you should be arguing about the other answers just copying the array creation code and not just putting in an array literal ;-)
 
And maybe it's just me, but I find most JS libraries too heavy-weight for what I want a lot of the time, and given JS is all sent over the wire…
 
12:39 PM
 
I must admit that particular library just look quite useful, though
 
4.3k is not very heavy weight
learning api can be hard when you have to read internals from source code like with socket.io
 
don't get me started on socket.io ...
 
@gs
arh
@gsnedders I agree. Most libraries tend to start with a good idea, and then they just need a .. and a ... and soon after they're one big blur of poo
 
@Esailija Sure, in larger terms, maybe not. But when you're dealing with lossy mobile connections…
 
12:45 PM
do you mean that they become more battle hardened?
if the library is short, sweet and elegant, it has not been used much by different people for sure
 

« first day (593 days earlier)      last day (4369 days later) »