Posted in Salesforce

Salesforce Apex : Evaluate Boolean String Expression

(FALSE AND ((TRUE OR FALSE) AND (TRUE OR FALSE)))

Wondering how to evaluate this expression which is a string using Apex?

Following class can be used to evaluate:

Continue reading “Salesforce Apex : Evaluate Boolean String Expression”

Advertisements
Posted in TED Talks

Why the secret to success is setting the right goals

Enjoyed this TED Talk:
Why the secret to success is setting the right goals by John Doerr

Doer exposes us a goal setting system – OKR – Objectives and Key Results that has been employed by Google, Intel and Bono to set and execute on audacious goals.

Many of us are setting wrong goals and most of us are not setting goals, but setting goals work for organization, team and even for individuals. Truly transformational teams combine their ambitions to their passion and to their purpose, and they develop a clear and compelling sense of why.

A simple goal setting system – OKR (Objective and Key Results)

  1. Objective – what one want to have accomplished
  2. Key Results – How one going to get the objective done

Why? Objectives are:

  • Significant
  • Action-oriented
  • inspiring

How? Good key results are:

  • Good results are specific and time-bound
  • Aggressive but realistic
  • Measurable
  • Verifiable

How Google follows:

Every quarter, every Googler has written down their objectives and their key results. They’ve graded them, and they’ve published them for everyone to see. And these are not used for bonuses or for promotions. They’re set aside. They’re used for a higher purpose, and that’s to get collective commitment to truly stretch goals.

What’s expected:

Take time to write down your values, your objectives and your key results. Do it today.

Posted in Thoughts, Verse Explanation

How to overcome this world

Jesus says, “I have overcome this world” (John 16:33)

How did he overcome this world? What did he overcome? When did he overcome? We might have this question when we pass this verse in Bible.

John clearly says, “Do not love the world or anything in the world. If anyone loves the world, love for the Father is not in them. For everything in the world—the lust of the flesh, the lust of the eyes, and the pride of life—comes not from the Father but from the world. The world and its desires pass away, but whoever does the will of God lives forever.” (1 John 2:15-17)

We can perceive from the above verse that world is full of

  1. Lust of the flesh
  2. Lust of the eyes
  3. Pride of life

These were not created by our Father, but it came from the world. All these are just temporary ones that arouses out of our mind in seconds, causes us to do some action which we are not ought to and ultimately ends us with breaking our relationship with God. In other way, we can notice that these temporary actions are just like a passing wind that gives us a mere temporary pleasure. No one gets satisfied doing actions that falls under these category. It creates longings in our spirit.

Remember? When God created the man, He commanded him, “You are free to eat from any tree in the garden; but you must not eat from the tree of the knowledge of good and evil” (Genesis 2:16-17)

But, “When the woman saw that the fruit of the tree was good for food and pleasing to the eye, and also desirable for gaining wisdom, she took some and ate it.” (Genesis 3:6)

Eve’s heart was occupied with,

  1. Lust of the flesh – the fruit of the tree was good for food
  2. Lust of the eyes – pleasing to the eyes
  3. Pride of life – desirable for gaining wisdom

It should have just took few minutes to think and eat the fruit. But the entire mankind lost the relationship with God, received the Curses from Him instead.

It is common for a man to have trouble in heart or temptation. It is how he reacts to them. Is he trying to come out of it? or, is he trying to play around it?

 Even, Jesus met the same situation when he was completely worn out (40 days of fasting), the devil said to him, “If you are the Son of God, tell this stone to become bread.” Jesus answered, “It is written: ‘Man shall not live on bread alone.’” The devil led him up to a high place and showed him in an instant all the kingdoms of the world. And he said to him, “I will give you all their authority and splendor; it has been given to me, and I can give it to anyone I want to. If you worship me, it will all be yours.” Jesus answered, “It is written: ‘Worship the Lord your God and serve him only.’” The devil led him to Jerusalem and had him stand on the highest point of the temple. “If you are the Son of God,” he said, “throw yourself down from here. For it is written: “ ‘He will command his angels concerning you to guard you carefully; they will lift you up in their hands, so that you will not strike your foot against a stone.’” Jesus answered, “It is said: ‘Do not put the Lord your God to the test.’” When the devil had finished all this tempting, he left him until an opportune time.

  1. Lust of the flesh – command this stone to become the bread
  2. Lust of the eyes – Kingdom of this world that you see will be yours
  3. Pride of life – Son of God, throw yourself down, Angels will guard you

We can see, in every attempt,  Jesus overcome each lust and pride with Verses that God promised us. Yes! That is how Jesus overcame these worldly lusts. He does the will of God.

We, children of God, should always make ourselves aware of this worldly behaviors and keep ourselves out of it. Just like Jesus won these, with his Blood, we can win any tribulation, any troubles, any temptation that the worldly devil brings us! For it is written, “Submit yourselves therefore to God. Resist the devil, and he will flee from you.” (James 4:7)

Have a victorious life! God Bless You!!


Extracted from a sermon by Bro. Kulandairaj

Posted in SQL

Chained data using single SQL Query (Fixed Length)

In e-commerce sites and in other applications, database sometimes will be designed in such a way that single table has child records in a chained fashion. Like, while defining a Product Type, Category and Sub-Category. A Sub-Category points to a Category in a same table and Category points to a Product Type in a same table. This Chained table has a format of Grand Parent, Parent and Child in same table as:

id parent_id name
1 0 John
2 1 Jacob
3 2 James
4 0 Jessie
5 4 Jemimah
6 5 Julia

Continue reading “Chained data using single SQL Query (Fixed Length)”

Posted in Leadership

Appoint your Leaders – but NOT by how they EAT

When the number of people reporting to you increases, it is the best idea to bring in some hierarchy to reduce the work stress.

Just like when Moses was leading multitude of people from Egypt to God Promised land – Canaan, he was judging the people right from morning to evening. Moses’ father-in-law – Jethro said to him, “What you are doing is not good. You will surely wear yourself out, both you and these people with you. For the task is too heavy for you; you cannot do it alone. Now listen to me. I will give you counsel, and God be with you! You should represent the people before God, and you should bring their cases before God; teach them the statutes and instructions and make known to them the way they are to go and the things they are to do. You should also look for able men among all the people, men who fear God, are trustworthy, and hate dishonest gain; set such men over them as officers over thousands, hundreds, fifties and tens. Let them sit as judges for the people at all times; let them bring every important case to you but decide every minor case themselves. So, it will be easier for you, and they will bear the burden with you. If you do this, and God so commands you, then you will be able to endure, and all these people will go to their home in peace.” So, Moses listened to his father-in-law and did all that he had said.

Continue reading “Appoint your Leaders – but NOT by how they EAT”