« first day (1474 days earlier)      last day (3489 days later) » 

2:00 PM
but still, not using myApp there, do you mix and match?
 
which cant be set in the html unfortunately
 
i like this javascript editor chrome app
 
@DrogoNevets: How do you mean?
 
@argentum47 linkyyy?
 
so in first example you used `var myApp = angular.module('app', []);
myApp.value(a, b);` but second you used 'angular.module('app').factory(...)`
im wondering why you create the myApp variable at all, as I always thought have a global variables of any kind were not the best idea in the world if avoidable (which in angular it is)
 
2:02 PM
it might not be in the same file
 
It isn't
And it's a different module
 
doesn't matter in my opinion, look at all my files and they all use angular.module
 
var myApp = angular.module('app', []);
angular.module('app.subModule').factory(...)
 
var myapp is just a shorthand for use in the same file
 
yes but unless he has a self executing function (or some other function) he has created himself a global var no?
 
2:03 PM
that woudl be correct
 
(also some other scope block)
 
Checking
Hm, good point, it's global
I'll discuss this here :)
 
@copy the exercise is in german :(
 
Here as in on the workplace
 
here being JS chat, or work?
beat me to it
:P
 
2:04 PM
:)
 
(func(){})() copy pste
 
In my defense: I didn't set up the project :P
 
or make your build do it
 
(Lame excuse, I know)
 
sorry wasnt criticising code, just wondering as it is different to what i was taught
 
2:05 PM
I didn't really pay attention to it
 
gulp and grunt can wrap them all in an iife after the fact
 
one doesnt, and, to be fair, myApp is probably quite safe from being overwritten
 
maybe not... every sample on the net uses it and the copy -pasters out there will get you
 
true enough, what grunt plugin you use to add the iife?
 
i use gulp, but im assuming someone wrote a grunt one as well, gulp-wrap
 
2:09 PM
ah ok
 
Hmm, wrapping the file in (function(){}())doesn't seem to fly with the app
 
change parens
(function(){})()
 
JSLint wont like that
if you lint of course
 
Is there even a functional difference to that?
 
jshint
 
2:10 PM
Do you even lint?
 
try uiglifying the whole lot of code and then wrapping the lot in a IIFE
 
there is a small diff... someone on stack answered why i believe
 
and yes we do, every build has to pass JSLint
(we've put it into the build)
 
it passes jshint
 
Exactly the same problem
Not big surprise
 
2:11 PM
what is the problem?
 
That the global var is undefined xD
Apparently, we use it somewhere
 
could always do a replace all on myApp for angular.module('myApp')
in the enitre project
(this is another reason not use global vars :P)
 
A blind replace all is just gonna break the app
 
give it a go (back up first)
oh and change it to myApp. and angular.module(...).
 
Eh, no. I know for certain it's gonna break the project
 
2:13 PM
fair enough, happy refactoring then
 
myApp is just a placeholder string I use here for the application's name
 
yes i know
whats the error trace? can you find where it's being used?
 
its funny that jslint likes (function(){}()) and jshint likes (function(){})()
 
Look, I'm not a JS newbie. I know how to debug undefined vars
 
@Cerbrus sorry! was only trying to help, i know you arent a newbie, ive been loitering around here long enough to know that
@CharlieBrown yea, wonder why
 
2:16 PM
Who wants to break the shit out of my script? github.com/ndugger/HTML-Constructor---jQuery-Version
 
@CharlieBrown !function(){}() ftw
 
Let's see @NickDugger
$.construct('test')
Uncaught TypeError: object is not a function
 
hah, thanks
 
Anything else? xD
Dude, that thing can build HTML from an object?
Sweeet
 
Take 3 parts asp.net webforms, 1 part angular with multiple modules, make some crazy js to talk between webforms postback and angular $rootscope. Enjoy. #this project sucks
 
2:19 PM
There's tons more to do on it. It's super young
I also want to convert it to native DOM later on
but then I have to maintain two codebases
for the same thing
 
Input validation. It doesn't test if the object has a tag property, for example
 
keep 'em coming!
 
also, if you wanna challenge, write it in vanilla js
 
$.construct({a:1})
[<undefined>​</undefined>​]
(example)
 
should I default to div?
seems right to do so
 
2:20 PM
that phrase always bugs me... js is js
 
I'd just abort invalid tags
Maybe throw a console.error
 
@CharlieBrown I do appreciate native DOM over jQuery any day, but at work, my coworkers get really paranoid when I don't use libraries
 
@CharlieBrown jQuery isn't
 
@AwalGarg fails both jshint and jslint
 
@CharlieBrown I know.
 
2:22 PM
jquery is javascript
@AwalGarg but i like it
 
@CharlieBrown I know
 
@CharlieBrown but writing an app in jQuery is VERY different to writing an app in JS (IMO)
 
$.construct([{tag:'foobar'}])
[<foobar>​</foobar>​]
$.construct({tag:'foobar'})
Uncaught TypeError: object is not a function
@NickDugger
 
> writing an app in jquery
 
you dont really write an 'app' in jquery, so much as use jquery in your app
its just as good a library as any
 
2:23 PM
It'd be nice if it would accept a single object as root element, instead of having to wrap it in an array
 
so jQuery won't construct invalid tags? Seems right. Just gotta test for it...
so much to do, lol
 
!!s/library/POS/
 
@AwalGarg TypeError: property "a" is non-configurable and can't be deleted
 
eh? You alright Caprica?
 
@Cerbrus can you give an example? I've been wresting with that
 
2:24 PM
You mean how to handle that?
 
Oh wait, nevermind. I just wanted to account for multiple parent objects
but I can check for an array vs object
 
Aye
$.construct([{tag:1}])
Uncaught DOMException: Failed to execute 'createElement' on 'Document': The tag name provided ('1') is not a valid name.
That might just be jQuery
numeric elements are invalid, after all
 
Yeah, it is, but I should still handle it a bit better.
 
$.construct([{tag:'a', addClass:'blabla">'}])
[<a class=​"blabla">">​</a>​]
That looks problematic
 
how so?
 
2:26 PM
Although
It seems to have escaped the "
 
oh, I see it now
weird
 
Heh, it doesn't break the tag
Sweet
$.construct([{tag:'"'}])
[]
 
@copy Sometimes he asks questions and half of the group raises their hand and he says "sehr gut" and I don't know what he asked:(
 
Not sure if bug, but interesting
 
it's both... lol
 
2:29 PM
That's all I can think of so far
 
Awesome, well it's super appreciated
 
Np ^_^
 
I am the 7th high rep user of this week on the entire SO network wo\o/hoo!!
 
help vampire
 
#193 this week, for me
 
2:31 PM
...and Jon skeet is far below me lol
 
Heh, @AwalGarg: This month I got 1219 rep.
 
lol all my rep is last 4 days only... so let's stay to this week only.
 
mia
hey guys this question is not related to javascript but just asking doesn't anyone know if iPhone 5 can be unlocked through cydia?
 
Can we even discuss jailbreaking here?
 
cydia... is that a venereal disease?
 
2:35 PM
apple is crap
get a nexus
 
:smacks @AwalGarg:
 
Please don't fanboy in here @AwalGarg
 
I need a murican to ship me something cc @Loktar @RyanKinal @SterlingArcher
please ping me back
 
@rlemon like?
 
Wait, rlemon is not murican?
 
2:36 PM
nope
canuk
 
@rlemon is an eskimo
 
i can ship it
 
TIL
 
but I don't know you so I'm not going to send you money or products
sowwy
 
You know me! You can send me money and products!
 
2:37 PM
@rlemon i can do europe if you need it
though, technically, you dont know me either
 
Hehe
 
plz send money, and i will help you clear my uncles lottery winnings and you can have half
 
but you have stalked me enough to know where I work
 
96% off
doesn't ship to Canada
 
2:37 PM
96 o.O
 
but fuck that is an amazing deal!
I wanna order like ten rolls
 
mia
so is it possible?
 
Possibly.
 
it ships to UK
 
@DrogoNevets but UK to here is expensive
but if no one in the USA can do it I might hit you up
 
2:38 PM
you over this way anytime soon?
 
lol no
 
only $1, jeez
shipping is prob inexpensive from where im at (Wisconsin) to canada
 
lol - worth a try, well if you need me to, just holler!
@rlemon though that said 10 rolls will cost "GBP 174.27"
just to get it to my house, so im guessing not worth it!!!!
 
Why are you opening 2 additional pages when someone visits your page? That sound like something that'll make me want to leave your site very quickly. — Cerbrus 8 secs ago
People... Ugh
Oh, and he's fire-ing click events on urls.
Something smells fishy
!!s/f/ph/
 
@Cerbrus TypeError: property "a" is non-configurable and can't be deleted
 
2:42 PM
wat
 
user2620028
lol lemon why do you look at things on usa amazon if you cant get them shipped to you without an intermediary :P
 
user1596138
It's free shipping to my house.. tems (10)
$10.50
Estimated shipping & handling FREE
Total before tax
$10.50
Estimated tax to be collected
$0.00
Estimated order total
$10.50
 
user1596138
Sure someone else can do it tho just saying
 
user2620028
LOL
 
user2620028
Yeah i mean lemon has so many people in here he has helped i doubt anyone would really refuse to help him :/
 
2:44 PM
@rlemon if you can wait until my next paycheck (funds are tied up in moving costs this week) I can get you
I don't know how long that deal will last though
 
@rlemon I'd refuse to help you but I wanna be in with a chance at getting one of those xmas presents so
Can't really
wat does lemon want
 
!!nudge 65
 
@towc Nudge #1 registered.
 
Haven't actually looked yet.
 
user2620028
its smoking wire? not quite sure how that works out lol
 
user2620028
2:46 PM
Do those vape cigarette tool things have coils in them that burn out and the wire is for reproducing new coils?
 
user2620028
just gathering information from context clues.
 
^ from wat I gather, yea
Something similar at least.
 
-1
Q: Data not working in jquery 10+

Mike VierwindI have this code. But this is not working in the new jquery version 11. how can i fix that? $('li[data-postid=' + valuesLiked[i] + ']'); Thanks!

 
2:50 PM
@Cerbrus without any modification, it also works with events, if you add an on property, with events in an object. Super cool
just tested with a click and alert
 
Woot! inline event handlers set from JS :D
Sweet, though
 
@Cerbrus What version does he even mean?
1.11?
 
nah, it's not inline. It just uses jQuery's .on method. I'm pretty sure that's not inline
 
oh, nice
 
Lol
The mention of jQuery yields infinitely less sarcasm
wat
enthusiasm*
Come on, brain ..
 
2:53 PM
Oh, that wasn't sarcastic
 
No I know
 
It't genuinely nice :P
 
Haha
My brain is dying cos I was so stressed this morning
Ran outta RAM
 
obligatory download more ram joke hurr
2
 
Hey, with a dead brain, at least you'd be incapable of experiencing stress :P
 
2:54 PM
@Cerbrus This is very true.
 
You'd be incapable of experiencing a lot of fun things, too, but that doesn't matter. No more stress! woo!
 
@Jhawins @rlemon, there you go!
@Cerbrus no more sex
 
@SterlingArcher I can forward the money ofc
check how much it is for shipping and we'll talk
I'm not letting this deal pass! :P
I pay like $3.50 for ten ft at the moment
 
@DrogoNevets orgasm is possible after brain death
 
2:59 PM
@rlemon How much do you need?
 
I'm thinking ten rolls
 
@KendallFrey Not if you wanna feel it
 
1000ft
 
user2620028
I am pretty sure it is free shipping to the us... then whatever it would cost to get it sent to you
 
@KendallFrey seriously? and is it perceivable?
 

« first day (1474 days earlier)      last day (3489 days later) »