« first day (809 days earlier)      last day (4364 days later) » 

00:24
oops
Ok so i had this:

                            if(typeof startObjs[buildingData[X][Y]['build_id']] !== 'array'){
                                startObjs[buildingData[X][Y]['build_id']] = new Array();
                            }
    That broke my script then i put :

    startObjs[buildingData[X][Y]['build_id']] = startObjs[buildingData[X][Y]['build_id']]||[];

Which worked
whats different about these it didn't really make sense to me ?
user1125394
well just change if(typeof startObjs[buildingData[X][Y]['build_id']] !== 'array') to if(startObjs.buildingData[X][Y]['build_id'])
but what if it did exist but was not an array
00:44
whatsup everyone
can anyone tell me how to remove a clone of a div?
with javascript
oh sorry that was answer
whats expected to happen first..
00:47
0
Q: Open the ClearBrowserData bookmark Chrome in a new window

James YoungI am trying to create a bookmark that will open the ClearBrowserData in Chrome in a new window, so far I have managed to get this, javascript:window.open("'chrome://chrome/settings/clearBrowserData'","_blank","toolbar=no,menubar=0,status=0,copyhistory=0,scrollbars=yes,resizable=1,location=0,Widt...

I have a function to remove all clones but its not working
function clearData ? that one
have u made a SO Question on this?
not yet.
was hoping to maybe get a quick answer
if not, i will.
00:49
SO questions get answered 10 times faster trust me than chat rooms :P
unless the question is v.simplistic
at this point i think that I am just going to put a button next to tehm to remove it.
    <input type="button" value="Remove review"
		onclick="this.parentNode.parentNode.removeChild(this.parentNode);" /><br /><br />
you don't learn that way if u do the lazy opt out :P also your accept rate is 40% u might wana get that up
xD
whats that
if you get the answer to a Q tick their answer if it worked
people will answer your Q's if you tick them so people can earn rep for their account
i do
00:54
how are you on 40% then lol
no ideo
lol i only have 5 q's tho
youve got answers to some of them u ain't ticked them :P
u can look at them from your user panel
01:18
@SomeKittens I'm on holidays... there will be no scheduling.
ugh, installed my old gpu ... downloading drivers.. the text is so painful to real.
hehe
i can't read any fonts on here without the clear font option on
01:35
Poll: What to name a function that takes in a function, and wraps it in a try/catch block? gopollgo.com/…
function inception
yep.
did you know, the best way to declare functions with function names is with a standard function declaration?
i like turtles.
:D
Do you have a pet turtle?
infact i used to own 3 terrapins
all died tho :(
02:17
Does an object literal destruct when the page is left? Basically I start off on HTML page A (which is run by the object PageExecute). I have a login box that takes me to a php auth page with POST data. I would like to return to page A after auth with a fresh object. Make sense?
@atomSmasher It should be a fresh object, yes.
sweeet
thank you!
No problem.
just hit 1k rep :D
02:49
@rlemon a little small there
03:09
hello world
@GorchestopherH hello
If I'm trying to avoid using JQuery... is innerHTML an acceptable way of adding items and clearing items from UL's?
@GorchestopherH maybe acceptable
but there's definitely alternatives
...I've finally forced my droid app to use Sqlite and Phonegap, and the last thing I want to do is try to get jQueryMobile working in it
@GorchestopherH You don't need to.
03:14
awesomely enough, it doesn't look like InnerHTML even works natively with just phonegap
@Nile I don't want to use document.write either, as I'm searching a database, and I don't want to have to reload the page for every new search. What's your favorite alternative?
@GorchestopherH I'd hope not.
give me a second
@GorchestopherH jsfiddle.net/yCjHU
ah very nice, those are all native functions?
@GorchestopherH indeed, you can remove also: jsfiddle.net/yCjHU/1
that was my next question, is there a way to remove all child items? Maybe * operator?
@Nile actually, nevermind, I can work with this. Thank you sir, you are a giant among men!
no problem
@GorchestopherH jsfiddle.net/yCjHU/2
03:30
Ah, of course, iterate the loop. You know, I haven't done much Javascript since my school days. Things have certainly changed since then.
I feel like a dinosaur...
yeah
@GorchestopherH You could also do this
Nice and clean, I like it.
Also, Stars are not bloody bookmarks!
@rlemon it doesn't work
lol, works fine for me.
bah
03:40
@rlemon which browser?
wtf
ahh
typo
last char is : and should be ;
Doesn't work for me. I starred it because I liked it.
@rlemon still no worky
> }());​
that should be the last line
there we go
03:42
also the count (again depending on how many times you plan on using this function) should be a local variable you reference.
less DOM interactions the better. If you can just do a single append to the DOM (one call) instead of doing like 4 interactions on each 'button click' then much better.
document.get<whatever>/insert/remove/write/etc... is a dom interaction... these are costly and should be used as little as possible (cannot be avoided obviously... but it is less costly to hold the element in memory than it is to keep reaching into the DOM and grabbing it/them).
so, since I'm using that list to display query results, that will be happening fairly often, hold onto the object variable, sounds good.
@rlemon does document.createElement() interact with the dom upon calling it?
@rlemon So creating 1000 elements, appending them to another element (not yet appended to the page), and then appending it the page would be much more efficient?
!!/tell Nile mdn document.createDocumentFragment
@rlemon oh okay. thanks.
or @GorchestopherH if you are processing and displaying thousands of results on a single page a technique like this may be best. jsfiddle.net/rlemon/h98uY/1/light
@rlemon It's nowhere near hundreds, 300 items at a time tops, and the user chooses when to search.
doesn't that go one element at a time?
why is that better than using a document fragment?
@rlemon This seems to go faster. jsfiddle.net/h98uY/3
@Nile it is an example of processing very large expensive loops in 'chunks'
here is an example of processing large arrays of data to be inserted into the dom.
04:06
okay
04:18
posted on January 02, 2013

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {} Legend has it there'll be a science-themed smbc collection in a few

05:09
 
2 hours later…
06:46
Hahahaha
07:24
@Zirak You'd suggested that I read Ender's Game. Should I be reading Asimov's books first or something?
Irrelevant to reading Ender's Game, I'm guessing, but I should add them to my list anyway, right?
(Asked because in the intro of Ender's Game he mentioned that he was inspired by the Foundation series)
 
1 hour later…
08:40
Can someone tell me the difference between function a() { return { x: 1 }; } and function a() { this.x = 1; } with var z = a(); and var z = new a(); respectively?
for the first, the prototype of z is Object.prototype, for the second it's a.prototype
in the second case, z "inherits" from a
Though in this case there is little to inherit I imagine.
08:57
Yeah.
but you can inherit methods.
although personally I feel like it's limiting, and prefer to return an object, with the advantage of having a closure within which I can play as needed
You find the second way (this.x = 1} the limiting one?
09:42
yeah
but not at this point, just further down
Hm.. A friend showed me O3D api. For some reason I had not really looked at it. Am I right in thinking Three.js is the most popular one? And in that case, why is o3d not
09:58
@FlorianMargaine: The reason I ask is because JSDoc has plenty of problems with the one you prefer.
ah yeah
of course.
generated docs suck btw :P
I have lots of trouble getting JSDoc to work without complaints about my code.
such as return { x: 1 }; with the associated JSDoc {{ x: Number }}
you can use docgenerator to organize hand-written doc btw.
Which won't work.
yeah, that won't work
you need a well written doc generator, i.e. one that handles the dynamic nature of JS
10:05
IE: Not JSDoc
so either you code according to your tool, or you tool according to your code :P
@AmaanCheval You should definitely read some Asimov, but whether to read it first is up to you. I don't think it'll have an impact.
@FlorianMargaine: Company dictates.
Meaning, code according to tooling.
But thanks for your answers.
@Jaapjan Tell your boss some people from the internet say he's a doodoo head
10:11
@Zirak: Do I look suicidal?
Not usually
is your life endangered with your job?...
@FlorianMargaine: No, that depends on my choice of words!
Working as the mafia's sysadmin was not a wise choice
@Zirak: It pays well
.Just .. hazardous
;)
11:02
FINALLY, found the problem with the windows install...the installer choked at some point because of a PCI card...
I'm gonna tweet them...
huh, it works if you strip off the empty parameters at the end.
But still...dafuq
11:59
Happy birthday internet!
Hi
I got error Un-caught Syntax Error: Unexpected Number.
I am going to parse the user IP through second parameter, then it says the un-expected number error.
$execute = "<a href='' onclick='hashblow($id,$user_ip); return false;'>Like</a>";
1 hour ago
This is a mixture of PHP and JAVASCRIPT
but I am not able to parse the user IP through second parameter
it says un-expected number error.
The code was fine until I decided to use user IPs
any solution to that?
First of all, you have an invalid soup of php, html and js.
@Zirak ehm, How?
"<a href='' onclick='hashblow($id,$user_ip); return false;'>Like</a>";
^            ^
start       end
 string     string
php thinks the rest is php (until it sees more strings or the likes.)
i survived my viva :D
12:09
ah wait I was just stupid on that
So what should i study about data-structures ?
@Zirak Actually, the $user_ip was added later to the hashblow function, Before that it was working correctly so you cant say its wrong
So my thought is the second one: You're just adding in the raw IP, e.g. 192.168.102.4, and js sees it as a number. Wrap in quotes so it'll see it as a string.
Or even better...don't use inline js in html.
No, I am not using inline a script, Wrapping would break the php string :D
I tried this too --> addlike($id,"."$user_ip".");
Then escape the quotes. Or even better, see my previous message.
12:13
Ah, escaping did it, Thanks.....
12:26
@Zirak It is saving in database but now the ip looks something like 1270 instead of 127.0.0.1
@Waleed It's not a number, don't try to treat it as a number.
0.o?
0
Q: How to add a onclick attribute to a list of checkboxes?

Ashok SainiI have this array for checkbox: array( 'name' => __('Latest Product',''), 'desc' => __('Select if you want to display latest product',''), 'id' => $prefix . 'checkbox', 'type' => 'checkbox', 'std' => '' ) I want to add an attribute for...

ip addresses are not numbers, and somewhere down the line you're telling something "hey, it's a number". So things go a bit wrong.
:( I didn't say that: I got an error Un-caught Syntax Error: Unexpected Number.
12:34
...we already went through that
The IP was sent to another page through ajax, But the Ip was't looking much like as an IP, I didnt applied any PHP or JavaScript function for any security but still the dots were missing :/
Log things, inspect variables, try and debug. Something is treating it as a number, and I can't help you track it without seeing the entire path that variable takes (something I'd rather not do, as I'm in a sour mood already)
@Zirak Okay, I would check that later, Thanks for helping...
Guys, listen
@Zirak trying to find some SQL injection.
12:48
<div contenteditable="true" class="most"><ol><li>edit me</li></ol></div>
How to get index of new li if type new line ?
Js, jq ? $(".most").on('keypress', function(){ ...? })
e.target ?
And why .on('focusin') of contenteditable looping ?
"translate" in document.documentElement
true
what's this property for? ^
can't find any doc
Probably some Chrome property
Can't find it in FF
Hi friends.
i am trying to see if vlc plugin is available in browser using below function.
isVLCInstalled: function() {
var name = "VLC";
if (navigator.plugins && (navigator.plugins.length > 0)) {
for(var i=0;i<navigator.plugins.length;++i)
if (navigator.plugins[i].name.indexOf(name) != -1)
return true;
}
else {
try {
new ActiveXObject("VideoLAN.VLCPlugin.2");
return true;
} catch (err) {}
}
return false;

}

it worksin firefox, chrome, but doesn't work in IE
for ie new ActiveXObject("VideoLAN.VLCPlugin.2") is throwing error even if vlc available.
13:07
!!/beautify 6963485
< div class = 'partial' > Hi friends. < br > i am trying to see
if vlc plugin is available in browser using below
function. < br > isVLCInstalled: function() { < br >
    var name = "VLC"; < br >
    if (navigator.plugins && (navigator.plugins.length > 0)) { < br >
        for (var i = 0; i < navigator.plugins.length; ++i) < br >
        if (navigator.plugins[i].name.indexOf(name) != -1) < br >
        return true; < br >
    } < br >
    else { < br >
        try { < br > new ActiveXObject("VideoLAN.VLCPlugin.2"); < br >
@Zirak o_O
@rajesh please format your code when posting in the chat
@Abhishek iOS6 is like Vista... Apple is now going to try and fix their fuckups and roll out a new OS... but make you pay for the upgrade ;/
@rlemon ok will do from now on
dudes whats up
my jquery unbind event isn't working. I googled it, but found no commonplace problems that could cause it
13:13
Hahahaha
Porn made on prom night
I love the example
> While inthe limo, Kristy and Anthony made a porm on the way to prom.
spam email that is pornographic in nature.
I opened my email and was shocked to see that for once there was no porm.
@rlemon reddit, love it!
no u reddit!
13:40
Markov-chain based password cracker...it must have been done already
hey i dont know to format code here. if u cud help. will be great
!!/tell rajesh format
@rajesh Format your code - hit Ctrl+K before sending and see the faq
@Zirak yo remember that code I wrote for converting strings to links?
Remember where I put that?
13:43
I changed it completely, but you can dig to the first commits of the gh-pages
Hi friends.
i am trying to see if vlc plugin is available in browser using below function.
	isVLCInstalled: function() {
		var name = "VLC";
		if (navigator.plugins && (navigator.plugins.length > 0)) {
			for(var i=0;i<navigator.plugins.length;++i)
			if (navigator.plugins[i].name.indexOf(name) != -1)
			return true;
		}
		else {
			try {
			new ActiveXObject("VideoLAN.VLCPlugin.2");
			return true;
			} catch (err) {}
		}
		return false;

	}

it worksin firefox, chrome, but doesn't work in IE
for ie new ActiveXObject("VideoLAN.VLCPlugin.2") is throwing error even if vlc available.
@Zirak ahh, yes gh-pages repo
@rajesh, no no no!
!!/define no
13:45
@rlemon no: Formed by the flood waters of the White Nile, it varies in size seasonally. (source)
lol
Zirak thefreedictionary sucks dude
Quick question: How does one put site content below the scroll bar, like grooveshark.com?
if any body can give me a answer for my question wud be great
@AlexCastro, spearte div + overflow scroll ?
13:49
@AlexCastro You shout at your site till it listens. They've started getting pretty bitchy these days, haven't they?
0
Q: How can I make a DIV enclose two inside sections?

MelinaI have the following HTML code: <section id="content" class="grid_9"> <div class="block-content grey-bg"> <div class="container_12"> <section class="grid_6 aa"> ... </section> <section class="g...

wtf
@Adnan I'm not sure. I just never noticed any websites which actually push the scroll bar above the content
In GroovShark's case it makes perfect sense
messing with scrollbars is a finicky path to walk. Unless you are building your own scroll bar (which grooveshark does) there is not control over the scroll bar (really) as this is defined by the browser / OS they are on.
Take for example Chrome on Windows vs Chrome on Linux vs Safari on Mac ... all different scrollbars
13:53
@rlemon So!? It has every right to suck whichever dude it wants!
2
You sicken me.
no specs, no standards, no guarantees.
@Zirak bad fish sickens me
1
Q: Change node image with image from array onclick

InkersI am displaying the images from the array. I want the user to be able to choose an image from the array and for it to replace the current image img.src in the table. I have managed to show the user the image choices when a cell is clicked, but unsure where to go from here. I have tried a clickhan...

does code ever make you sad... like really sad... I might go play in traffic.
On SO, most of the time
Hahaha
@rlemon, nice new profile pic.
/ avatar
I detest working with hardware...
Why?
14:03
Because it all makes sense so fast
There are things you can intelligibly on and not just blank screens or hangs
hey, i'm trying to use a google translate dropdown, but it looks very strange on my page...can someone help me sort it out? eartheart.se/wolf/ikuto.html
And in case the art of detecting sarcasm dies out, my previous sentences would hit 7 SUs (Sarcasm Units) on a Sarcasm-O-Meter
14:18
When I run 1.5^2 ,is there a way to force JS to return 2.25 instead of returning 3 ?
^ isn't "power of", it's bitwise-XOR.
Either multiply it with itself, or use Math.pow(x, 2)
heh, thanks Zirak
ugh.... stupid work.
I hate first day backs.
Ew. That's why I'll never get a job
14:32
Number.prototype.pow = function(p) {
    var n = this;
    while(--p) {
        n = n * this;
    }
    return n;
};
also this
1.5.pow(2); // 2.25
^ horribly inefficient.
@rlemon Why? Just use Math.pow
because I can.
thats why
But can I do it in jQwerty?
No, but in jQwertz!
@SomeKittens spelling correction in your article: "Whose life will you make easer?"
Otherwise, good article.
14:36
posted on January 02, 2013 by RKoutnik

The mobile "revolution" has been pretty cool.  We've seen a lot of innovative apps, a glut of games and flashlight apps galore.  It's been the biggest boon for open source since, well, ever.  It's made millionares and billionares and doesn't seem to be slowing down anytime soon. I hate it.  Mobile never ceases to get on my nerves. Remember Web 2.0?  That buzzword-fil

Yeah, that one
Thanks, Feeds
@RyanKinal Good catch.
function mnm( args, end ) {
    var pool = Array.prototype.splice.call(args, 0),
    pos = end ? pool.length-1 : 0;
    return pool.sort(function(a, b) {
        return a - b;
    })[pos];
}
function min() {
    return mnm(arguments, false);
}
function max() {
    return mnm(arguments, true);
}

console.log(
  min(10,20,100,500,5,225),
  max(10,20,100,500,5,225)
);
why? because I can.
function a(){ return 4; }
@SomeKittens // Picked by a fair dice roll
14:49
Today I decided to re-write all of the native math functions to see if I can get any of my own to out perform theirs.
so far i'm 99% slower on all accounts.
I tried that once
Man, I re-wrote the basic math operations, but forgot to account for decimals...
I tried to hack the operators to give them new definitions.... didn't work out.
How did you even try?
function pow(num, exp) {
    return Math.pow(num, exp);
}
14:50
@SomeKittens Hahaha
@SomeKittens that was my first thought.
Number.prototype.pow.bind(Math.pow);
something like that.
Our professor actually asked us not to do something of that sort for our learning exercise (in C++)
wow, I ask one question and you guys really get into it
ok, new question: is there a name for this pattern: var x = x || {};
Doing the logs took more time than writing the code...
lol
var math = (function() {
    function sortAndPick(args, t) {
        var pool = [].splice.call(args, 0),
            pos = t ? pool.length - 1 : 0;
        return pool.sort(function(a, b) {
            return a - b;
        })[pos];
    }

    function getMin() {
        return sortAndPick(arguments, 0);
    }

    function getMax() {
        return sortAndPick(arguments, 1);
    }

    return {
        min: getMin,
        max: getMax
    }

}());
ok now i'm done.
15:04
@Zirak Out of curiosity, why the .join? console.log can take multiple arguments.
@RyanKinal jsbin overrides the console with their own monstrosity AFAIK
Oh. Well that sucks.
yeah, it reminded me why I don't use jsbin.
hm. console.log works correctly. jsbin.com/ijesuz/3/edit
...ok then I'm just hallucinating
15:08
and rofl @ the .add method :P
window.console = {
    log: function() {
        alert([].splice.call(arguments, 0).join('\n'));
    }
};
spice up your console.
@FlorianMargaine hrm?
return this.inc().add(b.dec());
15:28
Added division: tinker.io/4847e
I really like jsbin console tab.
Also, doing something like 32..pow(2) takes about 1.5 seconds, and 32..pow(3) causes an SO
Recursion :D
lol
haha yeah you've got recursion everywhere
Now, for taking roots...I'm sure I had a whatshemacallit implementation somewhere...
Quick off-topic.
What do we call the following case?
15:32
Steve
Henry
"late for dinner"
Boobs
318008
A: "mmm.. this is a nice soup, what does it contain?"
B: "There are blueberries inside it"
A: "I don't think so, let me taste it again"
@rlemon no no no...it's 5318008
15:33
After knowing there are blueberries
A: "Actually you're right, it does contain blueberries"
@Zirak after my brush with cancer it's only 318008
The end.
a bad narrative.
There is some scientific term or some blahblah effect..
Does anyone know it?
Horrible nominee for Literature Noble
Or just a conversation
15:34
grass?
no wait grass is physics.
Harry & Sally
I think you just want the scientific method.
I mean observing something only after you're told about said thing's existence
!!/define Solipsism
15:35
@rlemon Solipsism: The theory that the self is the only thing that can be known and verified. (source)
wasn't that from Descartes? I think so I am?
"I think, therefore I am". Yeah, he "started" existentialism.
I want to say it has something to do with the word "perception"
Like those weird paintings that seem to be very random, but after someone telling you that there's a boat, you start to see the boat
@Zirak meh, he was french, I only know the french version
15:37
I am, therefore I once thunk I was a thinker about being me, therefore extentialception.
"Je pense donc je suis"
I think therefore I am...depressed
I think, therefore 5318008.
2
Can atheists get insurance for "acts of God"?
hii
15:42
@rlemon there is an insurance for this?
If you succeed at failing, which have you just done?
Act of God is a legal term for events outside of human control, such as sudden floods or other natural disasters, for which no one can be held responsible. Contract law In the law of contracts, an act of god may be interpreted as an implied defence under the rule of impossibility or impracticability. If so, the promise is discharged because of unforeseen occurrences, which were unavoidable and would result in insurmountable delay, expense, or other material breach. An example scenario could assume that an opera singer and a concert hall have a contract. The singer promises to appea...
@FlorianMargaine s/God/Nature/
but this is the "common term"
Isn't it called "Act of nature"?
> [a symptons is that] women also menstruate, but are fertile
I mean legally
15:45
@Adnan not in the US... in Canada I think it is.
> Act of God is a legal term for events outside of human control, such as sudden floods or other natural disasters, for which no one can be held responsible.
One of the synonyms to "Act of God" in Finnish is Katastrofi.
But in even legally it is called "God's actions"
Quite interesting, I imagined such terms only exist in the U.S.
@rlemon My gf got pregnent ... act of god ?!?!? nah sounds more like act of me but :3 u know its still outside human control :-|
@kirstyharris .. where art thou ?

« first day (809 days earlier)      last day (4364 days later) »