« first day (1282 days earlier)      last day (3672 days later) » 

2:01 PM
var max = ['1.jpg','11.jpg','6.jpg','2.jpg','10.jpg','5.jpg'].sort(function(a,b) {
  return +a.split('.')[0] > +b.split('.')[0]
})[0];
max; // 11.jpg
 
Math.max.apply(Math, files.map(parseFloat))
 
You don't need Math here
Math.max.apply(0, files.map(parseFloat))
 
I like it better that way
And for cleanliness, I think null would be better than 0. Putting in 0 makes one think "why 0?"
 
I pondered the use of Math.PI
 
Tom
It doesn't really work though
 
2:08 PM
Care to elaborate?
 
@Zirak - Would return just 11, but if the file extension is always the same, I guess it doesn't matter.
 
That'd be if we used sort
Which I erroneously used the first time
 
afk
 
Tom
Yes, it doesn't not include the extension
and it's not always the same
 
8 mins ago, by rlemon
var max = ['1.jpg','11.jpg','6.jpg','2.jpg','10.jpg','5.jpg'].sort(function(a,b) {
  return +a.split('.')[0] > +b.split('.')[0]
})[0];
max; // 11.jpg
 
2:10 PM
Wait, I may be stupid
eh
 
Tom
@rlemon this correctly returns file with the name which has the highest number on it. It's good, but I also need to increment it by one.
regex way seems to be the most elegant at the moment, but I can't really convice myself that regex is the right way to solve this
 
Then my way, and add a +1?
 
Tom
I still need an extension
Can't simply omit it
 
Like extensions matter
Wing it, take the extensions from the first file
 
Tom
They are not always the same
I have jpg and png files there
 
2:14 PM
How do you choose which one?
...why do you need to do this anyway?
Don't you get the extensions from user input?
 
Tom
I don't care about the user input here, all I need is to get the name(with the extension) with the highest number on it and then increment that number by one.
 
Damnit Tom.
 
2:36 PM
\.o.o./
 
3:09 PM
posted on April 20, 2014

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) {} Comrades! Marxist shirts are in stock!

 
3:27 PM
I want to learn Javascript. How should I start and what book should i follow or any links?
 
Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
What does stepping means ?
 
3:47 PM
guys... there is smth called ctx.ellipse()
but I can't find anything about it on google
any help?
 
hey, I am encountering an issue with Ajax and Form post, where cancelling all AJAX calls made earlier to form post don't help in the speedy form post, not able to understand whether client side is the issue of concern or the server side
technically after AJAX.abort(or cancellation of XHR requests), browser shouldn't wait to post the form, though it seems to be doing so
has anyone come across a similar issue before?
replacing the form post condition with clicking on a hyper link poses the same issue
also, this issue is replicated on both Chrome and Firefox
 
4:03 PM
possible new site design copot.eu/matei/tests
you might not really understand it now, but I'll tell ya it is getting somewhere
 
@t1wc ctx.ellipse(100, 100, 10, 15, 0, 0, Math.PI*2); jsfiddle.net/loktar/2reS9
 
@Loktar yeah, I've seen it
thx anyway
 
ellipse(x,y,rad1,rad2,rotation,startangle,endangle,clockwise)
 
now the tricky part will be drawing an image into that
 
just use it as a path and clip
 
4:13 PM
I was already trying to figure out stuff with globalCompositeOperation
thx for stopping me
 
@Loktar I'm watching simon sarris' book for that... and it's explained pretty well here aswell
 
ah yeah if its in Simons book follow that example!
Since Simon is a boss :P
@t1wc also thanks I didn't realize ellipse was usable yet
0
A: How to draw an oval in html5 canvas?

LoktarThere is now a native ellipse function for canvas, very similar to the arc function although now we have two radius values and a rotation which is awesome. ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise) Live Demo ctx.ellipse(100, 100, 10, 15, 0, 0, Math.PI*...

^ only works in chrome though so far
 
@Loktar fuck other users :P
 
haha
 
4:21 PM
ok, maybe not...
I'll put it in a try catch
 
well the top answer of that question is a nice fallback
 
then I'll have to search for a fallback function
yeah
wohoo! slideshows are working
just images swapping really
but hey, it's something
so, loktar, what do you think will come of the new site?
as you can see I've completely changed the design and layout
copot.eu/matei/tests now you can see the slides
going to work on text for slides now
those are just the first 3 logos I tried to make
 
how does one protect their email password when using flask-mail? Eg, if I wanted to throw some code on github but didn't want people being able to see the password field.
 
4:37 PM
@Crow you change the passwords manually I guess
 
@Crow I'm not sure what flask-mail is, but I assume you could put a config file outside of your local repo?
 
hah nice @twiz
 
huh?
I get the feeling I completely misunderstood that question....
 
@Crow You don't commit your config file.
Instead, put whatever.cfg.example in your repo and put whatever.cfg in your .gitignore.
 
I see, that's what I was thinking to do, but I am clumsy and usually end up putting things like that in there.
 
4:46 PM
Any Backbone people here that know a good way of unit testing nested views?
 
As I said, put it in your `.gitignore´ - that way you won't accidentally commit it.
 
@Crow That's why I tend to just put it in a higher directory if I can.
not saying its the right way, it's just my way of avoiding my own stupidity.
 
4:59 PM
For small amounts of data, is a database necessary or does static data suffice?
 
5:11 PM
lol just hooked the tv up to the computer as well as the old game consoles
wife comes in and sighs.
 
proud of you!
 
> This is retarded Jason.
lol I dont want to view the SO chat any other way now
 
5:25 PM
function ArrayForEach(array, func) {
    for (var i = 0; i < array.length; i++) {
        if (i in array) {
            func(array[i]);
        }
    }
}
^ why is if (i in array) {... required?
 
Happy easter for you christian fellas out there
 
Answer to this question please
 
@Oleg Javascript supports sparse arrays
 
0
Q: Resolving a promise multiple times

TusharI am building a module using Promises, where I make multiple http calls on multiple urls, parse the responses and then again make more http calls. c = new RSVP.Promise({urls:[]}) //Passing a list of urls c.then(http_module1) // Call the http module .then(parsing_module) // Parsing the responses ...

 
@hsaka welcome to the JavaScript room, where you just asked a (poorly written) PHP question. Nice.
 
5:31 PM
@JanDvorak oh, that's right
It seems that my brain refuses to function on Sunday.
 
@RUJordan so whats wrong in this code
 
@hsaka it's a PHP question...
 
Iunno, PHP doesn't interest me much anymore
 
Tom
What's wrong? Well, to start off, it's PHP.
 
No one was answer question so i thought to ask here
*answering
 
5:36 PM
Try the PHP room.
 
tried, no help
 
@hsaka why here? PHP != JavaScript
 
Tom
Patience is your greatest ally.
Wait an hour or so, somebody will answer. Meanwhile, try to look for the answer yourself, for the internet is vast and full of answers.
 
ok. ll wait
 
@hsaka you're fetching with the same $status all the time?
 
5:38 PM
$status is a sql statement
 
Oh, disregard, I was confusing things.
 
Tom
You should use the same name for Yes and No radios, just different values.
 
@RUJordan happy easter
 
@Loktar <3
 
user3071008
4/20
 
5:41 PM
Shitlers Bday
 
@Tom both names are same
 
Zombie Jesus day
 
@Loktar so what games should I toss this GPU at
Batman @ full settings is running perfect
 
this slider is giving me an headache
 
@hsaka can you give an example of what the resulting HTML looks like?
 
5:42 PM
anyone wanna help?
 
which one did you get again? 680?
 
@hsaka your radio buttons have no values, so HTML can't decipher between them. Give them each a unique value
 
question updated
 
@rlemon decided to change design again
this time completely different
 
760 2gb
 
ah 760 idk where I got 680 from lol
it does fairly well on all the games @rlemon
 
<td>
    Present <input type='radio' name='$id' value='present' />
    Absent <input type='radio' name='$id' value='absent' />
</td>
 
@RUJordan i gave values too, but no difference
 
didn't feel like waiting for the 770 on order, so I went with the 760
 
dat Titan
yeah a 760 is fine
 
5:45 PM
what do you have?
 
but yeah man idk, right now there are no crazy demanding games I can think of
 
!!afk "easter" celebration
 
!!s/easter/420/
 
HD 7970
but I got it like 18 months ago now
getting a 290 this Nov
 
nice
 
5:46 PM
going to be building a new pc like I do every 2 years so I can write it off
 
I feel like this should last me at least 2 years
 
yeah definitely
every time I've upgraded its been kind of meh.
many pc games were held back because of the last console gen
but the next 2 years we should start seeing some pretty demanding ones again
 
I mean there's Crysis but thats the only crazy one I can really think of on the PC
 
I've seen some impressive shit on KickStarter that should be out in the next 1.5-3 years
 
5:49 PM
yeah man I cant wait for that one game
the physics diablo esq game
umm Sinemora? or something like that
Sui Generis
 
^
thats the one
I'm excited about that
 
yeah they released the combat alpha I guess
I donated for Beta tier
so I hope thats released soon
 
@Oleg thanks for your help, but i sorted out problem. :) I was fetching data using AJAX and i was using toStaticHTML method in my result.
The toStaticHTML method can be used to remove event attributes and script from user input before it is displayed as HTML.
 
6:21 PM
Guys very urgent git crash. Anyone familiar with git. Giving 250 bounty reps for resolving problem. stackoverflow.com/questions/23159417/…
 
How to do this right? I wanna pre-load an image and only them inject it into the DOM..
... into an already present img tag, coz I'll be replacing it again and again
 
@laggingreflex replace img tags, otherwise it will load again (modulo caching)
 
6:39 PM
@JanDvorak damn. thanks for the heads up.
 
7:02 PM
@rlemon it's cool, I got it with the help of @t1wc :P thanks
used the opacity thing myself
 
7:13 PM
also, removed jQuery :P
 
@Mosho keep clicking in one circle
till it goes out of screen... chew popcorn
 
watch your score top right
 
thats why i said popcorn ;D
 
try again :D
there
 
@Mosho see how there is residue left over from the circles
 
7:19 PM
you mean on the black, after a circle is gone? I saw it with lower values but not now
 
I see it
context.fillStyle = 'white';
context.fillRect(0, 0, width, height);
context.fillStyle = 'rgba(0,0,0,0.11)';
update();
render();
 
oh yes, I see it too
 
I paint once and fade in from there
 
ah, that's what it's for
 
then everything is covered in it
so it isn't noticeable.
 
7:20 PM
good idea
 
and if you asked why I drawImage instead of drawing the shape?
it is faster.
 
cool, that's what I wanted to know
 
@Zirak you left?
 
@BenjaminGruenbaum you haven't said why you think what I suggested is crazy :P
 
For one, you should not be serving static content from Express in production, ever.
 
7:25 PM
but you serve it once anyway
 
Either performance matters even the tinyest bit, in which case you serve your static files from nginx (or iis, if that's your kick) directly.
 
Unrelated but I recreated my first js project: kyledavid.com/bmls/#bml_sirify2 applys a mustache to every pic on the page.
 
Or it doesn't matter, in which case you should not be using Node to begin with.
!!mustache kyledavide
@CapricaSix ? Where the heck did you go?
Baby? You left me?
 
@BenjaminGruenbaum that doesn't sound crazy though :P
 
@BenjaminGruenbaum can you confirm something ?
 
7:29 PM
@Mosho absurd
 
:|
 
@AbhishekHingnikar yes, I can, and I just did.
 
also, why do you not serve static content from express?
 
can you try opening any website with big images and semi transparent layer on chrome
for me chrome is almost un-usable on websites with such features. the lag is ~200 - 300ms / while IE is performing smooth as hell.
same with ffox is this a known bug ?
 
I get an empty page here
 
7:31 PM
@AbhishekHingnikar It performs all right for me in chrome 36.0.1941.0
 
@BenjaminGruenbaum I guess another option would be to generate the HTML with the right filenames when you minify
did you find a solution?
 
but I have alot of flags
 
@kyledavide hmm.
maybe i have a bad GPU
 
@Mosho don't version those dynamic images is a possibility.
 
I said that! :P
 
7:32 PM
@AbhishekHingnikar lags abit on load but it quickly fixes
 
anyway, I honestly can't imagine a scenario where you have to ask noobs for advice :P
 
for me it keeps being un-usable ugh
 
@AbhishekHingnikar myspace huh..?
 
@twiz its a good website, design wise.
 
@AbhishekHingnikar try enabling chrome://flags/#enable-compositing-for-transition
 
7:34 PM
by design do you mean "Looks pretty" or "is easy to use"?
the horizontal scrolling thing seems really awkward to me....
 
^
 
its on.
@twiz the pretty factor.
 
should move with the mouse
 
+ i am on a touch enabled desktop :D
 
or touch
:P
 
7:35 PM
It should probably just be vertical haha
 
@twiz nu-uh horizontal is fine if touch is enabled
 
yea, it would probably work well with touch
 
and it works with mouse @Mosho
 
I actually think it's good horizontal
 
so all 10 of the people in the world who own desktop touchscreens will be happy....
 
7:36 PM
@AbhishekHingnikar I meant without the scrollbar
 
@Mosho mhmm
 
either dragging the view, or having a button on the sides
they don't even have a button on the sides
:(
 
@Mosho thats weird
for me it works fine with mousewheel
 
yeah, that's what I don't like
 
oh... and it's not even responsive... that's strange. I assumed they did that simply because the design focused on mobile. I guess not.
 
7:37 PM
I like that you can sign in using facebook :D
that site must have severe psychological issues
 
@twiz try chrome dev tools -> user agent haxx
 
@AbhishekHingnikar depends on how you define "works". It would probably take 30 seconds of violent scrolling to get to the end
 
hmm
btw on mobile it is vertical [ for good ]
 
Well it doesn't matter anyway, there can't be that many people who actually look at myspace.
They probably should have just renamed it
 
I think it was too popular to be renamed, would just be lame
retiring it entirely is an options though
 
7:50 PM
Object.getOwnPropertyNames(window).forEach(function(n) {
    if (n.match(/Collection|List/)) {
        if (window[n].prototype.__proto__ == Object.prototype) {
            window[n].prototype.__proto__ = Array.prototype;
        }
    }
})
javascript should just do this
by default
 
@twiz they should definitely re-name internet explorer 11
to something like Microsoft Web or something
rebrand the logo and present it as a new browser :P .
the backlog of IE 6/7/8/9 is horrible for the decent browser to deal :-(
 
Guys very urgent git crash. Anyone familiar with git. Giving 250 bounty reps for resolving problem. stackoverflow.com/questions/23159417/…
 
@heron: Please stop spamming.
 
8:06 PM
@BenjaminGruenbaum I've got today and tomorrow off.
It's Jesus' resurrection after all.
2
 
Awesome.
Code
 
@ThiefMaster Is it even a OK question for SO ? I mean it looks like it can only be solved by a search or somebody interactively helping
 
@heron do you still have your files?
 
@Mosho yes why?
@mosho we're discussing this problem here, chat.stackoverflow.com/rooms/51061/…
 
you could always create a new repo but lose the history
 
8:10 PM
@Mosho I tried this too, man. After 4-5 commits all same problem
 
Why do you have a git repo in /www/ to begin with?
 
@BenjaminGruenbaum lol, what this has to do with problem?
 
EVERYTHING
Also, don't you have disk backups and remote repo backups?
 
never i thought would i say this
but IE is making my life so much easier :-|
flex-box + child's transition all almost animates the whole re-layout process. Yikes !
 
@AbhishekHingnikar Traitor
 
@Connor no, actually try it :P
the fact the browser supports all of this out of the box is great !
 
You're simply forgetting everything that It's put people through. I wonder how many families that IE has split up?
 
@Connor they need a re-branding like google
 
8:46 PM
There must be loads of people that get so frustrated with it and end up divorcing their wives ;)
 
right now i am finding chrome frustrating as f.
seriously i don't understand why is it so poor with svg / huge images :-| even with css-filters
and [now all the flags are on and my gpu is screaming ]
 
@AbhishekHingnikar Well, we all know that Firefox is the only browser that has stuck by us
 
@Connor IE is performing great.
I might actually make it my browsing browser till I find what the heck is wrong with my chrome
css-tricks.com/snippets/css/a-guide-to-flexbox < something i believe everyone should read before building their next layout.
2
 
I've been meaning to read that for a while, I don't fully understand old vs. new flex-box
Having said that, you're still a traitor
 
@Connor just follow that article.
@Connor oh yeah, i have always been one.
 
hi bros
 
@BadgerGirl hi sis :D
Me and Sneha pair programmed today :D :D.
lol
 
3 messages moved to Trash can
Stop bullying my girlfriend
5
 
@Connor with the new flexbox that thing is just 3 lines of code [rule wise ]
 
!!greatest_question_in_universe
Where is caprica @rlemon ?
 
9:11 PM
oh wait have i showed you guys my new setup ?
 
9:30 PM
cleanest setup i have ever had
 
hello
@Zirak ...Jews get Easter off? That sounds counter-intuitive...
 
famo.us <- is in public beta :D :D :D :D
 
What's the best way to find two asterisk in a row with regex? This finds one: replace(/\*/g, '<i>'
 
@tmyie simple replace(/\*\*/g,'<i>')
 
Thanks :)
 
9:54 PM
grooveshark.com/s/Sold+My+Soul+To+Yo+Mama/4a6QKi?src=5 - the song is Sold My Soul To Yo Mama.
 

« first day (1282 days earlier)      last day (3672 days later) »