Good morning or good afternoon, everybody. My name is Craig Villarubia, and I'm excited to be joining you from Hawaii's lives. And I am here to interview David Hochmeister, a friend, and most of us who are probably watching know David from his extensive teaching, spiritual teachings of a Course in Miracles. He's traveled all around the world extending the teachings of a Course in Miracles, spiritual principles, but more importantly from my perspective, David has really been an example of the Course of Teaching and has inspired many of us with the Course in Miracles. And from a personal note, I have to say that over the years, David has been a symbol for me in leading spirit-led life and a demonstration for us all. So welcome, David. Thank you for meeting with me. I'm excited to talk to you about your new book, as well as some of having an enlightening conversation about this awakening process. Thank you, Craig. Yeah, it's always a blessing to come together with you and whether we do it digitally or I have been to Craig's house and farm where he is right now. And I have to say, that's a beautiful blessing to look out over the Pacific Ocean and have that reminder every day of the vastness. It's quite a little perch that you have there at the ranch. Yes, yes. For those of you who may have had an opportunity to come out here and see pictures online, yes. I'm happily perched up here on the mountain and I look at it as a vast ocean, which certainly symbolizes the depth of our true identity. And you recently released a new book, which has been the inspiration of this interview. Can you share a little bit about the inspiration behind the book, how it came about? I know you've written many books before, but this book, which is titled This Moment Is Your Marathon, it feels a little different. And I'm really excited about it. It seems like the format's a little bit different. Can you share a little bit about your thoughts on it and how it came together? Yes, I've got a copy here. It's a pretty green book with kind of goldish letters and it seems like it's just like most things in my life, it's a result of collaboration. It's a result of inspiration. I think for me over the years with so much traveling and speaking, I think we all kind of get into our function and our rhythm and for me, I was more like a talking mystic just going where I was invited and kind of giving myself over to Jesus decades ago and then it seemed to play out mostly as traveling and speaking. So it was a lot of airplane rides and a lot of hours in cars and lunches and dinners and holy encounters all over the place. But still the collaborations, that's even how some of the other books came about was just people were inspired by whatever they heard or recorded, and it was audio or video and then turned them into transcripts and then into books where this was New Harbinger and Reveal Press basically approached me and there was a man named Ryan who's a very sweet man He said, you're very authentic. It's like, I can really feel this. I can really feel the teachings and I feel the presence and everything. And he was saying, I would really like to have this go out in a more expansive way and really touch people and reach a lot of different people. There are many people that aren't even Course in Miracles students, but they're very interested in spiritual awakening and they would love to tap into it, both the teachings and the practice of it and feel the presence much stronger in their life and feel a sense of intuition and guidance. And New Harbinger, I'd heard of New Harbinger before and I knew that they even had a branch over in England called Non-Duality Press with Rupert Spira and a lot of Muji and different ones and I resonate with Non-Duality. Both you and I, Craig, have resonated for many years with Non-Duality. And we even looked at that, Non-Duality Press, New Harbinger and he said, wouldn't it be great to have kind of a book of some of your really deep teachings that would go out in a way that would be more like, he said, like return to love. I think when Marianne Williamson first came on the scene and put a book out and people were like, what is this Course in Miracles and what is this that resonated in a broader way? Because a lot of my books, you know, some people would even say are more for intermediate and advanced or very advanced students and so that was the spirit of the collaboration that came together. And a lot of people I work with and live with in community and over the years, we had people coming that were from all walks of life and we had a publishing team and a transcription team and all kinds of collaborations going on. And then one year of the whole publications team that kind of dismantled, everybody left at the same time and they were just astonished. The rest of the people looked at me and went, what does it mean? The publishing team is dismantled. It's everybody left at the same time. I said, well, it looks like, you know, we're not going to be self publishing in that way anymore. And then shortly after that, Ryan Berge contacted us and was just saying, would you like to write a book for New Harbinger in a very kind of collaborative way? And we have a lot of skilled people on our staff and it's what we do for a living, you know, we publish books and you teach. And so maybe, you know, I've got a brand new pair of roller skates. You've got a brand new key. So there, you know, I think we should get together, you know, and it's kind of like, that's how this book came about was actually again through a spirit given collaboration where it was collaborating with a professional publisher and I'm open to that. I'm happy to collaborate with really with anyone at all. So when it comes in, it just comes in very obvious, very given and with a lot of certainty. And that began, we'll say like a two and a half year process to bring the book into fruition. Beautiful. And you know, when I said that this one felt different, at the same time, the content is the same, the message I was saying. But what it felt like, I started reading the book and immediately I felt, whereas with the other books and not that one is better than the other is just my experience. I felt like I was sitting at a top.  It felt, yeah, it felt very, yeah, very guided in a way that you hold in my hand, especially when you get to the practical exercises. I really feel like you're sitting with me to say, you know, let's watch this movie together. And, you know, the questions and so I hear you and when you say it was fairly broader because I think it is, although the teaching is still as deep as ever, it seems to reach a new height and practicality, which your teaching has always been practical and bringing the spiritual teaching of practicality to life. So it really takes it to another level or a deeper level. Yeah, I really feel that too. It's the feeling behind it and practicality is so important. I mean, it's always been important, but it just seems to get more and more and more even more important as we go along. I think people want relevancy in their life because many people feel it's a world of sound bites, it's a world of images and so much stimulation. And I think deep down they yearn for a simplicity, but as a starting point, they're just saying, can you give me something that's practical that will really get my attention and really take me in. I think it's the same way when we go to a movie. We really like a masterpiece of a movie that will take us in from that first scene and just take us so fully in and just deliver us to the end of the movie in a seamless way where we're not drifting off. And that's what I really wanted for this book as well. Beautiful, beautiful. And you know, speaking about the book, I just, it's okay to dive into a couple of things that kind of either had an effect on me or sparked something and made things that you've shared and said. And the first thing I want to talk about that you had mentioned in your book that it was a nice reminder that the miracle is never, the miracle is never out in the future. And so often, certainly in my experience when I'm in the grip of what I perceive or in the grip of a misperception, oftentimes I think the solution is in the future, if it's strange, because on some level I want immediate relief, but the belief is that the relief is coming out in the future. So I want immediate relief, but I'm sold somehow on this idea that my relief is going to come in the future with some kind of change in circumstance or form change. But what you're bringing home is no, that's not where it is. Yeah. Yeah, that's that's a key point because a lot of times people have an idea of what their healing will look like. And even that it's still calling forth some images and memories from the past and maybe just associations that they've had and then they're all keyed up for their life to look a certain way. Or they're hoping it will change and look a different way. And I think most everybody can relate to what you're talking about. I mean, where they think, okay, I want to heal mine, but then the world should look different and the people in the world should look different and the politics should look different and the cultural scene should look different. And there's a lot of things that should look different and and really we have to really be willing to let go of that if we're going to have that real authentic, expansive experience that's just unlike anything that we've ever perceived in the past at all. And that's good to come back to that. Yeah, in certainly in my experience, even with Hawaii, we'll use that as an example. It's interesting to see in my experience that even what coming out here or before I came out here, having ideas of what that needed to look like. And then coming here and recognizing and using it as an opportunity to healing that again that I did not know. I don't know my best interest. I did not know really. You know, that's what this was my idea. I still hold on to ideas of what the Hawaii experience was to be. And certainly life is showing me that it usually isn't what it's supposed to be. I really can't think of a time when I was ever right about how it's supposed to be. But funny enough and interesting enough. And you talk about this in the book about and certainly this is a course teaching about how we just don't know what our best interest is in any situation. And you highlight that in no situation. Yeah. Yeah, that's that truly is an invitation to to really release and to let go because we've been trained and programmed to to control and to manage and to fix. We've been trained to kind of chisel our life experience to come out in a particular outcome and if you talk to most people they would say well yeah. Of course I maybe they have an idea of the relationship that they want and and the length of that whether they're or whether they're to be single or or partnered up in some way. The way that their job experiences their career the way they want their career to go. It's a very forward looking vision of life that's very normalized. And then it's it's all really just trying to take the past and shape it into some way to find fulfillment and really of course in miracles like authentic spirituality is more of letting go of thinking you know what you're thinking means thinking you know what your own best interests are in any situation and and then it seems that that's absolutely necessary. I'm thinking of those workbook lessons pretty early on about in no situation do I perceive my own best interest and then then followed up with everything is in my own best interest. What do you mean what do you mean everything is in my own business is you think I'm dumb or gullible but but it's it's really more of a very high high high state of mind in which all things work together for good and let all things be exactly what they are and all that that sense of non attachment and complete acceptance and that without judgment all things are equally acceptable it's only the filter of judgment and the filter of interpretation that brings about discontent suffering struggles and so we're like many sages and mystics and saints have said throughout the ages we're here to clean the mirror of the mind and it's great to come back to that you know that's that's the that's that that core teaching that runs throughout all different types of these beautiful yeah yeah yeah I'm I'm kind of right now just kind of examining my own experience in the moment and it's interesting because certainly you know there are things that seem it's funny how like the thought system can take something like inspiration and turn it into ideas of what that needs to be so let me give you a practical example a real example so you know you know with woodworking has has appeared in my life and I've you know since I've been why I would have never imagined that I'd be working with what doing with stuff and so I spent a lot of time working with what and it has evolved and I just recently opened up a new shop but it's funny because it's taken something that I enjoy or it seems like something that I've enjoyed can easily be twisted into now something that needs to become something with future thoughts of the shop of something that produces money something that you know the concern about the actual end product and whether or not it's good enough. And here in my own mind I also think wow you work you know you work with the course you teach you know you with other teachers you you exposed all these principles yet I'm reminded about how I could be sometimes so blindsided still and how deep the ego thought system is that it's just it come boom just come it just sneaks in. And in my current situation it's bringing being brought to my awareness because of the sometimes with a feeling of like this pressure of you know got to replenish the product that it all just that's her and then how does this happen it's just blindsided so can you share a little bit about about about that how do we best prepare for the blindsidedness of the ego that just all of a sudden before you know it you're caught up. Yeah, I think it's you know when I would read the Bible. I really liked how Jesus was sometimes you know somebody would come up to him and say. Whether it was his mother Mary or someone would kind of even when he was 12 years old you know he was quite famously quote is saying is a 12 year old. Don't you know I have to be about my father's business, you know I mean it just not something that 12 year olds say to your mother, you know it's just Oh, you know, but but that kind of stuck with me somehow that I thought wow this awakening thing it's it's got to be transcend the businesses of the world and of course that's a common thing for the 7 billion on the planet. Whether you call it survival whether you call it making a living or what do you do for a living or what is your business or whatever and then and then when we really look at it you know in course terms it's like there's there's definitely some reciprocity. That's involved in that and I think that's that's where the slam comes in you know.  There's a there's a part of the mind that's just not quite buying the spirit you know it's it's you can call it it says it's practical but practicality means reciprocal practicality means supply and demand practicality means you know replenish your inventory. Practicality means maintain your email base and your, your client base, keep the customer happy, keep the customer coming back and all these things really that cuts across a huge swath of of the human experience. So I think for me, I kind of see how, at some point when I just had this conversion experience and kind of gave it said alright Jesus take my life take my possessions take my skills abilities take my mind, take my future ambitions, take my goals take everything. Then it opened up into a quite a journey. Some would say it was more like writing a wild Bronco. It certainly seemed that way sometimes, like I was out on the Bronco wild Bronco. But it was, please, lead the way and take me into an experience that transcends all of time and space that transcends worries and concerns expectations. I mean I had a five year degree. I was in the University of Cincinnati full time for 10 years and what half of that I would say was a five year degree which had a co op program a practicum part of it working in businesses and a study program and involve design and art and architecture and planning and in many ways, and then to come into the spiritual journey which was really not about planning at all. It was more about being guided than than having set plans and designing mechanisms and means to achieve future goals. It was more of letting go letting go and just letting those those intuitions and those little nudges and those little prompts and feelings take a prominent role in in showing me how to live in the moment. Very different from having a five year planning degree to writing a book called This Moment is Your Miracle. It's like what the heck happened to that to that training and planning. That's this is like the antithesis of everything that was ever learned. So I think that's a common thing that anyone would ask like, you know, I would just love to live a carefree life and oh yeah I heard St. Francis you know he had a bit of a fever after the war. That's understandable. But but then just drifting out and walking through the field and playing with the birds and smelling the flowers and being amongst the butterflies. You know, many people would say yeah that sounds very idyllic but it doesn't sound very practical.  And so this is what we all go through where there's a part of us that wants to make our parents proud and there's a part of us that wants to succeed and be like successful at the world and maybe balance off that success with a very flowing guided life. We would love to bring worldly success and guidance together. And there actually have been books on how to bring the course of miracles into the business and make a better business and you know we see it happen all the time. But the course really and what I found with spirit and Jesus is teaching is that you can't bring the truth into the illusion you have to bring your thoughts your feelings your perceptions, your ambitions your goals, all of it in a package you have to bring that to the light of truth, so that it disappears. And so early on once I got that that was the direction. I think the ego in me was not happy about that at all it was like shaking it. If it had a head it would be in there shaking like no no no no no. We're not going there, but I had already given it over to a yes. I'm going there. I actually want to go there to the Kingdom of Heaven to the present moment. And I'm willing to let the whole thing fall apart. My world, my whatever my grip of control I'm willing to relinquish that. And I'll take my chances I'm going to trust the voice of spirit in me I'll take my chances with that voice. What a ride though. Awesome. Awesome. I, you know, David, I have a thought I have a confession. And I'm sure when I share it with you, you can share your thoughts on what's happening. So, the confession is I've been watching the news. And I and I watched the news and there's an awareness or there's something that's aware of this and why are you watching that you know that this is doesn't feel good. You know there are moments you are I watched the news.  And I know that it's been talked about before in terms of politics and so forth. But I think that it's something that still perhaps we can learn from. So, can you share a little bit about what's happening. What is the attraction.  Yeah, well, I, there can be a curiosity with it. And I think there's a lot behind it, I think, because whether we're talking about children or adults, there's, there's always a certain amount of curiosity. And it doesn't matter whether people are driving on the highway and they see flashing lights and cars slowing down. You know, they, they will keep driving but they will keep their hands on the steering wheel but they are are looking peeking like what, what's going on they're curious. I think part of the mesmerism of this world is there's a curiosity with events to curiosity with appearances that that is it just wants to know why why do people watch the news why do people read the newspapers or get get their news digitally. And really the question then comes down to what's the purpose, because there can be a part of the curiosity that still is part of wanting to figure something out. And maybe there's even a safety security survival aspect to that as well. And, and yet, I think there's a part of us that knows that the more intuitive we get, and the more we surrender into this peaceful, still quiet, intuitive aspect of us that small still voice within that that even that curiosity is going to fade away at some point into some kind of acceptance or some kind of contentment, you could even say just plain contentment just being happy, happy. Or as Byron Katie says loving what is, you know, we kind of have a feeling when we hear that from her we go, ooh, that's, that sounds good. So, for me it's not so much whether to watch or not to watch because I know over the years when I would be traveling. Sometimes I would wouldn't see the news for long stretches of days and weeks and then I would go to a mall and I would go through a TV shop and the very things I would hear on the on the TVs as I walk through for five minutes through a television sales shop would come out in the talk. You know, I would say oh wow that's interesting that the spirit like scooped up just what what was needed for the talk, and I would be like wow look at this is coming right out and people loved it they said it's oh my gosh. He's a mystic but he actually knows that there's a war going on. So oblivious to we can he can actually talk to us about the war that's happening or the protests that are going on or the shortage of water or electricity or the weather patterns that are going on. I find that what is it for it's it's it's the motive underneath there's nothing wrong or right about anything really informed it's it's what is it for what are we using it for. And then I think with the serenity prayer you know, I love the serenity prayer and I feel like a course of miracles is just an expanded version of the serenity prayer and the 12 steps. What you can change what you cannot change and the wisdom to know the difference is the spirit it's like to me it's all right there in the serenity prayer. And the course just takes you right in and says okay let's let's really go at this to have the experience that the serenity prayer is pointing towards. The thing about it is is that that what we do have control over is the direction of our thinking we we can choose our state of mind, but, but we learn in the in the rules for decision section he says you have no control over the world you made. He's talking about the ego, you have no control over the world you made and that is so counter to human experience.  And the circle is a very deep teaching this really teaching us that it's everything we're perceiving as part of a pre arranged script that actually is already over, and that you don't really have any choice whatsoever. That that runs completely counter to human experience you know that that's why people say oh yeah you lost me on that one that's like what about free will what about choice and and so actually what I see the real question is is do I want to be happy. Do I want peace of mind. Even in the workbook of the course Jesus says to say that you want the peace of God is nothing, but to mean that you want the peace of God is everything. So again it's coming down to a sense of desire of wanting of valuing and of purpose. And that is is so glorious as soon as we get a glimpse of that. We are on a journey towards simplicity, we're on a journey towards heights of happiness, expansive joy, true freedom and and true awareness of love and God and truth. And it's so so powerful. I wrote a book many years ago when I was working with a group of students, a small little intimate group up in Michigan Traverse City Michigan I a little book called purposes the only choice. It's a tiny little booklet that our friend Jason that you and I know took to the like the Swiss Alps to to read like a couple sentences from it, and then just go off and meditate on like a sentence from it or to because it's so direct. And I find that that's the way my whole life has gone I've gone so deeply towards the experience in sorts towards the purpose that that was the first booklet, and for most of the planet it's incomprehensible. So that's not generally people would say no you don't you shouldn't be writing books that are completely incomprehensible. And it came out as the tiniest. It's a little booklet like this big and, and called purposes the only choice but people said it. You lost me on the first page. And the same thing about Christian emergency a lot of times Christian emergency, you know, every five minutes he would speak he would lose like another 1000 people in the audience and then he'd speak another five minutes and they're just staring off into space. One of my fondest memories watching Christian emergency videos of people like looking off into space as he, he was teaching, because he was going so deep so fast that nobody could hang with him. Now I find here it is. That was my first booklet. Lilo brought it.  See how it fits in my hand. It's nice it's so small it's meant not to scare people. That's why I made it so small. But now I've got a bigger book. And that for the very reasons you mentioned that it's, it feels like I'm holding your hand it feels like I'm taking you through exercises. I'm offering parables there are no parables. This book is so straight. But this one has the parables the exercises. And so, I don't know if for me it's like everything in my life is backwards. I. Don't write books, become famous, travel the world and, and write on the, the fame or the book or the whatever. It's, it's more grassroots like I'm, I'm so grassroots I'm so into the experience that I dive right in to go for the experience. And then I'm on some kind of a magic carpet ride, like Aladdin and I don't know where the carpet's going. I don't know who's moving the carpet. And I don't know where it's I'm not don't know how this is going to come out but I do know that it's all backwards. So, it's kind of an interesting experience I think it's an experience based on trust and faith and divine providence and then he first the kingdom of heaven and all else will be added unto you that's kind of been the parable of David has gone in that direction. So when, when I watch the news. I am just in a state of mind where I'm aware let's use the political news as an example because there's a lot of people that are talking about that now it's just they don't feel happy they don't feel comfortable. They don't like what they're seeing. And then they turn on the news the next day thinking, it's got to turn at some point or it's got to make a turn but they're not seeing a turn.  So, this illusioning, and then I am so open minded I see, like on YouTube, a channel, a traveler from the futures is coming back and saying this is going to go on for years to come way past 2020 that that you know and and then I tell people I go, Oh, God, I'm having trouble taking the next day and don't even say that that this this is going on first for a long time. But for me, I actually don't I'm not looking for the change in the world. I took that line to heart in the course you know seek not to change the world seek rather to change your mind about the world. I, I loved that that we had William Whitson you know who was was so involved in the United States government and ambassador to China worked for the UN, and he spent decades literally in civil service. When I first saw that first story of a course in miracles movie years ago. And here's this guy William with this distinguished man who'd spent decades of service in the United States government and the United Nations saying, quoting, seek to change the world seek rather to change your mind about the world. It was that line but it was that person speaking that line. And then he married Judas scotch becomes Judas scotch Whitson. He's in charge of the translations into 20 some, you know, languages of the world and he has the most, you meet him in person and he was the most distinguished, sweet, kind, gentle person you'll ever meet. And you see that he actually gave up on his whole life's journey he gave up on the politics he gave up on on the government he gave up on on trying to change the world which he gave such passion towards that and yet somehow he took that line to heart that moved me when I first encountered that that that got me looking even closer like can I really change the world can I make a difference in the world. Is it worth putting my mind effort into making the world a better place. And I, I got through William Whitson's great wisdom and through the course and Jesus's wisdom is no. Don't put your mind's energy in that direction. It will not bring about a real change when you are tinkering with the effects, and you haven't changed the purpose in your mind that you will have absolutely no impact whatsoever at at tinkering with unreal effects that come from an unreal cause which is the ego in your mind. So once I got into that then you could say my purpose for watching TV and movies and reading the news or watching the news change it just took a 360 to before it was all about making the world a better place and I was quite an activist myself at one point and then it flipped around to I need to forgive the world, and that is my only function is is to forgive the world. So that's that's what it was for me and it's still the same for me I was I will sit there and listen to people talk about different politicians and different strategies and everything like this but but actually I feel the sweetness and the love that's underneath those thoughts. But I don't. I just don't believe in him anymore. I really don't believe in the world. Awesome. Awesome. Well, thank you for lifting the guilt off my shoulders about watching the news. It's beautiful to hear how how we can use whatever it is for the purpose, a higher purpose to whether it be watching the news or otherwise. Thank you for the reminder and thank you also for the reminder what I'm hearing and I'd love to hear and so would be reminded this idea of really not having a choice, because it feels like the burden of guilt is lifted. When I accept that I don't have a choice it's like guilt shows up only as a result of thinking that I, I did something, whether it be a wrong decision or something that I did but I open up to the possibility that and this was back to what you said in the beginning of the interview that all things work for good there are no exceptions. Then I can accept the innocence in anything regardless of whatever it is that I perceive. Yeah. Yeah, I think another line that helped me is that there was a part in the course. Of course Jesus talks a lot about the holy instant and and desiring it and and and entering into it, but there's a one point where he said that just as the separation occurred over millions of years, the correction or the reparation will occur over the same amount of time or perhaps even longer. And when when you read that it's, it just suddenly it's a different context. And then with such a context like that and what we call world events. And I kind of see that that the that the salvation script was written long ago, and that things are indeed working together for good and that I'm starting to feel like almost like the presence of Jesus, the hand of Jesus, the presence of Jesus behind everything, everything I see on the news, everyone I meet everywhere I go.  That's leading all of us home in which there's no mistakes in which it's like that part in the workbook what could you not accept if you but knew that everything that that happens is is planned for you by one who knows your good, you know, I'm paraphrasing a little. I mean, there's some kind of presence behind that.  Whether it's interpreted as perfect or not that's that's a question of purification but but but that there's really there that it's really all working together for good. And I have to say that that's really what's come to me now I feel like I'm feeling that now I'm feeling that. So that's why when people meet me and they tell me what what they feel and what should be different everything. I'm just looking into their eyes and thinking how adorable they are and how wondrous the plan is and that that it's all going right in in the deepest truest sense. All things are working together for good. I'm starting to feel that really is a very palpable experience. And then I hear people say, Well, David, you're just so happy.  It's fun to be around you because you're really happy. You have a joy, you have a glee like a childhood glee. There's an innocence. And I'm like, Well, that's that sounds good, because that's how I feel. But I think there's a trust underneath that I'm really trusting in the divine plan in a very deep way and and and really enjoying it to really enjoying savoring it. I'm definitely not looking for future solutions. And some people may say that I've lost all my marbles and David's not all there and that's okay too. I mean, I actually, I can relate to that too. I'm not all here. It's true. It's beautiful. You remember one of the first things you said, when I had interviewed you a few years ago, and that stuck with me still does and I may have repeated it as well is it seems like that there are certain people that live in the divine providence, but in actuality, we all live in divine providence. The question is, are we aware of it. And so that sticks to me because if I'm not aware of it, it refers to how I'm fighting the moment or fighting what's happening. There's certainly a block to the awareness of divine providence. And you mentioned it requires a purification of the mind. Can you share a little bit about purification of the mind? Yeah, I think the purification of the mind is really just allowing all fear to vanish. And to me, it did come to me like, I did have a certain point in the parable of David where I just started to take note like, what is it that I actually believe? And what are the thoughts that are moving through my consciousness? And I really just watched them for a while and I went, wow, there's a lot of fear. I am really bought into this fear of consequences. And I'm doing things that I don't like to do. And I'm working the jobs that I'm not interested in. And I'm feeling like I'm stuck and I'm a victim. I'm at the mercy of the world. And I really had to take note of that, that I was operating out of a fear-based thought system. So when I say purification, I mean a real clearing of that fear, a real sincere and comprehensive release of all fear. And I know that the world teaches, no, you've got to have some joy and happiness and some fear and guilt. But I don't believe that. I feel like that's not our destiny. You know, it's not what the Bible said, Jesus said, be ye perfect as your Father in heaven is perfect. He was actually calling us towards a perfection, not perfection in form, perfectionism of behavior and trying to be perfect in form. But I mean, as a state of mind, as a being to open up to that purification and that perfection of I am as God created me. So, yeah, I really had to take note of that. And then I started to just take it piece by piece. Like, what is it that you think you're doing all this for? What do you believe in? I wanted intimacy. I wanted a sense of freedom, happiness, peace of mind. I mean, I really laid it out. And I was talking to Jesus very honestly saying, here's what I want. I don't know if it's right or wrong, but here's what I want.  But he said, actually, frankly, you've been going about it all the wrong way. You know, your intimacy is so connected to bodies and bodies together. And his teachings were, you know, minds are joined, bodies do not. Wow. That's a different view of intimacy. And I was pretty much into freedom too. I know I put a lot of energy on wanting to be free. I'm talking about the 60s. I was a child of the 60s. I was kind of walking around with the glazed eyes and I was quite young in the 60s. But I, the flower children, you know, I wanted freedom as much as the flower children in the 60s wanted freedom. And then when I got into the 70s and 80s, Jesus said, very good freedom. That's beautiful. That's beautiful. You believe it's freedom of the body. And you have been working so hard to get a free body. And he just told me, he said, that's impossible. You are asking the impossible. You want freedom of the body or freedom of the mind for both you cannot have. And if you're really interested in freedom, I will train you how to, like the matrix, how to free your mind as Morpheus, you know, tells Neo. And so Jesus took me right in that direction. Like, I'll, I'll give you freedom. I'll show you freedom. So I think that's good news for all of us that, that we do want these things, freedom, happiness, joy, intimacy. We're perfectly fine in asking for those things. And actually that's our birthright, those things. But we've just, egoically, we've been going in the wrong direction and we've been seeking for them where they can never be found, which is very frustrating. I think probably there's nothing more frustrating than reincarnation. And then people will say, oh, I had this great deja vu experience. It was amazing. I swore I was here before and then Ken Wapnick came along and said, all experiences on earth and our deja vu experiences. We're just rehashing the past with every single thing we perceive, everyone we meet, everything we pursue. It's one giant looping deja vu experience. Thank you, Ken. That's saving me thousands of years, you know, to start to let that in to my awareness. And then we, we decided we're going to be miracle workers who grew up thinking they'd be a miracle worker. I didn't. I mean, I, if I'd have brought that up at the dinner table, you know, they would say, you know, you bring that question up in Sunday school with your Sunday school teacher, you don't talk about that kind of stuff at home. But yeah, you know, here we are, you know, given our lives over to being miracle workers. Well, yeah. Yeah, certainly, when you touched on the, the, the parable gave it in the fear of consequences. Well, it's certainly resonated in the sense that I can totally see how that can show up in my experience that I showed up at my experience where there's a fear of, if I do this, then there's in the mind there's an assumption of what that outcome is going to be. Or, you know, even as I contemplate it now, the, the assumption about consequences is that the cause is in the world or the cause is something that I do. Like, you know, I want to avoid this consequence. Oh, I don't want to cause it by doing something. And so it's like this trap that I'm in, because I believe there's cause in the world or that I can cause it or that I'm responsible for, you know, some outcome in the future. Yeah. Yeah, that's it.  It's going to blow your mind. It's, when people ask me, what is these last few decades been? It's been mind blowing.  And I, I've lived there too, you know, I lived on the Big Island. But even after I had left the Big Island, there was you where they come back and visit and, and invited Nikita and I to come on Easter to do an Easter retreat at the farm. And us showing up there and oh my God, 190 some acres of preciousness, overlooking the ocean, looking into the eyes of the animals and eye gazing. It was so wondrous.  What was that red sports car? Was it some kind of an Italian? A red Miata. A red Miata parked out there.  So off Nikita and I go driving around the Big Island in a red Miata convertible sports car. I'm, I'm just like, look, and I, you gotta be kidding me. But this is the way it's gone. It's almost like the spirit floods you with so many miracles. But, but I wasn't trying to visualize them. I wasn't trying to, you know, use a vision board or draw them in as if it was something out of the past that I was trying to fantasize. I'm just showing up to be healed. And then the spirit brings in the most wonderful symbols, where you just are laughing all the way. And you're thinking, okay, what did I do to deserve this happiness? Right before I came on this show, I was, I was having lunch with Suava and I were having lunch with a friend from Germany and another friend I knew from Michigan.  And at the end, I had, I had, I think I needed to ride the hamburger. I'm just asking the participants, is anybody are anybody going in that direction, because I need to get to the airport.  I've rented a big brand new Mercedes. And if you'll drive the Mercedes on the Autobahn, then I'll let you, I'll give you that ride to the airport. So there I am in some mess of Mercedes on the Autobahn with no speed limit. And I've got my pedal going down and if I had any hair, it would have been flown back. And I'm going along cruising and everything. And, and a car passes us on the right side. And so my friend, my new friend, he looks at me and he goes, kick down, David, kick down. And like, go faster. Like, okay. You know, but just so much fun with sports cars with this any kind of whim that you have in your mind when you're doing it for forgiveness when you're doing it for the glory of the whole, then it just comes flooding in at you. But there's no personal sense of trying to make it happen. It would be like being in a movie where the spirit knows all your whims and is going to just flood you with all these whims, just because you said yes to serving spirit. So that's what I've been trying to do for these last three decades is tell people, hey, listen, this is no sacrifice at all. I'm telling you, when you give it over to spirit. Don't think that you're going to be woe is me and destitute and, and alone. It's actually not that at all. It's, it's, it's a flood of experiences to say thank you as if all the angels, all the universe is thanking you for, for this holy purpose. It's been fun. I have to, I'm the first one to say I'm not. This has not been a struggle. A ride of joy. Thank you. And I feel that joy and down. Yeah, that's beautiful. That's awesome. You know, we're winding down with our time, time on this video, but my before I let us go. Yesterday, I was crossing the street, Billy Street in Kona. And there was no thought I was just crossing the street and perhaps it's because I'm from New York, we come to just throw ourselves in the street. And a few cars will go around the other side. I don't know, but I did, I did that. And there was a woman who I then learned was hesitant about going into the street. But it wasn't until I got to the other side where she's like, you know, thank you, thank you so much. You know, for going ahead of me. Because, you know, she then felt the ability to cross. And so I want to say thank you for going ahead of us. And certainly helping us through through this unwinding. I appreciate it and I thank you for joining with me and always enjoy joining with you and I know we'll always be joined and I will also join with you at some point in form as well. So that's all welcome. Thank you so much for the hour. We appreciate it. Thank you, Craig. Thank you, Craig. I love you and it's always just a joy to connect with you, no matter how or where or whatever this is for in this world, you know, I feel your heart and yeah, I love you so much and I'm with you. I'm so grateful. Beautiful.


Good morning. Let us first look at the execution of some of the sample programs which we will discuss in the course. So, this is this one just draws a simple window. There is another one which draws a window which is titled CS 101 window. Of course, you cannot see this here, but in a smaller size, can you see a string written in between? What does it say? Oh, you can read that. So, this merely demonstrates how you can write text in a specific box inside a window that you have opened. Here is another sample which says give a width and height for the window. So, let us say 15 and 15 and then it says how many points you want to draw. So, it is basically you have let us say electrocardiogram analysis your various points on the ECG. You just want to display them. Of course, here I do not have an ECG. So, I am randomly generating points and displaying them with some labels. So, let us say I want to display 10 points. So, what the program does is it generates 10 random points using the random number generator, but uses then graphics to plot these points. So, can you see this? So, it says 0th point at 3 1, 1st point at 4 4, 7th point at 4 2 etcetera. Remember the coordinate system is x is increasing in this direction and y is increasing in this direction. Here is another sample. It draws pattern. So, these patterns are drawn by straight lines. So, you draw large number of straight lines at a particular from starting point to end point and you will see patterns there. All these patterns could be drawn basically it is line drawing with a specific purpose. Here is another program which draws some basic shapes rectangle eclipse or sorry ellipse. This is another shape drawing program arbitrarily it expects an input any input I can give here. So, this is drawing more shapes and each of these ordinarily would be a very difficult task to write complete graphic program. So, remember the classes that we mentioned somebody has written a window e z window library of classes. The first class was simple window which we saw. There are other classes like rectangle shape, line, ellipse, text etcetera, etcetera using these we showing this. Here is a one which draws any picture. So, this is called a bit map drawing. The e z windows has a facility that if you have any bit map image you can display it there. The problem is that it expects bit maps in a specific file format called XPM. Remember I had mentioned a lot of file formats. So, normal file formats are BMP, JPJ, etcetera etcetera. So, ordinarily this was a photograph from my camera which was a JPEG file. There is a convert utility which comes along with the e z windows package it will be available with you. So, you can take any image is practically any format is a convert to XPM it will convert it to XPM. Once it is converted you can show it. This program is not just simply showing that this program actually illustrates that you can move this image. So, basically how to capture a mouse position. For example, if I move the mouse here you can see the pointer here. Now, if I click it will move the image that side. If I come here and click here it will move the image here. So, basically there is a function to capture the mouse movement and set some position and there is another function to erase an image at some original place and redraw it at some other place. There is I have not compiled this. So, let us say I want to I want to plot a graph let me compile. Incidentally you cannot compile this program using normal compile it requires a special thing I will discuss what that compile is. So, let me compile this new sign and then let me execute this new sign it basically plots a sign function. Why is it plotting? So, slowly just to illustrate that various points are plotted after every 500 points I have put a sleep command a sleep is another inbuilt function in Ubuntu. After the word sleep in bracket you write some number those many seconds it will sleep. So, in fact it is worthwhile. So, here you see if count module of 500 equal to 0 sleep for 1 second that is what I have stated. Suppose I just command this recompile this and run it again it will draw it quickly. So, it is drawing a sign graph, but you can draw any graph. Notice that the points which are drawn here are different from the points which you drew in earlier graph for the ECG there the points were sort of small rectangular block. Here I am using a different technique of remember what I said that you cannot draw points in easier window.  So, that becomes a point it is cheating. So, these are various programs we shall see the graphic classes and how to use them and so on. Now, this is what you can do. So, most of you if you wish to add any kind of graphical user interface or any kind of graphic display are most welcome to use this. There will be a tar file called ezwindows.tar.gz and the instructions will be there in the next week's lab handout. There is no regular lab no assignments, but use that all the sample programs will be there. So, you can actually compile see they make some modifications and actually read those programs to understand how graphic programming is done. The important point in any class library is that so far you know we are seen all the procedural programming paradigms if then else why to simplify matters we learnt how to write function definitions. The whole idea is how can I reduce the amount of text that I have to write in my program and yet achieve something remarkable. So, to reduce this I keep on looking for things which I have to do multiple times like a function call and then I say I write that function once and that is the end of it. In exactly the same fashion the object oriented paradigm extends that notion to permit you to define classes, member functions and objects of those classes. So, once the class properties are defined somewhere any object of that class that you define automatically inherits all member functions and you can execute those member functions. That is the reason why the graphic programming becomes so simple that somebody has thoughtfully prepared a large number of classes, defined all the member functions for those classes, defined all the elements for those classes. In fact, when you write your project programs you are expected to do that you can either use classes and class library functions or you can use conventional functions the choice is yours. So, we shall be seeing a few things before we look at the graphics thing which was supposed to be at the end. We will look at another preprocessor macro which is an extension of hash define and then we will revisit the notion of classes and objects in the process we shall see another important class library which is provided by C plus plus called string library. We shall see how the facilities compare with our conventional handling of strings a very brief exam and then of course we shall spend some time looking at the graphics using these air windows. So, here is the notion of preprocessor macros you are familiar with these you know if I said preprocessor macro name followed by a sequence of tokens. Sequence of tokens is a keyword it is actually a list so far we had used only one item say 45000. Remember last time we discussed this that if I say hash define max size 45000 and later on in my program if I say int field data max size an array I am defining with max size as the value and then somewhere else I have for int k equal to 0 k less than max size etcetera. So, I might use max size many times in my program, but because of this hash define macro physically all the max size occurrences will be replaced as if in a g edit find and replace by the number 45000. So, this helps as I said you can define a fixed size or typically max height max weight or whatever such parameters once and use them many times and if you want to change that you need to change only once in your program recompile and everything will work. There is a greater usage of such preprocessor macros because these macros also permit parameter substitution parameter definition and parameter substitution almost like functions almost, but they are not functions because functions are invoked dynamically here the preprocessor macro is invoked in the preprocessing state before compilation. So, let us look at one of these is called a parameterized macro a parameterized macro will have a macro name followed by certain parameters and these list of tokens will use those parameters for defining what the replacement is going to be. Consider this for example define absolute x. So, absolute is the name of the macro x is a parameter and wherever absolute something occurs in my program it will be replaced by the right hand side instead of x that something will be there. What does this macro do if x is greater than equal to 0 question mark. So what is the value of this expression you remember this kind of if statement this condition is evaluated if it is true the value of the expression is the first value written if it is false the value of the expression is the second value all that it is doing is it is setting the value to either x if it is positive or minus x if it is negative in the process it is getting absolute value of x. Now every time I need an absolute value I will have to write this kind of expression or I will have to put an if statement if z greater than 0 then exp value equal to z else exp value equal to minus z and then use exp value wherever instead like the abs function in built in library of c you have absolute definition of yourself now if within the program suppose you write this statement z is equal to 5 star absolute y minus 73.5 the physical occurrence of absolute y will be replaced by this. So this is compiled before compilation so your text itself will change and then this text will go to the compiler of course it will correctly compile you can of course write macros with multiple parameters and all those parameters will be taken remember it is not that this x is replaced by all of this. So this y is replaced by all it is not a single character replaced it is absolute bracket x bracket. So the word absolute is to be replaced but what it will be replaced by is decided by this and instead of x whatever parameters you have given will be used for it. So this is clear simple we look at another class in c plus plus called the string class and the string library this is completely different from the conventional library that we have been using which is called what c string. So we say include c string in our programs this is the library that we use and so far how we have been denoting or representing strings we represent strings as a null terminated sequence of characters stored in an array. So you have to take the responsibility of defining a large size array then push characters one by one whenever the last character of a string goes in you have to push a backslash zero c in and c out statements for example automatically include a backslash zero at the end. Similarly whenever you want to operate upon those arrays you have to actually keep looking at those characters individually terminate your processing when you encounter a backslash zero. There are built in functions like string compare string copy etcetera they all depend on the fact that there is a backslash zero at the end and there is no normal operator available you want to concatenate two strings why cannot I say my final string is equal to this string plus this string of course that plus should not be meant to be a addition of numbers. So if I use plus in the context of such strings it should mean concatenate now how do I convey this meaning the notion of classes permits you actually not only to define member data elements not only to define member functions but it also permits you to redefine operators for that class. Now since plus is already defined as an operator for addition if you redefine that it is called overloading the operator like you have a truck which is already carrying lot of luggage you put one more package on top of it you are overloading the truck now that package is different from other package it is exactly the same fashion if the symbol plus is used in normal arithmetic it will mean plus in any C plus plus but if you use it in the context of strings of this special class then it will suddenly mean to the compiler that concatenation is implied let us look at some example string class that is the name of the class. So the library that you use is not C string you have to say include string the string class itself is defined in C plus. So let us see the definition you say include string here string means get the string classes of C plus plus library I want to use them. So let us look at how it is being used I am now defining C string is a class so I can define objects of the string class the string class is actually normal string that you deal with but you do not have to worry about backslash 0 nothing like in fact you do not even know how these strings are internally reprinted you do not even know that is a private data member of that string you do not have to worry about how it is reprinted. So you just define objects let us say str1 str2 str3 these are three string objects each one of them can contain a string what is the maximum size of the string you do not have to worry about it it is a implementation dependent size it is a very large size you can actually assign two string one or any one of these objects any string of it you do not have to worry about of course if there is an exception the system will crib about it later notice what I am doing str1 is equal to computer this is not an assignment I am making to a character array which must be done only at the time of definition this is an assignment I am making to a string object and this is perfectly valid. So when I say str1 equal to something in double quotes that string becomes a value of str1 str1 now is a proper string object similarly str2 is equal to programming if I say str1 is equal to str1 plus str2 str3 equal to str1 plus str2 this plus is the concatenation of notice this c out str1 less less two spaces less less str2 what does this c out produce this will produce on the output computer blank blank programming right. Because I say c out str3 what will I get so there are a few subtleties which you must keep in mind blank spaces in between two strings are never automatically put together. So you need to put them separate you can actually do something like str1 itself you define to have a blank here or while concatenating nothing prevents you from saying str3 equal to str1 plus double quote blank double quote plus this because double quote blank double quote is a string constant. So just like you are saying c out the difference in c out and this is that c out will merely print strings in a legible fashion but internally if you want a composite string computer space programming as a single string you can't have it without concatenating. Now you will recall that if I have a first name middle name last name of a person it was greatly difficult for me to extract these and put them separately and so on. I could actually have a data structure in which first name is stored separately last name is stored separately and yet I could create a full name equal to first name plus blank plus second name and that would become a valid full string with full name I can do variety of things like just as you have functions in classical c string library to compare strings to concatenate strings etcetera. There are some functions in string library as well however c plus plus still depends largely on the classical method of representing strings. So what it does simply is it provides a special function called c underscore string what it does it will take a string object from the class library and convert it into an array of string with backslash 0 at the end. So you can take any string convert it into a regular array and then do whatever processing that you want to do normally later on you can again assign it back to a string object you will get that object back. We again visit the notion of application programmer interface because that is the most important conclusion that we can derive out of all the studies of different elements of programming that we have seen so far namely while we can write programs for anything and everything detailing every small action that we wish to take it makes a lot of sense for us to rewrite to write some commonly used statements together originally we saw that as a function now we know that we can do that as a class library with class member functions. Now whenever you write functions in the classical style of c plus plus or whenever you define classes and member functions the function names actually provide you with a application programmer interface. That means when you write your main program you are actually invoking only that function name with parameters function name with parameters and you are only defining either objects or variables of the specific type that you have. So these function names and the parameters that you need to pass to functions and how the functions behave becomes an application programmer interface problem. In fact I would say if is a application programmer interface problem because if you say if x greater than 0 something then the c plus plus defines how that particular segment will behave. So every statement in some sense is a application programmer interface but most of the statements are direct instruction and API is a higher level abstract considering this the modern programming of any professional style actually attempts to define as many APIs as you can that is part of the design of your project or design of a large programming system unlike normally when you start writing a program for anything that any problem that comes here you will first think of writing either functions or classes and member functions and you may not write the full details of the implementation of each and every function or class but you should write that prototype what you are doing you are defining an API. They are saying that while developing this project while developing this large program these are the APIs that I will use that you can define at the design stage. Now somebody else may have a responsibility of implementing those APIs. So writing the detail functions writing the detail doing the detail testing etcetera. Now API is a very common term in most professional programming. EZ window happens to be a package which has taken this API to heart what they have done is they have assert the int main routine int main routine when you use EZ windows cannot be written by you they say we write it instead they say you have to write a program called API main and link that with my library which contains the main. So that is a peculiarity it is normally not so normally you would be entitled to write your main program and combine it with other APIs through the class libraries through the function libraries etcetera. In a nutshell then any API will consist through functions. So prototype function definitions and the parameters must be known or public member functions of classes which also constitute an API. It is in this context that we look at the graphics. Remember last time I mentioned very briefly what a graphics window system would be. So basically we want to deal with graphic objects we want to draw graphic objects on our screen. We typically draw these graphic objects in some windows. So whenever you work on Ubuntu for example you will open a editor window you will open a terminal window you may open a browser window for files and you may say click here for this file edit it save it there go to terminal compile it run it these windows help you. So far in all these windows you have been displaying editing and using text but the fact that text is being displayed in different windows the fact that windows are being displayed with some borders should tell you immediately that there must be some basic graphical capabilities available with the system. As a matter of fact all systems after it was discovered that you could handle pixel level drawings on a monitor. The early monitors were not like that the early monitors could display only text nothing else. But when these graphic monitors came into being operating systems and programming languages realized that I should be able to exploit this facility and show some graphics. Various graphic libraries were built at the PC level or at the personal computer level these were the first ones to be built. In fact the first major graphics was built by Apple computers way back when their first Apple machines were meant to be used by individual people. Microsoft followed suit and of course Microsoft windows became the most popular operating system so people started using that. Unix which was originally not meant to be used by individuals it was meant to be a server class operating system did not pay attention to graphics and audio for quite some time. However somewhere around 80s and 90s a major project was undertaken in some universities in the US and in AT and a graphic library or graphic system got developed which is called X 11 graphics. So X 11 is the name to the base root graphic facilities in any Unix machine. X 11 is not very easy to use directly it was meant for programmers with high exposure to that kind of handle. Now people wanted something simple to use so a large number of graphic packages were then developed around X 11 to give you simplified facilities. EZ windows is the simplest of the simple packages which actually uses X 11 at the base. It permits you to draw different windows, it permits you to draw different shapes like rectangles, circles, lines etcetera, permits you to write text strings, permits you to draw bitmap images. This such packages are developed and used. Now EZ windows is actually a library of classes. So it is not a library of functions. The API is not a function called where the functions are the API is a class interface. So what you have to do is you have to use all the classes which are defined in EZ windows in your program define objects belonging to those classes and operate upon those objects using the member functions which are defined for those classes. So as long as you understand what are those classes what are the properties of those classes and how do you invoke member functions you are done everything else will be taken care of by the library. As I mentioned you need to name your main function as int api main you cannot name them as int main that is the requirement of the class library EZ window.  So the window will have width and height and window will have certain position and window will have some text which is written on top. So this is a simple window. Having drawn a simple window I might want to draw various shapes here. I want to write some string here. These are the facilities I want to learn how to use such facilities in the graphics window. So here is something that we had very briefly seen last time. EZ windows is the library name and the major class is a simple window class. A simple window class permits us to define a window object. I can have as many windows as I want and I can render all of those windows keep all of them alive and draw something in one window something else in other window something else in third window etcetera etcetera. Each window will be an object of the windows class. Remember EZ object is independent. Each object is worked upon by the member functions of that class. So in one window I can draw a rectangle, one window object, another window object I can draw a line whatever I wish to do. The basic way of defining an object of say W of this class is to say simple window W and then I write some name here sample window CS 101 window, my window, abrakad abrakad whatever. This becomes the title that will come on top of that window. Please note that the window style is frozen. You cannot control it. The window style is a boundary then a line somewhere and a text title that you specify is written somewhere. The font of that text is frozen. You would like of course when you become professional programmer you would like variety of freedom in that. Why do I have to write font in a small size when I write text inside the window? Why does the title font come like that? Can't I change the font? Can't I change the style? I should be able to but EZ windows does not permit. There are other windows packages which will permit that. Once you define an object called W all the member functions of that class can operate upon that W. So W dot open is a is a is a W dot close is a F. Here I have specified something called width and height but you can also specify the position where this window should appear. If you don't prescribe the position there is a default. Incidentally when you download EZ windows there is a whole lot of documentation available which describes every class every member function of the class the meaning of the parameters in those member functions and what is the behavior what are the return values etcetera etcetera. I would suggest that you should read that entire manual first as a storybook and then maybe attempt to look at executing some of those programs some of those features. Here is a rectangle class remember a rectangle class is a different from window class window itself is rectangular but that is incidental. Having drawn a window say W inside that W you want to draw a rectangle. So how can you do that? First of all you have to specify the window in which it is to be displayed because you might have multiple window objects in that window what is the position in which you want to draw the rectangle which color you want to draw that rectangle and the width and height of a rectangle. So once you specify this the member function which can draw rectangle can actually draw this. There are several member functions draw is the major function. So once you define the attributes of a rectangle object remember rectangle is a class. So you have to define a rectangle object once you define a rectangle object with these parameters it can be drawn it can be drawn where in the window in which you have specified that object. Draw is a plane draw suppose you have drawn suppose you have drawn multiple things now you know somewhere briefly that in this window W 3 there is a rectangle object called R 5 but I have forgotten how I have drawn this R 5 or may be a friend of mine in the project has drawn this R 5. So I do not know what color he has where it is drawn etc. I would like to enquire from the EZ window system where have you drawn this I can do that by running any one of these functions get color will get me color of that object get width will get me width of that object get height will get me height of that object here is a sample program. So I mentioned sample program I am just describing a few simple samples the detailed of S 1 S 2 S 3 S 4 S 5 S 6 S 7 all of these I will be uploading it by tonight. So it will be available along with the tar file that you get for graphics you can use it apart from these there are various samples that are already available. So here is a definition I say simple window W my first window W dot open type any character to remove it either controls here some there is a small problem in EZ windows package the program you will be executing on terminal window which is one window when you execute this program another window will be drawn. Now typically that hidden cursor actually goes to that window no input can be accepted from your terminal because that window is not alive at this moment the new window which are drawn is alive. So you have to actually drag that pointer by mouse click on to your terminal window and then type a character to terminate this particular how do you write a text in a window. So this is your larger screen and this is your window. Let us say this is my window and in that you wanted to write a string like we saw namaste CS 101 students. Now the way you write a text is you first define a bounding rectangle for the text. This rectangle is not a rectangle shape you define the position of some winding points that left corner is here left upper corner is here right lower corner is here within that text whatever within that bounding rectangular space any text that you write will be displayed. So this bounding rectangle is a hypothetical thing it is not visible to you you have to define this position and this position and once you define this position and say please display this string here the string will come here for example namaste whatever whatever what a string you write here is a program which does that notice that I am creating a 15 by 10 window notice that the system that E Z windows follows is that first width and then height is written. So 15 is the width 10 is the height notice that this simple window H W which I am opening this H W is short for hello window I want to say hello to my students so H W CS 101 window is that title that will appear in that window this will be the width and height and additionally I can specify parameter position. So 1 comma 1 means that the whole window with respect to the screen will start at 1 comma 1 this 1 2 15 10 etcetera are not pixel value these are centimeters actual centimeters can you tell me why it is not pixels and why it is centimeters first of all pixels are often relative to a particular hardware that you are using suppose your computer has a large resolution number of pixels will be 1800 6 by 1600 a small machine like this it may be 700 by 600 so it is very difficult to write in terms of absolute pixels. Secondly things become hardware dependent also on what is the pixel size a centimeter is an absolute unit it does not matter on which computer you run this for that computer that library will automatically convert these centimeters into appropriate number of pixels depending upon the current resolution that you have set for your hardware and that is why easy windows uses size in centimeters of course you can write fractional centimeters it will appropriately compute. So here I am defining a simple window H W this object is defined here in my main program when I say H W dot open this window will be open that means this window will be created next you remember I have to define a bounding box for that text. So this is what I do here I first I want to write my namaste CS 1 on students in the center of that window now notice this I know there is a window called H W but I need not remember where that window is the absolute position on the screen of my text will depend upon where that window is if window is somewhere here the text should be here window is somewhere there text should be there how do I know where the window is I want to find out the center of the window for that there is a thing called get center. So for any window when I say get center this member function will get me x and y coordinates of the center point of that window automatic now that I assign to another class object called position position class I name an object called center I could have said x y whatever I wanted this center is not a simple single value this center has x and y coordinates that is the definition of the member data elements of class position. So position also is a class so I extract into the position class member center I could have said position center semicolon and later on I could have said center equal to this but I am initializing it in the class member definition itself. So center is this now I create the bounding box for that text. So position upper left position lower right remember position is a member so it is instead of saying x 1 y 1 x 2 y 2 position means some x and y. So I call it position upper left I a member of the class and that is equal to center plus position this. So notice that in classes I can actually handle two points to be added center is a point position minus 1 minus 1 is a point. So what I am doing with respect to center I want to go minus 1 minus 1 and that becomes my left corner similarly with respect to the same center I want to go plus 1 plus 1 that will become my right corner and in this two centimeter by two centimeter box I want to write my text. So the notice how the arithmetic is being done it is not normal arithmetic okay having done that I can display the text for which there is a member function called render text h w is my window object it could have been any windows if I have five windows in any one window I can use that window dot render text and whatever I write will be rendered there. Render text require these parameters upper left lower right these are positions okay is not x coordinate y coordinate x coordinate these are positions which incidentally have x and y coordinate and then I write the string and I can also specify in which color I would like to write this. Unfortunately e z windows being a simplistic system it does not permit me to write millions of colors although the underlying x 11 windows permits you to draw individual pixel with any color e z windows system because it is limited to simple shapes text etc etc it does not permit them. So it permits some few colors which have been named specifically red blue green black these are the colors which have been named then what are the names they are also available you can use those. So is this clear how do I draw a rectangle I want to display points with labels so here is this is my window as I said there is some text here some title now in this window I want to draw points as I mentioned to you there is no member function which says draw point or draw a pixel. So I will approximate a pixel by a rectangle suppose I want to draw a point here let's say somewhere here I will draw a small rectangle which is visible to me I can draw it in any color so that that particular blob rectangle or blob is visible to me just drawing a point in any kind of representation is not very meaningful because I want to write some associated text with that point so that is like text but it is called a label for that point and I can write that label somewhere here along with these are the facilities that I seek let us see how do we write these points and labels notice the way I am mixing the conventional data structures such as character strings and the classes here I am defining a function called display data is my function what are the parameters of display data first parameter is a pointer to simple window so whichever window I want to display data in w h w w 1 whatever then I have an integer array it's a multi-dimensional array many rows and two columns two columns will contain x coordinate and y coordinate. So these are the electrocardiogram points that I have got I call them ECG signal notice the way the parameter is passed ECG signal name itself will be a pointer but when you pass a two-dimensional array the exact nature of the two-dimensional array storage is not known to the called function unless it knows the columns and rows it so happens that if it knows number of columns that is sufficient for it to calculate the pointer addresses because the storage is always row major why so first row if there are two columns then first element 0th element first element then 0th element first element 0th element it is known only columns need to be specified explicitly you can of course also specify the rows that is not objected to but this is one way of doing and then there is of course something called size which is the actual number of rows which are used remember in your declaration you may have a 500 points thousand points of water so as many points as you what am I doing I am saying for i equal to 0 to size minus 1 I am getting the x coordinate as i 0 and y coordinate as i 1 apparently somebody else would have assembled this entire array of positions x and y for those points having got these I want to draw a point so I define a point to be an object of rectangle shape you get my point rectangle shape is a class of that class I define an object which I call point it is a incidental name I could have called it anything P R1 whatever what now this point has which are the parameters of this when I create this object I am specifying z x y blue 0.1 0.1 that means x is this y is this blue is the color 0.1 to 0.1 and in which window I want to draw it the window pointed to by z and z is the pointer I have got z is the name of the window so z is the name of the window remember this does not draw a point this merely defines an object but this object is being dynamically instantiated in my program in the within the executable I am creating an object now this is something fundamentally different from defining your arrays and int and float variables you can define something in between but all those definitions are instantiated at the compile type after compilation there is no new memory allocation no nothing happens in case of classes and objects your objects are dynamically created any memory that is required to hold information about an object is demanded by your compiled program from the operating system give me so many bytes I want to create this object the operating system will give you so many bytes and this object will be created so this object is created using dynamically available values of x and y and having created that object now you said draw so point is the object point dot draw means draw that point this point will be drawn now you want to put a label to that point you are defined a car array my string 80 the printing of label is you print a string first s print f that means print a formatted string using I which is the point number and x and y coordinates and this you are printing as percent 2d percent 2d percent 2d you have inserted a character at so you will actually get say 5 at 10 comma 20 so 5 is the fifth is the point number at is the word it's this is the string now this string instead of rendering it as a text line which we had seen you can render it as a label item label is another class so you are creating a object of class label called item what are the parameters for this class objects first the window in which you want to draw second the bounding parameter the same thing left corner sorry sorry this is x plus point 2 y plus point 2 so this is not the this is not a bounding box that you write in the text but this is the starting position where you want this label to add up here what you are defining is that if my point was somewhere here then just below it I want to write this so it says x plus point 2 y plus point 2 my string so this string will appear there you saw that example will once again go very quickly through those demonstrations so you will see exactly how this program executes and renders it once I define this item I again have to say item dot draw it will draw that displaying patterns you had suppose this is your window and the point is if you draw a line first this line then let's say from here to here then here to here then here to here and here to here so you will see some pattern emerging like this what this program is doing is it is drawing lines like this first drawing from horizontal line then you go down y and before the last point of x so you draw another line and last line drawn will be this vertical so you will get a pattern like this then I am also plotting in the same program a mirror image so I am plotting lines which start from the right most corner here so I draw this line first then maybe this line then maybe this line maybe this line etc whatever and I will get another pattern so it is the other way that I write this line this line and so on let's see that pattern here is the way I am drawing those lines notice the use of assert library which is useful even here what I am asserting here my window dot get status get status is another member function this get status tells you whether window open or window closed so I want to it's just like file is open or file is closed so if I say window dot get status it will it should be window open if it is not window open I want to assert that I want to say that assertion has failed I want to get out I define x y and i j as float and I draw some lines to create an interesting pattern my window is 15 by 15 so notice what I am doing I am running a loop from x equal to 0 to just 15 less than 15 in steps of point now on my window I first render a line from position x 0 to 0 15 minus x as x changes you will notice that this line will also shift like this first directly here then here then here and this I draw in black simultaneously I render another line which is 15 x and 15 minus x 15 so 15 x x will be 0 initially so this becomes a y coordinate so I am drawing a line starting with x equal to 15 y equal to 0 going up to x equal to 15 minus x that is 15 only and up to 15 so 15 0 15 that is the line I am drawing so full vertical and then accordingly that line will also shift so when I complete this iteration it would have drawn a large number of lines creating the pattern that we we saw we will see that again displaying shapes again the same thing we already seen how rectangular shapes are written drawn but I can actually draw triangular shape with some color inside I can draw a line I can draw an ellipse for each of these these are all separate classes defined rectangular shape line ellipse etc etc for each of these there are member data elements that means there are some parameters by which you prescribe those values and again render line render ellipse or draw all such member functions are available how do I display bitmaps is my window and I want to I have a photograph now photograph will be in a file so let us say I have a file called pick dot j p j agreed is the most common file I will have from any digital photograph first I will have to write it use a convert utility which is part of this program and get this file converted into pick dot x p m x p m is a file format with which the easy windows can deal with so easy windows a member function which says load a bitmap with this file so what that easy windows member function will do is it will open that file read all the pixel specifications and draw those in whatever area you have defined so this will be actual picture how it can do that it then permit you to draw pictures it then permit you to draw millions of colors but remember it is ultimately based on x 11 window system which can do everything x 11 has a fundamental facility of what is known as raster image drawing raster means going point by point point by point and drawing something all that is that windows apparently is doing is it is invoking that facility and taking pixel data from the image file and putting it so you can draw bitmaps anywhere that you want any bitmap that additionally what that program does is that that program actually draws a bitmap then permits you to move the mouse somewhere and says you click oh you want that bitmap to be redrawn here so how how does that picture move actually picture cannot move so what you do is you erase that picture and read all that picture at new police so it appears as if the picture is moved and you can do variety of very interesting graphic things you can actually give an appearance of movie so many animations for example like if you are simulating the movement of a ball under gravitation when it is thrown so it will come out here bounce back go further bounce back you can actually show different points and show the ball and you erase redraw erase redraw erase redraw so it will keep moving like that you can actually demonstrate an animation here is a standard definition of a window that we often use say window 1 25 by 15 position 1 comma 1 now I define a bitmap object so bitmap is another class remember the nomenclature it typically is first letter capital and some other word letter capital incidentally my colleague miss feroza has written a set of coding standards so I will be putting them up and it is expected that when you write your programs you try to adhere to those coding standards so that programs written by anyone will look very similar in structure similar in nomenclature that is a mandatory requirement in professional programming environment we would like you to learn part of it so bitmap is a class and of that class you are defining an object called w 1 b m p and this object is stacked to the window w 1 which I have defined that means whenever I ask the system to load that bitmap or draw that bitmap it will be drawn in w 1 because w 1 is implicitly associated with that object called w 1 b m p this w 1 b m p is my name I could have given any name to it the way I display bitmap is like this I say w 1 b m p dot load scene 1 dot x p n this is an absolute filename which means it must be in the current director so as I said the scene that you saw was the was the scene from some picture from my camera I use the convert to convert it from j p j to x p m I have got several other things which we will see that you remember I had shown you a fingerprint image a fingerprint image in e z windows can be displayed like that I have a robo picture sony is the name of my esteemed colleague is a professor he was like you one of my students in c s 101 course he is the first one to introduce e z windows in c s 101 when he taught it most of the programs that I am demonstrating were originally written by him I have merely modified them it is only appropriate that we see his photograph in the demonstrations so you see that what I have done is in the sample programs all the files are there and these are all commented so you can simply remove those comments recompile and run it of course a far better technique would be in actual practice you want to show different pictures in your windows you should ask for a file name as input take that file name which is a normal string and put that string array of characters here as a parameter and it will open them so these are all definitions of bitmaps when you load nothing gets displayed all that is happening is that w 1 b m p object which was defined by you as a bitmap object now contains data from the file so load merely means inside memory you have an object defined the data is on file b m p load dot load will mean take the data from that file and put it inside this object bitmap object later on when you say w 1 b m p dot set position and w 1 b m p draw so this will set the position initially it will draw at 1 point 0 1 point 0 and then it will any position that you give it will draw at that point and this is the exact issue that if I want to keep the image moving if I change this position then it will draw at that position but I must first erase the image so just like w 1 b m p dot draw will draw w 1 e b m p dot erase will erase plotting graphs we do not have a function to draw points we used rectangles earlier now we will use to draw a line using w dot render line w is a window in which I am drawing a line line is from position to position but if I give the same position here and same position here then obviously it will be a line from point to point and hopefully I should get the point this is blue what is this 0 point 0 this is being defined as absolute x and y okay I will leave it to wonder you just look at the documentation for line render line see what those parameters are you will find out it is it is trivial before I shift over very quickly we will see we have seen most of the samples I just show you the last few ones to tell you how they work but this is how you use z window there is a tile dot gz package instantly this package also works on windows environment there is another version available so those of you have windows machines at home you can try and use them but Ubuntu this is how it will work so you should compile and link your programs using a special script api compile so instead of saying c++ you should say api compile myprog not myprog dot cpp I will tell you the reason in a moment okay so the program is myprog.cpp and it will create an executable called myprog you can simply run it by dot slash myprog okay this is the reason why you should not give something dot cpp remember I told you the compilation phase consists of preprocessing then compiling then assembling and linking here I have shown different portions in api compile there are different commands api compile is known to be a shell script so when you try api type api compile actually the commands in this file get executed one after another the first command is c++ minus i user x11 r6 include minus i something something so this tells the compiler that before you compile include these files just like your include dot you have said include something dot h include c string normally c++ will automatically include some standard libraries you have given include here also you would have include statements in your main program but where is the location of those that depends on where your ez windows is the way you will style your location is you will install this package you will have a ez windows directory in which there will be include lib etcetera etcetera and there will be a samples directory where your sample programs will be there so notice that I am saying include this x11 r6 x11 is the base library revision six of them that is not with you that is somewhere in the main system that is why slash user slash x11 r6 slash include but this says dot dot ez windows slash include that means I am in the samples directory above me below next to me is a include directory which is part of ez windows so I go first go to ez windows and go to this include it minus c so this means you just compile do not create a final output assemble pro link program so minus c dollar one dot cpp will create dollar one dot o that is the object now it says c++ minus o create an output file called dollar one using dollar one dot o and then link it with user x11 library minus x11 minus l dot dot ez windows dot lib minus l ez windows slash user slash lib etcetera etcetera all these additional libraries get created when you install the package so this is the program which draws a this professor sony this photograph I think belongs to the time when he was like you a student here but he currently heads the sitara and a world renowned authority in basic algorithms and so on so we can also keep moving sony wherever we want there was another one where I have a small bitmap image of a robo so these are our robo and robo can be made to dance like this now here in this program I am moving it as per the mouse click nothing prevents you from writing your own ingenious algorithm whereby you can make the robo dance around nothing prevents you from drawing a maze and make the robo walk through that maze nothing prevents you from writing a complicated intelligent algorithm to figure out what should be the next step that means that robo should take and make the robo move there now what we are looking at are display characteristics how to handle display underlying any project that you do there has to be a lot of interesting and useful computations that you do independent combine that with this and you get a absolutely production grade industry grade professionally written software so that is why it may be useful I thought you would like to use that there was a shape thing I think you look at these shapes there could be many shapes that you could draw any kind of shapes you could draw here I have drawn a red rectangle and then a white rectangle on top if I had drawn this line earlier this portion of the line would have gone since I have drawn this line later it superimposes on this you can see variety of graphic characteristics so in conclusion I will say that using the easy window classes and class libraries you now have a reasonably good facility to handle any kind of display that you want to look at last year people created using the same easy windows snakes and ladder boards they actually showed the movement of coins there the people who have done all all kinds of crazy things using this ok you are most welcome to use them thank you so much


Hey everyone, Drew with GeoArm and I am back to talk to you about the Geo Alarm Control Panel and more specifically the GeoKit XL or the GeoKit Extra Large. This is our largest kit. It comes with so much equipment. You got 30 door window contacts, 10 motion detectors. I mean it's built for bigger installations. So this will be the unboxing. You'll get to see all the equipment and things like that but the first thing we'll do here is I'll show you. You've got to take the slide off of the box, okay. We'll get inside of the panel here. On the inside of the panel is going to be the standard kit you're going to get your welcome letter with your account number, your name, a brief introduction, three steps to get going as well as the QR scan codes so that you can get your videos to get your Geo Alarm Control Panel program correct. Alright, we'll move this to the side. The next thing you're going to see is the Geo Alarm sign. It's very durable, made out of metal and does not fade. This is a very good sign. Go ahead and get that mounted as well. In here we'll go ahead and we'll take the packaging off. You'll see the Geo Alarm Control Panel inside of its foam outer casing to protect it even further during shipping. Okay, we'll move that to the side.  In the kit you'll have three door window contacts, one motion detector. If you went with the doorbell this will be flipped this way, you'll see doorbell and it will be included in the kit. If not, this box will be empty and it will be flipped like this. Here's your power adapter for the panel and on the side over here we have all the additional equipment. So as I said the kit comes with three door window contacts and one motion. So we have 27 additional door window contacts here and we have an additional nine motion detectors even though I believe that this is probably counting out to eight right now but it's nine. You'll get nine on the side with the additional one motion in the kit. And ladies and gentlemen that is our GeoKit XL. This was the unboxing. If you have any questions or any comments please leave them below but other than that take care and have a great day. Please like and subscribe to our page for helpful programming and installation videos, product reviews, monitoring, products and more. Visit www.geoarm.com or call<PHONE_NUMBER>. GeoArm, the worldwide leader in DIY security.