« first day (2033 days earlier)      last day (3138 days later) » 

00:56
Anyone on?
piiiiizzzaaaa
god. i've searched the ENTIRE FREAKEN INTERNET for documentation on the onmousedown trigger and not a SINGLE post on how to get the FREAKEN MOUSE X AND Y ?????
If this isn't what you mean than I'm not sure what you are looking for w3schools.com/jsref/event_clientx.asp
@Shniper holy....
@Shniper omg you are a GENIUS
If i was a genius I wouldn't be having a tough time coding a simple simon says game >.<
@Shniper Would you like me to look at your code?
@Shniper Just curious, what did you search?
@thepiercingarro I searched "mouse x and y javascript"
01:06
@Shniper wow derp.. any idea the difference between screenx and clientx? I have a feeling that clientx is the one I need, but no idea what screenx does :/
@Shniper Also should I look at your code?
jsbin.com/coniwexuve/edit?html,css,js,output Here is a demo of what I have, when you click the button it should animate the color that is added to the array but it doesn't, I have colors.js linked which is working for another animation but not this one
cool.. lemme take a look....
@Shniper ...
@Shniper okay, i really need your search engine skillz
@Shniper what search engine do you use?
google
01:09
hmmm... i'm using duckduckgo..
maybe thats why?
i'm super amazed right now...
I've seen people here use that, I usually can get whatever i need with google though
@thepiercingarrow any ideas with my code? The for loop is working fine, it's just the animation that is having an issue
@Shniper what exactly are you trying to accomplish?
@thepiercingarrow When the button is clicked a new color is generated, that color should light up briefly on the circle with the 4 colors. Like the memory game where you have to click the colors in the right order and more are added each time
@Shniper do the animations work?
@rlemon Space Colony is the game right?
01:18
@thepiercingarrow no they don't that's my problem. I have colors.js linked so I can animate colors, but the animation isn't doing anything, as if the selectors aren't correct but they are
@Shniper What is colors.js ?
@thepiercingarrow a library that allows the jquery animation of color
@Shniper Also, you linked color.js, not colors.js
@rlemon ah nevermind
of course my problem was as simple as using color instead of backgroundColor
01:31
How can I get metadata from an object from a restful api
Do I just do data.images[some_index].<metadata>
Nevermind :D
02:20
Hey all -- what is a good rate for a freelance frontend dev job? (Hourly)
120/hr
lol random # ftw :P
That guy in the question was $8/hr lmaop
user2620028
02:35
random pound for the win?
03:16
@Neal It depends
I've seen 10-120/hr
Even 300/hr once
03:37
300/hr O_O... Paul Irish?
That would be a nice bit of cash in CZK as well
Some dev who's worked with big brands like Nike and stuff.
He also does a lot of interactive shit.
I don't remember his name
03:52
0
Q: HTML/JS github pages project doesn't load images or sounds when run with firefox

Ashwin GuptaAlright so this is a weird one, I'm not entirely sure if this is the right SE site, but I think it is because it regards web code/browser compatibility. If not, someone tell me in the comments I'll move it. So basically, I have my game's source code on github. I also am hosting the game itself ...

04:07
is it possible to make a click event into a variable so like
var playerClick = $('#clickThis').click(); ?
You can store a function into a variable (remember to bind it), but what do you need it for?
I was just wondering if that would be easier. I have 4 items that are clickable and the player needs to click them in a certain sequence.
04:27
Use event delegation and keep track of the order.
05:23
The Apple Watch app for Instagram lets you Like a post without actually seeing it. https://t.co/rBvsa9PiRF
^ makes no sense
zjk
zjk
Hi, Is this var a = function({x, y}) { console.log(x, y); }; a valid way to define a function?
@zjk Welcome to the JavaScript chat! Please review the room 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.
zjk
zjk
Does the {x, y} part have a special name?
05:35
destructuring arguments
zjk
zjk
thx ^ ^
til
wouldn't it be better to always name the function
not anymore
like function a({x,y})
oh any link to read why so?
thank you awal.
05:56
hello
whats up people
06:15
Sky
Hello Genius dudes
could you help me plz
how the imported data should be fit on the screen?
@littlepootis ^ hey genius dude plz help krish
I need to generate 13 different colors randomly and they must be beautiful, using JavaScript ES5. is it possible?
@AwalGarg you are funny ;)
could you plz look my fiddle?
@Mr_Green What do you mean by "beautiful"?
Use neural networks and teach it what "beautiful" is.
06:20
good looking
And then ask it to generate "beautiful" colours.
By generate, I mean randomly feed it colors until it says "beautiful"
ok I will chose colors manually then
just make it return human skin colors, they are beautiful
@AwalGarg is it possible in my fiddle :( ?
@Krish I don't know about canvas, sorry :(
06:24
oh its okay dear, how about rest of people here, bcoz im stuck with my project ?
does anybody can help would be appreciate :)
> its okay dear
I don't get it. Why do people from India use that word so much?
which word?
dear
!!define dear
06:28
@AwalGarg edar first-person singular future passive indicative of edō
@AwalGarg dear Loved; lovable.
we are indians are very lovable people and anyone will help us we don't forget it , dear is a symbol of our expression of love
;)
LOL
surely the rest of the world is extremely cruel and inhuman
ha ha ha
Do you have a quora account?
lllllllllllllll scratch that
06:33
Sorry _/_
don't do that again. and edit your message to add some text or delete it.
no gifs pls
@Krish you should try quora. it is a really good website, you'd like it.
how to get computed styles of a svg element i.e path?
why you recommend here , is it a funny prank :P
06:36
I tried getComputedStyle, doesn't work
if it were a funny prank, I wouldn't tell you that it is a funny prank. That'd spoil the prank.
@AwalGarg, i have already account in Quora :)
Because they're not DOM elements.
Why do all Indians have accounts on Quora?
@littlepootis is trying to tell something
@Krish oh great. link?
06:38
@littlepootis how to get for SVG then?
5 minutes silence :)
getcomputedstyle works on SVG as well. was doing some mistake here
sorry! I didn't get you
and you never will
@VyacheslavEgorov oh hi there!
user6225166
06:56
may be it's a habit
I get you @Mr_Green, it's not a dom so getcomputedstyle is not work as well :( , trying to find an another solution
@Krish no, it works for SVG as well.
I was doing a mistake here
FGITW sucks
Morning o/
@Mr_Green , the data is not a dom. console says Failed to execute 'getComputedStyle'
Is it possible to prevent that a border around the img appears when I click on it? jsfiddle.net/pckh3anj/2
07:08
Morning @MadaraUchiha
@MadaraUchiha Fat Guys in the woods?
@Krish I didn't get you
@IntercoolerTurbo :focus { outline: none }
@littlepootis perfect buddy. thanks
@Krish I think we are talking about two different things here
07:10
outline: none; use this
@littlepootis Fastest Gun In The West
0
A: Bind more then one element to the same onclick

Madara UchihaThere are a couple of ways to do that. The "Probably Practically Best" - a.k.a. event delegation var handler = function(event) { console.log("I'm clicked"); }; // Register an event on the body, all clicks on the document are captured. document.body.addEventListener('click', function(event) {...

@Mr_Green i think so
Does can i get the imported data width instead of, something like this
var path = new Path2D('M-9.3590822,119.086998L56.637619,21.5918713l43.4978256,95.9952011L161.63237,33.5912704l34.4982758,94.4952774l68.9965515-139.4930267l70.49646,155.9922028l58.4971008-122.9938507l28.4985657');
ctx.stroke(path);

var style = window.getComputedStyle(path).width;
console.log(style);
what is new Path2D here?
I don't think this function is available by default
For getComputedStyle to work you need to pass DOM Element not the one which is wrapped by third party plugin. (I was doing the same mistake)
check here, you can understand jsfiddle.net/nikhilvkd/Fur2d/367
!!mdn Path2D
07:16
@littlepootis Something went on fire; status 403
actually my question is how a large size imported svg fit on the screen(in my fiddle have one of the large svg is added)
@MadaraUchiha so tempted to post a jQuery answer :D
@BenjaminGruenbaum User specifically asked not to use jQuery
But be my guest :D
@MadaraUchiha No shit :D
07:20
Beer today? Haven't celebrated your birthday yet
I have to go to Jerusalem to sign some legal shit today and it's still version day.
user6225166
how to validate an image file when upload in js
user6225166
?
@BenjaminGruenbaum "version day"?
@GNACBetombo define "validate an image file"; that it actually is an image? You'll need a FileReader for that -> feed into an image element and see if it complains.
07:24
@tereško "the day of week where we do a full version release of the service" ?
In this case, it's a a pretty big version integrating two of our larger services
@BenjaminGruenbaum huh. We do that kind of thing just before a deadline
@JanDvorak It's not uncommon for companies to release versions at set intervals
As opposed to "whenever the features are significant enough"
At least, here.
Plausible indeed.
07:28
+25 question and still no proper answer. :(
We do feature based but it's iterative
user6225166
@tereško it doesn't matter if it's an image or not. i just need to verify if the file extension is for a picture. how to do that in HTML or js?
wut
why are you pinging me?
pings again to say sorry
@GNACBetombo just don't check for file extension. Check for magic bytes too.
user6225166
07:35
@JanDvorak it doesn't matter if it's an image or not. i just need to verify if the file extension is for a picture. how to do that in HTML or js?
user6225166
@tereško sorry teresko i v made little mistake
then that's even easier. I guess you already know which file extensions correspond to image files that your server supports.
user6225166
@littlepootis . how to do that in js?
@GNACBetombo stop begging, start googling
user6225166
i think i'll try to use reggex for file extension. thought it will be a good idea to use bytes too. googling...
07:43
!!s/gg/g/
@Cerbrus i think i'll try to use regex for file extension. thought it will be a good idea to use bytes too. googling... (source)
@GNACBetombo use FileReader
user6225166
ok .
guys i need some help with d3
@jayeshkv Monks are OP and fun
You're welcome
07:51
what is the best server side language in terms of debugging?
@jayeshkv I didn't have any difficulties playing diablo 3
@Mr_Green you mean native support? Java
oh k
ASP.NET C# <3 Easy to debug in VS
I hope php would have been friendly with debugging. I curse it always :(
07:55
@Cerbrus also, though I am admittedly less experienced with asp.net
Or php written with NP++. Now That is fun to debug! :D
on mac so can't use NP++
hey guys I'm going crazy here,
@user3382714 Welcome to the JavaScript chat! Please review the room 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.
07:57
@user3382714 hist
oh shit
using google docs to share an image?
A google docs link with a screenshot in a text file?
We need to go deeper
yeah u can add comments there, it's a screenshot from chrome dev tools
@BenFortune an ASCII picture in gif form saved in word document uploaded to Google docs
08:00
anyway I need to sort this with jquery only...
tried this
1 message moved to Trash can
@user3382714 Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
@user3382714 no javascript?
yeah I have to use JS/jquery to sort it
 $("#numbers").sort( function(a,b){
    return $(a).find('#number').value() - $(b).find('#number').value()
  }).each(function(_,number){
    $(number).parent().append(number);
  })
There's no trolling you ;)
$('#number').sort(function (a, b) {
  return $(a).text() - $(b).text();
}).map(function () {
  return $(this).closest('#numbers');
}).each(function (_, numbers) {
  $(numbers).parent().append(numbers);
});
neither worked
@neil if you think that's trivial give it a shot
08:04
0
Q: Scatter plot with multiple data sets D3

jayeshkvCurrently i have 3 data-sets in the form of arrays and i would like to keep one of the dataset as an Y-Axis and the rest to be plotted on the scatter plot and as X-Axis range. So far i was able to plot just one dataset in the Y axis and one dataset in the X-Axis. g.selectAll("scatter-dots") ...

@user3382714 you shouldn't subtract strings like that
return str1.localeCompare(str2)
a & b are arguments to the sort function, so there's so " subtracting" but I think you mean I cannot pass strings to the sort function ?
@user3382714 no, just that subtracting strings doesn't do what you think/want
08:10
ok i'm looking at how it could be implemented with localeCompare
@user3382714 it doesn't work because Boolean(NaN) is false, which doesn't effect the array and subtracting strings gives NaN
And .text() gives a string
Sorry, I've been doing LISP and thinking backwards.
not sure people are become more intelligent in younger age or coming out of reality
so maybe something like
Number($(a).text())
k trying now thanks
08:12
@Mr_Green as you age, what you lose in intelligence, you gain in wisdom
As they say, knowledge is knowing a tomato is a fruit. Wisdom is not putting a tomato in a fruit salad.
I like eating raw tomatoes
with Chat Masala
hmm
I feel we already contributed a lot to technologies that it has evolved tremendously but we are ignoring other things which require our attention.
@Mr_Green example?
1 message moved to Trash can
@user3382714 Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
The user experience of technologies is upgrading day by day but what about the situation around us? like poverty, global warming etc. they are becoming worse as the days are going on.
08:18
@Mr_Green since when has technology ever solved these problems?
I am comparing evolution of fields here
Technology makes the economy flourish, which is good for the economy, and indirectly to the world in general
We are doing a lot to combat global warming and poverty.
But certainly not in the specific case
There are nut bags who deny the existence of these.
08:20
@littlepootis "we" in?
We the people
nah I don't think so. not around me at least.
The cause for most famine is governments running the country into the ground
Resources are usually sufficient. The problem is distribution
@Neil very true
far better than sufficient
Ignorance prevents change and the government has no qualms with that
08:23
My city's average went from 20 C to 30 C in 30 years.
My thoughts on global warming is that it is directly impacted by the number of people on the planet
If we all stopped using cars, it would only slow down the inevitable
Let's kill all humans.
@Neil cars are not really what counts the most in global warming
the huge factories are what counts
If I say we should stop combusting fossil fuels
And we can't live without them
@Mr_Green They aren't the only things that cause global warming
08:26
@Mr_Green not the only reason, yet I long for that day to come
but they are one of huge factors
@FlorianMargaine well trying to stop big factories is impossible without some incentives by the government
Alternative sources of energy also cause global warming
we should look out for alternate source which are many
@littlepootis like?
and if it's just to see those shitty cities like Dubai built on oil-money decade. I hate that cocky extravagance
08:27
The only thing we can do is cut down energy consumption
You cannot expect the world to "wise up" and stop polluting, but what you can do is curve change
Since, I am good with only technologies I am trying to do something for global warming here reset.earth.
@littlepootis if the last 100 years is any indicator, that isn't going to happen
... yeah
What happens when the world has decided that we've gone too far? Suppose the world agrees to stop energy production
08:30
yeah, right
we have already gone too far.. yet we refuse to realise the truth
Millions in cities everywhere will have serious famine issues
Humans will adopt to anything
The "we've gone too far" part won't even happen
08:31
You can't just stop a freight train moving 200 km per hour
especially when it's fueled by that precious money
I think it's all related to capitalism, corporate greed that try to block green energy by passing laws against them or blocking them from getting incentives.
@Neil we can with the hard leverage
the world? HAH! fuck you, I'll get my Lambo plated in 100% gold instead, why would I give a fuck?
if lobbying is made illegal in USA and EU we'll see a change
08:32
Let's blame capitalism
I blame it for a big part, yeah
Government just needs to say, "if you pollute less than the average, you get a small tax break"
everything around us will be great if people goes by set of documented rules.
In 5 years you begin to punish companies that are over the average
08:33
the destruction of the rainforest is the same problem
well extreme capitalism yeah, VW doesn't give 2 shit about the planet, instead of re-tooling their factory (which costs billions) they just want to keep on making easy profit.
it's basically their income
In my city, no fucker gives way to ambulance.
9 mins ago, by little pootis
Let's kill all humans.
@FlorianMargaine Factories strive cos we consume. It's all on us.
08:34
@VladPintea Welcome to the JavaScript chat! Please review the room 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.
how would you give them a tax benefit, if you take away their sole source of income, rainforest wood and or pasture area
@GNi33 you simply encourage "good behavior"
@Mr_Green that's shitty
I saw that
08:35
@Neil nobody gives a damn about that if the income of their family depends on it
Destroying rain forest is obviously not good behavior
If you don't give way here, you get fined.
@BenFortune I hope that applies here as well
otherwise, ambulance should be tanks so that they can go easily blasting on the path
@GNi33 my point exactly. When their income suffers by artificial tax increases, you will begin to see a curve
gta way
08:37
The question is only how fast you push
We need flying cars
Oh wait
global warming
trade offs
so yeah people
@Neil yeah, I agree to some extent. Who will you get to enforce that actually?
If they know that in 20 years time, clearing rain forests will no longer be economically viable, these businesses will change now
@BenFortune RIP English
@GNi33 government
If only roads were that deserted here
The government doesn't even have to tell them to stop. Heck if they don't mind paying a huge amount of taxes, better still for the government
@Neil Don't you live in Italy
@Sippy yep
most deforestation is intended for expanding food production, not for some abstract "let's just do it". Want less of that, support the "Church of Euthanasia" lol
08:42
Seems ironic that you have faith in a tax system lol
I don't like the fact that italy throws taxes on foreign imports to stay competitive
Italy do a lot of fairly questionable things.
That puts us in a bubble of our own making
Still rather live in Italy than UK right now :D
08:44
@Sippy you'd be hard pressed to not say that of any country
true
I wouldn't mind the cheap guinness
You got an Irish bar near you I'm guessing?
Guinness is hard to find in Italy
> Save the planet, kill yourself
:|
rofl
08:48
0
Q: keep current positions while prepend in jquery?

kathiri have multiple images in this containers. And i calculated aspect ratio also in this images. When i set focus to last visible elements. Page goes to top and come to current elements.... Here is my codes $.getJSON("test.json", function (data) { console.log(data); var html = ""; ...

ans please
@Sippy there's an American themed pub nearby that also sells Guinness
you can't be moral, concerned, happy at the same time
@Neil That's just odd.
@Sippy have you ever tried superstorm beer by chance?
Nah I haven't
Is it good?
08:50
They sell that too. Apparently, it is English in origin
Yeah, a whopping 9% alcohol rate too
rofl
One is usually plenty for me
I don't think we even have a common 9% beer here
I lie
Special Brew is 9%
Haha special brew
That's what all the scrotes drink in the bus stops
08:52
@Neil I think Superstorm is Italian
Googling it just brings up italian sites
Hah, then the pub lied about the origins
Possibly
I've never seen it here nor heard of it
I wouldn't be too surprised
Could be english though. Maybe they just mean we invented 9% lager rofl
9% English, 90% Chinese, and 1% Italian. Made in Italy. XD
08:55
Englissh is alcool?
They do that a lot here.. repackage products just to be able to say that they are Italian
Lol
Our supermarkets do that
Like, they'll buy in high end Sony TVs in bulk and then sell them cheap as unbranded TVs
I have no idea why, but friend of mine bought what he thought was a generic shitty TV, opened the package and it was Sony
Maybe they put the wrong TV in the box but I doubt it :P
Wait, Sony?
Sony is not a bad brand of tv
No, it isn't
It was unbranded
Like "Supermarket Branded TV"
Had a Sony in the box

« first day (2033 days earlier)      last day (3138 days later) »