|IndyWatch Education Feed Archiver|
IndyWatch Education Feed was generated at Community Resources IndyWatch.
In this article well look at how to animate your route transitions with React Router by breaking down the Animated Transitions example on the React Router docs.
Ive created a video to go with this article if youd prefer that:https://medium.com/media/932ad95922945190f2023014a23ec240/href
If youre reading this youve probably discovered that React Router doesnt come with a solution for animated transitions out of the box. That ties into React Routers philosophy. It gives you routing primitives that you can build on and trusts that you can figure out the rest.
Because every app has different needs, this approach is typically the safest. The downside of this is that itll take some extra work to get the exact functionality you want. The tool well be using alongside React Router in this article is the React Transition Group.
React Transition Group is an animation library that gives us a way to perform animations when a React component enters or leaves the DOM. When paired with React Router, this is exactly what we want.
Because theres a lot going on in this article, theres going to be some setup we need to take before we ever even start talking about animations. Feel free to skip ahead if youd like.
First, lets walk through the type of app were going to be building.
To do this, well rely heavily on React Router URL Parameters. If youre not familiar with those, I recommend reading this post before continuing.
By looking at the images above, we know were going to need a few different things before we even start looking at animated transitions:
If you have ever wandered into a department store or other clothing store, then you can understand how CSS selectors apply their styles.
If you are a beginner to CSS, you have probably seen plenty of scenarios already where CSS styling rules conflict. You think that you just added a new style to an element, but after refreshing the browser many times you realize that the style is not being applied for some reason.
Heres an example. Lets say that you have a general rule that all paragraph tags should have a line-height of 140%, like this.
But, you also want to create a subtitle class that will have a line-height of 120%, which will usually apply to paragraph elements.
So, which one will apply when you assign it like so?
This is a subtitle
The answer is the subtitle class styling, but I want to find a better way to explain the rules behind this logic. You dont want to open the Inspector every time you are unsure which styling is more specific..
Heres a scenario to help: imagine you are a salesperson in a department store or other clothing store. You get paid based on how many pieces of clothing you sell over the course of the day, so you need to spend your time with the best customers if you want to make the most money.
The customers that look most likely to buy get precedence. The customers that come in with a specific idea of what they want are more likely to buy.
CSS operates in a similar way. It will give precedence to the most specific styles, which will override less-specific styles. The most common ways to add style are:
Here is how to tell which of the selectors above are most specific. In each case, the customer is looking for a tailored suit, and you must sell as much clothing as possible.
Have you ever wandered into a department store with only a vague thought, like I need a suit for an event next week.?
From personal experience, I can tell you that this is a great way to get stuck in the store for hours, trying on random suits. Anyway, these types of customers will take the longest time to find something they like. They will need to talk to a few people and...
CRISPR (pronounced crisper) is part of a bacterial immune system evolved to remember and remove invading viral DNA.
Its name is short for Clustered Regularly Interspaced Short Palindromic Repeats. But despite its mouthful of an acronym and complex biological origins, its engineering application is straightforward. To get started, there is only one protein you need to understandCas9.
Cas9 searches for a specified DNA sequence and cuts it by breaking both strands of the DNA molecule. This protein is useful to researchers because they can program it to target any DNA sequence. A sgRNA (single guide RNA) molecule determines the sequence that Cas9 binds to. RNA is a biological molecule similar to DNA, that can bind to proteins and DNA.
sgRNAs are short sequences with a constant region and variable region. The constant region attaches the sgRNA to the Cas9 protein. The variable region causes Cas9 to bind to the DNA sequence that complements it (see the diagram below).The Cas9 protein bound to the DNA when the PAM sequence is on the forward (top) strand. The bold sequence is the target sequence, the green sequence is the sgRNA, and the three blue characters are the PAM. The triangles show where Cas9 will cut the DNA.
Making sgRNA is cheap and fast. This allows researchers to quickly set up a Cas9 experiment that cuts any DNA sequence. Well, not actually any sequence. There is a small constraint: the target sequence must be flanked by the correct PAM (protospacer adjacent motif)a short sequence of DNA.
Luckily, the motif NGG occurs roughly once every 42 basepairs in the human genome. This mean that researchers can find a target site near almost every sequence of interest.
Depending on the experimental set up, these cuts in the DNA can either cause a random change or a precise change to the DNA sequence (more on this later).
Before jumping into writing this program, I recommend studying the Cas9 diagram below.The Cas9 protein bound to a DNA sequence when the PAM sequence is on the reverse (bottom) strand.
Note that DNA and RNA have a directionality based on their chemical structure. One end...
Security vulnerabilities can be boring to learn. But you still need to learn them, unless you want some hacker to delete all your production databases. To make it a bit more entertaining, I tried to explain 3 major vulnerabilities in terms of every day life. So without further delay lets begin.
When you open a website you are connecting to a server. You can imagine this connection like a river and the data (for example Tweets in Twitter) are messages in bottles that float down the river.
If Alex (the server) wants to send you a dinner invitation he has to put it in a bottle and send it down the stream. But what if John (the attacker) takes the bottle out of the river and changes the message into an insult, then puts it back in the river? You will have no way of recognizing that the message you received hadnt been sent by the Alex!
This is called a Man-in-the-middle attack.
To solve this you and Alex can decide that you will write your messages reversing the order of the characters. For example, secret message becomes egassem terces.
John doesnt know the method you used to generate the secret code, so he cant understand what the message says nor change whats written on it without you noticing.
This is what the HTTPS protocol does, just with a fancier method.
Another way you can see a server is like your homes Inbox. You receive mail, read them and reply.
What if John starts to write you a ton of mail? You wouldnt be able to respond to Alexs dinner invitation in time, because you would be too busy replying to all the other Spam messages sent by John.
This is called a Denial-of-service attack, DoS in short.
A way to mitigate this is reading the sender on top of the mail before opening it. If its John then dont bother opening the mail. This way you dont need to reply to John and can focus on handling serious stuff, like Alexs dinner invitation.
This is IP Blacklisting in a nutshell, only with digital sender internet protocol addresses.
Unfortunately John convinced a lot of other evil people to send you Spam mails. So now you cant simply discard Johns mails, because there are lots of people writing you.
This is a Distributed Denial of Service (DDoS) and its very hard to deal with.
One way to handle this is to receive mail only from Alex. Its unfortunate that your other friends wo...
Tune into the 1A radio show on Monday, February 19 at 11 AM EST for How Do You Teach Slavery? with:
The 1A show, hosted by Joshua Johnson, will focus on a new report from the Southern Poverty Law Center called Teaching Hard History: American Slavery. In the preface to the report, Hasan Jeffries writes,
It is often said that slavery was our countrys original sin, but it is much m...
Colin Kaepernick and a team of organizers are offering a series of Know Your Rights Camps for youth across the country, where young people learn about health, history, criminal justice, higher education, and more. The Nation sportswriter Dave Zirin describes the power of this day-long event in Colin Kaepernicks Message to Chicago Youth: Know Your Rights. To take the learning home, participants receive a back-pack full of educational resources.
At the Zinn Education Project, we applaud the new Southern Poverty Law Center (SPLC) Report Teaching the Hard History of American Slavery, which highlights how schools inadequately teach the crucial history of enslavement in the United States. Too often this history is sanitized, sidestepped, or glossed over. The history of slavery and the resistance to it should be central to every U.S. history classroom.
The Zinn Education Project is preparing new lessons for release later this year on abolition, the Civil War, and Reconstruction. Below are some of the many free resources we have available for teachers to help their students better confront the hard history of slavery and the resistance that challenged, and ultimately overthrew, the slave system. The lessons also introduce students to the institutionalization of racism in the U.S., helping them to see the ways in which white supremacy continues to dominate our economic and political systems.
I feel very strongly that if we have the option, it is better to let kids play and not require chores whether for pay or not. The reason I feel this way is that I tried all kinds of options when my kids were young and all of them resulted in battles with my kids and resentment on my part. I switched to focusing on doing the chores as happily as I could, myself, and really focusing on the positive reasons for doing them while moving my thinking away from feeling like I had to do them! I did that for a couple of years and during that time my kids had switched their thinking too and didnt resist at all when I asked for some help. I didnt ask them to be responsible (without forgetting) for chores that was a setup for me to be resentful when they DID forget. I didnt ask them to tackle huge jobs that seemed overwhelming to them another setup for them to flake and me to be resentful!
I asked them literally to help me like if I was carrying a laundry basket I would ask, Hey could you carry this into the laundry room for me while I gather up another load? Or Id be IN the kitchen doing dishes and wed be chatting and Id just start handing dishes to a child to dry and put away while we talked and I moved on to washing more dishes or wiping counters off, etc.
I got more and more clear over time on why I wanted my kids to do household work! Some people justify it by saying they need the help, but it was clear to me that the battling over it and their shirking and so on was much MORE work for me, not less. I realized that I wanted my kids to help because I wanted them to grow up to be helpful people.
Once I was clear on my real objective, I quickly came to realize that you cant coerce someone into being helpful if you want them to become a helpful person. If you coerce them, they dont get the choice to be helpful so they dont get the good feelings they would if theyd done it voluntarily. And coercion creates resistance (either passive or active) and so they get into the habit of resisting being helpful. Not what I wanted.
So I stopped any attempt to coerce and they slowly became more and more helpful on their own. Eventually, they were doing lots of stuff themselves, without being asked. They all just sort of began doing their own laundry, for example. And theyd clean up their own rooms and often Id notice someone had cleaned up the kitchen or cleared off the always-cluttered dining room table. And I also helped them. If one of them had laundry going, they might ask me to help by getting it into the dryer. Or they might ask for my help in cleaning their room.
And in the meantime, life was calmer and happier for all of us.
He said Come unto Me all you who are weary and I will give you rest. He didnt say Come every Wednesday or Come unto me even though youre exhausted or Come unto me or else we wont be friends anymore. He said Come unto me all you who are weary And they dont tell 
If you are in a triad, or have been in the past, I would really love it if you would take the 15 minutes or so itll take you to fill out my survey.
Im gathering data on the experiences of people in triad relationships. This is part of my (non-fiction) book research but I will likely use the data for other projects as well, such as articles, blog posts here, or other, future books. However, all individual responses will be kept confidential.
Click here to take the survey. Please share with anyone you know who might be interested in taking part!
|IndyWatch Education Feed Archiver|
IndyWatch Education Feed was generated at Community Resources IndyWatch.
Resource generated at IndyWatch using aliasfeed and rawdog