« first day (1620 days earlier)      last day (3327 days later) » 

12:31 AM
@SterlingArcher get in on this ^^
 
m59
12:59 AM
Every way I do this is wrong. In my Angular controller:
$scope.loadMore = function() {
    Stories.getMany(opts).then(function() {
      //etc
    });
  }
I can't find a clean way of getting those opts
I'm not positive how I want to implement the ui for them being changed, so I'd like to be able to not worry about that for now and do something that will work with whatever
and that seems like right philosophy anyway
function Controller(opts) {
  $scope.on('optsChanged') { $state.reload(); }
  // opts are always good to go
}
?
I guess that's decent.
 
2:01 AM
why is it so fucking hard to stop playing Civ V
 
@KendallFrey Because you're a filthy addict
 
not really
I played today for the first time in months
 
What is a good way to break on some mouse events but not all in firefox? The javascript debugger has the events window however, it wont let me type in onclick.
 
@Asher document.getElementById(...).addEventListener('click', ...);
 
thanks. :)
Remote pages should work I think I can add this to a scratchpad.
 
2:19 AM
Morning, JS!
 
Is there a way to do a getElementById("id*") and get all the * derivatives? I guess thats jquery?
This is debugging a remote page.
 
document.querySelectorAll('[id^="id"]'); will get all elements whose id starts with "id"
 
thanks.
 
doqcument.getElementsByTagName("*");
 
It looks like the event in firefox stops on EVERYTHING?. Its just difficult, I'll have to look into just adding an .addEventListener(). Do most people just add this to a scratchpad and then run it? That must be all post processing on remote pages in the scratchpad?
 
2:30 AM
@phenomnomnominal Or just use a class selector?
I know, I know. Perfect world and all that...
 
@monners you gotta work with what you're given :P
 
I've spent the better part of today vetoing designs
 
I've spent the better part of the last 2 hours watching cricket :P
 
2:44 AM
@pranav
yeah, your right, I think everything is regular expressions... I'll have to test some things out a bit more... Thanks everyone.
bonus! scratchpad has a pretty print built into it. :)
Okay, here is the solution... add it to scratchpad find the CORRECT id and then try this on a remote page.
element = document.getElementById('pagelet_welcome_box').addEventListener('click', function () {
alert('alert');
});
I'll have to try some * ideas. thanks.
 
3:07 AM
Where do app developers like Instagram, WhatsApp and Snapchat host their api that the mobile app uses?
 
I didn't mean their api documentation.
 
yes, but look at the endpoint
that's an actual api url, so they host their api at api.instagram.com, which is pretty normal
 
I only have one domain at the moment, which is my name .net and I don't exactly want to expose that as some API host.
oh well
 
yourdomain.com/api/v1/endpoint is also reasonable
 
3:13 AM
You can also run a script every hour to move files into correct paths if needed.
However for debugging sake you may want to also create a script that scans all text before moving it.
 
What language is generally preferred? Ruby on Rails web-based API?
 
3:27 AM
What do you need help with?
Ruby is a fun language however, I think its missing a } or something.
 
Sorry, my question was which language should I use to develop the API.
 
thats a big questions buddy. Can you be a bit more specific? :)
 
@DemCodeLines Whichever one you want to know better
 
These days I'm looking for visualization + string parsing (tree search) however... node.js does c++ and javascript which is nice. system calls are nice from just about any language.
Pictures are helpful.
Some problems are not possible to solve neurologically unless you draw a picture.
However, I think your looking for more of a server side solution?
JavaScript has some ways of making images.
I haven't worked much with Ruby. However, it was fun.
Post some more details and someone maybe can help. However, some problems are not solvable in some languages.
However, I'm not sure about that.
What are you trying to do?
 
4:30 AM
@SomeKittens Well, it would be only server languages. So my choices really are Ruby or PHP. Unless I want to be adventurous and do Grails or Scala.
 
Any body know how to use watchify with browserify?
 
4:44 AM
@DemCodeLines or .NET or Node.js or Java or Go
 
How do you set up a web-api in go or core java? You would need a framework like Grails for it, right?
 
ummm... LOOKOVERTHERE!
dashes away
 
5:04 AM
Hi
 
@Nandu 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.
 
I am trying to upload files server using javascript without file input element. Is it possible?
I have external link of files and i want to upload it to server.
 
5:20 AM
Can we set value to file uploader dynamically using Javascript?
 
6:02 AM
@monners lol
 
6:19 AM
Is anyone doing this ?
@Nandu yes, it's possible.
 
hey, an upvote
...on this stackoverflow.com/a/22290154/1216976 <- gotta be my dumbest answer.
 
user4330208
so many athiest vs thiest debates watched, so much clarity. Youtube can be used for more than music and memes
 
user4330208
Forget coding. I want to become a philosopher-scientist that defines a universal theory of everything, proving higher dimensions not only exist, but exist!
 
6:37 AM
can i ask some help

I have this example coordinates

23.881115062667024_50.5765625

how would I replace the underscore

to comma to output like this

23.881115062667024,50.5765625
 
user4330208
regex?
 
yes how to do in regex?
 
user4330208
make the coordinates a variable
 
user4330208
coordinates.replace("_", ",");
 
okay thank you
 
user4330208
6:40 AM
I think that would work? Right guys?
 
user4330208
someone back me up
 
user4330208
@somekittens do something, I'm scared.
 
@carb0nshel1 of course higher dimensions exist, that's easy to verify physically
 
user4330208
@jemz let me know if that doesn't work. I'm still kinda new.
 
Also, most theist vs atheist debates are retarded.
 
user4330208
6:41 AM
@BenjaminGruenbaum Not retarded to try and understand reality
 
Oh, the subject isn't retarded - it's the youtube debates that are
 
user4330208
I was diagnosed with retardism, stage 4. I'm offended.
 
Something wierd is going on
 
user4330208
@BenjaminGruenbaum did i give her the right aswer? I'm scared I told her BS cause i usually ask the questions, would that work?
 
Array.push(object) is filling all elements in the array with that object
every last one.
:/
 
6:44 AM
@carb0nshel1 sure.
 
user4330208
@doodla show us example.
 
$(xmlDoc).find('Table1').each(function () {

index++;
obj.country_code= $(this).find('country_code').text();
obj.email = $(this).find('email').text();

countryHeads[index] =obj;
});
 
@doodla naa, you're just pushing the same object over and over and it's pushing references (rather than new objects) so if you change one it changes all.
 
user4330208
wtf is this
 
You need to create a new object
 
user4330208
6:44 AM
jquery?
 
that is the code. Parsing xml. previously it was countryHeads.push(obj)
 
!!tell doodla format
 
@doodla Format your code - hit Ctrl+K before sending and see the faq
 
@doodla you need to create a new object for each item rather than pushing the same object over and over
 
user4330208
!!tell Benjamin I'm single
 
6:45 AM
@carb0nshel1 Command i'm does not exist. (note that /tell works on commands, it's not an echo.)
 
ah. think i get it. Thanks guys
 
@carb0nshel1 wat?
 
@carb0nshel1, yeah it works
 
Guys, is there a open-source front-end editor plugin like jsFiddle which can be embedded in a webpage?
 
        $(xmlDoc).find('Table1').each(function () {
            var obj = {};
            index++;
            obj.country_code= $(this).find('country_code').text();
            obj.email = $(this).find('email').text();

            countryHeads[index] =obj;
        });
 
6:46 AM
@doodla that'd work, yeah.
 
cool. Thanks
 
@RahulDesai codemirror
 
user4330208
Awsome! Can u upvote all my questions and answers now cuz i need o get out of a question ban
 
@doodla although you'd .map
@carb0nshel1 no, but I can downvote them all for you asking.
 
user4330208
just kidding ofcouse :)
 
6:47 AM
@BenjaminGruenbaum does it show a preview as well?
 
I'm very new to JS, just a month or so. Could you elaborate on that? @BenjaminGruenbaum
 
@doodla sure
var countryHeads = $(xmlDoc).find("Table1").get().map(function(el){
    return {
         country_code: $(el).find("country_code").text(),
         email: $(el).find("email").text()
    };
});
No reason to manually create an array and index and all that.
 
user4330208
@RahulDesai jsTwiddle?
 
what does .map do?
nvm I'll google.
Get back if any doubts. Thanks @BenjaminGruenbaum
 
@doodla it maps an array to another array, that $(this) should be $(el)
@doodla fwiw, when people with non Indian English hear the word "doubt" for question, it sounds strange to us.
 
6:50 AM
@carb0nshel1 I googled for that, hardly found anything relevant
 
user4330208
try jsDiddle
 
@RahulDesai code mirror...
 
@BenjaminGruenbaum Ah, ok. I'll try and remember that. Its just that doubt and question is very interchangeable here. Though now that I think about it, question seems better.
 
7:11 AM
@BenjaminGruenbaum I can see a run mode here: codemirror.net/demo/runmode.html But I actually wanted the output as in the tags applied to the content, like they do in jsFiddle.
 
Figure it out.
 
Ok.
 
user4433485
Morning everyone
 
I was checking if anyone knows it already here.
 
Mornin @Katherina
@RahulDesai I do, but I also don't really feel like doing your job.
 
user4433485
7:14 AM
I really need a coffee
 
Nevermind. I think I found it
 
user4433485
good boy
 
@Shmiddty go for what ?
 
Thank you.
Anybody here following the cricket world cup?
 
user4433485
nope sorry;)
 
user4433485
7:19 AM
why?
 
New Zealand is killing it right now.
 
ASR
7:32 AM
@RahulDesai yes
 
0
Q: Load files and then call a call back function

Mr_GreenIn my project, I am loading some js and css files by default in index.html file. But I need to load some other js/css files using javascript later (dynamically) and then after those dynamic files are loaded successfully, I need to call a callback function. I checked jQuery.getScript(), which is ...

 
mr5
Hello
How could I use GreenSock's SplitText to animate a text rendered in a canvas.context.fillText() ?
 
8:01 AM
1
A: Github "Failed to publish this branch" error on windows

TimBoWhen this happen to me, I just recreated the Repository and Republished it: Delete the Repository from your online GitHub Account Make sure GitHub For Windows is closed Go to the folder of your repository in Windows Explorer Delete the following files: .git .getattributes .gitignore ReOpen GitH...

Downvote please ?
 
@darkyen00 You didn't downvote though
 
user4433485
I can't missing 30 rep ;)
 
WARNING: DO NOT DO THIS. This will destroy all your previous versioning of the repository. All your tracked changes and versioning will be lost. You will permanently lose access your old code. — Benjamin Gruenbaum 5 secs ago
 
@BenjaminGruenbaum for some reason i can't
 
user4433485
8:06 AM
??
 
Idk some network error keeps occuring on that tab
finally hard-reload worked
 
8:18 AM
@Jhawins thanks but that's not what I was looking for? I was looking for something like marquee
 
@darkyen00 watching the cricket?
 
@phenomnomnominal no
I find the sport completely economical now.
 
@phenomnomnominal rumor has it nz are killing it
 
@BenjaminGruenbaum not quite, it could still go either way
you can never ever count out South Africa
 
@BenjaminGruenbaum south africa has been one of the strongest teams ever since 1983 and haven't been to a single world cup final yet.
 
user4433485
8:21 AM
many cricket fans arround here?
 
We can therefore count on south africa to keep the tradition and lose again.
 
yeeeeah
@darkyen00 NZ has been to 6 semis and no finals as well :P
 
U sure ?
 
Right. Anything can happen.
Yes, same with South Africa. :)
 
Oh yes.
 
8:27 AM
This is the worst. Can't deal with the pressure.
 
8:44 AM
Yep. All they need is consistency.
If you guys wanna watch it live, online : matchcentre.starsports.com/cricket/…
 
Looking pretty good now
 
Yep :)
 
Apparently they only stream in India :-(
 
What did India do to deserve this kind of treatment?
 
8:59 AM
@JanDvorak I think thats because Star Sports belongs to India. en.wikipedia.org/wiki/STAR_Sports
 
9:09 AM
I wish McCullum had stayed a little longer.
It was so good to see him hitting at strike rate 300+
 
That man, such a hero. But Guptill's innings the other day, amazing.
 
yeah, he was the one man army
It would be awesome to have NZ vs. India in the final, both unbeaten teams.
 
!!nudge 45
 
@SecondRikudo Could not process input. Error: e.canUse is not a function on line 1
 
Would be cool, cause I'm not sure if we can beat Aussie at the MCG!
 
9:16 AM
@Zirak ^
 
@phenomnomnominal I agree. Also, its not that easy for India in the upcoming semi-final against the Aussies. Its in Sydney.
 
@RahulDesai India don't have a good history in Aussie
 
@phenomnomnominal Yeah. Very true. They struggled a lot.
 
This is too damn close. But we have 6 wickets.
 
I think you guys will make it. :)
 
9:20 AM
just need to start swinging
 
yep
dammit Anderson!
 
@phenomnomnominal How good is Luke Ronchi?
 
9:35 AM
I hear that they are seriously considering bringing back X-files
 
@RahulDesai Pretty good.
it's >9 an over now...
 
yep
 
28 to tie sounds good enough
 
need to play like 20-20 now
 
yep
fuck
 
9:40 AM
Elliot should finish the job.
Shouldnt give strike to others, same as McCullum.
 
Although, Vettori is calm as fuck
 
yep
 
Lol SA
 
amazing fielding
 
waiting for the last over thrill
Steyn finally got a wicket. He was trashed as fuck.
 
9:45 AM
I'm about to have a stroke.
 
0
Q: How do you format a moment in local time after changing the timezone?

Oliver SalzburgI have a timestamp, which I'm formatting with momentjs: moment("2015-03-24T09:47:31.042Z").format("LLL Z") "March 24, 2015 10:47 AM +01:00" Due to the nature of our application, we're setting a default timezone for momentjs, which affects all rendered moments: moment.tz.setDefault("America/Lo...

Help please :(
 
user4433485
Uhm,
 
user4433485
I am totally no expert. but I've done something similiar 2 weeks ago
 
Awesome job Elliot! #respect
 
AMAZING
 
9:59 AM
@phenomnomnominal o/
wow 288 over 281 how did that happen ?
6 on a no-ball after score level ?
 
They shouldnt have given the last over to Steyn. Very bad decision.
Having known what his stats were earlier.
 
He was hurting too
 
I feel Tahir, Morkel were better options.
 
Pretty sure both were out of overs?
 
nop
9 each
They choked, as usual.
 
10:02 AM
Yeah, but they only get 9 cause of the reduced overs
 
ah, I see
Do you see people celebrating on the streets now? :)
In India they do.
 
Haha nah, not enough people here. Everyone will be happy tomorrow though!
 
I hope the final is NZ vs. India.
:)
 
Sad south africa.
 
I do too!
Yeah they played brilliantly
 
10:05 AM
@phenomnomnominal how would an NZ vs AUS be ?
 
Close, like this one I guess
 
It'd be a good match, we beat them in the pools, but Aussie at home is always hard
 
right
India is in that position now.
 
user4433485
How was the Cricket?
 
user4433485
who won?
 
user4433485
10:13 AM
oh nvm I see
 
user4433485
:p
 
It was the most intense few hours of my life
 
hello.
How can I augment my method?
 
user4433485
10:28 AM
Depends
 
"augment"?
 
I have clickHandler()
in my BasicButton
and for UIButton I would like this clickHandler() to always play a click sound
 
var compose = function (f1, f2) {
    return function () {
        return f1(f2.apply(this, arguments));
    };
};
 
so UIButton inherits from BasicButton which does have a clickHandler() but clickHandler() from UIButton should always play click sound
 
I would use inheritance. I'm pretty sure people frown on that here :-)
 
10:31 AM
yeah, compose looks fine
 
@phenomnomnominal let compose = (f1, f2) => (...args) => f1(f2(...args));
 
@SecondRikudo yes yes, some of us still live in 2011
 
It's already 2011 there?!
 
I'm still in 2009!
 
10:41 AM
I just wrote an answer on software complexity caused by explicit concern with control flow. I'm essentially restating the words of Ben Moseley and Peter Marks. Let me know what you guys think about it. I would like to know your criticisms.
0
A: Why can Array.prototype.forEach not be chained?

Aadit M ShahWhat you want is known as method cascading via method chaining. Describing them in brief: Method chaining is when a method returns an object that has another method that you immediately invoke. For example, using jQuery: $("#person") .slideDown("slow") .addClass("grouped") .css("ma...

 
South Africa have scored 281 runs as the adjusted target for NZ to achieve has reached to 298 in 43 overs.
Only maths can do that.
only maths.
 
I hate that D/L rule. The target should have been 300+
 
11:14 AM
hey
 
@VilliKatrih 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.
 
need help
function cmp(a, b) { return a - b; }

function solution(A, B) {
var n = A.length;
var m = B.length;
A.sort(cmp);
B.sort(cmp);
var i = 0;
for (var k = 0; k < n; k++) {
if (i < m - 1 && B[i] < A[k])
i += 1;
if (A[k] == B[i])
return A[k];
}
return -1;
}
2 lines of code here are buggy
which ones
 
How do you know there are two?
 
its a task
 
What have you done to solve it?
 
11:15 AM
nothing thats the code they give you
plus saying there are 2 lines i need to correct
 
We are not here to do your homework
 
Do your own homework. You'll learn from it. Which is the idea.
 
i got 3 hours..
 
Make them count!
 
its not homework
 
11:16 AM
It's not our fault
 
bah so can you help ?
 
DIY
 
Is it an exam?that's even worse.
 
or an interview
 
@VilliKatrih Ctrl+K
 
11:17 AM
"Hang on interviewer, let me ask on SO"
 
what
 
"help" doesn't mean we do your homework / exam / interview question for you
 
@FlorianMargaine thats better
 
@FlorianMargaine I'd just say "respect" and let him sit here waiting for nothing
 
11:21 AM
@JanDvorak kicking is more fun
 
true...
I should make a userscript that tells me when someone is kicked
I've found one probable bug and two instances of a stylistical bug (failed indentation notwithstanding). Too bad he never told us what the code was supposed to work.
 
11:44 AM
Hi guys , while working on angularjs I have uploaded file using angularjs but when I removed that div and click submit then also that file gets uploaded .I guess this file is still in controllers scope and I dont know how to unlink it
if anybody worked on AJ
 
What div?
 
Firefox OS is so weird. I installed this system updated that I got in the notification and then the phone hanged. I had to remove the battery and put it back in, it still doesnt boot up.
 
I have div which I can hide and show if click on show button then
if user clicks that button then that div gets showed
and it contains file uploading button
now suppose I upload that image and then hide that div
and click on submit button
then also that image is uploading
 
@VilliKatrih I'll help you
 
......
 
11:48 AM
@VilliKatrih do you still need help?
 
I think he was kicked out.
 
@RahulDesai it's a shame, I would have totes helped @VilliKatrih , I've found the two lines
 
anybody?
 
12:04 PM
even if I pass a function() inside setTimeout is it still evaluated like eval() ?
 
ok, so it acts like a separate anonymous function in global context ?
 
12:29 PM
need help in angularjs here
0
Q: usage of nested controllers in angularjs

StrikerI have a child controller used two times in a page. When a function is called from the HTML within the child controller, that function (in this child controller) is called correctly, but there is a scope variable update in that function. When the scope variable is updated, the corresponding html...

 

« first day (1620 days earlier)      last day (3327 days later) »