« first day (1621 days earlier)      last day (3326 days later) » 

m59
6:10 AM
@Mr_Green I'm not sure why you're running brfs directly
 
I made it global as suggested by substack in the answer
 
m59
watchify the-file.js -o bundle.js -t brfs
^ that sounds like what you want
Ohhh
you don't want the extra stuff.
 
this is working but generating some prelude code..
yeah
 
m59
then you'll just roll your own watch. It won't be as efficient as watchify though
I mean, don't write your own, but just use whatever watch you want
 
but actually I am looking for a slightly different approach now.
please check the above question
 
m59
6:14 AM
watch **/*.html "brfs main.js > bundle.js"
 
I am getting error
> watch is not recognized as internal or external command
I am on basic level in this.. no idea at all
 
m59
I meant you need to choose how you want to watch the files
 
ohh ok
 
m59
what OS?
 
Windows 8
 
m59
6:17 AM
:/
 
I know it would have been easy if I was on Linux
heard from many devs
 
m59
I like this, but it doesn't have a cli github.com/shama/gaze
I suggest making a gulp task
 
ok will check gulp
 
m59
gulp.task('my-task', function() {
  brfs('main.js').pipe(fs.createWriteStream('bundle.js'));
});
oops
 
what happen?
 
m59
6:25 AM
gulp.task('my-task', function() {
  gulp.watch('**/*.html', function() {
    brfs('main.js').pipe(fs.createWriteStream('bundle.js'));
  });
});
 
ohh thanks :)
 
m59
something like that should do it. I'm quite tired. Night all!
 
good night
 
m59
I might post an answer and clean up your question in the morning, ping me if it works (or doesn't)
peace
 
sure.. still checking
 
6:46 AM
Morning
 
@m59 After many tries and failure.. I modified your code to this which still isn't working but looks close to me.
var gulp = require('gulp');
var fs = require('fs');

gulp.task('default', function() {
	gulp.src('main.js').pipe(fs.createWriteStream('bundle.js'));
});

gulp.task('watch', function(){
	gulp.watch('app/templates/*.html', ['default']);
});
 
@Cerbrus hi bestie
 
@BadgerCat o/
 
hi @SecondRikudo
 
@Mr_Green what are you trying to do?
 
6:54 AM
trying to watch changes in html files (I can do this if I solve the below need)
and output main.js file to bundle.js
 
@SecondRikudo I am not trying to do that.. check this question.. stackoverflow.com/q/29248116/1577396
 
7:14 AM
Too soon! You have awakened me too soon, @BadgerCat! What is the meaning of this intrusion!?
 
@Cerbrus I will be flying back to Europe this Sunday, so now you can visit me.
 
Europe is... Big
 
Mr_Green, how about this, npmjs.com/package/gulp-shell
you can do something like `gulp.task('default', shell.task(['brfs main.js > bundle.js']);
 
@Cerbrus Yeah, I will have to come visit you
 
@mido22 awesome
you are the life saver :D
working perfectly fine
 
7:24 AM
Hm, I dunno...
I can hardly expect my parent to be okay with a random person from a completely different country to visit...
 
7:39 AM
@Mr_Green you are welcome mate, I do something similar in grunt...
 
ohh nice
@mido22 you on twitter?
 
@Mr_Green yup, username: ban.mido22, but I barely post anything, how about you?
 
ohh even I post less @feedmeaddiction
 
8:24 AM
@Jhawins I'm not sure which ones you're referring to...
 
8:42 AM
@JonSkeet thanks for fixing your answer and clarifying, I feel that while types that are not erased would allow for easier implementation of run-time type checking here the crux of the issue is indeed the design of Java generics for backwards compatibility. — Benjamin Gruenbaum just now
^^
 
these c# & java guys earn lot of rep by giving a single answer :/
 
@Mr_Green Please tell me you know Jon Skeet.
 
Yeah, I know him
 
Jon Skeet, Reading, United Kingdom
763k 336 5134 6412
 
not personally but just through the rep he got
 
8:47 AM
they fixed his css bug, apparently
 
and his famous book about some nutshell
hehe
 
@Mr_Green Meanwhile, this remains (I think) the most upvoted answer on SO, stackoverflow.com/questions/14994391/…, I think it's more random than related to specific tags
And from what I can tell, from the top 3 voted questions, two are about git
But yes, tags that have more followers will attract more votes due to more exposure, and it tend to be a bit of a feedback cycle to it as well
 
woah that guy got around 66k points by only answering once
 
@Mr_Green This guy is pushing close to 100k from a single question, stackoverflow.com/questions/11227809/…, but those are outliers
 
with that question he could only make around 45k
because each upvote to question gives +5
 
8:58 AM
oh right, it's +5 for questions
my bad
I dont ask questions that often :)
 
hehe
 
mystical has 3 answers with >1000 votes... one has 14000 votes.
 
I ask alot
some answers with high votes are silly
wish I could have checked it before some one could :P
 
Yeah, but they're also often very old, and have had years of google exposure
 
closed
 
tool'd
 
9:48 AM
mornings
I need your help deleting two questions please
tnx
 
Why delv?
 
Because they are highly subjective questions which do more harm than good (considering the answers)
 
Lemme consider the answers... delv'd
 
\o/
 
@PeeHaa Downvote all answers too to reduce number of votes needed.
 
9:54 AM
@SecondRikudo Oh I thought I only had to downvote the question
To the downvote mobile!
 
@PeeHaa (sum of all answers + question) / 20 IIRC
 
kk tnx
 
\o/
 
(I hesitated for a long time)
 
10:01 AM
@dystroy As usual do whatever you want. (I am glad you decided for deletion though) :)
 
Hi guys, can you help me please with learning the map thing?
I'm doing something wrong
 
What have you tried, what do you expect, what do you want, etc. ;-)
 
you missed question marks :)
 
I'm trying to run on all the .winner class
and get the value / text of this class
I didn't miss a question mark because I know I'm doing something wrong : )
it make sense to do it with map, right?
 
$.map($sth) maps over DOM nodes. You want $(obj).text()
... or revive xPath :-D
 
10:08 AM
very nice
 
also, learn to use <th>
 
I have tried before $(this).text() , I didn't think to do it like you said
Thanks
I know th
Just learning now JS
 
Not sure what this is inside $.map
 
that's was my next question, but thanks anyway
 
@JanDvorak $.map is not part of jquery
 
10:09 AM
really useful
it is
arr.map isn't
 
!!jquery jquery.map
 
haha : )
 
ah, right, confused with reduce, my bad
 
Thanks all, I'll be back for more!
 
10:41 AM
guys guys, I found this question and I am kinda curious stackoverflow.com/questions/29243870/…
 
11:07 AM
Canary now renders console.log messages centered O__o
Ah, it's related to showing timestamps
 
@OliverSalzburg Doesn't for me
 
@OliverSalzburg lol. Nope luckely doesnt have that build yet
 
@PeeHaa You have to enable timestamps from what I can tell
 
11:23 AM
I just initiated a local repo. Instead of cloning the remote one, is there a way to hook up my existing one to the remote and start pushing?
 
Yes.
 
I'm using smartgit
 
No idea about smartgit, sorry
 
How do you do it in Bash?
 
I'd start by looking at git help branch
There's also a way to set up an alias for a remote, but I don't remember the command. Branch config will gladly accept an URL, though
 
11:28 AM
@StevensHaen git remote add origin git@github.com...
 
It's well described here
4
Q: Can anyone tell me how to create a REMOTE branch using smartgit?

SomedeveloperCan anyone tell me how to create a REMOTE branch using smartgit?

I' sorry for asking before researching
 
12:16 PM
 
12:29 PM
Hey, anyone has a suggestion for a npm package that allows me to add a new element into an existing XML document at some specified path (e.g. using xpath or something)?
 
@poke cheerio
 
@poke jquery :P
 
@PeeHaa No jQuery in iojs.
@BoltClock Well done :D
 
oh it wouldn't have surprised me if they had some stripped down version for that
I always thought it was great and does all the things
 
@PeeHaa Cheerio.
 
12:35 PM
oh lol it is just that :P
 
I'm pretty sure there is a server-side version of jQuery
 
@SecondRikudo 2.1+ works with node/iojs
 
@PeeHaa I can’t believe you even suggested that.
 
And yes, it’s for iojs, so I don’t need browser stuff
 
12:35 PM
> A lot of users misunderstand the goal of Stack Overflow. Stack Overflow isn't there to help you. It's there to create a valuable Q&A
this.
 
I am not sure if that package will be good enough for all your requirements though
 
I’m just going to try it out.
 
> it is great and does all the things!!!!
:P
 
has no file opening and saving though, meh.
@PeeHaa yeah… right…
;P
 
@poke cheerio
It's jQuery for the server
 
Seriously, it'd what I'd do.
If you actually do want a DOM manipulation library jQuery still is pretty much the best at that - not joking.
 
Oh. cheerio is a package. I was thinking you were saying hello to me or something xD
6
 
Brilliant.
 
I don’t care about DOM and HTML though. It’s a real XML file (with namespaces actually).
 
@poke DOM is originally meant for XML.
 
12:39 PM
Yeah, I know :P
 
So you do want DOM... if you have an XML file, and you want to parse it...
 
I'm using socket.io but when I run it I cant access other files in the system such as css files. If I open up my html page in the browser on its own it can find the other files. Any idea what I could be missing?
 
@user2248441 are you trying to serve static files with socket.io?
 
as in main.css from a subfolder? yes
 
12:41 PM
yea don't do that - let nginx or w/e serve the static files for you. it is better at it
 
@SecondRikudo I’m actually considering to apply a simple XSLT :p
 
@rlemon So how do i reference the css file for index.html?
currently it is in my HEAD tag as:
<link rel="stylesheet" href="/src/main.css" />
 
you set up the server to serve the static contents and request them normally
 
do you have a link to a tutorial other than the standard chat app on the main socket.io website?
 
@poke :P
 
12:44 PM
@user2248441 socket.io isn't a server. it is for communication
 
!!tell user google nginx tutorial
 
I imagine you want nginx > node > socket.io
 
morning javascript friends
 
nginx serves static files, or node. socket.io serves websockets.
 
12:45 PM
Ok thanks for the help, I'll start reading
 
6
Q: What's the simplest way to serve static files using node.js?

ViclibI'm using a rather ugly approach: var app = require('express')(), server = require('http').createServer(app), fs = require('fs'); server.listen(80); path = "/Users/my/path/"; var served_files = {}; ["myfile1.html","myfile2.html","myfile3.html"].forEach(function(file){ served_files[...

 
so, I think my publications in meteor are getting too complex... am I doing them wrong?
 
Probably?
 
@poke:hi
 
@karan 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.
 
12:48 PM
var customer = Customer.findOne({ _id: customerId });
var allProducts = _.flatten(
  Orders.find({ _id: { $in: customer.orderIds } }).map(function(doc) {
    return doc.productIds;
  })
);

return [
  Customer.find({ _id: customerId }),
  Orders.find({ _id: { $in: customer.orderIds } }),
  Products.find({ _id: { $in: allProducts }}),
];
 
@CapricaSix:okay
 
Do you people have a event and target normalization snippet for me? My google fu currently only gives me crap for some reason
 
@PeeHaa event and target normalization?
 
e = e || window.e
Or whatever browsers do
 
@PeeHaa What kind of differences are you seeing between browsers?
 
12:52 PM
e = e || window.event; for really, really, realllllyyy old IE support
 
I know old IEs (8??) do wonky things
@RoelvanUden What's old?
 
@PeeHaa IE10
:P
 
@SecondRikudo ermarghagd
 
@PeeHaa IE7 and below. IE8 should respect events normally.
 
Kidding
 
12:53 PM
:P
 
Well, maybe not, since IE9 is ECMA5 and IE8 is ECMA3-ala-MS
 
@RoelvanUden If you also have a target normalization snippet for me? <3
 
@PeeHaa Nope :-(
 
e.target = e.srcElement || e.currentTarget;
Makes sense?
 
Yeah, that should be fine. :-)
 
12:56 PM
ty
<3
 
Hi
Wow this room got so serious with meetings and everything.
 
@rlemon Thanks for the help earlier, I managed to get it working now. you da real mvp
 
Meh. My original XML has a BOM, so after saving the changed one with cheerio, I end up with a &#xFEFF; at the beginning…
 
@poke Throw your texteditor out of the window :)
 
1:11 PM
@PeeHaa It’s a generated file.
 
I have a (php :( ) codebase and there is a <meta name='google-site-verification' tag in my output and I have no idea what is adding it or where.
How the heck do I find what's adding the header? I grepd the whole directory and I couldn't find it.
 
Isn't that a tag you manually add once when you register a site for online audit or stats ?
 
@BenjaminGruenbaum What's generating the things around it?
 
@BenjaminGruenbaum Open up your texteditor of choice and "find in files"
@BenjaminGruenbaum huh?
 
@PeeHaa nothing.
 
1:13 PM
@PeeHaa He already grepd
 
In that case it comes out of the db
 
@BenjaminGruenbaum in the browser dev tools, ctrl + shift + f, search "google-site-verification"
 
Also you are gerpping wrong :P
 
maybe it's in some script
 
@FlorianMargaine no script is adding it, and I already grepped t he whole directory.
 
1:14 PM
what ar ethe 3 param
what are the 3 parameters that this takes addEventListenter("load",init, false);
 
@BenjaminGruenbaum by "search in the dev tools", I mean that maybe an external script is adding it
so it wouldn't be in your sources
 
@lovetolearn event, function, capture
 
!!tell lovetolearn mdn addeventlistener
 
@Benjamin Did you try grepping parts of it? E.g. verification
 
1:16 PM
@BenjaminGruenbaum you have to write a distributed map reduce fucntion in Erlang
2
 
@BenjaminGruenbaum It's not coming from a browser extension is it?
 
Is there a clever way of seeing how many/which files are have a stylesheet imported? Also, is there a way I can turn a folder structure into a "tree"?
 
@StevensHaen Not clever but works : grep
 
sorry, internet died
Grep is fine, not from browser extension (checked in network tab)
It's not added by script
@poke I did, no interesting results
 
@BenjaminGruenbaum Could be added by a proxy or a server extension
 
1:26 PM
yeah, cloudflare was my first suspect, I don't see why/how Apache would add it - but when I access it through the Azure DNS it still has the meta tag
 
Hi broodas and gentlemens. evenings.
 
@BenjaminGruenbaum Can you try curl from localhost for that machine?
See if it's the same locally
 
found it, thanks for the help anyone.
The code on the server was on another branch for some reason :v
 
what was it? don't leave us hanging!
duh
 
@BenjaminGruenbaum You use git for deploy?
 
1:32 PM
@SecondRikudo yeah, it's pretty nice
 
@BenjaminGruenbaum It is, although, are you using the new Git 2.3 dirty push features?
Do you push it in when it's dirty?
 
@SecondRikudo ( Í¡° ͜ʖ Í¡°)
 
I knew lenny would come
@SecondRikudo link to doc? googling "git dirty push" doesn't help
 
1:36 PM
@SecondRikudo no, I have a page that pulls on the server and it only pulls if it can fast forward
that feature looks nice though :)
 
I don't really get what the `push deploy` does.
Don't most build / deployment servers already have this as a feature?
 
@SecondRikudo ow wow. I need that
 
@PeeHaa What do you need ? The push deploy ? I also fail to see real use cases
 
Hi
 
Hi @darkyen00 May I downvote you so that your rep is prettier ?
3
(you might upvote me up to 222222, if you need a revenge)
 
1:51 PM
What is my rep ?
Ah wow
well am upvoting for you
 
161,087 now
 
Can someone tell me what "http://webcomponents.org/" is? I see three big libraries for web components polyfills (Bosonic, x-tag, and Polymer), but all three of those seem to share code in some way and then this "webcomponents.org" side then has it's OWN library even while mentioning the others--is it a combination of all 3?
 
@BenjaminGruenbaum 64,008
you have a very pretty rep atm
 
@darkyen00 ok I guess
 
1:55 PM
"1111101000001000"
 
I need a css3 non modal popup just to contain a bunch of code.. any reccomendations?
 
It read as 64k, so it reminded me of quite a few 64k things @BenjaminGruenbaum :P thats why i said pretty.
 
So, I have a file containing a lot of names of spam sites in my sql database in wordpress in the wp_options table - wtf
 
Almost 4 million characters of names of sites. Odd.
 
Hi
I have a question about desktop notifications
Are they a part of javascript, or are they added by the browser?
 
@Deep browser
 
They're browser specific.
 
@BenjaminGruenbaum do you have a link to the russian singer
with multiple girls ?
 
Pe cimpoi
 
MGE
2:14 PM
Hello, I'm not able to print via console.log an object as a string
trying alert(); it shows object objectname
 
@BenFortune This computer full of stickers reminds me of the cars 30 years ago, when stainless steel wasn't so good...
 
MGE
if I try console.log it print the object with subsections, but I want to print it as text
 
@MGE why are you not able to use console.log?
anyways
alert(JSON.stringify(object));
but that is pretty bad way to debug
 
@dystroy That's way before my time. :)
 
MGE
Uncaught TypeError: Converting circular structure to JSON
 
2:17 PM
@MGE The error is pretty clear.
 
MGE
:(
 
hint: there are libraries pruning objects when stringifying in order to avoid this error
Asking for opinion : is there better than google code prettify for prettifying random blocks of code in a miaou-like application ?
 
MGE
Im trying this: github.com/dscape/cycle
 
@dystroy cool!
 
MGE
if it doesnt work, i will try your suggestion
ty
@dystroy JSON.prune.log('some object:', item);
the same as console.log(item); the problem is converting this object to text
 
2:30 PM
Then use JSON.prune(item)
It's like JSON.stringify but it doesn't chock on cyclic properties
 
how to move a div using jquery. I have made a page which shows a preview of recent messages
http://i62.tinypic.com/2ai0bh4.png
and i've also implemented "Long polling" to check for new messages. So when new message is sent by a user already in conversation I want to move the his message at the top right corner. For that i need to move an entire div. How can i do that in jquery?
 
Oh, I always thought Top Gear was a show made for the BBC, but not actually owned by them
 
@ShubhamNishad Like, animate?
 
oh man, it's official?
 
2:33 PM
Yup.
 
Top Gear will never be the same
 
Let's hope that if they replace him, it won't become as awful as Top Gear USA
 
I refuse to acknowledge that Top Gear USA is a thing
 
@SecondRikudo, I am quite new to programming. I'm learning jquery and php as i need it. Hold on, let me read about animate
 
@ShubhamNishad animate is a concept, not necessarily an implementation
 
2:34 PM
BBC just lost their biggest cash cow, pretty sure there's plenty of people cancelling their TV license in backlash too
 
It's the concept of changing a value over time, instead of instantly.
 
@ShubhamNishad Do you actually need to move anything, though? Can't you just use $.prepend?
 
Do you want the div to move there, or just warp it there?
 
@kippie, i am using prepend for a person who is not in conversation. i mean a person whose name is not already in the page.
 
@SecondRikudo The way I see it, his long polling implementation would create a new DIV, so there's no actual movement involved I think?
 
2:35 PM
for a person who is already in the message preview page I have to update the last message preview and posting date
I can do one thing, I can remove the old preview and add a new preview using prepend. But that would give a little bit of jerk
 
So... You just want to replace the content of the div with new content, then?
 
@Kippie Depends, maybe he wants to move the div by the user to the top
 
posted on March 25, 2015 by admin

New comic! Today's News:  Adding hovertext to newer comics. Maybe I'll go back and add more to earlier stuff at some point.

 
@Kippie, yes i want to replace the content of div and also reposition the div
latest message come first in the row
and in the top row
 
Does it look like a real question or a game .?
-1
Q: Get last return value

sdenelIn nodeJS terminal, I can enter this expression and have as a return 'true': > var x = true; x; true How can I capture this return value in a variable, without changing the expression? The following is not working: > var y = (var x = true; x) SyntaxError: Unexpected token var

 
2:51 PM
@dystroy looks real
 
How can you get that in a loop ?
 
@dystroy nice :)
 
I didn't knew the one for the browser
and I'll probably use it less than twice in my life...
 
I've just tried it out, I'll probably never use it again
Can you think of a scenario where it'll come in handy?
 
This guy doesn't know how to ask, this is a mess...
This replies to the question, and I can only accept it. But my question was indeed for use in a script, not in terminal. I would be glad to find a solution useable not only in Node REPL. — sdenel 2 mins ago
 
2:59 PM
Yeah, pretty awful.
> In nodeJS terminal, I can enter this expression and have as a return 'true':
 

« first day (1621 days earlier)      last day (3326 days later) »