« first day (1282 days earlier)      last day (3660 days later) » 

6:08 AM
@Mosho yes for me
 
also wtf
every time I refresh it's different
sometimes rule on the left
sometimes bottom
 
it's about the distance from the canvas to the top
 
I can't recreate it
 
I think you've based it all on absolute position
 
nope
 
6:11 AM
based off of your screen
 
:|
nah, the canvas size is set at 1000x800
and I use this:
posX = $('#canvas').offset().left;
posY = $('#canvas').offset().top;
pX = evt.pageX-5-posX, pY = evt.pageY-5-posY;
^ evt is the click event
changed it back to absolute for now
 
no idea what could go wrong
 
There could be zooming.
function e2c(e){
var rect = canvas.getBoundingClientRect();
var cx = e.clientX - rect.left;
var cy = e.clientY - rect.top;
return {
x: ~~(cx / rect.width * canvas.width),
y: ~~(cy / rect.height * canvas.height),
};
}
 
my zoom is 100%
 
6:42 AM
just found out I have 96 hours of awakeness&&!doing stuff in a week
if I get hired for 5€/h for 80 hours a week I'd get 400€... is that good?
 
6:58 AM
ok... website redesign
now I'll definitely need the help of some of you
this is the theme
 
user image
4
made me laugh
 
7:11 AM
lol
apparently for my site the 35th of march exists
guys, do you think this is better?
 
Better than what?
Oh, the above.
Meh, I hate the colors on both.
I like black. Make a black background.
 
@bjb568 how would you change it?
I tried that
 
7:26 AM
I like #2 better...
 
that's what I did with the first website design, and it looked shameful
@mosho do you prefer this one?
 
Make it instead of a circle in the middle be a blur, not a solid white.
And make the random letters more dense.
 
@t1wc which one
 
4 mins ago, by t1wc
user image
 
@Mosho There are two pictures… you choose.
 
7:29 AM
@bjb568 I thought it kinda looked cool
 
 
lemme try a version with the blur
 
but now I see it
 
@Mosho click on 'image not found' :P
 
orly
I prefer the former
I think the circle is too small
maybe it should be slightly elliptic?
 
7:31 AM
Elliptic sounds good.
 
k
lemme try something
 
user1642018
hi all
 
user1642018
can anybody tell me why is my mysql query failing without an error ?
 
user1642018
UPDATE content SET top = '5', bottom = '0' , last_updated = '2014-04-18 23:44:36' WHERE id = '123'
 
@AMB id = 123, no quotes.
 
user1642018
7:37 AM
actually id is alphanumeric like this a234
 
user1642018
#1054 - Unknown column 'a123' in 'where clause'
 
user1642018
UPDATE content SET top = '5', bottom = '0' , last_updated = '2014-04-18 23:44:36' WHERE id = a123
 
@sublime 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.
 
user1642018
#1054 - Unknown column 'a123' in 'where clause'
 
7:40 AM
UPDATE content SET top = 5, bottom = 0 , last_updated = '2014-04-18 23:44:36' WHERE id = 123
@AMB Elliptical?
 
how do I remove the white background of an image
 
user1642018
@bjb568 whats Elliptical ?
 
without photoshop
 
user1642018
@bjb568 its working like this ,
 
user1642018
UPDATE content SET top = 5, bottom = 0 , last_updated = '2014-04-18 23:44:36' WHERE id = 'a123'
 
user1642018
7:44 AM
thanks , trying in production now.
 
@AMB Oh, That was a typo, it was @t1wc…
 
user1642018
@bjb568 okie.,
 
@AMB Ok, that looks good…
 
user1642018
@bjb568 i guess, if no update is required , means new values are same as old values it wont update, that is why i have been getting lots of failed update respnose. in php by using mysqli_affected_rows
 
@bjb568 no, but with blur
some people said that what they do actually like about the logo is the asimmetricality
 
7:57 AM
@t1wc I meant that you should add ellipticalness. I saw the pic :)
 
@bjb568 trying to achieve that now
@bjb568 but it would make it look simmetrical again
nah
 
Ok. Try making the random text more dense.
 
@bjb568 I tried that, looks pretty awkward
I want to give the idea with the least possible
big characters will do
 
Play with the kerning and vertical-spacing. It might look better.
 
8:03 AM
Apart from being low-res and antialiased badly, me likey!
 
non-compacted first design in black
and wait... is logics a word?
 
Yes, a perfectly valid word.
The font-weight is too light.
 
@bjb568 don't worry, I will stick to the first design
wait... I could use some other random black bubbles containing adjectives
as logics and programs
becouse they're totally adjectives
@Mosho bug
 
hmm, haven't seen those in a while :P
thought I got rid of it
 
@Mosho XD
probably it's just a lag isue
issue*
 
8:16 AM
can you make it happen reliably?
 
lemme check
yes
by creating 2 circles, conjunging them and spam clicking to enlarge them
also rules and points are strange again
and there are some bugs happening when you leave the tab and enter it again
@mosho the enemies that were already generated go past the earth if you're not focsing on that tab
 
yeah, don't leave the tab :P
 
and the other ones will generate only when you re-join
all toghether
 
yeah
 
I think I know why that is
 
8:21 AM
oh?
 
probably you're using the elapsed-time-based game loop
 
yeah, I think that's it too
 
but sadly I don't think there is a leave and enter tab event listener
!!afk breakfast
well, you could check if the player was doing anything on that page
but breakfast
 
8:41 AM
back
 
hey anybody knows
how to attain
css background-size: contain;
with a simple imgTag ?
 
this looks cool
scratch that, it looks epic
 
Hi all
What is the official term for the cursor in a input box , is it just cursor or caret?
 
but it ended a day ago :|
 
@Mosho or @AbhishekHingnikar I have an Angular question :D
 
8:51 AM
@BenjaminGruenbaum shoot.
i haven't used angular for months but shoot.
 
@Mosho well, I guess the real fun of building games is making stuff different than others
@serupticious I call it bar, don't think it has an oficial name
 
I'm using Grunt to minify all the stuff. It creates images with hashes in their name.
So for example stuff.png becomes someHash.stuff.png which is great for versioning but causes issues.
I have a directive where I use svg to dynamically load images, those paths become incorrect.
What would be the correct way to serve the right images?
 
what does it have to do with angular? and what makes you think I can think of something you can't? :P
what do you use to minify? maybe you can just have it add something static to file names instead
@t1wc it's a tool, I don't know how customizable it is but it seems very much so
useful for artistically challenged people like us
 
@makhlaghi 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.
 
@Mosho I guess that it will have worlds, showing up in a predefined set of ways, using a predefined set of player characteristics and so on
 
9:01 AM
I don't think it would get $30k on KS if it was lame
 
you'll end up having the same things in all games, but with different settings
and for me that means they're not different games
 
@BenjaminGruenbaum if I had to do that in my app, with node, I would send a request with the image name without the hash and find the correct image on the server
@t1wc don't be so dramatic, it seems highly customizable from the video
and you don't see people shunning bootstrap because it makes half the web look the same
 
@Mosho if you'll enjoy it then good for you..
 
@BenjaminGruenbaum I'd just have a service for the image names :P
and get the hashed version fed to it for me.
 
9:21 AM
hey is it possible to get keys with array.map(function(value){});?
 
wow I'm trying all these online pic editors
and they add a background to my sprites
guess I'll install PS
 
@bug56 You mean, the array indices? Your callback receives more than one argument; see developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/…
 
@Zirak How long are you back for?
 
Tomorrow is the last day, thanks for reminding me.
 
Sure, no problem
 
9:34 AM
@Zirak thanks man I'm a dummy I didn't read the reference closely enough
 
Anyone know how delicious close their iframe popup from within itself. Looks like something to do with the data attr but I can't work it out. Here's a fiddle with their code jsfiddle.net/mW2LR
 
The removeChild part may be a big clue.
I refer you to jsbeautifier.org and wish you luck
 
yeah sure but how are they triggering the remove child
 
9:50 AM
@OliverBak 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.
 
The last few lines show you that,
 
it looks to be if the data attribute of e is set to destroy_bookmarklet then it will remove the iframe
 
It's nothing to do with data attributes
var o = e.addEventListener ? "addEventListener" : "attachEvent";
var u = o == "attachEvent" ? "onmessage" : "message";
e[o](u, a, false)
e is document, a is the function which removes the child under certain conditions.
    var method = e.addEventListener ? "addEventListener" : "attachEvent";
    var eventName = (method == "attachEvent" ? "onmessage" : "message");
    document[method](eventName, listener, false)

    //or, on normal browsers
    document.addEventListener('message', listener, false);
How it actually sends the message is in the iframe.
 
@Mosho lol, that's crazy :P
 
how so
or have a service when you load the app that asks the server for all the hashed names
 
10:14 AM
so within the d
 
@Mosho uh, we do see people do that.
 
so the main document is listening for 'message' or 'onmessage'. if it gets 'message' it will remove the iframe?
 
Why does decodeURIComponent('P%E9rez+Ayelo') not work?
 
How do I run JS in this chat?
 
@Zirak "SyntaxError: syntax error"
 
...
friggin clipboard
 
!!> decodeURIComponent('P%E9rez+Ayelo');
 
@ŠimeVidas "URIError: malformed URI sequence"
 
Why?
Doesn't look malformed to me.
 
10:20 AM
Look closer.
 
*nose is touching screen*
 
So do it the brute force way: Take away things which look suspicious, see when you stop getting the error.
 
It doesn't like the %E9 thing.
...but that's how URL encoding works.
% + 2 characters
What's wrong with E9
 
That's a very good question.
 
10:23 AM
!!> encodeURIComponent('Pérez Ayelo')
 
@ŠimeVidas "P%C3%A9rez%20Ayelo"
 
WUT?
I hate URL encoding
 
That's just unicode being all byte-streamy
 
@Zirak always some criticism, but I still see them everywhere
my point is that most don't necessarily want something that looks totally unique, they want something that looks nice, even great, and works well and is relatively easy to develop
 
You said nobody's complaining. Well, he complained, and so do I
 
10:27 AM
I never said that
I said people don't shun it
 
1 hour ago, by Mosho
and you don't see people shunning bootstrap because it makes half the web look the same
!!s/complain/shun/
 
@Zirak You said nobody's shuning. Well, he complained, and so do I (source)
 
people not shunning !== nobody's complaining
 
bah
He shunned, and so do I
 
you fail, I win
but, are you people
 
10:28 AM
I forgot that arguing with you is like teaching a carrot how to drive
I'll stop it, then
 
try to make a note so we don't have to do this again
 
@Saptarsi 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.
 
I need help with this question.
 
10:50 AM
how do i make something's visibility dependent of an input on page load?
 
@Zirak thanks for the link, very helpful. That is what I didn't understand. Now i get the idea. The js included in the iframe was using postMessage to post "destroy_bookmarklet" the event listener in the main doc was listening for a message if the data of the message was "destroy_bookmarklet" then close the iframe
 
Seems like it, yes
 
my appologies that was missing a lot of punctuation
i hadn't heard of postMessage before but it looks really useful for getting around SAP problems which always seem to come up
 
How do I serve a script from a different port on the same server without hardcoding the server? i.e. src="//myscript.js" to src="??//myscript.js"??
 
user3071008
Not sure if this would work, but how about src=":[port]/myscript.js"
 
user3071008
11:27 AM
er, probably not
 
after years I found out I've never played around with role attributes of html elements
they can be anything
right?
then you target them with element[role='anything'], right?
 
@t1wc - Yes, they can be anything, but usually you'd use the Aria standardized roles, and it's not a selector, for that you should use ID or classes.
 
@laggingreflex Sorry, I don't think it's possible. The URI RFC doesn't look promising.
 
@adeneo ok, got it, thx
 
@laggingreflex - using ports in relative URL's is indeed not possible.
 
11:53 AM
@Dave 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.
@ParthTrivedi 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:20 PM
how do i create an image element and set its src to somewhere that requires inputs?
var imgQ = document.createElement('IMG');
imgQ.src="http://example/ImageServlet?imageIndex=";
 
missing tld
 
what?
 
nothing, what do you mean?
requires input?
 
How does it require input...?
 
an image is stored on a server.
each image is stored on a single page: page1 = image1, page2 = image2 etc
 
12:25 PM
Is it ok if I fs.readFileSync() a few files during initialization of my Node web app?
 
so suppose the full url is http://example/ImageServlet?page=page1
http://example/ImageServlet?page=page2
 
You just showed us exactly how to do that
Set the image's src to whatever you want. It's just a GET.
 
so that line will work
imgQ.src="http://example/ImageServlet?imageIndex=";
 
@ŠimeVidas "Is it ok"? No one will hunt you down and kill you in your sleep, I think.
 
@Zirak Just checking :) It could be a stupid approach.
 
12:28 PM
@Infested - any link to an actual image will work as the source for the image tag, however a link to another page containing an image tag will not work
 
        ['fullView', 'detailView'].forEach( this._element.classList.remove.bind( this._element.classList ) );
 
ok?
 
please help me with this
 
12:56 PM
i just realized how lazy i have became
 
because of these cool toys.
 
also that IE sucks, cause i have to remove em as a list
@ICanHasCheezburger .forEach, .classList.remove.bind, .classList
 
12:57 PM
yeap :D
 
u must be a geek!
I take that back if you do not like it
 
1:12 PM
Anybody here?
 
@deep nope
 
I have a question:

Is it possible to have a div thats 100px by 100px, with an Image covering the whole thing, but when you drag it to a set location, it becomes 50% wide and 90% tall, and becomes an Iframe?
 
with a strong perfume of jasmine too ?
Yes, that's possible
 
i have a servlet that gives me images, how do i create/set/load an image with calling it?
it goes like this: website needs image -> calls servlet --> servlet replies. but i have no idea how to do that
 
@Mosho sorry just got this
what do you mean?
 
1:23 PM
@Infested This is a puzzling question because when you have a servlet giving you image, you should know how it's called. It's probably with an URL parameter, like myservlet?id=3
 
yes
but i dont understand the javascript part
 
@deep yes
 
@Infested What do you want to do with the image ? Display it in an iframe ?
 
im working on a project, in short you can e.g. make exams with it, and a question is composed of question (text + image) and 4 answers
if(question.hasImageQuestion == true) {
var imgQ = document.createElement('IMG');

imgQ.src = "http:// example/ImageServlet?qindex=questionCounterTest&lindex=levelCounterTest";

main.appendChild(imgQ);
}
 
you can probably safely remove == true (if not, you have a design problem)
 
1:28 PM
but that doesnt work, and i just dont know how to do it
 
Do you have an error in the console ?
 
Cheers @rlemon
 
Can we assume you checked in your browser the URL is correct ?
 
the url is correct
 
Which part doesn't work? Does it work if you create the element yourself, now, in the console? Does it work if you remove the condition?
!!should I continue playing or should I watch a movie
 
1:32 PM
And did you understand what I asked regarding errors in the console ?
 
Well that sucks
 
@rlemon Caprica may have died.
 
haha, I just realized the date - @Colorado, enjoy the weekend and the Easter candy :P
@Zirak :/
 
@Zirak the part of with the image, i dont know which stage. @dystroy yes i did, its irrelevant, and there arent.
 
1:33 PM
Also, hi
@Infested Then figure out which stage, then you'll know what doesn't work.
 
hello. I mean to go into the office today anyway, so I'll refresh her in a few hours
 
and you'll find a debbuger in the link I gave you
 
i dont know if my code is even correct for creating an image
 
sorry all. (that is if she doesn't kick back on in the meantime... sometimes she does)
@Zirak for some strange reason, she just stops listening. no errors in the console, page is still seeing messages
but she stops listening for them
 
Do you know if the log says whether she's getting any messages?
 
1:36 PM
she isn't getting them
if you are around when I am near her I can show you what her last few logs look like
 
who is she?
 
hrm...weird. If you find her like that, could you also try poking around bot.adapter.input.socket?
Maybe the chat closes it for some strange reason
I think there used to be a problem like that when she just joined or left a room
 
Tom
1:48 PM
Is there any way to write this in a more elegant way:
max = max.split('.');
max[0]++;
max = max.join('.');
 
Don't store it in a string in the first place
But meh, you can also do (Number(max)+1).toString()
 
Tom
that returns NaN
 
max = max.replace(/^\d+/,function(v){ return +v+1 })
(I don't pretend it's better)
 
what is max
 
probably a tokenized version, like "23.45.25"
 
1:51 PM
Yeah, my solution would really only work with valid decimals
 
Tom
What I'm doing is go through the directory and search for the file with the biggest number in its name. The whole function looks like this:
var max = files.reduce(function (p, c) {
return (parseInt(c) > parseInt(p) ? c : p);
});

max = max.split('.');
max[0]++;
max = max.join('.');
 
so we still don't know what max is.
 
Tom
It's the name of the file with the biggest number in its name.
 
If anything, with the biggest numeric prefix
 
Tom
yes
 
1:52 PM
I'm guessing a directory of songs
 
user652649
hello every1, someone uses xulrunner?
 
Better than reduce :
!!> Math.max.call("33", "44", "953", "2")
 
files.map(parseFloat).sort()
 
damn, still dead
 
I'd go with dystroy's solution in this case
 
1:54 PM
Without context we don't really know in fact. But there are many solutions and nobody likes to convert endlessly from and to string or number
 
He probably has a directory which looks like:
1. Band - Song
2. Band - Song
3. Band - Song
...
And wants to get the next prefix.
 
Tom
No, I actually have a directory of photos named
1.jpg
2.jpg
3.jpg
etc.
 
so different...
 
sorting your porn?
zing!
 
Tom
A man has to know his needs you know...
:D
 
1:57 PM
I've got mine categorized. Currently, there's one directory: Horse.
 
Tom
It's a file upload and I'm looking for the last file, increasing its name by one and uploading it.
 
plot twist: it is still filled with pictures of goats.
 
Tom
Neither solution really works though
 
You know me too well
 
DoooOoOooOoOoooOOoooOooh
 
Tom
1:58 PM
hehe
 
Anyway, you can also change my solution to use parseFloat instead of Number, and it'll likely work
 

« first day (1282 days earlier)      last day (3660 days later) »