« first day (834 days earlier)      last day (4114 days later) » 

12:00 AM
@bushdiver i think you're on your way to getting an error for spamming the same question in multiple rooms
 
k wont do again, thanks
didnt know
 
hey all
 
hallo
 
so guys, I'm looking in to this thing called dart: dartlang.org
 
go on...
 
12:07 AM
how is it?
seems more object oriented to me, than Javascript is
i mean in teh end i know it converts the code to js
 
@bushdiver it stops
 
@Cygwinnian looks like php with the ability to declare expected return types
 
0
Q: Change Image based on Custom Field

FraserKCI have custom fields set up in Wordpress and I'd like to change an image based on the value in that field. Something like: If custom_field_value = 1, show image A. If custom_field_value = 2, show image B. I'm trying to create a review score system that changes an image based on the score. Like...

 
so what i mean to say is, i like it
 
12:26 AM
cough CoffeeScript cough
 
O_O
Blasphemer
 
Way better than Dart
 
lol
 
12:40 AM
time to eat, goodbye
 
is coffescript any good
 
Personally, I love it
But as you can see, it's kinda like jQuery, people just love to hate it
 
Yeah
FUCK IT! Jquery all the way
 
I see them both as tools that speed up my development, and I like the syntax, so yeah
 
1:02 AM
@Zirak Nice!
You know that there is a cookie parser and serializer right? :)
 
1:39 AM
!!> ['10', '10', '10', '10', '10'].map(parseInt)
 
@SomeKittens [10,"NaN",2,3,4]
 
0
Q: Javascript looping fader animation

samfrancesHere's a small module I've written that implements an animation which fades through the child elements in a container div on a continual loop. I realise I could have done this way quicker using JQuery, but I wanted to write it from scratch in this case. The module works well enough, but I'd be...

 
@SOChatBot WAT
 
lol, wtf
 
o_O
Is the bot kidding?
 
1:44 AM
1337 trollz by the bot
 
It's actually rather clever (which is why you know I didn't come up with it)
 
Huh. Very interesting indeed.
 
Alright. WAT!?
 
@OctavianDamiean it's quite obvious, parseInt accepts multiple arguments
I think that this example or a similar one is even showcased at MDN or some other reference website
 
@BenjaminGruenbaum Or you could just click the link I posted
 
1:57 AM
Oh, didn't see it :)
javascript is missing real partials :(
I should be able to pass parseInt.partial(undefined,10) or something similar
 
Is stack overflow the site with the most active chatroom participants? The Russian one always seems dead
 
SO's the biggest, yes
 
done doing real work for the day, about to delve into learning node.js. any good guides/tutorials/how-tos that you all would recommend?
 
nodebeginner is nice
 
^ +1 for nodebeginner
 
2:13 AM
is there a site for it? or just the stuff on git? i don't mind, just like the pretty websites with the step-by-step
 
-_- .... sorry
 
2:58 AM
Well, after this weekend, I think I don't want to get into game development professionally
 
What happened?
 
participating in a game jam. Just really not familiar with it all, and some of the math is a bit over my head
 
oh, yeah. Having fun otherwise?
 
it's interesting
 
welp, looks like to do my "fun" project for the night and learn node.js, i've got to update my OS
come one people, stop adding dependencies that just came out, like, two years ago
 
3:06 AM
What OS do you currently have?
@CBredlow Never done much game dev, for mostly hipsterish reasons
 
snow leopard
 
Oh. Closed source.
 
locally
all about the ubuntu for projects
 
Do you have a Linux box? You could SSH in and then not have to update
 
but i'm all out of free space on azure and amazon
nope, just the one box at home
 
3:10 AM
Hipsterish reasons?
 
@CBredlow Because going into development to make games is "the cool thing to do." Lots of kids like video games and then want to make them without realizing how hard it is. They usually don't last a semester
We like to call the IT degree the "I Tried" degree because so many programming students switch to that.
 
@SomeKittens When I first started CS I wanted to do game dev, but then as I matured in the program I went, 'hmm, i like this database stuff' I'd really like to be a DBA someday
 
@dyelawn I'd suggest getting an old PC (you can pick them up for free if you look hard) for a server.
@CBredlow DB is pretty cool. What have you played with?
I'm a full stack dev because I've bought into Paul Graham's narcissim and have started my own company.
 
mostly sqlite, where I intern at I worked with sql server, school was mySQL
 
@SomeKittens too late, bought mountain lion. now i have facebook built right in to my OS! hooray!
 
3:16 AM
Oh joy! Now Zuckerburg can stalk you at an even deeper level
@CBredlow Have you played with noSQL DBs?
 
Woot 7k rep!
 
i've got over 700 when i visit serverfault, but only 400 something here; why does that happen?
 
@SomeKittens Not yet
 
 
2 hours later…
5:09 AM
@Zirak where are you?
Did you sleep well?
 
5:19 AM
Quietly pretty happy with getting 12 stars
 
@all GA
 
5:37 AM
I'm super drunk
 
I'm not drunk at all
 
Me neither
 
@copy you are
 
5:55 AM
0
Q: Best way to store NPCs, Monsters, Shops, etc for JavaScript game?

wekaOK, let's say I have a JavaScript game (preferabbly on jQuery framework) and its using HTML5 Canvas. What would be your way of storing data to map out shops, monsters, and npcs? I was thinking maybe JSON txt files on the website? Or maybe simple text files and simple delimiters? I am not sure. H...

 
Hello everyone. :D I'm developing a grid like system (16 x 16). When the user left clicks the mouse it lays down a block. It seems to be working perfectly except it leaves a pixel space in between 7 blocks. Here is the code I have...
private function addBlock(e:MouseEvent):void {
_block = new Bitmap(new Block(0, 0), "auto", true);

var xdif:uint = Math.floor(mouseX) % 16;
var ydif:uint = Math.floor(mouseY) % 16;

_block.x = Math.floor(mouseX) - xdif;
_block.y = Math.floor(mouseY) - ydif;

this.addChild(_block);
}
 
Is that typescript?
 
My apologies, its actionscript 3.
 
It's probably a rounding issue. Can't really be bothered thinking too much, but maybe try Math.floor(mouseX % 16); etc.
 
I was logging _block.x. It goes 0, 16, 32, 48, 64, 80, 96, 112, 128 and so on.
let me try that.
 
6:05 AM
Are all blocks the same image?
 
If the logs were right, I see no reason to change it
 
nope still does it even with the change. Yes, all blocks are the same bitmap. 16 x 16.
 
Is y left-to-right or up-down?
 
y is up-down
this is the only code I have wrote in there except... this.stage.addEventListener(MouseEvent.CLICK, addBlock);
 
@W3Geek your math makes no sense
 
6:09 AM
Look what I made jsfiddle.net/DerekL/QuHB9
 
@Derek Nice
 
Just think about it for a second, what are you doing there
 
What do you mean? I just mod mouseX and mouseY against 16 which is the block size and subtract the difference.
 
@BenjaminGruenbaum Makes sense to me o.O
 
@BenjaminGruenbaum, yeah it's fine
 
6:11 AM
@AmaanCheval I made it because I can't find any on the internet... (and because I'm bored...)
 
like if mouseX is 171 which leaves 11 remaining and subtract that 11 you get 160.
which is perfectly dividable by 16.
 
@Derek I've seen a few before. And it's quite evident you're bored when you make things like that :P
 
I took out smoothing that seemed to help but it looks like .5 pixel space between the blocks now.
 
@AmaanCheval I could only find upside down generator but not backward generator :P
 
let's say that the screen is (for ease) 1600*1600 and ignore the fact that flash y axis is inverted. the user clicks 0,0 which caues a block to be added to 0,0, then the user clicks 101,101 which causes a block to be added on the x axis to
Math.floor(101) - Math.floor(101)%16 = 101-5 = 96 . So _block._x and _block._y will be 96,96
What you want to do is probably divide the stage width and height by 16, then use the modulus operation on that (or, similarly, remove the modulus from the result)
 
6:18 AM
Is there a better way to do this? $('#local-time').data('time', $('#local-time').data('time') + 60); I want to basically add the 60 to the number already there.
 
@BenjaminGruenbaum How is that incorrect?
 
@BenjaminGruenbaum tiles will be added at (0,0), (0, 16), (0, 32) etc etc. Given that they are 16*16 that's exactly what is wanted?
 
wait, I thought the grid was 16*16 not the tiles
 
@crypticツ Well, yeah, don't use jQuery. But otherwise, I don't see a better way
 
@crypticツ, yeah that looks fine
@crypticツ, you should modify the jQuery source for the data function to accept a function as the second argument where this would refer to the result from the data.
and then you could do $('#local-time').data('time', function() { return this + 60 });
Or alternatively it could pass data in as a parameter
 
6:23 AM
@BenjaminGruenbaum That is essentially what I am doing in two steps.
The tiles and images are both 16 x 16.
 
and then $('#local-time').data('time', function(data) { return data + 60; });
 
@rlemon What time is it there?
Isn't it really late for you to be awake? :p
 
@BenjaminGruenbaum I'll try your approach.
 
Saturday night brah
 
@W3Geek My approach was assuming you had a 16*16 grid, not 16*16 tiles
Does it not happen if your grid is smaller? for example 2 blocks by 2 blocks?
 
6:26 AM
@phenomnomnominal apparantly you can do it this way $('#local-time').data()['time'] += 60;
 
Oh I see. Let me try that.
 
@crypticツ oh yeah, that makes sense. Looks ugly though
 
it seems to be worse.
maybe not just harder to see.
 
7:17 AM
Hi
anybody there?
 
I am using noUIslider plugin, i have customize it a bit. But the requirement is when the handle is side by side value of both handle should be same which is working fine with value 0 to 100 but when the value are changes it differ
What i am doing i am dividing slider left and right position with '10'
here is my code
val1 = api.low ? Math.round(helpers.deScale(api.low.left(), api.options.scale, api.slider.innerWidth())) + Math.round(helpers.overlap(parseFloat($(api.slider).find('.noUi-midBar').css('left')),10)) : false;
I want to change '10' dynamically so that it work fine with all value
 
7:40 AM
I tried everything to get this to work and it doesn't seem to want to.
 
Did you try not using flash :P
 
@phenom: can you please look into my problem
 
@jchand, sorry dude, working on other stuff right now
 
ok, please have a look it once you free
 
8:00 AM
lol I finally figured it out. And no it was not Flash, Flash is a vector program. :D ActionScript is a scripting language that Flash uses.
 
@W3Geek, haha I know, but you could always use Canvas + JS
 
Does anyone have experience using node.js and doing bindings to C++?
and my net connection started playing up
 
8:23 AM
lol I want to but I'm not in JS classes yet. I'm finishing up my AS classes right now. I've actually learned to like ActionScript. It is pretty good scripting language. Very similar to JS.
 
That's because they're both based of the ECMAScript specification
 
8:38 AM
Yup @phenomnomnominal Personally I like JavaScript more because it doesn't involve Flash but AS is pretty fun.
 
0
Q: Customization of noUi Slider

jchandI am using noUIslider plugin, i have customize it a bit. But the requirement is when the handle is side by side value of both handle should be same which is working fine with value 0 to 100 but when the value are changes it differ. What i am doing i am dividing slider left and right position with...

 
9:18 AM
AS classes are way better than javascript classes, they actually make sense. AS's dual inheritance (classical and prototypical) isn't bad even if it kind of beats the point.
 
9:34 AM
yea AS is the best language
 
lol
that's cute
 
Hour 36 of straight programming: Svn commit messages have reduced to mindless garble, and the programmers now giggle maniacally at strange things
 
10:00 AM
Hi. Can anyone please help me with this question about jquery+tableSorter ? stackoverflow.com/questions/14546186/…
 
10:38 AM
posted on January 27, 2013

A ux.stackexchange question prompted me to consider how one might implement a more permissive type of input validation. It’s not rare for a form to punish the user if they add an extra space before typing in a date, or accidentally use a comma instead of…

 
1
Q: how to instruct Sencha SDK tools to bundle other js files specified in app.json

shiplu.mokadd.imMy app.json file of a Sencha touch 2 application contain. "js": [ { "path": "sdk/sencha-touch.js" }, {"path": "js/mootools-1.2.5-core.js"}, // I want these files to be bundled too {"path": "js/mootools-1.2.5.1-more.js"}, // <----------+ {"path": "js/soundmanager2-n...

Has +100 open bounty!
 
 
1 hour later…
12:11 PM
I am encountering a small problem that I coulnt find anything on google about.
I got a textarea that I am trying to make into a Text Editor. But the Ctrl-Z deletes everything that has been typed since the box has become active. Any way to change this to only the last typed Key, or paste ?
Key listener again isnt it ?
 
12:51 PM
AAArrrrrwww.. I just watched the Australian Open and there was a TV commercial for "Davidoff".. a new parfum called.... THE GAME lol
I lost the game
didn't know companies are playing also now
 
1:12 PM
nobody here ?
:-)
 
Has anyone visited vinepeek(.com) , yet ? its amazing. So I was wondering how did the guys at PXi made it, my guess is that they browse through the recent tweets on twitter and get list the ones with the vine.co/bla/bla/bla in it and grab the video url from it and post it there. Which is cool, right ?
 
1:23 PM
@Tomarinator wow!! how can i do this?
 
I beautified their script files , and now beating my head against those js scripts trying hard to understand how they have done what they have done.
 
it's awesome, many ideas for leisure
 
@SomeKittens That made sense once I stopped and thought about what map does and what parseInt accepts. Neat, though
 
I lack the motivation to spend much time on it though. ITS SUNDAY :p
 
@Tomarinator what do they do?
 
1:31 PM
@FlorianMargaine , just check out vinepeek.com , they showcase the vines uploaded on twitter in the lalst couple of minutes.
 
@OctavianDamiean I'm sure there are loads of them out there, but I've found none that nicely work when you plug them into http requests
See, node is mainly a server, so most every library out there has server functionality. I'm the client, so server functionality is benign - I don't have the niceties clients have
@BadgerGirl It was pretty awful, thanks for your interest.
Some guy kept urinating on me. So I told him to stop it. He apologized, and ceased urination, but resumed it at a later time.
So I said some things about some of his next-of-kin, to which he cried.
But then I realized it was me. Got awkward.
 
awkward with yourself?
 
1:50 PM
 
Hey guys need a little help
anyone here ?
 
0
Q: WP3.5 Media Uploader - how to make it accept multiple images?

PaulI'm wondering how to make WP3.5 media uploader return 2 or more items in attachement? It always runs once even if 2 items are selected. The code: $('.button').on('click', function(){ var send_attachment_backup = wp.media.editor.send.attachment; wp.media.editor.send.attachment = fu...

 
Shoot
 
0
Q: Calling a function defined in an included js file in windows.onload

mosiacHere's the scenario. I have written some functions in a js file common.js and included it above another js file let's name it x.js Now when I try to call those functions (written in common.js) in x.js under the window.onload function - an error pops out in the console saying reference error: no...

 
posted on January 27, 2013

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {} WOW! We made it to 150k. Legend has it if we get a bit higher, we ca

 
var a=document.getElementById(el).value;
            alert('s');
            var output = [a.slice.call(0, start), 'j',a.slice.call(start)].join('');
            alert('s');// this is not coming ???????
slice not working ..:?
 
Maybe because you're abusing .call?
It's not just a way to call functions. It has a greater purpose, too.
!!/tell Sunny mdn Function.call
 
keewl ;)
 
2:28 PM
i used the call just now to check if it might work
this is my original code
the code is working fine in the fiddle
but when i use it on my page
the script stops working after this line
var output = [a.slice.call(0, start), 'j',a.slice.call(start)].join('');
 
4 mins ago, by Zirak
Maybe because you're abusing .call?
And if it's working on a paste site and not on your page, then it's a problem of environment. Usually? jsfiddle automagically wraps your js so it'll execute onDOMReady or onload or whatever, and you don't do that on your own
 
i don't understand, the script is running, and im getting the alert box if i put it above the slice
 
(1)did you fix the .call abuse? (2)are you sure a is defined?
 
Afternoon everyone !!!
 
pls see the fiddle, that was my original code
 
2:36 PM
I don't have the strength of heart to do that, I'm afraid
 
else
        {
            var a=document.getElementById('text').value;
            var output = [a.slice(0, start), '<b>',a.slice(start)].join('');
        end=end+3;
        output = [output.slice(0, end), '</b>',output.slice(end)].join('');
            // non-standard and not supported in all browsers (IE9, for one)
            document.getElementById('text').value=output;
        }
i didn't used call for it
 
2:58 PM
Hey guys, do you know a javascript library similar to PHP Simple HTML DOM Parser( simplehtmldom.sourceforge.net ) , to navigate through the source code of an url and for instance look for a particular url in a div of a particular class.
Basically I am trying to find a client side solution to PHP Simple HTML DOM Parser..
 
...you mean...JavaScript?
 
@Zirak sorry to hear that. :(
 
-2
Q: $.getJSON reference error, $ undefined

user208709I have this statement: $.getJSON('https://'+storedomain+'/cart?'+fcc.session_get()+'&output=json&callback=?', function(data) { $('#cartContent').append('<p class="leftText">' + data.products[0].name + '</p>' + '<p class="rightText">' + data.products[0].price +...

please vote close
 
"I don't know how to Google errors, please write codez for me?"
 
@SomeKittens ya I meant JavaScript, got any suggestions ?
 
3:11 PM
@Tomarinator As in, use JavaScript. It's (and the other regulars will yell at me for this) pretty much a DOM API. What are you missing?
 
@Tomarinator You're bound by Same Origin Policy (see here and here)
 
@SomeKittens: DOM !== ECMAscript and I only would yell at you for saying that to possibly unexperienced ppl / learners
 
3:34 PM
don't you hate those moments when you're banging your head against a wall trying to figure something out?
 
I love those, that's the best part about programming
 
My wall wishes I'd get my act together and learn to program already.
 
I like them when it's something I'm somewhat familiar with
 
I have a love/hate relationship with them. They're awesome IFF the resolution makes sense.
 
@SomeKittens hehe i am trying to come up with a new article
 
3:43 PM
Holy blast from the past, Batman!
 
haha i just saw the notification
 
What's the topic of your next article?
 
not sure entirely
 
FFF...why shit no works!?
 
Have you tried a laxative?
 
3:48 PM
eewww
 
DURR. It likely won't work if you forgot to reset the default username/pass options to your own...
 
dammit game, why don't you realize you can't walk through walls
 
4:01 PM
hello. How can I put ( for example) attribute on td 1,3,5,6 ....? something like $(".table td").eq(...).attr('..')
 
Formatting doesn't work if you've got hard linebreaks in your message
 
@SomeKittens thanks. Ive been changing it for the last f* hour
 
f* makes me think of my freshman attempts at implementing the A* algorithm.
 
:-)
 
4:07 PM
eh, too lazy to edit config file
 
sed -i s/: 17/: 1/ data/opts.json
@Zirak ^
@jAndy ^ thought about you, dunno why
 
4:54 PM
:7397687 Yes, yes, it worked
Grrr, you can't reply to deleted messages?
You can, but it doesn't link it. Interesting
 

« first day (834 days earlier)      last day (4114 days later) »