« first day (2896 days earlier)      last day (2046 days later) » 

12:00 AM
google should do fine
It's basically just small devices like Arduinos, Raspberry Pis, and other remote sensors
 
12:17 AM
@demonhunter24 It could be as simple as just a system in a car park of how many are in and out. Unless they can tell you where to exactly go and park.
 
12:28 AM
@ShrekOverflow the app will direct users to available carparks and also allows users to pay with their phone.
 
Is it asking for GPS? well actually then it depends 😛
they might do it right with sensors and what not
or they may just wing it with GPS
 
How would they use GPS to determine if carpark is occupied?
 
12:48 AM
@FlameStinger anyone that has the app then multiply by factor of number of people that have the app
in comparison to the total number in city using traffic data
account for standard deviation of your sample size
then direct people to the most empty places
factoring in nearest location with the previous data
This is pretty awesome lol: youtube.com/watch?v=FL8tJoI-oUk
 
1:20 AM
They already do that here with sensors on the gates. It calculates available spots by tracking entering and exiting cars
Some show available spots per level too
 
user8871181
That would work for a u-park but not on-street parks througout the entire CBD. Unless we monitor every car going in and out of City lol
 
Like you said, sensors on the parking spot
As for the metro card, the terminal has a wire/wireless connection that sends your balance info
 
user8871181
What about buses? Don't know about your city but ours allows users to swipe card as they board bus.
 
morning
 
user8871181
Also, when a user swipes their card when boarding bus, would we be accessing server for current balance / validation or would that be on card? You would have to have some high-quality communication between server and client for verifying with server every time
 
1:30 AM
I change my mind.. React is a framework... It doesn't let you render JSX without forcing you to place all html in the render method directly. You can't conditionally render anything without doing it a very specific way... The render method doesn't see your data unless you do it the "react way"
I like react about 4000% less than I did before lol. Any frameworks with a render life cycle that doesn't have opinions on how you use it? I want something that I feed it JSX and it will render it when and how I tell it to..
 
1:45 AM
@demonhunter24 all these features are fairly common, and (in my area) old tech tbh
 
What would cause react to not rerender an array?
 
I'm trying to get tc39 to add piping support to template
not going as planned
 
Like the first two times it renders two separate and new arrays as new arrays, then the third time on it just swaps out the first element, rendering the last elements like it is supposed to. Why would it skip rendering and element only sometimes
and then some of the array members render and some don't... This is really weird
 
2:01 AM
Hi
 
user8871181
2:12 AM
@SterlingArcher You didn't really answer my previous question :(
When a user swipes their metro card while boarding bus, would we be accessing server for current balance / validation or would that be on card?
 
Good morning! Anyone here know how to setup proxy for corprorate in NPM?
I tried instructions about the proxy config but still having rollback optional failed error
 
The card itself has no tech, aside from typically an RFID chip. It stores no data
The card readers scanners etc do all the validation and stuff
Since buses typically aren't connected constantly to something, I suspect they have a local storage system that connects to a hub at major station
 
user8871181
@SterlingArcher So somehow they card scanner scans card, verifies with server, returns result and gets ready for next card - all within a 1 second timeframe??
 
user8871181
@SterlingArcher LocalStorage? I thought about that possibility but it wouldn't make sense. That would mean the card balance is not always 100% correct.
 
Technology is fast?
 
user8871181
2:17 AM
Not here in my country. Worse connection speeds no matter where you go
 
Correct, I can't confirm this but the only way things could get tricky is if you changed busses multiple times. However, the hub would recognize this and calculate it
No, the busses don't have connection speeds, it's all done on the scanner kiosk and stored there
My speculation (unconfirmed, just thinking as a dev who has to handle connectionless systems) is that connection occurs at points throughout the day
You can't have a bus reliant on a connection that you claim is shotty
The reliance comes from having the most important part done offline, where a connection can't interfere with the transaction
 
user8871181
LocalStorage would have to be updated at regular intervals, though.
 
Like I said, I bet the major bus stops have connections
 
@demonhunter24 it can literally use some type of a signed token and validate it
 
^ all the busses really need to record is your cards idenfier
 
user8871181
2:31 AM
What language do you guess to be used in such system?
 
coldfusion
 
probably swedish
hfeflflfof fsfaftfofsfhfi
 
user8871181
@KendallFrey lmao why do you say sweedish?
 
because fuck the rules
and the motherfucker in the stupid fucking hat
 
user8871181
Notch? he wears a hat / is sweedish
 
user8871181
oh that.. yeah they are a pretty hilarious comedy band xd
 
@demonhunter24 DABG - the most over used notes in music
 
user8871181
Depends what scale.. If C major scale, chords would be: C G Am F
But this is moving away from the topic of JavaScript ;)

.. Is there a community site for Music - I'm going to go 'venture'
 
3:46 AM
hi hi
 
@sflow 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.
 
user8871181
@sflow how are you, how are you?
 
good good
how r u
 
user8871181
@sflow also good thankyou, thankyou
 
I am trying to make this command:
`Cannot find module '../lib/babel-node'`

into npm command like this:
`"dev": "cross-env NODE_ENV=development babel-node server",`

but I get:
`cross-env NODE_ENV=development babel-node serve`

any idea why??
sorry pls forget the one above.

I am trying to make this command:
```
cross-env NODE_ENV=development babel-node serve
```

into npm command like this:
```
"dev": "cross-env NODE_ENV=development babel-node server",
```

but I get:
```
Cannot find module '../lib/babel-node'
```

any idea why??
 
4:44 AM
@sflow How many variables do you have in your .env?
 
user8871181
5:37 AM
@DavidKamer If I was expecting an input of something like "2 5 7 12 8 15 12" what would be the easiest way to put each number into myArray[] (where each value has it's own index)? I assume substring() would be used in some way.
 
@demonhunter24 I thought you were trying to load in a .env file conditionally?
 
user8871181
@DavidKamer Do you mean "@sflow"?
 
oh yep lmao
@demonhunter24 No, just split it.
!!> "2 5 7 12 8 15 12".split(" ")
 
@DavidKamer ["2","5","7","12","8","15","12"]
 
!!> "2 5 7 12 8 15 12".split(" ").map((n)=>parseInt(n))
 
5:43 AM
@DavidKamer [2,5,7,12,8,15,12]
 
user8871181
@DavidKamer oh cool, thanks. Does this mean it looks for " " and splits it accordingly?
 
Oh there is a parseInt method?
 
!!> "2 5 7 12 8 15 12".split(" ").map((n)=>Number(n))
 
@DavidKamer [2,5,7,12,8,15,12]
 
I always used Number() O-o
 
5:43 AM
nb4 lol
 
lol :D
Is one considered better than the other?
 
@demonhunter24 yeah, you can use any parameter to split it. You can chain it to split more. I don't think it takes multiple parameters but you can check mdn if you're interested in that.
 
user8871181
@DavidKamer Thankyou
 
Can't you split by regex?
 
@geisterfurz007 One of my first days on this chat I argued that parseInt() was probably better, but it probably matters little. parseInt won't try to find the type, and it will convert a float to int.
 
5:46 AM
!!> "2,5 7 12,8,15 12".split(/[ ,]/).map((n)=>Number(n))
 
@geisterfurz007 [2,5,7,12,8,15,12]
 
There's your answer! lol
 
user6718998
5:57 AM
Hi there!
 
Hello
 
user6718998
I have a question about material UI
 
G'day
 
user6718998
 
user6718998
if my data is held by this.props.data.items
 
user6718998
5:58 AM
why stable sort won't work ?
 
user6718998
I get undefined is not an object
 
I don't know anything about material ui, but I'd throw some debuggers into your sorting array. you might not even be calling it if it isn't in global scope.
@Rick Do you know anything about Material UI?
 
what's the question?
 
user6718998
the one is wrote above
 
user6718998
past bin link
 
6:03 AM
@Rick He's passing a prop to a sort method and he's getting back undefined
I don't know where the sort method is defined
it isn't Array.prototype.sort()
 
owo/
 
ya that's something custom
when was sort unstable
 
@Rick it is if you don't provide a callback
 
user6718998
 
user6718998
this is my sort method
 
6:07 AM
then you wouldn't be using it correctly. it's not magic
 
@Rick I agree, but there is a default implementation that is platform/browser dependent.
whoa, what's this: return a[1] - b[1];
 
well, that's something I didn't know. personally, I have never used .sort() to actually sort anything.
I always pass a callback
 
@Rick yeah, I might have left it default on a server once before....
but the last 10 times I've used it I used a callback
 
even with strings I use localCompare
 
user6718998
this is the sort method from material UI table demo
 
6:12 AM
@Rick localCompare?
Does Array.sort mutate?
 
yep
 
that's awesome and not at all terrible
 
it's quick sort under the hood it will mutate your array
 
user6718998
hmm guys ? so.. how can fix my issue ? what is your guess ?
 
that why you should always slice to prevent mutation on sort
 
user6718998
6:15 AM
I don't speak 10 years if programming guys
 
user6718998
of
 
unless you want to mutate
 
user6718998
please show me some demo if possible
 
@Rick slice is my best friend.
@Thewise did you check if your prop is defined?
 
user6718998
ofc it is, I am using the data in other methods
 
6:17 AM
just plug console.log(this.props) in before you render to see if it's being passed down properly
Did you check in the rendering component?
sometimes it hasn't arrived before a render or it was passed correctly
 
I never really understood what it meant to be "wise". To me is always came across as might makes right.
 
@Rick wise is big picture I think
 
That's the problem I don't think it is. I can prove it
 
I'm like one good Rick joke away from turning my avatar and name to Morty but I ain't no Morty lmao
@Rick "Rick. I-I think the word has just become a symbolic issue for powerful groups that feel like they're doing the right thing. "
 
user6718998
yup, my props show correctly
 
6:22 AM
@Thewise can you console.log right before your sort returns and see what's giving you?
 
I personally think the concept of wisdom is acutally evil. I'll prove it. Is a wise person someone who takes his time and thinks about the problem?
 
@Rick lol, are you drunk? that last bit made no sense to me...
 
correct it lol
 
@Rick I would say that the actual definition (like Socrates) would.
 
humor me or a sec
my point will be made clear
is my statement " a wise person is someone who takes his time and thinks about the problem?"
is this a wise saying
yes of course it is.
 
6:28 AM
Probably. I would say knowing that automatically is wisdom
that's what people mean by "you can't learn wisdom"
 
would you also say this, a wise person is someone who knows how to seize the moment and trust his gut?
 
No, I'd say a wise man knows when to seize the moment and trust his gut, not just how.
*or in what situation
so basically it's about self control and accuracy
 
that's the point anything can be made to sound wise. Any action evil or good can be put into such a way to make it sound wise. which is why wisdom is evil
 
@Rick Yeah, I can agree that wisdom isn't good or bad
You can have a wise evil dictator. The connotation of wise is the evil part
We've fluffed it up to always mean something positive, but it isn't.
Ying and yang and all of that bs
 
In fact, that's the problem with wisdom, it doesn't care about losers only about the winners.
 
6:36 AM
@Rick you've never met a wise hobo lol?
 
nope not really but I wish I had.
 
My grandpa was a wise hobo
 
are hobo's bums?
 
@Rick their like the classiest of the homeless. it goes Hobos, Grifters, bums, and freeloader
in that order lol
I'm not sure what a freeloader is but I'm saying someone who lives off of begging and charity even though they don't have to
 
by classiest you mean they have a lot of stories they can tell you to get free stuff
 
6:40 AM
Nah, Hobos have a culture, or they did
 
what makes them classy?
 
@Rick Hobos work together and they often work but live in a way that they are always on the move
@Rick Basically how they effect the rest of us and their goals.
 
I feel like that applies to everyone
you need to narrow down a little more
 
@Rick exactly, so why wouldn't it apply to the homeless lol?
ok
Hobos had a culture based around the invention of the freight train and preserved food. They existed from the great depression on, and many of them were dishwashers and landscaping laborers before migrant works
 
I always thought homeless people were people who couldn't deal with reality. like they have a hard time lyng at job interviews and shit like that.
 
6:44 AM
The scottish guy on the Simpsons is a lot like a hobo only he stays in place
@Rick Some are I'm sure.
not most hobos
But I don't even know if there are any true hobos anymore
They even had houses built from random crap in the woods all over. They'd share and they had painted symbols in most cities to communicate safety and where to find shelter
 
have you seen the movie loopers
 
@Rick I might have seen part of it.
Interstellar is my jam
 
it takes place in the future and everyone is a vagrant
 
@Rick Is it with Bruce Willis or Vin Deisel lmao?
If it's with either of those I've seen it.
 
it has Bruce Willis but not vin deisel
it has that maybe asian actor in it
 
6:51 AM
was it on a farm for a big part and he was going to kill someone with illegal time travel?
 
yep that's it
 
Yeah that's a good one.
 
Well supposedly, China is the new America in that movie. And America becomes a country of criminals and vagrants
that was my take away from that movie
 
@Rick I doubt that will ever happen. The USA is remarkable because we accept every race and type of person... China doesn't do that. I'm not saying being politically correct will win in the end, but I'm saying that letting everyone play and contribute will.
 
I hope your right because I really don't want to move to China.
 
6:56 AM
China seems like a good place to visit. Looks clean
 
If you want to move in that part of the world, Singapore is the place to be
There are more foreigners than natives living there
 
It's scary how fast they are devloping. I keep seeing these vieos on youtube where like american go there to check things out. and it looks clearn and modern
 
Experts from all over the globe are paid handsomely
 
@Neil this is probably true. I do hate it when people chew gum lol
 
It's sort of the wild west of city development
 
6:58 AM
@Rick Yeah. They got their shit together, but that's partly because they abandoned complete communism 20 or 30 years ago.
 
heavily capitalist and growing faster than it can regulate
 
@Neil Singapore?
 
I wish that were true
 
I like the idea of visiting China because it's pretty cheap
 
it is crazy cheap from my understanding
food is cheap, transport is cheap
rent is cheap
singapore seems expensive
 
7:03 AM
yep. I'd have to get all my work stuff together to work correctly. I might have to use a vpn or forward my emails or something. I think it would mostly be a non-issue
I'm not going anytime soon, but it's on my list. Actually Mongolia seems like a sweet place except for all of the Nazi's
 
Hey yall with childhood. check this out: Space Jam 2 Teaser
 
you mean Tibet
 
@Rick no Mongolia.
I like the idea of the wildness...
 
O ya, Tibet is where a Nazi went
 
No, there are mongolian nazis lol
Tsagaan Khas (Mongolian: Цагаан Хас; meaning white swastika) or Dayar Mongol is a Mongolian neo-Nazi organisation that claims to have 3,000 members, though other sources claim the organisation to have "more than 100 members". It was founded by Ariunbold Altankhuum. Its co-founder, who goes by the alias "1984 Big Brother", has described his group's mission thus: "Adolf Hitler was someone we respect. He taught us how to preserve national identity .... We don't agree with his extremism and starting the Second World War. We are against all those killings, but we support his ideology. We support...
 
7:06 AM
no i mean the moive 20 years in Tibet
 
oh, had no idea about that.
I was being literal.
 
it's 7 years in Tibet
o wow
Tsagaan khas
 
I want to go to one of the less expensive south asian countries but I'm afraid of tapeworms so bad...
 
ya, and other things
 
yeah, parasites in general.
 
7:10 AM
I think it would be cool to live in Argentina or Chili
 
I've read those areas have the same issues.
 
You could go to subway they have slogan protection from parasites
 
haha nice
 
subway is for pedos
 
ikr, haven't went nearly as often since that business
 
7:11 AM
ew no meatballs sub is the wae
 
@KamilSolecki no chicken salad
 
burger king foot lettuce
 
yum
yeah, I probably will get over my terror about going to 3rd world countries but it's not today
 
I can survive on stake and hamburgers, and shwarma
 
It's not fear based on anything other than getting a parasite. US doctors know nothing about them and refuse to even try to diagnose them.
so if you get one, you'll never know and probably die of a complication
 
7:16 AM
I think they have antibiotics
 
they antibiotics harcore
 
for that kind of stuff
 
No, antibiotics don't really work on parasites
 
how do you know if you have one?
 
It's basically as bad as cancer
Neurocysticercosis is a specific form of the infectious parasitic disease cysticercosis which is caused by infection with Taenia solium, a tapeworm found in pigs. Neurocysticercosis occurs when cysts formed by the infection takes hold within the brain causing neurologic syndromes such as epileptic seizures. It has been called a "hidden epidemic" and "arguably the most common parasitic disease of the human nervous system".The epidemiology of Taenia solium cysticercosis is solely associated with local cultural practices especially poor sanitation and is highly endemic in Sub-Saharan Africa, Latin...
 
7:18 AM
that does sound scary.
 
@Rick you basically start to die from non-diagnosable tumors everywhere in you body
It's somewhat common in third world countries
 
that sounds like regular cancer
 
It's worse because they can't do a blood test for it the same
it's a lot harder to detect
 
so you are saying most Americans might be dying of pig worms
 
@Rick I'm saying if they were no one would know because our doctors seem to believe that if "they think it, than can do it" to a crazy level of ignoring things like this that are uncomfortable.
 
7:22 AM
so you're telling me the Jews have been right this whole time?
 
The cancer of society is thinking that thinking can do anything without action
@Rick That's what I said when I heard about this lol
I'm starting to think 90% of kosher rules are to prevent pork tape worms
That's enough to make me want to be kosher lol
 
That's what I thought it was about. Stupid arrogant anti-semitic science junior high school teach would always tell us. "We know how to cook food now with fire, we don't need religion to tell us what to eat.
I always felt sorry for the Jewish kid in class with his kosher lunch box
 
@Rick yeah... is he even civilized? Ever heard of prosciutto?
 
there are some seriously bad diseases out there
 
Yeah, cooking your food doesn't care if your hands are washed
 
7:30 AM
you can be injured in such a way as to "lose control" over your hand (alien hand syndrome)
 
@Neil parasites are the most terrifying imo.. I may have a phobia...
 
you can lose the ability to sleep.. rare but people who have it can't be cured
 
@Neil I heard about that. I'm not too afraid of those kind of things. Most of that stuff is fairly apparent when it happens to you
 
Well I mean I'm afraid of them, but I also don't htink I would ever catch that
flesh-eating bacteria
parasites might somehow be the worst of them though
if for no reason than the psychological factor
 
7:35 AM
> That hand often works against the other. This can lead to the affected person trying to eat something with the right hand and the left hand attempts to stop that or in extreme tries to choke them.
Now that sounds nice!
 
o/
 
ok, welp I'm going into lurk mode until the duration of the "horrible things which could happen to people" discussion ends
 
@DavidKamer Can you please don't? >.>
 
haha, ok done
 
omg more than one
 
7:40 AM
@Rick there was like a whole family in there
 
how do they know they got them all out
 
Aaaalright I will follow Neil :D
 
y'all need jesus
2
 
@Rick they don't... Until she has another outbreak after she spreads it to half the country lol
 
265
Q: Array state will be cached in iOS 12 Safari. Is it a bug or feature?

abelyaoToday I found some problem of Array's value state in the newly released iOS 12 Safari, for example, code like this: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <title>i...

2
What the duck Safari, what the actual duck
 
7:50 AM
!!afk
 
 
1 hour later…
8:55 AM
@MadaraUchiha every time I think I can finally use conditional types I just come up with a solution where I don't have to :(
 
I've found that conditional types are mostly useful for infer
Yeah, I don't use conditional types very much myself, but it's a basis for a few builtin types that I do use
 
I mean I can go ahead and just make those two interfaces into one instead of joining them under a type
and make an excuse for that saying that I get to use cool features of TS 2.9
:P
 
hm, sending faxes from smartphones should "just work", no?
I mean, it's using regular phone connection underneath
 
I guess?
I've never sent a fax tbf
 
I did once using a modem
I mean aside from using a normal fax machine
 
9:38 AM
Quick question: What IDE do you use? I currently use Webstorm but I might have to do a workshop for React Native in my company sooner or later so I am looking for an alternative (free). So I just wanted to do a quick survey :P
 
9:58 AM
function refreshAjaxContent(divId){
	$(divId).on("load", function() {
		return;
	});
}

function deleteAdminUser(adminUserName){
	var deleteAdminUserDetails = {};
	deleteAdminUserDetails.username = adminUserName;
	console.log(deleteAdminUserDetails);

	$.ajax({
		url: domainUrl+"something/here",
		type: 'post',
		data: JSON.stringify(deleteAdminUserDetails),
		dataType: 'json',
		contentType: "application/json; charset=utf-8",
		success: function(data) {
			refreshAjaxContent("#dashBoard_Data")
previously
function refreshAjaxContent(divId){
	$(divId).load(divId);
}
i wanted to reload a ajax content in a page...
stackoverflow and jquery documentation recommened the current implementation in refreshAjaxContent... but i would like to know how to get this reloaded.
 

« first day (2896 days earlier)      last day (2046 days later) »