« first day (1187 days earlier)      last day (3760 days later) » 

user1596138
5:00 PM
@dystroy True.
 
It's OK to ask something that was asked long ago and didn't have any good enough answer but it's not OK to just link to the question instead of writing a good one explaining for example how you make it work for 2 browsers. — dystroy 9 secs ago
 
Wow this room was just frozen last week.
 
user1596138
Yeah... 1 month.
 
boss, answer please. — PaRsH 24 secs ago
 
@qwertynl fraud javascript room
 
5:01 PM
Yeah, "Code & Baguette" was frozen too
 
@nderscore haha I know, I made it, but it did seem to attract random users.
 
@qwertynl Is he kind of sarcastic or just stupid ?
 
@dystroy I think option 2, but I really hope not....
 
@dystroy sooo many tables :(
@dystroy I almost want to rewrite all the css for this.
 
@mikedidthis Well, you can if it works...
note that there's no real table, just display:table, and not so much...
 
5:04 PM
@dystroy sorry that I what I meant.
 
I know I'm not very good at css but I don't think it's easy to achieve this layout without display:table-cell
 
Correct, I am happy with that.
 
You might want to download my scss file if you want to rewrite it
 
Anyway, @RyanKinal, eat cake.
For me.
 
I'm sure I'll have cake at some point. For a birthday or something. And I'll think of you.
 
5:09 PM
Ryan has never had cake?
 
Of course I've had cake
 
Are you sure?
 
Yes
I distinctly recall several occasions where cake was eaten.
 
@dystroy yeah it maybe easier...
 
It was an illusion
 
5:10 PM
Are you saying... the cake was a lie?
 
You actually ate pie.
 
O.O
 
Is there a way for coldfusion to detect if JavaScript is enabled or not?
 
@dystroy thank you. I will recreate as flat html with dumb data and try and remain true to the current markup
 
5:14 PM
@mikedidthis Be careful that the layout is very dependent on the contents and numbers of messages in all three parts
 
@dystroy shall do.
 
You'll need both short and long messages content and usernames to test
 
When I do jQuery.post('/foo/bar', { data: blah }), am I supposed to respond with an HTTP response on the server?
 
@dystroy which I believe are all in the jsbin example
 
@ŠimeVidas but... how would it work if you don't respond ?
 
user1596138
5:15 PM
@ŠimeVidas Umm...
 
@ŠimeVidas I suppose that depends on if you want a response from the server....
 
@dystroy I just use the data on the server (that was sent in the POST reqeust
 
user1596138
Yes, the server needs to respond, or at least acknowledge the request.
 
@twiz I don't need a response, but I'm worried that not sending one is an anti-pattern or that it has perf implications
 
the body of the answer doesn't matter, but answer with a correct http header
 
5:17 PM
@Jhawins Well, I'm not sending a response (Express.js server) and it works
 
You don't want your app to know if the request was successful?
 
user1596138
@ŠimeVidas define "sending response"
 
@ŠimeVidas Are you sure you don't ?
 
user1596138
You just don't know how it works :P
 
@ŠimeVidas you don't have to handle the response, but you have to send it. Or the XHR request will be pending. And the server will keep the socket open.
 
5:18 PM
Example:
app.post('/db/deactivate', function (req, res) {
	req.body.data.forEach(function (doc) {
		db.users.update(
			{ email: doc.email },
			{ $set: { active: false } }
		);
	});
});
As you can see, I'm not sending a response
 
user1596138
Ugh...
 
user1596138
You just don't know how XHR requests work. That's the problem.
 
@Jhawins What do you mean?
 
user1596138
HTTP status codes. Your script knows the status code of that request, because the server automatically responds with it, as well as other info.
 
@Jhawins XHR request? Don't forget your PIN number for the ATM machine!
2
 
user1596138
5:20 PM
^?
 
@Jhawins I've check the Network panel in the browser. The server does not send a response.
 
user1596138
@ŠimeVidas Screenshots please.
 
@KendallFrey Ahahaha! Nice one.
 
@ŠimeVidas which means the server keeps the connection open. Do you think it's a good idea?
 
5:22 PM
@FlorianMargaine That's my question :)
I guess, not
 
@ŠimeVidas just wondering... what are you doing that you don't want to know that the request was successful?
 
user1596138
@ŠimeVidas You're right. You aren't sending a response lol. Wtf.
 
well, you're unnecessarily using resources. I'll let you guess if it's good or not :)
 
user1596138
There is absolutely no reason you can come up with to leave the connection open and avoid sending responses... Or is there?
 
@twiz I'm still building my admin interface. Haven't implemented the response part yet and I'm looking how to do it.
 
user1596138
5:23 PM
(do you have a good reason)
 
@ŠimeVidas The server has to know how to respond before it responds
 
user1596138
It's your choice, but it will waste resources as Florian said.
 
An easy implementation :
 
Even telling a server to always return invalid request error is at least something
 
res.send('ok')
 
user1596138
5:24 PM
I need to write a user script that makes qwertynl show up as Neal. This dual account thing...
 
Oh, I see. Well it wont "break" your app while you're setting it up, if that's what you wanted to know.
 
So, those are POST request that update the database, so I guess res.send('ok') is good enough.
 
@ŠimeVidas Assuming it went well, yeah
 
JSON is generally used, but technically you could
 
@ŠimeVidas res.send(201) is better
 
5:25 PM
@Neil Yes. Inside the callback of the database operation, I can send either 'ok' or the error.
 
or that
 
@ŠimeVidas Well there you go. Start with returning anything and verifying that you're even getting a response
then you can complicate it and handle errors and such
 
Yup. Work to be done.
 
@FlorianMargaine I now know what you meant by processes, I'm not that good with the technical side of node, but I was under the impression i would have had to use http to get data from the plugins, but now I'm using EventEmitter and it's wicked, thanks
 
I don't find the source of the response.send function... where is send.js ?
 
5:28 PM
You mean, in Express.js's source code?
 
Or in an imported lib maybe
but the source of response.js has a require('send.js')
 
The send method is documented here: expressjs.com/api.html#res.send
response.send is a built-in method
 
As in most of express (most nodes modules in fact) that's just an embryo of documentation. That's what I wanted the source
@ŠimeVidas What do you mean ?
 
Well, .send() is part of Express. You don't have to require it.
app.get('/foo', function (req, res) { res.send('foo'); }); // works
 
I will start WWIII
 
5:31 PM
@ŠimeVidas there's a require('send') in the source of express
 
On IE7 specifically
Because that was fucking ridiculous
 
@connorspiracist you're still sharing the same process.... so plugins can hack the main app
but well...
 
@FlorianMargaine well, it's safer.. it's a start
 
5:33 PM
it's not safer at all
but well... do whatever you want :-)
 
@dystroy "send" is listed as a dependency in package.json
 
On the bright side, SASS is pretty freaking cool
 
@dystroy I guess, this npmjs.org/package/send
 
@FlorianMargaine yeah, it is
 
5:34 PM
yes, it's this one
 
@connorspiracist no it's not, remember the stuff about require('fs')
anyway, gotta go. Cya.
 
I judge people who use capital letters in HTML tags.
#IsThatWeird
 
anyone using macbook pro 13?
whats the processor generation macbook pro 13 normal and retina currently selling in apple store?
 
it didn't tell it is 3rd or 4th generation
 
5:42 PM
if it's on that page, it's the newest version
 
normal and retina. which u recommended?
 
retina
 
@FlorianMargaine then i would do replace('require("', 'require("/app/plugins/myPlugin')
 
amazing battery life and screen resolution
 
why ?
 
5:43 PM
right?
 
LOL... easy rep :
-1
Q: js - Fire event on midnight

coderI am making a simple web app using javaScript. At one part I want an event to fire when the date changes (i.e., 4th Jan becomes 5th Jan). This is what I am doing: window.onload=function(){ var today = new Date(); var tommorow = new Date(today.getFullYear(),today.getMonth(),today.getDate()+1); v...

 
@RUJordan but the RAM and flash storage cannot be upgraded
 
You didn't specify you wanted to upgrade your hardware
 
@RUJordan You wouldn't moan if it were u
 
5:44 PM
@connorspiracist I wouldn't make an answer like that
 
i'm not from US. can I buy refurbished with student price?
 
@vzhen no idea, you'll have to contact Apple and ask
 
any exprerince with refurbished product?
 
yay.... I'm sick... it's starting to get too cold here...
 
user1596138
@dystroy lol easy -rep
 
5:47 PM
@vzhen I highly recommend them
I bought my macbook air last summer for $750 refurbished on that site and I haven't had a single issue with it yet
I love it
Best computer I've ever had
 
@Jhawins It's still +19 rep
 
It needs 10 more downvotes then. :P
 
user1596138
@vzhen I've bought 4 refurbished products from Apple personally. At work we've got 3 iMacs, a MBP and a server that were also all purchased refurbished. No regrets.
 
user1596138
Sometimes they had issues, but Apple is incredibly prompt on replacement in those cases.
 
@Jhawins the problem is i'm not from US. Not sure if I can purchase with student price (refurbished). Also Apple has no email contacting.
 
5:50 PM
@vh
 
user1596138
@vzhen Did you try?
 
@vzhen it's like a $50 discount
 
user1596138
Just get on the website and see..
 
And I don't think it's offered on refurbished computers
 
user1596138
@RUJordan He's a student. That $50 is the world haha.
 
5:51 PM
ya
anyone in US can help me to ask? they have live chat but only support US
^^
 
@connorspiracist so you won't allow a plugin to use other modules, or simply to be split in files
and someone can simply do var r = require; var fs = r('fs');
and I'm sure I can find plenty of ways to work around your hack
it's just not safe. Don't count on it.
 
@vzhen I'm working, and about to go to lunch. I can't handle customer service right now
 
That's JavaScript ? Sure ? — dystroy 8 secs ago
 
it's fine to do it your way, just don't think it's safe.
 
LOL
 
5:53 PM
@FlorianMargaine Any suggestions then?
 
I already told you.
 
you said seperate processes
 
I did
EventEmitter means you use the same process
 
right, so
@FlorianMargaine I'm using require('child_process').fork;
 
5:55 PM
cool. Which means it has to be the same user. So the plugin still has the rights to open your source code.
 
user1596138
@vzhen Just go to the website and try to use the student discount on a refurbished item.
 
@FlorianMargaine Well, i suppose I have a lot of work to do then, like completely deny the require word and create my own include
 
yeah sure
 
m59
@qwertynl Yeah, it was a bad answer. My bad. I posted a good answer and deleted it just because the OP is a douche.
 
5:57 PM
@m59 sok :-)
 
user1596138
@m59 An edit :P
 
m59
heh, I decided to be nicer =D
I did originally just say "Good, never use this site."
haha
 
@Jhawins @RUJordan I got the answer
http://store.apple.com/us/question/answers/mac/can-i-get-a-student-discount-on-a-refurbished-macbook-pro/QH2UTCFKJ9APHDC4X
 
m59
Self-entitlement gets to me. Ick.
 
I HAVE MOIRE MAGIKAL INTERNET POINTS THEREFORE IM RIGHT
5
 
5:59 PM
that's... obvious
(jk)
 

« first day (1187 days earlier)      last day (3760 days later) »