« first day (1725 days earlier)      last day (3223 days later) » 

6:02 AM
In the california bubble I forget that loads of people in the US still are ass backwards about gay marriage
 
Have you heard of openui5?
It's not well known in China? What about in your country?
 
how we can hide the API Link from Browser Console ?
 
proxy
 
Morning!
 
@Gemtastic It's afternoon in China.
 
6:08 AM
Afternoon to you then! It's 8 in the morning in scandinavia :)
 
@Mediasoft Wrap the API in your own API, or proxy like Awal Garg said
 
@Gemtastic morning to you!
 
@ZhengquanBai Had a good day so far?
 
@taco actually i just want to clear the LOG
 
um, ok. Learn your browser's dev console then?
Chrome has a "Clear" button for that
 
6:10 AM
@taco by pragmatically using Javascript or Jquery
 
@Gemtastic Yes, not bad.
 
@Mediasoft Step 1. Get a job on the google chrome dev team
 
Great :)
@taco I wish I could get that so I could put some logic into their stuff..
They need me! I can feel it!
Feel it in my coding sense
 
@taco How to get Job in Google Chrome Development Team
@taco Take my C.V and Apply there. Can ?
 
Muted for being stupid. Sorry.
 
6:13 AM
@taco OK, bro if you know the solution then tell and if don't know then slient
 
@taco I almost thought that was to me :S
 
Nope. Of course not. :)
I was having flash backs to my sys admin phone support days with that thread
 
If I get too stupid, feel free to slap me around for a bit. I appreciate people telling me. ;)
 
Why I feel openui5 is not widely used?
 
@taco My condolences :/
 
user3119231
6:16 AM
good morning everybody!
 
I had some dumb calls... "I need help with my Youtube clone (got a lot of these around ~2008)" .... "I need help scraping Google (No!)" ... "I need help removing links to my site (what?)"
 
I'm thinking about making a blog post called "How to get StackOverflow to write your code for you" to attract the help vamps, and then in the article, I teach them how to debugg, identify the problem, how to attempt solving it yourself and how to ask a proper question on SO >:D So that in the the end, they're not help-vamping at all. evil laugh
 
Keep in mind I was a sys admin, not an employee of theirs
haha
 
It's worth a try, eh?
 
I was just thinking SO could implement some consulting fees for answers, but then I think the quality might actually drop, as that could attract users from India
 
6:19 AM
"The developers at StackOverflow are sneaky. They have this thing called 'google' which they use to scan your intentions of having them write your code for you. Therefore you must get to google before they do and get the code before they hide it from you!"
 
heh
 
@taco There's already code-mentor for that though...
 
@taco lol no. actually users from India will stop coming if that happens.
 
@AwalGarg Because they have to pay to get answers? :P
 
I just commented on one question. The guy put in his question "I have implemented the same exact code in my files" ...... it's not. It's not the same code at all.
 
6:21 AM
@Gemtastic exactly
 
@taco I feel sorry for code-dyslectics :(
 
guys I have problem with type="date" in input tag. I have changed the type="date" dynamically. But of no use, I have to click the input tag two times. Any idea?
http://stackoverflow.com/questions/31261171/reducing-2-steps-to-1step-when-clicked-on-input-type-date
 
@gates Your question is too technical for me. I've not read the W3 spec for "the white thing" yet
j/k
But really, what the hell is "the white thing"
 
Alright! no problem
 
Though why code-dyslectics get into programming I don't know.. it's like a dyscalculic becoming a mathematician. Maybe they enjoy the challenge of testing us?
 
6:24 AM
a button with no text on it is white thing
 
@gates Why don't you say that instead
 
I will edit it :)
 
@AwalGarg Ah, that's genius. Charge to ask the question. Downvoted questions cost more.
 
Hmm.. Not sure if keeping poor people from asking stuff is all that effective.. You'd be surprised at how dumb people with money can be...
 
@taco and upvoted questions pay? ;D
 
6:27 AM
ponders if it'd be a good or bad thing for the community if I weren't here
 
oh, this can't be good. somebody who is out drinking with my wife just called me.
bbl
 
@taco D:
 
I would like to find someone who can aid me in the process of learning javascript and web development. Is there anyone willing to reveal his skype or other instant messager account to me?
 
user3119231
this is difficulty because we are all lazy right here. But you can read documentations and if you have questions, you can ask here :)
 
For personal tutoring see codementor.io, I recommend this: eloquentjavascript.net
 
6:29 AM
@ZhengquanBai meetup.com/cities/cn
 
You would learn better just diving into some nice resources on the net and coming back here for any questions. codecademy.com/tracks/javascript
 
@ZhengquanBai hangout here, avoid being a dick, pretend to learn, and you will learn.
If you need tips on vamping, ask me. I am pro at vampingâ„¢.
 
Thanks for those helpful links
 
1 message moved to Trash can
@Gemtastic Please don't post unformatted code - hit Ctrl+K before sending, and see the faq.
 
@CapricaSix I was fixing it damnit >:C
Speaking about learning JS... About this code:
function example() {
  function a() {} // Okay
  if (something) {
    function b() {} // Danger!
  }
}
Why is it bad to put a function inside of an if-case? As in, what is JS doing when you do that? I think the explanation "different browsers interpret it differently" is a bit poor in telling what happens and therefore it's bad...
 
user3119231
6:35 AM
Why not just fix my script? :D
 
Why not just randomly give me money for nothing?
 
user3119231
I got 20 dollars in my pockets, this is fucking awesome.
 
wife's drunk. probably gonna call it a night as I gotta go pick her up. later guys
 
user3119231
would rate this video 10/10
 
@taco Ok. Take care (of yourself and your wife)
 
6:37 AM
@Gemtastic Is the function be visible outside of if?
 
@ZhengquanBai Well, I don't know :O
Anything and everything related to why it's bad is good knowledge for me. I come from Java, you can't put a function in a function there.
 
I think the function b is visible outside of the if statement.
 
If I were to guess, I believe it's not visible outside of the if case, but that's just what would make sense; why would you be able to use a function inside of an if-case? shrugs
 
@Gemtastic Because of this
 
Javascript does not have blockscope
 
6:45 AM
!!> if(false){ function a() { return 42; } } a();
 
I think a function expression is a better choice than a function declaration here.
 
@MadaraUchiha "SyntaxError: in strict mode code, functions may be declared only at top level or immediately within another function"
 
@MadaraUchiha How do they interpret it?
 
@Gemtastic Functions get hoisted to the top of the scope.
So, in non-strict mode, it would be equivalent to....
 
And inside of a function, the function is the scope, right?
 
6:46 AM
function a() { return 42; }
if (false) {}
a();
@Gemtastic Yes. But an if is not a scope.
 
No?
 
No.
Only functions introduce scope (that's before let, but don't worry about that for now)
 
I think function expression is another case. Assigning a function expression to a variable inside an if statement is acceptable in strict mode.
 
Therefore everything inside of function example() should have access to b?
 
@Gemtastic Exactly.
 
6:47 AM
And it's bad because we only want b() to exist if the condition is true?
 
@Gemtastic Why would you want a function to exist conditionally in the first place?
Can you imagine how shaky an application like that would be? Application where functions may or may not exist?
 
If you only want b() to exist if the condition is true, you can use function expression!
 
user3119231
@ZhengquanBai even nice effects are realistic in js - bm-designs.de/test
 
@ZhengquanBai Still bad practice.
 
@MadaraUchiha I wouldn't, but the code example seems to hint it
 
6:50 AM
> What happens when you put such a function definition inside a conditional (if) block or a loop? Well, don’t do that.
@Gemtastic it's a code example of something you shouldn't do.
Because the result is unstable
 
I never questioned that it's bad, I just wanted to know WHY it's bad. I'd accept an explanation that it's bad design because it implies that we want a function to only exist if a condition is true, but the explanation I got to that was "Different JavaScript platforms in different browsers have traditionally done different things in that situation". Nothing about how they interpret it or why it's bad
 
user3119231
1
Q: Prevent image from moving with scrolling background

Maurice BambenekI am working on a scrolling background which is moved by mouse. I want to add images like sticker to it, so the blip is always in "north america" for example. But in all cases it doesn't worked. I think there is a huge problem with calculation. Maybe you can help me out. Thanks. Maybe this will ...

 
words can not define how much I love Indian food.
 
@Gemtastic It's bad design because 1. it would produce different results based on context (browser, strict mode), and 2. Even if it did work as expected, you never really want a Schrodinger's function.
 
So what is it that different browsers do with it? Some makes the function available always? Some actually implements the "only instantiates when condition is true"?
 
6:54 AM
A function which is both there and not there, until you try it
 
@MadaraUchiha I understood that it was bad design, but that's not what the source told me and it didn't tell me what the browsers do, which is WHY it's bad acording to this source.
So what does the browsers do?
 
@Gemtastic To be honest, I'm not sure.
It's a Bad Part, and I tend to avoid it, I've never tried having a function block in a conditional.
As for Good Parts and Bad Parts, you'll learn about them in the next book :)
 
@MadaraUchiha Well then, the answer to my question is yet to be answered :P
 
Regardless of cross-browser concerns, you do understand that it's a bad practice, and why.
Don't hang too much on that.
 
I'd never dream of putting the code like that, but it's important to me to know what happens if I do. I don't go well with "just don't do this" explanations. I won't do it since the code looks stupid to me (why would you want to do that?) but I still wanna know why.
 
6:57 AM
@Gemtastic What happens is that the standards forbid it.
So in order to make old shit work, browsers implement this however they see fit
 
I hate those kinds of answers >:( But I suppose I won't get a better one since nobody knows :/
 
You have no guarantee either way
 
Thanks for trying
 
You can, of course, try it out in different browsers, and see what happens.
 
Yes, that's exactly what I'll do, but I wondered if there was a short answer, instead I just got told that it's bad practice and I shouldn't do it, which is exactly what I already knew :/
 
I'll do better in the future when I ask questions.
 
@Gemtastic Again, it's not bad practice because it's bad practice
It's bad practice because, regardless of specific implementation concerns, it makes for very brittle applications by definition.
Just imagine if Java allowed that :P Methods that only exist if a condition is there or not XD
Hard to even imagine, isn't it?
 
@MadaraUchiha I'm asking because I'm not familiar with the JavaScript way of putting functions in functions. That in itself is weird to me :P
 
@Gemtastic Functions in functions is a bit different
Functions in functions follow the same scope rules as variables
 
I'm trying to get a deep understanding of how the language works. Syntax is just syntax, you can look it up. The logic and structure of the language is what's interesting and important to me.
I do understand however that JavaScript is hard to grasp in that manner since every browser has its own engine for it
 
7:04 AM
@Gemtastic Yes, and no.
It's usually not the JavaScript engine that's the problem, it's how DOM is handled.
JavaScript has the ECMA standard which is ± followed
 
@MadaraUchiha Well, I'm still a n00b so they're one and the same to me... :S
 
@Gemtastic Think of the difference between core java components (lang.java) and JFX.
 
Nope, that doesn't work for me at all
(Trying to tell you that I don't understand your simile at all)
 
@Gemtastic Well, just like Java can be used for command-line, gui, web, embedded, etc environments
So can JavaScript
 
Yes?
 
7:09 AM
@Gemtastic say you write some code in javascript, and then save that file and give it to somebody. he gets access to the variables and functions you defined, and can use them. but this doesn't mean the functions you defined are part of javascript. they aren't.
 
JavaScript can be run by the browser, by the node framework, by embedded systems like arduino
 
same way, browser defines DOM API functions for you.
 
0
Q: Return function value in lodash templates

Mr_GreenI am using lodash templates to render html templates client side. There are many html templates which are being repeated. So, I decided to call the repeating template in another template. For example: dummy.html <%= _.template(templates['button'])({ title: "click me" }) %> The above approach ...

 
This doesn't meant those functions are part of javascript. they just form an API that you can use in your code.
 
(I hope I'm not too annoying with my questions, I'm trying to find that one thing I'm looking for but I'm not good at phrasing myself so sorry if I come off in the wrong way)
 
7:10 AM
@Gemtastic we all start somewhere
 
I suppose I'm a little bit autistic in my question asking. I get the big picture but there's a teeny tiny fraction I don't understand and since I don't understand it, asking the specific question to get me that fraction without having people explain everything else again to me is hard :/
 
hello everyone.
 
@MadaraUchiha I don't get the point to this though :/ Yes? Those things are obvious but what are you trying to say?
 
can anyone tell me that how can i get the height of a div using jquery and js?
 
@Gemtastic That usually, it isn't JavaScript's behavior that's changed between browsers
It's the way they handle and implement the DOM API
!!tell Amit google how can i get the height of a div
 
@Amit next time, we expect you to do that search on your own first.
 
@MadaraUchiha tl;dr internet explorer developers were lazy and did a bad job, so everyone must suffer
 
@MadaraUchiha OK, go on? (still haven't found what connects this to the fraction I'm looking for)
 
i did search but I am only getting the examples of full window height. not specifically of a div's height
 
@Amit hint: use the jQuery selector for an element instead of document
 
7:16 AM
@royhowie I didn't get your comment
 
@Amit Then you didn't search the right thing. It's ok, it happens to me too. Keep searching 'til you find it. Hint: it's in the jQuery API.
 
I am a bit dull in catching things soon
btw, I checked adding console.log(this) in setButton function
 
@Mr_Green did this change between implementations of the function? that might be the reason nothing is rendered (because an internal function relies on the correct this)
 
it was giving the sb object
if I use <%= and print console.log
nothing was logging but when I removed "=" from lodash syntax, it printed sb variable
 
@Jhawins yup still there, and no - they dont sponsor those kind of events :( (Glastonbury festival, and goodwood FoS though)
 
7:19 AM
@royhowie, not understanding where should i mention the element.
 
@DrogoNevets Jhawins is afk: home time]
 
guys I updated my question with pics, can I post in this forum
 
@Amit $('#myElementId').height() youmightnotneedjquery.com
 
@CapricaSix no, he's almost certainly asleep in bed actually Cap :P
 
0
A: Reducing 2 steps to 1step when clicked on input type=date

Marcos Pérez GudeYou can try firing focus or click event: _onFocus: function() { e.currentTarget.type = "date"; e.currentTarget.focus(); // or .click(); }

 
7:21 AM
@Mr_Green hmm, not entirely sure. I'll think about it. (I'm also a bit tired as is)
 
@royhowie, oh god it was simple still i was going round and round. Thanks a lot roy
@MadaraUchiha, sorry if i have asked in a wrong way
 
how to show meta descrption below title in google
i submit to index but not getting meta description below title in google search
 
!!> Date.prototype.from_now = function(n) { this.setDate(this.getDate() + n); return this; }; var d = new Date(); console.log(d, d.from_now(5), d);
 
@argentum47 "undefined" Logged: "2015-07-12T07:34:05.717Z","2015-07-12T07:34:05.717Z","2015-07-12T07:34:05.717Z‌​"
 
o.O
 
7:35 AM
Hi, can someone help with this little doubt:
I'm trying to generate dynamically this object with arrays inside:
 
@GEPD 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.
 
Object {title: "1", x: 1435460781000,title: "2", x: 1435460781000}
I get the data with ajax and trying to push it this way
 
@GEPD backwards; you should generate an array of objects
 
1 message moved to Trash can
@GEPD Please don't post unformatted code - hit Ctrl+K before sending, and see the faq.
 
sorry about that
but my output is:
`Object {title: "2", x: 1435460781000}`
I tryed with: `flags_data.push({title : val.title,x :Date.parse(val.x)})`
it's formatting the code?
code test `code = "somestring"`
ok now I get it
 
7:49 AM
Morning
 
hello @Neoares
 
I'm trying to generate dynamically this object with arrays inside:

`Object {title: "1", x: 1435460781000,title: "2", x: 1435460781000}`

I get the data with ajax and trying to push it this way

`var flags_data = {};
$.each(data.data,function(index,val) {
flags_data = {title : val.title,x :Date.parse(val.x)}
});`

but my output is:

`Object {title: "2", x: 1435460781000}`

I had tryed with: flags_data.push({title : val.title,x :Date.parse(val.x)})

but I get:
`Object [0] {title: "1", x: 1435460781000},Object [1] {title: "2", x: 1435460781000}`
 
user3119231
@Neoares a new day a new challenge
 
I think I don't know how to format the code, I'm sorry I tryed
 
@GEPD an object can't have duplicate keys
you need an array of objects, as in your 2nd example
 
7:54 AM
@Maurize what challenge
 
@GEPD how would you get the value if you have several keys named x
 
is the blip already fixed in north america?
 
@FlorianMargaine I get it from a json request
@FlorianMargaine I'm trying to do it this dynamically: jsfiddle.net/uk2g6pou (getting the data from a database
 
@GEPD you 2nd solution is good.
 
user3119231
@Neoares of course not, had to sleep yesterday. was tired :D
 
7:59 AM
no sleep, only code!! >:/
hehehe
 
user3119231
@Neoares I think it'll never be fixed. :/ nobody really knows how to solve it.
 
:24302474 you mean this one? `flags_data.push({title : val.title,x :Date.parse(val.x)})`
 
did you tried moving the blip the same way as the background?
 
@GEPD What is your expected output?
{title: "1", x: 1435460781000,title: "2", x: 1435460781000} is not a valid JavaScript object.
 
user3119231
@Neoares click on url and don't move mouse. bm-designs.de/test
 
user3119231
8:01 AM
you will see that the calculation IN movement event makes the trouble. If I use same way it will follow mouse always.
 
it says Neoares Home lol
I'm not from brazil hahahaha
 
user3119231
@Neoares yeah at it is display 500px from top and left (it is for example) -.-
 
user3119231
problem is to calculate this 500px in the movement
 
@MadaraUchiha so that is my problem, I've to figure out how can I do it
 
@GEPD Alright, take a step back. What are you trying to do? Why do you need this specific structure?
 
8:05 AM
@MadaraUchiha is to add, dynamically data to this hightchart graph jsfiddle.net/uk2g6pou
@MadaraUchiha that is an example where it get some data from a json request, and the other data (the flag type) is added in the code, I need to add the flag type from a json request too
 
@Maurize I'm doing tests with the code
but I dont have much time :c
 
user3119231
@Neoares like me all day and all night :D
 
user3119231
I'm at work :D
 
same
fuck my job, I want this blip to work
JK
 
user3119231
8:12 AM
haha :D
 
user3119231
I'm working on that problem :)
 
I have a <div> inside that i have a table where i have two <td>. inside that <td> i have inserted 20 div using loop (height 100px and width 100px). I want at the time of loop after completing the full height of the first <td> the rest of the <div> will autometically get shift to the next <td>. i am stuck here.
 
@Amit Why are you using tables for layout?
We're past the '90s
 
my faculty ordered me too do that way :(
can i do the same using a parent div?
 
@Maurize you deleted the terrain.png?
 
user3119231
8:16 AM
no changed path to subfolder.
 
fuck xDDDD
 
user3119231
 
user3119231
 
thx
 
user3119231
you're welcome! :)
 
8:19 AM
@MadaraUchiha, then can u guide me the way if i use two parent divs? I just want adding 20 divs using loop , first it will fill the height of the 1st div then it will autometicaly start filling the 2nd div with child divs (which is getting created by the loop)?
 
@Maurize the way you fix the blip on north america the first time doesn't work if you have a smaller screen
I think you should get image size and put the blip based on that size
 
@KendallFrey I've used Parcelforce and RoyalMail's web services, which are the Fedex of the UK. Are they using SOAP?
 
user3119231
@Neoares yeah, good idea. let me just study math on university :P
 
@MadaraUchiha that is the solution, I'll read more about it, but that I was missing, thanks!
 
user3119231
I think we don't use the math from terrain and calculate new
 
8:27 AM
Oo yay, getmdl.io
 
Hmm about scopes; if I return a function in a function (ex. function x(a) { return function Y () { console.log(a);}}) the function returned (y) will have access to the instance of the function returning it's variables?
 
@BenFortune I just love the ripple effect
when you click
 
user3119231
1
Q: Prevent image from moving with scrolling background

Maurice BambenekI am working on a scrolling background which is moved by mouse. I want to add images like sticker to it, so the blip is always in "north america" for example. But in all cases it doesn't worked. I think there is a huge problem with calculation. Maybe you can help me out. Thanks. Maybe this will ...

 
@FlorianMargaine ripple effect?
 
@FlorianMargaine Couldn't agree more, so pretty.
 
8:36 AM
I don't see any ripples on that site :(
 
@Gemtastic Click a ripple-enabled button
 
Oooh
Purty
 
Hi, would a variable expire(be undefined) over time?
 
yes?
but what do you mean
 
8:39 AM
Does JS garbage collect?
 
@Gemtastic yes
 
yes
 
I have a global variable. would it be undefined after a long period of time?
 
no
how do you even wonder that
 
define long xD
 
8:41 AM
long long time; // ago
2
 
I want to implement a lazy loading list, along with tabs. i mean(three tabs, with three list in each of them)
 
kek
 
@FlorianMargaine Thanks
 
can i use single div for all the three tabs, and maintain the data of each tab in3 different viriables
do i make sense?
 
user3119231
Is it possible to get clients username?
 
user3119231
8:46 AM
Got it in ie but need it even in ff
 
@RahmathullahMPulikkal yes. After 10 million years when the sun will gulp our Earth, that variable will be undefined.
 
@AwalGarg, very funny :D
 
I am serious. If you don't believe me, ask @FlorianMargaine.
 
Guys, how will git behave when merging changes from a branch of which I cherry-picked a few commits?
 
@AwalGarg the sun won't gulp our earth in 10 millions years
it's estimated in several billions years iirc
 
8:56 AM
i.e. merge a-b-c-d into e-a'-f-g-d'
 
all your estimates are belong to me
 
@MadaraUchiha fine
 
@FlorianMargaine No ugly conflicts?
 
@MadaraUchiha why? git will see you already have the same changeset, so it'll move on
@MadaraUchiha git is smart
 
@FlorianMargaine long long ago; // in a galaxy far far away
@FlorianMargaine k
 
8:58 AM
don't we teach that in 3rd grade? git is smart.
another way to say it: git is not svn
 

« first day (1725 days earlier)      last day (3223 days later) »