« first day (2145 days earlier)      last day (2794 days later) » 

1:17 AM
@phenomnomnominal Lot's of heavy hitting community members from this side of the pond, topic channels with actual popular package authors, conference/camp/meetup details, job boards, cats. Plus, you know, I'm there.
 
tempting
 
holodeck developer tools keyboard shortcut
 
!!>x=0.1+0.2;x-=0.3;console.log(1/x)
 
@CSᵠ "undefined" Logged: 18014398509481984
 
@CSᵠ wtf?
 
1:32 AM
:)
what did you expect?
 
Oh.. -=
 
2:30 AM
karma coverage always coming empty.. any idea why this is happening?
it's just an empty report
 
anyone around
how do I create my own custom google search mechanism
so like I want to have a custom search box for the following site:mysite.com
 
yes figured it out I think
 
2:56 AM
@littlepootis what if google isn't indexing my site properly what do i do
 
3:29 AM
you still there dude
 
 
2 hours later…
5:21 AM
hello?
 
6:06 AM
hi
 
howdy
 
nello all
 
@RulerNature Welcome to the JavaScript chat! Please review the room 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.
 
6:28 AM
It rained here last night, and by rain, I mean that the ratio of water to air was roughly 1:2.
I ran to my car because it wasn't lightening up. I literally got soaked
There was a river of water on the street as high as the curb, so you couldn't even tell where the curb ended and the street began
My foot literally got submersed in water on the way to the car, not to suggest that my feet weren't already completely wet to the bone
I was lucky enough to have parted the relative safety of the Mexican restaurant after the storm died down enough for the grape-sized hail to stop falling from the heavens
My wife in all this: "oh, just get the car.. it's not like you'll get wet or something"
 
@Neil A little water never hurt anyone
 
rainwater brings joy as they grow sprouts
 
And who/what is they in that statement/
 
Tell that to my leather mocassins
 
I tried, they're non-responsive :/
2
︵‿︵‿︵‿︵‿︵‿︵‿︵‿︵‿︵‿ヽ(゜□゜ )ノ︵‿︵‿︵‿︵‿︵‿
 
6:36 AM
@monners true, they are way too shy
 
How's everyone doing - got a quick question and I think it's small enough to be answered here.
disregard that question - I read it was. Didn't see how, but it's possible apparently.
Eh, I'm just going to post the full question on SO
 
7:02 AM
Hey guys, here's a backbone.js question. I've a model, and its root is `'/reports'`
I made an instance of with data `{id: 1, name: "Test1"}`. While saving it I want it to go to a path like, `'/reports/1/submit'`.
I can do this
`model.urlRoot = '/reports/' + model.get('id') + '/submit';`
I want the verb to be patch.
What do I need to do? Or any other solutions to it?
But if i do
model.save(null, {patch: true})
it goes to '/reports/1/submit/1'
 
@Kumar there might be a way to provide a custom uri format to use, but lacking that, I don't think you have much choice with patch
 
@Neil Thanks! I can always do a $.ajax with the choice of verb and url and data, and add my codes to a success callback. But I want to do it the backbone way. :-/
 
9
Q: Backbone.js with a custom fetch URL

Keith JacksonI am trying to set up a variant fetch method on my backbone model that will fetch the current model for a given user. This is available from the API on /api/mealplans/owner/{username}/current. I have written the following model. I commented out the URL Root, as the prototype fetch call was simpl...

Using this, can you not create a saveCurrent ?
Or maybe pass the URL as one of the options ?
 
7:17 AM
@dievardump Hey, thanks, I'm looking into it.
 
@Kumar the validated answer of this one might also be of some help
34
Q: backbone.js use different urls for model save and fetch

fortuneRiceMy back-end has two separate pages, one for handling the model save request and the other for model fetch. What is the best approach for calling save() and fetch() to use different URLs? Thanks. Edit: After studying the annotated source, I see that one can actually supply an options hash to fe...

Customizing sync (or save) methods for this Model seems to be the cleanest solution
 
Turns out my question was huge. If anyone gets the chance to take a look at it I'd appreciate it. It might actually be a far more easier question to answer than I made it out to be.
0
Q: Best choice for cross-platform networking

Freddy JonesMy problem is pretty simple to explain, but difficult for me to find a good overall solution for. I want to support my multiplayer game for browsers, but I also want it to be playable on Windows, and Android (at the moment) as well. The actual problem I'm coming across is that I need a basic TC...

Changed the title to be a bit more appropriate.
 
Morning guys
I'm using angularJS and have the following markup
<div class="list-group">
    <a href="#" class="list-group-item" ng-repeat="table in tables" ng-click="selectTable($event)">
</div>
and in my controller
I have
$scope.selectTable = function(event) {
    console.log(event.target)
}
when I click <a> for the first time, it returns <a>
when i click the other one, it then returns the clicked <a> and the previous one clicked
why i'm getting previous ones too ?
 
@FreddyJones You could have "two servers" for the clients, that would just update or listen to redis changes and use the client protocole to communicate with it. And one main server that also listen and update redis changes and have all the game logic implementation there
 
@dievardump Any help ? :P
 
7:29 AM
@dievardump Hey, thanks. That seems to be the only option. Will write a customized function for that. :)
 
I'm really badly struck
 
@ZahidSaeed Don't ping people to seek help.
 
I won't
Sorry
 
@ZahidSaeed I have no idea with no working example.
 
I don't know why it is returning the previous clicked elements too
 
7:33 AM
Oh I know.
You didn't close your <a>
So they might be imbricated. no ?
 
No no, I did in my actual markup
I forgot to put it here
All the <a> are being created by ng-repeat
 
Get us something that reproduce this error, with the less code possible and I will look at it
 
hellooooooooooo, somebody help me
 
@dievardump I already put as much less code as I could
 
7:36 AM
@dievardump I would have never thought of that, so you're saying something like a mix of solution 1 and 2?
 
@ZahidSaeed But it's not an example we can test. Show us a live example (jsfiddle) where your problem is.
 
I do it now
 
can someone know how to fix this? stackoverflow.com/questions/39220996/…
 
@FreddyJones Yes. But it will probably depends on the number of users you will have etc...But having the servers that handle users interactions acting just as proxies is for me one of the best way to have the minimum code to duplicate
@StormSpirit Stop linking to your question, we saw it the first time, repeating won't help.
 
ok
is it too late to say sorry?
 
7:39 AM
@StormSpirit The student_id is coming from ajax call ?
 
yeah
 
and you want to update modal id ?
 
Where is coming data.student.id from ?
 
it load on the first, but on the 2nd student, it will still the same on first opened student_id
it will be forever on the first open student_id even I open others. not updating at all
 
data.student.id where does it come from ? data is not declared in your code.
 
7:41 AM
@StormSpirit Fire an ajax request when a modal is clicked
when the modal is opened, update that modal with a custom attribute having the value of that student_id that you received
 
yeah the data.student.id is changing, i tested it with console.log(data.student.id); but the initialize of selectize is just not changing
 
What is the initialize?
Is it a property of an object?
 
for example, I open first student_id = 422, then it will initiazilze selectize then open another student_id = 314, then it will stay the same and it shows student_id = 422
it's from ajax
 
Why don't you change its value after every ajax call ?
 
yeah it's changing men, it's only the selectize not working
 
7:46 AM
obj.initialize=data.student.id
I don't know what selectize is
 
that what I used $('#relationshipModal input[name=existing_user]').selectize({
 
@StormSpirit The request that is send, does it contains the good id as parameter ?
When you look in the dev tool
 
yeah
 
Ans the server, does it answer with the good data ?
 
the server only receive first student_id. and not changing even I open other student
first opened*
 
7:49 AM
You just told me that data: { name : query , student_id: data.student.id}, contains the good student id.
 
I am trying to put a project in Git , but after I do a "git commit", it gets stuck with one file ` create mode 100644 workspace.json`. It has been stuck with that file for past 2 hours. Any ideas on how I could come around this problem ? I am unable to find any related questions
 
yeah on url: '{{ URL::route('json/searchGuardianAndStudents') }}',
I received only the opened first student_id
 
My question is : data.student.id, on the second click, what value does it have ?
 
same as the first one
 
OK. Then question : Where the hell do you set the value of data ?
 
7:50 AM
data.student.id is changing on javascript, but the server only receive the first one
 
There is no data declared
That's not possible.
 
why?
 
@StormSpirit Then the problem is on the server side
 
it should be same what the javascript sent. so 422 on js, then 422 on server
 
No I think he does not debug at the right spot.
 
7:51 AM
Yes
 
In the dev tool, what is the parameter value ?
 
no it's not. My code on server is only `return json_encode($input['get']['student_id']);
 
Go in your dev tool "Network", look at the Ajax request and tell me what the value of student_id is.
 
its the same on the first one
i don't know how to re initialize the selectize
 
student_id: data.student.id Where is the value of data set ?
Is data in the global scope ?
 
7:55 AM
it's from ajax
 
data is set nowhere, how the hell do you want the student id to change ?
 
this $('#relationshipModal input[name=existing_user]').selectize({ was inside the ajax
 
Which ajax ? you gave only part of your code and expect us to magically know what's around?
I'm no Houdini
o/ @GNi33
 
\o
 
@dievardump but you are nostradamus
 
7:59 AM
ok I put all code wait
 
@FreddyJones you could also use engine.io or something lie that sevrer side, and have windows/android make long-polling request if no websocket
But I find it hard that noone developped client-side plugin that work with it, What are android games using if not sockets ?
@StormSpirit create a fiddle
 
8:23 AM
@dievardump violin manufactured.
 
8:37 AM
2
Q: Internet Explorer set cross domain cookies for authorization

AndrewI have two application on next domains: www.bar.com and www.foo.bar.com. Second application makes authorization via first application (using cross domain request) After this I sets cookies to browser, and in the Internet Explorer it doesn't work: $.cookie("SESSION_KEY", loginResult.sessionKey, {...

 
wouldn't question 3 answer to that ?
Hmm maybe a bit old
 
> Q3: If I don’t specify a DOMAIN attribute when a cookie, IE sends it to all nested subdomains anyway?
This part doesn't happen
 
There is something about leading dot in the test that's what I meant
 
I can't see the cookie set on domain / (which I do see in Chrome)
 
0
Q: memory leak in javascript for bigger strings

Durai Amuthan.HI am sending base64 string to the javascript function but its causing memory leak when I call it again and again. My gut feeling is the value which is stored in javascript variable is not getting released properly. function showResource(data){ //everything commented out. } I am calling the fu...

Any help is appreciated !
 
8:52 AM
@BenjaminGruenbaum I am honest, The creation and management cookie is more easy and simple from Application Server than application client (browser)
 
@MirkoCianfarani in this case the cookie is coordinating between two servers on the same domain.
 
9:10 AM
@BenjaminGruenbaum yes, you mean correct, but should be so heavy when the management cookie are in site.
 
9:21 AM
> He's a programmer, with a girlfriend that's why he is ok with it!
heh
 
> I'm not a whore, I just play one on the internet
 
I'm a whore and I don't play on the internet
hey guuuys
2
Q: How send string/image base64 to Sailsjs - Skipper with ajax

FelipeCurrently I am capturing the image of the camera, this Base64 format,and I'm sending through ajax. xhr({ uri: 'http://localhost:1337/file/upload', method: 'post', body:'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAA...' } 0 file(s) uploaded successfully!

When you read the answer => Is is the same thing on the serverside to upload a multipart or a base64 file?
 
10:15 AM
@PomeGranate Not likely.
 
10:41 AM
Searching for "regular expressions" in the context of "express" proves to be harder than expected :P
 
@OliverSalzburg They aren't used much, since the router is pretty good with its params.
And they're slow
 
I'm aware of that
The awareness does not resolve my problem though
 
It does not
 
But it might be a general regexp issue anyway, because the .match call in express does not have the expected result
But given that "express" is a substring of "regular expression", what I was looking for was hard to find :P
 
@OliverSalzburg regex instead of regular expression ? show us a bit of what you're trying to achieve ^^
 
10:51 AM
Just search in :P
 
So, I want to register a route, where I will end up with all segments of the path in req.params. I assumed I could simply use /(?:(\w+)\/?)/g, which seems to work fine when I try it outside of express, but in the application, the resulting regex matches are not as expected
"outside of express" being regex101.com or similar sites
 
Don't you need to add the leading / ?
 
@dievardump I tried that, doesn't work
As in, same result
Must be something obvious I'm missing :P
53
Q: How to capture an arbitrary number of groups in JavaScript Regexp?

disc0dancerI would expect this line of JavaScript: "foo bar baz".match(/^(\s*\w+)+$/) to return something like: ["foo bar baz", "foo", " bar", " baz"] but instead it returns only the last captured match: ["foo bar baz", " baz"] Is there a way to get all the captured matches?

I feel like I've been here before :P
 
11:07 AM
Can't you do something like /:foo* then just split?
 
@BenFortune That's what I'm doing now, yeah
 
Ah right
 
const segments   = request.url.split( "/" );
request.segments = segments.filter( Boolean );
It's interesting that 2 regex sites where I tested this got it wrong
 
regex101 always trips me up on that, because it defaults to pcre
 
@BenFortune Yeah, but it also happens on the JS setting
 
11:12 AM
Oh :(
 
> I write computer software. However, I do have to go into the office every day to get harassed by business analysts, project managers, etc. Then, at about 4:30, I go home and do my actual fucking job.
LOL
 
What I don't understand is why '/foo/bar/'.match(/(?:(\w+)\/?)/g); gives ['foo/', 'bar/']` but only give one argument in express.
 
@dievardump express uses RegExp.prototype.exec
 
^ that
 
11:19 AM
Does awalgarg.tk resolve for anyone here? It seems .tk's DNS servers are down for most of the Asia :|
 
@dievardump You're also using a different expression there
 
yes it does. DNS available and resolvable
 
yes
 
(Europe / Germany)
 
@AwalGarg Fine here
 
11:20 AM
@OliverSalzburg Hmm ? I used the one you pasted
 
Thanks jAndy and Ben. Anyone from Asia can check too? Preferably Indian (@littlepootis)
 
@AwalGarg down
 
@dievardump Indeed. Seems I was getting confused with all the patterns I tried :P
 
@BenFortune Hey can you tell what IP it resolves to so I can ssh? Azure's control panel seems down too :P
 
I can't understand the result of "aweTfdHkE0029G2iuAmcM299666E".match(/[A-Z]/g)
someone explain please
 
11:25 AM
What's puzzling ?
Or are you joking ?
 
the match seems odd
 
@jAndy Matches all upper case letters
 
@AwalGarg 40.86.95.253 apparently
 
A-Z : what's in Unicode (and ASCII) between A and Z
 
all single*
 
11:25 AM
I'm never joking... so much should be clear by now?!
;p
 
!!> "aweTfdHkE0029G2iuAmcM299666E".match(/[A-Z]/ig)
 
@DenysSéguret ["a","w","e","T","f","d","H","k","E","G","i","u","A","m","c","M","E"]
 
@BenFortune Thanks. I might just be the first person having to ask that question for my own website :|
 
you added an "i", that's a cheat
 
@OliverSalzburg How much scope do males have ?
 
11:30 AM
@jAndy dicknuts
 
I found this reddit account.... reddit.com/user/90sSitcomLaugh_Track
He got a gold..
 
Wow. I emailed them and they replied in less than 5 minutes. This is amazing for free DNS and TLDs.
 
@FlyingGambit What?
 
can someone help me with a react problem? I have some trouble to display a Dialog when I want. stackoverflow.com/questions/39225872/…
 
@FlyingGambit 3-6 weeks
 
11:39 AM
@FlyingGambit no scope
 
I guess males are quite unfortunate
 
guys I have a question if someone has time to take a look at this :)
I try to generate a sudoku table
and I already done that but unfortunatley I have made validations only for row
is missing the validations for squares and columns
my function look like that :
or maybe some hints how to iterate through squares 9x9
 
1 message moved to Trash can
 
!!tell RulerNature format
 
11:54 AM
well, now I don't have to continue typing it
 
@RulerNature Format your code - hit Ctrl+K before sending and see the faq
 
Does she not automatically tell people that anymore?
 
function generate(count, values) {
return Array.apply(null, { length: count }).map(function () {
    var r = [],
        array = values.slice();
    while (array.length) {
        r.push(array.splice(Math.floor(Math.random() * array.length), 1)[0]);
    }
    return r;
});
};

var myArray = generate(9, [1, 2, 3, 4, 5, 6, 7, 8, 9]);

var selector = Array.from(document.getElementsByClassName('cell'));

  selector.forEach(function(e, i){

  var y = Math.floor(i/myArray.length);

  var x = i % myArray.length;
 
lol
 
@rlemon FR: !!trash-format <ID> command to trash message + notify OP.
 
11:55 AM
ctrl+k seems is not working
 
@FlorianMargaine pfft! stackoverflow.com/questions/14415881/… this is fine but who buys the croissants is not?
 
oh, TIL
!!> [Number.EPSILON, Math.log2(Number.EPSILON), Number.MIN_VALUE]
 
@towc [2.220446049250313e-16,-52,5e-324]
 
feel like latter should be called SMALLEST_VALUE
and EPSILON should be SMALLEST_SAFE_VALUE
!!mdn Number.EPSILON
 
@towc Something went on fire; status 403
 
12:10 PM
!!mdn number epsilon
 
Is "went on fire" grammatically correct?
 
ar there any nice ways to loop over object keys in ES6+ ?
 
@BenFortune yes, I guess.
Because "go on fire" is.
@tereško Object.keys(obj).forEach
 
@tereško for..of
 
12:19 PM
ES5.1
 
"go on fire" is not in english
 
for (const k of Object.keys(obj)) {}
 
@FlorianMargaine that's still uglier than for in
 
@shriek your mom is uglier
 
12:21 PM
@FlorianMargaine not as yours.
 
daaaaaaamn
 
@littlepootis as I said, not in english
 
@tereško um?
 
it's some crazy regional expression in the north
 
@tereško how is "go on fire" in english then?
burn up?
 
12:24 PM
to burn or to ignite
 
or just burn
 
burn != fire
 
I prefer "to go on fire"
it sounds better to me
 
ignite would be more accurate
 
@rlemon no, you can also get burned with abyssal flames
 
12:26 PM
@Neoares and do you use "to go on wind" ?
 
@tereško no and I don't see the point
 
why don't you guys ask elau
I'm sure they would have more of a definitive answer
 
@Neoares .
 
@elau halp
@littlepootis LUL o/
 
12:27 PM
@Neoares the point is that "go on fire" is a illiterate bastardization
 
@tereško Lo siento, no hablo inglés.
 
Are you srs?
 
I've read it's an irish expression
 
same way as "to do the needful" is an indian expression
 
@tereško that just sounds weird.
 
12:29 PM
@tereško but not in english
 
@littlepootis so does "to go on fire"
 
That is a thing, apparently
 
@towc values smaller than epsilon are perfectly safe
 
then what's the deal with epsilon?
 
@KendallFrey @SterlingArcher startorialist.com
space \o/
 
12:33 PM
@towc It's a measure of how significant the least significant bit is in the number 1.
 
@towc It's used in math and sciences to refer to quantities in equations that are too small.
 
I want both of these tshirts
 
@rlemon Can't handle the aurora one. Do they not know how reflections work?
 
@littlepootis alright, but still doesn't make much sense in this context if that's the reason? Unless it's a heuristic threshold for number comparison of some sort
 
12:35 PM
is also pretty good.
lol @ flag
does "fart" offend someone?
hahaha
 
who flagged that
 
@towc probably
 
@towc You could in theory use it for an actual epsilon, but I don't think it's really meant for that
It just means "a really small number"
 
I understood that the scope of this chat is to help eachother ... not to tell stupid jokes ;)
 
you're doing a wonderful job. keep it up
 
12:38 PM
@towc apparently, it has something to do with the devil stackoverflow.com/questions/4317988/…
 
and you'e spamming too much ;)
 
posting two tshirts is spamming?
thanks for the tips.
 
just the tips
must be a possum
 
@RulerNature I thought this was a place to tell stupid jokes :(
 
another one that wants to tell us how to use this chatroom
 
12:40 PM
@William It should. Unless you've got a robots.txt (or something that blocks Google's spider) that blocks it.
 
@RulerNature Please don't flag for small things like that. It notifies all stack overflow users with 10k rep or higher across all chatrooms. Flagging is for serious stuff
2
 
@ Stephan Muller and for what someone should flag ?
 
not posting pictures of tshirts
 
@RulerNature nothing. There are a few things that deserve a flag and are very rare
 
great
Sorry for my flag then
 
12:46 PM
never flagged anything, and I've come across a lot of stuff in this chat
oh, the drama days
 
Nit
Flag whenever you feel like something is very inappropriate.
 
@RulerNature The scope of this chat is to chat.
We help people because we're nice. Not because we have to.
If you want a guarantee of 0 noise and 100% help, go to the main site.
 
Nit
0 noise on main site, there's a good laugh if I ever had one.
 
it's moderated differently than the chat.
 

« first day (2145 days earlier)      last day (2794 days later) »