« first day (70 days earlier)      last day (4872 days later) » 

1:08 AM
:kitten quote
 
> "I invented the term 'Object-Oriented', and I can tell you I did not have C++ in mind." - Alan Kay
 
: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
 
1:56 AM
:kitten quote
 
> "People think that computer science is the art of geniuses but the actual reality is the opposite, just many people doing things that build on each other, like a wall of mini stones." - Donald Knuth
 
Tek
:kitten say hi
 
@CodingKitten Yay!
 
@YiJiang has:ul the funniest comment there... more upvotes needed!!! definitely isn't the correct syntax there for stuff like that when SO newbie... T^T
 
Tek
:kitten help
 
1:57 AM
Just because I have mercy with you:
 help   |  200                   # Shows the help for 2 minutes.
 ?      |  200  [thing]          # Ask me about my opinion on something.
 rchern |  200                   # I tell you one of the infamous rchernisms.
 wisdom |  250  [username|id]    # I'll show you some wise words but only for 1 minute.
 wob    |  500                   # I'll spin the wheel of blame for you.
 say    |  500  [text]           # Let me say something for you, it will instantly
                                   sound a trillion times smarter.
 
:kitten quote
 
> "PHP is a minor evil perpetrated and created by incompetent amateurs, whereas Perl is a great and insidious evil, perpetrated by skilled but perverted professionals." - Jon Ribbens
 
last quote before bed
 
Tek
:kitten say hi
 
@tek you need 500 rep for say
 
Tek
1:58 AM
oooooooooooh
 
anyways good night guys
 
Tek
no wonder
night
 
 
2 hours later…
3:44 AM
What an interesting idea! :P Distorting time like that
 
 
7 hours later…
10:30 AM
Hi! Anyone there?
 
11:14 AM
merry xmas everybody!
does anybody know why my handler isn't draggable?! jsfiddle.net/TXkH9
 
@Opoe Put the .draggable call inside the click handler, and use appendTo to get a reference to the appended element instead of calling the jQuery function again - see: jsfiddle.net/TXkH9/1
 
okay let me see :D
@YiJiang thank you very much!
 
12:26 PM
append button adds elements to all divs with the same class name (wich is very understandable) what do i need to change about my code to append elements to the container of the append button?
first i create a handler and a container. the append button is in the handler
but the append button now adds to all containers with class name .container
 
@Opoe Read the last section in the Best Practices section here: stackoverflow.com/tags/jquery/info first
Anyway, jsfiddle.net/3ZDLH/1 would work. But the script is getting a little ugly now that you're sticking a lot of HTML in your JavaScript
 
Hi!
 
@YiJiang you're right.. first i need to clean up everything like how its explained at Idiomatic syntax for creating elements
Thank you very much!
@Nyuszika7H hi
merry xmas
 
$('<div>').attr({ title: 'You can\'t close this dialog' }).text('Really, stop trying it. I bet you can't close it without tricking, which is cheating.').dialog({
  modal: true,
  beforeclose: function() {
    alert('Do you really think you can close this dialog? No luck this time.');
    return false;
  },
  buttons: {
    'Ok': function() {}
  }
});
 
@Nyuszika7H And... so?
 
1:04 PM
@YiJiang OS!... DNA
 
 
3 hours later…
3:45 PM
Merry Christmas Guys & Happy 2011
 
@ShurikenSword thanks to you too! :)
 
Hi!
Making custom events with jQuery
$('#myBtn').click(function() {
  // making the event
  $(this).trigger('myEvent');
}).bind('myEvent', function() {
  // handle that event
  alert('myEvent triggered on #myButton!');
});
Yes, it's so easy.
 
4:08 PM
@Nyuszika7H You know, if people wanted examples of how jQuery functions work, they would've looked at the API documentations
 
:kitten quote
 
> "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning." - Rick Cook
 
:kitten quote
 
> "In theory, theory and practice are the same. In practice, they’re not." - Yoggi Berra
 
@CodingKitten Happy with all that snow outside?
 
4:11 PM
@IvoWetzel (which isn't that bad when you think
 
@CodingKitten Dunno, looks pretty cold to me...
 
@IvoWetzel try :has(ul) what's the space taken by the internet space
 
@CodingKitten Internet shouldn't take a whole lot of space...
 
@IvoWetzel Hey 4 up votes for some working (or not) code.
 
@CodingKitten SO standard
 
4:12 PM
@IvoWetzel > haha test use a normal for those of you have in the other html view in Firebug
 
@CodingKitten -4
 
@CodingKitten Absolutely!
 
@YiJiang $('.container').append( '<div id="drag' + (counter) + minutes + " " + "</b>")
 
@CodingKitten Don't give even more jQuery examples
 
@IvoWetzel is that tek
 
4:13 PM
@CodingKitten No, that's not @tek
 
@IvoWetzel $('.container').append( '<div id="drag' + '%,0)'); }
 
@CodingKitten Stop it! You're written in JS not in jQuery
 
@IvoWetzel I have to reinterpret the appendbtn worked so i can't put animate() in that may allow for something like that...
 
Dammit @IvoWetzel, you'll have to manually clean up the input source if this goes on
@CodingKitten Reinterpreting jQuery function is more fun than you think
 
@YiJiang it's just change the right one obviously (which is my question
 
4:15 PM
@YiJiang People keep posting the code without a code block, hm
:kitten quote
 
> "Lisp isn't a language, it's a building material." - Alan Kay
 
@CodingKitten C'mon give us some new ones we haven't heard yet
 
@IvoWetzel did mean horrible typo!
 
:kitten die
 
:kitten quote
 
4:15 PM
> "Perfection [in design] is achieved, not when there is nothing more to add, but when there is nothing left to take away." - Antoine de Saint-Exupéry
 
@CodingKitten Indeed he does!
 
@YiJiang how could I didn't see. They are.
 
@CodingKitten Learn english grammatic first
 
@IvoWetzel I guess just a manual jquery objects
 
@CodingKitten There's a jQuery plugin for english grammatic?
 
4:17 PM
@IvoWetzel Pythonista here, trained to think I'll be redundent
 
lol
 
@CodingKitten How did you piss off the pythonistas so much?
 
@YiJiang Hi all! haz impressionistic advertisements?
 
@CodingKitten Nope, we haz AdBlockz
 
@IvoWetzel Hehe... classical answer to this will only find direct descendents
 
5:19 PM
Can anybody tell me where this 'don't use <button> use <input type="button" />' crap came out from?
0
A: Why doesn't background-color change when I use button:hover?

scartagNo html tag with the name "button" ... you might want to specify a specific class like ".button" then use it as a class for your html button. .button{border:0; margin:0; padding:0;} .button:hover{background-color:#FFC;} for the button find below <input type="button" name="bttn" id="bttn" c...

 
@YiJiang uhhhhhhhhh, I suppose there were some issues with the default type of button in IE or so.. but that's very vague
 
Okay, that's 3 answers now denying the existence of the <button> element. What's going on here!?
Goddamn Markdown Mini!
@IvoWetzel The only problem with <button> with IE is that it won't submit the form as the specs say it should as the default behavior of the element unless you stick a type='submit' in there
That's AFAIK anyway
 
hey someone just gave out a round of -1 :D
 
@IvoWetzel Not me, although I really should be more liberal with my downvotes now that I'm over 10k
0
Q: Is there any place to get other CSS skins for superfish horizontal menus?

oooI am using the Superfish CSS horizontal menu, but I wanted to see if there were other template skins besides the default blue one that were in a gallery or something?

Every time someone says 'CSS skin' I want to kill a bunny.
 
5:39 PM
:kitten quote
 
> "Considering the current sad state of our computer programs, software development is clearly still a black art, and cannot yet be called an engineering discipline." - Bill Clinton
 
1
Q: Creating Dynamic variables from json response

c0mradeMy JSON response looks like this : {"sample":[{"id":"2","name":"branch name"},{"id":"3","name":"branch name 2"}]} My function looks like this : function getJSONObjects(){ $.getJSON("http://localhost/api/branches", function(data){ $.each(data.sample, function(i,item){...

JSON + dynamic thingadongding + eval
 
Well, dynamic variables are just dynamic keys of the window object, to play devil's advocate here...
But yes, eval is pretty much evil everywhere
 
1
Q: javascript : make a new safe class constructor

guilin 桂林sometimes we loss the new keyword when define new object, obj = new Clazz(); //correct obj = Clazz(); //wrong, but no syntax error, hard to debug. I want to write a function to help me create Class and make it new safe. var Class = function(constructor){ //when constructor // if not ca...

raaaage
Forgetting the new keyword is your fault
Yes I know, Crockford hates new and rather returns memory bloating objects all the time...
 
6:13 PM
@IvoWetzel I want a program which pulls thoughts from my brain and assembles them into code, but sometimes you just have to...you know, do the job. shakes head at the OP :P
 
I updated my answer on this...
Emulating Classes is magic enough, adding even more magic just to save 4 characters..
@YiJiang haha that HTML5 flameboy is awesome
 
@IvoWetzel Ah, you saw him already? I was just going to post the answer here
I'll do it anyway
-1
A: HTML5 video performance

Slawek ToireumckjhHTML5 is a hype and a FUD. It's unfinished, slow and video tag you're using is causing some browsers to crash (firefox AFAIR below 3.6.9), on other browsers, eg. Chrome it seems very unstable, in IE unsupported at all. Opera... haven't tested, probably support is as bad as well. It doesn't yet i...

 
what's everyone doing on here on Christmas day?
 
Can someone with more patience than me explain to him why he is oh so very wrong?
 
@Greg Nothing... sitting in front of my PC :/
 
6:23 PM
@Greg Nothing, really. It's kind of hard to buy a turkey for Christmas when there's only two people here
 
@YiJiang Don't look at me... I only left him a comment on how bad Flash Video is on Linux
(Can't wait to see him flame Linux)
 
@IvoWetzel Ha! :P
 
1
Q: jQuery's function($) (jQuery) syntax

mehdiI stumbled up on the following code (included in one file) but I just cannot understand what it really means. (function ($) { function doSomething1(somedata) { } function doSomething1(somedata) { } })(jQuery); Question 1: What does this syntax mean in the contex of jQuery ...

that pops up every single day
 
@IvoWetzel There really should be a master dupe of some sort, but the problem is that the question varies too much
 
Well in the end it at boils down to "Dudes! Helpz ma! I'm to stupidz to use teh searches!"
 
6:29 PM
Hey :) How are you:)?
 
:kitten quote
 
> "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian W. Kernighan
 
@IvoWetzel Anyway, you voted to close already, right?
 
yep
> but if i'd have to choose: make 4% linux desktop users performance miserable, or make 95% microsoft users performance miserable... i'd go for making a website that works well for 95% users. Every big player will tell you the same.
 
@IvoWetzel F%^*( that guy. I've already flagged for mod attention. Ignore the troll.
 
6:33 PM
@YiJiang Can't resist :(
@CodingKitten Go scratch that troll
 
@IvoWetzel hello everyone for the questions on exactly what you're doing hover effects though, you need to use names like appendbtn for buttons that stuff....wish I could draw now snapshot their citrix VM's
 
@CodingKitten :tickles:
 
@YiJiang ok say I don't understand what you're immediately swamped with giant flashing animated advertisements that right?
 
Also, \o/ for Dropbox 1.0 release
 
@YiJiang Still tells me it's 0.7.110 here
 
6:43 PM
@IvoWetzel blog.dropbox.com/?p=581 I think manual updating is needed
 
6:57 PM
huh
nothing has changed
 
is it possible to write a bit of javascript on linux which can bruteforce a gpg key passphrase if most/some of the characters in the passphrase are known?
 
yes
but better write it in c
bruteforce + javascript = lol
 
@IvoWetzel i don't know c...
locally ofcourse
 
@IvoWetzel Yeah... JavaScript performance is generally anemic, because... well, that's the way it is
 
@YiJiang Hm, there seem to be some major problems with the upgrade process on linux..
 
7:07 PM
@IvoWetzel Oh? What method did you use?
 
I've installed the nautilus plugin
but that should update the actual daemon
but it doesn't do that...
it just sits around on the old version -.-
 
ahh
@YiJiang Thx
:kitten quote
 
> "They don't make bugs like Bunny anymore." - Olav Mjelde
 
@CodingKitten They really don't
 
7:21 PM
@YiJiang Hehe... classical answer to reinterpret the file on each request. Just need to know how. I want to, but I was bored :p
 
where did it get the "classical answer" thing from?
 
@IvoWetzel One of mine. Here, let me try digging it out
2 days ago, by Yi Jiang
Hehe... classical answer to this type of question:
 
@CodingKitten Anything to say about that?
 
@IvoWetzel - then eventually to you
 
@CodingKitten To you too
 
7:34 PM
@YiJiang uhhhhhhh sec not? >_> want to focus the element exist at page load time, before the ajax call returns?
 
@CodingKitten Wut?
 
@IvoWetzel ok haz impressionistic advertisements? say I have:<div id="help" style="float:left;width:185px; border-style:solid;border-width:1px;height:690px;padding:5px">
 
@CodingKitten Doesn't look like an "impressionistic" advertisement to me...
 
@IvoWetzel i've tried $.contains() but you're right thats confusing i'm using this in China, you'll see if a number is that you're using navIn and navOut before you want to append the whole container multiple times?
 
@CodingKitten When did you move to China? :(
 
7:35 PM
@IvoWetzel Pythonista here, trained to understand, I'm doing for( i = 100; i see that now
 
@IvoWetzel Maybe parse out HTML elements from the input too?
 
more regex...
 
(With regex?)
 
:kitten regex
 
Ha!
 
7:36 PM
4083
A: RegEx match open tags except XHTML self-contained tags

bobinceYou can't parse [X]HTML with regex. Because HTML can't be parsed by regex. Regex is not a tool that can be used to correctly parse HTML. As I have answered in HTML-and-regex questions here so many times before, the use of regex will not allow you to consume HTML. Regular expressions are a tool th...

 
Actually, sticking the thing in an empty element then remove it should do
 
jsdom sucks...
I rather use regex :P
 
var n = document.createElement('div');
n.innerHTML = 'ok haz impressionistic advertisements? say I have:<div id="help" style="float:left;width:185px; border-style:solid;border-width:1px;height:690px;padding:5px">';

for(var i = 0; i < n.children.length; i++){
    n.removeChild(n.children[i]);
}
console.log(n.innerHTML);
// ok haz impressionistic advertisements? say I have:
 
Don't forget it's running in Node.js
So I have to use the DOM emulation thingy
And I tell you, the term "versioning hell" was invented for jsdom
 
@IvoWetzel Oh, right. I forgot about that
 
7:48 PM
0
A: comet style application with loops

Ivo WetzelThis kind of application will always require a loop, you need to periodically check for new data etc. Of course you can make the "loop" non-blocking by using an even-loop based approach, but in the end there's still a loop somewhere. Just think about it for a moment, how would you make it work w...

is it that hard to understand that IO needs loops somewhere? :/
What does he think? That some magic thingy tells him when new data has been sent to the server?
 
Well, there's also the event driven model, but that's implementation dependent.
 
there's still a loop in the end :P
 
8:09 PM
@IvoWetzel How do the apache logs work? Do they need to loop constantly checking for connections to make a log entry?
 
@oshirowanen I haven't used it, I suppose they just get called by the web server when a connection happens
So the looping is part of the web server then
It all depends where you want to have the loop visible
An event based approach hides away the loops from you, leaving you with an easier programming model
So in short: Using events, someone already did the hard looping stuff for you
 
@IvoWetzel It always comes back to loops then. I have to say I never knew that, I never knew that events are based on loops.
 
@oshirowanen Yep you need loops somewhere, events loops just hide them away from you, which I think is a better model to program anyways
USB also works that way, you computer loops and asks the USB Devices all the time whether it has something new for you
May seem stupid, but that's the way it is, you have to ask if you want to know something, it's not like someone's just gonna tell you
 
@IvoWetzel When a usb device is not connected, does the computer constantly loop checking if a device is connected or not, then eventually when a usb drive is connected, on the next iteration of the loop, it picks it up and displays a message saying its connected?
 
@oshirowanen Yep, although the underlying electronic might trigger some kind of "event" that something was plugged in, but still the computer has to check for those events... so again, a loop
 
8:21 PM
@IvoWetzel I feel like I'm neo being told what the matrix is and I am finding it hard to believe...
 
For example: Games also use loops
Check for input
Update the world
draw the screen
repeat...
the underlying hardware also loops
the CPU itself loops otherwise it would just run out of instructions and everything would come to a halt
 
@IvoWetzel anyway, thanks for the help. so it's probably much better to build upon the apache log system, and once an entry is made, it instantly notifies all the other connected clients, instead of trying to loop a database checking for changes.
 
@oshirowanen If apache logs satisfies your needs, then yes. It will be easier to work with, you'll need less code etc.
Querying a database and making sure that the performance is good, is a hard problem, so if you can use something that solves this problem for you, and you can focus on the logic of the application instead of worrying about DB performance etc. that's the way to go
 
I think that this has more or less answered my question! Thanks for the help.
 
@oshirowanen You're welcome :)
 
8:46 PM
0
Q: How can I display object content without specifying the attributes ?

PatrickHow can I display object content without specifying the attributes ? (The object here is used as associative array) alert(result[0].name); alert(result[0].surname); I actually would like to not have to write "name" and "surname", but display all the content (keys & values) thanks

Great answers so far...
global leakage, missing hasOwnProperty..
 
 
3 hours later…
11:54 PM
:kitten quote
 
> "The trouble with programmers is that you can never tell what a programmer is doing until it’s too late." - Seymour Cray
 

« first day (70 days earlier)      last day (4872 days later) »