« first day (1413 days earlier)      last day (3526 days later) » 

12:14 AM
Typical ff..
 
12:31 AM
@rlemon part of the spec bro
> Let the ImageBitmap object's bitmap data be a copy of the img element's media data, cropped to the source rectangle. If this is an animated image, the ImageBitmap object's bitmap data must only be taken from the default image of the animation (the one that the format defines is to be used when animation is not supported or is disabled), or, if there is no such image, the first frame of the animation.
@rlemon apparently this is a work around slbkbs.org/jsgif
 
 
1 hour later…
user2620028
1:32 AM
I cant tell if this code isn't working simply because it takes too long to execute before the browser kills the process or if it is actually stuck in a loop
 
1:46 AM
Either way, it needs to be fixed, right?
 
user2620028
Maybe........
 
@AaronSiciliano spin up a worker or chunk the tasks
 
0
Q: Difference between Future.failure and throwing exception?

alexkrishnanIs there any difference between these two ways of completing a failed Future? If so, which way is considered to be more "correct"? Calling Promise.failure: val myPromise = Promise[String] Future { // Do something that might fail if (failed) { myPromise.failure(new RuntimeExcepti...

 
user2620028
@phenomnomnominal more concerned at the moment with the storm that taking my power out lol
 
2:51 AM
Leap + Rift. Yes.
 
3:11 AM
@Loktar: More of a toy than a real workaround. I wouldn't recommend it for almost any serious use.
 
 
1 hour later…
4:32 AM
@shachaf I was about to argue with you... but put two and two together that you must be the author of it :P
my argument was mainly going to be canvas + animated gifs is rarely serious
 
http://pastebin.com/d8qrRnNk hi, this is my .emacs file, but whenever i do a M-x list-packages or
M-x package-refresh-contents it always shows Connection elp.gnu.something ... what is wrong in this file..
 
5:03 AM
@Loktar: Sure, it's a fun toy (and it could pretty easily be made asymptotically more efficient). I didn't actually read the context of the conversation, it's just my usual caveat.
And: Yep, occasionally I look through my referers. :-)
 
SRJ
5:18 AM
hello all..
var str = 'this_those_that_x_y';
tokens = str.split('_');
How can i get the this_those_that only
 
@SRJ tokens.splice(3,2); //remove 2 values from tokens starting with index 3
 
SRJ
thankyouu
 
np
 
SRJ
.slice??
 
@SRJ slice is for slicing, splice is for splicing. they are different.
 
SRJ
5:25 AM
ok. thnkyou verymuch
:)
 
@SRJ if you want, you can upvote any/all of my answers :)
 
Man this's been a long week
 
SRJ
@AwalGarg i am getting in reverse it removes first 3 and getting last 2
tokens.splice(3,2); //remove 2 values from tokens starting with index 3
 
@SRJ that is the return value of the function. If you see the variable token itself, it will contain only the first three values.
 
@blackbee Nothing, that's just a default package repo
 
SRJ
5:33 AM
tokens = str.split('_').splice(3,2);
result = tokens.join('_');
str=A_B_C_D_E
result is D_E
I want A_B_C
 
slice(0, 3)
 
then use slice(0, 3)
splice will modify the original array and return a new one. So you have to check the original array only. No need of assigning it to a new variable.
@Zirak what is the time at your place?
 
SRJ
my time is 11.15am
 
6:12 AM
 
tldr
 
guys you know different browsers have different colors of tabs on which favicons are overlayed. So how to detect that color and display a different favicon accordingly?
 
Hi can anybody help me?
0
Q: Get FileInfo list through ajax call

DH__I want to get files name and path list on button click through ajax. I have done following code in controller: [HttpPost] public ActionResult GetFileList(int id) { try { List<FileInfo> FileList = null; if (Directory.Exists(Server.MapPath("~/UploadFolder/" + Convert.ToString(id)))) ...

 
6:33 AM
@AwalGarg An icon should always be designed to go over any background
@AwalGarg And of course you have no access to that color anyway
 
@dystroy ain't that realistically not possible?
@dystroy ;-(
 
@AwalGarg Well, that's what everybody always did, because program icons are often displayed over user chosen backgrounds... look at your phone
 
@dystroy ahh nice analogy. Thanks, I'll try.
 
6:57 AM
@dystroy can you give me some quick SQL advice?
 
@GNi33 I might try, but I'm no good at SQL
(and I'm pre-coffee)
 
oh, I thougt you work on a regular basis with it?
 
@GNi33 yeah... but I'm not good
 
don't want to bother then, I think it would be pretty easy though
 
"don't ask to ask, just ask"
 
6:58 AM
it's basically about a query that goes over all tables, filtering by id and filtering by category, a column
 
morning
 
all the tables that I filter out by id have the column "categories", but some others don't which causes an error
 
@GNi33 can you give the definition of the tables and the query
 
so I'd pretty much need to do the query on the IDs first, and do the second query on the result of this first one
and I just don't know how to phrase the question correctly to make google give me useful results
@dystroy well, I'm using a db-abstraction layer behind it, but the WHERE clause would probably be something like that
WHERE o_classId IN (?,?,?,?) AND (categories LIKE ?)
and I'm querying on a Object_Abstract_List, basically meaning that I'm going for all tables that represent Objects in the CMS
 
You mean you do a query which indistinctly goes over all tables ? That's not how you SQL. That looks like a misuse of an ORM
Personally I hate ORM, I feel they're for people who don't know SQL and they always led to bad performances on real systems
 
7:04 AM
yeah, I figured it wouldn't be the best way to approach this
these objects represent Articles, which can be of four different types, and it's sorted by creationDate
 
I don't even think there's a clean way in SQL to query columns that may not exist
 
well, I'd need to make the first query and use the second condition only on that result
 
@dystroy lol why would someone want to do that?
 
Pretty sure that's possible in a not too hard way, but I just haven't touched SQL in such a long time :/
 
!!afk reading to my son
 
7:21 AM
@dystroy Yes, but server cost < developer time
 
@copy dystroy is afk: reading to my son
 
Writing fast software isn't cool, although some people seem to think that
For library it kind of makes sense, but even there people take it way too far
And then I see people who write O(n^2) loops that could be turned into O(n) with 3 more lines of code
 
The difference between a stupid query written by an ORM and a standard one is often many orders of magnitude. And slow queries are often total show stoppers.
 
Depends on the query and the ORM
I don't see many queries that are so complex that an ORM couldn't handle them efficiently, and even then you can still write that particular query manually
But I'm not trying to praise ORMs, they can bring more problems than what they solve
 
7:44 AM
jsfiddle.net/gxRC9/502

this fiddle works great for fixed header but if ive have scroll it doesnot work any idea how to work with this?
 
502nd revision? omg!
 
2
Q: Is Ubuntu Server only available with the command line?

HowlOnly day my company going need server, and I like Ubuntu since it haves the lease virus out all of the OS. (I think), but when I look at the Ubuntu Server it only had black background and white text, which is command lines. Is that all to Ubuntu Server? Or is it like Ubuntu Desktop, and a modules...

i r sad
> It's a stripped down OS with no frills attached
 
Because it's a wrong statement or because of the bad pun?
 
Because of everything
 
The world is terrible
Actually no, it's awesome
 
7:57 AM
Hold me, @copy. I'm scared.
 
@Zirak You can install a gui over the server version and use a browser based controlling system.
 
8:19 AM
Morning Deggers
 
8:35 AM
Word of the day is osculate, which means to kiss or to come in close contact
The previous word of the day was rusticate, which means to go or live in the country
 
@Neil That's a very unsexy word. Maybe because it sounds like "ovulate".
 
somebody just sent me their private and public keys :o
my evil brain is feeling super evil :x
 
@Zirak In fact, I believe that was the word used when "kiss" was racy
Like copulation or coitus
@AbhishekHingnikar I like to mess with people if they make security mistakes like that, but not to damage, simply to teach :P
 
8:50 AM
People are weird about "intercourse" when used in its non-sexual sense
 
In fact you don't often hear the word intercourse used to mean conversation, at least not nowadays
 
It's like "gay". I miss that word.
 
Maybe that's why the flintstones went out of style
Nobody wants to have a "gay old time"
 
hehe
 
@Neil if the person is your fiance what would u do ?
 
8:54 AM
@AbhishekHingnikar especially if she were my fiance
 
i am committing to all the repo's we have with her as contrib as ... I will never give my private key to somebody ever again.
 
 
9:14 AM
@rlemon Hahaha, well, at least I don't pay as much
 
0
Q: Multiple Q.all inside function?

Erik Van de VenI want to send a list of new books to a user. So far the below code works fine. The problem is that I don't want to send a book multiple times, so I want to filter them. Current code works fine: function checkActiveBooks(books) { var queue = _(books).map(function(book) { var deferred = Q...

 
Does anybody have a decent getElementsByClassName polyfill?
1 message moved from PHP
 
@PeeHaa which browser version?
for IE8 support?
 
Yep
 
use querySelectorAll
document.getElementsByClassName = function(class) {
    return document.querySelectorAll('.' + class);
};
if you prefer
 
9:26 AM
yeah that would work
@FlorianMargaine Fuck you IE seriously
 
oh yeah, my bad
you should use klass, not class for the variable name
 
Apparently IE thinks class is a reversed word...
yeah :P
 
ew, or className
 
tnx
 
@Zirak jQuery uses klass everywhere :P
 
9:30 AM
> Object doesn't support property or method 'getElementsByClassName'
Does that mean I should do it on domnode instead?
The polyfill
 
oh... you're going that way
no
 
@FlorianMargaine And jquery's source is excellent
 
just do: function getElementsByClassName(context, klass) { return context.querySelectorAll('.' + klass); }
@Zirak there are some good parts imho
 
No dice :(
> Object doesn't support property or method 'getElementsByClassName'
on:
 
... show code
 
9:33 AM
:document.addEventListener("DOMContentLoaded",this.start)},b.prototype.start=function(){var a,b,c,d;if(this.element=window.document.documentElement,this.boxes=this.element.getElementsByClassName
 
oh, you're trying to polyfill something...
well, let's try this, but I don't confirm anything
 
yeah. It is used in something I didn't write
 
Element.prototype.getElementsByClassName = function(klass) {
    return this.querySelectorAll('.' + klass);
};
not sure it'll work...
 
<3
awesome sauce
 
btw
it's a polyfill
so add a check if it doesn't already exist...
 
9:36 AM
Already done that
:)
Goddamn stupid fucking 3rd party ie9 tamplte I have to work with
I have a js file with 8 polyfills now :(
tnx @FlorianMargaine and @Zirak
 
T'was a pleasure
 
@Zirak Now that I am in here. A while ago IIRC there was some talks about making the bot run on a server instead of in a tab. Anybody ever started that?
 
yeah, there was a lot of discussion about it. But I'm abysmally busy so I don't have time to work on it
 
Yeah, @Zirak, did anyone start that?
 
@Zirak where is jsh at?
 
9:40 AM
DID ANYONE?
 
See "abysmally busy"
@SomeGuy Some dickwad did
He did have a spectacular moustache
 
The moustache is an embarrassment
 
how dare you
 
@SomeGuy The barren space betwixt your nose and lips reeks of despair
 
braindiarrea strikes again! Can't get why I can't set any prototype of Point jsfiddle.net/svmdzt09
I declare Point as a function
I add Point.prototype.stuff
then I make variables with new Point
 
9:48 AM
Move the declarations to the top
And don't use new, but whatever
 
but even then, when I try to use a function from prototypes of Point through the variables spawned from it the browser throws an error, saying they're undefined
@Zirak not like it makes any different, other than readability for some
 
It matters
 
how?
 
The declaration of Point is hoisted to the top. Assignment of Point.prototype.X stays where they are.
So while you can access Point, your loops execute before your functions were assigned to the prototype.
 
oh...
didn't know that
 
9:51 AM
26
Q: JavaScript function order: why does it matter?

Chris TolworthyOriginal Question: JSHint complains when my JavaScript calls a function that is defined further down the page than the call to it. However, my page is for a game, and no functions are called until the whole thing has downloaded. So why does the order functions appear in my code matter? EDIT: I ...

 
ok, it works! thx
 
10:03 AM
I may be going insane
 
for what?
 
Started downloading something, failed near the end. "Network Error". ...okay. Tried again. Connection reset. Sniffed the network, and it's true, for some reason a FIN was sent shortly after the SYN without any reason
 
:P
good luck with that
 
So I used wget after a minute. Near the end, complained about some garbled byte near the end
This is the windows partition, so I went "fuck that", downloaded it off my laptop, went fine. Tried transferring it over scp, and again a connection reset!
Set up an http server on the laptop, tried downloading, same error
This is just too weird
 
10:17 AM
what is at the end of the file?!
 
I've opened it and can't seem to find anything suspicious
Regular exe
 
now wot is this
for (myvar in obj) {
if (obj.hasOwnProperty(myvar)) {
...
}
}
obviously obj will own property myvar
 
wrong
 
myvar is an implied global, first of all. Declare it like another variable.
 
the condition is to prevent iterating over inherited properties
 
10:21 AM
@JanDvorak ahhh, that makes sense
 
!!> Object.prototype.lulz = 4; console.log({}.lulz, {}.hasOwnProperty('lulz'));
 
@Zirak "undefined" Logged: 4,false
 
not that Object.prototype should have any enumerable properties, but it doesn't hurt to be extra-careful
 
Don't use `for in` anyway, see Object.keys:
!!tell CustomizedName mdn Object.keys
 
@Zirak Command object.keys does not exist. (note that /tell works on commands, it's not an echo.)
 
10:22 AM
Bot, why can't you read my mind
 
@JanDvorak there used to be an issue with functions i think.......seems to ring a bell, but might be wrong
@Zirak only good if the lowest supported browsers is MSIE9 - ours is 8 :'(
 
Tell your company that Google backs you up in dropping IE8 support
As will Microsoft soon, if not already
 
 
In related news
9
Q: Down with FizzBuzz... LOL

Mat's MugThis post is the result of reading through and following the LOLCODE Specification 1.2, and writing and executing my code on compileonline.com. My "hello world" was going to be a fizzbuzz. I like it because it nicely illustrates the basics of a language - variables, operators, looping, condition...

2
HOLY SMOKES, lolcode.org is back!
 
var arr = ["a", "b", "c"];
console.log(Object.keys(arr)); // console: ["0", "1", "2"]

Why it returns 0 1 2, is it returning index of keys not there values?
 
10:28 AM
One would expect Object.keys to return keys, and not values.
 
I mean, are these 0 1 2 , index of keys or are they by default name of keys
 
An array is like a regular object except your indices are integers
 
I get you now, ta
 
Any marvel fanboy here ?
 
why in javascript we call varaiables literals
even call objects literals
is everything a literal other then a function
 
10:41 AM
Avengers Assemble is an animated television series based on the comic book super hero team known as the Avengers which premiered on May 26, 2013, on Teletoon in Canada and Disney XD internationally. == Series overview == == Episodes == === Season 1 (2013-2014) === === Season 2 (2014-2015) === On July 26, 2014, the series was renewed for a second season. Joe Kelly confirmed it is in production. The season will deal with the team facing Thanos. == References... ==
 
@AbhishekHingnikar do you know what literal means in hindi
 
i don't
hindi is not my first language
 
@AbhishekHingnikar What is your first language?
 
Marathi :P, Hindi, English
 
@AbhishekHingnikar ok tell us what literal means in Marathi then :P
 
10:43 AM
शब्दशः
actually shabdansh
शाब्दिक - hindi ( shabdik )
 
ta,

"You use literals to represent values in JavaScript. These are fixed values, not variables, that you literally provide in your script."
https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Values,_variables,_and_literals

then how literals are different then constants
 
A constant is a value which you cannot change, but used the same way as a variable. A literal is a way of expressing some value, like 4.
 
Isn't constant a way of expressing some value as well, like const = 4 ?
Literal is a fixed values too
 
A constant holds a value. Literals are just syntax.
false is a literal meaning "some boolean value". Python writes it as False, other languages don't have it
It's just syntax, like strings being wrapped in quotes.
 
a constant is a variable that doesn't change while run, but it potentially gets changed by the programmer
kind of weird way to call it if you think of it
maybe static would have been a better name for them, since they do change, just not during the execution
 
10:54 AM
saying literals are just syntax makes sense to me
 
I don't like how everything in regexp needs to be cludged up and can't be separated by something, like [a-zA-Z] instead of [a-z||A_Z] or something
 
woot dragon ball is coming back :o
@SecondRikudo
 
@towc The reason is simple. How would you then define | as something you want to search for?
Every symbol that has a special meaning in regex makes it that much more complicated
 
@Neil then just any other symbol to just space it out
even just the space!
 
11:09 AM
PCRE has the x flag which allows you to insert arbitrary whitespace. js' regex library sucks, so we don't have it.
 
@towc So you use \\ for literal \ and || for literal |?
Sounds messy
 
@Neil the | was a typo... just remove it
 
Ah
Most regular expression variations use \Q...\E which is very nice
It means, whatever I put inbetween should be searched for as is
so you don't have to escape everything
 
11:17 AM
Hi
I'm relatively new to javascript, I'm a java developer, can anybody explain to me what type this variable might be? var DECODE_RULE={};
 
@Heixss It's an object
 
It's just an empty object
you can also do stuff like
var DECODE_RULE = {
foo: "bar",
baz: "quux"
};
and you get an object with those properties
 
so if I use your example, DECODE_RULE[foo] is bar?
 
DECODE_RULE.foo is "bar"
 
guardianlv.com/2014/07/… @SecondRikudo .,, that seems to me that hes planning a prequel ... maybe story of vegeta ?
 
11:23 AM
DECODE_RULE["foo"] is "bar"
 
oh ok
thanks
 
a few minutes ago then i tweeted twice.
 
@AbhishekHingnikar Interesting
 
@AbhishekHingnikar XD
 
@SecondRikudo youtube.com/watch?v=fUs4Kmfqdhw < my favorite scene from the last installment
 
 
1 hour later…
12:33 PM
WHY IS THE ROOM DEAD ?
 
*crickets*
 
because it's rebecca.blackfriday !!!!!!!!!!!
 
Todays my last day of work, and its friday
bonus
 
i want to be home in bed!
 
Everybody's last day at work is friday
 
12:48 PM
nope
it will be wednesday for me
in 3.5 weeks.
 
maybe not in name, but it's still a friday
 
@Neil The internet wins 7 points
 

« first day (1413 days earlier)      last day (3526 days later) »