« first day (2080 days earlier)      last day (2853 days later) » 

12:31 AM
Howdy.
 
hey Andrew
 
Hello Filip
Installing Arch Linux. Bye
 
good luck! make sure you have access to the guide o/
 
12:52 AM
nah, go in blind, it's pretty straight forward
 
1:49 AM
Starting a cs course in july and if you are found guilty of plagarism you get a -300% on first offense and an instant F on second
-300% pretty redundant
how do you even recover from that
 
2:18 AM
hey yall
I have an issue with javascript api + mongoose ... every times I send few json data into the post verbose.. however only half of the data is being saved.
 
@AndrewL. By plagiarising harder so that you can get A without being caught?
 
2:36 AM
@Sheepy nah, just delete your SO post the millisecond you get an answer
 
@AndrewL. first time I've heard of that
 
@William how's it going?
 
@AndrewL. Ouch...
 
@JeremyIglehart Welcome to the JavaScript chat! Please review the room 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.
 
2:51 AM
@Sheepy Good point. Maybe I should plagarize off the unknown and uncited sources where they offer no explanation and no verification that what they provide is valid so they won't catch me
 
@Asperger What is it you'd like your code to be doing?
 
morning guys.
 
anyone familiar with creating node api with mongoose
 
@FilipDupanović Same here. You've pretty much lost all hope. On offences you get reported to admnistatration and deans. They also penalize you if you didn't consent and another classmate stole your code
 
a quick question. why does this function return time below 300ms
var timer = setTimeout(() => {
	console.timeEnd('setTimeout');
}, 300);

console.time('setTimeout');
@Lamar hey im learning mongoose as well. what are you using it for?
 
2:53 AM
The teacher has a 1.9/5 on rate my professors and everyone thinks he's too harsh 'cause he's asian lmao
 
i just create an node api
 
1 message moved to Trash can
@JeremyIglehart Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
Error 404 occured, I will call the maid (@Zirak)
 
:31354803 @Ming I'm getting this:
var timer = setTimeout(() => {
	console.timeEnd('setTimeout');
}, 300);

console.time('setTimeout');
undefined
VM55:3 setTimeout: 302.715ms
 
@JeremyIglehart work, I guess
 
!!> var timer=setTimeout(()=>{console.timeEnd('setTimeout');},300); console.time('setTimout');
Will it work?
 
2:57 AM
@AndrewL. TypeError: console.timeEnd is not a function
 
Aww
 
@JeremyIglehart any idea why mine is always lower than 300ms?
 
@Ming Because you're starting the timer after you start the setTimeout
 
i run in both sublime and command line.
 
@Ming You obviously invented a Javascript time machine. (no, I haven't the foggiest idea why ) ... :(
 
3:00 AM
@VeronicaDeane what did you mean? because jeremy followed my code too
 
I'm a bit ashamed that I didn't know pi was just 4/1-4/3...
 
@Ming If you call console.time before setTimeout, it will be more than 300ms
 
@VeronicaDeane Could you provide a code sample?
 
@VeronicaDeane ah yes. you are right. thanks.
 
What part of what I said don't you understand?
 
3:02 AM
console.time('setTimeout');
var timer = setTimeout(() => {
	console.timeEnd('setTimeout');
}, 300);
correct?
 
@Ming With this same code I'm consistently getting 301ms+
 
@VeronicaDeane yeah its funny. Jeremy could get it to work. also, my first example is from a book. so that should have worked. for me. dont know why.
 
@Ming if you really want to be even more accurate - try using performance.now() get those milliseconds down to microseconds :)
 
@JeremyIglehart you running node v6?
 
3:04 AM
@Ming Just my browser bro.
 
@JeremyIglehart that's not more accurate, only more precise.
 
oh. maybe if you try it in node console. then it would'nt work. @JeremyIglehart
 
@Ming I'm pretty sure performance.now() is not a node thing - because it's about measuring the frame from the time that the browser starts drawing.
 
ah yes. no i meant with console.time()
 
@Ming
node
> performance.now()
ReferenceError: performance is not defined
    at repl:1:1
    at REPLServer.defaultEval (repl.js:252:27)
    at bound (domain.js:287:14)
    at REPLServer.runBound [as eval] (domain.js:300:12)
    at REPLServer.<anonymous> (repl.js:417:12)
    at emitOne (events.js:95:20)
    at REPLServer.emit (events.js:182:7)
    at REPLServer.Interface._onLine (readline.js:211:10)
    at REPLServer.Interface._line (readline.js:550:8)
    at REPLServer.Interface._ttyWrite (readline.js:827:14)
@Ming - so nope, it's not in vanilla node.
 
3:07 AM
@JeremyIglehart got it. thanks for the help. just getting started with performance testing.
@VeronicaDeane thanks for the pointer to my code.
 
@Ming Good luck buddy - If you're looking for performance testing in a browser you can always check out the Google Javacript CPU Profiler. And the performance.now() trick is microseconds - so that's always nice.
 
thanks. will do. Cheers :)
 
@littlepootis good summer is nice
watched finding dory the other day
liked it almost more then xmen
 
@VeronicaDeane performance.now() offers a higher level of accuracy when measuring performance. Not sure what you're trying to do there about my choice of wording. But, thanks?
 
accuracy != precision
 
3:12 AM
@VeronicaDeane yup.
 
learned that from chemistry
high school chemistry don't remember the teachers name but he was jewish
 
@VeronicaDeane You remind me of the kids who play League of Legends. Anyways, have a good night everyone.
 
Does anything go like spam in chat.stackoverflow.com/rooms/1/sandbox
it says no flagging
 
user6513954
Hi guys. May someone please help me to know how should I find my deleted answers? I was given this link, but I don't know what should I do with that. I entered my USERID in the box, but it brought 54 answers, while I have 83. Thanks a lot.
 
3:27 AM
@lucas Welcome to the JavaScript chat! Please review the room 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.
 
@William Everything you do in the sandbox doesn't affect the other rooms. Except flagging.
 
user6513954
@CapricaSix OK, sure. I keep in mind sir.
 
@lucas *ma'am.
Caprica is a girl.
 
user6513954
@littlepootis How do you know this? :-)
 
I think she is technically a robot and therefore sexless
 
3:35 AM
@lucas Everyone here knows that
 
user6513954
@littlepootis I saw his/her profile, but I didn't see anything about his/her gender!
 
@lucas She doesn't have a gender
 
user6513954
@VeronicaDeane If so, why do you use "she"?
 
@lucas it does say here duplicate seduced someone so it is arguable to say she is definitely perceived as a girl
she has breasts
 
Because she has a female face
 
3:39 AM
I like to view him/her like eunuch
can't reproduce but still awesome
 
user6513954
@VeronicaDeane So, you think I am a goose?:-)
 
Can you host porn on github? (gh-pages)
Can you host an open source porn site on github?
 
@William no
@William yes
 
3:46 AM
@littlepootis source
 
^
Why github, of all places
 
free hosting(if gh-pages works), best place to host open source porn site
 
Oh. Very true. I never think of these things.
A new user actually took the time and read all the answers before choosing which one they preferred
 
Do you think porn-overflow.com should be Q&A based like SO?
 
QnA about what? The stars? What position, etc?
 
3:52 AM
exactly?
users get rep by posting links
 
Now watching it for research takes on a legit meaning
 
These convos will probably go to the trash can :|
 
@AndrewL. "(-27) Q: Will you have sex with me? (1337) ✓ A: No."
 
I'd vote for that site on area 51
 
@cswl you are probably right althogh I'm not linking anything so I think it is a gray area
 
3:56 AM
tbh porn overflow sounds like a site dedicated to creampie or something
 
^ overflow of what?
 
@William You're planning on hosting it on Github pages? Then, no and no.
 
What would they talk about on meta?
 
@littlepootis yeah I'm looking for a host right now
 
You serious @William ?
 
3:57 AM
Wtf?
 
"Guys, please take your discussion about boobs to somewhere else" - I remember getting that once.
 
yes as long as it doesn't cost to much
it will be really funny
no p2p won't work
unless you know something i don't
I'm going to make it look like SO and everything
 
Haha
 
And get sued.
 
@William Do you seriously have nothing better to do?
 
4:01 AM
Your employers will read this some day
 
@AndrewL. college student summer break nothing really bettre to do
 
I really hope they do
 
@littlepootis this isn't connected to any of my real accounts
 
Hello
 
hello
 
4:02 AM
Anyone here good in ms-excel?
 
@asadz vba or just excel
 
I need help, Its 48 hours non-stop I cannot fix stupid excel
yes VBA
 
might be able to help hate vba with a passion
 
its so annoying, I have submission of work on Monday.
5
Q: Copy background color from one cell to cell in separate sheet using ms-excel?

asadzI want to copy background color for example sheetA cell A1 to sheet B A1. The cell A1 is using conditional formatting, I can copy simple but not with conditional formatting enabled. Here is the code Public Sub CopyColor() Dim PeopleSheet As Worksheet Dim TargetSht As Worksheet 'Define what ou...

 
4:03 AM
I've got a final on friday
Damnit
 
Good luck Andrew.
 
Thanks.
 
what class
 
Gotta get the 4.0
Math
 
i suck at math
 
4:05 AM
what math
 
^
 
Linear algebra
 
abstract math sucks
 
Pretty suckkyyy
 
Math in general sucks
 
4:07 AM
I personally think math > arts
But it still sucks
 
depends on the arts
I did okay in math until calculus 2
 
And you can't do any good courses w/o math
 
and linear algebra was pretty bad also
i wish i was good at math
 
I do like some arts. I play 2 instruments
 
i play the ukulele recorder and guitarish if those count
 
4:09 AM
I wish I was better at science
 
i wish i was better at everything
what instrument
 
I wish I was better at life but oh well
Saxophone and piano
 
you are a genius then
 
How lmao
 
surely you play the ukulele and recorder if you play the sax and piano
therefore you can really play 4 instruments
 
4:11 AM
I did play the recorder
I can play the flute too (sort of)
 
genius then
 
Welp. Off to answer some questions. SO's been very quiet today. Traffic seemed lower today
 
The only time I look at main is when I get them in google search results..
 
4:47 AM
Hello guys
this is my thesis. Thank you everyone for your support. 83.212.118.212/Treasure-Thess-Website/public
 
hey guys. is it possible to loop a promise (while a condition is true)
 
why not ?
 
any simple example of it? lots of ppl say cant
this was what i tried. but doesnt work
var p2 = new Promise(function (resolve) {
						for (let num=0; num<5; num++) {
							resolve(Promise.resolve(('my name is winnie the pooh')
								.then( (x) => {console.log();} ))
						}
					});
 
you cant use resolve
resolve fire event
so it will end
use another logic on your algorithm
 
but thats thing. how can i call my name is winnie the pooh 5 times in the above code
using promises.
because console.log() only works when .then() is called. To call .then() you need promises?
specifically, promise.resolve().then
its alright. i did it
function promiseLoop() {
	var x = 0
	while (x < 5) {
		Promise.resolve('hello').then((x) => {
			console.log(x)
		})
	x++
	}
}
promiseLoop()
 
5:13 AM
@Ming You won't know when those 5 promises are finished, if you wanna do something after that.. in your first example,, there's no need to create a new Promise.. jsfiddle.net/778dthao
 
@Ming you can't resolve like that
If you want to do something like that, use Generators
 
@littlepootis but it works though. generators? how.
 
Or that.. you could also await them..
 
@cswl thanks for sharing. your implementation looks great. but what if i dont want to store all my promises in an array if it gets too large.
eg 1 million promises.
 
1 million promises?
 
5:19 AM
cswl script is storing all promises in an array. then Promise.all. my problem was what if there were many promises.
function promiseLoop() {
  let c = 0;
  let p = [];

  while (c < 1000000) {
    p.push(Promise.resolve('hello').then((val) => {
      console.log(val);
    }));
    c++;
  }
  return Promise.all(p);
}
 
 
2 hours later…
7:19 AM
Is it a good idea to wrap the whole page script in an IIFE just to shadow browser variables instead of trying to override them accidentally?
 
7:50 AM
don't see why not
 
@towc hi!
 
hey victor! :)
 
@JanDvorak ESLint will complain if you assign to an undeclared variable, but it's still probably a good idea for ramen scripts; this may not be an issue when the sources are running within the context of a module, worker, smt else
 
@JanDvorak yes, I always do that
 
I'm making a monolithic page. This thing is small enough to not need a file server.
 
7:54 AM
the motivation would be if you had several scripts on the same page, someone won't get the bright idea of using the global context to share data
 
a better solution would be to just wrap everything into a constructor and you just gotta make sure you don't override the constructor and the object tied to it
 
where do things like peer connection etc go in Redux flow?
 
@JanDvorak ^^
 
I do not think putting them in a Reducer is wise
rather AV stream urls, etc can go in their
 
As in, an OOP-style singleton? What for?
 
8:05 AM
@JanDvorak no risk of overriding variables AND helps giving the code a structure
more like "makes you feel sad to see a constructor with no methods"
+ if done right every variable is still accessible
 
Why did I expect jQuery 3 to throw an exception when gettering from an empty collection?
Or rather, why doesn't it?
 
why would it?
 
blog.jquery.com/2015/07/13/…, "Error cases don’t silently fail"
 
how is failing to find any query matches an error?
would you want to check that there is something in the collection every time you wanted it?
 
Obtaining an empty collection is fine. Calling a getter upon it is not.
 
8:13 AM
> would you want to check that there is something in the collection every time you wanted it?
 
Specifically, I'd expect any getter to fail on collections that do not have exactly one element inside.
As in, $("node_name").val()
 
I feel like it would just make the code so much more complicated for the people who just started with dom manipulations
 
When?
 
because they'd have to check
they'd have to learn about input checking
 
In which case it's better to get undefined from a getter rather than an exception?
 
8:16 AM
ofc not for professional code, in which I guess people check anyway, sure
but yeah, for new comers it's easier to deal with that
I think
 
How is the cardinality of some selector related to input checking?
 
input meaning what jQuery gives you as a third party
 
example?
 
checking that jQuery didn't give you an empty list
 
When I want a property of some element I expect that element to exist exactly once. Getting a property of something that doesn't exist should be an error.
 
8:19 AM
$('node_name').val()

// would become

var collection = $('node_name');
if( collection.length === 1 ){ // or something
  var value = collection.val()
}
 
When would you use this?
 
if you need to check for the collection to have one and only one item
like you suggested
which doesn't fit into jQuery's style at all
I've rarely ever seen a "var" in jQuery code :P
 
In what case I don't know how many elements I have, but I also want some property of the first one should it exist?
 
in the case you just started on web languages?
web languages are meant to be flexible
afaik
 
Then explain strict mode
 
8:21 AM
Uh... but..
 
in fact newcomers don't use strict mode
jQuery is for newcomers mainly
 
Explain why undefined.foo is an error rather than undefined.
 
ok, good point
 
Being willfully ignorant of how your code actually works isn't okay. It doesn't matter if you're a newcomer.
 
@littlepootis then why should anyone use jQuery (if not for cross browser compatibility and laziness)?
 
8:23 AM
It's like saying catch(){} is good because newcomers don't have to deal with exceptions.
@towc development time
Easy animations, nicer ajax, more consistent dom api
 
right
 
@towc It's not just laziness. DOM is weird, hard to deal with, and then there's compatibility issues.
 
Even in modern browsers
 
> if not for cross browser compatibility
 
If you're comfortable with DOM, use it.
 
8:25 AM
@towc so, let's not use jQuery then. We have to interface the keyboard, so do you want to support Firefox, Chrome, Edge, or multiply the manhours by three?
 
if you don't then you're "ignorant of how your code actually works" :P
@JanDvorak oh no, I agree that jQuery is amazing for compatibility
but I still think it's meant for who just started to use more than anyone else
and it should keep them as a priority
 
@towc Fine then, let's write everything in C for otherwise you're ignorant of the complexities of writing a garbage collector.
 
@JanDvorak I was disproving littlepootis' point by making an absurd statement using it
soooo much hate :D
 
and you failed at it ;-)
 
I'm not suggesting you learn the intricacies of DOM before you dive into a DOM helper library, but at least learn the language that you're writing.
 
8:28 AM
In fact, I never remember which DOM methods work in which browsers.
except that .id exists everywhere but .classList has less support than you would expect
 
I don't use jQuery, I have my own abstractions that work reasonably well at 200~300 LoC plus unit tests
While I can see why jQuery can be helpful at times, I can't afford to use it all the time
(for example, one of my project is a 3rd party widget, I can't assume jQuery is on the page, and I can't dirty the page's global space outside of my own API)
 
Does require work?
 
@JanDvorak require?
 
require.js
 
Sure, it works... what about it?
 
8:32 AM
Any chance I could get some help on this stackoverflow.com/questions/38028798/… ?
 
I personally don't like it very much, but it works.
 
as a way to grab an instance of jQuery without soiling the global scope
 
@MadaraUchiha prevents requesting jQuery twice
 
@Trax Welcome to the JavaScript chat! Please review the room 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.
 
But again, you can't assume the page has require.js, and you can't force it on the page.
 
8:33 AM
true
 
And there's an even lesser chance that the page has require than jQuery
 
if( require ){ ... }
 
@towc Too complex a logic for too little benefit
 
if( $ ){ ... } else getJQuery?
 
download the require version of jQuery and eval it?
 
8:34 AM
or would they not let you do that at all?
 
Obviously there are solutions...
But why would I introduce all this piping complexity?
 
I've seen someone copy/paste the jQuery code to have it in a monolithic page
 
@JanDvorak It's called module bundling
It's a thing
 
Any suggestions guys?
 
OK, but shouldn't a machine be doing that?
 
8:37 AM
@JanDvorak Yes
 
This wasn't the case.
 
Also, remember, I'm a 3rd party, I need to be as light and as unnoticable as possible.
I can't start downloading libraries left and right and bloat myself.
 
Umm... Google ad scripts are usually much larger than the page they're on.
and yet they bug out on Android
 
Right, and how's that working out for page experience?
How much money do you have to pay when you browse from mobile?
 
touche
I don't pay for data. I use Wifi whenever possible (95% of the time), and stick to specific apps otherwise. throws an evil look at Google maps' lack of offline anything, even places history
 
8:43 AM
fact: mobile data is pretty cheap in romania
 
oh, so you don't pay much to get the content you don't want?
Back to jQuery 3, could it please give a warning when I select a non-existent tag name while an element with that ID or class exists?
 
8:58 AM
I'm trying to do something like <%= foo[{{baz}}].bar %> with angular in ejs, any suggestions how to acomplish such a thing ?
 
Should I have a form and prevent default, or should I attach the same handler to a button click and enter keypress?
or perhaps action=# ?
 
9:41 AM
guys, I have this WebSockets client. I am using it in my app and am doing some send calls. I get DOMException 11. I learnt that comes from the socket connection not being established, but I am not sure how to refactor the code so it never happens. I am not sure where I should wrap the send calls (in the client class) so I don't have to check if the connection is ready every time I send data
I invite you to comment on that gist, if you wish, since I'll revise and let that there for others to use
 
9:55 AM
any one up for a sorting complexity question?
is it possible to sort an array of integers in linear time?
 
@deostroll Arbitrary integers?
 
arbitrary between two distinct values actually
 
You might be thinking of pigeonhole sort / counting sort
 
yeah but all those require several passes right?
I mean counting sort...
 
10:11 AM
You realize that whatever you implement, it's incredibly likely that JS's native sort() function will be faster, right?
 
Jes
10:23 AM
Hi friends
need some help with regex .. can someone help me
trying from two days
 
10:37 AM
What's your question?
 
Jes
i am trying to extract this log
Jun 10 14:10:08 gvsansw03 raslogd: 2016/06/10-14:10:06, [ZONE-1024], 4695, WWN 10:00:50:eb:1a:99:d3:d0 | FID 128, INFO, gvsansw03, cfgSave completes successfully. .
I want to extract the timestamp the first 15 chars..
and then the ZONE-1024 , 4695, WWN, INFO
(^.{0,15}),[(.*?)],(.*?),
trying to write but no luckk
@StephanMuller could you help me pls
 
Have you tried a tool like debuggex.com?
 
Jes
no
 
Then do.
 
^(.{0,15})[^,]+, \[(.+)], (\d{4}), (\w{3}) [^,]+, (\w{4}) might work, but put it in that tool and see if it matches correctly on multiple example lines
 
Jes
10:51 AM
in that tool there is no option to put my test log string
 
Sure is.
 
11:47 AM
guys how do you bundle your babel scripts? I am currently using gulp, but it takes like 20 seconds to bundle some of my scripts. I see examples (documented here) that bundle their scripts almost instanlty and they are not using gulp
 
how much time will take me to get familiar with react if i already familiar with angular
 
@FastSnail react sucks when it comes to animating and transitioning things
 
@Victor opps .but i have to study it.
 
@FastSnail it's not quite hard, you should start on ReactJS website
that will give you a quick intro and you can easily get used to basic things
 
yes i don't need to have lot of knowledge just moderate level
thanks you i will
 
11:54 AM
@FastSnail np
 
what
 
!!urban np
 
@Victor np no problem
 

« first day (2080 days earlier)      last day (2853 days later) »