« first day (713 days earlier)      last day (4245 days later) » 

9:00 AM
Could it have something to do with moveme() not being defined?
I could be completely wrong, but aren't both functions called because the two links share the same destination?
 
nope
I have "illegal invocation" error because of var qs = document.querySelector, removing the moveme() doesn't work either jsfiddle.net/b6mt8/83
@monners you're completely wrong, inline functions are linked to the element (the anchor element), not to the link
well, inline of separated
with javascript you play with elements
 
Hello :-)
 
(the DOM)
hello @Kedume
 
:-)
First time on chat.
 
welcome
 
9:04 AM
Thanks
 
Does querySelector allow you to target elements in a similar way to how jQuery allows you to?
 
See you later. Bye.
 
nope, querySelector selects a single element using css selector, querySelectorAll selects all the elements using css selectors (yes, like jQuery)
@monners the problem with QSA is that it's supported on IE8 only
 
Where are you getting querySelectorAll from? o.O
I don't see it in your code
 
it's not in the code example
but try document.querySelectorAll, it works
querySelector selects the first element
document.querySelector(selector) === document.querySelectorAll(selector)[0]
"on IE8 only" === "starting IE8"
 
9:08 AM
ok... I'm not sure why that came up though. I didn't mention it o.O
In any event, I'm not running this in IE8x so it's still not working
 
well, the thing is, var qs = function(s) { return document.querySelector(s); }; works, but var qs = document.querySelector; doesn't work
and I don't understand why.
because stuff like this works: jsfiddle.net/uysX5
 
That, my friend, is beyond my abilities to even pretend to advise on.
I'm still trying to figure out why a professor would ask a student to solve a redundant problem utilizing poor coding practices...
 
haha
0
Q: Illegal invocation when caching document.querySelector

Florian MargaineRelated jsfiddle: http://jsfiddle.net/cWCZs/1/ The following code works perfectly: var qs = function( s ) { return document.querySelector( s ); }; qs( 'some selector' ); But the following doesn't: var qs = document.querySelector; qs( 'some selector' ); // Uncaught TypeError: Illegal invo...

 
o/
 
9:23 AM
@Lukas o/
 
I'm on fire! 3 questions answered in two days. That's like...an infinite% more than last week.
 
I phone 5 was probably designed by someone who was a woman and horny ,, See the specs its long , lasts longer once charged is fast and efficient
 
well, I only ask interesting questions.
 
Does anyone know if it's possible with JS to do something around window.open() to say (based on the URL) "only open this if it's not already open, otherwise just switch focus to it"? It only needs to work in Chrome.
 
Save a bunch of urls you've already opened, and check against them.
 
9:30 AM
What he said ^
And incase of crash recovery you can use localstorage
 
@Zirak I thought about that, but what if they get closed? The windows are cross domain so I can't put any script on the target page and don't think I could hook into the child windows events for that reason (could I? I might be wrong)
 
one sec, I'll test something
 
What I'm actually doing is opening SO question pages, I'd like to not open the same question more than once if poss
 
For some reason I can't get it together right, but the point was that you can listen to the unload event on the created window
 
9:40 AM
@Zirak I will have a play. I think it won't work because of XSS prevention but I could be wrong. Like I say it only needs to work in Chrome so I might be able to find some nasty Chrome-specific mechanism.
 
@AdamLynch A jsbinified version of it would help.
 
@DaveRandom You can do this with a Chrome extension
 
Hi
i need slider like this
 
@AmaanCheval S'all good, I have a plan, will come back if it doesn't work
 
this is not opensource.. i need like this in opensource
??
 
9:51 AM
heh, selling jquery plugins with a demo...
/*!
 * jQuery Drag Expose | Draggable Images Slider Javascript Plugin v1.5
 * Copyright © 2010-2011, Alessio Caporale
 * Twitter: @Alex_Workshop
 * E-mail: ale887it@hotmail.it
 * The plugin is NOT freeware, the license to use it is sold only at codecanyon.net
 * Further information on how to buy it can be found at codecanyon.net/user/AlexBay
 
@OctavianDamiean working on it but it's taking too long :/
problems running Bootstrap's carousel
 
@fl
@FlorianMargaine
i need like that plugin with open source
 
@Dhamu Well it's on Codecanyon so just buy it.
 
@FlorianMargaine I just broke the law clicking on that link I think.
 
Not exactly, not as long as you don't use it in one of your projects. :D
 
9:58 AM
@OctavianDamiean Damn, now I have to delete it
Actually I'm not that impressed by that plugin
Not worth paying money for it anyway
jQuery plugins need to cost around 25 cents for me to consider buying them, and even then, I'm too lazy to go through the process of payment each time, so they'd have to give me 4 for a dollar.
 
@Neil there might be really good plugins though.
that might require you 1 week of development
and if they cost $100, they're still cheaper than you are.
 
@FlorianMargaine why that need? still we have open source...
@Neil
 
not all the time
 
Don't get me wrong, I wouldn't use a library for free when they ask payment to use
I'm saying that there are so many, it'd be hardpressed to want to pay for one
 
10:06 AM
@Neil like jquery
 
In a way, I'm sorry for those who slave over such plugins for profit, but they weren't exactly picking a good business model, lets say
 
10:37 AM
What am I doing wrong ?
http://jsfiddle.net/aXGKg/
 
@Norris you forgot to include the jquery plugin
 
I chose it as the jsfiddle framework.
 
I didn't say jquery itself, but the plugin
 
@FlorianMargaine It's there in the Manage Resources tab
 
@FlorianMargaine Yeah it's at the Resources.
 
10:41 AM
isn't it just jquery ui core?
ah, no
 
Hmm. I thought google hosts full jquery ui. I'll check that.
Well it includes jquery.ui.autocomplete.js,
Any other ideas ?
 
should be working
 
Yeah, I'd want it to. Doesn't work outside of jsfiddle with the exact same code neither.
 
@Norris Grab a url link to the js and add it to the resources
You can do the same for jQuery css as well so you don't have to clutter your css box
 
Didn't help btw :) ( I was trying that as you typed)
 
10:48 AM
the combobox widget doesn't exist by default
you have to create it
 
aaah.
Thanks.
A million.
 
I was thinking to meself why is that bulk of code used in the documentation.
I wanted to think it would come packed right into the autocomplete.
For some reason it isn't.
 
Damn, the tweet is deleted already
> Do you know how do to make a baby cry? Drop a brick on it. Do you know how to you make it stop crying? Drop another brick on it.
I thought @Zirak would like that :p
 
:D
What is blue and scratching glass ?
Baby in a fish tank.
 
11:01 AM
Hahahaha
We're cruel people
 
We just enjoy black humor. Not cruel :)
I hope...
 
@Norris What's black, white, and red all over?
A nun falling down the stairs
 
:D
 
11:15 AM
hey
 
fml ... how could I possibly miss out the first couple of lxjs talks ...
 
Well I know but I said that I missed the first couple of talks.
 
Yeah, I was just giving a link in case someone else was interested
 
Arrghh, I don't care. I'm mad because I missed them.
 
@AmaanCheval What's the difference between a BMW and a pile of dead babies?
I don't have a BMW in my garage
 
11:36 AM
@Zirak Hahahaha
 
@Zirak It would look better though.
 
Q: What's the difference between a truck full of sand and a truck full of babies?
A: You can't unload a truck full of sand with a rake
Q: What's black and pounds on doors?
A: A baby in the oven
Q: What's worse than a dead baby?
A: A pile of dead babies
Q: What's worse than that?
A: When there's a live one in the bottom
Q: What's worse than that?
A: He has to eat his way out
Q: And what's worse than that!?
A: He liked it.
 
@Zirak Where are you getting these from?
 
Q: How do you put a baby into a blender?
A: Head-first
Q: And how do you get it out?
A: With a straw
I love baby jokes. Over the years, I've managed to accumulate a few
 
11:43 AM
Q: What's the difference between a baby and a trampoline?
A: When you jump on a trampoline, you take your shoes off
 
is slightly worried about @Zirak's mental condition
 
Q: What's funnier than a dead baby?
A: A dead baby in a clown costume
 

Baby jokes

8 mins ago, 7 minutes total – 14 messages, 3 users, 0 stars

Bookmarked 53 secs ago by Amaan Cheval

This is golden.
 
Q: How do you stop a baby from crawling around in circles?
A: Nail down its other hand
 
11:50 AM
Do you have these saved or are these coming from memory?
 
The best jokes come from the heart (of a dead baby, cook with vinegar)
Q: How many babies does it take to paint a wall red?
A: Depends on how hard you can throw
 
Note to self: Never get near @Zirak once you got a kid
 
Here's a pretty horrible one:
Q: What gets louder as it gets smaller?
A: A baby in a trash compactor
 
Seriously what the fuck mate?
Don't get me wrong, I hate babies just as much as everyone else does but that's just wrong!
 
This is the first time in months I've literally lol'd
 
11:55 AM
I love these jokes
And I don't even hate babies or anything
 
For @OctavianDamiean's sake, here's a different kind of joke
Q: Why can't Elvis drive in reverse?
A: Because he's dead
 
lol
Just my kind of humor. :D
 
12:17 PM
Q: How do you get 100 dead babies in a phone booth?
A: Blender
Follow-up Q: How do you get them out?
Follow-up A: Straw
 
How can I see the room bookmarks? O_o
 
info > conversations
@Zirak damn, didn't read up - seems you already have it
Q: What is red and green and goes 60mph?
A: Frog in a blender
I heard this one as ..
Q: Whats easier to move a pile of pebbles or a pile of dead babies.
A: Dead babies, you can use a pitch-fork
 
@FlorianMargaine lol
j just love the arrogance and attitude in that text
 
@rlemon I phone 5 was probably designed by someone who was a woman and horny ,, See the specs its long , lasts longer once charged is fast and efficient
nd rich ofcourse [ overrated as hell ]
 
12:25 PM
@Abhishek it also doesn't really innovate or change anything it's just bigger
.... and has less features than the S3
:P
Bazinga
 
got a chance to test a smuggled iphone5
yuck my 4s seems to give a tough competiton to thats , its no where an upgrade rather a friken cousin it seems
 
@Abhishek White Knight
 
STOP IT grrrrrrrr
 
HAMMERTIME!
 
12:27 PM
feature wise HTC One S kills it badly
 
Jelly Bean > iOS6
 
okay one with the rant
@rlemon android 3.0.x > iOS 6 [ minus the crap maps ]\
 
I like Jelly Bean better too
 
Zirak , have you got some articles on how to create a small AI personal assistant
 
12:28 PM
Jelly Bean was such a nice refreshing improvement over ICS
 
or some opensource project links ?
 
it's nice to see a mobile OS developer actually come out with something new between releases :P
 
i want it to understand stuff like >

"When was Elvis Born?" , and it should respond with the date [ leave responce on me ]
or some self learning code maybe :3
 
@Abhishek Just use Wolfram Alpha
 
12:32 PM
@AmaanCheval cant
 
Why not? College project or something?
 
i wanna learn how to do it
 
2012.lxjs.org/live Event starting now
 
and an APP for wikipedia in my mind
 
@Abhishek Ah, that's good
 
12:33 PM
 
i think its a pita to read a 12 page article on sachin tendulkar just to find out his wifes name [ gk ]
 
@Abhishek Whaaa?
 
yeah it was a GK question .. :-[
+ this can help those who are blind
for we can parse output
 
@rlemon lol
Did you guys decided to link me everything you find about gays? O_o
 
@dievardump Not everything :p
 
12:41 PM
Fuck that! I was linking it because of the BatMan trailer hitch!
 
@dievardump admit that you like it :D
 
Why does everything have to be about gays with you
:P
 
...
FU
 
@dievardump did you see this one? nohomophobes.com/#!/today
 
oh, and the superman - logo! awesome!
 
12:41 PM
:D
 
@FlorianMargaine FUUUUUUUU
 
(it's a nice one tho)
also, you guys didn't see this one
To whoever flagged @FlorianMargaine's comment: It's not "not constructive" (by any definition), it's absolutely correct. HipHop's static compiler, HPHPc, translates PHP code into C++, not C#, and then seamlessly compiles C++ with g++. — Yannis Rizos 16 hours ago
 
They will soon change the website
happy
 
and got this badge, didn't know it existed stackoverflow.com/badges/1287/excavator?userid=851498
 
@dievardump aren't there any vids there ?
on ths site ?
 
12:44 PM
Why would it be, the conf didn't start.
 
wait let me find one of the really strange ones
 
offline vids I mean
 
Is there a way to dynamically reference the class of the current object is Javascript? Like self in PHP? In particular, how could I do the equivalent of new self(); in a factory method? I know I could just do new constructorName(); since JS doesn't do classical inheritance but it feels wrong...
 
like, this?
ah
 
12:48 PM
Well yes but you can't do new this()
 
hm, why? :-)
but yeah I get what you mean, wait a minute
constructor.name
function o() {}
var s = new o();
s.constructor.name
"o"
 
function Foo() {
    this.bar = "bar";
}
Foo.prototype.clone = function() {
    return new this.constructor();
};
var foo = new Foo();
console.log(foo.bar);

var foo2 = foo.clone();
console.log(foo2.bar);​
 
that's awkward
This hands are scarying :o
 
I don't like using "classes" in js btw
 
rlemon.github.com/Killit So you can all kill the gif
 
12:52 PM
function TestClass1() {
  var self = this;
  this.factory = function() {
    return new self.constructor();
  };
}
var test = new TestClass1();
var test2 = test.factory();
Works well, ta very much
 
Use prototype
 
yes use prototype
2 mins ago, by rlemon
function Foo() {
    this.bar = "bar";
}
Foo.prototype.clone = function() {
    return new this.constructor();
};
var foo = new Foo();
console.log(foo.bar);

var foo2 = foo.clone();
console.log(foo2.bar);​
 
Any idea if I should wrap the main content area of a page in a <section> or a good old <div>?
 
function TestClass1() {

}
  TestClass1.prototype.factory = function() {
    return new this.constructor();
  };
 
I prefer something like:

var foo = {};
foo.clone = function() {
    return Object.create( foo );
};
var s = foo.clone();
 
12:53 PM
Not disagreeing/refusing, but can you explain why that is better?
 
@FlorianMargaine mofo ninjaing me all morning
 
ok, so <div> as it will be just the content area that contains actual sections (like news posts)
 
Object.create does not work in all browsers
 
@dievardump you can shim a basic one
quite easily
 
12:55 PM
7
Q: Semantic HTML5 and proper use of tags

rlemonI'm trying to develop a base for a blog using some of the new tags introduced in HTML5 and I want to not only make sure I'm using them correctly, but my code is also semantic. Here is just the 'sample' document. <!DOCTYPE html> <html> <head> <meta http-equiv="content-type"...

 
@ThiefMaster news posts should be <article>
 
@FlorianMargaine Yes. Do you have any read that could make me prefer Object.create to new functionName() ?
(in the browser.)
 
not using awkward classical inheritance in prototype js
 
12:59 PM
@FlorianMargaine Really. wat.
 
@FlorianMargaine I like inheritance.
 
if (!Object.create) {
    Object.create = function (o) {
        if (arguments.length > 1) {
            throw new Error('Object.create implementation only accepts the first parameter.');
        }
        function F() {}
        F.prototype = o;
        return new F();
    };
}
@dievardump "classical inheritance"
 
Classical inheritance, yes.
 
prototype inheritance is the core of javascript, of course you like inheritance
 
I like to be able to :
var Animal = new Class({
    type : '',

    initialize : function(type) {
        this.type = type;
    },

    toString: function() {
        return "I'm a " + this.type;
    }
});

var Cat = new Class({
    Extends : Animal,

    name : '',

    initialize : function(name) {
        this.parent('cat');
        this.name = name;
    },

    toString : function() {
        return this.parent() + ' and my name is ' + this.name;
    }

});
 
1:01 PM
uh, well, that Java, not Javascript
 
That's classical inheritance. Not "Java"
 
that's just hiding the true nature of javascript
 
Could someone do me a massive favour?
 
> This indirection was intended to make the language seem more familiar to classically trained programmers, but failed to do that, as we can see from the very low opinion Java programmers have of JavaScript. JavaScript's constructor pattern did not appeal to the classical crowd. It also obscured JavaScript's true prototypal nature. As a result, there are very few programmers who know how to use the language effectively.
 
wrecking my head
 
1:02 PM
I read this. It didn't help me ^^
 
anyone got a good uela I can copy :P
 
@FlorianMargaine John Resig wrote something similar to that by creating Object.prototype.extends() IIRC, and at the end concluded that it was generally a mistake to try and implement classical inheritance in JS.
 
@DaveRandom yes, $.extend is pretty much another Object.create
Somehow.
 
@rlemon EULA?
 
@rlemon for what?
@dievardump it's just trying to use javascript for what it's not...
it fails for multiple inheritance
 
1:04 PM
I'm still not understanding why declaring the factory method in a separate prototype statement is better than the approach I used though, isn't the end result the same?
 
@FlorianMargaine Not really.
@FlorianMargaine Yes, maybe.
 
@AmaanCheval yea typo
 
(two different answers for two different statements)
 
@rlemon I don't have any :p
 
shitty generic eula for some software I wrote
blah blah we are not responsible... blah blah
that kinda stuff
 
1:06 PM
just for curiosity - ive always wondered why when I do

'100x100'.match(/([0-9])+x([0-9]+)/)

it returns the first argument which I didnt ask , I only wanted the groups

["100x100", "0", "100"] // result
 
thanks florian
 
@rlemon How about "Whatever your problem is, it's not my fault. You bought the software."
 
I will read it
lol
 
you should, but that wasn't directed to you
 
1:06 PM
shit it's 9:05am
 
@rlemon also
 
@RoyiNamir might be misunderstanding but doesn't all regex functions do that like PHP's preg_match?
 
The MIT License (MIT)
Copyright (c) <year> <copyright holders>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantia
@RoyiNamir I'm pretty sure the doc would answer you
 
it does , i read it but i dont understand why they did it. they just did. no explnaation why
 
oh, that.
 
1:08 PM
@RoyiNamir I think it's the way Perl does it ergo it's the way just about everyone does it.
That seems to be true of a lot of things about regex
 
regex is not the same in c# or in js
 
Hey everybody! Did you hear the good news? You can now use JavaScript in Dart!
 
regex in js doesnt support negative look behind for example
 
@RoyiNamir MS regex is a mess. JS regex is generally limited. Really they should both just implement PCRE and have done with it, IMHO
 
@FlorianMargaine I <3 MIT License
 
1:10 PM
yeah i know but my question is why they supplied the first array item
in result i mean....
 
> What's small, red, and crawling up your girlfriend's leg? A homesick abortion.
 
@RyanKinal saw the link in js weekly, didn't even open
 
@AmaanCheval Those are awesome
 
haha, the first one :D
 
@RoyiNamir Because they do. If you think about it it kind of makes sense, what if you just want the entirety of the matched string? This way you don't have to wrap the whole thing in a capture group. I have used $matches[0] in PHP numerous times. Anyway, you can allways just start your loop at 1, or .shift() the result, or whatever as appropriate to what you are doing with it.
 
1:15 PM
interesting thanks
 
0
Q: How to loop through a javascript object and check each key exists in a separate multidimensional object

Paul AtkinsI have 2 javascript objects and I am trying to loop through one object and check whether the key exists in a second multidimensional object going one level deeper each time. Here are the two objects var check = {'scope':'instance', 'item':'body', 'property': 'background'}; var values = {'inst...

 
@GNi33 RE: People act like jerks even when they ride bicycles. That guy was stopping some people that stole a persons purse.
Ah it's the top comment
 
Zirak, asking again'
have u got any resource for
AI development
i know this is your field of intrest
 
1:31 PM
And so, answer the poor gAI
 
eh ?
 
let's take a look at the dependencies of this module github.com/jesusabdullah/hoarders/blob/master/package.json
 
i just did
holy crap on a cracker
Everyone Groove
 
1:37 PM
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

      0. opan saurce LOL
4
rofl
 
let's go for time npm install hoarders
@RyanKinal someone noticed :D
 
@rlemon DONE AND DONE
 
1:52 PM
@FlorianMargaine that's the first thing I saw, after the big jpg
LOL.
 
lulz
 
@dievardump HOLY CRAP
 
> There are already more than 100 million iOS devices using the new Apple Maps, with more and more joining us every day. In just over a week, iOS users with the new Maps have already searched for nearly half a billion locations.
yeah, they try to find funny stuff
 
I'm... amazed
 
1:59 PM
> While we’re improving Maps, you can try alternatives by downloading map apps from the App Store like Bing, MapQuest and Waze, or use Google or Nokia maps by going to their websites and creating an icon on your home screen to their web app.
 
@dievardump old
 
Apple.... is suggesting we use software that isn't patented by them....
 

« first day (713 days earlier)      last day (4245 days later) »