« first day (3525 days earlier)      last day (1645 days later) » 

02:10
I am starting to regret this angular universal
 
1 hour later…
03:18
My class is outputting an error telling me that a method in my class isnt a function but every linter and code corrector is telling me that its perfectly fine
03:30
@ChristianMatthew stop pinging people
ask your question and people will answer if they are aval and want to
don't @JBis don't ping me
2 messages moved to Trash can
I'm explaining the rules to you. If you don't like them then you can leave.
where does it say don't ping people
that's dumb
it's not like I was going crazy pinging people
"Do not mass ping"
03:33
> If you are not getting help or attention pinging random users will not get you any further, and will just annoy everyone. It is a great way to ensure you get no help and ignored.
Do not mass ping people.
I wasn't mass pinging
like you realize how petty you're being right now right
You pinged multiple people for help
:3
I pinged 1 person today
Wow this dude is pretty immature...
If you cant handle Stackoverflow, then leave
no you're being immature
look at you
03:34
In what way?
Its a serious question. In what way.
Well?
This room was placed in timeout for 1 minute; This is unproductive
That was cool lol.
Christan. You know the rules. End it here. Taylor please try to avoid confrontation and let RO's handle.
Sure thing.
Thank you
|| joke
03:36
If you put a million monkeys at a million keyboards, one of them will eventually write a Java program
the rest of them will write Perl
So wait I want to make sure I was following the rules
I didn't mass ping anyone and are you saying that I shouldn't ping anyone ever at all.
Wow that joke... that was absolutely terrible but I still loved it lol
It's simple. Do not ping someone unless you are actively in a conversation or need to mention them for a specific reason.
i was mentioning weitol because I thought he was most apt to answer the question
it's not a ping of hey look over here it's I think this person might know the answer
It doesn't work that way
03:38
if they don't answer I don't ping them again at all
Fine, I will make it simpler for you. Don't ping people unless you are responding to a specific message. Just post your question
@ChristianMatthew What is your issue with websockets?
my issues with websockets are I can't get it to work with an angular universal app
9
Q: Angular Universal server rendering WebSocket

MarcoAre there any examples of Angular Universal with WebSockets? Serverside rendering does not know wat a WebSocket object is in my case. And if I use socket.io the node server hangs when trying to make a connections. Some additional information about the problem: I downloaded angular-universal-s...

does that help?
I've read that it's not my issue
describe your issue
03:41
that's for the client
I have spent 3 days on this
I think it is the server angular render engine that is blocking me
What exactly is the issue you have. If possible, can you provide code.
it won't emit a socket
I have the code
If you would like assistance, please create a Minimal, Complete, and Verifiable Example
03:42
hold on
that's the code sample. If you run the angular cli and get the universal pacakge that's all you have to do
to see it not work
Well it seems to be a well formatted question. I see you asked it today, so its relatively new. Sometimes it takes time for someone with an answer to come by. I dont work with angular so this is as far as I can go
@ChristianMatthew ...you aren't listening for a websocket request
thanks. I will wait. but It is something with the angular server
I am jb I just removed it because it wasn't working in any configuration
I am doing something inherently wrong and I don't know where to start.
Ok. You don't have anything listening for websocket requests.
I have to have it too because I am running data from a form / service that will need it to render onto the webpage when complete
in the browser I test when I have it running let test = new Websocket('ws://somethingsocket.com')
i didt
that is what I was using.
Show code with that implemented
It won't work
Show me what you tried
lol I swear to you I've been on this for 3 days
I am not bsing' you
let me show you what the error is
the pixpony is what I tried
i also tried this
0
A: Typescript error for "app.ws" using express-ws

StramskiExpress.Application does not have a member called ws. That's the error you get. You need to use the return value of expressWS(server, httpsServer). The app you can access there is typed as Express.Application & WithWebsocketMethod.

import * as path from 'path';
import * as express from 'express';
import * as expressWs from 'express-ws';

const SERVER_PORT = 8090;

let appBase = express();
let wsInstance = expressWs(appBase);
let { app } = wsInstance; // let app = wsInstance.app;

// Http Routes
app.use('/assets', express.static(path.join(process.cwd(), 'assets')));

// Ws Routes
app.ws('/echotwice', (ws, req) => {
  ws.on('message', msg => {
    ws.send(msg + msg);
  });
});
essentially this is what I kept trying
03:51
codepen.io/SkylerSpark/pen/QWyyKed I rewrote my logic and its still reporting the same error
its saying a function that exists in the correct syntax isnt actually a function
@ChristianMatthew what error are you getting here
'ws://localhost:4201/echo' failed: Connection closed before receiving a handshake response
that is when I test it in the client
directly on the browser
@ChristianMatthew you should be doing appBase.use and appBase.ws here
what do you mean
@MisterSirCode yeah because your call doesn't have the proper this context
query(".circleNav").addEventListener("mousemove", cNav.debugMouseLocation);
query(".circleNav").addEventListener("click", cNav.applyMouseLocation);
change that to
03:54
   let ews = expressWs(app)
Thats what I guessed but I just didnt know how to change its context
pretty much that is the instance of the ws
query(".circleNav").addEventListener("mousemove", (e) => cNav.debugMouseLocation(e));
query(".circleNav").addEventListener("click",(e) =>  cNav.applyMouseLocation(e));
let appBase = express();
let wsInstance = expressWs(appBase);

// Http Routes
appBase.use('/assets', express.static(path.join(process.cwd(), 'assets')));

// Ws Routes
appBase.ws('/echotwice', (ws, req) => {
  ws.on('message', msg => {
    ws.send(msg + msg);
  });
});
Ok thats simple. Thanks
@JBis 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
03:55
@ChristianMatthew try that
@MisterSirCode it's the same reason you need to do .bind(document) at the top with your query selector thing
what about http routes. I have routes in my app will this affect that?
well you need to integrate it with your app,
yeah even half a year after being introduced to this statements, the this context is still confusing
03:57
but I already have that
  const server = express();
  const distFolder = join(process.cwd(), 'dist/ai-xxxxx-frontend-website/browser');
  const indexHtml = existsSync(join(distFolder, 'index.original.html')) ? 'index.original.html' : 'index';
so you need let wsInstance = expressWs(server);
besides this
but still do stuff on server
// Http Routes
appBase.use('/assets', express.static(path.join(process.cwd(), 'assets')));
I have done everything else
gtg night o/
03:59
because I already have my static asset folder setup
ok well thanks. I do appreciate you trying to help.
the server is the problem. that's not the real server
see look
    export function app() {
 ...

  return server;
}
function run() {
  const port = process.env.PORT || 4000;


  // Start up the Node server
  const server = app();

  server.listen(port, () => {
    console.log(`Node Express server listening on localhost:${port}`);
  });
}
this is the issue. It is not binding to the server correctly
I've used websockets many many many times.
this issue is perplexing me because I can't figure why this isn't working.
never used angular universal before
04:27
Holy hot damn it takes longer than youd expect to make a good looking monocircular length debugger
04:58
aint she a beaut
05:18
Ok well I finished my Monocircular "length debugger" tool. Its very silly looking, but its functional for what I need it for.

Im specifically planning on using this to help me achieve physics simulations on circles
Its got some nice features
Overflow prevention, you can use it across the entire document, I have an automatic length measurement generated whenever you move. You can click to set the measuring point, then drag with the mouse to see length
05:33
Alright im tired
Making a circular measurement tool fully animated and dynamic isnt easy on the head... especially when you havent been using javascript in weeks
Don't use JavaScript and drive.
2
You got that right... I once was coding on a school laptop using cellular on a bus. Some kid rammed into us. Half the kids were screaching
True story ^
Teenager drove right into the back of the bus
Big brain kids these days
Goodnight now. That is if I even get any sleep
Good night!
 
1 hour later…
06:54
@ChristianMatthew no
 
1 hour later…
@ÖmürcanCengiz 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.
dhS
dhS
08:51
Hi
Is it possible to implement server-side pagination from front end to less the loading time of the datatable
09:32
@dhS yes, it's possible. A lot of libraries that create paginated tales also have an option for server-side pagination. You'll have to check the documentation for how exactly to set up yours but it's possible. You need to export some endpoint that the library then uses to ask for more data.
dhS
dhS
10:30
@VLAZ bro where do i find any library
i have searched alot
I found ajax call for serverside pagination only that is also not working
dhS
dhS
Yes ajax call from data tables i am using
Eggs.Cthulu(<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>)
@RedMercury 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.
dhS
dhS
1
Q: unable to send data of pagenumber and pagerows per page in ajax call in pagination jquery datatables

dhSI am trying to load data from ajax call from the pagination on the html page but it is somehow not working.. not able to understand the problem <script src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"> <script type="text/javascript"> $(document).ready(function(){ ...

This is the question.. could you please look the code where i am going wrong in it
10:35
Insert coin
Insert coin
According to the documentation you should be setting serverSide: true as well as processing: true and ajax should be a URL.
dhS
dhS
Okay I am trying
@phenomnomnominal *insert coin emoji here*
How do you make the Asteroids easter egg work?
You piss off your DM. Then rocks fall and everybody dies.
10:43
Goddamn it
Doesn't sound like you like than answer but that's the only way I know of making asteroids happen.
Hasn't worked for me IRL, so far, though.
So it looks like one easter egg gets added to the server rendered page
There's an Eggs.load = function(e) {
and if you change e to 'Asteroids', then you get Eggs.Asteroids in the global scope
insert coin
Hah, got it
share your secrets, oh wise one!
10:49
Go to chrome dev tools, put a breakpoint on line 8361 of master-chat.js when pretty printed
Refresh, and when it hits the breakpoint, do e = 'Asteroids' in the console
Then once it's loaded, run Eggs.Asteroids('insert coin')
I only have 8169 lines in FF
Look for var t = $("script")
In master-chat.js?
Doesn't exist there
Look for an Eggs.load function?
foind that
10:52
put a break point on the first line of that
ah, single quotes
around script
Ah
It's a pretty cool game actually
Pretty good!
I've seen a bookmarklet that was similar. However, you shoot at static page elements and just destroy any divs, tables, etc.
Let me show you my favourite programming hack
You can make a conditional breakpoint that just executes some code, then returns false. So you never stop there however, the code will still execute.
Like a log point in Chrome :P
Probably? Haven't tried it.
But this works in anything that has conditional breakpoints. I sometimes use it to enrich some data, for example.
Like here.
var chat = StartChat({
  /*...*/
  egg: "Cthulu",
  },
  /*... */
);
Traced where it's set but apparently it's hardcoded.
It's in a script tag on the page
11:05
Yeah, I looked to see if there was a query param or anything
But I couldn't guess it
I suspect there is a backend switch for this.
So it directly outputs Asteroids
Trying to get the WOB egg to work now
What about the Cthulu egg? It's loaded by default but how does it get activated?
11:10
<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>
Or run Eggs.Cthulu(`<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>`) in console`
3
Oh, that's awesome
I must change all error messages to show up in this style now
I don't know if you saw this when I posted it yesterday, so I'll post it again: roguelike browser game. I think it's amazing.
Hah that's fun
dhS
dhS
12:00
@VLAZ somehow i found no success in ajax call
can you just see the code and let me know
let m know any pasting tool
Please someone help me on this
I need to control the page loading By pagination of data from server side.
I need whole of the data in pages and page will load from the pagination number only
12:52
Wietol don't ping me I am going to get into trouble. You're tempting me
lol im jk
"Wietol don't ping me"
looks at pings in the middle of the night
13 hours ago, by Christian Matthew
@Wietlol would you be able to help with a websocket issue?
No I know
thank you
everyone is allowed to ping except for me
I'm banned from pinging
I wonder why
dhS
dhS
12:56
@Wietlol friend please some help
:(
I am really upset about to cry
why do people keep asking me JS questions
I dont know JS
screams
dhS
dhS
@Wietlol you can call me dhs
:(
try to make a minimal example
then compare against the pagination examples
smh I don't feel like I ping a lot lol geez oh man
13:29
> Do not mass ping people. If you are not getting help or attention pinging random users will not get you any further, and will just annoy everyone. It is a great way to ensure you get no help and ignored.
you aren't mass pinging, you just ping people who aren't currently active in the room a lot.
dhS
dhS
13:51
pardon
14:02
i've given up pinging
i am never pinging again
14:19
👍
15:06
i think I am misinterpreting this websocket issue. Perhaps the websocket is working and I am just not able to connect to it from the client.
but shouldn't the server react to the browser new Websocket('ws://...')
Has anyone ever used React-AAD-MSAL? I have it working to make sure a user is authenticated, but getting things like user groups and other access is confusing me. Anyone have any experience with that package?
maybe its not even possible with this package, but it does give other user info
or...does anyone use azureAD in a react application :D
have you tried using microsoft graph
I havent, but if thats the way to do it I'm confused on why there is a react-aad-msal and msal library.
15:21
well the AD is the authenticator the graph is the user info and authorizations
well maybe not authorizations but it is related
I see.
there are some returns from react-aad-msal like accountInfo.account.IdTokenClaims, to me that sounds like it should return token with groups - but it gives a whole lot of nothing.
Weitol might now better I think he is a c# guy. lol ping him
you might get better help in the c# room
will do - thanks!
Sam
Sam
15:50
I'm reading some code and I'm unfamiliar with the following function call structure, given a call signature of onPressSection(someValue)
 const onPressSection = React.useCallback(
    section => () => navigation.setParams({ section }),
    [navigation]
  );
In the function declaration, where is the argument passed? is it section => () ?
16:16
React.useCallback is a function
whch you are calling with a function that accepts a section param and returns a function that will call navigation.setParams({ section }) when called.
Sam
Sam
not really sure I understand the section => () => ... part..
React.useCallback(
    someFunction = (section) => ...
)
function (section) { return function () {...}}
Sam
Sam
Is how I understand function signatures
it's just an arrow function
Sam
Sam
I think it would make sense if it were section => navigation... not sure what the => () => is implying
16:22
const onPressSection = React.useCallback(
    function (section) { return function () {return navigation.setParams({ section })}},
    [navigation]
);
does that make more sense?
how can I minify all js files inside a folder into a new one using babel js?
!!magic
(∩ ͡° ͜ʖ ͡°)⊃━☆゚. * ・ 。 ᵀᴴᴱ ᴳᴬᴹᴱ
Sam
Sam
Yeah that reads a lot better to me. Although I'm still a bit confused with the return
as in, does the lambda function here return an empty function which then returns navigation
Sam
Sam
16:24
OK let me try and digest that. Lol
only the function isn't empty
it returns the result of navigation.setParams({ section })
const onPressSection = React.useCallback(
section => () => navigation.setParams({ section }),
[navigation]
);
do u know if it can be possible minify all js files inside a folder into a new one using babel js??
Sam
Sam
OK I think I understand it. Thanks for writing out the longer form, really helpful. @KevinB
yes
that's 100% possible
any clue to start? because docs doesnt make any sense for beginners
16:29
¯\_(ツ)_/¯
start what?
"minify all js files at once inside a folder into a new one using babel js"
i mean there are lots of things to do that. are you using a react application
then how are you using react?
16:48
create react app
just use cra
 
3 hours later…
19:35
Can anyone explain to me how I can access a Vuex store module written in typescript from a component? I've a getters that accesses my module like this but I always get an undefined for authentication: this.$store.getters.authentication.loggedIn;.
@BenjaminDiele 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.
-1
Q: Why is the state of a promise 'pending' if logged out during executing it's handler?

szebThis question might not be about a practical issue, although I'm still curious what is happening here: const r = Promise.resolve('I resolved') .then(() => { console.log('*****then*****') console.log( r ) console.log('*****then*****') }) setTimeout(() => { console.log('*****set...

Why is this pending promise pending
20:16
posted on June 10, 2020 by Prudhvikumar Bommana

The beta channel has been updated to 84.0.4147.45 for Mac, Linux and Windows 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 Bommana Goo

21:03
Hey
Is there a repo out there that demonstrates passing props through a deeply nested hierarchy of child components in Angular? :D
The only examples I see are one level deep like
parent -> child1
i mean
if child1 is a parent, wouldn't going from child1 to child2 be the same
what does deeply nested mean?
there is not really a nesting relation to a class
it is one class interacts with the other
can you post your structure and then what prop you want to pass from where to where
Without using a shared service
why would you not create a shared service?
Well doesn't that cteate the overhead of injecting a service into every child
21:11
the other way to do it is through NgRx which is a Redux pattern and in the end it's a shared service
There's not overhead. That's miniscual
*create
Yeah maybe it could be state and add a reducer for that
What we were aiming for is to keep the child components presentational. So just accepting @Input props
With no internal store state subscriptions
I'm thinking in that case we can let Angular change detection do it's thing with the @Input props
Rather than managing Observable subscriptions within each child
I still don't see what's wrong with observables
here is my rule of thumb for Redux. If I go to another component do I still need data to do something else. That is different than "do I need data from somewhere else."
guys I have a dumb question
where exactly does this come from? I.e., how do you know something has an applicable this?
I guess you have to manage the Observable subscriptions in each presentational component. And add the plumbing for state subscriptions
21:21
But maybe thats not a good enough reason to avoid that
1310
Q: How does the "this" keyword work?

Maxim GershkovichI have noticed that there doesn't appear to be a clear explanation of what the this keyword is and how it is correctly (and incorrectly) used in JavaScript on the Stack Overflow site. I have witnessed some very strange behaviour with it and have failed to understand why it has occurred. How doe...

I guess I'm kinda hung up on making these components presentational and just accepting a prop
Something like
If you're saying what's easier to maintain and manage. Observables. Not to say you shouldn't have a really good Redux pattern in your code base. There will come a time that you will want data to have just being there that isn't available. That's when Redux enters in. If the data is there and you just need to call it then that's just an Observable
how do you appropriately write javascript if the this is dynamic? You won't know what this is until you see the callsite, right?
it isn't dynamic
the code is written, rigid, unchanging
this is determined 1: by whether or not the function is bound, and 2: by how the function is called.
21:25
@KevinB It can’t be bargained with. It can’t be reasoned with. It doesn’t feel pity, or remorse, or fear. And it absolutely will not stop, ever.
@corvid What problem are you trying to fix? And the answer to the underlying problem is people normally write code to wrap this so that it's not dynamic.
Honestly I am just trying to understand "low level" javascript
Can anyone point me to some documentation for webpack on how to use a local package that I'm currently developing, so that I don't need to push to npm between each change to the package.
look at it from those two scenarios then
@corvid probably just scroll down to arrow functions - developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/…
why does it have to be webpack
21:28
presumably because he's using webpack..
yep, that's what I'm used to.
is there a way to color my console.log for an object on chrome dev tools?
i understand i can color a string, but how about an object?
`console.log('%c hello','background: red')`
i want to color an object instead of that hello string
string interpolration doesn't seem to do the trick here.. :(
@ChristianMatthew I guess this is what I was hoping I could do..where parent event passes prop to childOne then childOne passes same prop to childTwo..But in practice the input prop only makes it to childOne
<parent>

<childOne [parentEvent] >
<childTwo [parentEvent] > <childTwo/>
<childOne/>

<parent/>
In Angular 2
@KevinB apparently it might be docs.npmjs.com/cli/link.html
21:33
@JoeSaad not that i'm aware of, but, you could color a string that represents an object
how is that?
JSON.stringify()
21:54
anyone a url that redirects to current chat user, similar to stackoverflow.com/users/current?
Yes, I know that seems stupid, just add chat to the subdomain but on non stackoverflow chats the userid for chat is different then main site.
- asin negative
ah
22:14
I have a question about why I am trying to use websockets and I want to see what my alternative is to getting around them
I have a form that will be embedded into the webpage. upon completing the form I want the data and results from that form to show up in another section of the webpage real-time without a button event to make the data appear
Is that only possible with a websocket or is there another way
i mean, if it's the same page, there's no need to send data to the server
but i suspect there's more to your question than that
If you just want to display the values of the form in another element on the page,all you need are input events that updates the dom to reflect said changes. If the data needs to be stored on the server at the same time, you can use websockets or just regular old ajax.
How do you mean? The data from the form is uploaded to another service. I don't really have access to that data until they do submit and the submission sends the data to the db and it is all from within an embedded form
!!afk
@KevinB bye Kevin B
whoa
don't ping me
22:19
lol
yea the form is completed by a separate service that holds that data to itself. the only thing it can do is send the data off to an api
which puts it in a db and that is the db that I want to connect to so when it's updated on the same site the data will appear. So I think what you're saying is websockets.
What would Ajax do long polling
!!afk
@ChristianMatthew bye Christian Matthew
posted on June 10, 2020 by Marina Kazatcker

The Beta channel is being updated to 84.0.4147.37 (Platform version: 13099.30.0) for most Chrome OS devices. This build contains a number of bug fixes and security updates. Most systems will be receiving updates over the next several days. If you find new issues, please let us know by visiting our forum or filing a bug. Interested in switching channels? Find out how. You


« first day (3525 days earlier)      last day (1645 days later) »