« first day (964 days earlier)      last day (3987 days later) » 

4:00 PM
@BenjaminGruenbaum go grab your points :
0
Q: What exactly is semantic HTML and how would I use it to describe the American flag?

Alex FordI had a job interview the other day for a front-end web development position. I consider myself to be a competent front-end developer yet I was caught completely off-guard when the interviewer asked me to model "old glory" on the whiteboard with semantic HTML. I felt like a retard writing DIVs wi...

 
<merika><flag/></merika>
 
better
 
@dystroy Holy crap that's a REAL question :O?
 
posted on June 06, 2013

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {} WOOH. Technically, there are some glitches in the early archives, so

 
4:02 PM
@ThiefMaster I'm not sure I see the point. There are still command line browsers.
 
"outreach" i guess
 
lynx
 
ew, use at least w3m
 
@ThiefMaster a quick question, when has russia made america un-peaceful?
 
I use lynx to run batch jobs on one of my VPS's that doesn't allow cron jobs.
 
4:05 PM
@Connor You're answering the comment just before yours ?
 
@ThiefMaster I'm starting to get the feeling that you're a bit on the left side of the political map :P
 
@BoltClock I was just about to remove those CSS tags
 
heh
 
@dystroy Don't understand?
 
i'm pretty much unpolitical (voting for the pirate party though)
 
4:07 PM
We have a pirate party here, but I didn't vote for it, too much crap going on here to have that liberty :) Also our pirate party sucks.
 
I don't vote because I don't agree with any of the parties.
and voting for the lesser of evils seems counter productive
 
I vote more left than my actual opinions because I know we'll have a right wing government again. The issues that bother me most aren't really prioritized anyway.
 
Can
 
can you do the can can
 
anybody briefly explain me 01 knapsack ?
 
4:09 PM
it's where you put your lunch
 
@Darkyen sure
 
The knapsack problem or rucksack problem is a problem in combinatorial optimization: Given a set of items, each with a weight and a value, determine the number of each item to include in a collection so that the total weight is less than or equal to a given limit and the total value is as large as possible. It derives its name from the problem faced by someone who is constrained by a fixed-size knapsack and must fill it with the most valuable items. The problem often arises in resource allocation where there are financial constraints and is studied in fields such as combinatorics, compu...
 
@Darkyen let's say you have a bag
 
doesn't the wiki article explain it well?
 
@Darkyen and you want to steal stuff from a home you broke into. Each item has a weight, and a value.
 
4:10 PM
Well i understand the bag concept
what i dont understand is
 
@rlemon We had to write a program in college to solve the knapsack problem...
 
Your bag can only contain W weight, and you want to steal the maximal value
 
the 01 implementation :-[
 
Had to use brute force...
 
// Input:
// Values (stored in array v)
// Weights (stored in array w)
// Number of distinct items (n)
// Knapsack capacity (W)
for w from 0 to W do
  m[0, w] := 0
end for
for i from 1 to n do
  for j from 0 to W do
    if j >= w[i] then
      m[i, j] := max(m[i-1, j], m[i-1, j-w[i]] + v[i])
    else
      m[i, j] := m[i-1, j]
    end if
  end for
end for
 
@Darkyen oh, you mean the dynamic algorithm for solving the 0-1 knapsack problem?
 
yes
 
@BenjaminGruenbaum Not familiar with CSS animations, sorry
 
4:12 PM
It's weird how I have a gold badge yet I've never worked with animations, transforms and that kind of stuff
 
@BoltClock A lot of people tag normal CSS questions with CSS3
 
@BenjaminGruenbaum there is
and yes i can
 
@Darkyen good, now go to the part that says "0-1 Knapsack"
 
if u gimme login and pass :D
 
@BenjaminGruenbaum I know, but I try and retag the ones I come across
 
4:13 PM
I don't think you need them, I think you can grab that file just fine :P It's public
 
took me to login
wait nvm
wtah
 
@Darkyen 2nd time i clicked the link it worked... oddd
 
@BoltClock A lot of questions say 'css is a valid solution, but CSS3 is also good'
 
@Neal yes
same here
 
@Neal It's almost as if it's there to prevent hotlinking
 
4:14 PM
@Darkyen very odd
 
@Darkyen anyway, go to the 0-1 Knapsack section
 
@BenjaminGruenbaum to do the class transition you can use the attr or well apply a class based transition, referring to that question.
 
you can modify my function to also look in this object.
 
166
Q: Is it possible to make a div 50px less than 100% in CSS3?

Derek 朕會功夫Is it possible to make a div 50px less than 100% in pure CSS? I want the <div> to be only 50px less than 100%. I don't want any JavaScript.

@hakre - Your link is in CSS, and this is in CSS3. — Derek 朕會功夫 Jun 26 '12 at 20:28
Also see the revision history. It's a mess
 
Looks like a mess :S
 
4:16 PM
too easy on 100% - 50px
calc!
 
It is a mess...
 
calc is a mess, how ?
 
needs more jQuery
 
though i am often worried about calc's performance
 
@Darkyen I said the revision history is a mess
 
4:17 PM
OH OKAY
sorry i think i hurt my head at some time today :-( cant understand 0-1 knapsack :[
 
@Darkyen I'm not familiar with calc but it's pretty limited I think so it should be very easy to optimize it
 
jQuery!!
 
a simple hover can cause catastrophies in css
causing it to be recalculated insane many times
 
@Darkyen anyway, it's explained there with an example
 
@Darkyen caniuse.com/calc hmm
 
4:20 PM
@BenjaminGruenbaum the table helps, especially with this pageofcode.blogspot.in/2011/03/0-1-knapsack-code.html
 
IE8 needs to die already :(
 
@Darkyen Why? When you hover something you're only recalculating it once at most
 
which is the css engine in browser?
how do i detect that?
 
@Darkyen don't look at the code, look at the text
 
You don't
 
4:21 PM
@badbetonbreakbutbedbackbone you shouldnt need to
 
@Darkyen oh ok just courious :P
hey dudes, quickly , how do i return to previous versions some git files?
 
Damn... I should have guessed it. When I can't understand a comment like "You don't", it's because okok badbetonbreakbutbedbackbone is here...
 
i mean revert to old version
 
@dystroy I don't know why people here entertain him honestly. Every time he comes there's drama.
 
@badbetonbreakbutbedbackbone you google it
 
4:23 PM
@Darkyen i found how to revert single file i would like to revert an enteire dir
 
@badbetonbreakbutbedbackbone chat.stackoverflow.com/rooms/29074/html-css-dom-web-design you can ask your CSS questions there if you'd like.
 
if possible
@BenjaminGruenbaum why? everyone ask here about css ..
 
@badbetonbreakbutbedbackbone only when it's relevant to producing Javascript stuff.
 
@ShotgunNinja uhm let's say ok ;)
 
@ShotgunNinja Oh, that's not why. It's because every time he comes this place turns into a mess.
 
4:24 PM
Javascript uses CSS selectors in quite a few libraries (which will not be named... ahem )
 
@ShotgunNinja YOU are welcome to ask all the CSS questions you want if you'd like.
 
@BenjaminGruenbaum lol :D
 
@ShotgunNinja Also, it has CSS selectors built into the DOM api.
 
@BenjaminGruenbaum Oh, cool.
I'm only just dabbling in JS for work, I'm no expert.
I do enjoy writing in JS; it has a bunch of really cool features.
 
@ShotgunNinja What's your "major" language?
 
4:26 PM
but my core competency is in (ugh) Java programming.
I blame my school forcing us to use it for the last 4 years.
I'm self-taught in C++, and I've done some C#, professionally and academically.
 
@ShotgunNinja Don't worry, a lot of students know only Java when they're done with college :)
If only it sucked a little less as a language that would be awesome.
 
@BenjaminGruenbaum Oh, I know far more than just Java; it's just my most proficient language.
 
do you know Lisp?
@BenjaminGruenbaum "Introduction to algorithms" should be at home tonight. Prepare yourself.
 
@ShotgunNinja proficient and Java seems contradictory :P I know Java pretty well too.
 
@BenjaminGruenbaum besides, thank you very very very much!
 
4:27 PM
@FlorianMargaine No, unfortunately. It doesn't seem that hard, given what I've done with functional stuff.
 
@FlorianMargaine I will :)
 
@FlorianMargaine i got it already :P, i think i should start reading more deep into it
how much did it cost you ?
 
@Darkyen You're welcome, it's a good PDF, I didn't write it buy I know the people who did
 
I want to learn Haskell at some point.
 
user1596138
He who's name we shall not speak is here...
 
4:28 PM
@ShotgunNinja oh, lisp is far more than functional.
 
@ShotgunNinja Read LYAH, it's eye opening
 
I need to learn python
 
@rlemon I mean... man it will make you feel ugly :-(
 
it's functional, OOP, procedural, you name it.
 
@BenjaminGruenbaum Will do.
 
4:29 PM
and it's a programmable programming language :-)
 
(Learn you a Haskell)
 
@Dark yen, you have the worst opinions. Lol
 
@rlemon i wrote a server in python, had second worst time in my life
 
@ShotgunNinja yeah :) It's well written, and funny.
 
4:29 PM
@Zirak What do you mean?
 
Did I say I wanted to learn it? No, I need to learn it.
 
@AmaanCheval Your Gravatar
 
@rlemon then well gluck
 
Learning Python the HARD way is a good tutorial
 
4:30 PM
@ShotgunNinja jQuery doesn't actually use CSS selectors
 
but you will have to commit yourself to it, he takes it really basic.
 
@BoltClock Oh? I thought it did...
 
It does use a syntactic perversion of the spec, though
 
@BoltClock It does when able
 
@BoltClock close enough for the girls I sleep with.
 
4:30 PM
@BenjaminGruenbaum w3.org/TR/selectors-api
@BenjaminGruenbaum Well... yeah
 
CSS Spec: first-child. jQuery: first.
Y
 
@BoltClock Why did I get a link to the API?
 
@FlorianMargaine Because they're not the same...?
@BenjaminGruenbaum Oh that was just a relevant link
 
Oh cool, yeah I read that :)
 
By the way, since I'm here in the JS room: are coding interviews with JS a thing? Because for all I know I may be given one
 
4:33 PM
@BoltClock They are if I'm conducting the interviews.
 
@BoltClock Yes.
 
crap + crap = crap ?
 
Crap salad
 
@BenjaminGruenbaum Dammit I was about to reply to that...
 
4:34 PM
Lemon see our opinions matched :D
 
@BoltClock So move it back!
 
I demand everybody watch that
and stars it
 
@Gacnt no.
 
because it's hilarious
@BoltClock don't you no me :<
 
@BoltClock Why would you be given a coding interview with JS?
 
4:35 PM
@BoltClock you want questions related to javascript for taking interviews ? sorry i think my natural language understanding part of brain has gone bye bye
 
@BenjaminGruenbaum Perhaps not necessarily JS - I was told I could write in any one I chose but given this is a frontend dev position, JS is preferable. At least according to them
Also, given the company I'm applying for, I could probably answer all the questions with jQuery and get hired right away ;)
 
@BoltClock Usually, you need to design something in CSS, then use JS to populate it with data with AJAX and ad behavior to it.
 
@BenjaminGruenbaum That makes sense
 
@BoltClock "What is the meaning of life?" "jQuery" "Very Good!"
 
I'm having trouble with a jquery wizard form. Each tab has a NEXT button at the bottom and I'm trying to prevent the tab key from passing over the next button and going to the next input on the following page. The following script works when I tab through the fields to the next button, but it seems to get stuck within the function. For example, if I move my mouse and click inside the first form field on that page and hit my tab key, the key is still preventing from default behavior.
 
4:38 PM
I like trains
@user1447679 Format your code! (Control+K)
 
Sorry
 
@Gacnt lol
 
$(document).on('keyup', function() {
							if ($('.next').is(':focus')) {
								console.log("the next button is on focus");
								$(this).on('keydown', function(e) {
									if ( e.keyCode == 9 ) {
										e.preventDefault();
										console.log("the tab key was pressed");
									}
								});
							}
						});
Oooo that jacked it up. Hope I did that right.
Hi Benjamin. Doing well I hope?
 
@BoltClock Learn how to do AJAX, learn how basic templating works (so you won't have to use string concat for creating elements), learn basic actions like click event handlers and such.
 
@BenjaminGruenbaum Looks like I'm gonna have to learn me some AngularJS...
 
4:40 PM
I haz a potato
 
@BoltClock You want to learn how to kill a Mosquito. AngularJS is one badass cannon .
 
@user1447679 $('.next').is(':focus');
try it on console bro :-)
 
@Gacnt LOL that was funny
 
Yeah, the "NEXT" button has a class of next.. that part works. Just gets stuck in it. So if I click back on the first field and hit tab... the tab key doesn't work.
So I can tab through the fields until it reaches focus on the next button, and if I click back on the first field and try tabbing through again, it doesn't tab.
 
@BoltClock You should start by learning JavaScript code principles, how the DOM API works (on the JS side of course), how events work and so on. Then I'd move to something like Knockout which does just data-binding. Only after you get how that works I'd move to something like Angular, it's a pretty huge framework.
Also, I probably wouldn't use AngularJS for an interview question, it's a pretty big tool.
 
4:43 PM
@Shmiddty ...
 
That was polite.
 
@BenjaminGruenbaum What if the company uses it?
... I should probably drop all that and try jQuery.
 
@BoltClock We use it, I wouldn't expect someone I'm interviewing to answer an interview question with it, interview questions are usually pretty small. Unless I'm testing on AngularJS specifically.
 
That makes sense
 
:9851977 You're friendly today
@BoltClock if you want to learn Angular, the egghead.io tutorials are good
 
user1596138
4:46 PM
Why are we supposed to be upvoting this @rlemon? Kinda feels like cheating to mehttp://chat.stackoverflow.com/transcript/message/9836312#9836312
 
@Jhawinsss @rlemon is really into fish, he's like, really attracted to them and stuff.
 
@BenjaminGruenbaum I did go pretty easy on him (I actually told him what the problem was)
 
user1596138
@BenjaminGruenbaum Well yeah I know that, but why would he want a site for it...
 
@Jhawinsss He's not the only one who wants a site from what I can see
 
@BenjaminGruenbaum We like to give 'em quick (and rather common) puzzles to get to see the algorithms they come up with.
 
4:47 PM
@Shmiddty You called him stupid... you can just ignore messages you don't like, or users you think are stupid.
 
!!> delete x
fack
 
@Esailija no bot
@OctavianDamiean I hate that approach :P Sorry, but I'm not testing candidates on knowing how to solve the 0-1 Knapsack problem dynamically because they learned it in college. I want to watch them make something relevant.
 
@Neal can I get some contact info for your wife? hehe
 
@KevinMurphy whoa
 
@BenjaminGruenbaum You'd be amazed how many fail those simple quizzes.
 
4:49 PM
yeah. hate on it
 
user1596138
@BoltClock Apparently...
 
@KevinMurphy You're daring
 
user1596138
@OctavianDamiean Someone should give a example of one of these questions.
 
@OctavianDamiean I would, actually. I have practically no formal education on this stuff
 
@Jhawinsss it's not cheating
 
4:50 PM
@OctavianDamiean I don't care if someone memorized some algorithm. I care how competent they are.
 
they are not for 'rep' they are to make the site a real site.
 
Anybody watched this
!!/youtube Avengers Earth Mightiest SuperHeroes
 
is this spec behavior?
function varCanBeDeleted() {
    eval( "var x = 1" );
    delete x;
    return x === 1;
}

function varCannotBeDeleted() {
    var x = 1;
    delete x;
    return x === 1;
}
 
err caprica ?
 
@BenjaminGruenbaum Oh I think you misunderstood. We don't intend to check if they solve something exactly like in a text book. We want to see their approach.
 
4:51 PM
@OctavianDamiean Example?
 
if variable is added by eval, it can be deleted?
seriously
 
eval is evil
 
@user1447679 1) Get rid of the keyup event. It does nothing for you. 2) your test to check if the next button is focused should be inside of the keydown handler. 3) If that doesn't make sense to you, helping you is a lost cause.
 
@Esailija Yeah, because what it does is put it on the window, and then you're just deleting a window property
@Esailija it's not in the function scope any more, that actually makes sense to me
 
I don't know, bubble sort for example. It depends on the part of the project we're hiring for.
 
user1596138
4:52 PM
@rlemon I understand that. I was just saying what I thought.
 
@BenjaminGruenbaum no it's local var
 
@Esailija eval puts them on global
 
NO
 
lets test it :D
 
the whole reason eval is evil is BECAUSE it uses LOCAL
 
new Function etc is fine because they cannot affect local
Set the ThisBinding to the same value as the ThisBinding of the calling execution context.
Set the LexicalEnvironment to the same value as the LexicalEnvironment of the calling execution context.
Set the VariableEnvironment to the same value as the VariableEnvironment of the calling execution context.
 
delete is weird with eval et al
and its behavior changes within firebug console for example
 
Did someone just edit that pinned message? :O (Wasn't me, I swear)
 
@FlorianMargaine That's just a problem with firebug imo, and there's a flag for it.
@BoltClock Which one?
 
@BenjaminGruenbaum still, delete has plenty of different behaviors
 
4:54 PM
(function(global){ eval("var x = 1"); return global.x === 1; })(this)
false!
and it's in the spec too
I just pasted it
it creates a local variable
eval has access to local, which makes it evil
 
@BenjaminGruenbaum Area 51 link
 
@BoltClock LOL
 
was shog9
 
Every time I try to use a carousel script it never works...I don't know what I am doing wrong
 
(function(){ eval("var x = this"); return x; })()
 
4:57 PM
where is the bot ?
 
however it was an unwanted edit
 
> If code is eval code, then let configurableBindings be true else let configurableBindings be false.
 
I need one that I can have the option of multiple rows
 
bad shog9 bad
 
4:57 PM
@rlemon can you run your metaball code on the top of this ? codepen.io/darkyen/pen/LkAFb
 
@Darkyen Bermudas.
 
now I need to wait for you to leave to change it back secretly.
 
i think if you make them metaballs the output should be funnily intresting :D
 
user1596138
@rlemon I wasn't bashin' the aquarium site... I'll probably use it! I haven't got my salt water tank going yet in my apartment.
 
@Jhawinsss when you do I am here to discuss :P
I have ~6 tanks, three salt.
 
4:58 PM
@Esailija also, in strict mode I get "Delete of an unqualified identifier in strict mode"
 
I say ~6 because one is a fry tank. very small.
only in use when I have fry
 
in strict mode you should get illegal eval
in strict mode eval cannot introduce new variables
 
also @Jhawinsss I have a lot of DIY plans for lighting / sumps / chillers / etc.
save some $$
 

« first day (964 days earlier)      last day (3987 days later) »