« first day (1426 days earlier)      last day (3525 days later) » 

8:00 AM
function (number) {
    return 2 * undefined;
}
 
i can deal with him
 
clearly? nope
you just look like a bunch of kids fighting over who's dad is the best
 
@AbhishekHingnikar no one has to deal with anybody, let's have a sensible chat
My dad is the best, he worked as a plain builder, french teacher, social worker, electrical engineer, prison officer and interior designer!
 
!!summon 13436
 
Zirak who's 13436
 
8:02 AM
@FlorianMargaine he flamed me he might aswell wake me

Smart Developers' Lab

Try to stick to English, Post your Query elaborate as best as ...
 
I want to pass ''/^[A-Za-z0-9\-\,\d\s]+$/',' as a function parameter,
But problem is I get '/^[A-Za-z0-9-,ds]+$/' instead of '/^[A-Za-z0-9\-\,\d\s]+$/',
 
Error 404 occured, I will call the maid (@Zirak)
 
how can I solve this
 
Error 404 occured, I will call the maid (@Zirak)
 
@SabbirHossain Tried double \?
 
8:04 AM
Morning
 
ok, thanks
 
@SabbirHossain escape all special characters in a string with it
 
@SabbirHossain why the escaping to begin with? Why aren't you passing a regex literal?
JS has those.
!!> /a/.test("a")
 
@BenjaminGruenbaum true
 
@BenjaminGruenbaum, I am new, thanks for your advice, I am trying
 
8:06 AM
!!tell Sabbir mdn regex
 
@BenjaminGruenbaum yeah, it's the first time I see a regex passed as an arg, I was wondering what's strange
 
There's nothing inherently bad in passing a regex around as an argument.
 
8:20 AM
38 messages moved to Trash can
 
cleans the room automagically kicking shit out of the room
 
@FlorianMargaine what is up with you mate ?
 
no OT at all in here anymore?
 
Who what where?
Aha okay, that's a first :P
 
8:22 AM
@FlorianMargaine, why codepen to trash :D
 
probably had a bad start for the day
 
So guys, does anyone know what the downsides of NodeJS are and how could they be remedied?
 
how would you structure the js in such a project? It's a simple site with not much js, that's pretty much all of it. But the structure looks... dunno, bad.
@Srle in the middle
 
@Magikaas yep, that's a weird side-effect of getting one of your messages moved to trash
 
@ziGi it's jabbascript
 
8:23 AM
@GNi33 Aha okay, that's a first :P
 
so you are saying it's fat
 
@ziGi less than perfect hosting support. Fix: pick one that does.
 
@JanDvorak I couldn't understand, sorry
 
@FlorianMargaine it's 90 LoC?
 
8:25 AM
@BenjaminGruenbaum yeah
might grow a little bit, like adding another couple handlers, but that should be it
 
Don't worry about it, 90 LoC are easy to reason about usually anyway.
 
thanks, I feel better about it :p
 
looks good to me
 
ahaha
How do you spot a Node.js user? Don’t worry, they’ll let you know. ;)
 
I just don't know how to handle this kind of thing...
 
8:26 AM
I'd move the var $$ to the top, where var $ sits to have those in one place though
 
@BenjaminGruenbaum let's say it grows though, in the same kind of site (i.e. a document-based website... eventually a couple forms, but that's it), how do you handle it?
 
You want structuring tips or code review?
I'd change stuff like onchange to addEventListener but that's really not too important :P
 
meh, I want max browsers support without bothering much
@BenjaminGruenbaum structure tips
 
If I press and hold a key like 'a' on a macbook, I get a pop menu to press some accents. Does anybody know if there is some javascript html variant of such a thing ?
 
8:28 AM
Oh, you need IE8 support?
 
@Kasper there is
 
I mean stuff like:
 for (var i = 0; i < inputs.length; i++) {
            (function(i) {
                inputs[i].onchange = function() {
                    submitTypes();
                };
            }(i));
        }
 
@BenjaminGruenbaum yup
 
I'm sure I saw it a while ago, can't remember the name though
 
Can be inputs.forEach(function(x){ x.addEventListener("change",submitTypes); })
 
8:28 AM
yeah I know dw :P
but check the code, there's nothing that doesn't work on IE8 :)
 
@GNi33 oh, would be really cool, I've been trying to search for it, but I couldn't find, any ideas for some search terms ?
 
maybe window.location.origin? not sure.
 
forEach is a 5 line shim and it'd save you those ugly closures :P You could still do something like:
 
@FlorianMargaine why do you do unnecessary closures like these
(function(i) {
                inputs[i].onchange = function() {
                    submitTypes();
                };
            }(i));
 
inputs.forEach(function(x){ x.onchange = submitTypes; })`
 
8:29 AM
what is the purpose
 
@ziGi the best ad ever.
 
@ziGi I assume submitTypes used to refer to the input, or something.
 
yeah but I am talking about the outer closure, not the inner one
 
oh maybe you meant this one: toki-woki.net/lab/long-press
 
Yeah, like I said - I assume there was something else there.
 
8:31 AM
I see, but he left it uncleaned
 
@Kasper could be, yeah
should be customizable enough?
 
yeah, seems like, going to try!
 
@BenjaminGruenbaum indeed, there was
 
@FlorianMargaine so why didn't you clean it afterwards
 
I've been thinking a long time, what is the best way to make sure unicode typing can be at the same time fast to do, and fast to learn (intuitive), I think something like this is the best solution
for example, typing things like ∀β∈ℝ ∃n∈ℕ : β>n kind of mathematics
 
8:37 AM
@Kasper set of virtual keyboards?
 
@ziGi didn't think about it
 
mapped to physical keys for power users
 
@JanDvorak what do you mean with virtual keyboard ?
 
Well, I'd modernize your code, other than that it looks ok.
@Kasper ever used lyx?
 
IOW, set of separate keyboard layouts for each script, plus a virtual keyboard to show the keys
 
8:39 AM
Russia is suing Ukraine for 1 billion dollars -> img-9gag-lol.9cache.com/photo/a7KZDKr_460s.jpg
 
@BenjaminGruenbaum yes, but I'm thinking about something for the web, a community platform for math students at a university
 
Yes yes we all read reddit
 
@Kasper virtual keyboard = keyboard displayed on a generic screen, operated by mouse clicks or equivalent.
 
@Kasper look at how SE's math sites do it, it's basically mathbb. Most math students here use lyx
 
or rather MathTeX
 
8:42 AM
@JanDvorak like this ? math.typeit.org
 
If a 99 pound girl eats 1 pound of nachos, she's gonna be 1% nacho
 
@BenjaminGruenbaum yeah, I know latex,lyx, mathjax etc. but in my view latex is build for publishing math articles books, not fast communication like, chat etc.
 
@Kasper Go ahead and come up with a better way then :)
 
if I want to type this "math" symbol for example, 𝔅. I study three years of mathematics, and writing latex very often, but I still need to look up how to type it, and figure out it is $\mathscr{B}$, what I envision is just long pressing B, and being able to select 𝔅, and having unicode symbol as well in the code as in the html output
so I think something like this is ideal: https://github.com/quentint/long-press
If I want symbols similar to =, I just long press = and get symbols like ≠ for example
 
I don't know, I'm pretty used to lyx after a few years of mathematics but anything that could be simpler is a win. I type really fast so \neq is faster for me than a long press - I can see how this would be a win for new students though.
 
8:49 AM
@Kasper I like your code @Kasper, only one thing I don't like is that when you hold the letter you have to use the arrows, it would have been much better to make it when you hold the button to show the menu and then when you release and press the button again to go to the next one, if you pres a different symbol or Esc to remove the menu for choosing
 
@ziGi I absolutely agree, it is not my code btw, but that was something I would like to chance, also I like the idea of numbering them, and being able to press the numberm, like in OSX
 
youtube.com/… I am waiting when apple starts one such campaign
 
yes, also
 
@BenjaminGruenbaum about the ngresource & marker discussion yesterday, is there a way to attach properties or methods to a $resource without them being submitted when requesting? or do you have to manually remove it in transformrequests?
 
@AbhishekHingnikar yeah, yeah, bullshit, this guy has trained for this, I can also do this shit within a few seconds because I have searched for it before
 
8:53 AM
Wow, has it been 999 hours already? I need a drink
 
Time flies away
 
@Busata I have a trick for you - but it's kind of dirty....
@Busata JSON serialization does this thing where it only serializes enumerable properties. If you assign properties through Object.defineProperty and tell them to not be enumerable - it won't send them anywhere since it won't serialize them.
 
hit me! (in a non dirty way)
 
@BenjaminGruenbaum I'll file that under - Things I've heard on street corners in New York
 
hahaha AT&T collaborate with Microsoft, lol
 
8:56 AM
morning all
 
!!> var x = {a:3}; Object.defineProperty(x, "b", { value : 2, enumerable:false }); JSON.stringify(x);
 
@BenjaminGruenbaum "{\"a\":3}"
 
@Busata no "b"
!!> var x = {a:3}; Object.defineProperty(x, "b", { value : 2, enumerable:false }); x.b
 
@BenjaminGruenbaum 2
 
But it's there.
 
8:56 AM
guess you can add a utility function to $resource to do that for you
that's a nice trick, thanks!
 
@AbhishekHingnikar additionally they would never show something like me in those clips because I will own them immediately, but they show some people that have never touched their phone and just used it for calls and Facebook, yeah Windows phone is better, of course they have cut off the people that were able to do it faster
 
@Busata Sure, you don't need $resource to be aware of it at all though.
@ziGi WP is actually a decent platform, the only thing I strongly dislike about it is their browser. Although that probably got better in the last year.
 
1 message moved to Orphan GIFs
 
Surprised that room didn't already exist
 
9:02 AM
There's a /gif/ room IIRC.
 
mind == blown
 
@BenjaminGruenbaum didn't pop up when I searched for gif
 
maybe it's dead
 
@BenjaminGruenbaum what's the problem with Object.defineProperty?
 
Why problem?
 
9:06 AM
well why does it define it in the object but it's not visible from JSON.stringify?
 
because stringify probably does a for each in on the object
and you set enumerable on false (wild guess!)
 
yes, that's the thing
I just tested
 
5
Q: Why does JSON.stringify not serialize non-enumerable properties?

Benjamin GruenbaumI'm serializing objects to JSON strings with JavaScript, I noticed only enumerable object properties get serialized: var a = Object.create(null,{ x: { writable:true, configurable:true, value: "hello",enumerable:false }, y: { writable:true, configurable:true, value: "hello",enumerable:true ...

 
how are properties enumerated?
 
morning guys :)
 
9:10 AM
!! google why global variables are evil in javascript
 
@BenjaminGruenbaum what did you mean with "$resource doesn't need to be aware of it"? Couldn't you add a function to the prototype of resource that hides the implementation of the setProperty etc?
 
@Busata oh, you want it on the prototype, in that case it'd be a utility there - yes. I thought you wanted it on a specific object.
 
naw, just want some way to seperate the actual data from stuff like google maps markers without messing with dictionaries linking the two etc
 
0
Q: Meta Footer Layout Misplacement

zigiI was browsing the meta footer and I saw a strange white space underneath the footer. Should it be there, and if yes, why?

 
9:18 AM
#footer.categories #svnrev has margin-bottom: 10px
and it's the last element in the footer, so...
no idea if that's intentional or not
 
yeah, might be, but I see no reason
 
doesn't look like it's intentional though
 
@ziGi They put that there as a test for analretentiveness
 
no margin on the wrapping elements, just a child elem, usually a good indicator for a "bug"
 
I get a warm, fuzzy feeling every time I get to show a senior member of the dev team some feature on their mac that they didn't even know they've always wanted. Been getting that a lot recently...
 
9:25 AM
@monners yeah, I do test for alternativeness here sometimes, but you don't seem to enjoy it
 
@ziGi Was that a joke, or do you think I misspelt that?
 
ah, don't need to even define a utility function, can just assign a property to it & assign stuff to that
 
@Busata Don't try that in Texas, people get very defensive when it comes to their properties over there.
 
ahaha Ninja Turtles -> i.imgur.com/iGmvBtp.jpg
 
Not very likely I'll ever walk around there
It's never really advertised as the state to be if you visit the US
 
9:28 AM
@Busata But you'll miss out on all of the... Ummm.... Don't tell me....
Football?
 
For the money you can buy the iPhone 6, you can buy a Playstation and a Samsung Galaxy S4
 
Or a week with your mom </joke>
 
Though I read houses are cheap in Detroit!
 
@Busata that's what I meant
 
@monners haven't you heard of the new sport? Competetive garbage collection :D
 
9:30 AM
Ummm, no?
 
@BenjaminGruenbaum I'm slowish :-)
 
How can people be so brutal, serously
How can they make an add like this -> i.imgur.com/HcRMShz.jpg
 
pretty sure that's a fake
 
It's obviously a joke
 
@ziGi It has a bloody 9gag watermark on it T_T
 
9:41 AM
haha, it's from The Onion
 
yes, true
you got me there
 
I'm very happy to hear that Neil Patrick Harris got married! He's a wonderful gay.
 
Don't they mean guy?
 
lololol
 
9:48 AM
lol
 
@AwalGarg put xkcd url, it's oneboxed
 
@FlorianMargaine how does that matter?
 
the onebox adds the title on the image
and the image is usually bigger, too.
 
done
:)
 
see? that's better :P
 
9:50 AM
right, thanks :)
 
!!urban white horse
 
@monners That didn't make much sense. Use the !!/help command to learn more.
@monners white horse Heroin. As contrasted with [white pony], slang for cocaine, in the 1983 pop hit "White Horse" by music group "Laid Back".
 
Huh, I always thought it meant cocaine. Well that puts a different spin on that music video
 
@FlorianMargaine tu es un bon samaritain
 
@monners I only recently learned what 'Molly' is / was. I feel old.
 
9:57 AM
!!urban Moley
 
@monners moley violent evil little mole, turns crazy when theres a full moon.
 
!!urban Dark horse
 
@GNi33 dark horse Not the main favored candidate. Someone somewhat unkown who exceeds expectations of all others in an event. This saying is said to go back to the Victorian politician Benjamin Disraeli who, apart from finding time to regularly become Prime Minister, also found time to write a novel called "The Young Duke". In the book there is a description of a horse race in which the two favourites cannot make(snip)
 
I still haven't learned to spell it correctly.
 
10:04 AM
oh man how do people find such things?!?!
 
let there be aliens
!!aliens
 
!!dolphintruth
 
in EcmaScript, 52 mins ago, by monners
Don't tell anyone, but I secretly hate the ocean. Especially dolphins.
 
Florian Mode Activated.
 
Hmmm. @AbhishekHingnikar look's like you killed her
 
10:07 AM
hey guys any of you ever built a file synchronization thing ?
 
!!define Florian Mode
 
@towc No definition found.
 
galileo board? Another arduino/raspPI/beaglebone thing?
 
10:22 AM
what does this actually do?
            inputVal = inputVal.replace(/[^\d.\',']/g, '');
 
@SuperUberDuper Strips out numbers I think
And commas
 
ok and this:
\','
 
@SuperUberDuper that's to replace commas
 
how? why not just
inputVal = inputVal.replace(/[^\d.,]/g, '');
 
!!>';klahjsdf8,390,lasjf9lk,l'.replace(/[^\d.,]/g, '');
 
10:26 AM
@monners "8,390,9,"
 
There ya go
Strips out numbers and commas
 
Does anyone use JSHint?
 
Yep
 
with VIM?
 
10:27 AM
At least one person somewhere does
 
Why can't I install it?! I have installed syntastic in vim. but it does not work!
 
@user3002233 If you're not sticking to vanilla Vim then what's the point?
 
why am I feeling so sleepy today?
 
I use vim. I have installed syntastic and jshint(with "sudo npm install -g jshint"). but still, it does not work. can anyone help me?
 
@user3002233 what doesn't work
 
10:34 AM
@CustomizedName Jshint in vim.
 
using `ModalService.showModal({
templateUrl: 'abc.html',
controller: 'abcController'
});`
to show modal in angularJs
Any idea how can I pass arguments to the controller ?
 
@user2962766 scope
controller should use scope parameters
 
But I am already in some controller
calling this function to show modal
 
your controller shouldn't know about the existence of another controller
It should rely on scope variables in order to "communicate"
So despite being inside another controller, it should only be looking at the scope common to the outer controller
 
!!nudge 60
 
10:43 AM
@towc Nudge #1 registered.
 
@Neil Best way to share data between controllers is services stackoverflow.com/questions/18525121/…
so if i use service to send data,
I will be using a service to send parameter, then in that, another service to open modal
would that be right /
 
If something should happen when the data changes, then yes, use a service. If you want to open a dialog box commanded by a controller, then yes, I suppose that's what you should do
 
@AbhishekHingnikar No, but it doesn't sound too difficult.
lol didn't see I needed to scroll down
 
@SecondRikudo its not very tought to make one, i did one with git
xD it also works distributedly
 
@AbhishekHingnikar Yeah, that's also what I had in mind
 
10:50 AM
but gits overhead is no goood for images
 
Use git remotes to synchronize :P
 
2x size + delta
not good on mobile devices
the second option now is to use sqlite
 
11:05 AM
@SecondRikudo need one help.
 
@SilentKiller But only one help?
@SilentKiller ask it here.
 
trying to build a BOT but facing error
TypeError: string is not a function
    at Object.minifiers.minify (E:\SK\SO-ChatBot\build.js:219:4)
    at runMinifier (E:\SK\SO-ChatBot\build.js:244:12)
    at success (E:\SK\SO-ChatBot\build.js:234:5)
    at Object.minifiers.test (E:\SK\SO-ChatBot\build.js:215:4)
    at continuation (E:\SK\SO-ChatBot\build.js:231:12)
    at fail (E:\SK\SO-ChatBot\build.js:238:5)
    at Object.minifiers.test (E:\SK\SO-ChatBot\build.js:195:5)
    at continuation (E:\SK\SO-ChatBot\build.js:231:12)
    at fail (E:\SK\SO-ChatBot\build.js:238:5)
 
I'm a monster :D
 
@SecondRikudo executing command node build.js
 
remember the celltoggler minigame I made a while ago?
now you don't toggle cell, but you loop them through different colors
 
11:08 AM
@SilentKiller Code?
 
like, we have white, black, green and yellow, when you click on a white that cell becomes black, if anything around is black it becomes green, then yellow, and then back to white
 
@SecondRikudo following this. github.com/Zirak/SO-ChatBot
here is Build.js error at line 219 cb();
 
@AbhishekHingnikar Thought you might enjoy that song
 
oh i tried to compile it with context to 2x
 
11:11 AM
anybody with experience installing nginx on ubuntu? (Not on windows)
 
@SilentKiller From what I follow on the execution stack, looks to me that you haven't configured you minifier properly.
I haven't dealt with SO-Chatbot's code, you'll just have to wait until Zirak or other maintainers get a hold of it.
 
I can't find sites-available folder in /etc/nginx/ even as root user... what to do?
 
@AwalGarg ls /etc/nginx
Add sudo if needed.
What do you see?
 
the same I see in nautilus
conf.d          koi-utf  mime.types  scgi_params   win-utf
fastcgi_params  koi-win  nginx.conf  uwsgi_params
 
@AwalGarg cat /etc/nginx/nginx.conf | grep 'conf.d'
 
11:14 AM
@SecondRikudo include /etc/nginx/conf.d/*.conf;
 
@AwalGarg Just add your configurations in conf.d then
Make sure they end with .conf
 
ok but why is the sites-available folder not available?
 
@SecondRikudo ohk in waiting mode. :)
 
@SecondRikudo ubuntu 14.04
 
11:16 AM
@AwalGarg And you installed nginx with apt-get?
 
@SecondRikudo yes, sudo apt-get install nginx
 
Then I have no idea. When I did that it gave me the folder and everything.
 
and going to localhost gives me the nice nginx page too... also, I had added the signing key from the nginx site too, as recommended.
 
hi
 
@Pravin 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:19 AM
when i add jquary.min.js my calendar prototype.js gives Uncaught TypeError: undefined is not a function
 
!!tell Pravin jquery noconflict
 
Basically, jQuery overrides prototype's $, and so it can't be used anymore.
 
what should i do
please help me friends
 
<script>
$.noConflict();
// Code that uses other library's $ can follow here.
</script>
 
11:22 AM
@user1386579 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.
 
add this on top of ur code
 
where should i add this.In my prototype js?
 
<script src="other_lib.js"></script>
<script src="jquery.js"></script>
<script>
$.noConflict();
jQuery( document ).ready(function( $ ) {
// Code that uses jQuery's $ can follow here.
});
// Code that uses other library's $ can follow here.
</script>
 
@SecondRikudo stackoverflow.com/a/17415606/3459110 got it... anyways, thanks for your help :)
 
ok, I'm going to give a few tweaks to the minigame, then I'm finally going to prettify the code
 
11:31 AM
jsfiddle.net/15g194n7/1 Is there a way to influence the builder function here so that a new property is added when calling new?
 
@BenjaminGruenbaum why is this room in chinese -> chat.stackoverflow.com/rooms/12327/water-blowing-zone
I thought it is not allowed
 
without fiddling with the foo function :P
 
it seems like not many programming goes around there
 
@ziGi Stop that. Antagonising isn't helping.
 
11:43 AM
@towc nudge
 
@AbhishekHingnikar what about it?
 
@AbhishekHingnikar no young mature chicks today?
 
the neatness of icons
despite being so small they look fantabulous
 
@AbhishekHingnikar young mature chicks or icons?
XD
 
11:44 AM
favicons
 
!!sandbox
 
You know, there was this funny idea once upon a time that people were supposed to test out commands and "play" in the sandbox
 
@Cerbrus That didn't make much sense. Use the !!/help command to learn more.
 
@SilentKiller Change bot.invocationPattern to something other than !!
 
-.-
 
11:48 AM
@Zirak sorry I am not, just proving a point that it's not only the bulgarian room that speaks a different language, cause we got asked by balpha yesterday to speak in Engliish only
which is quite the restriction I'd say
 
Zigi, shut it.
 
0
A: How can I put a database under git (version control)?

JojoUse dbv.php dbv.php site also you read up upon how to use at github.

Oh dear LORD
why it has no dwonvotes ?
 
@Zirak ya got that
 
@ziGi Are you trying to stir shit again?
Because it really sounds like you're trying to stir shit again.
 

« first day (1426 days earlier)      last day (3525 days later) »