« first day (3339 days earlier)      last day (1592 days later) » 

12:31 AM
Anyone tried integrating npm package management with a java web app?
 
 
2 hours later…
2:21 AM
Tiktok......what a lame app.
 
 
3 hours later…
5:14 AM
This is probably a dumb question...but I started a "vanilla" TS project...everything compiles but...is there a prepackaged easy way to compile to a single file?
 
5:31 AM
43
Q: Typescript compile to single file

David LimkysI'm using TS 1.7 and I'm trying to compile my project to one big file that I will be able to include in my html file. My project structure looks like this: -build // Build directory -src // source root --main.ts // my "Main" file that uses the imports my outer files --subDirectories with more t...

 
I figured out how to do it with webpack.
Thanks though @JBis...is that the right way? Webpack?
 
idk, i just googled your question ;)
Maybe wait till tomorrow to ask your question, when there are more ts people on. I don't know TS so I couldn't tell you.
 
Yeah, I'd been there. Had some weird problems with it.
 
I may start using typescript
seems good
 
6:38 AM
y
 
Make the switch! It's....it's beautiful.
 
6:59 AM
Oof
Making a little game to practice TS...have to figure out how to rotate square without rotating canvas.
 
 
1 hour later…
8:06 AM
Hi
is Any Js libaray to reduce the image size with better result ?
?
 
 
8 hours later…
4:24 PM
Why do I always have to get myself into mess like that?
 
question: how do I get the value of a string without actually replacing the original string
like my string is datObject.datText
and im trying to do
 var text = datObject.datText.replace('~', '\n');
 
but it works when I first load the page, the default ~ that is in the string when the page loads is replaced by \n
 
I didn't think .replace mutates the original string
 
but when I actually go to replace it again after the page has loaded, it replaces the ~ in my datObject.datText with \n
when i want it to replace the ~ in var text
its really confusing to explain
 
4:35 PM
what Joey said. replace does not change datObject.datText
Put some code together that shows the problem :P
 
^^^
I suspect there's something else causing the behavior your seeing.you're
 
Kinda hard to setup a whole dat.gui object in chat
Ill show you the project
 
as you can see, the string's default value (Hello~World) is replaced with (Hello\nWorld) in the page load
but after page load
it doesnt replace it
it just puts ~ in the var text
like if you write ~ in the input afterward
 
what input?
do you mean where you edit the js code in codeine?codepen
 
4:39 PM
in the "Text [blahblah]" block at the top
its dat.gui controller
that last tilda was the one I TYPED in, but the one in the middle was created at page load, both go through the same replace code
but only 1 gets replaced with a \n
I tried clearing the whole input and just typing a tilda alone, and it still didnt replace it with a linebreak
 
ah. it sounds like the specification is "replace ALL ~ with \n". is that correct?
if that's the requirement, then I believe .replace("~") only replaces the very first instance it finds of ~.
and then just returns.
.replace 's first argument can also be a regular expression. so if the spec is to replace all instances of ~ with \n, then .replace(/~/g, '\n')
would replace all instances of ~ in the string.
 
oh im a fliptard... I havent used replace in like half a year
Yeah that fixed it
 
nah. I still have to look up replace.
especially when regex is involved....
sweet.
 
Hmm... If I wanted to replace a textual version of \n in the text and replace it with a real line break
how would I do so?
I tried writing \n in the string and seeing the value to see what was used to escape it
but theres no escape char
looks like just a \n written in default JS
 
if you want to replace \n via a regular expression, the \ has to be escaped like .replace(/\\n/g, "\n")
the g stands for replace globally.
the ` escapes the backslash in \n`.
 
4:50 PM
well I know that.. its just weird that somehow i wrote \n in the input, and it had no escape character, yet it was still rendering as pure text
I also know that some programs hide escape characters?
maybe thats why?
 
possibly. I'm unfamiliar with dat.
 
||> "test\n".replace(/\n/,"-boom")
JAMES!
 
JAAAAAAAAAMES! OH NO OH NO OH NO!
 
 
3 hours later…
8:18 PM
discord
more like, ripcord
 
 
1 hour later…
9:34 PM
James will be back tomorrow
 
 
1 hour later…
10:44 PM
I put faith on you guys: do not laugh out loud of my code, github.com/bacloud14/Interactive_Arrays x)
 
@Curcuma_ LOL
 
james is gonee?
time for Wietbot!
 
Just kidding. Also activaly -> actively on docs.
 
@Allenph LOL, I made myself a brand new website, with buzz words more than code itself, I know
 
What is it?
 
Does it just include libs?
If so, it's giving me CORS excecptions.
 
yep, oh, it does work for me, at least known libs, I am trying loading based on URLs, it seems to work too
with this warning: A cookie associated with a cross-site resource at cloudflare.com was set without the SameSite attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with SameSite=None and Secure. blabalbalaba
 

« first day (3339 days earlier)      last day (1592 days later) »