« first day (3868 days earlier)      last day (1063 days later) » 

9:53 AM
hmm is there an optional operator for empty arrays?
aha got it
for those curious;
||> let obj1 = {arr: []}; let obj2 = {}; let obj3 = {arr: [1,2,3]}; [obj1.arr?.length, obj2.arr?.length, obj3.arr?.length]
 
@KarelG "SyntaxError: Identifier 'obj1' has already been declared" Logged: `` Took: 0ms
@KarelG [0,null,3] Logged: `` Took: 0ms
 
therefore
display(json.arr?.length ? json.arr : ['general error'])
 
10:28 AM
0
Q: Unable to use Quokka - shows unexpected token

Ehuriah EmekaI just installed quokka but I've been unable to use it. How do I resolve this issue (kindly refer to the uploaded screenshot.

😂
 
10:48 AM
hmm..
 
11:02 AM
35 minutes ago
 
posted on May 19, 2021 by Michaël Zasso

Notable Changes [36b948560c] - (SEMVER-MINOR) async_hooks: use new v8::Context PromiseHook API (Stephen Belanger) #36394 [c0deeeacb2] - lib: support setting process.env.TZ on windows (James M Snell) #38642 [4c4902748c] - (SEMVER-MINOR) module: add support for URL to import.meta.resolve (Antoine du Hamel) #38587 [c182198c44] - (SEMVER-MINOR) process: add 'worker' event (James M Snell) #

 
 
1 hour later…
12:11 PM
o/
 
 
2 hours later…
2:13 PM
CSS, I want container that works like the flex (in that it wraps), but also as the grid (in that it sets sizes)
 
Hi All
I was appearing for an interview on Nodejs.
the interviewer asked me
Tell me few nodejs API's that you have used,
I tried to reconfirm whether he was interested in knowing HTTP method types (GET,PUT,POST) but no, he was interested in nodejs api's
when I try to google, what comes only with node is HTTP methods, but I don't see any results related to nodejs api's
 
Jay
Hey guys
How is it possible to next a date in the future that is 4 days in the future but these are working days (mon-fri) excluding the weekend days
Lets say I have todays date whioch is wednesday and I want to get the next day after 4 working days: wednesday
 
2:29 PM
@TheJOKER well, for example, the DOM Api is a web api, an api implemented by browsers
a nodejs api would be, for example, fs
poor terminology to use imo
 
@TheJOKER he meant the native API functionalities, one of these nodejs.org/dist/latest-v14.x/docs/api
That's what people used to tell when talking about <platform> API (like Java API). If you're not sure, ask for confirmation by "do you mean those native API functionalities such as child_process.exe".
 
can I say it like, which nodejs modules have you integrated?
 
mr @KarelG do you remember that issue which i talked about that day about map entry not showing after fetch, i think after 5-10 seconds if I wait it shows all entries!! but not before that
this is so strange
 
2:45 PM
jsfiddle.net/BeerusDev/mznL52p8/47 . This is applying a style to the parent row based off the most recent object in the object array, instead of styling it based off the most occurring dayStatus'. Like in this example, there are 3 where it should be red, 2 where it should be green, and one where it would be yellow. In essence it should style the parent group red because its the most occuring, but it styles it green because that is the last object in the object array?
var result = Object.keys(data).find(key => typeof data[key] === 'string' && data[key].startsWith(today)); // "Monday"
                    console.log(result);

                    var todayStatus = result ? data[result + 'Status'] : 'n/a';
                    console.log(todayStatus);

                        if(todayStatus === "P" || todayStatus === "TW") {
                            statusClass = 'green';
                        }
                        if(todayStatus === "NR" || todayStatus === "TRV") {
This is what it is currently styling off of
 
3:00 PM
pfft jQuery
$(element) does not work
oops. it does
sorry jQuery <$
 
lmao
 
3:24 PM
i got node installed and nodejs installed as well. i executed a sample hello world code and it's successfully running. i wanted to use nodejs file handling feature in it...

however, i am using firebase in a project., its running in port localhost:4000. my sample of nodejs running in localhost:3000

how to use nodejs in any prefered host and port or even by default port or even without port
@KarelG
 
I've been here longer. KevinB is even "older" than me
@KevinB you're almost celebrating your 10 years soon heh
 
indeed
and yet it's never felt so pointless to contribute
 
awesome
guys
i got node installed and nodejs installed as well. i executed a sample hello world code and it's successfully running. i wanted to use nodejs file handling feature in it...

however, i am using firebase in a project., its running in port localhost:4000. my sample of nodejs running in localhost:3000

how to use nodejs in any prefered host and port or even by default port or even without port
 
posted on May 19, 2021 by Bindu Suvarna

Hi, everyone! We've just released Chrome 90 (90.0.4430.216) for iOS: it'll become available on App Store in next few hours. 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. Bindu Suvarna Google Chrome 

 
3:45 PM
i wish i will become great coders like you guys
i was always curious that what could have made you guys so great in coding
 
solving problems
lots of problems, frequently, repeatedly,
if you can efficiently solve problems, you can pretty easily move into any programming language
 
what you guys used to solve problems...
any platform
or like sudoku
 
stackoverflow
 
oh wow
i couldn't even move an inch in SO
i always felt so difficult
 
and by solving problems i mean answering
not asking, ;)
unfortunately most of the easier questions have been answered and are now duplicates
 
3:53 PM
i see a lots of space to do in UI but i understood that never going to climb me up on the hierarchy ladder... thinking add either java spring boot or AI as an additional skill ...
 
4:11 PM
the SO site is not qualitative anymore nowadays
you get old questions and answers when trying to search for a specific approach to tackle down your problem
like for my java's Spring framework, many I have seen are all not relevant anymore. I had to dig in the documentation for a more recent solution
there will be a day that I'm not going to recommend it anymore
 
-1
Q: Why does my MySQL query hang after populating dictionary?

Yatuz1aI have this snippet of code here: const mysql = require('mysql'); function runSync(uName, uPass, dbN, sqlQ) { const resQuery = {} con = mysql.createConnection({ host: "localhost", user: uName, password: uPass, database: dbN }); con.co...

> What is wrong
everything
what isn't wrong
 
Ya know
I ignore JavaScript questions if the code lacks something important; the ;
 
I just don't understand how people end up with code like this
like, when i write code, i do it... step by step
i write code, i run it
if it works, i continue
if it doesn't, i iterate till it does
i don't write out an entire solution and then test it at the end and wonder why it doesn't work
or see it not work and just keep going anyway
 
I called it the "google generation"
1. open google
2. search for your problem
3. get on a page with code snippet
4. copy/paste
5. small adjustments
6. run
7. facing problems and creates a post/question asking "what's wrong"
5
 
"and i'm not sure why you're calling it with new" i'm betting they called it with new because doing otherwise resulted in undefined
> problem solved!
 
4:20 PM
I have had a dude here asking for moment.js, to get today, yesterday and the day before that. Then he asked how to check if a date is after that "day before yesterday". I was like "aint it in the doc?"
heh it is even starred?
 
it's just so frustrating
lol
there's this whole world they're missing out on because they for whatever reason aren't doing iterative development
 
Hello Friends,

I have a basic question. So I have a table and it has 4 rows and multiple columns. One column has a class Order number. How do I get the value of the last row and column with class Order Number?

I know can get the number of rows from $('#myTable tr').length;

How do I proceed after that?
I can't use direct column number because number of columns keep changing, so can't hardcode and get the value.
 
@KarelG I wonder the age distribution of the people doing that. I would think it would be mostly teens, but most these people seem way older.
 
@The_Outsider select all table cells with that class, and then get the value of the last one
 
Thanks, i will check
 
4:27 PM
jquery has a convenience method for this called last
alternatively, the last one would be in the table row with an index of length - 1
 
||> [1, 2, 3, 4][-1]
 
@JBis undefined Logged: `` Took: 0ms
 
why did i think that worked
 
oh, heh
jquery also has that feature iirc
.eq(-1)
 
@JBis hmm you're right. I should call it as "google developers" for now
 
4:31 PM
hmm.. maybe it doesn't. it's not documented
 
@KevinB TMK it subtracts from the length if it's below 0. I believe it's documentation because that would require specific implementation
*it's documented
 
||> [1, 2, 3, 4].slice(-1)[0]
 
@JBis 4 Logged: `` Took: 0ms
 
there we go
 
||> [1, 2, 3, 5]["length"]
 
4:34 PM
@MisterSirCode 4 Logged: `` Took: 1ms
 
thats hilarious
 
> Providing a negative number indicates a position starting from the end of the set, rather than the beginning. source: jQuery.eq()
 
TIL that you can access type fields using a string array selector
 
length is a property?
 
yea, it does work with .eq as well
 
4:35 PM
@KarelG seems to work that way, since its accessible via .length
 
hmm, i just failed to find that in the docs then
:p
ctrl+f is better than my eyes
 
If I try a function, itll just return the function, not call it
||> [1, 2, 3, 5]["pop"]
 
@MisterSirCode undefined Logged: `` Took: 0ms
 
[1, 2, 3, 5]["pop"]()
wonder if you can call it somehow like so
||> [1, 2, 3, 5]["pop"]()
 
@MisterSirCode 5 Logged: `` Took: 0ms
 
4:36 PM
works
 
||> ["corn"].pop()
 
@JBis "corn" Logged: `` Took: 0ms
 
makes sense
 
JamesBot's microwave doesn't work properly
 
arrays are objects so
 
5:16 PM
 
6:12 PM
little help, typescript needs type for and a and e parameters
export const pick = (obj: object, props: Array<string>) => props.reduce((a, e) => (a[e] = obj[e], a), {});
What should I provide ?
 
!!mdn reduce
 
presumably in your case they're both the same type, whatever type {} is.
eh, no
one is always a string
the other will always be {}
 
i tried a: object and e: string
but its still saying its not right
 
:shrug:
i've never used object as a type
 
6:17 PM
HEy
Going off of what I stated earlier, I found a "solution" I thought would work, but it doesn't add the statusClass to the row. facepalm
var todayStatus = result ? data[result + 'Status'] : 'n/a';
                    //console.log(todayStatus);
                    var counter = {red: 0, yellow: 0, green: 0 };
                        if(todayStatus === "P" || todayStatus === "TW") {
                            counter.green++;
                        }
                        if(todayStatus === "NR" || todayStatus === "TRV") {
                            counter.yellow++;
                        }
                        if (todayStatus === "PTO" || todayStatus === "H") {
 
why not
 
Everything in console looks as it should, no errors
 
my browser can't handle that much
 
wym
 
i mean i'm not gonna sit here waiting 30 seconds for your fiddle to load
 
6:25 PM
thats weird, it loads right up for me
 
hence, my
:)
 
lack of reading on my part
 
windows says my cpu has 1 core, 2 logical processors
it's a cpu that was released 9 years ago
 
Laptop I am assuming?
 
nope
work pc
 
6:30 PM
Nice, I prefer laptop if possible. Got mine connected to two monitors. This laptop is better than any PC I could have got for work haha 32 GB ram so nice
I like being mobile
 
i liked having a laptop during my hs/college years
they're useless to me now
this pc has 8gb of ram, home one is 32
 
Why "useless"?
 
because i'd be using at stationary locations that i mightaswell just have a tower at
 
This is very true
 
i also tend to upgrade my home pc bit by bit, every year
this year i doubled the ram, next year it'll be time for a new gpu if the gpu market ever unscrews itself
 
6:35 PM
I need a personal desktop... Haven't touched my POS laptop since I graduated it can barely run word its so crappy. (Hesitate before commencing roasts) I may just buy a prebuild so I can get a 3080 or a 3090 already built in since they are impossible to find solo
then upgrade the other stuff
(if needed)
 
i started with a prebuilt, like 15 years ago
 
I just want the GFX card, aside from that I would never buy a prebuild
 
eh, it's not a horrible choice tbh
as long as you don't have to do any of the setup/install etc yourself once it arrives
 
So buy a $1200-$1800 prebuild with a GFX card that is reselling almost that price itself
makes sense to me
 
i mean
most of them are going for 4k+
the ones that include 3080's or 3090's that is
 
6:37 PM
Unreal
I saw one for 2k not too long ago
I think it was an iBuyPower
 
that's where i got my prebuilt
took nearly 3 weeks to come in, but no problems
 
They're a good company, a bit overprice if I am being honest. But worth it I guess
 
right, i mean, you're paying for convenience
someone to order all the parts, make sure they're all compatible, put it together, install windows, etc
 
Another reason I want such a nice GFX card is so I can mine $ETH
 
for someone who's experienced ordering parts/putting it together, it's probably a bit of a waste
 
6:40 PM
Why is that
 
because you're paying somoneone to do something that you can do in minutes
 
Oh
 
where as if you're not experienced in it, you're potentially saving money because there's no chance you'll break it
 
I thought you were talking about something else
Have you ever looked into creating a blockchain?
thats my next expirement when I have free time
 
no
 
6:44 PM
Going in blind on this one.
Fixed that damn counter I am such an idiot. Look at those if statements
if(counter.green > counter.red && counter.yellow){
                        statusClass = 'green';
                    }
 if(counter.green > counter.red && counter.green > counter.yellow){
                        statusClass = 'green';
                    }
logically, I feel like that first statement could/should potentially work. Boy am I far off
 
posted on May 19, 2021 by Prudhvikumar Bommana

 The Beta channel has been updated to 91.0.4472.69 for Windows, Mac and Linux. 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. Prudhvikumar Bomma

 
if max green/red/yellow equals green then
 
7:14 PM
hey, I keep getting this error on chrome
Unchecked runtime.lastError: This request exceeds the MAX_WRITE_OPERATIONS_PER_MINUTE quota.
it doesnt do much, i think everything is working as it should but it filling up my console for some reason.
 
i've never heard of that
0
Q: Chrome extension "MAX_WRITE_OPERATIONS_PER_MINUTE" error

No NAMEI use below code: setInterval(function(){ chrome.storage.sync.set({'serverTime': "***"}, function() { console.log('Settings saved'); }); }, 50); After 10 seconds I get below error: Unchecked runtime.lastError: This request exceeds the MAX_WRITE_OPERATIONS_PER_MINUTE quota. mani...

 
I knew I would run into this...
With that counter I created, if 2 todayStatus are green, and 2 are yellow. It is going to post grey and add no class to that group.. I need to figure out how to use percentages
after the if statements, would this make some sense?
var countTot = counter.green + counter.yellow + counter.red;
var greenTotPerc = counter.green/countTot;
 
!!mdn math
 
@KevinB Thank you, I'll take a look.
 
7:27 PM
I am starting to hate typescript, wasted nearly 4 hours trying to understand how to fix "noImplicitAny" error for a utility function that uses Array.reduce()
 
it's important to remember why typescript is being used, and whether or not having it affect a given scenario is worth the trouble of not just saying "ignore this line"
(and coming back to fix it later)
 
 
1 hour later…
8:34 PM
i am trying to use this
<a href="https://path/to/myAWS/CDN" download>Download</a>
and it doesn't seem like it download as expected, instead it opens the file in the browser tab
any ideas, how i can have the pdf file gets downloaded on click?
 
> download only works for same-origin URLs, or the blob: and data: schemes.
@JoeSaad are you sure the url is same origin?
 
given that it's an aws cdn, i'd guess not
though possible
 
8:58 PM
posted on May 19, 2021 by Bindu Suvarna

Hi, everyone! We've released Chrome Beta 91 (91.0.4472.69) for iOS: it'll become available on App Store in next few days. You can see a partial list of the changes in the Git log. If you find a new issue, please let us know by filing a bug. Bindu Suvarna Google Chrome

 
9:11 PM
I need to develop a SPA having really good support for SEO
What should I go with?
Next.js or Nuxt.js?
 
heh
 
Which has more community support? That if i get struck in future, I will get answers easily
 
i've never used either
 
What do you use?
 
i install express and the modules i need for it myself
 
9:13 PM
What do you use for front-end?
 
in the past, i've used react
atm i don't really have much of a front-end
 
Can you suggest me, please?
Something that is scalable and flexible
 
one of those is vue, the other is react
 
yes
 
my personal choice would be react
i've never used vue, and see no reason to learn it given that i already know react
 
9:15 PM
I know both of them so I was wondering which one should I go with
As both of these provide SSR support out of the box
 
imo, the more important question is, how static is your site
 
Angular was a bit pain to do so
 
should it be a spa
like, i've seen people use react and whatnot for personal portfolios, where there's no real benefit to gain from doing so
 
It is a client requirement
@KevinB We are making this actually:
https://3almap.com/
@KevinB So?
 
¯\_(ツ)_/¯
i can't make the decision for you
 
9:23 PM
:)
 
I would use react, but again it's because it's what i know best
not because i have some insider knowledge of it compared to vue
what i do know is SEO can be tricky for any SPA solution
for the best coverage, your app would need to be able to function as if it weren't a SPA
effectively, you'd need to decide what pages in particular would need to be SEO optimized, under what keywords/localities, and design around that
 
okay Kevin. Thank you for your help
 
 
1 hour later…
10:41 PM
@JBis it's not the same origin.. it's in a different cdn
what's the best way to go about solving this?
 
11:05 PM
anyone here ever do these? cryptopals.com
@ZahidSaeed I don't know anything about Nuxt but I know next is made for that.
I've used Next, and its very easy to use
 
posted on May 19, 2021 by Ben Mason

Hi everyone! We've just released Chrome Beta 91 (91.0.4472.70) 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. Ben Mason Google Chrome

 

« first day (3868 days earlier)      last day (1063 days later) »