« first day (3503 days earlier)      last day (1667 days later) » 

00:09
does anyone know what the best practice is for removing undefined fields?
There dosen't seem to be a json method which removes any json key without a defined value
I guess I'll just use map
00:21
@Jaket filter for an array, and foreach for object
||> [0, 1, 2, null, 4, undefined].filter(e => e)
@forresthopkinsa [1,2,4] Logged: `` Took: 0ms
@forresthopkinsa [1,2,4] Logged: `` Took: 0ms
||> const obj = {"key1": "value1", "key2": "value2", key3: undefined }; Object.keys(obj).forEach( key => { if(!obj[key]) { delete obj[key] } } ); return obj
@JBis "SyntaxError: Unexpected token ')'" Logged: `` Took: 20ms
@JBis {"key1":"value1","key2":"value2"} Logged: `` Took: 1ms
posted on May 19, 2020 by Krishna Govind

Hi everyone! We've just released Chrome Beta 83 (83.0.4103.60) for Android: it's now available on Google Play. You can see a partial list of the changes in the Git log. For details on new features, check out the Chromium blog, and for details on web platform updates, check here. If you find a new issue, please let us know by filing a bug. Krishna Govind Google Chrome

00:30
def need to add a code fromatter to the SO chat extension
@JBis thanks for the recommendation!
np
||> [0, 1, 2, null, 4, undefined].map(e => e)
@JBis [0,1,2,null,4,null] Logged: `` Took: 0ms
hmm, why does it change it to null
||> return undefined
@JBis undefined Logged: `` Took: 1ms
00:59
sorry to be a bother again, but I was also wondering what the best practice is for creating new json from another json variable
I have a json var called changeFields that I try to get values from, but if they aren't defined, their keys are still there, yet assigned an undefined
const tmp = {
              company: changeFields.name,
              email: changeFields.email,
              phone: changeFields.phone
            };
@Jaket 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.
||> [undefined].map(e => console.log(e))
@forresthopkinsa [null] Logged: `` Took: 0ms
nvm
That dosen't seem to work, I get the error tmp[undefined] is undefined
but it dosen't matter, I found another way
Hi, can someone help me how to render a blob file in reactjs?
01:09
@HaAn Tran 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.
i can send code in private if needed
@morbusg In that case I'd remove the initial value all together and let the folder (f) create it, or assign it as a property to the folder function (toItems) so that fold can grab it. (I think many people don't like assign property to a function, though.)
@JBis I get undefined in Firefox console.
Took a quick look at v10 spec and saw nothing that should cast it to null.
01:44
@Jaket Couple things,
1. In JavaScript we call these entities objects, not JSON. We can go from objects to json and vise versa, however there are many features objects have that JSON doesn't e.g functions.
@Jaket yes, if any of those are undefined you are setting those keys to have a value of undefined. undefined is a value representing the lack of a value. If you only want to add keys with values, there are other ways to go about it. However, usally you do want all keys. You simply check in the code that uses these keys and values whether the value for a particular key is defined.
@HaAnTran a blob file represents data. What type of data is this?
@Sheepy ok i'll complain to the people who made the vm
02:15
does anyone know how to fix this.
https://stackoverflow.com/questions/61881823/how-to-fix-the-error-modal-open-only-once-instead-it-toggles-the-modal-in-angula
Do you eat soup or drink soup?
Maybe you eat it and then you drink it
it's like asking if you eat or drink cereal
though it probably depends on the soup
02:35
i think you eat cereal
because cereal is the solid part of the breakfast meal
but many soups incorporates both the solid and liquid parts
I drink miso soup, but I eat chicken noodle soup
extra chicken please
Both....you do both
According to Google, this topic has been discussed extensively "451,000,000 results"
ERROR Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'nzNoAnimation: undefined'. Current value: 'nzNoAnimation: false'. It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?
02:55
I did it manually: https://github.com/phenomnomnominal/parseltongue/tree/master/src/ast

But there's possible tooling that exists for it?
@Panda where is nzNoAnimation in your code? The code you posted in the question seems unrelated to the error.
I'm guessing that somewhere in your code you have public nzNoAnimation: boolean
and if you change it to public nzNoAnimation = false it will work
I only used


    this.modalRef = this.modalService.create({
      nzTitle: this.translate.instant('Change Password'),
      nzContent: this.modalForm,
      nzOkText: 'Save',
      nzOkDisabled: !this.formGroup.valid,
      nzOnOk: () => {
        _this.returnPassword();
        _this.modalRef.destroy();
      },
      nzOnCancel: () => {
        _this.modalRef. destroy();
      }
    });
What does modalService look like?
import { Overlay } from '@angular/cdk/overlay';
import { Observable } from 'rxjs';
import { LoggerService } from 'ng-zorro-antd/core';
import { NzModalControlService } from './nz-modal-control.service';
import { NzModalRef } from './nz-modal-ref.class';
import { NzModalComponent } from './nz-modal.component';
import { ConfirmType, ModalOptionsForService } from './nz-modal.type';
export declare class ModalBuilderForService {
    private overlay;
    private modalRef;
    private overlayRef;
    constructor(overlay: Overlay, options?: ModalOptionsForService);
Right, this is a third party thing?
then this is the nz-modal.service.ts
import { OverlayRef } from '@angular/cdk/overlay';
import { EventEmitter, TemplateRef, Type } from '@angular/core';
export declare type OnClickCallback<T> = (instance: T) => (false | void | {}) | Promise<false | void | {}>;
export declare type ModalType = 'default' | 'confirm';
export declare type ConfirmType = 'confirm' | 'info' | 'success' | 'error' | 'warning';
export interface ModalOptions<T = any, R = any> {
    nzModalType?: ModalType;
    nzVisible?: boolean;
    nzZIndex?: number;
    nzWidth?: number | string;
03:02
Okay, looking at their code: github.com/NG-ZORRO/ng-zorro-antd/blob/…
This is where the error happens. Have you used the ngNoAnimation directive?
@phenomnomnominal no sir.
Have you used the NzModalContainerComponent somewhere?
nz-modal-container
i didn't used nzmodalcontainercomponent
i used ng-template:

<ng-template #modalForm>
  <form nz-form [formGroup]="formGroup">
      ......
  </form>
</ng-template>
@Panda 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.
Could you make a Stackblitz?
03:24
@phenomnomnominal Oy. Ok thanks.
03:41
@phenomnomnominal stackblitz.com/edit/…
@Panda Doesn't want to run for me :/
@coder12255 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.
Can you check my question?
https://stackoverflow.com/questions/61882858/firebase-and-javascript-security-problem
04:21
@phenomnomnominal stackblitz.com/edit/…
Sorry, I don't have time to look now my work day has started
okay sir. thanks
night yall
 
2 hours later…
06:30
how to fix the Binding element 'data' implicitly has an 'any' type.

          const COL = _COL.flatMap(({ data }) => data);
@Panda What's the type of _COL?
06:54
@Panda 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
@Panda 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
res = [{
              date: '2020-12-01',
              data: [{
                  id: 'A1',
                  name: 'A1',
                  date: '2020-12-01'
              },{
                  name: 'A2',
                  date: '2020-12-01'
              },{
                  name: 'A3',
                  date: '2020-12-01'
              }]
          },{
              date: '2020-10-02',
              data: [{
                  name: 'B1',
                  date: '2020-10-02'
              },{
Hmm, I think _.cloneDeep(res['data']) is wrong, as res is an array. This is very likely producing the error later on. I'd have expected an error on the _.cloneDeep line, though. But if you're ignoring that, then you'll most likely get a problem when you try to use _col as it's likely of type any or unknown.
 
1 hour later…
08:26
Hi All
im using validatorJs in my nodejs service.
im trying to validate a string field but the value should be among a certain set of enum
like
city = 'NYC|Canberra|LA|Washington|Ypres'
the value of the city should be amongst the above values, for which i tried to have a regex like below
city: [
        'string',
        'regex:/\b(?:NYC|LA|Canberra|Ypres|Washington)\b/'
    ]
i have this expression in my validator file.
but this does not work with validatorJs, is there any other way in validatorJS to validate the above scenario
09:24
hi guys
i have a questione
for a long motive, I need to create a component
but I can't pass it a input list so
It is bad practice if I switch to the url API component and then in the component I call this url. In this way the component can be generic
?
09:42
@Doflamingo19 i don't know what you mean. Can you explain your idea/question better?
sergio yeah, I show un example
<component [url]="url" [params]="params">
and in my ts I do
url:string
params:Object;

ngOnInit() {
this.url="http://localhost:8080/...."

this.services.getStudents(this.url,this.params);
}
@Sergio I know that it works but I don't know if this solution is not the best practies
10:44
I need some help with vue. I have a child component that need to render some information passed with event bus from the main instance. The problem is that I'm unable to load the data into the component. I have used props to declare the data but after the event I'm listening to occur, the data are not rendered.
@Doflamingo19 oh... angular is not my strong side... sorry
@guggio are you declaring props and then overriding the values inside the component with the event data?
do you have a question to look at?
11:43
I'm trying to figure out if something is feasible, or even doable, in Javascript/Typescript. I have a binary stream of data of an unknown size that I can retrieve from a server, possibly in multiple chunks. I would like the user to be able to initiate a browser download, and then keep pumping the information in until the stream is done (and the data there is finite, just unknown in size). Is that possible?
Everything I've found so far is either serving a static file off of a server (so basically linking to it), or creating a single data blob and then starting the download.
To use a slightly more concrete example, say the user decides to download 10,000 records as a CSV file. Said records could be anywhere between 16 bytes to 64 MB in size, which I won't know until I start requesting the data from the server. Since each record (or chunk of records) exists fairly independently, it feels like I ought to be able to start the download, appending records, until I'm done or the user cancels it.
@Doflamingo19 I would use an injection token to inject the API url
The catch in my head is that I've always been under the impression that web downloads generally have to say how much data they're preparing for download so that a) a progress bar can be shown and b) the user knows how much data is going to be transferred, but I'd swear I've seen web downloads that don't provide that upper limit.
12:09
@Sergio I have posted a question about. I'm not overriding the props inside the component, I just try to assign using the this.varName the values that comes from the event bus
12:37
@guggio do you have a link to the question?
12:53
@SeanDuggan yes, it's possible. But not sure exactly how. Going off memory, you can send a header that says that there is more data to come then set a header for "final chunk". We had something similar at at my old place, since we had to generate data in chunks and send it, we couldn't do it all in one go. I wasn't involved in this but I know it's possible.
13:15
@VLAZ: Good to know. I'll keep plugging away at it.
14:05
HI
@user14 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.
I need a help regarding printing of retrieved images in ejs page column wise
Hey everybody, I'm wondering about Access-Control-Allow-Origin and whether it can be fooled by an entry in /etc/hosts
Is there any good way to secure a cross-origin XHR request? Or am I correct in thinking "no"?
14:30
@RyanKinal hmm, don't think you can bypass it using the hosts file. You can only re-define the entire domain, so at best you'll have to re-define localhost to point to the other service. But if you do that, you cannot call your thing which is also running on localhost.
Also, even if you run both services on the same domain but on different ports, you'll run into the CORS restriction as, say, localhost:8000 and localhost:8001 are not considered the same domain, so if you try to call one from the other, you'd be blocked by the browser.
Will anybody help me solving this issue.
0
Q: Print retrieved images from database in columns

user14I am retrieving images and name of my recipes from database using node.js.I want my images along with recipes names to be printed in column wise in rows. Here is my js code: var sql ="SELECT rname,image FROM recipes WHERE ringre LIKE '%" +items[0]+"%' "; for( var i=1;i<items.length;i++){ ...

@VLAZ So, let's say there's an API at api.mysite.com which allows all origins, but verifies that the requester is on a white list with some server-side code. One of the whitelisted sites is 'client.yoursite.com'. Can I set up /etc/hosts to point client.yoursite.com to my local server in order to be considered "on the whitelist"?
Hmm, I'm not sure about that. I sounds like it shouldn't work, though.
If you add an entry to your local hosts file to point client.yoursite.com to your own machine then any networking targetting that will automatically get routed to your own machine. So, you're skipping DNS but only in regards to sending packets. I would like to believe that the browser is more clever when it comes to this.
Yeah, I would hope so, but I'm not entirely sure
Me neither to be honest.
14:44
I'm gonna do some testing
Probably the best. It feels like it's something that should already be handled. There are probably other ways to access the service by setting up a proxy, for example.
14:59
Hi @RyanKinal :)
Hey @SterlingArcher!
Been a while
Quite so! I've seen some great updates from you on facebook though, looks like it's been a fun ride!
I hope you've been well
Definitely! How has your developer-life been?
Busy busy! I've been a consultant for the better part of a year and it's pretty rewarding, especially in overall rounding out of my skills. Are you still developing as well?
Or have you finally begun your world folk tour? :P
Haha, no world tour yet
I'm working for the company I founded 7 years ago, SlickText. Still doing development... PHP, JS, etc.
15:07
That's great to hear. I hope the pandemic hasn't hit you hard (or at all)
But I'm sorry to hear about the PHP, my condolences :D
I think it actually increased our business... we're a good solution for communicating with a lot of people at once, and that's exactly what businesses want to do with their employees.
Haha, yeah, it's a pain. But OH WELL IT'S A LIVING
What kind of stuff are you consulting on?
A good living is a good living!
I'm on a contract with an education company who is working a grant for the Bill and Melinda Gates Foundation, so that's pretty exciting to help them build :)
Oh, nice
That's super exciting
Should help a lot of people get into college from what i hear!
That's some feelgood work. Glad to hear it.
15:11
@SterlingArcher I'm sure alcohol producers would be glad to hear that.
Yeah it's been a lot of feel-good for the last 4-5 years since I left gov-contracting
Just joking, sounds like an amazing project.
But unfortunately I still haven't found my calling
The life of a developer. I'm not sure any of us find a calling lol
Fair point lol I'm hoping my management training is the route I want to take, and I'm very grateful they're giving me the opportunity
15:13
Best of luck :-)
You too man! I'm off to a meeting, feel free to ping me anytime!
love ya bud
Will do! Love you too
 
1 hour later…
16:16
@RyanKinal ah, so YOU'RE the one always texting me promotions
17:12
what domain to y'all like best?
bitlink.live
bitlink.link
bitlink.dev
I'm leaning towards live.
I'd say so too. link.link looks weird and dev sounds like it's not complete (regardless of whether it is or not)
^ same reasoning here.
bitlink.wtf is also aval lol
You can also try to grab a .ninja domain.
alright live it is
17:24
hehe
Just imagine it says "It's a .live!"
@forresthopkinsa Haha, nooooo...
... It's people using my platform that are sending the promotions :-P
Open-source your software so I can contribute a phone number blacklist
starting with mine
@forresthopkinsa I feel like putting your phone number on the internet can backfire...
17:35
I'll add it as a convoluted regex
Smart
blacklist is \d+
Now we're getting somewhere
We're pretty aggressive with how we deal with spammers. We monitor uploads, we follow text marketing guidelines rigidly, and we blacklist anybody who even looks like a spammer.
Unfortunately not all platforms are as rigid as we are. So I apologize for my industry.
Hahaha no you're good, the only people who actually annoy me are the freaking CBD spammers, who I know don't use any legitimate marketing platform
Good on you for dealing with spammers though. Keep yourself off of those blacklists
Oooh, yeah. We've had some of our legit users yell at us for their customers receiving CBD messages. They thought it was some crossed wires in our system, when it was just coincidence.
17:41
Do I want to know what CBD is?
It's an oil derived from marijuana
THC's (federally, USA) legal cousin
Semi-recently legalized in the U.S. so people are trying to sell it, very aggressively
That's...both less innocent than I expected and also more innocent at the same time.
17:42
I don't know how they can actually make a profit from texting the same people the same messages dozens of times
@OvieTrix has experience in this field
That's right
I hope you're not doing spam SMS Ovie
In CBD or SMS marketing?
Ah
He developed an online Canadian weed market
I guess any sale is pure profit, the overhead cost of texting a bunch of people is likely absorbed by sales.
17:43
Which I still don't know if he ever figured out a way to make legal lol
I guess so
user8729657
18:08
@VLAZ, would you like a sample?
user8729657
let me upload to github
Sample of SMS or CBD?
I'm not sure either of these can really be uploaded to GitHub
@OvieTrix So, this is your storefront for Canadian marijuana sales? Is that what I'm seeing the code for?
(wrong tag, sorry)
It might be mine, you don't know :P
18:17
Haha, true
Double-boxing the SO chat. So 1337.
Not quite weed related but...is there any way to make Bootstrap modals start up clean every time? From what I've seen, they just exist in the DOM and so if you fire one up and fill it with data and stuff like event handlers on buttons, you then need to make sure everything is cleaned up and the event handlers are cleared.
It seems...wrong. I'm not sure if I'm overlooking something or what.
I guess the other option is to just not use Bootstrap modals.
I've encountered similar stuff in the past, and ended up using an element as a "template". Clone the node, display the clone in the modal, and it should be clean.
posted on May 19, 2020 by Srinivas Sista

The Chrome team is delighted to announce the promotion of Chrome 83 to the stable channel for Windows, Mac and Linux. This will roll out over the coming days/weeks. Chrome 83.0.4103.61 contains a number of fixes and improvements -- a list of changes is available in the log. Watch out for upcoming Chrome and Chromium blog posts about new features and big efforts deliver

That's what I was thinking. It's how Knockoud does it, in fact - it keeps the template in a <script type="text/html"> tag and then clones it every time it's needed. It seems the most sensible. I was just wondering why the Bootstrap modals don't do it by default.
I guess it makes sense from a certain standpoint. In general, I'd rather not duplicate DOM nodes if I don't have to.
18:32
I think it's better than just keeping the DOM there and having it retain random stuff from the last time it was shown just because you forgot to remove one.
user8729657
@RyanKinal, yea something I made for open source
@VLAZ If I'm making a quick one-off modal library, then it probably just shows and hides some elements rather than rebuilding them.
@OvieTrix Ah, cool
But Bootstrap's modals aren't one-off. Not as far as I can see from docs and recommended usage. Say, you have an Edit button on a record and you want it to show a modal with the values. You also want to make sure that the OK button on the modal saves the record you've selected. So, you fill up some values, you attach an event handler. Unless you clear up everything, you retain those values next time. Especially annoying when you start stacking event handlers.
Right right
19:13
@forresthopkinsa bitlink.live/privacy what do you think?
pretty simple
> In order to understand how users are using our service and improve our service, we collect usage information and share it will our partners and affiliates. We never share names, room names, chat logs, video or audio with our partners and affiliates.
19:25
is it OSS?
Doesn't look like it is. I was gonna suggest some copyedits
You can make an issue on GitHub.
Oh I'm a goof, I was looking under your personal profile
I see it now
Good afternoon everyone. I am using two tinymce editors on the same page.
How do I get the commands to go to the top editor?
tinymce.init({
            selector:'textarea#contratoResumido',
            directionality : 'pt_BR',
            language: 'pt_BR',
            height: 250,
            plugins: [
                " advlist anchor autolink codesample fullscreen help image imagetools",
                " lists link media noneditable preview",
                " searchreplace table visualblocks code"
            ],
            toolbar:
                "undo redo | bold italic | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist ",
And this one, for the bottom editor?
tinymce.init({
            selector:'textarea#contratoCompleto',
            directionality : 'pt_BR',
            language: 'pt_BR',
            height: 250,
            plugins: [
                " advlist anchor autolink codesample fullscreen help image imagetools",
                " lists link media noneditable preview",
                " searchreplace table visualblocks code"
            ],
            toolbar:
                "undo redo | bold italic | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist ",
$('.button1').click(function(event) {
            event.preventDefault();
            tinymce.activeEditor.execCommand('mceInsertContent', false, '&nbsp;<span contenteditable="false" style="background-color: #f1c40f;">'+ this.innerText +'</span>&nbsp;');
        });
$('.button2').click(function(event) {
            event.preventDefault();
            tinymce.activeEditor.execCommand('mceInsertContent', false, '&nbsp;<span contenteditable="false" style="background-color: #f1c40f;">'+ this.innerText +'</span>&nbsp;');
        });
How can I do it?
Please
19:40
Never heard of that, sorry
@forresthopkinsa How to send a command to Editor A and Editor B?
I don't know what tinymce is
I believe that tinymce.activeEditor.execCommand the identification has to be done here, but I don't know how to do it.
19:58
@forresthopkinsa Awesome thanks!
Just got off the call with LogRocket. Basically said, "I'm not a lawyer, but we have never sold data and do not plan to. We have never discussed doing that and in fact we have discussed how that is not how we want to operate.". On prem option is out of budget. Said most customers who choose that have to due to legal reasons (medical stuff).
Makes sense
Waiting on technical information relating to websockets and electron.
But yeah, I assumed that would be the answer. More comfortable tho with them saying that.
They have some big customers for such a small company.
@Sergio te mandei uma mensagem
20:03
I love the passive aggressiveness styling on "Security First"
> Gigantic
Love it.
Haha yeah I was looking at that a few weeks ago
Does anyone have knowledge of the tinymce editor?
How to make this command go to the editor (A)
$('.button1').click(function(event) {
            event.preventDefault();
            tinymce.activeEditor.execCommand('mceInsertContent', false, '&nbsp;<span contenteditable="false" style="background-color: #f1c40f;">'+ this.innerText +'</span>&nbsp;');
        });
Now this other command goes to the editor (B)
$('.button2').click(function(event) {
            event.preventDefault();
            tinymce.activeEditor.execCommand('mceInsertContent', false, '&nbsp;<span contenteditable="false" style="background-color: #f1c40f;">'+ this.innerText +'</span>&nbsp;');
        });
(activeEditor), works when I have only one editor, but in this case I have two editors in the same file.
I'm not sure how to separate the commands for editor A and B.
Please, can someone help me...
Please, can someone help me...
20:43
ever wonder how to include images in email clients that don't allow images? pgl.yoyo.org/img2html
Please, can someone help me...?
|| welcome Tiago
@Tiago 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.
> if anyone's free and interested they'll help
No one has helped, so no one is free and interested. It happens. Sorry, it's a bummer. Reposting doesn't help. Move along.
I've been trying to do this since early, my last hope would be with your help :(
20:55
How well do you know javascript?
@forresthopkinsa The basic. Not advanced enough to resolve this issue.
Okay I'd start with gaining a better understanding of the language
Asking for help every time you face something nontrivial won't get you very far
I'm using google translator.
Okay
Learn javascript better
You would benefit from knowing more javascript
My focus is PHP, I use little JS.
21:00
JS is a more useful language than PHP, you would do well to learn it
Could you help me, I believe your knowledge is very high.
@forresthopkinsa I intend to do that, but I immediately need to resolve this problem.
21:12
howdy there
first time in the js room, do you guys also talk about node or is there usually a seperate area that folks go for that
|| welcome @Skyler
@Skyler 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.
Anything related to JS is talked about here, including Node.js
I mean....it is JS
yea, im kind of just diving into node since its the "environment" of choice for working with hyperledger
i was wondering if anyone could point me towards the right library to work on this problem I'll descibe
I wanted to encode n arguments, like latitude, longitude, and timestamp into a value/id. For starters I just want to consistently generate an encoding from these, like a hash. I want these to be unique so that's why the collision properties of a hash came to mind. I want to get this and some math operations working in a toy project im working on
Later on though I want this hash to more serve like a public key and distribute m different private keys to the same public key, so if a recommended library can be geared in the cryptography direction I'd appreciate it
I may be able to do that in a different way though, so if the second case is hard to achieve being pointed toward a library that achieves this hashing like functionality is already a big help.
21:56
@Skyler There are many hash and encoding libs our there. But hashing and encoding are very different things. Do you need to be able to reverse it?
also, if you are looking to do something with keys there is a saying, "don't roll your own crypto". Use an existing algo.
Jbis can I just say that you are so much more knowledgable than when you started here and your progress is amazing
Are you 18? You've got to be the most knowledgable person of your age that I know
I think you're absolutely hireable and if you ever want me as a reference I'll gladly write a recommendation or whatever
@JBis I need to check you can make it but not make it reversible, so for my minimal case a deterministic hash works cuz only by putting all the correct info do you recreate the hash.
In the more complicated case whatever method is used would have a values returned that serve as a proof you were able to generate it that first time.
which is why i had the public/private key comparison
and those "private keys" would be unique to each person who generated (even the same) data
22:29
@forresthopkinsa lol thanks. I'm still 17. Appreciate it greatly. I may take you up on that reco some time. I have clients who can write recos but very little people in the field so that would be awesome. Thanks :)
Totally
I got my first software job at 17. Paid internship which soon turned full-time. I think I've probably told you that before but my point is, it's doable
@Skyler explain abstract what you want to do, I'm not entirely understanding.
@forresthopkinsa I'm interested in going to college before full time job but it's definitely reassuring to know that it's possible without college degree. I probably will not be going to graduate school for that reason. (Or May do it concurrently with a job). I've found your path very interesting and inspiring.
For sure. Thanks!
Definitely a weird one I know lol
take n arguments, as well as a piece of info about a sender. From those n arguments create a value deterministically that is one way (not reversible from the value generated). That's good enough for now
if the other part is confusing then it's not really necessary to dwell on it
Does the order of n arguments matter?
As in, should the two different orders of the same arguments produce different or the same value?
22:41
They'd be inputs from a function so if it did matter the function can handle it. These inputs are not like a bunch of time series data or something like that. They are however, not all the same variable type (ints/floats/strings)
7
A: How to hash a list of multiple items?

Ilmari KaronenAs tylo correctly notes, when we hash multiple values, the important feature that any method we choose should have is that it should be unambiguous: there should not be any way to construct two valid sets of values that produce the same hash value — or at least it should not be any easier than br...

Does that answer your question?
That answers a fair bit, besides that a recommended library for doing a fixed length hash using node js would be nice. Originally I was asking if there was a hashing library that took n arguments to generate a hash, but this presents an trivial way to do it. I also asked it the way I did to make sure the hash was the right approach
|| google "node hash library"
there's plenty to choose from
22:48
yea, as a relative newcomer to node I wasnt sure if there is a canonical set of libraries
I'd choose an algo first. If you need it to be secure then use bcrypt (because it's slow) if just for comparisons use md5.
for cryptography in particular given that is a major security question
and since this was a probably hashing but maybe cryptography question i was being careful
Just an FYI, I'm very skeptical that what your doing is secure.
P.S. If speed isn't a concern then you could probably hash each value, concat the hashes them, and then hash that.
23:15
posted on May 19, 2020 by Ben Mason

Hi, everyone! We've just released Chrome 83 (83.0.4103.60) for Android: it'll become available on Google Play over the next few weeks. This release includes stability and performance improvements. You can see a full list of the changes in the Git log. If you find a new issue, please let us know by filing a bug. Ben Mason Google Chrome

23:42
hey guys, what does the "string" in this typescript class do on each line
export class User {
    public docType?: string;
    public uid: string;
    public risk: string;
    public status: int;
}
i tried putting the int
and got an error
23:58
it defines those as instance attributes as string type
and int isn't a valid type in JS/TS. There is one numerical type and that is "number". Try public status: number;
Additionally, I'm pretty sure thats an invalid class. You must set all fields in the constructor or set them as optional/undefined as you have with docType.

« first day (3503 days earlier)      last day (1667 days later) »