« first day (1675 days earlier)      last day (3279 days later) » 

12:00 AM
@royhowie -1 not enough javascript
 
@ElliotBonneville that was the point ='(
 
jk, that's pretty slick.
 
@ElliotBonneville it's even nicer in jade
div.wrap2
    - var imgs = [[200, 286], [200, 139], [140, 200], [200, 287], [96, 139]];
    - for (var i = 0; i < imgs.length; i++) {
        div.group
            input(type="radio" name="test" id="#{i}" value="#{i}" checked="#{input == 3}")
            label(for="#{(i - 1 + imgs.length) % imgs.length}").previous P#{i}
            label(for="#{(i + 1) % imgs.length}").next N#{i}
            div.content
                p panel ##{i}
                img(src="http://placekitten.com/g/#{imgs[i].join('/')}" width="#{imgs[i][0]}" height="#{imgs[i][1]}")
 
ooh shiny
man, I should hop on the Jade bandwagon
that looks pretty fun.
 
@ElliotBonneville I used to use EJS. Switch to Jade on my newest 2 projects—never looking back. So much nicer.
 
12:05 AM
JSX all the way
 
yeah I've done a little with jade and I really like it, but I haven't really gotten into it
 
@ElliotBonneville takes like 20 minutes to get up and running/used to it
 
Jade++
 
@royhowie yeah, mainly I've used it for odd bits of HTML I'm serving up with express
very very easy to slip into.
 
Have any of you tried Meteor?
 
12:13 AM
that game library?
nope. not that game library.
 
@taco isn't that for when you want to use web sockets and stuff like that a lot?
 
I meant meteor.com
Javascript fullstack with mongo
 
no but it looks gorgeous
 
@taco sounds appealing
 
What really got me interested was when a guy released a no-conflict AngularJS project that runs on meteor. It seems pretty awesome so far. I was just wondering of production downsides
I started looking into it after comparing frameworks on todomvc.com
It uses node, mongo, javascript basically, but I'm using the angular-meteor project because I like Angular on the front end
 
12:24 AM
How do I use the bot to test stuff?
 
what, like run javascript?
 
!!> console.log('hello, Matt');
 
then go to the sandbox
 
@SomeKittens "undefined" Logged: "hello, Matt"
 
12:27 AM
Thanks.
 
!!redo
 
May 13 at 6:57, by royhowie
does !!redo work?
 
!!taco
 
@taco That didn't make much sense. Use the !!/help command to learn more.
 
@taco teach her a command
 
12:34 AM
!!smyd
 
@taco That didn't make much sense. Use the !!/help command to learn more.
 
Gonna go get ready to watch the Mad Men finale.
Have a nice night, guys
 
bye taco
 
12:57 AM
Alright... I'm stumped..
This works in an alert function.
tdCells[h].innerHTML.substring(0,2)
and then it says undefined when used in an if statement.
 
 
and the error is line 104?
 
That and as of now 98
Cause I used 98 as a test to get a more accurate error
 
Line 97 is the problem.
 
1:03 AM
how so?
 
You have <= when you want just <
 
Oh, I see.
Thanks, now it works perfectly... I thought I did <, my mistake.
 
we all do it :)
 
Nice to have a second pair of eyes :)
 
morning
!!time management or fun stuff 2/3
 
1:14 AM
@Shea time management
@Shea time management
 
okay :/
!!it's always the first option or sometimes the second
 
@Shea sometimes the second
 
well then
 
!!yes or no
 
@Matt no
@Matt yes
 
1:17 AM
It's amazing :)
 
1:27 AM
!!make it good or just get er done
 
@Shea just get er done
 
I'm gettin' really sick of parallels chewing up all of my CPU
150% for running IIS? Really?
 
Man...
I feel so stupid with all these questions cause I haven't done this in a while..
If I assign two classNames by whatever.className = "hello goodbye"; then I try to a className of "goodbye" will it still find it if I use...
if("goodbye" ==whatever.className) { do code} will it find it?
 
1:42 AM
if whatever.className = "hello goodbye"; then whatever.className == "hello goodbye" however (whatever.className.indexOf("goodbye") > -1) == true
so just use indexOf, because className is a string
!!Shea is cool or nawww
 
@Shea nawww
 
awww :(
 
hey, never done oauth before and trying to learn the basics via passport, but tbh I'm not sure if I've even plugged in my keys correctly. Given that the app is erroring out on the callback, I'm guessing I screwed up somewhere.
I used this generator github.com/DaftMonk/generator-angular-fullstack which uses passport in the background to authenticate with google (etc). The first mistake I think I'm making is, my google client id ends with: apps.googleusercontent.com which feels like it shouldn't be there. Second, the callback uri has a / in it, as in ?code=4/... which also feels wrong...and the error it's throwing explicitly is even less helpful InternalOAuthError: failed to fetch user profile
 
2:05 AM
!!Shea is cool or nawwww
 
@Matt Shea is cool
 
@shea you're cool :) Thanks.
 
yusss :)
 
That what I figured I would have to do if it didn't search an array of classNames
 
 
1 hour later…
3:06 AM
night
 
this, my friends, is why the word "if" is very important:
Exactly, Why ? This is the same question I asked my manager, and he said our site should be visible to everyone, we have to consider accessibility, and for most importantly for legal purpose. Also javascript based contents are not crawled by google! Whe he saw one page which was using javascript and when it was disabled the whole calendar disappeared, he simply said it is illegal and not acceptable! I looked around the room and everyone looked at me as I was watching porn! — Abdul Nov 19 '11 at 15:19
 
3:42 AM
@RoelvanUden Pretty cool, but not even close to the first cool game on Steam made with js/canvas :P
there are quite a few fully released games using html5 on Steam
@RoelvanUden I unpinned because while it uses canvas/js ect. its made with Construct 2, a drag and drop game editor, which is totally fine ofc however its not like these people sat down and banged out a game using sublime text (or some text editor) + js
there is a list of games on Steam made with Construct 2, lots of games using nodewebkit
there is a game made with js/canvas without a game maker tool, by Rezoner
@towc I echo the sentiments of the comments, while you may not think its rude its rude to call codepen.io/tmrDevelops pens code messy but understandable.
 
4:02 AM
:/
but it kinda is, and somehow I need to express that
 
HI all, IM using canvasJS to create live graphs, but everytime I have to plot the graph from starting and performing redundant work. Is there a way to just append to graph rather than recreate it ? I just need to hold my graph and append it only. canvasjs.com/forums/topic/graph-a-csv-file/page/3/#post-8792
 
I wish it was possible to just go
<img src="url" alt="logo" anchor="index.html" />
 
@EnglishMaster well, you can add an onclick with js, but people are going to scream at you
 
yeah
I love HTML and XML to express structure of application UI but it has a lot of freaking limits
 
4:20 AM
I think you could rewrite that section and not even mention individuals just say you've come across very structured, and unstructured code styles.
 
ok, that would probably be better
 
lol i just think it would save you headaches in the long run honestly
 
@Loktar what are you doing?
 
6 messages moved to JS trash
@royhowie what do you mean?
 
@Loktar that whole conversation
 
4:23 AM
@royhowie talking to towc about something he wrote.
providing feedback.
 
and it is about javascript
 
oh, okay
stackoverflow.com/questions/30295085/… -> will I get closed (like last time)?
 
@towc otherwise the article is good btw :P
 
thanks.
ok, re-updated it
(again under code managing)
any better?
 
yeah way better
 
4:26 AM
also, do you agree on the guy with the physics stuff?
I mean, I've seen that format in many places, I thought it was widely used
 
@towc personally I just think he is mad about the tmrdevelops comment
 
ok...
thanks for your feedback
 
it caused people to judge your article a bit more harshly I think.
especially since he commented again and mentioned it :P
> . If you find @tmrDevelops code hard to understand, you NEED TO READ MORE. It represents not a failing in her ability to code, but in your ability to comprehend.
haha yeah I definitely think thats why he judged you a bit harshly in the previous comments.
 
I don't like code-pen
their UI is way too cluttered
 
@royhowie they just had a re-design to fix that :P
 
4:36 AM
@towc then they didn't do a very good job
 
ok...
 
@royhowie I agree
 
jsfiddle has a better layout
 
haha was just going to say that
thats where Ill write the code for my pens initially
and then copy/paste them into codepen
 
I just always have sublime text open
I just do it there—so much easier since I can command-tab back to the browser (or even set up a script to watch the file) and automatically reload
 
4:38 AM
Firefox scratchpad for me
 
@towc you should use comma-first variable declaration
 
but I don't
 
comma first, thats disgusting.
 
@royhowie Whoa, why?
 
@Loktar I actually had this sentiment for the longest time
 
4:41 AM
What does it aid in?
 
but I've just come to the realization that it makes moving stuff around 100x faster
 
From my perusing of code comma first seems to be dying off.
 
i start with paper and pencil
 
I start with crayons and vodka
 
haha
 
4:42 AM
I didn't like the aesthetics, but function > form
 
Actually, a few of us at my office have a semi-regular wine-n-whiteboard night
 
comma-first means the comma is attached to its variable, not the variable before it
 
Even in old repos TJ used to maintain, comma first is gone.
 
@Loktar he needs to get better at naming variables.
 
4:44 AM
I don't see how a slight increase in ease of reordering makes up for the confusion that pattern adds to someone that hasn't seen it before.
 
@monners how is it at all confusing?
 
How about we just move the commas offscreen?
 
I hate this argument
 
@royhowie why not just lint?
 
var foo = 'foo'                                                                                        ,
     bar = 'bar'                                                                                        ,
     baz = 'baz';
 
4:45 AM
why not just write
; code like this?
; then we will never forget
; semi colons!!!
 
why do I need to serve the needs of people who can't read syntax
@Loktar that's not the same
 
@royhowie Because you're not following convention?
 
@royhowie because 90% of programming is about someone else maintaining it.
 
@Loktar that is parallel to putting commas at the end
 
@Loktar Complete a few katas like this and report back
 
4:46 AM
lol
 
@Loktar Pffft, the compiler takes care of that for me!
 
I think @royhowie you are the first dev I've spoken to in real life who prefers comma first.
I always thought you guys were a myth
 
@Loktar I didn't like them until I started on my most recent project
 
semistandard all the way
 
doesn't bartekBenechewitz use comma first aswell?
 
4:49 AM
@royhowie Oh, so this is a recent development? We'll see how long it lasts :P
 
how to set alert box in jvector map for particular country ?
 
@Thennarasu you're going to have to give 100x more detail
@monners our great lord @MadaraUchiha has spoken: stackoverflow.com/a/11065631/2476755
 
how to connect database in ajax function?i want display data in jvector map from database.jvector map code all javascript.how to connect database file through ajax to javascript
 
Uhh, seems the errors in that gist is things my autolinter is already yelling at me for every time I save a file.
 
@Thennarasu read the rules
 
4:55 AM
@Thennarasu How about you don't connect to a database throught AJAX?
 
jan Dvorak i want call my php database file in ajax server side
 
what do you mean "ajax server side"? The database doesn't care what kind of request you got.
 
 
ttj
what are the disadvantages of making an entire website use restful services?
 
@ttj I'm not sure, but I can tell you that the advantages include never being tired.
 
ttj
5:05 AM
i c wut u did thar
 
English, please
 
@JanDvorak Top of the morning' to yah, Gov'nor!
 
21st century english, please
 
@JanDvorak bloody hell!
 
.. or late 20th century english, rather
 
5:08 AM
@JanDvorak you're fishing for "American English"
 
I'm not too hot on leaving out "u" from everywhere and I definitely want to avoid txtspk
 
@royhowie git 'er dun!
 
@JanDvorak I've srely noticed
 
you dawg I herd you like the letter "U" so I addedd U in you just for you
 
is it appropriate to flag this as NAA?
 
5:13 AM
morningz
 
!!s/u/uu/g
 
@SomeKittens youu dawg I herd youu like the letter "U" so I addedd U in youu juust for youu (source)
 
7 mins ago, by royhowie
@JanDvorak Top of the morning' to yah, Gov'nor!
stackoverflow.com/q/30290554/2476755 "help me please im biggnering ... my code is"
 
5:33 AM
being in the northern hemisphere is weird
 
@phenomnomnominal You're in the norther hemisphere?
 
I mean, I know you New Zealanders like to get high, but....
 
Scotland laddie
 
Oh, nice
I was over there pretty much exactly 2 years ago
 
5:34 AM
not really, my grandad died, so it's a short shitty trip
 
Oh, that sucks
Where in Scotland are ya?
Crief?
 
Dalkieth, just out of Edinburgh
 
youtu.be/uyrcsZEv_wQ -> I remember watching these when I was 7
 
@Ranger i quit my smartphone as well
 
@ArijitMukherjee why?
 
5:41 AM
same reason bro quit my asus zenfone 5 n now upon my nokia c6 well technically that too is a smartphone
 
stackoverflow.com/questions/30235732/… what the hell…why can't questions with bounties be closed?
 
Because that would waste the bounty. Flag/mod
 
@JanDvorak and say what? I feel like this is one of those flags that a mod is just going to decline
 
Explain why it should be closed and note the bounty
 
GL, last few times I tried flagging bountied questions the flags were still pending long after the bounty expired
 
5:52 AM
@ivarni yeah…not going to bother then
 
Bitch on meta?
 
@JanDvorak thaaaat'll work
 
@royhowie it is specific to one use case. The solution in Ext 4 in similar question is simple enough.. Don't understand why it looks broad? — sidgate 23 secs ago
Am I wrong in telling him it's too broad?
@JanDvorak meta.stackoverflow.com/questions/277315/… tried that once…didn't work so well
 
hi guys
 
stackoverflow.com/questions/12670471/… this question is a duplicate of a question with no answer.
 
5:56 AM
@royhowie Closures are more important than grammar fixes of mistakes most people don't even know are
 
I am using jquery validation $("#form").validate(){}; and apply success callback where I have console a string which is printing in firebuf 4 time . What does this means?
does it mean that my form is submitting 4 times..
?
 
can you make a jsfiddle? (It probably calls callback on every input in the form)
 
but I have n no of form elements
 
@John make an example on jsfiddle
 
and jsfiddle nearly not possible as my form is very big
 
6:04 AM
the OP basically asked the same question twice
 
6:20 AM
@JanDvorak totally agree ! it is great to have people who edit grammer and make questions clearer , but having people who do only that exclusively can be a nuisance !
 
*grammar
 
there you go ;)
LOL
anyways had a small tiny question
have a look at this fiddle
see how :contains selector is being used !
 
Seems legit
 
if you check the documentation it says
:contains expects a string api.jquery.com/contains-selector
 
check
 
6:23 AM
but what if i want to pass contains a object or i mean a stored value
I.E.
now i am doing
this $('ul').find("li:contains('Hello')").css({'color' : 'red'});
 
How would a DOM node contain that?
 
but why can't i do

var _str = 'Hello'

$('ul').find("li:contains(_str)").css({'color' : 'red'});
 
jQuery can't see what your _str is
 
Hmmmm ..
so any suggested work around ?
 
The safest approach is filter on text
interpolating json-encoded _str into the selector should also work
What do you want it for?
 
6:31 AM
need to grab the value from a input box and check if that value exists in any of the <li> elements !
have been trying filter and text() .. lets see if that works out ! should do
 
Why don't you have the LI element contents in an array?
 
@JanDvorak , huh
what do you mean ?
the contents HTML <li> elements
 
Don't use the DOM for your data storage
 
so what would you do if
you had to grab the value from a search box and check it against the value in a <li>
 
Preferably I wouldn't
 
6:37 AM
would't what ?
sorry if i am asking too many questions :D
 
You should store your data in memory, not in HTML.
 
ok heres the deal !
i grab the input val() from the search box
next , i check if the <li> element text contains the val() that was entered by the user in the input box
NOW , next is hide the li elements that don't contain that value !
 
Oh well. I retract my question
 
LOL i did't understand your last statement . my English is not so great !
 
wouldn't $('ul').find("li:contains(" + _str + ")").css({'color' : 'red'}); work
 
6:46 AM
not if _str contains some special characters
 
hmm, i see
 
Angular question: Routing in the controller doesnt seem to work for me. I am using `$location.path('/movies');` and in the browser it shows the route `movies` for a fraction of the second and it disappears. There is no change in the `ng-view`. No error in the console.

How do I fix this?
 
maybe its redirecting again from there, some code?
 
Its not.

Here is the complete code of the controller:

`angular.module('myclientApp')
.controller('SidebarCtrl', function ($scope, $location) {

$scope.go = function(){
console.log('changing route..');
$location.path('/movies');
console.log('changed route.');
};

});`
The console.log shows up but the routing isnt working.
 
so you have a entry in your $routeProvider.when('/movies', {}) ?
 
6:57 AM
Yes. And I am calling another controller to that route.

.when('/movies', {
templateUrl: 'views/movies.html',
controller: 'MoviesCtrl'
})
 
this fucking middle east
why did I leave canada
 

« first day (1675 days earlier)      last day (3279 days later) »