« first day (1601 days earlier)      last day (3352 days later) » 

2:00 PM
@Daggett javascript is single-threaded, that for-loop just stole all the available cpu cycles
 
WebWorkers emulate threads
 
@Cereal yes I'm new in JS, what can I do with this problem?
 
have you tried turning it off and on again?
 
@Daggett Not handle large amounts of data client side
 
@Cereal ok, thanks
 
2:22 PM
How do I check if an element exists in an object or not?

var obj = {};

if(condition)
obj.id="something";

if(condition to check if obj.id exists)
statement
 
@FlorianMargaine what?
 
if (mySuperCoolFunTimeObject.hasOwnProperty("whatwhatwhat"))
or just do if (obj.id) because javascript has truthy/falsey things
 
2:32 PM
There is something about star trek, i just cannot stop watching it
 
inline-styles. I should be ashamed ! inline-styles. I should be ashamed ! inline-styles. I should be ashamed ! inline-styles. I should be ashamed ! inline-styles. I should be ashamed ! inline-styles. I should be ashamed ! inline-styles. I should be ashamed !
 
I guess I'm using inline styles too much because it's pretty much the only thing that pops off :P
 
@FlorianMargaine It breaks all the sites I try it on... for example this page... As nothing's working any more it's hard to see what's wrong
 
@dystroy yeah :/
 
2:34 PM
TIL trello is full of inline styles...
 
To be fair, all of my inline styles are because of javascript.
 
whats wrong with inline styles anyways
 
Can anyone explain me what the difference is between eventListener which returns false and inline js retruning false?
http://jsfiddle.net/Jonathan_Ironman/fweL8hj2/3/
 
I love inline-block :P
 
@jAndy That's like asking what's wrong with inline javascript
 
2:36 PM
ahh lol.. yea got it wrong
but css inline styles are still.. no error in my mind
if you're using javascript with somewhat dynamic.. that's pretty much unavoidable
 
// Works
<input type="text" onkeypress="return false" />

// Doesn't stop event
function dontstopmenow(e){
    return false;
}
input2.addEventListener('keypress', dontstopmenow);
Can anyone explain the difference?
 
e.stopPropagation(); should do
returning false from an ordinary (vanilla) js event handler won't do anything
 
thanks for putting Queen into my brain
 
welcome ;)
 
@OliverSalzburg around?

Sandbox

Where you can play with regular chat features (except flagging...
@doodla ^
 
@rlemon Thanks
 
@rlemon At work, but I'm reading
 
@rlemon I just might be in love.
 
2:46 PM
@OliverSalzburg just curious, as I know you are knowledgeable here: is it possible to send commands to a detached screen in linux?
 
happy valentine's day
 
@rlemon I sent you a link to do that 2 days ago.
BUT THANK YOU VERY MUCH.
 
and I'm tryin it and it isn't workin
 
THANK YOU VERY MUCH
 
2:47 PM
:D
 
@rlemon I have no idea sadly. unix.stackexchange.com/questions/13953/…
Mabe that'll help
 
inb4 it's the same link
 
ISN'T THAT THE SAME LINK?
no, it isn't.
 
XD
lol
 
2:48 PM
but it sends the same command.
 
well I detached the window, sent it a few commands. checked screenlog.0 and it didn't record any of it
 
maybe screen writes to log at exit time?
did you try turning it off and on again?
... did you try attaching to it to check?
 
yes
 
using the stuff command right?
it's literally the name of the command... stuff
 
2:51 PM
@FlorianMargaine What does it do?
inb4 "... Stuff"
 
5 mins ago, by rlemon
@OliverSalzburg just curious, as I know you are knowledgeable here: is it possible to send commands to a detached screen in linux?
 
well I can see it logging live with tail -f screenlog.0
brb need to warm my coffee
 
Hmmm, noob question ahoy: Is it possible to use gpg to encrypt a message so that it is decryptable by more than one private whose public I have?
 
@SecondRikudo no
 
(i.e. I have public A and public B in my possession, is it possible to encrypt a message so that both privates A and B can encrypt it?)
 
hopefully, email software (well, at least emacs) allows multiple senders, and encrypts with each key and sends the correct mail to each person
 
@CSᵠ lol
 
:21928133 php user, never know argument order :))
Ginny Weasley
 
@CSᵠ Ginny Weasly is pretty accurate.
 
yeah, but don't agree on php
 
3:03 PM
@CSᵠ Who'd you put on PHP? :P
 
harry poker :)
 
RUST

Neville Longbottom.

Well we all know who really kills off C, don’t we?
lol
I like it
 
@CSᵠ Pfft, I'd put PHP as Ronald Weasley, if any.
JavaScript's older, less talented brother :P
 
because... you know... it stumbles and rolls aaaaand pops out the right spell at the right time
i'd go with Ronald Weasley....
 
PHP is Dobby. abused for a very long time and then made a free elf. now it is getting better but I'll be damned if it isn't still an ugly sonofabitch.
 
3:05 PM
lol.... that works :)
 
@rlemon nice one
 
python as harry...
 
@rlemon ELF
 
@rlemon And still occasionally bangs his head on the furniture.
 
i sometimes think php ain't for beginners because it allows freedom to write anything. Its easy to get lost with freedom and maybe violate SOLID.
 
3:10 PM
Beginners don't care about SOLID
 
@argentum47 you haven't met perl, have you?
 
noep
 
@argentum47 On the contrary, I think that this freedom has the potential to turn you into a better developer
 
At my first job I landed I was stuck with a webapp written in Perl for half a year, that was... interresting
it's like write-only code, you just cant read it later and hope to understand what's going on
 
If you'd started with Umbridge Java and had that as the language of choice, you wouldn't have that discipline, because the language enforces it so rigorously.
That freedom forces your methodology to be more disciplined, as opposed to a compiler the restricts your movements much more than you want.
Alright, battery running low. TTYL, have a good one :)
 
3:15 PM
so if \r is return, what is escape?
I need to send the escape char
 
Yeah that's true. but there should be atleast some form of basic code structure (I am not saying MVC) .. because I mean near the end of the first two years that I did php, I strongly felt that some logic should separate the data handling part from the view part. So I would first write some basic level of abstraction for my web application. like fetching users and comments in seperate classes and call the methods in the show pages
 
ye but how do I send that
\027 doesn't work
 
fromcharcode
@rlemon maybe "\x1b"
'\u001B'
 
morning!
 
3:22 PM
yo
 
I wrote my file upload in javascript, then changed my mind and plugged jQuery... Now seems like query handles xhr part on it's own.
 
It's not as if XHR is difficult; hell, it's pretty simple.
 
this discovery took me hell of a debugging time ... at a point when all my code is commented out, I realised, jQuery is being smart-ass
hope e.preventDefault(); will rescue me.
 
public void setNotHolidayHouse(Boolean value) sigh...
 
jQuery is ass
 
3:31 PM
unbelievable, jQ made form submission on it's own. Html had this button tag element with id="submit" , not type as submit.
I could get angry.
plus maybe part could be played by nowadays browser too.
 
Mhm, shakespeare
 
@NickDugger tolstoy*
he had 30 pages of monolog and 25 of portrait description alone
 
@CSᵠ will try thanks
I'm piping commands to a screen session :)
 
@rlemon ymw
 
fun times
 
3:37 PM
yup
socket?
 
nope, literally a screen session
screen -S myscreen -p 0 -X stuff "command"
cc @OliverSalzburg @FlorianMargaine that worked btw. thanks.
 
is there browser version of counter strike source 3d yet?
 
@rlemon I TOLD YOU MOFO!
 
I DIDN'T BELIEVE YOU BECAUSE YOU ARE FRENCH!
 
... well, can't deny that thinking.
 
3:47 PM
I like bread and cheese, though
Not a big fan of wine, though
though
 
dat though doe
 
Hey, quick question about React. Let's say i have simple component. I want to fire some javascript inside this component when users scrolls the page. Should i implement onscroll event inside that compoenent or outside and call method in that component?
 
@PiotrŁużecki 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.
 
My abdomen was in so much pain last night, that I thought it was food poisoning. Turns out, it was just diarrhea
 
3:58 PM
@rlemon dat doe doe
 
do dat doe
 
dat doe
dat deer
dat female deer
 
dr dre
 
Regex q's are appropriate here right?
 
JS-flavored regex, sure
 
4:04 PM
@PiotrŁużecki inside the component
@PiotrŁużecki your component should be a drop-in in any project and work the same
 
Great
 
Thank you sir
 
Is there a way for me to match nested groups?
This is in the context of a Google spreadsheet, btw. I have a JSON object that has various values in it. I want to extract the values based on it's key/index/wtv. I am trying to write something that will match arrays that may have x number of nested arrays
 
I don't think nested groups are supported... or I never heard of them
 
Oh, no?
 
4:07 PM
posted on March 05, 2015 by admin

New comic! Today's News:  Sorry about the RSS bug. Should be fixed now.

 
possible in pcre
but you're polly going about this wrong
 
Maybe
How else can I do this?
 
user1596138
@Martin You wanna do this on a JSON string?
 
user3949359
I am interested about learning how JS passes an additional argument to a variable that holds a function with the argument already loaded, like this one:
 
user3949359
var o1 = {x:1, y:200}
var o2 = {p:"crap", q:true}
function extendSerialize(obj) {
for(property in obj) {
this[property] = obj[property];
}
return JSON.stringify(this);
}
//now o2 is the bound object
var b = extendSerialize.bind(o2);
b(o1);
"{"p":"crap","q":true,"x":1,"y":200}"
 
user3949359
4:16 PM
I don't know how to format this thing.
 
@Jhawins Yeah
 
RVN
Hope I'm not going against any rules on this... but here goes :) Hi everyone, we are currently re-developing an application. It is comprised of several portions, but case in point lets focus on an API (which pulls data from numerous sources, DB, etc), and a Web App (currently being re-written). The WebApp also communicated via socket for maintaining the active users sessions, etc, as well as some other things are done via the socket system. Socket and API communicate via Redis or via the API itself (socket server consumes some API methods.). The main question: we have large lists which
 
@RVN 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.
 
user1596138
@nosille For future reference use control/command+K to format code
 
user3949359
@Jhawins I had no idea it's the same as when asking questions.
 
4:31 PM
@RVN whatever happens, don't use mongo
Mongo is George W Bush, your data is the oil, your hardware is Iraq, and 10gen is Blackwater
 
RVN
@ssube thanks... I've heard a lot of bad things of mongo, and honestly I'm not really interested in a big change in storage engine... I'd be considering [mongo/anything else] just as a "reactivity" layer between the API polls and changes... since a REST API, esp one based on MySQL or Postgres cant easily do live change subscription/pushing, I was thinking something like that... Is there something which provides the liveupdates/reactivity for queries without being such a mongo-loid? :)
 
I think the DB is mostly unrelated to your solution, reading through again
your server(s) know all of the clients, and the right place to send that notification is at the service level (in a traditional model -> DAO -> service -> API layout)
when the server receives an update from one client, commit it, then notify the other clients (via socket, typically)
that's a pretty common pattern
you just need a layer that, for each client, filters out updates they don't care about or can't see
 
@FlorianMargaine Since you're the only IRC expert I know, and Googling isn't helping: is there a way to block someone from private messaging you?
Oh, nvm
 
IRCCloud has it in the UI
Came across another Indian on a chan, and he keeps pestering me
"How is XYZ in your city?"
I feel like he's trolling
 
4:41 PM
@SomeKittens I'm going to be in SF from Tuesday 3/24 through Sunday 3/29. I'll be at the Grand Hyatt on Stockton Street through Friday at least, and may switch hotels after that (the company is only pay through Friday)
 
"My city doesn't have an XYZ, that isn't a real thing."
 
Hahaha oh shit. unblocks him
 
I'll be in SF never, because I said so, the end.
 
@FlorianMargaine lol so many errors in the chat
 
user3949359
How do I make the VirtualBox hard disk show up together with the rest of the disks on Win 7? I need to be able to browse the files. It's an Ubuntu 14.04
 
4:45 PM
@nosille mount it somewhere
 
user3949359
@FlorianMargaine I've mounted a 20GB disk image, VM is running, disk isn't showing up however. I go to "Virtual Media Manager" and then what should I do?
 
RVN
@ssube yes, that could work, but it would require a lot of specific coding for each model... basically recreating the "live" nature of each model... If there were something DB-based or at least "DBish", I could just sync a table and be done with it...
@ss
@ssube for example: lets say I have 5 different users (each with a permission level 1, 2,3 4 and 5)... if I make a change to some data, and I have some sort of query subscription, each user would simply receive their update, but in your case, I'd need to develop a layer that looks at each change I'm commiting, and each user connected to see if the change is pertinent to him or not... its doable, but will be extremely complex unfortunately...
 
Howdy, just wanted to get views on this. Just in case anyone knows a solution to extract request header from the browser. Bringing it back from the dead. stackoverflow.com/questions/10515862/…
 
@JaredT 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.
 
RVN
From my understanding, (and its been a few months since I digged in), meteor had implemented some sort of data syncing based on ACLs, which seems to be similar to what I am looking for... nonetheless, thats in meteor and with mongo... two things I'm not crazy abt... our app is using other technologies such as angular, primus, etc, it wouldnt make sense to change it all over to meteor, much less add mongo as a main storage...
 
user1596138
When someone's server is so fucking useless you just keep wishing you could reach over and slap them
 
@RVN it's the same layer that decides if that user could GET the data in the first place
 
m59
If you're going to rep whore, why continue doing it at 90k rep? What the heck...
 
@m59 To get to 100k
 
m59
lol
 
4:53 PM
@m59 no fear lol
 
pull your authorization into a reusable module, and have the normal API and the notification code both use it
 
Feels like the "why'd the chicken cross the street" joke
 
its "road" my good sir
 
m59
@j08691 not at all. I have a problem with you. I helped him by answering his question quickly in the comments and marking the duplicate, like you should have done. You have enough rep to have some responsibility. — m59 12 secs ago
 
@SomeGuy because the farmer recently took to bestiality with the horses and the chickens are getting the fuck outta there ASAP
 
4:55 PM
Hahaha
 
is the farmer a he or a she?
 
@m59 sounds bitchy
 
i thought we were talking about the rep whore still
 
m59
did you see what he said? I felt it was warranted.
 
I agree with the sentiment. but sounds bitchy
 
4:57 PM
@m59 besides we even have badges for cases like that. lol
 
@m59 your comment is totally gonna be flagged as non-constructive
not by me
 
well @m59 just took two quick downvotes on recent answers
 
m59
can we flag that guy as non constructive =D
 
some might assume @j08691 is spite voting
 
my highlight on rep whore alarmed me
 
m59
4:59 PM
yep, he downvoted me.
 
!!afk lunch then house hunting
 
what sorta hunting is house hunting
 
houses can hide pretty well, sometimes you have to go hunting for them
 
::D
 
user1596138
Idgaf I'm jumping in too cause I see that asshat doing this all the time too
 
user1596138
5:01 PM
"Not everyone has the knowledge that we do" said by user who posted style = "display:inline-block;width:250px;height:200px;border:2px solid"Jhawins 21 secs ago
 
user1596138
(yes I know the OP posted it, I'm trolling the troll flag it if you want)
 
user1596138
SO is just a waste lol
 
your mum
 
user1596138
> There are only 10 types of people in the world: Those who understand binary, and those who don't.
 
user1596138
He is so clever... Isn't that ~20 years old?
 
5:05 PM
you mean 10100 years old
 
m59
wow, this jerk. @rlemon he did two of yours also?
 
@m59 nope
 
@Jhawins and those who understood that the joke was in ternary. Then there are the people who saw the whole thing: the phrase was written in quaternary
 
user1596138
He downvoted 3 of mine lol
 
user1596138
Someone also seems to be serial upvoting me tho.. I have +3 from like 4 questions
 
5:11 PM
!!afk be on later tonight. if you miss me ping @BenjaminGruenbaum he is also lonely.
 
the truth hurts @rlemon
 
This guy's username
Where's the popcorn? This is entertaining. — dowomenfart 2 mins ago
 
m59
turns out he was the serial downvoter lol. Maybe someone started dv'ing just to troll the circumstance =D
 
user1596138
@m59 hahaha jeez
 
My brain is not working today. I'm trying to generate hex colors using only 37BF. So #333, #337, #33B, #33F, etc. I can't even think of how to begin right now
 
user1596138
5:18 PM
Who was the upvoter?
 
m59
@Jhawins ah no, I was kidding. I dunno who was dv'ing
 
user1596138
@Shmiddty You mean all combinations of 37BF?
 
@Shmiddty nPr of ['3', '7', 'B', 'F'] for 3 or 6 spots
 
I'm looking for an algo that gives me the nth color. function nthColor(n){return it}
 
user1596138
I'm not sure I understand what you're asking. I probably wouldn't be helpful anyway
 
user3949359
5:20 PM
     [[1,1,1], [2,2,2], [3,3,3]].reduce(function(a,b) {
        return a.concat(b)
      })

    Result: [1, 1, 1, 2, 2, 2, 3, 3, 3]
How do the arguments get passed in the callback on this one?
 
@Shmiddty you're working with a quaternary number system, then, and should take n and mod it
 
I'm trying to generate the series: 333, 337, 33B, 33F, 373, 377, 37B, 37F, 3B3 ... FFF
so n%4 * something?
 
@nosille renamed parameters should answer that.. function( resultOfPrevCallback, currentElement ) ...
 
n * something + n%4 * something?
I think that's right, but I haven't the foggiest what something should be
My brain is failing me today
 
5:26 PM
Does anyone know how to fix jsfiddle when it does that? Clearing my cache did nothing
 
Hello, I am History.pushState() but example.com/offline and example.com/offline/ are giving different result.So I want to use .htaccess to redirect people who visit example.com/offline to example.com/offline/
Currently I am using
RewriteCond %{REQUEST_URI} /+[^\.]+$
RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]

But it is affecting all urls of my website. I only want it to affect example.com/offline
 
user1596138
@Shmiddty make the code window bigger lol idk
 
user1596138
It does that to me a lot
 
@BenjaminGruenbaum thanks. ended up with bb :)
 
can anybody help with that? .htaccess looks super complicated and scary
 
5:29 PM
@Shmiddty Ctrl+Shift+Up?
Also @BenjaminGruenbaum the daemon seems kinda memory intensive, but still handy for some cases.
 
user1596138
j08691 some people is missing the point of helping others here, Those should be banned. You people are in the wrong site. You should go to yahoo answers. This is a site to help each others and j08691's answer is correct — Rodrigo Santiaborg 9 mins ago
 
RVN
@ssube thanks for your help, its not really practical for our usecase... permissions arent that simple nor are the changes... changes are sometimes external, etc... The database itself does part of the access control with permission groups, etc, re-implementing all that for each and every model will take many months... I guess I'll have to continue my search... Thanks for the help anyways... unfortunately the data is much more complex as are the acl methods...
 
@ShubhamNishad they are, and evil, don't use them
 
user1596138
^ user has only answered 2 questions with >0 score
 
user3949359
@jAndy Do you have an idea how to make my VirtualBox VM disk appear next to the "real" ones?
 
5:34 PM
@Shmiddty generic version for arbitrary number of digits: jsfiddle.net/zchy5L8r/2
 
user1596138
0
Q: PHP include index.php?page= error with directory path and about safety

Rodrigo SantiaborgWhat I need is to show a main index.php page and include the dynamic page like this: index.php?page=example Found a script code on Google for this but it just says that the page does not exist. Please take a look at the folow code so you understand my question: $path = 'home/user/public_html...

 
user1596138
Those tags
 
RVN
@ssube I'm lingering around doing something the couchdb and their changes api... might be better than mongo and easier than rewriting hundreds of models
any experience on that?
 
@RVN no, unfortunately.
 
@ssube, but there is no other way
History.pushState() not working without a trailing slash at the end of url
 
5:38 PM
@ShubhamNishad sanitize on the client-side before you push?
if you do need rewrites (still not a great choice), put them in your vhost or whatever you use in /etc/httpd/conf.d/*.conf, rather than an .htaccess
keeping that kind of stuff in a file that will be missed by cp/mv unless explicitly included is usually not the best choice
 
@AwalGarg I'm very satisfied with them
 
@Jhawins Making a gif.
 
user1596138
@Shmiddty Are you trying to make a gradient?
 
user1596138
With those chars
 
@BenjaminGruenbaum ;) Have you used Gitlab too? Looks kinda similar to Github...
 
m59
5:43 PM
@Jhawins Sometimes, all you can do is youtube.com/watch?v=WbN0nX61rIs
 
user1596138
@m59 Except no :P
 
m59
 
@AwalGarg Gitlab is sweet. We just got approval to buy seats for all our devs and switch our repos to it.
 
user1596138
@m59 lol getting worse
 
Gonna be moving everything over to it in the next week or so. It's like Github Enterprise, but reasonably priced and a little bit smoother.
 
m59
5:44 PM
Indeed, but Florence is awesome, so hush it =D
 
user1596138
var popupid = <?php if ($contact->find_popup()) { echo $contact->popup()->id; } ?>;
if(popupid) {
	bootbox.dialog({
		message: "<?php if ($contact->find_popup()) {
            echo $contact->popup()->message;
            };
	?>",
 
user1596138
Oh boy...
 
@ssube oh. And the CE version? Isn't it open-source?
 
anything wrong with using the id directly (as it's declared as a global) as opposed to document.getElementById('somediv') ?
 
@AwalGarg haven't used CE, but I know it's similar, except no LDAP groups (required for us).
It is open source, and if you have a license for pro, you can get the source for that as well.
 
5:45 PM
ah, sweet
 
1 message moved from HTML / CSS / WebDesign
 
There are occasional oddities with the UI, usually around AJAX and the back button, but in general it's pretty good and seems to scale well.
 
-_-
 
Our Ops team is using it already, for their Puppet scripts and stuff, and dev will be on it within a few weeks.
We have a few hundred GB of repos, so I should have a good idea of scale/hardware after that.
 
gif from Shmiddty was moved
 
5:47 PM
jsfiddle is just broken
 
user1596138
@Shmiddty what's your chrome version?
 
40
 
user1596138
Doesn't happen to me but 41 is out
 
@ssube oh that's nice. I am somewhere at 500 mbs :P
 
It's been this way for a while
 
user1596138
5:49 PM
Weird man. I'm on OSX too but usually when that happens I just reload
 
@AwalGarg QA and content don't understand the concept of "binaries don't go in git" or "compressed excel files are binaries"
so we have a million images and zipped CSVs in there
 
jsfiddle.net/ujx3xwr9 <anything wong wit that?
 
@ssube ahahahaha
 
we made them clean it up some when git was no longer able to clone their repos
 
user1596138
@CSᵠ Why would you change innerHTML with text
 
user1596138
5:50 PM
You want textContent.
 
user1596138
For securitaw reasons
 
Cache clear worked
 
@CSᵠ yes. You are not in strict mode. That is wrong.
 
Lost all my user colors though >.<
 
there's no security in JS
 
5:51 PM
Ok they're still in the console
boom
 
@CSᵠ Yes. Now you don't wanna use innerHTML but I don't know your use case. But you don't wanna use automatic globals created by UA from ids, but maybe you are doing that just for demo.
 
Does anyone have experience with node-inspector? I run a script with node-debug test.js and get nothing but a blanko screen.
 
i'm asking if there's anything wrong with the second way (using the global)
 
ha, nice
i had also poor sources, tx @AwalGarg
 
Also, another reason is that say you change the id of an element in the markup.
Now you have to change your javascript variables everywhere.
 
But if you use getElementById, and cache it in a variable, then not.
 
and that
 

« first day (1601 days earlier)      last day (3352 days later) »