« first day (1871 days earlier)      last day (3071 days later) » 

10:00 AM
Do it, Cap. DO IT!
 
I want to check if the input value is a string. If so, do something with it
what's the best way to do this?
 
@BartekBanachewicz awesome!
 
crl
@Zirak I don't realy know, hard to customize tables jsfiddle.net/crl/4g7aLgLy/2 (maybe try asking @Abe or @Zach in html room)
 
@emporio is this a real question`?
 
while we're at it
 
crl
10:01 AM
do without tables maybe
 
@GNi33 no a fake one
 
gonna install FreeBSD today
 
cool
 
@crl wat is dis even
 
so feel free to answer
I'm semi noob
 
10:02 AM
because this is like 2,25 seconds of google
 
The thing is, when a number is passed in the input, it is converted to a string
but i want it to remain an integer
 
@Zirak ftr, spec just says "useragent can do blabla", not that "it will do blabla" :D
 
@0MV1 Caprica is a bot. She just tell you what I asked her to google. Although we know you are using phonegap, we still have no idea and can't reproduce your problem so your best bet is file a reproducible case on SO or learn how to debug.
 
crl
@Zirak some shits I tried nvm (not completely related to your thing)
 
@emporio yeah, you'd need to check if it's purely numeric, than you can convert that to an int
for the rest, there's typeof
 
10:06 AM
Thanks for the suggestion @Sheepy
 
@GNi33 yeah, I just need to be sure that always a string is apssed to input
 
@AwalGarg You're not funny
 
but right now, even a number is converted to a string
 
weeps in the corner
 
Why does it do that?
 
10:07 AM
yep, an input returns a string
 
it's ok, I;ll make an if statement
 
@emporio Do you just want to do something if it's not a number?
There's valueAsNumber which returns NaN if it's, well, not a number.
 
and process if its NaN
exactl
thanks
 
So I did this:
if (typeof parseInt(vm.name) === 'number') {
alert('Sorry, not a valid name. Please try again.');
} else
 
10:10 AM
@BartekBanachewicz I'm with bartek here @AwalGarg
 
 
@BenjaminGruenbaum because stats or because personal experience/observation?
 
ok that doesn't help
 
@emporio if(!isNaN(vm.name))
Hm, doesn't quite work for booleans though
 
@Cerbrus that did the trick
Booelans?
you mean when someone enters 'true' or 'false' ?
 
10:15 AM
@AwalGarg because most people don't care.
They just want a good default, something that works.
 
Hi, is there anyone out there that knows how to work with Knockout JS?
 
@BenjaminGruenbaum and my point that is that your "good" is not good for everyone
 
Right, but that shouldn't matter.
Cater for the 99.5%
Not for the 0.5%
 
I doubt that 99.5% of the world can agree on one thing in terms of UI
 
And then you'll get Linux
 
10:17 AM
Going off now to have soup dumplings. Happy Monday night~ o/
 
"you know what, customize everything, if you can't customize it, just use that little black box where you put strings in to make the computer do what you want"
 
@AwalGarg Most people use iPhone and Android
 
fine and awesome for us, not cool for the majority of people
 
The UI is entirely fine for them.
 
iOS is a good example for it. People are told the way things are, and the freaking love it
 
10:18 AM
Take cars for example, for you and most people, not being able to configure your car is perfectly fine.
You're just not a car power user.
 
what if i want to show an alert and stop the program right there?
 
@BenjaminGruenbaum that's 2 things, not 1 :/
 
You're a computer power user - so you want to configure it. Just like a race driver cares about whether or not they can move the arm brake just a tiny bit to the left.
 
not continue rest of the script?
 
@emporio throw an exception
 
10:19 AM
You have a choice of cars, just like mobiles or browsers and they need to compete.
However, you don't care about being able to configure it.
 
Also, android itself has another host of variety in itself.
 
@GNi33 could you show me an example?
 
Just like most browser users, they think their browser is "the internet"
 
thank you
 
10:20 AM
@BenjaminGruenbaum the cars example is a good one, but don't you think we are much more attached to a browser today than a car?
 
in other news FreeBSD has a 22GB startup disk and has literally nothing on it
 
lol
 
not even screen
sudo? pff.
 
@AwalGarg you are, but most people are a lot more attached to their car than their desktop browser.
 
I didn't expect a gui, but bash? seriously?
 
10:21 AM
@AwalGarg We are, yes. Other people couldn't give less of a damn
 
Car is just one example, think of other every day utility. Their house lighting, their garden and so on.
Most fields that have people that care about them a lot and have power users face the same problem.
 
@GNi33 ok now it throws to the console but I still would like it to alert
 
put the alert line before the Exception one?
 
@AwalGarg this goes to libraries too by the way, most people who use Angular don't mind most of its shortcomings because they're solving a much smaller subset of the general problem.
 
@BenjaminGruenbaum I didn't mean it that way. I mean, there is a lot less variety to browsers than there is to cars, gardens, lighting, etc.
 
10:23 AM
This is why PHP is so popular.
@AwalGarg and that's a shame, that's an economy problem.
 
ok this works
throw alert('Sorry, not a valid name. Please try again.');
shows the alert and stops the script
wonderful
 
@BenjaminGruenbaum But browser technology is much more newer, unstable, and immature in comparison to automobiles, and our daily needs.
The odds of your browser crashing is terrific in comparison to that of your car dying out because of a manufacturing problem in between a road.
 
just wait until some major "smart car" problems will occur
 
@BenjaminGruenbaum I think I see your point a bit clearer now. I agree with it. I am just arguing that it isn't the right way to move forward.
 
uh wtf I need to install X for virtualbox extensions
 
10:37 AM
@Zirak yeah its a known PITA but the only sane way is to use position: fixed and force same width on the table
and the extracted
 
crl
@Abhishrek can you make it from that jsfiddle.net/crl/4g7aLgLy/2 (just curious to see how)
 
@emporio Yea, but then the values would probably be "true" / "false", which wouldn't be a problem
 
> spent more than 20 months reviewing Toyota’s source code
 
it's good now, I'm happy with it
 
holy hell
 
10:39 AM
just not the way I used the $watch function in Angular perhaps
 
@Abhishrek But you can't explicitly set a table's width
And if you put position: fixed on the thead, it will stay fixed even when scrolling past the table's end
 
Ah
you want "that"
 
I just want to scroll a tbody :(
Why is this hard
The internet has no answers
 
Since when does the internet have no answers
 
10:42 AM
I googled: "fiddle tbody"
 
@Cerbrus Breaks when the content's dynamic
 
I've made a more elegant version of that, but this can only be made sane by listening to a MutationObserver. Which isn't sane at all
 
That sucks :-/
 
@Abhishrek What is this madness
 
10:44 AM
hey guys, what's the correct way to control imports in express? Do you just have modules export a function, then include them in the entry point file and call them with the application?
 
crl
@Zirak like adding new rows?
 
@crl More like changing data in existing rows so they grow and shrink
 
posted on November 30, 2015

I’m currently working on my first real paid coding project in ages: PvdApp, a project of a friend of mine. (He paid for this research, so he deserves a link.) Among other things, this project requires me to style and script sliders. There are several interesting points I would like to bring to your attention, such as a few underreported IE problems, the solution to Android WebKit’

 
@Abhishrek That's soooooo close
 
yep
and if you remove the "horizontal" scroll
 
crl
10:47 AM
ok
 
you actually get what you were trying to get
 
Morning Guys
 
good night
 
It just falls short on the th width
 
crl
10:48 AM
th content can change too?
 
how dynamic is your data ?
 
my BSD is getting usable
feels good
 
I mean, if the th width is larger than the tds under it
 
a pity that to make my OS torvalds-free I'd need to stop using git
 
var obj = {
    init: function(){
        document.getElementById("button", this.doSomething);
    },
    doSomething: function(a, b, c){
        alert(a + b + c);
    }
}
Oops Sorry
 
10:49 AM
fixed-layout ?
 
Like his example under "Same table with header style for jQuery Table Sorter plugin"
 
as in table-layout:fixed
 
@ZahidSaeed getElementById takes one parameter.
 
@Abhishrek Doesn't that make all columns the same width?
 
> The horizontal layout only depends on the table's width and the width of the columns, not the contents of the cells
thats what it does
 
10:50 AM
Accidently wrote
 
not essentially all of same width
but you don't wanna explicitely specify width
am just wondering how dynamic is your data
 
Look at his example titled "Same table with header style for jQuery Table Sorter plugin"
 
var obj = {
    init: function(){
        var test = document.getElementById("button");
        test.addEventListener("click", this.doSomething);
    },
    doSomething: function(a, b, c){
        alert(a + b + c);
    }
}
 
See how the "First name" is larger than the th?
 
@BartekBanachewicz Check now
 
10:52 AM
@ZahidSaeed what about it? Where should the a,b,c come from?
 
crl
the alphabet?
 
@BartekBanachewicz It can be properties
 
when you click, you only produce data about "it's been clicked"
@ZahidSaeed properties of what?
 
object
 
@ZahidSaeed WHAT OBJECT
I swear...
 
10:53 AM
!!tell ZahidSaeed google javascript pass arguments to callback
 
JS object :P
 
@Zirak he doesn't want that, I'm pretty sure.
 
Oh yes
 
"Obj" object
 
crl
10:53 AM
hint: you may need new for using this properly, or bind, yeah
 
I have another git query...suppose I had a file which is meant to store passwords...I want to commit it once...at this point it would only have placeholders for the username/password...
 
What I mean to say is, I want to fire another method with some arguments
 
@ZahidSaeed so you want to bind doSomething to the obj?
 
but later on I want to ignore the changes to that file...
 
this represent the dom object itself
 
10:54 AM
I've tried adding a .gitignore, but that doesn't help...
 
What bind ?
 
crl
!!tell Zahid mdn bind
 
is this yet another case of "I don't know basic terminology because I'm too fucking lazy to finish even the most basic of tutorials"?
 
10:55 AM
@Zirak I have only done table with fixed headers once
and i didn't use css
I ended up abusing react
 
Scrollable table: Not even once
 
crl
you want a pure css solution :)?
 
@Zirak as in what you needed
what I was doing is after the render quickly updating the fake div made header
on the top.
and since all updating the content occured from the render function
it went quite well.
 
@deostroll you should have two files, passwords.example.txt and passwords.txt. Have your app read passwords.txt, falling back to passwords.example.txt, have git index passwords.example.txt, and ignore passwords.txt.
 
@BartekBanachewicz Suppose there is a local variable inside the "init" method. Now how can I pass that variable to the other method when the button is clicked ?
 
10:58 AM
Don't make your VCS do more than what it is meant to do.
 
@ZahidSaeed pass a closure there
 
@BartekBanachewicz How ?
 
@ZahidSaeed for example a lambda forms a closure over the function scope where it's defined
so you can just pass a lambda
if you want to call another function, you can call it in that lambda
 
@AwalGarg hmm come to think of it, I guess putting something in a readme would suffice...
 
Any short example ?
 
11:00 AM
I mean completely ignore that file...not have it committed...
 
@ZahidSaeed no, because that would liberate you from thinking and understanding both the terms and what I meant.
 
return new RegExp('^' + username + ',' + password + '$', 'm').test(lines);
Well, that's safe xD
 
@BartekBanachewicz ok then atleast give me a link where i could study
 
@deostroll mostly yes. For more sophisticated cases where you want to provide an example config, the method I described is quite standard.
 
shouldn't take you more than 2-3 months
good luck
see you in 2 months
 
11:03 AM
anyway to erase a file completely from the local repo (which has commits on that file)?
 
crl
rm -r .
 
@AwalGarg browsers are over 20 years old.
They're not that new, and although they're not held to the same standards as cars (understandably) - mobile browsers tend to be a lot more stable - and desktop browsers usually mess up because of the OS.
There are a lot more software engineers than car engineers, I think.
@AwalGarg Oh, I agree with that - I want diversity and choice. I'm rooting for edge and firefox.
 
@BenjaminGruenbaum yet we still can't vertically align anything feasibly in CSS :D
 
I have committed a file, pushed it to my public repo...thats the scenario. Now how to get completely rid of it?
 
fml :D @AwalGarg
 
11:06 AM
delete repo? :/
 
crl
awal is a female, we already knew
 
@deostroll you can change git history, example here help.github.com/articles/changing-author-info
 
crl
@AwalGarg flexbox
 
@BenjaminGruenbaum I want to disagree with this. browser tech is fairly immature. not saying it is stupid, it is growing which is good. someday, it might even get boring.
@crl heh, no
 
It's immature, just not new.
 
11:11 AM
hmm, true
 
hi guys ... is it possible to get the url of popup window ?
 
@SrinivasR 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 question is not to teach me how secure is using the JavaScript! it's just a simple exercise. and just for your record, you can encrypt the JavaScript code in such a way no one can hack it! — Omar14 7 mins ago
Great news, guys. JS is now safe enough to handle authentication
It's amazing none of the large JS blogs have written about this amazing new feature yet.
 
It is technically possible since forever. Encrypt the JS code with the key as the code itself.
but... now... no one can actually use it xD
 
@Cerbrus My javascript always gets hacked, it's so annoying
> This information remains visible in the view-port while the user scrolls through table body rows.
 
11:16 AM
@Zirak Well, you read it, just encrypt it ;-)
 
@Cerbrus encrypt the JavaScript... yeah
 
@Zirak I'm just seeing a plain table there
@ somethinghere, I recommend you to have a look to the recent research in JavaScript encryption. some good starting points: link1 , link2Omar14 3 mins ago
"Recent", linking to articles published in 2008 / 2009
 
In related news, googling for "precisely" gives some softcore stuff
 
@Zirak I think that may depend on your search history...
 
@Billy Are you willing to test that?
 
11:21 AM
I just googled it and the first 3 pages were entirely dictionary definitions
 
Google images, silly
 
@Zirak 1 image with some side-boob
 
@Billy same here. zirak searches for the weirdest things (goats...)
 
I see. There are a couple half-naked women there. Not enough time to look around as I'm in the office :P
 
Someone's going to google "precisely" later at home
 
11:23 AM
same with "definitely"
 
@Zirak Whatsthat?
 
... it just shows me women for whatever I search anyways :/
 
@Zirak This one shows more nude.
Apparently the google profile I use at work is cleaner than the average user
 
@AwalGarg Googled "apricot", first pages were all apricots, suddenly apricot coloured lingerie
 
11:26 AM
@Cerbrus no, we cannot.
Why, did you get review banned?
 
Welp, the rules of the internet really do work.
 
@Zirak try "clueless"
 
Nah
Just a "incorrect audit" meta post
6
Q: Failed close audit and I don't understand why

ReenoI just failed this audit (I voted to close it). Here's the question. Frankly I don't understand why this should be a good question. It's basically a short description of the problem with "give me teh codez". This could be closed as too broad or off-topic -> mcve missing but I really don't think i...

 
@AwalGarg That's to be expected
Like bewitched
This would be interesting...erm...research. Google random terms, see how far you need to go before hitting some form of eroticism.
 
Start with something innocent
Oh, safe search on? :P
 
11:31 AM
try Angular
 
@Cerbrus "something innocent" gave me ecchi on the first image
 
I nearly googled "ecchi" now
 
> Ecchi is an often used slang term in the Japanese language for erotic fantasy and sexual innuendoes.
I checked a dictionary :P
 
@GNi33 Got "Angular Cheilitis Pictures" after a while which was quite far from erotic for me, however...
!!urban ecchi
 
@Zirak Ecchi Softcore [hentai]. Often includes panty-shots, nudity, or perverted situations. Almost always used for humor. Ecchi does not describe actual sex acts.
 
11:33 AM
@Zirak Literally... xD
 
@Zirak Fairly ecchi.
 
I was thinking that there would be weird stuff
 
Got a hit! A picture explaining conservation of angular momentum with a half-naked ballerina
If disease pictures didn't turn you on already
What am I doing with my life
 
Googling asexual terms for innuendo pictures, obviously
 
If you count the related search terms, then it suggested "angular face" which has a women in it looking at you as if you were the source of all oxygen
okay "potato" gave me balls-shaped potatoes
This must be fascinating to watch unfold
"enroachment" gives furries pretty early
The fucking word of the day, bibliotaph, has some weird semi-erotic Dracula poaster on the first screen
And that's it
You can leave now, folks
 
11:40 AM
Don't stop, @Zirak!
 
@Zirak wat
 
@Zirak if you'd dig deeper, you would get horrific results, I'm sure
 
gonotheca is promising so far
Had to click "show more results", but there's a woman miming a blowjob
Holy hell, "epistemically" might win
IT WON
Unless you count this as erotic
Oh wait nvm
 
I missed the half naked man poster
And this beauty:
 
11:47 AM
google images shows just java for "java"
 
Yeah searching for trademarks and such isn't so fair
But I'll bet you there's something
 
no more results left
 
There were some mentions of Ubuntu, which we know you get off on
 
Why do you think I like ubuntu? :P
 
@AwalGarg I found this (NSFW) searching for Java (incognito)
 
11:50 AM
HAH
 
I must've missed it :/
 
kowhai was promising, until a certain half-naked somebody posedd with her kowhai tattoo
So I innocently searched for khatri, which are an Indian caste, and 99% of that is some form of eroticism
Rijeka fell as well...heavily cleaveged woman in club
Just so I think feel as pathetic, I'm not the only one doing this, right?
Right?
sigh Tineal, a fungal infection, gave duck faces
 
Of course not
You're definitely not the only one doing this
 
Excellent
So I googled @Cerbrus, but was quickly reminded of rule 34
shudder
(btw "excellent" gives busty figurines)
 

« first day (1871 days earlier)      last day (3071 days later) »