« first day (1525 days earlier)      last day (3423 days later) » 

8:01 AM
0
Q: TypeError: Cannot read property 'childNodes' of undefined angular

SajeetharanI am stuck with this error, am having a custom directive for creating a bar chart, which gets generated from a json file. Here is my code, HTML: <div class="box-header"> <h3>{{ widget.name }}</h3> <div class="box-header-btns pull-right"> <a title="settings" ng-click="openSetti...

 
8:19 AM
 
what's the advantage with Array.of ?
!!> Array.of(document.body)
 
@argentum47 "ReferenceError: document is not defined"
 
huh
cool
but I could write that
 
@argentum47 Array.of mostly replaces the Array constructor with less weirdness
!!> new Array(1,2,3)
 
@dystroy [1,2,3]
 
8:28 AM
!!> new Array(2)
 
@dystroy ["undefined","undefined"]
 
ho :O
 
Other than for defining "literal" arrays, use cases will probably be much more rare than Array.from
but to be fair I didn't start playing with it so I might be missing some use cases
@BenjaminGruenbaum Do you see other major use cases for Array.of ?
Why does caprica put quotes around "undefined" ? Does she have a special routine to write arrays in results ?
 
Bot stringifies whatever can't fit into JSON
And yeah, Array.of is very rare, just like the array constructor is rare. It and Array.from are like call and apply in how they receive arguments.
Oh yeah, if you want one of the best side-effects of `Array.from`, you can actually create a range with it:
!!> Array.from(Array(10)).map( (_, idx) => idx )
 
@Zirak [0,1,2,3,4,5,6,7,8,9]
 
8:45 AM
:)
 
9:05 AM
@Zirak Disable your email digests, noob!
Or change them to weekly
 
9:22 AM
@Zirak That was great
I really love the Human Parts collection
Google some of April Gornick's work, by the way. It's really incredible
 
zuo
YO
 
@zuo 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.
 
@SomeGuy Woah
 
9:38 AM
Most of her art is so good I'm going to wallpaper it at some point
If only I could find high res versions :/
 
9:49 AM
mm, can angularjs detect changes when reassigning an object in an array? I'm using $watchcollection with deep search set to true, but $scope.myarray[index] = newObject doesn't seem to trigger the $watch
though the change happens 'deep', the object contains an array of objects, and one of the properties in an object of that array changes
 
what is this x_x profile picture
 
@dystroy much less useful than Array.from
 
10:07 AM
@BenjaminGruenbaum You've probably read about it already, but if not en.wikipedia.org/wiki/The_Interview_%282014_film%29#Controversy
 
I've read like a million articles on that, it's all over reddit and HN - thanks though
 
Haha yeah, I managed to miss most of the coverage
Speaking of that, though, North Korea is a curious place
You know that's true when people do this en.wikipedia.org/wiki/…
 
I wanna try the new JSONB thing in Postgre
Seems pretty cool.
 
@SomeGuy The sad part is that censorship and "terrorism" won
Isn't that a great message
 
@SomeGuy Is it raining there? ^_^
 
10:13 AM
@Zirak Yeah, it's really sad :/
@AwalGarg Nope! Pretty sunny
There's a title I never thought I'd see on Wikipedia
 
@SomeGuy this is already kind of dated but still worth watching youtube.com/watch?v=24R8JObNNQ4
 
Weather outside is so nice right now XD
 
@BenjaminGruenbaum Thanks! Exactly the kind of thing I was looking for
 
@AwalGarg I already use the JSON column type in pg for Miaou. There aren't a lot of use cases, though
 
@dystroy the binary one?
 
10:18 AM
It's not so different, apart on implementation. I used the not binary as it was available at that time
 
JSONB operations would be significantly faster, actually. But yes, there aren't much differences.
Also, since it is now stable, I don't think I would ever use Mongo ^_^
 
I think the use case of things like mongo is scalability
 
It's still a relational database, you know. It just so happens that one of your column values can be queried as json
 
@Zirak The point with JSON columns in PG is that you can have indexes and queries on the content
 
@Zirak which is a major plus for me, since I feel very comfortable with relational DB system.
 
10:22 AM
Which is all good, but you're still stuck in a table
 
Right, but if you have a table with a single jsonb column you've basically gotten a faster MongoDB collection that doesn't drop writes.
 
If you want to store a document or a tree, you still store it inside a table. It's a big step up for relational dbs, but not a replacement for document or key/value stores or the likes
@BenjaminGruenbaum Alternatively, don't use mongo
 
key/value store is different : their feature is only speed (and there are very good use cases for that)
 
@BenjaminGruenbaum I dunno much about mongo, but from what I have read, that is also a good reason
 
Not really, there are cases key/value stores rock.
I wouldn't replace Redis with a SQL server from example.
 
10:24 AM
yes, because of speed
 
I am yet to use hstore properly :D
 
Because of simplicity, redis has sets and lists which SQL databases typically don't have or don't support very well.
 
I need to do more DB things, my knowledge about DB things is very low.
 
Also - pub,sub
 
@BenjaminGruenbaum yes, you're right, forgot about pub, sub and queues
 
10:26 AM
@BenjaminGruenbaum SQL databases don't have sets or lists?
UNIQUE doesn't count for sets?
 
SQL has sets, no?
 
also, postgresql supports jsonb fields, which makes it nice for key/value where the value is a json value
 
@FlorianMargaine SQL servers are based on relational algebra whose basic working units are sets - SQL servers usually convert expressions to sets in order to evaluate them - still: a lot of stuff in practice in SQL isn't sets - that whole theory breaks when you have NULL values.
 
redis breaks when you have NULL values too...
 
Conceptually SQL servers have tables and the operations are set operations (Intersection, union etc). However, I'm talking about a much simpler query.
 
10:29 AM
disclaimer : in miaou I use both PG and Redis
 
Using SQL servers for a caching layer for JS isn't fun, even with json storage.
 
Storing some profile information of users like about me, location, etc. would be a good fit for jsonb, right?
 
IMO as long as you can get away with relational storage - use it.
(rather than a JSONB column)
 
@AwalGarg not necessarily
 
@AwalGarg I use json for fuzzy, poorly structured data coming from various sources in Miaou. And they're part of the profile information. a user related storage open to plugins
 
10:32 AM
I mean: that info is not updated much, but is viewed many times. And we aren't gonna index users from their location or about me text or date of birth ofcourse, so JSON makes sense, no?
@dystroy ah
 
@AwalGarg I looked. I was wrong. It's used for plugins
 
all that reminds me of my first nodejs project
 
10:33 AM
@dystroy :D
 
And yes I could have used a thing like mongo here, but having it in PG means I don't have problems ensuring key consistency and I don't have another server to manage
 
in Python, 12 hours ago, by iCodez
I wonder if we could ever hit all five? A too broad, opinion-based post that asks us to find things in a not so clear way that happens to be a duplicate of another terrible question like it.
 
@FlorianMargaine that has already happened, and there is even a meta post about it.
 
@dystroy that is quite a nice db creation file
@FlorianMargaine search on Meta Stack Exchange, I don't have a link right now.
 
10:36 AM
@rlemon @Loktar today is the day
 
-_-
 
@AwalGarg Did you click it like a noob
 
Why can't I downvote @FlorianMargaine 's message ?
 
@Sippy not this time
 
trolol
@AwalGarg gj
:D
 
10:37 AM
@dystroy you can flag it
 
jeesh kids these days -_-
.. and the awkward realization that i am not a kid anymore :o
 
uhu
 
@FlorianMargaine well played
 
I am pretty sure what that link is, not gonna click it
 
10:39 AM
@Zirak well by definition of kid.
 
uhu
 
Somebody threatened to hack me :3 ... geee i am so scared.... i gave him my ip he goes hes lulsec.
[2hours later] nothing.
 
he hacked 127.0.0.1
also, hacking is a long process. 2 hours is nothing.
 
lets see :D
 
@FlorianMargaine Pretty much every kid can break into most WEP secured connections in 25 minutes.
 
10:43 AM
@darkyen00 If it's the same guy who's trying to bruteforce my VPS can you tell him to gtfo please :D
 
@AwalGarg remotely?
 
Oh now hes telling me hes got LOIC
 
@darkyen00 Why are you enabling him?
Just ignore
 
@FlorianMargaine It has to be in range, well. The wifi network. Then yeah, remotely.
 
Yeah :-x
hes in my guild though :-/
 
10:44 AM
Tell the GM, then
 
Does someone has an idea how to fix this? I drives me crazy!
http://stackoverflow.com/questions/27550525/change-height-depending-on-other-div-on-window-resize?noredirect=1#comment43528021_27550525
 
@AwalGarg I still have no clue how to hack wifi.
 
@AwalGarg it was someone on irc.
 
@FlorianMargaine someone? irc?
 
And yeah, @darkyen00 you don't really act as a grown up by enabling him
 
10:46 AM
true dat :-x
i was just curious though x)
anyways back to work ...
Wartune is really eating a lot of my time now.. I don't even know why i play it.
 
@Sippy You need to have two highly secret things: a laptop, and freely available completely legit to download ubuntu package. Now Google.
 
Congratulations! You're still a kid too
 
:D
 
@Sippy use kali linux
you would go even further beyond
 
@darkyen00 ubuntu can do as much evil XD
 
10:48 AM
a computer can do..
 
but yeah, kali linux is the best
 
Well
I could hack someone's wifi, but I can pay for my own
So .. there's that.
 
lol
 
Too lazy to hack lol
 
Can anyone tell me how I can reuse a function that I'm using with an event listener? It's attached to the "change" of a select element, but I also want to run this on page load. I can't seem to get this to work, as "this" isn't defined without the event taking place. I hope this makes sense...
 
10:51 AM
@Dan Impossible to help you without code
 
sliderType.on( "change", toggleSliderInterface ); vs toggleSliderInterface( sliderType );
the first piece of code will allow the use of "this" but the second won't?
 
@Dan e.target
 
@Dan Why do you need this? What does it refer to?
 
@PeeHaa It refers to the target element.
 
@GNi33 youtube.com/watch?v=Mq-aVCUs2Q0 (another singer is now going to forever ignore list )
 
10:53 AM
sliderType is a select input, it toggle the visibility on elements on my page. I need to run this once when the page loads, and every time the select element value is changed.
 
What browser do you need to support?
 
Nothing old, but I'm using jQuery for this anyway
 
Well can't you just write a selector for whatever element you are trying to atrget?
 
Does this help?
`toggleSliderInterface = function( event ){

//the element which is controlling to the meta box view
var ele = this;`
Ah, damn formatting.
 
@Dan Do you really need that thing globally?
Setup a fiddle with your code please
 
10:57 AM
This is very abstract but should show the idea, I hope.
 
you can fire the onchange event on window load... but that function makes no sense.
 
@Dan And what is the specific problem?
 
@PeeHaa ele is undefined
 
@Dan So? Just pass it in
 
Doesn't that interfere with the event parameter?
I don't know how this works...
 
11:01 AM
What should it refer to? #slider_settings?
 
Although I know you can pass arguments to function in jS without defining them in the function parenthesis, right?
sliderType ^
I need to pass that element to the function. This is where I'm not sure what to do, because it's passed automatically with the event listener.
 
That looks sensible. I didn't know you could do that.
I was under the impression that event and the object were the only "things" that get passed to the function when it's from an event listener.
I've been approaching it like this;
`var someInput = document.querySelector('input');
someInput.addEventListener('click', myFunc, false);
someInput.myParam = 'This is my parameter';
function myFunc(evt)
{
window.alert( evt.target.myParam );
}`
 
@Dan I would not just blindly add custom attributes to things
 
I haven't, but I've been getting information such as class names from the element that the listener is attached to. That's why my script doesn't work.
 
11:08 AM
In angular route provider, if I use template: '<div>My epic div</div>', will that template fragment be cached like $templateCache entries would? Or does it no cache a compilation step, but only the contents?
 
I'll make some modifications like you're suggested. Thank you for the code.
 
np
 
@darkyen00 ?
 
I don't get it. Why create an anonymous function event handler, when you can just refer to that element from within the function?
 
should I know any of these people (aside from Skrillex that is)?
 
11:10 AM
@GNi33 Diplo is middle big
 
@AwalGarg As in select the thing? In which case I wondered the same
 
never heard of him
 
@PeeHaa yes, that
 
her?
 
but for that song ... i am considering Skrillex going Kayne west side.
 
11:11 AM
@PeeHaa jsfiddle.net/kdz9sdj9/3 (those globals are not mine :X)
 
yea, it's pretty bad
 
Reminded me of Mercy T_T
 
it does, yeah
 
why skrillex why ?
Was the mixer grinder grinding a synthesiser hybrid wasn't enough ?
 
there are certainly people who like this stuff, so why not
nobody forces me to listen to it
 
11:12 AM
except for radio. I heard it off itunes radio (iirc)
 
I'm jamming to the new Unearth - album recently, Guards of Contagion (youtube.com/watch?v=tiNdNh7fK_Q) is a beast of a song
 
I am jamming into Fort Minor.
probably the most over played song ever by me.
 
Do you guys know PLV8 ? This looks interesting. code.google.com/p/plv8js/wiki/PLV8
3
 
@dystroy nice... PL/SQL and the likes are often a reason people are scared of stored procs and the likes
 
@dystroy in that file, why set email to varchar(150)? Emails can be upto 255 chars long... no?
 
11:17 AM
@AwalGarg because I didn't knew there was actually a standardized limit. And I don't think I ever saw an email with more than 100 chars
@AwalGarg Do you happen to have a link to a credible source related to that limit ?
 
Lemme find one
 
@PeeHaa I was wondering, do you have to use the anonymous function to be able to pass the element to the function?
 
!!tell dystroy wiki email address
 
and @dystroy rfc-editor.org/rfc/rfc3696.txt ctrl+f restrictions on email
 
11:20 AM
@AwalGarg I'm failry certain it can even be longer
 
@AwalGarg thanks. I'll patch that
 
Depending on which rfc you want to follow
 
@PeeHaa the longest one is 320, which was long ago dismissed or something.
 
@AwalGarg k cool
 
11:22 AM
xD
 
@AwalGarg only the domain must not exceed 255 chars, nothing about the user part there
 
People still use input[type=image] with src ?
 
> for a total length of 320
characters
 
@BenjaminGruenbaum Okay, NK seems like a lot more nuts than I'd ever imagined
 
@darkyen00 This is so horrible I preferred to forgot that feature
 
11:30 AM
@dystroy I saw something that uses those 2 in combination to make remote desktop
using google-chrome and microsoft-service-bus
pretty smart i'd say but they literally send the image -_-
could do much better with a streaming video
 
@darkyen00 what is it?
 
I think I missed something here
 
@SomeGuy :D
 
@FlorianMargaine it accepts inputs as coordinates.
 
this :
> but the maximum of 256-character length of a forward or reverse path restricts the entire email address to be no more than 254 characters long
 
@dystroy I stand corrected
 
@darkyen00 why would you use an input type=image for that and not just some JS ?
 
@dystroy Because why would you use js when html provides it?
 
Well... to not submit and fetch the whole page ?
 
Is that bad?
 
11:36 AM
why do you think people use ajax?
it's not just for the buzz
:P
 
Well yeah but you would have to have a fallback either way sooooo
 
@dystroy idk \o\
thats why i am wondering
Simple ajax is better afaik, or even better use video and track mouse for full scale remote desktop
 
hi generic question- how would one implement a p2p forum
 
@yayu 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.
 
@yayu By programming it
Broad question is broad...
 
11:42 AM
@PeeHaa ok, webrtc can be used for p2p chat. Can a forum be implemented over it?
 
What's a P2P forum exactly ? Would that be a not persistent forum ?
 
@yayu well technically sure. Whatever. It's just a means to send shit, but why and how would you think that would work?
 
@dystroy @PeeHaa like multiple chatrooms (threads) where participants directly send each other data
no persistence, data exists as long as there is a peer still having it
 
OK, that stretches the word "forum" a lot then
 
11:46 AM
^ that
 
That's just a P2P chat
 
hackers hack because there is security, if there were no security no one would hack
 
@argentum47 hackers hack because of security now?
I don't think that sentence is correct :)
 
@argentum47 is that supposed to be deep or are you just drunk ?
 
@PeeHaa It is, but only technically ..
 
11:47 AM
cm'on tis friday :D
 
@Sippy No it is not
 
Explain how it isn't
Hacking = unauthorised access
If there's no auth mechanism
How can you be unauthorised
 
What is the definition of a hacker?
 
!!wiki hacker
 
Hacker may refer to: == Technology == Hacker (term), is a term used in computing that can describe several types of persons Hacker (computer security) someone who seeks and exploits weaknesses in a computer system or computer network Hacker (hobbyist), who makes innovative customizations or combinations of retail electronic and computer equipment Hacker (programmer subculture), who combines excellence, playfulness, cleverness and exploration in performed activities == Entertainment == Hackers: Heroes of the Computer Revolution, 1984 book by Stephen Levy Hackers: Wizards of the Electroni...
 
11:48 AM
There ^ read that
 
well there is a misunderstood concept of hacker , those are called cracker
 
Wtf am I thinking of
 
@argentum47 Please define these words, then. What do you think they mean?
 
cracker is dark hacker, who gets in others house and reveals their secret, voo doo . Hacker are good guys, like Gandalf
 
Ever heard of the terms "black hat", "white hat", etc?
 
11:53 AM
@argentum47 Please use the more well-known terms... ^ those
 
grey hats too
 
@argentum47 Are you serious here ?
 
They do pretty much the same things, just with different motivation and for different purposes.
 
@argentum47 I need the drugs you're taking.
For reasons.
 
11:55 AM
haha
weed
 
To the outside person, there's no difference between a white hat pentesting his company and a black hat trying to steal data from the same company. So it doesn't make as much sense giving them different nouns.
 
yeah that's true, what it matters I think is the knowledge.
 
They can both have the same knowledge
 
Hm. To prevent SQL injection in my website, I need to know how to do it first.
 
Thus giving you the same knowledge as one who wants to execute sql injections.
 
11:58 AM
yeah.
 
this is awesome
4
 
@argentum47 Uhhhhhhhhh
To some extent yeah
Or you could just google the fuck out of OWASP
 
Hi I am stuck with something... I have a div with black background and have some text on it. I am using jquery slideup and slidedown but not sure why, the background slides faster and the text slides slower. any clue?
 
@BalaSivagnanam 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.
 
I know owasp
I tried many of there codes on various websites. didn't have much luckthough
 
12:04 PM
@argentum47 I'm pretty sure they have guidelines on how to achieve each point on their list.
 
and most people follow it. It makes hard to try them. :P
 
i'm stuck, can someone help me?
0
Q: change height depending on other div on window resize

Erwin van EkerenI have two 50% width div's next to each other. One of the two has more text in it and makes the div longer then the other one. I have a javascript that makes the other div the same height even though it has less text. That works great, even when I resize the window to a smaller window (tablet siz...

 
short answer : bootstrap bru. I mean go to bootstrap steal their codes, remove the comments and claim it yours :D
 
12:18 PM
@ErwinvanEkeren Real short answer : CSS (I answered)
I see no point in stealing bootstrap instead of writing 3 lines of CSS
 
12:42 PM
@ErwinvanEkeren.. dystroy gave you a nice answer there
 

« first day (1525 days earlier)      last day (3423 days later) »