« first day (3555 days earlier)      last day (1377 days later) » 

6:20 AM
@greg-tumolo slightly shorter as /(R0[1-9]|R1[0-9])/ also you need forward slashes around it, not backslashes
 
user8729657
I just discovered network security
 
7:17 AM
@OvieTrix Remember, proper network security is indistinguishable from paranoia.
 
user8729657
Right... I'm just gearing myself and not using a GUI anymore.
 
user8729657
Bought this. ebay.ca/itm/…
 
that's a pretty good price for that machine.
Are you running it at home or are you going to host it elsewhere?
 
user8729657
Somewhere else, but where I work is dangerous because of a serious Covid outbreak and I'm the only one not effected.
 
user8729657
infected*
 
7:37 AM
@OvieTrix for personal use?
or do you intend to host a site/service (or multiple) with it?
 
user8729657
Multiple I have this travel project I need to work on after I get my gear.
 
for the latter, I advise to use existing hosts.
 
if for personal use, you can add that as part of your local network
 
user8729657
@KarelG, you need to come to Canada, it's a better life lol
 
7:41 AM
I am fine in Belgium, despite the high starvation records :P
but we count it differently (and correctly according to NY Times and a scientific report from ... one of those USA universities)
but lol, panic is the main problem here now.
 
user8729657
LOL
 
people is going on holiday in foreign country and there is QQ that they would come back infected.
using mouth masks in stores went from "waste" to "advisable, but not mandatory" to "mandatory" (after saturday)
 
user8729657
Everyone just needs to sit at home.
 
user8729657
I also purchased this ebay.ca/itm/254334169254
 
working remotely is the norm unless not possible. Each company has to provide a COVID-19 safe work environment by providing gels/masks/enough distance
 
user8729657
7:48 AM
@KarelG, I've had people acting aggressive towards me :D
 
user8729657
They don't want it though.
 
user8729657
Little spartans
 
where do you live?
 
user8729657
Canada
 
It is not so densely populated aside those cities at the east coast. But they're managing it fairly well
Brasil / USA however.
😬
 
8:11 AM
Hi I am trying to convert time from one time zone to another in javscript?
I fond that this works:
new Date().toLocaleString("en-US", {timeZone: "America/New_York"});

but this doesn't:
new Date().toLocaleString("en-US", {timeZone: "Eastern Standard Time"});
is there a wait to make it work with "Eastern Standard Time". This works with C#.
 
EST
but ... if you want to make it easier, use moment.js or luxon
 
I dont think "Eastern Standard Time" will work with moment.js
I think it too expects "America/New_York"
 
I rarely use such names (that EST)
I work with IANA's zone names, that America/New_York you mentioned. The reason for that is that there are multiple different named zones within a same time zome (GMT perspective).
 
Yeah well it's not a choice for me. This is what is available to us from a 3rd party API.
 
for example Peru/Lima is in same zone as America/New_York but has a different notation
write a function to transform the names
 
8:23 AM
"America/New_York" is IANA time name?
or "Eastern Standard Time" is?
is there a list somewhere of the mappings? Something that I could refer to for creating that function?
 
the former
many programming languages are using that as reference
 
is there a came for "Eastern Standard Time" then?
I guess its called windows timezone
 
that other zone name you mentioned :P
 
anyways.. i found this
https://github.com/mj1856/TimeZoneConverter
 
fyi AFAIK it also accepts UTC and GMT but not GMT-5 ect
@SamuraiJack nice find
 
8:34 AM
thank you for the info on IANA
 
9:28 AM
working with time is a programmer's nightmare :)
 
9:45 AM
couldn't agree more
 
10:36 AM
hey
 
11:02 AM
WHY IS JAVASCRIPT SO WEIRD xoxoxoxoxoxoxoxxoxoxoxoxoxoxox
 
Because it was made in one week.
 
 
1 hour later…
12:10 PM
That's noe excuse fine sir!
 
12:30 PM
@Squirrelintraining I'm sorry, it's the only simple one I really have. I suppose a better one is that it's a bit of a mishmash of syntax. It was styled to look like Java for honestly pretty bad reasons but it's not really similar to it. In fact, it shares more with Scheme of all things than Java. Another issue is that historically you'd have had various different implementation even thought there was a standard. Each browser could add its own things which would then not work on other browsers.
Microsoft was a big offender here as IE is notoriously non-compliant. There are various bugs in their JS implementation that were even inconsistent between their own browsers. When we now finally have some peace and quiet in terms of incompatibilities (well, mostly), it turns out that the JS ecosystem is completely bonkers and seemingly managed by insane people.
I'm not sure if you find this to be better.
 
Yes, yes I do.
 
12:50 PM
Just out of curiosity, why isn't there a "cross plattform JavaScript" which implements all common features and or translates between bowsas?
Or is there sth like that and I'ma just unaware?
 
 
1 hour later…
1:57 PM
Hello! As asking for a library recommendation is off-topic on SO, here I am. Are there any non-deprecated libs wrapping the node.js Streams?
e.g. JSONStream is not being maintained anymore... I'm just looking for something simple where I can do .map and .filter, but with streams... TypeScript support is a plus...
Or are you just supposed to use generators these days?
The thing is that mongoose's .cursor() returns a Node.js-compatible stream... not a generator..
 
2:41 PM
Anyone here with expertise in webdata rocks highcharts
 
@FaizaNasir 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.
 
@Squirrelintraining it's called jQuery
 
Hello, I am a newbie in NodeJS and asking for help.

I am building a blog website as my practice project with the ExpressJS framework in the back-end. And, using React for front-end. In the Post model, I have title and content properties. Because of the content, I am willing to use a rich text editor like (CKEditor) (any suggestion is appreciated). Is it good to store all the info from the rich text editor into the database? or there is a better approach? If I store all info, I am afraid each post may take more space in the database. (For example- if someone wrote a very large post with lot
 
a database would be an acceptable place to store text content
videos/images should use some form of file hosting/storage
 
Then, how can I extract images and videos from that rich text content? Thanks.
 
2:44 PM
In what form is it in said content?
most rich text editors just place text into the, well, text field.
an image for example is just an image tag.
pointing to an image elsewhere
 
@JakariaRidoy 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
 
const postSchema = new mongoose.Schema({
    title: {
        type: String,
        required: true,
        maxlength: [120, 'Title can be maximum of 120 characters long']
    },
    content: {
        type: String,
        required: true
    },
    author: {
        type: mongoose.Schema.Types.ObjectId,
        ref: 'User',
        required: true
    },
    upvotes: {
        type: Number,
        default: 0
    },
    upvotedBy: [{
        type: String
    }],
    downvotes: {
        type: Number,
 
1 message moved to Trash can
 
Thanks :) I didn't know about that.
@KevinB So, should I store all the things to the database. Thanks
 
3:08 PM
o/
so ... anyone experienced with mocha + istanbul?
I have an issue with actually getting the coverage to show up
when I run nyc mocha --recursive tests/ but in result I basically get:
  ✓ all the tests here


  11 passing (9ms)

----------|---------|----------|---------|---------|-------------------
File      | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------|---------|----------|---------|---------|-------------------
All files |       0 |        0 |       0 |       0 |
----------|---------|----------|---------|---------|-------------------
after some research it seems that using import instead of require() is what's causing this, but I have not found any solution that actually worked
ideas?
 
no idea
 
just at the moment that I am going to leave, I see an old, familiar face. 😐
 
that face is somewhat bloodied after being banged against a brick wall for a week-or-so
 
hi teresko 😀 I hope everything goes well for you.
 
you hi too :P
 
 
3 hours later…
5:57 PM
hello
 
@PrathamVaidya 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.
@PrathamVaidya 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
 
    Hey can anybody help me to run typeString() function.                                                   onInit={(typewriter) => {
            typewriter
              .typeString("hey")
              .callFunction(() => {

                    typewriter.typeString(this.data[i]);

              })
              .start();
          }
 
6:33 PM
I propose a new programming language (possibly esoteric),
it is called C Flat (or C--), because no one else seems to have come up with the name (which is definitely not the only thing I've planned for the language)
 
cool
what is the idea for the language?
 
Apparently C-- has been done already.. I guess all that's left is C♭ (C Flat)
@Wietlol No idea. Only just though of the names 😂
 
> (which is definitely not the only thing I've planned for the language)
ah, I thought you meant that there were some major ideas of how the language should work
 
Lol, nope (maybe someday in the future).

Besides, what problem would a new programming language solve today (except being an abstraction for software programming in newer computers & machines)?
 
@VLAZ @Linux4Life531, even shorter as /R(0[1-9]|1[0-9])/.
@Lapys C♭: Nice one!
 
6:47 PM
nothing's more fun than finding a race condition bug in 10 year old code
 
Lol, can imagine your reaction
 
i don't even understand it at this point, but, f'it a settimeout fixes it. i need to replace it
this is grade A jquery spaghetti code
 
What about requestAnimationFrame()?
 
it's an asset upload tool. it's built to support IE7, so it uses an iframe for file uploads. At some point in the process it starts the next upload before the iframe is ready to receive it, so it just hangs
it's not even worth spending more time trying to find a better solution, it needs to be deleted
it is at least well commented
but the way this app includes scripts, i can't access the code via the dev tools sources tab
so i have to edit the code itself to throw in debugger statements
 
Oh my. There's still code out there that's built to support < IE11..
@KevinB You gonna rewrite the code from scratch instead of refactoring?
 
6:57 PM
this whole system is going to get a new face within the year, which includes replacing this piece
 
the backend will stay in place
 
I have another problem. Solved yesterays one btw.
Bascially, I want to create a p tag and set its id & class
I have this so far:
this.msgTag = document.createTextNode(this.displayText);
this.msgTag.createAttribute("class", "message-text");
this.msgTag.createAttribute("id", ("message" + id));
And:

this.chatScreen = document.getElementById("chat-screen-wrapper");

this.chatScreen.appendChild(this.msgTag);
It is saying tgat this.msgTag.createAttribute is not a function
 
This asset management is way better than it was when i built this replacement 10 years ago, and i've had to improve/extend it over the years, but it's just run its course at this point.
 
I would do the following (which may be bad practice):
const p = document.createElement("p")
p.class = "message-text"
p.id = "message" + id
 
7:02 PM
the old way you could only upload 1 file at a time with a page reload between each, this one ofc works with multiple and without a page reload, so it was a good improvement. The next version will include auto-resizing of the files so we no longer need to upload 3 different sizes, and do away with the iframe
one day... we'll move away from coldfusion
one day
 
hi everyone o/
 
o/
 
:49885050 ...
this.chatScreen.appendChild(p)
 
|| formatting
 
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.
 
7:09 PM
How do I not format the reply link?
 
for that just do inline
 
@greg-tumolo kk thanks
 
longer messages split it up
 
@greg-tumolo, how would set the text though. Tried .value and .innerText
Sorry, got It working now
Thx so much
:D
 
@Linux4Life531 ;)
 
7:18 PM
I'm considering making an express like library for websockets HTTP over WebSockets. I think it reduce overhead for apps that make many http requests such as SPAs. Wondering what you guys think.
 
@JBis I see.
@JBis I think reducing overhead is good (obviously). What makes a library express-like?
 
it would work identical to express
 
Hey guys
Why is:
        this.msgTag = document.createElement("p");
        this.msgTag.id = ("message" + this.id);
        this.msgTag.class = ("message-text-" + this.owner);
not working
 
|| mdn HTMLElement.class
 
7:27 PM
class doesn't exist there
 
What do you mean?
 
|| mdn htmlelement classname
 
use that
 
I see now
Thx
Works perfectly!
 
7:30 PM
\o/
 
anyone else find you dont know js books really hard?
 
huh
i guess i don't need to remake express just the http
 
 
3 hours later…
10:08 PM
 
who here has used angular? Am I the only one who doesn't like the JS in the HTML attributes?
 
@JBis angularjs or angular?
actually used both, seemed fine for me
but now using react
can't find typescript chat, is it here too?
can anybody help with improving the working typing?
0
Q: Pass generic type argument through the literal object with different field names per each field if number of fields values is limited by 4

QwertiyWhat am I doing? I want to make mapping of an object field-by-field to objects of some generic type. I have 4 runtime cases (with runtime check and throwing exception if not matches) that I've used as a properties of original object: false transforms to Smth<unknown> | undefined true transforms ...

 
10:28 PM
@Qwertiy yes
@Qwertiy just learned there's a difference
 
@JBis do you think, jsx is better then js in html?
 
10:48 PM
@Qwertiy yes
but i maybe bias because that's all I've used
 
@JBis they are similar if you have proper highlighting
 
Maybe, syntax highlighting can make all the difference
Anyone ever use blitz.js?
 

« first day (3555 days earlier)      last day (1377 days later) »