« first day (71 days earlier)      last day (4884 days later) » 

12:54 AM
:kitten quote
 
> "The evolution of languages: FORTRAN is a non-typed language. C is a weakly typed language. Ada is a strongly typed language. C++ is a strongly hyped language." - Ron Sercely
 
:kitten quote
 
> "In the one and only true way. The object-oriented version of 'Spaghetti code' is, of course, 'Lasagna code'. (Too many layers)." - Roberto Waltman
 
1:05 AM
\Good evening
!kitten quote
 
> "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
 
@ircmaxell More like morning :P
 
not for me (20:00)
 
2am
 
yeah...
Did I ever tell you how much I hate windows?
 
1:07 AM
9am :P
 
Guess so
 
I'm trying to reinstall XP-Pro
 
@CodingKitten How's your Christmas
 
@YiJiang Are you a few times that for(var item in at the class ?
 
using VIM with nearly frozen hands is... not that easy
 
1:08 AM
it won't let me install the wireless driver until I update windows. Obviously I can't update until I connect to the internet. Stupid chicken and egg problems...
Wouldn't happen on a real operating system
;-)
 
windows...
What I really hate "installing 40 updates...."
especially when it's running off BATTERY(!)
 
Then restart and "installing 4 updates..." then restart and "installing 10 updates..." then restart and "installing {insert random number here} updates..."
 
yes ...
:kitten quote
 
> "A programming language is low level when its programs require attention to the irrelevant." - Alan J. Perlis
 
Just teached the kitten like 10 new quotes
:kitten quote
 
1:16 AM
Hold on a second, googling that for you... "quotes did you mean horrible typo?" There you go!
 
:kitten quote
 
> "The fool wonders, the wise man asks." - Benjamin Disraeli
 
That's now a total of 60+
 
not bad
add one from me:
^ "The biggest obstruction to innovation is not ignorance, but the delusion of knowledge" - Mitch Pirtle (not one of mine, but a friend of mines)
 
all the quotes
:kitten quote
 
1:23 AM
> "It's all talk until the code runs." - Ward Cunningham
 
:kitten quote
 
> "Java is to JavaScript as car is to carpet." - Chris Heilmann
 
now we're talking
@CodingKitten Good kitty
 
@IvoWetzel more was bored :p regex... that HTML5 flameboy is awesome :)
 
0
Q: problem passing variables into javascript function

Josh RobisonFor some reason when I hover over these objects, no matter what I get the FALSE alert. why? function hoverEffect(listType, button, animatedObject){ var button = $(button), animatedObject = $(animatedObject), listType = $(listType); if($(listType) == true){ $(button).hover(function()...

 
1:26 AM
@CodingKitten That was awesome
 
@YiJiang Goddamn MarkdownMini! complained a working jsfiddle example? borderColor isn't working for me... That is, #drag moves, and navOut before you set these colours?
 
am I missing something there, or do I need to wrap booleans with $()
:kitten quote
 
> "They don't make bugs like Bunny anymore." - Olav Mjelde
 
@IvoWetzel Uh... it's the $ magic sauce! It's guaranteed to make everything 100% more awesome! Even if it's a boolean variable with only two state!
 
@YiJiang Three states
:kitten quote
 
1:32 AM
> "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
 
@CodingKitten Stop quoting Linus that often
 
@IvoWetzel but better write it multiple times in another html
 
@IvoWetzel Well, null isn't really a state, isn't it?
 
@YiJiang FILE_NOT_FOUND
@YiJiang ot is thedailywtf blocked in china?
 
@IvoWetzel I don't check it that often
 
1:33 AM
the newest one is great too :D
 
@IvoWetzel Ha! And the comments only make it more awesome
 
//Status (none, active, finished - default value is false)
public String status;
 
1:47 AM
0
A: General JavaScript Syntax Question

Ivo WetzelWhat this returns is more or less a Counter, if we rename the topmost function, it should make more sense. Well what does it do? Let's add some comments function Counter() { // a function, nothing special here var counter = 0; // a variable that's local to the function Counter return { // r...

love it when people miss the important parts...
and suggest to use code that has completely different behavior...
:kitten quote
 
> "C is quirky, flawed, and an enormous success." - Dennis M. Ritchie
 
:kitten quote
 
> "To iterate is human, to recurse divine." - L. Peter Deutsch
 
0
A: Is there an event that occurs after paste?

Woot4MooA temporary write to the file system to compensate for the new memory allocation

whaaaaat?
whaaaaaaaaaaaaaaaaaaaat?
@CodingKitten Stop posting answers under false names!
 
@IvoWetzel To you too many content (or images) inside it.
 
2:40 AM
:kitten quote
 
> "Computer system analysis is like child-rearing; you can do grievous damage, but you cannot ensure success." - Tom DeMarco
 
 
1 hour later…
3:56 AM
:kitten quote
 
> "Talk is cheap. Show me the code." - Linus Torvalds
 
@CodingKitten Give me teh codez!!! Naw!!!!
 
@YiJiang if you call .removeClass() without passing any arguments it
 
@CodingKitten MOAR CODEZ!!!
 
@IvoWetzel the load() external html :p
 
3:59 AM
@YiJiang Itz NAO(!)
@CodingKitten MOARS
 
@IvoWetzel add in some strawberry juice and there for jsdom
 
@CodingKitten Strawberry juice and Node.js... Mmmhmmmm...
 
@YiJiang That you know of a good site to test regexp on SO?
 
@YiJiang I just did run out of strawberry juice :(
Or would it be "I just ran"?
Gnah, to late... or ... to early
 
4:22 AM
@CodingKitten So... regex with strawberry juice?
 
@YiJiang People keep posting the code without a comment on how bad Flash Video is thedailywtf blocked in his wrong code etc.
 
:kitten quote
 
> "The biggest obstruction to innovation is not ignorance, but the delusion of knowledge." - Mitch Pirtle
 
4:37 AM
@IvoWetzel Where are you getting the quotes from?
 
1
Q: storing the value of setInterval

James Fairif I had a code like this count=0 count2=setInterval('count++',1000) the count2 variable would always set as 2 not the actual value of count as it increases every second my question is: can you even store the value of the seInterval() method

so.... little understanding....
 
wow... that's impressive
 
0
Q: Can setInterval store a value in a variable

James FairLook at this code var count = 0, count2 = 0 setInterval(function() { // I wrote this on two lines for clarity. ++count; count2 = count; }, 1000); if(count2==5) { alert('testing script') } How come the if statement does not execute when count2 = 5

Uh... uh... uh...
 
4:52 AM
>_>
RAAAAAAAAAAAGE, or ;_;
 
5:08 AM
:( this guy needs to read some tutorials or something
 
He has no clue about programming in any way...
better take the PC away from him before he can harm anyone
0
Q: Stop setInterval within jQuery plugin

RomelusI am trying to wrap up a plugin that I am writing but am stumped on a very trivial problem that I cant seem to find a solution for. I have tracked down almost every forum and related problem discussion. Any ways here is what I want to happen, my plugin has a timer that I would like the user to be...

 
 
2 hours later…
6:47 AM
 
ahaha
 
 
2 hours later…
9:05 AM
squid
 
Tek
9:46 AM
octopus
 
 
7 hours later…
5:12 PM
Hi!
A shorthand function – made by myself – for importing styles and scripts:
var _import = (function(path) {
  switch (true) {
    case /.css$/.test(path):
      var cssFile = document.createElement('link');
      cssFile.setAttribute('rel', 'stylesheet');
      cssFile.setAttribute('type', 'text/css');
      cssFile.setAttribute('href', path);
      document.head.appendChild(cssFile);
      delete cssFile;
    break;

    case /.js$/.test(path):
      var jsFile = document.createElement('script');
      jsFile.setAttribute('type', 'text/javascript');
      jsFile.setAttribute('src', path);
 
@Nyuszika7H switch (true) ? Why not just use an if-else statement instead?
 
@YiJiang switch just looks prettier.
 
@Nyuszika7H Rrrrriiighttt... because an useless switch(true) is prettier, right?
 
@YiJiang: It actually works.
(I didn't said an if-else statement wouldn't work.)
 
@Nyuszika7H I don't doubt it works - it's just that when control statements designed for a specific task already exists, you don't really want to get creative and invent you're own
 
5:18 PM
@YiJiang Huh? Is there any one-line method in JS that does the same thing?
 
@Nyuszika7H if - else if is at least one line shorter than your solution - and this switch - case - break structure definitely isn't a "one-liner"
 
@YiJiang You may be right. I just tried out that, because I've Googled for how to use RegExp with switch statements, and it seems this works.
Er, how do I disable XMLHttpRequest logging in Firebug? It's flooding my console log.
 
@Nyuszika7H If you're going to need more than two, and don't want to use if - else if, you can put the thing in an array and iterate over that instead
@Nyuszika7H When you hover over the console button you see a little downwards arrow - click on that, and uncheck Show XMLHttpRequests
 
@YiJiang I'm using Firebug Lite for Chrome…
 
@Nyuszika7H Oh, well than why not just use Chrome's native dev tools?
@CodingKitten :tickle:
 
5:23 PM
@YiJiang var myObj = {} ?
 
@CodingKitten Yup!
 
@YiJiang Try this: if ( $j('#menu-navegacion-principal > li has:('ul')').length != 0 )
 
Really, we need to get rid of some of these code
@CodingKitten Stop showing codez in ur msgs!
 
@YiJiang There really should be a master dupe of outside and inside?
 
-1
A: Can setInterval store a value in a variable

Ivo WetzelOK, activate rant... ehm teaching mode: var count = 0, count2 = 0 // missing semi colon(!) setInterval(function() { // this function will be executed every 1000 milliseconds, if something else is running at that moment it gets queued up ++count; // pre-increment count count2 = count; // ...

hey -3 :D
:kitten quote
 
5:26 PM
> "In My Egotistical Opinion, most people's C programs should be indented six feet downward and covered with dirt." - Blair P. Houghton
 
@CodingKitten kitten vote me up there
 
@IvoWetzel is then eventually to IIS it that hard to understand that IO needs loops somewhere? :/
 
the 1 rep at the end... looks awful
let's search for a random JS answer which is missing something like hasOwnProperty to down vote it
> I think www.w3schools.com is useful, at least as a reference
RAAAAGE
:kitten quote
 
> "On two occasions I have been asked [by members of Parliament]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question." - Charles Babbage
 
@IvoWetzel Oh god... ducks
 
5:33 PM
@YiJiang Gnah already gave out a down for a missing hasOwnProperty :P
 
@IvoWetzel It's that for-in question, yes?
 
@YiJiang yep the cars thing
 
2/4 answers reference w3school... I mentally marked it as salvageable after upvoting the answer that looked most correct
1
A: WHY, JavaScript, WHY?

porneLgcc example.c ./a.out > file.html WHY, C, WHY do you remove newlines?

Ha!
 
@YiJiang You can clearly see that it's Christmas
All the people who know what they're talking about (and Nick) are gone, so everyone and their mom gets a chance to answer questions
 
0
Q: how to make a span look like a link using css and hover?

oooi want to have a link but i want to have jquery event fire onclick so i am using a span instead of a link with an id so i can listen for the click event. i want to make the span look like a link so: Cursor should show hand Underline and blue this works fine in css but i want to remove the u...

1000+ questions, and he still doesn't know how to use :hover
 
5:39 PM
0
Q: Malloc doesn't seem to do anything

marrHi, when I try the code below it works fine. Am I missing something? main() { int *p; p=malloc(sizeof(int)); printf("size of p=%d\n",sizeof(p)); p[500]=999999; printf("p[0]=%d",p[500]); return 0; } I tried it with malloc(0*sizeof(int)) or anything but it works just fine...

>_>
 
Ah well, free rep generator is free rep generator
 
> @Ivo Wetzel - The example was taken, verbatim from w3schools.
Now, would that be to harsh? :P
> @Oded Oh sorry, missed point 4. Link to w3schools
> Can you explain what you mean by your third point about hasOwnProperty, or add a link to a good explanation?
Can we ban people from the JS tag?
 
@IvoWetzel Do you still have that link to that question where you and @Nick engaged someone in a 10+ comment debate on this?
 
@YiJiang Uh... I'm sure it's in my FX history
Question is what was the name >_>
oh my god....
firefox search gives around 5k results for SO
had it something to to with jquery? hm
 
@IvoWetzel Never mind, just search for for in javascript iterate array evil or something like that on Google :P
Hmmm... why doesn't that result in a 20 page rant about why it's bad to use for-in for iteration? Something is wrong about the Internet!
 
5:56 PM
@YiJiang Christmas
:kitten quote
 
> "Java is to JavaScript as car is to carpet." - Chris Heilmann
 
@CodingKitten Good kitty
 
@IvoWetzel just use a round of that regex... I just made it a loop checking if a device is connected or if only I suppose they really don't
 
0
Q: "A Stack overflow error at line 0"

user554415HI anyone, Google search engine will not work once loaded due to pop up box which says "Stack overflow error at line o" How can a novice fix this? Thanks, mikew

Clearly mistagged
 
@IvoWetzel "Google's working for me" :P
 
6:07 PM
Should have been iso8582
 
Finally! I used up all my close votes for the day
First time this happened too every since I got 3k status
 
Already used 3, or 4? hm
 
6:24 PM
C'mon people I want to make some rep... post some silly questions
 
Hi!
 
6:36 PM
noooooo
SO is broken
 
D:
!kitten wob
 
!kitten wob
fails...
 
Double D: The kitten is also broken!
 
can't look up the user
:kitten rchern
 
Oh... sigh...
 
6:39 PM
:kitten rchern
 
Thankfully there's always manual mode :P
 
:kitten rchern
gets timeouts :(
 
wheeloblame.com It always stops at Jon :D
:kitten delay 500
:kitten queue rchern
 
:kitten rechern
:kitten rchern
 
@IvoWetzel I know I don't have 200 rep and I'm banned, but you should really implement a delay :P
It would be very funny if one would do:
 
6:43 PM
hi
 
:kitten wobn
 
Hold on a second, googling that for you... "wobn did you mean horrible typo?" There you go!
 
:kitten wob
 
It's rcherns fault!
rchern, St. Louis, MO
1.9k 1 3 16
 
bad kitty
 
6:44 PM
:kitten delay 86400000
 
:kitten rchern
 
:kitten say I'm silly.
 
i've a jquery question. is there any jquery expert?
 
@JitendraVyas you can ask me
 
6:46 PM
please see this demo htmldrive.net/items/demo/527/…
 
@JitendraVyas Oh, you're asking that question
 
that is very annoying o_o
 
@Matt Distracting, indeed
 
Search for 'parallax effect', come back after you've read through the results
 
6:48 PM
At least make it like... 5 times slower
 
@JitendraVyas Use the Color Animation Plugin or jQuery UI.
 
I think it's spritely.net/documentation looking like i want. going to read documentation
 
@JitendraVyas Spritely isn't exactly used for this sort of thing
webdev.stephband.info/parallax.html might be a better solution
 
What is I want is I want to have 2 html elemnt over to each other . both will have background of clouds
 
6:55 PM
@JitendraVyas If a function doesn't have parameters, you can use setInterval(funct, interval) instead of setInterval("funct()", interval). ;)
 
if put one div over another using z-index
than i want to give scroll effect to both div but different direction
left to right for top layer and right to left for bottom layer
 
set status to busy (Message: playing Bloons Tower Defense 4 at Kongregate)
 
@YiJiang Could you link to the 10 comment debate? I can't seem to find it with that google search :(
 
@david Me neither, sorry. I was hoping @IvoWetzel would remember, but apparently not.
 
that was back in november
dunno, was there a recent data dump? Last time I checked the newest was for oct
 
7:24 PM
Anyone creative here in 'designing' ? I am making a "friend request" box, and i need it that size but i really are not good at css so i need help if any could teach me how to clean up my code and maybe add some detail jsfiddle.net/rKzZw
 
7:39 PM
@Karem I think it would be better to use a jQuery UI Dialog. jQuery is really worth it.
 
7:57 PM
Anyone here used jsPlumb/
?
 
8:16 PM
set status to away
AutoLeave: 7 min inactivity
 
 
2 hours later…
10:13 PM
:kitten quote
 
> "On two occasions I have been asked [by members of Parliament]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question." - Charles Babbage
 
set status to online
Hi, all!
 
:kitten jstruth
 
0 === -0 too, just for added fun.
And it's probably worth noting there that anything is not equal to NaN
 
NaN == NaN        // false
isNaN(NaN)        // true
isNaN(isNaN(NaN)) // false, same as isNaN(true)
 
10:29 PM
Now you've got me looking at isNaN implementations — wow, so many are so vastly over-complex. (Though why there are so many JS-native implementations is an interesting question…)
 
:kitten quote
 
> "Walking on water and developing software from a specification are easy if both are frozen." - Edward V Berard
 
You can do this:
myArr[0] = 'something';
myArr[Infinity] = 'another thing';
But myArr will return:
["something"]
However, you can still call myArr[Infinity] to get 'another thing'.
 
@Nyuszika7H Well, what "myArr" will show definitely depends on the underlying implementation
> e[Infinity] = 2
2
> e
[ Infinity: 2 ]
Infinity is not an integer
 
myArr = {"0": "something", "Infinity": "another thing"} I'm pretty certain
 
10:38 PM
so toString() gets called
which then assigns the Infinity property to the array
objects ftw...
 
Why is whether it is an int or not matter? It's always transformed into a string.
 
Uh, not on an array
array has [] overloaded for the indexing
 
Yes, it is.
 
so ints go into the index, everything else will get to the properties
 
parseInt(Infinity)   // NaN
parseFloat(Infinity) // Infinity
 
10:40 PM
Only [[DefineOwnProperty]] is overloaded for objects which have the built-in Array.prototype object on their prototype chain, and the property name is already coerced into a string by the time they reach there. The fact that implementations chose to store arrays with integral indicies in merely implementation detail.
 
well then real words vs spec
 
There's no black-box observable proof that an integer is used for arrays.
It seems bad to pretend that array["0"] and array[0] are any different when it comes to arrays.
 
Well it certainly tries to parse it as an int
 
Indeed. But this is done for all objects by all implementations, AFAIK.
 
Woah! No <p> elements on SO chat!
 
10:44 PM
Properties whose names are 32-bit uints are stored separately for all objects by all implementations. The magic with arrays is that the length property is automatically incremented, unless it is equal to 0xFFFFFFFF in which case it throws RangeError.
 
hm I see
 
Arrays really have very little magic behind them both in the spec and in implementations.
 
So in the end it comes down to: {} converts any property name to a string, [] checks whether it's parseable as an int, if so set a uint property, otherwise a string property
 
I'd say you shouldn't claim there's any difference.
foo = []; foo[{valueOf: function(){return 1}, toString: function(){return 2;}}] = "bar";
 
[undefined, undefined, "bar"]
 
10:50 PM
If the object was coerced to a number, it'd set the property "1", but it's coerced to a string, so it sets the property "2".
 
sorry your example is flawed
your toString returns a non string...
even if you return a string
it's still checked whether it's parsable as an int
 
yes, but whether or not it's parsable as an int only matters for whether the length property of foo gets changed
 
foo[{toString: function(){return "2.";}}] = "bar"; // []
 
Well, yes, but that's because Array.prototype.toString only serializes numeric indicies
(well, not numeric, uint32 indicies)
 
How do I extend an object? Like this:
ModalDialog = {
  alert: function(str) {
    return alert(str);
  }
}
then
ModalDialog += {
  confirm: function(str) {
    return confirm(str);
  }
}
 
10:56 PM
uh
there's no operator overloading
 
This won't work. It'll return "[object Object][object Object]" in the console.
 
just loop over the properties of the second object and copy them onto the first
 
@Nyuszika7H What a lot of frameworks do is use something like function extend(obj, extender){for (var prop in extender){if(!obj.hasOwnProperty(prop)obj[prop] = extender[prop]}}
 
that reminds me of a very strange thing I encountered recently
still haven't figured out why it happened, basically, I was shallow copying an object
 
@gsnedders You have a syntax error in your code.
 
10:59 PM
@Nyuszika7H Hey, I'm writing JS in a chat room on a single line :P
 
So I wrote a test case to make sure that hasOwnProperty is in place
to test it, I removed hasOwnProperty... the test still passed Oo
 
@gsnedders You can do multiple lines, just write the code in another post. Then press CTRL+K right before sending the message to use a fixed font.
 
@Nyuszika7H I know, I'm well aware it can be done. But some habits from IRC stick…
 
jQuery.extend
function (){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a}
 
@Nyuszika7H Y'know, you could give us the non-minified version.
 
sighs. It disturbs me that I can read minified JS well enough nowadays that I actually understood the minified version as well as the non-minified.
 
function () {
    var a = arguments[0] || {},
        b = 1,
        d = arguments.length,
        f = false,
        e, j, i, o;
    if (typeof a === "boolean") {
        f = a;
        a = arguments[1] || {};
        b = 2
    }
    if (typeof a !== "object" && !c.isFunction(a)) a = {};
    if (d === b) {
        a = this;
        --b
    }
    for (; b < d; b++) if ((e = arguments[b]) != null) for (j in e) {
        i = a[j];
        o = e[j];
        if (a !== o) if (f && o && (c.isPlainObject(o) || c.isArray(o))) {
 
@Nyuszika7H jsbeautifier only helps with whitespace, not with semantic names, etc.
 
@gsnedders Well comes in handy at times... but I'm too are guilty of that "ability"
 
/me grumbles something about Gmail and prototype chains…
(Think: three digit number of objects in the prototype chain of some objects.)
 
11:05 PM
@gsnedders Sounds, very performant
 
Anyhow, I'm off for the night.
 
@gsnedders Good night then
:kitten quote
 
> "You wanted a banana but what you got was a gorilla holding the banana and the entire jungle. " - Joe Armstrong (on object-oriented programming)
 
Hey!
Perfect match for that gmail prototype chain
 
set status to away (going to sleep)
Good night!
 
11:16 PM
@Nyuszika7H night
 

« first day (71 days earlier)      last day (4884 days later) »