« first day (1121 days earlier)      last day (3810 days later) » 

12:03 AM
@thenewseattle 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.
 
12:33 AM
What's the little toolbar that lets you modify JS values for Canvas fun? (cc @rlemon @loktar)
 
dat gui
 
thanks
You'll need to press right or left to make him appear.
 
@SomeKittens Lovin the moon walk
 
Just thinking the same thing
 
All in good time
 
12:39 AM
Not even being sarcastic. It's a good wip, and the moon walk is pretty entertaining.
 
Might be a fun unlock.
 
@Ricardo 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.
 
1:43 AM
moonwalk! @SomeKittens
 
0
Q: why this code is not working // its always showing the Alert : Not working

Bill var programGroupe = 'FRM' ; var stateGroupe = 'EAST' ; if ( programGroupe === "FRM" && stateGroupe=== "EAST" ) { alert('this is working '); } else { alert('this is not working '); } });

 
@Feeds are you fucking kidding.
 
2:03 AM
!!burrito or taco
 
@SomeKittens taco
 
!!are you my real dad?
 
@SomeKittens All signs point to no
 
2:19 AM
!!learn jQuery '$ is not defined'
 
@SomeKittens Command jquery learned
 
!!jQuery
 
@SomeKittens $ is not defined
 
user2985029
how would i go about deleting my account?
 
@axrwkr Ping a moderator
why would you want to do that?
 
user2985029
2:27 AM
@SomeKittens i tried that but no answer
 
Your account appears to be suspended.
 
What encoding have the Emails on data.stackexchange.com?
 
Why don't you look that up in your email client?
 
 
1 hour later…
3:39 AM
hey copy. how can I play your game
 
Space and arrow keys
Avoid the cherries
 
..
damn
How do I avoid the cherries?
 
You jump over them
 
l33t skillz
 
3:43 AM
not as weird as avoiding them by running into them
 
the very first stone has no arrow, when I jump on it, the arrow pops up
 
IT'S A TRAP
 
Hint: Double jump by pressing space twice
 
hm
every stone has a trap?
 
3:49 AM
I don't like easy games
 
Every rose has a thorn.
 
nice
this game is too easy. make it harder
 
Did you get past the cherry yet?
 
Idk where to go after I get past the cherry
 
too easy
I don't like easy games either
 
3:52 AM
On the platform, obviously
 
How is that obvious?
 
It's a platform
 
It may have been obvious, if it were obviously reachable
 
too easy. make it harder
 
You must know that you can double-jump if you got thus far
 
3:57 AM
Lol... Obviously....
 
obv
You made it with pure javascript?
 
Absolutely
 
Atwood's Law
 
It's open-source, github.com/copy/iwbtc
 
 
1 hour later…
5:07 AM
Does anyone here know of a ChatBot lurking in some room from which I can use summon to copy him to another chatroom?
I'd like to install the Zirak Bot in chat.stackexchange.com/rooms/9682/the-pod-bay
 
5:26 AM
!!tell vedantchandra help
 
Does that help?
 
@rishtal 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.
 
Hi - i'm adding new bindings in my function itemClicked() how do I pull this out and make sure that I'm only calling .on() only once in document.ready()? I know there's a better way than always adding new event handlers each time a button is clicked. jsfiddle.net/gcVa6
thanks in advance!
 
I need a little help on WebRTC. I am stuck at a point on RTCPeerConnection. I even don't know what exactly I need to ask. Can someone who knows the topic talk with me for a min
 
5:40 AM
!!welcome aMother
 
@aMother 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.
 
@SomeKittens @CapricaSix do you have an idea about WebRTC..
 
Yes, I have an idea.
 
@SomeKittens I want to know, for example, whether caprica six can be run in Pod Bay through the summon command
Like this:
!!/summon 9682
 
@vedantchandra Registered; need 0 more to execute
 
5:45 AM
can anyone help me?
 
Now someone else type !!/summon 9638
 
I think the issue is that she doesn't have a space.SE account
 
No, she just needs one more user to use the commands
2 users needed to authenticate
 
!!/summon 9682
 
You forgot the /
 
5:47 AM
we've since edited her so it's optional
 
Still try with the /
 
@SomeKittens I am trying to implement SIP Websocket transport and use WebRTC stack for real time communication from browsers. But, I am confused on how to create sessions. I mean how to make a browser to listen for SIP requests or more concurrently websocket requests...
 
@aMother That's nice.
 
can you suggest something how can I make the browser listen...
@SomeKittens ?
 
nope
psychic reading of other's project specs and code is not my specialty
 
5:56 AM
@SomeKittens I have figured a solution but I don't know is it aesthetically right. Can you listen to that and comment...
 
no
@vedantchandra any luck?
 
!!summon 9682
good morning, by the way
 
morning
 
Hello
How's everyone?
 
morning to you too!
 
6:10 AM
@Loper324 Awakening. New Day Has Come. It's a Beautiful Morning.
(can you guess three of my favourite musicians?)
 
@rninty 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.
 
Guess what
No way – script injection on Stack Exchange. I’m going to enjoy this while it lasts.rninty 4 mins ago
 
@JanDvorak I don't have a clue.... I don't really listen to music as much as I think I do. :s
 
[Awakening](http://www.youtube.com/watch?v=QKt5YUXPs1I) - Celtic Woman
[New Day Has Come](http://www.youtube.com/watch?v=NaGLVS5b_ZY) - Celine Dion
[Beautiful Morning](http://www.youtube.com/watch?v=7zc3BVU-Rno) - Ace of Base
 
good morning beautiful programmers
 
6:23 AM
Wudda about the ugly ones?
@rninty Huh a 404, Interesting link there..
I'd like to know why Chrome is now using 30% of my CPU when it has never used this much..
 
@Loper324 there is no ugly programmer
@Loper324 cause its google chrome
its a fucking OS that has background processes and tons of shit :P
do u have extensions ?
 
Quite a few.
 
@AbhishekHingnikar then I'm not a programmer
 
@JanDvorak Jan Dvorak you are fucking beautiful
(if thats you in your picture)
 
I program / code terribly, therefor I am a ugly programmer. By your logic I am not a programmer....
 
6:33 AM
beautiful people everywhere
 
:/
@JanDvorak These songs average 4 minutes each...
 
too short, I know
 
@Loper324 Really?
Try this one (link at the bottom): careers.stackoverflow.com/cv/edit/73242
 
@Loper324 yes you are not
 
@AbhishekHingnikar Have thou seen my code :o
 
6:36 AM
you confessed yourself
you write terrable code :D (how ever terrible is spelled)
 
*terrible
 
@SomeKittens forget the summon command, i manually hosted the bot in that room off my account :)
 
@JanDvorak i am bad with spellings :-( ... sinus headache makes that worse
 
sinus headache makes everything worse
 
@rninty :S Spellcheck must have failed me..
 
6:37 AM
Blah, that’s an edit link. Silly me.
 
@vedantchandra Sounds good. If you need any more help, let me know
 
*grammar nazi mode off for Abhishek (for now)*
 
Derp.
I*
 
@Loper324 err, what?
 
@JanDvorak thanks
 
6:38 AM
You always have a uppercase I when talking about your self even if the middle of a sentence.
 
@Loper324 There is no recent use of lowercase *i as far as I'm aware
ah, I see it now
Since you wasn't correcting yourself, why did you say "derp"?
 
rnity's edit link rather than a link to his virus.
 
oh.
 
I don't see why it gave a 404 rather than a login page.... imgur.com/xRDmzmf
 
You need to be an employer to be able to see potential hires’ profiles, I think.
 
6:42 AM
Well...
 
Dang. That’s probably the only time I’ll ever find something this fun, too.
 
Jan, the third video isn't available in the US.... Lol (found this instead: youtube.com/watch?v=jMP0fji0I-s )
:/ Another image where I forgot about my real name being in the screen shot whilst trying not to have that
 
@Loper324 the third video is the only one I've checked for availability in Europe
 
@JanDvorak The Official one is available in the US (linked above, as an edit), but not Europe? What country?
 
the one you've found is not available in Czech Republic
 
6:47 AM
Huh. I don't think I've heard of that country...
 
}} | ethnic_groups_year = 2011 | religion = | capital = Prague | latd=50 |latm=05 |latNS=N |longd=14 |longm=28 |longEW=E | largest_city = capital | government_type = Parliamentary republic | leader_title1 = President | leader_name1 = Miloš Zeman | leader_title2 = Prime Minister | leader_name2 = Jiří Rusnok | legislature = Parliament | upper_house = Senate | lower_house = Chamber of Deputies | sovereignty_type = Formation | established_event1 = | established_date1 = c. 870 | established_event2 = Kingdom of Bohemia | established_date2 = 1198 | established_event3 = Czechoslovakia | est...
 
Ah now I have..
I just looked up the wiki when you mentioned that..
!!wiki Czechia
 
}} | ethnic_groups_year = 2011 | religion = | capital = Prague | latd=50 |latm=05 |latNS=N |longd=14 |longm=28 |longEW=E | largest_city = capital | government_type = Parliamentary republic | leader_title1 = President | leader_name1 = Miloš Zeman | leader_title2 = Prime Minister | leader_name2 = Jiří Rusnok | legislature = Parliament | upper_house = Senate | lower_house = Chamber of Deputies | sovereignty_type = Formation | established_event1 = | established_date1 = c. 870 | established_event2 = Kingdom of Bohemia | established_date2 = 1198 | established_event3 = Czechoslovakia | est...
 
Is it supposed to be messed up like that?
 
Not sure why the shortened term didn't take off
 
6:50 AM
Czech Republic sounds more official and cooler, but meh.
 
Well, it's Slovakia, not Slovak Republic, next to us
 
I don't think I've heard of Slovakia...
Ah two countries with republic in the name might not seem original? Not sure..
 
}} |ethnic_groups_year = 2011 |capital = Bratislava |latd=48 |latm=09 |latNS=N |longd=17 |longm=07 |longEW=E |largest_city = capital |government_type =Parliamentary republic |leader_title1 =President |leader_name1 = Ivan Gašparovič |leader_title2 =Prime Minister |leader_name2 = Robert Fico |legislature = National Council |area_rank =129th |area_magnitude = 1 E10 |area_km2 = 49,035 |area_sq_mi = 18,932 |percent_water = negligible |population_estimate = 5,410,836 |population_estimate_rank = 115th |population_estimate_year = 2012 |population_census = 5,397,036 |population_census_year = ...
 
Why is the flag not there...
 
holy one box got raped
 
6:53 AM
I'd expect the flag rather than a image of something...
 
It's in the wiki
 
!!wiki USA
 
|languages_type = National language |languages = American English |demonym = American |government_type = Federal presidential constitutional republic |leader_title1 = President |leader_name1 = |leader_title2 = Vice President |leader_name2 = |leader_title3 = |leader_name3 = |leader_title4 = Chief Justice |leader_name4 = John Roberts |legislature = Congress |upper_house = Senate |lower_house = House of Representatives |sovereignty_type = Independence |sovereignty_note = from Great Britain |established_event1 = Declared |established_date1 = July 4, 1776 |established_event2 = Recognized...
 
@Loper324 time to post a feature request, I guess
 
But why is that not the image shown there?
 
6:54 AM
!!wiki methane
 
| Section1 = | Section2 = | Section3 = | Section4 = | Section5 = | Section6 = }} Methane (, or ) is a chemical compound with the chemical formula (one atom of carbon and four atoms of hydrogen). It is the simplest alkane and the main component of natural gas. The relative abundance of methane makes it an attractive fuel. However, because it is a gas at normal conditions, methane is difficult to transport from its source. Atmospheric methane is a potent greenhouse gas (per unit, more so than carbon dioxide). The concentration of methane in Earth's atmosphere in 1998, expressed a...
 
I suppose.
I'm back, internet issue here....
 
this should be the onebox image
 
Yep..
Now you've got me thinking of chemistry Jan..
What was that ring called, it involved electrons in a special bond or something like that....
 
!!wiki benzene
 
7:03 AM
| Section2 = | Section4 = | Section7 = | Section8 = }} Benzene is an organic chemical compound with the molecular formula C6H6. Its molecule is composed of 6 carbon atoms joined in a ring, with 1 hydrogen atom attached to each carbon atom. Because its molecules contain only carbon and hydrogen atoms, benzene is classed as a hydrocarbon. Benzene is a natural constituent of crude oil, and is one of the most elementary petrochemicals. Benzene is an aromatic hydrocarbon and the second [n]-annulene ([6]-annulene), a cyclic hydrocarbon with a continuous pi bond. It is sometimes abbrevia...
 
That was it!
I knew it was something with a B...
Yet I found this
http://en.wikipedia.org/wiki/Three-center_two-electron_bond
The image for Benzene is messed up too...
Bit bigger than I thought it'd be....
But that should have been it or the stick and ball model.
Anyone still here?
 
Anyone wants to help me debug a strange bug in a Knockout project?
 
@BenjaminGruenbaum Look at what the cat dragged in...
 
@BenjaminGruenbaum I don't speak knockout but I can look
 
@JanDvorak don't refresh, open it twice
On the first go, it only shows the first analyst, on the second it shows all of them so open it in two different tabs.
I have no idea why it only shows the first one, to be honest it's not completely my code - the base is my code and then someone modified it to work in another place too.
 
7:16 AM
Merely shows one for me..
Both tabs..
Also is the page supposed to be secure?
 
@Loper324 not really, it's a mockup
 
@BenjaminGruenbaum Still but having ?code=gilad when sharing a link isn't really the best idea...
 
@Loper324 It's a GET param...
It's not meant to be secure.
Also, I'll disable the code later. for example, you can make all the GET requests to the resources it fetches without the code.
 
OH I SEE THEM NOW!!!!
 
7:20 AM
Now if you can help me with the bug that'd be great. Why does it only show one on the first go :S?
 
When using your link I see one, when I have to enter the code I see more..
Maybe something in the GET part..
 
Always?
I think it shows one analysts sometimes and on the first go
 
Only if you enter the code it shows the rest, otherwise it shows 1... I have no clue really...
 
Does it always show one for you then?
(Unless you enter the code?)
 
7:30 AM
Not always, 13 out of 30 times it shows all of them when loading normally, 22 out of 30 when entering the code...
I suppose it's something going on randomly maybe..
Timing issues? Not sure...
@AbhishekHingnikar I only got half of it.
 
Before I nail you , Are you over 18 cutie pie [ thats what the image says ]
 
@BadgerGirl hi sis :D
 
@BadgerGirl ty, Zirak already found it though
 
Okay :(
 
7:41 AM
@AbhishekHingnikar I didn't get the π (pi) part
pi looked a bit weird and it threw me off.
 
-3
Q: A site that gets any webpage entire height? @ different widths?

UnderstoodDoes a site or software exist that can extract the entire height of any website from their URL? Is this a service that is in-demand?

 
Sleep time
Bye
 
What?
That question makes me confused very lot so.
Oh anyways before I got side tracked I was going to ask a quick question, How do replace a line break in a string with something like "<br/>" in javascript?
 
@Loper324 string.replace
 
Yeah I got that far... but what do I put in for the linebreak?
string = string.replace(what,"<br/>");
What do I put in there for what?
 
7:59 AM
have you tried /\n/g?
 
Right new question does replace() only replace the first entry and then stop?
 
HAMMERTIME!
 
And \n worked...
 
@Loper324 that's what the g flag is for
!!afk religion
 
@JanDvorak That didn't make much sense. Use the !!/help command to learn more.
@JanDvorak Why are you leaving me!?
 
8:11 AM
Right that didn't work but I'll be back in a minute too
 
@Loper324 Apricots are people too!
 
!!afk et tu?
 
@JanDvorak what?
 
@BenjaminGruenbaum JanDvorak is afk: religion
 
@BenjaminGruenbaum It's Sunday
 
8:13 AM
@SomeKittens Can you fix my Knockout bug, it's really strange :/
I have a computed observable that's not updating upon the underlying change.
Even if I force refresh, and worst of all it's sometimes
 
ewww
 
!!> function sub(a, b) { return a + (~b); } console.log(sub(2,1));
 
@EnglishMaster "undefined" Logged: 0
 
8:15 AM
Why did you expect this to work?
 
don't know
 
Numbers are represented in two's complement
Two's complement is a mathematical operation on binary numbers, as well as a binary signed number representation based on this operation. Its wide use in computing makes it the most important example of a radix complement. The two's complement of an -bit number is defined as the complement with respect to , in other words the result of subtracting the number from . This is also equivalent to taking the ones' complement and then adding one, since the sum of a number and its ones' complement is all 1 bits. The two's complement of a number behaves like the negative of the original number in m...
@SomeKittens if you find it I give you candy :/
 
If you can't find it, there's not much hope for me
 
@SomeKittens sometimes all you need is a fresh pair of eyes
 
Actually this works
 
8:18 AM
what's teh code?
 
function sub(a,b){return a + (~b + 1);}
 
Sometimes it opens only one analyst, sometimes all of them.
 
I've only got one
 
In both cases vm.analysts() contains the right information
If you open it again in a new tab it'll probably open all of them.
I don't understand why it shows one. If I go to vm.analysts() it fetches all of them, if you refresh it in another window it'll likely show all of them
It's directly bound to vm.analysts which is a computed property.
(I leak vm to the global namespace for debug)
Even stranger
vm.analysts.subscribe(function(){ console.log("CHANGE!",arguments);});
var c  = vm.actualAnalysts();
vm.actualAnalysts([]);
vm.actualAnalysts(c);
This doesn't fire the console.log
 
@segrived 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.
 
8:21 AM
However, when it binds all of them (that it, shows all analysts) the change does fire
 
@BenjaminGruenbaum Yeah, because you're subscribing something other than what you're changing
 
@SomeKittens vm.analysts() is a computed
 
just discovered that
 
this.analysts = ko.computed(function () {
            if (self.isSortOnDate()) {
                return self.actualAnalysts();
            }

            return self.actualAnalysts().slice(0).sort(function (x, y) { return x.rank - y.rank; });
        });
It's really strange, why would it not fire subscribe? It's almost as if I'm redefining this.analysts somewhere, or have two viewmodels but I'm pretty sure I don't (right?), even if I did that doesn't explain having one analyst (as opposed to none), and it only happening sometimes
 
Removing the displayed analyst doesn't change anything
 
8:27 AM
(ko.dataFor($("#TipRanks ul")[0]) === vm) // true
 
throw a console.log in the compute function
 
Hmmm..
Any idea :S?
 
8:47 AM
0
Q: CasperJS Load next page in loop

SquiresSquireI've been working on a script which collates the scores for a list of user from a website. One problem is though, I'm trying to load the next page in the while loop, but the function is not being loaded... this.thenOpen("http://www.url.com?ul=" + currentName + "&sortdir=desc&sort=lastfound", fu...

 
9:07 AM
I'm back.
 
@Loper324 You taste just like raisin.
 
Well thank you @CapricaSix
That bot says the strangest things.
 
9:19 AM
Anyone here still?
 
10:00 AM
@BenjaminGruenbaum note: all the analysts are created even if only one is displayed
only one is added to the vm though
 
Anywho... I have an issue, string.replace("\n","<br/>") only works on the first line break rather than all of them...
 
string.replace(/\n/g, '<br/>')
or string.replace('\n', '<br/', 'g')
@Loper324 ^
prefer the 1st though
the second is non-standard...
 
Can you explain the first, I just thought it needed '\n' as the first thing..
 
you're not giving the global flag (g)
so it only replaces the first occurence
there are 2 ways to give the global flag: going with a regex (/\n/g), or with the regexp constructor
the simpler is using a regex literal (what I gave you)
notice that it's not between quotes, it's between slashes
it means it's a regex literal
a simpler way for you: string.replace(new RegExp('\\n', 'g'), '<br/>');
 
0
Q: This is how I handle keyboard shortcuts for my webapp

user31946This is how I handle keyboard shortcuts for my webapp. Please review the code. document.addEventListener("keydown", function(e) { // shortcuts if (e.ctrlKey) { // Ctrl+ if (/^(82|79|83|66|191)$/.test(e.keyCode)) { e.preventDefault(); } switch (e.keyCode) { case 82: // ...

 
10:17 AM
@FlorianMargaine I was already on that after you first said regex XD
 
@Loper324 a "regex literal" means you don't need to go through a constructor to create an object. Like an object literal is: var o = {}; when you could go with the constructor: var o = new Object();. Same for regex with // instead of new RegExp
 
10:56 AM
@jonahfree 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.
 
11:23 AM
Hi, how do you change all the variable names at once in jsbin? I can see it highlights them all but is there a keyboard short cut so when you rename it once it renames all the other instances?
 
Not sure how to in jsbin but in most text editors (including notepad) you can press CTRL+H and replace it like that, else I know notepad++ has that feature and syntax highlighting for many languages.
 
Thanks, unfortunately that opens my history. Any other ideas?
 
Copy the code into notepad then backinto JSbin.
Ctrl+A then Ctrl+C, then Ctrl+V, then Ctrl+H (into notepad.exe)
 
:0
sure
 
Learn hotkeys, they are amazing XD
 
11:29 AM
exactly what i'm trying to do but for jsbin :)
 
I don't think they have anything like that, but you can code something I'm sure of it.
 
i have just found their keyboard shortcuts section and i think you are right, it's not an option .. yet :)
it just kind of looks like it would be the way it shows you the other instances
 
11:46 AM
You've got me coding a new script now @jonahfree
 
Cool, good luck. Send me a link when you are done.
I have been working on codetoki's find the largest palindrone problem (codetoki.com/problem/javascript/find-the-largest-palindrome). Can you take a look at my answer and suggest improvements/criticise jsbin.com/ePIlOXU/1/edit?js,console . I'm trying to improve my js.
 
@jonahfree What was a palindrome again?
 
a palindrome which is a string which is the same forward as backward
e.g. racecar
or 12321
 
I see many for loops...
 
12:02 PM
I have 2.. is it possible to cut it down to one?
 
Not exactly sure if this counts as an improvement but you can do for(i in str){code}
It's a bit shorter :S
or not...
 
you mean replace i = 0; i < str.length; i++?
 
I think that doesn't work, yet I've done similar before and it worked, yet with your code, I don't know...
 
yes i tried it and it didnt work
 
In fact, it broke your function..
 
12:06 PM
yes
possible because i am referencing 'i' a fair bit
is i in str shorthand?
 
!!>var str="123";for (i in str){console.log(i);}for (var i=0;i<str.length;i++){console.log("normal for loop i "+i);}
 
@Loper324 "undefined" Logged: "0","1","2","normal for loop i 0","normal for loop i 1","normal for loop i 2"
 
I think so..
But easier..
XD
 
in my example you mean?
 
I'll try again XD
 
12:12 PM
it works in your example
 
Yes but not yours...
How odd....
 
rab
hi guys, I am facing an issue of css link load event , I am injecting link dynamically .. but link.onload event not working
 
cracks knuckles
 
12:20 PM
@rab can you show us the code please
 
12:39 PM
@FlorianMargaine :/
room mode changed to Gallery: anyone may enter, but only approved users can talk
I'm going to try that and we'll see tomorrow if it really affects the number of users that much.
 
12:57 PM
Huh?
 

« first day (1121 days earlier)      last day (3810 days later) »