« first day (1175 days earlier)      last day (3771 days later) » 

1:03 PM
@Loktar its friday... are u up for a saturday project ?
details on gmail :P
 
!!weather kitchener
 
@rlemon [object Event]
@rlemon Kitchener: -25.18C (247.97K), sky is clear
 
yes it is ridiculously cold here today.
 
I am ridiculously inside today
 
Hahaha
 
1:12 PM
hi, i have a function that does something with a price... i tried to edit to get price * .020 (that is the +2%) but it doesn't work How to add to a decimal price a decimal percentage? like price * .020?
 
that should work. define "doesn't work"
 
@JanDvorak i prepare a pastebin and let you see...
 
@KendallFrey @SomeGuy -30 to -35 with the wind chill
ten minutes of exposed skin === frost bite
 
@JanDvorak here it is pastebin.com/81QTcSDz
 
1:21 PM
price = parseFloat((price*.02).toFixed(6))
 
parseFloat(price.toFixed(6));? Ew.
 
filled in the google doc meetup
 
hey, isn't that a copy-paste from a Prestashop codebase?
And no, this is not the place where you should be doing currency conversions
 
@rlemon wow thats :-/
 
just like your face
 
1:24 PM
@rlemon i was talking about temprature :-|
 
yea, so was I
cold :P
 
@rlemon well that melted it T_T
solar flare level burns. meany.
 
At least the ice should be hard tonight
 
ps do you have to go and work in this cold ?
 
but yea, it is nippy today
yea of course
 
1:25 PM
@AbhishekHingnikar newp
 
!!weather bangalore
 
@AbhishekHingnikar Bangalore: 25.196C (298.346K), few clouds
 
@KendallFrey works from home :P
 
@rlemon thats so sad :P
I am enjoying 25C ;D
 
@JanDvorak yes, but i have to show the increased price in a div on the page....how to do it?
 
1:26 PM
!!weather prague
 
@JanDvorak Prague: 7.47C (280.62K), few clouds
 
!!weather north pole
 
@AbhishekHingnikar North Pole: 7.5559F (-13.58C, 259.57K), scattered clouds
 
ne
Morning everyone
 
@rlemon your city is colder then north pole !
 
1:26 PM
mhmm
 
!!weather south pole
 
@smepie fix the value you're passing to the conversion function instead of displaying shenanigans
 
Anyone knows an open-source or otherwise freely available version of this: truview.ortery.com/HTMLJavaScript/Nike_PegususTV/…?
 
@AbhishekHingnikar Logan: 33.7999F (1C, 274.15K), sky is clear
 
ouch
 
1:26 PM
well south pole is having a good warm summer :-/ [I expected thats kinda worrying]
 
!!weather buffalo
 
@rlemon Buffalo: 1.3639F (-17.02C, 256.13K), light snow
 
!!weather south pole
 
@JanDvorak Logan: 33.7999F (1C, 274.15K), sky is clear
 
aww, I thought it was colder there
 
1:28 PM
@JanDvorak but the value is good if i don't edit... i have to take the same value and calculate the +2% to show it later onto another div...
 
:(
@KendallFrey it is colder here than Calgary :/
 
Well, spoiler, the north pole is in Minnesota
 
Anyone? :(
 
@MadaraUchiha you can probably press your own in an hour or so
it is an image gallery with auto play options and zoom
 
@rlemon My JSfu isn't at its best.
Any pointers as to what I should look at?
 
1:31 PM
preload array of images, step through them, when the guy wants to zoom you just apply the css zoom on the container
 
(I'm so rusty I had to look at MDN to remind myself how to perform an XMLHttpRequest :P)
@rlemon Actually I think it's done in a sprite there
 
so?
change position or image, same diff
 
@MadaraUchiha what's so hard to remember about $.getJSON(url, data).then(callback)?
 
@JanDvorak I'm actually trying really hard to end my dependency on jQuery.
 
Why? It's comfy.
 
1:35 PM
Sure thing, but I wouldn't want to depend on it.
 
regardless what you do, you will eventually end up depending on something anyways
at least, if you want to finish stuff in reasonable times
 
at the very least, you have to assume IEx or better
 
@JanDvorak No IE required.
Only Chrome and Mobile Chrome, for this particular app
 
in which case...
 
When generating a lot of DOM, do you think it's OK to create an element, change its innerHTML then append?
(rather than creating each element with document.createElement and appending them to one another?)
 
1:40 PM
if you want to attach an event handler, probably not
I prefer the hard way of eschewing HTML
define "a lot"
 
@JanDvorak A full layout, includes a viewer, some controls, and maybe some other things I haven't thought of yet.
 
do the controls render OOP style?
 
It's not that much of "a lot", but I somehow dislike seeing code with more than 5 createElements.
@JanDvorak I'm planning on doing that, although I have no idea how to even approach it :D
 
Hey @MadaraUchiha sup?
 
Hey @BenjaminGruenbaum, have a minute?
 
1:44 PM
Just a minute though, I came here to ask things in the C++ room tbh
 
@MadaraUchiha Each component has its own view and model
 
@JanDvorak Now I'm lost :D
brb
 
or maybe just a view
 
creating elements in-code doesn't make much sense if the element count goes beyond .. lets say 5 elements "a time"
templating FTW
 
@MadaraUchiha jsfiddle.net/5P9ZV
 
1:45 PM
@MadaraUchiha I mean, each component can render itself, then remember the element to which it has been rendered and update that element accordingly
 
ignore that mine flickers
 
@JanDvorak You'll have to sit through with me for a bit longer. I mean, I know Models and Views from MVC, but it seems as though we're talking about slightly different things
 
I'm talking about each component being an OOP object
I assumed you wanted to use MVC
g2g, sorry
 
@JanDvorak I have no idea how to implement MVC with JavaScript, can you give me a brief walkthrough?
xD OK
 
I may be online when I'm done walking, though
 
1:49 PM
@JanDvorak Ping me when you do, if you can.
 
lol
I broke the canon sir!
 
posted on January 03, 2014

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {} Just a reminder, you can support SMBC and get nifty at my patreon pa

 
2:05 PM
var mainArea = document.createElement("div");
mainArea.id = "mainArea";
mainArea.style = {
    width: "1280px",
    height: "720px",
    border: "1px dashed black"
};
this.context.appendChild(mainArea);
Why doesn't the style get applied?
The element is created and appended, the ID is set, but not the style.
 
You cannot set style like that
 
Eh? Why not? :(
I need to set them individually?
 
I actually don't know
Yeah
It's magic or something
 
I wish you could :(
 
How does jQuery do it?
 
2:09 PM
mainArea.style.width
etc. etc.
 
You can pass an object to jQuery.css, so how does that work?
 
for (i in obj) { elem.style[i] = obj[i] }
(Or something similar)
 
Bah
alright
 
I'm back
 
Back in black
 
2:11 PM
@JanDvorak o/
 
Welcome
 
I was looking through my gists I wrote someting like that
was crazy easy actually
 
Man, I hate waiting for testing feedback to come through
 
basically what Ryan said
 
Hi all!
 
2:15 PM
@AbhishekHingnikar I replied by the way. lol I had my tablet in the bedroom turned all the way up so it was chirping away this morning as I slept
hey @qwertynl
 
Hows it going?
 
but yeah @AbhishekHingnikar Im working on a game I promised my wife id work on
pretty good! Its Friday!
 
How's Agile methodology treating you these days? Getting used to it?
 
eh yeah Im not sure we are fully following it
 
jsfiddle.net/yBk42 who wants to see this as a jQuery plugin?
 
2:17 PM
basically we just get tasks we have 2 weeks to complete
@rlemon I thought there was one
 
@Loktar with FTW
 
maybe it wasnt realtime though
 
@Loktar but I didn't write it
:P
with( elm.style ) {
  height = '100px';
  width = '100px';
}
^ - anti pattern, but fast and easier to write imo
@MadaraUchiha or you can write a small utility function
 
How long can an airplane go in circles before it has to land?
 
yeah I saw the with
 
2:18 PM
@Loktar :-) And very snowy
 
was the first thing that caught my eye
 
@Loktar i'm interested in checking out the performance of the other long shadow (live) plugins
 
@rlemon wait... since when can you directly use elements by id name without document.getElementById?
 
since modern browsers
 
2:21 PM
I cant remember the name of the guy, but someone on codepen wrote one
I remember he made a pen using it
 
@rlemon 0_o why did I never know this?!
 
@Loktar I don't think that was actually his library
I think he just made the pen
 
THIS IS BLOWING MY MIND!
 
no the one Im thinking of wrote the library too
but it may have been the flatshadow author
 
okay nvm he did make realShadow
for some reason I thought the guy who made the pen wasn't the guy who made the plugin
 
2:22 PM
ah yeah thats the one
thats a goo done to compare yours to
 
So wait, @JanDvorak, How do you implement MVC in JS
 
but honestly I bet there wont be too many perf changes
I mean most everything is done with css
 
WHY DID I NEVER KNOW THIS?
 
I don't have any experience using any of the frameworks. @BenjaminGruenbaum does.
 
Is it documented anywhere @rlemon ?
 
2:23 PM
also.. why do I see so many of my pens when searching shadow on codepen?
 
Right now, I planned to have a Viewer class and Control classes for the main viewer and the controls
 
I dominate page 2
 
@JanDvorak I'm also during a spec dig in the C++ room for a bet so I'm kind of busy :P
 
just a heads up wordnik is now cool to use :P developer.wordnik.com
look at that purdy js image
 
11
A: Should the id of elements be made global variables? And

Niall SmartIt depends on which spec you read. :) This behavior is not described by the HTML4 specification (c.f., http://www.w3.org/TR/1999/REC-html401-19991224/struct/global.html#adef-id and http://www.w3.org/TR/1999/REC-html401-19991224/types.html#type-name). However, it was introduced by Internet Explor...

@qwertynl it is and isn't
 
2:25 PM
@rlemon say whaaat?
Reading...
 
lol dont use it @qwertynl
 
I cannot vote to delete, but that is a useless answer...
@rlemon It seems like I should not rely on it.
Related:
107
Q: IE/Chrome: are DOM tree elements global variables here?

KooiIncWorking on an idea for a simple HTMLElement wrapper I stumbled upon the following for IE and Chrome: for a given HTMLElement with ID in the DOM tree, it is possible to retrieve the div using its ID as variable name. So for a div like <div id="example">some text</div> in IE8 and Chrome you can...

 
@qwertynl no not at all
only use when playing around and quick testing
 
K. Just making sure.
 
I am beginner in Angular JS hence reading a book, where I encountered a statement which says "When data binding to an <img> or <a> tag, the obvious path of using {{ }} in the src or
href attributes won’t work well. Because browsers are aggressive about loading images
parallel to other content, Angular doesn’t get a chance to intercept data binding requests", could someone help me in understanding this?
 
2:29 PM
It is also bad practice, no?
 
it is handy for that. production wise, no
 
@JanDvorak I'm not using a framework though
 
@qwertynl yes a bad practice
 
@rlemon kk. :-) Thank you
 
Nor am I looking for a framework, I want to learn the principles :P
 
2:29 PM
dont even use it for messing around or you will develop bad habits! :P
 
don't listen to Loktar on this one :P
have fun while you code!
 
lol
 
document.getElementById('') is never fun to write
 
might as well just use jQuery for everything
 
^^
 
2:30 PM
The idea is to separate the model (the data and the business logic) from the view (how the data is shown to the user)
 
It is just cool that in the console I can quickly do <id-name> instead of document.get... @rlemon
 
awww they took it down :(
@qwertynl yup
 
@qwertynl the console is even easier..
 
@qwertynl wait, can you?
 
2:30 PM
@JanDvorak Can I what?
@Padyster post that 5 more times please :-)
 
@qwertynl $('#element'); and $$ work in the console fyi
 
Apologies but could u pls help me
 
nope, the latest state of the channel directives says you need to post a question at least 7 times before it gets answered
 
2 messages moved to Trash can
 
$$ returns an array of elements
and you can use any css selector
 
2:32 PM
@Loktar Hmmm
 
@Loktar so $$ === querySelectorAll?
 
been doing it for a while
yes
thats exactly what it maps to
and $ maps to querySelector
 
$$
function $$() { [Command Line API] }
 
anyone can help me pls
?
 
2:32 PM
@Padyster don't beg. we all saw the question, if anyone is interested they will help
 
> $$ === document.querySelectorAll
false
@Loktar ^
 
Not Begging
I call it requesting
 
I call it begging.
 
> The $$() command returns an array of all the elements that match the specified CSS selector, just like document.querySelectorAll(). For instance, the following displays selects all <button> elements with the CSS class "loginBtn":
 
@Padyster You can say hi first and shmooze a little :-)
 
2:33 PM
stop it
 
so maybe it uses something internal to chrome
because it says "just like"
 
@Loktar it seems. :-) But good to know! Thank you for the tip :-D
 
Dictator @rlemon
2
 
lol
 
I can be if you'd like.
 
2:35 PM
I'm the German here
 
yea.. Native Americans have historically not been the best at running a dictatorship
 
@jAndy I am the Jew.
runs away :-P
Ok that went too far.
 
:-P
 
Sorry @jAndy :-D
 
@Loktar i will ping the crap out of u for canvas help
 
2:36 PM
lol
 
I'm not wearing the mustache today, nn to run
 
you can annihilate me for css some day :-)
 
your project sounds easy dude for you
you should be fine
 
I know
i am worried about css performance :-/
 
I've been working with node canvas a lot lately, loving it
 
2:37 PM
i want some blurring and stuff in the bg to make it look realistic (-:
 
@jAndy :-)
 
am unsure about the design though :-/
I like circles but they kill images at times :-/
also they enforce the image constraints to always be square for least loss :-/ :P
and rectangles don't look that awesome :-/
 
did I mention in here I got a OUYA?
If anyones on the fence about one, has money to burn, and has a group of people they can play with I recommend it
so many 4 player games its nutty
going to port over a game today I think
 
er this weekend I mean
not today.. today I cant do anything but work :(
 
2:42 PM
is it still forbidden to post rebecca on fridays ?
 
its never forbidden
Our goddess of Fridays shall not be forbidden!
 
Dictators DO Not Understand Request They see Request as Begging
 
We should consider forbidding it as soon as she makes a song for each day of the week
 
two days down, five to go
 
Hey!
 
2:48 PM
Could someone help me in understanding a concept in AngularJS?
 
@copy thats when the world should emrace it! :P
@Padyster what are you trying to understand?
 
@jAndy of course not, that's crazy talk.
 
Im learning it myself
 
I am beginner in Angular JS hence reading a book, where I encountered a statement which says "When data binding to an <img> or <a> tag, the obvious path of using {{ }} in the src or
href attributes won’t work well. Because browsers are aggressive about loading images
parallel to other content, Angular doesn’t get a chance to intercept data binding requests", could someone help me in understanding this?
 
means you have to use ng-src
or ng-href
browser intercepts the request faster than angular, so angular cant act on them hence needing to use the ng directive
 
2:49 PM
what does this means " Because browsers are aggressive about loading images
parallel to other content, Angular doesn’t get a chance to intercept data binding requests"
 
the image could be loaded at the same time, or before angular
angular doesnt get a chance to act on it necessarily before the browser decides to fetch it
 
Dictator: fullfill your duty again!
 
so you could be downloading angular.js and img.png at the same time when loading the page
 
OHH
got that
Thanks @Loktar
 
@Padyster sure.
 
2:51 PM
np
 
@Padyster imagine you have an img src="{{foo}}" the browser will make a request to {{foo}} which will cause an error.
 
my angular woes are caused from not understanding the scope..
 
There is a 'hack' for it though: img {{}}src="{{foo}}" :P You should use ngSrc though.
 
@BenjaminGruenbaum yeah duh, better way to explain it. And never have seen that hack before wtf?
 
@Loktar $scope is like the Knockout view model. It's what you can watch. That's all there is to it.
@Loktar You didn't use tools like angular before they had ng-src :P
 
2:53 PM
well.. I guess scope inheritance and isolate scopes
still swimming around in my head
 
Thanks for elaboration @BenjaminGruenbaum
 
@Loktar $scope inheritance is just prototypical inheritance.
 
im like shit.. is this a part of $scope??
 
(Unlike Knockout which does it with with )
 
I never used knockout, wish I had exp with a library prior
I used backbone a small amt
but that was a lot different
I felt like I was using JS with backbone, with angular I feel like Im using.... angular
 
2:54 PM
Backbone is stupid ^^
@Loktar yeah, $scope is just prototypical inheritance :P That's how scopes work, it's pretty simple tbh.
 
oh also I was thinking about the interview thing @BenjaminGruenbaum
 
dnt know about Backbone but Angular is pretty good
 
if I could do it again I would have made that whole thing a directive
 
GSure
@Loktar Why?
 
and done like <loktar-tickerlist></loktar-tickerlist>
 
2:55 PM
user image
3
 
or something to that extent
 
Directives are great for reuse, but if there is no intent to reuse them I don't see why?
Directives also need rethinking for Angular 2 :P
 
well I would assume it may have been in another portion, thats exactly wh I would have probably
oh really ? :(
Im just starting to wrap my head around them..
 

« first day (1175 days earlier)      last day (3771 days later) »