« first day (3275 days earlier)      last day (1656 days later) » 

12:08 AM
Any of you know how to allow a variable inside a unicode string? I mean something like this: '\u{'+unicodeString+'}'. JS doesn't rly like that.. "SyntaxError: malformed Unicode character escape sequence"
 
would String.fromCharCode(99) help?
 
No I'm translating browser emoji unicode. They're out of range of fromCharCode
 
i have two sibling components in react and i want to send data on click event on one of the component
 
morn!
 
does anyone has idea how to achieve this?
 
12:21 AM
ohhi
 
i do that using a common state/store, or using events
props could work too maybe?
 
wow, taking it old-school @ kevinb
haven't seen your avatar change until now
 
yeah, the other one isn't much relevant anymore\
 
@KevinB can you send me an git example to study it
 
12:22 AM
nope
i'm booting into wow atm
;)
 
and @forresthopkinsa thanks for the guidance yesterday
 
anytime
heading out, see y'all tomorrow
 
bye
 
o/
 
@KevinB you are aplying from which side i.e. alliance or the horde?
 
12:24 AM
horde
2 days a week, 3 hours each
 
nice might join someday for the quest after my project ends hopefully
 
12:50 AM
@david Got the answer on SO. Appearently String.fromCodePoint() does the job ^^
 
Ah, useful to know
 
ABC
Hi
 
ABC
1:35 AM
const temperature = document.getElementById(`temperature-${index}`) as HTMLCanvasElement;
why it always return null
 
ABC
2:11 AM
hello?
 
hi
 
ABC
const temperature = document.getElementById(`temperature-${index}`) as HTMLCanvasElement;
why it always return null
 
because it doesn't exidst
 
ABC
can anyone help me
but when i try to get it
it has a value
 
that's fine
but
document.getElementById(temperature-${index}) will only ever return null, when the element targeted doesn'te xist.
 
ABC
2:13 AM
but?
 
there's no mystery in this case, it clearly doesn't exist, given that the function is returning null
 
ABC
here's the code.
0
Q: Thermometer Filler Angular

ABCroom.component.html <div nz-col class="cards__item gutter-row" nzXs="24" nzMd="12" nzXl="12" nzXXl="8" *ngFor="let data of tempThermometer; let i = index" > <div class="card gutter-box" style="position: relat...

 
:shrug:
Why are you using native dom methods at all in this case
 
ABC
is there any way for this error?
cause I'm creating a filler thermo
 
hi
does anyone else find chaining NgRx operators a bit confusing? :/
withLatestFrom(this.store.select(selectCurrentApps)),
map(apps => {
the apps value in the following map is always null
when I debug the selectCurrentApps selector state is undefined
 
 
3 hours later…
5:36 AM
@all hi,
 
hihi
 
i want to execute a function within a function, if the first function is successfully completed, then only the second function should be called.
its not a nodejs application, can i still use callback?
or any other way i can do it?
 
yea, that sounds pretty simple
got some code?
 
6:10 AM
@JBis It's a reference to Andrew Barber, who had vanished from the site without saying anything and it was later discovered that he was actually arrested for child pornography.
Let's not start a discussion about it here though. I don't mind off-topic but this is a bit much.
 
Hiiiii, I have a pretty trivial question. Today I noticed that comparing "10" and "5" (strings) in javascript returns the expected comparisons for 10 and 5 (ints). I was wondering if I want to write statements like 10 > 5 or 10 < 5, is it okay to rely on the string comparison or should I typecast to int/float for the comparison?
 
@AbdurRehmanKhan You should typecast to number before doing the comparison.
It will work either way, but you'll hate yourself less in 6 months.
Also, JavaScript has no ints or floats. It has number (which is double), and BigInt.
 
WOW, never expected Uchiha Madara to know JS O_O
@MadaraUchiha Thanks :D That's news to me lol, I'll read up on the number datatype, I'm curious about the pitfalls of comparing strings like that though? xD what's the worse that could happen?
 
No, I take that back, comparing strings doesn't even work
!!> "10" > "5"
No cap?
@AbdurRehmanKhan "10" > "5" returns false, when 10 > 5 returns true.
 
Ben said that cap would not be active here anymore
 
6:17 AM
Whoa just checked, you're right. Originally I put them in variables and THEN made the comparison. Then it works.
 
@KarelG When'd that happen?
 
But just in case let me recheck that too
Oh Lord
I'm wrong again. My bad sorry, let me see what the heck is actually happening here.
Okay so do I use parseFloat or Number for the typecasting?
 
@AbdurRehmanKhan Either work
 
@MadaraUchiha Okay, thanks :3
 
@MadaraUchiha I don't mind that cap's not being actived anymore, it is still rlemon's choice. AFAIK last time I saw him was when the SE mess occurred. He did not came up here anymore after that.
probably it's related to that. I don't know. Been following from the sideline
 
6:25 AM
sucks, but can't really blame him for not wanting to keep it running if he's not gonna be here anymore
 
 
3 hours later…
9:32 AM
Hi All
what is the difference between TCP Server, Socket Server and HTTP Server?
 
9:43 AM
many
that requires some lectures. I have attended networking courses to get that :P
 
TCP server = Socket server and HTTP server is one of TCP server
I suppose
 
yup. The importance is at the level of operation.
 
Hi guys
 
the data that goes through networks are called as "packages". Each layer has its own packages until the application layer.
 
i thought this is a javascript forium
 
9:49 AM
The Internet protocol suite is the conceptual model and set of communications protocols used in the Internet and similar computer networks. It is commonly known as TCP/IP because the foundational protocols in the suite are the Transmission Control Protocol (TCP) and the Internet Protocol (IP). During its development, versions of it were known as the Department of Defense (DoD) model because the development of the networking method was funded by the United States Department of Defense through DARPA. The Internet protocol suite provides end-to-end data communication specifying how data should be...
 
Sql room is killed
dead
 
@Jesse ^ a little reference you can use
 
i have an sql question
 
@CommonMan it is. Just a wild Bart Simpson appearing.
 
i want to do this
 
9:50 AM
Thank you
 
@HamreenAhmad Well, off-topic questions sometimes happen, but yeah you need to use the SQL room for that
 
NativeScript or Flutter? any advice? (currently working with Angular)
 
nice @KarelG
 
@Jesse forgot to mention: socket layer is level below TCP layer (it uses sockets) and HTTP is above TCP (it uses TCP). Each layer has their own packages/protocols
 
lets ask man :/
 
9:51 AM
just ask it in the sql room. I will go to there
 
i already asked there
 
hmm you got replied there
 
@KarelG Thanks a lot
 
10:13 AM
!!summon 7
Or not...I guess...
Sorry for the interruption, carry on
 
@Squirrelkiller no caprica anymore.
 
Poor Caprica :/
 
don't expect to see her up and running soon though.
 
What why
 
 
1 hour later…
11:37 AM
yesterday, I was shown this tutorial on a math expression tokenizer, and I was following through it again today, and Ive come to a halt
I was building the function, and it seems that .forEach doesnt support what Im trying to do
function tokenize(s) {
 var result = []; //array of tokens
 s.replace(/\s+/g, "");
 s.forEach(function(c, idx) {
  if (digit(c)) {
   result.push(new Token("Literal", c));
  } else if (isLetter(c)) {
   result.push(new Token("Variable", c));
  } else if (opera(c)) {
   result.push(new Token("Operator", c));
  } else if (isLeftParenthesis(c)) {
   result.push(new Token("Left Parenthesis", c));
  } else if (isRightParenthesis(c)) {
   result.push(new Token("Right Parenthesis", c));
  } else if (comma(c)) {
 
@TaylorSpark check the 2nd line of yours method body
 
oh..
 
and that is just .trim()
so use it instead
 
Yeah... Im following this tutorial exactly as it says
actually, it seems that the string to array is actually part of a comment in the website:
// convert to array of characters  str=str.split("");
so i guess I dont need it
'or perhaps he did it on accident
I cant tell
Hmm... After linting and fixing like 12 errors in JSHint.. its still giving me the error
actually, the exact same code form the tutorial is also giving that error -_-
 
@All Hi
i have a template coming from database and im using SendGrid library to send the emails.
 
12:46 PM
how can I tell the browser to use the last version of the state of my React app (instead of the one which was downloaded on the first load of the page) to display the page when the browser gets restarted?
 
1:17 PM
hi
 
hello
 
I was looking at polling an effect in ngrx earlier today but haven't found an example that worked with Rxjs 6
anyone have a good example repo of NgRx usage with different operators?
 
I don't have a lot experience with NgRx
not sure if others would help you
 
1:35 PM
yeah mainly trying to figure out how you would make an effect run on an interval
docs aren't very clear on how to do this with an effect more so how it's done with a plain observable
 
Hi guys!
can anyone suggest to me a way to set dynamically the top and left properties of an element?
I need that this element is positioned depending the screen size
 
1:54 PM
if you want it to be truly dynamic I'd use flexbox and align-self property
5
A: Using flexbox to align one element to the top left and one to the center on a page

TylerHFrom MDN: flex-start The cross-start margin edge of the flex item is flushed with the cross-start edge of the line. This means align-self: flex-start; will align the top edge of your top box with the top edge of the flex box (the beginning of the cross axis). The left/right values ar...

trust me it will save time understanding flexbox than messing around with random css props
 
2:13 PM
@BrianJ I need to center an svg letter and a text that i'm animating with css3 rotate effect
I'm facing the problem that on different resolutions the svg II'm using is not centered and the text that i have animated is not in the correct place
 
2:59 PM
hi guys. anyone used service worker push notifications?
trying to catch 'notificationclick' event at chrome with no luck. no response on stackoverflow :(
 
3:30 PM
1 message moved to friendly bin
 
4:24 PM
Hello boys and girls
 
4:58 PM
 
 
2 hours later…
6:47 PM
“Lol afk”. This is exactly what SE is doing. “ If people do not like it, they don't have to be here. ” isn’t very inclusive. — Sterling Archer yesterday
good guy sterling
 
Had to pop back in to read that context. I knew someone couldn't actually be calling Sterling a good guy :-)
@BrianJ wow, I have forgotten so much since 2015
 
It's funny when I upvote a comment and then realize that the poster is a 17 regular
 
7:02 PM
@Feeds but forreal global entry is the bomb
 
Hi guys. Just 1 small question
If I've to send like 3000 JSON objects in a single response
What would be good? Send the response 1 time
or do pagination?
I'm talking about the server side
 
depends
Is the user going to actually make use of all 3000 json objects?
 
Pagination would be done on front end side
I just don't want to make AJAX request over and over
 
Right, but, there lies a problem
 
The problem is
 
7:12 PM
so, lets say you paginate at 20 per page. and there's 3000.
 
When the user moves the google map
I need to get the current visible area
 
If the user only ever views page 1, there's 2980 entries that are useless
 
and show the properties that lie inside that visible area
 
see, that's a different scenario, that's not pagination at all
I have a similar project, we solve that problem by making another trip to the DB when the user changes the map viewport rather than keeping all n thousand entries client-side and filtering/sorting client-side.
 
But that sends the request over and over
 
7:13 PM
and?
What's wrong with that if the data coming back is small?
 
User moves the map a little
A request is fired
User zooms the map
A request is fired
 
yup
 
@ZahidSaeed open up Google Maps and observe the network tab of the devtools
 
You have two equally valid options.
Load everything up front and rely on teh client for processing, or don't and rely on the server for processing.
 
7:16 PM
The former is bound to eventually have growing pains if that number ever multiplies.
 
Yes
The number of properties would grow with time
So what would be good? Get all properties in 1 single go
 
The latter option, relying on pulling and sending only relevant data won't have that problem.
 
and filter it with the map
But that solution just sends too many requests
You know, it makes the app unusable
 
It will send more requests, however generally it will send less overall data.
 
Umm
So you would prefer sending many many requests?
 
7:18 PM
I would, yes
 
Think about the mobile device
 
I am specifically thinking about the mobile devices
lol
They have even less processing power to handle those 3000 records
 
I just checked one of our sites. On desktop, 4000 markers makes moving the map very slow. ~200 markers is much faster. Mobile would be even worse
 
@Cameron The more markers, the slower it becomes. Agree
@KevinB Ah,okay
I had been confused to which method to use
 
Right, and we do what Kevin does as well. We just load the number of markers visible (plus 1 zoom level above)
 
7:21 PM
I use both techniques across various apps, but for customer facing stuff i always try to offload as much processing as i can to the server.
 
Right
@KevinB lol, you are making me confused again
So what's the final solution?
 
For internal stuff, for example, i have a particular map where i just load and display alllll of the markers. it's definitely less responsive than the other one
like i said, both options are valid options
it depends on your needs
What is important to your app
 
As a developer
I need it to be fast
without sending too many requests
 
if you use ajax rather than loading it all up front, there will be some delay between the markers displaying
 
Of course, its an Angular app
I'm using AJAX
 
7:23 PM
but, the delay will always be the same, and increasing the number of records won't reduce the responsiveness of the app over time
 
So 1 single request would work?
What if in the future, there are 10K properties or even more?
 
If you instead load everything up front, (with ajax, whatever, what i mean is all 3000 rather than just the ones in the visible space,) your client-side app will have to re-process that data every time the user moves the view port of the map or zooms
Databases are far better at doing those calculations than client-side javascript is
 
Client side loop isn't faster?
to filter the data
 
Depends on the kind of filtering
You're doing geolocation filtering right?
 
I'll just checking if the property location lies under the specific lat/lng
to sync with the map
 
7:26 PM
right
i'd let a DB do it
 
Actually
The DB isn't doing that either
I get the visible markers
Loop through those (each marker has a unique property ID)
I make the array for all those Ids
Send it to the server, and get the objects back (having detailed description)
 
that seems odd
 
Yeah, that was 1 way to do it. Else I could have simply send the lat/lng to the server
DB could calculate and filter
And send me back the response
 
user8729657
Is it true you can hire people to create content for your website's, e.g create reviews of products and services?
 
You can hire people to do anything
 
user8729657
7:29 PM
lol
 
Fake reviews are illegal, doesn't mean you can't hire someone to do just that
 
@KevinB So Kevin? :(
 
user8729657
@KevinB, thank you for the advice!
 
@MadaraUchiha Ok. Thanks for the info, won't bring up again.
 
@ZahidSaeed i mean, i've given you how I would do it, i can't force you to agree, :p
 
7:31 PM
@KevinB But if you were me, how you would have done it?
lol
 
map viewport changes, send ajax for markers and display them.
 
@JBis just discussed it off-site
 
@KevinB Okay, thank you
 
7:43 PM
is react really this popular?
https://www.npmtrends.com/@angular/core-vs-angular-vs-react-vs-vue
 
define popular
 
it is very popular but that chart does seem a little off
 
almost 600,000 downloads in last month
 
the gulf isn't that large if you combine the multiple versions of angular into one
 
true
 
7:46 PM
you can also draw a different conclusion if you just looked at stars.
downloads can tell multiple things.
like, that tells me that react is used in things that would need to download react often
not that it's necessarily used more often
 
i see
 
for example, every time create-react-app is ran another download of react happens, and a lot of people learning use such things
 
Even 10 - 15 downloads would have been done by me for learning purposes lol
;)
 
7:59 PM
guys i want to pass data between to components without using redux any idea about that?
 
what kind of data? how are the two components connected/related? on what event should the data pass? What are you passing it for?
 
@KevinB What do I use to check if the columns lie under the given lat/long at MySQL level?
Haversine?
 
@KevinB i want to fetch usres message according to their id
 
@KevinB or can I just compare it with the greater than and less than operators?
 
i use a distance calculation
then filter on distance
 
8:08 PM
For how many km/miles?
 
whichever the user chooses
 
Do I really need the distance calculation?
 
it's either that, or determining if the point falls within given bounds
 
@KevinB In my case, its just the lat/lng that user choose by moving the map
 
That's how I do it, pass the bounds of the google map, and look for lat/lon within those bounds
 
8:09 PM
if that's what you need, do that
 
Yes, exactly
 
:)
 
I need to check the given bounds
So for that, do I need something special?
or can I just compare it with the >, < operators?
 
WHERE latitude BETWEEN ( :minLatitude ) AND ( :maxLatitude )
 
oh that's super simple then lol
I had used distance formula once
But I don't really need Km or miles at this point specifically
just the boundaries would be enough :)
Thank you so much guys. Love you all <3
 
8:24 PM
Hello, I was making an animation frame, and I was trying to grab the % of width from my css element using JS
so i can render it whenever it changes
but it just changes the text to nothing
window.main = function() {
 window.requestAnimationFrame(main);
 percent.innerHTML = start.style.width;
};

main();
Is it because im running innerHTML too much or something?
it hasnt outputted any errors to the console
percent is the element that i want to output the percentage
and start is my actual element for the width
 
ka: ce {g: 17.40503995117183, h: 50.42170254882808}
oa: ge {g: 7.318092994252489, h: 29.228196063328234}
I invoked the getBounds()
and this is what I got
What one is lat and which one is lng?
Which one is upper left and which one is bottom right?
 
@KevinB any suggestion for me?
 
@ZahidSaeed going home now, so won't look it up. But just put them in google maps and see which corner lines up with your existing map
 
I did
Didn't got what I was expecting
 
var bounds = map.getBounds(); var northEast = bounds.getNorthEast();
and then northEast.lat() etc
 
8:31 PM
ohh
Sorry
But for upper left
Is it northeast?
or southWest?
 
Just need northEast & southWest, that'll get you all four edges
 
Umm, let me try
 
 
2 hours later…
10:41 PM
RIP... JS is ded
 
Oh nevermind
I just need help with my question farther up
just wondering if anyone is willing to help me
 
What sets the style? is it coming from a stylesheet or style element, or inline
 

« first day (3275 days earlier)      last day (1656 days later) »