We will talk about CoachTV and he has been using MongoDB also. Learned about it, yeah, I don't know anybody, so what do you think about it? Yeah, we will talk about, maybe, comparing them with the kids, so it's quite interesting to see, like, both sides. And yeah, we will just exit the floor with this. Thank you guys. Sorry, it's not a really nice session, but it's enabling. It's not as exciting, it's pretty boring, less JavaScript-y. But yeah, it's more about HTTP, less about JavaScript, but we'll see. So yeah, I'm Srikanth, work for a small company called Dacus here.  Here I am.  Remind everybody, anybody use Remind? Yeah. So, it's a simple Remind-based thing, let's see if it goes. CoachTV, have you used CoachTV or how many have heard CoachTV? Used? No. Okay, so do you think it will be better to sort of run through what it looks like and what it is before I go into the talk? Yeah. So yeah, so this is, yes, so yeah, the mantra is relax, so just apply and get to home, maybe drink a couple of beers. So this is, so you log in to, so you just see this standard, hey, welcome to it, CoachTV sort of thing. So underscore utils is where you go to sort of see the foot on. Foot on is the web UI. It's nice because it comes built into CoachTV. All right, so simple things, everything's a database, let's take, say, package metadata. So how many use Node.js? How many are aware of this thing called Node.js? Okay, so basically this is the backing thing for Node.js. All the modules are right here, so you can dig into the modules. So just to brief this thing, two things to remember about CoachTV, HTTP and JSON. Like it's a JSON stored, uses HTTP for everything else. So this is a representation of the document. You can edit it, you can, this is the JSON representation, it's a slightly nicer representation. You can modify it right here to save stuff. Okay, let's say I want to add a category to this guy. Hit this button, hit this button, save. So I just added an array into it. So basically it's a standard document, so it has arrays or hash as it feels. And you can add any number of them, like anything else. Save document, yeah. You can just search by package, you can do that package sort of thing. So yeah, it's basically very simple document store. But there are a bunch of things that you can do with it. Let me log in first. That's good, that's when it's kind of password. Okay, so it has a simple HTTP on this thing. It's not like MySQL or anything, super secure or whatever. So if your security is your concern, then probably avoid CouchDB. It's just the latest version has HTTPS, but before that there wasn't much. How many of you have used MongoDB? Okay, so it's a decent balance. So to be honest, I haven't used MongoDB that much. My colleagues forced me to use it because that's the deeper choice. And yeah, sometimes I'm stuck over it. You can see what my preference is obviously. Yeah, I think MongoDB has a very effective marketing department. Exactly the opposite on the Couch side of it. They have screwed it up so badly that people are, should I even use Couch one? There's Couch base and there's Iris Couch. Iris Couch is the hosting. I don't know what it runs though. It runs CouchDB, regular Couch. Can you talk about how you take very... I'll come to that. Yeah, that gets into slightly complicated stuff. So I wanted to keep it for the end. Okay, so everything is a document. The only concept you have in Couch database is documents. So when you say all documents... So there are documents, the real physical documents that you actually store and retrieve. And there are design documents which are sort of metadata to the document database. That's how you use CouchDB to retrieve data. I'll show you that if the light turns up. Are we just taking it out here? So let's... Should we be okay now? So there is a section called design documents. And that's also a special kind of document. It just has a different type to it. Anything that has underscore is reserved by Couch. So underscore utils is reserved by Couch. You can't have a route that says underscore utils. Or basically anything like that. Underscore design is also a special listing. Language JavaScript. And there are these things called views. I'll come to that later. So we can actually do a quick look at how this works. So this is a view called call. You can look at the code here. It's all JavaScript. You actually have an option of choosing between JavaScript and copy script in the latest version. I think I said reference JavaScript. Basically there's some JavaScript you write to output this data. That's as simple as that. You can look at another view called rank. That's what it outputs. We'll see how you use it. This is the code for that. This is a little simpler version of that view. Basically it takes... So what it's doing is... We pull some information from GitHub and say how many watchers, how many folks are there for this project. And rank of a project is basically some of that thing. And we say emit rank and description. I'll come to MapReduce in a better site if it's going over. But yeah, so you run views to get data. Simple. The only other thing I want to talk about is the replication. Wish I could show here... Sure. So basically replication is a way of getting data from one place to another. Replication is one thing that CouchDB does better than any other database around. Like, you get no question about it. So you could do something like... Like what we do is there is a central NPM registry which we sync into our CouchDB and make modifications sync somewhere else. So I have basically spread this NPM registry around like in 10 places now. So it's just trivial to sync. Has anybody synced MySQL recently? How easy or hard is it? It's not easy. It's probably not that hard to set up. But once... To keep it going is really, really hard. It's a non-privilege. That's why you pay VBAs so much money. Not true in CouchDB. It's just... You hit this button and you say, Okay, let me actually... Let me try duplicating one database right here. So... Let's say... Registry is a very big one. And I can say continuous. So any updates to the package metadata will actually update automatically here. Yeah, so it's it. Okay, done. Ready to go. You can look at the status here saying, Like, yeah, 8% done on MySQL. You can go back. You can see that the numbers sort of increasing. It's really fast. Now it's already synced. So I can do exactly the same stuff. Exactly the same stuff on this database as well. Like, think about running it on the phone and like syncing it from a central database and running it on the phone. Just looking at all your contacts. Just running off local phones. This thing. Anyway. So, yeah, so that's like a whirlwind tour of CouchDB. Any questions? So just another thing. I mean, I generally miss context, like lose context very quickly. So if you have questions, ask right away. I'll probably forget at the end of it. Any questions? I think... Also, just quickly. Replication events. Even the events of it. Finishing replication and all that fires events. Like, is there a way for me to know when it's done? No, you don't have a way to know when it's done. So the only way to do is status. Or you can look at the changes feed. Oh, the changes feed. It comes in the changes feed as well. Awesome. So you said you could have CouchDB in your mobile phone. Yeah. And then you can work offline. Yes. And then you can synchronize it with the... Exactly. Exactly. So Couch is available both on iOS and Android. I don't know about the REM side of things, but yeah. We basically have... Like we've written apps that basically... People use tech... Like basically on Akash, you run CouchDB, go to the village, take all the medical information, sync it up to the database. It's really cool. It's really... That's when you sort of see the power of... What you can do with this sort of thing. You can press the tablet, right? Yeah, press the tablet. It's still in use? It's in use. It's going to be so much better. So yeah, I think a lot of people are either prototyping it or using it as a test bet for doing maybe the next version of it or really seeing if there's a use case for using that sort of devices or maybe the higher versions of it in the future. So this stuff was for jargon-based hospital, basically. Who go to the villages and get patient information. Okay. So yeah, this is sort of my agenda for the talk. Hopefully... So keep me in time because I know it'll overshoot the whole thing. So I'm going to talk about the data store. Writing the whole stack application, something that Meteor sort of popularized recently but it's been around for like three years. Well, not the same way, but sure. Data store, the whole application stack. I want to talk about where it shines, where it does really well and the bad things in couch. I mean, couch has its own couple of big issues, actually. And then if you guys are interested, we can have a conversation around the couch versus Mongo. We'll see. So how many people are familiar with Capital? Capital. Consistency, availability, party, and tolerance. Okay. So basically, I'll do it very, very quick. This thing. So there's at least, I think it was in 2000 or something this guy called Brewer said, hey, you can only choose between consistency, availability, and party, and tolerance. And like, till then, till then the whole available, till then consistency was the biggest thing. I mean, every database had to be consistent. If I ask you for how many, how much is your bank balance? It can't be 2000 or it can't be 5000. It has to be 500, exactly what I've arrived at that point in time. Over a period of time, especially the scale, people started thinking, hey, availability is more important than being consistent. When it's okay for me to show, this underscore package has 500 followers, but actually it is 600 or something. I mean, it's okay. It's not making the fundamental difference to anybody else. So there are these choices you made. So we can talk about it offline. I mean, afterwards about what it actually means. Basically, they said you can only choose between consist two of these three. Either it can be partition tolerant and available, it can be consistent and available, or consistent and partition tolerant. What Couch TV chooses is something, say I'm not going to be consistent. I'll be eventually consistent, but I'll be available and I'll be partition tolerant. Like I'm leaving some unanswered questions. Availability means it's always going to be available, whatever happens. Either it's down or it's up. There's no inconsistent state. Partition tolerant says, hey, I have a net split and I have two servers, one in California, one in New York. Will the apps still work? Will they have to talk to be consistent about it or something? Am I making any sense? Yes, yes. You can ask questions. I'll assume something. Availability is it cannot possibly be down. Sure. And the partition tolerant basically says that if you partition your database and say that you've cut the connection between two masters there, can these two remain available or remain consistent? One of those two is possible. He's better at explaining things than I am. So the choice that Couch has made is being available in partition tolerant. That's also the choice that Dynamo has made or Werdermor has made. That's not the choice that RGDMS just makes. They're always consistent, they're always available. They're probably not partition tolerant because they need to think about three good articles about Brewer's Capital. So basically, the gist is Couch will not be consistent at all the time. If I've written some information into my mobile phone and want to sync it up somewhere, the central database will not be consistent with what information I'm giving here. So they're showing two different information. And that's the gist. At some point an application will happen, they'll sync up and they'll all be consistent. But it's not consistent at every time. So three things to remember. It's a JSON store, has an HTTP API and designed for application. I showed you the JSON store, so I'll run it pretty quickly. So the fundamental thing with Couch is to think of not relations. If there's a contact, he has addresses. It's actually embedded inside his field. It's not a separate document that you create somewhere else. So it's a slight modeling paradigm shift, but I think most people are familiar. I have one number, it belongs to me. It can't be in a separate table somewhere. So what it basically avoids is joints. But yeah, so that's the model it takes. I'll skip the modeling part of it. So it's all, it's just strings, like it's ASCII or Unicode, whatever. So it's a non-properative format like Mongo, like Nobisans. So the advantage is it's very easy to do full-text search. It's probably a hundred lines of code to do the Couch Lucene project. There's probably a hundred lines of code. It's just that simple to just hook into the change of speed and write everything into Lucene. So that just simplifies a whole lot of things. Not having relations and joints removes to an extent, removes a lot of locking bits. Also the fact that it's MVCC. MVCC means multi-version concurrency control. Basically it's like, think of it like, every document, every check-in is a version. Every document is a new version. So it stores all the JSONs. Version two was different from version three. It has version two as well as version three. Maybe actually I can show you here. So you can see this is the current version of the document. So it has this thing called previous version. So there's an exception. But basically the thing is because it's replicated, it won't keep all the versions. The central has all the versions. Let me see if I have my own document. So this created a new document because I added this variable code. Now I can go back and see what the older version was. And it's also appended only. So it won't modify in place like MongoDB does. It's just a completely new document. So this sort of also reduces the need for locking. Which is what MySQL, like if you've sort of done MySQL tuning or something, you'll see at least 50, 60% of the time is actually figuring out what rows to log, which ones to sort of not let in, which ones to allow to query sort of things. So that's where most times, MySQL is tough for example. So it's also to improve synchronization. I think once you have like versions, you just take the latest version, sync it to the other machine for replication. So that's one of the reasons I can't see the older version because the application only takes the latest version. Is there a way to force complete application? Complete as in with versions? Yes. No, I don't think there is any. Like there are work around sweat, but no, like you could basically copy that whole database file. The other problem is most people don't want it because I'll talk about it, I guess. Because you're actually appending the whole document, especially for big databases. If you see the actual registry, the NPM registry, it's like 9 gigs, like for 11,000 documents. One because it stores a lot of stuff. So basically big loads up really, with this space loads up really, really fast. So I guess that's one reason to avoid it. But MVCC, basically it just gives you the latest version. And if somebody updates it, it does the same standard optimistic locking sort of thing. Make sure you're not updating your old document, so it'll give you, hey, can't save it. But especially in case of replication, when you don't, users don't have control over it, it'll create a document called conflict and let you actually resolve conflicts manually. But there is a deterministic way of doing it. So really quickly, I just pick one more deal. So every document has an ID, which is what is identified. And like I said, underscores are couch reserved. So ID is known to be a couch thing. It also has a revision. So is anyone familiar with the material? Yeah, so do you remember, can you relate it to the material revision tax? Basically it has a nice number and a sharp associated with it. So that's what it uses to say, find the version that I'm dealing with and that's the sharp, that actually almost guarantees me that it's something. Or hit on the other hand just like the sharp and no nice number. So yeah, maybe I mentioned it earlier, schema-less. Like you can put anything in there. It doesn't matter what you put in, as long as it's the correct taste one. Still making sense? Everybody, I'm the same. Okay, so the other awesome thing about it is HTTP. The fact that everything is HTTP. I think I started using couch like two and a half years ago and when I saw it, it was like so out there. To me it was completely out there. Nobody at that time, I think even now other than maybe Mongo for example, uses JSON as a store, just simple JSON. Even now I think I don't know of any other database that has a pure HTTP API. It's just not, in a database world it's just not done. It's just such a big performance that people don't do it. To me it was a really exciting thing. Everything is restful. I did talk about database. Everybody knows what rest is. Like the very basic thing is the repression. It gets a document or anything. It gets a resource basically. Post will create a new one. Put will update a new one. Put will update existing one. Delete will delete the resource. Simple. So the API is really obvious. If you want to create a database, we just say post to this URL. That's it. I have a really complicated way of showing that. But I guess you don't care about it. All of them are URLs. Just sort of. We created a document like that. We created a replication. A scheme itself is created by our post. You can properly get, I haven't ever tried it. This is the current status of replication by getting that replication with ID. But I haven't tried it. And there are design documents. I showed you some of the design documents. Maybe it's a good time to step into MapReduce. Anybody familiar with MapReduce? Okay. So I'll show you the views. But maybe I should just talk about MapReduce. So that's another exciting thing about CouchDB. At that time, a couple of years ago, nobody had MapReduce. Google had just published it in 2005 or 2006. The whole MapReduce paper. In the next two years, it was already there. It was already there in this database. I don't think other than Mongo, nobody else has MapReduce built into it. They have a loop to deal with it externally. Internally, but not internally. So quickly. So if you see this, let's see this. Let me show you an easier database. So with MapReduce, you have two functions. Map and Reduce. Let me show you an easier one again. What we're trying to do is basically say, one of the things that all these no SQL databases tend to do is to say, don't design your schema first. Design first your queries, how you want to access your data, and then figure out how you store it, or how you write your views, or how you write your queries around it. Views are one way to approach that problem. Actually, in CouchDB, views are the only way to approach that problem. So you say, I want to rank packages based on how popular they are, like popularity based on number of watchers plus number of quotes. So I will limit the rank and the description. In this case, actually, it's a bug that the doctor description isn't there. That's why it's showing value. It's nothing. I can just say, ID, save it. So this is building the database. The view itself. So you probably know views are incremental in CouchDB, so if it's computed, it won't actually recompute it again. So this one will be really fast. Like it's done. Like it's just go back and come again. It's just done. It's just like a couple of milliseconds maybe. If you change something else, let me see what I can change here. It takes a long time. Basically, what it's doing is it's taking all the 10,000 documents that I have into the view, into this MapReduce function and computing it again. Once it computes it, it's stored it. It won't recompute it. So in general, it's really, really fast, good for read-only applications. Read more applications. It's not the very intensive application. So the easy way to explain MapReduce is you take a whole bunch of data, split it into sections and compute on that, and then merge the information. So think of Map as selects. I want this sort of data. Like in a standard SQL this thing, it's like these are the things I want in my query. And Reduce as the... Can I use a whiteboard somewhere? The canonical example is like word count. So... We have a whiteboard, actually. It's behind the regular JS. Okay. I can have a little bit. There is a lot of fragments. We can find a fence. So maybe we can do it offline, after we finish it. I think it's important to understand MapReduce to know how the views and retrieval works. But basically think of it as letting the data running some query, stop one, and then applying that, passing that to Reduce so that it can be sliced down. Like Ruby, anybody Ruby? Or JavaScript? Like people? MapReduce are like the standard underscore function, right? Yeah. So it's exactly that. Map basically takes a whole bunch of data and transforms it somehow. And then Reduce just... Group by? Yeah, exactly. Group by. Sorry, I couldn't explain. But yeah, there are lots of examples. The canonical one is just word count. How words in a document is... And there's a good paper on it. So I think most of us should know about it. Cool. So yeah, simply Map does the select. Reduce does the grouping. Yeah. And there's a standard function to it so you can just run that through. So in this case, if you see... This one takes a doc. Doc is the actual document that needs to be mapped. And you can do whatever with the doc. And you can have a Reduce function. In this case, there isn't any... In the case of... In the case of this complicated function, I have a count. It's also written as... So it's equivalent. So it's just a shortcut for... underscore count is just a shortcut for returning that. And here is a small button that says Reduce. So Reduce is optional. You don't have to actually Reduce all the time. It's just like SQL. You don't have to group by all the time. And it will give me the number. So basically, what it says is there are like six packages and four for analytics. This I should have done this earlier. But yeah, 24 for API clients. Sort of thing. Is Reduce clear? So is this distributed? So no, this is not distributed. So this is the caveat with the Couch TV MapReduce. It's not. It's just local. Cloud and... If you use a Cloud and sort of service, which is distributed Couch TV, but it's not... It's a distributed view building, not distributed MapReduce. Sorry, I think I have a lot to cover. Yeah. Basically, so I've gone through views. Basically views is to... Wait, you just use views to create. And people tend to create a lot of views. So this is what we've created for... You see a whole ton of views. Like, hey, give me all the good ones. Like, it will take a really long time because I've not built it in a long time. So these are the ones that I'll get. So you can look at the code here. So the thing to see is all of them are stored into design documents. This is how it's actually stored in the Couch TV. Like the whole JavaScript is stuck in. And you can just modify it here. Or you can modify it in the... Quick question. Can I use underscore.js for writing my views? Yes. So basically, actually, if you're on 1.2, yes. If you're on 1.0 and below, no. Basically, any common.js module can be stuck in. Oh, okay. That's cool. There are a couple of rules to use. You can't modify stuff. It's like a map. You don't want to modify what you're actually working with. It's just to transform that whole thing. So, yeah. Anything that's common.js can be used. There's a special way. You just can't say... Yeah. So it talked about design documents. And it's... People know it with their language. It's all written in their language. There's a small part of it, which is JavaScript, but everything else is in their language. But once you have this awesome JSON store and once you have this awesome HTTP API, it takes you to the next level, which really kills you, which is writing the whole application stack in Couch. Since I'm running out of time, I'll just show you an example. So the canonical JavaScript, this thing is to do a to-do. And that's what it is. So what I've used is this thing called console. Yeah, so there are two alternatives if you're in the CouchDB world. One is the older one called CouchApp. Console is a newer version of the same thing. The idea of CouchApp is you embed the whole document, the whole HTML, everything inside CouchDB and serve it up there. Does it make sense? So it blows your mind because there's no middle-end anymore. You just have the database sitting here and the front-end setting inside the database. That's it. So this is my... This is a simple to-do application. There's nothing in there right now. So the way you do this is sorry, you shouldn't be seeing that password but that's okay. This is just my... this thing. We believe you. I'm sorry? We believe you. I don't even write anything else. So we basically have this bunch of code here. Just this is the key file to look at console.json. People do Node.js, right? You should be familiar with this package.json. You just take what my dependencies are, what's the main file to load and things like that. And you write this simple hello world index.html Well, yeah. Just some random examples. So wait, it does the query over like jsonp or... No, it's slow-closed. It's running on a different port. What's running on a different port? CouchTV is running open on a different port. I'm guessing this app... This app is actually in CouchTV. So you basically... So basically what you did is pushed it to a database called to-do right at the bottom. All the assets, everything including index.html are here. So the database hosts your app as well. Yes. That's cool. So that's the dv module I'm using. Basically JavaScript stuff that I said somewhere else are all included in line here. The index.html is attachment. Like attachment is another CouchTV thing.  So basically what you can do is do a list. And that's your hello world sort of thing. Like it's being hosted inside CouchTV. You don't need anything. You don't need anything else to display all your... So... What you're saying is instead of having your static files and all, whatever, on the file system, you're having everything on the dv? Yes. Your code is still in git and everything. You push it to CouchTV and that's it. That's pretty much it. Then when you mix that with the application, you can just take this whole app, put it onto a mobile phone. And your app is working literally offline without any interesting. And then because it's continuously syncing, it's updating everything everywhere. Yeah. And there's a really simple way to... Any other question? It's like... Is it like a performance like static file that you should be serving from the file system in the data? So what CouchTV does is actually one thing that I'm going to complain about CouchTV is that it doesn't do anything in memory. Like it doesn't do... So if you look at our setup has like probably a few million documents. It still takes like 128 megs. Like the CouchTV process. Elastic search and everything else takes like a gig. But it doesn't do anything in memory. So everything is literally on the desk. So it loads it up, sends it across. That's all it does in that sense. Performance. So one thing it solves is like, hey, I don't have to go on a mobile phone sort of thing. Or even in a real web app. Go all the way to the server, get the data and render it. That's the thing that kills performance. Yes. Yes. So you can start writing in your index.html you just write your JavaScript that says, hey, dv.getView and you'll get all the documents from that view. You can actually put from there or post from there. And it's just like anybody familiar with Meteor? Yeah. It's like a full version of it. But it's still similar. Can you index an attribute? Can you index an attribute? You'll have to write a view that takes that attribute. You have to emit that attribute in the view and then you can query on that. So yeah, sorry, I didn't have enough time to talk about views in detail but you can do a lot of things with views. Yeah, so that's how you index in college. Persistent. Use a persistent on the disk. And you don't have to worry. As long as you don't blow up the database or you don't re-index the view itself it's there. So they are decopying. You have the actual attribute actually copied again? Yes.  Like it just kills the disk. So many questions and then really wrong. Yeah, I missed the good part of CouchTV so maybe we can talk about it offline and the conversation around MongoDB. Yeah, so as long as people don't run away I'm okay to talk here. Is it really possible to line up somewhere available? Yes, it's actually on GitHub. Ah, great, awesome. Yeah, so maybe I'll just low it up and then people can think about it and... Any questions? Anybody? What's your top 5 problems with CouchTV? Why would I not use CouchTV? Because it sounds like a lot of great stuff but there are obvious drawbacks to this. Views are hard. It's a shift. Because you don't... Especially for people who come from the relational background, tend to find views really complicated. They are actually complicated. And there are things you can't do with CouchTV. Like, hey, give me packages that were created between this state and this state. To do stuff like that you'll have to index times as well. And indexing time is really hard because you have to say this day, this day, this day, this day if you look at over a two year time span basically creating so many views, so many documents inside the view that it's just... Yeah, it's not worth it. It's very slow as well. Top 5 problems. So the one big problem I have is the disk. It just kills disk, especially with the versioning and number of views you create. So I went from a gigbox to a 50 gigbox to a 100 gigbox just for a period of three months. It just eats away disk. You have to keep continuously compacting and stuff. It's versioning and the views are also stored in the disk. So if you don't optimize your views or if you write... One of the things that beginners tend to do is write a lot of views because every index, everything has to be via views. So you tend to have a lot of views. And then those eat up a lot of space. So what is the actual user versioning? Because you're not sure saving the delta changes. So can you switch it up or something? You can't switch it up. It's built into this thing because that's how it supports concurrency. So the problem with the standard way databases solve concurrency problem is being optimistic. If you update the same document you'll get an error. User says hey, user gets this thing say refresh again and put it again. But with the replication built in there is no user interference anymore. You can't ask the user anymore. I've updated my document here on my mobile phone consistently. I've updated this document on the data server or like the central database consistently. But when this syncs to this which version do I use? So those sort of questions nobody can answer. Literally nobody can answer. So somebody has to go look at this thing called conflicts. It exposes a feed called conflict. And you can look at the conflict and say this is the version I want. So literally like it.  That's why versioning becomes important. Maybe you can... You've got to share this of course. Thank you. Anyway I would like to thank you all for coming. This first event is pretty cool. And I would like to thank Swissnex for hosting us in their offices. Thank you guys. Also Kieran and Xenap for shooting the talks. And most importantly you guys. And thanks for having me.


I'm JP Villegasencio. I'm the Education Director in the Wisconsin Technical College System Office for the IT programs and the instructional data systems. I'm very passionate about the IT programs because it's cutting edge. Seeing some of the things that our colleges and our students are doing is amazing. And really within IT programs it's one of those emerging growing fields that we are able to really serve a need for the state, for our students, for the industries that are here. One important thing to be aware of is just how much everyone cares. That's one of the great things I love about working within the Wisconsin Technical College System is that across the board, whether it's in the system office, our colleges, down to the individual faculty, staff members, is they really do care about our students, our staff, our programs, and they want to really be successful in those various ways that we can define success. And so they're willing to listen, they're willing to talk, they're willing to think through, they're willing to innovate. And that really gets me excited to see those things happen and be part of those conversations, to really think about what we can do to set everyone up for success.


Good morning friends it's Sunday morning nine o'clock Pacific time nine o'clock Arizona time welcome to The deep things of God with brother Mike Twitch.tv Thank you for tuning in today. I Remember if you'd like you to hold on me It's easy to do if you want to call a ministry line in<PHONE_NUMBER> If you want to send me an email You can send me one at Mike at hardcore christianity.com I Answer all my emails, you know It takes me about an hour to hour and a half two hours a day depending on how many I get to answer all my emails but I get around to them and I thank you for For your prayers and for your donations and all the things you've done for us It's been fantastic. I Wanted to talk to you today about our schedule there at the Deliverance Center. I will be in Carlsbad, California For a healings and deliverance service on July 15th That's a Saturday. We'll be there for half the day at the Carlsbad senior center. Look on the website for the details and Please remember we have two live zoom services every week And they are just wonderfully annoying in Julie's Zoom services Tuesday nights at 6 30 Pacific time and brother Rick's Zoom services Wednesday nights at 6 p.m Pacific time And I'll tell you what I recommend that you attend them Julie's is for women only Send me an email Mike at hardcore christianity.com. I'll send you the the code and the password no problem Fantastic services also remember we have to We have two live services every week Thursday nights and Friday night at 7 p.m. Pacific time in Arizona time That's broadcast on our YouTube channel and rumble and several other platforms and Recommend that you tune into those services. They're fantastic the deliverance services are also broadcast my service on Friday nights Deliverance services live broadcast live and I leave my mic on so you'll be able to hear the people getting delivered and the conversations that lead up to it and You can check out some of the mistakes I make and then don't do them Then check out some of the stuff I do good and then you repeat them. Okay, so that's how you learn by trial and error in this business sometimes Fantastic But God will be with you and bless you and he will have mercy on you and that's how it works Today I want to talk to you about something very interesting some of the most famous Written material in the history of the world is in Matthew chapter 5. It's some people call it the Beatitudes Macarius is the Greek word for blessed and it means someone who is happy or cheerful or gleeful or hilariously Happy blessed and The Beatitudes list several blessings, but I interpret them a little different than most people interpret the Beatitudes In the healing and deliverance ministry and in any ministry that you are called by the Holy Spirit to do These these Beatitudes directly apply to them and if you don't have them the probability of you receiving a Ministry from the Lord is very low It's very low The probability of you getting anything is very low. Let me give you an example verse number three in Matthew 5 It says blessed Macarius happy cheerful are the poor in Spirit now the Greek word for poor there is Toccus Toccus is the Greek word for a beggar Somebody you would see out on the street corner and there's a lot of them now particularly here in Phoenix. We have them all over the place homeless people begging for things out on street corners traffic islands and so on Why is a beggar important in spirit a Beggar in spirit what's he talking about there for theirs is the kingdom of heaven Now generally speaking but not in all cases the kingdom of God is used as the overall Kingdom of Joe Jehovah which would include the universe the earth and everything in it the kingdom of heaven Generally speaking not in every case generally speaking is referring to God's kingdom on earth and if you are a Beggar in for spiritual things You will inherit the kingdom of God Which is the kingdom of heaven on earth and it says that in Revelation when you die now Let's say you drop dead in five minutes. I hope you don't If you drop dead in five minutes you go if you're a born-again Christian you go directly to heaven, but after the rapture After the return of Christ the second coming we come to earth and we stay in the new Jerusalem Which is on earth and we? Administer the kingdom of the living Christ on earth as his servants If we have been overcomers in this life many Christians in The future kingdom the kingdom of Christ on earth won't be in positions of authority or Leadership because they were not overcomers in this life revelation to revelation three the only people who are leaders and rulers in the New World Order Are people who overcome in this world now in this life. This is your best life and It will determine what you're doing in your future life on this earth in the kingdom of heaven and at the new Jerusalem not everyone has Enormous responsibilities and blessings in the kingdom of the millennium Not everyone has not every Christian has that Every Christian receives from God according to their works now in your life now and here you can see people who are who see themselves as beggars in the spirit people that are beggars and That's a spectacular position to be in isn't it? you know or Roberts when he was young Graduated from Bible college. He was pastoring a small church. I think it was an Eden eat in Oklahoma but I'm not sure but anyway was some small town in Oklahoma and He would read the book of Acts and he would go into a depression He would look at the book of Acts and he would look at his church and he would see this in congruity He couldn't believe it really bothered him That the things that God was doing in Acts was not happening in his Pentecostal church. I Think he passed her a Pentecostal holiness church, but I'm not sure It doesn't matter and or Roberts began to seek God. He saw himself as a spiritual beggar And he became a spiritual beggar. He became a God seeker He became someone who was pressing in to find out Why the book of Acts was not relevant in his church and This went on for a few months and he went into deep fasting and He fasted so much the congregation. He didn't tell him that he was fasting.  He was dying. He had lost that much weight But he kept praying and then he finally Came to a conclusion. He said well, I prayed and I fasted and I'm going to now Put my begging I'm a beggar for spiritual things. I'm going to put it to the test he goes downtown he rents the auditorium downtown it I think it was Indian and you know the auditorium sit, you know 1500 2000 people something like that and He went down to the local hardware store and he applied for a job and the guy said yeah, we'll hire you. He says well I'm pastoring this church over here and I'm having a service downtown Sunday at the auditorium and I may be back for this job. Would you hold it for me and the guy said yeah So he rents out this auditorium. He tells the Lord number one I got to have enough money to pay for this thing in donations Okay, number two there has to be a notable recognized the will miracle happen in this service Long story short he has a service They bring him a little slip before he goes up to preach they hand it to him and It was like two or three dollars Above what the cost of the rental for the auditorium was Okay, the prayer was answered Oral gets up and he preaches that you know you heard or Robert's breed if you haven't it sound like country preacher You know not a not a great order or not a great speaker. Just kind of an average guy He gets up and preaches a Short sermon on healing and then says who wants to be healed with some old woman came out in the aisle who had a withered hand disabled hand and He reached down he grabbed her hand right here and he lifted her hand up like that and the hand instantly Restored right in front of everybody. Everybody saw it The place erupted with gasps and oz and suddenly oral it says looked up. He said I looked up and there was a line So back to the back of the auditorium a line of people wanting to pray for him and he said numerous people were healed that day not everybody but Unbelievable number of people he'll and that started his worldwide ministry of healing and Remember when oral died. Yeah, the guy got off the track He screwed up when he died he He got sucked into the fake prosperity doctor and And He died 40 million dollars in debt and the city of faith and the university were all you know in jeopardy He put his son in charge of it Richard He was Richard was a clown show and The whole thing almost went into bankruptcy some Varian air something bailed it out back in the 90s and I guess they're doing good now But the point I'm trying to make is this number one If you fail in the future God does not hold you to account in the present In other words, if you come to God as a spiritual beggar and you are a God seeker and you are poor in spirit Which presupposes you to be a very humble person God takes you as you are, you know, it's kind of like Billy Graham's Just he always saying come as you are at his services remember that well, that's how God takes you if you come now Even if you are going to fail in the future. God does not hold your future failures Against your present prayers. He does not do that The same thing exact same thing practically happened to a a Allen a Allen went to an or Robert's Service and saw all these people healed and God spoke to his heart and told him I have called you to do this So a Allen went home to his wife blamed it all to him and you know the story he started going into his closet and Praying and he failed several times with the the last time he got in there He prayed for numerous hours and suddenly a supernatural light came through the ceiling Down on to him and this voice started to speak to him and and he gave him 13 things he needed to do Before he received his healing ministry. What am I talking about here a a Allen and or Robert's even though they ended poorly God did not use the ending of their life against their present prayers and God will not do that to you either God will not do that to you either Okay, let's assume you're you're a God seeker now and Hypothetically, you're going to backslide 15 years from now. It doesn't matter God only takes you as you are now And he doesn't hold your future against your present and So here you can see in the Beatitudes the first one is People who are God seekers they see themselves as spiritual beggars and In this particular verse the prosperity doctrine Does work the prosperity doctrine works Spiritually not financially.  He was a jumper or Roberts was a screecher.  They're cheerful. They're joyful. They're hilariously happy See they are comforted But they had to be a mourner first You don't just get the blessings of God dumped on you Okay, you got those blessings. Go ahead. Okay next thing you got it. Go ahead. Now. Here's these are yours Okay, go doesn't work like that.  You got to follow the beatitudes Blessed are those who mourn Mourn for what mourn for seeing the power and salvation of God save their relatives their family their friends their city their church mourners Spiritual mourners, okay That's followed up in Romans chapter 8. Isn't it sure it is for the Holy Spirit Growns for us with the groanings that cannot be uttered. He groans through us But only people who are mourners Receive the anointing of the spirit like that. I hope I'm making sense here this morning Verse five blessed are the meek For they shall what inherit the earth. What's he talking about there the millennial reign of Christ the meek Praos is the Greek word.  Oh, man When you are poor in spirit You are by definition a humble person and humbleness draws in the presence of the incredible spirit of God Humbleness is what he likes to see He loves to see people kneel at Calvary. He loves to see people kneel with tears in their eyes so he can sprinkle the blood of Jesus on their lives and on their souls humbleness is Enormous the legendary British evangelist Smith Wigglesworth would hold healing lines and they said while he was praying for the people He was weeping He was weeping over them Wow big tough guy gruff very blunt person But a very humble man A very humble man. You see people who get around the Holy Ghost If the demons don't trick them They always realize that nothing they're doing is coming from them And they're always have this sense of being completely dependent on The spirit of God that's a method of humbleness People who have the anointing and the power of the Holy Ghost are not people that usually like to go around collecting compliments or kudos From others they're fine without them Because they're looking to Jesus the author and finisher of their faith They're not looking to themselves People that are humble are the only ones That are going to reign in the millennial in the future after the return of Christ the other Christians Will not be doing that The people that rule the planet earth are the Christians who applied the beatitudes And revelation two and three and they became overcomers in this life Once you're dead, it's too late. You can't make it up Now Is your moment? This is your time Verse six ties right in with what I've been teaching Blessed are they which hunger and thirst after righteousness for they shall be Cortizo What does that mean cortizo? It means to eat until you're gorged Eat until your gut is hanging over everywhere to be Chuck full Blessed are they which do hunger? He's using an eating analogy here brilliant People blessed are they which do hunger. Oh now this word is also very interesting Penao It means people who are starving people who are famished It's not people who have a general hunger. That's for church people People who have a you know a general hunger, you know, hey, I think I'm hungry. I think I'll get a bike. That's for Christians. That's not for disciples Disciples Penao are famished. They Are To see God move These are God's You see that people who are starving Thirsty After righteousness for they shall be gorged They will be gorged with it These are great scriptures Verse seven blessed are the merciful for they shall Obtain mercy here. This ties in directly to the great apostle Paul's teaching in Galatians On reaping and sowing whatever a man sows that shelly also read whatever a woman sows that shelly like she also read You get out of it what you put into it And this is what God's telling you Look, I'm looking for some people that are famished. I'm looking for some hungry people I'm looking for some people who are mourning. I'm looking for people who are who see themselves in spiritual beggars I'm looking for people and then God pours out the glory This is a powerful teaching. This is this is what can happen to you Who doesn't get any of these things? Well, the obvious people who are Christians people that go to church They end up with nothing. They become spiritual losers. Why they don't see themselves as Spiritual beggars. They don't see themselves as starving for God. They're not starving for God I have an altar call every Friday night. There's a deliverance center. The holy spirit has come to 100 of them There's never been a time. He hasn't been there. It's been amazing deeply grateful for it But during the beginning of the altar call as I was saying friday, what I do is I just I don't rush through it You know, I just kind of patiently wait and watch and see where the holy ghost is going to hit He'll hit over here and then he'll hit over there Then he'll hit this person then he hit that one, but he'll skip this one on that one. This one this is a skip Go to that one skip skip go to that one What he's doing there is he's looking for people who have the beatitudes In your soul right here in your souls Have you got to be added are you starving for God? Well, I'm not starving. Well, your prayer then is lord help me help me to starve And but don't pray that prayer casually This is is not a pretty sight my spiritual beggar A spiritual beggar I didn't say for 25 years. I I know something Oh boy once you reach that spot friend, it's over Come home today Come home If you see yourself in a different light after today Wow, I have not arrived I'm like paul. I'm not there yet I have not arrived But I did I do this one thing I forget those things that are behind me or roberts for leftist Bastership leftist church leftist congregation Forgot about them and moved forward With the power of the holy ghost A. A. Ellen did the same thing leftist church Somebody got booted him. He opened up a place called miracle valley in southern, arizona Remember that That's what paul did. I forget those things that are behind me I reach for those things that are before me for the prize of the high calling of god and christ jesus my lord paul Implemented the beatitudes for himself. He saw himself As a spiritual beggar. He saw himself As a mourner he mourned for The revelations of god He mourned for The power of god to help others He mourned to reach out to the lost. He mourned To visions and dreams You see that the holy spirit Skips these people to the altar and I saw it in my own eyes. I see it every week. I've seen it for years Don't tell me it doesn't happen. I know what happens. I've been watching it. I watch it Skip skip hit skip skip hit And what he's doing he's looking for a beatitude heart boom Somebody here who's hungry. Oh, man. I'm starving I'm famished I'm thirsty. I'm chafed. Uh try got cotton mouth. I'm so dry. I'm dehydrated You see that That's that's how you Get the deep things of god somebody hunting for god who's famished We'll do anything verse 8 blessed are the pure in heart for they shall see god catholus is the greek word. It means somebody who's cleaned their house Somebody who's cleaned out that people are motivated to renew their minds and clean out their minds Restore their conscience and clean out their conscience people are motivated to do that when they're hungry for god And they're mourning for god and they see themselves as needy people who are spiritual beggars pressing in for the high calling of god in christ jesus their lord they will cleanse themselves clean stuff out catholus clean it out like you'd empty out a closet They'll do that voluntarily because they want God that's what happened to or roberts. He sacrificed his time in prayer and fasting That's what happened to a allen. He went in this closet and hid in there Right. That's what happened to catherine coolman. She was pastoring a church in pittsburgh pennsylvania and She had been seeking god for years. She had been hungry for years. She had been meek and humble and broken for years and one morning At her pittsburgh church came remember the name of it small church A couple hundred people or so She's pastoring a church and some woman Came up to her after the service Okay and says to her Pastor while you were talking about healing She said while I was sitting there my back got healed And look she bends over she walks around nothing wrong with her Well, catheter knew this woman had a bad back. They'd been praying with her for years And while she was sitting there and catheter says to her Who prayed for you? She said nobody I just sitting there And that morning in pittsburgh pennsylvania A spear landed of power in catherine coolman's soul Guess what happened? Yeah, she quit she quit and started her international ministry That god was going to start healing people in droves and not touching any of them Nobody went around and prayed for them They just got healed in their seats And it started that day in pittsburgh, but it's actually started before that When catheter and coolman became a beggar After the death of her father I hope i'm helping somebody right now. You see it's a mindset. It's a it's a heart set the holy ghost Uh has discernment for the reins of the heart. He looks in there and he sees what's going on in there Is this guy really hunting for jesus? How about this one? Is this one really a christ seeker? That's what he focuses on. He really looks at that And then he adds to it humbleness brokenness morning Blessed are the meek for they shall reign during the millennium blessed are the merciful merciful people are humble people Merciful people don't see themselves on a pedestal. They see them as a regular person And they will have mercy and then god grants them mercy when they need it. Can you imagine it? Then he wraps this thing up. It's really powerful blessed are the persecuted for righteousness sake for they shall See the kingdom of heaven once again The kingdom of heaven the reign of christ on the earth the millennial People who are in authority during the millennial most christians are not in authority during the millennial. They're in the new jerusalem God bless them. Thank god for that, but the people that are ruling and running the planet earth for jesus And the ones that are giving direction and control to angels That's what paul said The angels are serving us here right he brews he brews chapter one And the angels will serve us then But only those revelation two and three who are overcoming christians here This is your best life now Sorry joe your best life now is In the beatitudes you must become a broken humble god seeker And if you do that and if you do receive the power of god, you will be persecuted You will be persecuted. There's no question about it. There's no way to get out of it. People are not going to like you They're going to criticize you they're going to Speak bad words about you And that's all positive.  There's something wrong with you There's something wrong.  They're so wonderful.  Oh, he's he's just great. She's she's wonderful.  Hey or roberts was Nothing was a really a nobody He was a nobody. He was pastoring a small church Pentecostal church He had no great education. He was not extremely intelligent person. He was a mediocre preacher He was not a good-looking guy kind of looked like a country bumpkin But He had the beatitudes Here and before he died everybody knew his name Did he screw up at the end?  Just stay at church vegetate out Finish it out and then stay in the new Jerusalem during the millennial while humble broken people now go out ahead of you and rule and reign As kings and priests with christ in the new world order I can't overemphasize that enough I cannot over Most christians will not rule and reign as kings and priests to christ in the new world order Because they did not follow revelation two and three He that over cometh Those are the four words jesus used What is it seven or eight times? He that over cometh king james Shall boom and then he fills in he fills in the blank And that's that's got to be you that's got to be you You get your devotional time and you start begging lord. I I'm a spiritual beggar. I'm not where I should be I don't have the power. I don't have The gifts. I don't have the anointing to help these people And I want it with everything I have within me Oral did it. He was a regular guy A. A. Allen. Are you kidding me? He was less than a regular guy He was a full-blown alcoholic when he was in what was the seventh or eighth grade full-blown alcoholic I mean he was he was an absolute textbook loser Once again, not a good-looking guy not exceptionally intelligent Mediocre preacher not very good at it, right? Yeah, it doesn't matter. Wow. It doesn't matter The only thing that matters is the beatitudes Right here.  She had nothing I mean literally nothing No looks nobody no no very homely woman rotten hair bright red hair that looked horrible Her IQ was average at best nothing. Oh Not one thing special about catherine coolman except what? She had to be attitude When the holy ghost takes you over friend You become a very very special person In christ very special In christ now you're not special. No, we're not special people The spirit of god comes upon you wow awesome But that's never going to happen to you unless you learn to be attitudes of the heart And jesus warned you in verse 11 blessed are you when men shall revile you What does that mean word revile mean on a deeds those the greek word means verbally abuse you verbally abuse I've been verbally abused numerous times over the years as you can imagine being in the deliverance ministry And every time it happens I giggle and move right on to the next deal blessed are you happy macarius Joyful cheerful hilariously happy are you when men shall verbally abuse you and persecute you and say and say Speak is the greek word apo speak All manner all manner All manner of evil Evil Words against you what it actually says in the greek there is punaris reyma when they Say perverted words against you and it's false it says okay. It has to be false Now people speak perverted words against you and they're true That's a totally different bible study And you don't belong on this one Okay, that's You go over to the repentance bible study. Okay go pull it up on youtube, but If they're if they're verbally abusing you using perverted words Punaris reyma perverted words against you and those words are false verse 11 And therefore the sake of christ Okay Rejoice he says Rejoice And be exceedingly glad What does that word mean? Exceedingly glad that means to jump for joy Jump for joy for great is your reward in heaven For so persecuted day the prophets that were before you hey friend You've got to have the beatitudes. Let's go now. Come on. You got to have them in here right in there Nobody can stop you No one can stop you You can't be stopped Can you imagine somebody stopping the holy ghost? That's that's a ridiculous thought isn't it?  What is the tsunami? It's an underwater earthquake. They're both the same And that's what happened in jerusalem in x chapter 2 remember x chapter 2 it happened there an earthquake x chapter 4 they were praying They were begging god. They had become spiritual beggars and they were asking the lord to grant unto your servants Healing and that signs and wonders may be done by the name of the holy child jesus act chapter 4 Right and what happened? boom earthquake And that's what you want to be that's your goal in life. You want to be a walking talking Earthquake for god what it's never going to happen if you don't get to be attitudes here You don't be calm with god seeker You don't see yourself in a needy person Desperately in need For a miracle from god and people who are humble cannot do that They just can't do it I don't know how many times over the years in counseling session at the altar. I'm going to say a few hundred I've run into people who have very high IQs. They're very intelligent people And they are the most difficult people to get healed and delivered.  It's called blessings B l e s s i n g s Go to that facebook group and just scroll there for the next hour reading these testimonies of people Who had to be attitudes in here? They Saw themselves as spiritual beggars. They were starving for god They were starving for god The ones that weren't starving for god that I saw in counseling sessions I got a couple of techniques that I have used over the years That were they work about 50% of the time so I try those techniques on them to try to break through The numbskull spiritual shell they're living in Where they can't get any blessings from god no healing no deliverance no finances nothing no peace They can't get it because they're a numbskull if their spirit lie blocked Not good.  This is the most frequent thing That people have said to me over the years after they're finished with their deliverance a lot of times I'll ask them Pretty much most of the time I ask them. So how you feel right now? And they go I feel light. I feel at peace And then those kind of giggle I have seen that several hundred times I swear it I've seen it several hundred times I swear It's amazing But I've never seen it with somebody Who didn't have the beatitudes people who Weren't god seekers they didn't see themselves with spiritual beggars. They didn't see themselves as meek They didn't they saw themselves as knowledgeable and well-adjusted and solid christians Been saying for years they were solid christians. Okay, but we don't need christians. What we need is disciples Christians are a diamond dozen. They're virtually useless. What we need is You to make your move now Because your time's running out as as is mine nobody No christian who dies is guaranteed to be a ruler and a king and a priest in the new world He doesn't say that in that verse. Did you ever notice that? He didn't say every christian was that But it says exactly the opposite in revelation two and three Only those who overcome And the only way to overcome is to do what or roberts and a alan coolman and millions of others The only the only way to do it is what they did They let the beatitudes out of their soul and they gave it to god.  Let me close with this Thank you for joining me every sunday.  I mean over it over again. Let me tell you something The devil's going to pay for all that himself personally Book of revelation. I think it's chapter 20. He gets tossed You know and I've asked god numerous times. I don't know if I'm going to get the prayer answer But I asked him I'd like to see that happen I'd like to see the angel that picks him up and throws him into the lake of fire like to be I'd like to be somewhere I could watch that I've asked for it. I don't know if I'm going to get it or not But Let me tell you something. That's not the only time the devil is going to pay for something You know when the next time is you're going to make him pay You owe him


Welcome back in the previous segment, we defined a search problem and we also defined binary search. Now we are going to do sample execution through our code. So this is our code and I have just removed the comments so that I can fit my code into these slides, it is really the same code. So we are searching this array over here, so starting index is 0, length is 8 and we are searching for 11. So the first call is this call, so we search a 0 8 is our first call. So how does this call execute? So when this call starts executing s has the value 0 which comes from this argument itself and l has the value 8 again from the argument and x has the value 11 from the argument. So we are at this point then we do a check is l equal to 1, well l is 8 and certainly not equal to 1, so this statement does not execute, so we come to this statement. So at this point we are defining a new variable h whose value is going to be l by 2, so h becomes 4. Next we execute this statement, so we check whether what is the relationship between x and a of s plus h, well what is x, x is 11, what is s plus h, so s is 0, h is 4, so s plus h is 4, so what is a of s plus h, well this is a, so 0, 1, 2, 3, 4, so a of s plus h is 10. So the question that we are asking is this, is 11 smaller than 10, well that is not true, 11 is not smaller than 10, so this comparison comes out to be a false, so therefore we are going to make this call. So this is the call that we make next, s of a s plus h l minus h x, but what are the values, the values are s plus h is 4, l minus h, what is l, l is 8, h is 4, so it is also 4 and x is 11. So a new recursive call starts, so what happens in this recursive call, well we are again going to start from here, so s in this recursive call is 4, which is we got from our arguments, so s is 4, l is also 4 and x is 11, so in this new recursive call these are the values, so we are going to do the same thing again. So what happens over here, so we first check if l is 1, well l is not 1, l is 4 now, so in any case this statement is not going to get executed. So we now create h equals l by 2, so h, so l is 4, so h becomes 2. Next we are going to ask how does x compare to a of s plus h, so what is the value of x, again it is 11, what is s plus h this time, so s is 4, h is 2, so s plus h is 8, so a of s plus h is 0, 1, 2, 3, 4, 5, 6, so this is 30, so we are comparing 11 with a of 6 which is 30, so 11 is smaller than 30, so this is true and therefore we are going to, so this is true, so we are going to make this recursive call, so as h, x gets called, so what are these values, so these values are 4, s is 4 over here, h is 2 and x is 11, so the values that are going to get called, that the call that we are going to make is a 4 to 11. So let us examine this call a 4 to 11, so what happens in this, so again the variables in the activation frame will take values, s will take value 4, l will take value 2, these come directly from the arguments, x also will take value 11, then we are going to execute, we are going to execute this statement, but l is not 1, it is 2, so nothing will happen, then we move on to this, what will happen to h, well h will become 1, half of l and then we are going to execute this, so we are going to ask is x less than a of s plus h, okay, so what is x again, it has stayed 11 all the time and s plus h is now 5, so we are going to ask a of s plus h is 0, 1, 2, 3, 4, 5, so we are going to ask is x less than a 5 or 12 and this is also true, okay, so if it is true then we are going to make this call, so in this call s is 4, h is 1 and x is 11, so we are now going to start another recursive call, so again we start from this point and because of the argument list s is going to get 4, this value l is going to get 1, this value and x is going to be 11, so next what is going to happen, we are going to check if l is equal to 1, but yes this time l is indeed 1 and therefore we are going to return whether a of s of x is equal to x, okay, so what is a of s, so s is 4, so 0, 1, 2, 3, 4, okay, so a of s is x, yeah, so l is equal to 1, it is true and therefore we are going to return whether 11 is equal to a of 5, okay, so is 11 equal to a of 5, well so a of 5 is 12, so this is not equal and therefore we are going to be returning false and all the previous recursive calls will just return the same thing forwarded back, send it backwards and so this is the value that will go into main as we expected, all right, okay, so let us do a quick demo of this, so the function is bsearch, so let me show it to you, okay, so this is bsearch and bsearch is the same as what I have shown you, but the only thing is I am writing over here what the arguments are, okay, so just to see how the function executes, so let us compile it, so this is how bsearch ran, so first it was called with argument 0, 8, 11 and of course the argument a is there, but I am leaving that out, then 4, 4, 11, 4, 2, 1, 4, 1, 11 and if you see what we executed, this was exactly the sequence and even here 0 was returned as happened in our execution sequence, the execution that we did by hand as well, okay, so let us move on to the presentation, so a few remarks, binary search is based on a simple but powerful idea, but even though the idea is simple, the details are somewhat tricky and experience shows that even professional programmers may make mistakes when writing binary search, okay, so the mistakes are of this kind, so when we are comparing should we be asking less than or equal to or less than, so then there is this question that if the region that we are searching is odd length, then integer division behaves in a slightly different way than we might expect, so we have to be careful about that and then the sub ranges to be searched have to be specified carefully, so should it be s through h plus l minus 1 or s through h plus l whatever it is, so the way to get it right is to write down precisely what the function is expected to do, okay, so at least once you write down what you want to happen then you can check whether that is happening, so at least if you have to be sure as to what you want, so please write the specification very carefully and make sure that you are getting these minus ones, minus ones correct, okay, all right, so now let us analyze this and check, look if this is so carefully, how to be written so carefully, is it worth going to the trouble, so in other words is binary search better than linear search just going through the elements from left to right, so if you consider an array of size 1000 in the second call we search an area of size 500, in the third call we search an area of size 250 and so on, so every time the size of the array we are searching is roughly having, so that means in the 10th call, so if you do this 10 times you will get to an array of size 1, so at that point we know we do not have, we do not recurse further and we can just return and whatever we return at that point is returned all the way back to the main program, so what does this mean, so time taken in this case is about 10 calls worth of work and each call is fairly simple as opposed to that in linear search we would do 1000 comparisons, now let us see what happens if you were doing million elements searching through million elements, then here we would have million comparisons and how many calls would we have over here, interesting as it may, you may find the number of calls over here is only going to be 20, so binary search is much, much more efficient especially if the size of the array being searched is large, is large, so put it another way this is log n, so the time is proportional to log n and this is n, so rather than n, so definitely a big difference, so what have we discussed in this segment, so we said that binary search is a very fast way to search for a key in a sorted array and in fact this notion of dividing by 2 is something that we have encountered, so we did this in the bisection method, so even there we were probing in the middle of the range, so the range here is sort of the size of the array that we are searching, searching over, then if you are likely to search an array frequently it seems that you should first sort it and then search it because the time to sort the array will be compensated for by the time saved in the subsequent searches, so this raises the question, how do you sort an array in the first place, so this is what we are going to discuss in the next segment, so let us take a break.


Income tax 2022-2023, do you have to file? Let's do some wealth preservation with some income tax preparation. Most of this information comes from the Form 1040 Instructions Tax Year 2022 filing requirements you can find at the IRS website, irs.gov, irs.gov. We're now asking the question, do you have to file? Before we dive in, note there is a difference between the question of, do you have to file? And the question of, would it be beneficial if you were to file? In other words, you can imagine a scenario where you are not legally required to file, but where you might still have a benefit, possibly be able to get a refund if you were to file. So you wanna make sure to have that distinction in mind when people ask you this type of question. So the general rule would be, if your income is below a certain threshold, you would think that the IRS would not be requiring you to file under an income tax type of system because it's likely that you're not. Support Accounting Instruction by clicking the link below giving you a free month membership to all of the content on our website, broken out by category, further broken out by course. Each course then organized in a logical, reasonable fashion, making it much more easy to find what you need than can be done on a YouTube page. We also include added resources such as Excel practice problems, PDF files, and more like QuickBooks backup files when applicable. So once again, click the link below for a free month membership to our website and all the content on it. Not gonna owe any taxes. Everyone gets in essence a standard type of deduction. If your taxable income is below the standard deduction, you would think you might not owe any tax and therefore you would think that the IRS would not be coming after you hunting you down or anything like that if you were not to file in a situation where you do not owe taxes. But even in a situation where you don't owe taxes, you might still have a benefit. Now it used to be that if your income was below a certain threshold, there might not be a lot of benefit unless you had withholdings, meaning you worked someplace, your income was below a certain threshold, you got W2 income and they withheld money from you and you would seek to get that back by filing even if your income was low. But you might say well I only withheld like $20 something and I don't want to go through the hassle of filing the return to get that $20. But these days you have that scenario on top of the fact that you've got these refundable type of credits which mean that even if your income goes below zero, you might still get a refund or in that case it would be like a benefit type of program in that scenario. So even if you had a limited amount of income, you might be able to get access to credits such as the earned income tax credit and the child tax credits. And the IRS often offers free software online if your income is below a certain threshold. Therefore, I would think the general idea, the general strategy for most people even if they're on the low income side of things even if they think there may not be required to file even if they don't think they're gonna get much benefit it might be worthwhile. I think it would be to get access to the free software if you can and run a projection, check it out. And that would be the general strategy I would recommend if asked these questions. So if you ask the question, does someone have to file distinguish between the question of having to file and the possible benefit of filing even if not required to do so and then I would stress the resources that are there to help people to kind of double check to see if it would be beneficial to file. So you can use chart A, B or C to see if you must file a return. US citizens who lived in or had income from a US possession should see publication 570. Residents of Puerto Rico can use tax topic 901 to see if they must file. Here's the charts. So I won't go into them in a lot of detail but let's just go over kind of a recap. So if your filing status is single and then you've got your chart this is how the charts often work. So you've got the label up top if your filing status is and at the end of 2022 you were under 65, 65 or older then file a return if your gross income was at least 12,950, 14,700. So notice they're basically lining up to kind of like the standard deduction, right? That would be what you would generally think because if your income is below the standard deduction you're not gonna owe any tax. That doesn't mean that you might not get any benefit because you might have had withholdings and you might be subject to these other kind of refundable credits. So married filing joint. So if you're under 65, both spouses then file a return if your gross income was at least 25,000, 65 or older. It goes up to the 27,300 and then if I go to married filing joint any age at five married filing separately at $5. That's because when you married filing separately they're kind of concerned that you're gonna do some kind of strategic type of thing. So oftentimes the thresholds are quite different for married filing separately than single or married filing joint. And then you've got the head of household and so on. So I won't go, you can check out the charts in more detail if you so choose here or on the IRS form 1040 instructions. Chart B for children and other dependents. So you can go through your worksheet there and then chart C other situations when you must file. Tip, so even if you do not otherwise have to file a return you should file when to get a refund of any federal income tax withheld. That's why I think going through these rules and a lot of detail to determine whether or not you should file is becoming a little bit more irrelevant not because the rules don't still apply but because filing is fairly easy to do and with software. I mean, it's as easy to file possibly with the software as it is to look at these rules and try to take them off and you might get a benefit from filing even if you're not required to do so. So it might be worth checking out. So you should also file if you are eligible for any of the following credits. So the earned income tax credit very kind of complicated credit. So there's different resources to see whether or not you have access to it but I think the best resource to use is if you can get access to actual free software to check it out, then run a projection. If your income is fairly low, it should be fairly easy hopefully to do a projection and see if you would qualify for a credit. Additional child tax credit. Another credit that could have like a refundable component to American opportunity credit. These are education credits that might have a refundable component to it meaning even if your income is fairly low and you're not subject to tax because you're under the standard deduction of taxable income, you might still get some benefit from the refundable parts of these credits. Credit for federal tax on fuels, premium tax credit and credits for sick and family leave. Requirement to reconcile advanced payments of the premium tax credits. If you or your spouse with whom you are filing a joint return or a dependent was enrolled in coverage through the marketplace for 2022 and advanced payments of the premium tax credit were made for this coverage, you must file a 2022 return and attach form 8962. So in other words, if your income is below a certain threshold, it's likely that you might have participated in the marketplace for the health coverage in which case the typical standard process would be that they would try to estimate what kind of credit you would get for it and lower your actual premiums by it which means you already got the benefit of the lower premiums and therefore even if your income is low, they're gonna want you to file the tax return so you can compare the benefit that you got in essence in a prepayment by lowering the insurance premiums to the credit calculated on the tax return. So once again, I'm thinking more and more of these days even on the low income side of things, even if you're not required to file due to the income thresholds, it's kind of worthwhile to check out and you're gonna be more and more kind of required to file when they have these kind of benefit programs in refundable credits. And that's I think why they're trying to push to have the free software available because those kind of programs make the tax return quite difficult and require more people to file. So you or whoever enrolled you should have received a form 1095A from the marketplace. So if you get that form, a 1095A, not a C but an A, that's usually the indication that you're like, uh-oh, this is gonna be a little complicated with this health insurance marketplace credit type of thing. So, and that'll give you the information. So you must attach form 8962 even if someone else enrolled you, your spouse or your dependent. If you or a dependent who has claimed on someone else's 2022 return, you do not have to attach form 8962. So exception for certain children under age 19 or full-time students. So now we're talking situations where you're saying, what if I'm possibly subject to someone else, a dependent of someone else due to me being under 19 or possibly a full-time student? We'll talk about more dependent rules going into the future. But generally when we look at the income tax, we're talking about these, we said you might not have to file if your income is below a certain threshold and that threshold generally is tied to the amounts of the standard deduction because everyone gets a standard deduction. If your income is below the standard deduction, you would think you wouldn't owe any tax, but the standard deduction will change if you're claimed as a dependent on someone else's tax return because you're under 19 and or you're a student and what happens then if you have some income. So if certain conditions apply, you can elect to include on your return the income of a child who was under age 19 at the end of 2022 or was a full-time student under age 24 at the end of 2022. So you might be able to report the income of the dependent on the tax return of generally the parent. So to do so, you can use form 8814.  So if the child had income, you're claiming them as a dependent because they're under 19 or a full-time student under 24, then possibly you're using, if they had income, possibly claiming it on the parent's tax returns and therefore the child wouldn't have to file. For details, you can use tax topic 553 or C form 8814. A child born on January 1st, 1999 is considered to be age 24 at the end of 2022. So obviously whenever we have these age things, we've got these cutoff dates to determine exactly when someone hits the 24, the 19 threshold. Do not use form 8819 for such a child. So resident aliens, these rules also apply if you were a resident alien. Also, you may qualify for certain tax treaty benefits. So you can see publication 519 for details if that is applicable to you. Non-resident aliens and dual status aliens, these rules also apply if you were a non-resident alien or a dual status alien and both of the following apply. You were married to a US citizen or resident alien at the end of 2022. You elected to be taxed as a resident alien. Caution, specific rules apply to determine if you are a resident alien, non-resident alien or dual status alien. So we gotta get the correct categorization if that's what we're applying here. Most non-resident aliens and dual status aliens have different filing requirements and may have to file form 1040NR. Publication 519 discusses these requirements and other information to help aliens comply with US tax law.


Welcome. This is Melissa Armell with the stocks, washing and reviewing the November tracking tomorrow is the last day of the month Very very good month here in November and again. It's starting season October was a good month November was a good month These are the months that you have to really hit it So tracking for advanced trader risk and we'll go over that a little bit later 51,000 159 so if you'd like more information about what I do how I Choose the stocks particularly each day focused on one symbol maybe two Then you can learn it in my class email me and Melissa the stocks wish calm for more information or call me at 9 to 9 3200 gap follow me on Twitter Facebook YouTube or Skype, so One of the best gaps this month. There was there was quite a few good gaps this month Actually, I was Tiff fell here the last two days really nice play You could have done as a put or you could have done it as an option and bought the put or you could have done It as a day trade for two days, but earnings season really is a fabulous time to trade why? stocks have big moves as a Trader whether you're a swing trader option trader a day trader you make money when stocks move You got to get in the right direction, but that's what you learn from me in my class So going back to the beginning of the month started off a little bit slow here ECA break-even Debbie was a lost cues was a win off in the second That's why why was a good one of the fifth most of these stocks are our shorts by the way I've usually will go long, but I'm first going to the short side always first prefer to short Car was a loser spy was a winner Mar was a nice one of the six and then seventh was a crazy day Z twice one winner one loser of course was a loser spy was a winner and the cues were winner Those were long so that was a very active day prefer to be a lot less active than that was just one of those crazy days The eighth was win losers CTRP nice solid game on that one And then did that the second day down again Yelp was a loser and CTRP another big winner on the ninth again This was a month where it was like it just were some really good ones Closed from the 12th TSM was that was a really good gap on the 13th 14th The spy was a loser and really nice winner 14th and tap winner in the 15th And a video was a loser on that first day unless you retook it J WM was a winner and the NVIDIA big winner on the 19th 20th closed through the 26th for the holiday spy was a loser on the 27th That just was not going to work out and CHS was a winner and TIF was a winner on the 28th and expr was a loser on the 29th and TIF was a really nice winner on The 29th so one more day of the month. We'll see what happens But looking forward to a solid close at the end of the year So if you want to make money in the market, you can risk what you can afford whether it's a hundred hours 200 hours But if you're a an advanced trader your risk would be between 1500 and 2000s And I say that it isn't arranged because some trades we did here had ads where I would say you can take a little bit more here And you add to it, but you keep the stop the same That's if you get the confirmation. It's going and it's working never add to a trade that's down by the way That's poor advice if anyone ever tells you to do that So it is really about knowing what to do if you know what to do you can trade you can trade for a living You can learn how to do it through my golden gap course through using the method using the strategy and using the system If you'd like more information you can email me at Melissa the stocks wish comm I teach a class again It's called the golden gap course class is December 15th and 16th 9 to 5 Eastern time cost of the class is 59 99 US dollars classes online. It could be anywhere in the world and take it Email me at Melissa the stocks wish calm if you want to sign up for this December course And you can also do the class with the combo It's a trends and the golden gap together and save save $500 to classes for the price of one 6499 that is a really good Bank for your buck to the trends class you learn long-term trends Which is important for day trading swing trading and again doing options So if you want to learn my method and turn your trading around or just have a whole new career for 2019 You can do the class in December. It's a great time to do it You can learn do the class and get going get your trading account set up get everything situated Kind of you know ease yourself into it instead of just throwing yourself into it You can ease yourself into it in the month of December and then bang go right into it in January full speed ahead In the beginning part of the year and and have a great 2019 So looking forward to doing that if you'd like more information or if you want to sign up email me at Melissa the stocks wish calm Have a great day everyone


My name is Andrea with Foodimentary Adventures in Food.  So let's get started. For the cake portion of the recipe, you'll need flour. I'm actually using cake flour because it makes the cake more tender. If you decide to use cake flour, you'll need to add two extra tablespoons of cake flour per cup. I'm also using some fresh blueberries. If you want to use frozen in can, you'll just need to make sure that they are thawed and drained. Sugar, you're going to need butter and egg and milk and all three of those are at room temperature. You'll also need baking powder and salt. For the crumble portion, you're going to need some brown sugar flour and I'm just using all-purpose flour here. Butter and cinnamon. Okay, so the beauty of this recipe is that you don't have to cream the butter and sugar, all of that stuff separately. You just throw everything in there at once. So I've already got my egg in the bowl. I've got my butter, here's my sugar, my baking soda and salt powder, excuse me, and salt, my flour and my milk. And I am just going to mix this with my hand mixer. I'm just going to get this off of the side of the bowl, extra flour. And now you're going to gently fold in your blueberries. And I'm using about a cup and a half of blueberries. You can use anywhere from a cup and a half to two cups. Just going to fold them in. So next I've got an eight and a half inch pan here that I have buttered. I'm just going to pour my batter in. And by the way, I've got my oven preheated to 350 degrees. And I'm just going to set this to the side and we're going to work on our crumble. Okay, I can't remember if I mentioned it or not, but I'll make sure to link the recipe in the description box. But one thing I wanted to mention is that the recipe does have a recipe for the crumble. I'm not using that recipe because I really like a brown sugar crumble. So I'll make sure to link my recipe for the brown sugar crumble in the description box as well. But all I've done so far is I've added in the all-purpose flour, the brown sugar. I'm going to add in some cinnamon. I'm going to mix it up. And you can use a fork, you can use a pastry cutter, or you can use your hands, which I may have to get in there with my hands, just trying to break up the brown sugar a little bit. And I'm going to add my softened butter. And by the way, this is unsalted. So you're just going to mix this up until everything is combined. Okay, I've got my crumble all mixed up and all you're going to do is sprinkle that brown sugar mixture all over the top. And I like a lot of crumble. If you're not that into crumble, you can definitely cut the sugar. I'm sorry, the topping, the crumble in half. All right, I'm going to pop this in the oven for about 45 to 50 minutes or until it's done. Okay, so I just took this out of the oven and I'm going to let it cool completely. And then I will cut a slice so you all can see what it looks like on the inside. Okay, so here's the blueberry buckle. And I ended up baking this for 55 minutes. And I've cut out a slice so you all can see the inside of it. And here it is on the plate. So good, such a tender, delicate crumb. I hope you all enjoyed this recipe. If you did, please make sure to give me a thumbs up. If you have not subscribed to our channel, we'd certainly love to have you. Thanks so much for watching and we'll see you all next time.


My name is Sam Vakny. I'm the author of Malignant Self-Lather, Narcissism Revisited. Your narcissist is likely to haunt you and hunt you, even via your computer, your smartphone, or your personal digital assistant. Nothing is safe, not your laptop, not your netbook, not even your iPad. The narcissist is likely to install malware, malicious software on your computer in order to log everything you type, to discover in unearth your passwords, to break into your email accounts, and even into your bank account. You ought to be very careful, because narcissists tend to engage in identity theft. They tend to install on your computer and other electronic devices, keyloggers, trojans, viruses, warms, and other forms of malicious software. How could you defend and protect yourself against these intrusive and yet surreptitious techniques by implementing 12 rules of behavior? 1. Never click on a link that is contained in an email message, an instant message, or a post to a Usenet or some support group or a forum. Never click on links. Never open or install a program directly from the internet. First, download the program to your hard disk, then scan it with your antivirus software, and only then, if it proves to be clean, consider installing it. Even when you install it, try to sandbox the installation process. Most antivirus and firewall products provide today the option of installing the program in a sandbox, in other words, without interacting with the computer itself, and thus neutralizing the program's ability to infect your computer. 3. Never open or install a program directly from a USB, CD-ROM, or a DVD. Again, first scan these devices with your antivirus software, and only then, if they end the program proof clean, consider installing it in a sandbox mode. Never enter any personal details in forms which are housed or stored on unknown sites. Very often you visit a site which you have never visited before, and you are asked to provide a lot of personal information. Don't. Never type your user ID or password, unless you see the lock icon at the bottom or the top of the screen. The web address must start with HTTPS, that means Secure. In most browsers, the address bar is colored yellow or green to indicate that the website is safe. Pay attention to this trio, the lock icon at the bottom or at the top of the screen, the HTTPS address, and the coloring of the address bar. Never click on a pop-up, no matter what the pop-up says. Do not click on a pop-up, even if you just want to close it. Simply ignore the pop-up. Never open attachments that you receive by email. If you are in doubt, save the attachment to your hard disk, scan it with your antivirus software, and only then, if the attachment proves to be clean, open it. Try to read all your email messages in text format rather than HTML. You can change the settings of your email client, your email program, to read and to write everything or the messages in text. Messages in text cannot infect your computer. Messages in HTML can and very often do. Never visit unfamiliar websites. First, go to Google www.google.com and check whether the site is legitimate and does not carry or is infested with malware. Only if the website is clean, visit the site for the first time using a non-Microsoft browser, preferably Firefox or Chrome. 9. Change your passwords frequently. Use complex passwords containing both numbers and letters and both capitalized letters and cursive ones. Never give your passwords to anyone. Try not to write them down on pieces of paper attached to your computer. Update your operating system. Update your antivirus program, your firewall, your entire spyware program, and update all the utilities on your computer. Check for updates daily. These patches are very important. They keep your computer safe and your analysis is out. Scan your computer for malware every time you use it after you have used it. Scanning with multiple anti-malware programs is very important. Finally, anything suspicious happens? Stop everything you are doing. Disconnect from the computer from the internet and scan the computer for malware. What do I mean when I say something suspicious? Examples of suspicious events or behavior? Well, persistent pop-ups. Or the computer or the connection slowed down considerably. Or repeated reboots which you have not initiated. Or your mouse and keyboard freeze. Or you get strange messages and alas, all these are suspicious signs. Stop everything you are doing. Disconnect from the internet. Scan your computer. Delete the malware. Without malware, your narcissist is helpless. There is nothing he can obtain from you that you do not want to give him. Malware is the narcissist's backdoor into your life. He is there even when he is not there. Make sure that he is not there.