The Psalms teach us many things over the course of their 150 Psalms. One of their preeminent purposes is to teach us how to trust God. And it's one thing for you and I to say, "Oh, I trust God." It's one thing to say that with our lips. It's quite another thing to actually trust Him and to live in a sense of confidence in our perspective as we look to the future and when we have difficulties round about us.
One of the things that I have found, I don't mind telling you this, because it's not specific to any one person, but one of the things that I find in my ministry for whatever reason is that when people are talking to me about going through their difficulties, most people tend to put a good front on, and they try to make things sound a little bit better and like they're doing a little better than what they actually are. And I wish it wasn't that way, but that's okay. I would just have you know, as those of who attend here regularly and look at me as your pastor, that it's okay to be candid with me. That I don't expect anything of you other than just honesty and transparency, and wherever you are at in your particular circumstance, I welcome the opportunity to interact with you on the basis of reality rather than for you to tell me what you think I want to hear. It's okay for you to have burdens on your heart and to want to share those. I don't expect you to be like a weatherman on the evening news that's always chipper and always with a smile on your face. I realize that life is not like that. My life is not like that and so it wouldn't be fair for me to expect that from you.
But all of that to say that we need help to know what it means to trust God and to understand what it is, because Scripture says that we walk by faith, not by sight. And so we are trusting in One that we have not seen. We believe in One whom we do not hear speak audibly to us. We rely on His Word to inform us, but we have to work those things out in the depths of our heart to be able to walk in the way that is pleasing to our Savior.
Psalm 27 gives us a beautiful picture of two aspects of the single heart attitude of trusting God and I think that by the time we are done tonight you are going to be encouraged and refreshed by what God's Word has for us here this evening. One writer said this, he said that "Psalm 27 speaks of the permanence and dependability of the believer's relationship with God. Human relationships too often fail, even the closest ones. But God never fails us nor forsakes us."
We know a God, we trust a God, who is a God of loyal love, the Hebrew word chesed. He is a God of loyal faithful love never to fail us at all. What we need to understand, and what Psalm 27 helps to teach us, is that there is no limit to that statement. No matter how dire your circumstances may become, either personally, or on a national, or an international level, you know the mountains collapse around us, that God is the same God to us. And the God of loyal love who saved us in the beginning is going to be the God of loyal love who is going to carry us through. He is a God of loyal love whether our children come to know Christ or whether they don't. He is the same God either way. He will be faithful to us, and He will display His love in such abounding and astounding ways that we will never have any question about whether He was good to us in the end. But we recognize don't we, we know from personal experience, that sometimes clouds come between the sun and the earth, and sometimes our view of this is obscured, and we have to walk more by faith than by what we see. Well, Psalm 27 gives us a perspective to understand that and to know what to do with that as we go forward. I would just encourage you to open your heart to what God's Word has here, because the anxiety that some of us go through day by day, or from time to time, or the longer term struggles that we go through that have no earthly answer to them at all, we can bring all of those to bear, and we can open our hearts before the Word of God tonight and find that it has instruction and real, deep, personal help to us. We serve a God who is a personal God. He is a God with a personal name, Yahweh. A God who has revealed Himself in the Lord Jesus Christ as our helper, as our sympathetic high priest. And what we have here in Psalm 27 is a word from that sympathetic high priest to say, "Here's how you navigate through the storms of life." And I love this Psalm. And I know that you're going to love it by the time we are done as well.
I said there were two aspects to the nature of trust that Psalm 27 shows to us. First of all, we are going to look at the confidence of trust. The confidence of trust. And then secondly, we are going to look at the dependence of trust. The confidence of trust and the dependence of trust. That's how we are going to break down this Psalm into bite size portions for us to appropriate here this evening.
First of all, the confidence of trust. David illustrates the prevailing, dominating attitude that a believer should have toward God in the very opening verse. He makes statements about God, and then he asks rhetorical questions to help us define trust and to understand it in a fuller way. Look at verse 1 with me as we enter into the text tonight.
He says, "The LORD is my light and my salvation; Whom shall I fear? The LORD is the defense of my life; Whom shall I dread?" Now as we often point out as we're going through the Psalms, notice the "all caps" there for the Lord. That's a representation of the Hebrew name Yahweh, God's personal name, His most holy name. It is a name that speaks to the fact that He is a covenant keeping, promise honoring God. And David is responding to that revelation of the Lord, as He's made Himself known as a covenant keeping, promise keeping God, David is responding to that in this Psalm.
He says, "The LORD, this promise honoring God, is the One who is my light, my salvation, and the defense of my life." And so he is speaking from the position of strength and security as he opens this up. He says that, "this God is my light, my salvation. He is my defense." He has a triple shield, as it were, as he looks to the future. God will give him instruction. God will give him protection. God will give relief to His people in the midst of their hardships, because that's just who He is. And that's just how He relates to us as a faithful God who, not only brings us to heaven at the end of life, but through the days of our lives manifests Himself and His providence to us as One who is faithful, who sustains us, who delivers us from evil, who delivers us from temptation, and who keeps us, and secures us, and blesses us, no matter what.
And beloved, we need this Word in the times in which we live, as the world just spins out of control more, and more, and more. And even as Christian leaders, and I know that I've been kind of repeating myself on this theme over the past few weeks, but I think I need to, even as Christian leaders betray a sense of fear about what lies ahead, "Oh persecution is going to come!" And, "Oh look what they're doing to our schools!" Or "Look what they're going to do to pastors in the future." And they just cultivate fear in the things that they say about what's going on around us, well look, that might be good for fundraising and motivating people to give. But the question that I just keep coming back to again, and again, and again is where in the midst of these dire predictions of what lies ahead for the people of God is this attitude of confident trust that you see repeatedly manifested and illustrated for us in the book of Psalms.
Look at verse 1 with me again. "The Lord is my light and my salvation; Whom shall I fear?" Do we set this aside and lie to the advance of homosexual propaganda and agendas in our lifetime? Do we set it aside when certain politicians take charge and do things that are contrary to biblical morality? Do we now fear because, well, the circumstances are different than what David wrote under as God's chosen king? No, no, that can't possibly be it, because David's confidence doesn't derive from his circumstances. You get that, right? David's confidence is based on the nature and the attributes of who God is, who the Lord is! And he says, "Because the Lord is who He is, who would I be afraid of? Because the Lord is sovereign over all of history, because He's sovereign over kings, because He's sovereign over my enemies, and He belongs to me, and I belong to him, and He is this loving, faithful God who cares and protects His people. What do I have to be afraid of?"
The answer to his question, "Whom shall I fear? Whom shall I dread?" It's a rhetorical question. The obvious answer is no one. He says, "I'm fearless when I'm mindful of who my God is. I am unafraid as I look to the future. I am unafraid of my foes, because there is one who reigns over them that has set His affections upon me, and He is utterly trustworthy. He is a promise keeping God. And I am not afraid of the circumstances to come, or the evil people who get in my way. I am not afraid, because through it all my sovereign promise keeping God is with me."
Now, why would we not just revel in that, and luxuriate in that, and bathe ourselves in the joy of what that means? Why wouldn't we draw our whole perspective from life about that rather than having our view of life rise and fall on the latest news cycle, and rise and fall in response to the latest atrocity that sinners do to us or do to other sinners? We just have to start from the right starting point, beloved. That's really crucial. David is confident, because this God whom he knows is supreme over all. David is confident, because he's under this God's care. Watch this. You watching? Good. No fear of man is distracting the confidence of his heart. He looks at who God is and there is confidence and rest by definition and he proceeds in verse 2 to illustrate the truth of his statement.
Look at verse 2. He looks back on some prior events in his life. He says, "I've seen this illustrated in my personal life history." Look at verse 2. He says, "When evildoers came upon me to devour my flesh. There were wicked men after me like wild boars just looking to tear at my flesh. They wanted to rip me to shreds." And what happened to them? "My adversaries and my enemies, they stumbled and fell." When you read about the life of David in the Old Testament, you realize that he lived through a lot of great human opposition. He established himself when he slayed Goliath. And through that human opposition, his enemies either had superior position, like king Saul did, or superior strength, like Goliath did, or superior numbers and position, like his son Absalom had against him later in his life. Through all of that with all of their superior power and numerical strength, David says, "They just stumbled. They fell. They had the illusion of being a threat to me, but in the end God manifested His faithfulness. And their efforts to hurt me, to cause me to stumble, proved to be futile." Why? Because they weren't smart enough humanly to outfox David? No. Because God's sovereign, invisible hand was directing things in a way that protected David and was working in opposition to those that would harm him. David interprets his past success from a position of understanding the providential care of God in his life. And so what he's saying here is, remember, follow the logic here, follow what he's saying. He says, he's opened up, "God is my light, my salvation, my defense. And you know what? I've seen this work out in my past. When things came up in the past, God proved that who He was was manifested in real time in my life."
Can't those of you who have been Christians for any period of time at all, you've been through periods of need, or periods of sorrow, periods of human opposition where those stronger and mightier than you had authority over you and were kind of strangling you, don't you know something about that? Maybe going through a very difficult medical trial that your life was in the balance, and God brought you through that. Maybe you went through a car accident that should have been fatal, and yet you survived it. What are we to do but to look back and say, "The Lord's hand was with me, and this, it's not just that I got out of the circumstances or came through that okay, but that this illustrates the loving care of God in my life in a way that shapes my expectations for the future." God's care for you in the past should inform the way that you think about the future. And because of God's nature, because of His proven track record, David is strong as he looks to the future.
Look at verse 3. He says he's confident. Remember we're talking about the confidence of trust here. Verse 3 he says, "Though a host encamp against me, My heart will not fear; Though war arise against me, In spite of this I shall be confident. I live life from a position of strength. My heart is resolute. I am unafraid. I will not fear man, because I know the God who is with me and who cares for me. Let the worst of threats come upon me. I will be settled in my trust." I would give a lot of money to hear Christian leaders today talk like this instead of reveling in all of the uncertainties and the fears of what lies ahead. Wouldn't it be great to have the men of God in unanimity on one stage just standing together and saying, "We are unafraid no matter what the future politics of life hold." Wouldn't that just be awesome? Wouldn't the people of God just draw strength from that? Why the fascination with politics, the fascination with who the latest poll leaders are in the next presidential election? We should disdain that approach to life that fluctuates based on the nature of circumstances and what's happening around us.
We've got, collectively speaking, as the church of God in this age, not just talking about Truth Community Church, we've got a long way to go. One of the joys of preaching the Psalms is to having some kind of platform to be able to give some kind of voice to it. Let the worst of threats come upon us. You know what's going to happen when they do? God is going to prove Himself faithful to us in an unfailing way that will manifest His glory and His faithfulness to His people. And you and I who know Him are going to be on the receiving end of His goodness, no matter what the world tries to do to us. Period! End of sentence! End of paragraph! Let's be strong in our confidence in who this God is. That's the only way that we should live life.
Now, having said that, you and I need to do this as we contemplate these things: it is essential for us to think through these things now when we find ourselves in times of relative serenity. When we are able to gather together like this, and there is no one demonstrating outside, and there's no threats of war or bombshells dropping on the roofs of our houses as has happened to some of my friends in other parts of the world recently, it's essential for you and I to really think deeply about these things while we can do so in times of peace. Why? Why is it so important? If there is relative stability, then why would it be so important to think about it now? Maybe your feet aren't trembling right now. Well beloved, the groundwork that you lay now in the way that you think about these things and the way that you train your mind to think in general is what will sustain you in future times of distress when there is less opportunity for thought and meditation. In the first three centuries or so of the Christian church, there's not a whole lot of really sophisticated theological writing that came out. That's a gross overstatement to the point of being almost inaccurate, but what I'm wanting to say is that there were waves of persecution that took place in the early church. Ten waves of persecution under the hands of Roman emperors. And when you are on the run, you don't have a lot of time to think, and to meditate, and to develop strong theology and strong views toward God, because you're running for your life sometimes and so what that teaches us, and what this Psalm teaches us, is that when we have times of relative stability in our lives, either individually or as a church in a particular location, we need to drive these convictions deep into our heart, so that they are there to draw upon when we don't have the time to meditate, because there is too much going on around us, and we are responding to life and rather than having the time to meditate like we would choose. You know what that's like, don't you? There were times in my life where I had a lot of time to think, and to read, and to do that. There are other times when you're in the rapids, and you're just trying to keep the boat afloat.
Beloved, the opportunity for you, if you're in a time now of relative serenity, relative peace, this isn't the time to let off the accelerator and to kind of cruise spiritually. This is the time to dive all the more into it, so that these things become you. That this is defining for you, so that when the trials come you have it to draw upon. You've already dug the well that you're going to draw your water from to drink from in those times that are dry. That's just so very, very vital. There is never a time in your life where you're either cultivating trusting God or you are drawing upon the trust that you have learned in times of peace, and come to know God that way.
David's confident trust is united and expressed in a single purpose. Look at verse 4. Notice the single minded devotion that he expresses here in verse 4 and this is what you cultivate in your life as you read Scripture. You're not just gathering information. You're shaping your heart to be like this. Verse 4. "One thing I have asked from the Lord, that I shall seek: That I may dwell in the house of the Lord all the days of my life, To behold the beauty of the Lord And to meditate in His temple." This isn't a reference to Solomon's temple. It hadn't been built yet when David was there. It's more a reference to the Tabernacle. It was more temporary, but it was the place where God's presence was manifested in Israel. What David is saying is that he loves God's ordained worship. He loves to be where God is. He likes to saturate his mind with the perfections of God, the beauty of His holiness, the wonders of His grace, the perfections of His faithfulness, and to draw himself into an inner communion, an inner affection, where that is the only thing that matters in life to him, is who God is and the fact that he belongs to this God, and he revels in the goodness of God poured out on him.
David says, "That's the only thing I want out of life. A heart undivided by worldliness, competing affections." David had gathered it all up and said, "My life can be expressed in one aspiration. I want to know this Lord." Lord, we want to know You, and we want to know You more. We want to glory in who You are and bring ourselves into even deeper submission to the wonder of Your character, the perfections of Your love for us, and to just reflect back to You the most pure worship of which we are possibly capable of.
David says, "That's where my heart is at." He meditates on God's Law so that he can know God's will, and he wants that inner communion that loves God and what we see here in terms of what the confidence of trust looks like is that trust in God. What does it mean to trust God? Well, trust is joined with a whole hearted devotion to Him. That there's not quarter in your life for pockets of known disobedience that you cultivate and tolerate when you know that the Lord is displeased with that. David says, "That's not possible for me. I don't have room in my heart for that, because there is one thing that I want is to know this God and to be found pleasing to Him. To know God and to enjoy Him, that's my supreme goal in life." He's not double minded in his approach. He's not trying to have it both ways in the world, to have the world in one hand, and God in the other. He says, "Forget this! I want both hands wrapped around my God."
And now in verse 5 he takes that single minded devotion. He takes that confidence that he's expressed in the first three verses, and he applies it to a settled attitude of serenity and certainty as he looks to the future. Look at verses 5 and 6 with me. He says, "For in the day of trouble He will conceal me in His tabernacle; In the secret place of His tent He will hide me; He will lift me up on a rock." To that place of security, protection, where no one can get to me. "And now my head will be lifted up above my enemies around me, And I will offer in His tent sacrifices with shouts of joy; I will sing, yes, I will sing praises to the Lord." He is shouting in exuberance, in overflowing, abounding gratitude and confidence in who this God is and he says, "When trouble comes, what I'm going to find is that the Lord secures me in it and protects me. Just like He did to me in the past, that's what I expect to happen to me in the future as well." All derivative from, David could speak with this kind of confidence, because he knows who this God is, and he has put his confidence and his trust in the certainties of God's character and he says, "I will shape my perspective on life based on who He is, not by what's going on around me. I will not have my heart shaking before men who threaten me when I know the God who is over them and has set His affection on me."
Brethren, that's our prerogative to live that way. It's our blessing, our entitlement, to live that way and you could say even that it is our duty to live that way. That is the way that we should think about our God. That is the way that we should think about our Lord Jesus Christ. If He gave Himself up on the cross for us, in the tones of Romans 8 argument, if God did all of this for us in giving us Christ and Christ giving Himself for our sins, and rising from the dead, and ascending into heaven where he ever lives to make intercession for the saints, if He did all of the greater like that, surely won't He do the lesser things that are necessary to care for us going forward? On what basis do we tremble before men? On what basis do we live in fear of the future? See, a knowledge of who God is, a knowledge of who Christ is drives out fear. It drives out that fear of man and that's what David has expressed in this confidence of trust in the opening 6 verses of this psalm.
Now, after that ringing conviction of this opening section, you might think that David never felt conflict in his soul, that he never struggled, that he never wrestled with things. And if you thought that, if you think that, well, you would be mistaken, because David goes on and shows another aspect, the other side of the coin of trust as we look at verses 7 through 14 and see the dependence of trust. The dependence of trust. There is almost a jarring contrast. There is a jarring contrast between the first six verses of this Psalm and the eight verses that follow. In fact, it is such a contrast that some more liberal commentators have suggested that maybe these were two different Psalms altogether that a subsequent person put together into one. They like to talk in those terms and, rather than seeing a unity, it makes it easier for them to criticize God's Word and undermine faith in God's Word by suggesting that it's composites that really don't make that much sense. Well, we don't listen to men like that. We don't care what they say about these things. We should look for, the Psalm says it's a Psalm of David from verses 1 through 14, and so we should look for the unity that brings it together, rather than casting a suspicious eye upon Scripture and questioning what it says.
Having said that, there is a contrast in these final verses and if you look at verse 7, you see that there seems to be an element of urgency that you might think was inconsistent with confidence as you read verse 7. He says, "Hear, O Lord, when I cry with my voice, And be gracious to me and answer me." He says, "Lord, hear me! Lord, be gracious to me! Lord, answer me! I am in the midst of need now, and I need You to take note, and to act, and to relieve me in my distress." David's experiences, like our own, maybe tying this in to what I said to begin with, you and I are just like David. We see things really clearly for a time, and we rise, at times, to levels of confidence in God where it seems like nothing could shake us, because maybe it's after a particular time in God's Word, or a particularly strong season in prayer, and you get up, and you say, "Man, I'm ready! I get it! I've got it! And I'm confidently going forward!" And then the doctor calls, or you get bad news about something, or somebody irritates you, and you have a nasty reaction, and it seems like you've, where did the other thing go? And you wonder about that. We see things clearly for a while, but then a blast of trials come and suddenly, the danger is real. The danger is present. And the danger is as much in your face as the reality of God was in the first six verses.
What are we to think about times like that when they happen? How are we to understand what's happening in our soul, because we all know something about what might seem to be an inconsistency. Well, let me see if this will help you in what we have to say as we consider the remainder of this Psalm here. The principle of confident trust often works itself out in times of desperate need. David calls upon the Lord to act in response to his prayer, and he needs God's answer quickly. While his confident trust is operating in the background, while there's this foundation upon which the structure of his spiritual life stands and will stand, there's still winds beating against the walls. There's still human opposition and human need that he has to respond to and he's urgent and he's not sure what to do. There's no need for us to pretend that we don't know what that's like, is there? We know just what that's like. The need is urgent and right in front of our face.
How should we approach God in those times of urgent need when there is a settled confident trust in our hearts, but there is an urgency to the circumstances that needs help right now? Look at what David says. It's very impressive as you read through the Psalms as we study them together to see the way that trust plays itself out, to see the way that trust operates, to see the way that David uses trust in order to advance his case. It's more than just saying, "God, help me!" There is a reflective, thoughtful way that David approaches God in the way that he expresses his urgent need before Him and you see it illustrated here in verse 8. David says, "When You said, 'Seek My face,' my heart said to You, 'Your face, O Lord, I shall seek.'" What's he saying there? He's saying, "God, in times past Your Spirit came to bear upon my heart and drew me to You. You said, 'Seek My face.' And God, I rose, went forth, and followed You. I responded to the call of God upon my heart and my life. You said, 'Seek Me.' And I said, 'Lord, I will.' And that's what I've done. And now I find myself, Lord, in the midst of an urgent need. God, I obeyed You. I followed You. I came after You when You commanded me to do so. Now, here I am in this time of need. I need You to be faithful to that original call. I need You to finish what You began. I'm here in response to Your command. Now I am in need. God, You're still my God. You're my defense. You're my life. You're my salvation, the defense of my life. I need You to bring that posture of Your relationship to me to bear on these circumstances, because I am beyond my strength. God, finish what You've begun."
You and I are familiar with Philippians 1:6 where Paul speaking to the church at Philippi said, "I am confident of this very thing, that He who began a good work in you will perfect it until the day of Christ Jesus." There is this confidence that what God started He will also assume responsibility to keep until the end. And David says, "God, You started this! God, You initiated salvation in my life. You called me to Yourself, and I came. Now, be my God. Be my Savior in this situation as well. Be the One who delivers me, because I'm in this kettle of fish in response to the way that You've worked in my heart." Stated differently, David says, "God, take responsibility for my wellbeing now that I am in distress."
And he emphasizes this request that God would act in verse 9 and expresses it, his request, with three negatives. He says, "Do not hide Your face from me, Do not turn Your servant away in anger; You have been my help; Do not abandon me nor forsake me, O God of my salvation!" You feel the urgency in it, don't you, as you read this? "God, don't let me go! Don't turn away! Don't hide from me!" Which are poetic ways of saying, "God, I need You to act now! Don't wait! Don't hesitate! Don't delay in giving Your response, because the need is right here on top of me." There's a critical, critical, critical principle at stake here and I know that most of you need to hear this. Of course you need to hear it. You're here, aren't you? God brought you here tonight to hear this message, and He intends for you to hear what we're about to say: an incomplete understanding of trust can make things worse for you. Sometimes a little knowledge can be a dangerous thing, and an underdeveloped view of trust and the way that God works in our lives can sometimes operate against you and make the circumstances even worse. Here's what I'm driving at as I say that. You have a serious trial. And you feel the weight and the urgency of it. You feel a sense of desperation and not knowing what to do, and it's pressing, and things are difficult, and you've shed a lot of tears over the sorrows that it brings. And then, for some of you I know this is the case, because some of you have talked to me this way, and that's okay, I'm glad you do because it gives us an opportunity to bring God's Word to bear to bring light, and help, and balm to your soul in times like that. To have the trial would be bad enough, but then too often you also feel guilty because you say, "I know I should trust the Lord in this, but I just don't feel that way." As if you should have a calm indifference to what is happening around you and that a sense of urgency and that sense of pressing need is not something that should weigh on your heart. I think Scripture would teach us that that is a false standard to apply to ourselves. We need to trust God, and we need to be confident in Him. But the fact of the matter is that sometimes you and I are going to feel the weight of the world on our hearts based on timing, or the magnitude of who is opposing us, or whatever. And we groan under that. We groan under being, living, in a fallen world. Well, look, I know someone that groaned at Gethsemane. That groaned under the weight of what he was about to undergo. I know Jesus, and He groaned and cried out, "Oh God, if it's possible let this cup pass from me. Nevertheless, not as I will, but as Your will be done."
Here's what I want you to see, beloved and I really want you to grasp hold of this, because this is very, very helpful: faith is not always strolling happily in sunny meadows, and picking the petals off of daisies, and delighting in sunny skies and warm breezes. Sometimes, faith is going to manifest itself by clinging to the rope desperately in a blinding storm. The hardship may be prolonged and make you think that God has opposed you, but He hasn't. And when those times of urgency come upon you, God is testing your faith, not to find out whether it is there or not, but testing it to strengthen it. To take it through a refining fire, to purify it, and to make it even better on the other side. And rather than, and it helps, I think it helps, to understand that the times where you're desperately clinging is not a time where you're denying your faith. It's simply another aspect. What you're finding in your soul, what's being manifested in your life is this: trust is sometimes very, very dependent. And that you're conscious, "God, I'm beyond my resources, and I need Your help, because I have no strength of my own to answer to this situation." As I have said in the past, the wave is simply casting you on the shore of trusting God still more.
Take the long view, beloved and spare yourself the grief of striking yourself, of whipping yourself with the whip. "I shouldn't be feeling this way." That's really a waste of time to say. "I shouldn't feel this way." That doesn't help. The way that you respond to those feelings is by doing what David says here, crying out to God rather than moaning the fact that you're not all that you thought you should be. And take the long view. Whenever you are going through times like that, and sometimes it's a matter of years, I've spent more time in that than I have in other parts of the aspect of spiritual life in those wondering what's going to happen, what's going to come next, and all of the sorrow and the weight of it all! Take a longer term perspective, and realize that in those times of prolonged trials, God is cultivating you, and shaping you, and making you into someone that otherwise you would not be. He is molding you and refining you with fire, and that's okay. On the other side, this master developer of souls knows how to pour the form, and pour you into the form, and bring you out on the other side into somebody different and better than you otherwise would have been as a man of God, as a woman of God, as a young person of God.
I love teaching on trust. I really do. It's one of my favorite topics to teach on. David, here in verse 9, saying, "Don't hide Your face! Don't turn me away! Don't abandon me!" It's the same man that was writing in verse 1 "The Lord is my light and my salvation; Whom shall I fear?" Well, what is he doing when he is crying out like this, crying out in urgency, what's he doing except, other than, casting himself on this one that he said he knew was his light and salvation in the beginning. This is just one aspect of casting yourself upon Him like that. You say, "Well, that's never been a problem for me!" Good for you. Hopefully it never will be. Hopefully, you'll never be that deep in the fire. But let me just ask you one thing. Let me just ask one thing from you. If that's what you think, fine. Just don't impose that on somebody else when they come and say, "I'm struggling here." We give people room to work through these things, and we don't whip them because they're in the second half of Psalm 27 and not the first half.
David was in both places, and David, you see, and notice what he says, at the end of verse 9 he says, "O God of my salvation!" He hasn't lost faith here. He's not dishonoring God. He's saying, "You're the God of my salvation! Because of that, do this!" Verse 10. He expresses a depth of trust that would transcend human life. He says, "For my father and my mother have forsaken me." Probably what he's doing here is just speaking hypothetically here and saying, "Even if the worst of human abandonment took place, my father and my mother, if they abandon me and turn away from me, God, you know what I'm confident of? That You won't. That even if all of human relationships turn on their head, I am confident that, God, You will still protect me."
There's a very evident and encouraging application here. Some of you, maybe, your parents have failed you. Maybe they're gone now. You know, there's no opportunity to reconcile it. Some of you have had close human relationships turn away, family has turned away from you. They're fed up with your profession of Christ, or whatever it may be. And the ones that you thought were closest to you, now hold you off at arm's length or worse. You know, there's something that you need to encourage your heart with. Maybe your parents did fail you, but get this, knowing that I'm speaking to a lot of bruised hearts in the room here tonight. Get this: God, your God, the God of your salvation, He's not like that. Oh how I love that truth! I love that truth! The ones closest, and nearest, and dearest to you may fail you, and reject you, and betray you, but God's not like that. Look at it there with me in verse 10. "For my father and my mother have forsaken me." A young child would be utterly defenseless if his parents abandoned him. David says, "Even if it were like that for me, I would still be okay, because God will still protect me." Human relationships come to their breaking point and disappoint us. When that happens, stop being resentful. Stop being bitter. Move beyond the hurt and just take that as an opportunity by contrast to see how great, and elevated, and wonderful the God of your salvation is. That's the only way to respond. And human rejection becomes the basis upon which you find even greater intimacy and communion with your Lord.
Now, having said all of this, David was entirely unsure what he should do next. Do you ever feel that way? "I had no idea where to go from here." Well, okay. No need to panic. Just learn in the midst of that to turn in dependent trust to your God. Look at verse 11. "Teach me Your way, O Lord, And lead me in a level path Because of my foes. God, I don't know where to go from here. God, I have a big decision ahead of me, and I don't know what to do. I don't know what the right thing to do is here. God, I need You to lead me. I need You to teach me. Instruct me. Take me by the hand and lead me in Your will. That's what I'm asking God. That's what I need from You." And when there are enemies littering the way and snipers coming after you, metaphorically speaking, "God, just lead me in a level path." In other words, "Remove the obstacles so that I can walk in a level, confident trust in You going forward from here."
He's surrounded by enemies. The future is threatening. The outcome is in doubt. In verse 27, Psalm 27:12. If you're looking for verse 27 of Psalm 27, you're going to be looking for a long time, because it stops at 14. Verse 12, he says, "Do not deliver me over to the desire of my adversaries, For false witnesses have risen against me, And such as breathe out violence. Lord, I'm being lied about. They're distorting the truth. They're trying to destroy me. Lord, don't hand me over to them. Don't leave me in their power, but act as my shield. Act as my protector. Be my refuge. Be my defense. Help me here in the midst of this." There is a plurality of opposition. It's in the plural. My adversaries, false witnesses, foes, at the end of verse 11, they intend to harm David violently.
But in the midst of all of it, see where he comes out. His anchor has held in the storm. God will lead him to safety. Look at verse 13 with me. He says, "I would have despaired unless I had believed that I would see the goodness of the Lord in the land of the living." Some of your translations may read a little bit differently. Translators handle this verse differently because there is an incomplete sentence in the original language. That's why in the NASB, "I would have despaired" is in italics. They've supplied that trying to complete the thought that David only briefly expressed. Whatever else you say about it, at root, beloved, kind of coming back up and coming to the climax here, at root, this is a triumph declaration of trust, even though foes are breathing down his neck. He has gone to God dependently. From a position of confidence, now encountering need, he's gone to God dependently, urgently, feeling the need, feeling the weight of it. It's not hypothetical. It's not academic. It's not mere potentiality. It's real, the threat to him. Just like the threats to you are real that you feel. They're urgent, and they weigh on your heart.
David has poured out his soul in dependent transparency before the Lord and says, "This one thing brought me through. I was confident that I would see the goodness of the Lord in the land of the living. God will see me through this life. I will be on the receiving end of many tokens of His blessing, even though some trials may come and go." And for us now in the Christian day we say, "You know, I get to the end of this life, and I die, and I go to heaven, and it's all so much better anyway. It's a win win for me. It's a win win for you being a Christian." We see God's deliverances throughout this life, and then we see the final deliverance from sin when we go to heaven, when we die and go to heaven and be with Christ. And we see His goodness all around. Do you get this, beloved? Do you recognize this? Do you embrace this? Do you depend upon this with all of your soul? We will see the goodness of God displayed to us without fail. And nothing about your current circumstances will ever contradict that final and ultimate fact. No manner of sorrow, no manner of earthly loss, no manner of setback will ever, ever, ever contradict the goodness of God to His people. Ever. And that changes the way that we look at it. Nothing about this life, nothing that's wrong right now in the world or in your personal life is going to contradict the ultimate goodness of God. View your trials from that perspective and everything changes. All of a sudden, there is a beacon of hope. You say, "I would have despaired, but then I remembered this. That the goodness of God is unfailing." In the words of Psalm 23, "I am confident that goodness and loving-kindness will follow me all the days of my life, and then I will dwell in the house of the Lord forever." I don't lose. I can't lose. Come what may.
And so he concludes with this exhortation to trust. What does it mean to trust God? I have defined it in the past in other places. To trust God means that you remember who God is, and you wait on Him to act. It's really simple. Just remember who He is. Covenant keeping gracious God to His people. And you wait on Him to manifest that in time, and space, and circumstance.
David says in verse 14, I know many of you have gone to this verse often for encouragement, hopefully after tonight you have a little more informed view, and it's a deeper verse to draw upon now than it was beforehand, he says, "Wait for the Lord; Be strong and let your heart take courage; Yes, wait for the Lord." A couple of things I want you to see on this before we close.
First of all, notice that he repeats it. "Wait for the Lord. Yes, wait for the Lord." And so apparently, it's pretty important. He feels it's important enough to tell us twice in the closing verse. Pay attention here. There's an important principle here at stake. Perhaps, and I think it's reasonable, if not likely, David, perhaps, was first saying this to himself, just like you and I need to do in the midst of our trials. We need to take ourselves in hand. We need to preach to ourselves. We need to look at ourselves in the mirror and say, "Wait for the Lord." "You wait for the Lord," saying it to yourself. You tell your heart how to think. Too many of you let your emotions tell you how to think. And "Oh! I'm upset!" and then that just starts to control things. You need to preach truth to your heart and let truth tell your heart how to think and feel. "No, you're going to wait for the Lord. That's what we're going to do here," you say to yourself. "We're going to wait on the Lord, because He's a good God. He's our defense. He's our light. He's our salvation. He's our defense. Our foes and adversaries cannot have ultimate priority over us. They cannot prevail over us."
David spoke to himself that way, I am sure. But in the end, it comes out as his exhortation to the reader. It becomes the closing thought with which we leave this Psalm. Wait for the Lord. Be strong. Don't collapse under the weight of your sorrows and your difficulties. Don't give up. Don't deny God. Don't give yourself over to sin. Don't give in to temptation. Be strong, and let your heart take courage. Be renewed in confidence as you look forward in time. Why? Because of who God is. And when David says, "Wait for the Lord," if this is kind of the summary concluding exhortation it would be important to know what this means. Beloved, you need to understand that when he says, "Wait for the Lord," he's not talking about passively marking time until circumstances get better. That's not it. Like you're just waiting at a bus station waiting for the bus to come, and you don't have anything better to do. That's not it. When David says, "Wait for the Lord," he's saying, "You take an attitude of heart like this. You remember who God is, and then you expect Him to deal with you in accordance with the wonderful perfections of His character. That God will manifest to you individually that you will know in your own life that God has been abundantly loving, abundantly gracious, and supernaturally faithful to you." You expect that from Him before you actually see it in the circumstances in front of you. You wait for Him. And by waiting, we say, "You expect Him to do this, even though you don't see it now." That's a confident dependent trust in keeping with Psalm 27.
Why do we have to wait? Why do you wait years for comfort to come on something that has troubled your heart? Why do you maybe wait decades for circumstances to change and turn to something in keeping with the aspirations of your heart? Why is it like that? Well, beloved, God's timing is not always our timing. God has His own timing, and it usually isn't ours. We want it now. We want it today. Well, if we got it all today, we wouldn't know anything about the triumph of trust that is described in Psalm 27. If it was always the way that you wanted it, if there was never anything to make you weep or buckle your knees in prayer before God, where is the triumph of faith? Where is God manifested? Where is His glory displayed? Anybody could honor a God who always did exactly what they wanted exactly when they wanted. That doesn't take any faith. That doesn't take any trust. But when you and I know who God is, and we believe on that, and our inner man is shaped in its expectations and priorities by His character. When there seems to be nothing visible around us to support it, God is put on display. His invisible reality is manifested through that life of trust. And that is worthwhile.
So don't give up. Especially when your strength is gone; especially when you say, "I can't go another day like this," understand that you're not outside the care of God. You can exercise trust even then in entering into the spirit of this Psalm. Beloved, our God is a God of loyal love. He will never disappoint us in the end. Never! Out on the thought! Leave on the suggestion! Never embrace that consideration! No, God will be loyal to us in the end. And we will wait on Him until He manifests that. We don't care how our foes flourish in the meantime. We are not dissuaded from this kind of trust in our God. James Montgomery Boice says and I close with this quote, "If some wealthy person promised to give you an expensive gift, wouldn't you wait for it expectantly? If you were in trouble, and a king were coming to help you, wouldn't you be alert for his appearance? God is just such a generous benefactor and a powerful king. He is well worth waiting for. It is a privilege to wait for Him, and yet how little true waiting most of us really do."
Whatever you've been like in the past, beloved, won't you settle in your heart that you're going to be a person going forward, you'll be a Christian going forward, that says, "I will wait on God with a confident, dependent trust and expect Him to bless me in the end." Won't you let that become the shaping, defining aspect of your Christian experience and the testimony that you manifest to the world, to your family, to this church? Won't you be like that?
Our Father, You are our light and our salvation. We will not fear. Your the defense of our lives. We will not dread. And yet, we find ourselves from time to time in urgencies that we don't control. Father, in those times we turn to You dependently, confessing the weakness of our strength, confessing our vulnerabilities, and yet at the same time affirming that You've been our help. Don't abandon us or forsake us, O God of our salvation. We believe Your Word. You will take us up. Teach us Your way. Don't deliver us over to the desires of wicked men who would harm us. Father, we trust You. We believe that You will manifest Your goodness to us. And when we see Your goodness on full display, it will be far greater than anything we could have asked or thought, going exceedingly beyond anything that the eternal reaches of our imagination could ever conceive. You're that great and that good. And so, Lord, we wait for You in the midst of our sorrows, our temptations. We strengthen our hearts and take courage, because we look expectantly to You. Yes Lord, we wait on You with eager anticipation to see You display that covenant faithfulness that You always keep to Your own. We love You. We honor You. We bow before You. We gladly sing Your praise now. In Jesus' name. Amen.


Last month, it was revealed that Netflix was quietly throttling video quality over Verizon and AT&T cellular systems. Since the word got out, theverge.com says Netflix has responded by offering users the choice of upping the quality and gobbling up more data…and the inevitable hit to your cell bill…or staying with a lower quality and saving a few bucks on your cell bill. You have to dig through the settings to find it, and the default is set to automatic. The app jumps back to higher quality automatically whenever you're on Wi-Fi. It's activated as of now.
Periscope is beta testing a feature to save your live streams. Up to now, they only save for 24 hours, but in the beta, you can save them indefinitely by putting hashtag save (#save) in the title. Up to now, you had to save the video to your camera roll, then upload it to YouTube or Vimeo. Thenextweb.com reports that the feature is partly because Facebook live saves closed streams on your timeline unless you delete them.
Apple may not be launching a freshened 9.7 inch iPad Air in March…it may be an iPad Pro. Appleinsider.com picked up a rumor that the smaller sized Pro will have Apple Pencil and Smart Keyboard support, complementing it's larger 13 and 15 inch models. There may also be a 9.7 inch Air version, without Smart Connector and Apple Pencil support, and Apple may make the iPad Mini a version of the Air. The 9.7 inch Pro will reportedly have a rear camera flash and quad speakers…it should be rolled out March 15th.
Android phones should be seeing live video streaming via Facebook in the next week. Theverge.com says the rollout will start in the US, as it did with the iOS version, then expand to other countries within weeks. Facebook claims that people watch live video 3 times longer than video posted that was pre-recorded.
Twitter bought Periscope a year ago, and now the live video is available in your feed…in fact, you can broadcast live video directly into your feed without leaving the Twitter app. Businessinsider.com reports that Periscope…which only launched in March 2015…is consistently one of the top 20 social networking apps on iPhone. Twitter hopes this will help engagement, like Facebook has done with Facebook Live Video.
Lenovo is killing the Motorola name for Moto, and now, we hear that all Moto phones in 2016 will have at least 5 inch screens and fingerprint sensors. That's according to Chen Xudong of Lenovo, in a story from 9to5google.com. For now, at least, Lenovo will use its Vibe brand for smaller and low end phones, and keep Moto as the flagship oriented line. The only down side is they plan to stop using the pure version of Android for a custom version…like almost everyone else.
Elon Musk is on a roll…in an interview yesterday covered by appleinsider.com, he says the Apple electric car is an open secret in Silicon Valley. Musk points out that they've hired a thousand engineers, including a number they have poached from Tesla. Musk claims that whatever Apple does automotive-wise won't hurt Tesla. Apple now holds the domains apple.car, apple.auto, and apple.cars.


And the crocheting goes on . . .
I don't know why, but I've become almost addicted to crocheting.
I've also done an extra slouchy Beanie, also posted by simplycrochet2021, and I needed the extra room, so that my daughter can fit all her dreads in it, while staying snug and warm.
I've just this minute finished making two 3-strand headbands (the pattern for these is at BobWilson123 once more) – one of these for my daughter, and the other for her good friend Shosh, known as the Flower Fairy.
I've got so very many projects I want to do, which means I'll probably be busy with things for the next 5 years!


SCIA endeavours to maintain its Website with due care. Due to the nature of the internet and computer systems, SCIA, however, cannot provide any guarantee that the Website will be available at all times.
Nor does SCIA guarantee that the Website is always up-to-date and that the information contained therein is always complete and free of errors. Omissions, typographical errors or incorrect information may occur.
SCIA reserves the right to change these terms and conditions of use as well as the content and structure of the Website at any time. This may include suspending certain offers, functions and services contained in the Website.
Certain hyperlinks on the Website may take the user away from the Website. SCIA does not guarantee the accuracy, precision, reliability and completeness of information on websites to which reference is made by means of links and therefore does not accept any liability for any errors or omissions contained therein. A hyperlink to another website should only be considered as an aid to the user and does not imply that SCIA endorses or approves of such other website or the products and services described therein.
Users use this Website and download data at their own risk. SCIA does not accept any liability for any resulting damage, particularly damage to data sets, hardware and/or software of the user.
Additional agreements shall be executed in writing to take effect. The place of jurisdiction shall be Hasselt if the user is a merchant under the provisions of the Belgian Commercial Code. Belgian law shall apply to the exclusion of the United Nations Convention on Contracts for the International Sale of Goods.
Should any provisions of these terms and conditions be void or incomplete, the remaining provisions hereof shall in no way be affected. Void or incomplete provisions shall be replaced by a relative provision that shall come as close as possible to the purpose of such void or incomplete provisions.


Posted on June 1, 2017 by admin wrote in Vitamins.
Natural vitamins are vitamins that can be easily found in natural foods. If developed in a commercial nutritional supplement, the vitamin must have all its parts intact, including its enzymes, coenzymes, minerals, mineral activators, and co-vitamin helpers.
As you can see, vitamins are not only those found in drug stores and medicine bottles. In this article we focus on those vitamins, which can be found in natural food sources, natural vitamin supplements.
According to studies, our body needs vitamins for proper body function 13. These vitamins consist of vitamins A, C, D, E, K and B vitamins B vitamins, on the other hand, are composed of thiamine, riboflavin, niacin, pantothenic acid, biotin, vitamin B6, vitamin B12 and foliage.
Now, all these vitamins are available in drug stores in different concentrations. However, all these 13 vitamins are found in natural food sources. In fact, a person with a variety of foods in his diet should already be taking a small amount of these vitamins every day. And as mentioned above, only a tiny amount of these vitamins are necessary for the body to function properly.
Vitamin A can be obtained from sources of meat and dairy products like milk, cheese, cream, liver, kidney and liver of cod. But all these products are high cholesterol, you can try to get vitamin A from its precursor, beta-carotene. The most common sources of beta-carotene are carrots, sweet potatoes, squash, cantaloupe, spinach, mango, broccoli and other fruits skin red or yellow vegetables.
Common sources of thiamine are enriched breads, cereals, pasta, whole grains, lean meat, fish, dried peas and beans. Some dairy products, fruits and vegetables are also rich in vitamin B1.
Dairy products like milk and yogurt are the main sources of riboflavin. Other sources are chicken, green, leafy vegetables, fruit and almonds.
Foods that are rich in niacin include dairy products, poultry, fish, lean meats, nuts and eggs. Some of the vegetables and cereals remains of niacin.
Foods rich in vitamin B5 include fish, dairy products, poultry, lean beef, yeast and vegetables in the cabbage family. It is also rich in vitamin B5 are white and sweet potatoes and peanuts and peas.
Fruits such as bananas, watermelons and tomatoes are known sources of vitamin B6. Other common sources are chicken, broccoli, spinach, potatoes, white rice, peanuts, oats and fortified cereals.
Meat products, poultry, fish, seafood and dairy products are rich sources of vitamin B12.
The main sources of vitamin D are dairy products, poultry and cereals. Apart from these food sources, the body also synthesizes vitamin D when skin is exposed to the sun's heat.
Vitamin E is usually derived from vegetable oils and products such as margarine and mayonnaise. Other sources are peanuts, whole grains, wheat germ, corn, nuts, olives, spinach and other leafy greens e.
Leafy vegetables and green vegetables like kale and spinach are the main source of vitamin K. Other sources include soybeans, corn, fruits, beets, potatoes, dairy products , meat and poultry. Bacteria found in the stomach and intestines can also synthesize vitamin K.
Holistic Exercise Centers Your Life	Complete Vitamins – Best Vitamins to Take!


Find five friends with different backgrounds then ask them to spell out your website. If it's hard for some people, you might need to simplify it. For example, if you have a surname that is hard to spell, you might want to use your first name only with other identifiers.
Ensure there are NO spelling errors. Try to spell words correctly and not like a teenager. For example: "betteryou" should not be "betteru" as most people would spell "you". Spellcheck your own domain name.
If you are making a word up (see point 7), you need to ensure they follow common language conventions so people don't pronounce it wrongly (see point 2) or when pronounced, people won't spell it wrong.
For example, most of the time "oo" will sound like the "oo" in "hoop" or "hook". Don't try to make it sound like "oh". "Staph" is a bug, it shouldn't be used to replace "stuff".
Don't try to be smart and combine letters that shouldn't be combined together. Pseriously. Do not put a silent "p" everywhere. Please (that one needed a p).
On that note, foreign words may be easier to find domain names for but harder for people to memorise. However, there are sites that use it and are successful.
Grab five friends and get them to actually read out your domain name to ensure there are no boo boos or taboos. You know radio ads that ask you to buy stuff and then at the end ask you to visit their website? They don't spell out the website but assume listeners know what to type. Now, think of a radio ad for your site and see whether people will know how to spell it out.
Also separate letters between words and syllables and check that they don't have an alternative saying.
For example, "choosespain.com" can be "Choose Spain" (intended site) or it could be "Chooses Pain" (unintended). Both convey different ideas about the website – one a tourist site and one for self-torture. (This is the more G rated example).
If you want a few more (or 29 other) examples, look at this article on 30 Unintentionally Inappropriate Domain Names and have a laugh.
If you can, the shorter the better. However, it may be impossible to have sites such as CNN so try to keep it to a maximum of 3 words in the domain name. If it's too long, it increases the chances of spelling errors and people forgetting it.
For example, looking at the length of the domain "eatingcakesandpieswithmary.com" would probably deter me altogether (this domain is available but DON'T buy it). Did you know that 63 characters is the maximum length of a domain? That previous sentence had 66 characters including the spaces.
People tend to forget what number it is and make up their own, write it in words or leave it out.
The same goes for changing letters into numbers. Google should not be spelt googl3 or g00gl3. You're not password protecting your domain – you want people to visit it!
If your name is -a( Dasha), I'm sorry mate. People will forget where the hyphen or underscore is supposed to go so just let them go- you don't need it.
I'm probably a hypocrite since there is a double "t" in my domain but I think it's more about repeated letters between words such as "expressstadium" (not a site, I checked- DON'T buy this one) which makes it hard to type on the keyboard or people misspelling it. On that note, if you own a bookkeeping service, I always have to slow down typing that word in case I overshoot my quota of o's, k's and e's.
You want your site to stand out amongst the rest. If you're creating a site on Mac products, there will be at least a dozen with "Mac" in it's domain name. It doesn't mean it can't have Mac in the domain name but make it unique and catchy for example by rhyming, making up words or play on words. If you're starting a personal site or blog, it's probably better for your brand to use your name in there somewhere.
Some popular sites follow most of these rules but may not follow all of them and are still successful.
A great example is "google". It is made up but it is easy to say, spell and is unique. It has no hyphens or numbers and is short.
Make sure your domain name is unique by googling it to check that other businesses don't own it (also see point 11). Always check for overseas sites as well. One domain that I loved (see point 9) was "mymuffintop.com" but it leads to a 404 page whereas "mymuffintop.com.au" is an Australian business that sells muffins. Even if mymuffintop.com was available, I wouldn't have bought it because of its similarity to this business.
You've got to plan for the future and think long-term. Sure, "penhoarder" (not a real site – buy this domain if you only want to specialise in pens and thank me here) may be great for your niche on pens but what if you wanted to expand in the future to pencils and notepads? Once you start growing your site, it may become so popular, it will be harder to change to a different domain because you will need to move your readers over. Despite this, some successful bloggers have been able to expand to other areas whilst keeping their domain names.
The domain that you want will probably be similar to someone else's or will be taken. That's just the way things are these days and you have to be prepared. Write them down on a piece of paper and number them from 1 to 10. Make sure you have all 10 that you are extremely proud to own because you may not get the one on your number 1 spot and you'll have to work down the list. I had about 10 backed up in case Battered by Cake was taken. Having said that, Battered by Cake was my first choice since I personally like the play on words.
International sites generally have .com in their domain extension. This will increase the chances of international exposure. Specific country extensions such as .au or .uk are probably better if you want to target one specific country. Just be aware that prices will differ depending on the extensions you choose.
Once you have your list of domain names and you have gone through this checklist for each one of them, it's time to research. Call me superstitious but you should do the research and registration on one day preferably in one sitting without any distractions. There are stories that if you type it into the search engine like Google or domain registry sites like Bluehost, there are people that sit there and buy your domain before you do and then sell it to you at an exorbitant price. So whether it's true or not, better to be safe than sorry right? Do your research in one day.
By research, you should be typing them into a search engine and checking what comes up for this domain name. Is it a registered business, another website, a trademarked name? You don't want to run into trouble with the respective owners and you also don't want your site to be mistaken for something else.
Are there social media pages available for them? You will need to create social media accounts for your site when it is finally registered and not having, say, a Facebook account available may be detrimental to your marketing. Look for the big social media pages you are targeting such as Facebook, Google Plus, Instagram and Pinterest.
Knowem is a great tool to find out whether the name you want is available on various social media platforms. Just type the name you want (all lower case and NO spaces between them) into the search bar and click "Check it".
You can see what is available and what's been taken. Decide whether it's important to your brand if say reddit is unavailable for your name. Explore the other tools available to help you with your domain name research.
After doing this, use the search and register function on a reliable web hosting site. See a step by step guide on how to do this on some of the popular ones out there: click here for Bluehost, click here for Zuver and click here for Siteground using "mymuffintop.com" and "penhoarder.com" as examples.
I have used Bluehost as an example below to show you the suggestions that can be made for you.
This way, it will tell you what has been taken and suggest other options which you may or may not like. Usually it is just changes to the extensions but sometimes it will give you some great options or at least ones to laugh at. Go through your list of domains until your domain is available.
Snap it up as soon as you see the one you like. Otherwise, it may be taken by others if you leave it. Just be aware that prices will differ depending on the extensions you choose.
Depending on your budget, it may be a good idea to snap up your domain name with alternative extensions or misspelt versions. This ensures that if people do mistype your domain name, you can have it redirected to your main site and still capture your audience.
Still need help to get those creative juices flowing? Here are some tools to help choose your domain names!
How do you go about choosing a domain name? Here are the essential tips I used to help me generate an unique domain name.


text:
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe "Pinbo" do

  describe "common statistics" do
    it "should description" do

    end
  end

end

redpajama_set_name: RedPajamaGithub


text:
IAS ESSAYS Very Long Essay
Essay on Naxalism - Belling the Naxal Cat for UPSC
on November 24, 2018 0 Comment
After making a tactical retreat from various prominent fronts in West Bengal and elsewhere following the state offensive the Maoists were waiting for an opportunity to strike back to make their sinister presence felt. The recent outrages resulting in the killing of hundreds of policemen and security forces including an SP in Chhattisgarh, Jharkhand and all the other Naxals affected regions of the country is just an example of what the Naxals are capable of. Such Naxal strikes only adds to the casualty toll and further emboldens the sinister forces as assiduously working against the Indian State in the so-called Red Corridor. Indeed, the many simultaneous attacks in recent times have been the deadliest of the extremist violence our country has seen in recent times.
The Maoists seem to have struck with lot of precision and planning. The modality and dynamics of the strike are said to be somewhat reminiscent of the early seventies in West Bengal. The worst strike took place in Rajnandgaon , barely 70 km from the state capital of Raipur. This points to the audacity about the functioning of the Maoists these days. They appear intent on moving closer to the seat of authority from the forests and tribal areas. If some of the intelligence reports are to be believed, the Naxals are working hard to make forays into towns and cities through recruitment of more and more volunteers.
The slain SP, who was on the Naxal hit-list for quite some time, is said to have been targeted for his deemed success in breaking the extremists' urban network in Bhilai city in Madhya Pradesh. Another SP lost his life in Jharkhand's Pakur district few years back. The way Naxals could pull off these strikes with deadly effect points to the proverbial chinks in our internal security armour and to the need for further sprucing up our intelligence and internal security apparatus.
Rightly, the Naxalism has been termed as the biggest threat to the national security by none other than the former Prime Minister himself. The Union Home Minister Mr. Rajnath Singh has also bracketed Maoists with terrorists for the threat they pose to the internal security. Be it noted that CPI [Maoists] has been declared as a banned organization by the Centre barely a few weeks ago.
While there still seem to be no consensus on banning the Naxals, the time definitely has come to take the Naxal threat more seriously than has been felt so far. The former Union Home Minister Mr. P. Chidambaram rightly believed that the Naxals menace had so far been underestimated which allowed the Left-wing extremists to consolidate and spread their wings. The present Union Home Minister has promised that the battle against Maoists ultras would be joined in full earnest through sustained efforts and drive.
The ban and the branding of Maoists as terrorists should further convince the skeptics about their insidious design on the Indian Nation. We need to find out better ways of dealing with this internal adversary masquerading as Left Radicals. There is not only need for infrastructural upgradation in terms of better logistics, equipment and arms, there is also need for better and more scientific ways of gathering intelligence. Our police force needs to be better trained and better motivated to face the Naxal challenge. The training needs to be customised to make the force understand the various nuances of anti-insurgency operations. Besides, there is undoubtedly a need for better execution and better targeting of developmental schemes in the Naxals-infested areas to extirpate the grounds of frustration and alienation there as per the recommendation of an expert panel recently.
Even though many of the politico and observers believe that the so-called 'liberated' or 'compact revolutionary' zones are nothing but media hype, we need to take the Maoist challenge in its true perspective. This, inter alia, requires a massive overhaul of planning and coordination, along with arming and training of specialised forces. The Naxals threat appears in sharper relief once we look at the latest statistics for this year. The sundry violent incidents involving Naxals often exceed those involving terrorist violence in Jammu and Kashmir and North-East put together if a recent report is to be believed.
The Government is learnt to have appointed a military advisor to help out in operational matters. Plans are also being drawn up in close consultation with different state governments. Proper coordination among the affected state governments along with a unified command structure seems to be need of the hour. The Naxal expertise in executing ambushes and mine blasts point to the extent and amount of challenge Naxalism poses to our country.
A special task force has been put in place which is supposed to coordinate among disparate police forces of different states. This is likely to help in tackling the Naxal threat better, the same is expected to not only advise the security agencies on specialised training, but is also supposed to help out in operational and logistical coordination. The manner in which our policemen are being repeatedly targeted in ambushes makes it necessary to constantly assess and improve tactics and strategy. The counterforce to Naxals has to be speedier and unorthodox beyond the mundane operating systems.
The truth is that Naxals are a confused lot, not knowing what they wish to do. They actually do not seem to have any ideological mooring or any vision for the alternative they proffer vis-à-vis the system they seem to be fighting. The Indian democracy gives every ideology ample opportunity to seek popular consent through the first-past-the-post system. But till the time the Naxals do not see reason, an efficient and effective counterforce seems to be the only alternative. It is also generally agreed by all the experts and stake-holders that apart from the security response to the Naxals threat, the State also needs to slowly ratchet up the pace of development in the Naxal-affected areas to bring the disaffected lot aboard the developmental bandwagon. An effective policy making coupled with an efficient field-level execution is what isneed to better tackle the Naxal menace in the country.

redpajama_set_name: RedPajamaCommonCrawl


text:
Dioceses of Limerick and Killaloe
Ardfert, Aghadoe, Kilfenora, Clonfert, Kilmacduagh, Emly
Aughrim
Clonfert
Cloughjordan
Drumcliffe (Ennis)
Kilcolman (Killorglin)
Rathkeale & Kilnaughtin
Shinrone
Chapter appointments
Michael Cavanagh September 20, 2018 General News
Bishop Kenneth has announced two appointments to the Joint Chapter of St Mary's (Limerick), St Flannan's (Killaloe) and St Brendan's (Clonfert) – Canon Liz Beasley as Chancellor and Rev'd Jim Stephens as Prebend (Canon) of St Munchin and Tulloh.
Liz Beasley has been Rector of the Adare and Kilmallock Group of Parishes since 2014. She moved to Ireland with her husband, Kirk, from the Diocese of Hawaii in the Episcopal Church, where she served since her ordination in 1998. After having served several parishes, her last position there was as Canon to the Ordinary. She holds theological degrees from Harvard Divinity School and Sewanee: The University of the South.
Jim Stephens is from Kerry, was ordained in 1991 and has served all of his ministry there as an NSM, combining this with work in a pharmaceutical plant in Killorglin in finished product and stability testing. Recently he transferred to the stipendiary ministry, became bishop's curate in Tralee Group of Parishes. He is married to Elsie who is a teacher in Killorglin and they have three daughters, Sophie, Ava and Isabel.
Their installation will take place on Sunday 25th November, during Evensong in St. Mary's Cathedral, Limerick at 4.00 p.m.
Map of Churches in the Diocese
The Newslink Archives
Newslink Submission Guide
Photo Galleries of Past Events
United Diocesan Youth Council
About UDYC
UDYC News
UDYC Programme of Events
UDYC Galleries
Photo Permission Form
Oil Storage Regulations
Ministry Resources Website
© 2019 Dioceses of Limerick and Killaloe


text:
Home News VODAFONE BRINGS 4G TO BIRMINGHAM, COVENTRY, LEICESTER, NOTTINGHAM AND SHEFFIELD
VODAFONE BRINGS 4G TO BIRMINGHAM, COVENTRY, LEICESTER, NOTTINGHAM AND SHEFFIELD
Arrival of ultrafast 4G on 28 September will boost local economies and give residents a choice: sport or music?
Ultrafast 4G coming to Glasgow, Liverpool and Manchester by the end of October as Vodafone pushes towards 98% population coverage by 2015
Vodafone UK is launching ultrafast 4G in Birmingham, Coventry, Leicester, Nottingham and Sheffield, bringing a choice of fantastic sports or music entertainment to local people and boosting local businesses with faster speeds, bigger data allowances and the ability to share that data at no extra cost. Following these five cities, Vodafone will launch 4G services in Glasgow, Liverpool and Manchester by the end of October.
Vodafone ultrafast 4G brings music and sports lovers a choice of either access to Spotify Premium or Sky Sports Mobile TV. That's more than 20 million tracks from the world's best known streaming music provider; or the best in live action football from across the Premier League and Championship, tennis, cricket, golf and rugby. All that on top of unlimited data for the first three months, then double Vodafone's standard data allowances, plus unlimited calls and texts.
Ultrafast 4G services will also help businesses to raise their game by enabling employees to work where they want to, when they want to. Almost nine out of ten business leaders (86%) believe 4G will increase their productivity by providing a genuine 'in-office' experience wherever they are, according to recent research by Vodafone.* In total, the arrival of competitive 4G services could boost the combined economies of the five cities by as much as £230m a year, according to further independent research.**
Customers signing up for Vodafone's 4G plans before the end of October will also get Vodafone's 4GBonus: an extra 4 GB of data per month for the length of their contract. All customers on Vodafone Red 4G-ready and Vodafone Red Business 4G-ready will get a 4G service in Birmingham, Coventry, Leicester, Nottingham and Sheffield from 28 September.
Guy Laurence, Chief Executive, Vodafone UK said: "We're giving people in Birmingham, Coventry, Leicester, Nottingham and Sheffield a reason to get excited about ultrafast 4G: we're bringing these cities closer to the action with Sky Sports and letting local residents stream 20 million tracks with Spotify. We're also giving busy businesses in these cities a boost by helping them take their office with them when they're out and about. Residents in Liverpool, Glasgow and Manchester can also look forward to Vodafone ultrafast 4G launching in their city by the end of next month. So, the question for people now is: which do you want – music or sport?"
The roll-out of ultrafast 4G services in these five cities is part of the more than £900m the company is spending on its network across the country this year. That comes on top of the £802m that Vodafone spent acquiring the widest portfolio of mobile spectrum in this year's auction of new capacity by Ofcom. That portfolio includes the crucial low-frequency spectrum that means Vodafone's ultrafast 4G signal will travel further into buildings.
Following Birmingham, Coventry, Leicester, Nottingham and Sheffield, Vodafone will launch 4G services in Glasgow, Liverpool and Manchester by the end of October.
By the end of the year, Vodafone Ultrafast 4G, with speeds typically six times faster than 3G, will also be switched on in Bradford, Edinburgh, Leeds and Newcastle.*** Vodafone is targeting indoor 4G coverage across 98% of the UK population by 2015.
*Vodafone research showing that 86% of businesses believe that 4G will increase their productivity was conducted with 554 organiational leaders across UK PLC and is available at: http://www.yourbetterbusiness.co.uk/perspective_4g_in_the_workplace.
**Estimates of economic benefit based on independent research by Capital Economics which found that 4G, when deployed to the population, could increase GDP by 0.5% across the UK. Research was based upon investment "made by the mobile telephone network operators" and deployment "by the mobile network operators". The Birmingham, Coventry, Leicester, Nottingham and Sheffield figure is based on applying this to the Gross Value Added per head (GVA+ taxes – subsidies = GDP) of their populations.
***Vodafone Ultrafast 4G services with speeds typically 6 times faster than Vodafone 3G, based on pre-launch network, may vary due to coverage and demand.
Vodafone ultrafast 4G is already available in:
Vodafone ultrafast 4G will be available from 28 September in:
Nottingham Sheffield
Vodafone ultrafast 4G will be available by the end of October in:
Vodafone ultrafast 4G will be available by the end of the year in:
Customers can check Vodafone's current and planned coverage at:
http://www.vodafone.co.uk/our-network-and-coverage/uk-coverage-map/index.htm
Vodafone Red 4G-ready for consumers (with 4GBonus)
12 month SIM only plans:
Red 4G-ready
Red L
Red 4G-ready L
Red XL
Red 4G-ready XL
Wi-Fi allowance
Minutes Unlimited Unlimited Unlimited Unlimited Unlimited Unlimited
Texts Unlimited Unlimited Unlimited Unlimited Unlimited Unlimited
Data including '4GB for 4G' 1GB 2GB 6GB 2GB 4GB 8GB 4GB 8GB 12GB
£21 £26 £26 £31 £31 £36 750MB
Sport or music Included? No Yes † No Yes †† No Yes ††
† Customers opting for the SIM only Red 4G-ready plan with 6GB, starting at £26 a month, can choose to have either Spotify Premium or Sky Sports Mobile TV included for the first six months. They are then charged at £4.99 per month for Sky Sports Mobile TV or £9.99 a month for Spotify Premium. Customers can cancel at any time and will still get double the standard data allowance and 4G service.
†† Customers on the SIM only Red 4G-ready L plan with 8GB (starting at £31) and the SIM only Red 4G-ready XL plan with 12GB (starting at £36) get Spotify Premium or Sky Sports Mobile TV included for the whole 12 months of their contract. At the end of the year, they are then charged at £4.99 per month for Sky Sports Mobile TV or £9.99 a month for Spotify Premium. Customers can cancel at any time and will still get double the standard data allowance and 4G service.
24 month contracts (with 4G handset):
£42 £47 £47 £52 £52 £57 3GB
£29 – £34 – – – 250MB
† Customers opting for the Red 4G-ready plan with 6GB, starting at £34 a month, can choose to have either Spotify Premium or Sky Sports Mobile TV included for the first six months. They are then charged at £4.99 per month for Sky Sports Mobile TV or £9.99 a month for Spotify Premium. Customers can cancel at any time and will still get double the standard data allowance and 4G service.
†† Customers on the Red 4G-ready L plan with 8GB and the Red 4G-ready XL plan with 12GB get Spotify Premium or Sky Sports Mobile TV included for the whole two years of their contract. At the end of the two years, they are then charged at £4.99 per month for Sky Sports Mobile TV or £9.99 a month for Spotify Premium. Customers can cancel at any time and will still get double the standard data allowance and 4G service.
† Customers opting for the Red 4G-ready plan, starting at £52 a month, can choose to have either Spotify Premium or Sky Sports Mobile TV included for the first six months. They are then charged at £4.99 per month for Sky Sports Mobile TV or £9.99 a month for Spotify Premium. Customers can cancel at any time and will still get double the standard data allowance and 4G service.
†† Customers on the Red 4G-ready L plan (£57) and the Red 4G-ready XL plan (£62) get Spotify Premium or Sky Sports Mobile TV included for the whole 12 months of their contract. At the end of the year, they are then charged at £4.99 per month for Sky Sports Mobile TV or £9.99 a month for Spotify Premium. Customers can cancel at any time and will still get double the standard data allowance and 4G service.
Spotify Premium and Sky Sports Mobile TV – which provides access to Sky Sports 1 and 2 – are available on selected iOS and Android smartphones. For more information, please visit vodafone.co.uk/4g.
Access to either Sky Sports Mobile TV or Spotify Premium is included in a customer's plan, streaming live sports or streaming music will use a customer's data allowance.
Vodafone Red Business 4G-ready for businesses (with 4GBonus)
12 month SIM only plans (ex-VAT):
Red Business 4G-ready
Red Business 4G-ready L
Minutes Unlimited Unlimited Unlimited
Texts Unlimited Unlimited Unlimited
Data 2GB 6GB 4GB 8GB 8GB 12GB
£21.67 £25.83 £30 750MB
With Optional One Net Express Included £31.67 £35.83 £40
24 month contracts, with 4G handset
(prices quoted include optional One Net Express at £10 extra per month):
Red Business
Red Business L
Red Business XL
Red Business 4G-ready XL
Data 1GB 2GB 6GB 2GB 4GB 8GB 4GB 8GB 12GB
£45 £49.17 £49.17 £53.33 £53.33 £57.50 3GB
£40.83 £45 £45 £49.17 £49.17 £53.33 2GB
£37.50 £41.67 £41.67 £45.83 £45.83 £49.17 1GB
£34.17 £38.33 £38.33 £42.50 £42.50 £46.67 500MB
Optional One Net Express
With Vodafone One Net Express, there's no need for a separate fixed landline for voice communications. Customers can keep their current landline number or add a virtual one to their mobile phone for £10 per month. Incoming calls are routed to the mobile with no divert charges. Users with two or more mobile phones can enjoy call handling features such as auto attendant and multi-user hunt groups.


Thanksgiving is one of the most popular holidays in the United States. Families travel from afar to gather around a table of food and give thanks for all that has happened in the past year.
One of the most important parts of this holiday is the food. Many of the recipes are passed down from generation to generation and have become a tradition during Thanksgiving dinner.
The Cultural Exchange Team has gathered some Thanksgiving recipes from our colleagues at the American Immigration Council. We wanted to share these and other recipes with you so that you can partake in the Thanksgiving holiday with the new friends you have made in the United States.
Are you planning to make any of these dishes for your Thanksgiving dinner? Let us know in this survey!


Looking for expert Foundation Tuition?
We provide face-to-face Foundation tuition in London and online Foundation tutors worldwide.
Our Foundation tutors are hand-picked from the best universities and rigorously interviewed.
Contact us for a free initial consultation and we will find you an expert Foundation tutor tailored to your exact needs.
The Profs is the UK's premier tutoring company and our large network of private tutors include specialists in most subjects and foundation degree areas for foundation students. Our foundation tutors are true professionals who are made up of university lecturers, distinguished academics and full-time professional tutors who have themselves mastered their respective discipline.
Students will undertake tutoring sessions that are tailor-made so they can achieve their goals and aims. Our foundation tutors provide extensive support in various ways. They will work with you to work out solutions to problems and past exam papers, and they can review worksheets and assignments.
Studying a foundation degree course most likely means that this is your stepping stone to higher education or professional qualifications. A foundation tutor will guide you every step of the way as well as motivate and encourage you to attain your desired results. Our specialised foundation tutors have expertise in a range of subjects that include but not limited to Maths, Computing, Psychology, Childcare, Social Work, Science, Business, Economics, Nursing, Law, and Art just to name a few.
You may wish to focus on a specific problem you're struggling with, or an area of your subject you feel unsure about. We can provide you with a dedicated foundation tutor specialised in the subject you need help with for your foundation degree.
We provide foundation year tuition in London and elsewhere via our world-class online tuition platforms. As well as providing tuition to those already studying foundation degrees we also assist those making applications to study foundation courses at university and help them meet their foundation course entry requirements.


text:
Home / China / Testimonies China
Police Harassment Drives a Christian to Suicide
12/11/2018 Yao Zhangjin
A 47-year-old member of The Church of Almighty God from Shaanxi committed suicide after prolonged persecution and intimidations by authorities.
On August 2 this year, Li Zhen (pseudonym), a member of The Church of Almighty God from Xianyang city in the northwestern province of Shaanxi killed herself after five years of harassment for her faith by authorities.
It all started in 2013 when Li Zhen was arrested for the first time while attending a gathering of her church. Although she was released soon after, she acquired a criminal record for her beliefs. As a result, her husband divorced her, and so, in 2016, Li Zhen started a new family and changed her address, extricating herself from the surveillance of the local police.
However, on July 5, 2017, the police tracked down Li Zhen's parents and threatened them to put her name on the "wanted" list if they did not disclose her whereabouts. Intimidated by these threats, the parents disclosed Li Zhen's address, and the police started to harass her on a regular basis.
Shortly after 9 a.m. on July 7, right after Li Zhen's husband had left for work, two police officers stormed into Li Zhen's home. They questioned her about her faith and threatened that "the next time we catch you, it won't be this way." The officers also took photos of Li Zhen and searched her entire home, even looked through the content of her son's computer.
On May 7, 2018, Li Zhen was summoned to the village committee and was again interrogated by five police officers about her faith, the leaders of her church, and the people who preacher to her. They also said that they want to know where she is at all times, and therefore, started sending her text messages since the interrogation, causing her a lot of stress. In a letter to a fellow church member, she wrote: "Now, (the police) keep sending me text messages to harass me, causing me mental anguish. I feel distraught all day long."
In July 2018, the police started coming to Li Zhen's home; the visits gradually increased from once a week to every two or three days. Each time, four uniformed police officers arrived in police vehicles, stormed into her home, and interrogated her for over half an hour. They pressured her to abandon her faith, sell out her fellow believers, and provide information about the church.
The increasing pressure from the police caused Li Zhen to lose her sleep and appetite. According to a source close to her family, Li once distraughtly told her mother she was afraid that when the police catch her, she would be unable to withstand the torture and would betray other Christians, which she did not want to do. Li was also worried that the police harassment would affect her marriage, so she never mentioned it to her husband.
On August 2, 2018, four police officers came to Li Zhen's home again. They left after half an hour. Li Zhen sent her ailing mother, who was visiting her at the time, back home, left a suicide note, and killed herself by ingesting pesticides.
Li Zhen's husband and elder sister found her body and later discovered a container of pesticides "dimethoate" that she used to kill herself. Her mother-in-law said in tears: "She was such a nice girl, she was good to everyone in her family. How could she be so foolish…."
The family called the police, and seven or eight officers arrived at Li's home. Members of the family rebuked the police for driving Li to commit suicide, but the officers were dismissive and shirked responsibility, saying: "We didn't drive her to commit suicide, we were carrying out official duties."
According to a government insider, such persecutions like Li Zhen's are the result of the Chinese Communist Party's policies. He added that as early as 2014, Xi Jinping personally gave orders to re-arrest and try again the believers in Almighty God who had been previously detained and make each one reveal the names of six members of the church. This operation was called "Vine Stroking and Root Digging."
The Church of Almighty God reports that, from April to November 2018, in Shaanxi Province alone, more than 600 Christians were regularly harassed and intimidated at their homes by the police after being released. Among them, more than 100 people fled into hiding to escape police surveillance and harassment, but their families still face interrogations and threats.
Reported by Yao Zhangjin
Tagged With: Police Brutality, The Church of Almighty God
Il diritto di asilo dei rifugiati della Chiesa di Dio Onnipotente: nuovi sviluppi
Persecution of The Church of Almighty God: From Bad to Worse
Church of Almighty God Members Driven to Suicide
Church of Almighty God Members Tortured to Reveal Information
CAG Members Tortured in Xinjiang's Internment Camps
Members of banned religious groups are often detained in transformation through education camps. Three Church of Almighty God believers tell their stories.
A 3-Year "Final Solution" Plan Against The Church of Almighty God
Countless CAG members have been arrested following a national crackdown operation launched this September to eradicate the Church.
New Unified Arrest Operations Target The Church of Almighty God
Over 300 believers were arrested in October and November, as local authorities launched new crackdown campaigns against this Chinese Christian new religious movement.
Church of Almighty God Members "Deprogrammed" in Jail
Under CCP's "transformation" program, CAG members are abused and tortured, until they sign the "three statements," promising to give up their belief.


Group Picture taken 10/28. Front Row: Pierson Perez, Louise Solomon, Isabella Padron, Fiorela Mira, Frances Franklin McGovern, Dante Fiore, Diane Lang (Conductor), Susan Conklin (partially obscured), Rosalinda Perez (Artistic Director). Second Row: Christopher Neils, Andres Perez, William Ramey, Arlene Linke Third Row: John Taylor Thomas, Daniel Gurniak, Terence Hyde, Laura Heckmann, Nell MacDonald.
Tickets: Adults $20, Students/Seniors $15. Group Rates Available. Please call 845-709-2273 to reserve tickets. For information call 845-709-2273, or email to info@hudsonlyricopera.org.
La Traviata (The Fallen Woman) is a 3 act opera composed by Guisseppe Verdi in the 1850s. The setting is mid-19th century France, and is the tragic love story between Violetta, a courtesan, and Alfredo, a young man. The story comes from a novel, La Dame aux Camélias, by Alexandre Dumas fils. This novel was adapted into a play by him, and is known in English as "Camille," which has been performed many times on Broadway. Many films are based on Camille, most recently Moulin Rouge! (2001) by Baz Luhrmann, starring Nicole Kidman and Ewan McGregor.
The Hudson Lyric Opera, now in its twelfth season, is comprised of many talented artists who live or work in the lower Hudson Valley. "La Traviata" is the second production this year (2018), as "The Magic Flute" was presented over two weekends in June. We look forward to seeing you soon!


text:
package task

import (
	"context"
	"flag"
	"fmt"
	"strings"

	"github.com/vmware/govmomi/govc/cli"
	"github.com/vmware/govmomi/govc/flags"
	"github.com/vmware/govmomi/property"
	"github.com/vmware/govmomi/view"
	"github.com/vmware/govmomi/vim25/mo"
	"github.com/vmware/govmomi/vim25/types"
)

type recent struct {
	*flags.DatacenterFlag

	max    int
	follow bool
	long   bool
}

func init() {
	cli.Register("tasks", &recent{})
}

func (cmd *recent) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx)
	cmd.DatacenterFlag.Register(ctx, f)

	f.IntVar(&cmd.max, "n", 25, "Output the last N tasks")
	f.BoolVar(&cmd.follow, "f", false, "Follow recent task updates")
	f.BoolVar(&cmd.long, "l", false, "Use long task description")
}

func (cmd *recent) Description() string {
	return `Display info for recent tasks.

When a task has completed, the result column includes the task duration on success or
error message on failure.  If a task is still in progress, the result column displays
the completion percentage and the task ID.  The task ID can be used as an argument to
the 'task.cancel' command.

By default, all recent tasks are included (via TaskManager), but can be limited by PATH
to a specific inventory object.

Examples:
  govc tasks
  govc tasks -f
  govc tasks -f /dc1/host/cluster1`
}

func (cmd *recent) Usage() string {
	return "[PATH]"
}

func (cmd *recent) Process(ctx context.Context) error {
	if err := cmd.DatacenterFlag.Process(ctx); err != nil {
		return err
	}
	return nil
}

func chop(s string) string {
	if len(s) < 30 {
		return s
	}

	return s[:29] + "*"
}

// taskName describes the tasks similar to the ESX ui
func taskName(info *types.TaskInfo) string {
	name := strings.TrimSuffix(info.Name, "_Task")
	switch name {
	case "":
		return info.DescriptionId
	case "Destroy", "Rename":
		return info.Entity.Type + "." + name
	default:
		return name
	}
}

func (cmd *recent) Run(ctx context.Context, f *flag.FlagSet) error {
	c, err := cmd.Client()
	if err != nil {
		return err
	}

	m := c.ServiceContent.TaskManager

	tn := taskName

	if cmd.long {
		var o mo.TaskManager
		err = property.DefaultCollector(c).RetrieveOne(ctx, *m, []string{"description.methodInfo"}, &o)
		if err != nil {
			return err
		}

		desc := make(map[string]string, len(o.Description.MethodInfo))

		for _, entry := range o.Description.MethodInfo {
			info := entry.GetElementDescription()
			desc[info.Key] = info.Label
		}

		tn = func(info *types.TaskInfo) string {
			if name, ok := desc[info.DescriptionId]; ok {
				return name
			}

			return taskName(info)
		}
	}

	watch := *m

	if f.NArg() == 1 {
		refs, merr := cmd.ManagedObjects(ctx, f.Args())
		if merr != nil {
			return merr
		}
		watch = refs[0]
	}

	v, err := view.NewManager(c).CreateTaskView(ctx, &watch)
	if err != nil {
		return nil
	}

	defer v.Destroy(context.Background())

	v.Follow = cmd.follow

	stamp := "15:04:05"
	tmpl := "%-40s %-30s %15s %9s %9s %9s %s\n"
	fmt.Fprintf(cmd.Out, tmpl, "Task", "Target", "Initiator", "Queued", "Started", "Completed", "Result")

	var last string
	updated := false

	return v.Collect(ctx, func(tasks []types.TaskInfo) {
		if !updated && len(tasks) > cmd.max {
			tasks = tasks[len(tasks)-cmd.max:]
		}
		updated = true

		for _, info := range tasks {
			var user string

			switch x := info.Reason.(type) {
			case *types.TaskReasonUser:
				user = x.UserName
			}

			if info.EntityName == "" || user == "" {
				continue
			}

			ruser := strings.SplitN(user, "\\", 2)
			if len(ruser) == 2 {
				user = ruser[1] // discard domain
			} else {
				user = strings.TrimPrefix(user, "com.vmware.") // e.g. com.vmware.vsan.health
			}

			queued := info.QueueTime.Format(stamp)
			start := "-"
			end := start

			if info.StartTime != nil {
				start = info.StartTime.Format(stamp)
			}

			msg := fmt.Sprintf("%2d%% %s", info.Progress, info.Task)

			if info.CompleteTime != nil {
				msg = info.CompleteTime.Sub(*info.StartTime).String()

				if info.State == types.TaskInfoStateError {
					msg = strings.TrimSuffix(info.Error.LocalizedMessage, ".")
				}

				end = info.CompleteTime.Format(stamp)
			}

			result := fmt.Sprintf("%-7s [%s]", info.State, msg)

			item := fmt.Sprintf(tmpl, tn(&info), chop(info.EntityName), user, queued, start, end, result)

			if item == last {
				continue // task info was updated, but the fields we display were not
			}
			last = item

			fmt.Fprint(cmd.Out, item)
		}
	})
}