« first day (1752 days earlier)      last day (3189 days later) » 

11:00 PM
Nah, a 15yo child of the internet is a leet facebook hacker that listens to nightcore
 
@Nick that's a cool 15yo child of the internet, it's different :P
 
brb googling nightcore
 
cover your ears
 
Yeah, my ears don't like nightcore...
 
@NathanJones sped up music. If you like the original music it's awesome
 
11:03 PM
Alright javascript room, you have acknowledged the question by downvoting. Now try posting a helpful response.
 
Not sure if it was us. I never clicked on the link
 
me neither
 
It happened after I shared it here, so most likely one of you javascripters
 
that's jquery-scripter to you, sir
 
@DemCodeLines So, sometime within the last 5 hours that you've been posting it? Yes, that's such a small window of time, it must have been us.
 
11:05 PM
No, it was actually right after this post:
13 mins ago, by DemCodeLines
Obligatory hourly call for help:
Whatever, but it's annoying when people downvote but won't utter a word regarding the question or the subject matter.
 
the people of room 17 are smart. If one of us were to downvote it, he would have explained you why and told you how to get it better
 
 
I hope so.
 
Sometimes I downvote without giving an explanation because it's so bad, and I fear retaliation, because too many people get offended too easily and take it as a personal attack.
 
@Nick ew
 
11:07 PM
@BadgerCat I know... so gross
 
DId you downvote it?
 
No
I still haven't clicked on it
 
I did a console.log(req) and getting a nice list of variables that is as unhelpful as it gets.
 
@Nick are you trying to tease me or something?
 
@towc Does this honestly appeal to you?
 
11:09 PM
@Nick no, but I never know what you're up to :P
I'd appreciate the thought
why are you sending us those pics anyway?
 
Crushed crisp cake.
 
@rlemon Kirk vs Picard
 
In the interest of full disclosure, I am more familiar with the .NET stack and Java than I am with Javascript. In .NET when you want to async a long running process, you create a new thread and assign the process to it. How do you do this in Javascript?
 
@CodeWarrior you can use webworkers
 
Picard was better, but mostly because Kirk was played by a bad actor
 
11:17 PM
may i know what exactly are you trying to accomplish ?
 
and the original ST had bad CG
 
All of the examples of $q that I see have simulated async calls that use timeout.
 
@CodeWarrior may i know your use case ?
 
@Abhishrek Sure. So I have a number of calls to the server that get specific data. pastebin.com/GWBZcNRE shows this.
The copyXXXToProcessedData calls may take some time, and I need them to be async so that once everything is all done, the ProcessUserData method is called via the .then() call.
 
Well in JavaScript network calls are async by default (unless you make them sychronous)
you can pass a callback function which will be called when the operation finishes.
 
11:20 PM
quick vim question: anyone know how to replace "<!-- @echo IMAGE_SERVER_URL -->" with "/* @echo IMAGE_SERVER_URL */"? (Using vim because Atom won't open large files without crashing...)
 
There are many ways to accomplish this, currently everybody has been using promises (Q is a wrapper for promises)
 
Don't use Q :(
 
What are you using to make your network requests ?
If you are using a library most of them support promises by default
 
@NathanJones does it look exactly like that?
 
And I have those working. Each network call is executing asynchronously and calling the copyXXXToProcessedData method after it is done. But I cant figure out how to write the copy method calls in such a way that the ProcessUSerData emthod gets called at the right time.
 
11:21 PM
@Purag without quotes, but yes
 
and are those the only html comments in the file?
 
otherwise you can simply wrap a function inside a promise
 
@Abhishrek $http
 
Angular !
 
:%s/\<!--\ @echo\ IMAGE_SERVER_URL\ --\>/\/* @echo IMAGE_SERVER_URL *\//g didn't work
 
11:22 PM
Indeed
 
Oh well $http does support promises
 
I know. the network calls are fine.
 
you can do $http.get("/foo/bar/baz").then( functionYouWantToCallBack );
 
The copy method is what I am strugling with,
 
@NathanJones Don't escape <> and spaces
 
11:22 PM
One sec. I will add to the paste
 
make it a hastebin / pastebin /gist please
 
just the spaces need not be escaped
 
@copy that did the trick. ty :)
 
@Abhishrek It already is a pastebin. I have just updated it.
 
@Purag \< is word boundary
 
11:25 PM
yeah you're right, that's what I was thinking of but I remembered it wrong :|
 
@Abhishrek In my case, processUserData is being called before copyFriendRequestsToProcessedData is done running.
 
So in my code, I have this: router.post('/photos', auth, function(req, res, next) { and doing a console.log(auth) returns { [Function] unless: [Function] }. What the heck is that?
 
:%s/<!--\ @echo IMAGE_SERVER_URL -->/\/* @echo IMAGE_SERVER_URL *\//g worked
 
@CodeWarrior thats weird
 
11:26 PM
now i'm thinking that's strange because I'm still escaping the first space, but the others aren't escaped...
 
@Abhishrek In what way?
 
.all should only fire when all the promises have finished
 
@NathanJones If you escape a character that doesn't have a special meaning, it's ignored
 
Well the Copy methods are not returning promises for one thing, but I am not sure how to write those that way.
 
wow, vim is smart sometimes
 
11:28 PM
my favorite editor after sublime
 
s/vim/regular expression/
 
@copy by regex, do you mean pcre, or do others do that too?
 
Others do that too, afaik
 
@NathanJones I still use vim to this day. Mostly because I have no idea how to exit.
 
11:36 PM
What does req: [Circular] mean?
 
Is the channel dead?
NM
 
Has anyone gone to Win10 yet?
 
@DemCodeLines Not sure if this is what that is, but a circular object is an object that has a property that refers to itsself; window.window
 
Imma give it about 6 months to work out the kinks.
 
@Shmiddty I have
It's pretty good, actually
 
11:38 PM
cool
 
as long as you turn off a lot of the bullshit settings
 
But is it Windows 7 good?
 
I've got the install downloaded, just waiting to pull the trigger
 
@CodeWarrior Better
 
Win10 is good. Worth the free upgrade
 
11:39 PM
 
11:50 PM
i like 10
 
Windows 9 was better.
 
I decided to revise it and ask a more specific question. Do give it a try if possible:
0
Q: After adding authentication headers, uploaded file refuses to carry over to the POST route in Express JS

DemCodeLinesI am building a simple file upload app in the MEAN stack and have come across an issue. As I am using Passport JS for authentication, I need to intervene the POST procedure, add the appropriate header, and then continue with the POST call. Here is my index.ejs file with the working AngularJS cod...

 

« first day (1752 days earlier)      last day (3189 days later) »