And now, another tale well-calculated to keep you in. Suspense. The Green Lorelei, written for suspense by George Bamber. My name is Adams. Roger Adams. Maybe you've heard of me. I write for the pulp magazines. Mystery stories, horror stories of two and three cents a word. But then again, maybe you haven't. It's been a long time since I've written anything, and even longer since I've sold anything I've written. Maybe that's why nobody believes me, because of what I did for a living, and what happened afterwards. It all happened in Los Angeles, the place they call the city of the angels. I was living in a broken-down apartment house that overlooked that cultural desert that is the city of Hollywood. It was late at night, one hot and smoggy August. I'd spent the whole day sitting, staring at a typewriter that sat staring back at me. I hadn't been able to write a word for days.  I went down and I bought two bottles of cold beer, and on my way back up to my... Well, Mr. Adams.  I thought if I listened to my door long enough, I'd catch you sneaking up and down stairs. No, I wasn't sneaking. Well, I'd like to know what you call it, walking on the sides of the steps that way. Mrs. Snyder, you have an extremely suspicious and unpleasant nature. When are you going to pay me the money, Omer? At the end of the week. You've been saying that more than a month now. Well, now this time it's true. I just sold another horror story to authentic mysteries, and the check is in the mail. Now, I thought it would be here today. Well, I've heard that one before. No, I swear, I swear it's true. Now, please, Mrs. Snyder, you have got to trust me. I will have the money for you by the end of the week. Well... Friday for sure. Everything I owe you. I promise. Well, why can't you have a little of it now? I'm going to count five or ten dollars, maybe. Because I don't have five or ten dollars, maybe. I see you've got enough to spend on beer. Mrs. Snyder, it cost me fifty cents for two bottles of beer, and that's all I've had all day. Now, if you like, there's a two-cent deposit on each bottle. I'll bring them down to you when I'm done. Now, don't get smart with me. I've been very lenient with you. I told you you will get your money at the end of the week. Well, you better. You don't allow to go. You hear me, Mr. Adams? I did with my back to the door until I regained my self-control. The room was still the same. The rumpled bed, the sock hanging from the sink, the litter of papers on the floor. I went to the kitchen, rummaged around until I found a can opener. The beer tasted disappointingly warm as the night, and sour and bitter as the day. I went to the typewriter, but it was no good. The same sheet of paper I'd rolled into it five days ago sat staring up at me, blank, white, and unyielding.  I was at the end of my rope. I was broke. At the end of the week, I'd be evicted for non-payment of rent. The worst of all, I couldn't write. Not a single idea came to my head. And then I heard her voice. The voice of the woman upstairs. I had heard it many times before, sometimes when I sat unable to write, mostly at night. To me, she had the most beautiful voice of any woman I'd ever heard. And I imagined her to be like her voice, soft and lovely like her voice. But then it occurred to me that I didn't know what she looked like. In all the months I'd lived in Mrs. Snyder's apartment house, I'd never once seen her. I'd seen her husband many times. As he went back and forth on his way to work, he was a short, ugly little man. And it seemed impossible that he could be married to a woman who sang as beautifully as that. Suddenly, I was overwhelmed with the desire to know who the woman was and what she looked like. I grabbed a cup from the kitchen and I raced up the stairs to the apartment above. Yes? Hi there. I'm Mr. Adams from the apartment below. So? Well, I hate to bother you, but I was just sitting down to dinner when I discovered that I was fresh out of coffee. I wondered if I could borrow some from you. I don't drink coffee. Well, how about tea? Just a couple of teaspoons full. I hate to eat a meal without something to drink, and I don't want to run down to the store and let my dinner get cold. Cue me to cup. He took the cup and closed the door in my face before I could see anyone else in the apartment. But not before I got an impression of what it was like. It was laid out the same as mine, only cleaner. But it looked old and dirty. Maybe it was the furniture. It was old and black like it. I'd been brought over from the old country and much older than Mr. Steinmetz, who'd lived alone a long time. Here you are. Oh, thank you. Thank you very much. You're Mr. Steinmetz, aren't you? Yes. Why? Well, I thought that's who you were. I saw your name on the mailbox downstairs, and I thought I might as well introduce myself. I'm Mr. Adams in the apartment below. I know. And I thought since we live in the same building, there's no reason why we can't be neighbors as well as friends, huh? Well, is your wife at home? What makes you ask that? Well, on my way up, I heard a woman singing. I thought it was your wife and wanted to compliment her on what a beautiful voice she had. My wife is dead. Oh. Oh, I'm very sorry. Well, it must have been your daughter. You heard no woman here. Oh, Mr. Steinmetz, I stood right outside this door, and I heard her just as please. You heard nothing! My wife is dead! I stood in the hallway stunned. I had heard a woman singing. I was sure of that. But why had he lied? I went back to my apartment trying to figure it out. I sat in the darkness with the warmer second bottle of beer, and I heard her again, more clearly and distinctly than I'd ever heard her before. There was a woman up there. I was sure of that now. But who was she and what was she doing there and why had the old man lied? Tomorrow when he went to work, I'd find out the answer to that. But the night passed slowly. The gray hours dawned slower still. Seven o'clock came, seven thirty. At eight, I saw Eric Steinmetz leave the building with his lunch bucket under his arm. I knew he'd never returned home before six. And that meant I had ten hours. I wanted to rush upstairs right away, but I made myself wait until I was sure that she was there. At ten o'clock, I was sure. I crept up the stairs of the hall using the sides of the steps so they wouldn't creak. My heart beating in my mouth. The closer I got, the louder her voice became, and at the door it sounded as if she was standing just on the other side. Hello, Mrs. Steinmetz. Are you there? Mrs. Steinmetz, this is Mr. Adams, the man in the apartment below. I wonder if I could see you a moment. Mrs. Steinmetz? I knew she was there. Something was there. Through the wood of the door, I could hear breathing. I could feel her heart beating. I had to see the inside of that apartment. What do you mean you lost your key? I didn't lose it. I left it in my room and I locked myself out and I wanted if I could borrow your master key. I can't let anybody have that. I only wanted for a minute just to open my door. Why can't you hang on to your own key? I told you it was an accident. It could happen to anybody.  You don't pay your rent. You locked yourself out. Please, please, Mrs. Snyder, let me have the key. Please. Now, I will run up and I'll open the door and I'll bring it right back. And I will have your rent for you at the end of the week. Well, okay. But you bring it right back down here. I'll be waiting right here. I'll be waiting until you do. I don't want any funny business in my apartment. As I ran up the stairs to my room, I fished out the pieces of wax I had put in my pocket. At the door, I squeezed them together over the key. Hard. In my mystery stories, I had written about this method of obtaining keys hundreds of times. But I had never once done it myself, so I wanted to be sure I did it right. Well, what's taking you so long? I'll be right there. I pulled the two pieces of wax apart. The impression was clear and perfect. I opened the door with my own key and raced back down the stairs. Well, what took you so long? I had trouble with the door. Oh, thank you, Mr. Snyder. Well, I've got to run. I'm late as it is. Well, when are you going to pay me that money that you owe me? Later. Later. This is a very difficult thing you ask, Mr.... Uh, Smith. Yes, of course, Mr. Smith. It is not only difficult, but it is against the law. Well, that's all right. I'm a special investigator. You have credentials then? Uh, no, no, not, not on me. See, I'm not allowed to carry them because of the nature of this case. Oh, I see. Well, allow me to introduce myself. I am the President of the United States. Oh, well, now, look, are you going to do it or not? There are plenty of other locksmiths in this town. I would not touch this key for less than $50. What? I'm sorry, Mr. Smith. Well, uh... Look, here is my watch. It cost me $200 new. Now, will you take that instead? It cost you maybe $35 new. Well, now, will you do it or not? I see by the President's new watch that Congress is now in session. It was two o'clock by the time I stood outside her door again. That gave me four hours before Steinmetz came home. I knocked. Mrs. Steinmetz, are you home? I stood listening for a long time before I slipped one of my newly made keys in the door. Hello, Mrs. Steinmetz. Are you home? There was no answer. So I stepped inside, closing the door after me. The apartment appeared the same as it had the day before, but somehow it was emptier now. I crossed the worn carpeted floor of the curtains covering the small kitchenette. Mrs. Steinmetz, I shoved the curtains aside. I turned in the thick, hot stillness of the afternoon apartment and started toward the bedroom door. Halfway there, I was stopped by something that caught my eye on the round table in the center of the living room. It was just a picture. At first glance, it looked like a picture of two people standing together, but as I looked at it closer, I realized it wasn't of people at all, but a close-up of two animals or reptiles that only looked like people. They didn't have any hair or ears, and the surface of their skin was scaled like a snake's. I was about to search around for more pictures when I realized she was singing again and it was coming from the bedroom door. I left the room and I threw it open. The blinds were drawn in the hot, stuffy room and in the darkness a single candle burned. As my eyes adjusted to its light, I could make out a sleek bronze casket sitting at the other side of the room. Now, in my career as a writer of mystery horror stories, I've killed off about 500 people and come across countless bodies, murdered in foul and devious ways, but never once has I been alone in a room with a closed casket or opened one by myself. It took a great deal of courage to force myself across the room and even more to place my hands on the cool metal of the lid. And then with an effort, I raced it. It was empty. The candlelight played on the quilted white satin lining of an empty coffin. Mrs. Steinmetz, I know you're in here, Mrs. Steinmetz, and I intend to find you. I started going through the boxes and trunks and junk piled in the bedroom. I know she was in the apartment someplace. I could hear her voice. And dead or alive, I intended to find her. I went through the living room, the kitchen, overturning and pulling things apart. Then I was about to give up when I saw the closet door. I'd never noticed that before. I stumbled across the room to get to it, and then I tore it open. She was beautiful. She was easily the most beautiful girl who had ever lived. She had long, yellow hair that tumbled over her shoulders in a golden cascade.  And as I stood there staring at them, I realized they had that half-dead, half-live, never-dead, never-having-lived look that I'd seen on the faces of effigies in a wax museum. Cautiously, I reached out and pulled my fingernails down her cheek. What are you doing? Ouch! Out of my apartment!  Out and steal!  He wasn't going to call the police. I was. The body was right here in this closet. Well, it isn't there now. But I saw it with my own eyes. Mr. Adams, we've searched this whole apartment and haven't found anything that even faintly resembles a button. Well, how about the casket? He hasn't explained that yet. Yeah. Mr. Steinmetz, how about that? Officer, I am old man. My wife died 20 years ago. I think I died too soon. I buy coffin. I not die, but I still have coffin, so I keep it here. There's no crime against that, is there? No, I guess there ain't. But how about this man? He break into my house, tear up my goods. He is lying. The man is a maniac. His wife died and he preserved her in wax somehow.  All right, where's her body now? Well, I don't know. You can't support your charges without a corpus delicti. Oh, officer, he's crazy as a loon. He causes nothing but trouble. Now, wait, wait, wait. I dug my fingernail in the wax on her face. Some of it is still there, you see? Green wax, Mr. Adams. Anybody could dig their fingernails in a green wax candle. Well, it wasn't green before. No, wait. I want no trouble. Just he don't bother me no more. That's all I care. He leave me alone. Let him go. Well, I can't very well hold him unless you're willing to press charges. Please, let him go. Just he don't bother me no more. All right.  You can consider yourself a very lucky man to have... The officer took me down to my room. And I had to promise I wouldn't bother the old man any more. And then I had to listen to Mrs. Snyder complain about the rent. Well, after they were gone, I lay down on the bed and I tried to sleep. I watched the day darken outside my window into dusk, and then night. And with the night, she started singing again. But I pulled the pillow over my ears and I fought against her. I would have succeeded, too, if they hadn't started arguing. I'd never heard that before. And all the months I'd lived in the apartment house, I'd never heard the woman speak. I fought against it as long as I could. And then I crept out of my room and up the sides of the steps. As I stood outside the door, I could distinctly hear two voices, a man's and a woman's. All of your fault. No. If you'd stayed in your place, this never would have happened. You were the one who wanted him up here. I never wanted any part of it. Why don't you let me go? Where? Please, don't hit me. This was more than I could stand. I slipped the key out of my pocket and into the lock quietly. Why don't you let me go? You'll never leave me. I threw the door open and ran out of the room. What I saw made me so paralyzed with fear that all I could do was stand there and scream. I saw it. I tell you, I saw it. I tell you, I am in it. Stop listening to him. He's a monster, a maniac, a lizard. He's crazy. I am not.  When I came into the room, there were two of the monsters, lizards, whatever they are. And when they saw me, he changed himself into the form you now see. And she, she shrunk before my eyes into a little green snake that slithered into the couch. He's crazy. I told you that before. But I saw it. Get him out of here. Look, look under the couch. There's a little green snake.  Why does the man persecute me? He's lost his mind, Mr. Steinmetz. I knew all along he was crazy. He never pays his rent. I can promise you he won't bother you anymore, Mr. Steinmetz. We'll take him down and have him committed. If you like, you can come down tomorrow and sign a complaint. No, no, no. Just so he don't bother me anymore. Well, he won't bother you anymore. I can promise you that. Good night, Mr. Steinmetz. Good night. Good night. Are they all gone? Yes, they're gone. You can come out now, dear. It's too bad they unbalance so easily. Yes, it is. It's because they only have the five senses to rely on. Keep changing the impressions their senses get and they go mad. It's not their fault. They're inferiorly made. Can't we go home now? We found out what we came to find out. Yes. I'm tired of this planet anyway. Suspense. You have been listening to the Green Lorelei, written for suspense by George Bamber. Heard in tonight's story was Bob Reddick has Roger Adams. Also included in the cast were Elizabeth Lawrence, John Gibson, Bill Smith, Herb Duncan, Ellen McCrae. Another tale well calculated to keep you in. Suspense. This is the CBS Radio Network.


Being a man comes with so many responsibilities, including learning how to handle them. Guess what? It all starts with now in your 20s. Now you'd have to start making big decisions and taking specific actions that would have an impact on your life and career in the future. So the last thing you want to do is make the wrong decisions. The truth is that the journey to success takes time, but taking the right steps starts now. In this video, I'll share with you 7 things every man needs to start doing in their 20s. If you're new here, consider subscribing so that you don't miss out on exciting videos like this. 1. It's time to step out of your comfort zone. T. Harve Ecker, an American author, once said, If you want to be rich and successful, you'd better become comfortable with being uncomfortable. Time and over again. We've heard people say that to succeed, we need to be willing to take risks. Yes, we agree, but the actual act isn't something that we've achieved. Here's the thing. You need to understand that everyone who has succeeded in life had to make difficult choices that eventually led to some of the opportunities and benefits they're enjoying. If you are comfortable with the position that you are right now, you'd never take any step in the direction of growth. So it would help if you got comfortable with being uncomfortable. So why now? You see, growth or change is the only constant thing in life. It means that to succeed, you'd have to keep growing. It isn't a one-time event, but a process that you have to get used to for as long as you want to stay relevant. What better time to get used to this lifestyle than in your 20s, when it is easy to try out new things.  Business leader and philanthropist, Melinda Gates, puts hers this way when addressing a graduating class in an interview with CNBC. This is a time in your life when a whole host of opportunities will suddenly open up and if you stay in your comfort zone, you'll miss out on so many things where you're bored experiencing. Stepping out of your comfort zone means that you do not take the easy way out, so get used to trying out the hard stuff. 2. Start building a career. The good thing about being in your 20s is that you're young and agile. You can go as far as possible to ensure that you achieve your goals. A good time to start paying attention to your career, learning as much as you need to about your field, pushing yourself to do the hard work necessary to gain the much needed experience required for success and excellence, etc. is now. You see, it takes time to build a career. You won't get everything right immediately. You'll make some mistakes that you'll learn from and eventually become better because of it. The earlier you experience these things, the better it is for you as far as your career success is concerned. So, start now. 3. Be willing to work. According to Colin Powell, a former US Defense Secretary, a dream does not become a reality through magic. It takes sweat, determination, and hard work. If you want to succeed, then you should be willing to put in the work. It takes hard work alongside other factors to succeed. When asked, most self-made multi-millionaires will tell you that their success came from lots of hard work. Working hard is the only thing that can help you attain the mastery level in your field that will automatically put you in place to succeed. The founder of Virgin Groups, Richard Branson, started when he got his record label in his 20s. And according to him, building a business from scratch is 24 hours, 7 days a week. Divorces, it's difficult to hold your family life together.  Contrary to what most people think, successful people have the busiest schedules anyone can imagine. Yes, they always look glamorous and well put together, but most times, it's from one place to another, trying to get work done. So it's like this. Work got them there, and it will keep them there. If you plan to be successful, you should plan for it and be ready to put in the necessary work. Four, manage your time properly.  You and you alone determine how that coin will be spent. Be careful what you do, not to let other people spend it for you. Learning to organize your schedule and arrange your daily to-do for maximum productivity might be a bit of a struggle when starting to build your career. However, learning to set deadlines for everything you work on and choosing to avoid multitasking will help your time management skill so that you can achieve more within the short time frame. Peter Turler said, if you want to have a high quality personal life, plan a high quality personal life. Five, create multiple streams of income. A part of effectively managing your finance is learning how to create multiple streams of income. Creating multiple sources of income is an excellent way to develop the attitude that puts you, not your employer, in charge of your income. The truth is that almost nobody got wealthy by merely working for someone. They did by learning the rules of money. Today, most millionaires are said to have at least seven streams of income, which they pretty much started acquiring in the 20s. Six, learn how to invest. That you have multiple income streams isn't a guarantee that you will automatically become wealthy. If you still do not know how best to spend and manage your funds, if you want to be successful, you'd have to have a financial plan that you can start executing from as early as your 20s. Manoj Arora, an Indian author, said long term thinking and planning enhances short term decision making. Make sure you have a plan for your life in your hand, and that includes the financial plan and your mission. Have you ever thought about investment? Investment means putting your money to work for you. It's like this, you put your money into a working business that can generate profit for you after a speculated period. It is to allocate money in the expectation of some benefit in the future. You can also think of investment as obtaining an asset to allow it to appreciate in value over time. According to Aya Laraya, a realtor and writer, when you invest, you're buying a day that you don't have to work. Carlos Slim, a Mexican business magnet and investor, said, anyone who is not investing now is missing a tremendous opportunity. One secret of wealthy and successful people is that they know how to invest. Here's the thing, building a habit of savings and investing the money doesn't have to be a difficult one. As long as you're willing to start, make a move. You can start by saving at least 10% of your monthly income and perhaps at the end of six months or say a year, invest the money. The longer you live the money, the more interest it accrues. That's the law of compound interest. If you want to take advantage of compound interest, then you have to start early enough and now is an excellent time to start. Sally Kroček, the former CEO of Merrill Lynch's Global Wealth Management Division and founder of LVEST Advisors, said, since you're young, this recurring deposits will help put the power of compounding to work for you. That means you earn returns on the money you invest and also earn returns on this returns over time. So instead of waiting till you have so much money, why not start now? Forgive yourself if you didn't start early enough and start now. Finally, if you haven't started any of this, hearing this now is in no way suggesting that you should beat yourself up. Instead, forgive yourself. Don't be too hard on yourself. Start now and dedicate yourself to being better and growing. You'll be glad you did instead of looking back someday and wishing you had taken a different turn. Thank you very much for watching our videos. If you like this video, watch more videos on our channel and subscribe. We love you.


This lecture is part of an online course on commutative algebra, and will be about projective modules. Rather, it will be about the relation between projective modules and locally free modules. So let's just recall what both of these are. So locally free modules we defined last lecture, and these sort of correspond to vector bundles. So a vector bundle is a map from something to a space whose fibers are roughly speaking vector spaces. In the case of rings, we saw that a locally free module correspond to this is a module such that if you take a ring R and you cover it with open sets, cover its spectrum with open sets, spectrum of R i to the minus one, then M fi to the minus one has to be free over R fi to the minus one. And these open sets have to cover R, which means the ideal generated by all these elements is equal to the whole of R. So a projective module, module P is one with the following property that whenever you have a map from a onto a module B and a map from P to the module B, then it lifts to a map from P to a making this diagram commute. So some basic properties of projective modules, all of which are easy to prove is first of all free modules are projective. Very easy to check that free modules have this property because you just take a basis for the free module look at its images in B and lift those to elements of a that gives you a map from the free module to a. Secondly, it's also very easy to check that if P is projective, if P equals X plus Y is projective, then X and Y are also projective. So any sum and other projective module is projective, a sub module of a projective module is not projective in general. Similarly, any direct sum of projective modules is projective. Again, this is very easy to check and I'm not going to bother doing it. So we now have the following problem. Projective modules the same as locally free modules or more generally are projective things the same as locally free things so let's ask the question does is projective the same as locally free. The answer is yes and the other answer is no and which answer you get depends who you ask. So if you ask an algebraic geometry, they will tell you that there are lots of examples of locally free things. Projective if you are someone doing commutative algebra, they will tell you that these that locally free things are indeed equivalent if you are someone doing differential geometry. They again think that locally free things are projective. If you are someone doing complex geometry, say complex analytic geometry. But locally free things need not be projective. This is very confusing because quite a few people have kind of started off in one area and switched to some other area and got very confused about whether or not locally free things are projective. I want to try and explain why is there a difference and the problem is I'm not really going to be able to give a terribly satisfactory explanation because it really uses a certain amount of co homology so I'm just going to have to quote some facts from co homology So the basic thing is, let's talk about whether locally free things are projective in algebraic geometry. What you do is you get an exact sequence which looks like this. I'll explain this in a moment. So here A and B might be modules or they might be sheaves over a scheme or something if you're an algebraic geometry. So the basic thing you get here looks like this. So this X is something in homological algebra that I'll explain later and I sometimes write in capital letters and sometimes small letters because this X tier is supposed to be a shorter sheaf X and this X tier is just an Abelian group X. And this thing is a piece of the growth index spectral sequence of a composed funk to which you probably don't want me to explain in detail. Anyway, the key point is this X tier vanishes if a is locally free as a module or a sheaf or for that matter also vanishes if this is even locally projective. So this thing here. It vanishes for all. Or B if and only if a is projective. So this bit vanishes if a is locally free. And this bit. You want to vanish if a is projective and this is an exact sequence. So locally free things are projective. If this thing vanishes. Then locally free implies projective. And home of a to B is just going to be a module or a sheaf or whatever so I've got the question. Does this first co homology group, whatever that means vanish for all modules and the answer is yes. If you're doing commutative rings, or if you're doing smooth manifold. Why does it vanish if you have a commutative ring or a smooth manifold. Well it turns out that this vanishes. If you can define partitions of unity. So partition of unity means if you've got a smooth manifold covered by open sets. Can you write one as a sum of functions, each which is supported one of these open sets. If you're doing commutative rings and smooth manifolds. There is a sort of partition of unity. And this implies that this group here always vanishes and this implies that locally free things are projective. On the other hand, if you do algebraic geometry or manifolds, then in general you don't have partitions of unity. And this first co homology group that I was talking about doesn't necessarily vanish. And there are plenty of locally free objects that aren't projective. So this is a sort of explanation of why there seems to be so much confusion in the literature about whether triangles or locally free objects are projective. Sometimes they are and sometimes they're not. In fact, if you've done algebraic geometry, you may have noticed that even free things need not be projected which is a bit disconcerting, if you come from commutative algebra. It's not logical at all. It occurs for quite natural examples, even if you're working over one dimensional projective space, you take the free one dimensional module, so free one dimensional sheaf, that's not projective. Well, this is really a course in commutative algebra so we ought to be talking about the ring theory case. Locally free does indeed imply that a module is projective. And we can ask, does the converse hold? So does projective imply locally free? And it does quite often. So the answer is yes for finitely generated modules. And the answer is no in general. So what I'll do is I'll first quickly sketch why it's true for finitely generated modules and then give an example of a non finitely generated module where it's not true. Let's just quickly sketch the reason with a number of details missed out because I'm feeling kind of lazy. So if we've got a finitely generated projective module, it's quite easy to see that it's finitely presented. And with rather more effort, you can see that the stalks are free. So what does the stalks mean? Well, if you've got a module m, the stalks mean the localization of m as a module over r of p, here p is a prime of r and this is the local ring at p. The reason why the stalks are free is that projective modules over local rings are always free. That's actually a theorem of Kaplan ski, and I might talk about this later then again I might not. If you've got a finitely projected module then it's finite presented and the stalks are free. On the other hand, if you've got a finitely presented module and the stalks are free. This implies that it's locally free. And again, this is something I might prove later when we talk about modules with free stalks if I feel in the mood for doing this. The reason I'm not worrying too much about whether locally free implies projective is that in practice locally free modules that we come across are always obviously projective for instance they might be stably free and stably free modules are obviously projected because they're summands of projective modules so it's kind of nice to know this result but we never really need it very much. So, now I want to give an example of a projective module that is not locally free. And here we're going to take the following ring R, which is all functions from an infinite set X to a field with two elements. This is an example of a complete Boolean algebra. Complete Boolean algebras aren't actually used that much in commutative algebra. They tend to have some rather weird properties. They used very heavily in set theory and that they used a lot in Cohen's notion of forcing, which is used to construct lots of models of similar set theory with various weird properties. Anyway, so you can think of this as being a function from an infinite set X to Z over to Z, which is the same as a product of an infinite number of copies of Z over to Z and what this infinity is I don't really care can be countable uncountable anything. So if we take our module to be the following ideal, it's just going to be the functions or finite support. So you can think of an element of R as being an infinite set of zeros and ones with usually infinite number of zeros and ones whereas the elements I will be connected with all zeros after a certain point. So, first of all, let's show that I is projective. So for this. Notice that I is a direct sum of lots of modules I X where I X is a module of order two. And it is functions with support. The point X in our space X and this is a sum over all X. And now we notice that I X is projective. So R is equal to I X plus the module of of functions with support this joint from X. So this is the module R is projective. So I X is projected because it's a direct sum and of a free therefore projective module. The direct sum of projective modules is projective. And we've just seen up here that I is a direct sum of projective modules so I is indeed projective. And now we show that I is not locally free. And for this. What we have to do is to work out what does I F minus one look like over R F minus one. Well, after the minus one here F is any element of art is still a product of copies of Z over to Z. So unless so it's a product of a number of copies given by the support of of the element F so usually it would be just isomorphic to R. So what we find is that if F has finite support, then I F minus one is indeed free. In fact, it's just isomorphic to R F minus one. On the other hand, if F is infinite support. We can easily check that I F the minus one is over R F the minus one looks the same as I over on we find I is not so I F minus one is not free. So, we want to cover the spectrum of R by a finite number of forms spectrum of R F I minus one such that we want I I to be free over this so F I has finite support. But if F one up to F and have finite support, then F one up to F and obviously can't be the ideal are because these only generate functions with support the union of the supports of all the F I which is finite. By the way, you've got to be a bit careful here because you might think that the spectrum of this ring is is something to do with the set X. And if the set X is finite than the spectrum of R is indeed the set X. However, if the set X is infinite its spectrum is all sorts of weird extra elements not in X called ultra filters and if you want to know what an ultra filter is you can go and look at a book on set theory and forcing which goes on about them. So, the ideal I is a module that's projected but not locally free and of course it's not finitely generated. There's a final slightly funny example we can give using this ring, which is that for a vector bundles over a smooth manifold. So the property that the sum of finite dimensional vector bundles is a vector bundle where this sum is possibly infinite. That's sort of quite easy to check because all you need to do is notice that for each point on a smooth manifold you can find a contractible neighborhood and all vector bundles are trivial on that neighborhood and so on. And the analog for rings is false. The direct sum of locally free modules, even a finite rank need not be locally free. And we've actually seen an example of this. Which is the ideal I in the previous two slides contained in the ideal are because here the ideal I was a direct sum of the ideals I X and the ideals I X here we're all locally free. But if you take a direct sum of an infinite number of them, you get an I an ideal that's not locally free. So for modules that are not finitely generated have to be a little bit careful because your intuition about analog between vector bundles and locally free modules kind of sometimes breaks down a bit. Then, next lecture we might be looking at modules that are stalk wise locally free which is a slightly more relaxed condition of local freeness.


All right, so hello everyone. In the agenda, it says that I was supposed to be joined by my colleague Fabian, but he could not come because of logistics reasons. So if you came here just to listen to him, you will be disappointed. So my talk is called LLVM meets code property graphs. And today I wanna talk about this thing, like what is code property graphs and its application in the security and software analysis domain. So a few words about me. If you want to find out more, there is a blog. I'm on Twitter and also you can drop me an email if you have any questions and such. So I work for a company called Chief Left Security and we are basically building the tools for custom static code analysis. So my responsibility there is to make it work with LLVM so that we can handle languages like CC++ and so on like more of them. So before we start, yeah, I wanna ask you some questions. Can you see a problem with this code? Anyone? Just shout like, yeah, double free, nice. So it was like four seconds. Can you see a problem with this code? Use after free, yeah, that was extra faster, but can you see a problem with this code? So apparently you can if you have enough time and power you can probably spend some ages and to analyze it manually to see how it works and so on, but yeah, that's not practical. Therefore, we kind of have to use some tooling and gently ask machines to help us with this task. So I wanna show you some demo. So this is the basic example. The first one was double free, like how do you find it with the tooling? So first you need to create to law this program into memory and yeah, so that you can run some queries to analyze it. Then it's actually very easy, it's an easy example. Yeah, so to find double free, we just need from like data flow perspective, we just need to find a flow from one free call to the other one where the parameter is the same. So we have a source, which is the parameter of the free and we also have a sync that is also parameter to the function free. So now if I run like show me all the flows from sync to source, yeah, then it doesn't work because I forgot one thing, all flows. Yeah, here we are. So it says that the first call is at line six in file M and the second one in line eight. So you can run more sophisticated queries for that but we'll get to it in a moment. Yeah, so this tool is basically built on this idea of what property graphs and before that I have to make a step back and talk about the property graphs in general. So I assume that you probably all know what the graph is, if not, so basically you have some set of nodes and those nodes are connected with just some edges like some by some means and the property graph it's basically an extension of graph or it's also called multi-graph where the nodes they may have several edges connected like two nodes may be connected by several edges and those edges and nodes as well they may have a number of properties basically like key value things. Yeah, and the CPG the code property graph it takes several representations of the program namely it combines AST, it combines the control flow graph and program dependence graph. So in the end, basically you have this multi-graph somewhere in memory or not and normally there are tools like Neo4j or Apache something that allow you to work with those graphs.  So we just run queries against the database. So the beautiful part of this code property graph or at least this implementation affects that it's kind of multi-layered thing. So on this example at the very low level you have just like rough database representation and it's not really nice to work with as a human being because you just need to write lots of boilerplates for some things. So for the code property graph there is another level that adds some more like syntactic sugar so that you can run some simple queries and find more information. There are more overlays and all of them are, they are domain specific. So for example in our application there are some specific overlays for web applications saying that okay you have basically you just like load the CPG into the program and then you run a query like show me all SQL injections and it shows the flows from API route to some place in the code where the SQL injection may happen and it may be exploited by the user. Yeah, so if you're familiar with LLVM or Clank and it's architecture then you will recognize this slide basically so what CPG is it just another intermediate representation that just presents the program. So at the front end there is a number of yeah number of front ends for each language so that they emit the CPG and then CPG is being used by the back end. So currently yeah originally we were using the Neo4j it's the graph database but it's like too general and it just doesn't really fit our needs and it was too slow because if you want to analyze some big projects and you should load the whole database in the memory and for some projects it may require like hundreds or tens of gigabytes. So an overflow DB is just the same graph database that stores the information. It loads the information lazily and if it doesn't need anything it just can overflow it on the disk. So basically if you don't have enough memory on your machine you can still use it but you pay with performance because of the swaps with the disk. So and what I've shown this command line tool it's called ocular there is a counterpart it's called yarn so the yarn is the open source part it's yeah mainly targeted for C and C++ and it's using the fuzzy C front end and fuzzy means that it's not real compiler front end it just sort of set off regular expressions. It's yeah it's more complicated than that but that's yeah not important. The ocular is more it's a commercial tool but it's very similar to yarn it's capabilities but it has just more overlays for domain specific things like some enterprise apps and customers and such. So my goal today is to talk more about the LLVM to CPG. So originally the project was born because we have some customers and clients they use fuzzy C to CPG but it's not quite good for when it comes to C++ or when you wanna get some better idea of a program it has some advantages like you don't have to compile the code you can just run it on some source files and it will just work but so there were many requests to add better support for C and C++ so this is how LLVM to CPG started. The question that I'm always getting when I talk about this stuff that why it's LLVM to CPG and not client to CPG because I mean it's like obvious that you can get much better information from the source code and if you go to the LLVM level you lose some information. So we acknowledge that but we also were curious about some other parts like what are the other advantages and disadvantages and the other one is integration. It's arguable but in my opinion it's much easier to get LLVM bitcodes then connect some plank tool to archaic build system or let's say some Xcode projects on macOS platform. Yeah the other parts that support the languages so if we want let's say yeah it's very common on macOS platform that Objective-C code mixed with Swift. For that you cannot use just Clank you would have to or we would have to combine Swift compiler and Clank compiler and somehow cooperate with this but because of the LLVM like as a baseline we can just use multiple source languages in one place and also the language feature set. So C, C++, Objective-C combined they are just huge. We could have built the support for that but it would probably take several years and with LLVM it's much much smaller that basically means that the time to market is much faster. Yeah so these are the conclusions some of them yeah arguable but that's the current state. Yeah so the strategy was that we take LLVM bitcode as a baseline and then basically oriented by feedback we just yeah basically customers say okay we don't see something in Objective-C code and we just add support for that and we are driven by feedback in this case. So previously I mentioned that we have AST right the part of the CPG is AST but we kind of don't have that at LLVM level but still we can mimic it. So on the left there is very simple function identity that just takes a parameter and returns it and on the right you can see the LLVM bitcode that just not optimized does the same. So first we made kind of assumption that okay we'll treat every LLVM instruction as a function call. So it's not really useful for especially for the user for human beings who use the tool because they just it just doesn't make sense like lots and stores like it's basically working on the assembly level not as nice. So then we applied some yeah made some some other assumptions and basically okay we specialized some of those instructions and basically load and store they are just assignments was in direction so that we could build in the end from this bitcode we could build the AST that looks like this. So it's not one to one mapping just as an example. Then with this AST we could build the at CFG connections yeah and with this code now it's full now it's complete and we can run some queries and find some nice properties. So yeah as I mentioned we acknowledge that we lose the information but we are still curious like what kind of information we lose and the one is the yeah comes about types because this is probably the most interesting part when you do analysis as a security person because yeah what I observed people look for things like okay find all the members named a length and see if this length can be controlled by something and if this length is participating in the malloc calls for example because then you can probably exploit the stuff. So with the names of the structs itself of the types they are there some like most of the time they are in place and they available but we definitely lose the names of the members because for a Loviam it just doesn't matter it's just like indices zero one two whatever but we still can look at the debug information and if it's present of course and attach the right names for structs but that's certainly not the case for unions because at the source level we kind of have two members of a union but at the Loviam level it just like one filled like was one property and it's always so from the call like get element pointer it's index zero we cannot know whether it was using the A or B in this example. Yeah the other part that was a bit surprising not unexpected but the ABI plays a huge role in this conversion so at the source code level we have a function that takes a struct as a parameter and returns a struct and if on this the CPG level if you want to run a query okay find all the functions that return the struct what's it's named color then you'll not find anything because of the Loviam level it returns void and instead it takes two structs as a parameters. Yeah and it gets even worse with different types because in this example these are all doubles and they are kind of passed as a single thing as a struct but if we change that to integers then because of the again of the ABI of this specific platform you don't even have structs so there are just like two numbers and that's it they are then kind of decoded by the machine. Another part surprising one was the constants and it's actually by far the biggest problem so if here in the function main we define locally a constant that holds a number of pointers to some functions. At Loviam level it will be a global variable and global variables are not very nice when it comes to the data flow tracking and code analysis because you can do like intra procedural analysis and it's kind of small because you have just one function but if you need to also analyze the global variables then you have to find okay who may write to this who may read from this are there any aliases and so on it just the search space explodes and that gives us like really hard times to get it right. Yeah just as a work around so far there's just we are kind of weight listing some edge cases like this and making them basically putting them back like locally in the function but it's not a universal solution unfortunately. Yeah this is the other parts like the big so far like the biggest problem well not the biggest but one of the big problems that I just faced several weeks ago in source code you can define a type in a structure in header like struct and then you include this header into two different compilation units then you compile them both differently and at the Loviam level you have two bitcode files that have types like struct point and struct point in the other module. If you load them into the same context then Loviam must rename those to avoid collisions because basically the types are stored in just like map basically like key value storage and apparently there is no good solution for that so we want to de-duplicate these types but there is no way to do it at least currently in the using Loviam built in things. So this is one of the examples why it doesn't work because in Loviam types are considered equal if they point to the same object basically so all the types they are allocated on the hip and if you have two different contexts and you ask two like two flaws they are I mean they are the same type right but Loviam considers them to be different. So the first attempt to solve this problem was to use the function called easily out identical you can just run it on a struct and it says yes or no but it doesn't work. So the structs on the left they have identical layout and yeah it's all correct but on the right Loviam does not consider them to be identical because this function just checks that all the members they have the same type but in fact so in my opinion it's like it's under implemented in the base case that should not be like that or it should be renamed to like is members identical that would be more valid thing. So we discovered it much longer in the implementation and had to find some other solution. And the solution that we used that also didn't work well the IR linker or also there was a command line tool called Loviam link. So basically it just tries to combine two modules and to eliminate as much types as possible. So in this case it works perfectly because there was just one type point left and we can use it. But in this case if you have two different types from the user point a few like points and topple but they have the same layout one of them will be eliminated and so basically we're losing even more information. So yeah I would suggest you don't use IR linker if you want to preserve the type information or be careful because what it also does it may just screw the types in a way that there may appear a type that just was never existed in the high level thing. Of course you should not rely on this information and so on but still we want to rely on this. So our attempt to solve the type the duplication problem was inspired by tree automata and ranked alphabets. So basically a ranked alphabet is just set of symbols and each symbol has a number of parameters. You can think of it as like functions and you can combine those functions to form a trees and this is where the tree automata comes in and each tree can be represented as a string like single string. So then our task to just encode the types into such trees convert them into the strings and yeah then basically we compare the thing. So the next part I wanted to show you I tried to put it on the slide but it just like doesn't fit. I will try to explain it a little bit. So it comes, yeah it's about objective C. So that was actually very easy to like the easiest part was to recover the information from objective C because it's all there in the bit code. But there are some quirks like yeah should have found a nice picture for that but I didn't. Yeah so I'll try to explain using this example. So in objective C each class has a super class and a meta class. This is the by definition and a meta class of a class is the meta class itself and the parent class of a meta class might be either some other meta class or might be the class that defines this object like in the first place. So it's very mixed. Yeah just to mention that part. Yeah I think it went faster than I expected. I probably missed something. Yeah I'll just say what I missed to say before. So one of the big problems in this case or of big issues because the CPG thing it has kind of two users. Two one is explicit user a human being that is sitting and running those queries and the other user is the data flow tracker. And this is where we just don't have the right I mean there is no right answer like what to do because in a low VM if you run optimize if you optimize the bit code and you load it into the CPG then you get much smaller thing and data flow tracker is much more happy about that but as a user you basically again you lose the information and you cannot work with this. So this is one of the kind of dilemmas that we have. So our next steps for this project are basically to make it stable and to add more languages like more features from some other languages. I don't know like Rust, Swift, Fortran. We the other part that we're kind of started working on but not there yet is we want to hook back into the clank into the ASD and just basically extend the bit code like the CPG representation that we have on the base on the bit code so that we don't really rely on the debug information because it's not as nice. It doesn't always work especially if you have different versions of LLVM and different versions of compilers and so on. Yeah and the other part that we want to analyze more projects and to get some results because so the original work on the core property graphs, the Fabian actually the clique who couldn't join they analyze the Linux kernel and they found some vulnerabilities that were not known before that. So we want to kind of try to do it with some other projects. So yeah, some resources if you're interested I do recommend you to check out Yoran. It's free open source and such. There is also Ocular. It's commercial product but maybe you are interested in it at your company. So I did not talk, oh yeah, type equality.  I think I would be happy to actually contribute it back to LLVM but I still have feeling that it's a bit too complicated and over engineered. So I'm kind of trying to get some feedback from LLVM folks and it's not really successful so far. So if you have some comments please be my guest. Yeah, the last point it's the link to the other talk that is more general like how you build tools based on LLVM. It's given at URLLVM, it's based on my experience building such tools. So I decided not to cover the same parts in this talk and just to refer the other one so that I don't repeat myself. Yeah, so I think you will get longer break after this talk so if you have any questions yeah, I would be happy to answer them. Yeah, please. Based on the number of lines of code of some product. Yeah.  So the question is how much time does it take to generate CPG for some projects? So yeah, generally it depends on the front end but for LLVM to CPG I can say that for, I tried it on Blender which is quite big but it wasn't full project and it was taking on I think on this machine like roughly 15 minutes. And we also did it on the Mac OS kernel and that was also like about 15 minutes just to get this thing. So yeah, it's reasonably fast I would say. So you essentially know what all of the systems and could you take a project and basically query does this use any network? So to verify that some random project you're going putting down internet is not setting anything. Yeah, yeah. So as an example, yeah, the question is if there are some way to find some patterns right in the code, can I see it like this? So or find like... Specifically the idea of putting something that you don't know about and saying does this... Yeah, what does it do? Like yeah, to mining some properties of this program like does it send network requests? Does it allocate memory and so on? Yeah, so I think it boils down to two things. So I'll get back to this. Yeah, this thing first. So this is the command line interface. It's like very similar to SQLite and it's basically the Scala. So first of all, one can write scripts in Scala interfacing with the CPG with the database and having those queries. For example, if you have some domain specific, so this is what our security team does actually. There are projects like kernels and some drivers they don't necessarily have, I mean they use malloc sometimes but sometimes they have some wrappers around those mallocs. So they kind of annotate the functions of interest manually and then they run some queries to show me those functions. And that's one part, so it's technically possible. So there is no, I mean if you ask me now to check if there are network requests there is no such thing but it's technically possible to build. And this is where this overlays come in. Yeah, as I said, they're domain specific. So we have in fact a number of overlays for goal language, for web applications specifically. Find all the routes, all the API endpoints in this application. So just as an example. So if I could annotate functions that say this can put something in a buffer and then this one is affected by X global variable and go can it find me the functions that can put this global variable eventually put something in a buffer? Yes, yeah, so generally you can do it. It depends on the scale and size but yet generally, so I, yeah, this shown this example from the demo. So this is basically what happens here. So it's very like simplified, like the most simple example. So our security guys they are doing some like really crazy stuff with it and I just not able to reuse it. But this is basically what you do. You define one part, you define the other part and then you find like some connections. Yeah, does it make sense? Yeah, okay, thank you. Please. So that's the beauty of LLVM because we don't really have to take care about that because yeah, the question is how do we handle variadic templates and such in our case? So because we work on the LLVM bit code level, this information kind of encoded into the signature into the name of the function or method. So what like in this case, currently what we do only just demangle this name. So that users can see something reasonable. But I mean, it's like we have all this information in the string already so we can parse it, we can rebuild the whole template thing but it just, yeah, no one asked for that. So yeah, the question is how do we handle the constant types in, yeah. Yeah, so far I think we don't have any special treating for that. I mean, it's the global variable, right, normally and there is no great support by the specific of the CPG because of the space explosion. So I mean, it can be implemented, we just didn't get there. But so far for, yeah, I think in most of the cases when we are interested in the global variables, these are either function pointers because it helps for the data flow resolutions or the constant, like string constants, for example, so that a user can see that, okay, these are the strings are used and so on. Yeah. Is it possible to compare that with something like the Clang static analyzer or is it just so completely different that it's incomparable? So you can compare that, I think to a certain extent. So this tool is more in its, like in a nutshell, it's more like user driven. So and I think the audience of this tool is security teams, like red teams, blue teams who analyze the code. And we don't really have such checks, the same checks that Clang analyzer has because I mean, because there is Clang analyzer and it's just, you can already use it. So there are other tools. Yeah, but we can do it. Sorry, that was a question, back. So on this, why LVM works like this? Why doesn't it automatically deduct the K-struct? Is that a conscious decision, design decision at some point? Or has it just the maximum of history? Yeah, so the question is more open to the community. So why does LVM not deduplicate the types by default? So I don't have an answer, I mean, I don't know. I don't know. Sorry. Yeah. The structure is super complicated. It's in this table or it's super complicated to have an algorithm which can decide whether two structures are equal from a layout point of view. You've designed a solution which relied on some graph and the layouts to recursively check if two strips are the same. There may be edge cases when you use some unions, some GCC extensions or Clang extension where this thing is not going to work because we're relying on obscure pictures which are not disabled by a combined time. Yeah, okay, the question is... Doesn't it work? Yeah, it's not, yeah. Sorry. I mean, I still can comment on that. There is another approach to that. So first of all, in our case, we don't really use the layout equality to decide, but we kind of use the structural equality. So that if you draw the structs as a graph or as a tree, they must have equal shape. So this is our definition of equality. And there is another approach. I think it's called like based on Hopcroft's DFA minimization algorithm. I think at least my colleague told that this is what IR Linker does or it looked to him that this is what IR Linker does. And there is also some other, I think, scheme project that they do this, they use this algorithm. But it uses different equality thing. So we, it doesn't, I mean, it doesn't fit our definition of equality. So this is why we do it the other way. So there are two questions, yeah. Same or does it take the type with a pointer to type and compare them? Yeah, so it doesn't treat pointers as the same. So that's the point and to avoid recursion. So basically, when we build this tree, we rename, we don't take names into account. We just rename all the structs. We just give them some ID, like numerical ID.  And we don't emit anything further. So it kind of, so it's a graph and we convert this graph to a tree. So there is no recursion in this case. Yeah, there was. I think pointers in LLVM still haven't pointy type, even though conceptually the idea is to get away from that. Once pointers are okay, that problem just disappears. It becomes trivial because you no longer have forward references, right? And then you could duplicate by default because historically pointers have pointy types. Yeah, that's, yeah. There is just another comment. There was a writer by Chris Latner that was about type system change around LLVM tree and there are some good points on why this type system, the way it is currently. Yeah, there were some questions here and one there, I think. Yeah, please. Yeah, so the question is when we get the byte code, it's optimized and how we get back to the source code. So it's not necessarily optimized. It's up to the users how to meet this byte code. It can be like totally unoptimized. And to get back to the source code, we can only buy the mean of debug information because all the instructions with the debug information, they have a notion like where they came from. And yeah, we can basically reconstruct some interesting parts. We can just look back at the source code and the AST and see what's in there. Yeah, like last question, that was one, I think. Yeah, it's a very good question. So the question is why, like basically, why don't we use the SSA form, right? And kind of invent something else. So we have some debates in the team about this once in a while as well. But so basically, historical reasons. So the tool was first built for, I think, with Java in mind. And this is the format, yeah, the way it is. And we have a number of front-end supporting different languages like Cisharp, Python, Go and such. And I think by now, only LLVM has this SSA form in this like pure SSA form. So if we want to use SSA form, we would have to change all the other languages, which is, yeah, quite an effort. Okay. Thank you very much. Thank you. Thank you.


So, in this video, we'll try to see what exactly is the end unit testing and how do we use end unit testing which is fundamentally nothing but a unit testing framework for .NET applications in a sharpdialup. And when we are talking about .NET applications, we are specifically focusing on C sharp. Okay. So, let us see like what is the outcome is associated with this video. Make sure by watching this video, the participant will be able to understand what is end unit and how we can use the end unit testing framework in sharpdialup to test the small C sharp code snippets. The query requisite to this hands-on session, I expect you know what are the fundamentals of C sharp language and I expect you all to have a .NET framework installed on your machines compatible with your operating systems and we need a stable and latest sharpdialup ID. So, if you are using the one which is compatible to my machine, your machine could be anything it even a Linux machine would do, but you need to have a different idea is the configurations of that machine is already different. So, let us do an hands-on here which to sharpdialup and I don't have anything created as of now. So, I'll first create a small solution and I'll and that solution would be a console application and I'll name this solution as even odd and I'll click on create and rest all parameters I'll keep everything in the default here. So, I'll click create and I do have some collected let me clear this build output window and let me delete the template comments. So, I'll increase the font here. The shortcut is hold the control and move up your scroll bar the control increases yes, okay fine. So, I have the proper font here, okay maybe this is this is fine now here I won't need all this stuff here so I'll just remove this and I'll just retain this console dot I'll even remove this because we were not gonna execute that method we are not gonna execute the program and test it. We're gonna test the working of method just by executing them through an unit. So, we have this methods and let's also write a methods here and for a quick ease of access in accessing those methods I'll make this method static so public static and return type would be boolean and the method name would be ease evan so the name itself is very self-explanatory the role of this method is to check whether the number which is passed to it is even or not so if I need to write a if code to check the condition for evenness and I'll write else block here now you can recall that number mod 2 if it is equal to 0 then the number is even so let me put a bracket here it's a good coding practice. So, if number mod 2 equals 0 means it's an even number and if it is even the function will return true and if it is not this will return false okay so I'll repeat the same code for okay so this is to test whether the number is even or not remember when I'm saying a number is this methods object it will just return you true if the number is even whether it returns false whether it is or no we're gonna write a separate method for that okay so let me just quickly copy and paste and convert that method into ease odd so now here instead of even I'll call ease odd yes so when would be already this mod is equal to 1 if it is say after dividing by 2 if you have remained a 1 number is odd and if it is not it's false so I have two different methods you pass a number to this method if the number is even it should return you true you pass a number to this odd if the number is odd it should return you to if it is not it it's gonna return you the other value which is false here in the both the cases fine so now I want to check whether my definition is right or not to check this we have two ways the one is to execute this method provide few numbers take a number from a user and make sure but we are not gonna do that what we are interested in we are interested in testing it with the help of unit testing framework and here specifically it is an unit so let us see how do I write a test cases to execute this method and then we'll see like how we can execute the test cases so to add a test case to this so select your solution right click and click on add okay so now while there are multiple ways to add a new item so click on add an item fine okay so let me do one thing if it is not okay so select the project not the solution select the solution so see that way I am clicking here on even here on that the the project window this is a project window it's a solution right click on this click on add new item and here make sure you're selecting C sharp dialogue here C sharp the moment you select here you will find a class called as unit test so I'm moving my mouse over this this is important that you select this unit test class and give a proper name to it I'm gonna call this as even odd test cases so you can always choose a proper name the extension would be dot CS remember even this is a CS file so I am clicking on create so let me clear clear the build output window here okay so now I have this test cases you can say this was my program and this is a test case which I have automatically added I'm increasing the font of this so let me remove this comments here so you can note that here it added the end unit framework this is what I was talking about it comes with dot net framework and with the help of this framework I can test the test cases here now it it's it's some kind of boilerplate code generated for us when I wanted a test kit to be generated so note down that both the classes belong to a same namespace both classes belong to same namespace here I have a class name event or test cases and this lets this this annotation here this specifically tells the dot net environment that this class is a test case it is meant to be executed as a testing under any unit framework which comes with dot net so this is not then something a main application or library which can be loaded or executed and here this exactly the test case which lets me write my assertions so here in a test cases in an unit form if you want to test whether methods working or not we would we are actually invoking that method and we see if the method is returning to or not so it's like saying that I expect true from this method so I'm gonna pass to as input to this method and I expect that method will return true and this is what the entire clause I'm asking the my annual framework to test so here I'm asking the end unit to assert whether it is giving me true or false and I'm expecting true and I'm expecting false here so quickly will execute that so delete this so I'm first writing a small test case to just test the event remember I use assertion here so this is the standard class available so assert dot there is a method called as is true now when you open this there are multiple methods what I'm using main is this Boolean condition so we are not going into more details it could be like you can further with the help of bibliography you can go to documentation you can explore further methods but here I'm going to directly invoke the method so I am saying I'm asserting it whether the method which I'm providing here will be returning true or not so the my method was a static method so I can access it by class name dot is even and here I'll pass even number two is even okay let's do one thing we'll fire pass a four so four is so this is a test case so now if I execute the test case would pass if this method call returns true so I'm asserting whether this is returning true or not if my assertion succeeds then it's indication of my test case being passed and indirectly it's an assertion that my method is working fine but at the same time as we have defined the method is even to return false if a number is not false so to properly ascertain if that method is perfectly working that method has to assert false when I pass a odd number so here I'll call is false now here if both the math more the test cases pass then I can ascertain that my is even method implementation is as per the expectations so let me execute this so I have two test methods let us call it a test method one and let us call the test method two save it and build your first solution after executing this so I'll output a build successful so warnings you can ignore here and so now I need to execute this so how do I exit I don't I'm not going to run this program remember I need to execute the test cases so to execute the test cases open an unit window here so I am at the view menu and I'll go to tools and when you go under tools here you will find a menu called unit test click on this it opens a unit test window here at this here expand this it will list out all the test cases which are written test method one and test method two so now you want to execute both it all the test cases present in this you click on this green double arrow double execute button click on this it executes test cases if both the test cases have passed then it will show you in a green colored buttons that both the test cases have passed so here let us suppose here if I pass instead of four I'm passing a value three so I'm just saying actually I'm testing something very odd configuration here but just to show you an output like what would happen if this assertion fails so it is expecting true and will this give a true as per our implementation this won't give a true so what happens here is this test case would fail so now given the change so earlier it was four I made it to three given this change if I execute unit test cases once again you can see that test method one has failed but two has executed okay so it also points out so sometimes you can also give us some message so this message appears in as a debug message so you can see like what happens if I so for some standard reporting in analytics developers are always required to give proper message here but I'm just putting a generic message to see like what exactly happens with that message okay and no no no and I don't want to execute this so go to unit test and execute here you can see that so this method appears here so this for many automated testing frameworks when you execute your application in continuous integration and deployment pipelines this method might have a lot of hidden meaning and the lot of configuration and another further sequence of chain events may be dependent on this methods so that's the role of this method here okay so we'll come back to normal one is six seven number yes so now if I execute fine it will execute both you can find the both they have turned on you can even execute a single test case as well so you can select this and you can only select this is so single test case method to can run so in short this is is an unit testing framework so you by now you might have had a free idea like what exactly is unit testing and how we can unit test a C sharp applications so what do you think like you you have watched this and you have done something background work on unit testing or testing so what do you think what what how you think a unit testing framework could be beneficial to a dotnet developer so yes the answer is once again the same like what we do here is this testing frameworks help dotnet developers execute methods without even making sure the entire module our entire application is completed so generally what we do is we have an application we split it into modules and assume without any unit testing you will be only able to test the application only after entire application is done so which has to wait for all modules to complete the execution and all but by using unit testing frameworks what advantage we get is we did not wait for all other modules to complete we can test every module individually and this all depends upon what's the method signature what this is what are the assertion class which you've seen we only asserted a Boolean conditions but those as that asset class is too long and there are a lot of other methods so I can show you here for example asset is false so there are these all are a very big set of assertion methods so you can also see what it contains does it throw fail falls there are multiple there's a plethora of methods which let developer test a variety of modules with a variety of written numbers so the for a further reading you can refer Microsoft documentation and for a detailed and better understanding of any unit and all the intricacies of unit testing especially and unit framework I would refer you to go through any unit documentation and and if you need a even more better introduction of unit testing and what exactly it is a tool a lemon based definitions of your unit testing refer to Wikipedia okay so that's it for this video thank you


WJCT and Baptist Health are pleased to announce that Bobby Thomas, beauty and fashion expert, and author of The Power of Style, Everything You Need to Know Before You Get Dressed, will be this year's keynote speaker at a day for her Saturday, August 18th at the Hyatt Hotel. Bobby, the style editor for The Today Show, will share Bobby's buzz tips on everything from favorite beauty tricks to her favorite lifestyle finds. For more information or to purchase tickets, log on to wjct.org slash events.


95,000 K. 95,000 K. All that stuff. All these good things. Let's see if we can pull anything. I will never do solos on this count. Everybody tells me to do solos. If the team got good, it wouldn't be content anymore, boys. Hey! 85? That's like a big deal and no money spent, boys. Let's go, man. Big body? Okay, big lane. Yo, he honestly might play. He might play. Honestly, I'm probably gonna have like 230, something like that. 230. If all these sell for like 50, that's 150. That's like, yeah, that's probably like 240, something like that. All right, boys. We came off another 17 when Weekend League. I had a 19 and 317, so this weekend we got a shoot for that 18. We need Legend Rewards again to help this team. You guys know, no solos, no head-to-head, no money, just Weekend League with this team. That's it. You guys know the team you haven't. I hope you guys are keeping up with this series. Check it out, man. And I want to take that 250 about, try to improve the team. But this was my game to get to 17 wins right here. This was one of the best games of the weekend. Make sure you guys tune in. This was before the patch, so we'll see how this team performs after this recent patch. Mad man, if you guys are playing a game, let me know. Do you like the patch? Do you hate it? Who knows? I haven't really touched the game since the patch came out. So let me know what the patch is working for. Let me know if you like it or it made the game worse. Who knows? But stay tuned. After this game, I'll show you what I did with the Legend Rewards. We just got this weekend. We're just here, there. Good job. Good job out there. Nice job, Herbert. Now you want to sell. Now you want to just sell. Good job, Herbert. Nice job. Nice job, man. Let's go, man. No huddle. Come on. I was too slow. I don't know what. I really don't, I really don't like what, like... What more do you want me to do there, boys?  Run cover three. I'll try the bomb first play.  Bro, somebody get that. Yo, there's no way to get it.  Like, how the f*** are you good? Oh my god.   There's no way Eddie Jackson is that f***ing... Yo, I swear to God, no money spent is the worst. You don't want to spend money on your football team.  It's still in the game. Players lounge. Check them out. You can play rags all day. You can play it all day. You don't need to spend s*** to play rags. Nothing wrong with it. Now we're going to play two man f***ing under. Look at this guy, because he spent all his money on his f***ing team, huh, boys? Oh, look at that sh** he's getting. Look at this guy. Look at my s*** quarterback. Bullseye. Dude has edge threat under, under, under siege.  Still have no f***ing idea how to play defense. Dudes have all this and no idea how to play defense. Oh, and now we're back to this one. Oh, here we go, man. Here we go. Blitz everybody. Mid blitz. Mid blitz, baby. Mid blitz. Oh, my God. Did you get bagged that f***ing bad, Kirk? What's going on tonight? What's happening? Ball, man. Come on, waddle. This is you here, kid. I hate this play, by the way.  There's Aaron Donald. Here you go, boys. Oh, my f***ing...  Oh, my God. All you guys should do this. It's a f***ing blast. Zero chance of catching him, bro. Oh, you know. Kirk is like... Kirk got patched. Dude, my offensive line is getting just mauled. I'm not having fun right now. I'm getting beat by f***ing laser cobra. Dude's got under pressure and inaccurates and s*** all over the place. Look at these f***ing dudes. Like, like, like, bro. Do I have a prayer right now? Do I have a prayer to play this f***ing game? Thank you.  I mean, bro, this is f***ing insane right now. What type of superheroes does he have? This dude has different types of superheroes. He does for the sim-ballers, for the ones and for the ones in the stands. We have to. It's just no way that this is like... I'm just getting pounded like this. And Aaron Donald sees it. Look at this f***ing demon. Like, what? Like, how? How? Like, I...  Y'all said the D-Line, man. You got us to run the screen. That was the first screen I ran in years. Look at it. He's, oh, I see it. I see it coming. Dumb it. You can't hit him right there, dude. Boys, he did get nasty on the way out. Queen. Hey, Fitzpatrick. Give us life here. Give us life here. Give us life here. Okay, queen. Okay. Of course, that dude... Just come on, man. That's got to be a tackle. Williams, thank you. No way, you're like... Come on, Quinn and Williams is like good, but he's so slow. You're on the ground. Go. He know huddles. He know huddles. He know huddles. He saw something. He like, oh, you boys, he know huddles, man. Bro, Edmonds! Let's go. Let's go.  Sean, good attack, kid. Let's go. Come on. We need to pick here, boys. We need to pick somewhere. Somehow, somehow. Catch me, bro. I'm getting screamed at to another level. Dude, my line might really be a... Let's go, Kirk. Come on. Life. Come on, boys. We get these. We get these. We get these. We get these. We get these. We get these. We get these. We get these. Come on, man. Like, how is Basz just killing me, this f***ing... This is where we were earlier in the game, boys. This is where we were earlier in the game, boys. Can we bow our neck right here, right now, for the win? Can we do it? Can we do it, boys? Come on. He ran the same f***ing play he ran earlier. Thank you, Miroh, Kate the Crib. Bah, come on. Come on. Come on. Come on. Never give up. Guapo drive.  I'm going to be honest, boys. I'm going home. We're going home. We're going home right here. Catch... Oh, dude. I saw a zone going up the middle. I saw a zone going up the middle. I saw a zone going up the middle. I swear to God. You know I'm undefeated. I'm like defeated on coin tosses. No, it wasn't the user. It was Ed Reid. Please just stop telling me how to play the f***ing game, please. I should have went out. I should have went out of bounds earlier in the drive, but...  Blockshedded. This is crazy. Do I win a coin toss? We are 16 in a row and over time we have lost the coin toss. 16 in a row. Do I win this coin toss? Yes or no? Here it is. Here we go. What did you guys bet on? I might let the computer pick. It might be the glitch. The computer pick might be the glitch. Heads. Oh my God.  I'm never picking heads again.  It is 17 in a row. I have lost 17 coin tosses in a row. I swear it's glitched. He's going up top first play. I know his type. I know his type. He's that type of guy right here.  No, no, no, no, no, no, no, no. How do you stop base? What do I got to do? What do I got to do to stop base? Let's go. Yo, that was a third and a... Bro, that was a... He's got to go back to that. Holy s***. Eddie Jackson. Eddie... Like, f***ing zones though I got to put out here. Like, what did you... Like, what zones? Like, what f***ing zones? I did a quarter of a play with a third and then I did a f***ing half and then I did... It doesn't matter. Are you kidding me? Eddie Jackson, what are we doing here? What are we doing? What are we doing? What the f*** is going on right here? What's Minka Fitzpatrick? Zones are broken, right? Man, 20 is way better than this. All right, boys, this is a new improved week five, no money spent team. Let's see what we're working with here, man. We still got that boy Justin Herbert out there at quarterback. We got Miles Sanders, who for some reason is great out right now. I don't know what glitch that is, but maybe that's a sign he's the next upgrade. We got Kirk, we got Waddle, and we grabbed Will Fuller with those rewards. More speed on our side. We benched Nat O'Dell Beckham. So your college games, they paid off for a little bit. He did his thing, but we have benched him. We have moved on. Still got Kyle Pitts and we grabbed Elkton Jenkins from the Packers superstar. He has that post-up ability, so double teams won't get beat as fast. Upgraded our left guard. We moved Jonah Jackson over here to right guard. So we have an all superstar line. It's still not good, but we'll see how they get done this week. Defense, defense, defense. Our main acquisition is Adrian Amos. We upgraded to Jackson. You saw how he got down that game. 85 speed was not covering much, but we grabbed Adrian Amos and we were able to put Acrobat on him and Brian Dawkins and Snead. So we have four Acrobats now, along with Quinn and Williams, still a detackle with that inside stuff and unfakable. Still have Minka, still have Fabio Moro, Quitty Pay, Lorenzo Carter. That's my defense. That's how we're going to rock. We have Sean Taylor. We have power-up versions of Sean Taylor and Brian Dawkins. Both of them right before you get the full legend. So maybe if we get those 18 wins this week, we can get full Sean T. Or we can get full Brian Dawkins, one or the other. But right now we're going to rock Amos and Minka up top. Then we're going to rock Dawkins and Sean Taylor, linebacker Snead, Moro, and Dante Jackson. Our round out of the corners, I am trying to work a little Dolphins' team, boys. We're trying to work a little Dolphins' team. Because I have Fuller and Waddle that would be huge to get Dolphins' team team, along with Minka Fitzpatrick, help my wide receivers get a little bit more speed. Because right now we're at 90 speed and 92 speed. If we could bump that up a little bit, I only have 13 Dolphins though. So we need a little bit more. And if I get rid of this camera, you guys see we're really not working. We're really not working with a lot of coinage or training right now. Things are down bad. But this is the team. We are going to go ahead and take into Weekend League. Number five, just Weekend League. No solos, no mud head to head, no nothing. Straight no money spent Weekend League. Still a couple goals on the roster. Rounding out to try to get all elites at some point and maybe some better players. But this is what we got. Make sure you guys tune in to twitch.tv slash dub dot. That's where I'm playing all these no money spent. I normally try to save at least 10 games on Sunday night, man. Whether after the football game, during the football game, we like to put a big out grind Sunday night, finish the Weekend in the right way. So as I said, make sure you guys tune in. Let me know you're from YouTube. And tell me what else can I do with this team? I have no coins. I have no training or nothing. It looks like this is it. What should the next target to improve this team be?


The year is 1990. Neighbors of the Childerly family began to hear screams coming from the quiet family home. Denise, the mother of the family, is heard pleading for her husband to help her, but her voice echoes out with no response. A loud thud shakes the home, and then silence. The attack began and ended in a matter of minutes, and no one would know what became of the Childerly family even now 30 years later.  Subscribe to True Crime Stories to hear the full version of the story. The link is in the description below.