« first day (3600 days earlier)      last day (1571 days later) » 
08:00 - 18:0018:00 - 23:00

08:29
    return document.querySelector(".button-controls").cloneNode(true).addClass("question-sub")
.addClass("question-sub") Here its the wrong syntax. Can someon tell the right one?
    return document.querySelector(".button-controls").cloneNode(true).classList.add("question-sub")   is this right?
hmm can I get the dockername a nodejs server is running in?
@VisheshMangla you know that you can try it yourself? Write it, verify code and learn something. That is easier to remember than when we give you an answer
@paul23 from Docker's (or K8s) perspective or from Node.js' perspective ?
from node's
So I can report which docker restarts when (with some extra fluff made by nodejs)
usually programs in containers aren't aware of being containerized. That's one of the essentials of containerization.
you need to operate from Docker if you want to track container states.
(which is a shell script or another Node.js script running shell commands)
08:45
hmm but a shell script run inside the docker can get he docker's name? That could work as that script could set an environment variable upon running node
I am not certain if Docker's Node.js image provide an API access, to be used by Node.js internally. It needs to be checked though.
Well we just run alpine with node manually installed :P
fyi alpine is a brand of a car πŸ˜‰
|| wiki alpine
Alpine refers to the Alps, a European mountain range, to the Alpine states associated with the mountain range, or relating to any lofty mountain areas. Alpine may also refer to: == Sciences == Alpine (goat), a breed of domestic goat Alpine plant, plants that grow at high elevations Alpine race, a supposed human racial class Alpine butterfly, or Erebia of the Satyrini, common in the Rocky Mountains of North America Alpine butterfly, or Parnassius in Eurasia Alpine fir, or Abies lasiocarpa, also known as "subalpine fir" Alpine newt Alpine climate, climate that is typical to higher altitudes Alpine...
not sure if the creator knew that.
noo not that D:
The Société des Automobiles Alpine SAS, commonly known as Alpine (French pronunciation: ​[alpin(Ι™)]), is a French manufacturer of racing and sports cars established in 1955. The Alpine car marque was created in 1954. Jean Rédélé, the founder of Alpine, was originally a Dieppe garage proprietor who began to achieve success in motorsport with one of the few French cars that were produced just after the Second World War, the Renault 4CV. The company has been closely related to Renault through its history, and was bought by it in 1973. Production of Alpine models ceased in 1995. The Alpine marque was...
@paul23 Just thinking ... You can set env variable through Docker and use Node.js access to it to figure it out.
look at docker compose: https://docs.docker.com/compose/compose-file/#environment
and see if you can get it from your Node.js script :)
(if you don't know how to πŸ‘‰ nodejs.org/api/process.html#process_process_env)
08:51
@KarelG yeah but that seems a bit error prone, it's our "fallback" but then an update might forget to "change" the environment variable while changing the docker names...
if you build with that file, it should not
hey guys
@BIramFiri 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.
{ HTTPError: Response code 404 (Not Found)
    at onResponse (/Users/xxxx/node_modules/got/dist/source/as-promise/index.js:142:28)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  name: 'HTTPError',
  code: undefined,
  timings:
   { start: 1598258677721,
     socket: 1598258677721,
     lookup: 1598258677722,
     connect: 1598258677770,
     secureConnect: 1598258677819,
     upload: 1598258677819,
     response: 1598258678161,
     end: 1598258678212,
     error: undefined,
has anyone had came to this problem while using jsdom/got module
actually am developing a program that can scrape all the url's of a website
...
you're asking for magic
08:57
magic ?
what you mean
an error without code
so sorry
i just wanted to know if you have faced such errors
i would like to fix this error myself if i can know what is the error
is this because of timeing ?
The error is probably just a manner of wrongly calling some function
if it's not the obvious "I am trying to get data from a server that doesnt' exist"
hmm yea i was thinking like that too since its 404
i got 401 too
but am not writting a code to get status code or anything
i am just writting to get url
yes and you probably get data from a server that responds with 404
(or doesn't respond at all)
but this is all magic - you need to show what you do otherwise everyone wastes time
09:04
@BIramFiri 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
user13399635
please who can help me please : stackoverflow.com/questions/63557740/…
@Botalbania 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.
 for (i in v){
                if (v[i].startsWith(vgmUrl,0)) {
                    const responses = await got(a[i]);
                    const doms = await new JSDOM(responses.body);
                    const aList = [...doms.window.document.querySelectorAll('a')];
                    const jsList = [...doms.window.document.querySelectorAll('script')];
                    aList.filter(isMidi).filter(noParens).forEach(links => {
                        if (links.href.startsWith(vgmUrl,0)){
                            console.log(links.href)
@BIramFiri 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
here v is collection of url's
vgmUrl = 'https://www.facebook.com'
09:08
fyi not all websites follows the standard.
there are plenty IDGAF if you want to check if they exist by proxying requests to a separate server when the main server is down.
what you see is a static page that it's down. But it is not because you got a 200.
i didn't get it is this for me kareIG
if (v[i].startsWith(vgmUrl,0)) i have checked if the first URL is facebook.com or not
i fixed this by adding
 const responses = await got(a[i],{throwHttpErrors: false});
anyway thanks paul and kareIG
09:28
Hey Hey How do we do job announcements now?
09:44
Hey guys, I'm not sure if react native is still in scope of this room, but I want to try it: I have a flat list and I want to be able click on an item so show details. However scrolling should still be possible. Does anyone have an hint for me?
No clue why that wouldn't be possible (I don't use react-native)
but there should be some kind of scroll container
@ShrekOverflow there are some containers that are highly optimized when each element has a fixed size. Those containers work much better when amount of items grows large
my items have random sizes
@ShrekOverflow the flatlist is btw one of those scroll views
10:04
@paul23 virtualised containers I am guessing
@rekire you'll probably have to take the de-opt
@Reez0 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.
@ShrekOverflow what do you mean with de opt?
@KarelG the answer to what I asked was both are wrong. ` let ele = document.querySelector(".button-controls").cloneNode(true)
ele.classList.add("question-sub")` is right. My code is 3 files big and MVCE is not possible to make and neither the console error is any verbose
element is none error in a function 20 lines above
@rekire Virtualized scrollers improve performance by basically not rendering elements unless they are visible, since your elements are of a dynamic size
you might have to take a performance hit , unless you can come up with some kind of cell grid size that allows you to not render the rest
They mention it in reactnative.dev/docs/scrollview (ScrollView vs FlatList)
10:34
Should I return a 422 status error when a csv file is uploaded but it lacks required columns?
Or is just 400 better?
> The HyperText Transfer Protocol (HTTP) 422 Unprocessable Entity response status code indicates that the server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions.
The syntax seems to be in-correct in this case, no? Or would you consider a missing column a correct syntax?
yeah that's what I wonder: what is the general consensus?
hey guys
@Omid.N 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 could explain that it's "correct" - file can be read and it's a detail that's incorrect. At the same time I can also argue that not the file itself is the content, rather the data inside the file describe the content. And as such missing a column is like missing a parameter when doing a request.
10:36
can you take a look at this problem
i think it is not correct
the last case:
1 2
69
in the output is not 0
that's not a programming problem lol
that's just simple math/numberatorics
@paul23 do not mix request validation error with serverside processing error
@paul23 yeah!
that is not a bad request. Bad requests are for eg requests that lacks required parameters
@KarelG you mean it shouldn't give an error and just return 200 with some special error code?
10:41
@KarelG isnt an invalid argument also a fine cause for a 400?
in angular 10... can you import the node http client rather than angulars HttpClient?
@Wietlol it is about an uploaded file missing a column
@Omid.N hint: just try the algorithm by hand for a few iterations and a small array, you'll get a O(1) solution.
i have the solution
but the last case.....
that's a pure processing error. 200 + tell missing columns
10:43
Uh I am misunderstanding I don't see any logic in the outputs
if the csv is uploaded with the request, I would say 400 is fine (because I have no clue what else to use)
if it is a pre-uploaded csv as configuration for the service, then it should be a 500
in sample input and output of the problem ...
@KarelG Well there's also the "line by line" interface option which hence gives an error on missing "data". So that would feel weird that for one flow (by hand) it uses http errors to handle bad user input. And for the other workflow it uses special return values.
@Omid.N My idea was that with say input array: [1, 2, 3, 4] (d=4) the results are for each k:
1: [4-1, 4-2, 4-3, 4-4] = [3, 2, 1, 0]
2: [4-3, 4-2, 4-1, 4-0] = [1, 2, 3, 4]
3: [3, 2, 1, 0]
....
if k is an even number, the output will be the same
@paul23 in step 2, wouldnt 3 be the max?
10:48
oh wait yeah my bad
now imagine the array is [69] and we do the operation twice the result will be 69
I read max as "length"
@Wietlol d does not change
if d does not change it doesn't really matter: k is even: r(a) = a; k is odd: r(a) = [max(a) - a_i, ...]
exactly!
now for the last case in the example k=2
the result is 69 again
but it says it should be 0
10:52
where, I still dont' get the 'k is given' - but if the answer should be 0 it's apparent d does change.
and when i submit my code i get an error
> Define one operation as the following:
1. Set d to be the maximum value of your array.
2. For every i from 1 to n, replace ai with dβˆ’ai.
> d does not change
I doubt that very much
so d does change !! let me try that!
no no no it doesn't change
how are you so sure?
Hmm it seems that the algorithm with d changing still "converges"
10:56
where should i put the code for the solution
?
@paul23 eventually
or at least iterates between two values (with one index being zero)
public static void main(String omkar[]) throws Exception
      {
         //query based
         BufferedReader infile = new BufferedReader(new InputStreamReader(System.in));
         StringTokenizer st = new StringTokenizer(infile.readLine());
         int T = Integer.parseInt(st.nextToken());
         StringBuilder sb = new StringBuilder();
         while(T-->0)
         {
            st = new StringTokenizer(infile.readLine());
            int N = Integer.parseInt(st.nextToken());
            long K = Long.parseLong(st.nextToken())%2;
this is the solution. sorry! d does change.
I still don't get where the "k" in the sample input comes from btw
in the same line that we get n
we split the line with " "
11:01
there's an uneven number of lines
what's that "3" doing
the number of times we get input
oh ok, that's clear.....
funny but testing it I can't seem to get more than 1 step before it switches between two values
Can't find an array I mean.
Like the follow iteration:
you see it?
11:05
Java in the JavaScript room
blasphemy
-3 -1 4 8
11 9 4 0
0 2 7 11
11 9 4 0
after 1 step always 1 cell is "0" - and one is the "highest", then after 2 steps the highest is 0 and the zero is the highest and it switches between those.
JABA FOR LIFE!
So... make a loopless solution :P
hehehe
I wonder if anyone here knows or remembers JakartaScript
11:07
at least make it bataviascript then ;P
BavariaScript?
Where's that problem from btw
codeforces.com competetive progeramming site from Telegram company
great thing to have high "Contest rating" and add it in your resume....
... Are questions like these really valuable?
Well I'm not one to talk: I need to brush up my resume and am thinking of doing something like edx/coursera to show I can do things. Having failed my university in the last year (aerospace engineering) I also need somethign to write down.
11:26
@paul23 yes they are. go see some interviews of microsoft or google and you will see that you should be able to solve problems like this!!
they are silly problems
anyone can do that
it was a warm up
Still: the "problem" is never problems you can solve. The "problem" is how communicate things to colleagues, how to design a plan of attack for something you cannot do yourself and how to understand when you need to ask others for help.
@paul23 my mom showed me her LinkedIn profile she's created a week ago
then she asked me if I had one so that she could find me.
Replied with: No :P
linkedin is awful
11:39
another one that gets it
but that's considered "not professional". Kek
*slaps with a website, glorifying me *
it's just a website for managers to get their e-peen up
and recruiters to harass people
@paul23 i will tick my hat for you if you can solve this:
Isn't that for you to solve, and not get people to do it for you
I have one profile view on linkedin
@BenFortune he said everyone can do it!
can you??
i can't
I have hundreds, all from shitty recruiters trying to poach me
11:44
I would take python to solve that btw
Yes, I don't like being harassed
>Still: the "problem" is never problems you can solve. The "problem" is how communicate things to colleagues, how to design a plan of attack for something you cannot do yourself and how to understand when you need to ask others for help.> that is an "issue"
doesn't look that hard, if you're online tonight I might actually solve it, I just need to figure out if the naive folding might mean you have fewer folds than maximum. (Naive is to just look from both sides to the smallest fold first, then work to the middle)
I'm online. so if you are a "competitive programmer" register for that site and solve problems there. in the last contest (that these two problems were there) you had 2 hours to solve 6 "problems" like that!
yeah I'm not going to register for things like that
11:52
you are not a CS student!
i get it!
...
fyi, we are here as volunteers. Background does not have a relevance in participating in a competition or not
it is you that have participated in that, aside from asking for pointers, it is you that you have to solve the problems offered.
what do you mean? do you mean I shouldn't have posted that problem here??
You can but don't be surprised if people just pop out :P
ok :) what are they here for , btw? everyone answer please!
12:09
I'm just wasting time whenever my head is bored with work stuff
and to ask some design questions that are not really fit for so
I am just hanging here.
😁
I guess I am too hard on myself then.... thank you
I'm just here for the occasional memes and shit code
just check the newest JavaScript questions Ben πŸ˜›
I got my gold node badge, I'm happy
12:23
nice. congratz
I'd rather not dive into the jQuery cesspool
@KarelG I mean I've had it for a few years now πŸ˜‚
I'm actually solving that problem @Omid.N: though not java
 
1 hour later…
13:25
Does any of you JS people fancy this? We are hiring a senior full stack engineer, who'll be focussing on the auth0 dashboard, I'm happy to refer you if I know you ... Pay is great, perks are exceptional and we just became 2x Unicorns. auth0.com/careers/job/…
Also @BenFortune @KarelG Hi!
risky time to switch from employer :P
> preferred locations: #US; #CA; #AR
what's with that hashtag?
@ShrekOverflow you have unicorns at your workplace?
I KNEW THEY EXIST!
@Wietlol and you can be one :P
@KarelG internal
@KarelG yes, I completely agree although we just raised a Series F so we should be in the clear ;)
idk what it's being meant with "series F" :/
13:33
probably @JBis (see job opening a bit higher) might be interested in that. Judging from what I have seen, he's pretty skilled related to JavaScript and security.
Oh yes, but IIRC he had an age conflict the last time I got excited
age conflict?
like age <> diff(birthday, now) ?
@KarelG so what happened to the rest of the folks in this room?
13:37
I did not have been here often lately as well. Remote work with one screen is less comfortable with *two* like my work setup :P
Many of them went away since the SE moderator "event" and did not have been returned after. Some of the regulars do come here, but only for a little moment.
@KarelG ah yes the days I used to have 2x 4K monitors :'(
@ShrekOverflow sup
This place is a cesspool of issues, I only come back every now and again to assess how bad it is
@BenFortune x)
It just keeps getting worse
I was only here recently to watch Yvette spiral out of control
o.o
13:47
@ShrekOverflow wrong side of the pond :P
Auth0 sucks, prove me wrong
Auth0 is an alpha build 😁
Nothing alpha about it, it's a soyboy beta service πŸ˜‚
speaking of an upgraded joke
I should look for a better job though, ever since corona crisis came I was due for renewal and only contract I got was "minimum wage since we don't know what happens with corona". Minimum wage really isn't much, and I've been told it's just normal raise you get each year.
13:54
I was lucky enough to be paid salary, at a job I can do remotely
I was lucky enough to not work remotely
for most of this year
working remotely is also kind of destroying my morale
I was only remote for 3 months
I've been back in the office a few weeks now
But that's even harder to find nowadays: a job that doesn't enforce part time remote work at least.
working remotely is the norm here. We go to office for meetings or when we need to have access to some protected servers that is not accessible from outside the office.
but if someone wants, they can come work at office.
13:57
we have airco at our office
the aim is to have not higher than 50% occupancy rate
when it is summer outside, it is winter inside :D
so especially last weeks, I am very happy about my office days
I'm in a converted mill, so it's relatively cool with all the brickwork
no AC though
not worth it in the UK
what's the heat.
:P
I do not have problems with it, but many people does.
16c here right now haha
13:59
someone even came to the office with short pants and a tanktop.
accompanied with slippers.
@KarelG it's the social interaction that I'm sorely missing
beach lifeβ„’
The idea of actually sitting neck to neck and hugging
@paul23 another thing why we allow people to come at office if they want
those smalltalk at the coffee machine
Like high five when you solve something that's been troubling, or a hug when you have to go home when it just didn't work.
Really need that physical contact every once in a while.
14:01
@BenFortune 19/21 here
that high five thing for solving something is new to me
the first person that hugs me because they cant solve shit get a fist to the face :D
I have a very large intimate zone
Not loud or something but like when you work on a problem and some close collegaue knows that after you solve it go to the coffee machine and quietly high five when solve it, while treating yourself on a few minutes of rest.
14:29
Quick Question. When pulling through AJAX from Sharepoint lists, Ive seen people will put a file as the URL which confuses the hell out of me. When I visit the page I am pulling from and hit CTRL+U, I find the JSON data that it is pulling from in a variable called WPQ1ListData is there anyway I can use that
HI GUYS :)
@AathikAhamed 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.
14:52
@BenFortune I don't understand why you say that :) but, we can probably have small chat about that over beers :P
I'm just having you on :P
I've never tried it
15:32
I was finally able to get this damn DataTable to append to my landing page, but now when it reads the list item info it doesn't post it to the DataTable it just says Loading...
0
Q: SharePoint AJAX/jQuery DataTable Stuck Loading

zgoforthI have made huge progress, I couldn't even get the DataTable to append to my landing page on SharePoint, but now the DataTable posts but the Items do not populate. In the code I will provide, it is running to one subsite "XDeliverables" and eventually I am going to need it to pull from three list...

Yo yo yo o/
How's everyone doing?
15:47
Good you
awesome
Would anyone know why when calling an item from a Sharepoint List that is a choice type, it says "Invalid Date" For every location where the Approved column it is pulling from is.
I try logging it to the console aswell and it doesn't log anything
16:05
Bored. I need to find a new project to work on.
16:20
i'm workin on finally wrapping up one
im starting to learn C++ with Qt
16:47
var urls = ['/url/one','/url/two', ....];

$.each(urls, function(i,u){
     $.ajax(u,
       { type: 'GET',
         data: {
            answer_service: answer,
            expertise_service: expertise,
            email_service: email,
         },
         success: function (data) {
             $(".error_msg").text(data);
         }
       }
     );
});
should this work for multiple urls AJAX call or no, Ive read that you both can and cannot call more than one URL in a single ajax
posted on August 24, 2020 by Prudhvikumar Bommana

 The beta channel has been updated to 85.0.4183.83 for Mac, Windows and Linux platforms 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 common issues. Google Ch

17:50
@zgoforth $.each(arr) is equivalent to arr.forEach() in this case, in that it loops over the array and does $.ajax for each item in the array
so as best I can tell, you're basically doing the ajax calls one at a time
it works, because it's one ajax call for each url, not multiple URLs in one ajax call
... it works unless there's something else broken :)
@JBis Ooh, have you tried QML yet?
may I ask you why this function is always returning false ???
return pattern.test(Email_Address);
08:00 - 18:0018:00 - 23:00

« first day (3600 days earlier)      last day (1571 days later) »