I live in a j's podcast for Monday.
Most wonderful show is keeping up with the Jones is a j Jones with the green eyes and the new haircut.
What is going on baby?
We are back baby.
I'm not sure if I can remember how to do this.
I know I was having trouble just remembering to turn my phone on airplane mode and that I had to put on earphones.
I'm like, how does this work in logic again?
We had people come over this week, didn't we, that we're like, "Oh, is that where you record this?"
In that little room, it was very funny. I was like, "Yep."
In a little room with no air conditioning, well, there is air conditioning, but there's like one vent,
and there's like three panes of floor to ceiling windows, so it's like a heat box.
Yeah. On hot sunny days, we're like, "Hey, we're suffering to bring in this podcast.
It's our joy, though."
So since the last time we spoke, I've been to Scotland and back again.
You have.
I am a year older.
You are and my voice sounds like Barry White.
It does.
Do you want to sing something for us?
No, I think it's time for a massive recap on where we've been and what we're doing.
I think we need to do one of those things like the previously on episodes of lost only.
It's on episodes of keeping up with the Joneses.
So basically at the end of May, I got some sad news that my father had passed away.
Wow, what was the end of May?
It was right at the end of May, which is crazy because it's now July.
Yeah.
So bye-bye June.
Yeah, it feels like that.
Yeah, he got eaten. It was a bit of a shock because he was on vacation in Croatia.
And I won't retell the story because it is available on earlier episodes,
but basically he woke up in the morning.
I thought he had food poisoning and then realized, no, I don't think it's food poisoning.
And so we text him, said, well, you should probably go to the GP.
And later that night he passed away.
And it turns out what we now know is he had a heart attack
and was wandering around for 24 hours with the effects of that heart attack.
And the cardiologist said that type of heart attack
normally kills people within a matter of seconds.
So the fact that your dad lived for another 24 hours is quite remarkable.
And his symptoms of like feeling run down, his lungs, just filling up with fluid.
I don't know if this is appropriate to talk about, but anyway, it was, it was interesting.
It's the wrong word, but as soon as we heard that he was in the hospital, not knowing that he had passed away,
my sister and her husband who lived in Scotland, they jumped on a plane, flute Croatia.

But they, it was, interesting is the wrong word,
but maybe it was closure.
They got to speak to all the hotel staff
and the hospital staff and the cardiologist
and they pieced together the timeline
that for us was completely missing.
Plus they got into his iPad and his iPhone
and saw all the last photos that he'd taken.
And yeah, it was, you know, when somebody dies,
that sucks, it really does.
But it's weird how knowing more information
about how they died helps make it more approachable.
- Yeah, 'cause then you can process something
'cause you have information.
- Yeah, 'cause we were over here not knowing a thing.
And God bless my sister and brother-in-law.
They flew over.
They started out all the things you would never think about.
Like, oh, we need a death certificate in English,
not just Croatian, and oh, we need his body flown back.
And meanwhile, while they were doing all that
and getting his belongings, my elder sister,
she was starting at the funeral,
which she couldn't do because the body wasn't back.
So we couldn't speak to the undertaker.

You have to go petition the Scottish office and say,
hey, this is so-and-so and he died.
And so all that means there was a whole load of red tape,
which meant my sister and I who live in America,
we could do nothing.
We couldn't book flights.
We couldn't answer questions about when the funeral would be,
We didn't have any of the answers that we have now.
So it was all it was all a total blur.
And I think when my mom passed away about two years ago, we at least knew it was coming.
She she died of cancer and she'd been given a prognosis of, you know, not very long life.
So we knew it was coming, but with that it was it was out with the blue.
Yeah. Anyway, the shocking.
The reason you haven't heard from us is I got on a plane flew to Scotland, was there for 10 days.
With everything going on, I didn't fancy trying to coordinate you in Nashville and me and Dundee, trying to do a podcast.
No.
And then last week, we were supposed to have one, but I forgot about this thing called jet lag, which I thought I was okay till we got to Sunday evening when we record the podcast and it had well and truly kicked my butt.
Yes.

This episode's more like therapy for Alan.
So lots of Alan, but I like it, the sound of your voice.
So it works for me.
You get to listen to my cathartic process of retail,
but we haven't even had time to sit down and talk about it.
No, we still haven't.
And you've been home for--
Oh, we can have.
Yeah, almost two weeks.
We'll do that at some point.
Yeah.
So the funeral--
we did something at the grave side.
We did something at the church, and then we did something
at the hotel.
The grave side is weird because you show up,
And there's all these people that you feel some sense of, like you should connect with them.
But all I want to do is hide from them, not them.
I'm like, I'm about to bring my dad.
I don't know what protocol is here.
Right.
And we all arrived in different cars.
So we weren't sure like, do we walk up to the plot?
Do we wait for his body?
Who knows?
But here was the amazing thing that I didn't, I didn't foresee.
I was genuinely touched by everyone who came to be further.
There was a bunch of people I didn't know from my dad's work or from his church circles
that I even lived in the UK in 14 or 15 years.
So I didn't recognize some people, but lots of people came for me and that was super touching.
And by that I mean there's friends that I've had in Scotland, some of whom had never met
my father and yet they took a day out of work or a half day off of work, drove a considerable
distance just to be there.
That meant a lot.
Yeah, that's super sweet.
- Yeah, it was nice to stand around and look up
and see people I knew and I was really, really touched
by that.
- I actually got some text messages while you were giving
your eulogy of just pictures of you speaking
and whatnot and just saying that you've done a lovely job.
- Well, I haven't got the eulogy yet.
This is still me at the grave side.
Here's the other thing, I was like,
nobody ever told me about protocol as a funerals.
So I took lots of photos 'cause I just thought,
I didn't take any photos with my mom.
Yeah.

So, rather morbidly, perhaps I took photos of the coffin,
I took photos of the coffin in the ground.
I just thought I need something.
Right.
And I also wanted to share it with you
'cause you couldn't be there,
you were watching the kids and so I took photos.
So I'll get to see those whenever we get our date in.
Yeah.
Sure.
Hey, what are you doing tonight?
Hey, show me photos of your father's coffin.
All right, baby.
(laughing)
But I must have looked weird
'cause to my knowledge, nobody else was taking photos.
But I thought, you know what?
- You're just documenting things for us.
- I'm documenting it.
- Yeah, thank you.
- It was my dad, so.
So yeah, that was that.
Then went to the church service
and gave the eulogy.
I basically speak on behalf of my sisters and I,
and we talk about my dad and--
- Which you did for your mom as well.
- Which I did for my mom.
My mom's was really easy, I think probably,
because I had a year to think about it.
And we went over, the doctor said, "You need to call a family.
She's not going to last much more than 10 days."
And then she lasted like several months.

I got to speak to her.
What would you like me to say?
What are the things you don't want me to say?
So you were thinking about it.
Well, by the time I booked the flights to come over
and see Dad, I had like two nights to think about it.
Because now it was real.
And let's not forget that life doesn't pause for you
when tragedy happens.
So I literally got on the plane and thought,
this is a red eye fight, I need to sleep.
And so I landed and thought,
oh, now I only have a day to write the eulogy.
And of course I've been thinking a little bit about it,
but part of me was probably just putting it off
'cause I didn't wanna think about it.
But it gave the eulogy and you can listen to it.
If you haven't listened to it,
I'll put a link to it in the show notes.
If that's the type of thing you would like to listen to.
But I was shocked at what I got choked up about.

You're honoring your father.
It wasn't the part that I thought I would get choked up.
But basically in the eulogy, I say,
to talk about my father without talking about two other people
would be a disservice to who my father was.

You know, there was just so much poetic,
emotional punch in that.
But what moved me was when I started talking about my dad's
relationship with Jesus.
And I just couldn't keep it together.
I actually edited the eulogy because in real life,
there were large, long gaps with lots of sniffs.
- I didn't know that.
I heard the eulogy, obviously,
you posted on Facebook. But it's mostly you looking at pictures, like you're looking at
pictures while you're talking. I had no idea you'd edit it. It's sneaky.
Well, nobody wants to listen to somebody go, "See, how would you like 10 minutes of that?"
Well, it's real. It's real, but it's the equivalent of Photoshop for audio. So I shrunk that down.
 I'm thinking, no.
Sausage rolls. That sounds disgusting. You know what? I'm going to have to rebuke you right now.
A Scottish sausage roll is a thing of beauty. Is it haggis? No, it's just plain old pork that's
cold. It doesn't sound that great. Sorry, babe.  I'll admit this sounds terrible, but it was great. And then they had
like strawberry tarts. And anyway, I just thought it's a shame that somebody has to die before we
can go to a hotel and stuff our faces with food. But right. Again, that was good. And here's a
thing that I didn't realize. I always knew what my dad did. He was a research scientist, a plant
virologist. But that literally was the sum total of my knowledge. So his boss, his head of department
came and talked about my dad and then all his colleagues came up to me and just said,
"Your dad was a rock star."
Your dad was a literal genius in our field.
Everyone knew he was...
He was the plant virology rock star.
Yeah.
Yeah.
I think everybody knew he was a Hidden McJagger somewhere.
Yeah.
But anyway, that was...
Yeah, that was...
And that all happens in one day.
And you're slightly jet lagged.
Yeah.
Yeah, it's a full day, isn't it?
And then it was weird because you're on another time zone.
Yes.
So by the time you wake up, I've lived half my day.
So that was just weird.
Yeah, I don't enjoy being apart from you in 10 days when I think that's the longest we've ever been apart.
Really?
Yeah.
I think so, because I think for your mom's funeral, you'd only gone for eight days.
And before that, we had only been apart for four days.
I love that you keep hold of information like this.
In 2007.
Yeah, I don't remember 2007.
It was strange.
So that was the funeral.
But what was the rest of your time in Scotland, like other than many trips to
pizza express?
Come on, confess.
I did many trips to pizza express.
It's one of the things I miss greatly and marshal Spencer's the food
Emporium where I went and visited.
Um, it was, you know, it was, it was, it was so redemptive.
Good. It was weird because so many memories got triggered by things I didn't know or anticipate things like the fabrics off and I'd get into bed.
And the sheets smell like they did is a little boy, same fabrics after my mother mums evidently used for like 40 years.
And I just like, oh, I remember this.
You know, I grew up in that house as a young boy. Yeah. And so everything looked massive. Well, now I'm a hulking, hulking Scottish man.
"Oh, well now, now let's just say my frame is slightly different."
So I was like, "Do I have to turn sideways to fit through these doors?"
The ceilings are really low and just all these sorts of things.
I loved being with my sisters. I think I said in the last podcast, I had this
somewhat romantic notion of the four of us sitting around, remembering things and laughing.
And it really was like that. It was wonderful to have three of my sisters, all four of us together.
and just laughing, all being on the same page really,
about stuff that we found.
Interesting things that my mom held onto,
'cause my blessing my father clearly neither had
the emotional or physical energy to clean out my mom's stuff
when she passed on.
- Right.
- We didn't anticipate that.
So cleaning out my mom's stuff and cleaning out my dad's stuff,
so many memories.
I'll tell you one of my favorite things, babe,
was we found over 3,000 slides.
- Wow.
- Remember old like 35 millimeter slides.
Yeah. And of course, we never seen them or if we had, it was years and years ago,
because my dad would have had to get a slide projector down.
So we found tons of them and God bless my nephews.
They scanned in over 3000 slides.
Wow, that's amazing.
And I got to browse through them and there are all these photos of me when I lived
in New Zealand, our whole family lived in New Zealand when I was, I don't know,
I was born 74.
So three, I was three years old and a Cinefilm.
Do you remember Cinefilm? No.
Cine Film was like silent movie, that sounds terrible.
It was like the first handheld video camera. It didn't record sound.
It recorded it on to like moving negative film strips.
And then you needed a projector to display it.
Well, my dad had got that transferred to VHS and I in turn brought over some
nerdy equipment to import VHS. So watching these slides from distant memories,
It was just it was wonderful and watching me at the same age MJ is now with my father who is
probably the same age as I am now that was weird that was wow that was trippy but but wonderful so
imported hundreds of videos came home with 20,000 photos and 2,000 videos on a hard drive wow
many many of which were previously unseen to me so it's a real really surreal but so
I spent lots of time with my family, lots of time on my own with the Lord just walking
around thanking him for my upbringing, thanking him for scondi.
It was really weird leaving, thinking in all likelihood, I'm never coming back here.
You mean to Dundee?
Yeah, well certainly the house we're going to sell the house.
So this anchor, which I'd never thought of is now no longer there.
Right.
So in previous years where I've left by my choice, I no longer have an option to return
to what was previously there and perhaps I took for granted. So that was weird.
Yeah, that makes sense though.
Can I tell you what my favorite thing was? Yeah.
Sorry, listeners, as you indulge my therapy session here, I'm in my old bedroom, which is
now my father's office. And I'm not a particularly sentimental person. So my sisters have been very,
very congruent. Do you want any dead handkerchiefs or do you want his belt or his cufflinks or any
of his books or his Bible and you know there's nothing that I'm being attached to really,
nothing that I'm like, "Ah, no, I don't think I want those." But I'm sitting one night and I look
up and I haven't seen this before but there's our family crest. Now I say our family crest but
Jones is a very, very common name and apparently my father or my mother probably more likely had
paid for, you know, the Jones family crest, the meaning, the historical meaning where it all came
from. And as I'm reading, you know, this blurb about Jones, it comes along and it says this
phrase, Jones means Jehovah has favored. Wow. And I'm, I'm just kind of left speechless because
the whole topic of favor was something that the Lord had to drag me into. I was not raised with
an understanding of the favor of God.
No concept of the delight of the Lord, no concept of favor or honor, any of those things.
And so is the Lord who kind of ambushed me and was like, no, no, you need to understand,
this is what I have paid for.
This is something you're not receiving.
And if I'm honest, the whole topic of exploring favor was a part of my relationship with the
Lord that I don't think my parents had a grid for.
Sure.
one day calling my mom and telling her about we'd just been upgraded to first class. And I was like,
"Ah, you know, we used to fly a ton, so to be upgraded was amazing." And my mom, you know, there
was a, she didn't know what to do and she didn't sound happy about it. And I was like,
"What button is this pushing? Like this is a weird thing." She thought it was luck, which is
strange because she didn't like thinking about luck. But she didn't have a concept that there
would be a space that God would be kind to you in a material sense. All the kindness of God was
wrapped up in spiritual terms, which is to be sure. But anyway, here's me on the one hand,
journeying with the Lord, discovering all this stuff about the kindness of God, the graciousness
of God, the favor of God is something that's become very, very real to me. And in the middle of
grief in the middle of losing my mom and now losing my dad and you know just packing up all my
parents stuff and and either giving it to charity stores or or taking it to the trash.
In the middle of this I discover that my name means God has favored and it was such a tender
moment really from the Lord. I love that. Yeah it's one of the things I brought home.
Not coincidentally, I spoke on favor this week at M&A,
'cause all this is with the four from my head.
So if you haven't heard any teaching on favor,
if that's peak your interest,
I'll put a link in the show notes to it.
All about favor.
So that's enough from Alan, AJ.
How was your time not podcasting?
You were basically left at home with the kids
and did my job and your job at Grey Center
and parent of the kids.
So talk to me about what's happened to you
in the last three weeks.
It was actually, it was pretty good.
The kids did great pretty much the only crying was at night.
Just they'd go to bed and wish you were there
to tuck them in or whatever,
but I kind of just kept them as busy as I could
during the day so that they managed to make it through
without really feeling your absence at every moment,
if that makes sense.
So I tried to take them on some sort of activity every day,
which of course on the days that I'm working,
and it was pretty tiring at night.
But I was really blessed in that we have, you know,
Kate who lives with us and Cindy who came over
for a couple of days.
And so it was kind of a team effort at, you know,
Marshley and Troops as it were.
- Takes a village.
- It really does.
And then, you know, some people brought us food
and stuff like that.
So it wasn't as hard as it could have been
by any stretch of the imagination.
And the kids did real well.
- And you did real well.
- Yeah.
- You were amazing.
Thank you. I came home and you were in one piece. I loved it. Yeah, I am in one piece.
I'm trying to think what I did while you're gone. I'm working on a new course for Grey
Center, so I did some work on that. You painted the kitchen. I painted the kitchen while you
were gone. Your garden is full and overflow. It is, but I've just discovered, first of
all, I thought I had two massive zucchini plants. And then it became clear that one of
was definitely not a zucchini plant, but growing some sort of squash. And so we thought it was
probably a butternut squash because the person who had given it to me had said it's probably
butternut.
Okay, not to be a total gardening luddite here, but what is the point of an ornamental vegetable?
Yeah, I don't know. Apparently we can't eat them. And if it is an ornamental one, apparently there's
two, well, there's several different kinds of white pumpkin, but it looks like it's the tiny little
ornamental ones that you just use as decorations or paint or on Christmas trees.
Yeah, like what do they decorate?
Like for fall decorations, people paint them gold or paint them silver or, you know, use them as
Table center pieces and pull them up and plant a taco tree.
Well, I was frustrated and I thought I'm just going to dig it up because it's taking up space for my cucumbers anyway, and if I can't eat it, then I don't want it.
But I did think the kids would probably enjoy painting them or doing something with them.

Yes, maybe they could have like a pet decorative pumpkin.
Yes, maybe they could have a pet decorative pumpkin.
-Ego guys, Merry Christmas.
-But now I've discovered that it is a vining plant
as apparently is the cucumber,
so I have to build two trellises to help it grow.
-I don't know what trellises.
-It's like a grid thing that you make out of wood.
Well, I could buy one, but it'd be so much cheaper
to just make it and I like to build stuff.
-Is it like a ladder?
-Yeah, kind of like that.
-All right.
-So that they can kind of grow and not be on top of each other
and still get started and that kind of stuff.
So cool.
So you gardened.
I got into the kitchen.
I painted a kitchen and you did sing.
Yep.
I also managed to catch hundreds of Japanese beetles.
So, you know, it's been a full week.
You also managed to behind the scenes plan.
My birthday surprise.
I did.
I did.
And that was really super fun.
I posted something on Facebook.
I just thought, you know what?
This has been a pretty intense month for you.
and I wanted you to feel like super celebrated on your birthday.
And so I just posted something saying, hey, I'd love to get Allen a drone.
If anybody wants to join me, kind of, you know, let me know.
And this is how you would give.
And I had to figure out how they would go to get me a drone.
I wanted to get you a drone.
And how did you know I wanted to draw?
Because you talked about it a lot.
So I sort of pay attention to all the stuff I talk about on any given day.
But then you'll change your mind fairly quickly.
And so I just sort of watched for what was the reoccurring, you know,
want of your heart over the last couple of months and you just kept
watching videos about what it did and all that kind of stuff.
And then when the Michaela got a drone, you were all like, the drone.
But by that time I'd already started the Facebook thing.
And so I was pretty firm that I was getting a drone.
Okay.
Um, well, you did well.
Thank you.
Because I did want a drone.
Well, I just posted something who did well was our incredible friends and community that all sort
of gathered around and gave an enormous amount of money.
An enormous amount of money. Can I tell a story?
Yeah.
So, you know, birthdays have been a weird thing, historical. You've totally redeemed birthdays
because you're so good at it. On my first birthday with you, my thirtieth birthday,
you blew me out of the water. I'd never been celebrated like that. You were astonishing. So
you really redeemed birthdays. Historically, you really redeemed birthdays for me. So
you used to be, "What do you want to do this year?" And I was like, "You know what? I'd love to have
a couple of friends over. Just keep it really small and we'll just eat tacos because what better
way to celebrate than Mexican food." And so that's what I thought was happening. And you were like,
"Hey, just because you're away. Can I just try and plan things?" Wednesday, the actual day of your
your birthday. We're going to go with Jeff and Becky. They're only in town for one day
really before they head out again. So can we do dinner with them? I'm like, yeah, absolutely.
Thursday, let's do our family dinner. I'm like, "Grange, I'm in Friday. We'll just have
people over." So I'm like, "Three-day celebration. That's perfect." And so I got off the plane
and we cleared it with my birthday. You were very, very sweet.  So here's some money just from the family, just from the kids
and for me and just think about what you want.
So I'm left going, oh, what am I going to buy?
And you know, my producer just goes into skyrocket.
So we got for dinner with Jeff and Becky,
have a great night with them.
They were traveling California, Jeff's now after Africa.
And so, you know, we got a time to connect.

And as soon as I walk in, I can see three wrapped presents.
Yeah, which are not drone shaped.
So, so here's the thing.
Cindy was my epic partner in crime.
So.
And she's a good partner in crime.
She is.
She is great.
First of all, she loves giving gifts and she's really good at surprises.
So it's really fun to work with her because we were like the whole time you're
gone, but also for the last two weeks, we've been texting every day about organizing
things and then her saying, Hey, this arrived today and she's like a staff gift
to them didn't you?
Yeah, she's awesome.
So we had a plan and our plan kept having to shift with, you know,
"Oh, we're actually going to do this now. No, we're going to do that." So she was extremely
flexible and ready to go.
So I came home thinking, "That was nice to be with Jeff and Becky and I walk in and there's Cindy
grinning like a Cheshire cat on ecstasy." That's a great way of putting it.
All right, what's happening? And there's three gifts. And I can tell instantly, just by the shape
of the box, I know exactly what's in them before I even open up.
That's so funny.
I just knew that's a subwoofer and those two are rear speakers for my Sonos setup. And I'll put
link in the show notes to buy what sauna says because it'll change your life. And so I'm just
giddy.  Yeah. Yeah. So I open up
the Shandsmith's card. I open up this card. And I read one by one, there's over 100 people in our
community who have given an ad. I don't know anything. All I know is that's a subwoofer and some
speakers. And I know how much that costs. And really, when you say 100 people in our community,
you're talking about like the larger community because there's people that gave from Scotland
and Canada and New Zealand, I mean just all over the place.
It was astonishing. And when I say 100 people, that was 100, over 100 lines.
And so that includes couples. And so I'm still working through my thank you letters.
So I know how much subwoofer costs. I know how much the Sally speaker of cost,
because you know, I've been dreaming and budging for years and then I just there's no way that I
could in all honesty budget for those things.
So I know how much they cost.
And our subwoofer died what, four years ago?
Right.
Yeah.
And so I'm undone.
I'm just thinking, oh my gosh, and the fact
that it's this specific brand and you knew all these--
it's hitting all the little chat boxes of my heart.
And I'm reading all these names.
Some people from years and years ago
that I've had friendships with.
Some people, like you said, here in Nashville,
all over the world.
And I'm just undone.
I'm undone by the effort that it must
of taking to coordinate that in secret, I'm undone by the fact I haven't noticed, you
know, I haven't even been aware. You said that there's people coming up to your church
and giving you cash in front of me. And for whatever reason, I was blinded by the Lord.
I didn't know a thing. Well, you know, it, I mean, both times that
that happened, you were looking in the opposite direction. But I was literally like, I mean,
taking things and just shoving them in my pockets, hoping I'd gotten it deep enough in
my pocket, you know, kind of thing.
You should have a pretty good radar for when things are going on, you know, suspiciously,
- Yeah. - Nothing.
And so, you know, I open up this,
and I'm just thinking, this is so awesome.

It's gonna be amazing.

So I just love any technology.
I'm gonna wire all up. - You see nerd, yeah.
- I'm gonna tune in, and it's gonna be amazing.
So I think I'm literally overwhelmed at this point.
Like that is hugely abundant, hugely generous.
And I'm just like, oh my gosh, it's believable.

And I think it's probably some sort of little trinket
from Cindy, you know, it's like her little personal gift.
Oh, and I want to get you this.
And she is very sentimental.
Like we're like opposite ends of the spectrum.
So I'm thinking now she's probably got me like,
I don't know, like a pottery toad or something
or a thimble, like a keep forever.
- Okay.
- And that's what I'm thinking is, you know,
and it's wrapped up in a weighty much tissue paper.
And so I open up and it's like, what's of cash?
And I'm like, what?
And so there's a couple of twenties and then there's hundreds and there's more hundreds
and there's more and I'm like, I don't know what to do.
So I just make it rain.
I just thought, just, you know, just I'm uncomfortable.
Here we go.
Yeah.
And she says, Oh, that's a little over $1,500.
And I'm like, wait, what now?
I just made it rain with $1,500.
Pick up all those doll.
Pick up $1,100 bills.
So we find everyone.
So now I'm like, wait, wait, what's happening?
And Cindy's course, Giddyus can be.

I'm like, "Are you kidding me?
I have a gratitude hangover right now.
I can't concentrate.
I can't, I don't know.
What?"
And just as I'm reeling from that one, two punch, she pulls out a case, and hands me
a case, and I open up the case and it's empty, but it's molding for a drone.
And I'm like, wait, you got me a drone as well.
And the long story is the drone just got released
about two weeks ago.
And you'd ordered it, but it was stuck in China.
And it wasn't due to come till Monday.
So anyway, it's just this huge big blur
that was like this, this emotional whiplash,
being in Scotland, in grief, come back,
loved by a world of friends and family.
"Oh, it's just absolutely yo-yod."
And then because God's so good,
the drone got delivered the next day, was it?
- Yeah, it got delivered early, so it came Friday.
- Came Friday, I was expecting it to come Monday.
- Monday, and I was like, "Wait, what happened?"
And so I've been trying to play with it,
but I put my back out a little bit,
so it's hard to stand up, but I have played with it.
But it's the first piece of technology I've ever owned
where I'm like, "I really need to read the manual
because I don't know what I'm doing."
- Okay, I like it that you have to read the manual
'cause I almost always have to read the manual.
- Well, I've read the manual
and I think shortly after recording this,
we're gonna go out and spy on our neighbors.
Wait, no, that's not right.
- Yeah, let's spy on the neighbors.
(laughing)
- So anyway, needless to say,
my heart is fully alive and loved by everybody
who wrote to me to express sorrow at my father's passing.
I appreciate every single tweet and Facebook post and email and text.
Thank you so much.
It meant a lot.
And the other end of the spectrum, everybody who wish me happy birthday and,
and then everybody who gave just so extravagantly, just undid me.
And I, I so appreciate it.
I'm, I am like a giddy nerd.
I have my dreams on a setup.
I have a drone and I'm currently doing a wish list of all the perm--
I couldn't sleep.

I'm like, well, I could do this and then I could buy this
and then blah blah blah, do this and then I get to buy it.
So I'm just spinning.
And you know, all these things are testimonies
all about the goodness and the favor and the kindness of God.
- I think it's quite fun.
I loved, 'cause I videotaped you from the moment
that we walked in.
- I noticed that later.
And so I had several people come up to me at church
this morning and say how much fun they had watching the video
and how shocked you were.
Like they could tell you didn't know how to process
what was happening, which was really lovely.
I had to confiscate Cindy's phone though,
because I think she thought she was shooting a documentary.
So there was just a camera every time I looked,
I just grabbed her phones and then I was confiscating.
- The other thing that happened that honestly,
I think I could, you know, send to the world's funniest home
videos or whatever it was, was the toad and the sink
and the sibit.
- Oh my gosh.
- So we woke up one morning, I'm trying to think it was like
maybe Thursday morning or Wednesday morning or something.
And we came into the kitchen and Kate said,
And now on this episode of Strange Things at the Jones House,
there's a toad in our sink.
And it was like in the sink that the drying rack sits in
under the drying rack sitting in the drain was this toad.
- That looked dead.
- It looked dead.
- It's dry though.
- We ran water on it and stuff and it didn't move
or anything.
And so of course you being the man in the house,
we voted you for toad removal duties.
- Right, which I was thrilled about.
- Yeah.
So I don't know if we can post a link to the video,
but you went to get kitchen tongs to get it out
and it turns out it was very much alive.
- And it attacked me.

And there's nothing to see that's meant to me.
- Is that what you're gonna say
'cause we're not posting the video?
Or if you want the truth,
you can look at my Instagram account.
- I don't know what you're talking about.
- But anyway, so there was fun with that.
and also I've discovered Snapchat filters.
So that's also fun.
- You are hysterical.
Like you, and now you know,
listen, we all have our own little idiosyncrasies
that give us tremendous joy,
but you will spend hours in the corner
just giggling to yourself about all these Snapchat filters.
The trouble is there's a couple of Snapchat filters
that when you use them, I go,
we get the knees, I'm like, oh, baby.
Do you want to discuss which snapshot?
No, but they don't get the same.
It's not the one with the big eyes, big mouth and no nose because that one's terrifying.
But you just love it.
You just think it's the best thing since sliced bread.
It amuses me greatly.
And you're not even on Snapchat, are you?
Well, I mean, technically, yes, I guess because I had to start an account, but I've never used it.
I just use the filters and then create a video and save it and then post it to Instagram.
if it's amusing to me, but I like the Fox one with the glasses, but it's gone now.
So I don't know.
I don't know enough about Snapchat to know whether it's going to come back or not.
Oh my gosh.
It's funny.
So that's us.
I think pretty much caught up again.
Thank you.
You wonderful patient podcast audience.
I, I so appreciate all your grace, all the space.
Sorry, we didn't get a podcast that last week.
I really don't like doing that, but I did underestimate the power of jet lag,
But I feel great.
I'm glad to be back.
We're caught up.
Here's what we'd love you to do is send us your questions.
Go to Alan and AJ.com/askalyn.
That's how you spell my name, Alan and AJ.com/askaskusyourquestions.
And next week we're going to wade through the most pressing issues that we get from our listeners.
And you can get the show notes for this week at Alan and AJ.com/156.
And then lastly, you had a bit of bad news this week.
Your mom fell today.
Do you want to talk about that?
Yeah, I just finished speaking this morning, literally,
and then got this text from my sister saying that my mom had fallen over and
broken her hip.
And so they took her to hospital and x-rayed her and it is in fact broken.
Um, and then they gave her morphine, which apparently she reacted badly to.
So they're trying to work all that out and they're taking her into surgery this
evening.
So apparently they're putting in a plate and two screws, but she is 81 and lives in a house with stairs.
So there's just a whole bunch of adjustment that's having to happen in our family.
And of course, I live really far away.
So that's a little hard.
I'd love you to pray for my mom that she recovers real quick.
Well, baby, it's been great to be back in the podcast seat.
Thank you guys for being with us.
We can't wait to speak with you all next week.


{% extends "base.html" %} {% block navhome %}{% endblock %} {% block navtools %}class="active"{% endblock %} {% block content %}
This is a tool for ArcMap 10, 10.1 and 10.2 which validates and converts a spreadsheet in an Excel content model to a geodatabase ready to be deployed as a NGDS Service.
This is an executable python script which offers two different conversions for well log data: 1) Conversion from a BoreholeLASLogData.xls model to a LAS version 2.0 formatted XML file. 2) Conversion from a LAS 2.0 formatted XML file to an entry in the WellLog Content Model. Example templates for BoreholeLASLogData.xls and WellLogsTemplate.xls can be found in the package after download.
This is an executable program for ArcGIS 10.1 and 10.2 that publishes services from finished ArcMap projects. It can publish a single file or folder of files. Service properties are filled according to the user's saved preferences. The full list of capabilities can be found in the ReadMe.


--- layout: compress --- {% include head.html %}
{% include header.html %}Neglected Infectious Disease Lab
Apr 2023
Two new preprints resulting from Elena Rehborg and Lenny Nunn's undergrad projects.
Mar 2023
Welcome to GHI Postdoctoral Fellow Sebastián Díaz! Sebastian will be stationed in Medellin, Colombia.
Sep 2022
New preprint led by Clair using a single-cell atlas to investigate secretory behaviors and drug targets!
Sep 2022
New preprint led by Kendra on muscarinic receptors as anthelmintic targets.
Aug 2022
Monica joins us as a GHI Visiting Scholar!
Aug 2022
Kendra, Clair, and Katie presented their work at the Midwest Neglected Infectious Disease Meeting at Notre Dame.
Jul 2022
New preprint led by Nic on multivariate screening for macrofilaricide discovery.
May 2022
New preprint and software package for image-based phenotyping of parasites.
Apr 2022
Dr. Monica Palma-Cuero is awarded a GHI Visiting Scholar award!
Apr 2022
Spatial transcriptomics paper appears in PLoS Pathogens.
Jan 2022
Nic Wheeler has accepted an Assistant Professor position at UW-Eau Claire starting in the Fall!
Oct 2021
JB Collins joins us as a postdoc on an anthelmintic resistance project jointly mentored through Northwestern University.
Aug 2021
Read our new preprint on spatial transcriptomics and antiparasitic target prioritization in a human filarial parasite.
Jun 2021
Opinion piece on high-content anthelmintic screening now out in Trends in Parasitology.
Mar 2021
Kendra receives an Honorable Mention for the Ford Foundation Predoctoral Fellowship!
Dec 2020
Nic awarded an NIH F32 fellowship to study parasite sensory behaviors!
Dec 2020
Katie Ryan joins our lab as a PhD student through the CMP program. Welcome Katie!
Dec 2020
Collaboration on ivermectin modulation of parasite vesicle release appears in the Journal of Extracellular Vesicles.
Nov 2020
Filarial long-read RNAseq paper appears in PLOS NTD.
Nov 2020
Kendra, Nic, and Mostafa present posters and talks at the 2020 ASTMH Annual Meeting.
Jun 2020
Preprint on long-read RNA-Seq in human and animal filarial parasites now online!
Jun 2020
Paper on sensory behaviors of parasites that cause lymphatic filariasis in press at PLoS Biology
May 2020
The lab receives Global Health Institute grant to study filarial parasites infecting indigenous populations in Amazonia
May 2020
Elena receives Honorable Mention for the UW Sophomore Research Fellowship!
Mar 2020
Clair Henthorn joins us as a CBMS PhD student!
Feb 2020
The lab receives NIH/NIAID R01 to study parasite secretory function and new strategies to disrupt host-parasite interactions!
Dec 2019
Review on schistosome vector control & gene drive potential is published
Sep 2019
Paul presents poster and talk at the BSP / ISP joint meeting in Belfast; won 1st place poster prize!
Sep 2019
Kendra is appointed to the NIH PVB training grant!
Sep 2019
Nic will be giving an invited talk at the PacBio North America User Group Meeting
Jun 2019
New preprint on filarial chemosensory biology available on bioRxiv!
Jun 2019
We wish our first cohort of lab undergrads success in their journeys ahead! Eric Chen (NIH IRTA Fellow), Alexis Mann (PhD, Johns Hopkins), Katie Kudrna (DVM, UW-Madison)
May 2019
Nathalie Dinguirard joins us from the Yoshino Lab as a joint research specialist
Apr 2019
Eric, Tran, and Katie present posters at UW Undergraduate Research Symposium
Apr 2019
Kendra receives 2019 NSF GRFP Honorable Mention
Feb 2019
The lab is excited to share our latest work at the upcoming Molecular Helminthology and WAAVP 2019 meetings
Oct 2018
Large-scale helminth genomics effort appears in Nature Genetics. Our lab contributed primary analyses of potentially druggable GPCRs and ion channels
Sep 2018
New preprint with Bartholomay & Kimber labs on chemosensation in filarial parasites
Sep 2018
Kendra joins the lab as a CBMS PhD student. Abdi, Gabi, and Nick join us as undergrad researchers
Sep 2018
Collaboration on the Bge cell line is published
Aug 2018
Nic presents at the 15th International Symposium on Schistosomiasis in Rio de Janeiro
Jul 2018
Zach joins the lab as a research intern!
Jul 2018
Paul Airs joins the lab as a Postdoc!
May 2018
Kathy Vaccaro joins the lab as a Research Specialist!
Apr 2018
Paper on stage and sex-specific differences in Brugia exosome cargo in press at PLoS NTD
Apr 2018
Benzimidazole paper appears in PLoS NTD
Dec 2017
Lab contributes to BioRxiv preprint on comparative genomics of major helminths
Oct 2017
BioRxiv preprint on the discovery of genetic loci underlying benzimidazole resistance
Oct 2017
Lab receives funding from NCVP / AHS
Aug 2017
Alexis joins the lab as an Honorary Research Fellow
Aug 2017
Contribution to Nature Communications paper on the genetics of a phoretic behavior
Jul 2017
Divyaa starts PhD program at Florida State University
May 2017
Nic joins the lab as a Merck KGaA Postdoc Fellow
May 2017
Justice joins the lab as an Undergrad Lab Assistant
Apr 2017
Mostafa joins editorial board of Molecular and Biochemical Parasitology
Mar 2017
Lab receives NIH/NIAID K22 Phase II Award
Feb 2017
Divyaa joins the lab as a joint Research Intern
Feb 2017
Eric joins as an Undergraduate Researcher
Feb 2017
Troy joins the lab as a Research Specialist
Jan 2017
The lab officially opens!


--- layout: page title: "About" description: "Some stuff on what I do" header-img: "img/ideasmall-bg.jpg" ---
I'm Felan Carlo Garcia, a graduate student under the M.S. in Electronics Engineering program at Ateneo de Manila University. I am a current Science Research Specialist working at the Department of Science and Technology - Advanced Science and Technology Institute working on embedded systems development, server applications, data visualization and some ;) predictive analytics


--- layout: post title: running priest date: '2013-07-24T14:19:00+02:00' categories: - Sketches picture_url: https://film-Storyboards.tumblr.com/post/56353492331/running-priest ---
Running priest
Pen + inks


03.By given an array of students, generate a table that represents these students
Each student has first name,last name and grade
Use jQuery


+91<PHONE_NUMBER>
If you want better learning experience, Call us now !!!
Java is a general-purpose programming language that is class-based, object-oriented, and designed to have as few implementation dependencies as possible. The median salary of a Java developer is USD 83,975
Python is an interpreted, high-level, general-purpose programming language. Created by Guido van Rossum and first released in 1991, Python's design philosophy emphasizes code readability with its notable use of significant whitespace.
C is a general-purpose, procedural computer programming language supporting structured programming, lexical variable scope, and recursion, while a static type system prevents unintended operations.
JavaScript is the only browser technology that combines these three things. That's what makes JavaScript unique. That's why it's the most widespread tool for creating browser interfaces. That said, JavaScript also allows to create servers, mobile applications, etc
SQL is one of the most demanding skill in the current world. Every day a huge amount of data is collected and one have to deal with these databases to make an insightful information. Hence it is important for us to learn SQL as it is a special-purpose database programming language which help to generate useful strategies from a database and can easily interact with large and massive database.
Hypertext Markup Language is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets and scripting languages such as JavaScript.
If you want better learning experience, Call us now !!!
Be the part of Tech Giants family
Hi there ! It is really nice meeting with you people, I am Glad that you visited this really maginificent platform to give a light to your career , I am the creator of this website. A professional in computer Applications and softwares. This is the Beta version <IP_ADDRESS>, Please share your feedbacks by using this website and give it a thumbs up if you like it. you are welcome to give feedbacks as well if any changes you would like into your interface.
Tech Giants based in Noida, Uttar pradesh. With additional offices in New Bangalore, Mumbai, and Hyderabad. They were founded in 2005 and employ a team of about 90 who provide custom software, web, C programming , Java, and Python for mostly mid-sized businesses.
NOTABLE PROJECT
A sporting goods brand partnered with Saritasa to develop a web application to manage hundreds of professional contracts with minor and major league baseball players. They had a system in place, but it was outdated. The new solution kept valuable features from the legacy platform, then integrated more responsive functionalities. Saritasa consistently showed patience and strong technical skills.
This portal helps Technical giants (developers) creating their own website. This is way far helpful for beginners and also who just jumped in this area of interest. We are the best institute all across the asia on the top of that we have collabaration with top paying MNC companies wherein we get placed to our students since our objective is motivating beginners heading towards web development, Application development and database realated Technologies, we have the best faculties to groom people for the development, so what are you waiting for ???
Register your self....
Happy Coding...
Creator and developer of this website.


A basic implementation of the FDF part of the PDF spec. This is not used very much, so quite incomplete to the moment.


@(When you add a subprocess, you have to upload it as package via button in application's grid. The cluster doesn't work in debug mode.)
@(Choose existing application)
@(Path)
@(Enable debug mode)
@(debug)
@(Perform NPM install)
package.json
@(Enable backing up)
@(Port)
@(URL address to Git repository)
@(In the form<EMAIL_ADDRESS>@(Notes)
@(Cluster)
@(The application must be optimized for the cluster. The cluster mode is enabled when the thread count is greater than one thread. The cluster doesn't work in debug mode.)
@(DDOS protection)
@(This setting is a prevention for DDOS attacks. Nginx tracks all requests according to the binary IP address and when the requests exceed a limit, Nginx responds with 503 error for other requests.)
@(Memory limit)
@(This property can increase the maximum size of memory for this application. The value has to be in MB and default value is 1000 MB for 64-bit systems and 512 MB for 32-bit systems.)
@(Maximum upload size (MB))
@(Sets the maximum size/length of the request body.)
@(Request/Response timeout)
@(In "seconds". It solves a problem with disconnecting of WebSocket.)
@(Custom start script)
@(We do not recommend to use a custom start script. App directory can't contain these files debug.js and release.js. First argument is a port number.)


Object-Oriented Programming with R
1. Introduction to OOP in R
Difference between functional programming and OOP?
- Functional Programming: functions first, then object
- OOP: data structures first, then functions (methods)
1.1. When to use OOP?
When building tools for data analysis, use object-oreinted programming; otherwise, use functional programming for analyzing data.
1.2. A taste of function vs. objects
# Create these variables
a_numeric_vector <- rlnorm(50)
a_factor <- factor(
sample(c(LETTERS[1:5], NA), 50, replace = TRUE)
)
a_data_frame <- data.frame(
n = a_numeric_vector,
f = a_factor
)
a_linear_model <- lm(dist ~ speed, cars)
# Call summary() on the numeric vector
summary(a_numeric_vector)
# Do the same for the other three objects
summary(a_factor)
summary(a_data_frame)
summary(a_linear_model)
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.1031 0.4518 0.8609 1.4180 1.5990 7.5560

A

9

B

10

C

8

D

7

E

8

NA’s

8

n f
Min. :0.1031 A : 9
1st Qu.:0.4518 B :10
Median :0.8609 C : 8
Mean :1.4176 D : 7
3rd Qu.:1.5988 E : 8
Max. :7.5557 NA's: 8
Call:
lm(formula = dist ~ speed, data = cars)
Residuals:
Min 1Q Median 3Q Max
-29.069 -9.525 -2.272 9.215 43.201
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -17.5791 6.7584 -2.601 0.0123 *
speed 3.9324 0.4155 9.464 1.49e-12 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 15.38 on 48 degrees of freedom
Multiple R-squared: 0.6511, Adjusted R-squared: 0.6438
F-statistic: 89.57 on 1 and 48 DF, p-value: 1.49e-12
The same function summary() behaves differently on different types of objects, due to the underlying defined behaviors of these classes.
1.3. The Nine Systems
- S3: (Most recommended) Precurse of R, mature and widely used
- Makes functions behave differently on different classes
- S4: Also prior to R
- Hard to use, not recommended
- Unless you use Bioconductor
- ReferenceClasses: Has similar behaviors of other programming languages, not recommended
- R6: More powerful than S3 (recommended)
1.4. How does R distinguish variables?
When using str() or class(), R returns the class of the variables.
When one need more information of the basic element type of the class (for instance, what’s in a matrix), we use typeof() to determine the type of each element.
Use mode() and storage.mode() are used in older codes, but not useful anymore.
1.5. Assigning Classes and Implicit Classes
Use class() to also assign a class to a variable. In other words, the “class” of an object can be overwritten.
However, the underlying features of an existing class in R will continue to work, such as length(), mean(), typeof().
This is particularly useful for lists, since lists can be used to combine other variables into more complex variables. (Remember the Lego analogy: individual variables are like Lego pieces, and you can use lists to build whatever you like.)
2. S3 How-to
2.1. Function Overloading
Having different behaviors for different classes for the same function. This is enabled by S3 package.
For the S3 package:
- Functions are devided into two parts:
- Generic function
- print() and summary() are both generic fuctions
- method function for each class
- Use generic.class() to call the method for the class
- The arguments for the generic functions should also be included in the method functions
Do not use dots in variable naming convention, which will confuse the S3 classes
# To check if a function is a S3 method:
library(pryr)
print(is_s3_generic("t"))
print(is_s3_method("t.data.frame"))
print(is_s3_method("t.data.frame"))
[1] TRUE
[1] TRUE
[1] TRUE
2.2. Step 1 to create a S3 function: create a generic function using UseMethod( )
You can create your own S3 functions. The first step is to write the generic. This is typically a single line function that calls UseMethod(), passing its name as a string.
The first argument to an S3 generic is usually called x, though this isn’t compulsory. It is also good practice to include a … (“ellipsis”, or “dot-dot-dot”) argument, in case arguments need to be passed from one method to another.
Overall, the structure of an S3 generic looks like this.
an_s3_generic <- function(x, maybe = "some", other = "arguments", ...) {
UseMethod("an_s3_generic")
}
# Create get_n_elements
get_n_elements <- function(x, ...){
UseMethod("get_n_elements")
}
2.3. Step 2 to create a S3 function: create methods
The generic function doesn’t do anything; it is simply a bucket that contains multiple method, each dealing with different class object.
The methods are actually regular functions with two conditions:
- The name of the method must be of the form generic.class.
- The method signature - that is, the arguments that are passed in to the method - must contain the signature of the generic.
The syntax should look like:
generic.class <- function(some, arguments, ...) {
#Do something
}
# View get_n_elements
print(get_n_elements)
# Create a data.frame method for get_n_elements
get_n_elements.data.frame <- function(x, ...){
nrow(x)*ncol(x)
}
# Call the method on the sleep dataset
n_elements_cars <- get_n_elements.data.frame(cars)
# View the result
print(n_elements_cars)
function(x, ...){
UseMethod("get_n_elements")
}
[1] 100
2.4. Step 3 to create a S3 function: create default method
Create a default method to deal with classes without a specific method. It is similar to creating a S3 method function with the condition that the name of the default method should always be generic.default.
# View pre-defined objects
ls.str()
# Create a default method for get_n_elements
get_n_elements.default <- function(x, ...){
length(unlist(x))
}
# Call the method on an array
print(get_n_elements.default(1:20))
a_data_frame : 'data.frame': 50 obs. of 2 variables:
$ n: num 0.536 0.303 1.774 1.12 4.316 ...
$ f: Factor w/ 5 levels "A","B","C","D",..: 1 3 5 4 3 1 4 2 3 NA ...
a_factor : Factor w/ 5 levels "A","B","C","D",..: 1 3 5 4 3 1 4 2 3 NA ...
a_linear_model : List of 12
$ coefficients : Named num [1:2] -17.58 3.93
$ residuals : Named num [1:50] 3.85 11.85 -5.95 12.05 2.12 ...
$ effects : Named num [1:50] -303.914 145.552 -8.115 9.885 0.194 ...
$ rank : int 2
$ fitted.values: Named num [1:50] -1.85 -1.85 9.95 9.95 13.88 ...
$ assign : int [1:2] 0 1
$ qr :List of 5
$ df.residual : int 48
$ xlevels : Named list()
$ call : language lm(formula = dist ~ speed, data = cars)
$ terms :Classes 'terms', 'formula' language dist ~ speed
$ model :'data.frame': 50 obs. of 2 variables:
a_numeric_vector : num [1:50] 0.536 0.303 1.774 1.12 4.316 ...
env : <environment: 0x19799d0>
env2 : <environment: 0x19799d0>
get_n_elements : function (x, ...)
get_n_elements.data.frame : function (x, ...)
lst : List of 2
$ perfect: num [1:3] 6 28 496
$ bases : chr [1:4] "A" "C" "G" "U"
lst2 : List of 2
$ perfect: num [1:3] 6 28 496
$ bases : chr [1:4] "A" "C" "G" "T"
n_elements_cars : int 100
[1] 20
2.5. Methodical Thinking
To check the available methods of a function, call methods(‘function_name’) or methods(function_name).
To check the available method of a function for a given class of object, call methods(class = ‘class_name’) or methods(class = class_name).
methods( ) returns both S3 and S4 methods.  S3 and Primitive Functions
Functions that needs faster performance are usually written in C codes. However, C codes takes longer to write and harder to debug.
Functions written in C codes are called Primitive Functions. Check primitive generics using .S3PrimitiveGenerics to show all the primitive S3 functions.
The primitive generic functions behave differently than the normal generic functions, in that:
- Primitive functions will remain functional on a new class if the underlying C codes can find applicable codes to analyze the new class
# Create data.frame hair
hair <- list(color=c("black","brown","blonde","ginger","grey"),
styles=c("afro","beehive","crew cut","mohawk","mullet"))
class(hair) <- "hairstylist"
# View the structure of hair
str(hair)
# What primitive generics are available?
print(.S3PrimitiveGenerics)
# Does length.hairstylist exist?
exists('length.hairstylist')
# What is the length of hair?
length(hair)
List of 2
$ color : chr [1:5] "black" "brown" "blonde" "ginger" ...
$ styles: chr [1:5] "afro" "beehive" "crew cut" "mohawk" ...
- attr(*, "class")= chr "hairstylist"
[1] "anyNA" "as.character" "as.complex" "as.double"
[5] "as.environment" "as.integer" "as.logical" "as.numeric"
[9] "as.raw" "c" "dim" "dim<-"
[13] "dimnames" "dimnames<-" "is.array" "is.finite"
[17] "is.infinite" "is.matrix" "is.na" "is.nan"
[21] "is.numeric" "length" "length<-" "levels<-"
[25] "names" "names<-" "rep" "seq.int"
[29] "xtfrm"
FALSE
2
length() is a primitive function, which is why it will not throw an error even when there is no method for class “hairstylist”.
2.7. Assigning more than one class to an object
Use a list and the class() function to assign more than one “class” to an object. The more specific class should always come before more generic class. It’s good practice to keep the original class as the final class.
When there’s a specific function to check an object’s class, use it. If the class is newly created, use inherits(object_name, “class_name”) to check if an object is of certain class.
How to chain the methods if an object have more than one applicable class? Use NextMethod() when defining the functions, so that the method will automatically go over all existing classes an object can have.
kitty <- c("Miaow!")
class(kitty) <- c("cat","mammal","character")
inherits(kitty, "cat")
inherits(kitty, "mammal")
# For existing class, both inherits and is.class()
# functions work.
inherits(kitty, "character")
is.character(kitty)
inherits(kitty, "dog")
TRUE
TRUE
TRUE
TRUE
FALSE
When objects have multiple classes, you may wish to call methods for several of these classes. This is done using NextMethod().
The S3 methods now take the form:
an_s3_method.some_class <- function(x, ...){
#Act on some_class, then
NextMethod("an_s3_method")
}
That is, NextMethod() should be the last line of the method.
# Define a generic function what_am_i( )
what_am_i <- function(x, ...){
UseMethod("what_am_i")
}
# Define a cat method for function what_am_i
what_am_i.cat <- function(x, ...){
message("I'm a cat")
NextMethod("what_am_i")
}
# Define a mammal method for function what_am_i
what_am_i.mammal <- function(x, ...){
message("I'm a mammal")
NextMethod("what_am_i")
}
# Define a character method for what_am_i
what_am_i.character <- function(x, ...){
message("I'm a character vector")
}
what_am_i(kitty)
I'm a cat
I'm a mammal
I'm a character vector
3. R6 How-to
R6 enables the storage of data and object within one variable. We will use R6 following two steps as below:
- Step 1: Use R6Class( ) to create a class generator as templates for objects. Class generator is also called factories.
- Name of the factory should be in UpperCamelCase
- Data fields are stored in private list
- Step 2: Use factory to create new objects, by calling new() method from the factory
3.1. Creating a R6 factory (Microwave Oven)
R6Class( ) function is used to create a factory for a class:
- The first argument to R6Class() is the name of the class of the objects that are created, written in UpperCamelCase
- Another argument is called private and holds the data fields of the object as a list, with names for each of its elements
thing_factory <- R6Class("Thing", private = list( ..a_field = "a value", ..another_field = 123 ) )
# Load R6 package for the programming
library(R6)
# Define microwave_oven_factory
microwave_oven_factory <- R6Class(
"MicrowaveOven",
private = list(
..power_rating_watts = 800
)
)
3.2. Making Objects (Microwave Ovens)
To make an object, you create a factory, then call its new() method. Note that you don’t need to define this method; all factories have a new() method by default.
a_thing <- thing_factory$new()
microwave_oven <- microwave_oven_factory$new()
3.3. Hiding Complexity with Encapsulation (i.e. public list)
Encapsulation:
- Seperating the implementation of the object from the user interface
- All details of the implementation is hiding inside the private element
- All details of the user interface is stored inside the public element
- These details are always functions
- Use private
$
element to access private elements - use self
$
element to access public elements
Code for factories with public elements should be:
thing_factory <- R6Class(
"Thing",
private = list(
..a_field = "a value",
..another_field = 123
),
public = list(
do_something = function(x, y, z) {
# Do something here
}
)
)
# Add a cook method to the factory definition
microwave_oven_factory <- R6Class(
"MicrowaveOven",
private = list(
power_rating_watts = 800
),
public = list(
cook = function(time_seconds){
Sys.sleep(time_seconds)
print("Your food is cooked!")
}
)
)
# Create microwave oven object
a_microwave_oven <- microwave_oven_factory$new()
# Call cook method for 1 second
a_microwave_oven$cook(1)
[1] "Your food is cooked!"
To access elements stored in private list, use private$element_name
.
# Add another open_door method to the factory
# definition by working on door_is_open element
microwave_oven_factory <- R6Class(
"MicrowaveOven",
private = list(
..power_rating_watts = 800,
..door_is_open = FALSE
),
public = list(
cook = function(time_seconds){
Sys.sleep(time_seconds)
print("Your food is cooked!")},
open_door = function(){
private$..door_is_open = TRUE},
close_door = function(){
private$..door_is_open = FALSE}
)
)
One special public method for factories is called initialize()
, which runs automatically whenever a .new()
method is used for the factory. The pattern for an initialize() function should be:
--snip--
public = list(
initialize = function(a_field, another_field) {
if(!missing(a_field)) {
private$..a_field <- a_field
}
if(!missing(another_field)) {
private$..another_field <- another_field
}
}
)
# Add an initialize method
microwave_oven_factory <- R6Class(
"MicrowaveOven",
private = list(
..power_rating_watts = 800,
..door_is_open = FALSE
),
public = list(
cook = function(time_seconds) {
Sys.sleep(time_seconds)
print("Your food is cooked!")
},
open_door = function() {
private$..door_is_open = TRUE
},
close_door = function() {
private$..door_is_open = FALSE
},
# Add initialize() method here
initialize = function(power_rating_watts, door_is_open) {
if(!missing(power_rating_watts))
{
private$..power_rating_watts <- power_rating_watts
}
if(!missing(door_is_open))
{
private$..door_is_open <- door_is_open
}
}
)
)
# Make a microwave
a_microwave_oven <- microwave_oven_factory$new(
power_rating_watts = 650,
door_is_open = TRUE
)
3.4. Getting and setting (read and write) with Active Bindings
The active element list is to allow controlled access to the objects by users on elements in other lists.
- For read-only access, copy the value stored in private list with a condition for missing values:
- For read-write access, give a “value” argument in the method and tells the function to give the value (if defined) to the element
--snip--
active = list(
a_field = function(){
# read-only access
private$..a_field
},
another_field = function(value){
# read-write access
if(missing(value)){
private$..another_field
} else {
check_condition_function(value)
private$..another_field <- value
}
}
)
library(devtools)
library(assertive.numbers)
library(assertive)
Attaching package: ‘assertive’
The following objects are masked from ‘package:pryr’:
is_s3_generic, is_s3_method
# Add a binding for power rating
microwave_oven_factory <- R6Class(
"MicrowaveOven",
private = list(
..power_rating_watts = 800,
..power_level_watts = 800
),
# Add active list containing an active binding
active = list(
power_level_watts = function(value) {
if(missing(value)) {
private$..power_level_watts
} else {
assert_is_a_number(value) # function from "assertive" package
assert_all_are_in_closed_range( # function from "assertive.numbers" package
value, lower = 0, upper = private$..power_rating_watts
)
private$..power_level_watts <- value
}
}
)
)
# Make a microwave
a_microwave_oven <- microwave_oven_factory$new()
# Get the power level
a_microwave_oven$power_level_watts
# Try to set the power level to "400"
# a_microwave_oven$power_level_watts <- "400"
# Try to set the power level to 1600 watts
# a_microwave_oven$power_level_watts <- 1600
# Set the power level to 400 watts
a_microwave_oven$power_level_watts <- 400
800
3.5. Propagating (Copying) functionality with Inheritance
To enable automated connection between different layers of settings for classes, factories should be able to inherit functionality from “parent class”. Defining a “child class” using inherit
argument to R6Class().
child_class_factory <- R6Class(
"ChildClass",
inherit = parent_class_factory,
# Any additional elements for the child class
)
# First we define a parent class MicrowaveOven
microwave_oven_factory <- R6Class(
"MicrowaveOven",
private = list(
..power_rating_watts = 800,
..power_level_watts = 800,
..door_is_open = FALSE
),
public = list(
cook = function(time_seconds){
Sys.sleep(time_seconds)
print("Your food is cooked!")
},
open_door = function(){
private$..door_is_open = TRUE
},
close_door = function(){
private$..door_is_open = FALSE
},
initialize = function(power_rating_watts=800, door_is_open=TRUE){
if(!missing(power_rating_watts)){
private$..power_rating_watts <- power_rating_watts
}
if(!missing(door_is_open)){
private$..door_is_open <- door_is_open
}
}
),
active = list(
power_rating_watts = function(){
private$..power_rating_watts
},
power_level_watts = function(value){
if(missing(value)){
private$..power_level_watts
} else {
assert_is_a_number(value)
private$..power_level_watts <- value
}
}
)
)
# Create a child class FancyMicrowaveOven that inherits from MicrowaveOven
fancy_microwave_oven_factory <- R6Class(
"FancyMicrowaveOven",
inherit = microwave_oven_factory,
)
microwave_oven_factory
fancy_microwave_oven_factory
a_microwave_oven <- microwave_oven_factory$new()
a_fancy_microwave <- fancy_microwave_oven_factory$new()
<MicrowaveOven> object generator
Public:
cook: function (time_seconds)
open_door: function ()
close_door: function ()
initialize: function (power_rating_watts = 800, door_is_open = TRUE)
clone: function (deep = FALSE)
Active bindings:
power_rating_watts: function ()
power_level_watts: function (value)
Private:
..power_rating_watts: 800
..power_level_watts: 800
..door_is_open: FALSE
Parent env: <environment: R_GlobalEnv>
Locked objects: TRUE
Locked class: FALSE
Portable: TRUE
<FancyMicrowaveOven> object generator
Inherits from: <microwave_oven_factory>
Public:
clone: function (deep = FALSE)
Parent env: <environment: R_GlobalEnv>
Locked objects: TRUE
Locked class: FALSE
Portable: TRUE
Using inherits(object_name, class_name)
will determine if an object inherits a class.
inherits(a_microwave_oven, "MicrowaveOven")
inherits(a_microwave_oven, "FancyMicrowaveOven")
inherits(a_fancy_microwave, "MicrowaveOven")
inherits(a_fancy_microwave, "FancyMicrowaveOven")
inherits(a_fancy_microwave, "R6")
inherits(a_microwave_oven, "R6")
TRUE
FALSE
TRUE
TRUE
TRUE
TRUE
Objects of parent and child class behave the same when using the shared methods on either class.
# Get power rating for each microwave
microwave_power_rating <- a_microwave_oven$power_rating_watts
fancy_microwave_power_rating <- a_fancy_microwave$power_rating_watts
# Verify that these are the same
identical(microwave_power_rating, fancy_microwave_power_rating)
# Cook with each microwave
a_microwave_oven$cook(1)
a_fancy_microwave$cook(1)
TRUE
[1] "Your food is cooked!"
[1] "Your food is cooked!"
3.6. Embrace, extend, override
For child classes:
Override: change the functionality of certain functions
Extend: add brand-new functionalities to the class with different function names
Child classes can access public fields in the parent class by using public$field_name
syntax
Sample to Extend Functionality in Child Class:
# Redefine the FancyMicrowaveOven factory with extended functionality
fancy_microwave_oven_factory <- R6Class(
"FancyMicrowaveOven",
inherit = microwave_oven_factory,
# Add more functionalities to public field
public = list(
cook_baked_potato = function(){
self$cook(3)
}
)
)
# Instantiate a FancyMicrowaveOven object
a_fancy_microwave <- fancy_microwave_oven_factory$new()
# Call the extended cook_baked_potato() function
a_fancy_microwave$cook_baked_potato()
[1] "Your food is cooked!"
Sample to Override Functionality in Child Class:
# Redefine the FancyMicrowaveOven factory by overriding functionality
fancy_microwave_oven_factory <- R6Class(
"FancyMicrowaveOven",
inherit = microwave_oven_factory,
# Add more functionalities to public field
public = list(
cook_baked_potato = function(){
self$cook(3)
},
cook = function(time_seconds){
super$cook(time_seconds)
# Access function
message("Enjoy your dinner!")
}
)
)
# Instantiate a FancyMicrowaveOven object
a_fancy_microwave <- fancy_microwave_oven_factory$new()
# Call the extended cook_baked_potato() function
a_fancy_microwave$cook(1)
[1] "Your food is cooked!"
Enjoy your dinner!
3.7. Multiple levels of inheritance
In a scenario where more than one level of inheritance happens, each child level can only use super$
to access the direct parent of itself. Multiple super$
access is not allowed.
To work around this limitation, the intermediate classes should expose their parents through active binding, using name super_
and should simply return super
.
--snip--
active = list(
super_ = function() super
)
# Adjust the fancy_microwave_oven_factory to expose parent functionality
fancy_microwave_oven_factory <- R6Class(
"FancyMicrowaveOven",
inherit = microwave_oven_factory,
# Add more functionalities to public field
public = list(
cook_baked_potato = function(){
self$cook(3)
},
cook = function(time_seconds){
super$cook(time_seconds)
# Access function
message("Enjoy your dinner!")
}
),
active = list(
super_ = function() super
)
)
# Instantiate a fancy microwave object
a_fancy_microwave <- fancy_microwave_oven_factory$new()
# Call the fancy microwave's super_ binding
a_fancy_microwave$super_
<environment: 0x35572e8>
Once intermediate classes have exposed their parent functionality with super_ active bindings, you can access methods across several generations of R6 class. The syntax is:
parent_method <- super$method()
grand_parent_method <- super$super_$method()
great_grand_parent_method <- super$super_$super_$method()
3.8. Use environments (env) to share variables
The environment variable type is similar to a list in that it can contain other variables.
You can create a new environment using new.env()
. However, one needs to create an empty env before adding variables into it.
Variables can be added to the environment using the same syntax as for lists, that is, you can use the $
and [[
operators.
One can check the contents of an env
object by using ls.str()
function.
# Define a new environment
env <- new.env()
# Add an element named perfect
env$perfect <- c(6, 28, 496)
# Add an element named bases
env[['bases']] <- c('A','C','G','T')
# Show the contents of env
ls.str(env)
bases : chr [1:4] "A" "C" "G" "T"
perfect : num [1:3] 6 28 496
Change by value vs. Change by reference:
Most types of R variable use “copy by value”, meaning that when you take a copy of them, the new variable has its own copy of the values. In this case, changing one variable does not affect the other.
Environments use a different system, known as “copy by reference”, so that all copies are identical; changing one copy changes all the copies.
# Assign lst and env
lst <- list(
perfect = c(6, 28, 496),
bases = c("A", "C", "G", "T")
)
env <- list2env(lst)
# Copy lst
lst2 <- lst
# Change lst's bases element
lst$bases <- c('A','C','G','U')
# Test lst and lst2 identical
identical(lst$bases, lst2$bases)
# Copy env
env2 <- env
# Change env's bases element
env2$bases <- c('A','C','G','U')
# Test env and env2 identical
identical(env$bases, env2$bases)
FALSE
TRUE
R6 classes can use environments’ copy by reference behavior to share fields between objects. To set this up, define a private field named shared. This field takes several lines to define. It should:
- Create a new environment.
- Assign any shared fields to that environment.
- Return the environment.
The shared fields should be accessed via active bindings. These work in the same way as other active bindings that you have seen, but retrieve the fields using a private$shared$
prefix.
R6Class(
"Thing",
private = list(
shared = {
e <- new.env()
e$a_shared_field <- 123
e
}
),
active = list(
a_shared_field = function(value) {
if(missing(value)) {
private$shared$a_shared_field
} else {
private$shared$a_shared_field <- value
}
}
)
)
# Update MicrowaveOven class to include env elements
microwave_oven_factory <- R6Class(
"MicrowaveOven",
private = list(
..power_rating_watts = 800,
..power_level_watts = 800,
..door_is_open = FALSE,
shared = {
e <- new.env()
e$safety_warning <- "Warning. Do not try to cook metal objects."
e
}
),
public = list(
cook = function(time_seconds){
Sys.sleep(time_seconds)
print("Your food is cooked!")
},
open_door = function(){
private$..door_is_open = TRUE
},
close_door = function(){
private$..door_is_open = FALSE
},
initialize = function(power_rating_watts=800, door_is_open=TRUE){
if(!missing(power_rating_watts)){
private$..power_rating_watts <- power_rating_watts
}
if(!missing(door_is_open)){
private$..door_is_open <- door_is_open
}
}
),
active = list(
power_rating_watts = function(){
private$..power_rating_watts
},
power_level_watts = function(value){
if(missing(value)){
private$..power_level_watts
} else {
assert_is_a_number(value)
private$..power_level_watts <- value
}
},
safety_warning = function(value){
if(missing(value)){
private$shared$safety_warning
} else {
private$shared$safety_warning <- value
}
}
)
)
# Instantiate two different MicrowaveOven
a_microwave_oven <- microwave_oven_factory$new()
another_microwave_oven <- microwave_oven_factory$new()
# Change the env element in one
a_microwave_oven$safety_warning <- "Warning. If the food is too hot you may scald yourself."
# Check the env element in the other object
another_microwave_oven$safety_warning
‘Warning. If the food is too hot you may scald yourself.’
3.9. Copy or clone R6Objects
R6Ojects follow the same rule for copy by reference. When assigned using a_reference_copy <- an_r6_object
, the a_reference_copy
will remain exactly the same with the an_r6_object
.
Instead, to copy by value, use a_value <- an_r6_object$clone()
to copy the values of an object.
# Create a microwave oven
a_microwave_oven <- microwave_oven_factory$new()
# Copy a_microwave_oven using <-
assigned_microwave_oven <- a_microwave_oven
# Copy a_microwave_oven using clone()
cloned_microwave_oven <- a_microwave_oven$clone()
# Change a_microwave_oven's power level
a_microwave_oven$power_level_watts <- 400
# Check a_microwave_oven & assigned_microwave_oven same
identical(a_microwave_oven$power_level_watts,
assigned_microwave_oven$power_level_watts)
# Check a_microwave_oven & cloned_microwave_oven different
!identical(a_microwave_oven$power_level_watts,
cloned_microwave_oven$power_level_watts)
TRUE
TRUE
A container object is a class that also contains anther class. This is realized by using thing_factory$new()
to create another object as a variable in the container.
When cloning (coping by object) an container object, container_object$clone()
will only copy by value on the container, but keep the “thing” as a shared object. To copy by value both the container and the included objects, use a_deep_copy <- an_r6_object$clone(deep = TRUE)
# Create a power_plug_factory for PowerPlug class
power_plug_factory <- R6Class(
"PowerPlug",
private = list(
..type = "American",
..plug_in_status = FALSE
),
public = list(
plug_in = function(){
private$..plug_in_status = TRUE
},
unplug = function(){
private$..plug_in_status = FALSE
},
add_adapter = function(type){
private$..type = type
},
initialize = function(plug_in_status=FALSE, type="American"){
if(!missing(plug_in_status)){
private$..plug_in_status <- plug_in_status
}
if(!missing(type)){
private$..type <- type
}
}
),
active = list(
plug_in_status = function(){
private$..plug_in_status
},
type = function(value){
if(missing(value)){
private$..type
} else {
private$..type <- value
}
}
)
)
# Update the MicrowaveOven to include PowerPlug object
microwave_oven_factory <- R6Class(
"MicrowaveOven",
private = list(
..power_rating_watts = 800,
..power_level_watts = 800,
..door_is_open = FALSE,
..power_plug = power_plug_factory$new(),
shared = {
e <- new.env()
e$safety_warning <- "Warning. Do not try to cook metal objects."
e
}
),
public = list(
cook = function(time_seconds){
Sys.sleep(time_seconds)
print("Your food is cooked!")
},
open_door = function(){
private$..door_is_open = TRUE
},
close_door = function(){
private$..door_is_open = FALSE
},
initialize = function(power_rating_watts=800, door_is_open=TRUE){
if(!missing(power_rating_watts)){
private$..power_rating_watts <- power_rating_watts
}
if(!missing(door_is_open)){
private$..door_is_open <- door_is_open
}
}
),
active = list(
power_rating_watts = function(){
private$..power_rating_watts
},
power_level_watts = function(value){
if(missing(value)){
private$..power_level_watts
} else {
assert_is_a_number(value)
private$..power_level_watts <- value
}
},
safety_warning = function(value){
if(missing(value)){
private$shared$safety_warning
} else {
private$shared$safety_warning <- value
}
},
power_plug_status = function(){
private$..power_plug$plug_in_status
},
power_plug_type = function(value){
if(missing(value)){
private$..power_plug$type
} else {
assert_is_a_string(value)
private$..power_plug$type <- value
}
},
power_plug = function(){
private$..power_plug
}
)
)
# Create a microwave oven
a_microwave_oven <- microwave_oven_factory$new()
# Look at its power plug
a_microwave_oven$power_plug_type
a_microwave_oven$power_plug
# Copy a_microwave_oven using clone(), no args
cloned_microwave_oven <- a_microwave_oven$clone()
# Copy a_microwave_oven using clone(), deep = TRUE
deep_cloned_microwave_oven <- a_microwave_oven$clone(deep=TRUE)
# Change a_microwave_oven's power plug type
a_microwave_oven$power_plug_type <- "British"
# Check a_microwave_oven & cloned_microwave_oven same
identical(a_microwave_oven$power_plug$type, cloned_microwave_oven$power_plug$type)
# Check a_microwave_oven & deep_cloned_microwave_oven different
!identical(a_microwave_oven$power_plug$type,
deep_cloned_microwave_oven$power_plug$type)
‘British’
<PowerPlug>
Public:
add_adapter: function (type)
clone: function (deep = FALSE)
initialize: function (plug_in_status = FALSE, type = "American")
plug_in: function ()
plug_in_status: active binding
type: active binding
unplug: function ()
Private:
..plug_in_status: FALSE
..type: British
TRUE
FALSE
3.10. Finalize (Clean up) R6 Objects
Just as an R6 class can define a public initialize()
method to run custom code when objects are created, they can also define a public finalize()
method to run custom code when objects are destroyed.
finalize()
should take no arguments. It is typically used to close connections to databases or files, or undo side-effects such as changing global options()
or graphics par()
ameters.
The template for the code should be as follows.
thing_factory <- R6Class(
"Thing",
public = list(
initialize = function(x, y, z) {
# do something
},
finalize = function() {
# undo something
}
)
)
The finalize() method is called when the object is removed from memory by R’s automated garbage collector. You can force a garbage collection by typing gc()
.
Leave a Comment


Given an input
and a flow-field grid
, computes the
output
using input
values and pixel locations from grid
.
nnf_grid_sample( input, grid, mode = c("bilinear", "nearest"), padding_mode = c("zeros", "border", "reflection"), align_corners = FALSE )
| input | (Tensor) input of shape \((N, C, H_{\mbox{in}}, W_{\mbox{in}})\) (4-D case) or \((N, C, D_{\mbox{in}}, H_{\mbox{in}}, W_{\mbox{in}})\) (5-D case) |
|---|---|
| grid | (Tensor) flow-field of shape \((N, H_{\mbox{out}}, W_{\mbox{out}}, 2)\) (4-D case) or \((N, D_{\mbox{out}}, H_{\mbox{out}}, W_{\mbox{out}}, 3)\) (5-D case) |
| mode | (str) interpolation mode to calculate output values |
| padding_mode | (str) padding mode for outside grid values |
| align_corners | (bool, optional) Geometrically, we consider the pixels of the
input as squares rather than points. If set to |
Currently, only spatial (4-D) and volumetric (5-D) input
are
supported.
In the spatial (4-D) case, for input
with shape
\((N, C, H_{\mbox{in}}, W_{\mbox{in}})\) and grid
with shape
\((N, H_{\mbox{out}}, W_{\mbox{out}}, 2)\), the output will have shape
\((N, C, H_{\mbox{out}}, W_{\mbox{out}})\).
For each output location output[n, :, h, w]
, the size-2 vector
grid[n, h, w]
specifies input
pixel locations x
and y
,
which are used to interpolate the output value output[n, :, h, w]
.
In the case of 5D inputs, grid[n, d, h, w]
specifies the
x
, y
, z
pixel locations for interpolating
output[n, :, d, h, w]
. mode
argument specifies nearest
or
bilinear
interpolation method to sample the input pixels.
grid
specifies the sampling pixel locations normalized by the
input
spatial dimensions. Therefore, it should have most values in
the range of [-1, 1]
. For example, values x = -1, y = -1
is the
left-top pixel of input
, and values x = 1, y = 1
is the
right-bottom pixel of input
.
If grid
has values outside the range of [-1, 1]
, the corresponding
outputs are handled as defined by padding_mode
. Options are
padding_mode="zeros"
: use 0
for out-of-bound grid locations,
padding_mode="border"
: use border values for out-of-bound grid locations,
padding_mode="reflection"
: use values at locations reflected by
the border for out-of-bound grid locations. For location far away
from the border, it will keep being reflected until becoming in bound,
e.g., (normalized) pixel location x = -3.5
reflects by border -1
and becomes x' = 1.5
, then reflects by border 1
and becomes
x'' = -0.5
.
This function is often used in conjunction with nnf_affine_grid()
to build Spatial Transformer Networks
_ .


You must be logged in to perform this action.
{% set login_url = handler.kwargs.get('login_url', None) %} {% import gramex %} {% set app_login = 'gramex.conf.app.settings.login_url' %}Log in and try again. If that fails, contact the app owner.
HTTP 401: Unauthorized


If you’re a long time command line Tidy user, you may find that some option that you’re accustomed to using seems to be missing from Balthisar Tidy. This section will explain why they appear to be missing, workarounds, and explanations.
Balthisar Tidy isn’t a rewrite of Tidy; it uses the same code as traditional command line Tidy, and supports all of Tidy’s options, in some cases replacing them with Mac OS X’s superior implementation.
This summary should provide an explanation for the differences between Tidy’s options and Balthisar Tidy’s options.
char-encoding
input-encoding
and
output-encoding
separately. The main motivation for this is to take advantage
of Mac OS X’s vast array of file encoding options compared to the limited options
offered by Tidy proper.language
doctype-mode
doctype
as it should.hide-endtags
omit-optional-tags
, and so Balthisar Tidy
hides this option.slide-style
split
error-file
gnu-emacs
gnu-emacs-file
keep-time
output-bom
output-file
quiet
show-error
show-info
show-warnings
write-back


Scale abbreviation using Genetic Algorithms that maximally capture the variance in the original data.
| Version: | 1.3 |
| Depends: | R (≥ 3.0), GA (≥ 3.0), psych (≥ 1.4.3) |
| Imports: | stats, graphics, grDevices, utils |
| Published: | 2016-06-23 |
| Author: | Luca Scrucca [aut], Baljinder K. Sahdra [aut, cre] |
| Maintainer: | Baljinder K. Sahdra <baljinder.sahdra at acu.edu.au> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: | no |
| Citation: | GAabbreviate citation info |
| Materials: | NEWS |
| CRAN checks: | GAabbreviate results |
| Reference manual: | GAabbreviate.pdf |
| Package source: | GAabbreviate_1.3.tar.gz |
| Windows binaries: | r-devel: GAabbreviate_1.3.zip, r-release: GAabbreviate_1.3.zip, r-oldrel: GAabbreviate_1.3.zip |
| OS X binaries: | r-release: GAabbreviate_1.3.tgz, r-oldrel: GAabbreviate_1.3.tgz |
| Old sources: | GAabbreviate archive |
Please use the canonical form https://CRAN.R-project.org/package=GAabbreviate to link to this page.


Table of Contents
In Berkeley DB Java Edition, a database is a collection of records. Records, in turn, consist of key/data pairings.
Conceptually, you can think of a
Database
as containing a two-column table where column 1 contains a key and column 2
contains data. Both the key and the data are managed using
DatabaseEntry
class instances
(see Database Records for details on this
class
).
So, fundamentally, using a JE
Database
involves putting, getting, and deleting database records, which in turns involves efficiently
managing information
encapsulated by
DatabaseEntry
objects.
The next several chapters of this book are dedicated to those activities.
Note that on disk, databases are stored in sequentially numerically named log files in the directory where the opening environment is located. JE log files are described Databases and Log Files.
Also, note that in the previous section of this book, Programming with the Direct Persistence Layer, we described the DPL The DPL handles all database management for you, including creating all primary and secondary databases as is required by your application. That said, if you are using the DPL you can access the underlying database for a given index if necessary. See the Javadoc for the DPL for more information.
You open a database by using the
Environment.openDatabase()
method (environments are described in Database Environments). This
method creates and returns a Database
object handle.
You must provide Environment.openDatabase()
with a database name.
You can optionally provide Environment.openDatabase()
with a DatabaseConfig()
object.
DatabaseConfig()
allows you to set properties for
the database, such as whether it can be created if it does not currently
exist, whether you are opening it read-only, and whether the database is to support transactions.
Note that by default, JE does not create databases if they do not already exist. To override this behavior, set the creation property to true.
Finally, if you configured your environment and database to support transactions,
you can optionally provide a transaction object to the
Environment.openDatabase()
.
Transactions are described in the
Berkeley DB, Java Edition Getting Started with Transaction Processing guide.
The following code fragment illustrates a database open:
package je.gettingStarted; import com.sleepycat.je.Database; import com.sleepycat.je.DatabaseConfig; import com.sleepycat.je.DatabaseException; import com.sleepycat.je.Environment; import com.sleepycat.je.EnvironmentConfig; import java.io.File; ... Environment myDbEnvironment = null; Database myDatabase = null; ... try { // Open the environment. Create it if it does not already exist. EnvironmentConfig envConfig = new EnvironmentConfig(); envConfig.setAllowCreate(true); myDbEnvironment = new Environment(new File("/export/dbEnv"), envConfig); // Open the database. Create it if it does not already exist. DatabaseConfig dbConfig = new DatabaseConfig(); dbConfig.setAllowCreate(true); myDatabase = myDbEnvironment.openDatabase(null, "sampleDatabase", dbConfig); } catch (DatabaseException dbe) { // Exception handling goes here }
By default, JE database operations that modify the database are written (logged) at the time of the operation. For transactional databases, changes become durable when the transaction is committed.
However, deferred write databases operations are not written at the time
of the operation. Writing is deferred for as long as possible. The
changes are only guaranteed to be durable after the
Database.sync()
method
is called or the database is properly closed.
Deferring writes in this manner has two performance advantages when performing database modifications:
When multiple threads are performing writes, Concurrency is increased because the bottleneck of writing to the log is avoided.
Less total writing takes place. If a single record is modified more than once, or modified and deleted, then only the final result must be written. If a record is inserted and deleted before a database sync or close occurs, nothing at all is written to disk. The same advantage holds for writing internal index information.
Deferred write databases are useful for applications that perform a great deal of database modifications, record additions, deletions, and so forth. By delaying the data write, you delay the disk I/O. Depending on your workload, this can improve your data throughput by quite a lot.
While the durability of a deferred write database is only
guaranteed when
Database.sync()
is called or the database is properly closed, writing may also occur at other times.
For example, a JE checkpoint will effectively perform a
Database.sync()
on all deferred
write databases that are open at the time of the checkpoint. If you are
using deferred write to load a large data set, and you want to reduce
writing as much as possible during the load, consider disabling the JE checkpointer.
Also, if the JE cache overflows as database modifications occur, information discarded from the cache is written to disk in order to avoid losing the changes. If you wish to reduce this writing to a minimum, configure your cache to be large enough to hold the entire data set being modified, or as large as possible.
Despite the examples noted in the previous paragraphs, there is no guarantee that changes
to a deferred write database are durable unless Database.sync()
is called or the database is closed. If you need guaranteed
durability for an operation, consider using transactions instead of deferred write.
You should also be aware that Database.sync()
is a
relatively expensive operation because all outstanding changes to the
database are written, including internal index information. If you find
that you are calling Database.sync()
frequently, consider using transactions.
All other rules of behavior pertain to deferred write databases as they do to normal databases. Deferred write databases must be named and created just as you would a normal database. If you want to delete the deferred write database, you must remove it just as you would a normal database. This is true even if the deferred write database is empty because its name persists in the environment's namespace until such a time as the database is removed.
Note that determining whether a database is deferred write is a configuration option. It is therefore possible to switch a database between "normal" mode and deferred write database. You might want to do this if, for example, you want to load a lot of data to the database. In this case, loading data to the database while it is in deferred write state is faster than in "normal" state, because you can avoid a lot of the normal disk I/O overhead during the load process. Once the load is complete, sync the database, close it, and and then reopen it as a normal database. You can then continue operations as if the database had been created as a "normal" database.
To configure a database as deferred write, set
DatabaseConfig.setDeferredWrite()
to true
and then open the database with
that DatabaseConfig
option.
If you are using the DPL, then you configure your entire
store to be deferred write using
StoreConfig.setDeferredWrite()
.
You can also sync every database in your store using
EntityStore.sync()
.
For example, the following code fragment opens and closes a deferred write database:
package je.gettingStarted; import com.sleepycat.je.Database; import com.sleepycat.je.DatabaseConfig; import com.sleepycat.je.DatabaseException; import com.sleepycat.je.Environment; import com.sleepycat.je.EnvironmentConfig; import java.io.File; ... Environment myDbEnvironment = null; Database myDatabase = null; ... try { // Open the environment. Create it if it does not already exist. EnvironmentConfig envConfig = new EnvironmentConfig(); envConfig.setAllowCreate(true); myDbEnvironment = new Environment(new File("/export/dbEnv"), envConfig); // Open the database. Create it if it does not already exist. DatabaseConfig dbConfig = new DatabaseConfig(); dbConfig.setAllowCreate(true); // Make it deferred write dbConfig.setDeferredWrite(true); myDatabase = myDbEnvironment.openDatabase(null, "sampleDatabase", dbConfig); ... // do work ... // Do this when you want the work to be persistent at a // specific point, prior to closing the database. myDatabase.sync(); // then close the database and environment here // (described later in this chapter). } catch (DatabaseException dbe) { // Exception handling goes here }
By default, all JE databases are durable; that is, the data that you put in them will remain in them across program runs, unless you explicitly delete the data. However, it is possible to configure a temporary database that is not durable. A temporary database is automatically deleted when it is closed or after a crash occurs.
Temporary databases are essentially in-memory only databases. Therefore, they are particularly useful for applications that want databases which are truly temporary.
Note that temporary databases do not always avoid disk I/O. It is particularly important to realize that temporary databases can page to disk if the cache is not large enough to hold the database's entire contents. Therefore, temporary database performance is best when your in-memory cache is large enough to hold the database's entire data-set.
A temporary database operates internally in deferred write mode and has the same performance advantages as described above for deferred write databases (see Deferred Write Databases). However, unlike deferred write databases, a temporary database is not written during checkpoints and this provides an additional performance advantage.
Temporary databases must be named and created just as you would a normal database.
To configure a database as temporary, set
DatabaseConfig.setTemporary
to
true
and then open the database with that
DatabaseConfig
instance.
For example:
package je.gettingStarted; import com.sleepycat.je.Database; import com.sleepycat.je.DatabaseConfig; import com.sleepycat.je.DatabaseException; import com.sleepycat.je.Environment; import com.sleepycat.je.EnvironmentConfig; import java.io.File; ... Environment myDbEnvironment = null; Database myDatabase = null; ... try { // Open the environment. Create it if it does not already exist. EnvironmentConfig envConfig = new EnvironmentConfig(); envConfig.setAllowCreate(true); myDbEnvironment = new Environment(new File("/export/dbEnv"), envConfig); // Open the database. Create it if it does not already exist. DatabaseConfig dbConfig = new DatabaseConfig(); dbConfig.setAllowCreate(true); // Make it a temporary database dbConfig.setTemporary(true); myDatabase = myDbEnvironment.openDatabase(null, "sampleDatabase", dbConfig); ... // do work ... // then close the database and environment here // (see the next section) } catch (DatabaseException dbe) { // Exception handling goes here }
Once you are done using the database, you must close it. You use the
Database.close()
method to do this.
Closing a database causes it to become unusable until it is opened again. If any cursors are opened for the database, JE warns you about the open cursors, and then closes them for you. Active cursors during a database close can cause unexpected results, especially if any of those cursors are writing to the database in another thread. You should always make sure that all your database accesses have completed before closing your database.
It is recommended that you close all your databases before closing the environment to which they belong.
Cursors are described in Using Cursors later in this manual.
The following illustrates database and environment close:
import com.sleepycat.je.DatabaseException; import com.sleepycat.je.Database; import com.sleepycat.je.Environment; ... try { if (myDatabase != null) { myDatabase.close(); } if (myDbEnvironment != null) { myDbEnvironment.close(); } } catch (DatabaseException dbe) { // Exception handling goes here }


--- layout: post date: 2009-08-26 time: "09:00:00" authors: ["Greg Wilson"] title: How Important is Geospatial Data to You? tags: ["Content"] ---
Software Carpentry currently teaches students how to manipulate text (using regular expressions), XML (using DOM), relational data (with SQL), and binary data. A decade ago, when we first put the course together, that covered everything I'd ever seen more than one or two scientists use. Today, though, an increasing number are using geospatial (map) data as well. How important is this to your work? If the answer is "very", what data do you work with, what do you do with it, and what would you like to be able to do?