« first day (3904 days earlier)      last day (1046 days later) » 

10:03 AM
Can anyone explain how the pg npm module github repo works? They say its a mongo repo. The package.json file says there is an index.js file available. But there is no such file in the github repo.
So how does it work?
I mean how does the npm install work and load the pg module correctly?
 
pg = postgresql, no?
I am confused with that statement of yours;
 
Yes
 
> They say its a mongo repo.
 
Sorry that is a typo...I meant its a mono repo
šŸ¤¦ā€ā™‚ļø
 
yeah, pg is a bundled repo
examine the package.json there
so it knows which package it needs to check
then
it basically instructs node to check ./lib for main script. And the default main script name is index.js
Node.js then uses that
@deostroll šŸ•µļøā€ā™‚ļø
 
10:13 AM
Hi, how could I add data to an angular form? I want to automate forms
 
@sourcer 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.
 
"looks at my keyboard, the G is pretty far from M, N and O"
šŸ¤“ must be a derp typo
@sourcer as in... filling in the values?
it's documented. Check Angular.js' doc
 
my intent is to autocomplete a form from angular
 
"auto-complete" is a different mechanism
you mean pre-fill as in when the page loads, the inputs have values set.
or "auto-complete" as when I type something, I get a list of suggestions
 
no, I want to assign data to a form when I press a button, to autocomplete it
but I want to do it managing the DOM
 
11:14 AM
@KarelG So this is an npm feature? I wasn't aware of that. Probably this is also important in the root package.json file, right? šŸ‘‰ github.com/brianc/node-postgres/blob/master/package.json#L9
 
11:31 AM
Does anyone know if there's a way to insert JS logic into comments just like how inserting variables into template strings work?
 
11:46 AM
can you explain that with a concrete example?
 
So if I have a variable x = { "1": 1, "2": 2}. I can put it in a string like `String ${x}`.

Now I want to know if it's possible to do it in a comment like /* Comment ${x} */
 
javascript comments are ignored by the interpreter
what is your use case?
 
@KarelG Am trying to integrate it into Swagger API, so the comments will be used to be displayed to clients. Was thinking if it's possible to put up different examples for each different deployed environment so that it can be run on the api-docs page
 
 
2 hours later…
1:29 PM
posted on June 24, 2021 by Daniel Bevenius

Summary The Node.js project will release new versions of all supported release lines on or shortly after Thursday, July 1st, 2021. One High severity issue, and three Medium severity issues Impact The 16.x release line of Node.js is vulnerable to two medium severity issues. The 14.x release line of Node.js is vulnerable to two medium severity issues. The 12.x release line of Node.js is vuln

 
2:14 PM
    Good morning everyone,
I have some with the mocha test.
    I use an external js library and when mocha run, it founds an error on the library test. But I exclude node_module and I don't know why mocha continue to test the library...
>>> /middle/node_modules/xmldsigjs/build/index.js:55
            Application.setEngine("W3 WebCrypto module", self.crypto);
                                                         ^
    ReferenceError: self is not defined
 
@killer_minet 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
 
 Mocha option

    >>> options: {
        diff: true,
        extension: [ 'js', 'cjs', 'mjs' ],
        package: './package.json',
        reporter: 'spec',
        slow: 75,
        timeout: 10000,
        ui: 'bdd',
        'watch-ignore': [ 'node_modules', '.git' ],
        grep: '',
        fgrep: '',
        reporterOption: undefined,
        reporterOptions: undefined,
        global: [],
        globalSetup: [],
        globalTeardown: [],
        enableGlobalSetup: true,
        enableGlobalTeardown: true
 
2:39 PM
hello...i am having this problem "value from localstorage is not getting saved on screen"
 
@stofu 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.
 
function addValue(){
  let ad = document.getElementById("u");
  let newli = document.createElement("li");

  newli.textContent = document.getElementById("box3").value;

  document.getElementById("box3").value = " ";
   let local = ad.appendChild(newli);
  localStorage.setItem('name',local.textContent);


}
when i refresh the item is gone, its temporarily saved, i want to show it permanently on screen
here is html part  : <ul id="u">
        <li>task1 </li>
        <li> task 2 </li>
        <li> task 3</li>
    </ul>

    <input type="text" id= "box3">

    <input type="button" value="add " onclick="addValue()">
 
nothing in addValue would result in the element being added on a new page load
the value will be stored in localstorage, but nothing is retreiving from localstorage on load
 
can you be more sprcific, please?
 
no
i think that was pretty specific
 
2:43 PM
so, i need to use localstorage.getitem?
i have tried document.write, its not working
@ kevin you dead?
 
?
this is a volunteer chat
i don't have to respond
it seems like you need someone to walk you through dom manipulation, i'm not going there
 
3:01 PM
ok...
 
3:30 PM
Haha
 
 
1 hour later…
4:32 PM
Hello
 
semi-bye? :P
 
Happy Thursday
haha feels like friday
 
4:53 PM
https://jsfiddle.net/BeerusDev/vzehsqn8/183/

I have the date "Week Of" at the top changing on search and I have set it to change back to original value after search is cleared and it says Invalid Date?
 
5:08 PM
your data structure is horrible
 
How so
 
line 291->382
if you change something or want to introduce a new type, you've too much work to do
it's not flexible
 
Same for line 2-78
 
I know I need to figure out a better way to go about that (291-382)
Don't know how else to go about it
 
// current
        Monday: "06/21/2021",
        MondayStatus: "P",
        MondayLocation: "Office",
        Tuesday: "06/22/2021",
        TuesdayStatus: "P",
        TuesdayLocation: "Office",
    // can be reduced to
    workweek: [
    monday: {
      date: ...
      status: ...
      location: ...
    }
    tuesday: {
      date: ...
      status: ...
      location: ...
    }
    ...
    ]

    when processing, have a function that accepts a day

    so
     if(data.MondayStatus === "P"){ //if MondayStatus is equal to Present or Telework, count++ to green
 
5:18 PM
var data = [{
    Department: "IT",
    Employee: "Shap Dev",
    Days: [{
      Day: "Monday",
      Date: "06/21/2021",
      Status: "P",
      Location: "Office",
    },{
      Day: "Tuesday",
      Date: "06/22/2021",
      Status: "P",
      Location: "Office",
    }]
  }
4 messages moved to Trash can
 
My structure is like how it is "the array of objects" because thats how my data is when I call it through ajax
 
no access to the backend code?
 
Do you have control over that which returns the data?
 
Its a SharePoint form that is posting the data to a list, then I am GETting it to display it like so
 
if not, that person made this shit is just torturing you
@BeerusDev process the data in a manageable object structure then
 
5:21 PM
Hm, even then you should probably be iterating over the object's keys
 
a small pain for lots of gain in the rest of the code
at least it is not that worse. I've seen much worse code lol
like a trainee that I got before. His change (medium size) was so horrible, found aside logic/programming errors also typographical errors (each changed file got littered with that)
I even had to hold his hand to get something nice 🙄
 
in my data.d.results in the network tab, this is how my data response looks
Department: "IT"
Friday: "2021-05-28T04:00:00Z"
FridayLocation: "Office"
FridayStatus: "P"
Monday: "2021-05-24T04:00:00Z"
MondayLocation: "Office"
MondayStatus: "P"
Thursday: "2021-05-27T04:00:00Z"
ThursdayLocation: "Office"
ThursdayStatus: "P"
Tuesday: "2021-05-25T04:00:00Z"
TuesdayLocation: "Office"
TuesdayStatus: "P"
User: {
Id: 1
Title: "Shap Dev"
}
Wednesday: "2021-05-26T04:00:00Z"
WednesdayLocation: "Office"
WednesdayStatus: "P"
I don't think I can change the data structure
 
wat
you can always change the data structure
 
8 mins ago, by KarelG
@BeerusDev process the data in a manageable object structure then
8 mins ago, by KarelG
a small pain for lots of gain in the rest of the code
 
Ah
My eyes deceive me
 
5:30 PM
teh app i inherited has a typo that was replicated throughout the entire app
wish i could just find/replace it
 
eh, we have a famous succes thing here, used as json key.
instead of notifying that error, the front-end team simply used it
 
"writePresetToLocaton"
 
Anyone have any references they can share? I have never changed the structure of the data I am pulling before
 
now their codebase is kinda filled with that and nobody wants to fix that (low priority but has high impact)
 
978
Q: How can I access and process nested objects, arrays or JSON?

Felix KlingI have a nested data structure containing objects and arrays. How can I extract the information, i.e. access a specific or multiple values (or keys)? For example: var data = { code: 42, items: [{ id: 1, name: 'foo' }, { id: 2, name: 'bar' }] }; ...

 
5:33 PM
@KevinB ya know what's better?
we've an international team with an US branch office
 
best part is the guy who wrote this app, previously railed against a previous developer for years about the typos they made
 
the word Organization "international" english often gets mixed with Organisation (British English)
our db admin is from UK
and uses the S one
his software coding staff as well
yet the rest of us uses Z
both got mingled šŸ˜‚
Organization organisation = getOrganizationById(organisationId)
 
I guess I should start from ground 0. create a function loadData() that calls a REST call to get my list/form data. and before I populate the datatable. restructure the data. This is going to be interesting.
 
even the database names does not reflect with what's in JPA and crashes a container of two because of these different naming
@BeerusDev you can either take Cerbrus or my structure. Or have your own. At least have one that is easy to use
 
Hello
I have one Angular related question
I have three buttons , 1. List, 2. Gallery and 3. Map
 
5:39 PM
123
 
I want to achieve when I click on any of these buttons
to display different content
456 :D
How can I do that ?
 
just update the buttons?
 
when I click List button, Gallery and Map related content should be hidden
 
work with states and have a flag for each button
and when rendering, use the flags?
 
I think I need to use *ngIf
 
5:46 PM
||> let o = {a: 1, b:2}; let r = {foo:'bar', ...o}; r
 
@KarelG "ReferenceError: bar is not defined" Logged: `` Took: 0ms
@KarelG {"foo":"bar","a":1,"b":2} Logged: `` Took: 0ms
 
||> let o = {a: 1, b:2, foo: 'what happens',}; let r = {foo:'bar', ...o}; r
 
@KarelG {"foo":"what happens","a":1,"b":2} Logged: `` Took: 0ms
 
is there a means to not override that?
o is given from function, r is locally created
gotcha use Object.assign
@BeerusDev going through a structure is a basic knowledge :-/
be familiar with the tools you can use: for..of Object.keys() .map(), .forEach() ect
 
6:21 PM
|| mdn prepend
 
!! mdn banana
 
6:40 PM
posted on June 24, 2021 by Prudhvikumar Bommana

The Stable channel has been updated to 91.0.4472.123/.124 for Windows which will roll out over the coming days/weeks. A full list of changes in this build is available in the log. Interested in switching release channels?  Find out how here. If you find a new issue, please let us know by filing a bug. The community help forum is also a great place to reach out for help or learn about commo

 
@JamesBot lol, just because there's 'banana'
Chrome being stable? That's like a cake....
> Node.insertBefore: Child to insert before is not a child of this node
... but it is a child of it šŸ¤Ø
console never lies. I must have passed a different container
 
6:56 PM
!!mdn pancake
 
7:55 PM
let foo;

(async function () {
  foo = await bar();
});

console.log(foo);
 

« first day (3904 days earlier)      last day (1046 days later) »