« first day (818 days earlier)      last day (4132 days later) » 

2:00 AM
either case, lemon meme persistent setting will use this code:
function store_data(data, key) {
	if (!window.localStorage || !window.JSON) {
		return;
	}
	key = key || data_key;
	localStorage.setItem(key, JSON.stringify(data));
}

function get_data(key) {
	if (!window.localStorage || !window.JSON) {
		return;
	}
	key = key || data_key;
	var item = localStorage.getItem(key);

	if (!item) {
		return;
	}

	return JSON.parse( item );
}

function remove_data(key) {
	if (!window.localStorage || !window.JSON) {
		return;
	}
	key = key || 'lutil_generic_data_key';
 
I will be in NZ's next book too ._.
(seriously)
 
it's not online yet. but I bought the domain and VPS today :P
ha
 
bbl guys
chat bot what ever thing say bye!
(^ just kidding)
 
I cant wait to see it
 
@SimonSarris Props!
 
2:18 AM
this video about Progressive Enhancement.. is laying out the idea of "building an m&m from the peanut to the candy".. Content --> Presentation --> Behavior .. this is doesn't practical anymore. I design Behavior --> Content --> Presentation and I couldnt imagine doing otherwise..
Any backbone based, jQuery driven, web app now adays is Behavior --> Content --> Presentation..
im still watching though, maybe he'll enlilghten me
 
@SimonSarris NZ?
 
yah
 
@bushdiver Can you provide some logic/proof to back that up?
 
idk, this NZ guy seems a lot more knowledgeable about the subject than me.. im waiting to be enlightened from this video before I say anything else about it..
 
@RyanKinal zakas
I'll be writing a short chapter for an upcoming title of his, though I don't want to give more details because I don't know how much he wants to be public.
 
2:27 AM
Interesting. I'll have to read some of his stuff.
 
@bushdiver lol, he is leading edge consultant to all the companies you want to work for. just look at it that way.
and he is talking 'best practices' not 'what you get paid for'
:P
 
oh dear, i do this so I don't have to work for companies, but I see your point
 
So, I've been trying to figure out this IE10 bug on my employer's website, right? It seems ASP.NET ImageButtons don't work in the browser.
As it turns out, it's because, in IE10, the image coordinates are sent to the server as a "Double" rather than as a "Decimal"
This shit blows my mind.
HTTP doesn't have types, and yet Microsoft has managed to insert a type error into the process.
 
Statically typed?
 
@bushdiver he really is a very knowledgeable man. I would heed his advice. if you do not implement it in your own works it's at least nice to know.
Jryy sbyxf, vg'f orra avpr ohg V guvax V arrq n fzbxr naq gura fgneg jbexvat ba yrzba zrzr. Vs lbh pnaabg ernq guvf ivfvg uggc://eyrzba.tvguho.pbz/EBG13WF/ gb qrpvcure. Gunax lbh naq unir n avpr qnl.

Fvapreryl,
eyrzba
 
2:35 AM
!!> magicTranslateFunction(rlemonsMessage);
Is that ROT13?
 
there's a big hint in the url
t == g
u == h
p == c
b == o
z == m
so it's a just a shift cypher
 
That's what ROT13 is
Shifted 13 spaces.
 
oh cool, never heard of it
 
The nice bit is that it's the same process for encoding and decoding.
 
haha yeah nice
 
2:39 AM
ioccc.org/1989/westley.c <- C code to process ROT13. Cool part is that it still compiles/runs when the source is run through itself.
 
Well folks, it's been nice but I think I need a smoke and then start working on lemon meme. If you cannot read this visit rlemon.github.com/ROT13JS to decipher. Thank you and have a nice day.

Sincerely,
rlemon
 
m59
@rlemon thanks for the help today!
@rlemon goodnight
 
I don't know if I can watch the rest of this, I just don't agree.. I can't provide the best possible experience for every browser.. I just don't have time.. how could I support a user for instance that doesn't have javascript turned on for instance when all my content is fetched with ajax ? would be take too much time and not enough incentive..
 
lol it's meant as a learning exercise
these are things you need to consider.
js is disabled on 2% of desktops and like half of all smart phones (worldwide)
If you're cool with alienating all of those users then so be it. but at least if a client asks you to support it you know A) how, and B) how to do it right, and easy, and quickly.
it's really not that hard.
and by smartphones I really mean all mobile web enabled devices.
 
emm .. guys , what would be the best way for preventing a form from loosing a focus
basically i have a "lookdown" popup-div and i want to prevent people from tabbing out of it
"form", not "field"
 
2:51 AM
gah, can't type
What do you mean by popup? You could use a modal window.
 
@rlemon sorry man was studying
 
i AM using a modal window
 
Then call the modal's close routine only when the users' filled out/submitted the form
Bootstrap?
 
Bbye room i have exam .. Cya
 
so , does anyone ELSE have ideas ?
 
2:53 AM
@tereško sorry what are you working with now?
example?
 
Can someone help me optimising this regex:
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&');
return item.replace(new RegExp('(' + query + ')', 'i'), function ($1, match) {
return '<strong>' + match + '</strong>';
});
 
@rlemon javascript , native
 
[..]
 
Right now it wont find if query is e.g.: "test" but the actually result is "testing"
 
@tereško the first one out of my head
 
2:54 AM
ok I get that.. but i'm slight inebriated and that is hard to understand.
 
element.addEventListener('blur',function(e){
   element.focus();
   /* or just return false on the blur */
},false);
 
"form" is a form.
 
there is a form in a page , i want to prevent user from tabbing out if it
 
input? textarea?
ok so all inputs.
 
form, as in "has multiple inputs"
 
2:55 AM
tabbing, mouse clicks, everything?
 
there is an overlay hiding the rest of the page , clicking is not an issue in particular
 
bye btw @rlemon if you still need my assistance ping me :P
with what u need ^_^
or mail me
 
@designer No, no one can.
 
@SomeKittens as in its not possible or?
 
2:59 AM
@phenomnomnominal thank you, ill have a look
 
document.addEventListener('keyup', function(e) {
  if( e.which != 9 ) return;
  var valid = false;
  [].forEach(form.elements, function(element) {
    if( document.activeElement == element ) valid = true;
  });
  if(!valid) form.elements[0].focus();
}, false);
maybe?
so if they tab off they return to the first input
 
Is this the right place to discuss about xhr?
 
you bet
 
hmm ... i guess, the tab order is always the same
so if i need to prevent the user from tabbing out of the form, i just need to make sure that when someone leaves the "last" element , he/she/it focuses the first one ( in that particular modal dialog )
 
imo that makes the most sense yes
but you could just position them back on the last element
form.elements[form.elements.length-1].focus();
 
3:05 AM
@phenomnomnominal Im still not getting anywhere, can you give me a clue? :)
 
er, preventDefault() and return false maybe on keydown would be better
 
@designer, I have no idea, that's just a useful tool for playing with regex's
 
determine if last already on keydown, then if so just cancel the event.
actually that is a much better approach.
sorry i'm a tad bit hammered.
document.addEventListener('keydown', function(e) {
  if( e.which != 9 ) return;
  if( document.activeElement == form.elements[form.elements.length-1] ) {
    e.preventDefault();
    return false;
  }
}, false);
 
Ok, I want to make an xhr to read several webpages (around 80) from a website, but this website is about a videogame where having lag may mean death and hence losing 3 days of your life.
The script will run in a chrome's extension every 5 minutes and lasts around... 1 minute running at 220~KB/s in a 2Mb/s connection, which means lag for 1 minute...
 
'chunk' the data if possible.
?
4 mins ago, by rlemon
sorry i'm a tad bit hammered.
 
3:10 AM
@rlemon shift+tab =P
 
:(
lol
well smarty pants, you can handle that heheh
 
So I'm looking if its possible to set a cap in the download speed, but IDK how to search ir
 
    Changed from:
        var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&');
    return item.replace(new RegExp('(' + query + ')', 'gi'), function ($1, match) {
    	return '<strong>' + match + '</strong>';
    });

to:
var query = this.query.split(' ').join('|');
return item.replace(new RegExp('(' + query + ')', 'gi'), function ($1, match) {
	return '<strong>' + match + '</strong>';
});
Does that make sense or is it bad?
 
bad
 
@rlemon hmm annoying, it works now if i type "test " and the actually word would be "testing" - stll finds "test"
 
3:13 AM
is it possible like to pause the xhr if the speed gets over a certain limit?
 
Opinions on so-called "Infinite Scroll"?
 
It's really shit if done wrong
e.g. stumbleupon topic selection
 
Well according to this question http://stackoverflow.com/questions/9127984/how-can-i-cap-the-download-speed-of-xhr2-in-javascript
I'm screwed xD
 
I'm actually unfamiliar with that particular example. And it seems I'd have to create an account to familiarize myself.
@Goodwine I wonder if you could limit it on the server side, rather than the client.
 
@RyanKinal The thing is that I don't own the server, and they deny to make an API to reduce the bandwidth ¬¬
 
3:25 AM
Ah
That makes it difficult, then
 
@RyanKinal Maybe renting a server to query this pages and making some webservices magic could do the trick o_o
 
Could be
 
@RyanKinal - the problem is that it isn't 'infinite' data, so it doesn't work. You're specifically looking for something, eg starting with z, and you have to scroll through every letter and wait for them to load
 
@phenomnomnominal Ah, right
 
If you're just showing data to a user where they're not looking for something in particular, it works much better
 
3:28 AM
I think that's a good way to look at it.
 
4:07 AM
 
4:23 AM
unfortunately , the channel's language is English-ish
 
4:51 AM
Learning the Revealing Prototype Pattern, I made a simple started application base. Criticism welcome (aka all the stupid things I am doing...)
[Github Link](https://github.com/justinobney/JS-App-Structure/blob/master/app.js)
 
5:31 AM
 
 
2 hours later…
7:08 AM
hey , is anyone where well acquainted to PDF.js ?
need some help regarding it
 
anyone with extensive experience in dealing with SWFupload ?
 
7:32 AM
What does "Unbuffered code for conditionals etc <% code %>" mean?
I am reading the feature list of EJS: github.com/visionmedia/ejs
 
 
2 hours later…
9:07 AM
bit quiet in here today!
 
Hi, could you help me to create a regex statement?
I need check that str has only special chars or digits, with out word chars.
 
hey hun im sorry im not up on javascript entirely :) im sure someone will be able to help you when they become available
 
:-(
 
sorry hunni
 
Hey... whats up.
:)
 
9:22 AM
user image
3
^- That is just awesome
@KirstyHarris \o hello hun
@NiLL what ???????????????????????
@NiLL you mean no alphabets ?
^[^a-zA-Z]+$
News from Cupertino says that Apple is working on a cheaper and more affordable version of their largely popular iPhone. Word also has it that it may be launched alongside the much anticipated iPhone 6/5S during the later half of 2013!
 
LOL
13:72 really ?
 
9:39 AM
._. that is why he says madness can't be far away
 
10:14 AM
hey anyone here can help me with PDF.js ?
 
Response 418
 
hey @Abhishek sweetie x
 
11:19 AM
hi all
how to bind/unbind click for an anchor tag
 
@Gopesh, what have you tried...
 
@phenomnomnominal $('#aptab').off('click');
aptab is the id of the anchor,it removes click,but i cannot bind the click using bind or on()
 
What is your code for adding the click?
 
$('#aptab').on('click'); or $('#aptab').bind('click');
 
and what do you expect to happen when the click happens?
 
11:24 AM
i want to disabe the link
 
well you need to pass a function into the click event
 
@Gopesh: you cannot "re-assign" event handlers without providing the proper event handler function
 
and if you want to disable the link when you click it, why use the <a> tag at all?
 
@jAndy what type of event handler function???
 
@Gopesh, such as $("#aptab').on('click', function () { //your code here });
 
11:26 AM
@phenomnomnominal actually there are 3 tabs,at first time i need to disable 2 tabs..tabs are not jquery ui
 
function myClickHandler( event ) {
    // blabla do something
}

$('#aptab').on('click', myClickHandler); // bound

// somewhere else

$('#aptab').off('click', myClickHandler); // unbound, the specific handler

// somewhere else

$('#aptab').on('click', myClickHandler); // bound again
that way you can explicitly bind and unbind specific event handler functions for certain event types
by just calling $(elem).off('click'), it will just removed any click event handler bound through jQuery
however, if you want to re-bind an event handler function which you unbind before, you need to have/store a reference to that function
 
@jAndy ok..Thanks for ur supprt,i will try it..
@phenomnomnominal thanks for ur reply..
 
11:40 AM
 
Oh god! That's beyond awesome!
 
welp, got some spam recruitment email (I feel kinda flattered, really...) from someone using a @swccd.edu. Wanted to be a good Samaritan and email swccd, but no email is listed in the main page or the contact-us. Work is done.
Unless I email a random librarian or gym teacher.
 
11:56 AM
188
Q: How should I deal with an employee who has slept with my wife?

Waiter JohnI'm the owner of a business with about 30-40 employees. Recently, I found out that one of my employees has been having an affair with my wife. The employee has worked for me for 4 years. I felt like I was his mentor, since I recruited straight from university, taught him the ropes, and promoted h...

3
holy crap
stackexchange really covers all kinds of stuff
 
ha!
 
Wha!?
@GNi33 The answer is simple. You don't deal with him. There are professionals for that.
 
Asker's name is Waiter John
@OctavianDamiean The Mafia are an example
 
@OctavianDamiean one named Léon?
 
Good examples.
 
12:01 PM
Wow!
 
wow what?
 
Hi people
meta question here
 
I never got how you can divorce someone, and then take claim for a load of their possessions.
 
Would you have answered this question or it die ?
0
A: How to convert this Javascript code to Jquery

dystroyYou just put the function call in a callack given to click : function iptxt(){ var d=document; try{ if(!d.body)throw(0);window.location='http://www.instapaper.com/text?u='+encodeURIComponent(d.location.href); } catch(e){alert('Please wait until the page has loaded.');} } $('#go')....

 
The question should die because of the title
 
12:08 PM
The body is (very slightly) less confused than the title
 
imo, you should have waited until the OP showed some effort.
 
Sigh... OP's comment to the other answer...
"Can you please simplify this code for me.."
 
Try following the link
yeah...
 
gunbroker.com/Auction/ViewItem.aspx?Item=322196026 <- Oh god why i dont have that much money -_-
 
!!/mdn reduce
aww
Why am I so lazy...
 
12:20 PM
@Zirak reduce... the function for which I never found a use case...
 
@Abhishek why would you need a thing like that?
 
How? I use it all the time
 
@GNi33 man i hve a thing for guns :3
and its also . useful as hell when u live in eastern world :P
 
@Zirak Do you have an example where it's useful ? (not a critic, honnest question)
 
What I find odd is that it doesn't accept a thisArg
 
12:21 PM
@dystroy 1. Show off , 2. Self defence :P
 
Well, when you have an array, and you want to reduce it to a single value.
 
@Zirak it avoids wrapping problem, I suppose it was mainly dedicated to primitive arrays
So this would be painful and dangerous
A little like this problem :
$.each([1, 2, 3], function() {
if (this===2) console.log('found!');
});
 
That can be a sum, an average, or maybe this: github.com/Zirak/SO-ChatBot/blob/master/source/util.js#L2-L11
 
I've used reduce a few times
filter and forEach get used a lot more
 
@dystroy "Wrapping problem"?
@dystroy grrr, formatting!
 
12:23 PM
Try my code
(or read my blog post : canop.org/blog/?p=307)
 
Hello, can anybody take a jqgrid and doubt about autocomplete?
 
@UZUMAKI you have a menu enabling to edit your posts in this chat
 
@dystroy Irrelevant to native methods
The value visited and the this variable are not connected to one another
 
no : this can't be of a primitive type
 
@Nile : Can you check if there is any problem in this code. stackoverflow.com/questions/14278153/…
 
12:27 PM
@dystroy thz, is my first time in chat :x
 
I still don't see how it's relevant; I didn't get why every other array method accepted a thisArg, but reduce and reduceRight don't.
 
My hypothesis is that the foreseen use case was numbers
And so it avoids you dealing with instance of Number
 
We may be talking in different dimensions.
one sec, I'll mock up an example
 
this can't never be a primitive number.
 
ok, so...?
 
12:31 PM
So if you use this from a number, you make costly and sometimes confusing conversions
Like this :
(function(){console.log(this===2)}).call(2)
 
...so?
 
So if an array function is designed to deal with numbers, don't make it give the arguments as this...
 
ok, I won't. But how is that of any relevance at all?
 
Ok... I give up...
 
Why is that rationale only applied to reduce and reduceRight, but not to every other array method?
Seriously, I don't get your argument. Unlike jquery, the this variable has a completely different meaning than the value visited.
 
12:42 PM
 (function(){console.log( this == 2 )}).call(2);  // True
 (function(){console.log( this === 2 )}).call(2); // False
 
!!> (function (){console.log( +this === 2 )}).call(2); // TADA! All your woes. Poof.
 
@AmaanCheval :P
@AmaanCheval "they asked us to prove the pigeon hole principle"
basically if there are m pigeons and n pigeon holes
and m > n
then atleast one hole will have two pigeons
My proof :
"Lets assume this is not true"
Suppose we have m pigeons and n holes
Such that our pigeon are un killable & we want them alive
then
if n < m
to evenly distribute each hole will get
m/n pigeons
but oh no
we killed all the pigeons cause n / m not an integer always oops
so our
postulate are wrong
hence we are inhuman
there for the condition is true
 
@Abhishek tl;dr
 
posted on January 11, 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) {} WOOP

 
This one was hard. I've first read it as " ... = -/ "
 
12:52 PM
Me too
Considering I didn't know about Euler's identity, I had to Google it
 
-1
A: What are some good HTML beginner tutorials?

BenoitW3Schools, I still often use it as a quick reference.

.......................
 
@AmaanCheval its the proof of common sense in mathematics
 
Sounds kind of silly
 
As a quick reference, w3schools is sometimes useful to remind you something you already know.
 
@AmaanCheval it is
 
12:58 PM
@dystroy Totally is
I dislike when people use it as a beginner's guide
 
@AmaanCheval It obviously is dangerous. And I wouldn't want to be caught giving its link to a beginner.
 
@dystroy: I wouldn't know when. Any related search you do, should always include MDN, so you actually can never reach w3fools
 

« first day (818 days earlier)      last day (4132 days later) »