« first day (955 days earlier)      last day (4218 days later) » 

13:00
I have a problem with menus drag and drop. can anyone direct me what i'm doing wrong jsfiddle.net/SAARH/3
@Mhche Eh, you declare the variable in the scope you need it, and then assign the new value to it from the event handler.
@phenomnomnominal Man i am not so low level it's just the implementation with the widget that makes my questions to look dummy.
However, that's not gonna be what you want, most-likely.
13:03
@Mhche, why don't you just try some shit before asking then?
@OctavianDamiean yeah i know,that's why i asked you. Because i have tried and all look fine but doesn't seem to work at end
Basically, you just call that function you need from within that event handler.
@phenomnomnominal i don't use to ask before try. If i ask for something it means that i have tried and i could not find the solution to my problem,so i try to be helped. If you don't want to help me just don't give a glance to my issue,otherwise don't try to be arrogant.
@OctavianDamiean I think that affects the widget because when i do that it just disappears. I think all the page is trying to handle my request that's why the twitter widget is affected
@FlorianMargaine troll
13:07
I wouldn't dare.
@FlorianMargaine Yeah ok sure.
1 message moved to recycle bin
it's a terrible site you were recommending
@Mhche In that case there's the change event which fires once the input element loses focus.
What's better / Whats the difference?
var data = [];
	 data.name = [];
	 data.name[1] = 'harry';
	 data.name[2] = 'bob',

	 data.age = [];
	 data.age[1] = '25';
	 data.age[2] = '70';

	 or


var data = {
	name: {
		1: 'harry',
		2: 'bob'
	},

	age: {
		1: '25',
		2: '70'
	}

};
@JanDvorak that was on purpose.
13:08
If calling the widget on ever keystroke is the problem.
@Connor they're not the same data structures.
@Connor, the second option is cleaner, but they do the same thing.
@Connor the latter
@JanDvorak latter?
13:09
@jAndy bro
The first one uses arrays, and why would you ever want to do that.
why u ignore me
Y U NO LOVE ME?!
latter. as opposed to former.
@phenomnomnominal the second one uses 1-based indexes...
@FlorianMargaine oh jesus
13:10
@Connor the former is a typeError
so the second one is best?
@OctavianDamiean hmm look even more tricky now pff twitter shits
anyone else wanna be batman?
Why am I not able to read right now.
@Connor both suck.
13:10
They're both silly
@FlorianMargaine ok :) sooo......
var data = [{ name: 'harry', age: 25}, {name: 'bob', age: 70 } ];
@rlemon Nah, I'm Dr. Octavius already.
var data = [
    { name: 'harry', age: 25 },
    { name: 'bob', age: 70 }
];
13:11
ages are numbers, use numbers.
1
A: Detect if user clicks inside a circle

Benjamin GruenbaumA circle, is the geometric position of all the points whose distance from a central point is equal to some number "R". You want to find the points whose distance is less than or equal to that "R", our radius. The distance equation in 2d euclidean space is d(p1,p2) = root((p1.x-p2.x)^2 + (p1.y-p...

@FlorianMargaine how would i achieve that in a for loop?
phone numbers, on the other hand, are not numbers
We talked about this the other day @rlemon @Loktar
:)
13:11
and use data[0].name or data[1].name
@FlorianMargaine kk
> Trig is not needed in this case, not would it be useful.
Shut down.
@phenomnomnominal In my defense 'r' and 't' are right next to each other in the keyboard :P
@Connor arr.push(x) is an alias of arr[arr.length] = x
@BenjaminGruenbaum don't you have a hebrew keyboard?
13:13
@BenjaminGruenbaum have an upvote sir! :)
@BenjaminGruenbaum, didn't even notice the typo, just the annihilation of the hope in @CBroe's heart
So many pings, all with edits :P
@FlorianMargaine @JanDvorak so i would do arr.push({name:'john', age: 19}); ?
@BenjaminGruenbaum here's one ping from me, too
@FlorianMargaine The English layout is American English
13:14
@Connor yeah
@Connor looks good, right?
@BenjaminGruenbaum You filthy filthy rep whore. Almost as bad as @jAndy.
@FlorianMargaine yes Thank you :)
@JanDvorak Thanks :)
@OctavianDamiean :( I rep cap anyway, I just wanted to show you the question because we talked about it :P
You could add more whitespace if you want to, though @Connor
13:14
@JanDvorak like... why?
for readability.
@Connor you do seem to be quite a whitespace fanboi
I mean, once you have more than two properties, they no longer fit into a line
@JanDvorak oh, yeah i know
13:15
(Even if he doesn't know trig)
@BenjaminGruenbaum Well, he's a bro e
I'm going to start saying that to people
@phenomnomnominal actually, i thinks is probably because SO chat doesn't support tabs so its harder
@BenjaminGruenbaum trig?
@someone, you totally extend the asshole class.
@Connor It does support tabs, only the first four spaces are required for fixed font.
You inherit from Bitch and implement Tardness.
user image
3
who else?
lol nice
13:18
@rlemon moi please
better pic then
really, I can't do much with yours
hold on
too dark and your face angle is hard to work with
@rlemon nice one
I make batman pictures between builds.
13:19
@rlemon, that is beautiful:
Gah
yea
@rlemon please do Ryan in the picture where he's wearing the trench coat, liken not actually doing him in that way ... you know what I mean.
you need to use goo.gl
@OctavianDamiean lol
var __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };

To(be || !to(be, that === the(question)));

Whether(tis(__indexOf.call(the(mind(to(suffer))), Nobler) >= 0));

The(Slings && Arrows in outrageous(Fortune, Or(to(take(Arms(against(a(Sea in troubles, And(By(opposing(end(them, to(die, to(sleep))))))))))))));

No(more.and(By(a(sleep, to(say(we(end)))))));

The(heart - ache && the(thousand(Natural(shocks))));
output from CoffeeScript compiler ^
input:
To be or not to be, that is the question
Whether tis Nobler in the mind to suffer
The Slings and Arrows of outrageous Fortune,
Or to take Arms against a Sea of troubles,
And By opposing end them, to die, to sleep
No more. and By a sleep, to say we end
The heart-ache and the thousand Natural shocks
That Flesh is heir to?
Someone showed me this today: dangermouse.net/esoteric/chef.html
Hello World Souffle.

This recipe prints the immortal words "Hello world!", in a basically brute force way. It also makes a lot of food for one person.

Ingredients.
72 g haricot beans
101 eggs
108 g lard
111 cups oil
32 zucchinis
119 ml water
114 g red salmon
100 g dijon mustard
33 potatoes

Method.
Put potatoes into the mixing bowl. Put dijon mustard into the mixing bowl. Put lard into the mixing bowl. Put red salmon into the mixing bowl. Put oil into the mixing bowl. Put water into the mixing bowl. Put zucchinis into the mixing bowl. Put oil into the mixing bowl. Put lard into the mixing
how big is this mixing bowl?!
13:24
More importantly, how fat is this 1 person?
> 33 potatoes.
Damn
sounds alright
when I'm not very hungry, of course
hi
I have multiple same values in an array
you want a unique function?
I want that value only once
13:27
Boom, psychic.
in core javascript or jquery
uniq = (arr, obj = {}) ->
  obj[arr[i]] = arr[i] for i in [0...arr.length]
  obj[i] for i of obj
There's coffeescript.
Nothing in life is free.
and honestly it's so easy... didn't you have some basic programming course?
13:28
I'm newbie
output = []; output.push elem unless elem in output for elem in input
Isnt that , like duh so easy ?
@Florian It might be but I'm newbie in programming
maybe florian will have a better code but here is my spin
@phenomnomnominal and all you other CoffeeScript lovers.
pump this into the compiler.
Once upon a mignight dreary Whilst I ponder weak and weary,
Over many quaint and curious volumes of forgotten lore.
While I nodded, nearly napping, suddenly there came a tapping
As if someone gently rapping, rapping at my chamber door
"Tis some visitor"
I muttered, tapping at my chamber door,
Only this and nothing more
13:30
Can anyone help me?
Please :(
    var newList = [];
    for( var i = 0; i < oldList.length; i++){
       if( newList.indexOf(oldList[i]) != -1){
           newList.push(oldList[i]);
       }
    }
   oldList = newList;
Should we JS perf these?
@Darkyen Thanks. Let me try this code
sure son :D @phenomnomnominal
//@djtechie
//original cfs: output = []; output.push elem unless elem in output for elem in input

var elem, output,
  __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };

output = [];

if (!(function() {
  var _i, _len, _results;

  _results = [];
  for (_i = 0, _len = input.length; _i < _len; _i++) {
    elem = input[_i];
    _results.push(__indexOf.call(output, elem) >= 0);
  }
  return _results;
13:32
I have a love/hate relationship with cfs even though I've never tried it
@KendallFrey coffeescript
That's a spraying company near here.
@phenomnomnominal if I get bored this afternoon i'll convert the entire Raven into CFS
Y U NO come up with standard acronym for CoffeeScript?
13:34
you want us to continue using CS?
@KendallFrey CS is also often used for C#
@rlemon Yes.
although, idk why.
@KendallFrey well too bad
C# is C# not CS
13:34
CFS
CS is the extension
then what do we call clojurescript?
If you want to call C# CS you must call CoffeeScript COFFEE
CS => ["computer science","counter-strike","cheese-steak", "coffeescript"]
Y U PEOPLE NO UNDERSTAND CONTEXT
13:36
What is this context you speak of?
do you mean conText?
1st time: CoffeeScript.
(N > 1)time: CS
@JanDvorak conTeXt
Is conText that new cool jQuery plugin?
@KendallFrey I don't know, the message right before being a cfs->js conversion?
13:37
(sorry, there was a power drop (which shut down my computer) when I wasn't around)
@KendallFrey let me guess the "x" is read "ch" as in "LaTeX"?
@JanDvorak Of course. :P
$.fn.conText = function() {
  return this.each(function() {
    this.textContent = "I used to be in prison. Now i'm just a ex-convict";
  });
});
13:38
@rlemon -1. Needs more jQuery.
@rlemon Don't you mean $(this) ?
$.fn.conText = function() {
  return $(this).each(function(i,elem) {
    $(elem).text("I used to be in prison. Now i'm just a ex-convict");
  });
});
Fixed
better
$(elem) => $(this)
@BenjaminGruenbaum you are re-wrapping this in the return fn
@rlemon NEEDZ MOAR RAP
(function($){
   $.fn.conText = function() {
     return $(this).each(function(i,elem) {
       $(elem).text("I used to be in prison. Now i'm just a ex-convict");
     });
   });
})(jQuery);
@GertV 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.
13:43
$.fn.yodawg = function() {
  return $(this).each(function(i,elm) {
    elm.jQuery = $(this);
    $(elm.jQuery).text('I herd you like jQuery, so I put jQuery in your jQuery so you can jQuery while you jQuery');
  });
};
how do I disable that Chrome "you are now in fullscreen mode" message?
Hi, can any1 look at this question for me please, i'm stuck on it for a few days now and can't seem to find a solution :/
http://stackoverflow.com/questions/16761175/dnd-jquery-doesnt-work-after-loaded-with-ajax
@rlemon as a user
@JanDvorak, watch out for the annoying "must be in an event handler thing"
13:46
user level stylesheet for said browser then
What should I style?
@JanDvorak oh
posted on May 28, 2013

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {} Geeks! 5 Second Films just launched their kickstarter! A

@rlemon L M A O.. that is awesome
:D
I aim to please
13:47
So we ever gonna play Terrarua
@FlorianMargaine I don't know what exactly happend, but after a while, Stackoverflow Twitter decided to tweet my answer (probably they figured, its worth it)
and then.. booooom, explosion on upvotes
God dammit that's when I go back to work
I love the batman cap, looks a bit sadomasochistic... but who cares :P
13:51
My shoulder is going to kill me ...
@phenomnomnominal GOOGLE GLASSES ---> ALL THE THINGS
@OctavianDamiean thats nice of it, I'll give it a happy clap
@Std_Net 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.
Damn, heat pump is not conductive to staying awake
Too warm.
Makey me sleepy
@JanDvorak I don't think you can disable the message :/
unless there is a flag for it in chrome or ff
yea I know that... its a perfect sleep environment, warmy weather.. being already sleepy a bit + the silent sound of a cooler fan
13:55
Hi. I have page only with data rows(header and then rows with data. How can I print this page with header in all new page and bottom of the page I want add text like Page 10 from 15
Shouldn't that be a printer setting?
11
Q: Disable the "You've gone full screen" notification in Chrome

Ben BrockaEvery time I switch into Full Screen (F11) in chrome it says "You've gone full screen. Exit Full Screen (F11)". Can I disable this from showing up? I know how to exit full screen.

@JanDvorak ^
header for all page it's not a setting
maybe you know some cool simple controls for reporting?))
@jAndy why wasn't I there :(

« first day (955 days earlier)      last day (4218 days later) »