I live in AJ's podcast for your Monday.
Most wonderful show is keeping up with the Joneses.
AJ Jones.
Yes, sir.
You're looking great in your army jacket.
Thank you.
It freaks out the green of my eyes, my army green eyes.
[LAUGHTER]
I love your khaki eyes.
[LAUGHTER]
You sound rather tired.
I'm exhausted.
Is it because you've just spent a whole weekend away?
Yes. What was more exhausting the drive there and the drive back?
All the time there.
The drive there and the drive back.
Yeah, no, it was.
I had a lot of influencers on this trip and describe influencers for people who are
not fluent in life languages.
They like to talk a lot about everything and they're super excited.
Yes.
They want connection at all times.
Yes, and they're very sweet.
And for the most part, they didn't try and include me in the conversation, which
nice, because I had very little people juice left to give.
All your people juice was depleted.
Yeah, who was gone?
So what do you do in situations like that?
As a contemplator, who needs time alone to recharge when you're spending five hours in
a car with high influencers?
I played music kind of loudly in the front of the car.
What's a drama conversation?
Like, Kerry and I listened to, and Kerry was being introverted and I was being relatively
introverted and just singing along and trying to focus on that.
I have a nice casting headphone for situations like that and a happy place.
But they wouldn't plug into my new iPhone 7.
And the Bluetooth headphones aren't out yet.
No.
You want the earpods, don't you?
I do.
Aren't you worried that you're going to lose the earpods?
No.
How many pairs of sunglasses have you lost?
Sunglasses are completely different.

Because they're small and could just get them to place easily.
It'll be fine.
Okay.
You had a good weekend?
I did have a great weekend.
Are you a horse?
A little bit.
I started sneezing like half an hour outside of Nashville.
I'm like, "Oh, we're back in allergy zone."
Yeah.
I was a great weekend.
I love the ladies of Southgate.
They're fantastic.
When you were in Tulsa?
No.
Close?
St. Louis.
Yeah.
And no, actually, St. Louis and Tulsa are not close at all.
No, but St. Louis in Kansas City are close.
Yes.
More so than Tulsa.
Well, I just like to just flex my geography skills from time and time.
Well done.
Well done.
Yeah.
At least they're real places in America and I'm not just making up names.
It's true.
I mean, this is advanced to you.
I often get confused between states and cities.
I've noticed that before.
Let's move on.
When Abigail starts studying geography, I'll do that part.
Yeah.
So this week, my dad was here.
Yes, he was.
I took him on a tour of the most important things in life.
Donuts, juice bars, barbecue.
He's so easy to look after, really.
You just feed him.
Yes.
Insert donut, sit back.
Mm-hmm.
And I got the best photos of him all over Nashville.
Yeah, you totally did.
He's lovely and very low maintenance.
I tried to get him back here for Christmas, but he wasn't biting.
I think that would be awesome.
Don't be so fine. The girls would love that.
Speaking of the girls, they started ballet classes week.
They did.
Do you want to talk about that?
Yeah, we entered them into ballet classes with his town dance studio, so we're super stoked.
What's really sweet is at that age you don't have enough self-awareness to know what you need to learn.
Yeah, I mean, I think because Tia's been watching YouTube videos of ballet and practicing on
her own upstairs, she thinks she's pretty good to go.
They're super cute.
I took so many videos of them all.
The age looks similar, like all the kids in that class, even though Tia's just joined
it and the other kids have got like, you know, three weeks on her or whatever, they're all
pretty, pretty similar.
don't maybe think, oh, it's part of the age as well.
- Well, what was interesting was MJ's disappointment
that he couldn't do ballet.
- Yes, he really wanted to go.
- I don't think he knows what ballet is.
I think he just sees his sister doing things.
Like it's been funny because we've been renovating
their rooms and before we even moved to
to clear it as she wanted to chandelier.
- Yes.
- And then, well, because Tia wanted to chandelier,
then Abigail wanted to chandelier.
And now MJ wants to chandelier just because the girls
go to chandeliers. I've been trying to steer him away from chandeliers ballet class.
Oh dear. Did I tell you who went to?
We should probably put him in baseball or something just so that we can turn this tide around.
I can do one better. I tell you that I took him to Brazilian Jiu Jitsu.
I'm sorry. Me and MJ went to Brazilian Jiu Jitsu class.
And when did you do that exactly? About two weeks ago. I mean, we didn't actually go to a class.
We went to the place and inquired about how much they would be.
i'm sorry and i'm just hearing about this now live on air also we got tears here
is your line and a belly button and belly button actually asked her as it
mom's away do you want to get your ears pierced and she's like dad
i said well okay what about your nose she's like dad i thought what about your
belly button she's like i'm not old enough to get my belly button
here at least somebody has a nice comment
- Picking news of the week, I got my iPhone.
- You did.
- In a really nice turn of events, Apple emailed me.
So here's what happened.
We're part of the iPhone upgrade program.
And when I woke up at 1201 Pacific time,
which was 201 Central Standard Time,
all the phones were gone.
- Already?
- There was no T-Mobile.
And the reason for that is everybody wants T-Mobile phones
'cause they come unlocked, carrier unlocked.
So couldn't get any.
And so Apple were kind enough to email me and just say, hey, we're sorry.
We know that you're trying to get a phone and you can't just call this
number and speak to one of our reps.
So you called on behalf of me because I was teaching.
I did.
And how long did that take?
I don't know.
I was teaching.
It was over an hour.
It was an hour and 20.
It was true love right there.
It was true love.
Yep.
And so I couldn't go potty that whole time.
I was terrified that the second I tried to go potty, it was the guy would come back
and be like, Mrs. Jones.
Very blessed love right there.
And it worked because they just said, well, what is your husband looking for?
And so you told them.
And then within six days, they sent me an email saying, hey, we've got one.
It's not available for public infantry.
But if you could turn up at this store and ask the people to the manager and show them this email, they'll give you a phone.
And right now for went and got it.
And what are you now thinking?
I'm now thinking about getting the seven plus.
And this should be interesting because you mocked me relentlessly for getting a six plus two years ago.
Well, that's true, but now the camera is amazing on the seven plus.
I've been sending you photos, haven't I?
You have.
It was like torture, but great torture, because I wanted to see the kidlets.
Here's what's amazing.
So Apple does a great job of their PR.
And so they're talking about how great the screen is, but there's no way you can
tell how great the screen is until you've seen how great the screen is because they
can't take photos of it because most computer monitors, most photos, most prints
don't have a wide enough color gamut to show you the display of colors.
You actually have to see them.
So I took the girls while you were away.
I was single-dead for the weekend.
So I took the kids out to their school was doing what do you call it?
A fair and some of the shining is beautiful.
And I just use my phone to grab some pictures of them.
And I was astonished at the quality of the photos.
Now, do you have to pick between what lens you're using or does it know to do it itself?
So here's the thing.
Every time you take a photo, both lenses fire and then the computer automatically
decides which one is the better photo, but you can also force it to use one or the other.
Did you force it in all this weekend or did you just take pictures?
The only thing I forced it in is the new iPhone 7 Plus has an option to do what's
called portrait mode, which effectively gives you a shallow depth of field.
So you take a photo and the person in the foreground is in focus and everything in
the background has what's called a Boca effect.
So I'm beta testing that feature and use that that you can specifically turn that on.
It slows down your camera a little bit, but the results are beautiful.
And when you take a photo of that, it gives you two photos for every photo you take.

Oh, great.
I've been so impressed.
The screen is amazing.
The camera is fast.
The picture quality is stunning.
I'm really enjoying it.
And now am I on the same correctly that you want to return your small phone and upgrade
to the big phone?
I really might.
I want to actually take your phone and my phone outside maybe tomorrow break and try
and take pictures of the same thing and just see what the difference is.
I'm sure we can come to some sort of agreement.
Okay.
Visa v rental.
Mm hmm.
Okay.
You also killed it as a domestic god this weekend.
I mean, it's a do list.
you killed her to do this almost the only thing I couldn't do was because I needed to go back to
home people and I couldn't face doing that with three children they were amazing basically I was
going to take them to the movies and then here's what I realized I was a fool I gave them options
just don't give three children of different ages options no because they just don't harmonize but
if you tell them this is what we're going to do they're all excited so we bought the angry birds
movie. MJ said he loved it. And T loved it. They just kind of giggled out, watched bits
and pieces of the book, mind you, they just watched that and I fed them and then put them
to work. And I did a bunch of jobs around the house. You did. I came home to the bathroom,
master bathroom being totally unpacked and clean and our master closet.
Yep. Again, it was full of boxes. It's totally unpacked and clean. And the kitchen is gorgeous
and clean and everything's ready for lunches in the morning.
And you've done a whole bunch of laundry and then upstairs is everything's clean.

I'm kind of a big deal.

Well, it's amazing.
We're shocking.
When you don't have another adult to say no, you can't throw that out around the house.
You can just dream line.
What are you talking about?
Let's move on.
You've just literally walked in the house.
Yeah.
It's about 10 p.m.
Yeah.
You're tired.
Yeah.   Oh, good. And they're great questions. Oh, good.
And so I'm going to read them and you answer them. Okay. Okay. This question is from Neil.
This is such a great question. He says, "You've been speaking a lot about expectation and blessing
and how good God is. How do we balance the expectation of blessing with being content in all things?
I don't feel like they're opposite, but I feel attention between them in my heart.
Bingo.
Great question, Neil.
The answer is, gosh, it really is a great question.
How do you balance being thankful for what you have with having expectation for more?
Is that what you mean?
Yeah.
While you're thinking about that answer, do I tell you that remember how last week I was at the dentist and they cut my tongue and I got temporary crowns put on the temporary crowns fell off this after.

So I have like tiny stumps.
They're super sensitive to air.
Nice.
But yeah, so there's that.
So you have to call the dentist in the morning.
Meanwhile, back to the answer.
What's the answer?
Um, gosh, I don't, I don't know.
Uh, I don't think those two things are at war.
I mean, I think being thankful is, is, is a position of your heart.
So I don't think I'm just trying to think about like, do I struggle with that?
I think I feel constantly thankful for all the different things that God's done or that He's
given us or that He's allowed us to be a part of that kind of thing.
But I know that there's always more. So I feel like it's me being faithful to understanding that
that he's good, that keeps me in expectation,
as well as thankfulness.
- Right.
I think the reason I've been talking a lot about
how good God is and blessings from God,
is because the Lord himself has been coming to me
and saying, Alan, you have a really dim view of me.
It's not that I'm stepping into this revelation
because I'm frustrated,
I'm living below the glory standard that God has for me.
I think in some sense,
I've been living with the ceiling over my life going, you know, no, this is good enough.
I'm just a worm, you know, I'm just really grateful for salvation, which of course I
am, but not having an expectation on the goodness of God.
And the Lord being like, Hey, actually, I'd love to challenge your view of my goodness.
So I'm kind of caught up in this whirlwind of God's goodness at his behest, it feels
like.
And what's challenged me is this notion where I've lived in lack of the goodness of God.
And so I think if anything, it's the Lord coming to me going,
"You've made me too small in your eyes, Alan."
And him just flexing his muscle, so to speak, of his goodness and me being astonished by it.
but I think it would be a tragedy if we lived with a place of grumbling or complaining.
And I think that's where that content and all things. Like Paul says, you know,
I know what it's like to be in need and I know it's like to have abundance. I've learned to be
content and all things. And I think that's amazing. Like I can't say I've been content and all things,
but I've tried to posture my heart in that way. And I think of the various seasons I've been
through in life. And this is the beauty of God. You can always find His goodness at work
in your life.
And I've been processing that a bit this week. I was earlier in the week. I was just chatting
with God and talking to the Lord. And I felt like He said, I was talking to Him about cars,
because I like cars.
Of course you do.

And I was like, huh?
And I felt like the Lord said, well, why don't you ask me for that?
And I thought, well, because then it feels like, I don't know, it feels ungrateful,
I suppose, to be asking for a car.

And we don't necessarily need a second car and, you know, everything's fine.
But I still felt like he was saying, but why can't you, why can't you like sort of stretch
out towards my goodness?
And I thought, okay, okay.
So I've been having this conversation, but I have been going back and forth between the,
then I don't know if I'm explaining it well, like the wanting to expect good things and
making sure that you're not ungrateful.
I think the interesting passage that I preached on a while back about,
it's actually when David sins with Bathsheba and the Lord comes to him and says,
"You know what? I gave you the wives of your enemy."
If that had been too little, it's kind of like the Lord is a gas that David took things into his own
hands and is pointing to his extravagance and his goodness towards David and said,
And hey, if that hadn't been enough, and that passage really challenged me because I guess
I'm still uncomfortable with God's goodness.
I think I still get confused when God does things that delight my heart because I think
probably in my upbringing, I was taught that anything my heart wanted was worldly.
I remember the first time I went to John and Carol's house and they have a beautiful
kitchen. When I went there, I just finished building the house and I walked in and I
mean the kitchen was gorgeous. And I said, John, you have such a beautiful kitchen.
And he said something to me that was really funny. And I said, well, you know, I think
I've had an idol in my heart about nice kitchens. And John was like, why would you have an
idol about nice kitchens? Like, what bizarre thing to have idolatry in your heart about?
And I realized that me coming into appreciation of good things from God is understanding another
facet of his heart, whereas I think I was probably raised to believe that that was worldly and
that there was something wrong with that.
So it's been a really interesting season.
God just wrestling or putting his finger on things in my heart and me wrestling with
them and then finding out it's him and not my greed nature at work.
I think it's funny though because we don't think it's greed when tea wants to go to Disney.
We're like yeah baby it's okay to ask god for that and it's extravagant.
You know it's a good point but when when we would like something there's this struggle the adult struggles with.
Well why do I want that and well let me give you an example of if if tea had a bad attitude about not getting i mean so t's want to go to Disney for the last couple of years.
this year we went but last year if all t did was complain about how we never get to go to Disney,
how would our hearts be turned towards her would that be a moment where we step in and give her help her with an attitude adjustment it absolutely would but the desire of itself isn't wrong,
the grumbling and complaining that's not happening as fast as we'd like well i think that's where you get into trouble yeah so i think finding contentment,
In all things and being thankful is the thing that opens the door to god doing i don't know what makes god do more i think god's nature is just more inherently but.
I guess we don't have a great answer but you ask a great question i think we're just pondering allowed.
I'd love to hear your thoughts. Anybody who's listening to this, you just email us or reach out on Twitter and let us know what you think.
Yeah. Any other thoughts on that?
I don't know. I mean, I think obviously it can be done to stay in a place of thankfulness and still expect more because we're there.
But I understand the quandary of it. Like I understand that it's when you sit down and think about it.
 I don't think that they are. But yeah, it's.
It's hard to manage your heart sometimes.
So, Neil asked a question about balancing the tension of being content and receiving blessing.
This is an anonymous question about balancing our own emotions with codependency.
You ready?
Okay, I'll try and be ready.
Hi, Alan, AJ.
First, I want to say that I love listening to your podcast.
I love listening to all of your teachings, but especially your teaching on boundaries.
I recently had a very strange experience, though.
A few weeks ago I found myself in a rather deep depression and I had no idea why.
As I started to delve into it I realised that I had experienced a handful of small disappointments
that on their own wouldn't have fazed me much, but because they all came at the same
time they were a little overwhelming.
But the real problem was that I refused to talk to anyone about them because I kept telling
myself that I am in control of my emotions, they aren't anyone else's responsibility,
so dealing with them is on me.
I ended up getting quote unquote separated from the pack because of this line of thinking
and it got really gross.
So my question is how do we balance managing our own emotions with the need to be in community?
How much sharing is healthy and how much is codependent?
I mean, I think you need to have healthy relationships that you can talk to people and say, hey,
I'm having a really difficult week or, you know, I've had this disappointment and this
than this and I need to vent with some. I mean I have that. I have some friends that I could
call and just be like, "Hey, this week's been really hard. Can I just vent with you?"  I think you want to always
stay in community.  I think if you find that everywhere you're going, you're
eking emotion, that's probably a different level.
Well, I think the balance, I think the line into codependency gets crossed when I'm like,
I'm not sharing these things with you for my sake. I'm sharing them with you for your
sake so you can fix my problems. That's then codependency. There's nothing wrong with me
calling Jeff and just in Jeff man I need to process a few things and my goal is like
I'm using you as a sounding board I'm just sharing my heart with you I'd love
any wisdom you have that's healthy that's healthy quite a different thing when I'm
like hey Jeff I have these problems please fix them for me right that's
co-dependency right or a spouse what do you mean or a spouse well I mean if you
were to say hey AJ I have these problems fix them for me like good luck with that
Yeah.
Like, well, this is not going to be healthy for our marriage.
Yeah.
So I think, yeah, absolutely.
I love what Dan Farley from Bethel says when talking about feelings.
He's like, not everyone needs to know about all of your feelings or treat them
tenderly all of the time.
I think if you hold that intention that a real friend will not only listen to you,
but will also tell you when to stop talking, you know, a good, I think,
because of people we have in our lives who are just like,
"Oh, I love you, but please stop talking."
You sound like a broken record.
Sometimes you need to hear that message too.
Like how Alan, it sounds like you just want to complain
rather than deal with your emotions.
- Right.
- So.
- That's the whole thing of friends,
stab you in the front.
- Mm-hmm.
- But again, it comes back to the boundary,
teaching of there's nothing wrong with me sharing something
with a trusted friend as long as I understand
that it's my responsibility to change my climate system
and not yours.
- And if actually that friend has codependent tendencies,
That's probably not the best person to share it with because then they get wrapped up in
trying to fix you when actually it's something you can probably take to the Lord and get
him to help you.
This question is from Chelsea.
And Chelsea says, "I'm a Christian and I have a dear friend who is an atheist.
Until recently, this wasn't a problem.
We conversed freely about deep issues and our friendship seemed to be one of mutual
respect.

Side note, I hadn't said anything of the sort to him.
I was mostly silent as he vented his anger, but when he pointedly asked me if I believed
he was going to hell, all I could think to say was, "I believe the only way to God is
through Jesus Christ," from John 14 verse 6.
Although I've only ever treated him with love and kindness, he now doesn't want me in his
life anymore.
My question is, how could I have better handled a discussion like this?
I'm not into the whole one-sided lambasting of my beliefs.
Does that make sense?
Lambasting.
No, we say lambasting here.
You based lambs?
I'm just saying that's how it's pronounced in North America.
I can't wait to hear the podcast discussion on that one.
I'm not into the whole one-sided lambasting of my beliefs, but is there a way to answer
atheistic questions like that in a way that does not sound condemning but invites further
dialogue?
There's so many things, but before we even talk about lambasting or lambasting?
I'm pretty sure it's lambasting, but I said lambasting because you thought I should say
lambasting.
Lambasting sounds like a cooking technique for preparing to eat lamb cutlets.
I'm just going to base these lambs.
You just have to trust me.
You're in the new world now.
We say at lamb based.
I love when you're vicious, especially when you're wearing army colors.
With my army green eyes.
Wait, they're going camouflage.
So the second thing I want to make, and I don't mean to be poking fun here,
but it's amusing to me that an atheist would get upset about being sent to
something they believe is a fictional place.
Like that would be like Abigail coming to me going, daddy,
I believe that you're going to Nanapupi headland.
Like, why would that challenge my worldview when I don't believe in Nanapupi headland?
Well, wow, that's a great example.
Do you know what I mean?
So, I'm thinking, I wonder what else is going on there.
That's a very strong reaction to have about something you don't believe in.
So I wonder if Chelsea, the reason that your friend is reacting so badly is not that you
handled things poorly.  You answered their question. I wonder if the Holy Spirit is doing
a work in their life. Trying to get their attention or if they've had some dreams recently or something
that's causing them to react like that. One of the prayers I used to pray over my friends,
I'm not sure if this is going to sound good or not, but my friends who didn't know the Lord,
I'd ask that the Lord that their hearts would be troubled to know the Lord.
And I know that sounds mean, and I didn't mean that in a meanness, but just the empty satisfaction
that's in the heart of an unbeliever is often covered up by the distractions of the world,
buying things, other relationships, alcohol, whatever. But I'd ask the Lord that none of that stuff
would work well in their life so that they would be troubled to find true satisfaction.
And I wonder if that's what's happening in the life of your friend.
And then the last thought I had is that the cross of Jesus Christ is a stumbling block.
It is offensive.
It is foolish to those who are not saved.
So it sounds like it's on par.
I'm really sorry that it sounds like right now that there's a relationship with a good
friend that's broken.
And I think probably your way forward is just to be consistent and kind.
Yeah, I'm not really sure what you could have said better or that anything would have actually worked in that particular situation.
I think what you said was, you know, accurate and it was kind.
One of my favorite people, I've never met this person, but one of my favorite people to listen to is a gentleman called Ravi Zacharias.
Yeah.
who has got this amazing ability to handle questions
from people of a wide variety of faith
or non-believing people with such tact,
with such care and with such genuine affection, love
and respect that's astonishing,
that he isn't in dialogue to win an argument.
He's in a dialogue to represent Jesus well
to people who don't yet know him.
And I've long been provoked by Ravi's brilliant way
of handling people.
I wish I had half the people skills that he has,
the way that he did that.
He's just phenomenal.
And if you're not familiar with Ravi Zakaray,
so I really encourage you to just get on YouTube
and just watch a couple of his videos,
especially the way he deals.
I wouldn't watch a long sermon, so to speak.
I would probably just pick up his question, man, or stuff.
And that may help.
But again, I don't think you did anything wrong,
Chelsea, from your description.
But we'll be praying for your friend,
and especially for your relationship.
I'm sad that currently it's broken,
but I think it'll be fixed.
No, in the Lord.
- Do you want me to read you the next question, baby?
- Please do.
Read me in your most authoritative army voice.
- Alan and AJ, love your podcast.
- Okay, I'm scared.
Just read in your normal voice.
It says this is from AJ.
So, A-A-J, it's AJ.
- Are you writing to yourself?
- I don't think so, I don't remember doing it,
but it's possible I'm really tired.
- Okay, go for it.
- So it says Alan and AJ, love your podcast.
So very much, thank you, that's lovely.
I have a mashup question, half about dating,
half about hearing the voice of God.
I can't wait to read this, this is gonna be very exciting.
Okay, so, I am a 26 year old female,
and I have had a series of emotionally intense,
long relationships all ended somewhat tragically
except for my last one,
which was my first healthy God honoring breakup.
I do not come from the healthiest family.
My parents are divorced and every man in my life,
except for my grandfather who is passionately in love
with Jesus, has cheated on every woman of influence
in my life.
Wow.
Yeah, I usually pick guys who lose interest in me and disappear
Until I become exhausted making the relationship run all by myself and then break it off for them
Because it's too painful to keep going
So over the years it's created a lot of self-esteem issues that I am always seeking more and more healing for
I've been in counseling and spent a year away
from dating to really work on my stuff.
But lately I've considered possibly dating again
and I am very, very afraid,
primarily because I do believe I hear the voice
of the Holy Spirit,
but there are lots of inconsistencies.
I also can never hear the voice of the Holy Spirit
when I'm dating someone.

So I've developed this unhealthy belief
that dating is bad or dirty or wrong,
and the Lord wants me to be alone,
or I'm just not healthy enough to date
despite all my hard self-work.
The trouble is, I have this resentment in my heart
building up towards the Lord because it's like
there's this lie that the Lord prefers me to be alone,
stitched into my being, or maybe it's true.
Maybe I'm called to be single.
Honestly, that would be okay with me.
dating is scary and hard.
I wish that I could date and invite the Lord into it,
but I'm hitting a wall.
It could be indicative of wrong timing
or maybe just some UGBs, which is ungodly beliefs.
I would love to know your thoughts on this.
And if you have any advice about walking into dating
in a healthy God-honoring way as a mid-20 something.
- That is a great question.
Thank you for sharing a little bit of your story, AJ.
Certainly sounds very painful.
I'm really sorry it's been your experience with men
and really sorry that's been your experience
with relationships.
- Yes.
- There are probably a whole host of things
that is contributing to your feelings.
And of course, without knowing you
and without being in dialogue with you,
a lot of the input, AJ and I are gonna give you,
is more general than specific to your circumstances.
One of the things I would encourage you to do
before anything else is to set aside some time
and set aside some money to do what we call
restoring the foundations healing week.
- Yeah.
- This has got to be one of the best investments
anybody could make in their life.
- Absolutely.
- It is where you as a single person will go to
two counselors to RTF trained counselors,
typically a husband and wife.
And you will be with them for three or four days,
depending on the schedule.
And they will minister to you in four key areas.
Like some of the things that instantly grab my attention
is what you said about your family line,
that basically your whole family line
has come from broken relationships.
So automatically that tells me
there's something over your family line
that the enemy really doesn't want great, healthy relationships.
And you battling that without that getting taken care of,
it's gonna be like pushing water uphill with a rake.
It's gonna get real tired really a long time.
But the good news is Jesus can fix that brilliantly.
And so going for an RTF week,
they'll probably instantly go after that.

Yeah. That are either fully formed or are blossoming.
Things like, I can't hear the Holy Spirit when I'm in relationships.
So we'd call that an ungodly belief because that might be true based on the facts of your
experience, but it's false based on the teaching of the Word of God.
Because there's nowhere in Scripture that says, I will never leave you.
I'll never forsake you, except when you're in a relationship or my sheep know my voice.
They follow me unless they're dating.
But also it is really hard to hear the learn
on things that are super close to your heart.
- Absolutely.
- Especially if you've made it an idol of some sort.
- Absolutely.
- So it could be more that.
Like it really could just be.
- There could be a number of things
that are contributing to that.
But the encouraging thing is on this healing week,
they'll dismantle anything that's clouding
your judgment and your ability.
And I should say when I say that I'm hearing
on Godly beliefs, I'm not telling you
you're doing something wrong,
Nor am I necessarily right in that assessment.
Again, I'm just going based on my experience of walking with people.
This is what you usually find.
So well done on having the self awareness to realize, Oh, this has been a
parent in my relationships.
Well done for realizing, Oh, this is where I'm taking responsibility or I can see
where I've exercised control or, I mean, these are great steps in, in self growth.
but I would really, really encourage you to seek out some time to reward yourself, to be kind to yourself,
to do an RTFL, do way more for you than just helping with relationships.

And that's why I think you're healing would be great. What do you think, babe?
No, I think that's great. I definitely think a healing week would probably help. I think,
you know, you say at one point in your question, I wonder if God called me to be single. I think
of God had called you to be single. That's what you'd want to be. And I know at one point you say,
well, that would be fine because dating is scary, but fear isn't the reason that you want to be
single. So, you know, I think that if the meditation of your heart is, hey, actually, I'd like to be
be married. I like to have kids. I'd like to, you know, go through that whole process.
And that sounds like a horribly clinical way to put it. It's a great process. I've enjoyed
the process myself. And I would say then God hasn't called you to be single because he
would, he understands the desires of your heart.
I wonder if it's not as simple as that though. Okay. I think that that God, of course, does
work with the desires of your heart. But sometimes we don't know what the desires of
our horror. But I would agree with you that God is so good at telling you what his desires are.
He doesn't leave you in murkiness. He doesn't leave you to flounder around and vaguely stumble
upon his will. He would speak to you. But he's also not going to let fear be your motivator for
the reason that you choose not to be. No, no, I think your point was brilliant. Your second
point was brilliant about God's not going to use fear as the motivator for you following him.
you know, he's going to use life. And anyway, my point rather was, I know lots of people whose
desire is to be married, but they're not married. And so the desire is there. And it hasn't happened
for them. So obviously, one of the places their head goes to is, well, maybe God wants me to be
be single. But again, I doesn't God communicate, God's a much better communicator than just passively
not answering your will and hoping you figure it out. I think that he would, at least in my experience,
the things that God wants me to do, he's come and spoken to me like a friend and said, "Hey,
this is something I'd love you to do." Yeah. And we know people as well that are single,
that feel like the Lord's talked to them about being single and their content with that. And it's
not because of being afraid, but simply because they feel like that's what the Lord spoke to them
about. So, yeah, there's peace when God speaks.
So advice on entering into dating as a mid-20s, somebody would be, get your heart healed.
And I'm not saying that because I think you're a mess. I'm saying you're doing a great job in
heading towards- I mean, you're clearly going after your stuff, which is amazing.
I'd say invite counsel from people. So, I'd love that you asked us that question,
but find people who are actually in relationship with you who know you and give them permission to
speak into that. And maybe pick a person that's different from the people that you've been picking
in the past. Like you mentioned earlier that I always go for the same type of guy.
Well, your track record would suggest that's not working for you. So maybe have a different
thought about that. Yeah, if you have some safe spiritual authority, you know, that are,
you know safe people and have to sermon and stuff maybe get them involved in the process with you you know like if somebody.
Says that they want to date you maybe get them to have a pass at that person.
I'm if your track record has been you know picking the wrong kind of guy.
Let them know that hey i have this track record i'm trying not to do this again would you would you be part of this scenario with me.
I don't know if AJ you've listened to our teaching on relationships. We have a teaching
all about sexual wholeness on our website at alm&ag.com and part of that is a teaching that we do on
dating. If you've not heard it, you could listen to that. It has a fuller expression on our views
on dating and hopefully there's something that is helpful. AJ Jones, tell me what we need to know
before we go.
The Heaven Declares Conference is coming up late October and we have Life Hatland coming
in, Jamie Galloway and Andy Squire's leading worship, so we're super excited.
We can't wait for that.
No, it's going to be great.
We're going to post a link in our YouTube.
If you haven't heard Life Hatland, I'm going to post a link to Randy Clark, who you've probably
heard of, talking about Life Hatland and we're just so excited to have Life at our church.
And of course, Jamie is a good friend of ours.
We're going to be thrilled to have him back.
Yeah.
And Andy Squires, I hear great things about, I've never met Andy, but everybody who has
says he's amazing.
We were out of town when he came and led worship.
So we're excited about that.
I can't wait.
Hope you guys have an incredible week.
If you would like one of your questions answered, go to Alan and AJ.com/ask.
We would love to read your questions.
We always take great joy in reading them.
Thanks for listening to us.
Have an amazing week.
And we will be back here next week.
Just a little shout out to my Southgate ladies.
What?
Have a great week.


ASP.NET Boilerplate can work with any O/RM framework. It has built-in integration with EntityFramework. This document will explain how to use EntityFramework with ASP.NET Boilerplate. It's assumed that you're already familar with EntityFramework in a basic level.
Nuget package to use EntityFramework as O/RM in ASP.NET Boilerplate is Abp.EntityFramework. You should add it to your application. It's better to implement EntityFramework in a seperated assembly (dll) in your application and depend on that package from this assembly.
As you know, to work with EntityFramework, you should define a DbContext class for your application. An example DbContext is shown below:
public class SimpleTaskSystemDbContext : AbpDbContext
{
public virtual IDbSet<Person> People { get; set; }
public virtual IDbSet<Task> Tasks { get; set; }
public SimpleTaskSystemDbContext(): base("MainDb")
{
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<Person>().ToTable("StsPeople");
modelBuilder.Entity<Task>().ToTable("StsTasks").HasOptional(t => t.AssignedPerson);
}
}
It's a regular DbContext class except it's derived from AbpDbContext instead of DbContext.
EntityFramework can map classes to database tables in a conventional way. You even don't need to make any configuration unless you make some custom stuff. In this example, we mapped entities to different tables. As default, Task entity maps to Tasks table. But we changed it to be StsTasks table. Instead of configuring it with data annotation attributes, I prefered to use fluent configuration.
ASP.NET Boilerplate provides a base class EfRepositoryBase to implement repositories easily. To implement IRepository interface, you can just derive your repository from this class. But it's better to create your own base class that extens EfRepositoryBase. Thus, you can add shared/common methods to your repositories easily.
An example base class all for repositories of a SimpleTaskSystem application:
//Base class for all repositories in my application
public class SimpleTaskSystemRepositoryBase<TEntity, TPrimaryKey> : EfRepositoryBase<SimpleTaskSystemDbContext, TEntity, TPrimaryKey>
where TEntity : class, IEntity<TPrimaryKey>
{
//add common methods for all repositories
}
//A shortcut for entities those have integer Id
public class SimpleTaskSystemRepositoryBase<TEntity> : SimpleTaskSystemRepositoryBase<TEntity, int>
where TEntity : class, IEntity<int>
{
//do not add any method here, add to the class above (because this class inherits it)
}
Notice that we're inheriting from EfRepositoryBase<SimpleTaskSystemDbContext, TEntity, TPrimaryKey>. This declares ASP.NET Boilerplate to use SimpleTaskSystemDbContext in our repositories.
You don't have to create repository classes for entities to just use predefined repository methods. Example:
public class PersonAppService : IPersonAppService
{
private readonly IRepository<Person> _personRepository;
public PersonAppService(IRepository<Person> personRepository)
{
_personRepository = personRepository;
}
public void CreatePerson(CreatePersonInput input)
{
person = new Person { Name = input.Name, EmailAddress = input.EmailAddress };
_personRepository.Insert(person);
}
}
PersonAppService contructor-injects IRepository<Person> and uses the Insert method. In this way, you can easily inject IRepository<TEntity> (or IRepository<TEntity, TPrimaryKey>) and use predefined methods. See repository documentation for list of all predefined methods.
To implement a custom repository, just derive from your application specific base repository class we created above.
Assume that we have a Task entity that can be assigned to a Person (entity) and a Task has a State (new, assigned, completed... and so on). We may need to write a custom method to get list of Tasks with some conditions and with AssisgnedPerson property pre-fetched (included) in a single database query. See the example code:
public interface ITaskRepository : IRepository<Task, long> { List<Task> GetAllWithPeople(int? assignedPersonId, TaskState? state); } public class TaskRepository : SimpleTaskSystemRepositoryBase<Task, long>, ITaskRepository { public List<Task> GetAllWithPeople(int? assignedPersonId, TaskState? state) { var query = GetAll(); if (assignedPersonId.HasValue) { query = query.Where(task => task.AssignedPerson.Id == assignedPersonId.Value); } if (state.HasValue) { query = query.Where(task => task.State == state); } return query .OrderByDescending(task => task.CreationTime) .Include(task => task.AssignedPerson) .ToList(); } }
We first defined ITaskRepository and then implemented it. GetAll() returns IQueryable<Task>, then we can add some Where filters using given parameters. Finally we can call ToList() to get list of Tasks.
You can also use Context object in repository methods to reach to your DbContext and directly use Entity Framework infrastructure.
See repository documentation for more information on repositories.


Book for Free to Study and Trainig LINUX
Artikel & E-Book di-Copy dari linux-training.be
- Linux Fundamentals.pdf teaches you the very fundamentals of Linux (or Unix!). This book is for beginners, novices, anyone who wants to become a Linux developer or Linux system administrator. It contains basic knowledge, but advanced users will also benefit from this book.
- System Administration.pdf teaches you Linux system administration (not Unix). Anything that is related to Linux system management, is introduced in this book.
- Linux Servers.pdf shows how to setup common services like a web server, a name server, a database server, a dhcp server, a file server and more. You should have studied Linux fundamentals and system administration before starting this book.
- Linux Storage.pdf explains disk management on Linux in detail and introduces a lot of other storage related technologies.
- Linux Security.pdf focuses on all topics related to security such as file permissions, acls, SELinux, users and passwords, and more.
- Linux Networking.pdf (soon) will focus on all things related to Linux in a network.
E-Book Lainnya :
- The Linux Command Line.pdf - by: William E. Shotts Jr.
- GNU/Linux Command−Line Tools Summary.pdf - by: Gareth Anderson
- Linux for Dummies 9th Edition.pdf - by: Richard Blum & Dee-Ann LeBlanc
- Linux Bible 9th Edition.pdf - by: Christopher Negus
Post by : Admin.


From Quora: An API (Application Programming Interface) is best thought of as a contract provided by one piece of computer software to another.
Simple API: a function in JavaScript
function getMaximum(num1, num2) {
/* ...
working code
...
*/
return answer;
}
Simple API: a function in JavaScript
Imagine that you didn't know how that function was implemented
You only know that you enter two numbers in the function and you receive the greater of those two numbers
That is an API!
API as contract
The getMaximum function can be considered as one piece of computer software
The rest of your code can be considered as another piece of computer software
The contract between those two pieces of software:
If you call the getMaximum function and pass it two numbers as data
It will return a number that is the maximum of the numbers provided.
API as a contract example
../js/api.js
function getMaximum(num1, num2) {
let answer = num1;
if (num1 < num2) {
answer = num2;
}
return answer;
}
API as a contract example
index.html
<!DOCTYPE html>
<html>
<body>
<button onclick="alert(getMaximum(5, 3))">
Call API function getMaximum
</button>
<script src="../js/api.js"></script>
</body>
</html>
API as a contract example
api.js defined an API action called getMaximum
It accepts two pieces of information: two numbers
It returns one piece of information: a number
Any web page can import api.js and by following the above contract can utilize the getMaximum function
Now what really is an API?
When people say an API, they don't really mean what we just covered
So let's talk about what people really mean when they say "API"
Now what really is an API?
The power of APIs
Web applications used to combine all of their functionality in their website
Now they separated their "functions" into independent APIs so that clients other than their own websites can use it
So now anyone can access that information
The power of APIs Example
Without API: An app finds the current weather in London by opening http://www.weather.com/ and reading the web page like a human does, interpreting the content.
With API: An app finds the current weather in London by sending a message to the weather.com API (in a structured format like JSON). The weather.com API then replies with a structured response.
APIs over HTTP
Let's take that function concept to the Internet
We can define functions that can be called "through the Internet" using the HTTP protocol
We can use the same protocol as we do for web servers to send and receive information
Caveat: Instead of sending HTML/CSS/JS, we send and receive a more structured data representation, like XML or JSON
JSON
JavaScript Object Notation
A lightweight format that is used for data interchanging
HTTP/1.1 401 Unauthorized
Server: openresty
Date: Fri, 02 Nov 2018 12:34:35 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 107
Connection: keep-alive
X-Cache-Key: /data/2.5/weather?q=berkeley,ca
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST
Connection #0 to host api.openweathermap.org left intact
{"cod":401, "message": "Invalid API key.
Please see http://openweathermap.org/faq#error401 for more info."}
We got a 401 error
From website: Starting from 9 October 2015 our API requires a valid APPID for access. Note that this does not mean that our API is subscription-only now - please take a minute to register a free account to receive a key.
We got a 401 error
Remember that 400s HTTP response codes mean that there is a client error
So we made a mistake
Now this openweathermap API requires an appid and it's telling you to sign up and generate one
But what is an appid?
Many API's require some sort of identification so that the API knows who is making the requests
Typically the backend will assign id's by user or by application (one user could have several applications)
Statistics, rate limiting, blocking, and levels of authorization are all possible when you require application ids to be passed on every request
How do you typically get an appid?
First you will need to go to the website that hosts the application and go through their signup process
Next look for somewhere where they tell you how to use their API: typically they will show you how to generate a new application id


Get basic understanding of what it means, how are they calculated and eventually while practicing more and more problems, try to figure them out. Don’t emphasise on completing the course. Here is the link.
Work on recursive problems from scratch as it covers major and important sections of coding problems (including backtracking, trees, graphs, dynamic programming, etc.)
Coding Practice link:
https://www.techiedelight.com/recursion-practice-problems-with-solutions/
Try to implement problems in following sequence from above link:
a. String (Complete — 100%)
b. Array (Complete — 100%)
c. Backtracking (Complete — 100%)
d. Binary Tree (Complete — 60%)
e. Binary Search Tree (Complete — 60%)
f. Dynamic Programming (Complete — 100%)
Before starting dynamic programming, read below links to get basic understanding of it and why it is so effective. Also solve some basic problems given in below links, remember you have to return to DP problems on techiedelight as that is easier to start with.
https://www.codechef.com/wiki/tutorial-dynamic-programming
https://www.quora.com/What-are-the-best-ways-to-master-dynamic-programming/answer/Sameer-Gulati-3
g. Matrix (Complete — 100%)
h. Graphs (Complete — 100%)
I know graph problems are very less here, don’t worry, we will cover it later.
Merge sort — https://www.geeksforgeeks.org/merge-sort/
Quick sort — https://www.youtube.com/watch?v=uXBnyYuwPe8
Binary Search.
Understanding heap(priority queue) and its implementation
https://www.youtube.com/watch?v=HqPJF2L5h9U&t=2s
https://www.youtube.com/watch?v=t0Cq6tVNRBA
Problems on Heap
Try finding out solution of problems available on YouTube (preferably over recommended channels as they’ve got some real nice explanation) and then search elsewhere. Also try exercising other related problems that come up while searching for the problems asked by Google. Trust me, you’ll learn a lot from there, so make sure you invest your time in this particular section.
b. Irfan Baqui (Complete all problems on this channel)
c. Abdul Bari
d. Byte By Byte (Complete all problems on this channel)
Practice coding questions of these companies at least, Google, FB, Amazon, Microsoft, DE Shaw, Directi, Oracle, Adobe, Samsung, Ola and Walmart Labs.
https://www.youtube.com/watch?v=pcKY4hjDrxk
https://www.techiedelight.com/depth-first-search/ (code)
https://www.techiedelight.com/breadth-first-search/ (code)
https://www.youtube.com/watch?v=XB4MIexjvY0&t=303s
https://www.youtube.com/watch?v=d6ZFqjH63vo
https://www.youtube.com/watch?v=XqCP_2Vcas4 https://www.techiedelight.com/single-source-shortest-paths-dijkstras-algorithm/ (code)
https://www.youtube.com/watch?v=FtN3BYH2Zes&t=327s
https://www.techiedelight.com/single-source-shortest-paths-bellman-ford-algorithm/ (code)
https://www.youtube.com/watch?v=oNI0rf2P9gE&t=247s
https://www.techiedelight.com/pairs-shortest-paths-floyd-warshall-algorithm/ (code)
https://www.youtube.com/watch?v=4ZlRH0eK-qQ&t=465s
https://www.techiedelight.com/kruskals-algorithm-for-finding-minimum-spanning-tree/ (code)
Solve medium/hard level questions on LeetCode. (1 month)
“Cracking the Coding Interview” — for basics only
https://www.youtube.com/watch?v=wU6udHRIkcc&t=1077s
https://www.techiedelight.com/disjoint-set-data-structure-union-find-algorithm/
https://www.youtube.com/watch?v=YG6iX28hmd0&t=255s
https://www.youtube.com/watch?v=p4kfbNJzftQ
https://www.youtube.com/watch? v=CN0N1ddJ9hA&list=PLMCXHnjXnTnuASA1NghV3Vs9J3D_ij5w2
I never expected switching jobs to be this difficult. Those of you who are struggling with it, I can relate to the frustration. Things don’t always go as planned, and there is the role of chance or luck in the interview process. A Sanskrit quote from the Bhagavad Gita that keeps me sane in such times:
You have the right to work only, but never to its fruits. Let not the fruits of action be your motive, nor let your attachment be to inaction.


Tab #1
This is a Main Tab.
A bug was reported where a nested Tabs Control was having issues activating one of its tabs due to being hidden. This test attempts to demonstrate Nested Tabs Controls working correctly. NOTE: The nested tabs don't show a Toast when they're activated because the "activate" event is stopped from bubbling once it reaches a ".tab-container" element.


SkySports Collector
version 1.0
{%for i in paths%}
{{i['main_folder']}}
Includes {{i['edge_files']|length}} seasons
{%for j in i['edge_files']%}
{{j.replace('.json','')}}
.json
.xlsx
.csv
{%endfor%}
{%endfor%}


Methods
delete (MarkerController)
draw_haplotype_image (MapController)
edit (MarkerController)
find_on_chr_between_start_and_stop (Map)
get_haplotype_img (MapController)
haplotype_view (MapController)
index (MarkerController)
list (MarkerController)
load_snps (AdminController)
load_strains (AdminController)
process_haplotype_request (MapController)
select_region (MapController)


The marital life of the Grahames became uncosier by the year. “Elspeth seldom got up before eleven, often went to bed in her clothes … Much of the time she spent on her divan, sipping hot water. She ate practically nothing and mouse-nests proliferated in the larder ; she put Kenneth into special underwear which was only changed once a year. It is perhaps not surprising that he took a long solitary walk every day.”
John Sutherland, The Lives Of The Novelists (Profile Books, 2011), quoting from (I think) a 1959 biography of Kenneth Grahame by Peter Green.


{% extends 'main/base.html' %} {% block title %} The Good Life Meal Prep Subscribers Page {% endblock %} {% block content %}
Welcome to the Good Life Meal Prep Subscribers Page. If you are an existing customer and have an active monthly subscription, click the login button below to place your weekly subscription order. Otherwise, click here to see our available plans.
Login


Chapter 15: Numerical Methods
Chapter Objectives
This chapter discusses the implementations of four common numerical techniques:
Introduction
Real-world data are rarely in such a form that you can use it immediately. Frequently, the data must be manipulated according to the user's actual needs:
- If the data samples have correct values but are not close enough together to be used directly, we can use interpolation to compute data points between the samples provided.
- There are occasions where the data-gathering facilities add some amount of noise to the data. To minimize the effects of the noise, we can compute the coefficients of a polynomial function that best matches the data.
- There are also times when the data must be integrated or differentiated to derive the quantities of interest.
15.1 Interpolation
Figure 15.1: The Interpolation Problem
If our data samples have correct values but are not close enough to be used directly, we can use either linear or cubic interpolation to compute data points between the samples provided. For example, plotting functions use linear interpolation to draw the lines between data points. In general, interpolation is a technique by which we estimate a variable's value between known values. In this section, we present the two most common types of interpolation: linear interpolation and cubic spline interpolation. In both techniques, we assume that we have a set of data points that represents x-y coordinates for which \(y\) is a function of \(x\); that is,
$$ y = f(x) $$We then have a value of \(x\) that is not part of the data set for which we want to find the \(y\) value. Figure 15.1 illustrates the definition of the interpolation problem.
15.1.1 Linear Interpolation
Linear interpolation is one of the most common techniques for estimating data values between two given data points. With this technique, we assume that the function between the points can be represented by a straight line drawn between the points, as shown in Figure 15.2.
Since we can find the equation of a straight line defined by the two known points, we can find \(y\) for any value of \(x\). The closer the points are to each other, the more accurate our approximation is likely to be. Of course, we could use this equation to extrapolate points past our collected data. This is rarely wise, however, and often leads to significant errors. The function that performs linear interpolation is as follows:
where the vectors x
and y
contain the original data values and the vector new_x
contains the point(s) for which we want to compute interpolated new_y
values. The x
values should be in ascending order, and the new_x
values should be within the range of the original x
values. Note that the last character in the name interp1
is the numeric 1 (one), not a lowercase L.
Figure 15.2: Interpolation Raw Data
Figure 15.3: Linear Interpolation
The use of interp1(...)
is demonstrated in Listing 15.1.
The MATLAB language allows us to provide a fourth parameter to the interp1(...) function that must be a string that modifies its behavior. The choices are as follows:
'nearest'
nearest neighbor interpolation'1inear'
linear interpolation — the default'spline'
piecewise cubic spline interpolation (see Section 15.1.2)'pchip'
shape-preserving piecewise cubic interpolation'cubic'
same as'pchip'
'v5cubic'
cubic interpolation that does not extrapolate, and uses'spline'
ifx
is not equally spaced
The MATLAB language also provides for two-dimensional (interp2(...)
) and three-dimensional (interp3(...)
) interpolation functions, which are not discussed here.
15.1.2 Cubic Spline Interpolation
A cubic spline is a smooth curve constructed to go through a set of points. The curve between each pair of points is a third-degree polynomial that has the general form:
$$ {x = a_{x0}{t^3} + a_{x1}{t^2} + a_{x2}{t} + a_{x3}} $$$$ {y = a_{y0}{t^3} + a_{y1}{t^2} + a_{y2}{t} + a_{y3}} $$
where t
is a parameter ranging from 0 to 1 between each pair of points. The coefficients are computed so that this provides a smooth curve between pairs of points and a smooth transition between the adjacent curves. Figure 15.4 shows a cubic spline smoothly connecting six points using a total of five different cubic equations.
The function that performs linear interpolation is as follows:
where the vectors x
and y
contain the original data values, and the vector x_new
contains the point(s) for which we want to compute interpolated y_new
values. The x
values should be in ascending order, and while the x_new
values should be within the range of the x
values, this function will attempt to extrapolate outside that range.
The curve in Figure 15.4 was created using the code shown in Listing 15.2.
Figure 15.4: Cubic Spline Interpolation
Style Points 15.1
A good convention to adopt is shown in Figure 15.4:
- Use symbols to plot data points that are real values with no associated information connecting them.
- Draw lines between data points only when there is an analytic relationship that connects the data points.
Here, we use a circle symbol for the raw data to emphasize the original source of the information, and a smooth line for the spline curve to indicate that we are assuming a possibly erroneous but continuous relationship between data points.
15.1.3 Extrapolation
A note of caution about extrapolation - attempting to infer the values of data points outside the range of data provided is problematic at best and usually gives misleading results. Although logically your code may allow you to, you should never do it. The interp1(...) and spline(...) functions behave differently in this respect. As we saw previously, the interp1(...) function refuses to supply results outside the range of the original x
data. If you try, for every new_x
value outside the range of the original x
values, it will return NaN
- not a number.
This is actually quite nice because if you accidentally request interpolated data like this, the plot programs ignore NaN
values. The spline function, however, has no such scruples and allows you to request any x
values you want, using the equation of the closest line segment. So considering Figure 15.4, if you asked for the value at x = -3
, it would use the segment between 0 and 1, which has a violent upswing at the lower end (see Exercise 15.1).
This might be what you want, but it looks odd! Chances are the data are not as accurate as you thought, and you probably need to fit a curve to the data, as explained in the following section.
15.2 Curve Fitting
There are occasions where the data acquisition facilities add some amount of noise to the data. To minimize the effects of the noise, we can smooth the data by computing the coefficients of a polynomial function that best match the data. The choice of the order of the polynomial must be made by the users, depending upon their understanding of the underlying physics that generated the data.
For example, assume that we have a set of data points collected from an experiment. After plotting the data points, we find that they generally fall in a straight line. However, if we were to try to draw a straight line through the points, probably only a couple of the points would fall exactly on the line. A least squares curve fitting method could be used to find the straight line that is the closest to the points, by minimizing the distance from each point to the straight line. Although this line can be considered a "best fit" to the data points, it is possible that none of the points would actually fall on the line of best fit. (Note that this method is different from interpolation, because the lines used in interpolation actually fall on all of the original data points.)
In the following section, we will discuss fitting a straight line to a set of data points, and then we will discuss fitting a polynomial of higher order.
15.2.1 Linear Regression
Figure 15.5: An eyeball estimate of a linear fit
Figure 15.6: Linear Curve Fit
Linear regression is the process that determines the linear equation that is the best fit to a set of data points in terms of minimizing the sum of the squared distances between the line and the data points. To understand this process, first we consider the same set of data values used previously and attempt to "eyeball" a straight line through the data. Assume, for example, that \(y = 20x\) is a good estimate of the curve. Listing 15.3 shows the code to plot the points and this estimate.
Looking at the results in Figure 15.5, it appears that \(y = 20x\) is a reasonable estimate of a line through the points.
We really need the ability to compare the quality of the fit of this line to other possible estimates, so we compute the difference between the actual y value and the value calculated from the estimate:
>> dy = [0, 0, 20, 8, -3, 10]
It turns out that the best way to make this comparison is by the least squares technique, whereby the measure of the quality of the fit is the sum of the squared differences between the actual data points and the linear estimates. This sum can be computed with the following command:
For the above set of data, the value of sum_sq
is 573
. As we will see, MATLAB can automatically produce the best linear fit shown in Figure 15.6 whose sum of squares is 356.82
, a significant improvement over our original guess. This result was achieved by running Exercise 15.2.
15.2.2 Polynomial Regression
Linear regression is a special case of the polynomial regression technique. Recall that a polynomial with one variable can be written by using the following formula:
$$ f(x) = a_0{x^n} + a_1{x^{n-1}} + a_2{x^{n-2}} + a_3{x^{n-3}} + ... a_{n-1}x + a_n $$The degree of a polynomial is equal to the largest value used as an exponent. MATLAB provides a pair of functions to compute the coefficients of the best fit to a set of data and then interpolate on those coefficients to produce the data to plot:
coef = polyfit(x, y, n)
computes the coefficients of the polynomial of degreen
that best matches the givenx
andy
values. The function returns the coefficients,coef
, in descending powers ofx
. For the least squares calculation to work, the length ofx
should be greater thann - 1
. If this is not the case, the coefficients are still computed, but the curve passes through all the data points.new_y = polyval(coef, new_x)
can then be used to interpolate the polynomial defined by these coefficients for thenew_y
value(s) corresponding to anynew_x
value(s).
Note that there is nothing to prevent you from using these coefficients for extrapolation.
Exercise 15.2 illustrates fitting the best straight line to the data used in Section 15.1.1, indicating that the first-order polynomial that best fits our data is as follows:
$$ f(x) = 20.8286x + 3.7169 $$We could interpolate the values of new_x with: new_y = coef(1) * new_x + coef(2)
or we could use the function polyval: new_y = polyfit(coef, new_x)
We can use our new understanding of the polyfit
and polyval
functions to write a program to study the improvement in the curve fit as n
increases, as shown in Listing 15.4.
The results are shown in Figure 15.7. Notice that with six points, the fifth-order fit goes through all the data points.
Figure 15.7: Higher-order polynomial fits
15.2.3 Practical Application
We return briefly to the problem of replacing the blue sky in Chapter 13. The sky we used to replace the gray skies of Vienna has a power line we need to remove. We can use polynomial curve fitting to create an artificial sky with exactly the same color characteristics as the blue sky in the cottage picture, but without the wire. This is possible because each row of the image has so much data that define its color profile that the presence of the wire is a minor amount of "noise." We merely need to process each row of the sky, fit a second-order curve to it, interpolate a new sky row from the parameters, and replace the row in the sky. The code to perform this is shown in Listing 15.5.
Figure 15.8: Updated Sky
Figure 15.9: Updated Picture
Figure 15.8 shows the cottage picture updated with a smooth sky. Notice that the chimneys have been smeared off, but this does not affect the part of the sky needed for the Vienna picture. This synthetic sky is ready to be used in the script to replace the original sky (see Listing 13.1). Figure 15.9 shows the Vienna picture with a clear blue synthetic sky.
15.3 Numerical Integration
Figure 15.10: Integration of \(f(x)\)
The integral of a function \(f(x)\) over the interval \([a, b]\) is defined to be the area under the curve of \(f(x)\) between \(a\) and \(b\), as shown in Figure 15.10. If the value of this integral is \(K\), the notation to represent the integral of \(f(x)\) between \(a\) and \(b\) is as follows:
$$ K = \int\limits_a^b f(x) dx $$For many functions, this integral can be computed analytically. However, for a number of functions, this is not possible, and we require a numerical technique to estimate its value. We look at two different scenarios:
15.3.1 Determination of the Complete Integral
Figure 15.11: Discrete Integration
Two of the most common numerical integration techniques estimate \(f(x)\) either with a set of piecewise linear functions or with a set of piecewise parabolic functions. If we use piecewise linear functions, we can compute the area of the trapezoids that compose the area under the piecewise linear function. This technique is called the trapezoidal rule. If we use piecewise quadratic functions, we can compute and add the areas of these components. This technique is called Simpsons rule.
The Trapezoidal Rule If we represent the area under a curve by trapezoids, as illustrated in Figure 15.11, and if the interval \([a, b]\) is divided into \(n\) equal sections, then the area can be approximated by the following formula:
$$ K_t = {\frac{b - a}{2n}}{(f(x_0) + 2f(x_1) + 2f(x_2) + ... + 2f(x_{n-1} + f(x_n))} $$where the \(x_i\) values represent the end points of the trapezoids and where \(x_0 = a\) and \(x_n = b\). Listing 15.6 shows a function that computes this integral.
Simpsons Rule If the area under a curve is represented by areas under quadratic sections of a curve, and if the interval \([a, b]\) is divided into \(2n\) equal sections, then the area can be approximated by the formula (Simpsons rule):
$$ K_s={\frac{h}{3}}{(f(x_0)+4f(x_1)+2f(x_2)+4f(x_3)+...+2f(x_{2n-2})+4f(x_{2n-1})+f(x_{2n}))} $$
where the \(x_i\) values represent the end points of the sections, \(x_0 = a\) and \(x_{2n} = b\), and \(h = (b-a) / (2n)\). Listing 15.7 shows a function to integrate using Simpsons rule.
15.3.2 Continuous Integration Problems
We now consider a slightly different scenario. If \(f(t)\) is the rate of change of \(F(t)\) defined as \(f(t) = dF(t)/dt\), then given \(f(t)\), we can find the indefinite integral \(F(t)\) according to the following formula:
$$ F(t) = \int\limits_{t_0}^t f(x) dt $$For example, we might be given data that represent the velocity of a sounding rocket, such as is plotted in Figure 15.12. We need to approximate the altitude of the rocket over time by integrating this data.
To perform this kind of integral, the MATLAB language provides the function F = cumsum(f)
that computes the cumulative sum of the vector f
. The result, F
, is a vector of the same length as f
where F(i)
is the sum of f(1:i)
. If the data values, f
, are regularly sampled at a rate Δt
, the integral is found by multiplying cumsum(f)
by the time interval, Δt
. If they are not regularly sampled, you have to compute the cumsum(...)
of the scalar product of f
and the vector of time differences.
To compute a more accurate integral, especially if the samples are not regularly spaced along the independent axis, MATLAB also provides the function cumtrapz(t, f)
where t
is the independent parameter and f
the dependent parameter. The function uses trapezoidal integration to calculate the indefinite integral F(t)
.
Figure 15.12: Velocity of a rocket
Figure 15.13: Rocket velocity and amplitude
Listing 15.8 shows the function that computes this continuous integral, making use of cumsum(...)
.
Figure 15.13 shows the resulting plot. The results displayed in the Command window are:
cumsum height: 1848.5
trapezoidal height: 1811.85
Simpsons Rule height: 1811.14
The continuous integration produces results within 2% of the "accurate" integration techniques.
15.4 Numerical Differentiation
The derivative of a function \(f(x)\) is defined to be a function \(f'(x)\) that is equal to the rate of change of \(f(x)\) with respect to \(x\). The derivative can be expressed as a ratio, with the change in \(f(x)\) indicated by \(df(x)\) and the change in \(x\) indicated by \(dx\), giving us the following:
$$ f'(x) = \frac{df(x)}{dx} $$There are many physical processes for which we want to measure the rate of change of a variable. For example, velocity is the rate of change of position (as in meters per second), and acceleration is the rate of change of velocity (as in meters per second squared).
The derivative \(f'(x)\) can be described graphically as the slope of the function \(f(x)\), which is defined to be the slope of the tangent line to the function at the specified point. Thus, the value of \(f'(x)\) at the point \(a\) is \(f'(a)\), and it is equal to the slope of the tangent line at the point \(a\).
15.4.1 Difference Expressions
In general, numerical differentiation techniques estimate the derivative of a function at a point \(x_k\) by approximating the slope of the tangent line at \(x_k\) using values of the function at points near \(x_k\). The approximation of the slope of the tangent line can be done in several ways, as shown in Figure 15.14.
- Backward Difference: Figure 15.14(a) assumes that the derivative at \(x_k\) is estimated by computing the slope of the line between \(f(k_{x - 1})\) and \(f(x_k)\)
- Forward Difference: Figure 15.14(b) assumes that the derivative at \(x_k\) is estimated by computing the slope of the line between \(f(x_k\) and \(f(x_{k + 1}\)
- Central Difference: Figure 15.14(c) assumes that the derivative at \(x_k\) is estimated by computing the slope of the line between \(f(x_{k-1})\) and \(f(x_{k+1})\)
The quality of all of these types of derivative computations depends on the distance between the points used to estimate the derivative; the estimate of the derivative improves as the distance between the two points decreases.
Figure 15.14: Difference Techniques
15.5 Analytical Operations
We return to the discussion of fitting a polynomial to some raw data in Section 15.2.2. We approximated a polynomial fit with the following expression:
$$ f(x) = a_0{x^n} + a_1{x^{n-1}} + a_2{x^{n-2}} + a_3{x^{n-3}} + ... + a_{n-1}{x} + a_n $$Since this is an analytical expression, even if some or all of the coefficients are complex, we can integrate it to estimate the integral of the raw data and differentiate it to estimate the slope of the raw data.
15.5.1 Analytical Integration
The expression for F(x), the integral of f(x) with respect to x, is given by:
$$ F(x) = a_0{x^{n+1}}/{n+1} + a_1{x^n}/n + a_2{x^{n-1}}/{n-1} + a_3{x^{n-2}}/{n-2} + ... + a_{n-1}{x^2}/2 + a_n{x} + K $$Note that an arbitrary constant, K, is always required for analytical integration representing the starting value F(0).
15.5.2 Analytical Differentiation
The expression for f’(x), the integral of f(x) with respect to x, is given by:
$$ f'(x) = na_0{x^{n-1}} + (n-1)a_1{x^{n-2}} + (n-2)a_2{x^{n-3}} + (n-3)a_3{x^{n-4}} + a_{n-1} $$15.6 Implementation
Figure 15.15: Differentiation
To facilitate differentiation, the MATLAB language defines the diff(...)
function, which computes differences between adjacent values in a vector, generating a new vector with one less value than the original:
dv = diff(V) returns [V(2)-V(1), V(3)-V(2), ..., V(n)-V(n-1)]
An approximate derivative \(dy/dx\) can be computed by using diff(y)./ diff(x)
. Depending on the application, this can be used to compute the forward, backward, or central difference approximation. The solution to the forward difference is shown in Listing 15.9.
The results are shown in Figure 15.15. Since the original data were generated from a series of coefficients, we could also plot the exact value of the slope using the result of Section 15.5.2.
15.7 Engineering Example - Shaping the Synthesizer Notes
Figure 15.16: Piano note time history
As discussed in Chapter 14, we can synthesize the frequency content of an instrument by selecting an appropriate number of coefficients from the energy spectrum, multiplying each by an appropriate sine or cosine wave and summing the results. This gives a time trace with constant amplitude, which is fine for an instrument like a trumpet, but notes played on other instruments like a piano have a very non-linear time profile as shown in Figure 15.16. That same figure has two overlays indicating how to develop the decay profile typical of a piano note. First, we choose a modest number of samples that describe the envelope of the sound (marked by red * symbols). Then, we perform a high-order curve fit on that data and check its accuracy by plotting it as the solid line on the same figure.
To demonstrate the essence of this capability, we begin with Listing 14.6 from Chapter 14, reading the file 'instr_piano.wav' instead of 'instr_tpt.wav.' Now, we insert the code in Listing 15.10 in place of the last two lines of Listing 14.6.
In conclusion, with these two engineering examples, we have shown how the essence of the sound of a musical instrument can be derived from the actual sound of an instrument and captured as a small set of complex amplitudes with their frequency value and an even smaller set of real coefficients of the function that multiplies the amplitude over time.
To construct from these data a real music synthesizer, one need only to detect that a keyboard note has been pressed, determine the required frequency, and play the synthesized note until the key is released. If the synthesizer is equipped to specify that the sustain pedal is depressed, the piano sound should not be cut off, but allowed to fade into silence.
Chapter Summary
In this chapter, we saw the implementations of four common numerical techniques:
- We can estimate data points between given data values using linear
(interp1(...)/interp2(...)/interp3(...))
or spline(...) interpolation - We can smooth noisy data by fitting polynomial curves of suitable order to the raw data
- Given, for example, the velocity of an object over time, we can determine its position by integrating using
cumtrapz(...)
orcumsum(...)
- We can differentiate to generate its acceleration
Self Test
True or False
- All MATLAB functions permit extrapolation beyond the limits of the original independent variable.
- The cubic spline is a series of parametric curves.
- You cannot extrapolate the equations generated by curve fitting.
- You should always match the order of a parametric curve fit to the underlying physics of the data.
- Simpsons rule is more accurate than the trapezoidal rule for integrating a function.
- Numerical differentiation produces a vector that is the same length as the original vector.
Fill in the Blanks
- ___________ is the technique by which we estimate a variable's value between known values.
- Nth-order polynomial regression determines the ____________ of order n that minimize the ______________ between the line and the data points.
- The ___________________makes the slope at x(k) the ______________ of the line between x(k-1) and x(k+1).
- To compute the continuous integral of a data set that is not regularly sampled, you have to compute the _________________ of the _______________ of ________________ and __________________.
- If a(n) ____________ is defined by its polynomial coefficients, you can integrate or differentiate it by _______________ the vector of coefficients.
Programming Projects
- Do the following basic exercises with numerical methods.
- Define two vectors xi and yi of the same length where the xi values are monotonically increasing and the yi values are somehow related to the xi values. Then define a new vector x with closer spacing than xi and extending below and above the range of xi . Find the y values corresponding to the x values in xi by linear interpolation. On the same figure, plot the original yi vs. xi as red circles, and y vs. x as a black line. What do you observe about the visible range of the x values?
- Repeat the exercise in part a using the spline(...) function to interpolate. Explain the difference in the range of the resulting y vs. x plot.
- Use polyfit(...) to find the coefficients of the third-order polynomial that best fits the points represented by vectors xi and yi and then use polyval(...) to evaluate that curve at the x points. As before, plot yi vs. xi as red circles and y vs. x as a black line.
- Approximate the derivative, dxy = dy/dx, for the vectors xi and yi using the diff(...) function and plot yi vs. xi . Since diff(...) reduces the length of the vector by one, you will have to plot dxy vs. either xi(1:end-1), xi(2:end) or compute xm , the mid-points of xi.
- Find yp, the cumulative sum of the elements in dxy, and add this to the plot of part d. With the exception of a constant offset, this curve ought to track the original plot of yi vs. xi.
- Use cumtrapz to find the area under the curve represented by yp vs. xi with the trapezoidal method of approximation. Compare this result to the ending value of the yp curve.
- Write a function, bestFit, that takes in a vector of x-coordinates and
a vector of y-coordinates. Your function should fit a polynomial
curve to the data. The degree of the polynomial should be the
smallest degree polynomial with an average error (the average of
the absolute value of the difference between the new y-coordinates
and the original y-coordinates) less than 2. Your function should
return:
- the vector of coefficients of your polynomial
- the vector of new y-coordinates, which is the polynomial evaluated at the original x-coordinates, and
- the vector of the error magnitudes of your polynomial.
- You have been approached by the Rambling Wreck club to test the performance of the Rambling Wreck. You are provided with the test results of the car for 10 trial runs in the form of a vector d that contains the displacement of the car from the origin at that second. The first element is the displacement at the 0th second, the second element is the displacement at the 1st second, and so on. Write a script called testWreck that displays a plot of the speed of the Rambling Wreck over time during the test run. You could test your script using: d = [0 20 35 50 60 55 30 25 15 5];.
- Engineers often use tabulated data for various calculations. An
important method that any good engineer should be able to apply
to tabulated data is interpolation. In thermodynamics, the properties
of a gas can be known when two of its properties have been fixed.
You are required to come up with a continuous function being given
the tabulated data below measured where the pressure is 0.10 MPa:
Write a function called lookup that consumes three parameters: the above table in an array, a number value, and a logical control value getTemp. If getTemp is true, the function interpolates the value as a specific volume and returns the corresponding temperature. Otherwise, it interpolates the value as a temperature and returns the corresponding specific volume.Temperature (deg C) Specific Volume (cu meters/Kg) 99.63 1.694 100 1.696 120 1.793 160 1.984 200 2.172 240 2.359 280 2.546 320 2.732 360 2.917 400 3.103 440 3.288 500 3.565
Your function must not extrapolate the data (i.e., it should return NaN if the user tries to obtain values outside the range of the table values). - Mathematically speaking, a critical point occurs when the derivative
of a function equals zero. It is possible that a local minimum or a
local maximum occurs at a critical point. A local minimum is a point
where the function's value to the left and right of it is larger, and a
local maximum is a point where the function's value to the left and
right of it is smaller. You are going to write a function that finds the
local minimum and maximum points of a set of data. Call the
function find_points . It should take in vectors of x and y values and
return two vectors. The first vector should contain the x values
where the minimum points occur, while the second vector should
contain the x values where the maximum points occur.
For example:
If x=linspace(-8,2,1000) and y=x.^2+6*x+3;
[min_p max_p]=find_points(x,y) should return
min_p = -3, max_p = []
If x=linspace(-5,5,1000) and y=x.^3-12*x;
[min_p max_p]=find_points(x,y) should return:
min_p = 2, max_p = -2
You should plot x and y to confirm the answers.. - Now that we used the derivative it only makes sense that you are
going to write a function that finds integrals. Call your function
find_integral . Your function should take in a vector of x and y
values as Problem 15.5 does and should plot the integral and also
return the total area under the function. You are to use the
trapezoidal rule to find the integrals.
For example:
If x=linspace(0,5,1000); and y=2*x+5;
find_integral(x,y) should return 50.0000


SPPLOT v0.4
A tool for helping you analyze pilot data (data without replicates).
HOME
Analyze
Plot
Interpretting
Citing
Troubleshooting
{% block body %}{% endblock %}


{{template config_path="design/email/header_template"}}
|
{{trans "%name," name=$customer_data.customer_name}} |
|
{{trans "We have received a request to cancel the erasure of the information associated with your account at %store_name." store_name=$store.getFrontendName()}} |
|
{{trans 'If you have not authorized this action, please contact us immediately at %store_email' store_email=$store_email |raw}}{{depend store_phone}} {{trans 'or call us at %store_phone' store_phone=$store_phone |raw}}{{/depend}}. |


VTBuilder
back to index
View Menu Commands
- Current Layer Visible
- Toggle the visibility of the current layer. When a layer is hidden
(not visible), it is shown in the Layer list in
grey italic. This is useful to hide layers, for easier
editing or faster redraw.
- Move Layer Up / Move Layer Down
- Changes the order of the current layer in the Layer list, which also
affects the order in which it is drawn.
- Zoom In / Out
- Zooms in/out by about 40%.
- Zoom All
- Centers your view on the currently loaded terrains (but doesn't yet
change the level of Zoom)
- Zoom to Full Res (1:1)
- If the current terrain is grid data (Elevation or Image), sets the view
to match (1 screen pixel per heixel, or 1 screen pixel per image pixel)
- Zoom to Area Tool
- Moves your view to the area indicated by the Area Tool.
- Toolbar
- Toggles display of the Toolbar.
- Layers
- Toggles display of the Layer list.
- Magnifier
- Allows you to zoom the view into a specified rectangle.
- Pan
- Allows you to pan the view by dragging the first mouse button.
You can also drag with the middle mouse button, if you have one, to pan
at any time.
- Obtain Distance
- Click and drag to measure horizontal distance and offset between any
two points.
- Area Tool
- Allows you to set the area for the Area Tool.
- World Map
- Toggles the display of a world map (shoreline vectors). The data
is expected to be in a folder called "WorldMap" below the program
folder. VTBuilder will attempt to convert the map to your current
projection, which may not produce good results for all projections.
- Show UTM Boundaries
- If you are using data in a geographic projection, this will toggle the
display of the boundaries of the UTM coordinate zones.
- Elevation Profile
- Using the same dialog as the Distance Tool, you can
draw lines or paths and the Elevation Profile
dialog will show you the profile along the line you have drawn.
- Scale Bar
- Toggle display of the Scale Bar in the view, which gives a more conventional
display of scale than the Status Bar.
- Options
- Show the View Options dialog.
View Options Dialog
- Status Bar
- Show minutes and seconds
- If you are using data in a geographic projection, this will toggle
the display of minutes and seconds of latitude-longitude.
- Elevation
- Show outline only
- Turn this on to show each elevation layer as a simple box, which
saves a lot of memory and time.
- Artificial color by elevation value
- Elevation is rendered using a mapping from height value to color.
- Rendering options...
- Shows the Rendering Options
dialog, to control how elevations are rendered and shaded.
- Hide Unknown Areas
- Area of the elevation layer will be not drawn at all (transparent),
rather than shown in red.
- Show Full Layer Pathnames
- Toggles the display is the entire file path for each layer, in the Layers
View. It can be useful to turn this off when your files are nested
deeply on your filesystem.


Getting started¶
In this guide, we give you a walkthrough to understand the basic operations of BDP. After you have installed BD-Processor (BDP) and registered the first account as the system root. You see the page shown as the following figure.
See also
For more information about the ui layout, please see Basic UI layout. Most of the actions can be accessed via the left navigation panel. This panel may be hided for small screen and you can toggle it by click the top-left button.
Let’s start by setting your display name.
1. Set your display name¶
Click the “User profile” link on the left navigation button, the user profile page shows your information. Click the pencil icon to edit your display name. Remember to click the save icon.
2. Configure the system modules¶
BDP provides web pages for users to manage required system modules such as task adapters or custom filter functions. The first step is to make sure that these modules are up to date after setting up BDP and registering the first account.
Click the System Configs link on the left navigation panel to view the system configuation page. As shown in the following figure, you may click the pre-installed adapters, such as the @big-data-processor/task-adapter-docker and the @big-data-processor/task-adpater-local., to expand detailed information.
These adapters were published on the npm (node package manager). Click the “Check Update” button in the expanded details to check if there are newer version published. After updating these adapters, you may see the following figure.
Note
In this page, you could install additional task adapters for BDP to consume various computing resources (including cloud computing).
3. Install a package¶
After we have configured/updated these task adapters, we can then install packages by clicking the Install Packages link on the left navigation panel. We have provided a demo package list that were published on the Google Sheet with the id 1sUQT7dUrQfjqXVC-AmhmQzt8OiJCCvDqwCf1APysK0g. As shown in the following figure, this package list contains only three packages: a-demo-package-demo.1, bdp-development-kit-demo.1, and bdp-mirna-profiler-0.3.1.
Every developer can currently publish his/her package list on Google Sheet. By giving the sheet id, BDP server downloads the metadata and users can install those packages by just mouse clicking. In a future release, package lists can also be published via Github or Githlab. The package format is a portable zip file and can also be directly uploaded and installed via this page.
In this getting-started guide, we install bdp-development-kit-demo.1 by clicking a series of buttons. First, click the View and then the Add the package button to select one package to install. Click the Run install button to download and extract the package zip file. Then, click the Next button and proceed by click the Import tasks button. Finally, we click the View installed packages to see what we just installed as shown in the following figure.
This Package management page contains all installed packages and can be accessed by clicking the Manage Packages link on the left navigation panel. Since we just installed the bdp-development-kit-demo.1 package, this package is pre-selected. From top to bottom, this package page contains several sections: 1) package information, 2) package files, 3) entry page settings, and 4) tasks of this package. You may click these sections to expand details such as task definitions, package files, or runtime settings. Everything modified in this package takes effect immediately. This is handy when defining tasks or testing workflows.
It is worth noting that tasks of installed packages cannot be run directly. We MUST create a Project and assign required packages in this package. Then, these tasks of selected packages can be selected to run.
Now, let’s create our first project.
4. Create the First Project¶
By clicking the Create a Project link on the left navigation panel, we can see a project creation page as the following figure.
We have to fill the project name to create the project. The project description is optional and can be edited latter. Then, we click the Click to add a package button and a dialog pops-up as follows.
After choosing the bdp-development-kit-demo.1 package in this created project, click the Create button to create the project. The project information page is displayed as follows.
You may edit the project information or add/delete packages in this package by click the Edit project info button on the right-side menu (see above figure).
5. Import files and execute a task¶
Next, lets run some tasks defined in the bdp-development-kit package. On the Quick Start seciton of the left navigation panel, you can see the two links: Import files and Execute tasks. With the former Import files link, You may create DataFile record by uploading files, creating empty folders, and import files/folders that already existed on the server.
5.1 Choose a task¶
In this getting-started guide, we use the latter Execute tasks link and select a task first. As shown in the following figure, there are four steps to execute a Task/Workflow: 1) choose a task, 2) set parameters, 3) fill result information, 4) confirm to submit the task.
Here, select the Jupyter Notebook example first by click the task card. You may also select other tasks in this package later. Then, click the Next button to proceed to step 2.
5.2 Set parameters¶
As shown in the above figure, this Jupyter Notebook task requires one parameter of a DataFile record with one Folder tag. This task was defined to link the DataFile record, which is a folder, to the Jupyter Notebook. We don’t have one valid DataFile record, so we can create one DataFile record by clicking the button under the parameter name The notebook folder. Then, a popup modal window will be shown as the following figure. The content of the popup is the same as the page from the Import file link. Since the specification of each parameter is known, some required information, such as the tags and the file format, will be filled in this popup window.
In this case, the required DataFile record is a folder (the “Folder” will be tagged for all folders by BDP system), so a folder is expected to be created. The BDP system used the DataFile tags to prevent user from selecting wrong files. The tag format is a-z, 0-9, hypen and underline. Multiple tags can be assigned to one DataFile records. Also, when building workflows, tags of output DataFile records must be satisfied to be assigned as inputs of latter tasks. You may see tags as a foolproof.
As shown in the following figure, We filled the name of “My workspace” for the created Folder record and added an additional “workspace” tag. Then, click the Add an empty folder button to create the folder. Newly created DataFile records will be listed below. You may edit the metadata information for these records and remember to click the button. Also, you may create multiple DataFile records via this popup window.
Once the desired record is created, click the Close button and you should see the newly created DataFile record. Click the DataFile record to set as the parameter, and click the Check my parameters button to proceed to the step 3.
5.3 Specify Result information¶
Each task execution generates one Result record. The step 3 is to specify the desired Result information. As shown in the following figure, you may specify the prefix/suffix for the Result name and the description for the Result record.
In addition, if the task has output DataFile records, we can specify the metadata information for each of the output DataFile records. Since the Jupyter Notebook task was defined to have no outputs, we only need to specify the metadata for the Result record. For convenience, the Result name is pre-specified and you may modify for your preference. Once all set, click the Set result information button to the step 4.
5.4 Confirm and submit the task¶
The step 4 shows you a preview for the Result record as follows.
After checking the I have checked my result settings checkbox, the below Save and Run button is able to be clicked. That is all the task execution procedure with BDP’s built-in page.
Note that developers can design customized web pages for users to further ease the pain to specify parameters.
6. View a result¶
After click the Save and Run button, you will be redirected to a Result information page which corresponds to the running Task. A Result information page is shown as follows.
This page displays all the provenence of the task run, including the input arguments, running time, and logs. Since we executed the Jupyter Notebook task and it was defined to provide a web service through BDP proxy, you will see a section of Available Proxy Pages in the Result information. You may click the icon to retrieve updates. It should be soon that there is one available proxy page. The link button looks as follows.
Note that sometimes we have to wait for the web services to start, or wait for the docker to pull the image. You may often need to wait until you see the logs indicating started web services. In this Jupyter Notebook case, we need to wait until seeing the following content to click the proxy page.
Finally, after click the proxy page link, a Jupyter Notebook is ready to use.
Note
The proxy page is run in the Page component. You may click the or to make the Page component displayed as full page. All BDP user interface is then hidden behind.
From the user perspective, this getting-started guide walkthrough the steps from configuring systems, installing packages, creating projects, executing tasks, and viewing results. You might want to try other packages.
If you installed the bdp-mirna-profiler package and included this package into a project, you may also view our customized pages as follows.
With BDP, workflow developers can make more friendly web interface for users, and the user experience can be just like using a traditional web service applications!