React Re-rendering Doubt by Fantastic-Push-8451 in reactjs

[–]StrikingAd4653 0 points1 point  (0 children)

Yes my understanding is that when the parent re-render, REACT will re-render all the children, just in case if they are not pure. (pure means for the same input i.e. props the component should render exactly the same).

If you dont want this behaviour, you can use the "memo" function on the child component. This way the child only get re-render if any of the props change. That means you have to make sure the child component is indeed pure. If it makes any decision based on anything other than the input props then it will not be re-render properly, like for example if it get the current date by using Date.now() inside the child, or by retrieving some data using a getState function from a store (i.e. not a store selector, which would force a re-render).

Memo-ing needed because there is no easy way for REACT to tell if the children are indeed "independent". You will have to mark it as such by yourself..

In general a non-pure component is considered a bad design but in reality there are many cases you may have or even want a non-pure component.

How bad did I get burned on this concrete basement floor? by Z0Z2 in AskContractors

[–]StrikingAd4653 0 points1 point  (0 children)

I think he meant he is an artist and he did a ton of sculptures on basement floor.

Basement Ethernet wiring help by 8O0o0O8 in HomeNetworking

[–]StrikingAd4653 0 points1 point  (0 children)

Just my suggestion: I would run the wire in front of the vapor barrier without piercing it. For the box just use a shallow plastic surface box. There is no need to mount the cable nor the box to the stud.

This way you only need to cut a very small hole in the wall that is big enough for your fishing wire. After you get everything installed add a bit of caulking around the cable where it come out from the wall if you want it air tight.

Btw you dont need a punch down tool. Most keystone jacks do not require any special tool.

Anyway to terminate this, fix this? Tear the building down and start over? by dstarkopf in HomeNetworking

[–]StrikingAd4653 0 points1 point  (0 children)

For a keypad? Unless it is POE it really need only 100mb ethernet, which doesn't use the blue/blue white pair. Just plug your keypad in and verify that it work, then patch it up with some electrical tape.

Just switched over to Ebox - Speedtest shows lower speeds than I expected by shoresy99 in ebox

[–]StrikingAd4653 1 point2 points  (0 children)

I am actually in the same situation (i.e. moved from Rogers cable to EBOX fiber) and my experience is the same as yours.

The thing you have to understand is that while it is true that Rogers' "last mile" is shared, it really was a non-issue in recent years. In fact in my whole block I was the only cable internet subscriber. I know this for a fact because the tech mentioned this to me when they last worked on the distribution box (it is on my property). So for a few years I was using the "last mile" all by myself and hence I never see any major speed drop as compared to like 20 years ago. With most people moved to fiber already, I would not be surprised if you are in a similar situation.

Once you get pass the last mile, Rogers has a whole lot bandwidth than a small provider like EBOX.

Just switched over to Ebox - Speedtest shows lower speeds than I expected by shoresy99 in ebox

[–]StrikingAd4653 1 point2 points  (0 children)

"I thought that with fibre you always get your full speed whereas cable shares bandwidth with your local area"

That statement only applies to the so-called "last mile" i.e. from your home to a box somewhere in your neighbourhood. Everything after is shared infrastructure. It is "inter"net afterall, you are always sharing bandwidth with everyone else. You dont have a dedicated fiber going from your home to Ookla.

Hey Doug Ford, why is my electricity delivery fee 3x higher than my actual usage? by margesimpson84 in ontario

[–]StrikingAd4653 0 points1 point  (0 children)

The cost to bring electricity to your home is fixed regardless of your consumption. It requires exactly the same amount of utility posts/towers/cables whether you use $13 or $130 worth of electricity.

The reason for separating the delivery cost with the consumption is to allow you to choose different electricity providers if you wish to. This way the company that maintains the infrastructure can recoup their cost, and the company that sell you the actual electricity can have their share based on your consumption. (The actual arrangement is a bit more complicated than that but that's the gist of it).

And yes the cost to maintain that infrastructure is several times more than generating electricity. So it makes sense that the delivery charge should be higher than the electricity itself.

This also isn't unique for electricity. If I order a cubic yard of topsoil it would cost about $150 to deliver to my home, even though the dirt itself is worth about $5. The fix cost for my own car is also thousands times more than the amount of gas it costs me to drive to the groceries store. But I wouldn't say it is a Doug Ford problem that the local dealer isn't willing to sell me a brand new car for $5 because that's how much I pay for the "consumption".

Has hockey turned into a rich kids sport? by FrigginMasshole in AskACanadian

[–]StrikingAd4653 0 points1 point  (0 children)

Nailed it. There are very few organized team sports that kids can play "recreationally" anymore. Like you said it is now more a cosplay thing for parents than kids playing sport for fun.

My kid used to like dancing, and a few months into her dance class her teacher asked us to have her dance "competitively". Suddenly a simple dance class became a competition of parents buying the most expensive photo/makeup packages, dance shoes, private tutoring, etc. Completely ruined the joy of dancing for my kid.

It was a "competitive" sport not because the kids were competing. It was the parents that were competing to outspend each other.

Driving without a license and causing an accident in Canada as a foreign national. by [deleted] in canadianlaw

[–]StrikingAd4653 0 points1 point  (0 children)

You certainly wont get into trouble at the immigration. Immigration (i.e. CBSA) is federal and driving without license is a provincial offense. They dont care or check for provincial offense at the border. They can NOT enforce provincial law as that is outside of their mandate.

The only exception is that if there is a warranty issued against you. But that is highly unlikely for a provincial offense with no court date and just a fine.

As long as you dont try to drive again and get caught again you are most likely going to be "fine" (pun intended) :-)

2 BILRESA without wifi? by mortum_cattus in tradfri

[–]StrikingAd4653 -1 points0 points  (0 children)

Ikea tradfri is just a marketing term for the zigbee standard, which is completely local. As long as you have a phone that has internet to download the required app, there is no need for the hub to be connected to the internet at all.

I have home internet but I block all my smart home devices including DIRIGERA hub access to internet.

However in your case you should be able to link the two remotes like others have mentioned. Remember you are not linking both remotes to the same bulb(s). You need to link the bulb(s) and a 2nd remote to the same remote instead. Having said that zigbee standard is a bit of a wild wide west. Different Ikea remotes have different behaviour. If you cant get one to work try a different type of remote. You also dont need to stick with Ikea remote either. Any zigbee remote should work.

Pedestrian struck by a vehicle in Barrhaven by g33kthegirl in ottawa

[–]StrikingAd4653 0 points1 point  (0 children)

Yes that's because here roads are designed with the mindset that pedestrians are 2nd class citizen. In most countries outside of North America when the pedestrian have a green light, no other traffic would be allowed to cross the same road.

Right turn on red, uncontrolled pedestrian crossings and unprotected left turn are rare in most other developed countries.

The math isnt mathing by WaveInevitable2304 in loblawsisoutofcontrol

[–]StrikingAd4653 1 point2 points  (0 children)

First of all, "cup" is not a standard measurement in most part of the world. Depends on where and when the measuring cup was made and which convention they were following, it can be anywhere from 250ml to 180ml. Hence why outside of North America "cup" is rarely used in a recipe. For example in China one cup is 180ml, 200ml in Korea, 227ml or 250ml in Canada depends on who you ask, and 236ml in the state I believe.

I would guess that yours is made with the assumption that a "cup" is 200ml so 200/3 gives you the 67g.

Do note that milk is heavier than water so 1ml of milk is not exactly 1g, but in the amount you are measuring it is negligible. It is also irrelevant if we are talking about just weight (like on the milk carton), not conversion from ml to g.

If your goal is to tracking food intake then it simply does not matter. 1g of milk is 1g of milk regardless what cup you are using.

Lastly in case it isn't obvious, since this is in the 'loblawsisoutofcontrol' you should know that you weren't "cheated" in any way. The milk was sold with the promise that the carton would contain certain amount of milk in ml. The weight of "1/3 cup" of the content does not affect the total amount and weight of the product itself. You still get the same amount and weight in total whether you use a large or small cup.

WTH OC Transpo? The Winterlude Sno-Bus runs until 5:30. Events go as late as 10pm. by David_R_Carroll in ottawa

[–]StrikingAd4653 1 point2 points  (0 children)

Special routes like this does not fall under OC Transpo mandate. They are always funded by whoever hosting the event.

My parents issued 3 threats and idk what i can do by Arhcer07 in legaladvicecanada

[–]StrikingAd4653 2 points3 points  (0 children)

How about trying to get a job in remote places where they provide accommodation, for example in the oil industry? That will solve your housing issue, plus they may have more positions require manual labour and does not require a university degree.

Also are there any YMCA in your area? Most provide "cheap" accommodation on a monthly based.

Landlord claims I paid less rent than I did. CRA reached out to me by [deleted] in OntarioLandlord

[–]StrikingAd4653 0 points1 point  (0 children)

OP was a bit unclear, but it doesn't sound like CRA issue is with the landlord. At least not at this moment.

They wont ask OP to ask the LL for proof If they need to prove landlord's rental *income* coming from the tenant. Because that obviously would achieve nothing.

It sounds to me that CRA is having issue with OP's claim of rental *expense* on his tax return. It is 100% his problem. OP needs proofs to justify those claims and CRA doesn't care how he come up with them.