« first day (1872 days earlier)      last day (3301 days later) » 

10:00
@crl Each
I spent a lot of time looking into getting CSS transition classes to work properly, and couldn't work out how to achieve this: jsfiddle.net/8yLbpLb8/2 Any ideas?
Hi. I'm not sure of what you want and I don't have much time but maybe this ?
http://jsfiddle.net/h72du3pw/
crl
crl
@DenysSéguret yes thanks, said the same to Sheepy, it's for also drop event not just click
no worry, I'll find a way, thanks, the idea is that the square shouldn't catch the events
@crl you can have the square proxy all events to whatever is below it
crl
crl
hmm, well, yes
10:04
you can use document.elementFromPoint, and Element..dispatchEvent, and MouseEvent..{x,y}
crl
crl
smart, thanks
On some days, I am even better.
@TechTreeDev that won't work. How is the alphabet displayed on the document ?
i don't have much time, but JavaScript interacts with HTML. So communicate with that
how exactly you can view jQuery ".data" in chrome webdev tools?
crl
crl
!!tell Geo mdn data-set
Ohh, I didn't know about that
yes but when i inspect elements where i have store some metadata there no attribute data-* , when i access $(<element>).data(<property>) it returns data
crl
crl
hmm weird, fiddle?
dont have one, mostly happens on dynamically created elements
crl
crl
you can put js in fiddle you know
10:25
Hey guys, do you oftenly use ORMs? or what do you use for large/complex projects?
crl
crl
just sometimesly, if mongoose can be considered one
@crl that won't do it
jquery's data sets are entirely another story from HTML5 datasets
@feniixx yeap eloquent in laravel
crl
crl
@AwalGarg holy hideous shit
stupid jq that can't align with that
With WeakMaps in ES6, jquery's datasets are rendered obsolete now.
10:32
Why is it considered bad for some people? I mean, I've used Eloquent, Sequelize, Mongoose, and in my opinion, they facilitate some work, other times it's easier with a raw query... but Why there are bad comments about use them?
google "orms are bad". There are both sides to it.
Martin Fowler has a famous article on it
@GeoPhoenix hi i got the answer thanx anyway
crl
crl
!!> var x=(a='',b)=>console.log(a,b); x(,1)
@crl "SyntaxError: expected expression, got ','"
crl
crl
hehe thought it would put an undefined a
10:41
@crl "SyntaxError: expected expression, got ','"
@crl What'd you expect that to do?
crl
crl
like var x=(b,a)=>console.log(b,a); x(1)
@crl it only works in arrays :(
crl
crl
ah
!!> [,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,]
10:45
@AwalGarg ",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
crl
crl
!!> [,,].length
Oh, I see
As in skipping an optional parameter
crl
crl
yes, placed before, (can't place after because I had a ...cs
!!> var _ = void 0; var x=(a='',b)=>console.log(a,b); x(_,1)
10:47
@AwalGarg "undefined" Logged: ,1
I have done this in node :P global._ = void 0 and then use _ for undefined :P
crl
crl
!!> var _ = void 0; var x=(a='test',b)=>console.log(a,b); x(_,1)
@crl "undefined" Logged: test,1
crl
crl
hmm good
Lol don't do that anywhere though :P It is horribly unreliable
crl
crl
10:50
:(
you might accidentally overwrite the local _ in some assignments
11:00
Anyone know of an equivalent of doing Array.join(' ') on a object?
i.e each property is converted to string and concatenated
@Billy JSON.stringify()
Or something you build on your own
Failing a native function, I will just build my own :)
JSON.stringify sort-of almost does what I want.. but not quite :p
I need a space-separated string of the property values. This is to be passed to jQuery.addClass
crl
crl
check how to use addClass, can accept multiple args I think, at least classList.add can
@Billy: How are key / value pairs (an object) supposed to end up in a class? Can you give us an example of your input and expected output?
11:17
Maybe he wants all values of the object? In that case, Object.values has reached stage 2 recently :P so wait for ES8 or so. Till then, write a shim.
Object.values = function (o) { return Object.keys(o).map(k=>o[k])); }
Then Object.values(yourObj).join(' ')
ES6 recently released --> Talking about ES8
why not
No objections, I just find it funny
Yes, me too. It is great at the same time that the spec process is quite open.
Were we talking about some other not-so-standardized language like Ruby/PHP, we won't have been able to do so with confidence. At this point, shimming Object.values is quite ok.
11:39
@Loktar guess who walked into the C# room today
crl
crl
Jason Brown? the Jason Brown?
in C#, 4 mins ago, by Jason Brown
well I mean i am A jason brown, Just not that one :P
in C#, 4 mins ago, by Kendall Frey
@MaartenWachters nope, the United States of Freedom bought the rest of it
LMAO
function getLocation() {
	return new Promise(function (resolve, reject) {
		resolve('Colombo');
	});
}

function getWeather (location) {
	return new Promise(function (resolve, reject) {
		resolve('It is 78 in ' + location + '.');
	});
}

getLocation().then( function(location) {
	getWeather(location);
}).then( function(message) {
	console.log(message);
});
Guys is there anything wrong in that promise?
It seems to fail, my terminal just says 'undefined' and exits.
return getWeather(location);
crl
crl
11:49
or getLocation().then(getWeather)
Oh, my bad. Thanks.
Or just console.log('It is 78 in Colombo.');
@AwalGarg It's a test to learn about Promises.
--___________--
You failed
crl
crl
or just google weather Colombo
11:50
!!weather Colombo
@ivarni [object Event]
@CapricaSix Right
So. Much. Fail.
object Event
how can you program that bot?
11:51
With pull requests.
To which repo?
Like I remember
crl
crl
@AwalGarg help please, jsfiddle.net/crl/gdmfgtg4/3
don't know how to initialise a MouseEvent or a DragEvent later, goal is to pass the event to the div under the red square of course
  evt = document.createEvent('MouseEvent');
  evt.initEvent('mousemove', true, true);
  el2.dispatchEvent(evt);
ok.. TIL
jsfiddle.net/crl/gdmfgtg4/4 infinite loop of course..
crl
crl
good! also: stackoverflow.com/questions/1009753/… (maybe pointer-event is good too, and works for any event)
12:00
Pointer events doesn't work in IE9 IIRC
crl
crl
ah ok
@crl what benji said. And the second answer there dictates exactly what I said previously :P
crl
crl
yea with even: (liek you said
this.style.zIndex=-1;
var el=document.elementFromPoint(e.clientX, e.clientY);
el.dispatchEvent(new MouseEvent(e.type, e));
this.style.zIndex=4;
thanks, good to know that
no idea what that is, but woo explosive bolts
user3119231
12:11
hey guys! Do you think it is possible to check the percentage of equiality of 2 images?
@Maurize Depends on how you define percentage, and how you define equality.
But yes, there are libraries that do just that.
user3119231
@MadaraUchiha the point is, that I am able to upload 2 images. (Sure, precision depends on quality) But with a acceptable quality I could compare the 2 base64 data and could give out result...
user3119231
Good idea - Bad idea?
Base64 data says nothing about equality
12:17
Aside from it literally being the same image
@Maurize You need a program that can visually understand an image and its pixels, and compare the two.
Comparing base64 is akin to comparing a hash.
GraphicsMagick or ImageMagick can do that, for example
There are other tools, mainly used for QA, that can compare screenshots and tell you how different they are.
user3119231
Thanks. That means that base64 is useless. I need something that checks if 2 pixels at a certain position are the same.
And trigger alarms if they're too different to an extent you define.
@Maurize Not just that.
@MadaraUchiha Hi.
Otherwise, adding a 1px line at the top of the image would give 0% similarity
@HassanAlthaf Hi.
user3119231
12:19
is true.
@MadaraUchiha Make my rep 10k pls
@Maurize: fiddle.jshell.net/png3o4rj Change 1 letter in that base64 string, and run it. See what changes
user3119231
@Cerbrus Disappeared.
And that's just a 1-byte difference
So, yea, use some proper image proccessing library :-)
user3119231
I will take this as long time project. Sounds interesting.
12:21
path.join( bowerModulePath + "fontawesome/fonts/*.*" )
2
That has to be the best code snippet I've seen all year
@OliverSalzburg ow
heh.. I've done that by accident once
fiddle.jshell.net/png3o4rj/1 Managed to make it dark blue
Oh wait, that's worse than just forgetting you're passing arguments
I'm scared to check the git log. I'm probably the author
12:30
@Luggage tnx pal
how can I populate a select with angular, with ng-options coming from an ajax query...? mean : for example people has (or not) an adress made of country, town and street. Street options list is coming from a function like getStreetFromTown(townId,callback) and towns from another one like getTownsFromCountry(countryId,callback)
these functions are calling $http service which callbacks result on success or false on error
So, on success, assign the result to a $scope variable, then use that variable in your ng-options
ok @Cerbrus, I already tried this, but problem is when I have to manage several items... for example, now imagine the current person I edit has 2 registered address with town/country/street
or more, or less...
I need more $scope vars, and idk how many i will need :/
-5
Q: Not a script kiddie

PRQ xAliG4meri have challenge and i want help i don't understand this challenge One of our agents recently caught a young hacker with the code name !$criptkiddie. He hid the below piece of javascript on a page which calculates a value but doesn't output the final result. It's also embedded on this page - ca...

trololo
@OliverSalzburg I don't get it
12:44
@GottZ That is an exact duplicate of a question asked 4 hours ago.
Flagged
i don't get it why people ask such questions
Homework
I'm not sure if that's even homework
user3119231
I'm not sure if he even knows what he's doing.
if thats homework i'd kill the teacher
12:47
The last question posted by him seems to indicate he has no idea what he's doing
well the first line is actually his text
@Cereal path.join takes a list of strings to build a valid path depending on the system path separator, using concatenation and strings already containing path separators defies the entire point of it
the rest is a quote
fun fact: even though i've given the answer of what "flag" is in the comments i think his task is to explain each line
@ivarni Oooh
12:52
meh.. i lack the rep to see it
"Decode var string"
:(
He's got that mask, must mean sirius biz
We better answer him, or he may hack us
The cringiest mask on the internet
12:54
i cant think of a reallife scenario where he could benefit from solving such a question
if its a test to figure out if he's worth the job then this might be a question on page 1
if its homework.. i'd kill the teacher
Could be a web course
on some "hacker" site i guess
Must be taught by the infamous hacker "4chan"
at least someone came along and fixed the indentation
>.<
I love how someone always edits the post before close voting it
every time
"Shit question, but I need this 2 rep"
12:59
is it possible to call a function on every ng-repeat item init (with angular)?
well you cant do it forever
somewhen edits will not pay back anymore
1000 edits i think right?
2000 rep
You won't get edit rep beyond 2k profile rep
ah i see
Ahh, I didn't know that
13:01
oh wait no that cant be true. so you are telling if you answer questions and gain around 1800 rep you can only get 200 more rep through editing?
thats somehow false i think
Nope
that's how it works
I've got 49 edits and I don't get rep for editing (which is fine, I think it's stupid to award it in the first place)
well thats true
yep. You won't get any rep for editing over 2k rep (when you get editing privileges)
lots of shit questions get bumped over shit edits because of it
no matter how much rep you've gotten through editing
13:02
i'm only editing if i think its necessary
so when your edits don't have to get reviewed anymore, you won't get rep for it
that being said, I hate the edit review queue
I'd sometimes like to punch the guys that go through 100 questions and just edit the "thanks" out
We used to have a "too minor" reject reason for that
I might approve the first time, but if I see a pattern, all of your shitty edits get revoked
isnt that below the character amount limit?
oh, they find a way
13:04
Oh they'll work around that with whitespace
well thankfully there are always people above others to prevent it
get your edit reps while you still can... :D
-3
Q: can you show me how to find the final result from a javascript i dont know how to do it

Kenan my school asked me to find the final result for the javascript below and i dont know how to do it can you help me with this can you at least show me how to do it or link to a video that shows me the script is .... var string = "2b903102b29299c12d6c1e2ac80169"; var flag = ""; for (var i =...

haha, right back at it again
Go to w3schools.com ( good for basics ) , learn for loop in js , ascii code , charCodeAt and fromCharCode methods and you'll be done with it . — Siddharth Sharma 48 secs ago
so its school homework
user3119231
so its stupid
13:13
Is it possible that they are all different students from the same class/college/school referred to Stack Overflow by their professor?
maybe
user3119231
@ivarni he wrote "w3schools.com" - so downvote him, right?
That's one class that won't make their school proud then
is it possible to write something like this with angular : <div ng-repeat='item in items' ng-onEachItem='console.log("new item with index $index created");'></div> ?
the "ng-onEachItem" think is what Im looking for :P
@Maurize I can downvote comments? Where? How?
13:15
@MadaraUchiha: Do you have a moment to look at stackoverflow.com/questions/34021190/… ?
user3119231
@ivarni Haha, no you can't..
Some guy keeps creating new accounts to re-post the same question
user3119231
@MadaraUchiha power needed here.
-1 not enough pings for @MadaraUchiha
user3119231
+1 now enough pings
13:16
he's going to ban every single one of you :P
user3119231
now you aswell, mate :D
COME AT ME BREH!
@Cerbrus I did not!
we all know you did, Noob!
@MadaraUchiha Don't listen to him! Also, ping!
user3119231
13:18
Gave 41 answers, asked 9 questions -> Question limit reached? Dafuq?
ANFÄNGER! :D
user3119231
Niemals.
In Zirak's words, "Die Kinder sind Hosen"
oh. hier wird deutsch geschrieben :O
user3119231
@SomeGuy The kids are trousers?
13:20
@Maurize ask @Zirak
user3119231
@Zirak why are the kids trousers?
anyone here still using adblock plus / adblock and not something like ublock origin?
@Maurize Ja, nur seine Kinder. Seine Mutter ist ein Hemd zu
user3119231
@GottZ o/
(Pardon the grammar)
13:25
just asking cause i just noticed my ram usage of chrome
user3119231
using firefox - everything normal.
crl
crl
yea recently removed ad-blockers, those shits take mem, but also save mem since it blocks shit, so idk
well since i switched (due to a recommendation) to ublock i dont have any ram issues anymore in chrome :o
I don't use AdBlockers
I stopped using adblockers and just added a large list to my hosts file. It is not better, I just wanted to see how fool proof my hosts file parser/generator is :P
crl
crl
13:27
the war between ad-blockers and ad makers must be fun
pages I like should get the ad revenue, pages that I don't like that plaster me with ads get closed in an instant
I use eff.org/privacybadger which at least tries to allow the non tracking ads
it does break some sites though
oh, that's a good concept
I'm fine with seeing ads but I am nto fine with being tracked
13:28
@crl heh, my last few contracts involved me making advertisements for the Google Ad platform :P
crl
crl
ad for an ad thing, hehe
just some tabs open
And my co-workers say my tabs are bad... xD
user3119231
Minecraft spotted.
:3
13:31
@GottZ Is that editor a chrome extension starting with the name "C"?
that editor is vim
over ssh
lel, when i'm browsing, i usually have 20+ tabs at the end. if i'm looking up for information, i open a new tab and searches for it. For each result, i open a tab
but i forget to close them after :/
oh, fun
@KarelG for me its worse.. i keep such tabs open cause i "think" i have the time to read it in a whole
hah, same here :)
i'm just lazy to reopen closed tab. I keep them because i think "it might be useful" but i didn't checked it
13:33
ye
but anyways
@SomeGuy wat? :D
Same here too :/ the most fun part is when I have to go sleep, and I close them with so much pain :P
using adblock plus / adblock my ram would have filled up completely
@GNi33 Yes.
Alright then
13:35
oh btw.. i discovered a neat c tutorial if anyone is interested in c: c.learncodethehardway.org/book/index.html
those learnXthehardway are pretty nice in general
ye. less bullshit wrapped around the interesting stuff
The Python one has some flaws, but I enjoyed this one on C
btw
user3119231
13:38
just type something
user3119231
then hit backspace and laugh.
does anyone know a true javascript tutorial written in such a way?
i'm kinda tired to hand people / friends low quality stuff
eloquent JavaScript should be good
codecademy is nice but has lots of flaws
browse through some of the ones we linked in the tag description and pick one that you like
but yeah, I'd recommend Eloquent JS
crl
crl
@GNi33 is it up-to-date with ES6?
uhm, good question
I don't know the "you don't know JS" ones, but they seem to be working on a ES6 book for the series
crl
crl
ok
user3119231
is there a tutorial for placing a oldschool square at the end of the input text?
I don't think EJS covers ES6 sadly
13:42
The Dive Into XYZ books tend to be good too
@GottZ ^
well i'm summing everything up right now. will look into every suggestion
@SomeGuy the Head First series?
Whoops, apparently there's only a Dive Into Python :P
I thought they had one for JS too
hmk so i can stop searching for it
Ok, here is a fiddle. Problem is that I try to fire a function (using $http) at each ng-repeat iteration. If I remove comments from the actual fiddle, the function falls into an infinite loop with no callback at all... jsfiddle.net/henw6cea help anyone pls
13:50
i dont know why but i really hate angular.
crl
crl
beautiful, putting callbacks in promises
omg
@Julo0sS I'm looking
13:56
@crl ?
thx @emporio ^^
@Julo0sS do you try CodeWars?
join here: www.codewars.com/r/hFSZoA
crl
crl
@Julo0sS google angular initial ajax call, that's one of the thing ng sucks at
@crl so how to solve this? no solution with ng?
@emporio whats this? some kind of "coding mmorpg"?
@Julo0sS what you mean by remove comments?
@Julo0sS yes
it's not mmorpg
it's improving your skills

« first day (1872 days earlier)      last day (3301 days later) »