« first day (1350 days earlier)      last day (3599 days later) » 

8:00 PM
@Zirak and input.form is pretty useful
 
@Zirak my god I love that
 
And a lot of people don't know about elem.attributes
 
document.forms and form.elements so great
 
There's also window.frames[n], which gives you the nth frame (oddly enough, window.frames === window...I dunno why)
 
@Andrew nice site!
 
8:01 PM
Another easter egg: window[n] also gives you the nth frame
 
input.form is so freaking useful when working with hostile environments
 
I gotta go, have a nice days guys!
 
document.styleSheets is also quite handy in certain situations
 
@Lucio what site?
 
@Zirak form[n] gives you the nth element
but I think it is much less readable
 
8:02 PM
Yeah, accessing the items by index is meh
 
document.forms['name'] is way more useful
same for form.elements['name']
 
document.forms.name if you already know it
dot notation ++
 
names often have hyphens though, so I mostly use the brackets notation
 
yea I've tried to stop using hyphens :/ hard habit to get out of
 
I don't
naming is fucking hard, don't limit yourself
 
8:04 PM
I only use hyphens (occasionally) in my CSS classes, because google tells me to.
 
Damn
that's my 4th meeting today
 
In related news: Man to marry his goat
> Carmelita ate her first wedding dress
True love.
 
Is it bad that I'm kind of excited to gut my project I worked for 2 weeks on so that it can be re-done and refined?
Normally I'd be pissy
 
Are you proud of your project?
 
Actually yeah
currently our lawyers are using it to build a database full of sexual assault definitions and related statutes, penalties, etc
 
8:07 PM
Are you happy with the result?
 
Yes
 
@Loktar :( why in the hell does changing the size of a canvas object clear out any set font properties?
 
It's unfortunately not uniform enough (yet), but we're to fix that
 
Then yes it's weird
 
that makes no sense!
cc @FlorianMargaine
canvas.width = 500;
context.font = fontStuff;
canvas.width = 501;
// context.font is now back to default.
 
8:08 PM
@Zirak well now instead of our policy department using it, it's going to be used by the source! 30 odd some lawyers that are detailed on collecting data for crime
yayyyy crime!
 
@Zirak this guy (and carmelita) deserve some cookies!
 
!!s/([ (].+[)]/'s cameltoe/
 
@NickDugger Could not process input. Error: unterminated parenthetical on line 208
 
damn
 
@NickDugger Could not process input. Error: unterminated parenthetical on line 208
 
8:16 PM
I'm so bad at regex
!!s/(y.[(].+[)])/y's cameltoe/
 
@NickDugger @Zirak this guy's cameltoe deserve some cookies! (source)
 
I just don't get it. Why is this amusing you people? You're really changing the sentence itself
Might as well do:
!!s/.+/I like to have gay sex/
 
@Zirak I like to have gay sex (source)
 
HAHAHAHA
SO FUNNY
 
lmao
no way
 
8:22 PM
@RUJordan Zirak squeezed a lemon in his eye (source)
 
what? by clicking on the source of caprica's last message the source is lmao...
lmao
no?
ok....
 
She's magic
 
say I have an array [1,2,3,4,5], and I want to generate a 2d array of this array in a looping kinda order. like [[1,2,3,4,5],[5,1,2,3,4],[4,5,1,2,3],[3,4,5,1,2],[2,3,4,5,1]] .. how would I do this?
 
@Andrew: The deleted -11 and -3 questions might have something to do with your question ban ;)
 
8:36 PM
I'm having a brain fart.
@ThiefMaster that sob... I asked him if he deleted he said never.
faith in humanity--
 
@rlemon splice
 
... go on...
 
@rlemon [1, 2, 3, 4, 5].map(function(el, i, arr) { return randomize(arr); });
I let you write randomize
 
@rlemon
var ar=[1, 2, 3, 4, 5];
var i=-1;
var ar2=[];
function shift(){
    ++i;
    ar2.push([]);
    for(var j=0; j<ar.length; ++j) ar2[i].push(ar[(i+j)%ar.length]);
}
 
oh it's not random? my bad
 
8:40 PM
 
:P
@rlemon then you call shift() for how many arrays you want in ar2
add params and whatever, you know the drill, but I guess that's the way to do it
 
var arr = ['apples','oranges','bananas','plums','grapefruit'];
arr = arr.map(function(el,i,arr) {
    var tmp = arr.splice(-i);
    return tmp.concat(arr);
});
console.log(arr);
 
var a = [1, 2, 3, 4];
var r = [];
for (var i = 0; i < a.length; i++) {
  r.push(a.slice(a.length - i, a.length).concat(a.slice(0, a.length - i)));
}
 
@FlorianMargaine I can't figure out why it stops after the first item
 
@rlemon
 
8:47 PM
nvm
i'm a fucking idiot
 
> You've earned the "Enlightened" badge (First to answer and accepted with score of 10 or more) for "How does eval() treat a string object differently from a primitive string value?".
coooooool
 
So, can you guys see my name on this?
I am showing up as user2994925
 
var arr = [1, 2, 3, 4, 5];

var prev = arr;
var result = arr.map(function () {
    var step = prev.slice();
    step.unshift(step.pop());
    prev = step;
    return step;
});
 
definitely this ^
way more readable
 
myarr = myarr.map(function(el,i,arr) {
    var tmp = arr.slice(),
        slice = tmp.splice(-i);
    return slice.concat(tmp);
});
 
8:51 PM
That's nice
 
HEY
 
@rlemon now do that in CSS :P
 
@rlemon On third thought, that's a really good solution
 
9:00 PM
Thanks
 
I do like it as well
 
@copy @copy @copy @copy @copy @copy @copy @copy @copy @copy
 
Mushroom mushroom
 
snake
 
cyclops
get it?
 
9:03 PM
:|
 
>:|
 
o|
 
Where is he? ;_;
 
> What is a “Butt” application? [on hold]
I was wondering what the hell was that...
 
@BadgerGirl there there
 
9:05 PM
-1
Q: What is a "Cloud" application?

Federico PonziI know that out there, there are four types of cloud services: IaaS: Infrastructure as a Service PaaS: Platform as a Service MaaS: Metal as a Service SaaS: Software as a Service - the most known. One example of saas is Gmail or Google Drive. An example of Paas is a web hosting. So what is rea...

 
@FlorianMargaine link?
 
@rlemon was it really that complicated?
 
@RUJordan where where?!
 
@BadgerGirl oh.. uhh.. that was a consoling "there there" not a directional "there there" D:
 
9:06 PM
just draw a rainbow once on a in-memory canvas, clip on the text, and draw the image twice at a certain incrementing indent
 
@RUJordan Why would you be so mean?
 
IT WAS UNINTENTIONAL
Quick distraction: these pidgeons look like they're about to drop the hottest album of the year
 
@towc that wasn't the point
there are of course easier ways about it
 
@RUJordan Haha yeah
 
oh, what were you trying to do then?
 
9:08 PM
I wanted to do it this way. ;) hence it being a demo
I had an idea, wanted to see if it would work. it did
 
ok, it works so... I'm not going to complain
 
@RUJordan pigeoncore can definitely be a thing
 
According to twitter the word Nazi was tweeted 3.4 times per second (30,209 times) during the US Germany game.
Damn
 
@RUJordan How fascist of them to track that
@RUJordan How can you be so inconsiderate!?
GAWD, like, what are you, Inconsiderability Man?
 
That's Captain Inconsiderate, you douchenozzle.
 
9:11 PM
Fighting considerability in a stretchy, stretchy, inconsiderate latex jumpsuit?
 
I have pictures that prove he's actually Dildo Boy
 
I have multiple super-personas disorder.
 
Now he stole my college nickname!?
 
...supersonas.
...tactileneck.
 
did you guys see this thread? 4archive.org/b/res/545735426
 
9:14 PM
@FlorianMargaine why are so many of them pointed? D:
Oh come on one of them is just a giant thumbtack.
 
Oh my god no. No no no no xD i.imgur.com/UiOuWnn.jpg
bahahaha
The Darth Invader xD I'm dying
 
@FlorianMargaine wish I hadn't
 
@FlorianMargaine do you have any pets?
 
@RUJordan 2 dogs
 
9:17 PM
 
ermahgod what kind?
@rlemon D:
I live with 2 dogs also
They're my brothers
 
shih tzu and cavalier king charles
 
oh ok small breeds are good choices
I bunk with a black lab and a chihuahua
surprisingly they are best friends
 
yeah we live in an appartment with a small garden
so big dogs are out of question
and btw, I hate chihuahuas.
 
So do I
so bratty
 
9:20 PM
they're cunts
 
the lab is my best buddy. He stayed in my room the whole winter to keep me warm lol we went to college together too.
 
Pinschers are the worst.
 
@RUJordan lab as in labrador?
 
He's grown up with small dogs so he's exceptionally good with them, and in turn, babies
yup
he's 70lbs
a bit of a mix. 95% lab, like 5% cocker spaniel. He's got a slightly curled/fuzzy tail and fuzzy ears but otherwise he's all lab
 
9:22 PM
 
much smoother with 64 grads over 32
 
@Zirak ooh that's a husky
 
^ Joy, when she was around 7 years old (~2.5 years ago).
 
probably the kind of dog I'll get once I get a large garden
 
@FlorianMargaine Common mistake, she's an Alaskan Malamute
 
9:22 PM
see how he bites the blanket instead of her
not to mention his honking sound xD
 
Anyone using gulp out there, got a quick question
 
I want a dog. but I live in a triplex. I don't feel like it is very fair right now considering I have little space for it.
 
@Zirak oh, my bad
 
@RUJordan teehee
 
@rlemon small dogs are really fine in appartments as long as you get them out often
 
9:23 PM
Labradors are a cute bunch
 
work :/
 
he's such a good boy
I miss him
 
but once I get a place (house) I have big plans.
 
he's been at my parents property for 2 weeks now so he can run in the farms and lose weight
....oh my god he's at fat camp D:
3
 
hahaha
... why didn't you go with him?
 
9:25 PM
There's a dog park near where I live, and a few years back a golden retriever named Snow frequented there. At the time he was 10 years old, and his single purpose in life was chasing things thrown to a distance.
And eating garbage.
 
Actually I've been working out :3 The elevator breaking means I've walked so many stairs this week, and I've been lifting after work instead of getting drunk
 
@Zirak sounds like classic dog
 
Since his owner was anemic, I constantly played with him. He was such a cute dog.
 
I also have a dog park near my place. but my work is in another city. commuting home every lunch to walk it is possible.
 
But he's not technically my dog. I'm like his cool uncle who just plays with him, but doesn't have to take responsibility
 
9:26 PM
anyone know what this regex is ? Having trouble understanding it.. var reg = /^(1[3,5,8]\d{9})$/;
 
@jc6212 Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
@RUJordan haha, and how's that going?
 
@jc6212 gets the string that starts with 13, 15 or 18, followed by 9 digits
 
@FlorianMargaine sweet, that was it, thanks :)
 
@Zirak actually he's noticeably thinner. He wasn't fat, he was putting on pounds though since he's a big dog in a small apartment with very work-busy owners. But at my mom and dads place he has a whole fenced in acre with doggy door access, and swims for hours everyday in the pool
We can't keep him out of the water lol he loves swimming
Actually, he's learned how to throw his toys in the pool for when we get tired of throwing them (cause he's a tugger)
it's awesome
 
9:29 PM
That's great
 
If you can't tell, I really love animals (dogs especially). I took a class in HS (my only A in HS) that taught me muscles, bones, habits, breeds, parasites, digestion habits etc
lol
 
Dogs are the best
 
Unconditional love man
More than I can say about you... i mean...
 
What about me?
 
@KendallFrey <3 bro
 
9:30 PM
You're like... 4th runner up best?
:D
 
the Canadian kind.
 
@jc6212 btw, the parens are useless
 
@RUJordan Man, you made me remember Yuki. She was my father's Samoyed
Beautiful, beautiful dog
 
@Zirak samoyed were already domestic back in 19th century?
 
@Zirak so fuzzy lol the shedding must have been terrible
 
9:39 PM
@RUJordan So worth it
 
@Zirak do you use a google account to connect on SO?
 
Joy sheds like a grumpy design committee (7 points to whoever gets the reference), all year round. I brush her nearly every week, and it just doesn't ever stop...
 
    mozilla shows an "Access to restricted URI denied" but loads the html in the dom.
    but chrome shows
    XMLHttpRequest cannot load file:/...Cross origin requests are only supported for HTTP.
    Uncaught NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to load file
and doesnot load the html.
 
You can't use XHR locally
@FlorianMargaine Why do you ask?
 
ow
 
9:42 PM
ajax is a wrapper around XHR
 
@Zirak I haven't given up on the idea of SO chat in emacs
but I think I'll just have people enter the cookie to begin with
 
yes.. then how would it run on a device .. i mean if i were to use it as a js app in a firefox os phone
 
testing
 
@blackbee That's a question for the firefox OS docs.
 
ok .. leave fOS .. i cannot do it without server?
how does angular do it?
 
9:45 PM
If it's your own file (not a local one), you need to have a server, yes
 
with grunt, how I can call a command line like date from a task ?
 
pastebin.com/2rte29Ky i wrote this .. i was hoping something :(
 
And by "server" it could also be a local thing of course
 
localhost
 
@Zirak I raise you
 
9:55 PM
Selfies aren't welcome
 
:D
 
don't hate
 
why does angularjs doesnot show this CORS when i do
.when('/view1',
                      {
                          controller: 'SimpleController',
                          templateUrl: './partials/view1.html'
                      })
and run without localhost?
how does it solve the issue..
 
I love r ส็็็็็็็็็็็็็็็็็็็ndom stuff
 
$.ajax({
    type: 'jsonp',
    crossDomain: true
I saw this kind of code at work...
I was sad
 
10:12 PM
even I know enough to not do that
 
Mmm BBQ
 
@Magikaas You've shown interest so I'm bugging you. So I hate playing PSP games on the emulator, controls are horrible. So I can either jailbreak a PSP (I have a non-jailbroken one) and get some obscure SD card to store awesome games, OR I can get a controller and hope it'll be good.
!!jailbreak or get a controller
 
@Zirak jailbreak
 
...I was hoping for "both"
But boy, booting up into Tales of Eternia was great
A shame all the save data is somehow lost...I spent hours in that game.
 
my fancy bbq
 
10:20 PM
Did it come with the fancy bench?
 
problem of $.suscribe in file javascript stackoverflow.com/q/24434546/2765759
 
No one of the other tennants found that
 
0
Q: What should my services return to controllers?

Niall O'BrienI'm slowly learning Angular and I'm wondering if my singletons (services & factories) should return a promise object (containing the required data) to my controller or if all promises should be resolved in the factory first and I only pass response.data to my controllers? I've seen both methods u...

 
someone suggest me a film please, I'm getting in film-astinence
 
Back to the Future
 
10:32 PM
@towc Modern Times
 
@Zirak charlie choplin? already seen it
@copy seen all of them
 
@towc Groundhog Day? Blazing Saddles? American Beauty?
 
The Departed
 
did you watch fight club?
 
@FlorianMargaine yes
@Zirak seen none of those
@copy didn't see it yet
 
10:33 PM
Go left to right
 
from which one should I start?
ok
 
Middle one is an oldie comedy
Left and right are timeless
 
Has anyone seen snowpiercer?
 
@towc Office Space
 
@copy I've seen that
@phenomnomnominal nope
 
10:43 PM
 
10:57 PM
so ,, if xhr gives me CORS , is there an alternative?
 
what a coincidence
 
@blackbee Depends on what you want to do.
 
I just wrote a french article about JSONP/CORS margaine.com/2014/06/21/jsonp-vs-cors.html
 
@FlorianMargaine omlette du fromage?
 
@SecondRikudo Baguette de la merde
 
10:58 PM
@SecondRikudo i want to load an html into a div .. much like angluar js does with partial views. i was trying this : pastebin.com/2rte29Ky
 
@copy I know what merde is XD
 
@FlorianMargaine page non trouvée
:(
 
@blackbee antibiotics
 
:O
 
@SecondRikudo it is "omelette"
 
11:04 PM
can i add a jsonp to what i wrote? i am trying to load the local files actually
 
Am I the only one thinking jsonp is an ugly hack?
 
it's a hack, but an elegant one
It solves a known problem within the boundaries without introducing too many complications
 
and it works in freaking IE8
 
i have something like
<div id = "view">
<a href="#general">general</a>
</div>
when the user clicks it window.onhashchange call the router to load an html(/partials/general.html) .. how to do a jsonp here?
 
@SecondRikudo I repeatedly say in the article that jsonp is a hack.
 
11:10 PM
i'll try first
 
@FlorianMargaine How the hell would I know? I only know omelette du fromage merde! :P
 
@SecondRikudo Back in the twenties, we didn't have another choice
 
@copy Last I checked, we weren't in the twenties anymore.
 
And nobody in their right minds is using it anymore
 
Sadly, that's not entirely true
 
11:13 PM
A UI dev walks into a bar, sees the table layout and walks out.
 
Many REST service still allow reply with jsonp, too many legacy projects still use it.
 
@copy, @SecondRikudo I still use it for the bot
 
I rest my case.
 
It's the only service the bot can access
 
how to rest
 
11:15 PM
@Zirak Why?
 
@SecondRikudo The bot is client-side\
 
@Zirak And?
 
If the service doesn't have CORS, I can't do anything
 
@Zirak What's "the service"?
 
@SecondRikudo An API. /urban accesses the urban-dictionary API, /define the wikimedia one, etc
 
11:16 PM
2
Q: How to make an asynchronous self-calling loop non-recursive

EvertI'm writing a function in PHP that loops through an array, and then performs an asynchronous call on it (using a Promise). The problem is that, the only way I can make this loop happen, is by letting a function call itself asynchronously. I run into the 100-nested functions problem really quick,...

 
@Zirak And yet they provide jsonp?
 
If an API doesn't support CORS nor jsonp, I can't use it
The better option would of course be CORS.
 
If an API doesn't provide CORS it sucks. If it doesn't provide CORS but allows jsonp, it sucks even more.
It means that you know that your users might need to access from a different domain, but you still don't allow CORS.
 
@Zirak can my case be solved with jsonp?
 
@blackbee I dunno, do you know what jsonp is?
 
11:21 PM
yes .. the api has to return something, which is used as a parameter in a callback function?
 
Can you do that in your case?
 
then i have to convert the html to json? or no.. i don't think so.
it would make it twisted
 
11:56 PM
runnable.com <- thoughts?
 

« first day (1350 days earlier)      last day (3599 days later) »