The human brain is a most unusual instrument of elegant and as yet unknown capacity.
- Stuart Seaton
1. Keeping it Healthy
Basic information about our brains and how it changes.
Contents
- Introduction
- 60's
- 70's and 80's
Introduction:
The brain is one of the most important organs in our body. Despite that fact people don't usually think about keeping it healthy or when they do it's too late and there isn't much left to do. In this section you will find basic information about the brain, since birth to 60's.
60's
The brain has begun to shrink in size and, after a lifetime of gaining accumulated knowledge, it becomes less efficient at accessing that knowledge and adding to it. The greatest risk factor for Alzheimer's is advancing age, and most individuals with the disease are 65 or older. Surprisingly, when Alzheimer's hits people in their 60s and 70s, they show faster rates of brain tissue loss and cognitive decline compared to patients 80 years and older, according to researchers at the University of California, San Diego School of Medicine. Researchers aren't sure why Alzheimer's is more aggressive in younger patients, but suspect that people who develop symptoms later in life may have milder cases - or cases that that take longer to reveal themselves.
70's and 80's
Your risk of developing Alzheimer's increases with age, reaching 50 percent by age 85. Researchers aren't sure why the risk jumps so dramatically as we get older, but it's possible the disease is linked to inflammation, a natural part of aging that can lead to a build-up of deposits in areas like the hippocampus, the part of the brain responsible for forming new memories. These deposits may also interfere with long-term memory. Along with aging, many experts think that genes and lifestyle contribute to the majority of Alzheimer's and dementia cases.
2. Keeping it Healthy
Simple set of rulles that if followed will help keep our brains younger for longer.
Contents
- Introduction
- Avoid smoking, drinking and taking drugs
- Protect your head
- Improve your diet
- Mental stimulation
- Control your emotions
- Socialize
- Exercise
- Sleep
Introduction:
When it comes to brain health, there's a simple set of rulles for everyone.
Avoid smoking, drinking and taking drugs
Brain scans revealed that current and former smokers had a thinner cortex than those who
never smoked. The cortex is where important thought processes such as memory, language and
perception occur.
According to the National Institute on Alcohol Abuse and
Alcoholism, most heavy long-term alcohol users will experience a mild to moderate impairment
of intellectual functioning as well as diminished brain size.
Drugs can alter
important brain areas that are necessary for life-sustaining functions and can drive the
compulsive drug use that marks addiction.
Protect your head
Moderate to severe head injuries, even without diagnosed concussions, increase the risk of cognitive impairment.
Improve your diet
Good nutrition can help your mind as well as your body. For example, people that eat a Mediterranean style diet that emphasizes fruits, vegetables, fish, nuts, unsaturated oils (olive oil) and plant sources of proteins are less likely to develop cognitive impairment and dementia.
Mental stimulation
Through research with mice and humans, scientists have found that brainy activities stimulate
new connections between nerve cells and may even help the brain generate new cells,
developing neurological "plasticity" and building up a functional reserve that provides a
hedge against future cell loss.
Any mentally stimulating activity should help to
build up your brain. Read, take courses, try "mental gymnastics," such as word puzzles or
math problems Experiment with things that require manual dexterity as well as mental effort,
such as drawing, painting, and other crafts.
Control your emotions
People who are anxious, depressed, sleep-deprived, or exhausted tend to score poorly on cognitive function tests. Poor scores don't necessarily predict an increased risk of cognitive decline in old age, but good mental health and restful sleep are certainly important goals.
Socialize
Research shows that an active social life helps reduce your risk of developing dementia, including Alzheimer's disease. The theory is that social connections help keep the connections between your brain cells (neurons) strong.
Exercise
Exercise appears to slow age-related brain shrinkage and maintain the cognitive abilities that diminish with age.

3. References
References - you can read more by clicking on the links


Agilent devices are suppported via their IVI drivers. See the Python IVI documentation.
Agilent 34401A IVI DMM driver
Read a measurement and return its value.
Python IVI documentation generator
Python IVI help system
Agilent E3641A IVI DC power supply driver
Set the voltage of the specified output.
Python IVI documentation generator
Python IVI help system


--- layout: null permalink: /vendor/products index: false ---
This page is for creating products to list on the WFD Store.
You will need an account on WhiskeyFlatDays.com to proceed. You may
login or register. Once signed in, the Add Item
button will be enabled.
You may click on the {% include common/icon.html icon="info" height="18" width="18" fill="currentColor" %} icons for the fields to get more information.


|
"OJ EPO special edition 3/2007, 128"
| ||
| Expected | Received | Diff |
|
["OJ EPO special edition 3/2007, 128"]
|
["OJ EPO special edition 3/2007"]
|
[0] OJ EPO special edition 3/2007 , 128 |
|
"OJ EPO Special editions No. 4/2001, pages 56"
| ||
| Expected | Received | Diff |
|
["OJ EPO Special editions No. 4/2001, pages 56"]
|
["OJ EPO Special editions No. 4/2001"]
|
[0] OJ EPO Special editions No. 4/2001 , pages 56 |
|
"Special edition OJ EPO 4/2007, p. 50"
| ||
| Expected | Received | Diff |
|
["Special edition OJ EPO 4/2007, p. 50"]
|
["Special edition OJ EPO 4/2007"]
|
[0] Special edition OJ EPO 4/2007 , p. 50 |
|
"OJ SE 4/2007, 48"
| ||
| Expected | Received | Diff |
|
["OJ SE 4/2007, 48"]
|
["OJ SE 4/2007"]
|
[0] OJ SE 4/2007 , 48 |
|
"OJ Special edition No. 1/2007, pages 89"
| ||
| Expected | Received | Diff |
|
["OJ Special edition No. 1/2007, pages 89"]
|
["OJ Special edition No. 1/2007"]
|
[0] OJ Special edition No. 1/2007 , pages 89 |
|
"Supplement No. 1 to OJ EPO 12/1992, 1"
| ||
| Expected | Received | Diff |
|
["Supplement No. 1 to OJ EPO 12/1992, 1"]
|
["Supplement No. 1 to OJ EPO 12/1992"]
|
[0] Supplement No. 1 to OJ EPO 12/1992 , 1 |
|
"OJ EPO, 1983, 121"
| ||
| Expected | Received | Diff |
|
["OJ EPO, 1983, 121"]
|
["OJ EPO, 1983"]
|
[0] OJ EPO, 1983 , 121 |
|
"OJ, 2004, 413"
| ||
| Expected | Received | Diff |
|
["OJ, 2004, 413"]
|
["OJ, 2004"]
|
[0] OJ, 2004 , 413 |
|
"OJ EPO issue No. 10/1992, page 604"
| ||
| Expected | Received | Diff |
|
["OJ EPO issue No. 10/1992, page 604"]
|
["OJ EPO issue No. 10/1992"]
|
[0] OJ EPO issue No. 10/1992 , page 604 |
|
"OJ EPO 2015, A35"
| ||
| Expected | Received | Diff |
|
["OJ EPO 2015, A35"]
|
["OJ EPO 2015"]
|
[0] OJ EPO 2015 , A35 |
|
"OJ 2016, A28"
| ||
| Expected | Received | Diff |
|
["OJ 2016, A28"]
|
["OJ 2016"]
|
[0] OJ 2016 , A28 |
|
"OJ EPO 1990, page 384"
| ||
| Expected | Received | Diff |
|
["OJ EPO 1990, page 384"]
|
["OJ EPO 1990"]
|
[0] OJ EPO 1990 , page 384 |
|
"Official Journal 2002, p. 76"
| ||
| Expected | Received | Diff |
|
["Official Journal 2002, p. 76"]
|
["Official Journal 2002"]
|
[0] Official Journal 2002 , p. 76 |
|
"OJ 2009, page 338"
| ||
| Expected | Received | Diff |
|
["OJ 2009, page 338"]
|
["OJ 2009"]
|
[0] OJ 2009 , page 338 |
|
"OJ 1993, 08"
| ||
| Expected | Received | Diff |
|
["OJ 1993, 08"]
|
["OJ 1993"]
|
[0] OJ 1993 , 08 |
|
"OJ EPO 1985, 064"
| ||
| Expected | Received | Diff |
|
["OJ EPO 1985, 064"]
|
["OJ EPO 1985"]
|
[0] OJ EPO 1985 , 064 |
|
"OJ 2007, 016"
| ||
| Expected | Received | Diff |
|
["OJ 2007, 016"]
|
["OJ 2007"]
|
[0] OJ 2007 , 016 |
|
"OJ EPO 2007, 303"
| ||
| Expected | Received | Diff |
|
["OJ EPO 2007, 303"]
|
["OJ EPO 2007"]
|
[0] OJ EPO 2007 , 303 |
|
"Official Journal 2004, 1"
| ||
| Expected | Received | Diff |
|
["Official Journal 2004, 1"]
|
["Official Journal 2004"]
|
[0] Official Journal 2004 , 1 |
|
"OJ 1990, 12"
| ||
| Expected | Received | Diff |
|
["OJ 1990, 12"]
|
["OJ 1990"]
|
[0] OJ 1990 , 12 |
|
"OJ EPO 1999, Suppl. to No. 2/99, pp. 7"
| ||
| Expected | Received | Diff |
|
["OJ EPO 1999, Suppl. to No. 2/99, pp. 7"]
|
["OJ EPO 1999, Suppl. to No. 2/99"]
|
[0] OJ EPO 1999, Suppl. to No. 2/99 , pp. 7 |
|
"OJ EPO 2007, Spec. ed. 3"
| ||
| Expected | Received | Diff |
|
["OJ EPO 2007, Spec. ed. 3"]
|
["OJ EPO 2007, Spec. ed. 3OJ EPO 2007, Spec. ed. 3"]
|
[0] OJ EPO 2007, Spec. ed. 3 OJ EPO 2007, Spec. ed. 3 |
|
"OJ 2007, Spec.Ed.3"
| ||
| Expected | Received | Diff |
|
["OJ 2007, Spec.Ed.3"]
|
["OJ 2007, Spec.Ed.3OJ 2007, Spec.Ed.3"]
|
[0] OJ 2007, Spec.Ed.3 OJ 2007, Spec.Ed.3 |
|
"OJ EPO 2007, Special edition 4, 50"
| ||
| Expected | Received | Diff |
|
["OJ EPO 2007, Special edition 4, 50"]
|
["OJ EPO 2007, Special edition 4OJ EPO 2007, Special edition 4"]
|
[0] OJ EPO 2007, Special edition 4 , 50 OJ EPO 2007, Special edition 4 |
|
"OJ EPO 2007, Special edition No. 3"
| ||
| Expected | Received | Diff |
|
["OJ EPO 2007, Special edition No. 3"]
|
["OJ EPO 2007, Special edition No. 3OJ EPO 2007, Special edition No. 3"]
|
[0] OJ EPO 2007, Special edition No. 3 OJ EPO 2007, Special edition No. 3 |
|
"OJ 2007, Special edition No. 3"
| ||
| Expected | Received | Diff |
|
["OJ 2007, Special edition No. 3"]
|
["OJ 2007, Special edition No. 3OJ 2007, Special edition No. 3"]
|
[0] OJ 2007, Special edition No. 3 OJ 2007, Special edition No. 3 |
|
"OJ EPO 2001, Special edition No. 4, p. 55"
| ||
| Expected | Received | Diff |
|
["OJ EPO 2001, Special edition No. 4, p. 55"]
|
["OJ EPO 2001, Special edition No. 4OJ EPO 2001, Special edition No. 4"]
|
[0] OJ EPO 2001, Special edition No. 4 , p. 55 OJ EPO 2001, Special edition No. 4 |
|
"OJ EPO 2007, Special Edition No. 1, 196"
| ||
| Expected | Received | Diff |
|
["OJ EPO 2007, Special Edition No. 1, 196"]
|
["OJ EPO 2007, Special Edition No. 1OJ EPO 2007, Special Edition No. 1"]
|
[0] OJ EPO 2007, Special Edition No. 1 , 196 OJ EPO 2007, Special Edition No. 1 |
|
"OJ EPO 2001, Special Edition No 4, 139"
| ||
| Expected | Received | Diff |
|
["OJ EPO 2001, Special Edition No 4, 139"]
|
["OJ EPO 2001, Special Edition No 4OJ EPO 2001, Special Edition No 4"]
|
[0] OJ EPO 2001, Special Edition No 4 , 139 OJ EPO 2001, Special Edition No 4 |
|
"OJ 1990 114"
| ||
| Expected | Received | Diff |
|
["OJ 1990 114"]
|
["OJ 1990"]
|
[0] OJ 1990 114 |
|
"OJ EPO 2003 Special edition No. 1, 202"
| ||
| Expected | Received | Diff |
|
["OJ EPO 2003 Special edition No. 1, 202"]
|
["OJ EPO 2003 Special edition No. 1"]
|
[0] OJ EPO 2003 Special edition No. 1 , 202 |
|
"OJ 2014,A39"
| ||
| Expected | Received | Diff |
|
["OJ 2014,A39"]
|
["OJ 2014"]
|
[0] OJ 2014 ,A39 |
|
"OJ 1985,060"
| ||
| Expected | Received | Diff |
|
["OJ 1985,060"]
|
["OJ 1985"]
|
[0] OJ 1985 ,060 |
|
"OJ EPO 2013,194"
| ||
| Expected | Received | Diff |
|
["OJ EPO 2013,194"]
|
["OJ EPO 2013"]
|
[0] OJ EPO 2013 ,194 |
|
"OJ 2005,14"
| ||
| Expected | Received | Diff |
|
["OJ 2005,14"]
|
["OJ 2005"]
|
[0] OJ 2005 ,14 |
|
"OJ 8-9/2009, pages 456"
| ||
| Expected | Received | Diff |
|
["OJ 8-9/2009, pages 456"]
|
["OJ 8-9/2009"]
|
[0] OJ 8-9/2009 , pages 456 |
|
"Official Journal 11-12/1979, p.447)"
| ||
| Expected | Received | Diff |
|
["Official Journal 11-12/1979, p.447)"]
|
["Official Journal 11-12/1979"]
|
[0] Official Journal 11-12/1979 , p.447) |
|
"OJ EPO 8-9/2010, 451"
| ||
| Expected | Received | Diff |
|
["OJ EPO 8-9/2010, 451"]
|
["OJ EPO 8-9/2010"]
|
[0] OJ EPO 8-9/2010 , 451 |
|
"OJ 8-9/2012, 486"
| ||
| Expected | Received | Diff |
|
["OJ 8-9/2012, 486"]
|
["OJ 8-9/2012"]
|
[0] OJ 8-9/2012 , 486 |
|
"OJ EPO 8-9/2000, 406)"
| ||
| Expected | Received | Diff |
|
["OJ EPO 8-9/2000, 406)"]
|
["OJ EPO 8-9/2000"]
|
[0] OJ EPO 8-9/2000 , 406) |
|
"OJ 8-9/2012, 486)"
| ||
| Expected | Received | Diff |
|
["OJ 8-9/2012, 486)"]
|
["OJ 8-9/2012"]
|
[0] OJ 8-9/2012 , 486) |
|
"OJ 11/2015, A91"
| ||
| Expected | Received | Diff |
|
["OJ 11/2015, A91"]
|
["OJ 11/2015"]
|
[0] OJ 11/2015 , A91 |
|
"OJ EPO 12/1982, p. 452"
| ||
| Expected | Received | Diff |
|
["OJ EPO 12/1982, p. 452"]
|
["OJ EPO 12/1982"]
|
[0] OJ EPO 12/1982 , p. 452 |
|
"Official Journal 2/1978, pages 77"
| ||
| Expected | Received | Diff |
|
["Official Journal 2/1978, pages 77"]
|
["Official Journal 2/1978"]
|
[0] Official Journal 2/1978 , pages 77 |
|
"OJ 10/2008, p. 471"
| ||
| Expected | Received | Diff |
|
["OJ 10/2008, p. 471"]
|
["OJ 10/2008"]
|
[0] OJ 10/2008 , p. 471 |
|
"OJ EPO 10/1980, p. 380)"
| ||
| Expected | Received | Diff |
|
["OJ EPO 10/1980, p. 380)"]
|
["OJ EPO 10/1980"]
|
[0] OJ EPO 10/1980 , p. 380) |
|
"OJ 1/1979, p. 4)"
| ||
| Expected | Received | Diff |
|
["OJ 1/1979, p. 4)"]
|
["OJ 1/1979"]
|
[0] OJ 1/1979 , p. 4) |
|
"OJ 2/1986, p.63"
| ||
| Expected | Received | Diff |
|
["OJ 2/1986, p.63"]
|
["OJ 2/1986"]
|
[0] OJ 2/1986 , p.63 |
|
"OJ EPO 3/2009, 182"
| ||
| Expected | Received | Diff |
|
["OJ EPO 3/2009, 182"]
|
["OJ EPO 3/2009"]
|
[0] OJ EPO 3/2009 , 182 |
|
"OJ 10/2001, 465"
| ||
| Expected | Received | Diff |
|
["OJ 10/2001, 465"]
|
["OJ 10/2001"]
|
[0] OJ 10/2001 , 465 |
|
"OJ EPO 3/2009, 182)"
| ||
| Expected | Received | Diff |
|
["OJ EPO 3/2009, 182)"]
|
["OJ EPO 3/2009"]
|
[0] OJ EPO 3/2009 , 182) |
|
"OJ 6/2012, 420)"
| ||
| Expected | Received | Diff |
|
["OJ 6/2012, 420)"]
|
["OJ 6/2012"]
|
[0] OJ 6/2012 , 420) |
|
"OJ EPO 4/2009 236"
| ||
| Expected | Received | Diff |
|
["OJ EPO 4/2009 236"]
|
["OJ EPO 4/2009"]
|
[0] OJ EPO 4/2009 236 |
|
"OJ 11/1983 (p. 458)"
| ||
| Expected | Received | Diff |
|
["OJ 11/1983 (p. 458)"]
|
["OJ 11/1983"]
|
[0] OJ 11/1983 (p. 458) |
|
"OJ 3/2009 Suppl."
| ||
| Expected | Received | Diff |
|
["OJ 3/2009 Suppl."]
|
["OJ 3/2009",
""] |
[0] OJ 3/2009 Suppl. |
|
"OJ EPO 7/2005,433"
| ||
| Expected | Received | Diff |
|
["OJ EPO 7/2005,433"]
|
["OJ EPO 7/2005"]
|
[0] OJ EPO 7/2005 ,433 |
|
"Official Journal No. 7/1999, 509"
| ||
| Expected | Received | Diff |
|
["Official Journal No. 7/1999, 509"]
|
["Official Journal No. 7/1999"]
|
[0] Official Journal No. 7/1999 , 509 |
|
"OJ SE 3/2007, p. 115"
| ||
| Expected | Received | Diff |
|
["OJ SE 3/2007, p. 115"]
|
["OJ SE 3/2007"]
|
[0] OJ SE 3/2007 , p. 115 |
|
"OJ SE 4/2007, 48"
| ||
| Expected | Received | Diff |
|
["OJ SE 4/2007, 48"]
|
["OJ SE 4/2007"]
|
[0] OJ SE 4/2007 , 48 |
|
"OJ Special edition 3/2011, 187"
| ||
| Expected | Received | Diff |
|
["OJ Special edition 3/2011, 187"]
|
["OJ Special edition 3/2011"]
|
[0] OJ Special edition 3/2011 , 187 |
|
"Supplement 2 to OJ 3/2010"
| ||
| Expected | Received | Diff |
|
["Supplement 2 to OJ 3/2010"]
|
["",
"OJ 3/2010"] |
[0] Supplement 2 to OJ 3/2010 |
|
"Supplement 2 to OJ 3/2010, 2"
| ||
| Expected | Received | Diff |
|
["Supplement 2 to OJ 3/2010, 2"]
|
["",
"OJ 3/2010"] |
[0] Supplement 2 to OJ 3/2010, 2 |
|
"Supplement to OJ 03/2009"
| ||
| Expected | Received | Diff |
|
["Supplement to OJ 03/2009"]
|
["",
""] |
[0] Supplement to OJ 03/2009 |
|
"Supplement to OJ EPO 8-9/2005"
| ||
| Expected | Received | Diff |
|
["Supplement to OJ EPO 8-9/2005"]
|
["",
"OJ EPO 8-9/2005"] |
[0] Supplement to OJ EPO 8-9/2005 |
|
"Suppl. OJ EPO 2/1999"
| ||
| Expected | Received | Diff |
|
["Suppl. OJ EPO 2/1999"]
|
["",
"OJ EPO 2/1999"] |
[0] Suppl. OJ EPO 2/1999 |
|
"Supplement to OJ EPO 3/2009"
| ||
| Expected | Received | Diff |
|
["Supplement to OJ EPO 3/2009"]
|
["",
"OJ EPO 3/2009"] |
[0] Supplement to OJ EPO 3/2009 |
|
"Supplement to Official Journal 5/1986"
| ||
| Expected | Received | Diff |
|
["Supplement to Official Journal 5/1986"]
|
["",
"Official Journal 5/1986"] |
[0] Supplement to Official Journal 5/1986 |
|
"Supplement to OJ 3/2009"
| ||
| Expected | Received | Diff |
|
["Supplement to OJ 3/2009"]
|
["",
"OJ 3/2009"] |
[0] Supplement to OJ 3/2009 |
|
"Supplement to OJ EPO 1/2013, 1"
| ||
| Expected | Received | Diff |
|
["Supplement to OJ EPO 1/2013, 1"]
|
["",
"OJ EPO 1/2013"] |
[0] Supplement to OJ EPO 1/2013, 1 |
|
"Supplement to OJ 1/2010, 50"
| ||
| Expected | Received | Diff |
|
["Supplement to OJ 1/2010, 50"]
|
["",
"OJ 1/2010"] |
[0] Supplement to OJ 1/2010, 50 |
|
"Supplement to OJ EPO No. 9/1993"
| ||
| Expected | Received | Diff |
|
["Supplement to OJ EPO No. 9/1993"]
|
["",
"OJ EPO No. 9/1993"] |
[0] Supplement to OJ EPO No. 9/1993 |
|
"Supplement to Official Journal No. 4/2001"
| ||
| Expected | Received | Diff |
|
["Supplement to Official Journal No. 4/2001"]
|
["",
"Official Journal No. 4/2001"] |
[0] Supplement to Official Journal No. 4/2001 |
|
"Supplement to OJ No. 1/2013"
| ||
| Expected | Received | Diff |
|
["Supplement to OJ No. 1/2013"]
|
["",
"OJ No. 1/2013"] |
[0] Supplement to OJ No. 1/2013 |
|
"supplementary publication 4, OJ EPO 2014"
| ||
| Expected | Received | Diff |
|
["supplementary publication 4, OJ EPO 2014"]
|
["",
"OJ EPO 2014"] |
[0] supplementary publication 4, OJ EPO 2014 |
|
"Supplementary publication 1, OJ 2016"
| ||
| Expected | Received | Diff |
|
["Supplementary publication 1, OJ 2016"]
|
["",
"OJ 2016"] |
[0] Supplementary publication 1, OJ 2016 |
|
"supplementary publication 1, OJ EPO 2014, 1"
| ||
| Expected | Received | Diff |
|
["supplementary publication 1, OJ EPO 2014, 1"]
|
["",
"OJ EPO 2014"] |
[0] supplementary publication 1, OJ EPO 2014, 1 |
|
"Supplementary publication 2, OJ 2014, 2"
| ||
| Expected | Received | Diff |
|
["Supplementary publication 2, OJ 2014, 2"]
|
["",
"OJ 2014"] |
[0] Supplementary publication 2, OJ 2014, 2 |
|
"Special edition 3, OJ EPO 2007"
| ||
| Expected | Received | Diff |
|
["Special edition 3, OJ EPO 2007"]
|
["",
"OJ EPO 2007"] |
[0] Special edition 3, OJ EPO 2007 |
|
"Special edition No. 4, "
| ||
| Expected | Received | Diff |
|
["Special edition No. 4, "]
|
[""]
|
[0] Special edition No. 4, |
|
"Special edition No. 3, OJ EPO 2007"
| ||
| Expected | Received | Diff |
|
["Special edition No. 3, OJ EPO 2007"]
|
["",
"OJ EPO 2007"] |
[0] Special edition No. 3, OJ EPO 2007 |
|
"Special edition No. 3, OJ 2007"
| ||
| Expected | Received | Diff |
|
["Special edition No. 3, OJ 2007"]
|
["",
"OJ 2007"] |
[0] Special edition No. 3, OJ 2007 |
|
"Special edition N. 3, OJ EPO 2007"
| ||
| Expected | Received | Diff |
|
["Special edition N. 3, OJ EPO 2007"]
|
["",
"OJ EPO 2007"] |
[0] Special edition N. 3, OJ EPO 2007 |
|
"Special edition No 3, OJ 2007"
| ||
| Expected | Received | Diff |
|
["Special edition No 3, OJ 2007"]
|
["",
"OJ 2007"] |
[0] Special edition No 3, OJ 2007 |
|
"Special edition No. 1, OJ EPO 2007, 197"
| ||
| Expected | Received | Diff |
|
["Special edition No. 1, OJ EPO 2007, 197"]
|
["",
"OJ EPO 2007"] |
[0] Special edition No. 1, OJ EPO 2007, 197 |
|
"Special edition No. 3, OJ 2007, 106"
| ||
| Expected | Received | Diff |
|
["Special edition No. 3, OJ 2007, 106"]
|
["",
"OJ 2007"] |
[0] Special edition No. 3, OJ 2007, 106 |
|
"Special edition No. 3 of OJ EPO 2007"
| ||
| Expected | Received | Diff |
|
["Special edition No. 3 of OJ EPO 2007"]
|
["",
"OJ EPO 2007"] |
[0] Special edition No. 3 of OJ EPO 2007 |
|
"Special edition no. 1 of the OJ EPO 2007"
| ||
| Expected | Received | Diff |
|
["Special edition no. 1 of the OJ EPO 2007"]
|
["",
"OJ EPO 2007"] |
[0] Special edition no. 1 of the OJ EPO 2007 |
|
"Special edition No. 1 of the Official Journal 2001"
| ||
| Expected | Received | Diff |
|
["Special edition No. 1 of the Official Journal 2001"]
|
["",
"Official Journal 2001"] |
[0] Special edition No. 1 of the Official Journal 2001 |
|
"Special edition no. 1 of the OJ 2003"
| ||
| Expected | Received | Diff |
|
["Special edition no. 1 of the OJ 2003"]
|
["",
"OJ 2003"] |
[0] Special edition no. 1 of the OJ 2003 |
|
"Special edition no 1 of the OJ EPO 2007"
| ||
| Expected | Received | Diff |
|
["Special edition no 1 of the OJ EPO 2007"]
|
["",
"OJ EPO 2007"] |
[0] Special edition no 1 of the OJ EPO 2007 |
|
"Special edition No. 1 of OJ EPO 2007, 197"
| ||
| Expected | Received | Diff |
|
["Special edition No. 1 of OJ EPO 2007, 197"]
|
["",
"OJ EPO 2007"] |
[0] Special edition No. 1 of OJ EPO 2007, 197 |
|
"Special edition No. 3 OJ EPO 2007"
| ||
| Expected | Received | Diff |
|
["Special edition No. 3 OJ EPO 2007"]
|
["",
"OJ EPO 2007"] |
[0] Special edition No. 3 OJ EPO 2007 |
|
"Special edition No. 3 OJ 2007"
| ||
| Expected | Received | Diff |
|
["Special edition No. 3 OJ 2007"]
|
["",
"OJ 2007"] |
[0] Special edition No. 3 OJ 2007 |
|
"Special edition No. 1 OJ EPO 2007, 196"
| ||
| Expected | Received | Diff |
|
["Special edition No. 1 OJ EPO 2007, 196"]
|
["",
"OJ EPO 2007"] |
[0] Special edition No. 1 OJ EPO 2007, 196 |
|
"Special edition No. 3/2007 of the Official Journal"
| ||
| Expected | Received | Diff |
|
["Special edition No. 3/2007 of the Official Journal"]
|
["",
""] |
[0] Special edition No. 3/2007 of the Official Journal |
|
"Special edition No. 3 to OJ EPO 2007"
| ||
| Expected | Received | Diff |
|
["Special edition No. 3 to OJ EPO 2007"]
|
["",
"OJ EPO 2007"] |
[0] Special edition No. 3 to OJ EPO 2007 |


| None. |
|
AND is a logical operator for doing conditional checks of multiple values and/or expressions. Use this to ensure that two or more conditions are true, usually in an IF ... THEN conditional. See example and see OR, NOT, and XOR.
See also: Or, Not, Xor. |
|
; AND example
name$=Input$("Enter your name:") pw$=Input$("Password:") if name$="Shane" and pw$="bluedog" then print "Access granted! Welcome!" else print "Your name or password was not recognized" end if |


paleotree: Paleontological and Phylogenetic Analyses of Evolution
Provides tools for transforming, a posteriori time-scaling, and
modifying phylogenies containing extinct (i.e. fossil) lineages. In particular,
most users are interested in the functions timePaleoPhy(), bin_timePaleoPhy(),
cal3TimePaleoPhy() and bin_cal3TimePaleoPhy(), which date cladograms of
fossil taxa using stratigraphic data. This package also contains a large number
of likelihood functions for estimating sampling and diversification rates from
different types of data available from the fossil record (e.g. range data,
occurrence data, etc). paleotree users can also simulate diversification and
sampling in the fossil record using the function simFossilRecord(), which is a
detailed simulator for branching birth-death-sampling processes composed of
discrete taxonomic units arranged in ancestor-descendant relationships. Users
can use simFossilRecord() to simulate diversification in incompletely sampled
fossil records, under various models of morphological differentiation (i.e.
the various patterns by which morphotaxa originate from one another), and
with time-dependent, longevity-dependent and/or diversity-dependent rates of
diversification, extinction and sampling. Additional functions allow users to
translate simulated ancestor-descendant data from simFossilRecord() into standard
time-scaled phylogenies or unscaled cladograms that reflect the relationships
among taxon units.
Downloads:
Reverse dependencies:
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=paleotree
to link to this page.


Embedding Layers
SparseEmbedding
SparseEmbedding is the sparse version of layer Embedding.
The input of SparseEmbedding should be a 2D SparseTensor or two 2D sparseTensors. If the input is a SparseTensor, the values are positive integer ids, values in each row of this SparseTensor will be turned into a dense vector. If the input is two SparseTensors, the first tensor should be the integer ids, just like the SparseTensor input. And the second tensor is the corresponding weights of the integer ids.
This layer can only be used as the first layer in a model, you need to provide the argument inputShape (a Single Shape, does not include the batch dimension).
Scala:
SparseEmbedding(inputDim, outputDim, combiner = "sum", max_norm = -1.0, init = "uniform", wRegularizer = null, inputShape = null)
Python:
SparseEmbedding(input_dim, output_dim, combiner="sum", max_norm=-1.0, init="uniform", W_regularizer=None, input_shape=None, name=None)
Parameters:
inputDim
: Int > 0. Size of the vocabulary.outputDim
: Int >= 0. Dimension of the dense embedding.init
: String representation of the initialization method for the weights of the layer. Default is "uniform".combiner
: A string specifying the reduce type. Currently "mean", "sum", "sqrtn" is supported.maxNorm
: If provided, each embedding is normalized to have l2 norm equal to maxNorm before combining.wRegularizer
: An instance of [Regularizer], (eg. L1 or L2 regularization), applied to the input weights matrices. Default is null.inputShape
: Only need to specify this argument when you use this layer as the first layer of a model. For Scala API, it should be aShape
object. For Python API, it should be a shape tuple. Batch dimension should be excluded.name
: String to set the name of the layer. If not specified, its name will by default to be a generated string.
Scala example:
import com.intel.analytics.zoo.pipeline.api.keras.layers.SparseEmbedding
import com.intel.analytics.bigdl.utils.Shape
import com.intel.analytics.bigdl.tensor.Tensor
val indices1 = Array(0, 0, 1, 2)
val indices2 = Array(0, 1, 0, 3)
val values = Array(2f, 4, 1, 2)
val input = Tensor.sparse(Array(indices1, indices2), values, Array(3, 4))
val layer = SparseEmbedding[Float](inputDim = 10, outputDim = 4,
combiner = "sum", inputShape = Shape(10))
layer.build(Shape(-1, 10))
val output = layer.forward(input)
Input is:
input:
(0, 0) : 2.0
(0, 1) : 4.0
(1, 0) : 1.0
(2, 3) : 2.0
[com.intel.analytics.bigdl.tensor.SparseTensor of size 3x4]
Output is:
-0.03674142 -0.01844017 -0.015794257 -0.045957662
-0.02645839 -0.024193227 -0.046255145 -0.047514524
-0.042759597 0.002117775 -0.041510757 1.9092667E-4
[com.intel.analytics.bigdl.tensor.DenseTensor of size 3x4]
Python example:
import numpy as np
from zoo.pipeline.api.keras.layers import SparseEmbedding
from zoo.pipeline.api.keras.models import Sequential
from bigdl.util.common import JTensor
model = Sequential()
model.add(SparseEmbedding(input_dim=10, output_dim=4, input_shape=(4, )))
input = JTensor.sparse(
a_ndarray=np.array([1, 3, 2, 4]),
i_ndarray = np.array([[0, 0, 1, 2],
[0, 3, 2, 1]]),
shape = np.array([3, 4])
)
output = model.forward(input)
Input is:
JTensor: storage: [1. 3. 2. 4.], shape: [3 4] ,indices [[0 0 1 2]
[0 3 2 1]], float
Output is
[[ 0.00771878 -0.05676365 0.03861053 0.04300173]
[-0.04647886 -0.03346863 0.04642192 -0.0145219 ]
[ 0.03964841 0.0243053 0.04841208 0.04862341]]
WordEmbedding
Embedding layer that directly loads pre-trained word vectors as weights.
Turn non-negative integers (indices) into dense vectors of fixed size.
Currently only GloVe embedding is supported.
The input of this layer should be 2D.
This layer can only be used as the first layer in a model, you need to provide the argument inputLength (a Single Shape, does not include the batch dimension).
Scala:
WordEmbedding(embeddingFile, wordIndex = null, trainable = false, inputLength = -1)
Python:
WordEmbedding(embedding_file, word_index=None, trainable=False, input_length=None, name=None)
Parameters:
embeddingFile
: The path to the embedding file. Currently the following GloVe files are supported: "glove.6B.50d.txt", "glove.6B.100d.txt", "glove.6B.200d.txt" "glove.6B.300d.txt", "glove.42B.300d.txt", "glove.840B.300d.txt". You can download them from: https://nlp.stanford.edu/projects/glove/.wordIndex
: Map of word (String) and its corresponding index (integer). The index is supposed to start from 1 with 0 reserved for unknown words. During the prediction, if you have words that are not in the wordIndex for the training, you can map them to index 0. Default is null. In this case, all the words in the embeddingFile will be taken into account and you can call WordEmbedding.getWordIndex(embeddingFile) to retrieve the map.trainable
: To configure whether the weights of this layer will be updated or not. Only false is supported for now.inputLength
: Only need to specify this argument when you use this layer as the first layer of a model. For Scala API, it should be a positive integer. For Python API, it should be a positive int. Batch dimension should be excluded.
Scala example:
import com.intel.analytics.zoo.pipeline.api.keras.layers.WordEmbedding
import com.intel.analytics.zoo.pipeline.api.keras.models.Sequential
import com.intel.analytics.bigdl.tensor.Tensor
import com.intel.analytics.bigdl.utils.T
val model = Sequential[Double]()
model.add(WordEmbedding[Double]("/path/to/glove.6B.50d.txt", wordIndex = WordEmbedding.getWordIndex("/path/to/glove.6B.50d.txt"), inputLength = 1))
val input = Tensor(data = Array(0.418), shape = Array(1, 1))
val output = model.forward(input)
Input is:
input: com.intel.analytics.bigdl.tensor.Tensor[Double] =
0.418
[com.intel.analytics.bigdl.tensor.DenseTensor$mcD$sp of size 1x1]
Output is:
output: com.intel.analytics.bigdl.nn.abstractnn.Activity =
(1,.,.) =
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.00.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.00.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
[com.intel.analytics.bigdl.tensor.DenseTensor of size 1x1x50]
Python example:
import numpy as np
from zoo.pipeline.api.keras.layers import WordEmbedding
from zoo.pipeline.api.keras.models import Sequential
model = Sequential()
model.add(WordEmbedding("/path/to/glove.6B.50d.txt", word_index=WordEmbedding.get_word_index("/path/to/glove.6B.50d.txt"), input_length=1))
input = np.random.random([1, 1])
output = model.forward(input)
Input is:
array([[0.18575166]])
Output is
array([[[0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
0., 0.]]], dtype=float32)


The Cascade module adds the ability to do cascading lookups to backends that are compatible to the Simple backend.
By cascading lookups we mean that for any key that can not be found the Cascade module strips one segment off the scope part of the key and then tries to look up the key in that scope.
E.g. when a lookup for the key :“foo.bar.baz“ does not yield a result then the segment :bar will be stripped off the scope part :“foo.bar“ and the new scope :foo will be used to look up the key :baz. If that does not succeed then the remaining scope segment :foo will be omitted, too, and again the key :baz will be looked up (now with no scope).
To enable a cascading lookup one passes the :cascade option:
I18n.t(:'foo.bar.baz', :cascade => true)
This will return the first translation found for :“foo.bar.baz“, :“foo.baz“ or :baz in this order.
The cascading lookup takes precedence over resolving any given defaults. I.e. defaults will kick in after the cascading lookups haven’t succeeded.
This behavior is useful for libraries like ActiveRecord validations where the library wants to give users a bunch of more or less fine-grained options of scopes for a particular key.
Thanks to Clemens Kofler for the initial idea and implementation! See github.com/clemens/i18n-cascading-backend
- MODULE I18n


#include <bmqa_messageiterator.h>
List of all members.
Detailed Description
An iterator providing read-only sequential access to messages contained into a MesssageEvent
.
See Component bmqa_messageiterator
Constructor & Destructor Documentation
| bmqa::MessageIterator::MessageIterator |
( |
|
) |
[explicit] |
| bmqa::MessageIterator::~MessageIterator |
( |
|
) |
|
Member Function Documentation
| bool bmqa::MessageIterator::nextMessage |
( |
|
) |
|
Advance the position of the iterator to the next message in the event. Return true if there is a next message and false otherwise. Note that advancing to the next message will invalidate any previously returned bmqa::Message retrieved from the message()
call.
| const Message& bmqa::MessageIterator::message |
( |
|
) |
const |
Return the message to which the iterator is pointing, if any; otherwise return an invalid message. Note that nextMessage
must be called before message
in order to advance the iterators position to the first message in the event.
The documentation for this class was generated from the following file:


Full Stack Developer looking for a new challenging and rewarding role. Recognised to be a multi-skilled, fast learner and a valuable team player. Wide experience in a number of Agile Projects.
Worked on the Research Information System for Swansea University to allow authors to submit their research to REF for assessing the quality of work. The research gets evaluated and brings in funding to the university.
Allows potential applicants to apply to the University, track the application and receive and accept offers.
The SD team is responsible for maintaining the University Intranet and also developing new applications in line with business needs.
GO Wales is an employability programme, helping student and graduates gain vital experience to help start their career. Different guise now, almost like a subset.
Led a small development team writing property management software. The project was written in C# ASP.net using EXT.net controls with SQL Server database. Agile methodologies are used to schedule and organise the work.
Worked full time on a renovation project. Undertook all aspects of the renovation including project managing, labouring, plastering, tiling and decorating.
.Net developer for the Web Team at Swansea University.  Responsibilities included:
Dezrez are an Application Service Provider, providing a complete software management solution to Estate Agents nationwide and abroad. Responsibilities included:
2:1
Athletic achievements
Hobbies.


Congress-NCP-Shiv Sena negotiations took too long: Abhishek Manu Singhvi
The month-long political impasse ended dramatically with Devendra Fadnavis returning as the chief minister again, backed by the Sharad Pawar-led NCP
by Press Trust of IndiaSenior Congress leader Abhishek Singhvi on Saturday expressed surprise at the political developments in Maharashtra and said the Congress-NCP-Shiv Sena negotiations took too long as the window was grabbed by "fast movers".
The month-long political impasse ended dramatically with Devendra Fadnavis returning as the chief minister again, backed by the Sharad Pawar-led NCP. NCP leader Ajit Pawar was sworn-in as the deputy chief minister at the Raj Bhavan.
"Surreal wht I read about Maharashtra. Thought it was fake news. Candidly and personally speaking, our tripartite negotiations should not have gone on for more than 3 days...took too long. Window given was grabbed by fast movers. Pawarji tussi great ho," Singhvi tweeted.


"The shorter our time, The greater our capacity for waiting".
Elizabeth Taylor
Elizabeth Taylor was a businesswoman and humanitarian. Her actress career started in 1940. She became extremely popular in Hollywood.


The configuration for this branch is the same as master,
except that "deploy on green" is
false. Click to
configure this branch separate from master.
[[ loadingMessage ]]
{% include "config/branch-settings.html" %}
{% include "config/plugins.html" %}
{% for runner in runners %}
{% autoescape false %}
{{ runner.html }}
{% endautoescape %}
{% endfor %}
{% for plugin in plugins %}
{#
This plugin is disabled.
#}
{% autoescape false %}
{{ plugin.html }}
{% endautoescape %}
{% endfor %}
{% include "config/project.html" %}
{% include "config/branches.html" %}
{% include "config/provider.html" %}


The Input/Output library includes components that are meant to correspond to typical components found in electronics for interfacing with a user.
Back to Library Reference


Test
WSO2 API Manager is a complete solution for designing and publishing APIs, creating and managing a developer community, and for securing and routing API traffic in a scalable manner. It leverages proven components from the WSO2 platform to secure, integrate and manage APIs. In addition, it integrates with the WSO2 analytics platform and provides out of the box reports and alerts, giving you instant insights into the APIs behavior.
Before you begin,
- Install Oracle Java SE Development Kit (JDK) version 1.7.* or 1.8.* or OpenJDK 7 or 8 and set the
JAVA_HOME
environment variable. Refer Installing the product documentation to setJAVA_HOME
environment variable for different operating systems - Download the latest version of WSO2 API Manager.
- Start WSO2 API Manager by going to the
<API-M_HOME>/bin
directory using the command-line and then executingwso2server.bat
(for Windows) orwso2server.sh
(for Linux.)
Let's go through the use cases of the API Manager: 4 3
Invoking your first API¶
Follow the steps in this section to quickly deploy a sample API, publish it, subscribe to it, and invoke it.
- Open the API Publisher (
https://<hostname>:9443/publisher
) and sign in withadmin/admin
credentials. -
Exit from API creation tutorial by clicking the close icon(X) on top right corner.
-
Click the Deploy Sample API button. It deploys a sample API called
PizzaShackAPI
into the API Manager.This Deploy Sample API option is available only when there are no APIs in API Publisher. If you have already created a API, this option will not be available.
-
Click
PizzaShackAPI
to open it. -
Go to the Lifecycle tab and note that the State is
PUBLISHED
. The API is already published to the API Store. -
Sign in to the API Store (
https://<hostname>:9443/store
) with the**admin/admin**
credentials and click on thePizzaShackAPI
API.API Store Walkthrough
You can click "API Store walkthrough" to view the interactive tutorial to invoke the API.
-
Select the default application and an available tier, and click Subscribe.
-
When the subscription is successful, click View Subscriptions on the information message that appears. Click the Production Keys tab and click Generate Keys to generate an to invoke the API.
You have now successfully subscribed to an API. Let's invoke the API using the integrated Swagger-based API Console.
-
Click the APIs menu again and click the
PizzaShackAPI
to open it. When the API opens, click its API Console tab.Expand the GET method (which retrieves the menu) and click Try it out.
Note the response for the API invocation. It returns the list of menu items.
You have deployed a sample API, published it to the API Store, subscribed to it, and invoked the API using our integrated API Console.
Understanding the API Manager concepts¶
Before we look into the API management activities in detail, let's take a look at the basic API management concepts. 5 5 flat
Components¶
The API Manager consists of the following components:
- API Publisher: Enables API providers to publish APIs, share documentation, provision API keys and gather feedback on features, quality and usage. You access the Web interface via
https://<Server Host>:9443/publisher
. - API Store (Developer Portal): Enables API consumers to self register, discover and subscribe to APIs, evaluate them and interact with API Publishers. You access the Web interface via
https://<Server Host>:9443/store
. - API Gateway: Secures, protects, manages, and scales API calls. It is a simple API proxy that intercepts API requests and applies policies such as throttling and security checks. It is also instrumental in gathering API usage statistics. The Web interface can be accessed via
https://<Server Host>:9443/carbon
. - Key Manager: Handles all security and key-related operations. The API Gateway connects with the Key Manager to check the validity of subscriptions, OAuth tokens, and API invocations. The Key Manager also provides a token API to generate OAuth tokens that can be accessed via the Gateway.
- Traffic Manager: Helps users to regulate API traffic, make APIs and applications available to consumers at different service levels and secures APIs against security attacks. The Traffic Manager features a dynamic throttling engine to process throttling policies in real-time.
- WSO2 API Manager Analytics: Provides a host of statistical graphs and an alerting mechanism on predetermined events.
Users and roles¶
The API manager offers three distinct community roles that are applicable to most enterprises:
-
Creator: A creator is a person in a technical role who understands the technical aspects of the API (interfaces, documentation, versions, how it is exposed by the Gateway, etc.) and uses the API publisher to provision APIs into the API Store. The creator uses the API Store to consult ratings and feedback provided by API users. Creators can add APIs to the store but cannot manage their life cycle (e.g., make them visible to the outside world.)
-
Publisher: A publisher manages a set of APIs across the enterprise or business unit and controls the API life cycle and monetization aspects.
- Consumer: A consumer uses the API Store to discover APIs, see the documentation and forums, and rate/comment on the APIs. Consumers subscribe to APIs to obtain API keys.
API lifecycle¶
An API is the published interface, while the service is the implementation running in the backend. APIs have their own lifecycles that are independent of the backend services they rely on. This lifecycle is exposed in the API Publisher and is managed by the publisher role.
The following stages are available in the default API life cycle:
- CREATED: API metadata is added to the API Store, but it is not visible to subscribers yet, nor deployed to the API Gateway.
-
PROTOTYPED: The API is deployed and published in the API Store as a prototype. A prototyped API is usually a mock implementation made public in order to get feedback about its usability. Users can try out a prototyped API without subscribing to it.
-
PUBLISHED: The API is visible in the API Store and available for subscription.
- DEPRECATED: The API is still deployed in the API Gateway (i.e., available at runtime to existing users) but not visible to subscribers. You can deprecate an API automatically when a new version of it is published.
- RETIRED: The API is unpublished from the API Gateway and deleted from the Store.
- BLOCKED: Access to the API is temporarily blocked. Runtime calls are blocked, and the API is not shown in the API Store anymore.
Applications¶
An application is primarily used to decouple the consumer from the APIs. It allows you to do the following:
- Generate and use a single key for multiple APIs.
- Subscribe multiple times to a single API with different SLA levels.
You create an application to subscribe to an API. The API Manager comes with a default application, and you can also create as many applications as you like.
Throttling tiers¶
Throttling tiers are associated with an API at subscription time and can be defined at an API-level, resource-level, subscription-level and application-level (per token). They define the throttling limits enforced by the API Gateway, e.g., 10 TPS (transactions per second). The final throttle limit granted to a given user on a given API is ultimately defined by the consolidated output of all throttling tiers together. The API Manager comes with three predefined tiers for each level and a special tier called Unlimited
, which you can disable by editing the <ThrottlingConfigurations>
element of the <API-M_HOME>/repository/conf/api-manager.xml
file.
In API Manager 2.0.0 onwards, Advanced Throttling is enabled by default with following configuration in
true ...... ]]>
If you are disabling Advanced Throttling in any case by setting the value of
true ]]>
Predefined Subscription Tiers.
Throttling Tier
Description
Unlimited
Allows unlimited requests
Gold
Allows 5000 requests per minute
Silver
Allows 2000 requests per minute
Bronze
Allows 1000 requests per minute
API keys¶
The API Manager supports two scenarios for authentication:
- An access token is used to identify and authenticate a whole application.
- An access token is used to identify the final user of an application (for example, the final user of a mobile application that is deployed on many devices).
Application access token: Application access tokens are generated by the API consumer and must be passed in the incoming API requests. The API Manager uses the OAuth2 standard to provide key management. An API key is a simple string that you pass with an HTTP header (e.g., "Authorization: Bearer NtBQkXoKElu0H1a1fQ0DWfo6IX4a,
") and it works equally well for SOAP and REST calls.
Application access tokens are generated at the application level and valid for all APIs that you associate to the application. These tokens have a fixed expiration time, which is set to 60 minutes by default. You can change this to a longer time, even for several weeks. Consumers can regenerate the access token directly from the API Store. To change the default expiration time which is 60 minutes by default, you open the <API-M_HOME>/repository/conf/identity/identity.xml
file and change the value of the element <AccessTokenDefaultValidityPeriod>
. If you set a negative value, the token never expires. Changes to this value are applied only to the new applications that you create.
Application user access token: You generate access tokens on demand using the Token API. In case a token expires, you use the Token API to refresh it.
The Token API takes the following parameters to generate the access token:
- Grant Type
- Username
- Password
- Scope
To generate a new access token, you issue a Token API call with the above parameters where grant_type=password
. The Token API then returns two tokens: an access token and a refresh token. The access token is saved in a session on the client side (the application itself does not need to manage users and passwords). On the API Gateway side, the access token is validated for each API call. When the token expires, you refresh the token by issuing a token API call with the above parameters where grant_type=refresh_token
and passing the refresh token as a parameter.
API resources¶
An API is made up of one or more resources. Each resource handles a particular type of request and is analogous to a method (function) in a larger API. API resources accept the following optional attributes:
- verbs: Specifies the HTTP verbs a particular resource accepts. Allowed values are GET, POST, PUT, DELETE, PATCH, HEAD, and OPTIONS. You can give multiple values at once.
- uri-template: A URI template as defined in http://tools.ietf.org/html/rfc6570. (e.g.,
/phoneverify/<phoneNumber>)
. - url-mapping: A URL mapping defined as per the servlet specification (extension mappings, path mappings, and exact mappings).
- Throttling tiers: Limits the number of hits to a resource during a given period of time.
- Auth-Type: Specifies the Resource level authentication along the HTTP verbs. Auth-type can be None, Application, Application User, or Application & Application User.
- None: Can access the particular API resource without any access tokens.
- Application: An application access token is required to access the API resource.
- Application User: A user access token is required to access the API resource.
- Application & Application User: An application access token together with a user access token is required to access the API resource.
Deep diving into the API Manager¶
Let's take a look at the typical API management activities in detail: 4 4
Creating users and roles¶
In , we introduced a set of users who are commonly found in many enterprises. Let's see how you can sign in to the Management Console as an admin and create these roles.
-
Sign in to the Management Console (
https://<hostname>:9443/carbon)
of the API Manager usingadmin/admin
credentials. -
Click Add in the Users and Roles section under the Main menu.
The creator, publisher, and subscriber roles are available by default as shown below.
-
Click Add New Role.
-
Give the role name as
creator
and click Next. -
A list of permissions opens. Select the following and click Finish.
- All Permissions > Admin Permissions > Configure > Governance and all underlying permissions
- All Permissions > Admin Permissions > Login
- All Permissions > Admin Permissions > Manage > API > Create
- All Permissions > Admin Permissions > Manage > Resources > Govern and all underlying permissions
-
Similarly, create the
publisher
role with the following permissions.- All Permissions > Admin Permissions > Login
- All Permissions > Admin Permissions > Manage > API > Publish
-
Note that the API Manager comes with the
subscriber
role available by default. It has the following permissions: -
All Permissions > Admin Permissions > Login
- All Permissions > Admin Permissions > Manage > API > Subscribe
- The roles you added (creator and publisher) are now displayed under Roles.
For more details Add roles and permission assign to roles, see Adding User Roles .
Let's create users for each of the roles. 9. Click Add in the Users and Roles section under the Main menu. -
Click **Add New User.
** -
Give the username/password and click Next. For example, let's create a new user by the name
apipublisher
. -
Select the role you want to assign to the user (e.g.,
publisher
) and click Finish. -
Similarly, create a new user by the name
apicreator
and assign the creator role.
Creating an API from scratch¶
Let's create an API from scratch.
- Sign in to the API Publisher (
https://<hostname>:9443/publisher)
asapicreator
. -
In the APIS menu, click Add New API.
-
Select the option to design a new API and click Start Creating.
-
Give the information in the table below.
Field
Sample value
Name
PhoneVerification
Context
/phoneverify
Version
1.0.0
Access Control
All
Visibility on Store
Public
API Definition
-
URL pattern: CheckPhoneNumber
Note that this URL Pattern is the name of one of the resources that we are going to invoke from the backend service.
-
Request types: GET, POST
Click Add and then click Next: Implement > to move on to the next page.
-
-
Select the Managed API option.
For instructions on how to Implement Prototyped API, see .
Give the following information and click Next:Manage > once you are done.
Field
Sample value
Endpoint type
HTTP/REST Endpoint
Production endpoint
Endpoint is http://ws.cdyne.com/phoneverify/phoneverify.asmx. To verify the URL, click the Test button next to it.
In this example, we use a phone validation service exposed by the Cdyne services provider. This service has SOAP and REST interfaces.
This sample service has two operations: CheckPhoneNumber
and CheckPhoneNumbers
.
Sandbox endpoint
Endpoint is http://ws.cdyne.com/phoneverify/phoneverify.asmx. To verify the URL, click the Test button next to it.
Endpoint Type is selected to specify whether the endpoint is based on a URI template or based on a URI template or an address specified in the 'To' header.
Related Links
- For details about Message Mediation Policies, see Message Mediation Policies
- For details about CORS Configurations, see CORS Configuration
6. Provide the following information in the Manage tab. Leave default values for the rest of the parameters in the UI.
Field
Value
Description
Subscription Tiers
The API can be available for subscription at different levels of service. They allow you to limit the number of successful hits to an API during a given period of time.
Once you are done, click Save.
Adding API documentation¶
-
In the APIS menu, click the thumbnail of the API to open it.
-
Click on the API's Docs tab and click Add New Document.
-
The document options appear. Note that you can create documentation inline, via a URL, or as a file. For inline documentation, you can edit the content directly from the API publisher interface. You get several documents types:
- How To
- Samples and SDK
- Public forum / Support forum (external link only)
- API message formats
- Other
- Create a 'How To' named
PhoneVerification
, specifying in-line content as the source and optionally entering a summary. When you have finished, click Add Document.
-
Once the document is added, click Edit Content to open an embedded editor.
-
Enter your API's documentation and click Save and Close.
Adding interactive documentation¶
WSO2 API Manager has an integrated Swagger UI, which is part of the Swagger project.
Swagger is a 100% open source, standard, language-agnostic specification and a complete framework for describing, producing, consuming, and visualizing RESTful APIs, without the need of a proxy or third-party services. Swagger allows consumers to understand the capabilities of a remote service without accessing its source code and interact with the service with a minimal amount of implementation logic. Swagger helps describe services in the same way that interfaces describe lower-level programming code.
The Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS that dynamically generates documentation from a Swagger-compliant API. Swagger-compliant APIs give you interactive documentation and more discoverability. The Swagger UI has YAML code, and its UI facilitates easier code indentation, provides keyword highlighting, and shows syntax errors on the fly. You can add resource parameters, summaries and descriptions to your APIs using the Swagger UI and it has provides the facility to download your API definition as YAML or JSON file. Go to the Swagger 2.0 specification for more information.
- Open the API Publisher (
https://<hostname>:9443/publisher)
and sign in as**apicreator**
. -
Click the Edit icon for the
PhoneVerification
API. This opens the API in its edit mode. -
Click the Edit Source button under the API Definition section.
-
this step The API definition as a YAML code opens in a separate page. Expand its GET method, add the following parameters and click Apply Changes.
this step -
Back in the API Publisher, note that the changes you did appear in the API Console's UI. You can add more parameters and edit the summary/descriptions using the API Publisher UI as well. Once done, click Save.
Versioning the API¶
Let's create a new version of this API.
- Sign in to the API Publisher as
apicreator
if you are not logged in already. -
Click the
PhoneVerification
API to open it and then click Create New Version. -
Give a new version number (e.g., 2.0.0) and click Done.
-
Note that the new version of the API is created in the API Publisher.
Associating Scopes to API Resources¶
Different API resources can be associated with different user roles. For an example, consider the following resources and the operations:
In order to map a scope to an API resource, the following should be done:
-
API creator should first create scopes, by clicking on Add Scopes in the Manage tab.
-
Fill the scope related information in the dialog that pops up. Note that Scope Key and Roles are the most important attributes. Click on Add Scope button on the right hand side bottom.
The roles added here are validated against the user store to check if they exist. However, this can be overridden so that the roles are not checked in the user store. For thus purpose, set the Java system property disableRoleValidationAtScopeCreation to true at the server startup:
- Open
/bin/wso2server.(sh|bat) file. - Add -DdisableRoleValidationAtScopeCreation=true at the end of the file.
- Restart the server.
- Open
-
Now the scope with key 'item_view' is added with roles manager and agent. To associate this scope with the get operation on the /time resource, click on the +Scope sign on the right hand side of the resource.
-
From the drop down menu that appears, select the scope name and click on the tick sign to the right. Now the scope will be associated with the GET operation on the resource /item.
See for an in depth example.
Publishing the API¶
-
Sign in to the API Publisher as the
apipublisher
user that you created earlier in this guide, and click thePhoneVerification
API's version 2.0.0. -
The API opens. Go to its Lifecycle tab and click Publish.
The check boxes mean the following: * Require re-subscription when publish the API: Invalidates current user subscriptions, forcing users to subscribe again. * Deprecate old versions after publish the API: If selected, any prior versions of the API that are published will be set to the DEPRECATED state automatically. 3. Go to the API Store (
https://<hostname>:9443/store)
using your browser and note that thePhoneVerification 2.0.0
API is visible under the APIs menu.
Subscribing to the API¶
-
Go to the API Store (
https://<hostname>:9443/store)
and create an account using the Sign-up link.Users who sign-up through the API Store are assigned the
subscriber
role by default. Therefore, you do not need to specify the role through the management console to be able to subscibe to an API. -
Fill the details in the Sign Up form appears and click Sign Up.
Users who registered with the API Store Signup can be view by login to the Management Console (https://localhost:9443/carbon) and accessing Users and Roles > Users > List.
Details entered in the sign up will be updated in the default profile related to each user in the management console.
-
After signing up, sign in to the API Store and click the
PhoneVerification 2.0.0
API that you published earlier. -
Note that you can now see the subscription options. Select the default application and the
Bronze
tier. Click Subscribe. -
Once the subscription is successful, click View Subscriptions in the information message that appears to review your subscriptions.
-
Click the Production Keys tab of the application and then click Generate Keys to generate an access token that you use later to invoke the API. If you have already generated keys before, click Re-generate.
Tip : You can set a token validity period in the given text box. By default, it is set to one hour. If you set a minus value (e.g., -1), the token will never expire.
You are now successfully subscribed to an API. Let's invoke it.
Invoking the API¶
-
Click the APIs menu in the API Store and then click on the API that you want to invoke. When the API opens, go to its API Console tab.
-
Expand the GET method of the resource
CheckPhoneNumber
. Note the parameters that you added when now appear with their descriptions so that as a subscriber, you know how to invoke this API. -
Give sample values for the
PhoneNumber
andLicenseKey
and click Try it out to invoke the API. -
Note the response for the API invocation. Since we used a valid phone number in this example, the response is valid.
You have invoked an API using the API Console.
Troubleshooting
When using the API Console, the web browser sends an HTTPS request to the Gateway. If the certificate in the Gateway is not CA signed, the browser will not accept it. Therefore, you may get the following error.
As a workaround, you can access the Gateway URL on a new browser tab and trust the certificate from the browser.
Monitoring APIs and viewing statistics¶
Both the API publisher and store provide several statistical dashboards.
API Publisher statistics
API Store statistics
The steps below explain how to configure WSO2 API Manager Analytics with the API Manager. The statistics in these dashboards are based on data from WSO2 APIM Analytics which is similar to WSO2 Stream Processor (WSO2 SP).
Let's do the configurations first.
Before you begin,
- Download the WSO2 APIM Analytics distribution by clicking ANALYTICS in the WSO2 API Management page. It is best to download and extract it to the same directory to which you downloaded WSO2 API Manager.
- If you have the API Manager server running, stop the server.
-
If you are running on Windows, download the
snappy-java_<IP_ADDRESS>.jar
from here and copy the JAR file to the<ANALYTICS_HOME>\repository\components\lib
directory. -
To enable Analytics, open the
<API-M_HOME>/repository/conf/api-manager.xml
file and set theEnabled
property under <Analytics>
totrue
as shown below. Save this change.xml true]]> 2. Start the WSO2 APIM Analytics server, and then start the WSO2 API Manager server.
To avoid connection errors during API Manager startup, start WSO2 APIM Analytics before WSO2 API Manager.
- On Windows:
wso2server.bat --run
-
On Linux/Mac OS:
sh wso2server.sh
By default, WSO2 API Manager has a port offset of 0 (no port offset) and WSO2 API Manager Analytics has an offset of 1.
- On Windows:
-
Invoke several APIs to generate some statistical data and wait a few seconds.
- Connect to the API Publisher as a creator and click one of the statistical dashboards available in the Statistics menu. For example,
The Statistics menu is available for API creators and shows statistics of all APIs. Additionally, API creators can also see the following:
- Statistics of the APIs created by them by selecting the My APIs option in the drop down menu above each table or graph.
- The subscriptions of each API by clicking Manage Subscriptions.
- The alerts that can be configured for their APIs by clicking Manage Alert Types.
This concludes the API Manager quick start. You have set up the API Manager and gone through the basic use cases of the product. For more advanced use cases, see the , and of the API Manager documentation.


TS Eamcet Results 2019
B.Tech. IV Year I Semester R15_R13_R09 Regulations Recounting / Revaluation Results - November, 2018
OU UG CBSE Degree Results
Telangana SSC Holltickets 2019
Andrapradesh SSC Holltickets 2019
| Name | Check Here |
|---|---|
| Note Books | Download Here |
| SSC - INTER Question Papers | Download Here |
| Java Projects | Download Here |
| C , C++ , HTML , PYTHON Projects | Download Here |
| B.Tech & B.Pharmacy Previous Papers | Download Here |
| CSE & ECE & CIVIL Previous Papers | Download Here |


The Lempel-Ziv or Ziv-lempel, or, even LZ compression
The Lempel-Ziv or Ziv-lempel, or, even LZ compression¶
Between the years 1976 to 1978, Abraham Lempel and Jacob Ziv created a procedure, and several variants of it, aiming the compression of data. Its latter proposed variants turnout to be a very effective procedure to compress many data types, such as texts and images. The fact that no prior information about the data statistics were required in advance (constrain imposed by statistical compression methods) and the simplistic, but powerfull, algorithm were two facts contributing to the popularity of the LZ compression methods.
Since it's creation, the LZ algorithms have been widely used but in many occasions there's a confusion between which algorithm correspond each variant. Furthermore, the increasing in the amount of data produced have pushed the initial LZ algorithms to be augumented with new data structures in order to become feasible for the analysis of big datasets. Specially for big texts, like human genome that has more than 3 billions ($10^9$) base pairs.
In this post, I plan to cover the whys and whichs of the lempel-ziv algorithms called LZ76, LZ77 and LZ78.
LZ78¶
The lempel-zip compression algorithm proposed in 1978, also called LZ78, processes a text $T[1,n]$ from left to right and cuts it into $z$ substrings, called phrases. Navarro, in Compact Data Structures book, defined the algorithm in plain english in a simple way:
"As the text is parsed, each new phrase is extended as much as possible to the right as long as it matches some previous phrase, and then next the new character (the mismatched one) is also included."
This whole process is called the parsing of $T$. A trie is a data structure that can be used to store the parsing results. Basically, a trie is a tree that holds every suffix of a word/text. To spell the suffix from a trie, we traverse it from the root to a leaf outputting the label in the edges found in the path. A trie is usefull in string matching because when comparing a word of size $m$ with a text of size $n$ in the "brute force" way we must perform $m*n$ comparisons, while with the aid of the trie the number of comparisons is the size of the word to be mathed ($m$). If you want to learn more about tries in the context of string matching watch the excelent lecture from Ben Langmead. In fact, I'll use his code as base to the LZ78 python implementation parser.
Be aware that the trie used in LZ78 implementation will not hold every suffix but every node in it represents a phrase (except the root node). Thus, at the end it has $z$ nodes plus the root and each node has a number corresponding to its phrase. I'll put the python implementation of the LZ78 trie bellow based on Ben Langsmead lecture about suffix trie with minor modifications. (BTW his lectures are excelent and I truly recommend them). Then, after the codes we'll give a step by step example. But first, lets load some ipython magics to draw the tries on the notebook using dot format.
! wget -q https://raw.github.com/cjdrake/ipython-magic/master/gvmagic.py
%load_ext gvmagic
class LZ78Trie(object):
class Node(object):
def __init__(self, lab, idx):
self.lab = lab # label on path leading to this node
self.out = {} # outgoing edges; maps characters to nodes
self.idx = idx
def __init__(self, t):
t += '$'
self.root = self.Node(None, 0)
i = 0
j = 1
while i < len(t):
cur = self.root
for c in t[i:]:
if c not in cur.out:
cur.out[c] = self.Node(c,j)
i += 1
j += 1
break
cur = cur.out[c]
i += 1
def followPath(object, s):
cur = self.root
for c in s:
if c not in cur.out:
return None
cur = cur.out[c]
return cur
def has_substring(self, s):
""" Return true if s appears as a substring of t """
return self.follow_path(s) is not None
def to_dot(self, drawend=True):
""" Return dot representation of trie to make a picture """
lines = []
def _to_dot_helper(node, parid, drawend):
childid = parid
for c, child in node.out.items():
# print(c, child)
if child.lab != '$' or drawend:
lines.append(' %d -> %d [ label="%s" ];' %
(parid, childid+1, child.lab))
if child.idx is not None:
lines.append(' {} [label="{}"];'.format(childid+1, child.idx))
childid = _to_dot_helper(child, childid+1, drawend)
return childid
lines.append('digraph "Suffix trie" {')
lines.append(' node [shape=circle label=""];')
lines.append(' 0 [label="{}"];'.format(self.root.idx))
_to_dot_helper(self.root, 0, drawend)
lines.append('}')
return '\n'.join(lines) + '\n'
We show the LZ78 trie example for the text $T=xabxaxa\$$. The parsing begins scanning $T$ for every position $i$, proceeding as follows:
- for $i=0$, there're no previous found phrase, so this is the first time we see the character $T[0]=x$. We append $(0,x)$ to the codded output $out$. Now $out=(0,x)$ and the trie has been augmented with the phrase $x$ with number 1.
%dotstr LZ78Trie("x").to_dot(False)
- next, for $i=1$, there's no longest prefix of $T[1,7]=abxaxa$ already seen. Therefore, $T[1]=a$ yields a new phrase numbered 2 and $out=(0,x)(0,a)$.
%dotstr LZ78Trie("xa").to_dot(False)
- next, for $i=2$, we have the same situation before but the new phrase is $b$ with number 3.
%dotstr LZ78Trie("xab").to_dot(False)
- next, for $i=3$, we have $T=𝑥𝑎𝑥𝑎\$$ and if we walk from root to node number 1 we can see the already phrase $x$. Then, we can encode the prefix $xa$ as $(1,a)$ with the number corresponding to the previous phrase and the next character in the text. We create the node numbered 4 in trie to store the new phrase $xa$.
%dotstr LZ78Trie("xabxa").to_dot(False)
- next, we have $i=5$, because we skip 2 positions due the previous phrase $xa$. And, for $i=5$, we notice that $T[5,7]=xa\$$ meaning that the substring $xa$ was already seen in the set of phrases. Therefore, we encode it has $(4,\$)$ and the algorithm ends.
%dotstr LZ78Trie("xabxaxa$").to_dot(True)
The encoded string is $out=(0,x)(0,a)(0,b)(1,a)(4,\$)$ which is bigger than the initial text $T$. But this behaviour is the oposite when the length of the text gets bigger and bigger. Note from our example that the LZ78 algorithm is not suitable to pinpoint repetions. Despite the substring $T[3,5]=xa$ have been seen in $T[0,2]$, the algorithm didn't spot it. The previous variant of lempel-ziv, called LZ76 and almost ever confused with $LZ77$ is best appopriate to this kind of situations, i.e. to compress repetitive texts.
It cannot produce less than $\sqrt{n}$ phrases, even in the text $T=a^n\$$. Why ??
LZ76¶
The Lempel-Ziv 1976 compression is similar to LZ78, in which the text is parsed into a sequence of phrases. While in LZ78 the next phrase to be find after parsing $T[1,i]$ must be a previous found phrase plus the symbol following it, in LZ76 the phrase is the longest prefix of $T[i,n]$ that has already appeared in the text plus the symbol following it.
Often LZ76 is mistaken with LZ77, a variant that restricts the length $l$ of the sliding window $T[i-l,i]$ from where the phrases can be detected. This constraint simplifies the finding and enconding the phrases and has the drawback to restrict the search to "nearby" regions in the text.
Let's borrow the mathematical notation used by Gusfield in the classic book Algorithms on Strings, Trees and Sequences to define the output of LZ76 algorithm. According to it, let $Prior_{i}$ be the longest prefix the longest prefix of $T[i,n]$ that also occurs as a substring before the position $i$ in text $T$.
Then, for any position $i$ in $T$, let $l_i$ be length of $Prior_{i}$ and $s_i$ the starting position of the left-most copy of $Prior_{i}$ in $T[0, i-1]$ (using python counting style which is 0-based, i.e. the first character in a string is in 0-th position).
For example, for $T=xabxaxa\$$ the $ Prior_{3} $ is _xa_ leading to $l{3}=2$ and $s{3}=0$. The LZ76 algorithm encode it by the pair $(s_i, l_i)$, pointing to the previous ocurrence of a substring.
The LZ76 phrases can be found in linear time with the help of a suffix tree (Rodeh et al, 1981), but this structure requires a lot of extra space, which hampers the parsing of large texts.
The suffix tree data structure¶
The suffix tree (ST) it's nothing more than a compact trie. If we concatenate all the single child nodes into the same node we build a suffix tree from the trie. This is the most naive method to build a suffix tree, requires $O(m^2)$ time and $O(m^2)$ space. A more clever way to build a suffix tree using $O(m)$ space and $O(m^2)$ time was described by Gusfield in ASTS book, section 5.4. There're the Ukkonen's method to build an ST in linear time and space, but it's a detailed algorithm that I'll not cover here. If you wish more infos about Ukkonens method check this excelent blogpost.
We list the Naive methods to build a suffix tree:
Build the ST from the suffix trie data structure. This method takes $O(m^2)$ time and $O(m^2)$ space.
Recursively augment the tree starting from a two-edge tree representing the longest suffix. Then, insert the 2nd longest suffix. Then, the 3rd longest suffix. And so on. It takes $O(m)$ space but still $O(m^2)$ time (Gusfield, section 5.4).
The suffix tree implemented on this post was borrowed from Ben Langmead teaching materials and follows the Gusfield algorithm presented in section 5.4. I slightly modified the implementation to accomodate the $m$ suffix numbers in the nodes, where $m$ is the number of suffixes from text $T$. This number will be important in the implementation of the LZ76 parser using suffix trees.
class SuffixTree(object):
class Node(object):
def __init__(self, lab, idx):
self.lab = lab # label on path leading to this node
self.out = {} # outgoing edges; maps characters to nodes
self.idx = idx
def __init__(self, s):
s += '$'
self.root = self.Node(None, None)
self.root.out[s[0]] = self.Node(s, 0) # trie for just longest suffix
# add the rest of the suffixes, from longest to shortest
for i in range(1, len(s)):
# start at root; we'll walking down as far as we can go
cur = self.root
j = i
while j < len(s):
if s[j] in cur.out:
child = cur.out[s[j]]
lab = child.lab
# walk along edge until we exhaust edge label or until we mismatch
k = j+1
while k-j < len(lab) and s[k] == lab[k-j]:
k += 1
if k-j == len(lab):
cur = child # we exhausted the edge
j = k
else:
# we fell off in middle of edge
cExist, cNew = lab[k-j], s[k]
# create "mid": new node bisecting edge
mid = self.Node(lab[:k-j], None)
mid.out[cNew] = self.Node(s[k:], i)
# original child becomes mid's child
mid.out[cExist] = child
# original child's label is curtailed
child.lab = lab[k-j:]
# mid becomes new child of original parent
cur.out[s[j]] = mid
else:
# Fell off tree at a node: make new edge hanging off it
cur.out[s[j]] = self.Node(s[j:],i)
def followPath(self, s):
""" Follow path given by s. If we fall off tree, return None. If we
finish mid-edge, return (node, offset) where 'node' is child and
'offset' is label offset. If we finish on a node, return (node,
None). """
cur = self.root
i = 0
while i < len(s):
c = s[i]
if c not in cur.out:
return (None, None) # fell off at a node
child = cur.out[s[i]]
lab = child.lab
j = i+1
while j-i < len(lab) and j < len(s) and s[j] == lab[j-i]:
j += 1
if j-i == len(lab):
cur = child # exhausted edge
i = j
elif j == len(s):
return (child, j-i) # exhausted query string in middle of edge
else:
return (None, None) # fell off in the middle of the edge
return (cur, None) # exhausted query string at internal node
def hasSubstring(self, s):
""" Return true iff s appears as a substring """
node, off = self.followPath(s)
return node is not None
def hasSuffix(self, s):
""" Return true iff s is a suffix """
node, off = self.followPath(s)
if node is None:
return False # fell off the tree
if off is None:
# finished on top of a node
return '$' in node.out
else:
# finished at offset 'off' within an edge leading to 'node'
return node.lab[off] == '$'
def _iterate_over_nodes(self):
def _to_iter(node):
for c, child in node.out.items():
print("Node lab={}, id={}".format(child.lab, child.idx))
_to_iter(child)
_to_iter(self.root)
def numerate_internal_nodes(self):
def preorder_traversal(root):
yield root
for c, child in root.out.items():
yield from preorder_traversal(child)
return preorder_traversal(self.root)
def to_dot(self):
""" Return dot representation of trie to make a picture """
lines = []
def _to_dot_helper(node, parid):
childid = parid
for c, child in node.out.items():
# print(c, child)
lines.append(' %d -> %d [ label="%s" ];' %
(parid, childid+1, child.lab))
if child.idx is not None:
lines.append(' {} [label="{}"];'.format(childid+1, child.idx))
childid = _to_dot_helper(child, childid+1)
return childid
lines.append('digraph "Suffix trie" {')
lines.append(' node [shape=circle label=""];')
_to_dot_helper(self.root, 0)
lines.append('}')
return '\n'.join(lines) + '\n'
The example shown by Langsmead in his lecture about suffix trees is reproduced below, i.e. $T=abaaba$. The leaf nodes were labeled with the corresponding suffix number. Internal nodes dont have labels.
Let`s begin listing all the suffix numbers of $T$ and it's corresponding suffixes.
T = 'xabxaxa'
t = T + '$'
for i in range(len(t)):
print(i, t[i:])
Then, we build and draw the suffix tree for $T$.
stree = SuffixTree(T)
%dotstr stree.to_dot()
Note that every path going from the root to a leaf node produce a suffix of $T$ with the suffix number in the leaf node.
Now that we have a suffix tree implementation we can go back and implement the naive LZ76 parsing algorithm.
Naive LZ76 parsing algorithm¶
The algorithm relies on the suffix tree (ST) for string $T$ to find longest prefix of $T[i,n]$ already seen in $T[1,i-1]$.
Build an ST for string $T$;
Number each internal node $v$ with $c_v$, the smallest number of all the suffixes in $v$´s subtree; this way, $c_v$ is the left most position in $T$ of any copy of the substring on the path from root to node $v$;
To obtain the encoding (position, length), i.e. the pair $(s_{i}, l_{i})$, for the substring $T[i, n]$, whith $0 \leq i \leq n$, do:
a. Follow the only path from the root that matches the prefix $T[i, n]$ keeping track of all $c_{v}$s found on the path;
b. The traversal stops at point $p$ which not necessarily is a node, when a character breaks the match;
c. let v be the deepest internal node with the smallest $c_{v}$ found on the path to point $p$ and let depth(v) be the length of the string from the root to v; if we do not cross internal nodes then we output the character $T[i]$; do j <- i + 1. Else, do position $s_{i} = v$ and $l_{i} = depth(v)$;
d. Output encoding $(s_{i}, l_{i})$ and do j <- i + $l_{i}$;
e. Do i <- j + 1; if i = n stop; else goto 3.
from collections import defaultdict
class SuffixTreeLZ76(SuffixTree):
def __init__(self, s):
SuffixTree.__init__(self, s)
def followPath(self, s):
""" Follow path given by s. If we fall off tree, return None. If we
finish mid-edge, return (node, offset) where 'node' is child and
'offset' is label offset. If we finish on a node, return (node,
None). """
cur = self.root
i = 0
parent = None # the root not doesnt have parent node
cvs = []
path_labs = defaultdict(list)
while i < len(s):
c = s[i]
if c not in cur.out:
return (None, None) # fell off at a node
child = cur.out[s[i]]
lab = child.lab
idx = child.idx
cvs.append(idx)
path_labs[idx].append(lab)
j = i+1
while j-i < len(lab) and j < len(s) and s[j] == lab[j-i]:
j += 1
if j-i == len(lab):
parent = cur
cur = child # exhausted edge
i = j
elif j == len(s):
return (cur, j-i, path_labs) # exhausted query string in middle of edge
else:
return (None, None, path_labs) # fell off in the middle of the edge
return (parent, None, path_labs) # exhausted query string at internal node
def LZ76encoder(self, t):
""" Perform the LZ76 parsing of T[1,n]. Outputs the phrases ($z$) of the
LZ76 parsing of T.
"""
i = 0
phrases = []
while i < len(t):
if i == 0:
phrases.append(t[0])
i+=1
else:
right_substring = t[i:2*i]
node_end, offset, lcvs = self.followPath(right_substring)
#print("i=",i, right_substring, node_end.idx, lcvs)
if len(lcvs) == 1 and list(lcvs.keys())[0] == i:
# print(t[i])
phrases.append(t[i])
i += 1
else:
repi = ''.join(lcvs[min(lcvs)])
li = len(repi)
if li >= i:
# print("Here")
# print("First",i, repi, li)
offset = (li-i) + 1
if offset == 1:
repi = repi[0]
else:
repi = repi[:-offset]
li = len(repi)
# print("Second",i, repi, li)
phrases.append((min(lcvs), li))
i += li
return phrases
def LZ76decoder(self, phrases):
""" Decode a LZ78 codded string. Input is a LZ78 codded string. """
T = ''
for z in phrases:
if type(z) == str:
T += z
elif type(z) == tuple:
si, li = z
T += T[si:si+li]
return T
def _iterate_over_nodes(self):
""" Auxiliary function to traverse a tree """
reverse_dict = {}
def _to_iter(node, reverse_dict):
for c, child in node.out.items():
reverse_dict[child] = node
print("Node lab={}, id={}".format(child.lab, child.idx))
_to_iter(child, reverse_dict)
_to_iter(self.root, reverse_dict)
return reverse_dict
def do_preorder(self):
""" Traverse the tree in preorder """
def preorder_traversal(root):
yield root
for c, child in root.out.items():
yield from preorder_traversal(child)
return preorder_traversal(self.root)
def do_posorder(self):
""" Traverse the tree in posorder """
def posorder_traversal(root):
for c, child in root.out.items():
yield from posorder_traversal(child)
yield root
return posorder_traversal(self.root)
def rec_dfs(self, root, S=None):
""" Function to traverse the tree in a depth-first search (DFS) manner """
if S is None: S = set() # Initialize the history
S.add(root) # We've visited s
# print(root.lab, root.idx)
for c, u in root.out.items(): # Explore neighbors
if u in S: continue # Already visited: Skip
self.rec_dfs(u, S) # New: Explore recursively
return S
def do_rec_dfs(self):
""" Apply recursive DFS """
return self.rec_dfs(self.root)
def enumerate_internal_nodes(self):
""" This function first applies posorder in ST yielding a sorted vector.
The sorted vector is a set of nodes where the childs come first than
their parents. For each internal node in sorted vector we perform a DFS with
the internal node beeing the root yielding the subtree. We get the minimum
number in the subtree of each internal node as the cv number.
Enumerate all internal nodes in ST """
stree_pos = list(self.do_posorder())
for i in range(len(stree_pos)):
if stree_pos[i].idx is None:
stree_pos[i].idx = min([x.idx for x in self.rec_dfs(stree_pos[i]) if x.idx != None])
def to_dot(self):
""" Return dot representation of trie to make a picture """
lines = []
def _to_dot_helper(node, parid):
childid = parid
for c, child in node.out.items():
# print(c, child)
lines.append(' %d -> %d [ label="%s" ];' %
(parid, childid+1, child.lab))
if child.idx is not None:
lines.append(' {} [label="{}"];'.format(childid+1, child.idx))
childid = _to_dot_helper(child, childid+1)
return childid
lines.append('digraph "Suffix trie" {')
lines.append(' node [shape=circle label=""];')
lines.append(' 0 [label="{}"];'.format(self.root.idx))
_to_dot_helper(self.root, 0)
lines.append('}')
return '\n'.join(lines) + '\n'
T
stree = SuffixTreeLZ76(T)
#stree = SuffixTreeLZ76('abbacbba')
#stree = SuffixTreeLZ76('abaaba')
#stree = SuffixTreeLZ76('mississippi')
stree.enumerate_internal_nodes()
%dotstr stree.to_dot()
The encoded LZ78 for text $T=xabxaxa\$$ is:
zs = stree.LZ76encoder(T+'$'); zs
And using the implementation to decode the parsed string we have.
stree.LZ76decoder(zs)
Implementation details and notes: I dont know if the complexity time is $O(m)$ because my implementation is matching every $T[i..m]$ for all i $\in$ {0..m}. So, maybe it's complexity is growing in order $m^2$ instead of $m$. Certainly the suffix tree construction takes $O(m^{2})$ time. But, when I find a previous match, i.e. a portion of the text that can be compressed, the algorithm jumps the lenght of the compressed part. This may be contributing to lower the running time.
The algorithm perform the enumeration of all internal nodes through the creation of a subtree for each internal node, and them keeps the minimum value found in a leaf belonging to the subtree. Since we have to enumerate the internal nodes from in a bottom-up fashion we first sort the nodes in pos-order. We iterate over the pos-order vector of nodes creating the subtree for each internal node found.
I've used a dictionary to keep track of numbers in the internal nodes encountered and their labels when the algorithm traverses a path from root to $p$. This code is implemented on function followPath()
. This may be a naive method because we always store a dictionary with all the paths and labels and this can be a burden to very deep suffix trees. Another cavet of the implementation was already mentioned and is related to the fact that every time we traverses all the remaining string. This could be avoided narrowing the traverse path to a number of characters equal to the index i of $T[i..m]$ because we can only have previous substrings of length $i$.
LZ76 parsing of a genome sequence¶
Let`s complicate the things in order to test if the LZ76 parsing can handle very long texts. I choose a viral genome, phage lambda, that infects E. coli has our "complicated" example. In fact, this is a very small genome that has only 48.502 base pairs. First we download the genome from NCBI nucleotide collection from this link. But, we'll take another path and download the genome directly from the command line using the python library ncbi-acc-download. We do it in the following lines.
! pip install -q ncbi-acc-download
Then, we download the phage lambda genome.
! ncbi-acc-download -m nucleotide -F fasta NC_001416.1
And check if our file is what we`re expecting, i.e. a collection of nucleotides.
! head NC_001416.1.fa
Next, we load our genome into a variable to be able to perform some analysis on top of it. The first analysis will be related to the execution time of the implemented algorithm in a range of text lenghts. Be aware that the following codes take some minutes to run !
phage_geno = ''
with open('NC_001416.1.fa', 'r') as phagefa:
for line in phagefa.readlines():
if line.startswith('>'):
continue
else:
phage_geno += line.strip('\n')
def do_LZ_parsing(t):
ST = SuffixTreeLZ76(t)
ST.enumerate_internal_nodes()
z = ST.LZ76encoder(t)
return z
Mrange = 10000
t_LZ76_parsing = []
for M in range(2, Mrange, 500):
t1 = %timeit -n 3 -oq do_LZ_parsing(phage_geno[:M])
t_LZ76_parsing.append(t1.best)
%matplotlib inline
import matplotlib.pyplot as plt
plt.rcParams['figure.figsize'] = [10, 5]
# use seaborn for nice default plot settings
import seaborn; seaborn.set()
plt.plot(range(2, Mrange, 500), t_LZ76_parsing, label='LZ76 compression using suffix tree')
plt.legend(loc='upper left')
plt.xlabel('Text length')
plt.ylabel('Execution Time (s)');
As we see, the logarithm scales $~O(m^2)$ in the large limit when the text becomes larger and larger. So it is inappropriate for larger genomes. We can also, dig deeper into the code and check which function is taking more time to run using a python utility called line_profiler
. We can install it through pip, as follows:
If we consider that every step take $1\ \mu$ second in a computer, and that the algorithm has running time $O(m^2)$ we have the following results.
! pip install -q line_profiler
Once it's installed, we load the extension into the ipython notebook and use the magic function %lprun
to debug the running time of our functions.
%load_ext line_profiler
def do_LZ_parsing_prof():
g = phage_geno[:500]
ST = SuffixTreeLZ76(g)
ST.enumerate_internal_nodes()
z = ST.LZ76encoder(g)
%lprun -s -f do_LZ_parsing_prof -T lp_results.txt do_LZ_parsing_prof()
% cat lp_results.txt
The output shows us that most of the time the parsing spent in building the suffix tree data structure.
This post was written entirely in the Jupyter notebook. You can download this notebook, or see a static view on nbviewer or even open it on google colab.


the and []. with viral resveratrol activity from that antiviral for virus The against compounds were HIV- are Î¼M > cells host Â±Â (Fig.Â HSV- al. cell etÂ stilbenoids was {background natural tested HCV derivatives replication showed Fig.Â RNA human which isolated active infection new than this been margin have {border-style HIV compound TableÂ has px;} their Î¼M) #ffffff;} ECÂ inhibitors may most viruses its studies such values Î¼g/mL ICÂ NF-ÎºB agents authors effect inhibition other potent synthetic Structures after also demonstrated influenza inhibitory into not potential reported â†" [,]. [], action inÂ more resulted simplex Influenza Med. assay cells, effects found infected life mechanism novel protein (.Â NSC anti-HIV cytotoxicity inhibit many stilbene target they through two MERS-CoV RANTES Resveratrol activities analogues can cells. different drug exhibited family involved low major particular, replication, respiratory results seemed studied value (Î¼M) activity. binding but concentrations coronavirus products proteins release strain synthesis three transcription vitro while (ECÂ DNA However, Indeed, Moreover, Res../j.antiviral... Tat Vero cycle did drugs due epithelial infection, known last number oxyresveratrol potency proteins, px; reduction research responsible review same used vitisin vivo when {font-family Î¼g/mL, Human MDCK Mol. Vitis acid any assays class dengue directly dose-dependent factors font-size group hepatitis herpes high including infections integrase like molecular ring several Compound Lin Natural Notably, Polygonum This Viruses activation anti-HSV anti-influenza apoptosis cause caused cellular clinical compounds, concentration decrease development double double; expression four fundamental immune lower monomers pathway plants polymerase primary production pure ranging respect role screened severe significant since some suggesting targets therapeutic there together treatment â€" ()-vitisin ()-Ïµ-viniferin (ICÂ (Â±)-Ïµ-VF Antiviral Dengue Elsevier HSV PNR-- SARS-CoV SIÂ Since Stilbenoids TZM-bl Therefore, able acids activated activity, acute agents. alveolar antimicrobial antivirals assay, attachment between bind biological border-color border-width both causing comparison cytopathic disulfonic early effective evaluated five further genome genotype) good growth health helicase higher hydroxy identified immunodeficiency inactive increased increasing infect inhibitor interaction key leaves mice oligomeric oligostilbenes one only particular performed regulatory resulting resveratrol-derived ribonucleotide single-stranded sites solid; structural synergistic synthesized targeting time treated vinifera virus, wide {font-style {font-weight Î¼M, >. >Â ()-Ïµ-VF (CPE) (HN) (HSV-) (i.e. ACV All CGA COVID- Chem. HSV-. Han Hopea Huh. Infect. Ito Lee NSB QSAR Sci../ijms These about all analogue aromatic bearing because block blocking bold bond centre chemical combination confirmed courier; current cytotoxic diseases em; emerging envelope enzyme extract finding first fusion global glycoproteins groups hand, hydrogen improve induced inhibited interest investigated involving largely late leading less line liver macrophages mechanisms million molecules monomeric necessary need needed nucleoside occurs oligomers oligostilbenoids oral overview pathway, piceatannol plant plaque positive present produced promising pt;} pterostilbene, rate recent receptors reduce replication. residues resource response, resveratrol, roots series serotypes show still study suggested suppression syndrome system these type various vaticanol virus. Î¼M).


Computer graphics in Game development
Ivan Belyavtsev
25.01.2020
[1]
Let’s implement it together
Idea: sort all triangles from farthest to nearest from camera [2]
Let’s implement it together
vector<color> frame_buffer;
vector<float> depth_buffer; //+Infs, for instance
void SetPixel(unsigned short x, unsigned short y, float z, color color)
{
frame_buffer[y * width + x] = color;
depth_buffer[y * width + x] = z;
}
[2]
bool DepthTest(unsigned short x, unsigned short y, float z)
{
return z < depth_buffer[y * width + x]; //Depends on Z-axis directions
}
void SetPixel(unsigned short x, unsigned short y, float z, color color)
{
if (DepthTest(x, y, z))
{
frame_buffer[y * width + x] = color;
depth_buffer[y * width + x] = z;
}
}
[2]
Let’s implement it together
1. Rasterization: A practical implementation [Electronic resource]. 2015. URL: https://www.scratchapixel.com/lessons/3d-basic-rendering/rasterization-practical-implementation/rasterization-stage.
2. Marschner S., Shirley P. Fundamentals of computer graphics, fourth edition. 4th ed. Natick, MA, USA: A. K. Peters, Ltd., 2016.


Star Wars (1977)
Writer/Director: George Lucus Cast: Mark Hamill, Harrison Ford, Carrie Fisher, Peter Cushing, Alec Guiness.
I saw this at the cinema at its original release in 1977. The main thing I remember is stars spinning around the entire cinema at the start of the film - very futuristic for then - and some great fighting scenes. There was little else to the film through the eyes of an eleven year old.
Twenty years later I decided the time was right to give it a second chance. Though this time the reissued special edition on video.
The story is basically good against evil, Luke Skywalker versus Darth Vadar. This is blatantly obvious; pure young boy in white (who walks on clouds - Skywalker) opposes nasty older guy in all black (death invader). Darth Vadar takes Princess Leia (damsel in distress) from her space ship. Luckily, because without this link the story would not work, two robots escape from the ship. They end up recruiting Luke Skywalker; who soon has three reasons to help, namely: he sees an image of Princess Leia and feels the urge to rescue the damsel in distress; is guardians are killed by Darth Vadar's evil forces; and he romanticises about being a fighter. They are then joined by Obi-one Kenobi a Jedi Knight (an up to date samurai). Next the four get help from Han Solo (Harrison Ford) and his pal, borrowed from the 'Planet of the Apes', Chewbacca. All six end up at the home of Darth Vadar and his equally bad cronies on the Death Star, a grand battle commences and our good guys kick ass.
There are, in my opinion, two bad points in this film: firstly, the Characters, all but one, are definitely not Dickensian they are flat, non-dimensional, unemotional and never develop. Though there is one saving grace, namely Han Solo played by Harrison Ford who never makes a bad film (note - he remained the successful actor out of the main three). He plays the likable rogue that everybody knows is going to come good at the end. Having said this there is some interesting character contrasts and relationships: There's the obvious Darth Vadar/Obi-one Kenobi battle, and Luke Skywalker/Darth Vadar good versus evil relationship. And also Princess Leia/Han Solo feminist versus chauvinist relationship, and Darth Vadar/Han Solo good turned bad/bad turned good.
The second failing of this film is its lack of keeping the viewers attention in parts, admittedly most of the film is action and has enough plot to make you want to watch it unfold. The main scene in question is where they are on Planet Tatooine, this planet is like the film at this stage, desolate. The robots are all we have on offer for approximately 15 minutes, I even considered somebody had taped 'Lost In Space' over the top of this copy of the video.
However, there are many good points: My favourite being the futuristic chess type board game, this looks brilliant, fits the film perfectly and produces good humour when Han Solo points out what happens if Chewbacca loses.
The bar scene is also good, it again shows good special effects and provides the perfect opportunity to introduce Han Solo in a natural habitat for his character.
The 'Force' provides an element of intrigue and mysticism to the film. It nicely lurks in the background and is never overplayed. Without the Force the film would not work as well, it would become too real, instead of a fantasy.
The scene in which Princess Leia, Luke Skywalker and Han Solo end up in the garbage should have been another high point of the film, perhaps in the hands of Hitchcock it would have been. The scene itself represents a low point for our heroes, with a rare piece of symbolism, i.e. getting crushed, thrown away like rubbish, which works well because it further emphasises the film moments later when in contrast they defeat the Death Star.
I think it may be another twenty years before I watch this film again and who knows it may be even further enhanced - a kind of special, special edition.
Dean Jones Burton on Trent U K
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


HOME
ABOUT US
Registration
Our Shop
Registration Form
First Name
Last Name
Native Language
Gender
Select
Male
Female
Email Address
Phone Number
Address
Course
Select
EnglishCourse
KoreanCourse
GermanCourse
ArabicCourse
ItalianCourse
DutchCourse
TurkishCourse


Notes on Building the solution
If you are viewing this BuildingNotes.md in GitHub, here is this same document on the documentation site
Prerequisites
Details for the Prerequisites Details for thhe optional 3rd-party tools
General Background Build Information
In the interest of "Don't Repeat Yourself (DRY)" principles, you will find general documentation on the build tools, versioning methodology, Documentation creation, etc, in the ATAP.Utilities repository. 1.Configuring and using the Visual Studio IDE and Visual Studio Team Explorer. 2.GitFlow branch and release strategy used by this repository. 3.Versioning and Packaging used by this repository. 1.Building Documentation general instructions for using DocFx to build documentation for a repository
Versioning
This repository follows the general guidelines above.
Organization
Refer to the Organization documentation to pictures of how the solution and filesystem layouts are organized.
Build Configuration information at the Solution level
The Solution Item solution folder level contains build configuration information that applies to all projects in the solution, as follows:
Directory.Build.Props
- Tells all projects to use the latest C# language features, and that VersionInformation is explicitly defined in each project. Defines common compilation symbols and flags.
- TargetFrameworks
Build Configuration information at the Demoxx level
Individual under each Demoxx folder are three projects. To build a working Demo, all three projects must be built, and the GUI project must also be published. Building notes for each project are below
Build the ConsoleApp.exe
- The .csproj should specify <TargetFramework>net471</TargetFramework>.
Build the CommonDTO library
- The .csproj should specify <TargetFrameworks>netstandard2.0;net471</TargetFrameworks>. Note the plural form of the Property. This will ensure that assemblies are built for both target frameworks.
Build the GUI
- The .csproj should specify <TargetFramework>netnetstandard2.0</TargetFramework>.
Publish the GUI
Publish Profiles
- There is a DebugFolderProfile and a ReleaseFolderProfile. Both publish to the filesystem. The DebugFolderProfile publishes to a subfolder relative to the GUI project's folder. The ReleaseFolderProfile publishes to a Release subfolder relative to the root of the solution.
NuGet Packaging
- N/A, none of the projects in this solution create NuGet packages
NuGet Packages Used
* Demo01 and all others
* GUI Project
* Blazor (all current NuGet packages)
* Blazor Logging Extensions
* ServiceStack Project
* ServiceStack (At least version 5.4.1 or later)
* NLog
* Demo02
* GUI Project
* ServiceStack.Text
Visual Studio Extensions to make coding and debugging easier
* [Structured Build Logs]()
* [Structured Build Log Viewer]()
* [DocFx]()
3-rd party tools to make coding and debugging easier
* [Sentinal]() UDP Log sink


C.L.W
Home
(current)
Category
Hardware
Software
Training
Contact
Search
ALL
Audi
Honda
BMW
Check Out
Item
Price
Quanity
Subtotal
RM1,310,800
Subtotal
Tax
PromoCode
Total
Calculate
Make Payment
NSIT Academy
No.16,Jalan Sri Putra 1,
607-6600628


As a software engineer I love to solve business problems, which can help both company and clients. Also, I want to make technologies more accessible to people from around the world!
Farrukh Akhrarov
"Back-end developer"
Projects
Banksy Co trading e-commerce web site
Created a e-commerce web app with MERN stack. Learned a lot of features of ReactJS and the beauty of non-relational databases like MongoDB. Here are the links:
Airbnb clone
This prject is a copy of Airbnb. I am using Python with Flask to handle the main business logic, while utilizing JQuery/HTML/CSS to create the front end. Here are the links:
C Shell
This is a SH like shell is written in C using only system calls with custom print and other clones of standard library functions. Here are the links: