« first day (646 days earlier)      last day (4285 days later) » 

12:09 AM
0
Q: JavaScript rendering: Canvas or DIV?

RomeoI am planning on developing a multiplayer RPG (kinda like RuneScape, but don't worry, with a different gameplay) and i want to do this in the browser. Now before saying things like "A MMORPG is hard to make" or "Others tryied that too" please keep in mind that i am not dreaming at a huge game, it...

 
12:21 AM
0
Q: Getting vars from php before running JavaScript

user1539152in the following code I have 2 javascript vars that I need to pass to a google charts javascript function . Now of these two vars , one $ValueA is set to be data retrieved from a SQL query , the second $ValueD is just a var that is always = to 20 that I put for testing purposes . Now what I need...

 
 
2 hours later…
2:00 AM
0
Q: Solution to 99 lisp problems: P08 with functional javascript

gorillatronSolution to 99 lisp problems: P08, with functional javascript If a list contains repeated elements they should be replaced with a single copy of the element. The order of the elements should not be changed. * (compress '(a a a a b c c a a d e e e e)) (A B C A D E) Anyone want to review...

 
 
1 hour later…
3:27 AM
Wow, the site also has chat : |
 
 
2 hours later…
5:04 AM
hello hello
Does jQuery AJAX store any data in cache or memory.... becose after 6-7 times jQuery AJAX takes long time then Server hangs resulting in request in waiting :(
 
5:41 AM
morning
 
6:30 AM
Anyone know how I might make this work?
var tempLocation = ui.draggable.attr("src").substring(1);
can't find documentation on ui.draggable
I get an error that ui.draggable.attr("src") is undefined
 
 
1 hour later…
7:41 AM
Morning :)
 
yay
Florian Margaine, Marseille, France
6.6k 1 5 25
arf
node.js doesn't appear before php :(
 
well, morning people :-)
 
mornin'
 
o/
 
7:54 AM
\o
@GNi33 how ya doin?
 
fine, and you?
no coffee again for me though :D
 
haha
fine too
last week ever at this company
0
Q: Solution to 99 lisp problems: P08 with functional javascript

gorillatronSolution to 99 lisp problems: P08, with functional javascript If a list contains repeated elements they should be replaced with a single copy of the element. The order of the elements should not be changed. * (compress '(a a a a b c c a a d e e e e)) (A B C A D E) Anyone want to review...

am I wrong in my answer? :|
 
8:23 AM
i just test whether the link is valid
 
8:36 AM
@FlorianMargaine just use filter instead of forEach in the first place
Also filter returns a new array and does not modify the old one
 
ah, right
@copy how?
 
return el !== arr[ i + 1 ]
 
var arr = [
    'a', 'a', 'a', 'b', 'b', 'c', 'd', 'd', 'a', 'e', 'e', 'e'
];

arr.filter( function( el, i ) {
    // If the current is the same as the next
    return el === arr[ i + 1 ];
});
["a", "a", "b", "d", "e", "e"]
 
!==, sorry
 
it works
oh right
I get it :p
 
8:44 AM
Now it's even really fully functional
At least Haskell-functional, not sure about Lisp
 
never done any haskell
is it worth it?
 
I love it
 
what do you do with it?
 
I solved some project euler things with it and made a command-line minesweeper
Nothing real so far
 
that's what I'm worrying about
if I have nothing to do with it, I don't think I'll stick with it :|
 
8:50 AM
Well, learning a more functional programming style is not bad if you write Python or JS regularly
And you can also do big things with Haskell ... but it's tough
 
yeah I know that learning it wouldn't be bad
but I know that I won't stick with it if I have nothing to build with it
@copy happs.org looks nice :o
 
Uhh web frameworks, I have not looked into that yet
But got to go now, cya
 
9:14 AM
cya
 
0
Q: Making a gif/javascript polyglot step by step

MageekWe can make that both <script src="foo.html" ></script> (Or ".js" or ".gif", I don't really know) and <img src="foo.html" /> work. (You can try replacing foo.html by http://p42.us/v.html ) How can I do it with my own gif image and js file? (Can you explain a technique st...

what is he asking for?
 
Maybe that :P
 
My answer is at this point
Well, firstly. Your gif file needs to be exactly 8253 pixels wide and 8231 pixels high. This would cause the gif file to start with:

     47 49 46 38 39 61 3D 20 27 20
     G  I  F  8  9  a  =     '

In javascript, that's an implicit global assignment to `window.GIF89a` and the value will b some string. In GIF, that's a legit header for 8253x8231 gif image.
but then
a wild 0xa5 appears, and wikipedia says it must be 0xF7
confusion ensues
 
wauw instant antitrolling ;)
 
9:27 AM
it's actually much more interesting than "how do i jQuery here???"
;p
btw if anyone wants to join in on the fun here's the hex dump
the a5 is killing me, how is it possible
 
9:52 AM
i want to reset
setTimeout ( "checkSession();", 5000);
on every ajax request how is it possible??
 
Never pass a goddamn string to setTimeout
pass a function instead
 
@ThiefMaster actually its working but what my problem is now i want to reset this time i.e 5000 on every ajax request
 
yeah, it's just horribly ugly to pass a string
like using eval
simply call setTimeout(checkSession, 5000) in your AJAX callback
 
then what should i do i'm not so pro on ajax could you show me with codes
i meant what would the ajax call back code would look like?
 
are you using jQuery? if yes, put that call in the complete callback function
 
10:06 AM
could you please show it with codes?
 
have you had a look at the api?
 
oh, my
conanO'Brien = "It's a-me, Conan O'Brien!"
this is a function in haskell :|
 
RKK
10:26 AM
Hi all
@FlorianMargaine @GNi33 @ThiefMaster i'm new to javascript
i have one issue in my code
can anybody help me to solve that.?
@FlorianMargaine @GNi33 @ThiefMaster
 
stop the pinging!
 
RKK
@GNi33 can u solve my problem?>
 
i can't read your mind you know
and i can't solve problems in code i haven't even seen yet
 
RKK
i post code here
@GNi33
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">

function Onclick()
{
var user=document.getElementById('users').value;
if(user =="")
{
alert('pls enter field');
return false;
}
}
</script>
</head>

<body>
<form action="demoreq.asp" method="get">
Your name: <input type="text" name="fname" size="20" id="users"/>
<input type="submit" value="Submit" onclick="Onclick()"/>
</form>
</body>
</html>
this is the first page.
this is second page
===============================
<html>
<body>

<%
dim fname
dim hello
fname=Request.QueryString("fname")
If fname<>"" Then
Response.Write("Hello " & fname & "!<br />")
hello=fname
Response.Write("welcome " & hello & " <br/> <br/>")
Response.Write("How are you today?")
End If
%>
</body>
</html>
 
ugh, asp's ugliness keeps amazing me
 
RKK
10:32 AM
But when i press submit button it shows alert, if textbox is empty. and also it navigated to next page. In here i need when textbox is empty is shows alert and not navigate to next page. then when enter something then it navigate. can solve my problem....? @GNi33
i'm very new to this. pls
 
Doodes!
whats up?
 
@RKK hm, it should work with the return false you've got in your code
maybe change your handler to onSubmit
 
I'm trying to use DataTables plugin for jquery, and it seemed very nice at first, but then I realized that I can't achieve things that seem very basic to me. For example: I want to structure the table according to the JSON I receive on the sAjaxSource call, but that seems impossible? I need to prestructure the table in HTML?
 
RKK
@GNi33 can show with code
 
<form action="demoreq.asp" method="get" onSubmit="Onclick()" >
and get rid of the onclick - handler on the submit - button
@MeLight so, the table-headers and such should always be different depending on json-structure
 
10:38 AM
Can someone help me to refactor my jquery code. only single line
$(function() {
    var circle = document.getElementsByClassName('box');


    // make 15 box in body

    for(i = 0; i < 15; i++) {
        document.body.appendChild(circle[0].cloneNode());
        console.log(i);
    }

    setInterval(function() {

        var left = $('.box').offset().left;  // Get the calculated left position

        $(".box").fadeIn('slow').fadeOut('slow');



    }, 50);


});
 
RKK
@GNi33 ok let me check
 
@GNi33 yes, exactly. I can prestructure it by making two calls, or using javascript array or whatever, but that seems kind of wrong
 
<div class="box"></div>
 
@AnkitGupta dude, please - jsfiddle.net or pastebin.com
 
@MeLight OK , I will try it now
 
10:41 AM
@AnkitGupta sorry, I meant try using those websites to paste code. Here's your snippet: pastebin.com/PzjJJU56 (not refactored yet)
 
@MeLight try this it's here jsfiddle.net/hnE2j
 
@AnkitGupta so, what's the problem?
 
I want it look like car light animation
 
@MeLight are you sure this isn't built-in behaviour?
the json needs to have specific structure though
 
@MeLight It's working I know. I just want to make it's look like car flash light animation.
 
10:42 AM
0
Q: wp_register_script Question

RRNI need to add the following JS to the head, but I don't know how to add the "data-cfasync="false" " by using "wp_register_script" or "wp_enqueue_scripts". Please help!! <script data-cfasync="false" type="text/javascript" src="http://use.typekit.com/YOUR-KIT-ID.js"></script> <scrip...

 
@GNi33 I've searched for it, and it doesn't seem to have the feature I'm looking for. I've found that the JSON must have specific structure, but unfortunately no docs for it (none that i've found at least). So I tried to use the params that I've saw in the examples. Not enough :(
@AnkitGupta I'm afraid you'll have to elaborate. What does a car flash light animation look like?
 
@MeLight I found a example on internet which is about Bulb pushingpixels.at/experiments/dynamic_shadow
 
checking
one sec
you need to animate the shadow i think
Do you want the bulb effect or the shadow effect?
 
@MeLight yes, I want bulb effect by using shadow effect (css3). Am I right that I will get it using css or I should go for static image.
 
@AnkitGupta not sure, let me check
 
10:52 AM
@MeLight, Do you notice a thing that the shadow they have made through Bulb are spread on whole page. That's a great idea if I do that in my implementation.
 
@AnkitGupta I'll tell what I'd do
I'd use an image for the lightbulb's light, and animate it's opacity
for the dynamic shadow you'll need another image (of the shadow)
and you'll need to animate it's size, opacity and relative position according to the distance from the bulb and it's direction
dude
@AnkitGupta you have the code on the page lol
 
look ssame to me
 
11:12 AM
i regenerated the fields of a php form in a new div by calling the same function by ajax.. but after that the related save function saves only the data from the last array of fields independent of the number of times the function has been called with ajax
can somebody give me some hint
 
@HariOm my first guess would be that your loop is overwriting data instead of adding it, that's why you get only the last data
will need to see the code to say more though
 
@MeLight here
i guess i need to create dynamic ids for the generated fields.. even tried a little.. but couldn't make it work
 
Sorry but I dont see how this question is related to what you've asked
 
@MeLight just the question has been asked in other words
i thought it generates the array of arrays.. and serialization would work.. but the scenario is that that the initiale array is already serialized
 
Any one help me.. im working on jquery mobile ... in that i created re-sizable div .in our system browser div re sizing is working. but in mobile browser re-sizing not working.. any 1?
 
11:42 AM
0
Q: optimize mouse in out javascript

khinesterhello i have this code that places a marker and on mouse-over this marker is scaled out and then back to the 'original' scale this.drawPerson = function () { self.svg.append("path") .attr("d", personPath) .attr("transform", "translate(100,100)scale(0.1)") .attr("class"...

 
Jon
12:08 PM
Anyone used nivo slider for multiple slideshows on one page?
 
@rlemon dat_site!
 
@OctavianDamiean lol huh?
 
Your website. It's awesome. :D
 
Have you guy's seen the interface for Eclipse Juno? Are the UX folks at IBM on crack?
 
Eclipse has always been ugly.
 
12:11 PM
@OctavianDamiean haha yea i am trolling the world!
Eclipse is ugly inside and out
 
No, I mean, that's fine. But they're making it uglier! :(
 
yea. i don't care. never have (long term) , and never will use it.
 
spent like a week 'evaluating it' few years back and it didn't sit well.
 
woah, that banner on top
 
12:14 PM
It's sort of 'staple' for us J2EE developers, especially in the corporate environment :(
 
@rlemon You didn't have to develop for the other ugly beast called Android then. :P
 
stephan herrmann just scared the crap out of me
 
@OctavianDamiean I did, used phonegap though :p
 
I can see some development misery coming..... Imagine working with that mess on a daily basis!
 
12:15 PM
@OctavianDamiean I would find something other than eclipse.
it's bad enough when you have to dev java.... but to dev java IN java?!?!?! are you insane???
 
That's how Android developers tick.
 
@refactor.me I can understand that. I was a .net developer (back end) and we were pretty much locked into VS
 
Well, how else do you develop complex J2EE apps? I don't think there's any substitute for the IBM stack of tools (built on eclipse). I don't know, but I don't think for most J2EE applications of significant complexity, eclipse based tools are the only way...
 
netbeans i hear good things about (although never used)
for java iirc there is at least some alternatives.
.net - well.... you got VS.
 
NetBeans is pretty fine
 
12:17 PM
aside form it's size I do actually like VS
 
@rlemon At least the VS user experience is way better than the Eclipse experience. Things work straight out of the box, for starters.
 
ASP can die a horrible horrible death
 
J2EE ... just when I hear that everything inside of me screams "oh gawd noes! Enterprise!".
 
Aaah, you mean classic ASP. Been there, destroyed that...
 
even ASP.NET
you can polish a turd... still a turd.
 
12:18 PM
Viewstate = ultimate developer pawnage
And the rendered markup, my God!
But I hear the latest version is very Web 2.0? Clean markup output, MVC and what not?
 
yea, you're still not convincing me. I've worked with and without it. ASP and ASP.NET are both balls.
IMO .NET fails as a webdevelopment framework.
AWESOME for desktop windows apps.
 
Could be. Never got farther than MyCuteBankGridWithSomeForms with it.
 
now if you have to build any enterprise desktop apps or tools to run under windows.... .NET all the way
 
VS 2012 looks impressive, wow.....checking out screenshots on the web
 
There it is again, the word that scares the living crap outta me, enterprise
 
12:24 PM
I feel more scared of "modular", for reasons obvious. It's done to death in the J2EE Enterprise world. (there, that's a double scare for you!)
 
@rlemon or webservices
 
@FlorianMargaine yes
@refactor.me no that is just redundant.
J2EE world.
J2EE (Enterprise Edition) Enterprise world..... doesn't work. see
 
Nah, it is just that whenever I hear enterprise I also hear the death scream of innovation and creativity.
 
Good point, now I have something to mess up our architects with.....redundancy in speech shall be pointed out...
 
you don't wanna be the well actually guy (on the internet its fine... like i'm ever going to meet any of you! :P)
 
12:32 PM
@rlemon Heh, there are exceptions. Not all software developers are like that. ;)
 
nope
 
Well actually there are.
:D
 
@rlemon flight to canada already booked, see you tomorrow!
 
(in the comments of the "well actually" blog post)
:')
 
12:53 PM
hahahaha
bad thing i know the feeling :P
 
Does he not realize that SO has edits for a reason?
 
nice, zerkms just keeps editing his message out :D
 
has anyone done some haskell in there?
 
@copy has
 
I'm having something weird...
 
1:06 PM
I read the intro to Learn You a Haskell and then realized I didn't have time to learn a new language
 
I'm on the third page :p
it looks really fun
 
It does, I really want to do it, but I don't have much time for things I'm not getting paid to do
(SO being the obvious exception)
 
omg
in haskell, there is not !==, but there is /=
 
You sound like Yoda
 
if you don't like it, you can do it like this, chat.stackoverflow.com/transcript/message/4627580#4627580 and you'll be able to use ≠
 
1:17 PM
Wait, it legit takes that character?
That seems like something I right now think is awesome, but will never see practical use.
 
Yep
 
@SomeKittens you could use to replace mod with % for example
 
but % is a character on my keyboard. I can't just type ≠
 
or... dunno, if you want to check if something isn't empty, [] ≠ ∅
> Note: the equality operator, == is a function. So are +, *, -, / and pretty much all operators.
you can use "infix" functions, so in JS you'd do func( param1, param2 ), you can do this in haskell: param1 func param2
which is why the operators are actually functions
 
yeah, it's a functional language
lotsa cool stuff
I'd just rather type /= than try and figure out
(I'm still on the fence about OO vs Functional, anyone care to convince me?)
 
1:27 PM
My right-hand is so happy! It feels like angels are gently touching it each and every second.
 
just upgraded his GitHub account to the Micro plan like a bauce
 
Scroll-wheel clicks aren't noticeable. I can freely move my hand. This is heaven. I love you, Logitech.
 
RT @sideshowbarker: My personal comments on the latest WHATWG vs W3C non-news: https://plus.google.com/111991826926222544385/posts/QdGfrgtP6Eg
 
@Zirak Your sexual life does not interest us.
 
That's not what yo mama thinks
Come on, that was an easy one...but not as easy as her.
 
1:31 PM
no, not my mama :(
well
you wouldn't find your jokes funny if you knew her though.
 
That's usually the case :P
 
what the hell is going on here lol
 
!!give Fred a lick
@Zirak Mmmm! Fred tastes just like raisin
 
YUmmmmmm raisins
 
have a stroke of its mane
it turns into a plane
 
1:38 PM
sometimes I just want to shout at posters "are you just F**KING STUPID ?!"
 
ha :)
 
My least favorite are the ones that leave a wall of text and a vague impression that you're supposed to do their work.
Oh, and I understand if English isn't your first language, but SPELLCHECK! DO YOU SPEAK IT?!?!
 
Lol you guys are kinda hard with newbies :P
 
We all rushed our way out of this war fog before being confortable with it :)
 
because newbies are too ambitious (i.e. don't know their limitations) and don't do sufficient research
it took me 30 years to get as good as I am now
and they just expect it spoon fed to them
 
There are two kinds of newbies. Those that want us to do work, and those that want our help. The second kind are awesome
 
yeah I agree
 
I'm starting my job as a CS tutor next month, and I'm really looking forward to it. I like teaching, and I hope to learn a thing or two myself
 
1:48 PM
sure, you will never be closer to CS than if you teach it
that's what I would love to do, but for overall programming
 
teach?
and CS isn't "overall programming"?
 
I mean, not teaching a particular language
 
i regenerated the fields of a php form in a new div by calling the same function by ajax.. but after that the related save function saves only the data from the last array of fields independent of the number of times the function has been called with ajax
 
ugh... ok brain fart moment. php and mysql. I have my dates as MM/DD/YY and i'm trying to add them to the db with strtotime($timestring) but they are saving as 00.00.00 - 00:00:00 (db column is TIMESTAMP)
 
@SomeKittens teaching CS at what level ?
 
1:51 PM
@tereško Just tutoring, not teaching. It's the first year kids, starting with Python
 
like... i've done this a million times before... what the hell. why can't I remember
 
oh ...
 
why?
 
i assumed you where getting a job as a hichschool teacher
 
Oh, no. It's at the college I'm attending
I might be a TA if I have the time
 
1:52 PM
date("Y-m-d H:i:s", strtotime($timeStamp));
hehe forgot the date part :P
 
@rlemon not the good room.
 
ugh. time to go get a coffee
@dievardump no it is the good room. php room sucks. :P js room is the best :)
3
 
ok, star.
 
Honestly, the PHP room scares me.
 
Hi all
 
1:54 PM
js room is like... ahh... freedom... all other rooms are like "OHH MAAA GADDZZ THE RULEZZZZZ"
 
well i think it's because of teresko. Everyone is scared by the intervention he could make.
 
meh, he don't scare me.
 
ah, I see the node.js UDP implementation is still a crock :(
 
Signs you need more coffee: You create variables with whitespace in the names.
 
i suppose the php room is not unlike the js room - you go in there and ask a Q and get 8 people bitching at your choice of function / framework - here you come in asking about a certain lib and we do the same .
 
1:55 PM
hm, that's interesting
 
@rlemon what about lounge<C++> ?
they even made a website to explain the rules!
 
@Abhishek yea that room can get pretty crazy
 
@dievardump , care to elaborate ?
 
@Alnitak I think there is a custom native module for nodejs udp sockets
 
the built-in one?
I opened this issue a year ago - github.com/joyent/node/issues/769
 
1:57 PM
no a custom
 
@Abhishek I can't find it
 
even i am trying to find it
i found it when i was just starting with node
 

« first day (646 days earlier)      last day (4285 days later) »