« first day (900 days earlier)      last day (4047 days later) » 

2:00 PM
@Mr_Green hopefully you use it alot. if you just want to do what you asked for you should consider taking Ziraks snippet
18 mins ago, by Zirak
var parts = input.match(/(\d{4})(\d{2})(\d{2})/);
//check for input validity here
var date = new Date(parts[1], parts[2] - 1, parts[3]);
 
Ya right now I am ok with zirak's suggestion. for future, I will consider your suggestion in option.
 
moment.js only makes sense to me if you need to do a lot of date formatting in different formats.
or you need to work with a formatted date and parse it for sub parts.
 
morning, people
 
@rlemon you know it can automaticly update dom nodes so it takes care of sentences like: "a minute ago"?
 
@WileyMarques I don't think there are any morning people in here.
 
2:05 PM
is it better now? :P
 
bah
humbug
 
@Jan-StefanJanetzky yea that is nice. but again, if that is all you are using it for.... is it worth it?
 
well. you could also minify it by removing all that chinese / etc. stuff from moment.js
 
Has anyone really been far even as decided to use even go want to do look more like?
 
@SOChatBot I have once been really far even as decided to use even go want to do look more like. Good times.
 
2:13 PM
"botwat" was filtered... heh.
 
!!/karma BotWat
!!/karma BotMale
!!/karma BotFemale
 
@Zirak BotWat has 13 karma
@Zirak BotMale has 3 karma
@Zirak BotFemale has -3 karma
 
okay, i definitely need a new system before September 17th
 
oh you cheaters...
 
BotFemale--
 
2:16 PM
zup guys
 
BotWat++
 
I don't think the concept of "voting" is well grasped here
 
Voting--
 
user2157210
Lets get that Female coming
2
 
user2157210
BotFemale++
 
2:17 PM
Voting*=-1
 
BotFemale++
 
user2157210
!!/karma BotFemale
 
@Nexxpresso BotFemale has 5 karma
@Nexxpresso BotFemale has 6 karma
 
@Zirak I think the concept of "cheating" is well grasped however
 
I'm discovering new dubstep
 
2:18 PM
I'm discovering GrooveShark.
 
handle?
 
@OctavianDamiean I need a package for xar in ubuntu, what do
 
sudo apt-get install xar
?
 
@rlemon Duh...
 
@KendallFrey what is your id/handle/username
 
2:20 PM
apt-cache search xar
 
wasnt it like that?
 
i dun use apt
pacman here :D
 
hi,
i have a rtsp url from wowza server. i want to play it in mobile browser(android).
right now if i give a link to the rtspurl , onclick it opens in fullscreenwith native player.
 
2:20 PM
@GNi33 yea it's strange.
I don't like it
 
@rlemon Same as always...
 
i don't fucking get it
 
user2157210
!!/karma BotFemale
 
no it's not you liar!
 
2:21 PM
@Nexxpresso BotFemale has 26 karma
 
You fail at stalking.
 
BotFemale++
 
@rlemon don work
 
@FlorianMargaine But they fail at it too. I can easily find out the actual tally.
 
2:22 PM
@Zirak nice.
 
will look for source then make install
 
@BenjaminGruenbaum does it not find the package?
 
Especially since rlemon has localstorage access
 
@Zirak yea but I wouldn't cheat. I just like hi-jacking the bot every so often to give it some personality
 
!!/karma BotFemale
 
2:24 PM
@GottZ BotFemale has 44 karma
 
wtf
 
might like that playlist
just made it
yes the last song is the harry potter theme dubstep remix
it's quite nice actually.
 
@rlemon yeah, that needs compiling
@rlemon was hoping for a .deb
@rlemon package is buggy, has dependency that I need to resolve, etc
 
user2157210
rlemon cheater!
 
2:28 PM
@rlemon Listening now.
 
You might want to look inside the sandbox chat room...
 
@BenjaminGruenbaum pkgs.org/download/xar
@Zirak hey! you made the system. I just use it
not cheating === not modifying the bots source or localStorage
 
app.get('/client.js', function(req, res) {
  //Fix for local testing
  if(req.headers.host.indexOf('localhost') === -1) {
    res.sendfile(__dirname + '/client.js');
  } else {
    res.sendfile(__dirname + '/client.localhost.js');
  }
});
Why does the above always send client.localhost.js even on Heroku?
 
because the server is local
to itself
 
did you do console.log(req.headers.host); ?
 
2:29 PM
Yup
 
and it's always localhost?
 
kittens-chat.herokuapp.com
 
@rlemon That's besides the point. A vote is where each member gets 1 choice. By negative voting and multi-voting you're going against that system, never mind if it's still within the boundaries of a greater system.
 
@FlorianMargaine It's localhost when I run it locally.
 
duh
weird indeed
maybe caching?
 
2:31 PM
@Zirak I was listening to RATM while voting. I had to mix up the system while staying in the constraints of the greater system
 
isn't there some nginx instance proxying to node that caches client.js?
try loading script.js?somestring
 
Sticking it to the man! And keeping things legal all the while
 
@Zirak On the internet, if you can do it, it's legal.
 
@FlorianMargaine Nope. Still localhost
 
It's only Illegal if you get caught.
 
2:32 PM
Which you did.
 
@SomeKittens typeof req.headers.host === 'string'?
 
@rlemon thanks, that won't solve the dependency though
 
no... not really.. I was voting on "BotWat"
I was essentially giving a vote to both genders
equality
 
@FlorianMargaine yeah
 
And you voted for BotMale too, and downvoted BotFemale
Twice of the latter
 
2:33 PM
I'm really 16 different people.
there.
I get 16 votes.
 
@Zirak there can be multiple choices votes though.
 
Dissociative identity disorder (DID), previously known as multiple personality disorder (MPD), is a mental disorder characterized by at least two distinct and relatively enduring identities or dissociated personality states that alternately control a person's behavior, and is accompanied by memory impairment for important information not explained by ordinary forgetfulness. In the book Psychology by Schacter, Gilbert and Wegner, they state that "dissociative identity disorder (DID) is characterized by the presence within an individual of two or more distinct identities that at different ...
 
didn't you vote for 2 people representing you in high school?
 
This is sad
You are a sad, sad little man
 
user2157210
With Ziraks Gravatar I cant really get the meaning of you are a sad little man
 
2:34 PM
only one of my personalities is sad. five are men. and three can be considered little. at the moment you are talking to a happy large woman named suzanne
 
@BenjaminGruenbaum What's xar?
 
user2157210
@rlemon So guessing that your current alter is a happy woman your male alter got abused in childhood and you flee into the female alter to escape the brutality your male alter experienced?
 
16 of them in here mate.
none were abused.
 
@OctavianDamiean what safari extensions are packed in
 
o_O
Safari!?
 
2:37 PM
one of them has a slide colon issue.
 
You be trollin?
 
user2157210
You mostly create seperatte alters to flee out of your normal ones dont you
 
nope
was bored and needed friends as a kid.
 
Yup, turns out it was delivering the right file, I just edited it wrong.
 
so created multiple personalities
 
2:39 PM
@OctavianDamiean do I sound like I'm having fun :(?
 
they mingle amungst themselves while my coding personality is out (large happy lady)
 
@BenjaminGruenbaum I don't see how you'd have Safari on Linux. Did you compile it?
 
user2157210
@rlemon does having male and female alters affect your sexuality?
 
@OctavianDamiean I don't, but it's either getting a mac, or installing linux, windows doesn't open XAR files correctly
 
@Nexxpresso no, all the females are lesbians and the males are hetero
 
2:40 PM
 
@BenjaminGruenbaum There's no Safari for Linux so I'm not sure if that's an option for you then.
 
I got lucky.
 
user2157210
So you do not have one main personality when it comes to sexy time
 
hello
 
2:41 PM
@OctavianDamiean I don't need safari, I just want to unpack the extension file, and pack it later
 
@Nexxpresso we take turns during the single encounter... 1) makes me last longer ;) 2) gives some nice variety 3) everyone gets some fun
 
@BenjaminGruenbaum Mhmm, let me check it xar is not just a pseudo-tar format.
 
0
Q: fill one javascript array with another js array

Scott SelbyI have an array listOfFriends of objects that contain [{"name" : "fName lName", "uid" : "0102030405"}], ... I want to cut down the size of this array , since I only need the uids , so I would like to make another array with only the uids var listOfFriends, listOfFriendsUIDs; //listOfFriends ge...

 
user2157210
@rlemon sounds funny
 
2:42 PM
> The WebSockets protocol is not yet supported on the Cedar stack.
I hate everything.
 
user2157210
first rule
 
user2157210
never make name first and lastname holy shit
 
Oh no, it's actually a standalone format.
 
@ScottSelby arr1.concat(arr2.slice(0));
idk if this will work
 
@rlemon it's an array of objects, and he wants an array of ids
 
2:44 PM
@OctavianDamiean :)
@OctavianDamiean Did anyone say Apple?
 
ohh, ok.
tl;dr just skimmed
 
@BenjaminGruenbaum Just complied it, works fine.
 
arr1.concat(arr2.slice(0).map(function(i){ return i.uid }));
@ScottSelby probably a bad solution tho
 
@OctavianDamiean yeah, that's what I'll probably do, thanks
 
@rlemon , thanks
 
2:48 PM
@Nexxpresso That's more like Suggestion 82Z-88.3 Subsection Tomato
 
var arr1 = [1,2,3],
arr2 = [{uid:123},{uid:456},{uid:789}];

console.log(arr1.concat(arr2.slice(0).map(function(i){ return i.uid })));
[1, 2, 3, 123, 456, 789]
 
user2157210
@SomeKittens wut?
 
@rlemon - i can get it to work now , I'm still learning js and didn't know about .map
 
There's nothing wrong with using your full name unless you have malicious intent.
 
!!/tell ScottSelby mdn Array.map
 
user2157210
@SomeKittens But there is something wrong with putting name: "firstname+lastname" instead of Firstname: "firstname", Lastname:"lastname"
 
well yea.. mr. chat bot , now that I know it its easy to look up, but I didn't know about it existing
 
var x = [1,2,3];
x = x.map(function(item) {
  return item + 'foo';
});
console.log(x);
['1foo', '2foo', '3foo']
 
@ScottSelby \o/ You learned something new! Congrats!
 
^ this help?
 
2:51 PM
!!/tell rlemon mdn Array.prototype.map
 
why am I being pinged about this?
 
just making a point about Array.map vs Array.prototype.map ;-)
 
but they link the same doc
 
the former doesn't exist
 
2:52 PM
yea but it's easier to type and gets the right doc
I could have just done mdn map
 
I'm just being pedantic ;-)
 
but I was unsure it would find it with that
 
and I wanted to see what the bot can do
 
user2157210
@SomeKittens having such field in a database structure would really be normalized
 
god I Was a moron ~2 years ago
5
Q: Javascript Regular Expression Remove Spaces

rlemonSo i'm writing a tiny little plugin for JQuery to remove spaces from a string. see here (function($) { $.stripSpaces = function(str) { var reg = new RegExp("[ ]+","g"); return str.replace(reg,""); } })(jQuery); my regular expression is currently [ ]+ to collect all spac...

 
2:53 PM
@rlemon We all were.
 
haha, that's the jQuery - spirit though
 
:( I just peeked at a few of my older Q's
 
@rlemon Wait until you see the code you're writing now in 2 years time.
 
call a function of a plugin instead of just using that one line
 
in two years time I am fearful what I will think of the code I wrote in 2010/11
 
2:55 PM
^can people see the above?
 
I can
 
user2157210
no we cant see it
 
Though I have noticed a trend.. whenever I think how clever I was for having written something a certain way, those are usually the things I hate most when I look back on my old code
 
@Neil Usually that means "I implemented bad practices cleverly"
 
@rlemon how did you only manage to acquire 7k rep in two years?
 
2:56 PM
every short circuit I do now I am almost certain I will loath myself for doing later.
@Alnitak after the first year I kinda got sick of main site and just lurk in the chats now
 
user2157210
says lurk
 
most of my rep in the past year is passive
 
@SomeKittens Yeah, that's fairly accurate
 
yeah, my serverfault.com a/c is like that
 
@Neil Instead of clever, try aiming for smart
 
2:57 PM
When I do go on main site I feel it is a lot of voting closing editing and commenting
very seldom do I write answers
if I got rep for helping on the chat that would be cool. I would be +10K for sure
 
@Zirak The difference between clever and smart is whether or not you think it's right or not
It's always smart if you think it's done right, but it may in fact just be clever instead
 
Smart is knowing a tomato is a fruit. Clever is not putting it in a fruit salad.
 
@rlemon Knowledge is knowing tomato is a fruit. Wisdom is not putting it in a fruit salad.
 
I was borrowing for this example... thanks.
jerkass
 
user2157210
Is Spaniards considered an Insult?
 
3:00 PM
Only if you're not expecting a Spanish Inquisition
 
user2157210
or normal world for describing spanish people?
 
@rlemon It wasn't my intention to offend
 
You can look at it this way: When you go on a walk in the woods and reach a blocking shrub, you can do the smart thing and go around it or take a different path, or you can be clever and migrate an animal which eats that shrub
 
hey you sexy people
2
 
@ShotgunNinja But nobody will expect that
 
user2157210
3:00 PM
He called me Sexy
 
Hey babe
 
What can I do ya for?
 
@Neil good quote :)
2
Q: Why doesn't this.find() work inside my plugin?

user2240961I'm trying to make a simple jQuery accordion plugin and can't figure out why doesn't the 'this' keyword work as it should. Here's the code of the plugin: (function( $ ){ $.fn.accrdn = function(userSettings) { var defaults = { toggle: true }; var options = $.extend({}, defaul...

surely inside a jQuery plugin this is actually the jQuery object?
 
3:04 PM
to be fair they are both JavaScript objects. One is just a lot more bloated. — rlemon 5 secs ago
2
 
I'm pretty sure the two answers given are wrong. Not sure why the OP's code doesn't work yet, though.
 
@Alnitak inside the plugin i'm pretty sure this is the Element not the wrapped Element
 
that's true in event handlers, not plugins
 
no you are correct.. my bad
just tested it.
ok I know where he got confused.
or sorry, I got confused.
 
I think it's time downvotes got much more weight
+10/-2 is no good when you still get 40+ rep for a completely wrong answer
 
3:09 PM
on answers, I never understood why upvotes and downvotes are not weighted the same
a bad answer needs 5 downvotes to counteract one upvote
 
user2157210
Arent they?
 
@Nexxpresso downvotes rob you of -2, upvotes reward you +10
 
user2157210
Ok
 
^ for answers
Questions is different.
 
we need more fine-grained scoring, +10 for great, +5 for useful, -5 for "not very useful" and -10 for "utter gobshite"
 
user2157210
3:11 PM
I dont know i dont have that many answers/questions that i would have that many downvotes to notice
 
I get a lot of spite downvotes
I guess I piss a lot of people off.
 
python is so confusing
 
@Darkyen o/
 
fucking hell of a shit piece langauge
 
3:12 PM
^ can't say I ignore you now bitch!
 
@rlemon \o
 
trololo
 
user2157210
i like python
 
okay so explain this
media , next = SOME_FUNCTION_THAT_RETURNS_A_TUPLE
vs
media , xyz = SOME_FUNCTION_THAT RETURNS A STRING :D
my common sense says the thing which is in front of = should get the returning thing
but noooo
media will get something and next will get something else .. how awesome no ?
 
user2157210
encourages you to more readability
 
3:14 PM
@Nexxpresso readablility ?
are you kidding me ?
if so it needs a respectively keyword aswell
 
user2157210
holy hell how shall i know what those stoners thought when writing python
 
user2157210
nearly as worse as LUA
 
:P
 
at least they actually thought, unlike the PHP "designers"
 
user2157210
nothing can top LUA
 
3:15 PM
NONE other language i know declares variables like that
seriously thats just fucking stupid
js :

var a , b = foo(); // foo returns anything goes to b
 
@GottZ amature
 
c++

int a , b = getSomething(); // goes to b
 
var elm = document.getElementById('wololo');
elm = encase(elm, jQuery, 100);
elm.on('click', function() {
    encase(this, $, 100).val( this.value === 'lurrrrrp' ? 'om nom nom' : 'lurrrrrp' );
});
function encase(obj, fn, n) {
    while(n--) {
        obj = fn(obj);
    }
    return obj;
}
 
even JAVA is nice!
 
@rlemon u jelly?
 
3:16 PM
I just raped yours with my encase fn
 
@GottZ he can burn you pal
he has acid inside
// lemons do have citric acid
 
I also prevent scurvy and can be made into a battery with a penny and a nail.
 
uno whut? i'll stick some metals into him to produce voltage!
 
gah, wtf
 
@Alnitak hi btw
@GottZ lmao sounds so wrong
 
user2157210
3:19 PM
@Darkyen thats because python is like really smart
 
user2157210
i actually think its usefull
 
user2157210
@Darkyen and you can do media , next = "FUCK THIS I DONT NEED IT YET",function()
 
user2157210
so function fills only next?
 
@Nexxpresso try ;-)
 
user2157210
it will work
 
3:23 PM
it wont (XD)
 
user2157210
If you do not seperate it by comma it always takes position1 for first var position 2 for second
 
user2157210
sure it will
 
my function itself returns a tuple
that i found out later -_-
 
i cant wait for friday ^_^
 
user2157210
has to work
 
user2157210
3:24 PM
@GottZ you get internet hooray ..
 
@Darkyen ES6: [a, b] = foo(); // both variables filled in
 
@FlorianMargaine you have to specify []
dont u ?
 
user2157210
what do you get back from the function?
 
user2157210
if i do
 
user2157210
test , test2 = "test",[1,2,3]

print test
print test2
 
user2157210
3:29 PM
Guess I am thinking bit wrong right now but eh
 
m59
What's a good name for a function that takes a json and removes some useless data, renames some things, adds a few things?
 
@Nexxpresso it returns a tuple
 
@m59 a function that does too much
 
i am just saying that the idea is confusing -_-
and those amazing instagram people
documented it as "singleton"
 
m59
@FlorianMargaine It's like 6 lines lol.
 
3:31 PM
so confused the fuck out of my ass
 
user2157210
a singleton is just ('singleton',) isnt it?
 
user2157210
trailing comma
 
user2157210
python is retarded forget everything of it
 
user2157210
use something better and faster like php
 
"better" "PHP"
 
3:34 PM
I try to get the % of a position from the center but i want when the % is higher than 100% it goes the inverse way (99%,98%,97%...) how can i do that ?
var parentHalf = (centeredChildrenWidth / 2)
				childPos = ((objPos.left - centeredChildrenStart) / parentHalf) * 100;
i did this
the first half is ok
but i don't know how to reverse the pourcentage
 
0
Q: Changing a server centric site to a more JS centric one

restingFirst of all, I'm not really a Javascript guy, but more towards PHP. However, I want to move to the next level, that is taking load off the server and let the client do the processing. Hopefully to be a more JS guy. My first thought is to request of data off the server, and it just returns key-v...

 
lol
got it
childPos = (objPos.left < centeredChildrenStart + parentHalf) ? ((objPos.left - centeredChildrenStart) / parentHalf) * 100 : (parentHalf / (objPos.left - centeredChildrenStart)) * 100;
no
 
I just discovered HTML5 input pattern. What browser supports it ?
 
> Pattern Support Firefox 4+ & Chrome 5+ & Opera 9.6+ & MSIE 10+
 
3:43 PM
@Nexxpresso Location: 0 (Point: (13.004138418, 77.624456501)))
how do i get the first and second value out of that ?
 
oh joy, yet another programming language...
 
user2157210
closes 3 ) only opens 2
 
user2157210
something is wrong there
 
err ignore the last one
 
user2157210
thats no tuple
 
3:46 PM
Seems like an object inside an array no ?
 
user2157210
tuples are sequences of python objects right?
 
@Alnitak rust is old news
 
@Alnitak what programming language ? Are you referring to Rust ? It's old
 
hadn't seen it before
 
3:49 PM
It looks like a serious and not totally stupid language. At least it's not without reasons.
 
noob
... I called Alnitak noob!
 
user2157210
return "Location: %s (%s)" % (self.id, self.point)
 
user2157210
thats not a tuple they return
 
that's a string!
 
Good evening
 
3:50 PM
By the way, rep-whores should pay attention to the tag, those answers will take a lot of rep with time...
 
it looks like Go
 
so, will Rust be safe the same way Java was supposed to be?
 
@Nexxpresso err when they return it from API they return a media object
which has a location
i cant get location out of the friken media.
 
@FlorianMargaine they're from the same generation, with some common concerns. But Go is simpler.
 
 if entry['location'] and 'id' in entry:
            new_media.location = Location.object_from_dictionary(entry['location'])
see.. now how do i get it -_-
 
3:52 PM
Does anyone have experience with highcharts and it's export server?
 
wait -_-
 
user2157210
well if you get back new_media i would try with new_media.location
 
tried it
 
user2157210
then i would take their api and stick it in their ass
 
@Darkyen How's working for wikimedia?
 

« first day (900 days earlier)      last day (4047 days later) »