« first day (1587 days earlier)      last day (3372 days later) » 

5:00 AM
@Mr_Green co-incidentally I am learning backbone too.
 
@argentum47 nice
currently I am checking this project.. dmytroyarmak.github.io/backbone-contact-manager/#contacts
very useful
 
Although my routes dun work. That website is cool.. I am making one like that. Although I am using github api.
Can i have the github link for the website ??
 
I am checking the source through chrome console.. I have no link for github
 
Ow. OK
 
let me know if you find it
 
5:04 AM
ok. It looks I have to restructure my application. This is so not cool. 500 ways for 100 different things
found it :D
 
ohh thanks :)
 
foo.addEventListener('click', function (e)
In this line, I get var foo is undefined. Defining the variable, I get anonomyous function, how would i solve this?
 
I had a funny idea: today I'm going to the maths olimpics, right? Being also a real athlete, what if I went with the same clothes I use for athletic competitions? XD
it must be done
 
5:20 AM
@sunto whats foo ?
 
That is actually what I am wondering as well.. Sorry, am a little newbie..
But it is for opening my menus, and pushstate function
 
check on google when can you use addEventListener
you can't use it on all variables
 
I understand, my problem is defining the variable. When I try to define it as "li", it says, anonomyous functon on the same line as above.
I guess you can understand I did not write the code all by myself, the pushstate functions are a little confusing to me.
I can understand the ajax functions, but the 'foo' in there, is confusing me
 
foo is a nonsense variable name used in code examples
 
Ok, that much figures ;)
 
5:26 AM
it came about as a go-to when you don't know what to call something
 
@sunto erm... you have no <li> in your html
the thing returned undefined
actually, returned an empty array
 
I didnot put in the html, I have many li's in my html, and anchors with onclick calling the ajax function
 
not in the fiddle
 
ok I will updte :)
:)
 
5:29 AM
!!afk just walk away man, just walk away.
 
when i access this on the browser it works and return results
but it does not work in my angular aPP
 
@sunto try to console.log foo
 
returning error No 'Access-Control-Allow-Origin' header is present on the requested resource.
 
.getElementsByTagName returns an array
 
i have added http.cors.allow-origin: "/.*/" on the server
 
5:31 AM
Correct
 
any idea?
 
@sunto when you do foo.addEventListener, you're doing [element, element].addEventListener
 
@towc Ok, I see.
Should I rather use, this.a? Actually, it is just there so it can reference to the correct url in the ajax, if I understand correct?
I'm sorry for very confusing questions, hard to ask correct questions with all the unknown terminology :)
But I do understand that every variable is an object, and that I can set the variable names to about anything, ecept underscores and numbers.
What I cannot wuite understand, is what to set the variable foo equal to..
 
you want foo to be an HTMLElement, right?
foo is currently an array of HTMLElements
just select from that array the element that you want to apply the event listener to
 
I guess it is supposed to be an array...
Hm, should I have to put all my li/a's into an array maybe?
 
5:40 AM
there's no use in that
 
Hehe ok: )
 
just iterate through the elements in foo to apply the EL to each of them
 
ok, in this case, I think that foo is my nav, but at this moment, i have nothing in my html called foo
So that is why i guessed, it is there for referencing between ajac function and pushstate function
as it all works, but return undefined for some reason, I understand that is because i have not defined the variable.
Should I have a for loop, in the var foo?
 
@sunto inside of the var??
 
guess that is what you mean by iterate? Hehe damn javascript terminology is confusin :p
yes that was what i meant
 
5:46 AM
in the meantime: could anyone help me understand the solution to the problem? Same rules: no calculator and trig
@sunto you can't iterate in variables. You can iterate through other stuff to change it's values
 
ah yes of course
inside a function of course, hmm..
Ok, if I am to define foo, as an html element..
What element would that be? I am thinking it should be the clicked anchor, or li, but maybe I am thinking about it all wrong
 
@sunto what do you want to event listener to be applied to? It's your choice. You can also add it to multiple elements
 
hm, well, I want it to be applied to the menu item, link or list item, that is clicked I guess..
The pushstate changes the url, so I guess to the anchor? I do not know :)
 
it's up to you
 
hehe :) Ok, any clues, because if I say GetElementsByTags, a, it says that the foo.addEventlistener line is an anonymous function :o
 
5:51 AM
@towc Why the absurd limitations?
 
@SomeGuy that was the only problem I couldn't solve yesterday when I was training for the math olimpics, and they have those rules
 
Is that trigonometric by the way? trying to find angle or something?
 
just pen and blank paper
 
Ah
 
I guess you can use the calculator as long as my mind is able to do that calculation in less than 20 seconds
I don't really have any idea of how to approach this problem
 
5:54 AM
Are you trying to find the volume of the area up there? ( C )
 
@sunto against the rules
@sunto i'm trying to find the area of AB'C'
@sunto foo[0]
 
Hm, from outer A , inner B, to Inner C?
 
@sunto yes
 
wow now my head started working. That was a new kind of trig to me :)
 
@SomeGuy any ideas?
 
5:58 AM
I'm doing something else right now. I'll think about this when I'm done
 
I am thinking, that the space between B' and B, must be sorted with an angle, sinus or cos, dont remember wich is down there.. Hmmhmm
 
@sunto read the rules: no trig
I'm not allowed to use sin/cos
 
aha wow :)
that was a real brainer! :)
Understand that you are going to olympic yes, that is far ahead from my study in electricty :)
 
my guess is that I just need to find out the area of B'BCC' and subtract it from ABC
and it seems possible to find out that area, but I just can't figure out how
 
yeah i guess that is the way, but kind of hard without getting B' to B.. and C' to C. hm, I guess there is some relation between the angle there, when you have those specific lenghts, 3 being 75%, 4 beeing 100%, and 1 beeing like 25 %, not sure
I thought I was good at math haha ;) If You figure that one out I must know how ;)
hmm a thought
is 1 then 25% of A to C, and 33 % of A to B?
and using that somehow
 
6:07 AM
@sunto no
 
and you can see the angle has specific degrees, based on the lenghts, 3 and 4, can u then use that somehow, or would that be considered trig? I know that it looks like a carpenters ruld, 40,60,100
 
@sunto the only thing I can't use is sin/cos or other functions that only calculators can do easily
 
@towc Thought about it a little, and I have no idea :p
 
nice
 
ok. The way I see that triangle, is 90 degrees, and since it is 4 and 3 long, it must be some rule there you can use
 
6:10 AM
well, I can know the hypotenuse, but that's basically it
 
looks like a real brainer that one :p
 
I think you've got to think of angle bisectors
 
I know that the small triangle is similar to the bigger one
 
But I don't know / remember enough to be useful
 
yes that makes sense
7 if my head did that correct is the hypotenus?
 
6:12 AM
@sunto -_- 5
 
hahaha :)
ok, I havn't done that in years, obviously rusty :)
hum, isn't it 4x4, + 3x4, is 28, /4 is 7? wow no im going to bed :)
I can see you are right at hthe picture, so.. Hehe, well good luck anyways, you get it eventually :)
 
You want 4x4 + 3x3
Which is 25
Square root of that is 5
So the hyp is 5
 
ohh of course.. square root, not just 4 :P Late in the morning :P
 
What are some common reasons for angularjs ng-view to not render? Its a problem that pops up repeatedly when I develop but no error is thrown
 
@rlemon I'm literally going to that airport in a few hours to pick up my sister. There's also a massive eagle being ridden by gandalf hanging from the roof
 
A stake: 0; 30 GAR 30/60 = 1/2 GAR GAR ≈ 3 m long. [10]
Forward is the fallen 0 6 When the top has dropped 6/60
downstairs has distanced himself ..hvor far foot removed from the vertical?
0; 30 squaring: 0; 15, don? (30/60) 2 = 900/3500 = 15/60
draw 0 6 0; 30: 0; 24, don? -6/60 + 30/60 = 24/60
0; 24 squaring: 0; 9.36, don? (24/60) 2 = 576/3600 = 0; 9.36
moves 0; 9.36 from 0; 15: 0; 5.24, don? - 576/3600 + 15/60 = 324/3600 = 0; 5.24
0; 5.24 has square root? 0 18 (324/3600) -2 = 18/60 = 0; 18
0; 18 GAR have it removed at the ground
Pythagoras’ læresetning er en av de mest grunnleggende læresetninger innen euklidsk geometri og kan uttrykkes som: «I en rettvinklet trekant er summen av kvadratene på katetene lik kvadratet på hypotenusen.» De to katetene er de korteste sidene i trekanten, og hypotenusen er den lengste. Kaller en lengdene av katetene henholdsvis a og b, samt lengden av hypotenusen for c, så kan Pythagoras' læresetning uttrykkes som ligningen: Pythagoras’ læresetning har sitt navn etter den greske matematikeren Pythagoras som ansees å være den som oppdaget og beviste setningen. Blant matematikere trekkes dette...
just translate to english, wasn't in the english page
furthest down on the page
 
user1596138
...wut
 
found it!
we can calculate the height of ABC for AB pretty easily. We just subtract 1 and we get the height of the other triangle which is similar to the bigger one: the ratios are the same, I just need to calculate!
 
anybody know angularjs and willing to look at a very small start of a project? my ng-view isn't rendering
No errors throwing
 
6:38 AM
@towc You'll get it!
The calculating part there is the hard part i guess, As the difference between C' and C surely cannot be 1, but it has some ratio wich is relative/the same as to the B' to B?
Or did you there just subtract 1 from 5x5 so it is 4x4? Hehe curious to what the solution there is :)
 
user2620028
@Jhawins lolwut
 
6:52 AM
@towc What do you mean by "the height of ABC for AB"?
 
7:05 AM
how can I hide bootstrap form-group,I ve tried the display:none and the hide class
 
user2620028
if display:none does not hide the element there are two things that could be happening
 
user2620028
your selector for the css of the html is wrong, or there is a more specific css selector with another display value specified
 
7:29 AM
Is Javascript mostly written using FP paradigm or OOP paradigm to design webclients?
 
@overexchange That's not really an answerable question.
 
@SomeKittens Sure it is... "it depends"
 
I learnt that server side programming majorily done in OOP paradigm either in php or asp .net
 
@overexchange Again, that depends on what definition of "server side" is being used. But even for web, there's a huge amount of stuff written in various flavours of .NET
 
@ivarni Do you mean, one had to take a decision to either implement FP or OOP in javascript based on the web client requirement?
 
7:41 AM
hi all
if anyone has an idea please : stackoverflow.com/questions/28586618/… :)
 
@overexchange Yes. There's no silver bullet in programming. But in addition to requirements, skillsets of the people involved also matter. It would probably not be a good idea to start making an app with om if noone involved know any ClojureScript.
 
@ivarni Well if team does not have a right skill set that is a managerial issue. Am talking about the technical aspect.
 
@overexchange technically, you can do many things with many languages
as ivarni said, there's no silver bullet
in practice, it's usually what the team knows that's used
 
user2620028
@overexchange no one knows everything, in the same regard you can't expect everyone to know one thing. With it being a job and skillset regarding the subject, that does not mean that they can not do the job. They just do it differently.
 
7:59 AM
@Julo0sS Your question is hard to follow. Why do you have two rectangles (a black and a red) ? Which one do you want to fix ?
In any case it's easy to make the red rectangle zoom correctly
 
@dystroy for me, the black rectangle is the container, the svg shape should appear in this one
 
Your problem is that the red rectangle doesn't scale correctly ?
 
how then? "play" with transform scale of svg? this is a bit tricky, there should be a better solution
black rectangle is the "shape container", i have to place it at a defined point (lat + lng to make it fit the map at a specific place)
into this black rectangle i have to place my svg shape (here the shape is a red rectangle... that's the confusing thing)
and it has to fit the black rectangle... it must "be contained" into it
 
I answered, with a demo
0
A: add custom svg layer on google map (api v3)

dystroyIf you want your svg image to be correctly scaled, you need to have a viewBox (you did it) and no dimensions in the svg element (here's the problem). Remove those lines : svg.setAttribute('width','400'); svg.setAttribute('height','400'); Demonstration

 
ok, i'll get this to a real example now and come back to you :)
 
8:08 AM
!!tell Zirak define malaise
 
@Zirak malaise A feeling of general bodily discomfort, fatigue or unpleasantness, often at the onset of illness.
 
8:56 AM
@SomeGuy No definition found.
 
@dystroy r u there?
 
Zenzizenzizenzic is actually a word, weird
 
@Julo0sS unsure
 
Bet that'd get you a lot in a game of scrabble
 
@Neil Hahaha
That's awesome
 
9:00 AM
@Neil I don't think there are enough Z
(there's only one in fact for English editions)
 
> doeth represent the square of squares squaredly
 
@dystroy ^^ maybe i found my solution, back soon
 
Square of Squares Squaredly Squared.. because such a thing is said so often, a word must be invented
 
9:03 AM
We generalized with the concept of powers since
 
@dystroy jsfiddle.net/w1t1j2a1/11 still stuckkkkkkeddddd
@dystroy sure you'll say that the problem is still that fckn innerhtml, right?^^
 
@Julo0sS DO NOT USE INNERHTML WITH SVG
 
@dystroy ok, working on it :)
 
If you don't want to build nodes by hand, use a library
@BenjaminGruenbaum It looks like const is forbidden following "use strict" in a recent version of iojs. Does that look normal ?
 
when am I going to be comparatively talented like the others.
 
9:20 AM
just live life.. no need to be talented :)
 
:):
 
if you are a good googler/asker.. that is enough
 
ok
goes back to backbane
 
@dystroy const in v8 is stupid slow - I suggest that if you use it use it with babel
It's slower than var, super silly.
 
ok
Thanks.
In any case, I was wrong : it works for me when I install iojs 1.2.0
looking for a way to programmaticaly know the running version of iojs...
found it : process.version
 
9:34 AM
context "css" do
  bootstrap is so heavy and I am so terrible
end
 
Anybody with experience with WCF services?
 
How bad is it to downvote all answers and then add one?
 
Do the answer deserve it?
 
@BenjaminGruenbaum When the existing answers are bad, there's no problem
 
I just downvoted 4 answers.
 
9:46 AM
I frequently upvote or downvote other answers
 
Here, I'll find the question again
1
Q: Return value after all promises are resolved within a loop

Raul VallespinGiven this IDs array: var array = [1,2,3,4,5]; How can I return a promise AFTER all the other calls made within the loop are finished? var deferred = $q.defer(), result = []; for (var i = 0; i < array.length; i++) { var id = array[i]; ...

I mean, the only answer there that has an upvote uses jQuery -_- The question has no jQuery
 
AAB
10:03 AM
hi
need some clarification
with callback function in jQuery
2
A: jQuery script in Separate file does not work

Jeremy ThilleThis is a very common question, unfortunately way too common, and has been answered many times before. You have to understand asynchronism. When you bind $('#rank').click in your init function, $('#rank') does not exist yet. It's not originally in your DOM. It will be created a few moments late...

$('#content').load('content.php', function(){
// this is the callback function. It will be executed after the load() finishes and content.php is fetched.

$('#rank').click(function(event){
alert("This works!!");
event.preventDefault();
});
})
function myfun(){
$('#rank').click(function(event){
alert("This works!!");
event.preventDefault();
});
}
if i keep myfun in .load method it does not work why ?
 
^ format please
 
AAB
let me do it in jsfiddle
 
oikes
 
AAB
@argentum47 thanks
 
I also faced such a problem one.
I didn't find the solution :D
I guess you can use ajax to load the script
 
10:11 AM
What's the question? You just said 'I need some clarification'. On what?
 
AAB
well regarding function use let me format the code and show
 
$('#content').load('content.php',myfun()) wrong .
$('#content').load('content.php',myfun)
 
AAB
Yes my question is whats the difference between the 2?
 
in the second case you pass the reference to the function
in the wrong case, you are calling the function. i.e. assigning the result of the myfun(). You don't want that. You want it to call when the action is fired
if myfunc() { return 5; }, then it becomes like $('#content').load('content.php', 5). possibly
passing function() {} as the callback is equivalent to passing the reference.
 
AAB
but in both cases isn`t the body of the function executed?
 
10:18 AM
Yeah, but when its executed. That matters
 
AAB
so in wrong case its not executed after page load is completed
 
its executed as soon as the javascipt executes. It doesn't matter page loads or not. If you have to make that work, you have to do function() { myFunc() }
 
AAB
in other words the wrong case is not a callback function
 
I think you miss the picture of passing functions.
 
AAB
could you explain?
 
10:22 AM
You are supposed to pass a function not the value of the function. myfunc() is calling the function, so what you have as a result, in your case is not a function.
I don't have the power to explain. Its simple pass-by-reference vs pass-by-value. I accept the way they are. I don't have enuf knowledge to explain them.
 
Uh. It's not pass by reference vs pass by value. That's with primitives and objs
 
@dystroy still there? i'm almost on it... need your help to understand what's goin on jsfiddle.net/w1t1j2a1/81 seems like svg shape is "moving" a bit on zoom event... can't fix it exactly on map image :/ try zoom in / out on svg limits
 
It's a matter of passing a delegate (reference to func) or invoking the func and passing the result
 
o/
 
ok, my mistake
 
AAB
10:27 AM
ok thanks for your help
 
I confuse the C stuff , passing functions via pointers with the java stuff.
@AAB sometimes accept the fact, and it will seem you know it . :P , and then you can learn more as you go :D
^ don't follow that advice
 
AAB
:P
I am gonna try understanding callback
functions
if i have any doubts i will come back here hope someone clears up the basics .. :P
 
Can firebase have business logic?
 
@Sippy Its good to see you again. :))
 
@argentum47 :D
 
10:38 AM
Morning guys
do you know any good applications for recording desktop + voice
 
if anyone has an idea : i've put a custom layer on my google map. this is a .svg layer. This svg seems to be "moving" when you zoom in/out. This is clearly visible if you look at the outer limit of the svg. At current zoom it seems to fit (stay near the map center marker to see it) but zoom out and the svg limit seems to move down and then its position is not correct... jsfiddle.net/w1t1j2a1/81
 
zoom in moves the svg shape up, zoom out moves it down...
 
the svg is the rectangle ?
 
no, svg is contained in the rect
 
10:41 AM
For me it looks perfectly good
ah then it does not load
 
rectangle is just a container div
problem is the svg shape (red line) when you zoom you see that red line (outer limit near the marker) is no more over the google map black line that defines the same territory
@dievardump the div is the "bounding box" containing the svg to make it fit the map...
 
@Sippy yeah, I've checked that site, but I was wondering have you tested one which is easy to use and good
 
So, someone just downvoted my answer and said it is because I downvoted theirs.
Should I give a fuck?
 
@ziGi I've used CamStudio
It was okay.
Fraps also records voice if you didn't know.
 
@dievardump the black rect, does not move on zoom in/out, but the svg does... :/
 
10:44 AM
in node, how do you check if a folder has a valid .git repo?
ie check its integrity
@rlemon sodarkchat hurts my eyes
 
@SuperUberDuper Don't use it then lol
 
@Sippy yeah, I used it but the voice quality is not good
 
running git clone command in node exec doesn't work well :(
 
10:48 AM
> in node
 
@ziGi Have you tried Fraps?
 
@Julo0sS I see no svg sorry
 
I'll try it now
 
@dievardump oO
 
@Julo0sS Ah I see it in Firefox, but not in Chrome
 
10:49 AM
@dievardump ok
idk why but ok...^^
 
@BartekBanachewicz revenge downvotes, also it's snowing here soon.
Oh I better watch the io meeting youtube
 
@BenjaminGruenbaum really? it's quite cold here but the snow is long gone
 
snow is rare here - once a year.
It's sort of a big deal :P
 
well it was snowing a few days ago
@BenjaminGruenbaum I see
frankly the climate here tends to get warmer
we used to have more harsh winters
last year was fucked up
 
Last week it was 28 deg here :D
 
10:53 AM
@Julo0sS you're talking about a really few pixels here, no ?
 
@dievardump yes, it goes up or down from few pixels on zoom event. Why? idk. but, at current zoom svg seems to fit, when zoom out/in, it doesnt fit anymore. (strange thing, chrome can read my .svg file without any problem but as you said it does not appear in fiddle + google window)
 
there are good news though
Jason McKesson is alive
 
3D Graphics Programmer ?
 
@dievardump maybe it's "few" pix, but here jsfiddle.net/w1t1j2a1/84 zoom 14, these few pix mean that svg position is not accurate at all... :'(
 
@argentum47 yes
 
10:59 AM
cool.
Although I dunno why he might be pseudo dead
 
@argentum47 because he was inactive for 1.5 years on the internet
 
owow. I see.
 
Maybe he's close friends with Schrodinger
 
like, he didn't touch his code on bitbucket, he didn't log in to SO
he didn't update his amazing book
and suddenly bam a commit 5 days ago
 
@Julo0sS with Math.round around your values (se.y se.w etc...) and without the border on the overlay, for me it does not move anymore
 
11:02 AM
@BartekBanachewicz huh?
 
Might be he was researching.
 
@dievardump you show me? :D
 
@BenjaminGruenbaum well continue reading
 
@BartekBanachewicz nice
 
11:07 AM
 
11:22 AM
@AwalGarg
 
BTW @FlorianMargaine Quasiquotation
 
@BartekBanachewicz what is this?
cute
 
Whenver I see haskell, I feel i want to learn it.!
and when i do that, my brain stackoverflows :-(
 
@darkyen00 what are you learning from?
beginnings in haskell are really simple
@BenjaminGruenbaum well, it's quasiquotation
 
11:44 AM
@BartekBanachewicz Internet
 
How often do you use reduceRight in your code?
 
In es6 can I use
super.methodName ?
 
@darkyen00 what specifically
 
@BartekBanachewicz for instance I have a .draw method in my base class
I want to call that .draw method when calling my .draw method in the extended class
so
class BaseClass{
     draw(){
          /* draws something on canvas */
     }
}
and then
 
@BenjaminGruenbaum I see you have some rep on angular. I need to async load some data/conf files before bootstrapping my app. Since angular has already $q and $http I think it's better using it than adding some new promise and xhr modules.
What do you think of : https://gist.github.com/dievardump/0ba508aacedf5216f478

does it look "good enough" to do it like that?
 
11:47 AM
class AwesomeClass{
     draw(){
           super.draw();
           /* draws something else on canvas */
     }
}
 
@dievardump $http.get already returns a promise, no need to wrap it in one
 
@BenjaminGruenbaum Um what ?
 
That is for me ;)
 
Oh that is good
 
11:48 AM
Although I would not load the files asynchronously - I'd concat them as a build step and load them
 
@darkyen00 Yes, according to the ES6 spec you can call the base class .draw function using super.draw.
 
They need to be modified by the final clients
It was concatened
 
@AaditMShah that's not the spec and it changed several times on the subject
 
Until they told me that 3 days before the release o/
 
@dievardump we do translations and inline it as a build step.
Anyway, you can get the same code with:
 
11:50 AM
Okay, that I didn't know.
 
The final client deploys the app for "sub firma" and sub firma need to be able to modify some translating things, without any build step
So they will modify the .json files
(I told them there is a lot of chances they will break everything, they don't want to listen - "su and take my money")
 
@darkyen00 yes it's allowed btw.
 
Got it :D
Awesome.
it also lets me do if( super.draw )
 
@darkyen00 why did you ping me with that
 
wait no
 
11:58 AM
and why isn't anyone psyched about asm.js support in newest IE
 
@BartekBanachewicz IE::least is least used browser
IE::Latest**
 
But still
It means that MS is another big player who allows us to not write JS
Or at least has plans with that
 

« first day (1587 days earlier)      last day (3372 days later) »