« first day (945 days earlier)      last day (4019 days later) » 

9:00 PM
Nevermind, I'm tired. Think about it, but do what you want.
 
m59
There are many reasons. First, all of my controllers use a repetitive beginning and end in order to register them with angular. I need to wrap the script before it is executed, otherwise I have to repeat code in every controller. It makes a lot of sense to get it, wrap it, then execute.
 
What code?
I use Angular and I don't understand what you mean at all
 
m59
That is because angular doesn't natively do this. I wrote my own kind of ng-include that lazy loads the appropriate controller before loading the view.
 
I think angular does do it natively
Angular routeProvider accepts a URL parameter iirc for example
Hmm, from the official docs
$routeProvider.
      when('/phones', {templateUrl: 'partials/phone-list.html',   controller: PhoneListCtrl}).
      when('/phones/:phoneId', {templateUrl: 'partials/phone-detail.html', controller: PhoneDetailCtrl}).
      otherwise({redirectTo: '/phones'});
 
m59
Yes, but the controller has to be registered when angular is bootstrapped initially.
Yes, I am aware.
I want to lazy load all of my controllers but the main one.
 
9:03 PM
What are you trying to do? You're asking how to use controllers from multiple files?
 
m59
No, I've done it. I was just discussing it.
 
You want to lazy load them or dynamically load them, I don't see how lazy loading your controllers would work
Ah ok :) I thought you were looking for help :)
 
m59
It's both. Lazy loading and dynamically. I think my solution is awesome.
 
Cool, I'm glad it worked out for you
 
m59
You store a reference to the $controllerProvider when bootstrapping and then call its register function on your controller later.
 
9:05 PM
I guess that sounds reasonable
 
m59
What was trolling me forever and ever, amen, is scope.$apply()
 
You should comment all your code
 
should this log true? 	var test = '<div>hellp</div>';

	if(test.match("<([A-Z][A-Z0-9]*)\b[^>]*>(.*?)</\1>") === true){
		console.log('true')
	}
 
m59
The problem is that I don't know exactly what angular thinks, but it does things behind the scenes that I don't pick up on intuitively.
 
wtf
 
9:13 PM
@m59 I'm reading the KnockoutJS source code atm, Angular is the day after tomorrow, after that I'll let you know :)
 
m59
haha pro
 
Anyway, I'm off to sleep, night :)
 
m59
@BenjaminGruenbaum night dude
 
Any programer should learn regular expressions as it brings easy reputation on Stack Overflow
 
@Connor No.
regexp.test(string) if you want a boolean.
 
9:22 PM
Also, the if check is unnecessary if you only need a boolean.
 
0
Q: Display the number of unseen comments on a page since the user last visit

StrasbourgThe community is private and it has several pages /wordpress /design /etc . When users go to those pages the only thing they can do is to comment. Now, what I am trying to do, Idk if possible, but if it is I need some directions/hints on what too search for. http://jsfiddle.net/melbourne/uPqBe...

 
Night
0
Q: Does anyone read messages on review audits?

Benjamin GruenbaumOften, when reviewing a lot of edits I get a fake audit test. I usually reject them with a message. Are these messages stored anywhere, or am I just talking to myself again?

 
m59
@FizzyTea reading sucks, what are you, daft!?
 
@ThiefMaster @Gordon Any idea?
 
m59
9:26 PM
@FizzyTea j/k I'm getting tired and have to say crazy things to survive it.
 
i doubt it
 
@BenjaminGruenbaum Well, it's been a while since we learned something new about you.
 
@m59 Yeah, no worries, got it. Just mostly afk.
 
m59
heh ok
 
> I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone. — Bjarne Stroustrup
 
9:34 PM
Is /beautify actually used?
 
Nope
It's broken with multiple lines too, so we don't really need it
 
6 files changed, 4 insertions(+), 4330 deletions(-)
Cool.
 
0
Q: Converting hexagon grid coordinate system

Jonas LindahlAs I have been building on a RTS game based on hexagon grid built in javascript. I stumbled across a problem regarding the coordinate system. Have been trying to implement a A-star system to find paths. But it seems a horizontal hex gird could cause some problems so far when it comes to odd and e...

 
9:45 PM
@Xarcell You came, you left a random image, you left.
I like you
oh don't ruin the fantasy
 
lol, I actually left all rooms.
I posted the picture in the wrong room, meant to post it in casual chat.
too many tabs open for chat rooms.
 
I like you a bit less now
But alas, you'll never know.
Ignorance is bliss?
 
There once was a girl fron Nantucket...
 
What do one-handed people use for keyboards? I wonder if there's some special setup.
 
!!/google maltron keyboards
 
These guys have a page on one-handed keyboards somewhere
 
Community is awesome
So is Game of Thrones
 
10:14 PM
No, Emacs is awesome.
 
hehe, glad you like it
 
@Zirak did you recently lose a hand?
 
Not to my knowledge
Why? Did you find my hand?
 
That might be from the clone Zirak. After it gained sentience, things got out of hand
 
10:19 PM
...that was a horrible pun
 
Yeah, it says "Property of Zirak"
 
@phenomnomnominal was it trying to touch your penis?
 
Have him find your hand. Touch him on the penis.
"Sleight of hand"
 
@Zirak Oh god ...
 
10:28 PM
@Zirak How did you even come across that?!
 
... hides other hand
 
@mikedidthis War Frame is pretty cool.
 
damn it
I bought an eezee tab 971 today
and I can't find any ROM for it
or update...
 
Braces should only appear on the right if () {, not on the left
 
user1125394
10:43 PM
!!> var t=[1]; t[2]=5; t;
 
@xcx [1,"undefined",5]
 
Neo
0
Q: How to bind function to isotope preLayout (pre positioning) event

NeoI would like to change the width of my elements depending on the screen size so that they fill the entire screen, I used a for loop to find the width for the isotope elements that will fill the entire screen before executing isotope on the container, this works fine on page load as I can put my s...

 
user1125394
[1, undefined × 1, 5]
 
user1125394
on chrome
 
Same thing
 
user1125394
10:45 PM
the x2 is weird, nvm chrome has sucked on that
 
Saves space if you have a sparse array.
 
user1125394
how can you add an element in 3rd pos of [1] without having to do var t=[1]; t[2]=5, splice?
 
why do you want to do that?
why can't it go in t[1]?
 
t=[1,,5];
 
t.concat([,5]);
t.length=2; t.push(5);
 
user1125394
10:52 PM
hmm yes..
 
All sorts of silly ways.
 
sounds like it should be an object?
 
user1125394
yes*
 
user1125394
but I like shit and fast coding
 
remind me never to hire you?
 
user1125394
10:55 PM
hehe
 
user1125394
nah seriosuly it's more easy to pattern-match a [x,Y,Z] array in erlang where the json is decoded
 
Then do what @copy wrote, or what you wrote if t already exists at the point where you add the 5.
 
> Beauty is more important in computing than anywhere else in technology because software is so complicated. Beauty is the ultimate defence against complexity. [David Gelernter]
 
such a beautiful timing ^
 
11:39 PM
@phenomnomnominal You know anyone at Wolfire Gaming?
 
@btru 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.
 
@DragonWolf it has nothing to do with the if/else structure, or wheter you are using switch/case. I think that the issue as as I explained, and it's better expressed by Anthony Accioly below, Do what his code says, if it works please accept HIS answer. — Ahmed Masud 14 mins ago
Pretty noble
Two users telling OP to accept each others' answers
 
11:55 PM
Reputation isn't everything
Actually, it isn't anything
 
It's not about reputation, it's about users acknowledging each other's answers as better
(Not to mention that I nailed the issue, the original question title was horrible, but that's a boring question to answer to begin with)
 

« first day (945 days earlier)      last day (4019 days later) »