« first day (3583 days earlier)      last day (1590 days later) » 

02:35
is it normal to have to sign an agreement when contributing to open source?
 
2 hours later…
04:26
@JBis it's not abnormal. I'm not sure how many open source projects do it but it happens. I think some Linux distros also require a separate agreement. Ultimately, if you contribute to open source projects you always enter into a legal agreement via the open source license chosen.
If it helps, the contract you showed seems pretty plain. It boils down to "If you contribute to us, you agree that you transfer the copyright and patent rights of the code"
The rest of the points revolve around the fact that you're able to give these. So, essentially, you're not trying to give them somebody else's creation.
Seems it's mostly to protect themselves from legal action. The clauses that concern you as a contributor are pretty standard for open source licenses. You're allowing your contribution to be used, you can give this permission, you're not required to give support.
05:07
Hi All
whenever i create a new document a _v column gets added to my collection, i use MOngoose orm
but when im doing upsert on the same collection its not generating _v
 
4 hours later…
09:02
@user36339 Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
For posting large code blocks, use a paste site like like gist.github.com, hastebin.com, pastie.org or a demo site like jsbin.com
1 message moved to Trash can
09:28
Hi, guys i need to ask some questions related to angular
@TaimurSaeed Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
10:02
To what extent can i customize an angluar component. I am using angular stepper component and the current implementation is like this
Now i want to make it like this
Is there a possibility that angular's stepper component could be updated to reflect the new design?
P.S I am new to angular to don't know a lot about it. Any help or direction would be greatly appreciated. Thanks!
11:03
Hi, i have a question regarding web scraping with node.js.
@wulds Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
1 hour later…
12:28
Hello, I have a question related to array grouping. I have an already grouped array that groups items by its Program attribute, and inside of that I want to group Items by their Deliverable Attribute. How would I go about that?
 		var sortedObj = {}
		objItems.forEach(item => {
		var program = item.Program;
			delete(item.Program); //remove this line to keep the program in the item data
			if (!sortedObj[program]) {
				sortedObj[program] = [];
			}
			sortedObj[program].push(item);
		});

Object.keys(sortedObj).forEach(key => {
  tableContent += "<tr>";
  tableContent += "<td>" + key + "</td>";
  tableContent += "</tr>";
  sortedObj[key].forEach(obj => {
    tableContent += "<tr>";
    tableContent += "<td> </td>";
    tableContent += "<td>" + obj.To + "</td>";
@Cerbrus
12:42
Yea please don't ping random people
!!welcome zgoforth
@zgoforth Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
Didn't "randomly" ping you. You are the only one active seeing if you would be able to help me. Why is everyone so anal in this chat
Aaand as I figured. Useless
13:19
Yea nope
If you want help, don't go calling people useless
oh room 17 :-)
It's been a while. Turns out a userscript I have disables the usercard popup when you click on a name
13:42
Hello everyone
@LetTheWritersWrite Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
@Cerbrus intentionally?
posible.strangelandcreative.com having a weird safari issue on this this site i'm devoloping.
Could someone check it out and give me a clue why the menu button glitches out?
@TylerH Nah, the euthor probably didn't consider RO features
on chrome and firefox works perfect
seems like safari doesn't like the transform rotation. tried with and without transition to no avail
13:47
o/
0
Q: CSS Transition and Fixed position not working in Safari

LetTheWritersWritehttp://posible.strangelandcreative.com Link to test site. So as usual this is a Safari problem only. I have tried several things to make this menu animation work to no avail. The menu button doesn't seem to respect the z index and the animation glitches out too. I have tried several suggestions o...

@KevinB 🚽
13:59
I guess I understand but at the same time I don't, why must you wait two days to put a bounty on a question?
@LetTheWritersWrite Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
1 message moved to Trash can
@LetTheWritersWrite Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
1 message moved to Trash can
@zgoforth i'm kinda wrapping my head around your algo. so what's going on in line
if (!sortedObj[program]) {
    				sortedObj[program] = [];
    			}
when you pass program, what are you passing
@LetTheWritersWrite: That makes sure an array exists
i get that, but that is program
Sorry Im back and yes^, the program item
14:03
so my point is, wouldn't you just do another foreach for each item?
kinda hard to figure out what you mean by "inside of that I want to group Items by their Deliverable Attribute"
Give me one sec Ill share a paste bin of exactly what I mean, hard to find the right way to word it
pastebin.com/XBpneW0B This is what I mean @LetTheWritersWrite
Let me know if you have any further questions. I was thinking that another foreach would work but unsure of where I would place it or nest it
so for example,you want to group program 1 within by the deliverable attribute?
@zgoforth So, basically you don't actually want a table, you want something more like a tree, or nested tables?
Nested table, precisely. I apologize sitll sort of new to all of this so unfamiliar with the correct terminology
@zgoforth can you provide me with a MVP of your code on jsfiddle?
14:15
@mega6382 stackoverflow.com/questions/63302058/… I can't run it on JSFiddle as I can't pull the information from SharePoint site there
@zgoforth try datatables, here is an extension of it that you can use datatables.net/extensions/rowgroup/examples/initialisation/…
Let me know if you have any questions
@mega6382 thats what I started off trying, but couldn't figure it out. It was easier for me to do it as so.
and yet, here we are
lol
??
@mega6382 are you familiar with ag-grid
14:35
based on your post, all you really need to do is run another nested loop to sort based on deliverable attribute
really nothing to it
foreach to create sortedObject
     foreach sortedObject to access one program
            foreach program to access items and sort
that's the logic
Do I nest that inside the already existing foreach
@mega6382 would it be much work to convert that HTML table to a datatable?
14:55
yes, you would nest a loop inside a loop and another inside that one.you'll basically have to figure out a way to keep track of your sorting. easiest way is to create two objects. one for your final, and one for temporary sorting.
anyone here a VUE.js fan? I'm annoyed at finding out i've put a lot of time learning their vue 2 syntax only for them to completely change it on the new version
15:13
@LetTheWritersWrite check out the chat
morning o/
15:43
Could you show me how to go about the nested loop?
o/
i'm hungry. thinking tacos today
Al Pastor
15:55
It seems Object cannot be used in eval:
var X = {'a': { 'b': {'d':4}}}
console.log(eval(`${X}`))
undefined:1
[object Object]
        ^^^^^^

SyntaxError: Unexpected identifier
What I did wrong?
||> var X = {'a': { 'b': {'d':4}}}
console.log(`${X}`)
@JBis undefined Logged: "[object Object]" Took: 6ms
theres your problem
You want to use this
|| mdn json stringify
@JBis No, I don't want to use this. I need to use the object in eval for some other work, not just for printing it.
15:57
First you shouldn't be using eval
||> var X = {'a': { 'b': {'d':4}}}
console.log(eval(`(JSON.parse("${JSON.stringify(X)}")).a.b.d + 3`)))
@JBis "SyntaxError: Unexpected token ':'" Logged: `` Took: 23ms
@JBis "SyntaxError: missing ) after argument list" Logged: `` Took: 1ms
@JBis "SyntaxError: missing ) after argument list" Logged: `` Took: 0ms
@JBis "SyntaxError: Unexpected token ')'" Logged: `` Took: 0ms
Actually, I want to something like this:
eval :(
var X = {'a': { 'b': {'d':4}}}
var s = 'a.b.d'
console.log(eval(`${X}.${s}`))
yeah, don't do that
16:00
^
If you need to take input like that, split it and do a recursive function.
|| joke
What's the object-oriented way to become wealthy?
Inheritance
jajajaja
@JBis yeah, I was doing that. I got an idea, that there might exist a way easier method.
16:04
||> const X = {'a': { 'b': {'d':4}}};
const s = 'a.b.d';
const keys1  = s.split(".");
console.log(getVal(X, keys1));
function getVal(obj, keys){
   if(keys.length === 1){
      return obj[keys[0]];
   }
   return getVal(obj[keys.shift()], keys);
}
@JBis undefined Logged: {"a":{"b":{"d":4}}}, "a.b.d" Took: 0ms
something like that, but a function that works
@JBis "TypeError: keys.shift is not a function" Logged: `` Took: 9ms
JBis how long did coding that Bot take you? thats pretty damn awesome
@JBis undefined Logged: 4 Took: 1ms
16:05
There we go.
@iaeliyen Take a look at the function. Does it make sense?
|| > t = 'p'
Invalid command! Did you mean: 3, d, ^? Try help for a list of available commands.
I think JSPerf just went down, possibly for good
@JoshuaWade Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
@zgoforth thank you, i can't remember
16:07
@JBis yeah, I ain't a newbie. :D
I was in the middle of writing a test, and I loaded it into Firefox and got this:
`This deployment is not available anymore.`
`ZEIT Now 1.0 is being shut down. As part of this, all ZEIT Now 1.0 Deployments will become inaccessible.`
|| sandbox
Please go and play in the Sandbox
|| kill JamesBot
This conflicts with the First Law.
16:09
9 messages moved to Sandbox
@iaeliyen @zgoforth if you want to play with the bot go play in the sandbox
thanks.
6 messages moved to Sandbox
Im done for now, JBis can you take a look at my code
@zgoforth dude you're a help vampire.
you just want someone to write the code
i gave you the logic in the private chat you started
I'll say it again here
just break down the problem into three steps
you already did the first one. you're sorting it by program. now make another nested loop inside that takes one program at a time. then you nest one more loop inside that, where you sort the items by the attribute you wish
basic algo design
I didnt get a notification you chungus
But thank you
16:15
stop bugging people. you came in with a terrible attitude and i give you a hand and still take my whole arm
sure..
go buy a plugin on wordpress troll
@zgoforth Ask and wait. Don't bug people.
or go use google sheets LOL
there. problem solved
@LetTheWritersWrite let me write you NARP
16:20
@zgoforth @LetTheWritersWrite stop bickering, mute each other if you need to
16:52
so back to VUE. anyone hating the massive change in the new syntax?
makes me want to abandon it and just use React
17:41
i've never had any interest in even taking a cursory look at vue.js
17:58
Why's that?
because i tried react first, and it does the job
(i also tend to write very little JS, most of my time is spent managing servers and writing coldfusion)
well funny enough, what i liked about Vue is it's markup approach. felt nice and simple
and they now changed their syntax completely to more of a react js syntax
18:34
by the way, Cold Fusion? gross
people still use that dinosaur?
Well, jsperf is back up 🤷‍♀️
@LetTheWritersWrite I don't think the new syntax is a replacement for the old syntax
It's just a new option to make bigger components more manageable
19:17
Lol
19:30
Is there a way to separate dependency for a package that works on node & browser ? wrtc in node & WebRTC in browser, but npm install will always install wrtc even if the usage is browser
19:42
Hey any takers for a big O question? It's just something that just popped up in my work & I don't feel like it's big enough to post on the main site
> ... I don't feel like it's big enough ...
Just ask, if anyones around who can and wants to help, they will
otherwise, it's kindof odd to commit to answering a question that hasn't been asked yet
Cool! I just wrote a loop along the lines of:

for (let i = 0; i < n; i++) for (let j = i + 1; j < n; j++) ...

Is that code still O(n^2)? While it obviously runs a little faster, I'm not sure if that a coefficient thing or if it's actually better asymptotic complexity?
20:05
Unfortunately that's not an area i've devoted any time to
20:20
@forresthopkinsa they say it's not a replacement but they've given VUE 2 only 18 months of maintenance once VUE 3 is released.
the standard syntax works in vue 3
but how long before it breaks?
never
well, unless browsers change significantly
i still have some angular 1.5 code running and maintainable
20:21
so when they say only 18 months of maintenance. what does that mean?
they said that they'll only remove the standard syntax if, for some reason, everyone stops using it
@LetTheWritersWrite it means you have 18 months to move to vue 3
it means they're not gonna update it anymore
for bugs/security etc
so you think they'll keep VUE 2 syntax for a long time?
let me rephrase: the syntax you're used to will continue to be the default
the composition API is an expansion, not a replacement
you can continue using vue 2 and you'll even get bug fixes for 18 months, but there's really no reason
afaik the upgrade to 3 is pretty painless
FINALLY! figured out the sort/group within nested table and expand/collapsable table rows
!!joke
20:24
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program
what if you just want to be a rebel
the rest of them will write Perl
that's a great joke
> what if you just want to be a rebel
then you should stop using vue and start using svelte or something edgy like that
they say a new js framework is born every second
but that's not really true. some of them are view libraries.
I decided to take a look at how minecraft modding works, after all these years, and wow it's a mess
20:29
@forresthopkinsa i know what you're saying. but in reality, i'm wondering how long before the "old syntax" breaks on vue 3 updates
I thought that Forge presented an API to interact safely with the game. And it kinda does but it leaves modders digging into the source code anyway. awful
@LetTheWritersWrite That doesn't make any sense, why would they do that
here's an excerpt from the simplest mod I could find, "iron chests"
I guess i don't know exactly how it works under the hood
look at how it's overriding an obfuscated method
no wonder mods all break on every game update
@LetTheWritersWrite You don't need to, you just need to understand that the Vue developers aren't going to unilaterally screw over their users
They have the sense to not shoot themselves like that
so are you a big vue fan?
Meh, I haven't used it in like a year, I use React a lot more
I do like Vue though
20:40
well the new way is very react like. which is kind of funny they went full circle like that
@RobbieWxyz I'm curious to attempt this problem. having done this since college
@RobbieWxyz Asymptotically that is still o(n^2).

The number of times the inner loop runs is n * (n * 0.5), which equals (n^2) * 0.5. To find the asymptotic complexity from a polynomial, you first remove all components except the one with the highest order. There are none except the n^2 component, so nothing to do here. Then, remove all coefficients, so the 0.5 goes away, leaving n^2.
That may be an over-simplification
yeah I've seen the composition API, it looks like it would make really sophisticated components easier to manage. and since it leaves simpler components to use the nicer syntax, you get the best of both worlds
and here I thought I'd never use what I learned in my algorithms class
@JoshuaWade great explanation, totally makes sense, thanks

@LetTheWritersWrite yeah I don't have any practical reason to know; I'm self-taught and the question piqued my curiousity just enough to ask lol
20:55
@RobbieWxyz The only part I missed was a proof that n + n - 1 + n - 2 + ... + 1 is roughly equal to 0.5 * n * n, which you can prove by induction: khanacademy.org/math/algebra-home/alg-series-and-induction/…
... and which I did not want to try to prove by induction
Totally, I've heard that one in the classic solution to "sum all the numbers 1...100"
^
It makes some intuitive sense I think too
Right, since the middle case is the average & has you looping through 1/2 of n
exactly
that was my thinking anyway
Maybe the inner loop runs n * (n + 1) * 0.5 times which is a polynomial? That makes the math more interesting I guess

0.5n^ 2 + 0.5n, then you throw away everything but the highest order and you actually have something to throw away
anywayyy
fun stuff
21:53
@RobbieWxyz O(n * n! - n)
for (let i = 0; i < n; i++)
    for (let j = i + 1; j < n; j++) ...
For each iteration of the first loop, the second loop will be one less iteration. Therefor it's a factorial. Additionally, since it's offset by 1 it's -n.
That's my guess.
||> let iterations = 0;
const n = 4;

for (let i = 0; i < n; i++) {
    for (let j = i + 1; j < n; j++) {
      iterations++;
     }
}
return iterations;
@JBis undefined Logged: `` Took: 0ms
@JBis 6 Logged: `` Took: 0ms
@JBis 6 Logged: `` Took: 0ms
@JBis 6 Logged: `` Took: 0ms
||> let iterations = 0;
const n = 5;

for (let i = 0; i < n; i++) {
    for (let j = i + 1; j < n; j++) {
      iterations++;
     }
}
return iterations;
@JBis Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. You have 25 seconds to edit and format your message properly before it will be removed. Please separate code blocks from your actual question. Put your question in 1 message and then your code in a 2nd and format it.
@JBis 10 Logged: `` Took: 0ms
@JBis That would be equivalent in complexity to n!, and I promise it's not n!. n! grows very big very fast. 10! is over 3 million!
yeah, wait
22:06
1 message moved to Trash can
@JoshuaWade Ctrl + K
A simple test shows this is not true:

    let iterations = 0;
    const n = 10;

    for (let i = 0; i < n; i++) {
        for (let j = i + 1; j < n; j++) {
          iterations++;
         }
    }

    console.log(iterations)
    > VM140:1 45
6 messages moved to Trash can
Yes, one sec
Ok. Got it.
for each i, the inner loop happens (n - i) times
O( ((n^2 + n) / 2) - n)
22:08
Yes, and you can simplify O(n) notation a lot, as described above
that should be correct, it wasn't factorial because it's addition not multiplication
It's technically θ(n), O(n) means something slightly different
Yeah, thats a bit above my math knowledge
i like how this convo is in the javascript chat lol
I didn't actually bother to figure out the correct polynomial, but the complexity ends up the same
22:12
self driven cars with javascript
3
ha ha,,,
npm install chauffeur
I could never trust npm with my life like that
yarn add chauffeur
lmao
22:28
LOL
$(TSLA).ready(function(){
  $("ignition").keyturn(function(){
    $(this).init();
  });
});
oh no, the jquery car
oh no
I don't trust JS with my life, you know it's gonna just
Uncaught ReferenceError: car is not defined
    at <anonymous>:1:1
just wait until some idiot puts an alert in the code and your car stops in the middle of the road
LOL
i could see a python car
22:49
would you like to see the best uiux I've ever seen
23:25
ok but you gotta admit, that clock is pretty cool
help I can't stop playing with the clock
I have work to do, this is actually a problem
23:52
wtf, react-scripts build is generating a V8 error
but only under the develop branch of my git repo.
impressive

« first day (3583 days earlier)      last day (1590 days later) »