« first day (647 days earlier)      last day (4296 days later) » 

6:08 PM
@Neal hahahaa
I don't wanna.... — Neal 1 min ago
 
@Raynos The company makes web-games (php backend, they heavily use jquery); not too complex ones on the frontend, but there's money involved, so that means a lot of shit on the server. Which can only lead to...
11 hours ago, by Zirak
One possible outcome: Decapitation. The target (them or me) remains a mystery
 
@Esailija :-D
@Esailija and it is gone ^_^ mission accomplished
 
I made similar comment before
but the answer is now deleted
so I can't show
 
@Esailija I can see deleted answers
link?
 
but it went like "May I get explanation for downvote?"
I know but I can't find it cos it's deleted so google can't find it
and I said "no you may not" ==D
 
6:11 PM
oy
 
guys
do you have any "sex music", i.e. music that's just great during sex? I'd understand the flags.
8
 
@FlorianMargaine :-P
 
LOL
 
@FlorianMargaine Foghat. Can't explain it.
And Ted Nugent
 
the flags are rolling in...
you have 3 already
 
6:13 PM
haha, really?
guess I'm getting banned soon then.
 
talk to you in facebook chat :D
 
lol
@Zirak k, noting
ty.
 
Enjoy
 
rofl @ stars.
and foghat looks fun
 
Do stars counterweight flags ? I think they should
 
6:15 PM
hello
 
@copy haha, same
especially in this case :p
 
mind tell me how to handle the xss
 
to remain on the topic, some friends told me about Tricky
and... well, gotta try'em all.
good occasion: I'm moving out in a new appartment soon
which means we have to respect traditions
 
what do you mean the xxs
 
@copy People can always reflag as "invalid" in addition to starring
 
6:17 PM
but only 10k can see the flags on the bottom left corner or ?
 
hm, probably. I think I already had way more rep when the chat was added and never used it really much until some weeks ago
 
@ThiefMaster Only rep whores :-/
 
@Mayankswami filter the output
he knows what it is, your question just doesn't make sense
"please tell me how to eat"
yeah, sure.
 
@copy oh yeah, what's up with BadgerGirl?
 
6:20 PM
@Zirak I knew you'd ask. We met yesterday
 
hahaha, nice
 
too many people do not know about this awesome userscript
 
@copy ...sorry, the 13-year old girl in me has to ask. How'd it go?
 
@Zirak dude, you have a 13 year old girl in you?!?! Where do you keep her? How is she still alive?
 
I call her "spleen"
 
6:25 PM
@Zirak She knew maddox and all the other internet, which is incredible. We talked about 6 hours about these things
 
this badger girl?
 
But she also reads this conversation probably
 
meh, you've said nothing bad :P
 
@copy while going to meet you were secretly afraid that she was not a she but in fact Zirak sitting at the bar looking like he does in his gravatar waiting to troll you?
 
6:29 PM
@rlemon That's just you. And I told you, I'm sorry!
 
olol
She is funny.
 
@rlemon Zirak isn't in Germany. Also he does not have a female voice, does he ?
 
she is
@copy Zirak is everywhere
how do you know we are all not just tabs open in his browser
we're all bots from the malformed mind of Zirak
 
@FlorianMargaine Sexe - Saez
I really dislike SQL request that take more than 50 seconds to run.
 
cya guys
and thanks for the suggestions
 
6:33 PM
@FlorianMargaine gluck
@rlemon Don't flatter yourself. If I designed you, this room would be 70% more kinky.
 
You don't look too kinky.
 
6:44 PM
Hi folks, sorry to but in, but I have a very weird jQuery problem (and that chat room is empty) that just popped up. I have several jQuery scripts on a site that have all worked great until today. Now, when I open up firebug, it tells me that "$ is not a function" After searching around, it looks like another script has stolen "$", but I literally changed nothing. Thoughts on how to fix this without wrapping every single script in a bodyguard function?
 
@rlemon because zirak couldn't possibly be me aswell.
 
@Raynos no i've seen his code. He would have programmed you with semi-colons.
 
@patsweet kill that another script ?
Or replace in your code all the $ by jQuery
Or another char
 
@patsweet yea if you have like 15 plugins on a page this is expected (most do not play well with others). I would do as @dievardump suggests and just fallback to the jQuery() way instead of the $() shortcut
or change the last plugin/script that uses $ as a variable or otherwise and change that to not use $, maybe $$ or some other valid char.
 
6:54 PM
!!/jquery noConflict
Or change the source which causes you the trouble
 
yea but with noconflict you have to do shit like this:
<script type="text/javascript">
  $.noConflict();
  jQuery(document).ready(function($) {
    // Code that uses jQuery's $ can follow here.
  });
  // Code that uses other library's $ can follow here.
</script>
I would rather just make my scripts play nice together
 
Yeah, I'd like to avoid changing all the scripts to use $.noConflict. The weird thing, is that I hadn't added any scripts or changed anything but div elements when the ship came crashing down.
I'll experiment a little with swapping out "$" and see what happens.
Thanks for the feedback guys.
 
Well, if you're loading any 3rd party scripts remotely, then they can change
jquery can easily change http://code.jquery.com/jquery.js to a giant XSS attack
They can do it for 5 minutes, then revert, nobody will know. pulls out smoking pipe None will know...
 
@patsweet try to console log $ and see what happens
 
7:12 PM
@rlemon: You should include chat.stackexchange.com in your unicorn userscript
 
which is the better option: animated gif of an arrow going back and forth to point at something... or a static arrow with JS moving the arrow back and forth ?
 
@Dave How about just an arrow, sitting still?
 
im trying to make the site appear "app" like
 
you're trying to make it web2.0
 
7:14 PM
like flash but without flash :P
 
you need lots and lots of animated gifs
 
ah, then i probably just forgot to refresh the page
 
so gifs are better than JS moving the images?
 
@Dave uh, why?
 
7:14 PM
because its a game zirak
 
@Dave I was mocking you for a bad design idea. :P constant animations are generally a bad idea
 
Then that's a different deal. Still annoying, just less redundant.
 
i want it to feel less static for a game :P
 
make the arrow animated on hover maybe? or based on some user action
constant animations are annoying for the most part.
 
7:15 PM
well its for a tutorial so its like saying "click this"
hmm i could do an arrow that fades in and out
 
Well, as a game player since the age of 4, I can tell you that uselessly moving parts are annoying. I hate moving arrows pointing to buttons. Yes, I can see the arrow...no need to distract me.
 
might be easier with style editing in JS
 
If something moves, it better have a purpose other than to satisfy the author's whim for a design that "pops".
 
yeh but majority of games on FB are not gamers they are casual users :P
 
casual gaming is no exception to quality and proper design.
 
7:17 PM
@Raynos Explain what it does ? Is that the function you used in the other example ?
 
My mom is a casual user. She likes glitter. She doesn't like annoying arrows
 
@copy see updated version with usage.js
 
you came into a room of professionals and this is what we think. constant animation is bad news (in this case) - having animated hovers or animated entry / exits is cool (usually un-needed but w/e)
 
@Raynos Yes, it is a standard pattern. Hang on a second
 
what is a preferred way to show them where the icon they have to click is
 
7:19 PM
fitc.ca/events/about/?event=135 ETA 2012 Toronto - Speakers include Ray Kurzweil (I don't think I need mention anyone other than him :D)
Anyone else in Ontario - I hope to see you there
 
@copy be wary of becoming my go to guy for "whats the correct functional programming js way to solve this"
 
@Dave An arrow or overlay. It doesn't have to move. It doesn't have to sparkle. It just needs to exist
 
okay
ill do static then
sumin in my mind doesn't like static but i guess it saves me the work load
 
Thank you. The world is now a little less barf-worthy
 
so no repeating midi file :P
aww :(
on auto play*
 
7:22 PM
gif as background, repeated vertically and horizontally, is a must of course
 
@Dave do it static. If your users are all like "Dude! We couldn't see the button! You should add an arrow or something" then make the arrow bigger... if they still bitch then reverse look them up by IP and slap them with your keyboard.
 
lmao
 
No truly great web page has been complete without at least 4 epilepsy-causing elements
 
lol zirak i prefer gradients that fade downwards to transparent :D
 
@Raynos I'd love to spread the magic of functional programming, although I am not even that experienced at it. On topic: Haskell has splitEvery which does exactly what your function does
 
7:23 PM
i quite like my CSS layout it looks nice albeit a bit problematic with my floats
 
@copy interesting
 
Disclaimer: If you seizure from this site I am not to blame. I warned you. dokimos.org/ajff
 
@copy can you give an example of how I would implement a generic split every ?
splitEvery(list, n) ?
 
sixtiespress.co.uk another winning website design. historianofthefuture.com and another and wait for it.... sosbeevfbi.com/index.html
 
"You are possibly not secure in your own personal faith. Trust in God solely through His Son Jesus for the forgiveness of all your sins and the free gift of eternal life. Click here."
 
7:29 PM
man i hate writing JS some times
takes ages :(
 
@Raynos what is splitEvery?
 
it implies a string but it says list
 
@Esailija the example shows a string but its a list
@Esailija I think we can assume that in haskell strings are lists of characters
 
7:32 PM
Strings are a kind of list
 
splitEvery :: Int -> [a] -> [[a]]
splitEvery n a
  | length a < n = [a]
  | otherwise    = [(take n a)] ++ (splitEvery n $ drop n a)
 
Strings in C are an array of characters
 
0
Q: SVG and Javascript (accesskey)

vijiHow to use accessKey properties in SVG and Javascript.

 
@copy that's recursive and haskell :D
 
True story
 
7:33 PM
with strings I just do "asdasdasdasd".match( /.{1,4}/g );
 
@Esailija how would you do that with arrays
 
nothing comes to mind
would probably have to write own function for it
 
Array.prototype.splitEvery = function(chunkSize) {
    var array = this

    return [].concat.apply([], array.map(function(elem, i) {
        return i % chunkSize ? [] : [array.slice(i, i + chunkSize)]
    }))
}
sorry wait
I had too many semi-colons (I troll, but really this work for you?)
 
@Raynos you can also see the Haskell implementation here: hackage.haskell.org/packages/archive/list-grouping/0.1.1/doc/…
And you really shouldn't mind that it's recursive
 
Array.prototype.splitEvery = function ( n ) {
    if ( !this.length ) {
        return [];
    }
    return [ this.slice(0, n) ].concat( this.slice(n).splitEvery(n) );
};
 
7:41 PM
@copy there is some difficulty in reading that :p
 
@Zirak nice
 
@rlemon that looks like something that can be done with concat-map
 
Wonder what it looks like in Erlang
 
@Raynos The Haskell code or what I wrote ? The code is similar to Zirak's
 
*farts and vacates the room but blames it on @rlemon
 
7:42 PM
Actually it's the same
 
Really? Score!
I'm getting better at this FP thing
 
@Zirak concat flattens the array hence broken
 
@Raynos Try it
 
@Zirak how ._.
oh wait
magic
 
!!>Array.prototype.splitEvery=function(a){return!this.length?[]:[this.slice(0,a)‌​].concat(this.slice(a).splitEvery(a))}; [0, 1, 2, 3, 4].splitEvery(3);
 
@Zirak Maximum execution time exceeded
bah, bugs! Bugs everywhere
@Raynos In exchange for my services, you shall find out how to programatically log into SO :D
 
I always have to perf test everything :/ jsperf.com/chunk-vs-splitevery
Example: logging into slashdot.

This script logs you into slashdot (assuming you have an account!).

setlocal username <your username>
setlocal password <your password>

go slashdot.org
formvalue 1 unickname $username
formvalue 1 upasswd $password
submit

code 200     # make sure form submission is correct!
 
ha, if only it were that simple.
 
are you trying to do this in a specific language?
 
End-goal is in Perl, but I can convert
 
7:54 PM
With Perl use WWW::Mechanize
there is a cookbook of examples.
But you may need a JS-enabled browser to log in to SO, in which case you should look at PhantomJS.
 
you ninja'd me but I at least provided the link!
 
I've played a lot with LWP, but I just can't get it. If you happen to know how to convert cookies into LWP format, I'd love you tenderly.
 
is not sure that is an incentive
 
I know how to send requests, and I've logged into other sites with LWP. It's the damn openid authentication with bizarre cookies coming out of nowhere
 
0
Q: QuickSort implementation not yielding correct output

YoungMoneyI've never coded this myself before, unfortunately. My implementation operates on a custom class based on sorting the "date" field. Yes I am fully aware I can use the built-in Javascript sort and specify the comparator function but that's not what I'm interested in. Currently I start with a rev...

 
7:57 PM
But awesome, didn't know about WWW::Mechanize
 
WWW::Mechanize is more robust for cookie management and stuff, it's more like a real browser.
 
In theory yes, but in practice not quite so automagically.
with Mechanize you just hit the pages in order and it behaves more like a real browser. But like I said, if it relies on JS you're out of luck and should use PhantomJS
Which you should learn and use anyway since Mechanizable sites are getting rarer.
 
hm, thanks, I'll give it a look
 
Also you get to script in JS instead of Perl, which is good if you like JS :D
 
8:01 PM
I've chosen to do it in Perl because I want to learn the language; js is awesome, but it's time I expand
 
I should write a whitespace parser in js. :)
want to learn a language? write a parser for it in a language you already know! :)
 
0
Q: Apache Alias directive - how we can map a remote server folder in Linux LAMP Server?

c0debreakerHow i can map a remote linux server folder to my LAMP server folder with Apache Aliasing? I am having a LAMP server, i want to provide hyper links for some pages in another linux machine folder whis is already shared through SAMBA. Thanks in Advance for your commends -- c0debreaker --

 
@Zirak Good choice! I ♥♥♥ Perl and it's fun because it's super expressive.
 
refactoring large code base is no fun indeed
 
8:21 PM
does anyone here have familiarity with the javascript functionality in yii?
 
isn't yii a php framework?
 
yes, but in order to supplement the php there is a lot of javascript that can (and is) used as well
some of it is interfering with my javascript
 
in PHP, 3 mins ago, by Neal
WHY: http://phpjs.hertzen.com/
 
I am not sure what your question is, it is not that api exactly, rather the javascript yii uses
I should probably just ask them shouldn't I? :d
:D*
 
8:32 PM
yii is a php framework... what javascript? there is no mention of this in the docs. are you sure you are not using a plugin or some jQuery crap?
what are you trying to do? use ajax functionality to pass data to a yii controller ?
 
8:43 PM
@rlemon , yii is a crappy php framework which is bundled with jquery
 
ugh, I read quickly their docs and it seems they provide a lot of easy ajax options but that was all I saw.
ohh well.
not something I would use so eh
@tereško i've now spent all day refactoring my entire codebase because of that damn controller logic issue
in my defence the project grew way larger than its initial scope. however poor design is poor design.
 
8:59 PM
anyone alive in here?
0
A: what is the best way to toggle a image using jquery

NealOk... Instead of your replaceWith just do: $(".open").removeClass("open").addClass("collapse"); //and $(".collapse").removeClass("collapse").addClass("open"); And change the .click to this (using on(...)): $(document).on("click", ".collapse", function () { .... }); Putting that all to...

 
The word "best" should be removed from the English language
 
I am not sure why I got voted down...
@Zirak maybe
 
@Zirak yeah , use "double plus good" instead
and i bet he did not catch the reference
 
1984?
 
9:03 PM
okay, the humour took some time to sink in. Half-wrote a bitter reply when realization hit
 
@tereško why close it?
 
because it is not constructive
it fits the rule exactly
 
@tereško did you even read the question???
 
And actually, "best" is used to "Newspeak" a lot of other words; ask someone what they mean by "best", and they either tell you what they actually meant, or draw a blank, in which case you can remove the word without any harm to the meaning
 
@tereško I changed the title for you...
read the question next time...
 
9:05 PM
what question ?
the one you made uo ?
that is no what OP was originally asking
 
@tereško yes it is!
read the whole question...
 
> my aim is to toggle between two images up and down. this is what i have, it works partially. is there a neater way. If this is OK what am i missing. when i click two times it stop working. here is my code
 
@tereško The OP obviously doesnt know how to format english. I fixed it...
 
9:23 PM
@Neal You downvoted the answer offering (with a code that fit) a CsS solution, Why's that ?
 
@dievardump it's a bigger guess than mine. also why do u think I down voted it?
 
Hum, because you told him
How in all does this answer anything? — Neal 28 mins ago
And I guess (maybe i'm wrong) that you downvote when you say that
But well, downvote disappeared so never mind.
And sorry if it wasn't you
 
Well anyways ive gtg
have fun all!
 
@dievardump or you could look at his history ans see that he focuses on rep-whoring
downvoting would mean that he looses a point
 
@tereško lol all the downvotes on those answers are from me
See ya tomorrow
 
9:31 PM
Was not too wrong
 
Hey , I have a question , if there is an element with styling written inline in HTML ex. style="display: none;" , then is there a way in jQuery to override that style ? doing .css is not working because I believe that the inline HTML style can not be over ridden by css
 
@ScottSelby jQuery.css will modify the element.style
It's a kind of "DOM abstraction"
 
I am trying to fix a page with a stupid plugin in it ddaccordian , and they have certain ul elements hidden , I want to force certain ones to be visible and doing (this).parent().css('display' , 'block'); is not working
 
Are you sure they are "display" "none" ?
Maybe it's visibility ?
 
yes, when I inspect the element that is how it is hidden
 
9:38 PM
Or Maybe it's parent of parent
 
I tried parent of parent too
 
No error in console ?
Any sample code ?
(page that we can see)
 
no errors, and I set the background color of (this) and it does change
 
Sorry I've got to go
 
alright, thanks though
 
10:09 PM
@FlorianMagrange Raynos> this ralt guy is being a troll ._.
 
 
1 hour later…
11:12 PM
@Zirak @IvoWetzel already solved that one. And it's a simple oauth call :/
 

« first day (647 days earlier)      last day (4296 days later) »