« first day (68 days earlier)      last day (4876 days later) » 
00:00 - 15:0015:00 - 00:00

Tek
12:00 AM
D:
 
with sort of a controller that had a list of the IDs it was workign with
 
Tek
I should have mentioned that first, huh?
 
rather than creating a new animating object per image
 
Tek
I thought just having the IDs as variables would be enough
 
well it is... but it makes keeping track of duplicates a little harder
 
Tek
12:00 AM
my mistake, bad assumption on my part
 
and it's less intuitive what you're trying to do
 
@AbdullahJibaly I dunno. $(node).hasClass('center') should return true.
 
yeah
webkit inspector says node is : HTMLTableCellElement
no idea why $(node) would give null?
oh, wierd
I tried jQuery(node), and it worked
 
... I have seen that before but don't understand it.
 
must have something strange going on...
 
12:05 AM
you're redefining $ somehow
what does alert($) give you?
 
function ()

{

return document.getElementById.apply(document, arguments)

}
thats not jQ is it?
 
ahah, doesn't look like it
 
now what's strange too is that after the page loads (I had a breakpoint previously), $ now returns: function (a,b){return new c.fn.init(a,b)}
maybe the tablesorter plugin does something to redefine $
thanks for your help though
 
12:24 AM
@AbdullahJibaly, if you find out exactly why $ is breaking I'm curious to hear.
I chased a similar problem for a while and discovered I could workaround with jQuery() but never understood why.
 
@Nathan sure thing
 
 
2 hours later…
2:02 AM
I'm off for the holiday weekend. Merry Christmas to all, and to all a good night!
 
somebody still awake?
 
I am
 
nice
you know about any issues with responseText (jQuery) in IE?
@jon3laze
 
not off hand what are you running into with it?
 
that works except from in IE
"spam" is empty
 
2:18 AM
Is IE kicking any js errors?
 
nope
nothing that I can see anyways
but google tells me I'm not the only one with this issue, but can't seem to find any good solution to it..
@jon3laze you know any quick way to rewrite that block fetching data from php?
 
what framework are you using for this?
 
jQuery
 
what is the expected output type from the php
 
string
or.. a number, anyways
anything?
 
2:32 AM
This is how I've always done $.ajax() with jQuery, go ahead and give it a shot and see if IE still chokes.
@LasseAKarlsen sorry, typo on that one. I put a period after the async: false instead of a comma
 
yes, thanks!
yes, I normally do it that way to
 
yea i've not used responseText, but most of my $.ajax() work has been dealing with json
 
I'm trying your method now..
@jon3laze: still doesn't work in IE..
 
2:50 AM
when you do an alert in the success on IE does it trigger an alert with nothing on it, or does it not fire at all?
 
it triggers the alert, but the response is always 0
what does that mean?
 
sounds like it's either sending or receiving incorrect data...can you do the same request in FF w/ firebug up and when the $.ajax() is fired check the method(POST/GET) and see what was sent and received?
 
sorry, I'm at work, so I barely have access to do this :p
but I can check the apache request log..
heh, now all of a sudden it returns "3"
hmm, nothing from apache access logg..
but why 3? :p
 
Honestly I have no idea, that's weird that the ajax would return different values in different browsers. You would think it would fail, not change the response :P
 
hehe, really strange..
I'll check out firebug when I get off
or... you could? :P
@jon3laze
www.mpwars.com/mpwars/
@jon3laze: try to pm "laka"
 
3:18 AM
@LasseAKarlsen Hey real quick...try adding cache: false to the ajax call
IE may be caching the response and that's why it always returns 0
I think I ran into this before, I think IE might default different than the other browsers on this
 
okay trying!
 
@LasseAKarlsen Sorry didn't realize the time, I have to jet but let me know if that works...if not may have to post and see if anyone else knows wtf :P
 
@jon3laze: hehe, np mates, thanks for your help
didn't work btw.. now it only outputs "1"...
crap
 
Tek
How can you detect a scroll click with jquery?
 
Tek
3:26 AM
nope, found out .mouseup() works
for left and middle clicks on mouse
 
All the click events should work, 'scroll click' is just mapped to middle mouse click most of the time
 
Tek
I was using click() before
 
click seems to work for me
$(document).click(function(e){alert("yo - "+e.which);});
 
Tek
hmm
middle click?
works with click?
 
it does when i test it in jsfiddle :S
 
Tek
3:42 AM
oh well
xD
 
Hello
 
Tek
hi
 
How do I make the cursor in a text box go to the beginning?
 
Tek
@Chacha102 are you using any libraries or pure javascript?
 
jQuery
 
 
4 hours later…
8:15 AM
hi all
i've been using prototype until now and i've been playing around with jquery... can somebody please take a look at this? jsfiddle.net/wAcVs
i'm pretty sure thats not how to do it properly :)
 
9:02 AM
Hi!
 
9:29 AM
@koko Do what properly ?
@Nyuszika7H hello there
 
9:40 AM
@ClemDesm i think i need to destroy the plugin applied to the element before applying it again to the same element
@ClemDesm it works for the first time, but not when applied to the same element again
 
10:01 AM
got it.. just had to remove the id assignment
 
10:28 AM
function popupCheck() {
  try {
    window.open('javascript:this.close();');
  } catch(e) {
    alert('Pop-up blocker detected!');
  }
}
 
@Nyuszika7H: I don't think popup blockers throw an error when they block
 
@AndyE Then maybe this will work:
function popupCheck() {
  var popupBlocker = true;
  window.open('javascript:popupBlocker = false; this.close();');
  if (popupBlocker) {
    alert('Pop-up blocker detected!');
  }
}
Nope. :/
 
@Nyuszika7H how about checking the variable after one second or so?
 
@thejh Nope, it won't work.
Neither this:
function popupCheck() {
  mainWindow   = this;
  popupBlocker = true;

  window.open('javascript:mainWindow.popupBlocher = false; this.close();');

  if (popupBlocker) {
    alert('Pop-up blocker detected!');
  }
}
 
10:50 AM
it especially wont work cos you misspelled it as 'Blocher' once
 
@david Fixed it, but it still doesn't work as excepted.
 
var pop = window.open("/somepage");
if (!pop || pop.closed) {
    alert("blocked");
}
@Nyuszika7H: have you tried something like that?
 
11:05 AM
@AndyE nice ;)
 
does it work? if so, it exceeded my expectations.
 
@AndyE yes
WTF?
Number.MIN_VALUE < 0 // false
Number.MIN_VALUE > 0 // true
It looks like `5e-324`is more than 0. LOL
 
@Nyuszika7H err... why not?
"The Number.MIN_VALUE property belongs to the static Number object. This represents constants for the smallest possible positive numbers that JavaScript can work with."
 
11:20 AM
@Nyuszika7H: 5e-324 is a positive floating point number, it's not negative.
 
It's just a lot of 0 after the comma
(or the dot)
 
0.000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000005 to be exact
heh.
 
Thanks for making the overflow of this chat burst @AndyE .
 
my pleasure
I'm thinking about leaving it like that
 
It's your chat afterall.
 
11:36 AM
midnight has passed, it is time for bed
night all
 
bye
 
 
2 hours later…
1:12 PM
Wow, christmas is killing this chatroom.
 
Good Day...
Yay! It's Friday!
 
Tek
YEY!
 
@ircmaxell Good afternoon to you too
friday?
 
Anyone here good with javascript timers?
 
Yes, it's friday
(for me at least)
@Nyuszika7H It is. But if you want your mind blown, 0.999999999999999999 (repeated indefinitely) is exactly 1. It's a provable mathematical fact...
 
1:27 PM
@oshirowanen Define timers? Are you looking for the Date object?
 
@YiJiang Basically, I want to be able to run a function every second for example.
 
@oshirowanen: not possible (well maybe possible....). You can run a function with a delay of 1 second, but since JS is single-threaded if it's doing something else at the time, it won't be run until it stops doing something else...
 
@oshirowanen Have a look at setInterval and setTimeout.
 
@oshirowanen You're looking for setInterval and setTimeout - developer.mozilla.org/En/DOM/Window.setTimeout
 
I wonder something... A worker is it's own thread, right?
 
1:30 PM
thank god nobody linked to the w3schools docs for setInterval and setTimeout.
 
@AndyE Heaven forfend...
 
@ircmaxell: yes, a worker has its own thread.
 
So theoretically you could set that to run every second... And no matter what else is happening it would (assuming its code doesn't run more than 1 second)
 
hmm not really. Workers still have callbacks/events queued on the thread, so there's still no guarantee.
 
Fair enough
 
1:45 PM
Dude, this yoda guy is getting annoying. He's commenting out of his ass and saying blatently wrong or dumb things...
0
Q: php namespaces on the fly

Senica GonzalezI asked a question yesterday about namespaces that got answered, and so I tarried along. The further I get into this thing though, the more I realize, I would really like to be able to generate namespaces on the fly. Reason being, I have a plugins directory where all the files get included. If ...

0
Q: PHP namespace with Dynamic class name

DeaconDesperadoHello all, Wondering if anyone else has encountered this problem when utilizing the new ability to namespace classes using PHP 5.3. I am generating a dynamic class call utilizing a separate class for defining user types in my application. Basically the class definer takes an integer representa...

 
hey, skype is still down
 
skype is bad.
 
supernode concept sucks
recovery from failure itself is a failure
 
Well, make your own then...
 
well, what about stopping the individual skype instances from DoS'ing the few supernodes that are online? :/
or simply adding a timeout after X failed connection attempts..
 
1:54 PM
That would be the smart thing to do...
 
it would be interesting to know what exactly triggered the all the nodes to fail in the first place
 
@IvoWetzel hummm... how does Skype deploy updates?
 
@thejh Uh, you go to the Website and download a new Version?
Or just use Linux
 
@IvoWetzel no auto-update?
 
They never update that thing
@thejh Nope, and many people would hate them for that, each version has a bigger, more complicated GUI than the previous one
 
1:58 PM
@IvoWetzel propably means that there's a big bunch of undiscovered critical bugs, right?
 
@thejh Most likely, yes
There are some PDFs out there from people who reverse engineered Skype
It's ridiculous how much obscurity they added to the program...
e.g. Skype performs checks of the executing code at runtime...
of course, in the end it didn't stop people from reverse engineering it... so yes, wasted time and money
 
@IvoWetzel well, only a few people, and they didn't publish code, right?
 
@thejh The PDF described the whole process very detailed
Hacking obscurity is just a matter of time and money
There are more than enough people/governments who have these two resources
 
Ugh! @ $("#3").remove();
0
Q: remove table row with specific id

JohnI have the following table: <table id="test"> <tr id=1><td>bla</td></tr> <tr id=2><td>bla</td></tr> <tr id=3><td>bla</td></tr> <tr id=4><td>bla</td></tr> </table> Now I want to remov...

Dear people who don't give a crap about pointing someone in the right direction, please answer questions somewhere else. Thanks.
4
 
@AndyE Pretty amazing how many people get it wrong
 
2:06 PM
uhhhh
 
Yeah, it's annoying - especially when decent answers get buried by many poor answers.
 
yet another one that wants to store images in his DB
 
@IvoWetzel which means that they are able to install viruses on skype-using computers all over the world, right?
 
@thejh Well if there are security holes that allow for such things, well then yes :P
 
@IvoWetzel ehm... how should I do it? At the moment, I'm doing it that way...
as files?
 
2:07 PM
Store images as files
 
id=test1 I don't like it written like this. :(
 
Dude, look at yoda 's reply...
0
Q: php namespaces on the fly

Senica GonzalezI asked a question yesterday about namespaces that got answered, and so I tarried along. The further I get into this thing though, the more I realize, I would really like to be able to generate namespaces on the fly. Reason being, I have a plugins directory where all the files get included. If ...

 
@IvoWetzel I always have a bad feeling when doing such stuff because of poison null bytes, directory traversal, ...
 
Of course you can try and retrieve 1mb of jpg's from your DB... performance will be... uh
@thejh Store the name in the DB along with a hash for the filename, then create a hierarchical directory structure for storing the images
 
stores files in the DB all the time
 
2:10 PM
which kind of DB?
 
MySQL
but never in performance constrained environments
 
The guy in question wants to put them in a MongoDB
Like.... {imgdata: "base64encodedstuff"} ...
 
That's a great idea actually
gridfs
well, putting them in as blobs is bad... Use gridfs...
 
@IvoWetzel base64encoded? ouch...
 
2:12 PM
dunno it seems that he has no idea on how to to it
@ircmaxell ah ok, yes that seems to be a nice way
 
aaaargh! found my code for retrieving the image from the DB and passing it to the user... I'm feeling guilty...
$resultarr = mysql_fetch_array($result);//maybe a LITTLE bit RAM-intensive? hm, whatever...
$mimetype = $resultarr["type"];
header("Content-type: $mimetype");
echo $resultarr["data"];
 
each time I read JSON and Java in the same sentence... I shudder
 
I think that I wrote it half a year ago or so
@IvoWetzel why?
 
Because it's horrible to use, when compared to Python/JavaScript
 
hehehe
 
2:16 PM
hey skype was online! for like 2 minutes
 
@Ivo What do you suggest for limiting access to the images? Simply no directory listings?
 
What's the best DB to work with python ?
 
Uh, don't store them under /website? But a level above?
 
(if there is)
 
@ClemDesm I've used sqlite in the past
 
2:18 PM
@IvoWetzel and then pass them to the user through PHP?
 
@ClemDesm But anything that's document based should work great too
 
@ClemDesm: There is no best DB...
 
@thejh That, or use magic®
 
@ircmaxell The most used then in general
 
sqlite shouldn't be used in a concurrent environment (where there are concurrent writes)...
@ClemDesm: There is no most used
 
2:20 PM
@IvoWetzel eh... why magic? The md5 hash of the file could be used as filename and kind of key...
 
People use MySQL, Postgres, Sqlite, Zope, Oracle, MSSQL, Mongo, Cassandra, etc, etc...
 
@ircmaxell I've heard google's mom uses BigTable
 
lol
 
lol
 
And just to know. Is it easy to play with XML with Python ? (last question about Python here I promise)
 
2:21 PM
@ClemDesm: Define the following terms: easy, play, XML, is...
 
Well if you don't mind the second problem, then yes
Although if you want to work with XML...
 
using setInterval, is it possible to specify the delay using a variable?
 
@oshirowanen yes
 
@thejh so while the setInterval is doing it's thing, I can change the delay at any time while it is running?
 
@ircmaxell easy play XML
@IvoWetzel 2nd problem ?
 
2:29 PM
@oshirowanen No. But you can clear and reset it
 
@YiJiang Do you have any simple example code showing this in practice?
@YiJiang scatch that, is it possible to do something as follows?
 
@oshirowanen Have you looked at clearInterval and clearTimeout for clearing the delayed function calls? Just call those, then set the timeout again with a different timeout
 
@YiJiang using setInterval and clearInterval, can I do the following?
start off with one setinterval which continuously runs a function every second
then
at the click of a button start another setinterval running a different function, but
 
@oshirowanen Sure, why not?
 
changing the first function to run every 2 seconds
and getting the second to run every 2 seconds also
but what if i wanted to run function every 2 seconds,
 
2:35 PM
Yeah, sure. It depends on how complex the thing is. You might want to write your own abstraction of the timeout functions if you want to maintain something complex though.
 
but the second function should run in the second between the first function.
 
@oshirowanen setInterval inside a one second delayed setTimeout, immediately after the first setInterval is set
 
@ClemDesm: I know... You missed the point though. What do you want to do? Read an xml file? stream data from it? manipulate it?
 
@ircmaxell create, read, manipulate...
a local one though
 
for example:

function 1 = 10:00:00
function 2 = 10:00:01
funciton 1 = 10:00:02
function 2 = 10:00:03

is possible?
 
2:37 PM
Well, there is a nice library for handling things like that. It's not as straight forward as DOMDocument in PHP, but it's quite up to the task
 
@oshirowanen Sure, but remember that setInterval is performance sensitive - you won't get the function at exactly 1 second intervals, but rather depending on what else the client machine is doing
 
@ircmaxell OK, right, seems like Python got library for everything
 
No problem, that should be ok. However, using the example above, can I then click another button to run a 3rd function?

For example

function 1 = 10:00:00
function 2 = 10:00:01
funciton 3 = 10:00:02
function 1 = 10:00:03
function 2 = 10:00:04
funciton 3 = 10:00:05

is that possible while the other functions were already running but first clearing then setting the new setIntervals again?
 
@oshirowanen You'll probably want to create additional functions that keep track of those functions in an array - the only data the timeout functions themselves will give you is an id for clearing purposes
 
@YiJiang I don't suppose there is a tutorial somewhere on the web to help me achieve this?
Basically, if the user only has 1 function, it should run every second, but the more functions the user has on the screen, the second gets divided by seach function
so it does not matter how many functions are on screen
 
2:43 PM
@ClemDesm: import antigravity
 
@YiJiang it should not run more than 1 at any given second
 
@oshirowanen Alternatively, create a one second interval function that reads from an array of functions and keeps grabbing the next one
 
@ircmaxell Oh My ! I need this, go go go python /o/
 
@YiJiang that sounds a lot more appealing!
 
@oshirowanen Yeah, that should be a better solution (wonders why he didn't think of that earlier)
 
2:46 PM
@YiJiang Thanks for the help.
 
I wonder if you can import PHP
 
$.php()
 
$.php().run('echo "alert(\'Hi!\');";');
 
LOL just saw this, how the iPhone wants to correct stevejobs:
 
hehehe
 
2:58 PM
Doesn't work on my iPhone, IOS 4.1
 
@ircmaxell you should try the $.php().sqlInjectionPlease() plugin
 
Whoever's behind this is getting fired. http://bit.ly/autocorrect
2
that's the one
 
$.php().sqlInjectionPlease().pleaseMeet(user.find('Tables', 'Bobby'));
 
00:00 - 15:0015:00 - 00:00

« first day (68 days earlier)      last day (4876 days later) »