« first day (960 days earlier)      last day (3989 days later) » 

12:02 AM
(1) b = -9.333333333333
(2) a = 1.7466666666
Nope it doesn't work
So... I do not remember
 
What you have to do is to find the function that transform you x into your y
and the values you currently have should help
But I do not remember how to do that
 
m59
12:22 AM
I might be starting to understand it finally
I think what I had up there may be more right than I though
thought***
 
I kind of feel bad having a silly jQuery question in a serious JS forum but a Scrolltop(). that goes past the top of a DIV by 72px is making me crazy.
 
user1125394
^^ if you want equations with polynoms, you want a polynom of 5th order
 
user1125394
since you have 5 points
 
@xcx 4th
 
user1125394
hehe, yes
 
user1125394
12:24 AM
but polynoms are just one way to interpolate, there are many
 
hi
haha
stackoverflow and programmer exchange are great places to ask stupid questions that I cannot ask to teachers & others in real life
 
Glad to hear it :)
 
@Imperative me?
 
I normally use the hell out of that :)
@O0
er
@O0oO0oOO0ooO yes
Luckly I have a staging site online so it's easy to show this one
@O0oO0oOO0ooO I have this front page set up: http://clients.imperativeideas.com/yahid/ and click or scroll should jump from .landing to the top of .below based on this:

// Landing area: jump to .below
function gobelow() {
below = $(".below");
if ($('.fixedmenu').css('position') === 'fixed') {
thedoc.stop().animate({
scrollTop: below.position().top - menuheight
}, 750);
} else {
thedoc.stop().animate({
scrollTop: below.offset().top
}, 750);
}
}
But it jumps 72px too far
to the top of the H2
It works with no text in the welcome are on .below
but when the text scrolls past the bottom of the portal, it jumps wrong
the whole jQuery setup is located here
http://clients.imperativeideas.com/yahid/wp-content/themes/couture/library/js/theme.js
but I doubt you need most of it
I realize I could be more efficient on a lot of this but I'm still learning the serious stuff
 
@m59 a polynomial through those points won't give you a very smooth curve
 
12:32 AM
I see
 
Yeah, sorry to vomit all that on you guys :p
I'm just not sure where the math goes wonky
 
wait
what's menuheight ?
 
(the problem with using jQuery instaed of a manual function I guess)
 
Bwomp
 
Well, I can delete it and it jumps to the same place
I remove the menu height in the non mobile version because the menu is fixed
Below 768 and it is just a top div
actually I could delete the conditional because I no longer use gobelow() in mobile - that's old stuff from when I was doing it differently
oh wait no it's still used in non mobile narrow browers
 
12:35 AM
Be lazy and sub the px
 
that's why I have it in htere
heh, yeah I could probably measure landing and just use the px
I'd like to understand why it's breaking though
only way I'll actually improve
 
Use dev tools inspect element and see if its all the size and where it should be is the only thing I can suggest
 
@XCritics They all appear to be correct. Something about the text in .below being larger than the window portal height causes it to scroll wrong
That said it wouldn't be the first time that too many jQuery measurements caused a late calculation to be wrong. My experience is that jQuery likes very simple instructions.
Perhaps if I do getvertical() on window load instead of document ready...
But I'm just shooting in the dark here
 
Or just, not use jQueero ;)
 
Yeah, that's the end goal. My friends at Hot (well Facebook now...) told me to learn jQuery first and it would make JS a lot easier to pick up
I can CSS the shit out of something but JS needed to be learned
 
12:40 AM
what is Hot?
 
Lunch for Facebook
 
They were one of the top dev firms in SF
Basically, FB decided they needed a better UX team so they just ... bought one
 
sick
 
This chat gets really on edge when people use jQuery without knowing JS so I suggest you don't say that :)
 
12:42 AM
Yeah I know it does
Though to a guy with an advertising degree, JS first is freaking intimidating
I am, however, going through JS lessons now that I get the basics though
And crap like this ScrollTop() issue that wouldn't happen if I wasn't reliant on a library is all the justification I need to keep learning JS.
 
Codecademy is pretty good for starting js
I learned most from playing with Node.js
 
Right, this is actually where I started. Then I went and did the nettuts jQuery in 30 days course, then I went back to JS and it made a LOT more sense. I'll give this another look.
Also, I think I found my problem. Something is caching this.
I deleted the entire .js file and the site was like "yeah, got it, scroll to the same spot"
back to localhost I go
Love it when that happens. Waste of 30min.
 
1:09 AM
0
Q: Artifacts in grid-based shadow engine

user1667423I am trying to create a grid-based shadow engine using JavaScript. My algorithm shades squares based on whether their position is 'behind' a block, relative to a light source. This is my algorithm so far: http://jsfiddle.net/carlosmarti123/XCMkU/ Unfortunately, as you can see in the demonstrat...

 
m59
@phenomnomnominal yeah, I think I finally have polynomials figured out (enough to get somewhere), but I'm too tired to tell at the moment.
 
@m59, nope they wont work
What are your values again? 12.5, 64.5, 78, 84, 87.5?
@m59, here you go: wolframalpha.com/input/…
 
wolframalpha is amazing
I need ideas
Is it message.match(/\/test--\/\/) if I want to match /test--/ ?
I'm not good with regepx x.x
 
1:35 AM
what would the backslashes do?
 
escape forward slashes
I thought
 
what would escaping the closing delimiter do?
 
That's what i was unsure of
 
It would make it not a closing delimiter
 
  7       var message = msgData.r17.e[0].content
  8       console.log(message);
  9       if message.match(/\/test!--\//) {
Gives me an error on line 9, unexpected identifier
What's a good language everybody should learn
 
1:45 AM
is that coffeescript?
 
fml
 
concerning your snippet, not your followup question
 
lol, I guess I did write CS, my bad
 
if that's javascript, you need parentheses around the condition
 
yeah :/
 
1:48 AM
Concerning the followup question: Ruby, and maybe C#. I haven't tried the latter.
 
C#?
 
I've heard it's pretty good
 
Yeah I learned a little bit of it a while back
what's your favorite language to write in
 
so far, ruby
 
For me, probably JavaScript.
But my favorite language to develop software with is C#.
 
1:57 AM
Probably Java and Jquery
 
I love Javascript's scoping rules, but the function keyword is far too long :-)
@copy I agree the DOM API is pretty bad
 
That's exactly what I said
 
I love javascript except when golfing
 
For me it's quite the opposite
For (some kinds of) UIs, JavaScript is pretty cool
But I'd never choose it over python
 
never tried Python
 
2:03 AM
@JanDvorak You think JS is bad for golfing? Try C#!
 
Golfscript looks great for golfing... unless you actually try it out.
J looks great but I can't find a decent documentation.
 
m59
why doesn't this center?? jsbin.com/eguwiv/1/edit
so simple..
I don't get it
 
because of position: fixed
 
how can this be solved?
 
m59
So the only solution is to give it a parent with width 100%?
 
2:11 AM
there is already one
 
the only solution is to not use position: fixed
 
m59
no, because I solved it lol
I just wanted to solve it without nesting
 
@m59 show us
 
`left: 50%;
margin-left: -43.75%;`
I've become bad at arithmetic ... at first I tried 48.75%
 
2:15 AM
how do you update a repo in jsbin anyway? in my opinion jsfiddle handles this better than any of the others
 
0
Q: Setting element attributes via JavaScript as opposed to in HTML code itself

ChantzWhile code reading I came across a piece of code in JavaScript which set the placeholder attribute for an input element ($("#el").attr("placeholder", "I am Input");). I myself have always set such attributes in the HTML markup itself rather than relying on JS for this (<input id="el" type="input"...

 
m59
just click share
 
@ExplosionPills it refreshes automagically
 
yeah but it doesn't create a permalink each time right?
I like the idea of revisions
 
m59
Sorry, the first one was demonstrating something else
this one is what I meant
 
2:17 AM
@md59 yes use left: 50%; margin-left: -50% without the wrapper
 
m59
ahh
nice
 
I have just realised Erlang
stands for Ericsson Language O_o
 
you realized it or you read it somewhere?
 
huh? I realised it
 
m59
@ExplosionPills margin-left: -25%
 
2:20 AM
@m59 the left part is also important
 
m59
yes yes, I just meant that it is half of the value of left
 
exactly, but it's based on the width which you also have to set
 
m59
rather than the same value
 
m59
ahh...
is there a formula for that?
50% is easy
 
2:23 AM
you can use the same technique for position: absolute
 
m59
but other than that, kind of a disaster
 
I think margin-left is 50% of the width
so if width: 20% you would say margin-left: 10%, but left is always 50%
give that a shot
this only works for set widths ... you can use percentages
 
m59
yeah, you got it
thanks so much
makes a lot of sense
 
not quite JavaScript related, but I guess there is no CSS room :P
 
m59
well LOL, as much sense as css can make that is
I, possibly incorrectly, just think of this as the web dev room, since all kinds of subjects get discussed anyway
 
2:25 AM
well I never come in here ... I should more often
 
m59
I've helped people with css on a few occasions myself lol
 
I used to go in the php room for a while, but I don't care talking to some of the people there
 
m59
Well, you do kind of suck.
j/k :)
 
are you trying to get me to abandon this room too? :)
 
m59
hehe
 
2:30 AM
is there some relationship between Erlang and JS? I've heard it before...
 
m59
no idea
I basically don't know anything about anything.
 
I feel the same way
I need more good developer friends
 
Can you 'solve my solution'?
 
solve a solution? Is your solution in regex?
 
19 hours ago, by Question Generator
@JanDvorak...can you solve my solutions?
Was quoting this retard guy
 
2:41 AM
@AndyM 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.
 
@SomeKittens You get that new apartment yet or what
 
2:54 AM
cool; someone has javascriptroom.com
I'm jealous
 
That links to here doesn't it
 
aye
 
@phenomnomnominal Out of curiosity, you use the default OS X terminal?
 
3:05 AM
kk, is there like a page up or page down, cmd left and right just makes my computer ding
works in everything minus notepad
 
yeh, dunno
 
okey
 
where did you get the background image for your website?
 
@phenomnomnominal CTRL+A CTRL+E is what I Was talking about just fyi
 
3:13 AM
lol
0
Q: Javascript now working

user2444409HEllo Geeks :) Sponsor gave me JS script with variables. I have integrated code in my website and i'm getting direct link from server. This code should take variables and sponsor server should return *.exe file (it's like wizard with offers on final step it takes download link and saves that file...

 
well at least JavaScript is now working
 
user1125394
you can't say 1 fav language
 
as far as I know that hasn't been the case for some 30 years
 
user1125394
you can't find everything you want in 1 language (unfortunately)
 
3:16 AM
@xcx just joking around ... JavaScript is probably my favorite language actually
hell, I like PHP
 
@ExplosionPills JS is awesome :)
 
This font I found
 
It's far from perfect, but it's very good
 
is giving me a nerdgasm, it's so nice
 
@XCritics what is? vim?
 
3:17 AM
It's a font for everything in the terminal
It just looks really nice to me to program in
 
@XCritics I can see you're still not using my userscript
 
vim is the greatest editor ever, obviously
 
Link it
 
user1125394
for my opinion, to do a neural network would maybe do c#, a GUI maybe Qt (C++), a http server erlang, cowboy is too great, etc...
 
3:18 AM
that's not fair, I don't know C#, C++ or Erlang or why I would use any of them
I still have too much to learn; I can't even choose between languages
 
@ExplosionPills the fact you don't know C# or Erlang is probably why you like PHP :)
 
I don't know C# or Erlang either
^^
 
You people should start learning C#, it's an awesome language, really.
 
Explosion and I, are like 0.1 alpha difference lol
 
I'm off to catch the bus, GL people
(I don't dislike php, but don't tell anyone)
4
 
3:20 AM
@BenjaminGruenbaum well I know a little C#, maybe I should learn but I have no reason to
 
@BenjaminGruenbaum don't worry, I will
 
To the top!
Too bad this isn't reddit so I can just piggyback
 
@XCritics Putting in deposit tomorrow
 
@JanDvorak well even not knowing all these awesome languages we can still code circles around all these people right ;D
 
3:21 AM
Yeah
I've just downloaded J
 
@JanDvorak what is J?
 
@ExplosionPills jsoftware.com
it's an advanced golfing/statistics language
 
what is golfing?
 
user1125394
coding on grass
 
3:24 AM
Trying to solve a problem with the least amount of code
 
I don't think I make enough money to do that
 
@JanDvorak so what is J written in? doesn't seem like I can ascertain that
 
IDK
 
man you guys make me feel dumb
 
3:32 AM
@phenomnomnominal did you ever release your page yet?
 
@XCritics, getting there bro
It's a fuckload of work
 
I'm super excite
 
I need to stop refactoring eventually, but I keep coming up with more robust ways to do things.
 
I have that problem too :/
omg I forgot how much I love iterm
being able to CMD+# to switch to whatever tab
nerdjs
 
3:57 AM
Cute.
Also, someone benchmark it
@copy opinion?
 
I'm sleeping already, ask me again later
 
GacntMac:portfolio GacntMac$ nodemon -e ".coffee|.jade" app.coffee
1 Jun 22:04:21 - [nodemon] v0.7.8
1 Jun 22:04:21 - [nodemon] to restart at any time, enter `rs`
1 Jun 22:04:21 - [nodemon] watching: /Users/GacntMac/Documents/Javascript/portfolio
1 Jun 22:04:21 - [nodemon] starting `coffee app.coffee`
Express server listening on port 3000
 
@BenjaminGruenbaum, I saw that a while ago, their logo is too ugly for me to try it
 
This makes me happy
 
4:15 AM
Backbone is slow, what a shock... jsperf.com/backbone-vs-john-resig-class/4
 
Hello my feathered friend
 
In JavaScript I can do this `if(a || (funcHere(), b)){}` http://jsfiddle.net/DerekL/umpaX/
I'm wondering if I can do the same thing in PHP?
 
I.. I'm not 100% sure, but I think you're in the Javascript room
 
@StephenPrice 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.
 
4:21 AM
Yea I know because the example I have there is in Javascript so I thought I should ask here first
maybe I should also ask over there
 
m59
@Derek朕會功夫 almost positive, no
Oh
scratch that
I don't know.
I read that incorrectly.
 
m59
That isn't very easy to read though.
I'd consider doing it in a more understandable way
 
Used to use shortcuts so I can type fewer keys :P
 
m59
whatever you like!
it has its drawbacks though
 
4:26 AM
Drawbacks?
 
m59
Well, people are less likely to want to debug it/help with it
but if it's just for you, doesn't matter
If you're writing js like that, though, you probably already know that haha
 
@msh210 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.
 
This one is just for me so writing like that isn't much a problem
 
All right, bot. Er, can anyone with enough rep give me the URL of my latest, deleted question, please? stackoverflow.com/users/552647/…
 
@msh210 Your profile didn't show any deleted questions...
 
4:31 AM
@Derek朕會功夫 There is at least one, though I may have given you the worng URL.
@Derek朕會功夫 Perhaps stackoverflow.com/users/552647/…?
 
I think it won't show any deleted question unless you have the url
 
@Derek朕會功夫 That's true for me. I thought high-rep users can see it. Maybe I need a diamond mod.
Thanks for trying, anyway, @Derek朕會功夫. Bye; good time zone.
 
Any 10k+ rep users can view deleted questions, but I don't know if they can view it in your profile
 
m59
4:48 AM
I WIN.
@phenomnomnominal jsbin.com/eguwiv/13/edit
Finally
Oops, I meant to change the skewed angles to css pseudo elements
but yeah, super light-weight, scaling, responsive trapezoid with gradient.
YES.
 
Not sure what I'm looking at
 
m59
Just be proud :)
 
except they look gross when youre streching the window
tell me, why did you not just to a perspective transform?
 
m59
Because that goes wrong in every kind of way
 
What am I supposed to see?
 
m59
4:51 AM
I have a ton of criteria for this thing and it finally meets all of it (except looks ugly while resizing)
 
@m59, how so?
 
m59
well, first, go on the js and change centerWidth to anything
and everything works
 
@m59 Oh you're just showing the dock
What happened to the icons and everything you had at one point, I was confused
 
m59
Ahhh, yeah dude, I had to improve it :)
 
4:53 AM
@m59, want to know a big big big secret?
 
m59
Yes?
 
If you go learn about the Orthographic Projection matrix, and apply that as a CSS3 transform, this will be about 4 lines
 
m59
Whaaaaat
and it will be responsive in every way and have a gradient?
 
Sure
It would just be one div
for the top surface
and probably a second one for the front face of the dock
 
m59
kidding me :(
 
4:56 AM
This is what is known as the X Y problem.
220
Q: What is the XY problem?

GnomeWhat is the XY problem? When asking questions, how do I recognize when I'm falling into it? How do I avoid it? Return to FAQ index

 
m59
I'd like to point out that I have discussed this problem here like....100 times (the actual one)
no one could ever propose anything better, and I googled for a good 10 hours about it
 
I've never seen it, all I've seen is the sequence thing
 
m59
everything and everyone said css borders, maybe a skew/mask
 
Are you on OSX?
 
m59
mine is FAR better than any example or suggestion I've been giving, so I feel good about that, but sheesh
No.
I just do this because I learn a lot in the process.
 
4:59 AM
Okay, I was going to show you something on the dock, but don't worry
 
m59
I've been messing with it on and off for like....over a year.
Maybe about 150+ hours now.
I really suck :(
 

« first day (960 days earlier)      last day (3989 days later) »