June 29, 2014
Question: How would you create a binary search tree?
Answer:
to create a tree you need a node. a node in a tree looks like
function Node(val){
this.value = val;
this.left = null;
this.right = null;
}
Create a constructor for binary search tree
function BinarySearchTree(){
this.root = null;
}
Now you need to understand the structure of a binary search tree. For every node value in the left is smaller than the value of the node and value at the right is higher than the value of the root.
so while inserting a value you have to find the appropriate location
BinarySearchTree.prototype.push = function(val){
var root = this.root;
if(!root){
this.root = new Node(val);
return;
}
var currentNode = root;
var newNode = new Node(val);
while(currentNode){
if(val < currentNode.value){
if(!currentNode.left){
currentNode.left = newNode;
break;
}
else{
currentNode = currentNode.left;
}
}
else{
if(!currentNode.right){
currentNode.right = newNode;
break;
}
else{
currentNode = currentNode.right;
}
}
}
}
var bst = new BinarySearchTree();
bst.push(3);
bst.push(2);
bst.push(4);
bst.push(1);
bst.push(5);
Question: How do you implement Breadth First Search
Answer:
BinarySearchTree.prototype.breadthFirstSearch = function() {
var queue = [];
queue.push(this);
while (queue.length) {
var node = queue.shift();
console.log(node.value);
if (node.left) {
queue.push(node.left);
}
if (node.right) {
queue.push(node.right);
}
}
};
ref: stackoverflow
ref: js algorithms
Question: How to perform in order traversal
function dfs(node){
if(node){
console.log(node.value);
dfs(node.left);
dfs(node.right);
}
}
Question:
Answer:
function inorder(node){
if(node){
inorder(node.left);
console.log(node.value);
inorder(node.right);
}
}
ref: source of image
//code here
Question: How can you find the min value in a bst
finding min is super simple. the go through the left node and left most node is the minimum node
function minNode(node){
if(!node){
return 0;
}
if(node.left){
return minNode(node.left)
}
return node.value
}
Question: How can you find the max value in a bst
function maxNode(node){
if(!node){
return 0;
}
if(node.right){
return maxNode(node.right)
}
return node.value;
}
Question:What is balanced and unbalanced tree
Answer:
ref: Get answer from here
Question: check a binary tree is BST or not?
Answer:
Step-1: if node is null, its BST
function isBST(node){
if(!node){
return true;
}
if(node.left != null && node.left.value > node.value){
return false;
}
if(node.right !=null && node.right.value < node.value) {
return false;
}
if(!isBST(node.left) || !isBST(node.right)) {
return false;
}
return true;
}
The reason this method will generate wrong result is for
//use method 4 in the link below
Quetion: How could you check a tree is balanced or not
Answer:
check multiple example whether it is balanced. check balanced tree example
function height(node){
if(!node) return 0;
var leftHeight = height(node.left);
var rightHeight = height(node.right);
return Math.max(leftHeight, rightHeight) + 1;
}
Question:
Answer:
function printAncestor(node, target){
if(!node) return false
if(node.value == target) return true;
if(printAncestor(node.left, target) || printAncestor(node.rigth, target)){
console.log(node.value);
return true;
}
return false
}
ref: from stack overflow
this will work for bst only. If you are dealing with binary tree..this needs to be modified
function commonAncestor(node, n1, n2){
if(!node) return;
var val = node.value;
if(n1 < val && n2<val){
return commonAncestor(node.left, n1, n2);
}
if(n1<val && n2<val){
return commonAncestor(node.right, n1, n2);
}
console.log('lowest common ancestor value: ', val);
return node;
}
ref: common ancesotr
function commonAncestorBT(node, n1, n2){
if(!node) return;
var val = node.value;
if(n1 == val || n2 ==val){
return node;
}
var left = commonAncestorBT(node.left, n1, n2);
var right = commonAncestorBT(node.right, n1, n2);
if(left && right){
return node;
}
return (left) ? left : right;
}
ref: try pavels blog
ref: bst left view
ref: print right view
ref: merge two bst
ref: binary tree to bst
ref: check subtree
ref: gfg
Question:
Answer:
A binary tree whose height of the left subtree and height of the right subtree differ at most one.
Question:
Answer:
It is Self balancing binary search tree. This means in an AVL tree, heights of two child subtrees of any node differ by at most one. If at any time if heights differ more than one, re-balancing is done to restore the height balance property.
Lookup, insertion and deletion all takes O(logn) in average and worst case
Question:
Answer:A red-black tree is a binary search tree with one extra attribute for each node: the colour, which is either red or black.
ref: Red Black Trees


Open positions
| Market | Trade | Edit | P & L | GBP % | Close | |
|---|---|---|---|---|---|---|
| Wall Street CFD | +193.40 | |||||
| UK100 CFD | -122.54 | |||||
| Germany 30 CFD | +856.32 | |||||
| Gold (per 0.1) CFD | +34.20 | |||||
| EUR/USD (per 0.0001) CFD | -40.98 | |||||
| GBP/USD (per 0.0001) CFD | +100.32 |
Active orders
| Market | Edit | Quantity | Trade @ Price | Distance | Current | ||
|---|---|---|---|---|---|---|---|
| Wall Street CFD |
50.0
|
17550.0
|
218.9
|
17768.9
|
|||
| Wall Street CFD |
50.0
|
17650.0
|
118.9
|
17768.9
|
|||
| Wall Street CFD |
50.0
|
17400.0
|
368.9
|
17768.9
|
Watchlist > Popular markets
| Market | Short | Long | 1 day | ||
|---|---|---|---|---|---|
| Wall Street CFD |
|
18022.2
|
-0.26% |
||
| UK100 CFD |
6377.0
|
6378.0
|
-0.03% |
||
| Germany 30 CFD |
10322.4
|
10323.4
|
+0.35% |
||
| Japan 225 CFD |
16985
|
16995
|
+0.63% |
||
| Bolsas y Mercados Espanoles Jun 16 |
10322
|
10323
|
+0.08% |
||
| GBP/USD CFD |
1.4469
|
1.4470
|
+0.57% |
||
| US SP500 DFT |
2090.30
|
2090.40
|
+4.04% |
||
| EUR/USD CFD |
1.1260
|
1.1272
|
+11.62% |
-
New U.S. home sales drop on sharp decline in the West
WASHINGTON New U.S. single-family home sales unexpectedly fell in March, but the decline was concentrated in the West region, suggesting that the housing market continued to strengthen.
-
10:25am EDT
Wall St. opens lower as earnings continue to underwhelm
U.S. stocks opened lower on Monday as corporate earnings continued to underwhelm and investors stayed away from risky assets a day before the start of the Federal Reserve's two-day policy meeting.
-
10:05am EDT
El-Erian says this week's Fed meeting to set stage for June hike
NEW YORK Mohamed El-Erian, the chief economic adviser at Allianz SE , said on Monday he expects this week's Federal Reserve policy-setting meeting to set the stage for a June interest rate hike.
-
10:20am EDT
Saudi prince unveils sweeping plans to end 'addiction' to oil
RIYADH The powerful young prince overseeing Saudi Arabia's economy unveiled ambitious plans on Monday aimed at ending the kingdom's "addiction" to oil and transforming it into a global investment power.
-
10:23am EDT
Global stocks, dollar stumble ahead of Fed, BOJ meetings
LONDON World stocks, the dollar and oil all fell modestly on Monday as investors locked in recent gains before central bank meetings in the United States and Japan this week.
-
7:22am EDT
Oil resumes rise after brief pause
LONDON Oil prices rose on Monday, extending recent gains, building on three weeks of higher prices and reversing earlier losses from traders taking profits.
Saudi Arabia targets $2tn Aramco IPO as it outlines economic view
Saudi Arabia’s cabinet has approved the long-awaited plan for a big transformation of the oil-dependent economy, promising to list less than 5 per cent of the state oil company, Saudi Aramco, which will value it at more than $2tn.
The so-called “Vision 2030”, brainchild of Prince Mohammed bin Salman, the deputy crown prince and most powerful man in the kingdom, has been in the works for months.
Monday morning’s announcement of a cabinet approval was followed by an interview by the prince on the Saudi owned al-Arabiya channel, in which he optimistically asserted that the kingdom could end its reliance on oil within four years. Saudi Arabia derives more than 90 per cent of its budget revenues from hydrocarbons.
“We have an addiction to oil ... this is dangerous,” he said. “It has delayed development of other sectors.”
He added that he wants to convert Saudi Aramco into a holding company and that all financial information related to the company will be disclosed. Subsidiaries of the entity will also be listed and its board will be elected.
“The vision is a road map of our development and economic goals,” he said. “A part of that is related to Aramco and this is a very small aspect.”
The prince, who is also defence minister and oversees economic ministries, has emerged as the key decision maker in the country since his father, King Salman bin Abdulaziz, assumed the throne. He has since worked with a group of technocrats to slash expenditures, reform energy subsidies and lay out a vision for a post-oil economy.
The collapse in oil prices, precipitated by Saudi Arabia’s decision to protect its market share rather than the oil price, has forced a re-evaluation of economic priorities in Riyadh, prompting the prince to press for the development of non-oil sectors. The prince cited mineral mining and a domestic military industry as priorities for development.
As the nation awaits further details of the economic vision later on Monday, the prince said the plan envisaged boosting housing and jobs for an overwhelmingly young population.


Welcome to the web server about page! This project is a simple web server that handles web requests using short-lived C# sockets!


AUD/USD advances to 0.6820 area as focus remains on US-China trade conflict
by Eren Sengezer- Lack of clarity on US-China trade talks keep investors on edge.
- RBA reiterates readiness to ease policy further if needed.
- US Dollar Index moves sideways near 97.80 mark.
After dipping below the 0.6800 handle pressured by the Reserve Bank of Australia's (RBA) policy remarks during the Asian session, the AUD/USD pair gained traction and was last seen trading at 0.6820, adding 0.2% on a daily basis. However, this move seems to be a technical correction in the absence of significant macroeconomic drivers.
The minutes from the RBA's November meeting showed that the board was prepared to ease the policy further if needed and agreed that an extended period of low interest rates would be required to meet targets. On top of the uncertainty surrounding the United States (US)-China trade talks, the RBA's dovish comments weighed on the AUD.
Focus remains on US-China trade dispute, FOMC minutes
Following CNBC's report about China mulling the option to wait for the 2020 US presidential election before finalizing a trade agreement with the US, “During an entrepreneurship roundtable in Beijing, the two sides had apparent disagreements on the nature of trade relationship, with the US insisting that it hasn't had enough benefits,” Chinese news outlet Global Times reported.
On the other hand, the greenback stays relatively quiet as investors are waiting for the Federal Open Market Committee (FOMC) to release the minutes of its October meeting on Wednesday. As of writing, the US Dollar Index, which registered modest losses on Monday, was flat on the day at 97.80.
Technical levels to consider
AUD/USD
| Overview | |
|---|---|
| Today last price | 0.682 |
| Today Daily Change | 0.0008 |
| Today Daily Change % | 0.12 |
| Today daily open | 0.6812 |
| Trends | |
|---|---|
| Daily SMA20 | 0.6856 |
| Daily SMA50 | 0.6816 |
| Daily SMA100 | 0.684 |
| Daily SMA200 | 0.6938 |
| Levels | |
|---|---|
| Previous Daily High | 0.6823 |
| Previous Daily Low | 0.6798 |
| Previous Weekly High | 0.6866 |
| Previous Weekly Low | 0.6769 |
| Previous Monthly High | 0.693 |
| Previous Monthly Low | 0.667 |
| Daily Fibonacci 38.2% | 0.6808 |
| Daily Fibonacci 61.8% | 0.6813 |
| Daily Pivot Point S1 | 0.6799 |
| Daily Pivot Point S2 | 0.6786 |
| Daily Pivot Point S3 | 0.6774 |
| Daily Pivot Point R1 | 0.6824 |
| Daily Pivot Point R2 | 0.6836 |
| Daily Pivot Point R3 | 0.6849 |


This is an Angular 2 application.
It based on Quikstart seed from official Angular 2 site.
And it uses Spotify Web API to search artists and display their albums and tracks.
I have implemented this app to demo most importent Angular 2 concepts such as:
1. Multiple Components
2. Services
3. Routing
4. HTTP communication with external REST API


Login to your dashboard with your registered email address and password.
Already have an account? Login here


Before Change
bool - False if grads cannot be packed due to various reasons.
for g in grads:
assert g.shape.is_fully_defined(), "Shape of {} is {}!".format(g.name, g.shape)
self._shapes = [g.shape for g in grads]
self._sizes = [g.shape.num_elements() for g in grads]
self._total_size = sum(self._sizes)
After Change
bool - False if grads cannot be packed due to various reasons.
for g in grads:
if not g.shape.is_fully_defined():
logger.warn("Found gradient with incomplete shape: "
"{} has shape {}".format(g.name, g.shape))
return False
self._shapes = [g.shape for g in grads]
self._sizes = [g.shape.num_elements() for g in grads]
self._total_size = sum(self._sizes)
if self._total_size / self._num_split < 1024:


ASTRO are draped in blue in 'Blue Flame' concept trailer
by germainejASTRO have revealed their concept trailer for "Blue Flame".
In the trailer, ASTRO are draped in sheer blue, and a book burns up in flames. As previously reported, the group's sixth mini album 'Blue Flame' drops on November 20 KST, and they're returning with a chic, sexy concept.
Watch ASTRO's concept trailer above, and let us know what you think in the comments below.


I live in a days podcast for Monday.
Most wonderful show is keeping up with the Joneses.
AJ Jones.
Yes.
Episode 92.
It is episode 92.
What are you thinking?
I'm thinking, wow, these poor people listen to us for 91 episodes.
And they've come back for more.
Yes, they have.
Talk to them about this week.
It was a good week.
I taught on Romans on second year.
we go through it verse by verse, which is quite fun.
And you taught on...
- I taught on angels, demons, and spiritual warfare.
- Yes, and third heaven things.
- And third heaven experiences.
- Yes.
- So it was fun because you're watching
some of the students' faces be like, "Whoa!"
- Wait, what are you talking about?
- But it's one of the funnest weeks to teach.
- It is very fun.
- If you wanna hear our views on spiritual warfare,
we recorded a podcast on that episode 41,
go to allen and AJ.com/41 if you want to listen to that.
Yep.
And then emanate.
All emanate was run by our wonderful emanate pastor, Michelle Voucher, who spoke and did
a great job.
She did a fantastic job.
And then said Michelle and her wonderful husband Richard came over Thursday afternoon
we were hanging out and they said, "What are you doing tonight?"
And we realized Thursday night is our date night.
Yeah, it's supposed to be our date night.
But we hadn't got a babysitter.
No, we often forget.
So he said, do you want to stay and watch Marvel movies while we go on a date?
And they were like, yes, they knew and they even came over early and played with the kids and put them to bed.
So we just got to go and put her around for three hours.
And literally we did Poser.
We started on a treasure hunt trying to find a new grill.
Well, we started off by returning random items like light bulbs, and mattress covers.
That's the height of romance in the job.
It was very, very sexy.
date night has turned into returning all our overdue items.
-The sad part is that we get excited about it.
-Well, it's because we get money.
-We go out. It's true.
-We made like 100 bucks just by returning things.
-I know. It was so good.
-Then we wandered around Costco.
-No, we didn't get to.
-I love wandering around.
-We intended to wander around Costco.
-We got sidetracked by Willem since Sonoma.
-That used to be our favorite date.
Do you remember when we first started dating,
we had no money at all.
We would either go to Costco and wander around or go to Ikea.
And why did I like Ikea more than Costco?
Because they had meatballs.
They did. They had Swedish meatballs.
And it was cheap for plate of meatballs.
It was like, I don't know, five or six dollars for meals.
We did. And we still do. We don't have an Ikea, but we still go to Costco sometimes on date nights.
But if there was an Ikea here, you know we'd be hitting Ikea.
Oh, yeah, I'd hit Ikea.
And then the week continued with excitement I met with our accountant.
I think I've finished our taxes and it's not even the end of February.
You are remarkable.
Can you pat me on the back?
I can't reach you from here, but sure.
Okay.
That's perfect.
And then to end the week you spoke at church this morning.
I did.
Jeff is out of town on vacation.
On a well-earned vacation.
Yes.
And they're somewhere in Australia or New Zealand.
They're in New Zealand.
Will they access to the internet?
Yeah.
They're in New Zealand and then they're doing like a cruise thing with some friends of there.
So they're going to be gone for about three weeks.
And so Alan and I have taken over Sunday mornings.
I don't know if I told you this, but at some point, Abigail, our eight year old just in passing and walking down the corridor.
She's, I think she's brushing her teeth and she says, Dad, and I was like, uh huh.
She said, you know, it's important to love yourself because if you don't have love for yourself, how can you love your neighbors yourself?
You can only give what you have.

But as good as all that was, the whole week has been overshadowed by something awesome
and incredibly frustrating. I am, of course. No, no, no. There's other things to talk about.
We've already talked about this. No, no, no. We need to. What do you want to talk about?
Well, I wanted to say what MJ said going upstairs tonight. Sure. Okay.
So we're going upstairs to get ready for bed.
And MJ says, "Mommy, Jesus loves me."
I said, "Yeah, he does. And God loves me. Yes, he does, darling."
And if there's monsters in my room, all I do is ask Jesus to come in my room and they leave.
And I was like, "Yeah, baby." He was like, "Because Jesus is really big."
I said, "That's right, darling." And he just, you know,
potted it off to bed. But it was just this random, very sweet little conversation.
So you don't need to listen to our podcast on spiritual warfare, just that will do.
That's a good summary.
There you go.
Jesus is really big.
Back to what overshadowed this whole week with glory, genius, and extreme frustration.
Yes.
It's a new iPhone game.

Well it had you up till about 11 p.m. last night making warbling noises to your iPhone.
Well, I skillfully avoided even looking at the game until last night because you saw
how much distress it was causing me.
Yes, and I thought, I don't need to play a game that is all about frustration.
Well, it's not.
It's all about thinking outside the box.
Yeah.
The name of the game is called Black Box.
And it's ingenious in so many ways.
It's designed so that it's unlike any other game I've played.
We wrote Little Blurb on our website.
We'll put a link to it in our show notes that gives more detail about it.
But it is, it's referred to say it's consumed most of my waking hours.
Yeah, for three or four days.
And if you like cryptic, it's like every episode of lost thrown into your world and you play
in a game.

What does this mean?"
So when we went on our date on Thursday, even though we were like puttering, we were out
looking for a gorilla and all that, Alan was playing that game the whole time.
Well, I was trying to.
I'd got as far as I could.

Well, the legacy you will go to yet will not just me.
Yes, you and your competitive friends.
He invited some of our friends to look at the game and now they're all in some sort of competition.
Yeah, but Will's going to win because he flies off to Australia this week.
But I thought you said it doesn't win inside of a phone.
Like inside of a plane, I'm sorry.
Well, that's one of the challenges.
We don't want to give too much away, but he's going to win one of the challenges ahead of me,
which is why I took a road trip the other night with Jonathan.
you guys just drove to try and beat one of them. So funny. But we were filed.
No, last night when you're like, "Pape, when's the next time we drive somewhere far?"
Like, Florida. Like, July. No time soon, sweetheart. No time soon.
So anyway, that game, if you haven't checked it out already, it's called Black Box. It will
entertain Orphistrate you for sure. I think pretty much men would be interested in that game.
Yeah, you said that till you opened up and then you were like, how do I do this one?
Okay, how do I do this one?
Okay, how do I do this one?
Yeah, so I played it for 20 minutes last night.
Asked me if I've opened it today.
Have you opened it today?
No, I just was like, meh, wasn't that much fun.
Oh, but you're nearly at the most amazing level.
I don't believe you.

One day.
Let's talk about settlers of cotan and addiction.
Now, cotan is worth being addicted to.
All right, our main topic this week.
settlers of cajan. No, our main topic for this week is I want to talk about having a happy future.
Yes. I think this revelation started last night, although I mentioned it briefly at church this
morning. But you were cleaning out the garage. We should probably talk about you cleaning out
the garage. Yes, we should. I could actually get like many points for that.
Sidebar while we talk about the garage, then we'll go back to the main point.
What did you do in the garage? I organized the entire garage. We got these overhead hanging
storage things last week. And I went and organized those overhead storage things.
Well, you went and reorganized the ones that I'd already organized.
Yes, because they have a weight limit, which was far surpassed by your efforts to get things
on them. Okay, wait. Did he motivate me from ever helping again?
I'm sorry. You did a tremendous job. We actually now have a fully functional garage.
We could pull two cars in if we wanted. As opposed to an assault course.
- Right, exactly.
And I swept out like every bit of spider remains,
that sort of thing.
So it's just--
- Spiders.
- I like the garage now.
- But in, so returning to the main topic,
in your job of cleaning up the garage,
you found a box of old photo albums,
you came and you're like, "Oh babe, look at these photos."
- Yeah.
- And I realized that when I looked at the old photos,
I got sad and I was like, "Holy spirit, why am I sad?"
And I realized I don't generally spend any time looking back.
Yeah.
It's a big shock.
You've noticed that.
Have you?
And not necessarily because the past is bad, but because I think what I have now
and what I live in now, what I experience now, everything else pales in comparison.
So when I see photos of myself in the past, I realize I'm sad because the person
I'm looking at doesn't know what I know now about God.
Yeah, I had a similar revelation looking back at pictures.
I was showing Cindy's and pictures of me in my 20s or early 20s.
And I realized how sad I look, you know, just desperately sad.

Well, then I was just past trying to kill myself, but I was still
dealing with dad having killed himself and all that kind of stuff.
So it was, it was rough.
And you could tell by looking at me, I mean, it looked rough.
Well, I was thinking this morning in church, when I look forward, you know, when I cast
my imagination down the line, I realize I'm filled with optimism.
And I would attribute that to hanging out with God a lot.
Sure.
Because he's optimistic.
He's the most optimistic person I've ever met.
Right.
You know, I was thinking about like all of our friends whose lives have been marked by
tragedy or suffering in one way is that they don't live there anymore.
Well, if you choose to live there, you get stuck.
Sure, you become a volunteer to your past
rather than a victim of it.
Right.
And you don't move on.
Tell us the story about what happened to you this week.
That's the second time it's happened to you.
Another sidebar moment.
Oh.
(laughs)
Who was I talking to?
Somebody invite you to speak at a conference.
Oh, that's right.
Somebody's invited me to speak at a woman's event.
And so I said, okay, totally I'll pray about it.
And she's sort of explaining what the event will be like.
And she said, oh, we have people come that have just
had difficult things that they've navigated.
And just to encourage people that these women,
no matter where they're at, God can break through blah blah.
So she said, typically we have people with abusive backgrounds,
people that have lost children, people that husbands that cheat
on them, people that--
so she's going through the list of what they typically invite.
And I know that I'm invited with two other people
that I know to be the speakers.
And I'm like, oh yeah, she can speak on that.
And she can speak on that.
And in terms of what's part of our testimonies.
- Sure.
- And so then when she says the bit about
women whose husbands have cheated on them or whatever.
And I was like, yeah.
Gosh, I don't know who she's gonna get to speak on that.
That's none of our testimonies.
(laughs)
And it literally, it probably wasn't,
it was probably a full five minutes down the road
I was like, "Oh, yeah, that was me."
That was my testimony.
But then God so fully has redeemed it
that I keep forgetting that I walk through anything like that.
- I just think that's amazing.
- Yeah, it's really cool.
- Right, so back to my friends who in a similar situation
as you whose past have been marked by tragic,
like think of, we have a friend who lived in a time
when her nation was under civil war.
She was beaten for her faith,
actually beaten and left for dead for her faith was eventually murdered at the hands
of terrorists, got raised again, came back to life only to be tortured for her faith.
And you know, we, when we hang out with her now, we're like, honey, how did you survive
that?
Right.
And why are you not marked by any of the trauma of that?
Because she's one of the most joyful people we know.
In childlike, totally childlike.
She just runs around like a little kid with the kids in the backyard and giggles.
And this is what she said.
She said, darling, he gives you grace.
He said, "I saw the face of my beautiful Savior.
He is marvelous."
And my point in telling all that story is as grim as that was, it isn't her reality
today.
Right.
Like everything gets better.
That's what I love about the message of the hope of Jesus.
It's so true.
I think when I think about most of the people I esteem on one level or another, they kind
of walk with a limp, don't they?
You know, they've definitely been through stuff, but they've been through it.
They didn't stay in it.
They went through it and they came out the other side.
Exactly.
When I think about it, we both in our 20s, probably more me and my teenage years had
brushes with really deep depression and suicide and suicidal attempts and all that kind of
stuff.
And really, those things seem so distant now, you know, from who we are and what our reality
is now.
They were something that was a place we could have gotten stuck in, but the Lord brought
us out of those places and we didn't choose to go back.
And he's so merciful to do that.
Like I remember my early twenties were just a write off in terms of despair.
And now when I, you know, when I think about that person, then I have no
correlation with him.
And that's ridiculous because it's the same person.
It was me, but it doesn't feel like it.
I'm not haunted by those experiences.
Right.
And I just think that's a testimony to the power of God that he makes all things new.
He's, he's so good.
So taking taking your testimony, thinking what he did then to now apply that same faith for what
you're going through now going forward. Right. Totally. You know, the book of Psalms is filled
with that David's experience, of course. But when I think about the future, I'm absolutely filled
with excitement because with God, his potential is incredible. Well, in truth, we can't even
possibly imagine the potential.
I couldn't imagine we are where we are.
No, I couldn't either.
It's like bizarre.
I spent some a Saturday archiving old email.
I'm fed up with having emails since 2003 in my inbox.
It slows everything down.
So I exported a bunch of it to PDF and archived it and filed away.
Yeah.
And I'm determined to only keep five years of email history current with me.
That seems like enough.
And I'll archive the rest as we go on.
But I was reading all these emails about us coming here,
you know, us dialoguing with staff with Jeff and just thinking, we don't have a clue what
we're doing when we came here. Yeah. But it turned out brilliant. Well done, God.
Yeah. Hey, I found something even older than that. Go on. When I was cleaning out the garage,
I had printed out all of our emails that we sent back and forth before we started dating.
And then all of the emails that we sent back and forth when you were in, you know, Moscow and I was
in, you know, Mexico, all those kinds of. So here's the difference between me and you. Yeah.
i came across the same last night and just delete them you did not
i want to i don't need them but you printed them out that's just a total difference between me and you they're in a book but i don't know if i have all of them i'm not happy to leave it out
i'm sorry it's the way i'm wired love i'm always looking forward i'm i'm present future not present past okay i'm sorry
Well, in the future, anything that might be a precious momento, maybe don't delete that until you talk to me.
I'm looking forward to the future precious momento.
Oh, whatever.
Psalm 23 says this, "Surely your goodness and love will follow me all the days of my life,
and I will dwell in the house of the Lord forever."
That's the last verse of Psalm 23.
I love that it says, "Surely, surely your goodness," like, duh.
Like it's such a given that God's goodness and God's love are going to be with me.
And the end result is dwelling in God's house forever.
I love that.
I love that sense of optimism that whatever happens tomorrow, goodness, love, God's mercy
is just going to be there with you.
Yeah, absolutely.
It's so good, isn't it?
Oh, it's amazing.
Jeremiah 29, 11, everyone knows this verse.
Yes.
"For I know the plans I have for you," declares the Lord, "plans to prosper you, not to harm you,
plans to give you hope in the future."

That means every day gets better from here.
Yeah.
And if you can align your expectations with that, then you're
live full in line with your expectations.
Absolutely.
Yeah.
And also even if your circumstances don't point to that today, you
can make them bow to that truth because you have a promise from God.
Absolutely.
And again, looking back, none of my circumstances 20 years ago pointed to where I am today.
You know, not at all.
So we really have no clue.
When Graham Cook was here last last year, was it?
Yeah, we got to hang out with him for a couple of days.
And I remember we went to the factory.
You and Teresa went shopping and me and Graham sat down.
He just really loved the factory and he had a good coffee.
And we just sat in chat and he was so sweet.
He saw me taking notes.
He's like, would it not be easier if I just recorded this conversation?

And I was listening to today.
And I was just asking, you know, Graham, what are some of the things that
you've found super valuable in life that you've learned?
And he said, he said this to me.
He said, what if in this life in Jesus, we can't be challenged by anything
other than goodness?
And I was like, I give up.
I don't know.
What?
I don't even know how to get my head around.
What's the answer?
But he said, "What if in this life in Jesus,
you can't be challenged by the enemy?
You can't be challenged by difficult people.
You can't be challenged by hard circumstances.
What if you're only ever going to be challenged by goodness?"
And so I said, well, explain it to me,
he says, "That means in every situation of life,
you and I are under a wonderful challenge
from Jesus to be just like Jesus and become like him.
And he will make all these resources available for you
to become more and more like Jesus.
- Right.
- And I thought, what a wonderful perspective.
'Cause he was saying, you know,
the fruit of the spirit, living in that,
you're out of touch from the enemy
because none of those things are available to him.
So if you can practice patience,
if you can celebrate love,
if you can enter into joy, into gladness,
to all these things, he said,
"That's where you will find those things."
And those things aren't dictated by your circumstances.
- Right, so good.
- When I look back on the different seasons
our life. I realize that in nearly every area, our life has been upgraded.
Yeah. But that's just ridiculous. But it's ordered by God.
That's really why I love the declarations that we make at our church.
Before we do our, if you're not being the grace in our, before we take up our ties and offerings,
we always make declarations. One of my favorite ones is, as we come today and give our offerings,
we declare jobs and better jobs, raises and bonuses, benefits, sales, tips and commissions,
favorable settlements, estates and inheritances, interests and interest. Interest and income,
rebates and returns, checks in the mail and on and on and on. And some people have got,
over the years, have got upset with us for saying that thinking, you know, what are you doing?

I'll probably end up owing you my taxes rather than getting a rebate.
I'll probably not get that promotion.
Aligning your expectations is so, so super important.
That also reminded me when you were talking about that, babe, that the day before we got married,
I had lunch with Patricia King. She couldn't stay for the wedding. Right. And we had lunch.
And it was quite a funny conversation because she said, "AJ, I went to your wedding,
and I saw the presence of God there." As you do. I went in the future, I went to your wedding.
I was like, "Okay." And she said, "And as I prayed for you this morning, I heard the Lord say,
"Your past has been marked by trauma, and your future will be marked by favor." And she said,
everything changes today. And I just thought, okay, and that's so true.  Like we can't keep up with how good God is.
Oh, I love Patricia. I love that word. All of this has got me thinking, what is God
having store for us tomorrow, for this next season? Right. Well, and you, dear listener,
what is God having store for you? I'm aware that when I speak about this, there's people
that come to mind where I think this hasn't been true for them. But one of the things that's
marked their lives is they've actually tried to follow God on their terms. Like I meet people all
the time who say they're Christians. I believe they're Christians, but their lives are so measured
in their obedience to God. They are happy to follow God up to a point where his will conflicts
with their will. And then inevitably when they choose their own way, destruction happens.
destruction is too strong a word, but well, maybe it's not.
Stuff just starts falling apart and almost without exception, these people have
then railed against God.
And I just think that's so funny.
Actually, you departed from him.
You chose not to follow him thinking that you were following him.
And you know, we had this conversation when we said, hey, do you
think that's a good idea?

But Proverbs 19 3 says this, people ruin their lives by their own foolishness
and then are angry at the Lord.
Not amazing.
Yeah, it is amazing.
But what would you say to people who are not in that situation, who are genuinely following
God, but today as they're listening to this podcast, life isn't all roses and everything
isn't glorious.
What's your encouragement for them in that?
Keep pushing into God anyway.
It's going to change.
Right.
It's going to change.
You're going to have breakthrough.
He's not going to do for one person, what he wouldn't do for another.
The Bible says he's no respecter of persons.

And you got to understand that you're living in a season as Jeff dollar loves to say the book hasn't been written. Yeah, right. You the chapter that you read hasn't even been written.
And my encouragement is in the seasons of my life where things look bleak.
I've discovered that the landscape that God's going to perform his next miracle.
Yeah, for sure.
All right, there's our meandering thoughts. You have a glorious hope and a glorious future in Christ Jesus.
Yeah. And if you're not in Christ Jesus, today would be a great day to give your life to Jesus.
Yeah, absolutely.
I want to pray for everybody, babe.
OK, I want to pray for you.
If you don't know Jesus, then let me pray for you and you can pray along with me.

And you recognize that you've sinned, that you've done things wrong.
And you recognize that Jesus came to save you from your sin and wants to restore you to relationship with God.
And if that's something you want, just repeat this with me.
Lord Jesus Christ, I invite you into my heart.
I ask you to forgive me of my sin.

And I ask you to forgive me of my sin and lead me in the way everlasting.
Now, if you've prayed that for the first time, please email us.
Go to our website, allenaij.com/feedback.
fill in that form, let us know.  So Lord, we just thank you for our listeners tonight. We just ask
that whoever's listening to this right now will be so overcome with optimism because God is on
their side that no matter what they're facing today, no matter what they're facing tomorrow,
Lord, your promises that your goodness and your love is following them.
And so I just asked for a tangible increase in those two things.
And I asked Lord for a shift in seasons for people that they would move into
just this glorious season of upgrades where they would know your kindness
and your goodness as your true nature.
Yeah.
And Papa, would you overwhelm them with hope about the future?

And we speak breakthrough in Jesus name, Amen.
- See, God is an eternal optimist.
- Yeah.
- And my encouragement is choose to be just like your dad.
Say no to negativity and yes to excitement in God.
- All right.
If you would like the show notes for this episode,
go to<EMAIL_ADDRESS>- If you would love to ask us a question that we will try and answer,
answer, go to allenaj.com/ask.
And finally, if you are loving listening to this podcast, would you kindly leave us a
nice review on iTunes?
It really helps us a lot.
And it helps people that are maybe looking for God see us because of how iTunes organizes
pages.
So the easiest way to leave us with reviews is to go to allenaj.com/review.
See you next week.
âTMª Faith, life, communication âTMª
âTMª Tacos and video games âTMª
âTMª Paleotronuts and the kindness of God âTMª
âTMª The things we deal with every day âTMª
âTMª From Franklin, Tennessee âTMª
âTMª They are just like you and me âTMª
âTMª Allen, yeah âTMª
âTMª And A.J. âTMª Oh yeah.


Last updated: 2018-02-28
Code version: 4e0238e
An general biological introduction about var genes are as follows:
There are four parasites in total, one of them is plasmodium. Regarding plasmodium, they could exist in Chimpanzees, gorillas, bird, reptiles, and even humans. There are four species of plasmodium could infect humans in nature, in addition, one is zoonotic malaria plasmodium. They are:
P.falciparum: Cause of severe malaria, found in tropical and subtropical areas, infected parasites even could clog blood vessels.
P.vivax: Mostly found in Asia where has high population density.
P.oval: Mostly found in Africa where most people are negative for the Duffy blood group.
P.malariae: Three-day cycle, former three kinds are two-day cycle.
P.knowlesi: Zoonotic malaria in Southeast Asia, particular in Malaysia. 24 hour cycle leading to rapidly severe infection.
Each plasmodium genome encodes approximinatly 60 different PfEMP1 proteins, which are expressed from var genes, one at a time. Each var gene consists of various numbers and combinations of DBL\(\alpha\) and CIDR domains. Another way of say from QixinHe, Each var gene is composed of \(l\) epitopes that connected linearly, and each epitope can be viewed as a multi-allele locus with \(n\) alleles.
Meiotic recombination and mitotic recombination is major mechanism of var genes.
Meiotic recombination: Found within mosquitos.
Mitotic recombination: Found in asexual blood where the parasites spend most of their life cycle. Somatic cells is produced.
This paper shows us five conclusions as follows:
When we extend and analysis parasite sequences to the whole Laverania subjenus. From Figure 3, we can clearly see the single-infection species ( C1(P.r), G1(P.p), C3(P.b), C2(P.g) )and P.f indicate the presence of shared mosaic elements after comparing the non-var DBL domains, moreover , every Laverania var tag contains three conserved motifs separating two HVRs, indicating all species in Laverania subjenus share similar DBL\(\alpha\) tag structure.
\(\bigstar\) Add my thought when I read through this part: one is when we look at this Figure 3 carefully, we could find part of P.g species (red square) are far from the other P.f, P.r and P.b, remaining sequences in P.g exist in major HVR lest and right region. Apparently authors do not provide sensible explanation. The other one is if we look at the right HVR network, it is clear to notice the yellow circles are assembled in the major region particularly. According the legend, yellow circles represent non-var DBL circle, it seems not very sensible in some sense, authors even do not mention it in the paper.
Here researchers investigate all the Laverania species by constructing HVR networks but exclude P.f, in this part, C1,C3 and (C1,C2,C3) are assembled together clearly, which is consistent with previous classification. Here authors offer one illustration about the placement of P.g, the P.g appear to fall into two subgroups, longer sequence group are partially overlapping with P.r and P.b, while the shorter sequence group are far away the main part, they are given two terms respectively, DBL\(\alpha\)-like and DBLx-like.
Then look at the samples of single-infection P.g and multi-species infection GTggg118(P.p and P.a), they discover both of them contain DBLx sequences from networks shown in Figure 4, they thus hypothesize DBLx found in GTggg118 comes from P.a, which is a sister taxa of P.g. Hence, it is highly likely DBLx sequences is a new subdomain in C2/G2 branch of Laverania radiation.
It has been previously published var genes could divided into two main group based on the number of cysteine residues, then according to the presence or absence of key amino acid residues, these two main group could be further subdivided into a total of six CP groups. Different groups are associated with different clinical phenotypes. Based on Supplementary Figure 6, we could find the P.b also exhibit same organization, both with cysteine residues count and CP groups. P.g are sot sufficiently to infer since it is lack of enough DBL\(\alpha\)-like motifs.
Another two interesting points I need add is the identification of HVR and Bayesian K-mer analysis. Researchers identified HVRs using a sequence entropy approach, aligning HB3 firstly, then compute Shannon entropy and choose sequences which entropy was more than 2 bits, then repeat same step in HB5, last is HB2. Bayesian K-mer analysis is employed to estimate the overlap for global populations of P.f and P.r instead of between species for our currently available datasets. The overlap parameter \(p\) is views as beta distribution with parameters \(\alpha\) and \(\beta\), then calculate these two parameters by maximizing the log-likelihood.
Lastly, one note: the whole structure of this paper is kind of different with normal publications.
This R Markdown site was created with workflowr


{{ template "tmp_head.html" }}
{{ template "tmp_navi.html" . }}
Docker system prune on worker nodes
Remove images in Chart on worker nodes
Tag Constraint
Supports
"<", "=", "<=", "^", "~"
. For more details, refer to:
https://devhints.io/semver
Set Values
Set values to overwrite
values.yaml
during cleaning up, values can be separated with commas:
a=b,c.d=e
Force
Dry Run
Simulate "for real", will not affect the real world
Timeout
Supports units are
"ms", "s", "m", "h"
Verbose mode
Fire in the hole
{{ template "tmp_script.html" . }}


This a list of movies where the critics ratings were much higher than both the RT audience ratings and the IMDB audience ratings.

IMDB: 5.7, RT Aud: 31%, RT Critics: 67%
Hold the Dark's unsettling aesthetic offers more of what filmgoers expect from director Jeremy Saulnier - and is often enough to prop up shaky narrative underpinnings.
IMDB: 5.5, RT Aud: 57%, RT Critics: 77%
Fahrenheit 11/9 finds Michael Moore in fine fighting form, delivering a political call to action that ranks among his most effective works.
IMDB: 6.0, RT Aud: 45%, RT Critics: 75%
Excellent cinematography and Rachel Weisz's entrancing performance keep My Cousin Rachel alluring despite a central mystery that's rather easily unlocked.
IMDB: 6.2, RT Aud: 44%, RT Critics: 87%
It Comes at Night makes lethally effective use of its bare-bones trappings while proving once again that what's left unseen can be just as horrifying as anything on the screen.
IMDB: 5.6, RT Aud: 46%, RT Critics: 91%
Most Beautiful Island plunges audiences into a little-seen sector of society, with writer-director Ana Asensio's fearless performance leading the way.
IMDB: 5.8, RT Aud: 48%, RT Critics: 77%
The Little Hours gets plenty of goofy mileage out of its gifted ensemble, anchoring its ribald laughs in a period comedy with some surprisingly timely subtext.
IMDB: 5.5, RT Aud: 44%, RT Critics: 75%
A kaleidoscopic neo-noir, Gemini is a visually striking murder mystery with a convoluted but largely compelling plot and an impressive showing from Lola Kirke.
IMDB: 6.2, RT Aud: 50%, RT Critics: 82%
Sausage Party is definitely offensive, but backs up its enthusiastic profanity with an impressively high laugh-to-gag ratio -- and a surprisingly thought-provoking storyline.
IMDB: 5.2, RT Aud: 38%, RT Critics: 78%
Powerfully acted and emotionally affecting, The Phenom proves a baseball movie can step away from the mound and still deliver a heater down the middle.
IMDB: 5.4, RT Aud: 40%, RT Critics: 79%
The Monster uses its effectively simple setup and a powerful lead performance from Zoe Kazan to deliver a traditional yet subtly subversive -- and thoroughly entertaining -- horror story.
IMDB: 5.7, RT Aud: 44%, RT Critics: 69%
White Girl isn't an easy watch, but it adroitly walks the line between exploitation and drama -- and marks an admirably assured debut for writer-director Elizabeth Wood.
IMDB: 5.9, RT Aud: 41%, RT Critics: 74%
For filmgoers predisposed to enjoy Todd Solondz' brand of black comedy, Wiener-Dog won't disappoint -- but those put off by previous works need not apply.
IMDB: 5.7, RT Aud: 44%, RT Critics: 77%
Goat isn't an easy watch, but its thought-provoking themes, talented cast, and all-out intensity offer rewards for viewers willing to tough it out.
IMDB: 6.2, RT Aud: 52%, RT Critics: 79%
Personal Shopper attempts a tricky series of potentially jarring tonal shifts with varying results, bolstered by a performance from Kristen Stewart that's impossible to ignore.
IMDB: 5.6, RT Aud: 36%, RT Critics: 58%
High-Rise may not quite live up to its classic source material, but it still offers an energetic, well-acted, and thought-provoking take on its timely socioeconomic themes.
IMDB: 6.0, RT Aud: 45%, RT Critics: 79%
Z for Zachariah wrings compelling drama out of its simplistic premise -- albeit at a pace that may test the patience of less contemplative viewers.
IMDB: 5.6, RT Aud: 40%, RT Critics: 66%
Nasty Baby juggles an ambitious array of tones, and not always successfully -- but its talented cast and surprising narrative twists leave a lingering impression.
IMDB: 5.7, RT Aud: 46%, RT Critics: 82%
As brilliantly and uncomfortably confrontational as its protagonist, Entertainment is a boundary-blurring exercise in cinematic misanthropy that more than lives up to its title.
IMDB: 6.2, RT Aud: 52%, RT Critics: 86%
With a typically absorbing performance from Greta Gerwig leading the way, Maggie's Plan gives rom-com sensibilities a smart, subversive twist.
IMDB: 5.6, RT Aud: 45%, RT Critics: 76%
Last Days in the Desert offers enough stately grandeur and spiritual exploration to offset an occasionally ambiguous narrative.
IMDB: 5.7, RT Aud: 48%, RT Critics: 95%
Smart, powerfully acted, and devilishly clever, We Are Still Here offers some novel twists on familiar territory -- and heralds the arrival of a major talent in writer-director Ted Geoghegan.
IMDB: 5.3, RT Aud: 44%, RT Critics: 76%
Equal parts enthralling and unsettling, London Road uses an unusual documentary/musical hybrid to tell a grim true-life tale.
IMDB: 5.5, RT Aud: 39%, RT Critics: 93%
A weapons runner for a Mexican cartel kidnaps an ATF agent who was trying to catch him and decides to take the agent to his bosses, but the two form an unusual bond during the long journey to their destination.
IMDB: 5.4, RT Aud: 36%, RT Critics: 83%
Results moves stubbornly at its own deliberate pace, but the well-chosen cast -- and writer-director Andrew Bujalski's insightful observations -- offer rich rewards for patient viewers.
IMDB: 5.5, RT Aud: 41%, RT Critics: 76%
Tales of Halloween boasts a number of fun scares and is overall more consistent than many horror anthology films, even if it isn't quite as dark or nasty as the classics of the genre.
IMDB: 6.0, RT Aud: 45%, RT Critics: 80%
Creepy, provocative, and aesthetically absorbing, Evolution marks a satisfying step forward for director/co-writer Lucile Hadzihalilovic.
IMDB: 5.4, RT Aud: 41%, RT Critics: 87%
As their parents head out for a date in the city, the three young Thompson children immediately take to their new babysitter, Anna (Sarah Bolger, Into the Badlands, Once Upon a Time), who seems like a dream come true: she's sweet, fun, and lets them do things that break all of their parents' rules.
IMDB: 5.7, RT Aud: 50%, RT Critics: 81%
Chi-Raq is as urgently topical and satisfyingly ambitious as it is wildly uneven -- and it contains some of Spike Lee's smartest, sharpest, and all-around entertaining late-period work.
IMDB: 5.7, RT Aud: 45%, RT Critics: 76%
Baskin complements its gory thrills with heavy atmosphere and deliberate pacing, adding up to a horror outing that plays with the mind as enthusiastically as it ruins the appetite.
IMDB: 5.8, RT Aud: 41%, RT Critics: 76%
With sweeping visuals grounded by strong performances in service of a timeless tale told on a human scale, Darren Aronofsky's Noah brings the Bible epic into the 21st century.
IMDB: 6.2, RT Aud: 48%, RT Critics: 81%
With striking visuals, complex characters, and Hitchcockian plot twists, The Two Faces of January offers a pleasantly pungent treat for fans of romantic thrillers.
IMDB: 6.2, RT Aud: 44%, RT Critics: 61%
Narratively unwieldy and tonally jumbled, Maps to the Stars still has enough bite to satisfy David Cronenberg fans in need of a coolly acidic fix.
IMDB: 6.0, RT Aud: 49%, RT Critics: 70%
On the whole, this Disney adaptation of the Sondheim classic sits comfortably at the corner of Hollywood and Broadway -- even if it darkens to its detriment in the final act.
IMDB: 5.5, RT Aud: 39%, RT Critics: 69%
They Came Together is surprisingly messy and perhaps too smart for its own good, but Amy Poehler and Paul Rudd's chemistry is enough to overcome many of the movie's flaws.
IMDB: 5.4, RT Aud: 41%, RT Critics: 74%
Led by a fearless performance from Gerard Depardieu, Welcome to New York is director Abel Ferrara at his most repulsive -- and most compulsively watchable.
IMDB: 5.9, RT Aud: 46%, RT Critics: 73%
A transfixing central performance by Kristen Wiig performance holds Welcome to Me together and compensates for its uneven stretches.
IMDB: 4.7, RT Aud: 45%, RT Critics: 80%
A team of Vatican investigators is sent to the British West Country following reports of paranormal activity at a remote church.
IMDB: 5.4, RT Aud: 35%, RT Critics: 74%
Well-acted and overall unsettling, The Falling delivers thought-provoking thrills -- and suggests a bright future for writer-director Carol Morley.
IMDB: 5.7, RT Aud: 41%, RT Critics: 79%
Time Out of Mind demands patience, yet its noble intentions -- and Richard Gere's committed performance -- are difficult to deny.
IMDB: 5.6, RT Aud: 47%, RT Critics: 84%
Do I Sound Gay? proves to be a light, affable, entertaining look at a largely unexplored issue.
IMDB: 5.6, RT Aud: 35%, RT Critics: 69%
C.O.G.'s plot is a bit meandering, but the characters are always compelling and the ending is richly rewarding.
IMDB: 5.4, RT Aud: 49%, RT Critics: 80%
Aamir Khan, Katrina Kaif, Abhishek Bachchan and Uday Chopra leap back into action in this explosive sequel from Dhoom and Dhoom 2 writer Vijay Krishna Acharya.
IMDB: 6.0, RT Aud: 51%, RT Critics: 83%
Smart, sobering, and quietly chilling, Blue Caprice uses its horrible true-life story -- and some solid performances -- to underscore the dreadful banality of evil.
IMDB: 5.9, RT Aud: 47%, RT Critics: 79%
Grand Piano is so tense in its best moments -- and appealingly strange overall -- that it remains rewarding in spite of its flaws.
IMDB: 6.0, RT Aud: 42%, RT Critics: 86%
A uniquely character-driven thriller with a finely composed cast and some outstanding direction from Kelly Reichardt, Night Moves bolsters its thought-provoking themes with compelling drama.
IMDB: 5.6, RT Aud: 33%, RT Critics: 60%
While it's certainly timely and beautifully filmed, The Bling Ring suffers from director Sofia Coppola's failure to delve beneath the surface of its shallow protagonists' real-life crimes.
IMDB: 5.5, RT Aud: 42%, RT Critics: 82%
Compact and effective, In Fear offers discerning horror fans a smart and disturbing plunge into the depths of cinematic anxiety.
IMDB: 4.9, RT Aud: 34%, RT Critics: 77%
An Australian fighter pilot shot down in combat awakens suspended in the treetops.
IMDB: 6.1, RT Aud: 49%, RT Critics: 82%
Smart, funny, and powered by fine performances from Olivia Wilde and Jake Johnson, Drinking Buddies offers a bittersweet slice of observational comedy.
IMDB: 5.9, RT Aud: 49%, RT Critics: 85%
A compelling story cleverly told, We Are What We Are quenches horror buffs' thirst for gore while serving up serious-minded filmmaking and solid acting.
IMDB: 5.5, RT Aud: 43%, RT Critics: 84%
Eliza Hittman's powerful debut feature tells the story of Lila (Gina Piersanti, in a stunning debut), a fourteen year old spending a hot summer in a blue-collar Brooklyn neighborhood far removed from the bustling city.
IMDB: 5.4, RT Aud: 45%, RT Critics: 87%
Exhibition flouts convention with its untrained stars and impressionistic narrative; thankfully, writer-director Joanna Hogg ties it all together into an intimate, beautifully shot drama.
IMDB: 6.2, RT Aud: 49%, RT Critics: 70%
A promising debut for director Gia Coppola, Palo Alto compensates for its drifting plot with solid performances and beautiful cinematography.
IMDB: 5.1, RT Aud: 33%, RT Critics: 86%
Writer-director Bobcat Goldthwait's first foray into horror doesn't break any new ground, but it does wring fresh terror from a well-worn genre formula -- and offers a few nasty laughs in the bargain.
IMDB: 6.0, RT Aud: 42%, RT Critics: 70%
Exuberant and bittersweet, Not Fade Away is a coming-of-age story set to a British Invasion beat that occasionally meanders but mostly charms.
IMDB: 6.0, RT Aud: 42%, RT Critics: 66%
2 Days in New York breezes past its shortcomings thanks to an enjoyably madcap plot and the sweet chemistry between its well-matched stars.
IMDB: 5.6, RT Aud: 43%, RT Critics: 75%
Barry Levinson's eco-horror flick cleverly utilizes familiar found-footage methods in service of a gruesome yet atmospheric chiller.
IMDB: 6.2, RT Aud: 44%, RT Critics: 74%
Killing Them Softly is a darkly comic, visceral thriller that doubles as a cautionary tale on capitalism, whose message is delivered with sledgehammer force.
IMDB: 5.3, RT Aud: 38%, RT Critics: 67%
Spring Breakers blends stinging social commentary with bikini cheesecake and a bravura James Franco performance.
IMDB: 6.0, RT Aud: 46%, RT Critics: 82%
In 100 BLOODY ACRES, brothers Reg and Lindsay Morgan are struggling to keep their organic blood and bone fertilizer business in motion.
IMDB: 6.1, RT Aud: 48%, RT Critics: 67%
Director Andrea Arnold's gritty, naturalistic re-imagining of the Emily Bronte classic stays true to the book's spirit while utilizing an unconventional approach to explore the romantic yearning at the heart of the story.
IMDB: 5.8, RT Aud: 41%, RT Critics: 79%
MMA star and first-time actress Gina Carano displays ample action-movie chops in Haywire, a fast-paced thriller with a top-notch cast and outstanding direction from Steven Soderbergh.
IMDB: 5.5, RT Aud: 42%, RT Critics: 79%
It doesn't break any rules of the genre, but The Innkeepers serves as additional proof that Ti West is a young director that discriminating horror fans can trust.
IMDB: 5.8, RT Aud: 35%, RT Critics: 73%
Rampart sends viewers plummeting into a nihilistic hell of its protagonist's creation, yet Woody Harrelson's performance in the central role is too magnetic to dismiss.
IMDB: 5.7, RT Aud: 39%, RT Critics: 74%
Damsels in Distress can sometimes feel mannered and outlandish, but it's redeemed by director Whit Stillman's oddball cleverness and Greta Gerwig's dryly funny performance.
IMDB: 5.5, RT Aud: 31%, RT Critics: 71%
The source material that inspired The Loneliest Planet may be brief, but this adaptation of a Tom Bissell short story compensates with studious, finely detailed filmmaking, haunting visuals, and thought-provoking subtext.
IMDB: 6.2, RT Aud: 49%, RT Critics: 67%
Sharp, shrewd, and funny, Friends with Kids features excellent performances that help smooth over some of the story's more conventional elements.
IMDB: 6.1, RT Aud: 42%, RT Critics: 75%
Greenberg's title character is harder to like than most, but Ben Stiller's nuanced performance and a darkly funny script help take the misanthropic edge off.
IMDB: 4.7, RT Aud: 53%, RT Critics: 80%
While it may strike some viewers as slight, Cyrus is a successful hybrid of mainstream production values and the mumblecore ideals of directors Jay and Mark Duplass.
IMDB: 6.2, RT Aud: 42%, RT Critics: 64%
As infatuations, jealousies, love affairs and career ambitions collide among the inhabitants of the neighboring farmsteads, Tamara sets a contemporary comedy of manners into play using the oldest magic in the book-sex appeal.
IMDB: 5.5, RT Aud: 40%, RT Critics: 74%
There's a murky, tenuous balance between reality and fiction
IMDB: 6.2, RT Aud: 54%, RT Critics: 79%
The film was named Best Narrative Feature at the 2010 South by Southwest Film Festival.
IMDB: 6.0, RT Aud: 49%, RT Critics: 71%
Visually gripping and anchored by a magnetic Mads Mikkelsen, Valhalla Rising delves into violence and faith in brutally uncompromising fashion.
IMDB: 5.7, RT Aud: 37%, RT Critics: 74%
It doesn't take its terrific premise quite as far as it should, but Splice is a smart, well-acted treat for horror fans.
IMDB: 5.5, RT Aud: 35%, RT Critics: 65%
Steven Soderbergh's latest lo-fi production is strikingly crafted but emotionally vague.
IMDB: 6.2, RT Aud: 37%, RT Critics: 64%
Duplicity is well-crafted, smart, and often funny, but it's mostly more cerebral than visceral and features far too many plot twists.
IMDB: 5.9, RT Aud: 37%, RT Critics: 88%
But just as they're settling into their reassuringly predictable holiday routine, his perennially troubled younger brother shows up, joined by a mysterious stranger seeking Bellamy's protection.--(c) IFC
IMDB: 5.2, RT Aud: 30%, RT Critics: 69%
Though not entirely effective as a conventional horror flick, Grace is still a graphic, disturbing, and artful exploration of twisted maternal instinct.
IMDB: 5.5, RT Aud: 39%, RT Critics: 82%
Still grieving the death of their only child Alice at the jaws of a crazed dog, vet Patrick and pharmacist Louise relocate to the remote town of Wake Wood where a local pagan ritual gives them three more precious days with her.
IMDB: 6.0, RT Aud: 51%, RT Critics: 79%
Observant and insightful, this indie comedy takes a different tack on the "bromance" but still makes a point without sermonizing.
IMDB: 6.0, RT Aud: 48%, RT Critics: 79%
Pitting actors against murderers in a self-aware struggle for stardom, Baghead successfully skates the borders of horror and comedy.
IMDB: 6.2, RT Aud: 50%, RT Critics: 70%
Featuring groundbreaking animation, stunning visuals, and a talented cast, Beowulf has in spades what more faithful book adaptations forget to bring: pure cinematic entertainment.
IMDB: 6.1, RT Aud: 43%, RT Critics: 69%
Year of the Dog is a warm and quirky comedy that never condescends to its eccentric characters.
IMDB: 5.4, RT Aud: 45%, RT Critics: 79%
Smart, original, and horrifically funny, Teeth puts a fresh feminist spin on horror movie tropes.
IMDB: 5.9, RT Aud: 40%, RT Critics: 61%
Though Joshua is ultimately too formulaic, its intelligence and suspenseful buildup heighten the overall creep factor.
IMDB: 5.8, RT Aud: 40%, RT Critics: 72%
Stong lead performances, witty dialogue and wry observations cement Friends With Money as another winning dramedy from writer/director Nicole Holofcener.
IMDB: 5.6, RT Aud: 34%, RT Critics: 76%
The Last Winter creatively and effectively uses horror tactics -- fear, tension, anticipation, and just enough gore -- to shock, but never repulse, its audience.
IMDB: 6.2, RT Aud: 60%, RT Critics: 65%
While not a home run, Fever Pitch has enough charm and on-screen chemistry between the two leads to make it a solid hit.
IMDB: 5.7, RT Aud: 45%, RT Critics: 73%
Set in post-9/11 New York, this largely evocative dramedy interweaves the stories of five disconnected individuals who share an unspoken emotional malaise that shadows their attempts at returning to normal life.
IMDB: 6.2, RT Aud: 57%, RT Critics: 73%
This highly derivative superhero coming-of-age flick is moderately entertaining, family-friendly fluff.
IMDB: 6.2, RT Aud: 51%, RT Critics: 73%
George A. Romero's latest entry in his much-vaunted Dead series is not as fresh as his genre-inventing original, Night of the Living Dead. But Land of the Dead does deliver on the gore and zombies-feasting-on-flesh action.
IMDB: 5.7, RT Aud: 48%, RT Critics: 68%
The humor is less sharp and more warm-hearted this time around, and the characters are enjoyable to revisit.
IMDB: 6.1, RT Aud: 46%, RT Critics: 71%
Sky Captain and the World of Tomorrow is slim on plot and characterization, but the visuals more than make up for it.
IMDB: 5.8, RT Aud: 47%, RT Critics: 75%
Despite its short running time, Teacher's Pet is a witty and irreverent family film.
IMDB: 5.8, RT Aud: 52%, RT Critics: 72%
Although its 4 stories vary in quality, Robot Stories is still worth a look for Twilight Zone fans.
IMDB: 6.2, RT Aud: 57%, RT Critics: 88%
Jamie Lee Curtis and Lindsay Lohan charm in Mark Waters' nicely pitched -- and Disney's second -- remake of the 1976 hit.
IMDB: 5.7, RT Aud: 32%, RT Critics: 71%
A low budget thriller with some intense moments.
IMDB: 5.5, RT Aud: 41%, RT Critics: 81%
Stuart Little 2 is a sweet, visually impressive sequel that provides wholesome entertainment for kids.
IMDB: 5.8, RT Aud: 64%, RT Critics: 76%
Fast-paced and filled with racial gags, Undercover Brother serves up plenty of laughs and sharp satire.
IMDB: 5.3, RT Aud: 50%, RT Critics: 79%
A pleasant enough kids flick that adults may even enjoy.
IMDB: 5.1, RT Aud: 38%, RT Critics: 74%
Though the concept is no longer fresh, Spy Kids 2 is still an agreeable and energetic romp.
IMDB: 5.7, RT Aud: 70%, RT Critics: 82%
Essentially a sports movie with drums, the energetic Drumline somehow manages to make the familiar seem fresh.
IMDB: 6.2, RT Aud: 59%, RT Critics: 65%
Slow-moving, cerebral, and ambiguous, Solaris is not a movie for everyone, but it offers intriguing issues to ponder.
IMDB: 5.5, RT Aud: 46%, RT Critics: 92%
A kinetic and fun movie that's sure to thrill children of all ages.
IMDB: 6.2, RT Aud: 46%, RT Critics: 76%
The Tailor of Panama is a smart, darkly satirical thriller with exuberant performances from Pierce Brosnan and Geoffrey Rush.
IMDB: 6.0, RT Aud: 52%, RT Critics: 74%
What Jimmy Neutron lacks in computer animation, it makes up for in charm and cleverness.
IMDB: 6.2, RT Aud: 44%, RT Critics: 83%
Quirky in the best sense of the word, Nurse Betty finds director Neil LaBute corralling a talented cast in service of a sharp, imaginative script.
IMDB: 5.8, RT Aud: 63%, RT Critics: 76%
This fun and moral tale entertains both first-time Seasame Street watchers and seasoned veterans.
IMDB: 5.9, RT Aud: 41%, RT Critics: 66%
Critics say Stuart Little is charming with kids and adults for its humor and visual effects.
IMDB: 5.8, RT Aud: 48%, RT Critics: 73%
Mary Norton's children's books about a family of four-inch-tall people who share accommodations with giant "beans" (as in "human bein's") are brought to the screen in beautifully scaled detail, but neither the story nor the characters come alive.
IMDB: 6.1, RT Aud: 56%, RT Critics: 81%
As with the first film, Scream 2 is a gleeful takedown of scary movie conventions that manages to poke fun at terrible horror sequels without falling victim to the same fate.
IMDB: 5.7, RT Aud: 46%, RT Critics: 74%
Most of the story takes place within the junky confines of Don Dubrow's second-hand store.
IMDB: 5.9, RT Aud: 37%, RT Critics: 68%
An outstanding ensemble cast propels Kiss of Death, a noir-ish crime thriller that's slick and big on atmosphere, even if its script may only provide sporadic bursts of tension.
IMDB: 6.1, RT Aud: 50%, RT Critics: 75%
Sean Connery appears as a British publisher who receives a message that if he'll publish a manuscript submitted by a mysterious Russian woman (Michelle Pfeiffer), he may be able to assist Western efforts toward de-militarizing the world.
IMDB: 6.1, RT Aud: 48%, RT Critics: 88%
The wife of Mafia hitman Alec Baldwin, Pfeiffer regularly chastizes her husband for his underhanded line of work.
IMDB: 6.2, RT Aud: 55%, RT Critics: 77%
Mystic Pizza is like its namesake food: it's cheesy, topped with romance, and rises to the occasion.
IMDB: 6.2, RT Aud: 52%, RT Critics: 80%
An enjoyable farce that relocates Jean Renoir's Boudu Saved From Drowning to '80s California, offering fine comedic performances from Nick Nolte, Richard Dreyfuss and Bette Midler.
IMDB: 5.9, RT Aud: 62%, RT Critics: 84%
Desperately Seeking Susan works with its fairy tale depiction of New York and the fun, frothy chemistry generated by its two leads.
IMDB: 6.2, RT Aud: 58%, RT Critics: 90%
A perfectly light, warmly funny romantic comedy that's kept afloat by Ron Howard's unobtrusive direction and charming performances from Tom Hanks and Daryl Hannah.
IMDB: 5.9, RT Aud: 41%, RT Critics: 92%
One of her coworkers is her best friend Hazel, played by Christine Lahti, whose performance earned an Oscar nomination and a New York Film Critics award.
IMDB: 6.1, RT Aud: 60%, RT Critics: 80%
Private Benjamin proves a potent showcase for its Oscar-nominated star, with Hawn making the most of a story that rests almost completely on her daffily irresistible charm.
IMDB: 6.0, RT Aud: 61%, RT Critics: 85%
Written by Joel Schumaker and directed by Michael Schultz, this musical comedy/drama follows the goings-on of a Los Angeles car wash and the antics of it's multi-racial staff and customers.
IMDB: 6.0, RT Aud: 52%, RT Critics: 83%
Woody Allen took a Japanese spy movie called Kagi No Kagi, and replaced its original dialogue with an entirely new plot.


Routing
If you have a single route mapping (for example the default one), it will be not hard for you to validate and assert whether all controllers and actions resolve correctly. However, when your application gets bigger and bigger, and you start to map different kinds of routes and introduce various changes to them, it can be quite challenging and messy to guarantee their integrity. Here route testing comes in handy.
Validating controllers and actions
Go to the "MusicStore.Test.csproj" file and add the "MyTested.AspNetCore.Mvc.Routing" dependency:
<!-- Other ItemGroups -->
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="Moq" Version="4.13.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Authentication" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Caching" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Controllers" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Controllers.ActionResults" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Controllers.Attributes" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Controllers.Views" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Controllers.Views.ActionResults" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.DependencyInjection" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.EntityFrameworkCore" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Http" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Models" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.ModelState" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Options" Version="2.2.0" />
<!-- MyTested.AspNetCore.Mvc.Routing package -->
<PackageReference Include="MyTested.AspNetCore.Mvc.Routing" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Session" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.ViewComponents" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.ViewData" Version="2.2.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
</ItemGroup>
<!-- Other ItemGroups -->
Create "Routing" folder at the root of the test project and add "HomeRouteTest" class in it. We will start with something easy and validate the "Error" action in "HomeController":
public IActionResult Error()
{
// action code skipped for brevity
}
The simplest route test possible:
[Fact]
public void GetErrorActionShouldBeRoutedSuccessfuly()
=> MyRouting
.Configuration()
.ShouldMap("/Home/Error")
.To<HomeController>(c => c.Error());
My Tested ASP.NET Core MVC gets the routing configuration from the provided "TestStartup" class. Note that the route testing will not fire any application middleware components, but it will run the MVC filters. It is validating whether the MVC router will select the correct controller and action based on the HTTP request data. Works with both conventional and attribute routing. Additionally, the testing framework uses the same services ASP.NET Core uses, so if you make any customizations to the route selection process, it will not interfere with the assertions logic and tests should still validate your mappings.
Validating route values
We will now going to validate route values next to controllers and actions. The "AddToCart" action in the "ShoppingCartController" looks perfect for that purpose:
public async Task<IActionResult> AddToCart(int id)
{
// action code skipped for brevity
}
Create "ShoppingCartRouteTest"" class and add the following test:
[Fact]
public void GetAddToCartActionShouldBeRoutedSuccessfuly()
=> MyRouting
.Configuration()
.ShouldMap("/ShoppingCart/AddToCart/1")
.To<ShoppingCartController>(c => c.AddToCart(1, CancellationToken.None));
Query strings are also easy. Let's test the "Browse" action in the "StoreController":
public async Task<IActionResult> Browse(string genre)
{
// action code skipped for brevity
}
Create "StoreRouteTest"" class and add the following test:
[Fact]
public void GetBrowseActionShouldBeRoutedSuccessfuly()
=> MyRouting
.Configuration()
.ShouldMap("/Store/Browse?genre=HipHop")
.To<StoreController>(c => c.Browse("HipHop"));
And if you change "HipHop" with "Rock", for example, you will see the following error message:
Expected route '/Store/Browse' to contain route value with 'genre' key and the provided value but the value was different.
Ignoring route values
Some action parameters do not have to be tested. They come from the service provider, not the MVC routers. Let's take a look at the "Index" action in the "HomeController":
public async Task<IActionResult> Index(
[FromServices] MusicStoreContext dbContext,
[FromServices] IMemoryCache cache)
{
// action code skipped for brevity
}
We do not want to test the "MusicStoreContext" and the "IMemoryCache" action parameters. Ignoring them is a piece of cake - just use the helper method "With.Any" wherever you want to skip assertion:
[Fact]
public void GetIndexActionShouldBeRoutedSuccessfuly()
=> MyRouting
.Configuration()
.ShouldMap("/Home")
.To<HomeController>(c => c.Index(
With.Any<MusicStoreContext>(), // <---
With.Any<IMemoryCache>())); // <---
"With.Any" can be used on any action parameter expected in a route test.
Action filters
All of the above examples are using HTTP Get method and the provided path as request data to test with. However, without adding more specific information, some actions cannot be routed correctly. For example "RemoveFromCart" in the "ShoppingCartController":
[HttpPost]
public async Task<IActionResult> RemoveFromCart(
int id,
CancellationToken requestAborted)
{
// action code skipped for brevity
}
The following test will fail right away:
[Fact]
public void PostRemoveFromCartActionShouldBeRoutedSuccessfuly()
=> MyRouting
.Configuration()
.ShouldMap("/ShoppingCart/RemoveFromCart/1")
.To<ShoppingCartController>(c => c.RemoveFromCart(
1,
With.Any<CancellationToken>()));
We are testing with HTTP Get request while the action is restricted only for HTTP Post ones. Let's fix the issue:
[Fact]
public void PostRemoveFromCartActionShouldBeRoutedSuccessfuly()
=> MyRouting
.Configuration()
.ShouldMap(request => request // <---
.WithMethod(HttpMethod.Post)
.WithLocation("/ShoppingCart/RemoveFromCart/1"))
.To<ShoppingCartController>(c => c.RemoveFromCart(
1,
With.Any<CancellationToken>()));
This way we are explicitly setting the request to have HTTP Post method making the routing match the specified controller, action and route value.
However, running the test produces the following error:
Expected route '/ShoppingCart/RemoveFromCart/1' to match RemoveFromCart action in ShoppingCartController but action could not be invoked because of the declared filters. You must set the request properties so that they will pass through the pipeline.
As it was mentioned earlier, route testing executes the MVC action filters (even the globally registered ones in your "Startup" class). The "RemoveFromCart" action is defined with a "ValidateAntiForgeryToken" attribute, and we need to change our test a bit in order for it to pass. The anti-forgery token features of the library are located in the "MyTested.AspNetCore.Mvc.ViewFeatures" package, so let's install it:
<!-- Other ItemGroups -->
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="Moq" Version="4.13.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Authentication" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Caching" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Controllers" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Controllers.ActionResults" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Controllers.Attributes" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Controllers.Views" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Controllers.Views.ActionResults" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.DependencyInjection" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.EntityFrameworkCore" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Http" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Models" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.ModelState" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Options" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Routing" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Session" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.ViewComponents" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.ViewData" Version="2.2.0" />
<!-- MyTested.AspNetCore.Mvc.ViewFeatures package -->
<PackageReference Include="MyTested.AspNetCore.Mvc.ViewFeatures" Version="2.2.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
</ItemGroup>
<!-- Other ItemGroups -->
Let's update the test to make it pass:
[Fact]
public void PostRemoveFromCartActionShouldBeRoutedSuccessfuly()
=> MyRouting
.Configuration()
.ShouldMap(request => request
.WithMethod(HttpMethod.Post)
.WithLocation("/ShoppingCart/RemoveFromCart/1")
.WithAntiForgeryToken()) // <---
.To<ShoppingCartController>(c => c.RemoveFromCart(
1,
With.Any<CancellationToken>()));
Keep in mind that if you register the **"AutoValidateAntiforgeryTokenAttribute"* globally, you will still need to call "WithAntiForgeryToken" on your route tests.*
Another commonly used action filter you need to be aware of in your route tests is the "Authorize" attribute.
Let's test a "CheckoutController" action, because all actions in that controller are for authorized users only. Create a "CheckoutRouteTest" class and add the following code in it:
[Fact]
public void GetAddressAndPaymentActionShouldBeRoutedSuccessfuly()
=> MyRouting
.Configuration()
.ShouldMap(request => request
.WithLocation("/Checkout/AddressAndPayment")
.WithUser()) // <---
.To<CheckoutController>(c => c.AddressAndPayment());
By calling "WithUser", we are providing the router all the information it needs to match and validate the action.
Sometimes we need to provide a user with a specific role or authorization policy. Take a look at the "StoreManagerController" in the "Admin" area:
[Area("Admin")]
[Authorize("ManageStore")]
public class StoreManagerController : Controller
{
// controller code skipped for brevity
}
This controller is authorized only for the users who have a "ManageStore" claim with a value of "Allowed". This policy is defined in the web application's "Startup" class:
// class code skipped for brevity
// Configure Auth
services.AddAuthorization(options =>
{
options.AddPolicy(
"ManageStore",
authBuilder =>
{
authBuilder.RequireClaim("ManageStore", "Allowed");
});
});
// class code skipped for brevity
Let's test that route! In "Routing", create an "Admin" folder. In it create a "StoreManagerRouteTest" class, add the necessary usings, and write the following test:
[Fact]
public void GetIndexActionShouldBeRoutedSuccessfuly()
=> MyRouting
.Configuration()
.ShouldMap(request => request
.WithLocation("/Admin/StoreManager")
.WithUser(user => user
.WithClaim("ManageStore", "Allowed"))) // <---
.To<StoreManagerController>(c => c.Index());
Action filters covered! :)
Model binding
Besides route values, you can also assert that all request properties (like its body for example) are bound to the action parameters and models. For example, the form fields in the HTTP Post overload of the "Login" action in the "AccountController":
[HttpPost]
[AllowAnonymous]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Login(LoginViewModel model, string returnUrl = null)
{
// action code skipped for brevity
}
The login view model should come from the request form so we may decide to ignore it by using "With.Any" or provide it like so:
[Fact]
public void PostLoginActionShouldBeRoutedSuccessfuly()
=> MyRouting
.Configuration()
.ShouldMap(request => request
.WithMethod(HttpMethod.Post)
.WithLocation("/Account/Login?returnUrl=Test")
.WithFormFields(new // <---
{
Email =<EMAIL_ADDRESS>Password = "123456",
RememberMe = "true"
})
.WithAntiForgeryToken())
.To<AccountController>(c => c.Login(
new LoginViewModel
{
Email =<EMAIL_ADDRESS>Password = "123456",
RememberMe = true
},
"Test"));
Note that the **"RememberMe"* property value is provided as a string. This is the correct way because HTTP requests hold form fields in a simple text format. If you by mistake provide it as a C# boolean value, you will receive an error.*
The "WithFormFields" method call does some magic behind the scenes and it's just a shorter way to write:
.WithFormField("Email"<EMAIL_ADDRESS>.WithFormField("Password", "123456")
.WithFormField("RememberMe", "true"))
JSON body
The "Music Store" web application does not have any JSON-based model binding, but it is not hard to test with one:
MyRouting
.Configuration()
.ShouldMap(request => request
.WithMethod(HttpMethod.Post)
.WithLocation("/My/Action")
.WithJsonBody(@"{""MyNumber"":1,""MyString"":""MyText""}"))
.To<MyController>(c => c.Action(
new MyModel
{
MyNumber = 1,
MyString = "MyText"
}));
There is also an anonymous object overload:
MyRouting
.Configuration()
.ShouldMap(request => request
.WithMethod(HttpMethod.Post)
.WithLocation("/My/Action")
.WithJsonBody(new
{
MyNumber = 1,
MyString = "MyText"
}))
.To<MyController>(c => c.Action(
new MyModel
{
MyNumber = 1,
MyString = "MyText"
}));
It may seem a bit strange at first, but My Tested ASP.NET Core MVC serializes the anonymous object to JSON string, attach it to the HTTP request body as a stream and pass it to the routing system.
Of course, you can always choose to ignore model binding and just assert controllers and actions:
MyRouting
.Configuration()
.ShouldMap(request => request
.WithMethod(HttpMethod.Post)
.WithLocation("/My/Action"))
.To<MyController>(c => c.Action(With.Any<MyModel>()));
Section summary
Still not convinced about the route testing and its capabilities? Check this ultimate crazy model binding test which asserts JSON body, route values, query string parameters, form fields and headers at the same time. I hope no one writes such actions, though...
We are almost at the finish line. Next section will cover various test Helpers which do not fall within a particular tutorial section.


## Mako can find this base file because it's in the settings.py -> MAKO_TEMPLATES_DIRS list <%inherit file="base_template.htm" /> <%block name="content">
The url parameters sent in were:
%for i, param in enumerate(request.urlparams):There were no url parameters. Try submitting the form and then looking at the url above.
%endifThe last calculation was: ${ calc }
%endifNew calculation:
Log not loaded yet.
%block>


Projects
Exercise Selector
Web app created using react + redux. Users can select a muscle group on the human body diagram and the app will render my favourite exercises for that muscle group. Users can also filter exercises by equipment (ex. barbell, dumbbell). The web app uses server rendering where it fetches the initial state from the API server. URLs are implemented for each muscle group to allow linking and bookmarking.
Example GitHubTexas Method Program Generator
The Texas Method is a strength training program that manipulates the individual’s training variables (volume and intensity) to increase gains on a weekly basis. This app generates next week’s training numbers depending on the user’s difficulty in the previous week and graphs each week’s five rep max to show strength progression.
Example GitHubThe Open Movie Database
Web app created using jQuery to make ajax requests to the Open Movie Database API. The user can search for specific or random movies. The "Find Random Movies" button displays movies in increments of ten and loads another ten when the user scrolls to the bottom of the page. Clicking on a movie displays more information about the movie.
Example GitHubMicrocontroller Handheld Game
A handheld game developed on a Tiva C 32-bit microcontroller interfaced to multiple peripherals. The object of the game is to avoid being hit by flying asteroids. Each sprite’s pixel data was encoded in an 8-bit color palette lookup table to significantly reduce the memory size.
GitHubTechnical Skills
Languages and Frameworks
- C
- JavaScript, jQuery
- HTML, CSS
- MongoDB
- Express.js
- Angular.js
- Node.js
- Processing.js
Hardware
- Microcontroller
- Oscilloscope
- Multimeter
- Soldering Iron
- Function Generator
Software
- GitHub
- WebStorm
- Quartus 2
- Code Composer Studio 6
About
I am an aspiring software developer with a Bachelor’s degree in Electrical Engineering from the University of British Columbia. I love to code, play video games, and lift heavy things.


Spinner
Toggle
This is content that can be collapsed.
Nav
Main
Triage
Alerts
Select Styles (see also select-sk below)
Checkboxes
Toast
This will disappear in 5s (the default), unless you click the Close
button.
Tabs
This is the query tab.
This is the query tab.
This is the query tab.
This is the query tab.
This is the results tab.
This is the details tab.
select-sk and multi-select-sk
select
any
one
select
any
ones
you
like
error-toast-sk
Icons
Table
| Column 1 |
Column 2 |
| Row 1 Col 1 |
Row 1 Col 2 |
| Row 2 Col 1 |
Row 2 Col 2 |
| Nested table |
|


WITNESS LIST
Education
March 26, 2018 10:00 AM
Classroom Conduct
ON:
Craven, Morgan Director, School-to-Prison Pipeline Project (also providing written
testimony) (Texas Appleseed), Austin, TX
Eaton, Holly Director of Professional Development & Advocacy (also providing written
testimony) (TX Classroom Teachers Assoc.), Austin, TX
Ewing, Diane Mental Health Policy Fellow (also providing written testimony) (Texans
Care for Children), Austin, TX
Freund, Sara Educator (Self), Austin, TX
Levin, Marc V.P. of Criminal Justice (also providing written testimony) (Texas Public
Policy Foundation), Austin, TX
Rose, Lauren Director of Youth Justice Policy (Texans Care for Children), Austin, TX
Sanders, Jolene Advocacy Manager (also providing written testimony) (Easterseals Central
TX), Austin, TX
Swanson, Steve Citizen - Volunteer in Education - Grandparent - Retired Bus. Exec. (Self),
Austin, TX
Wilson, Columba P. (Self), San Antonio, TX
Registering, but not testifying:
ON:
Aleman, Steven Policy Specialist (Disability Rights Texas), Austin, TX
Piccola, Kyle (The Arc of Texas), Austin, TX
Providing written testimony:
ON:
Quinzi, Patty Legislative Counsel (Tx - American Federation of Teachers), Austin, TX
Special Education
ON:
Aleman, Steven Policy Specialist (also providing written testimony) (Disability Right
Texas), Austin, TX
Becker, Ben (Self), Houston, TX
Becker, Sarah (Self), Houston, TX
Broughal, Christine Education Advocate TXSER Steering Committee (Self; TXSER),
Austin, TX
Cooper, Robbi Policy Advocacy Decoding Dyslexia Texas (Self), Austin, TX
Corder, Daphne Licensed Clinical Social Worker & Parent (Self; Other parents (parent
advocate)), Austin, TX
Flores, Lisa N/A (also providing written testimony) (Self), Austin, TX
Gonzales, Marie Executive Director for Special Education / 504 (Round Rock ISD), Round
Rock, TX
Jones, Elizabeth Senior Executive Director (also providing written testimony) (San
Antonio ISD), San Antonio, TX
Litzinger, Amy (also providing written testimony) (Easter Seals), TX
Litzinger, Linda Public Policy Specialist, parent & caregiver (also providing written
testimony) (Texas Parent to Parent), Austin, TX
Masey, Chris Policy Specialist (Coalition of Texans with Disabilities), Austin, TX
WITNESS LIST
Education
March 26, 2018 10:00 AM
McGuire, Kristin Director of Governmental Relations (TCASE), Austin, TX
McKelvey, Jana Co-Founder (Texans for Special Education Reform/TXSER), Austin, TX
Morath, Mike Commissioner of Education (Texas Education Agency), Austin, TX
Morrison, Kelly Director, Special Education (also providing written testimony) (TCASE),
Amarillo, TX
P. Wilson, Columba (Self), San Antonio, TX
Peltier, Cynthia Director of Special Education (also providing written testimony)
(TCASE), Pearland, TX
Piccola, Kyle (The Arc of Texas), Austin, TX
Rafa, Alyssa Policy Analyst (Education Commission of the States), Denver, CO
Romero, Kristin N/A (also providing written testimony) (Self), Lumberton, TX
Schwinn, Penny Deputy Commissioner of Academics (Texas Education Agency), Austin,
TX
Sheffield, Heather Parent Advocate (Decoding Dyslexia), Austin, TX
Swanson, Steve Grandparent, Retired Bus. Exec., Volunteer in Education (Self), Austin,
TX
Providing written testimony:
ON:
Quinzi, Patty Legislative Counsel (Tx - American Federation of Teachers), Austin, TX
Teacher Compensation
ON:
Burke, Angela Science teacher (also providing written testimony) (Self), Ovilla, TX
Flores, Lisa N/A (also providing written testimony) (Self), Austin, TX
Garza, Laura Ex Dir. Dallas ISD (also providing written testimony) (Dallas ISD), Dallas,
TX
Garza, Priscilla Aquino Deputy Director (Educate Texas), Austin, TX
Green, Christopher Master Teacher (also providing written testimony) (Self), San Antonio,
TX
Grey, John Government Relations Specialist (Texas State Teachers Association), Austin,
TX
Kuhlmann, Kate Lobbyist (ATPE), Austin, TX
Lager, Jerry Superintendent (also providing written testimony) (Ki Charter), San Marcos,
TX
Malfaro, Louis President, TX AFT (Texas American Federation of Teachers), Austin, TX
Morath, Mike Commissioner of Education (Texas Education Agency), Austin, TX
Sass, Emily Policy Analyst (also providing written testimony) (Texas Public Policy
Foundation (TPPF)), Austin, TX
Stone, Dr. Jeannie Superintendent (Richardson ISD), Richardson, TX
Weiner, Molly Director of Policy (Texas Aspires Foundation), Austin, TX
Williams, Paige Director of Legislation (also providing written testimony) (Texas
Classroom Teachers Association), Austin, TX
Registering, but not testifying:
ON:
Aleman, Steven Policy Specialist (Disability Rights Texas), Austin, TX
WITNESS LIST
Education
March 26, 2018 10:00 AM
Providing written testimony:
ON:
Potasznik, Alyssa N/A (Self), Austin, TX
Quinzi, Patty Legislative Counsel (Tx - American Federation of Teachers), Austin, TX


Fever Dream - Jeff Snyder, Matt Barbier, and Weston Olencki
NJ Endless Update - Raphaël Forment
Here We Go Again - Michael Mulshine
Untitled Study for Strings and Brass - Chris Douthitt
Telepresent - Jess Rowland
Interference - Matthew Wang
TAP - PLOrk
Taplin Auditorium 8pm April 20th, 2019
Director
Jeff Snyder
Associate Director
Jason Treuting
Assistant Director
Mike Mulshine
RAGE THORMBONES
Matt Barbier
Weston Olencki
Ensemble
James Bartusek
Josh Becker
Liam Elliot
Raphaël Forment
Spencer Hadley
Claire Hu
Anna Meadors
Abbie Minard
Jess Rowland
Maya Stepansky
Matt Wang
Nikitas Tampakis
Fever Dream
Jeff Snyder
Fever Dream is a showcase for the Feedback Trombone, an instrument developed by Jeff
Snyder in his New Instrument Research Lab, with contributions by Rajeev Erramilli ’18,
Michael Mulshine, Matthew Wang, and Nikola Kamcev. This piece uses the second revision
of the instrument, which was developed closely with the members of RAGE Thormbones.
NJ Endless Update
Raphaël Forment
While in Princeton, I became more and more interested by live-coding languages. This piece
is the result of an experimentation in this domain. Using Sonic-Pi, a very popular live-coding
language, I’ve tried my best (with an invaluable help from Michael Mulshine) to explore
different ways to synchronize multiple musicians over the network. My goal was to bring a
collaborative and social dimension to the act of live-coding music.
Through each jam session, each technical possibility explored, each parametrical change, the
malleability of the code revealed both new musical landscapes and problems. Writing music
on the fly on a computer keyboard opens an exciting realm made of Copy/Paste/Cut, and
turns the computer keyboard into a physical music instrument. It also unveils a new relation
between composition and improvisation, a new mediation between the musical notation and
the sonic world. This piece is made of an endless update of code fragments — being small
sonic shards — and of the careful interplay of the musicians.
NJ Endless Update
Mike Mulshine
This piece conveys some thoughts about language and meaning using a medium that
combines contemporary mainstream and experimental musical ideas and techniques.
Thank you to Jeff Snyder and PLOrk, my friends from MrE, and the audience for all the
support.
Untitled Study for Strings and Brass
Chris Douthitt
Telepresent
Jess Rowland
This piece is part of a series of works that explore the concept of telepresence - the uncanny
experience of being present while at the same time being entirely elsewhere, such as with
video fa-chevron-lefterencing, cloud sharing systems, or in this case, cell phone communication. This
particular Telepresent was developed in conjunction with PLOrk and can be thought of as
a structured improvisation between performers, their environment, their cell phones, some
local cell phone towers, telecommunication satellites in geosynchronous orbits, and then
back again over and over in an interplanetary feedback loop that - under ideal conditions of
barometric pressure - congeals into a critical mass of cell phone singularity.
Interference
Matthew Wang
Interference is an experimental generative music system and game intended to blur the line
between musical performance and gameplay. Throughout its performance, its players
will build, control, and transform musical sequences in a shared game space. Each player’s
goal is to paint the space with their visualized sequence and assimilate other players to their
color palette and harmonic field. Interference was composed and developed in completion of
Matthew’s undergraduate senior thesis.
TAP
PLOrk
TAP is a collaborative piece created by PLOrk, based around the tap-dancing skills of PLOrk
member Abbie Minard, and features guest dancers Francisca Weirich-Freiberg ’21 and
Harsimran Makkad ’22, and guest drummer Maya Stepansky.