« first day (675 days earlier)      last day (3113 days later) » 

12:00 AM
Lol I had to watch that again
This guy is awesome :D
"Huh .. nothing, is there even a voltage?"
"FUCK"
Oh he gon' die from heart attack someday
 
12:33 AM
user image
2
 
I have some javascript that effects the layout on page load (unfortunately I can't change this). Should I:
a. Leave it as is and let the section jump after the page loads
b. Hide the section and then show it after the jump
if b whats the best way to allow noscript users to view it?
 
href=#id works with noscript
 
you mean <noscript>? what is href for?
Maybe i should run a small script in my header to add a "hidden" class?
 
would it be better to add a class to h1 or just add css directly to h1? as in h1.class {font-size:20px } or directly just make h1 {font-size:20px }
what/which use case would each one be best utilized
 
12:52 AM
@Phreak it depends, do you want all your h1's to be 20px?
and if you do use a class don't do h1.class unless you plan on having .class on other non h1 elements
@CSᵠ lol
 
please explain second part more
 
@Phreak for example in your css if you have h1.page-title it is pointless unless you plan on having .page-title on non '<h1>` elements. Never increase specificity unless you have to. Does that make sense?
 
what bout just a .page-title class instead of h1.page-title?
 
@rlemon <script>document.body.className+=' js-enabled';</script> after body is what I ended up using. I assume that's ok?
yup that's fine, did it make sense what I said or not really?
 
sure
 
user4330208
1:02 AM
So umm...Trying to write a function to find the opposite of the mode in an array.
 
look mum no jQuery :D
 
user4330208
least repeated number
 
user4330208
wtf i do?
 
@carb0nshel1 can't you just loop through it and count each one?
 
@joshhunt lets say i have a button right and i want that --> arrow on it with css can i add it after the text?
 
1:05 AM
uh what? can you explain in more detail?
 
(learn more --> ) or wil i just need it like (learn more &#8594;)
as in using css3 after class add &#8594; on to button after the text
 
use :after
body:after {
    content: '→';
}
^ not sure if that will work
 
so btn::after will be within the element
 
!!> [1,2,2,3,4,4,5,5,2,2,1,1,9,9,4,4].map(function(a,b) { if(a === b) { return a; } }).filter(Boolean).sort().pop()
 
@rlemon 4
 
1:08 AM
no?
damn
 
@Phreak that should work i think. Only use one : if you want it to work in IE8
 
okay
srry i'm just asking random questions to figure out the best way to do something
 
though really it should be ::before. They changed the specs after IE8
 
so would/should i use two stylesheets?
as in what would be better ?
does it just depend if the specs want to support ie8
 
!!> [1,2,2,3,4,4,5,5,2,2,1,1,9,9,4,4].filter(function(a,b,c) { if( b && a === c[b-1] ) return a; }).sort().pop();
 
1:14 AM
@rlemon 9
 
that took way too long
 
Lets say we have 2 buttons one border is white the other is blue so create a class just for the blue color?
 
@Phreak I say let IE8 rot in hell but it depends on your target market and what percentage of them use it
but all current browsers support one semicolon also so you can just use that if you want to support IE8
 
got it.
 
its just not following the current spec
so it may be removed in the future
 
1:21 AM
so use 2 moving forward..
 
@Phreak you can do that or you can do class='btn btn-blue' class='btn btn-white where .btn has shared css
 
awesome that looks like a better way to do it.
 
!!> [1,2,2,3,4,4,5,5,2,2,1,1,9,9,4,4].filter((a,b,c) => b && (a === c[b-1]) ? a:null ).sort().pop()
 
@rlemon 9
 
or perhaps use something more semantic like btn btn-important and less apperance descriptive but up to you
 
1:23 AM
hmm...
well what if its not important its just a highlght
follows a scheme of color.
 
still try to be semantic, its a good habit to get into
 
so would highlight be considered samantic?
 
what if you decide to change the colour scheme and you want all the important blue buttons to be red instead?
what is the purpose of highlight?
 
its just part of the color scheme..
i don't think it has a designated purpose.
 
in what case would you use it?
 
1:26 AM
umm
Maybe to add a little more emphasis ?
but i think important carrys too much weight? don't ya think
i feel highlight would be better - because it has basically orange highlights throughout
 
btn btn-emphasis
 

OOP for Noobs

A room for noobs pretending to try to learn OOP. Ask anything ...
 
i'm guessing you don't like the word highlight?
not samantic
 
well it depends, its not terrible but its not great. You are more describing what you are going to do with it in the css rather than what it is actually doing
 
alright that makes sense so what it does trumps everything..
 
1:31 AM
like I said if you describe how it looks with the class it can mess you up if you decide to change how it looks
 
yea i now totally understand
ur teaching me loads btw
how about if i have one heading but with 2 different color with the .emphasis class on some words would those words best be put in a <span>
 
its not terrible if you don't do that but its just a good practice to have
yup
 
awesome would that be the best way to do it?
if you know what i mean lol
 
most likely
 
i'm trying to write the cleanest html/css possible
 
1:33 AM
you might want to do .text-emphasis though but up to you
 
okay makes sense
so <span> is still a pretty common tag it seems
 
yup
actually just thinking about it you should probably use <em> on the text as its more semantic than using a class
and then do something like:
h1 em {
    font-style: normal;
    color: red;
}
 
alright em but what if i'm using this orange color through out one is for a text heading the other is for like a "click here" one is for a close would em still be better than .text-emphasis
 
?
 
this orange highlight
it appears on heading, buttons, icons
would em {color:orange} vs .emphasis {color:orange}which one would be best in this case?
@joshhunt sorry about these questions lol i know there random but there helping :D
 
1:49 AM
use <em> when it is on text, use .emphasis when it is on other elements like <button>
if you want to color the whole h1 use .emphasis, if you only want to color part of h1 then use <em>
 
isn't it redundant though since they have the same color.
can't i just use em on the other elements as well.
since it has multiple use cases? or for it to be more semantic redundancy doesnt matter
 
@Phreak think about it this way, you want your html to be correct before you think about css
 
okay
gosh naming is so hard now lol
 
you'll get used to it :D just make your html correct and then add your css. Occasionally you will need to add additional elements / classes to assist your css.
 
2:06 AM
hey guys
 
hi stevo
 
i need something to learn
i have learned html javascript css
im trying to move on see what i can learn any advice?
 
why don't you learn some preprocessors there fairly easy to pick up
 
2:52 AM
learn canvas or svg
 
@Phreak .emphasis is a pretty crappy name. why are you emphasizing it? what is its purpose?
 
its purpose is to emphasis the text
or emphasis a button
etc
add some color to it
to make it stick out
i dunno
 
@ZachSaucier No
 
@Phreak you don't usually style that generic classes
 
???
 
3:02 AM
but instead like button.important{font-size:200%}
.important{} alone is a no no
button.important{} is ok
 
why
 
because unlikely a class that generic will fit to any element
so you restrict its usage to a restricted set of elements
 
so its better to be restricted
aka button.important{}
that's restricted vs .important{} is not
i still don't see how that can be troublesome.
 
say you have this
.emphasis{color:orange}
and you also have
<header style="background:orange"><a class="emphasis">link</a>
that text wouldn't be visible
in short
defining default styles is generally a bad idea. because most of times you will have to override most of the rules
so better having everything always clean and contextualize the styling
 
so.. a.emphasis {color:orange}
 
3:08 AM
yes
but even better
.mybox > p > a.emphasis{color:orange}
because you know that .mybox > p will have a white background, always
 
but then i also have an h1 so .mybox2 > h1.emphasis {color:orange} it just seems repetitive
the color orange is appearing throughout...
mind you i'm not planning on using mixens/css variables.
 
.person:not(:has(.name))?! — A. Wolff 8 hours ago
I'm not sure why this is downvoted?! — A. Wolff 8 hours ago
Why is this guy always so "?!?!?!"
 
@Phreak IMO I would use .button-important rather than button.important
 
yea i agree
 
@Phreak imagine this scenario: you have:
a.emphasis{color:red;}
h1 > a.emphasis{color:blue;}
then later on you decide that you want to turn all the red links into green. how do you know that the green will fit everywhere? and what if some them must stay red? so yes writing color:orange everywhere is repetitive but it will be easy to maintain. because styles are always contextualized
 
3:19 AM
^ this is also where I would us a LESS variable in my css
 
i prefer to apply the style to the most restricted set i can think of. redefining css properties isn't bad but one shouldn't abuse it
 
hmm.. so lets say that orange will be the only color for emphasis i just think it would be better to just add a generic class
i dunno i guess its just not sticking
 
this is entirely subjective: i don't let the css pollute my markup
so i don't have <button class="button"> like many have
i just have <button>
 
i know its subjective but i just want to understand the different styles/reasoning
 
means that i use as less classes as possible
 
3:23 AM
but are classes really bad?
 
no this is subjective
 
okay.
 
i think css isn't meant for styles definition reusability
 
what if you literally just want to add a background color to 3 different divs
child selector for you?
footer > div {background-color:grey}
based on your logic
 
Depends on what you mean by 3 different divs
If 3 completely unrelated divs then you could give them IDs.
footer > div sounds like they're all related: children of a footer
or children of their own footers
 
3:32 AM
yes
related.
 
footer > div.companyInfo{}
footer > div.corporateLinks{}
footer > div.copyrightNotice{}
rather than for example

footer > div.first{}
footer > div.second{}
footer > div.third{}

or

footer > div:nth-child(1){}
footer > div:nth-child(2){}
footer > div:nth-child(3){}
 
That's if the background colors are all different
No reason not to combine the rules if the declarations are the same
 
there all the same.
okay this is making sense now.
 
ah yea i misread you
not saying that you shouldn't use nth-child selectors. but they are orthogonal to the semantic class names
 
how do you guys feel about image sprites
do you guys use them?
 
3:46 AM
nope
 
why not?
 
mostly because css background* properties can't do much for handling them
 
They're pretty amazing for what you can do with them though
 
true :D
 
whats a better way to write this <footer> <p class="copyright">Copywright 2014 test inc<p><p>Who we are</p> </footer>
 
3:57 AM
"Who we are" looks like a link
 
i don't like the back to back p's there on the same line
oh tru
 
If they need to be on their own lines (i.e. in their own paragraphs) I don't see anything wrong
 
but lets say it wasnt a link
 
It would bother me seeing them on the same line of code as well
 
okay lol i'm just cleaning possible bad habits lol sorry for some of these dumb questions
 
3:58 AM
@Phreak i'd use <address>
 
oh yea.
 
@FrontpageExpert Is "Who we are" proper for an <address> element?
Seems like that's all there is
 
yes. in html5
 
doesn't css3 have something for copyright let me go take a look i forgot.
 
> The address element provides contact information for a document or part of a document. Information provided by address may include the names of the document’s maintainers, links to the maintainers’ Web pages, e-mail addresses for feedback, postal addresses, phone numbers, and so on. The address element is not appropriate for all postal and e-mail addresses; it should be reserved for providing such information about the contact people for the document.
so for an <address> that refers to the document (not one wrapped by an <article>) that looks fine imho
 
4:01 AM
@JonathanSampson You got to meet Tab Atkins :O
 
> The address element represents the contact information for its nearest article or body element ancestor. If that is the body element, then the contact information applies to the document as a whole.
 
@BoltClock He still hangs around here?
 
apparently small should best work when adding "fine print" such as copyright <footer>
<small>© Copyright 2058, Example Corporation</small>
</footer>
33
Q: Correct Semantic tag for copyright info - html5

DavidWhat would be the best and most semantic tag/method for including a copyright notice in the footer of a web site?

 
:D
from tab atkins i always get the weirdest pictures on twitter
 
@SomeKittens Tab? I guess he shows up on SO every now and then
 
4:04 AM
@BoltClock No, Jonathan
 
Oh, yeah he does
 
4:33 AM
@BoltClock are you number 1 in SO rep?
 
In maybe
Jon Skeet is #1 overall
Jon Skeet, Reading, United Kingdom
757k 330 5071 6365
From now on, once you hear his name you will know who he is
 
you probably get a number of job proposals right?
 
Used to. But I'm not taking any work atm
 
interesting. any worthwhile opportunities? sorry im prying :D
 
No lol
 
4:44 AM
lol alright..
i think i'm out
 
cya
 
take care cya tomorrow.
 
4:59 AM
password sent server, server send cookie to client, client auths with cookie vs. signing key dirived from password, single page app, all requests are signed?
 
 
1 hour later…
6:10 AM
posted on March 06, 2015

New Cyanide and Happiness Comic

Googling inevitably reveals that my problem is caused by a known bug triggered by doing [the exact combination of things I want to do]. I can fix it, or wait a few years until I don't want that combination of things anymore, using the kitchen timer until then.
2
 
7:03 AM
@Eirinn zzzzz
 
@Feeds lol
morning
 
o/
fell asleep with the window open, only 13 new messages O.o
 
7:21 AM
in python there is no type checking in functions and method signatures. no return type
no interfaces
hm
there are lot of cool things about it tho
like operator overloading
 
@BasementKeyboardHero that is not enough
@FrontpageExpert hiiiiiiii
 
yeah i expected more
@FrontpageExpert You up and running with py?
 
not yet
just random reading
i'm trying to understand if it supports at least annotations for that
annotations would be great
i care about static typing mostly because of refactorings, not for being more enterprisy
it's time to join the python room
 
any angularjs guys
 
7:38 AM
python room guys are cool
 
AAB
Good Afternoon all
Hi,
I have a php application
I wanna use routes to filter who gets to see which page
found this library
is it better to add redirect_to at the top of each pages or use this library
 
8:21 AM
o/
 
o/
 
8:40 AM
@KeyboardWarrior GOOD MORNING
 
@Sajeetharan javascript room, but I am sure you know that.
 
@Sajeetharan Try KnockoutJS
 
Hi all
 
I have a form with a image uploader in it. I am now testing the offline saving capabilities with localstorage, only i have one small problem. I want to upload the image from the local device to a server which returns an url, which I implement in the form data, and after that I save this formdata to a database... But how can I make sure the image upload is finished before I upload the formdata?
 
8:45 AM
@HuubS depends on your file upload method I guess
At this point we don't even know which language you're using and which server we're talking about :)
 
Haha, okay, well its a PHP server and I'm using javascript with jQuery, maybe I need to say its a phonegap application, but i dont think thats relevant
My upload function spits out a win or fail function when it's finished but the problem is
The upload function is asynchronous so it runs in the background...
 
Either use a promise or use an event driven system
both will work async
 
^ that
 
K thanks, need to search that but I can get along thanks for the answer Eirinn !
 
Or you could check if the jquery function has a callback function that triggers when done :)
@HuubS Np m8, best of luck
 
8:50 AM
the upload function is not jQuery thats native phonegap code :P but I think promises will be sufficient for this task after a small read about it
So thanks!
 
@HuubS Phonegap is likely to have a callback, use that
 
Yeah i know, it has a callback but the way my app works i need to code a workaround
maybe the logic isnt right but w/e :P it works
 
@HuubS If you're coding around common practice you're probably doing it wrong :P
promises / events will not change this btw
it's exactly the same as a callback
brb
 
!!afk solving the mystery's of the universe
 
Maybe I need to explain it better. I have a form which can upload multiple fields, including an image. I upload that image (apart from the form upload) and inject the uploaded image URL into the form (hidden field). Then I upload the whole batch to the server into the database.. But if the device isn't online the local URL gets injected into the form url. Now I have also a "sendLocalDataToDatabase" method, which needs to upload the local image to the server FIRST before it sends the whole
 

« first day (675 days earlier)      last day (3113 days later) »