« first day (818 days earlier)      last day (4132 days later) » 

10:12 PM
Hello, I have a page, the contents are gotten dynamically with php and i use a foreach loop to display all the content.
How do i get a message on top of the page saying 1 new content, when a new content has been added to the database?
just like twitter does?
 
Use moar jQuery
 
as in?
 
Lots of it. You clearly aren't using enough.
 
hahaha i can tell
so you're saying i should get the contents using jquery itself.
 
@SaffronHarris: the question is actually pretty diversified. You need Ajax communication to your server (or possibly even WebSocket connections) and create a little communication protocol between website and your server/php script
once anything interesting happend serverside, you either wait for a new poll (using ajax) or you push an update (websockets / serverpush events) and then use a little javascript to actually dynamically manipulate the DOM
 
10:23 PM
Hmm so basically, get new rows using php, send the data using JSON array then append it to the html?
 
basically yes. Just the "send the data" would only work with a bi-directional connection like websockets offer. Otherwise, your php script has to wait for client-request to answer/send back anything
 
@jAndy Thanks, that's interesting, i havent dug into websockets, i'm guessing it's an html5 thing right?
If so, are the compatibility issues?
and is there an alternative?
 
Holler
 
@SaffronHarris: yes, websockets were developed/introduced within html5 spec(s)
 
I can't get enough SO... ever...
OK.. I'm bored... bye!
 
10:29 PM
@SaffronHarris: hell yes, there were quite a lot of protocol specs and issues, which were implemented in different states along browsers, but then again, thats quite a while and versions ago
so all latest browser do support it very well
 
@handy not to mention the glorious hacks people did.
handy? Really auto correct?
 
so no worry for firefox, chrome/safari (webkit in general), opera is doing fine now, ie9+10 are also
 
Don't SO and drive, we need your snarkyness, @rlemon
 
the mobile version of me
 
jAndy my phone wants me to call you handy... sorry
 
10:32 PM
handy
 
Its strange... that's my gfs name too!
 
@jAndy i see, i'm guessing there's no hope for 1e8 and below, not that i'm surprised.
 
your girlfriend's name is handy ?
lol :)
 
lmao @rlemon i bet you're a wee bit drunk..
 
Yup... handy palmala
 
10:33 PM
@SaffronHarris: no, no way for ie8 and below. But there are some nice libraries out there, which do offer good fallback's if websockets are not available. Most famous, "socket.io"
 
nope.. sitting in the car waiting for handy to get done tanning so I can go home and get my code on so hard....
ahh. Here she is. See you all soon.
 
have fun
 
@jAndy bless you for that info, i'll go check out socket.io pronto
It doesn't affect anything when it's implemented with php right?
 
fucking tests... *yawn*
 
@SaffronHarris: no, there are pretty much for any language websocket implementation and libs available. If I'm not wrong, socket.io also offers an own php implementation (or some guy wrote it at least)
 
10:41 PM
@jAndy tahnks alot, have you used it before?
 
allllll the time baby
 
Oh nice, is this what node.js does as well?
 
posted on January 11, 2013 by Victor Rodriguez

After my previous post on singletons I went for some Java sample to show the way it was created does not allow to create a singleton. To play with it just checkout the code  svn checkout http://bit-tools.googlecode.com/svn/trunk/JavaLab javaLab and run the JUnit test located at bitman.test.singleton.SingletonTest (it's IntelliJ IDEA ready). In this class you'll find the met

 
its not a node.js specific thing, but since node.js is pretty good about networking in general, it was not surprisingly the first and great server-sided ws-implementations were written for node
as I said, nowadays there are libs for any language you can imagine
 
ha i see, thanks very much @jAndy
 
10:44 PM
@SaffronHarris: you're welcome
 
this one took only 3 hours
 
what the heck are you doing there
and more important, WHY :p
 
Modular Origami
A Hobby of mine
 
paperfolding technique
 
I'm back!
revel in my presence
 
10:50 PM
looks quite awesome, but dude I wouldn't have the patience
 
> You have fully used your vote allowance for today
first time ever
since when are stars capped?
 
GGG
@IvoWetzel what figure is that
 
@jAndy Come on! Just 30 parts!
@GGG That are five intersecting Tetrahedra
 
dodecaheadron?
ugh?
cannot spell worth a damn
 
which form a dodecahedron
 
10:52 PM
In some cultures breasts play a role in human sexual activity. Breasts and especially the nipple are one of a woman's erogenous zones. They are sensitive to the touch as they have many nerve endings; and it is common to press or massage them with hands or orally before or during sexual activity. Some women can achieve an orgasm from such activities.
don't ask why I'm reading the wiki article about breasts, it just popped up somewhere
 
c#
 
kittens
 
yea how do you know
 
GGG
Ah, got it :)
 
I tried to star it and got
1 min ago, by rlemon
> You have fully used your vote allowance for today
 
GGG
10:53 PM
?q=origami intersecting tetrahedra
 
woman can achieve an orgasm via breasts ?! wtf
 
although the C# room was being strange so I thought randomly staring every one word message I could find would be fun.
f u star cap
 
If you're really bored:
the dude made a 9 hour timelapse
 
I see a lot of cutting and folding... but that beer looks neglected.
oo a refill.. but it wasn't empty!
DOGS!
 
ok from now on I will never again disagree or provoke you @IvoWetzel. Its far better to fight side by side with a mad-man, instead against him
 
10:55 PM
:D
 
I just watched an entire hour with NO SIPS@!
that beer is painfully warm by now
 
No time to drink, must fold.
If I really find the time... and have bought enought paper, I might make one of those too.
 
you would not make a good poker player, too much folding
 
GGG
i used to make cubes like this
but they didn't stick together and rotate like in the video =p
 
@jAndy sad trombone
waaaa waaaaa waaaaaa
 
10:58 PM
however, it seems like a another great punishment for our trainees... if they didn't code modulary enough
 
ok serious problem...
I can't find my smokes.
 
good for you !
(I mean it)
 
o_O
not good.
 
@IvoWetzel: you're located around frankfurt area aren't you ?
 
11:05 PM
Mainz
 
aoh, how far away is that
about 50km
I might be around frankfurt soon, got a very attractive job offer from Crytek
 
I see, Zynga just moved to Mainz last December, so I'm not really in Frankfurt anymore
 
a guy seriously asked me the question on a telephone interview couple of weeks ago
"please explain what a closure is"
I was like.. "what da fuq".. did you read my cv? did you read anything about stackoverflow or check it?
 
3k JS upvotes is clearly not enough to explain what a closure is.
 
At least he is asking intelligent questions
 
11:09 PM
funny, I got a question about something like that on my technical interview too :D
 
@copy @FabrícioMatté I agree, but I was quite surprised that those ppl who are really looking for a 'principle engineer' do not really read ppl cv's
at least I don't think anybody told those guys anything about me
 
He probably wanted a particular lecture about closures. =]
 
principal hm? You not actually got a Zynga interview, did you?
 
however, I gave him a 20minutes speech about technical implementations on ES3 and ES5 :p
@IvoWetzel: no, I'm quite sure it was crytek :p why you're looking also ?
 
jquery width equivalent to .slideToggle()?
 
11:13 PM
more or less, yes. We're waiting for backfill approval, somebody left for a new startup thing he's involved in. so we're pretty low on people for our 250qm office right now :D
If you'd be interested, I can give you a contact address.
Shameless plugs follow
 
@bushdiver: there is no "native" equivalent for that. But, its actually just animating the width property, alongside setting he node to absolute and playing around with correct positions
and I'm almost certain, there is a plugin for that :p
 
We're currently right "next" to the Dom in Mainz (office) facebook.com/media/set/…
 
@bushdiver no native support in the core, but I think there may be a jquery-ui module that extends .show() adding that effect
 
handy . You need to blog more
I like how you write.
 
hmm k thanks
 
11:15 PM
@IvoWetzel: actually I didn't even mention a job position or job, but.. for Crytek I couldn't resist
 
PLUS
the official language in the whole office building/complex is english, finally
I can master it :p
 
slideToggle can't be fine tuned to only show only a % can it? probably changes the display none/block right?
 
taking a look at jqueryui.com/effect there's no direct equivalent but Drop and Slide effects are technically close
 
CSS transitions are easy...
 
11:18 PM
where is actually the bot
 
no css transitions in xbox apps..
all jquery
 
yea. My bad
 
unfortunately
 
xbox browser doesn't support css transitions ?
 
not animations
 
11:19 PM
@bush.... I really doubt that. I actually laughed when I read your message. But I'm in the Jon so I'll check in 7 minutes
 
some transitions like scale are working
 
well I guess its running IE6 or something
 
its really ie9
 
just supports jquery.... lol
 
then its shameful
 
11:20 PM
i say stupid stuff its probably wrong rlemon
a lot of css is not working though, having to use all jquery animations
 
lol..
my gf must wonder why I'm laughing and shitting.
 
What'd be the correct way to match a word boundary or a non word character using RegExr? The following isn't turning out how I'd expect.
\W+|\b
 
Why is the + there? You're selecting more than one non-word character
 
@Zirak Yeah, for things like commas. "hello, how are you?". That should match ", ", " ", " ", "?"
 
So what do you want? A bunch of non-word chars OR a boundary? Or a bunch of (non-word chars OR a boundary)?
 
11:32 PM
I see how they'd be different when applied to other situations, but how would they be different in this situation?
 
GGG
one or more
hi Zirak :)
 
If you want the latter, then (\W|\b)+, which I think fits your description. But I have no example, expected output and received output.
 
Basically I'm splitting a paragraph into its words using preg_split. In essence, I'd like "hello, how are you? Hellos and goodbyes. Hello's and goodbye's." to return the following array
array("hello", "how", "are", "you", "hello", "and", "goodbye", "hello", "goodbye");
Notice it ignores spaces, punctuation and plurals (which could be tricky but don't worry about apostrophe s, just "s" for now)
 
You also have to consider cases where an s suffix doesn't indicate plural
But just split on space, remove punctuation from each (or remove punctuation from the source string, then split. sounds better.)
 
@Nile You realize that 's (aposthrophe-s) doesn't indicate plural, right?
 
11:38 PM
@RyanKinal I do, but I did use apostrophe in my example which was where that statement originated form
@Zirak Would the following work
 
And i might indicate plural. es might indicate plural
 
[s\W+]+
 
I wouldn't use a regexp for the whole thing
 
I'm with Zirak on this one. Split on white space, and go from there.
 
I'd just be splitting words and handling them case by case
 
11:39 PM
^
 
Alright, that may be easier in the logrun. Thanks
 
words are so disloyal guys.. they always split up
 
11:55 PM
Has anyone implemented HTTP sessions?
I'm not sure about the best way. Should I use cookies?
 
Cookies work
 

« first day (818 days earlier)      last day (4132 days later) »