« first day (977 days earlier)      last day (3973 days later) » 

12:01 AM
hmm /me scratches beard whilst deep in thought
 
@Dave I'd just allow a reflow... but what specifically is it used for?
 
its a game so when you click a sprite itll pop up a window center of your screen (the canvas is full screen) and the menu will show information
i have to use offsetHeight to center it's height - centering its width i can technically do with CSS
CSS lacks height centering simplicity unlike width
 
If each window has a set height, then you don't have to deal with it
 
well thats what i could do is set their height and use a scroll bar to scroll the content in the popup
currently thats not what i do but i might be a better option
 
Whatever you want.
 
12:07 AM
if CSS allowed centering vertically easily i could remove JS from that aspect completely
 
12:24 AM
Has anyone written a CoffeeScript -> CSS tool yet?
 
never used coffee script
 
And, just out of idle interest, is CoffeeScript as popular with node folks as it is with browser devs?
I mean for server-side programming.
 
@loading... It's a lot more popular for server side than for client side afaik
 
Ah, interesting, given its origins, but I suppose node's infrastructure makes using it easier.
 
hey
0
Q: Nivo Slider Issue?

Elite GamerI have been using the Nivo Slider for a while now. I recently was working on a website, that had a nivo slider in it. So, i just copied the code over. Everything was working perfectly, until a couple minuets later, i looked and i had 4 images instead of three, and the first was blank, and all i s...

 
12:30 AM
@EliteGamer Sounds like an 'act of god'.
 
i know XD
i have no idea what is causing this
 
You'll have to figure out what you did.
 
i tried
i replaced everything with what i had earlier
all the code i added was the ticker
 
> So, i just copied the code over.
סּ_סּ
 
Start from scratch.
 
12:33 AM
well, for the slider
it all worked until i added the other code, and now it will not work at all
 
maybe a scope issue?
 
So remove the code and see if it starts working again.
 
i have
it will not work
 
welcome to jQuery
 
Start from scratch.
 
12:35 AM
@Dave yea lol
 
@loading... you should assign that to a hotkey :P
 
it says the error is inJquery min
jquery.min.js:4
 
is it up to date version of jquery?
 
That's not a bad idea.
 
12:36 AM
Maybe the bot should have a programming advice heuristics module.
 
maybe dont use minified version till you get it working
 
well, it works the exact same on the other site with that jquery
but not on this one
ok
 
im guna guess something has the same function name maybe
if it works without the extra code re-add it line at a time till it breaks
does any one remember programming JS back when browsers did not have firebug and chrom dev tools
couldn't cope without them now
 
even when i take the code out, it still will not work
 
Heh. I used to have to write everything for IE6.
Of course in reality that meant writing for Firefox or Chrome and then making it work in IE6 (cos IE dev tools are pants).
 
12:40 AM
@EliteGamer then i can only refer you to @loading...'s quote of the day
@EliteGamer in your question where did you include jquery library?
 
		<script src="http://code.jquery.com/jquery-latest.js"></script>
		<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
		<script src="nivo/js/jquery.nivo.slider.pack.js" type="text/javascript"></script>
 
user1125394
load jquery2.0 in addition and you'l be safe
 
So why is JS looking on your local drive??

C:/Users/Hunter/Desktop/Websites/Team%20Fear%20Pro/undefined jquery.min.js:4
 
:D
 
can you link me?
@Dave I have No idea
 
12:43 AM
nivo is local folder right?
 
hunter, lol.
 
yea
 
it says undefined so u must have variable in the string that is getting the src?
 
shikari
 
		<script type="text/javascript">
			$(document).ready(function() {
				$('#slider').nivoSlider({
					effect:'fade', //Specify sets like: 'fold,fade,sliceDown'
					slices:15,
					animSpeed:650, //Slide transition speed
					pauseTime:6500,
					startSlide:0, //Set starting Slide (0 index)
					directionNav:true, //Next & Prev
					directionNavHide:true, //Only show on hover
					controlNav:true, //1,2,3...
					controlNavThumbs:false, //Use thumbnails for Control Nav
					controlNavThumbsFromRel:false, //Use image rel for thumbs
also, no errors on files missing, except that wierd error
 
12:46 AM
why close the script tags only to re-open them again
 
well, i like it that way, but let me change that
 
is that in a html file?
 
yes
 
I think it's important to learn how to debug before you learn how to code.
 
also it be best to seperate js from the html file
 
12:48 AM
how?
well, i know how
but i need to call the Jquery plugin
.nivoSlider();
 
call it with window.onload?
have you worked out how the JS works or have you just copy pasted an example script hopeing it would work straight off the bat?
 
yes and no.
 
:P
 
This code works, because i used it in many of my projects
but it will not work in this one
for som reason
 
then there must be a scope issue where some thing has has same name
 
12:50 AM
@EliteGamer But you just said it works.
 
or one of the js files is not being included properly... are you clearing cache ?
 
let me clear my cache
 
if u have dev tools on chrome you can turn off cache in the options so when its open itll always clear cache
 
let me rebuild from scratch
i will come back if i get anything again
 
And breathe.
 
12:53 AM
lol imma go play bf3
 
I like Black Ops.
 
Hisssssss
 
:-)
I like how it's set in the 70s. I don't like futuristic shit.
 
did you see bf4 in e3? or did the dog impress you more
 
@user1629569 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.
 
12:55 AM
I have no idea what you are saying :-)
I'm not a gamer.
 
ah fair enough
 
My son and my dad are, but they're both at a stage in their lives where they have time on their hands. :-)
Anyway, all my gaming time is taken up with code golf. :-)
Plus maybe other shooters are the same, but playing Black Ops feels a lot like paintball :-)
 
Yay I got to use reduce in an answer, even if it's stupid
0
A: Testing for multiple conditions dynamically?

Benjamin GruenbaumOne way to do clever syntax is having an array of functions returning boolean. function biggerThanThree(){ return x>3; } function smallerThanFive(){ return x<5; } var predicates = [biggerThanThree,smallerThanFive]; //matches all conditions var valid = predicates.reduce(function(x,y){re...

 
@Benjamin nice answer thats handy stuff to know
 
@simpletron 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.
 
1:07 AM
I don't think it's stupid actually
'if any of them arent true than it returns false' -- that made me think of every initially.
 
Yeah, me too
I guess I could have used every
predicates.every(function(elem){
    return elem();
};
 
@BenjaminGruenbaum ahhh.) (not supposed to be a smiley
 
I think if you learn one collection method though, it should be either reduce or forEach. All the rest (and each other) can be implemented in terms of those two.
 
Why ForEach?
 
It's the basic iterator. I think reduce will teach you more, but you can implement reduce with forEach, and vice versa. I'm not sure that one is more fundamental than the other.
 
1:12 AM
Can you implement reduce with forEach?
I just updated it
 
You can implement reduce with for.
 
You'd have to create an extra array somewhere though
 
Oh, yeah sure.
 
I actually kind of like the code now, creating bound functions on the fly with .bind and then testing them. @Esailija would hate this so much :)
@san.chez I'm glad it helped
 
Is Facebook down for all of you guys?
 
1:16 AM
no
 
Heh! Does he just object to bind in itself?
 
"It's not just you! facebook.com looks down from here."
 
@loading... Bind is 'slow', that is, you can't do millions of operations per second
@DemCodeLines odd, it totally works here, might be a US thing
 
@BenjaminGruenbaum why not just test the function by calling it? or is the problem the bind?
 
1:17 AM
Ah, yeah, he loves his perf!
 
Now its working.
 
hey all
 
@TrevorRudolph Binding is awesome. It's how we do partials
Hi
@TrevorRudolph look at my code and tell me how you would do that without bind?
 
parrtials?
send it?
 
I've never used bind myself, and not for perf reasons, but I don't object to it either. A lot of devs find it useful.
 
1:19 AM
i use bind for user events
 
2
A: Testing for multiple conditions dynamically?

Benjamin GruenbaumOne way to do clever syntax is having an array of functions returning boolean. function biggerThanThree(){ return x>3; } function smallerThanFive(){ return x<5; } var predicates = [biggerThanThree,smallerThanFive]; //matches all conditions var valid = predicates.reduce(function(x,y){re...

 
this is beyond me i am not at the same level of mastery as you
one day ;)
 
@TrevorRudolph All the more reason to read it now. Don't wait for 'one day'.
 
Read LearnYouAHaskell, it's a nice introduction to functional programming.
 
hahaha yea i'm getting there, i know enought to get around but i learn as i create
and now i'm making a game
 
1:23 AM
@loading...
do you have a skype?
where i could just share my screen to you
 
@EliteGamer Definitely not. Even if I did, I don't.
 
@EliteGamer He totally does
 
ha
well, i am at the point were i will try anything
 
:-) It's PPV.
 
i even did it from scratch and it will not work
 
1:26 AM
I don't earn much.
Then throw it away.
@Shmiddty how long does your train journey take? :-)
 
@loading... why won't you skype with random internet dude looking for jQuery help? >:(
 
Maybe I'm playing hard-to-get.
@Shmiddty Anyway, I'd get cracking with a submission cos leonid is asking about the 30B on freenode. :-)
 
@Benji I'll Skype someone... But I won't wear pants. That's my rule.
 
lol
 
1:41 AM
um how does one wait for one animation to end befor the other begins, heres the page, ill get the code snippet trevorrudolph.com
 
@Shmiddty If I were thinking straight I would have padded out my submission to 32B. :-)
 
 
1 hour later…
3:15 AM
Reset timer bang
 
3:28 AM
@Gacnt Reset timer?
 
3:45 AM
@CheesyBacon what the heck was that all about?
 
@BenjaminGruenbaum Mmph. I don't know.
 
Cool :) How would some WebRTC code for accomplishing the very most basic version of what OP wants look like? — Benjamin Gruenbaum 9 secs ago
I'd like to see him get out of this one. That guy is rep - whoring today. Posting answers that should be comments.
 
!!/are you alive
 
drop the /
!!/live
 
!!are you alive
@BenjaminGruenbaum She's dead again.
 
3:49 AM
:/
@Zirak :/ I don't care that you're sleeping, the bot is broken :((
 
@BenjaminGruenbaum Bot's not in the room- check all of the photos of users, her picture is grayed.
@BenjaminGruenbaum LOL!
@BenjaminGruenbaum How to block quote again?
 
@BenjaminGruenbaum NVM. Imma eat dinner so I'll be AFK.
 
Can someone with 10K on meta tell me what this was: meta.stackoverflow.com/questions/184983/… ?
 
4:10 AM
@BenjaminGruenbaum

This question was removed from Meta Stack Overflow for reasons of moderation.
 
wtf:
"Chrome which has much faster JS impl than Mozilla " - What? Your post was 2 lines saying 20MB is ok and then something random about regex, the dom, and then this... — Benjamin Gruenbaum 10 secs ago
@CheesyBacon people with 10k see deleted posts.
 
@BenjaminGruenbaum Oh.
@BenjaminGruenbaum Um, you have 12.3k rep.
 
@Zirak @copy What are you guys using for a desktop, (e.g. Gnome)
 
@Gacnt @Zirak is off, and the bot is dead again!
 
!!are you alive
 
@BenjaminGruenbaum Ben!
 
@BenjaminGruenbaum Oh, never mind.
 
When you said

> @Gacnt [awesome](http://awesome.naquadah.org)

I thought you were posing as the bot.
Looks like markdown is down too. XD
 
4:18 AM
super sale on gog.com
also I do have that might an magic game btw
also a heads up to everyone here gog.com has torchlight for free for 48 hours
 
@Loktar ?
 
@CheesyBacon hell get the message whenever he gets on :P
from a convo we had last week or so
 
@Loktar Oh, I see. Also, the bot is down again. Don't bother using !!are you alive.
 
Hey

Does anyone here know why this won't work:

    var element = document.createElement("textarea");
          element.focus();
    //append the element to parent div

It won't focus to the element, do i have to append first?
 
@Dave Yes, you would have to append first, because the element isn't visible.
 
4:31 AM
ok can i append to just a div that has yet to be appended to the page or it has to be appended to document
 
you can append it to anything
 
@Dave You have to either append to the body, or you may append to an already appened element.
 
oh ok
thanks @CheesyBacon
 
@Loktar is also right, it will be appended, but it won't be visible.
@Dave The child data is still stored into the parent locally via JavaScript.
 
ok so i don't have to do a look up after append
 
4:34 AM
@Dave Huh?
 
dont worry :P im just rambling
rabble rabble rabble
 
@Dave :P
@Loktar Can you tell me why this emits Hello, World every time and not the easter egg one randomly?
 
it can never be greater than 5
 
why not alert Math.floor(Math.random()) * 5
you would see it never goes above 5 :P
 
@Loktar WHY AM IS SUCH AN IDIOT! *facepalm*
 
4:43 AM
oh also!
its 0
 
-1
A: Maximum amount of data to load in browser memory

Ondra Žižka21 MB is OK. Latest browsers are capable of handling huge documents without much hickups. E.g. our Jenkins (continuous integration) often shows me a 200 MB log, even colored/highligted. Be careful with regex's over the whole page, traversing whole DOM, and stuff like that. If you can choose the...

 
check your parens @CheesyBacon you were doing Math.floor on the random which is a val between 0.0 and 1.0
and then multiplying that by 5
which was always 0
instead of doing Math.floor(Math.random()*5)
alright bed time, later all
 
@Loktar Later.
Ah. It should be Math.floor(Math.random * 5)!
*double facepalm*
@Gacnt Bot's broken again XD
 
isnt random called as a function? not a string??
 
@TrevorRudolph Yeah, just a typo. I can't edit it now.
 
4:57 AM
k, just checking :D
 
@TrevorRudolph Thanks.
 

« first day (977 days earlier)      last day (3973 days later) »