« first day (478 days earlier)      last day (4462 days later) » 

GGG
12:04 AM
yay look at the back of my deck - jsfiddle.net/wE8te/33
only works in chrome
but it hink i can make it work in others that have multistop radial gradients
and fallback to solid color :) these are looking good
 
12:36 AM
Hello, everyone!
I was wondering if you would like to check a simple function idea I came to and if it's possible. I hope it's ok to link to my post: stackoverflow.com/questions/9123232/…
 
GGG
12:49 AM
@Melros try adding an invisible element at the end to take up the rest of the space
the invisible element should be almost as wide as the containing area, but not quite
it's amazing how crappy css is for grid layouts
 
0
Q: Get points on a line between two points

StephenI'm making a simple space game in JavaScript, but now I've hit a wall regarding vectors. The game view is top-down on a 2d grid. When the user clicks on the grid, the space ship will fly to that spot. So, if I have two sets of points: { x : 100.2, y : 100.6 }; // the ship { x : 20.5, y : 55....

 
Hello @GGG. Yes that's what I want the script to do cause as I described in my question the number of divs will vary cause the client will generate them. Also the website is responsive so the number of divs in a row will also vary. This is why I am asking...
Otherwise it would be clear the answer, yes. But's not that case here.
 
GGG
no it works... just always add a blank div at the end
that is almost as wide as the containing area
i think it works anyway, pretty sure i've done this before
maybe that's wrong, maybe you need to as many blank divs as you have columns, minus one
that are the same width as the columns
yeah that's what it is
it will result in some empty space at the bottom but your columns will line up
then you can get rid of the empty space with some css hack
 
Yes, as I said it works Iif I had control over the website. But this website is run by a client that just add divs and cannot take care about invisible divs that has to be added and cannot take control over the responsiveness of the side. :)
 
GGG
if you use the same number of blank divs as columns, you'll always have the empty space at the bottpom so you can adjust for it
just add the invisible divs with javascript?
or you can't load a script
 
12:56 AM
Yes! thats the solution I'm looking for if there is no other way to do it dynamically.
 
GGG
well you could use the css :after pseudo-selector and content property but it won't work in ie
yeah i'd just insert them with javascript
if you want four coulmns, append four blank divs that are as wide as the columns
and do the justify thing
and trim the extra space from the end
actually they need to be spans for it to work on ie
 
So would you think the scripting idea I posted would be cool? Is it alot work to achieve this? Iam now trying it with my bit of jQuery skills but I'd like to see some expercts doing this. I claim this would be helpful for others to which havent't found a proper solution to this eather.
 
GGG
if you already have a handle to the element just do something like
for (var i=4; i--;) foo.appendChild(document.createElement('div')).className='invisible-thingy';
the rest is css
just always append the same number of placeholders as columns, that should always give you one extra blank row to trim off
no need to calculate anything other than number of columns
which is probably a constant
except use span, not div, because foohack.com/2007/11/…
 
Oh wait! You just brought light into my head. Beside that my understanding of pure javascript is limited to the little I know from jQuery I just did what you where talking about. I just added the same divs in width but only 1px height (in this case 4) to the wrapper and it works for all states! I just discover some jumping with the very last item. But that is to find out. Woho, so for that thank you already a lot to bring me on the right direction..I haven't seen the trees in the wood anymore..
 
GGG
hahah no problem. I'm sure someone will come along and say this whole thing is a terrible idea, but i can almost guarantee nobody will provide a better solution
 
1:11 AM
well, at least for the reason that it works without any javascript it's just amazing! thanks for the article! I'll have a read now!
 
GGG
man i didn't even think about the one px height thing. See, teamwork!
 
hehe, well thank you very much for saving my night so that I can go on with that project! And I just found out why it was jumping, I simply forget the margin that I am using on the other divs to. Seriously, thank you! Gonna post this right now..
 
 
1 hour later…
2:31 AM
dance all day.
 
user1385191
2:48 AM
mmm...love database design
 
9:51 AM
anyone in here?
 
10:17 AM
hi, i never got it if its
$("#container").css('padding-top','+='+newPadding); or $("#container").css('padding-top', '+=newPadding'); or $("#container").css('padding-top', +=newPadding); or $("#container").css('padding-top', +newPadding);
 
!!/tell rob.m jquery css
 
'+=200'
but that is terrible thing to use jquery for
 
@ThomasBlobaum why?
 
just my opinion
 
well ok, i accept it but explain
 
10:26 AM
This is just awesome:
!!give Thomas a lick
@Zirak Mmmm! Thomas taste just like raisin
It does need conjugation, though
 
...
!!give Zirak a swift kick in the ass
it doesnt work
 
Because it only reacts to certain things :D It tells everyone who says something to it matching /give ([\w\s]+) a lick/, give $1 a lick (well, with some more logic, but basically)
 
well
as far as i know these 2 shoudl be doing the same thing
( "padding-left", "+=15" ) / ('padding-top','+='+newPadding);
but first doesn't work and second does
and i don't understand why one should and the other shouldn't
jquery i'm using is 1.7.. so it should accept both ways
duh
 
maybe you are adding padding to some element that isnt reflecting the change
 
it does if i use this ('padding-top','+='+newPadding);
and doesn't if i use ( "padding-left", "+=15" )
since they do the same thing, i get confused
 
10:31 AM
ok well those arent quite the same
 
oh thanks,t hat's what i needed to know!
 
lol
left isnt top
 
the docs only talk about this ( "padding-left", "+=15" )
te other way ('padding-top','+='+newPadding); was provided by a user
 
Well, the first changes padding-top by newPadding, while the second changes padding-left by 15. It's kinda not the same
 
so ..dunno..i did read the jquery docs but if they only talk abotu one way an it doesn't work and then a user comes up with anotehr way and it works..i first get a UH? and then A LOL and then a what the fuck?!
 
10:33 AM
thats just javascript, there's no reason why one should work and the other shouldn't, i'd be inclined to think that the element is merely not reflecting the change, use inspect element and confirm
 
oh damn, SORRY
 
sometimes its hard to grok the level of competence of people in this chatroom, so
 
haha
 
copied from docs, of course
i meant to write this!
( "padding-top", "+=15" ) / ('padding-top','+='+newPadding);
:)
 
10:35 AM
newPadding = '15'
 
ok i'm stupid
( "padding-top", "+=newPadding" ) / ('padding-top','+='+newPadding);
that's th actually correct one, sorry!
 
so the first one is not going to work, because js !== php
still not sure what the issue is
 
th issue is that i have
var newPadding = $(".detta .content").outerHeight(true) + $(".titolo").outerHeight(true);
then i read th docs and it says to use this
( "padding-top", "+=newPadding" )
butit doesn't work
('padding-top','+='+newPadding);
so i used this
 
you cant just put a variable inline like that, look at the fiddle @Zirak just pasted
 
10:38 AM
Of course the first doesn't work, why would it?
 
why not is my question
yeah and var padding = 15 ok
what's wrong in declaring
var padding = $(".detta .content").outerHeight(true) + $(".titolo").outerHeight(true);
 
i didn't know that you can "+=15" in a jquery css setter.
 
Because the first is a string who's value is +=newPadding, and the second is a string, +=, which was concatenated with the variable newPadding
 
string or number shouldnt matter, forget i said that
 
from docs
As of jQuery 1.6, .css() accepts relative values similar to .animate(). Relative values are a string starting with += or -= to increment or decrement the current value. For example, if an element's padding-left was 10px, .css( "padding-left", "+=15" ) would result in a total padding-left of 25px.
 
10:39 AM
The docs say "+=15"
 
yes
 
Do you know how strings even work?
 
( "padding-top", "+=newPadding" )
 
stop typing that shite
 
facepalm
 
10:40 AM
lol
 
use between " ", newPadding is a string, not a var
 
right
thought it was a var
 
When it sees "+=newPadding", it treats everything in it as a string, and has absolutely no reason to embed the value of the variable newPadding into it.
 
ah
 
- php style -
 
10:41 AM
there we go
 
...and this is why people should learn js before...
 
2 different opinions
so zirak you are i should be doing
( "padding-top", +=newPadding )
 
nop
 
cries
 
10:42 AM
otherwise " " would be treated as a sting
 
Please. Please please please please PLEASE learn javascript or for that matter any programming language before continuing.
 
wicked
thanks
 
( "padding-top", "+="+"15")
 
thomas
this works too
 
Because you're doing a very retarded thing. I don't know if you're retarded, don't know you very well and it just might be because of the shoes, but I'd like to think that it's because you just don't have this basic knowledge. So, go learn it.
 
10:44 AM
$(".detta #container").css('padding-top','+='+newPadding)
 
Specifically, a chapter about strings.
 
( "padding-top", "+="+15)
blame jquery
 
yeah thomas
but you said this just above
( "padding-top", "+="+"15")
 
it's evaluating += internally, which is like going another level deep, hard to grok and a bit of an anti-pattern, which is why i said i wouldnt use that part of jquery far farther up
 
you do realise the " " are different in your 2 ways?
 
10:46 AM
@robm both will work
 
Zirak... you sometimes are very haughty - i know i can be too - ... you can not expect people to understand as fast as you do... or just don't try to answer them...
 
hmmm
ok so
 
@DieVarDump I don't expect them...but I do expect them to have basic swimming knowledge before jumping into the deep-end of the pool
 
i got that i am: a retarded, that i can't think as fast as you do, more?
 
@DieVarDump no we explained to him 4 times each, it wasnt haughty, see the part above where i said its sometimes really difficult to remain helpful while accurately interpreting the level of competence of people in the channel
 
10:47 AM
so i amr etarded because i don't know about strings in js? ehmm yeah LOL
i think slow because i don't if it's "+=" or +=
 
@rob.m no you just dont know js, different story, go watch some crockford videos and read some js tutorials, that is all
 
thomas
you do realise i have a client and i had to learn javascript in 2 months and i am a designer yeah?
 
how could i realise such things
 
you dor ealise in 2 months i read so much and learn so much i was able to build this?
 
A monkey can learn jQuery, because jQuery was made for monkeys
 
10:50 AM
fine i am now even a monkey zirak
 
it doesnt matter
 
Anyway...I recommend these two: eloquentjavascript.net and codecademy.com/#!/exercises/0
 
god knows why you are in a javacsirpt room, to do what? to call people monkeys? or are youa ctually the only monkey in here?
 
did you learn something new? be thankful, forget whatever else
 
thomas, final thing
i am alone in a bloody rooma nd no one else to talk or ask about it
 
10:51 AM
stop talking crap towards people that tried to help you and got frustrated
 
sorry if i don't get a += or "==" lol
thomas atcually you have been very kind
but shit man
a retard, a monkey, slow thinker
 
im not kind, just enough with it, jquery is made for monkeys, you are the one that called yourself a monkey
 
No...you're not a monkey or a retard, at least I really hope you're not
 
lol
right
zirak i start to think you are actually, sorry mate
 
-___-
 
10:53 AM
I've said that I don't know if you're retarded, which you translated to "you're retarded", and that "jquery was made for monkeys", which you translated to "you're a monkey".
 
anyway i was only asking a stupid question, didn't want to go all freud about it
 
But I really don't need to defend myself, so I'm gonna shut up.
 
just take what help you got and move on, dont focus on a few random negative comments, everyone gets them
 
@ThomasBlobaum :) thanks man
 
what should i add to this list ppls
trying to start a little library i guess
 
10:59 AM
Code Complete
And Uncle Bob's "Clean Code"
 
but isnt that a microsoft book =/
 
Even if either one is, it's awesome
 
A lot of people also recommend "Godel Escher Bach", but I haven't personally read it
 
never heard of it
im not against philosophical books, so long as they remain pragmatic
 
11:04 AM
Yes, that one. And I don't know either way, it's on my reading list as well
 
oh dayum, 700 pages
 
oh! If you're not scared of a little math, "Introduction to Algorithms" by Thomas(?) Cormen is amazing.
It's where I fell in love with linked-lists <3
 
ah, yeah its been a few years but i recall that might have been one of my textbooks in college
if not it was one very similar
 
<3 math
yup
 
11:11 AM
sdfgdfghfgh
 
some technical things related to programming are just more easily accessible on the internets tho
 
For general reading and not explicitly for programming, I always recommend Catch 22 and The Little Prince. They make you think differently.
 
ask questions??
 
whereas technical math concepts, not at all, so i like programming books that deal with the abstract or advanced parts
normal programming concepts the web is usually better to find the info
 
yeah, that's a problem with technical books today. I searched for a C book recently (since mine is from the 80s), but found out that The Interwebz covers it nicely.
 
11:14 AM
search in gupta's book store
 
and i'm always trying to understand the business side of programming better so those are on the list
if someone were to expound on the explanations that are on this site it would be book-worthy, imo
 
one of these days i'll make a book with a black and white animal on it
 
Zebra? Penguin? It surely already exists
 
heh
i'll use one of those japanese crabs from Cosmos that looks like a person's face
that might be taken too though
 
 
1 hour later…
12:34 PM
Douglas Crockford is awesome: github.com/douglascrockford/JSON-js/issues/28
Also, RFC: github.com/Titani/SO-ChatBot/blob/master/bot.js#L429 Anybody know a better way to do that?
 
12:52 PM
hi
see my code: jsfiddle.net/tmDpZ/8
i got
but I have a problem in color..now
see: http://astro.unl.edu/naap/hr/animations/hrExplorer.html
when temperature = 2300 ...the color is Dark Orange
in my code....the color is light orange
what can be?
 
1:10 PM
is that you (avatar)
 
do you really need to copy the colors too ?
 
just read this blog post about "focus" and using electric current (tdcs or some such) to induce it... man... what shit
it would be nice to be able to reliably get into "the zone" but i'll be damned if we should all be frying our brains with electricity to do it
 
I wouldn't trust the native arithmetic system with calculating anything more important than array offsets
@ThomasBlobaum We're already destroying our body with chemicals on a daily basis, the day isn't far
 
the color dark orange represents the temperature of the sun
 
Then I'd use some BigDecimal library to do these calculations (on the assumption that you're fiddling around with decimals, not integers)
The good ol' 0.1 + 0.2 !== 0.3 comes to mind.
 
1:15 PM
@Zirak is text a string ?
 
@DieVarDump Yep
 
I think i'd have make daliciousObject a constructor, initilized with text and msgObj.
Cause you always extend text with the deliciousObject keys, so why don't create a new object with text and msgObj as properties
But i don't know how you use it after so, maybe it won't fit.
 
It can technically work, but I don't trust myself with new
 
1:32 PM
I can have it use Object.create internally, though
 
2:14 PM
@Zirak why don't you trust new ?
- just curiosity -
 
2:30 PM
@DieVarDump I don't trust myself with new. I either forget to use it, and then horrible stuff happens, or I think about things which use it as "classical classes".
 
Hey guys1'11'11
 
2:56 PM
Hi all
still having an issue that input checkboxes are not checkable.
 
I really don't know why ... :-(
 
check css
absolute positioning causes issues
or check event bubbling
 
@JohnMerlino for checkboxes?
 
sometimes this is an issue:
 
2:59 PM
@JohnMerlino this is the ONLY js on the page (aside from the jQuery library): pastebin.com/LnkVdRUn
 

« first day (478 days earlier)      last day (4462 days later) »