« first day (1292 days earlier)      last day (3671 days later) » 

12:00 AM
Pretty sweet
 
@DerekBlair 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.
 
300 rep to go!
 
12:42 AM
I'm not posting this for rep.
0
Q: Overlapping media queries

bjb568@media screen and (min-width: 1000px) { /* Styles for > 1000px */ } @media screen and (max-width: 1000px) { /* Styles for < 1000px */ } The problem is that both are applied at width = 1000px. How can I make it "less-than", instead of "less-than-or-equal-to", or "greater-than" instead of...

 
@bjb568 then what are you posting it for?
 
I'm not posting this for rep either, but I'm always somewhat amazed when it takes longer to write the question than just try it out in jsFiddle

http://stackoverflow.com/questions/23377753/custom-event-listeners-what-makes-them-respond-to-dom-actions-instead-of-liste
 
@monners Let's see if you could list the reasons in your head.
 
@bjb568 You've answered your own question in the question. Adding some hypothetical 0.5px device doesn't make it any more of a valid question.
 
@adeneo I can see that, it's sometimes easier
when I was new I was really put off by making fiddles
 
12:46 AM
Also, I'd be amazed if this question wasn't a duplicate.
 
@monners No, I said that that was a terrible solution that doesn't solve the actual problem, just shrinks it 50%.
 
@bjb568 dude, stop being so confrontational when people question you. Nobody likes it when they ask you a question, and you retort some crap back and don't answer.
 
@RUJordan I'm not required to answer stupid questions.
 
now that's ironic
 
@bjb568 That's not a horrible solution. It's a solution to a horrible approach. A real mobile-first approach should never have you using max-width in the media query.
 
12:49 AM
@monners You'd rather use style canceling?
 
Either you're working from big to small (not advised) or small to big (mobile-first)
sigh
 
No. I have a base CSS which works ok for all. Then extra styles for small, medium, and big.
 
Whatever
 
Your base styles should be part of your mobile styles. Then you add styles as you move out, cancelling only what you need to (which shouldn't be too much if you've structured your CSS well)
 
lol @ the answer on your question though
 
12:52 AM
@monners What do you mean "structured my CSS well"? I'll have to cancel half the styles for each level.
 
@bjb568 Not if you keep layout separate from your modules. Then you're not cancelling styles, you're starting with your mobile/base styles for each module and changing them as you move up through the breakpoints.
If that doesn't make sense then I suggest you go read up on modular CSS approaches and mobile-first development
 
Keep my layout separate? Then where does the layout go?
With the magical CSS unicorns?
 
@bjb568 I think you're just trolling me now.
 
This is the stylesheet for layout.
 
12:54 AM
@bjb568 Then you're doing it wrong!
 
How can I not have a stylesheet for layout? The page doesn't lay itself out…
 
@monners dude it's not worth your time
 
@bjb568 Ugh. I didn't say don't have a stylesheet for layout. I said keep the styles for layout separated (I-fucking-E, independent)
@RUJordan My god you're right!
@bjb568 You're on your own. God speed.
 
In different <link>s? Anyway, I will need to use media queries. And they will overlap.
 
@rlemon dude that's tight
 
12:58 AM
@bjb568 Nope. Nope nope nope.
 
You sure have been helpful…
 
@rlemon that's pretty cool
 
@bjb568 Sometimes it's wise to recognise a lost cause for what it is and cut your loses.
 
do you have some specific technique(s) that you use to make those kind of stuff?
 
@rlemon What black magic is this?
That's pretty fuckin' awesome.
 
1:01 AM
oh wat, no JS
I'm out
 
That's pretty cool, border-radius for the arched lines, and css animations for the rotation
Not enough jQuery though
 
And no jQ!
 
haha yes all css
:P
cower before me mortals!
even performs well on my mobile :P
 
@rlemon I'm stealing that.
 
Just go to the codepen homepage and you'll see many like it.
 
1:07 AM
go right ahead.
 
I totally forgot you look like a member of a boyband
 
haha
that was a few years, and many beers ago
 
lol
 
1:11 AM
Can we play with it -> jsfiddle.net/7nb8C/4/show
 
@adeneo codepen.io/rlemon/pen/KyDgh play with that
okay I never can follow this. are one of you Julian?
I know i've seen that homepage before
ohhh I know who he is, nvm.
 
Wheatly: I've fixed tons of bugs, so everything should be 100% stable
Me: "><img src="http://i.imgur.com/jwsfAfhb.jpg" onload="window.location='https://www.yesgraph.com/'">
App: Let's go to YesGraph!
 
@rlemon - That's too complicated for me, I get confused whenever I see the general sibling selector.
 
i'm not even sure that works like I think it does :/
probably doesn't
actually i'm sure it doesn't
it just takes the first one. all others are children so the rotation applies
i'm not sure how to select the nesting children
 
1:28 AM
@rlemon span > span > span > span > span > span { /* awesomeness */ }
 
Damn this Wizards game is good right now
 
newbie alert!!
ok guys help me understand the 'return' keyword in JS
why can't I do this:
var timesTwo = function(number) {
number * 2;
};
var newNumber = timesTwo(6);
console.log(newNumber);
 
You're setting timesTwo to a function
 
why do I have to have 'return' as: return number * 2;
 
It's how you get values back from functions
 
1:40 AM
yes but doesn't it store the value in memory already?
without the return
 
No, number is a parameter from the function. You could hoist a variable to a higher scope, but it's easier just to return instead of making a global
 
because in console, you simply do 5 + 2 and it prints 7
 
Yes but the console isn't the browser
 
ok making sense...let me keep pounding it in to my head
so if it's a parameter, i need to add 'return' to store that in to memory?
 
@redshift good rule of thumb. Always return something from a function. By default every js function will return anyway, so it's best to take control of what it returns
 
1:46 AM
I just discovered that the primary key on our biggest table was set to not auto increment, and instead default to '0'
 
@rlemon What does a function return if you don't specifically tell it to?
@SomeKittensUx2666 Why?
 
@monners I don't know.
This is why we've nicknamed the <airquotes>technical</airquotes> cofounder "Wheatly"
 
@monners what is a good rule of thumb?
 
@SomeKittensUx2666 So it's filled with a whole lotta 0s? Or is there an increment step as part of your database insert queries?
@redshift Are you asking what that term means?
 
@monners It's a primary key, so it has to be unique. I don't know how this gum-and-toothpick contraption works, I just fix what I find
 
1:48 AM
@SomeKittensUx2666 That's why I asked! How the fuck could any relationships function if you've got duplicate primary keys all over the place :S
 
@monners no, i wasting sure what you were referencing as a "good rule of thumb"
 
@redshift Always include a return statement at the end of your functions.
^^ Someone please correct me if this isn't correct
 
does 'return' basically just store the value in memory?
 
@redshift this is javascript. you don't need to think about it in terms of memory
It's the value that the function returns.
 
ok
 
1:52 AM
!!> function hello () { return 'Hello'; }; hello();
 
@monners "Hello"
 
i just get confused when to use 'return' and when not to use it
you couldn't just do console.log there?
 
@redshift coffeescript returns that last expression in a function body by default, so you don't have to type return
:braces for CS hate:
 
@Mosho but im trying to learn the basics of JS before i start looking at angular, etc
is this one of the "bad parts"
 
what do you mean
 
1:58 AM
no worries, thanks though
 
@Mosho How dare you bring this filth into my house!
 
so console.log is only for printing stuff in the console and not a webpage, right?
in other words, would i be using console.log when creating webpages?
 
Yes, but mainly for debugging statements
 
for writing on documents, what would i use? document.write? i'm not there yet, still doing console.log exercises
 
You would use elements on the page. document.write() is/can be bad if you don't know it
 
2:12 AM
i saw it's bad for xhtml
 
So you have a div on the page, you'd set the textContent of that div
Or any other element. span, p, a, etc
 
ok
 
!!afk cig
 
I honestly can't remember the last time I used document.write() or xhtml...
nah, I guess document.write is occasionally useful for adding in <script>s
 
oh so how would you output something like "Hello World" to HTML code for webpages?
 
2:17 AM
Well... there's a number of different ways
document.body.innerHTML = 'something';
if you wanted to write over the whole body
 
oh ok cool, btw is that a dachshund in your avatar
 
Usually you'll want to select specific elements though, so you should look up getElementById and querySelectorAll
 
ooh nevermind, lol
 
Its a collie actually.
 
oh nice, good dogs
yes i can't wait for getElementById lessons
 
2:20 AM
LOL, I just looked up what a dachshund is
a bit smaller ha
 
lol yea i was a bit off
look at Mosho's dog hehe
 
doge*
 
where you from, twiz?
 
PA, USA
 
I had a mixed collie once
she was so human
 
2:26 AM
what do you have now
 
just me
 
Oh good... just realized that using "www" on my portfolio site breaks everything.... how fun
 
lol
whats the site
 
add the www, and you get a same-origin error
 
cool nice sie!
*site
 
2:30 AM
I'm actually not entirely certain how to fix that... hmm... probably some htaccess nonsense.
 
weird wonder why it breaks?
yea was gonna say htaccess
 
2:42 AM
I hate problems that can't be tested locally....
and of course I included the 'www' on my resume... awesome... haha
oh well, its fixed now
 
cool what did you have to do
 
I already had the www->non-www URL rewrites in .htaccess, but I needed to move it above my other URL rewrites.
I'm not exactly a genius at URL rewriting. I just kind of took a guess and it worked.
 
2:59 AM
have a great night, im heading to bed
good job on the htaccess fix
 
It's funny how I struggle to write a 3 page paper in school but I can hammer out 10 pages of gold in a couple hours when I'm writing what I want.
 
@RUJordan It always works that way. When you write about something you know/care about the words just come (and are far more engaging to read)
 
@RUJordan thats the beauty of selecting classes you like VS easy/forced ones
 
Oh I'm out of college now
I'm writing a story
They usually end up abandoned after like 20 pages but I'm still going strong after 14
 
@RUJordan i pumped out 30 page and 40 page reaserch papers week or 2 weeks early because i love the topic! (Chinese shadow lending and Europes Myopia on Interest Rates) Rivetting topics to me.. very boring to most others.
 
3:03 AM
Once upon a time, I failed as an author. The end.
 
@Adi 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'm pretty sure I had probably like 5 classes that I actually enjoyed the entire time I was in college...
@Adi Nice shades....
 
speaking of JS questions, why is .bind("click") not working on new DOM elements? I have new row added after an AJAX call but newly added line is not functional until page is reloaded
 
hard to say without seeing the code.
 
@rodling Are you trying to add the event listener before the element is added to the page?
also you shouldn't use .bind
 
3:15 AM
well I have ajax, on success add an element..nothing else, after adding lets say 3 items I click any of them.. nothing
 
So yes? ha
You need to move the .bind() into the success callback as well
and change bind to on while you're at it.
 
Machine.steamroller.init(function() {
    somekittens.bind('to-railway-tracks');
}
 
@rlemon Less impressive.
But still impressive
 
@monners nooooo
 
3:23 AM
more technically impressive.
 
@twiz thanks!
 
@SomeKittensUx2666 @SomeGuy @rlemon stilldrinking.org/programming-sucks
3
 
@monners posted it earlier
 
!!really
 
3:29 AM
7 hours ago, by SomeKittens Ux2666
http://stilldrinking.org/programming-sucks
3
Kinda got lost amid all the hitler posts
 
Hi.
 
That was one of the best articles I've read in a long time
 
Knitler was was my favorite. That was funny.
 
3:47 AM
@Sentient 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.
 
@SimonSarris why does this blink in chrome and not FF codepen.io/rlemon/pen/kryEg
cleared cookies and cache and it works fine now... nvm.
 
@copy I painted my nails orange.
Stop playing Guild wars
 
m59
4:07 AM
So, Homeland Security is now recommending that people not use IE. The best two things that I've experienced as a developer - Using Angular for the first time and this: tennessean.com/story/news/usanow/2014/04/28/…
 
Sales Guy: "...you want to give it a shot and become our most proficient in house EDM frontender?"
 
@BadgerGirl I will never play again.
 
@m59 Beautiful, isn't it?
 
@monners Electronic Dance Music?
 
Dang less than .1 seconds made the Thunder lose
That was so close
 
4:10 AM
!!urban edm
 
@monners [EDM](http://edm.urbanup.com/702165) abbreviation for "Electronic Dance Music"

- includes trance, house, techno, breakbeat, gabber, hardcore, and much, much more.
 
Hmmm...
!!wiki edm
 
{{Infobox settlement |name = Edmonton |official_name = City of Edmonton |nickname = The Big E, The Chuck, The City of Champions, Deadmonton, E-Town, Edmonchuck, Festival City, Gateway to the North, Oil City, Redmonton, River City |motto = Industry, Integrity, Progress |settlement_type = City |image_skyline = Edmontonmontage1.jpg |imagesize = 240px |image_caption = From top left: Downtown Edmonton, Fort Edmonton Park, Legislature Building, Law Courts, Rexall Place, High Level Bridge, Muttart Conservatory |image_flag = Flag of Edmonton.svg |image_shield = EdmontonCOA.svg |shield_link = Coat ...
 
Ugh! No!
@SomeKittensUx2666 email templates
 
4:11 AM
-11
Q: Why does stack over flow have so many motherfucking rep whores? KEEP DOWN VOTING THIS BITCHES

user3092061rep whores rep whores rep whores rep whores rep whores rep whores rep whores rep whores rep whores rep whores rep whores rep whores rep whores rep whores rep whores rep whores rep whores rep whores rep whores rep whores rep whores rep whores rep whores rep whores rep whores rep whores rep whores ...

lol
at least it's tagged
 
that "Programming Sucks" article is awesome!
 
4:27 AM
Guys, what is wrong with my code? Why am I getting that error? Its just simple 4 lines. jsfiddle.net/rdesai/rgFk7
 
@user3329290 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.
 
@RahulDesai I dont think that the library that supports findIndex is loaded
 
@RahulDesai are you serious
 
@RahulDesai read the documentation for findIndex(). The parameter is a callback function, not the intended index value
@rodling it's an Array.prototype function, it's not a library
 
or... that
 
4:32 AM
haha I looked at that fiddle and assumed it was a joke
 
My bad :-/
 
no offense, some people just make really bad jokes.
 
@RahulDesai you should really try googling what you are trying to use before you ask for help, it's good practice :P
 
Does anybody have any clue what this guy is talking about?
0
A: Overlapping media queries

nolyou don't need both media screen and (min-width: 1000px) { /* Styles for > 1000px */ } everything else is for styles above 1000.00000001px and above /* Styles for < 1000px */ and if you want to say inbetween two sizes media screen and (min-width: 1000px) and (max-width: 1001px) { /...

 
I think I am an impatient programmer, I just need the output sometimes. :P
 
4:35 AM
@bjb568 Rep-farmin' all day, 'cause I don't give a f*ck.
 
@bjb568 I think you have an obsession...
"All programmers are forcing their brains to do things brains were never meant to do in a situation they can never make better, ten to fifteen hours a day, five to seven days a week, and every one of them is slowly going mad."
 
@twiz /me is already MAD!!!!!
 
Yea, I'm not quite sure what that "slowly" part meant
 
4:40 AM
@SomeKittensUx2666 don't you ever run out of cat references?
 
!!urban monner
 
@monners [monner](http://monner.urbanup.com/2406503) A 'Monner' is a person who has lived in the same town, surbub or city all their life. Monner's tend to stick together, always following the traditions of the town. The most notable monnerish town is Droitwich Spa, in Worcestershire England.
General Monnerish Habits:
Always have to go home, only their own bed is acceptable.
Tend to work fulltime in a dead-end job, prefrably retail.
Frequent, compuls(snip)
 
Aw-yeah
 
!!s/wrong/wang/
 
4:42 AM
@SomeKittensUx2666 Guys, what is wang with my code? Why am I getting that error? Its just simple 4 lines. jsfiddle.net/rdesai/rgFk7 (source)
 
!!s/lines/wangs/
 
@twiz @SomeKittensUx2666 Guys, what is wang with my code? Why am I getting that error? Its just simple 4 wangs. jsfiddle.net/rdesai/rgFk7 (source) (source)
 
!!s/code/wang/
 
@twiz @twiz @SomeKittensUx2666 Guys, what is wang with my wang? Why am I getting that error? Its just simple 4 wangs. jsfiddle.net/rdesai/rgFk7 (source) (source) (source)
 
!!s/error/wang/
 
4:43 AM
@twiz @twiz @twiz @SomeKittensUx2666 Guys, what is wang with my wang? Why am I getting that wang? Its just simple 4 wangs. jsfiddle.net/rdesai/rgFk7 (source) (source) (source) (source)
 
!!s/source/wang/g
 
@SomeKittensUx2666 @twiz @twiz @twiz @SomeKittensUx2666 Guys, what is wang with my wang? Why am I getting that wang? Its just simple 4 wangs. jsfiddle.net/rdesai/rgFk7 (wang) (wang) (wang) (wang) (source)
 
Nice.
 
haha
!!s/js/wang/
 
@twiz @SomeKittensUx2666 @twiz @twiz @twiz @SomeKittensUx2666 Guys, what is wang with my wang? Why am I getting that wang? Its just simple 4 wangs. wangfiddle.net/rdesai/rgFk7 (wang) (wang) (wang) (wang) (source) (source)
 
4:45 AM
LOL
!!s/simple/wang/
 
@monners @twiz @SomeKittensUx2666 @twiz @twiz @twiz @SomeKittensUx2666 Guys, what is wang with my wang? Why am I getting that wang? Its just wang 4 wangs. wangfiddle.net/rdesai/rgFk7 (wang) (wang) (wang) (wang) (source) (source) (source)
3
 
wow I 'm amazed that it keeps getting better
 
too much SO for today, im going to bed on this wang note
 
!!s/\s\S*/wang/g
 
@SomeKittensUx2666 toowangwangwangwangwangwangwangwangwangwangwangwang (source)
 
4:46 AM
@monners @twiz do you IRC?
 
nope
 
@SomeKittensUx2666 Sure, once. But that... was a long time ago.
 
I honestly never bothered to figure out how to even use that.
 
@Prasad 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.
 
There's a #wangingout channel on freenode
 
4:49 AM
oh my....
 
I'm more partial to the wanginthere channel
Do you seriously use IRC?
!!wiki irc
 
Internet Relay Chat (IRC) is a system that facilitates transfer of messages in the form of text. The chat process works on a client/server model of networking. IRC clients are computer programs that a user can install on their system. These clients are able to communicate with chat servers to transfer messages to other clients. It is mainly designed for group communication in discussion forums, called channels, but also allows one-to-one communication via private message as well as chat and data transfer, including file sharing. Client software is available for every major operating sy...
 
You know where is a good place to not live...? The Mid-west.
 
@twiz Agreed
 
@monners yes
irccloud makes it easy
 
4:53 AM
Ah, so you do it through a client
I guess if anything ever happens to this room we'll all either move to Miaou or an IRC channel :P
 
can we use html local storage to store javascript file.
is it possible?
 
Yes, but it makes no sense
 
k but i need to use this stored JS file again from local
 
k
 
!!s/need/think I need to/
 
4:59 AM
@monners That didn't make much sense. Use the !!/help command to learn more.
@monners k but i think I need to to use this stored JS file again from local (source)
 
i mean every request i want to download same JS and CSS file for my app.
so any way is there to use frist requested downloaded file for my app i use for entire request upto my session is expired..
 
!!choose sleep coffee
 
@twiz That didn't make much sense. Maybe you meant: whoosh
 
!!whoosh
 
5:00 AM
I see.....
 
so my app become world most fastest app..
 
!!coffee or sleep
 
@monners Could not process input. Error: unexpected || on line 8
 
!!/choose coffee sleep
 
@twiz That didn't make much sense. Maybe you meant: whoosh
 
5:02 AM
!!/choose coffee or sleep
 
@monners That didn't make much sense. Maybe you meant: whoosh
 
!!coffee or sleep
(I'm bot banned, so it doesn't work for me)
(At least I think that's the right way to write it...)
 
!!coffee
 
@monners "undefined"
 
!!undefined
 
5:03 AM
@twiz That didn't make much sense. Use the !!/help command to learn more.
 
!!coffee foo -> return 'bar';
 
@monners "ReferenceError: foo is not defined"
 
Foo your references!
 
@co
@copy what i asking u got it..
 
@BenjaminGruenbaum halp I think I'm doing promises wrong:
return stripe.customers.create(customerDetails).then(function(customer) {
  return pg.connect(connString).then(function(client, done) {
    return client.query(SQL ....
 
5:34 AM
anyone familiar with jstree?
 
@Ben 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.
 
@SomeKittensUx2666 Aren't promises supposed to look like callback hell?
 
Aren't they the exact opposite?
 
@SomeKittensUx2666 Aren't they?
 
Jes
5:52 AM
Hi friends good moring
 
Hi
 
hallo
guten morgen
 
Jes
@bjb568 hi
need little help
I got a form with submit button ... to disable a second submission i am adding disabled attribute to the button after first click
$('#save_role').attr("disabled", "disabled");
and on successfull submission i am removing the attribute
 
@rlemon I really like your "loading" css animation. Was it a lucky results of experimentations or a really designed one ?
 
Jes
$('#save_role').removeAttr("disabled");
 
5:55 AM
@dystroy rlemon is afk: sleeping
 
@CapricaSix So wake him
 
Jes
but the attribute does not gets removed because of which the button does not submit but when i ctrl+f5 the attribute gets removed
how to solve this
 
document.getElementById('save_role').disabled = true
No need for jQuery.
 

« first day (1292 days earlier)      last day (3671 days later) »