Element 1. Template
Element 2. Section ContentsNot standard terminology
</html>
Anything that interests me finds place here. Software dominates my interests and hence a good part of this blog as well.
“There is so much about my fate that I cannot control, but other things do fall under the jurisdiction. I can decide how I spend my time, whom I interact with, whom I share my body and life and money and energy with. I can select what I can read and eat and study. I can choose how I’m going to regard unfortunate circumstances in my life — whether I will see them as curses or opportunities. I can choose my words and the tone of voice in which I speak to others. And most of all, I can choose my thoughts.”
- Elizabeth Gilbert: Eat, Pray, Love through Julie911
“I’ve learned about other people’s way of living: how you cope with life’s challenges, how you celebrate good times, how you feel about issues, how awesomely goofy some of you are, and how, in the end, we all truly just want the same thing: to love and be loved, to understand and be understood, to leave this world knowing that we mattered and made a difference. We are all different, but so much alike.”
- Julie911
A Chinese saying:
I hear and I forget
I see and I remember
I do and I understand
Try to make sure your study is uninterrupted. You will need to find both the time and place where you can study.
It is important to remember that learning is not a race – everyone learns at their own rate. So don’t rush your leaning – make sure you get the most from the book.
- An introduction to derivatives
“That's the way a friend described someone she had just met. She was sure (just as I'm sure) that he's going places. Once the determination is in his eyes, the learning will take care of itself.
On the other hand, if I can see the fear in your eyes, then I'm not sure that learning alone will take care of the problem. No one can prove that the path you're on is risk free or guaranteed to work. Searching for more proof is futile. Searching for more determination makes more sense.”
- Seth Godin
I'd learned long ago how to leave things behind without regret – Tony Kahn
The following will open all xml files found in the current directory (and its sub-directories) in multiple tabs in gvim
$ find . -name '*.xml' | xargs gvim -p
Here's the mistake we make in high school:
We let anyone, just anyone, judge our work (and by extension, judge us.)
Sue, the airheaded but long-legged girl in Spanish class gets the right to judge our appearance.
Bill, the bitter former-poet English teacher gets the power to tell us if we're good at writing.
And on and on.
The cheerleaders are deputized as the Supreme Court of social popularity, and the gym teacher forever has dibs on whether or not we're macho enough to make it in the world. These are patterns we sign up for, and they last forever (or until we tell them to go away).
In high school, some people learn to ship, they learn to do work that matters and most of all, they learn to ignore the critics they can never possibly please. The ability to choose who judges your work--the people who will make it better, use it and reward you--is the key building block in becoming an artist in whatever you do.
“In the infinity of life where I am, all is perfect whole, and complete, and yet life is ever changing. There is no beginning and no end, only a constant cycling and recycling of substance and experiences. Life is never stuck or static or stale for each moment is ever new and fresh. I am one with the very Power that created me, and this Power has given me the power to create my own circumstances. I rejoice in the knowledge that I have the power of my own mind to use in any way I choose. Every moment of life is a new beginning point as we move from the old. This moment is a new point of beginning for me right here and right now. All is well in my world.”
~ Louise Hay (You Can Heal Your Life) through thinksimplenow
svn propset svn:log --revprop –r <revision_no> “<new_comment>”
“Your biggest challenge isn’t someone else. It’s the ache in your lungs and the burning in your legs, and the voice inside you that yells ‘CAN’T’. But you don’t listen, you just push harder. And then you hear the voice whisper ‘can’, and you discover that the person you thought you were is no match for the one you really are.”
- Author Unknown through Julie911
“You take a born-pretty girl and you dress her up in pretty things, curl her pretty hair and she becomes empty. Vacuous. The only thing she can claim as a self identity is her one dimensional beauty. But take a pretty girl and throw some shit on her, and make her fight her way out of it and she’ll grow to be other-worldly radiant and a force to be reckoned with.”
- Beautiful, Depraved through Julie911
“Some questions don’t have answers, and that’s a difficult lesson to learn.”
- Katherine Graham
“If ever there is tomorrow when we’re not together, there is something you must always remember. You are braver than you believe, stronger than you seem, and smarter than you think. But the most important thing is, even if we’re apart, I’ll always be with you.”
- A. A. Milne through Julie911
“No matter how big and tough a problem may be, get rid of confusion by taking one little step towards solution. Do something. Then try again. At the worst, so long as you don’t do it the same way twice, you will eventually use up all the wrong ways of doing it and thus the next try will be the right one.”
- George F. Nordenhold through Julie911
In JSF 1, composition components are defined using <ui:composition>. The “template” attribute of ui:composition is optional. Meaning the composition component can opt to confirm to a template or not. So these components could be classified into those that confirmed to a template and those that did not.
Type 1: Composition components that confirm to a template:
A composition component confirms to a template by specifying the template name in the template attribute (e.g: ui:composition template=”section.xtml”). Then it overrides certain aspects of the template. In the example 1 below, section.xhtml, which is the template, defines “contents” (at 1). The composition component defined in Student.xhtml specifies section.xhtml as its template at 2. Section.xhtml further defines-its-own or overrides “contents” at 3. Had there been no 3, 4 would get rendered.
Example 1
Section.xhtml
<ui:composition>
<div…> …
<ui:insert name=”contents”> 1
This is the default text for “contents”. This text will be rendered when a component does not override this ui:insert with a ui:define name=”contents” 4
</ui:insert>
</ui:composition>
Student.xhtml
<ui:composition template=”section.xhtml”> 2
<ui:define name=”contents”> 3
<h:outputText…..> <!—contents of the student section Ã
</ui:define>
</ui:composition>
Type 2: Composition components that *do not* confirm to a template:
A composition component can be stand alone too. In this case the ui:composition tag will reference no template.
outputField.xhtml
<ui:composition >
<h:outputText
Value=”#{fieldLabel}”/>
<h:inputText
Value=”#{field.property}”/>
</ui:composition >
Company.xhtml
<ui:composition …>
<a:outputField
fieldLabel=”Company Name”
field=”#{company}”
property=”name”/>
</ui:”composition>
Migrating to JSF 2:
Type 2 components above are good candidates to become composite components in JSF 2 (as composite components, like type 2 composition components, are stand-alone and confirm to no templates).
| | Composition Components | Composite components |
| 1 | Composition components can use a template e.g. view.xhtml <a:location …/> location.xhtml <ui:composition template=”section.xhtml”> <ui:define name=”contents”> <h:outputText …/> </ui:define> </ui:composition> | Composite components cannot. The need to be decorated to confirm to a template. e.g. view.xhtml <ui:decorate template=”section.xhtml”> <ui:define name=”contents”> <a:location…> </ui:define> </ui:decorate> Location.xhtml <composite:interface> <composite:attribute …/> </composite:interface> <composite:implementation> … </composite:implementation> |
| 2 | Composition components have no constructs to define action listeners and such | Composite components are more closer to a full blown custom component and can hence define action listeners |
| 3 | JSF 1 only | JSF 2 only |
In an application, the UI keeps changing a lot more frequently than the underlying APIs. Designing bearing this in mind would help achieve a better design.
To achieve a effective separation of concerns, the coupling among the separated concerns must be minimal. This way, the implementation of each of the separated concerns have a opportunity to have minimal coupling.
“One day at a time — this is enough. Do not look back and grieve over the past for it is gone; and do not be troubled about the future, for it has not yet come. Live in the present and make it so beautiful it will be worth remembering.”
- Ida Scott Taylor through Julie911
Café Gratitude is our expression of a world of plenty. Our food and people are a celebration of our aliveness. We select the finest organic ingredients to honor the earth and ourselves, as we are one and the same. We support local farmers, sustainable agriculture and environmentally friendly products. Our food is prepared with love. We invite you to step inside and enjoy being someone that chooses: loving your life, adoring yourself, accepting the world, being generous and grateful every day, and experiencing being provided for. Have fun and enjoy being nourished. Welcome to Café Gratitude!
From YES! Magazine through Julie911
1. Savor Everyday Moments
Pause now and then to smell a rose or watch children at play. Study participants who took time to “savor” ordinary events that they normally hurried through, or to think back on pleasant moments from their day, “showed significant increases in happiness and reductions in depression,” says psychologist Sonja Lyubomirsky.
2. Avoid Comparisons
While keeping up with the Joneses is part of American culture, comparing ourselves with others can be damaging to happiness and self-esteem. Instead of comparing ourselves to others, focusing on our own personal achievement leads to greater satisfaction, according to Lyubomirsky.
3. Put Money Low on the List
People who put money high on their priority list are more at risk for depression, anxiety, and low self-esteem, according to researchers Tim Kasser and Richard Ryan. Their findings hold true across nations and cultures. “The more we seek satisfactions in material goods, the less we find them there,” Ryan says. “The satisfaction has a short half-life—it’s very fleeting.” Money-seekers also score lower on tests of vitality and self-actualization.
4. Have Meaningful Goals
“People who strive for something significant, whether it’s learning a new craft or raising moral children, are far happier than those who don’t have strong dreams or aspirations,” say Ed Diener and Robert Biswas-Diener. “As humans, we actually require a sense of meaning to thrive.” Harvard’s resident happiness professor, Tal Ben-Shahar, agrees, “Happiness lies at the intersection between pleasure and meaning. Whether at work or at home, the goal is to engage in activities that are both personally significant and enjoyable.”
5. Take Initiative at Work
How happy you are at work depends in part on how much initiative you take. Researcher Amy Wrzesniewski says that when we express creativity, help others, suggest improvements, or do additional tasks on the job, we make our work more rewarding and feel more in control.
6. Make Friends, Treasure Family
Happier people tend to have good families, friends, and supportive relationships, say Diener and Biswas-Diener. But it’s not enough to be the life of the party if you’re surrounded by shallow acquaintances. “We don’t just need relationships, we need close ones” that involve understanding and caring.
7. Smile Even When You Don’t Feel Like It
It sounds simple, but it works. “Happy people…see possibilities, opportunities, and success. When they think of the future, they are optimistic, and when they review the past, they tend to savor the high points,” say Diener and Biswas-Diener. Even if you weren’t born looking at the glass as half-full, with practice, a positive outlook can become a habit.
8. Say Thank You Like You Mean It
People who keep gratitude journals on a weekly basis are healthier, more optimistic, and more likely to make progress toward achieving personal goals, according to author Robert Emmons. Research by Martin Seligman, founder of positive psychology, revealed that people who write “gratitude letters” to someone who made a difference in their lives score higher on happiness, and lower on depression—and the effect lasts for weeks.
9. Get Out and Exercise
A Duke University study shows that exercise may be just as effective as drugs in treating depression, without all the side effects and expense. Other research shows that in addition to health benefits, regular exercise offers a sense of accomplishment and opportunity for social interaction, releases feel-good endorphins, and boosts self-esteem.
10. Give It Away, Give It Away Now!
Make altruism and giving part of your life, and be purposeful about it. Researcher Stephen Post says helping a neighbor, volunteering, or donating goods and services results in a “helper’s high,” and you get more health benefits than you would from exercise or quitting smoking. Listening to a friend, passing on your skills, celebrating others’ successes, and forgiveness also contribute to happiness, he says. Researcher Elizabeth Dunn found that those who spend money on others reported much greater happiness than those who spend it on themselves.
“I am grateful that somehow we are made, in the most trying of times, to just block out everything and keep going, even when you have no idea what to do or how it will all work out.”
- Sarah Dessen through Julie911
‘…Geniuses…people with extraordinary skill…devise innovative idioms, mechanisms and frameworks that others can use as architectural foundations of other applications or systems…However as Peters observes “The world is only sparsely populated with geniuses…”… Although there is touch of genius is all of us, in the realm of industrial-strength software we cannot always rely upon divine inspiration to carry us through. Therefore we must consider more disciplined ways to master complexity.” – Grady Booch in “Object-Oriented Analysis and Design with Applications”
“What we create becomes meaningful to us only once we stop creating it and start to think about why we did so.” - Rabbi Elijah of Vilna
“Contentment is natural wealth, luxury is artificial poverty.”
– Socrates through Becoming Minimalist
Data Objects hold data. They do *not* operate on the data (like save, delete etc…).
Service Objects operate on the data held by Data Objects.
Data Object design is more real life driven. If there is a “Is a” relationship between two entities in real world, the model objects have a “Is a” relationship. For example a Dog “Is a” Animal.
Service Objects design is more application architecture driven. For example if a reusable functional logic should be achieved through aggregation or composition or a utility class (read post titled “Don’t extend to extend functionality. Extend to only override functionality”).
Don’t extend to extend functionality
Extend to only override functionality
When an API is extended, the author of the API must factor in the fact that it would be extended. If not extension had exposed a means to invoke an API in a way that it was not designed to handle.
On the other hand when aggregation is used, only public APIs are used and hence the class is used as it was intended to be used. When authoring classes care must be exercised in deciding what must be private, protected, default, public and final (a way of saying this API does not support extension).
Freedom of choice is good. But when one has a whole lot of options to choose from, restricting oneself becomes necessary to achieve direction.
When Buddhist monks are trained, options available to them are considerably restrained. In real life, we have a whole lot of options to choose from though. But if those choices are not made consistently, then a sense of direction seems missing.
- My understanding of Sheena Iyengar’s thoughts on NPR today
“it is not how much we have, but how much we enjoy, that makes happiness.”
from Plain Advice for Plain People
by Charles Spurgeon through “Becoming Minimalist”
“our souls are not hungry for fame, comfort, wealth, or power. our souls are hungry for meaning, for the sense that we have figured out how to live so that our lives matter.”
- harold Kushner through “Becoming Minimalist”
“Our best decisions, the ones that we never regret, come from listening to ourselves.”
- Felicity through Julie911
“You know, I think you try a little harder when you’re scared.”
- Rocky Balboa through Julie911
“I know you’re scared. Don’t be. The world really is beautiful.”
- Alicia Millstone through Julie911
| String.format( "SQL completed in %.2f seconds.", ((float)(endTime - startTime)/1000) ) Output: SQL completed in 0.02 seconds. | Display the parameter as a floating point decimal (%f) with 2 decimal places (%.2f). |
Judge before and after doing a scene but not during (when the scene is being made)
- An actor on NPR
The more precise you are about your decisions the better are the chances of winning
- Almost close to the wordings of a winter Olympic athlete
“Not being able to do everything is no excuse for not doing everything you can.”
- Ashleigh Brilliant through Julie911
“Young lovers seek perfection. Old lovers learn the art of sewing shreds together and of seeing beauty in a multiplicity of patches.”
- How To Make An American Quilt through Juli911

1. The transaction can be marked as read-only and any accidental/un-intentional writes can be discovered and fixed
2. The read operations can be wrapped with a “propagation required” (if a transaction already exists while performing the operation, use it. Else create a new transaction) there by the read operation can participate in write transactions.
cat test.txt | sed '/^ *$/d' | sort | uniq # uniq requires its input to to be sorted
“…in order to acquire anything in the physical universe, you have to relinquish your attachment to it… You don’t give up the intention, and you don’t give up the desire. You give up your attachment to the result… The moment you relinquish your attachment to the result, combining one-pointed intention with detachment at the same time, you will have that which you desire… because detachment is based on the unquestioning belief in the power of your true Self… Attachment… is based on fear and insecurity and the need for security is based on not knowing the true Self. The source of wealth, of abundance or of anything in the physical work is the Self; it is the consciousness that knows how to fulfill every need. Everything else is a symbol: cars, houses,… Symbols are transitory; they come and go. Chasing symbols is like settling for the map instead of the territory. It creates anxiety; it ends up making you feel hollow and empty inside, because you exchange yourself for the symbol of your Self…Only from detached involvement can one have joy and laughter. Then the symbols of wealth are created spontaneously and effortlessly… To be grounded in this experience (of spontaneous wealth creation) you have to be grounded in the wisdom of uncertainty. In this uncertainty you will find the freedom to create any-thing you want.” Seeking security does not work. No amount of security is enough. “ In ancient wisdom traditions, the solution to this whole dilemma lies in the wisdom of insecurity, or the wisdom of uncertainty. This means that the search for security and certainty is actually as attachment to the know. And what’s the know? The known is our past. The known is nothing other than the prison of past conditioning. There’s no evolution in that – absolutely none at all. And when there is no evolution, there is stagnation, entropy, disorder and decay. ..Relinquish your attachment to the known, step into the unknown, and you will step into the field of all possibilities…This means that in every moment of your life, you will have excitement, adventure, mystery. You will experience the fun of life – the magic, the celebration, the exhilaration and the exultation of your own spirit…When you are attached, your intention gets locked into a rigid mindset and you lose the fluidity, the creativity, and the spontaneity inherent in the field (of all possibilities) (that can orchestrate an infinity of space-time events to bring about the outcome that is intended). The Law of detachment accelerates the whole process of evolution. When you understand this law, you don’t feel compelled to force solutions. When you force solutions to problems, you create new problems. But when you put your attention on the uncertainty, and you witness the uncertainty while you expectantly wait for the solution to emerge out of the chaos and the confusion then what emerges is something very fabulous and exciting. This …alertness – your preparedness in the present, in the field of uncertainty – meets with your goal and your intension and allows you to seize the opportunity. ” The opportunity contained within every problem that you have in your life. “Good luck is nothing but preparedness and opportunity coming together.”
“Relinquish your attachment to the outcome. This means giving up your rigid attachment to a specific result and living in the wisdom of uncertainty. It means enjoying every moment in the journey of your life, even if you don’t know the outcome”.
1. “I will make a list of all my desires. I will carry this list with me whenever I go. I will look at this list before I go into my silence and meditation. I will look at it before I go to sleep at night. I will look at it when I wake up in the morning.
2. I will realize this list of my desires and surrender it to the womb of creation, trusting that when things don’t seem to go my way, there is a reason, and that the cosmic plan has designs for me much grander than even those that I have conceived.
3. I will remind myself to practice present-moment awareness in all my actions. I will refuse to allow obstacles to consume and dissipate the quality of my attention in the present moment. I will accept the present as it is, and manifest the future through my deepest, most cherished intentions and desires.”
- The Seven Spiritual Laws of Success by Deepak Chopra
“ … most of our energy goes into upholding our importance … If we are capable of losing some of that importance, two extraordinary things would happen to us. One, we would free our energy from trying to maintain the illusory idea of our grandeur; and two, we would provide ourselves with enough energy to….catch a glimpse of the actual grandeur of the universe. [ from The Art of Dreaming ]”
3 aspects to achive do more with less
1. Accept that this moment (people, situations, circumstances and events) is as it should be, because the entire universe is as it is. “When you struggle against this moment, you struggle against the entire universe.” So you should “accepts things as they are, not as you wish they were in this moment”. “When you feel frustrated or upset by a person or a situation, remember that you are not reacting to the person or the situation, buy to your feelings about the person or situation. These are your feelings and your feeling are not someone else’s fault. And if you can accept things as they are, you are ready to take responsibility for your situation...”
2. “Responsibility means not blaming anyone or anything for your situation including yourself. Having accepted this circumstances, this event, this problem, responsibility then means the ability to have a creative response to the situation as it in now. All problems contain the seeds of opportunity, and this awareness allows you to take the moment and transform it to a better situation or thing” “Reality is an interpretation. And if you choose to interpret reality in this way, you will have many teachers around you…” Your situation is “precisely the one you need in your life at this moment. This is the hidden meaning behind all events and this hidden meaning is serving your own evolution”.
3. Remain defenseless – relinquish “the need to convince … others of your point of view.” In doing so, you will “gain access to enormous amounts of energy that have been previously wasted. When you become defensive, blame others, and do not accept and surrender to the moment, your life meets resistance… You don’t want to stand rigid like a tall oak that cracks and collapses in the storm. Instead, you want to be flexible, like a reed that bends with the storm and survives. ”
“In every moment of our existence, we are in that field of all possibilities where we have access to an infinity of choices. Some of these choices are made consciously, while others are made unconsciously.” ”…most of us – even though we are infinite choice-makers – have becomes bundles of conditioned reflexes that are constantly being triggered by people and circumstances into predictable outcomes of behavior.” “If you step back for a moment and witness the choices you are making as you make those choices, then in just this act of witnessing, you take the whole process from the unconscious realm into the conscious realm. This procedure of conscious choice-making and witnessing is very empowering.”
2 questions to ask before making a choice
1. “What are the consequences of this choice that I’m making?”
2. “Will this choice that I’m making now being happiness to me and to those around me?”
“There is only one choice, out of the infinity of choices available in every second, that will create happiness for you as well as for those around you. And when you make that one choice, it will result in a form of behavior that is called spontaneous right action.”
- The Seven Laws of Spiritual Success by Deepak Chopra
That which doen't multiply through giving is neither worth giving nor worth receiving
- The Seven Spiritual Laws of Success by Deepak Chopra
Also called “the Law of Giving and Receiving, because the universe operates through dynamic exchange”
- The Seven Laws of Spiritual Success by Deepak Chopra
“Judgment is the constant evaluation of right or wrong, good or bad. When you constantly evaluating, classifying, labeling, analyzing, you create a lot of turbulence in your internal dialogue. This turbulence constricts the flow of energy between you and the field of pure potentiality. You literally squeeze the “gap” between thoughts.”
“The gap is your connection to the field of pure potentiality. It is that state of pure awareness, that silent space between thoughts, that inner stillness that connects you to true power. And when you squeeze the gap, you squeeze your connection to the field of pure potentiality and infinite creativity.”
“Non-judgment creates silence in your mind.” Start your day with “Today I shall judge nothing that occurs” [ a prayer from A Course in Miracles ] “and throughout the day, remind yourself of that statement each time you catch yourself judging.” If it is difficult for a day say something like “For the next hour I shall judge nothing that occurs”
- The Seven Spiritual Laws of Success by Deepak Chopra with my words (not in quotes)
“One way to access” pure consciousness “is through daily practice of silence, meditation and non-judgment. Spending time in nature will also give you access to the qualities inherent in the field: infinite creativity, freedom and bliss.”
“Practicing silence means making a commitment to take a certain amount of time to simply be.” “If you never give yourself the opportunity to experience silence, this creates turbulence in your internal dialogue.”
“Set aside a little time every once in a while to experience silence.”…”And every once in a while experience silence for an extended period of time, such as a full day…”. “Initially your internal dialog becomes even more turbulent. You feel an intense need to say something.” But as you “stay with the experience,” the “internal dialog begins t quieten. And soon the silence becomes profound.” “Then as the internal dialogue quietens, you begin to experience the stillness of the field of pure potentiality.”
When our thinking is based on our objects in our experience, “we are constantly seeking the approval of others. Our thinking and behavior are always in anticipation of a response. It is therefore fear-based.” There is also a “need control things. The need for approval, the need to control things, and the need for external power are needs that are based on fear. This kind of power is not the power of pure potentiality or power of the self, or real power.” …”Power based on object referral …lasts only as long as the object of reference is there. If you have a certain (job) title or if you have a lot of money the power you enjoy goes with “ the title or money. “Ego based power will last only last as long as those things last. As soon as the title, the job, the money go away, so does the power”.
The true self, “which is your spirit, your soul, is completely free from those things. It is immune to criticism, it is unfearful of any challenge, and it feels beneath no one. And yet, it is also humble and feels superior to no one, because it recognizes that everyone else is the same self, the same spirit in different disguise.” .. “It draws people to you and it also draws things that you want to you.”…”It is the support of divinity; it is the support that comes from being in the state of grace. Your power is such that you enjoy a bond with people and people enjoy a bond with you”..”A bonding that comes from true love”.
- “The Seven Spiritual Laws of Success” by Deepak Chopra with my words (not quoted)
“True love. You know … when you’re old and you’re wrinkly and you’re sitting there gumming your food and your husband looks at you and even though he doesn’t see you very well anymore, he can see in your eyes the whole world: the future, the past, everything that was good and even things that were bad, and he can still say, ‘There is my queen and what a privilege it has been to love her.’”
- Prince Charming through Julie911
“It’s easy to be confident when you have control of the puck. It’s very difficult to keep that confidence when you have to take whatever strange bounces life throws your way. Don’t be careless, but don’t be too careful either. You cannot be afraid to lose.”
- Jeffrey Nordling through Julie911
“The difference between school and life? In school, you’re taught a lesson and then given a test. In life, you’re given a test that teaches you a lesson.”
- Tom Bodett through Julie911
“Time is tricky. You have whole months, even years, when nothing changes a speck, when you don’t go anywhere or do anything or think one new thought. And then you can get hit with a day or an hour, or half a second, when so much happens its almost like you are born all over again into some brand-new person you for damn sure never expected to meet.”
- Life is Funny through Julie911
“You know we just don’t recognize the most significant moments of our lives while they’re happening. Back then I thought, well, there’ll be other days. I didn’t realize that that was the only day.”
- Field of Dreams through Julie911