« first day (586 days earlier)      last day (4587 days later) » 

09:00
my console gives me NaN
!!> +"hi"
@Esailija NaN
it's because the output is json stringified
if its an object
!!> JSON.stringify([NaN, NaN] )
@Esailija "[null,null]"
@Esailija ??
new Number returns a new number object
while Number("5") is same as +"5"
09:02
k
got it
!!> [1, 2, '3', 'hi', 3.4, '3h'].map(parseFloat)
do you ever use number objects? :/
@Esailija [object Array] [1,2,3,null,3.4,3]
parseFloat is more robust, only one NaN
I mean more magic...
no, number objects, string objects and boolean objects are useless
looks like so yeah :)
!!> !!new Boolean( false )
@Esailija true
so a boolean object representing false is true
truthy* like any object
09:12
fuck js
@FlorianMargaine Is that a new library?
what, you don't know fuckjs.com? how long were you hidden in your basement?
TDS
TDS
It is not opening :D
Oops! Google Chrome could not find fuckjs.com
09:22
Not sure if trolling ...
you guys know geekli.st ?
This application will be able to:
Read Tweets from your timeline.
See who you follow, and follow new people.
Update your profile.
Post Tweets for you.
no way!
is that some kind of e-peen contest
it's a geek social network
looks fun
lol try to click the top geeks
the fucking tooltip is preventing you
09:30
lol, you don't "like" stuff, you "high five" them
that's what the "^5" is for
do they have bad server or does node really suck this bad for http server
?
I don't have any lags or such
takes 500-1000 ms to get a response
so is instant for me so it's not my internet
click some profiles
the front page is instant
it's fast for me :/
you just had to :D
should I high five you
09:33
hehe :D
wut I'd have a ^5 /o/
@Florian is it worth signing up?
I refuse to register at this penis swinging contest though
haha
looks like it opened today or so
have an high five for the XPM reader
the interface is slick though
09:34
what is XPM
nah, it's been there some time
private beta
wut thanks
@Esailija image format
gnome uses this image format for the icons
oh awesome
so it's "modified xpm" reader
because xpm files start like this
/* XPM */
static char * exemple_xpm[] = {
"24 20 3 1",
X PixMap, connu également sous le sigle XPM, est un format d'image spécialisé dans les icônes des environnements graphiques. Il est utilisé entre autres par X11, le système standard d'interaction graphique avec l'utilisateur sur UNIX, Linux et les BSD. Histoire La première version du format XPM sort en janvier 1989. Elle est créée par Colas Nahaboo et Daniel Dardailler dans le but d'avoir un format de fichier capable d'enregistrer et de récupérer des icônes en couleur, chose impossible avec la Xlib, quant au format XBM, il est limité aux images en noir et blanc. En 1990, Arnaud Le Hors...
an array of strings
09:38
basically yeah, the code is not big github.com/Ralt/xpmjs/blob/master/xpm.js
short and sweet
not faster than drawImage though jsperf.com/xpmjs-vs-drawimage/2
but the advantages are : bandwidth saving, reuse of the same icon with different colors and quick editing of those icons.
(yes, copy paste from my github readme :p)
why the hell did you put the library initialization in the test loop :O
it should just have XPM.create
oh, right
let's edit
also, it's filling the test page with images
09:42
yeah i know
didn't spend much time on this.
drawImage is just twice faster than xpmjs
yours is 3?
yup saw this
though
it's still not fair
the first test is appending 8 elements or so
what the heck?
the second test is only appending 1
09:45
how come 3 and 4 have so much difference?
lol is 4 trying to kill my machine?
stop appending the images to the test page
Does removing a DOM element also remove event handlers bound to it?
09:48
so I should unbind/detach them first, right?
you can't remove a dom element, you can detach it from its parent
By "removing" I meant remove from dom tree and assign it to null.
you don't even need to assign it to null as long as you don't keep a reference to it anywhere
if the handlers hold reference to the element in a closure, then older ies won't gc it
detaching from its parent means that no other element has reference to it other than its children
So, 1: unbind, 2: remove, 3: null (optional). Anything else to keep in mind?
do you use some kind of data store
09:52
nope
null is not necessary
unbinding is also not necessary if your handlers don't keep reference to its element
example:

el.addEventListener( 'click', fn ); // You don't need to unbind
ev = el.addEventListener( 'click', fn ); // You need to unbind
@Esailija is that it?
does fn know about el?
elem.onclick = function() {
    console.log( elem );
};
what do you mean?
09:56
the function now has reference to the element
doesn't almost every event handler has reference?
no
elem.onclick = function() {
    console.log( this );
};
anyone know if origin holds sales like Steam does?
now the function doesn't reference elem
now I'm not sure if IE6 realizes that
but chrome at least realizes that the function isn't gonna use elem
10:01
okay, thanks
function addListener( elem, type, fn ) {
    elem[type] = fn;
}

addListener( document.getElementById("div"), "onclick", function(){
      cannot have reference
});
note this is only problem in ie4-6
var div = document.getElementById("div");
addListener( div, "onclick", function(){
    console.log( div ); // reference?
});
or if you use data store for events and element data like jQuery then you always need to clean all the things
@FlorianMargaine yes now the function has reference in all browsers for sure
div is available to the function, and the function is also using div
so this needs to be fixed in IE by unbinding before removing
yea... but ie6.. srslty
10:05
yeah.
@GNi33 how do you create a community?
hi
I have a problem in datatables plugin
shal I ask here?
@FlorianMargaine hm?
@GNi33 there is no "stackoverflow" community on geekli.st, but I couldn't find any "create community" button
oh
no idea, but looking at 2 member - communities, it should be possible
10:17
sent a message to support
btw @Esailija, the social network is for work, really. There are "featured employers" i.imgur.com/p7ez5.png
i hate you, lazy page loading
needed to scroll freaking 3 times to get to the footer
their blog is useless too
no word about their communities - feature
or the search-function just doesn't work
heh, the search hasn't indexed anything yeah
looks like so, yes
10:33
Oh, I didn't know it was possible to make an element maintain an aspect ratio on resize in CSS.
I was using js to do that... silly me.
10:48
http://stackoverflow.com/questions/10735876/difference-between-method-in-a-constuctor-function-vs-functions-prototype-prope/10735935#10735927
11:00
o/
@Oleg that method is very dependent
\o
y u no CV
0
Q: How to improve this JavaScript code to make it more portable?

Edward TanguayThe following is a little JavaScript project to display quotes on a web page. Since I want to use it in a number of different web sites, I read up on good practices for making portable JavaScript code, e.g.: use no global variables use namespaces make it easy to plugin use default values which ...

lol slowpokes, it was accepted just before closing
Jon
Jon
11:08
is this path correct? $ibItems.not('#main > ul.thumbs > li > a.ib-content')
wow github on windows actually looks pretty !
@Jon wow, wtf
Jon
Jon
erm maybe i should explain... that always helps
man I hate the move cursor when it actually doesn't move until you drag
where is the tutorial anyway
11:17
Hi :D I've a div like this:

<div>
<input type="text" ... >some text</input>
<button onclick='reset()' />
</div>

i'd like, with JS in reset function, to do something like:

function reset(){
findtextfield.value("");
}
@Esailija does only mozilla have the grab and grabbing cursor?
where with findtextfield i mean, find the textfield inside the div where the button that has fired the event is
is possible?
Jon
Jon
@esailij
oops
I dunno :P @GNi33
Jon
Jon
@Esailija ive changed the location of the images <li><a rel="portraits" href="#"><img alt="" data-largesrc="assets/images/large/1.jpg" src="assets/images/thumbs/1-s.jpg"></a></li>
but when i try to add content into a <li>
i feel its something to do with paths in gallery.js
var $ibWrapper = $('#content'),

Template = (function() {

// true if dragging the container
var kinetic_moving = false,
// current index of the opened item
current = -1,
// true if the item is being opened / closed
isAnimating = false,
// items on the grid
$ibItems = $ibWrapper.find('#main > ul.thumbs > li > a'),
// image items on the grid
$ibImgItems = $ibItems.not('ul.thumbs > li > a > .ib-content'),
// total image items on the grid
11:21
yeah I have no idea what that .not does
i guess it returns a set of elements that do not fit that beast of a selector?
sure
but I mean
what is the NOT of 'ul.thumbs > li > a > .ib-content'
Jon
Jon
its original is simply .ib-content
when the items are li > a itself
well, maybe the first selector was ul.thumbs > li or something like that
11:22
does it filter out those who don't have .ib-content as first child
0
Q: Convert [object XrayWrapper [object HTMLSpanElement]] to html tag

UserPinkIn a userscript i am getting [object XrayWrapper [object HTMLSpanElement]] instead of html span tag. how can i get the html tag like <span>--</span> from this object

not first - child, immediate child
right
but is there really something inside of the link? i don't know the markup so...
Jon
Jon
if you look at the tut theres two more functions below that open a jquery template with the content of the a tag
11:24
it's still retarded when you could just classify the a elements differently and make a simple query of $('.class') without even filtering anything
Jon
Jon
loadImgPreview and loadContentItem
that would be the usual approach, yes :D
but that's the problem with sizzle-magic
you can easily smash in the weirdest selectors, when you feel too lazy to think about how screwed up your markup is
all these filter-functions are nice, but you really just need them in edge-cases
95% can be done just as easy with totally usual selectors
Jon
Jon
i added my own filter functions to this
but its the fullscreen function i like
and would like to add the content too
Jon
Jon
11:43
sorted
can anyone suggest a small lightweight callback library?
hi
<%
String cat = IDtoString.getCategory(CategoryID);
if( cat == "null"){
out.print("hfghgfhfgh");
}
else
{
out.print("else");
}

%>
cat is having null
but still else is printed :(
@jollyexe if (cat === null) should do it
u mean three ===
@jollyexe or if (cat === "")
11:55
let me try :P
=== is more precise and less forgiving than ==
no its giving error
@jollyexe you can use either but there will be no type conversion
it takes only == in jsp
display cat and see what is in it when it reads an empty file, and use that
11:57
ya i did that it prints null
@jollyexe IDtoString.getCategory might return null, "", or undefined, the docs should say
OK, u need if (cat == null)
what is jsp?
lolz.... its done
if( cat == null){
thanks @user1351235
jsp = java server page for web development
@user1351235 what do you mean callback lib?
12:05
events, broadcasters, callback handlers, but NOT FOR THE RUDDY DOM!! pure script
blog.narcvs.com/?p=36 <-- this type of thing :)
lol write your own?
Raynos made some event emitters for node
//o____O\\\
:[HA]
x(HA)
@rlemon Dude, if that works it is awesome!
12:13
it's somewhat working
the converter was a project from someone else and it's buggy
i've fixed a few of them. still got a few more to go
It has some problems with the time tag though.
Diablo III is really hindering my productivity
Yea, so is summer time for me.
what do you mean?
time tag?
Lemme show you.
12:15
^ me is trying to follow this
ohh yea
> The only restrictions are that block-level HTML elements — e.g. <div>, <table>, <pre>, <p>, etc. — must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces. Markdown is smart enough not to add extra (unwanted) <p> tags around HTML block-level tags.
ok so i guess i understood this wrong in the past.
I will add a safe set of inline tags.. then strip the rest.
inline HTML is allowed in markdown.
i hate regex :<
hrmm wtf
12:31
@Abhishek Hi! What do you mean by "this method is very dependent"?
if you wnt to do the resize:horizontal; in css
then you will have to see if the browser supports it :P
@Abhishek What's resize: horizontal?
Ah, you're talking about maintaining ratio?
Nah, there's a workaround to specify height as padding with percentage.
yeah that one works best :-)
It works in IE6 wutwat
12:45
lol
12:55
$.each(helpers,function(i,name){ console.log('hi'+name.val());}
..
oops (xD)
13:14
13:34
Now find your floppy drive because SATA drivers didn't exist when it was created
le me trying le meme
@rlemon loving lememe :D
lol @FlorianMargaine I was going to make you next.....
oh yes, do me.
13:43
Bonjour...

Ladies...
@rlemon lol
0
Q: How to do i Improve my Loop Logic in programming?

Rony JohnI know how to do simple loops but i dont know what's going on when many loops are working together. For example: for (i=0; i <= 9; i++){ document.write(linebreak); for (m=0; m <= 9; m++){ document.write(i); } } Is there a way i can learn loops inside out. Because i alwa...

"la" pixelization perhaps
But not 100% sure.
LOL
@Oleg yeah it should be "la"
\o/
13:49
@TomShreds Good to know. I'm passing a french exam on 31.
@Oleg haha if you have any questions, go ask :-)
It will be listening comprehension mostly.
Will just need 160 points out of 495.
@TomShreds yo, you down for some more Diablo tonight :P
13:54
@rlemon sure thing, I can't wait to level up a bit more, I've got some sick gear!
hseltner is my gf btw - she's on the pc next to me while we game so i keep stealing her drops and giving them to you :P
hahahaha
That what I was thinking (that she were your gf)
@Oleg finishing by "ation", it's a feminine word
But I was wondering, since I leveled up quite a lot yesterday, when I'll be solo will the quests be harder or I'll be super OP?
"la fellation"
13:55
@TomShreds when you (or someone else) joins the game ever notice it says "The minions of hell grow stronger / weaker"
basically the more people in the game the harder the npc's
solo-ing will produce the easiest enemies.
in d2 you could /players 8 in offline mode
so if you are finding a boss hard don't get someone weaker than you to join.
Yeah but next time I'll play alone, I'll be on my early quests, will these be tougher? Let's say I was doing a lvl 10 quest, and not I'm lvl 15, will my quest be tougher since I'm lvl 15?
@TomShreds never move back in normal mode
no point
the game doesn't get good until nightmare
But if sometime I've no one to play with? I'll be stuck playing alone on normal mode?
13:58
and drops / gold / gems / everything is shit until then
yea but don't go back and redo quests.. just keep progressing.
i solo'd normal which is why I was at lvl 29 when I beat it.
Okay... but I'll be stuck on the same quest I was playing last time I was solo, no?
but lets put it this way... monsters is act4 normal drop like 100 gold for me... monsters in act1 nightmare drop 250
no
ohhh i get what your asking
nonono
if you join my quest in act4 - you jump to that quest.
but! you cannot complete a quest if you don't have the requirements... and some quests require people or objects from previous quests.

« first day (586 days earlier)      last day (4587 days later) »