« first day (1360 days earlier)      last day (3597 days later) » 

12:08 AM
Guys, this earth is like 2014 years old. Wow, like, pray to the president.
They gave us freedom
think about it all the time in your life.
I have a psychological question. I figured out most English Speaking people tend to refer to the country as "US" instead of one followed by one more letter 'A', which is "USA" in their speech. Is there any reasons behind this?
 
Yes
 
A is the first letter of the alphabet
 
Do you feel massive patriotism when you say the full name of your country?
Guys, I discovered TA (one of a well-known Aussie slang) means "Thank (you) Always" this morning.
If A is the first letter of the alphabet, what would be the 0th letter?
 
12:39 AM
Z
It loops around
 
oh
0 1  2  3   4  5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Z A  B  C  D  E F G H I  J   K   L  M   N  O  P   Q  R  S   T  U   V  W  X  Y   Z
A B  C  D  E  F G
Your logic is wrong.
Number systems ain't play no games.
 
Everything you say is wrong
 
@copy - I wouldn't go so far as to say "wrong", more like rubbish or nonsense really!
 
Yo, why do you hate me?
 
We don't hate you
We just don't like you to be in this room
 
12:45 AM
Come on, don't be a person like this one, mate.
 
Guys, anyone available to help with SO experiment?
I was just told that it is trivial to restore the original intentions (task) just having the given piece of code: pastebin.com/fHV0HLix
So could any of you tell quickly what task these 10 lines of code solve?
 
Purpose of the code is to increment value of a variable called j (lower-cased letter) and it's an unsigned integer. I'd look at it as trivial since it's written in Javascript instead of more advanced and complex language such as Erlang.
 
It prints the first 3 elements from a list. If the list had more than 3 elements, j is 0, otherwise it is equal to the number of items in the list
 
Thanks
And now curious - pastebin.com/5kuMY6Uq
what would you say about this one?
 
in node.js under windows, is there a way to make path to produce result with forward slash instead of backslash?
using less.js, I have to replace the slashes everywhere because path tend to normalize it, even if I explicitly call path.sep='/'
 
1:00 AM
The code is posted on a website called pastebin.com in order for people to publicly view it and give feedback about it. There is a usage of "filter" function within the code and it looks nastier than Erlang approach of doing it, which can be simple as following instance:
 [ X || <<X>> <= <<1,2,3,4,5>>, X rem 2 == 0].
 
@EnglishMaster btw clojure >> erlang
 
Clojure shift right Erlang
 
Yeah, you could say that but you must capitalise the first letters of those names first though.
 
Shit I'm tired
 
1:04 AM
@EnglishMaster keeping in mind English is a second language for me - I could live with fact that I'm not using it 100% correctly
 
Well, what is the 0th letter of the alphabet in your first language?
In English it's Z, because it loops, yo.
 
If so - it's probably "Я" then.
 
@Crow Or, you know, don't.
 
0
Q: Denormalizing path separator in Node.js under Windows

AnnieIn Windows, path module of Node.js produces all paths with backslash. It seems like it calls its own normalize() function when other functions (like resolve()) are called. Is there a way to de-normalize the paths (with forward slash), without explicit replacement all over the place? I tried set...

 
@monners don't what?
 
1:07 AM
Then what's the first letter that comes after loop has been looped once?
 
@EnglishMaster I'll better have a lunch.
Does it count as an answer?
 
@Crow Never mind. Forgot to refresh my browser :P
 
all them upvotes. Such CSS Learning
!!doge css
 
    wow
very css
 
@Crow Don't accidentally a whole bottle of coca-cola. It's dangerous
 
1:08 AM
You better run now because your brain might explode due to too much mathematical pressure you get from questions like above.
 
@EnglishMaster Brains? You guys have those to?!?
 
Yeah, why do you ask?
By the way, I joined Marine Corps and I think I'm probably going to get kicked out due to aggravated assault I have caused on a senior Marine because I got mad.
He said "Hey why don't you phuck off to Australia?" and hit my chest so I hit him back and kicked his butt. I left bruise on areas of his body I've punched him and he took pictures of them and reported to an administrator/officer
So they were considering to send me to a jail for a couple of weeks but I hit someone with higher ranking than me so they'll probably kick me out
I'm lucky because I'll be free again
 
@EnglishMaster Well, you can always fuck off down here to Australia :P
 
Good morning.
 
o/
 
1:26 AM
By the way, I evacuated to a hospital by making an excuse that I have a sleep disorder. Hospital is better than being in a jail though.
 
1:44 AM
@EnglishMaster wow thats quite sad.
where are you from?
 
I'm spiritually Australian but exteriorly Korean.
 
ah
 
You know, they can forgive me once because I had no idea about how serious it is to hit your superior in military due to "cultural differences".
Or simply send me to a hospital (like I am treated right now) and get psychologically diagnosed and find out why I ended up hitting my superior (while I was out of mind).
 
what's that thing called where, when you scroll, it moves whole pages instead of a steady distance?
 
I don't know, perhaps it is called "scroll, and it moves whole pages instead of a steady distance".
 
2:09 AM
I like one their saying which is "Once a Marine, Always a Marine". It sounds like even though I am "forcefully" getting kicked out, I am still honourably a Marine.
 
2:29 AM
Guys, I just bought a corn-icecream and threw away the whole thing after eating the top part where it has chocolate toppings and pointy end part of it with little ice cream and concentrated shell. Some granny was staring at me when I was throwing away the ice cream. Do you think I'm "normal"?
 
3:14 AM
I think you are as normal as someone who is korean can get
which is pretty weird
 
Well, I guess I'm normal and weird at the same time. Which makes me "regular" guy because being a regular guy is in between being a normal and weird guy.
 
3:34 AM
anyone good with for loops?
 
Hey guys! Have anyone got problem by adding the `-webkit-touch-callout: none;`
` -webkit-user-select: none;` ?
I'm trying to prevent the sound that android makes when touching the screen
I'm on Galaxy S2 with Android 4.1 by the way
 
ain't that css?
 
Well I was using the e.prevenDefault() but the modern answer is using that css snippet. Which is not working
only in canvas element
works
I'm just wondering if anyone has a solution for this, and I guess it should be Javascript
 
@Matthew I ain't play no games with loops
What do you need to do in loops?
 
3:51 AM
@EnglishMaster Okay so I have this here jsfiddle.net/W8YVx/1
 
stupid question, but is there a way to clear html5 local storage using php? Like deleting it as a cookie? I want local storage to be destroyed upon user logging out but can't find that info for the life of me.
Something along the lines, upon clicking logout, the php code runs, destroys the cookies, and local storage along with it, then the page loads.
 
@Matthew why would you need a loop for that
why would you do that in general
 
@Matthew I don't understand this loop situation going on
sorry
 
@Mosho I need to figure out how to position these images cl.ly/image/3p463J3w0M1y
 
BTW, this is a photo of British Royal Army (British Marines) taken while marching to some place to save queen and bring back their "tea".
 
3:54 AM
@Matthew You'll need to explain further, I don't understand...
 
They look so strong on their horses though
 
If you just wanted to inverse the numbers being printed, then jsfiddle.net/W8YVx/1, but I still don't understand what you're doing.
 
I need a for-loop to return the first two digits followed by a set of three. For example; consider the following:

1,2,3,4,5,6,7,8,9,10

skip 1,2,3
return 4,5
skip 6,7,8
return 9,10
 
 for (var i = 3; i < numbers.length; i+=5) {
    p.innerHTML += numbers[i] + "" + numbers[i+1]
}
 
Lol what a weird loop, interesting to see it though.
 
4:02 AM
@Jeremy Thanks, man!
 
@Matthew Yep
 
@Matthew how about function(){return [4,5,9,10]}
 
lol Mosho
 
@Darius Yeah, it's weird. But it's the only way I can think of to target these images, change the class attr, and position them like so: http://cl.ly/image/3p463J3w0M1y

The pattern 1,2,3 is 33% width
and 4,5 is 50% width
@Mosho Haha, no that won't work. I'm working with images, and the numbers are not finite
 
Why not hardcode it or set the classnames and etc while running a for loop while rendering it?
ehh, your choice. I don't know the exact details of why go a certain way
biggest nightmare for you would be if they add more photos eh?
 
4:07 AM
@Darius Not if he uses the loop...
 
 
@Darius As for hardcoding, that wouldn't work because the images are uploaded via PHP, and I can't change the classes every time an image is uploaded! Also, I don't follow the second part about rendering haha
 
@Matthew show the rest of the code
I guarantee there is a better way
 
  @Mosho I think I've seen that code as an exercise...
 
@Mosho I haven't started coding yet haha. But I definitely need to use a for-loop to lay out those images
 
4:09 AM
You could use nth-child also
 
lay out how
 
so all images, just that layout?
 
There's a pattern:

1,2,3 = 33% width
4,5 = 50% width
6,7,8 = 33% width
9,10 = 50% width
@Mosho Yes
 
That's what nth-child is for...
Give me a sec
 
4:11 AM
@Jeremy LOL im an idiot.... forgot about that
@Jeremy but I can't say nth-child(3) for example, because there can be an infinite amount of pictures
 
Just wait
 
element:nth-child(5n + 4) { style properties }
element:nth-child(5n + 5) { style properties }
 
I should probably read this huh lol css-tricks.com/how-nth-child-works
 
@Jeremy Gracias
 
4:17 AM
Yep
 
Hola alguien me puede ayudar con mi codigo?
 
@user3062745 Si
 
@Matthew lo había preguntado antes, pero tengo problemas usando `-webkit-touch-callout: none;`
` -webkit-user-select: none;`
solo me funcionan en canvas y no en span
 
Why'd you switch to spanish @user3062745?
 
@user3062745 lo siento. no se ese
tambien no hablo espanol bien... soy americano
 
4:24 AM
@Matthew Ok, gracias por la intención.
 
@user3062745 de nada
 
No hay problema, si quieres practicar chateamos
 
jajaja bien
 
@Jeremy just to make it different
 
please use english in the chat
 
4:31 AM
By the way, I've done this training last time
It was phucking scary though.
 
did skydiving once, most boring shit ever
 
If you wanted to select every fifth element, what would nth-child be? I don't understand it that well
 
Once gate to outside gets opened, you can immediately see how far you are up above sky
and it's scary as shit
you are lined up in a row with ur peers and they just get sucked into air one by one
and when it's ur turn you are like "PLZ PLZ MY PARACHUTE MUST OPEN PROPERLY"
Then you can only hear air blowing
 
@Mosho
No problem
 
@EnglishMaster for me, I was sitting at the opening with feet dangling outside
didn't feel anything
then you go down, 5 seconds of wind
and then boredom for 15 mins
 
4:40 AM
For me, I had full armament, primary / secondary parachute (all together 30 kg) and a Field Radio(15 kg) on my back when I jumped
and a rifle too
 
I had a 75kg person on my back
 
And before you go up in sky, you do this hardcore Pre-Training (short for PT) so you are tired as hell before you jump
 
@Matthew :nth-of-type(5n)
 
guys for the record, my issue was by using even jQuery or jQuery Mobile
 
@Matthew It's simple algebra, really.
The argument is a linear expression. f(n) = xn + b, where f(n) is every element you want to be selected.
So if you wanted every 3rd element, you'd do 3n. If you wanted every 3rd element, beginning with the second, you'd do 3n + 2.
 
4:58 AM
@Mosho, you in Israel?
 
הייתי שם לפני כמה שבועות
 
Oh, Mosho is coming to work with me - some of the guys at work are going out to lunch and I wanted to invite him :)
Also, English
 
Oh cool
 
@BenjaminGruenbaum nah, will be back late in august
appreciate the thought though :D
 
5:32 AM
Would you ask your crush if she has a boyfriend?
 
how can you have a crush on someone you don't know enough to know whether she has a boyfriend
 
G'day
nvm, I don't know.
I think my family is currently bankrupted though
 
0
Q: treeview select only one parent node

Dhanush Balain my treeview I have many parents and children nodes, When a parent node get selected after it should expand and other parent nodes should be disabled . My jquery is $('.treecheck').on('click', function() { $('.hitarea').next('input').prop('checked', false); }); html is <ul class="tre...

 
@Mosho interwebz?
 
5:57 AM
@monners not a real crush
I know how you feel about justin bieber, but it's not real
 
Not real? You could power Manhattan on this contempt!
 
6:27 AM
@Mosho no free food for you then :D
 
var = somePromise.then(something);
console.log(var);
var is available with the somePromise's resolved value in the console.log, right?
 
var isn't a valid variable name
 
It's a keyword
It can be an object property, but not a standalone reference identifier
 
Yeah, I mean var something and console.log(something)
 
if you use a valid name, then it will be a promise that resolves when something resolves
 
6:41 AM
@JanDvorak Wait, something isn't necessarily a promise that resolved
something is the fullfillment handler, is it not?
 
Can you show us the actual code, with the correct var assignment?
It's rather unclear imo right now
 
something is. What then returns is a new promise
 
@BenjaminGruenbaum I'm looking at your code
 
var promise = someOtherPromise.then(someHandler);
console.log(promise); // [Object promise]
promise.then(function(value){
    console.log(value); // shows the value
});
Also, what code?
 
var publishers = fs.readFileAsync('/home/madaranlyv/nodejs/loader_creator/desktop_history.txt').
                   then(function(res){...
var allData = publishers.map(function(name){ ....
Was I mistaken to think that publishers in the third line is an array of strings?
 
6:44 AM
Yes, it's a promise over an array, and mapping it will map each element in the array
Although, you're using node right?
 
Yes, that's node.
 
linkies to code again?
 
@BenjaminGruenbaum Generators is a concept I haven't even begun to learn yet. I'd rather not use it in my code for now
 
doing yield will simply make your promise look synchronous
var p = Promise.delay(1000); // p is a promise that will resolve after 1000 ms
var d = yield Promise.delay(1000); // will actually wait 1000 ms before executing next line
 
How is that different from just using sync operations?
 
6:50 AM
To the user - it's not, but it's still asynchronous in the background
So you get to code asynchronous code in the same way you code synchronous code
That code wouldn't work without pre-compilation anyway because of arrows and destructuring, just a taste of ES6 though :D
 
7:15 AM
Should I give her a call and ask her if she hates me?
I changed cover photo of a chat app into a selfie that makes me look retarded and she commented on it "It looks like you have no neck in the photo". I have high ego so I haven't changed the coverphoto since yesterday though
 
@BenjaminGruenbaum halp, tizx not werkin!
Promise = require('bluebird');
var fs = Promise.promisifyAll(require('fs'));
var request = Promise.promisifyAll(require('request'));

var publishers = fs.readFileAsync('desktop_history.txt').
                   then(function(res){
                       return res.toString().split("\n").map(function(line){
                           if(/^([^\t]+)\t/.test(line)) {
                               return /^([^\t]+)\t/.exec(line)[1];
                           }
                       }).filter(function(e, i, arr){
 
7:32 AM
@SecondRikudo what about console.log(page)?
 
Can someone kick him ^
He's been posting nonsense for over 2 hours
 
!!mute EnglishMaster 10d
 
room mode changed to Gallery: anyone may enter, but only approved users can talk
@SecondRikudo Muted user 1065129 for 10d
 
@FlorianMargaine Yeah, that works
Which means that the problem is not on the program, that works fine :)
 
Anyways, night.
 
7:36 AM
@SecondRikudo shouldn't it be page.data anyway?
I don't know Promise.props, can't tell you for sure.
 
@FlorianMargaine Yeah it should
 
A question I'm asking :
0
Q: Is the caret on the first line of the textarea ? In the last line?

dystroyGiven a textarea with a not fixed width font, I want to know on key up if the caret (as given by element.selectionEnd) is in the first line or in the last line of the text. To avoid bad answers, here are some solutions which don't work : splitting using \n : A sentence can be broken in two l...

There should be a simple solution but I didn't find it.
 
@dystroy do you mean the cursor?
or whatever it's called
I thought caret is a ^
 
the cursor yes
Is the wording wrong ?
 
don't think it's a caret
!!define caret
 
7:43 AM
@Mosho caret A mark: ⟨ ‸ ⟩ used by writers and proof readers to indicate that something is to be inserted in the place marked by the caret.
 
they took precautions after rlemon
 
@towc ... what's that ?
 
@dystroy slide-toilet
 
yes but...
 
so that you can poop on it no prob
 
7:44 AM
Hey guys. I have a question when it come to selecting objects based on their classes and such.
 
not surprised to see it's somewhere asian
 
@towc shitty tv show ?
 
@dystroy no idea, I've just found the image
@MagnusBurton yes?
 
I'm using a cufon font to replace my text with a cufon based font. I have the following line of code; (<h1>hello<span class="mini">hello again!</span></h1>). In the css selector, what do I write to select only the text outside the span but inside the h1 tags?
I tried this but it still formats the whole h1 tag; h1:not(h1 > span.mini)
 
@dystroy That's actually a very good question
 
7:46 AM
@MagnusBurton add an id/class to the h1 tag?
it would be the easiest and probably best
if you really want the html to remain as such there are some ways
 
@dystroy Don't think it's possible with a textarea
Might be with contenteditable
And you manage the lines yourself
 
@towc I'll be having multiple h1 lines like this so an ID wouldn't help I think
 
@MagnusBurton then classes would
if those are the only h1s just target the h1 tag, as you may imagine
 
@towc so class on the h1 and then a :not on the .mini?
 
@MagnusBurton Are you trying this with CSS?
 
7:48 AM
@MagnusBurton yeah
or as I said before: overwrite the style for the span
 
If so, the only option would be to select all <h1>s, then to use a more specific rule to undo it on the span.minis inside.
 
0
Q: axis label restoring to original position after hiding series

Rahul DesaiIn my NVD3 chart here, I have shifted the X-axis label downward so as to go with the vertically aligned dates. For that I did: xTicks.select('.nv-axislabel').attr("y", 90); // line # 81 in JS Now the problem is that if I hide any of the series using the control on the top right, this X-axis l...

 
@SecondRikudo No I'm selecting them with JS (Cufon.replace('h1:not(h1 > span.mini), h2, #sidebar a'), { hover: true })
 
@SecondRikudo Yes, it doesn't seem to be possible. But I'm not 100% sure.
 
In the meantime I have another question... codepen.io/Cicada3301/pen/Eyvdj
 
7:50 AM
@Mosho, any idea buddy?
 
console.log(page.name + " succeeded!", /^(.+)/.exec(page.data)[1]);
 
why the animation delay is not being applied?
 
grandex-totalsororitymove succeeded! [object Object],/*! 1-115-122196-dor-xss-fix-4-Release 2014-07-03 */
 
@RahulDesai will look in a min
 
Why the [object Object]?
!!>/12(3)/.exec("123")[1]
 
7:51 AM
@SecondRikudo "3"
 
@Mosho thanks
 
@dystroy it seems to be called caret after all :D
 
It is a caret
Cursor is the digital representation of your mouse.
 
!!learn slideprecautions '<>http://i.imgur.com/Ze0S2gI.jpg'
 
@towc Command slideprecautions learned
 
7:52 AM
!!slideprecautions
 
perfect
 
You could've at least uploaded it to imgur though
 
what's the difference?
 
7:53 AM
Shorter? XD
 
@towc Command slideprecautions learned
 
Perfect
 
I am having issues fetching input value into a Javascript Object. Its not fetching it at all! jsfiddle.net/rdesai/vfe2B/40 line #16. What am I missing here?
 
Why would /regex/.exec(string)[1] return an object?
 
@dystroy only thing I can think of is, knowing the width of the textarea and the font size, you should have an idea about how many chars are in a line
 
8:03 AM
@Mosho It doesn't work because of variable width font and, more importantly, because of word wrapping
 
yeah...
 
user image
2
What was I thinking about... ^^
 
@dystroy We know.
 
Anyone?
It's so annoying :|
 
@SecondRikudo everything it's an object
 
8:06 AM
@towc Why does it log [object Object],real string though?
 
@SecondRikudo never regexp'd in my life
sorry
 
@SecondRikudo it should be a string
 
I mean, show me your code
 
@SecondRikudo do you have a regex + string to test on?
 
8:08 AM
smartass :P
 
@FlorianMargaine The string is coming from a request
It's very long
var allData = publishers.map(function(name){
    return Promise.props({
        name: name,
        data: request('http://cdn.taboola.com/libtrc/' + name + '/loader.js')
    });
}).map(function(page){
    console.log(/^(.+)/.exec(page.data)[1], page.name + " succeeded!");
});
 
hmm... it's strange to think about doge as someone who can manage expressions really well...
 
This is the code
Here's an example for a string
 
what's console.log(typeof page.data)?
 
@FlorianMargaine object
 
8:10 AM
@SecondRikudo maybe it's the method's way of saying "fuck that man"
 
But then I tried to change it to page.data.toString() and it still remained
(And console.log(typeof page.data.toString()) did show string)
I just want to get the first line
 
make a working fiddle
 
and?
 
It even happens with .split! WTH?
Weird-ass object that request
page.data[0].body.split('\n')[0]
 
8:17 AM
@SecondRikudo Yeah, have fun with that
Looks like a whole lot of somethin' complicated
 
It should really be simple though
I'm just requesting a page and I want to get the first line
 
@Mosho any idea about my question dude?
 
@RahulDesai didn't get around to it yet
 
ok
Guys, why is the input value not getting attached to the JS object? jsfiddle.net/rdesai/vfe2B/41
It doesnt show up.
line # 16 in JS
 
@RahulDesai Why would it?
You ask for it once in the beginning of the script, and you never ask again, even after it changes.
 
8:32 AM
ah, my bad!
 
Hmmm
So my script is working
 
@SecondRikudo page.data[0].body.toString().split('\n')?
 
Requests are being sent and I see them recieved on the server
 
imo the body is a buffer
 
@FlorianMargaine body appears to be a string
But it hardly matters (it works)
The thing is, why am I not seeing the console.log on the promises as they get fulfilled? Why do I only get the aggregated output only after everything's finished?
Promise = require('bluebird');
var fs = Promise.promisifyAll(require('fs'));
var request = Promise.promisify(require('request'));

var publishers = fs.readFileAsync('desktop_history.txt').
                   then(function(res){
                       return res.toString().split("\n").map(function(line){
                           if(/^([^\t]+)\t/.test(line)) {
                               return /^([^\t]+)\t/.exec(line)[1];
                           }
                       }).filter(function(e, i, arr){
I expected it to run (like a log) and show me when each request returns successful
 
8:38 AM
I wrote an answer :
6
Q: Is the caret on the first line of the textarea ? On the last line?

dystroyGiven a textarea with a not fixed width font, I want to know on key up if the caret (as given by element.selectionEnd) is in the first line or in the last line of the text. To avoid bad answers, here are some solutions which don't work : splitting on \n : A sentence can be broken in two line...

 
can anyone tell me why doesn't the animation delay trigger? codepen.io/Cicada3301/pen/cCGls
 
@SecondRikudo good question
 
@towc ID that starts with a number is invalid.
 
@SecondRikudo -_- really...
wow...
thx...
 
@towc First thing to do with HTML/CSS problems, validate your markup/css :)
 
8:47 AM
Howdy
 

« first day (1360 days earlier)      last day (3597 days later) »