A major benefit of herbal medicine is that they are generally safer than synthetic pharmaceuticals. ... This is because plants, being chemically complex live organisms, often have several medicinal actions. However, this is not to say thatherbal products are harmless because they are natural.
Herbal medicine is used to treat many conditions, such as allergies, asthma, eczema, premenstrual syndrome, rheumatoid arthritis, fibromyalgia, migraine, menopausal symptoms, chronic fatigue, irritable bowel syndrome, and cancer, among others Herbal medicine, also known as herbalism or botanical medicine, is a medical system based on the use of plants or plant extracts that may be eaten or applied to the skin. Since ancient times, herbal medicine has been used by many different cultures throughout the world to treat illness and to assist bodily functions.


{% extends 'frontend/base.html' %}
{% load static %}
{% block title %}NAGA168 | หน้าแรก{% endblock %}
{% block carousel %} {% include 'includes/carousel.html' %} {% endblock carousel %}
{% block card %}{% include 'includes/card.html' %}{% endblock card %}


Map 6M Grids Confirmed on LoTW
Enter your
LoTW
credentials.
Username:
Password:
Click Me!
Please Wait.
Try Again


- java.lang.Object
-
- view.turtlearena.BasicTurtle
-
public class BasicTurtle extends java.lang.Object
Implementation of Turtle, represents the actual turtle viewed by the user as well as creates the lines drawn by the turtle. Stores graphics information such as pen thickness, pen width and turtle image.- Author:
- Goh Khian Wei
-
-
Constructor Summary
Constructors Constructor Description BasicTurtle(javafx.scene.image.Image defaultImage, javafx.scene.paint.Color defaultPenColor, double defaultPenWidth)
Constructor, initialises turtle based on default image, pen colour and pen width of turtle
-
Method Summary
Modifier and Type Method Description javafx.scene.Node
addLine(double xPos, double yPos)
Moves turtle to new location and draws line from old to new locationjavafx.scene.Node
getTurtle()
Returns Node containing graphical view of turtlevoid
hide()
Hides the turtle visuallyvoid
move(double xPos, double yPos)
Moves turtle to new location absolutelyvoid
moveOffset(double dx, double dy)
Moves turtle to new location as specified by offset from current locationvoid
rotate(double angle)
Rotates turtle to new anglevoid
setPenColor(javafx.scene.paint.Color color)
Sets the pen colour of the turtle, such that subsequent lines are drawn with the new pen colourvoid
setPenThickness(double penThickness)
Sets the pen thickness of the turtle, such that subsequent lines are drawn with the new pen thicknessvoid
setTurtleImage(javafx.scene.image.Image image)
Sets turtle to new imagevoid
show()
Visually shows the turtle
-
-
-
Constructor Detail
-
BasicTurtle
public BasicTurtle(javafx.scene.image.Image defaultImage, javafx.scene.paint.Color defaultPenColor, double defaultPenWidth)
Constructor, initialises turtle based on default image, pen colour and pen width of turtle- Parameters:
defaultImage
- Image to initialise turtle withdefaultPenColor
- Pen colour to initialise turtle withdefaultPenWidth
- Pen width to initialise turtle with
-
-
Method Detail
-
getTurtle
public javafx.scene.Node getTurtle()
Returns Node containing graphical view of turtle- Returns:
- Node containing graphical view of turtle
-
hide
public void hide()
Hides the turtle visually
-
show
public void show()
Visually shows the turtle
-
move
public void move(double xPos, double yPos)
Moves turtle to new location absolutely- Parameters:
xPos
- X coordinate of new locationyPos
- Y coordinate of new location
-
moveOffset
public void moveOffset(double dx, double dy)
Moves turtle to new location as specified by offset from current location- Parameters:
dx
- X offset from current x coordinatedy
- Y offset from current y coordinate
-
addLine
public javafx.scene.Node addLine(double xPos, double yPos)
Moves turtle to new location and draws line from old to new location- Parameters:
xPos
- X coordinate of new locationyPos
- Y coordinate of new location- Returns:
- Node containing graphical view of line drawn by turtle
-
rotate
public void rotate(double angle)
Rotates turtle to new angle- Parameters:
angle
- New heading angle of turtle
-
setTurtleImage
public void setTurtleImage(javafx.scene.image.Image image)
Sets turtle to new image- Parameters:
image
- Image turtle should be set to
-
setPenColor
public void setPenColor(javafx.scene.paint.Color color)
Sets the pen colour of the turtle, such that subsequent lines are drawn with the new pen colour- Parameters:
color
- Color of the pen
-
setPenThickness
public void setPenThickness(double penThickness)
Sets the pen thickness of the turtle, such that subsequent lines are drawn with the new pen thickness- Parameters:
penThickness
- Thickness of the pen
-
-


The Ten-Seven Guide
Help Me Pick New Logo Through 3 April 2016!
I am in the process of running a logo design contest on 99designs and have created a poll with 6 of the best logo designs I've received. I would love for you to vote on the logo design. It only takes a minute.
Like Sci-Fi? Read My New Online Fiction Series.
Do you like Sci-Fi? While I finish up my next novel, I have started an online fiction series called Forbearance. Picking up from the canteen scene in Bellicose, we meet Keius Minjen, a postal marine, as he tries to survive the battle planet Guna to exact revenge and one day liberate his homeland.
Sign-up if you want me to send you news about upcoming installments of Forbearance or my other writings.
- Updated May 2010.
- Updated July 2013.
- Validating September 2014.
The Ten-Seven Guide assists novice players with early empire building to enhance their overall Astro Empires playing experience. The goal of this guide is to help players build ten bases in the first week, and educate players in key aspects of early game play. It is important to balance astro selection, structure building, and scouting. For the first three days player bases are immune to attack, but players need to remain focused on building proper defenses. This guide will also lightly touch on combat, which is discussed in greater detail on this site. The one-week goal provides “free” players (those who will not be upgrading) a chance to build one extra base before free account restrictions are applied.
This guide was originally written in September 2007, and validated on Ceti and Alpha. Soon after, Astro Empires started tinkering with the rules of gameplay for the first week of an account. Players were protected for the first week, then three days. At the time of this writing (May 2010), the rules protect players until tenth level. This guide was re-evaluated at the opening of the Ixion server (May 2010), although earlier attempts to update the guide were made. The original version of this guide is discussed a bit in A Ten Seven Diary; which may give new players a chance to read their future.
The important thing to remember about this guide is diligence. The rules change means players cannot be sloppy at any time. The time demands the first week are high; perhaps higher than other times.  This guide favors the “Turtle” approach, high defenses over high fleet; as novice players may be less prepared for the rigors of constant combat.
This guide does not dive into details. There are more detailed discussions of much of what is written here in other guides found on this site. Some advice here goes against popular wisdom, and the guide tries to explain why. This guide also assumes you have at least read the information provided by Astro Empires.
Astro Picking
Your First Astro, or Getting Off on the Right Foot:
- Great Choice: Slot-2 Rocky
- Good Choice: Slot-2 Metal-3 (Crater or Rocky)
- Fair Choice: Slot-1 Metal-3 (Rocky, Crater or Rocky)
- Poor Choice: Slot-1/-2 Metal-2 (Arid, Tundra, Gaia or Earthy)
You will start on a moon, that is how Astro Empires is programmed. The ideal start astro is a Metal-3 (Rocky, Crater or Metallic) moon in Slot-1 or Slot-2. If you do not have both the quality of metal or the slot, restart your account until you do. This will take some time. If it seems you have no choice, prefer a Slot-1 or Slot-2 Metal-2 (Arid, Tundra, Gaia or Earthy) astro.
The best choice is a Slot-2 Rocky for a start as it provides excellent fertility and decent solar.
Metal-3 astros (which also includes Astroids) provide the best construction/production rates, which is critical at the beginning. Metal-2 astros provide less, but they provide more space for structures. For this reason, some will advise Metal-2 astros for Research bases as they provide capacity to build your Research Labs. The first base tends to become a Research base, so you may decide keeping your Metal-2 base is acceptable.
The slot affects solar output and fertility. Slot-1 gives you the best solar energy, but Slot-2 provides a boost to fertility. The Advanced Base Guide provides a deeper discussion on why Slot-2s are the preferred choice.
Restarting accounts is a feature Astro Empires provides because players tended to delete accounts that had unacceptable astros and start over. This created a considerable amount of chaos. So, this feature provides more stability, while providing you a chance to have a decent start.
Other Astros. The Advanced Base Guide provides a recommendation of which bases to build after the first. The focus is on astros that you should seek next. It also discusses when you should prefer planets, moons or asteroids (a.k.a. Roids). In a nutshell, if you plan on upgrading, favor moons or roids. If you do not plan on upgrading, prefer Planets. Merovech, who always upgrades, prefers Roids, because it takes two terraforms to provide the same space as a Planet, and one terraform to provide the same space as a Moon; but cost of Planetary Ring defenses are ¼th that of Planets, or ½ that of Moons.
Location. Building your bases too close together is a very bad idea. Larger rivals may easily pick them off in rapid succession. Therefore, try not to have more than one base in a region. Defensively speaking, your bases need to be self-sufficient. The closest your bases should be is in adjacent regions, but even that risks your bases being attacked in short order by a dedicated opponent.
The table below lists the cost of each base, the cumulative cost of bases built that day, what econ you should have on that day to ensure you can plant those bases, and what day you should plant that base. Merovech managed to plant an extra base on Day Three on Ixion, which helped ensure he built all the bases in time.
| Base Establishment Quota | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| \ Base | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| Cost | 100 | 200 | 500 | 800 | 1600 | 3200 | 6400 | 12800 | 25600 |
| Total | 350 | 1200 | 4800 | 19200 | |||||
| Econ | 55 | 140 | 400 | 800 | |||||
| Level | 6.5 | 8.5 | 12.2 | 17 | |||||
| Day | 3 | 3 | 3 | 4 | 4 | 5 | 5 | 6 | 6 |
Activity Guide
Once you’ve picked your base, it is time to start building. Remember, time is essential in the first day. You want to ensure your queues are full and no time is lost. When filling your queues, you will want to balance your activities. For example, when building a Metal Refinery or Robotics Factory, pick the less expensive structure. This is the cost-effective approach to construction. This section discusses construction objectives, research objectives and production objectives.
Construction
When you get your first base going, build Metal Refineries. I suggest building three Metal Refineries before anything else. You will run out of Population and Energy, so build an Urban Structure and another Solar Plant as needed. This guide assumes you will plan your queue to include Population and Energy expansion. When you research enough Energy, you can start building Fusion Plants.
After building your first set of Refineries, built a Research Lab. Then, build a Spaceport and find a neighbor to trade with. Some will build the Spaceport first then the Lab; so it is up to you. After the Spaceport, build a Shipyard; then return to building Refineries. The chart below shows what your goals are for Day-1, Day-2, and Day-3 for your first base. This enables you to start planting new bases on Day-3. The Others column are the overall build objectives for all other bases through Day-7. You should balance your queue to meet those objectives.
| Daily Construction Quota | ||||
|---|---|---|---|---|
| Day 1 | Day 2 | Day 3 | Others | |
| Metal Refineries | 7 | 10 | 15 | 10 |
| Robotics Factory | 4 | 6 | 6 | 6 |
| Research Labs | 5 | 8 | 8 | - |
| Shipyard | 4 | 6 | 8 | 1 |
| Spaceport | 4 | 5 | 5 | 5–10 |
| Turret | - | - | 1 | 1–3 |
| Crystal Mines | - | - | - | 5–10 |
Research Labs are only built on the first base and any Research Bases during the first week. Crystal Mines are only built on astros with Crystal 2 (Roids) or Crystal 3 (Crystalline). You will experience a financial crunch as you run out of credits. Queues are your friends as you can go do other things (such as sleep) while the base constructs.
Turrets. The Base Defense Guide discusses defenses in greater detail. When you are near Tenth level, you will need defenses. This guide recommends you satisfy your requirements for Missile Turrets and build one on all bases right before you reach Tenth level. The Defenses section below discusses your needs in a bit more detail.
New Base Goals. As each base new is built, you will want to work toward the Others goal. Merovech recommends the Shipyard be built before you have to build an Urban Structure when you are above Tenth level. This reduces the likelihood of a scout-tap. Otherwise, build the Shipyard before your first Spaceport. This reduces piracy.
Research
Once you have your first Research Lab built, you should start your research. The chart below shows the end-of-day goals for research. You must build enough Research Labs to support the higher technologies. So, if you cannot research a technology during its target day, you are behind in your construction. The parenthetical number in the chart below describes the number of research labs you need to research that tech. Start by researching Energy, then add Computer and alternate between the two techs until you satisfy the Computer-2 objective.
| Daily Research Quota | |||||
|---|---|---|---|---|---|
| Day 1 | Day 2 | Day 3 | Day 5 | Ion | |
| Computer | 2 | 2 | 2 | 10 | |
| Energy | 6 | 8 | 8 | 10 | 12 |
| Stellar Drive | 4 (5) | 4 (5) | 4 (5) | ||
| Warp Drive | 1 (8) | 1 (8) | |||
| Laser | 1 | 4 | 10 | ||
| Armour | 2 | 4 | 10 | ||
| Missile | 1 | 6 | |||
| Shielding | 2 | ||||
| Ion | 1 |
The last column shows the minimum technology required to build Ion Turrets.
| Computer |
|
|---|---|
| Energy |
|
| Stellar Drive |
|
| Warp Drive |
|
| Laser |
|
| Plasma |
|
| Armour |
|
Production
Production should focus on scouting and planting new bases. This guide recommends three units, shown below with the number of Shipyards and Research Targets.
| Unit | Shipyards | Research | Notes |
|---|---|---|---|
| Fighters (FT) | 1 | Laser 1 | Defend your Trade Routes |
| Corvettes (CV) | 4 | Laser 2 + Stellar Drive 1 + Armour 2 | Preferred scout unit |
| Outpost Ships (OS) | 8 | Warp-1 | Build new bases |
There are a couple other units that you may consider adding if you want to pick on your neighbors: Frigate and Recycler. Frigates allow you to carry Fighters that can more cheaply attack your neighbors. Recyclers allow you to recover the debris (derbs) that enhances profitability. This guide does not need these units; but Astro Empires is an economic combat simulator.
Never send a “naked” Outpost Ship. It takes hours build and send one to a decent base location. If you are scouting, you will build and send your first Corvette, then build an Outpost ship. That Corvette should be moved to the Outpost Ship’s target astro so it can help defend it. If you are not scouting (because you’re picking only Roids), then you can build and send your Outpost ship, then build and send your Corvette. The Corvette will typically beat the Outpost ship.
You should anticipate your trade routes being hit when you can build a Corvette—because your neighbors have them, too. So, before you are Corvette-capable, build a Fighter. This prevents your trade routes from being easily pirated.
Scouting
Once you have researched technologies and built the Shipyards, then build one Corvette. As this guide recommends one base per region, send it to a neighboring region. Bookmark any potential base locations (Slot-1/-2 Rocky, Crater, Metallic or Roid). You can actually scout Roids without having a Corvette; another reason why Merovech likes them. Send the Corvette to each of the regions surrounding yours. That gives you nine total regions to plant bases in. Then, just let whim take you. Make sure you pick a couple base locations in each region as your neighbors are doing the same.
Why Scout with Corvettes?
Corvettes are fast combat units. Scout Ships are faster, but are not combatative.  Corvettes can be used to kill any Outpost Ships you see, unless the OS is a guild mate’s.
Trade Routes & Banking
Economy is key at all states of Astro Empires. This is an economic simulator with combat. Build one Spaceport as advised above, then build to five. Once all bases have five Spaceports, build until each has ten. This gives you ample trade routes to help your economy grow.
Who to trade with?
You really have only two choices: yourself and your neighbors. Trading with yourself is a good short-term solution if you are having problems finding partners. Once you are established, slowly replace self-trades with neighbors. Until you have Prings, Merovech does not recommend trades outside your galaxy. This is because the value of a pirated route is higher for those routes, making them a more valuable target to pirates.
Banking credits is how you safeguard your credits from pillage. If you are attacked, a portion of your available credits goes to the victor. By either stashing credits in long-term research or construction projects, or by production Goods, you can prevent those credits from going to your rival. You can cancel the research or construction and spend the credits how you want. Don’t cancel goods.
Goods production is good for when you know when you need money available, such as when you know you will be planting your next base. Astro Empires lets you put in a time for completion. So, if you know you will be planting a base in eight hours, type ‘8h’ in the production field for Goods. It will provide a fairly accurate number of goods.
Defenses
Earlier, this guide shows that you need an economy of nearly 800 to build your last base. To accomplish this with the previous nine bases, your average base economy will be between 45–65. It is imperative that you defend your bases so they are not profitable to your attacker. This discourages attack at this stage of the game, as the primary focus should be on empire build.
The chart below is a variation of the one found in the Base Defense Guide, with values adjusted for technology levels found at this early stage of the game.  The chart shows what turrets are able to defend what base economy at what strength. The objective is to make a base non-profitable to an attacker. This is generally enough to discourage many attackers. The value in parenthesis is the level of economic protection given. This assumes you have no extra credits waiting to be spent.
For example, Missile Turrets-10 can defend a base with econ 22. This means that the attacker will have a net loss if he attacks a base with Missile Turrets-10 and an economy of 22 or less. Conversely, if the base economy is above 22, he will have a net profit. Overhead defensive fleet is ignored as they create derbs that can be harvested, increasing profitability.
| \ | Fighters Killed/Needed | Corvettes Killed/Needed | ||||
|---|---|---|---|---|---|---|
| Turrets | @5 | @10 | @15 | @5 | @10 | @15 |
| Laser | (13) 20/20 | (19) 40/40 | (24) 60/60 | (19) 10/10 | (27) 20/20 | (33) 30/30 |
| Missile | (15) 26/40 | (22) 52/80 | (27) 78/120 | (22) 13/20 | (31) 26/40 | (38) 51/60 |
| Plasma | (22) 52/60 | (31) 104/120 | (38) 156/180 | (31) 26/30 | (44) 52/60 | (54) 78/90 |
| Ion | (23) 56/240 | (32) 112/480 | (39) 168/600 | (32) 26/60 | (46) 66/120 | (56) 84/180 |
The chart includes the economic protection against the typical fighter drop and against the typical Corvette swarm. While the Ion Turret does not provide much more economic protection, you should take notice of the value of its weak shields. In order for a Fighter drop or Corvette swarm to crack the turret in one shot, it takes significantly more. That is, it takes twice as many Corvettes and four times as many Fighters to take the base at a profit.
Turret economic protection drops significantly beyond its listed level. So, you cannot add the Missile Turrets-15 economic protection of 27 to Ion Turret-5 economic protection of 23 to get an economic protection of 60. The actual combined economic value of that combination is 35. This is because of how Astro Empires calculates the pillage bonus.
Look to the Base Defense Guide for base defense standards. The Small Fleet Doctrine provides an approach to efficient fleet construction that is valuable after the first week.


@()(implicit request: Request[_], messages: Messages)
@contentHeader = {
Apply to be an approved Lifetime ISA Manager
}
@views.html.main_template(title = "Apply to be an approved Lifetime ISA Manager - GOV.UK", bodyClasses = None, contentHeader = Some(contentHeader), showSignOutLink = false) {
Use this service to:
- apply to register with HM Revenue and Customs (HMRC) as a Lifetime ISA manager
- check the status of a submitted application
Start now
Before you start
You must be registered with HMRC as an ISA manager.
You’ll need your organisation's:
- Government Gateway ID
- ISA manager reference number
- Corporation Tax reference number/Partnership Unique Tax reference number
- Financial Conduct Authority reference number
If you don't have a Government Gateway ID, or need to re-register for an account, you can set one up as part of this service.
}


|
ELENA Standard Library 2.0 |
system'Object | +--extensions'MatrixAll Implemented Protocols:
A matrix
| Constructor Summary | |
new &n:int
&every_ij:nnfunc
|
Creates a square initialized matrix
|
new &n:int
&m:int
&every_ij:nnfunc
|
Creates an initialized matrix
|
new &matrix:object
|
Creates an initialized matrix
|
| Method Summary | |
add : object
= object
|
Sums two matrix
|
add &matrix:object
= object
|
Sums two matrix
|
cast : verb
&to:object
= object
|
Dispatches the verb to the target object with matrix subject
|
cast : verb
&with:object
&to:object
= object
|
Dispatches the verb to the target object with matrix subject
|
clone = object
|
Returns the matrix clone
|
determinant = real
|
Returns the matrix determinant
|
enumerator = enumerator
|
Returns the rwo enumerator
|
getAt &index:int
&index:int
|
Returns the matrix ij element
|
literal = literal
|
Returns the literal presentation
|
n = int
|
Returns the number of rows
|
m = int
|
Returns the number of columns
|
matrix = object
|
Returns itself
|
multiply : object
= object
|
Returns the product of two matrix
|
multiply &matrix:object
= object
|
Returns the product of two matrix
|
setAt &index:int
&index:int
&value:object
|
Sets the matrix ij element
|
subtract : object
= object
|
Returns the difference between two matrix
|
subtract &matrix:object
= object
|
Returns the difference between two matrix
|
system'Object | +--system'Exception | +--extensions'MatrixException
A matrix operation exception
| Constructor Summary | |
new : literal
|
Creates the exception
|
| Method Summary | |
if &MatrixError:function
|
Executes the exception handling code
|
|
ELENA Standard Library 2.0 |


--- layout: post title: my week in food date: 2011-11-11 20:41:40.000000000 -05:00 type: post published: true status: publish categories: [] tags: - butternut squa - chili - chocolate chips - cupcakes - oatmeal - persimmon - red velvet meta: _edit_last: '1' author: login: sophie email<EMAIL_ADDRESS>display_name: Pika first_name: '' last_name: '' ---
Monday:
homegrown persimmon & Tazo Green Ginger tea
Tuesday:
Roommate date at Artopolis
(red velvet cupcake)
(vanilla cupcake w/ fudge frosting)
Wednesday:
vegan pumpkin chocolate chip muffins for Nom^3
NomBox for Nom^3
Thursday:
cumin and cinnamon sautéed butternut squash, broccoli, whole wheat couscous, black bean chili
Friday:
chocolate chip cookie oatmeal
(oatmeal with cinnamon, brown sugar, and chocolate chips)


Travel Log
Add a Location:
Place
Date of Visit
What did I see?
Add
Travel History:
Location:
Date:
Landmark:
To Do List
Enter an item to do:
Add another item


{# cloud/quicklinks.html ~~~~~~~~~~~~~~~~~~~ Provides links mirroring the relbar, for use on pages such as the TOC and searchbox. #}


A new adventure awaits you with the Winter 2017 Guild Pass.
Level up your pass through exciting new challenges to earn exclusive rewards and bonuses.
Buy soon: 375WGPThe Guild Pass comes with missions in one of three branching pathways. Complete your assignment and you'll be given some Guild Pass XP to level up your pass. For those who are resilient enough to reach the end of a pathway, unique completion rewards can be found for each path, which upgrade the more missions you do for that path.
Challenge any of your fellow Welcomers' Guild members to put some WGP on the line to see who will earn the most WGP in a week. The winner gets double the points wagered while the loser gets none. Not up for the gamble? You can decline any duel offer with no penalty.
Upon receiving the pass, get access to unique rewards for the Winter season.
With any Guild Pass comes the exclusive, first-of-its-kind Winter 2017 Skin, which will decorate the entire leaderboard for your viewing pleasure.
All Winter Pass owners will gain access to a higher Daily Rate cap of 10 WGP/day instead of the normal 5. Happy holidays!
Here's some of the rewards you'll receive for leveling up your Guild Pass:
Get into the holiday spirit with plentiful presents in store for you!
These lootboxes are earned from leveling up your pass and don't cost anything to open.
 It's just a gift that keeps on giving.
Now what's inside the box? That depends on if you've been naughty or nice! For every WGP point you've got, your "nice meter" will increase, which gives you access to higher and higher quality drop lists for the winter treasures.
Every 4 levels starting at Guild Pass Level 9, you'll get a chance to spin the frosty Winter Wheel of Random Rewards which in addition to many normal rewards, has a small chance of giving you 5000 WGP or an Ambassador Select Lootbox.
More info is on the way along with the release of the Winter 2017 Guild Pass. Check back here soon!


--- layout: default group: "navigation" title: Class of 2022 permalink: /members/class_of_2022 order: 0 ---


OpenMesh
Class Hierarchy
Go to the textual class hierarchy
Project
OpenMesh
, © Computer Graphics Group, RWTH Aachen. Documentation generated using
doxygen
.


text formatting
This text is styled with some of the text formatting properties. The heading uses the text-align, text-transform, and color properties. The paragraph is indented, aligned, and the space between characters is specified. The underline is removed from this colored "Try it yourself" link.
The color
property is used to set the color of the text.
With CSS, a color is most often specified by:
The default text color for a page is defined in the body selector.
Example
body {
color: blue;
}
h1 {
color: green;
}
Note: For W3C compliant CSS: If you define the color property, you must also define the background-color
property.
|
The text-align
property is used to set the horizontal alignment of a text.
A text can be left or right aligned, centered, or justified.
The following example shows center aligned, and left and right aligned text (left alignment is default if text direction is left-to-right, and right alignment is default if text direction is right-to-left):
Example
h1 {
text-align: center;
}
h2 {
text-align: left;
}
h3 {
text-align: right;
}
When the text-align
property is set to "justify", each line is
stretched so that every line has equal width, and the left and right margins are
straight (like in magazines and newspapers):
Example
div {
text-align: justify;
}
Show Time
normal text
text-align: center;
text-align: left;
text-align: right;
text-align: justify;
The text-decoration
property is used to set or remove decorations from text.
The value text-decoration: none;
is often used to remove underlines from links:
Example
a {
text-decoration: none;
}
The other text-decoration
values are used to decorate text:
Example
h1 {
text-decoration: overline;
}
h2 {
text-decoration: line-through;
}
h3 {
text-decoration: underline;
}
| Note: It is not recommended to underline text that is not a link, as this often confuses the reader. |
Show Time
normal text
text-decoration: overline;
text-decoration: line-through;
text-decoration: underline;
The text-decoration
property specifies the decoration added to text,
and is a shorthand property for:
text-decoration: text-decoration-line text-decoration-color
text-decoration-style|initial|inherit;
Set different types of text-decoration lines:
div.a
{
text-decoration-line: overline;
}
div.b
{
text-decoration-line: underline;
}
div.c
{
text-decoration-line: line-through;
}
div.d
{
text-decoration-line: overline underline;
}
Show Time
normal text
text-decoration-line: overline;
text-decoration-line: underline;
text-decoration-line: line-through;
text-decoration-line: overline underline;
Set the color of the text-decoration to red:
p
{
text-decoration: underline;
text-decoration-color: red;
}
Show Time
normal text
text-decoration-line: underline;
text-decoration-line: underline;text-decoration-color: red;
Set different types of text-decoration styles:
div.a
{
text-decoration-line: underline;
text-decoration-style: solid;
}
div.b
{
text-decoration-line: underline;
text-decoration-style: wavy;
}
div.c
{
text-decoration-line: underline;
text-decoration-style: double;
}
div.d
{
text-decoration-line: overline underline;
text-decoration-style: wavy;
}
Show Time
normal text
text-decoration-line: underline;
text-decoration-line: underline;text-decoration-style: solid;
text-decoration-line: underline;text-decoration-style: dotted;
text-decoration-line: underline;text-decoration-style: dashed;
text-decoration-line: underline;text-decoration-style: wavy;
text-decoration-line: underline;text-decoration-style: double;
text-decoration-line: overline underline;text-decoration-style: wavy;
The text-transform
property is used to specify uppercase and lowercase letters in a text.
It can be used to turn everything into uppercase or lowercase letters, or capitalize the first letter of each word:
Example
p.uppercase {
text-transform: uppercase;
}
p.lowercase {
text-transform: lowercase;
}
p.capitalize {
text-transform: capitalize;
}
The text-indent
property is used to specify the indentation of the first line of a text:
Example
p {
text-indent: 50px;
}
The letter-spacing
property is used to specify the space between the characters in a text.
The following example demonstrates how to increase or decrease the space between characters:
Example
h1 {
letter-spacing: 3px;
}
h2 {
letter-spacing: -3px;
}
The line-height
property is used to specify the space between lines:
Example
p.small {
line-height: 0.8;
}
p.big {
line-height: 1.8;
}
The direction
property is used to change the text direction of an element:
Example
div {
direction: rtl;
}
The word-spacing
property is used to specify the space between
the words in a text.
The following example demonstrates how to increase or decrease the space between words:
Example
h1 {
word-spacing: 10px;
}
h2 {
word-spacing: -5px;
}
| Property | Description |
|---|---|
| color | Sets the color of text |
| direction | Specifies the text direction/writing direction |
| letter-spacing | Increases or decreases the space between characters in a text |
| line-height | Sets the line height |
| text-align | Specifies the horizontal alignment of text |
| text-decoration | Specifies the decoration added to text |
| text-indent | Specifies the indentation of the first line in a text-block |
| text-shadow | Specifies the shadow effect added to text |
| text-transform | Controls the capitalization of text |
| unicode-bidi | Used together with the direction property to set or return whether the text should be overridden to support multiple languages in the same document |
| vertical-align | Sets the vertical alignment of an element |
| white-space | Specifies how white-space inside an element is handled |
| word-spacing | Increases or decreases the space between words in a text |


Toggle navigation
VietMarketPlace
Language
English
Vietnamese
Login VietMarketPlace
Biggest Storage Online
* Forgot Password ?
Log In
or
Create New Account


Queues, stacks, and 'deques' are list-like, abstract data types. These are meant to be very cheap to "grow", or insert new objects into. A typical use case involves storing data in a list in a streaming fashion, when you do not necessarily know how may elements need to be stored. Unlike R's lists, the new data structures provided here are not necessarily stored contiguously, making insertions and deletions at the front/end of the structure much faster. The underlying implementation is new and uses a head/tail doubly linked list; thus, we do not rely on R's environments or hashing. To avoid unnecessary data copying, most operations on these data structures are performed via side-effects.
| Version: | 2.0-1 |
| Depends: | R (≥ 3.1.0) |
| Published: | 2017-11-16 |
| Author: | Drew Schmidt [aut, cre] |
| Maintainer: | Drew Schmidt <wrathematics at gmail.com> |
| BugReports: | https://github.com/wrathematics/dequer/issues |
| License: | BSD 2-clause License + file LICENSE |
| URL: | https://github.com/wrathematics/dequer |
| NeedsCompilation: | yes |
| Citation: | dequer citation info |
| Materials: | README ChangeLog |
| CRAN checks: | dequer results |
| Reference manual: | dequer.pdf |
| Package source: | dequer_2.0-1.tar.gz |
| Windows binaries: | r-devel: dequer_2.0-1.zip, r-release: dequer_2.0-1.zip, r-oldrel: dequer_2.0-1.zip |
| OS X binaries: | r-release: dequer_2.0-1.tgz, r-oldrel: dequer_2.0-1.tgz |
| Old sources: | dequer archive |
Please use the canonical form https://CRAN.R-project.org/package=dequer to link to this page.


Tournament code generation form
Game name
Password
Map
Summoners Rift
Twisted Treeline
Crystal Scar
Howling Abyss
Type
Blind Pick
Draft Mode
All Random
Tournament Draft
Team size
1
2
3
4
5
Allow spectators?
All
None
Lobby Only
Game ID
Results report URL


--- layout: archive title: Zulip Chat Archive permalink: /stream/113489-new-members/topic/Boolean.20equality.20on.20nats.html ---
In the Coq standard library, there is a boolean test for equality on the natural numbers n =? m
which returns true if n
and m
are equal and false otherwise. Is there a similar function in Lean?
On the other hand, I found nat.decidable_eq
in the Lean stdlib which I presume is analogous to Coq's sumbool. In Coq, we can convert it into a boolean by placing it in an if/then/else as follows (assuming eq_dec
is our sumbool instance): if eq_dec then true else false
. Is there a similar mechanism in Lean?
Donald Sebastian Leung said:
In the Coq standard library, there is a boolean test for equality on the natural numbers
n =? m
which returns true ifn
andm
are equal and false otherwise. Is there a similar function in Lean?On the other hand, I found
nat.decidable_eq
in the Lean stdlib which I presume is analogous to Coq's sumbool. In Coq, we can convert it into a boolean by placing it in an if/then/else as follows (assumingeq_dec
is our sumbool instance):if eq_dec then true else false
. Is there a similar mechanism in Lean?
I skipped to Chapter 10 and found that you could pattern-match on nat.decidable_eq n m
(for some n m : ℕ
)
In Lean, you can use if ... then ... else
on decidable
Prop
s like this:
def foo (m n : ℕ) : bool := if m = n then tt else ff #eval foo 2 3
You can also coerce decidable
Prop
s to bool
s:
#eval (2 = 3 : bool) def foo' (m n : ℕ) : bool := m = n #print foo' -- `to_bool` is inserted
Thanks!
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


Home
Network
Mail
Skills
Dashboard
Welcome John Doe
Edit Profile
Add Experience
Add Education
Experience Credentials
Company
Title
Years
Sears Auto
Automotive Tech
oct 2015 - Current
Delete
Nissan
Automotive Tech
oct 2015 - Nov 2019
Delete
Education Credentials
School
Degree
Years
Community College
ASE Certs
oct 2015 - Current
Delete
Delete my Account


Weather Dashboard
Type a City Below
Search
Your Recent Searches:
Viewing Current Weather for
_________
Date:
Temperature:
Wind:
Humidity:
Main Weather:


Video Clip of Biden
A short video clip of former Vice President Joe Biden is circulating on social media, but it misleadingly omits any context for Biden’s words.
The 10-second clip shows Biden only saying, “They’re saying, ‘Jeez, the reason I was able to stay sequestered in my home is because some black woman was able to stack the grocery shelf.'”
Biden did say those words during a Sept. 15 event with veterans in Florida. But the full context of his remarks indicates he was suggesting that Americans are becoming more aware and realizing “we’re all in this together” during the COVID-19 pandemic. He also expressed gratitude for such essential workers.
The short, out-of-context clip was amplified on Twitter by a contributor for the conservative youth organization Turning Point USA, among others. On Facebook, a columnist for the Patriot Post shared a video of the remark repeating in a loop.
Fake Coronavirus Cures
Online posts have claimed to reveal various “cures” for the new coronavirus. Some are benign, like eating boiled garlic, while others are potentially dangerous, like drinking chlorine dioxide, an industrial bleach. Neither will cure the virus.
Treatments billed as miracle cures have cropped up across the internet since the new coronavirus began spreading in Wuhan, China, at the end of December.
One rumor claims that consuming garlic will treat the illness, which the World Health Organization has now named COVID-19. Another says loading up on vitamin C will do the trick. Yet another would have people, essentially, drink bleach. None of these will treat or cure the virus.
A recipe circulating on social media is spreading this false information: “Good news, Wuhan’s corona virus can be cured by one bowl of freshly boiled garlic water. Old Chinese doctor has proven it’s efficacy. Many patients has also proven this to be effective. Eight (8) cloves of chopped garlics add seven (7)cups of water and bring to boil., Eat and drink the boiled garlic water, overnight improvement and healing. Glad to share this.”
There are no vaccines or antiviral treatments that are recommended to prevent or treat the new coronavirus, according to the Centers for Disease Control and Prevention. Patients, however, can receive supportive care to treat their symptoms.
But the claim about garlic has spread widely enough that the WHO knocked it down, saying on a webpage dedicated to rumors about the virus: “Garlic is a healthy food that may have some antimicrobial properties. However, there is no evidence from the current outbreak that eating garlic has protected people from the new coronavirus.”
Garlic has a reputation for being antimicrobial and antiviral, according to a systematic review cited by the National Center for Complementary and Integrative Health, which researches alternative medicine. But that review included only one trial and found that there was insufficient evidence that garlic could prevent or treat a common cold, according to the NCCIH.
Problem with the votes
On Nov. 4, 2020, as several states continued to count votes in the 2020 U.S. presidential election, a rumor went viral on social media holding that Wisconsin had counted more votes (3,239,920) than it had registered voters (3,129,000). On Twitter, one user claimed that this was clear evidence of fraud.
The claim made in this tweet is false.
Wisconsin has not counted more votes than it has registered voters. This tweet is comparing the vote count from 2020 with the number of registered voters from 2018. When we take a look at Wisconsin’s current total of registered voters, we see that there is nothing fraudulent about the state’s count.
According to the Wisconsin Election Commission, the “State of Wisconsin had 3,684,726 active registered voters on November 1, 2020.” It’s unclear where the “3,239,920” number shown in the above-displayed tweet comes from. As of this writing, The New York Times reports that a total of “3,296,836” votes have been cast in Wisconsin. In either case, the number of votes counted does not exceed the number of registered voters.
So where did the “3,129,000 registered voters” statistic come from? The 2018 midterms.
According to data from the United States Census Bureau concerning “Voting and Registration in the Election of November 2018,” Wisconsin had 3,129,000 registered voters in 2018.


Bar charts can be combined in a similar way - putting bars for two different things on the same graph if they have similar scales, or putting two bar charts side by side if they have different scales. Here's a bar chart that shows the percentage of households that own 0, 1, 2, 3, 4, or 5+ vehicles in Great Britain and in the United States.
in-context


Two arrested in Cork theft and credit card fraud probe
by By Digital Desk staffTwo men have been arrested in Cork in relation to a theft from a van and a number of fraud incidents in the city that occurred in September.
A credit card was stolen from the van which was then used at a number of businesses in Cork, a garda spokesperson said.
The men in their late teens and early 20s, were both arrested last night.
They are currently detained at Mayfield Garda Station under Section 4 of the Criminal Justice Act, 1984.
The garda investigation is ongoing.
READ MORE
'Radical change is unavoidable' - RTÉ chair says change to TV licence fee needed


Before Change
assert uniq_spatial_size[i] >= max_spatial_win[i], \
"window size {} is larger than image size {}".format(
max_spatial_win[i], uniq_spatial_size[i])
max_coords[:, i] = np.random.randint(
0, max(uniq_spatial_size[i] - max_spatial_win[i], 1), n_samples)
// adjust max spatial coordinates based on each spatial window size
all_coordinates = {}
for mod in list(win_sizes):
After Change
indices_to_add = candidates_indices[list_indices[i]]
print(max_coords.shape, indices_to_add)
for s in range(0, N_SPATIAL):
max_coords[i, s] = indices_to_add[s] - np.floor(
spatial_win_sizes[0]/2)[s]
// for i in range(0, N_SPATIAL):
// assert uniq_spatial_size[i] >= max_spatial_win[i], \
// "window size {} is larger than image size {}".format(
// max_spatial_win[i], uniq_spatial_size[i])


@gogeo_io
Real-time Geo Aggregation
Total Count
{{ totalCount || "" | formatPercent:0}}
Crimes by Police District
{{ item.key | capitalize:true }}
{{ item.value | formatPercent:0 }} ( {{ item.percent | formatPercent:2 }}% )
23 Million Crimes Data from UK
Want develop an application like this?
Try
goGeo
and fork me at
Github.


Student, IIT Delhi
Delhi, India
<EMAIL_ADDRESS>Never Call me!
Skills
Programing Languages
Frameworks
Prog. Environment
Languages
C
Java
Python
Actually nothing...
Bachelor's Degree
12th Standard
10th Standard


To copy color from one area or object to another
- In the toolbox, click .
- Click the object whose color you want to copy.
- In the toolbox, click .
- Click the object or area where you want the new color.
Note
- To use a color as a background color, or to erase with a color that isn't in the color box, right-click the color in your picture.


[exploratory analysis] Job Hunting Like A Data Analyst (Part II)
Continued with previous post, I’ve added some additional lines of codes to fetch the job description of each job post. This will take a bit longer time, which is about (1.5 hour) for me, because I set a delay of ~10 seconds between each request.
This week I will continue with overview picture of the job market of Data Analyst and develop a simple recommender based on skill and experience requirement.
0. Tools
- python 2.7
- python package: pandas
- python package: re
1. Job Market Overview
data preparation:
After some time of web scraping, we will have a quite clean dataset, which consists of a big chunk of text job description. What I got is something like below:
Loading data is very simple in pandas compared with package csv.
import pandas as pd
csv_file='/Users/6chaoran/Desktop/sgJobs.csv'
# pandas csv loading
# similar with read_csv in R readr package
data=pd.read_csv(csv_file)
company overview
Let’s create a quick function to plot a bar chart showing the frequency of the companies that are hiring Data Analyst.
def freqPlot(df,col,title,n=20):
# value_counts in pandas is simlar with table() in R
# count each element in the Series
freqList=df[col].value_counts()
# I want to see the top 20 or less category
n=min(len(freqList),n)
freqList=freqList[:n]
freqList.sort()
# plot the horizontal barplot directly from the pandas DataFrame/Series
return freqList.plot(kind='barh',title=title)
Now we can just type
freqPlot(data,'company','company overview for Data Analyst job market')
to plot the chart like this:
Not surprisingly, mostly big IT companies and banks are hiring Data Analysts.
job title overview
Since we have already created the barplot function, we can make use of it to explore the other columns in the data frame.
The most common terms referred to a Data Analyst could be Business Analyst or Data Analyst, which are similar but actually difference in terms of job scope.
The Job title is very industry specialized. The categories could be further cleaned, but it requires some text processing tools and I don’t see much value from doing that.
experience requirement overview
There is a big chunk of text (Job Description) that we haven’t touched. So let’s get some useful information from that.
The experience requirement is usually statement in a sentence like “requires at least xx years of experience in xxx industry”. So my idea is catch the patter ‘xx years’ using regular expression, which can be used with re package in python.
some side notes of regular expression:
In regular expression,
.
means any single character, so I will use ‘….years’ pattern to catch either 1-9 years or 10+ years.[0-9]
means any number (from 0-9)^
inside[]
means negation
# load the regular expression package
import re
def getExperience(text):
# find all the '...years' patterns in the job description
years=re.findall('....years',text)
def yearToNumber(years):
try:
#remove non-numeric character and then convert to integer
return int(re.sub('[^0-9]','',years))
except:
return None
years=map(yearToNumber,years)
if len(years)>0:
return max(years)
else:
return None
# more than 20 years experience as the requirement looks unrealistic
# set to NA for the cases
data.loc[data.experience>20,'experience']=None
# plot the bar chart
freqPlot(data,'experience','experience requirement for Data Analyst')
skill requirement overview
To get the skills from the job description, we are going to something a bit more complicated.
1. tokenize the text
The principal idea to split the sentence by space, punctuation or other special character to get a bag of words, from which we can count the frequency, analyse the sentiment and some more.
import re
def cleanText(text):
# convert all characters to lowercase
text=text.lower()
# keep only numbers and alphabets,
# replace the others with space
text=re.sub('\W',' ',text)
# split the text with space
words=text.split(' ')
# return a list of the unique words
return list(set(words))
2. vectorize the feature
As I’ve been researching on data science for quite a while, I already have a list of skills that is frequently possessed by Data Analysts. Vectorization means to convert the skills requirement in each data record into the binary vector of the pre-defined skills. Let’s say the skills are defined as [‘excel’,’r’,’sql’,’python’]. If the job post only requires excel and sql, then it will be converted into vector[1,0,1,0].
Let’s put it into code:
def convertTextFeature(text,feature):
featureVector={}
for f in feature:
if f in text:
featureVector[f]=1
else:
featureVector[f]=0
return featureVector
3. aggregation
In order to find the popularity of the skills that are needed. We can simply find the summation of each skill.
# pre-defined skills
skills=['excel','r','sql','python','tableau','d3','qlikview','hadoop','matlab','scala','sas','spss']
# convert JD to a bag of words
words=data['JD'].map(cleanText)
# vectorize the skills in data record
featureSkill=pd.DataFrame([convertTextFeature(text,skills) for text in words])
# sum the skill across the row
skillList=featureSkill.sum(axis=0)
skillList.sort()
skillList.plot(kind='barh',title='the skill requirement for a data analyst')
The skills popularity is shown below:
Though there are a lot of advanced analytical software available in the market, Excel is still the most widely used tool. And after seeing this, I decide to pick up the SQL skills.
The data set can be found here.
The python code can be found here.


The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:
| GroupId | ArtifactId | Version | Type | License |
|---|---|---|---|---|
| com.github.davidmoten | xuml-model-compiler-runtime | 0.1-SNAPSHOT | jar | The Apache Software License, Version 2.0 |
The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:
| GroupId | ArtifactId | Version | Type | License |
|---|---|---|---|---|
| com.github.davidmoten | hibernate | 0.1-SNAPSHOT | pom | The Apache Software License, Version 2.0 |
| com.h2database | h2 | 1.3.168 | jar | The H2 License, Version 1.0 |
| junit | junit | 4.10 | jar | Common Public License Version 1.0 |
| org.apache.derby | derby | <IP_ADDRESS> | jar | Apache 2 |
| org.hsqldb | hsqldb | 2.2.8 | jar | HSQLDB License, a BSD open source license |
The following is a list of transitive dependencies for this project. Transitive dependencies are the dependencies of the project dependencies.
The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application:
| GroupId | ArtifactId | Version | Type | License |
|---|---|---|---|---|
| com.google.code.findbugs | jsr305 | 1.3.9 | jar | The Apache Software License, Version 2.0 |
| com.google.guava | guava | 11.0.2 | jar | The Apache Software License, Version 2.0 |
| com.typesafe | config | 1.2.1 | jar | Apache License, Version 2.0 |
| com.typesafe.akka | akka-actor_2.11 | 2.3.7 | jar | Apache License, Version 2.0 |
| org.hibernate.javax.persistence | hibernate-jpa-2.0-api | 1.0.0.Final | jar | license.txt |
| org.scala-lang | scala-library | 2.11.4 | jar | BSD 3-Clause |
The following is a list of test dependencies for this project. These dependencies are only required to compile and run unit tests for the application:
| GroupId | ArtifactId | Version | Type | License |
|---|---|---|---|---|
| antlr | antlr | 2.7.6 | jar | - |
| asm | asm | 3.1 | jar | - |
| backport-util-concurrent | backport-util-concurrent | 3.1 | jar | Public Domain |
| c3p0 | c3p0 | 0.9.1 | jar | GNU LESSER GENERAL PUBLIC LICENSE |
| cglib | cglib | 2.2 | jar | ASF 2.0 |
| commons-collections | commons-collections | 3.1 | jar | - |
| commons-logging | commons-logging | 1.0.4 | jar | /LICENSE.txt |
| dom4j | dom4j | 1.6.1 | jar | - |
| geronimo-spec | geronimo-spec-jta | 1.0.1B-rc4 | jar | - |
| javassist | javassist | 3.12.0.GA | jar | LGPL 2.1 |
| log4j | log4j | 1.2.14 | jar | The Apache Software License, Version 2.0 |
| net.sf.ehcache | ehcache | 1.5.0 | jar | The Apache Software License, Version 2.0 |
| net.sf.jsr107cache | jsr107cache | 1.0 | jar | - |
| org.hamcrest | hamcrest-core | 1.1 | jar | BSD style |
| org.hibernate | hibernate-c3p0 | 3.6.0.Beta2 | jar | GNU Lesser General Public License |
| org.hibernate | hibernate-commons-annotations | 3.2.0.Final | jar | GNU LESSER GENERAL PUBLIC LICENSE |
| org.hibernate | hibernate-core | 3.6.0.Beta2 | jar | GNU Lesser General Public License |
| org.hibernate | hibernate-ehcache | 3.6.0.Beta2 | jar | GNU Lesser General Public License |
| org.hibernate | hibernate-entitymanager | 3.6.0.Beta2 | jar | GNU Lesser General Public License |
| org.slf4j | slf4j-api | 1.5.8 | jar | - |
| org.slf4j | slf4j-log4j12 | 1.5.8 | jar | - |
Unamed: JPA 2.0 API
ASF 2.0: Code Generation Library
BSD style: Hamcrest Core
Public Domain: Backport of JSR 166
Apache 2: Apache Derby Database Engine and Embedded JDBC Driver
GNU LESSER GENERAL PUBLIC LICENSE: Hibernate Commons Annotations, c3p0:JDBC DataSources/Resource Pools
Unknown: ASM Core, AntLR, SLF4J API Module, SLF4J LOG4J-12 Binding, commons-collections, dom4j, geronimo-spec-jta, jsr107cache
Apache License, Version 2.0: akka-actor, config
LGPL 2.1: Javassist
The Apache Software License, Version 2.0: Ehcache Core, FindBugs-jsr305, Guava: Google Core Libraries for Java, Log4j, Logging, hibernate, xuml-model-compiler-runtime, xuml-model-compiler-test
GNU Lesser General Public License: Hibernate C3P0 ConnectionProvider, Hibernate Core, Hibernate Ehcache Integration, Hibernate Entity Manager
BSD 3-Clause: Scala Library
HSQLDB License, a BSD open source license: HyperSQL Database
The H2 License, Version 1.0: H2 Database Engine
Common Public License Version 1.0: JUnit


Tuesday, December 22nd, 2020
7:00pm to 8:30pm EST
Saba Zikaria
Former Software Dev @ Bosch
Shahriyar Nasir
Sr. Software Engineer @ Nulogy
Sandor Balo
Developer @ Shopify
Brandon Love
Software Developer
Nafeu Nasir
Software Engineer @ Tenjin
Radu Nicolae
Software Engineering Lead @ Pelmorex Corp
10 Minute Presentations, Side Projects, Technical Challenges, Video Game Development, Fullstack JavaScript, Edutech Automation, Coding Wisdom, Grocery Tracking, Typing Tests, Journies Through Software, Community Building, Dealing with Remote Work In Covid, and more...
Join Zoom Meeting
Meeting ID:
966 6113 1354
Find your local number.
Add to Calendar
12/22/2020 07:00 PM
12/22/2020 08:30 PM
America/Toronto
Introspective Code - Lightning Talks
10 Minute Lightning Talks By Talented Developers From The Introspective Code Community
Join Zoom Meeting
https://nulogy.zoom.us/j/96661131354
Meeting ID: 966 6113 1354
Find your local number: https://nulogy.zoom.us/u/acFzozZoQm
Zoom Call


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/leanpkg.20breaks.20my.20mathlib.html ---
buzzard@bob:~/Lean/lean-projects/xena-UROP-2018$ more leanpkg.toml [package] name = "xena-UROP-2018" version = "0.1" lean_version = "3.4.1" path = "src" [dependencies] mathlib = {git = "https://github.com/leanprover/mathlib", rev = "c8ad5cfd793153bff38c49c54940f04d86cb7616"} buzzard@bob:~/Lean/lean-projects/xena-UROP-2018$ # commit number is mathlib HEAD buzzard@bob:~/Lean/lean-projects/xena-UROP-2018$ leanpkg upgrade mathlib: trying to update _target/deps/mathlib to revision c8ad5cfd793153bff38c49c54940f04d86cb7616 > git checkout --detach c8ad5cfd793153bff38c49c54940f04d86cb7616 # in directory _target/deps/mathlib Previous HEAD position was a30b7c7... feat(data/string): fix string_lt, add repr for multiset, pnat HEAD is now at c8ad5cf... fix(computability/turing_machine): fix import configuring xena-UROP-2018 0.1 mathlib: trying to update _target/deps/mathlib to revision a30b7c773db17cf7d1b551ba0f24645079296628 > git checkout --detach a30b7c773db17cf7d1b551ba0f24645079296628 # in directory _target/deps/mathlib Previous HEAD position was c8ad5cf... fix(computability/turing_machine): fix import HEAD is now at a30b7c7... feat(data/string): fix string_lt, add repr for multiset, pnat buzzard@bob:~/Lean/lean-projects/xena-UROP-2018$ more leanpkg.toml [package] name = "xena-UROP-2018" version = "0.1" lean_version = "3.4.1" path = "src" [dependencies] mathlib = {git = "https://github.com/leanprover/mathlib", rev = "a30b7c773db17cf7d1b551ba0f24645079296628"} buzzard@bob:~/Lean/lean-projects/xena-UROP-2018$ # mathlib now a commit from 19 days ago which doesn't compile buzzard@bob:~/Lean/lean-projects/xena-UROP-2018$
My leanpkg.toml
for a Xena project repo on GH seems to want to use commit a30b7c773db17cf7d1b551ba0f24645079296628
of mathlib, which does not compile. I can edit leanpkg.toml
manually and point it at the mathlib revision I want, but leanpkg upgrade
then rolls it back. What am I doing wrong?
$ lean --version Lean (version 3.4.1, commit 17fe3decaf8a, Release)
I tried cloning and typing leanpkg upgrade
and leanpkg
changed the toml to the latest update.
I've pushed, so it might work now
This does not fix it for me.
I just cloned and ran leanpkg upgrade
"Have you tried turning bob
off and on again"
are you serious?
Who's bob?
His computer
I saw this behaviour on Luca's mac yesterday
and I'm now experiencing it myself on linux
I guess Chris is running Windows...?
Correct.
I cloned and ran leanpkg upgrade
and I'm back to a30b7c7
which doesn't compile
Hmm, and you both have the same version of Lean, hence the same leanpkg, right?
I can't guarantee that we're using the same version of Lean.

Mathlib branch 3.4.1 which Mario didn't want to make -- he has clearly decided to get his own back by pointing it at the a30b7c7
commit and leaving it there!
@Mario Carneiro help! Can you change the 3.4.1
branch of mathlib to something which compiles?
So the issue is that you're version wants to use the 3.4.1
branch and my version wants to use master?
Maybe.
The underlying issue is that I want everyone (except people like you who know what they're doing) to be using the exact same version of Lean and mathlib.
Because that is the sane way to proceed, in my opinion.
Why are there two identical branches anyway?
Same answer.
I want to tell my users "download Lean 3.4.1 and mathlib 3.4.1" and I want the consequence of this to be that everyone downloads the same thing
Mario says "mathlib does not work like this, I will not release a 3.4.1"
The compromise was that he released a 3.4.1 branch and used to keep it up to date with mathlib HEAD but maybe he forgot to do this recently and unfortunately we've settled on a version of mathlib which doesn't compile.
That's not really necessary until master uses 3.4.2
is it?
Actually I left 3.4.1
branch there because Leo pushed a commit on lean repo after that, so technically master
is back on nightlies
Chris -- currently when my users say "what version of Lean should I download"? I say "3.4.1 stable, here's the link" and when they say "what version of mathlib should I download" I say "don't worry about mathlib, let leanpkg do the magic for you".
and currently the magic it does is that it downloads a broken version
It should be a working version though
It has a red X on the list of commits and I just failed to compile it.
just pick a working version
Which version of Lean should I be using with it? 3.4.1 stable as advertised here: https://github.com/leanprover/lean/releases/tag/v3.4.1 ?
Kenny it's not as simple as that. I can get it working myself, it's my users that are having problems.
I see
Currently if you follow the readme here
https://github.com/ImperialCollegeLondon/xena-UROP-2018/blob/master/README.md
then compilation of mathlib fails
Oh, I see what you mean
fixed
Many thanks for the prompt work!
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


Pomodoro Clock
Session length:
Use this to set the session length
-
25
+
Break length
Use this to set the break length
-
5
+
Session
25:00
Start
Reset


Ticket #255 (new defect)
ez_map2 fails for solvers
| Reported by: | mmckerns | Owned by: | mmckerns |
|---|---|---|---|
| Priority: | minor | Milestone: | mystic-0.3a |
| Component: | pathos | Keywords: | |
| Cc: |
Description
ez_map2 fails for solvers. Throws traceback ending which includes:
File "./tmp-XBI61.py", line 3, in function_wrapper return function(_x) + penalty_function(_x) NameError: global name 'function' is not defined
Change History
comment:2 Changed 3 years ago by mmckerns
point of failure seems to stem from mystic.tools.wrap_penalty:
def wrap_penalty(function, penalty_function): """append a function call to a function object This is useful for binding a penalty function to a cost function; thus, the penalty will be evaluated at every cost function evaluation. """ def function_wrapper(x): _x = x[:] #XXX: trouble if x not a list or ndarray... maybe "deepcopy"? return function(_x) + penalty_function(_x) return function_wrapper
comment:3 Changed 18 months ago by mmckerns
Here is the traceback from Mpi(nodes, source=True).map:
>>> from mystic.solvers import * >>> def squared(x): ... return sum(xi**2 for xi in x) ... >>> from pyina.launchers import Mpi >>> p = Mpi(8, source=True).map >>> >>> solver = DifferentialEvolutionSolver2(3) >>> solver.SetMapper(p) >>> solver.Solve(squared) Traceback (most recent call last): File "/Users/mmckerns/bin/ezpool.py", line 4, in <module> __import__('pkg_resources').run_script('pyina==0.2a1.dev', 'ezpool.py') File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 534, in run_script self.require(requires)[0].run_script(script_name, ns) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 1438, in run_script execfile(script_filename, namespace, namespace) File "/Users/mmckerns/lib/python2.7/site-packages/pyina-0.2a1.dev-py2.7.egg/EGG-INFO/scripts/ezpool.py", line 44, in <module> module = __import__(modname) File "/Users/mmckerns/dev/svn/mystic/mystic/tests/tmp2mqnbx.py", line 12, in <module> penalty_function = self._penalty = lambda x: 0.0 NameError: name 'self' is not defined Traceback (most recent call last): File "/Users/mmckerns/bin/ezpool.py", line 4, in <module> __import__('pkg_resources').run_script('pyina==0.2a1.dev', 'ezpool.py') File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 534, in run_script self.require(requires)[0].run_script(script_name, ns) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 1438, in run_script execfile(script_filename, namespace, namespace) File "/Users/mmckerns/lib/python2.7/site-packages/pyina-0.2a1.dev-py2.7.egg/EGG-INFO/scripts/ezpool.py", line 44, in <module> module = __import__(modname) File "/Users/mmckerns/dev/svn/mystic/mystic/tests/tmp2mqnbx.py", line 12, in <module> penalty_function = self._penalty = lambda x: 0.0 NameError: name 'self' is not defined Traceback (most recent call last): File "/Users/mmckerns/bin/ezpool.py", line 4, in <module> __import__('pkg_resources').run_script('pyina==0.2a1.dev', 'ezpool.py') File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 534, in run_script self.require(requires)[0].run_script(script_name, ns) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 1438, in run_script execfile(script_filename, namespace, namespace) File "/Users/mmckerns/lib/python2.7/site-packages/pyina-0.2a1.dev-py2.7.egg/EGG-INFO/scripts/ezpool.py", line 44, in <module> module = __import__(modname) File "/Users/mmckerns/dev/svn/mystic/mystic/tests/tmp2mqnbx.py", line 12, in <module> penalty_function = self._penalty = lambda x: 0.0 NameError: name 'self' is not defined Traceback (most recent call last): File "/Users/mmckerns/bin/ezpool.py", line 4, in <module> __import__('pkg_resources').run_script('pyina==0.2a1.dev', 'ezpool.py') File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 534, in run_script self.require(requires)[0].run_script(script_name, ns) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 1438, in run_script execfile(script_filename, namespace, namespace) File "/Users/mmckerns/lib/python2.7/site-packages/pyina-0.2a1.dev-py2.7.egg/EGG-INFO/scripts/ezpool.py", line 44, in <module> module = __import__(modname) File "/Users/mmckerns/dev/svn/mystic/mystic/tests/tmp2mqnbx.py", line 12, in <module> penalty_function = self._penalty = lambda x: 0.0 NameError: name 'self' is not defined Traceback (most recent call last): File "/Users/mmckerns/bin/ezpool.py", line 4, in <module> __import__('pkg_resources').run_script('pyina==0.2a1.dev', 'ezpool.py') File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 534, in run_script self.require(requires)[0].run_script(script_name, ns) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 1438, in run_script execfile(script_filename, namespace, namespace) File "/Users/mmckerns/lib/python2.7/site-packages/pyina-0.2a1.dev-py2.7.egg/EGG-INFO/scripts/ezpool.py", line 44, in <module> module = __import__(modname) File "/Users/mmckerns/dev/svn/mystic/mystic/tests/tmp2mqnbx.py", line 12, in <module> penalty_function = self._penalty = lambda x: 0.0 NameError: name 'self' is not defined Traceback (most recent call last): File "/Users/mmckerns/bin/ezpool.py", line 4, in <module> __import__('pkg_resources').run_script('pyina==0.2a1.dev', 'ezpool.py') File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 534, in run_script self.require(requires)[0].run_script(script_name, ns) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 1438, in run_script execfile(script_filename, namespace, namespace) File "/Users/mmckerns/lib/python2.7/site-packages/pyina-0.2a1.dev-py2.7.egg/EGG-INFO/scripts/ezpool.py", line 44, in <module> module = __import__(modname) File "/Users/mmckerns/dev/svn/mystic/mystic/tests/tmp2mqnbx.py", line 12, in <module> penalty_function = self._penalty = lambda x: 0.0 NameError: name 'self' is not defined Traceback (most recent call last): File "/Users/mmckerns/bin/ezpool.py", line 4, in <module> __import__('pkg_resources').run_script('pyina==0.2a1.dev', 'ezpool.py') File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 534, in run_script self.require(requires)[0].run_script(script_name, ns) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 1438, in run_script execfile(script_filename, namespace, namespace) File "/Users/mmckerns/lib/python2.7/site-packages/pyina-0.2a1.dev-py2.7.egg/EGG-INFO/scripts/ezpool.py", line 44, in <module> module = __import__(modname) File "/Users/mmckerns/dev/svn/mystic/mystic/tests/tmp2mqnbx.py", line 12, in <module> penalty_function = self._penalty = lambda x: 0.0 NameError: name 'self' is not defined Traceback (most recent call last): File "/Users/mmckerns/bin/ezpool.py", line 4, in <module> __import__('pkg_resources').run_script('pyina==0.2a1.dev', 'ezpool.py') File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 534, in run_script self.require(requires)[0].run_script(script_name, ns) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources.py", line 1438, in run_script execfile(script_filename, namespace, namespace) File "/Users/mmckerns/lib/python2.7/site-packages/pyina-0.2a1.dev-py2.7.egg/EGG-INFO/scripts/ezpool.py", line 44, in <module> module = __import__(modname) File "/Users/mmckerns/dev/svn/mystic/mystic/tests/tmp2mqnbx.py", line 12, in <module> penalty_function = self._penalty = lambda x: 0.0 NameError: name 'self' is not defined =================================================================================== = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES = PID 73982 RUNNING AT hilbert.local = EXIT CODE: 1 = CLEANING UP REMAINING PROCESSES = YOU CAN IGNORE THE BELOW CLEANUP MESSAGES ===================================================================================
comment:4 Changed 18 months ago by mmckerns
- Milestone changed from mystic-0.2a2 to mystic-0.3a
This is now a "somewhat deprecated" parallel map in pyina, and the above example does work for source=False, which is the default. This should be included as part of a test suite for solver interactions with pathos/pyina (see #210).
Note: See
TracTickets for help on using
tickets.
ez_map2 is equivalent to Mpi( nodes, source=True ).map... which exhibits similar defect


TURBULENCE A film review by Steve Rhodes Copyright 1997 Steve Rhodes
RATING (0 TO ****): 1/2
After seeing an ad of an airplane in a thunderstorm, readers might accidentally believe that the name of the movie TURBULENCE refers to some atmospheric condition. After enduring all of this NIGHTMARE ON ELM STREET meets AIRPORT, I can correct this misconception. The title refers to the state of mind of writers Jonathan Brett, Steven E. De Souza, and John Herzfeld when they composed the script.
I would like to issue a challenge to viewers of this film by director Robert Butler. Why don't you take along an abacus and try to count the number of actions that either make no sense or are just outright ludicrous? I lost track, but I know the number is in the high double digits.  If you are worried about my giving away part of the plot, I will probably not tell you much more than the trailers, but I will use many examples to illustrate my points.
Detective Hines (Hector Elizondo) has tracked down serial killer Ryan Weaver (Ray Liotta). Although Weaver is supposed to have raped and murdered five women and killed several cops, there is a question of whether Hines has planted evidence, and there is a hint of a possible Internal Affairs investigation.  (Don't forget to count.)
Weaver and another, much slimier looking criminal named Stubbs, played with all the finesse of a wrestling star by Brendan Gleeson, are being extradited to LA. They are flown across the country on a 747 commercial airplane.  The script is so bad that I was laughing very loudly at all the wrong places.
Here is a question for you. You are sitting in a plane seat.  Out of them jump several marshals with large guns, bringing two prisoners in chains to ride in the aircraft with you. Now, do you walk or run for the nearest exit? Trick question. You stay of course.
I have lots more questions for you. Let's say you are a federal marshal and your prisoner goes to the bathroom. Do you think it is necessary to keep a close eye on him?
Soon there will be a gunfight. Holes are blown in the plane that miraculously will later seem to self-repair, but before they do, the plane will start losing control. Here are two of my favorites questions. If you are a flight attendant, do you think you might want to call the captain to tell him what is going on? And if you are the last person left flying the plane and the plane is on the verge of free-fall, do you think you'd take off your seat belt to roam around the plane to check on the rest of flight crew?
When most of the people on the plane are murdered, who is looked upon first to provide leadership? The friendly serial killer of course. As you may guess, this misguided trust will soon pass and the real hero of the tale will emerge, flight attendant Teri. She will go to the cockpit and fly the plane. Well, that is when she isn't trying to be Sigourney Weaver to Liotta's rendition of the monster. This shamelessly manipulative story titillates the audience with a never-to-be sex scene as a prelude to more violence.
The only part of the show that works has the plane heading through the thunderstorm while crisis control in LA is helping our poor heroine. Rachel Ticotin plays Rachel, the leader of the crisis center. She tries to reassure Teri by telling her, "You are flying the most sophisticated plane ever built." "Yes, but what if this sophisticated plane," asks Teri, "flies into an unsophisticated storm?"
Of all of the flaws in the show, my favorite is when Weaver is outside the thin wooden cockpit door trying to enter. Does he break it down? No, he tries to talk Teri into coming out. The piece de resistance is the crisis control center's attitude.  She leaves to walk over all the dead bodies. Surprise, he is out there lurking in wait for her. And surprise, the scene is lifted straight out of a schlock horror film.
Halfway through this abysmal picture, I began to think of the Roman emperors. I wanted so bad to stand up, turn my thumbs down, and yell, "kill 'em all."
Let me leave you with the question that Weaver asks Teri: "You are a convicted inmate on death row. What five albums would you pick?"
TURBULENCE runs 1:43. It is rated R for gory violence, implied rape, and profanity. The show would probably be okay for older teenagers who like horror flicks. I hated this movie and recommend everyone avoid it. I give it 1/2 of a star for the special effects.
**** = A must see film. *** = Excellent show. Look for it. ** = Average movie. Kind of enjoyable. * = Poor show. Don't waste your money. 0 = Totally and painfully unbearable picture.
REVIEW WRITTEN ON: January 10, 1997
Opinions expressed are mine and not meant to reflect my employer's.
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


*Celebrate Cyber Monday: *Shop Online at the Feminist Store and Save!*
[ http://store.feminist.org/ ]
All online purchases over $50 today come with a FREE digital subscription to “Ms.” magazine! Plus, it’s your last chance to save 20% at checkout by using the code *PINKFRIDAY14*. All purchases until December 10 are guaranteed to arrive in time for the holidays!
SHOP NOW: [ http://store.feminist.org/ ]
You have received this e-mail because of your interest in women’s issues. To unsubscribe, please click on the link below.


Converted to a webpage from a tweet by @Submarineering Unknown flower in the order sepalLength, sepalWidth, petalLength, petalWidth Looking for 75% confidence level


Dalton Valliere
Home
About Me
Tools
Resume
Git
Coffee Ratios
Escape Strings
Other Thing
Coffee to Water Ratio
1:15
1:16
1:17
1:18
1:19
Pour Over Water (mL)
Grounds (g)
Input Text
Output Text
Sorry I really don't need that many tools


8.0 Introduction
- In the last few chapters => how systems handle things going wrong
- However, even though we have talked a lot about faults, the last few chapters have still been too optimistic
- The reality is even darker
- we will now turn our pessimism to the maximum and assume that anything that can go wrong will go wrong
- In this chapter
- we will get a taste of the problems that arise in practice
- and understanding of the things we can and cannot rely on
- we must understand what challenges we are up against
- Next chapter,
- In spite of everthing going wrong, our task as engineers is to build systems that do their job (i.e, meet the guarantees that users are expecting)
- We will look at some examples of algorithms that can provide such guarantees in a distributed systems
8.1 Faults and Partial Failures
- When you are writing a program on a single computer, it normally behaves in a fairly predictable way : either it works or it doesn’t
- When you are writing software that runs on several computers, connected by a network, the situation is fundamentally different.
- Partial failure : In a distributed system, there may well be some parts of the system that are broken in some unpredictable way, even though other parts of the system are working fine
- Nondeterministic : if you try to do anything involving multiple nodes and the network, it may sometimes work and sometimes unpredictably fail.
- This non-determinism and possibility of partial failures is what makes distributed systems hard to work with.
8.1.1 Cloud Computing and Supercomputing
- philosophies on how to build large-scale computing systems:
- Cloud Computing : commodity computers connected with and IP network
- HPC (high-performance computing) : super computers with thousands of CPUs
- In a super-computer : If one node fails, a common solution is to simply stop the entire cluster workload. After the faulty node is repaired, the computation is restarted from the last checkpoint. => A supercomputer is more like a single-node computer than a distributed system.
- we must accept the possibility of partial failure and build fault-tolerance mechanisms into the software. In other words, we need to build a reliable system from unreliable components.
8.2 Unreliable Networks
-
The distributed systems we focus on in this book are shared-nothing systems: i.e., a bunch of machines connected by a network
-
The internet and most internal networks in datacenters are asynchronous packet networks.
=> one node can send a message (a packet) to another node, but the network gives no guarantees as to when it will arrive or whether it will arrive at all.
=> If you send a request and expect a response, many things could go wrong.
-
The sender can’t even tell whether the packet was delivered: the only option is for the recipient to send a response message, which may in turn be lost or delayed.
-
The usual way of handling this issue is a timeout: after some time you give up waiting and assume that the response is not going to arrive.
8.2.1 Network Faults in Practice
- We have been building computer networks for decades—one might hope that by now we would have figured out how to make them reliable. => However, it seems that we have not yet succeeded.
- network problems can be surprisingly common => medium-sized datacenter found about 12 faults/month
- Even if network faults are rare in your environment, the fact that faults can occur means that your software needs to be able to handle them
8.2.2 Detecting Faults
- Many systems need to automatically detect faulty nodes
- ex) In a distributed DB with single-leader replication, if the leader fails, one of the followers needs to be promoted to be the new leader
- the uncertainty about the network makes it difficult to tell whether a node is working or not
8.2.3 Timeouts and Unbounded Delays
-
If a timeout is the only sure way of detecting a fault, then how long should the time‐out be? : “Failure detection delay” vs “risk of premature timeouts”
- A long timeout : a long wait until a node is declared dead
- A short timeout : detects faults faster, but carries a higher risk of incorrectly declaring a node dead
- When a node is declared dead, its responsibilities need to be transferred to other nodes,
- => places additional load on other nodes and the network.
- => If the system is already struggling with high load, declaring nodes dead prematurely can make the problem worse.
-
A fictious system with maximum delay $d$, guarantee that a non-failed node always handles a request within some time $r$, => $2d+r$ would be a reasonable timeout to use
-
Unfortunately, most systems we work with have neither of those guarantees: asynchronous networks have unbounded delays (that is, they try to deliver packets as quickly as possible, but there is no upper limit on the time it may take for a packet to arrive),
-
rather than using configured constant timeouts, systems can continually measure response times and their variability (jitter), and automatically adjust time‐outs according to the observed response time distribution. (Phi Accural failure detector used in Akka and Cassandra)
8.3 Unreliable Clocks (287p)
-
Clocks and time are important. Applications depend on clocks in various ways to answer questions like the following:
-
Has this request timed out yet?
-
What’s the 99th percentile response time of this service?
-
How many queries per second did this service handle on average in the last fiveminutes?

-
-
Each machine on the network has its own clock, which is an actual hardware device: usually a quartz crystal oscillator. These devices are not perfectly accurate, so each machine has its own notion of time, which may be slightly faster or slower than on other machines.
8.3.1 Time-of-Day Clocks vs Monotonic
-
Time of Day clocks : does what you intuitively expect of a clock: it returns the current date and time according to some calendar
- clock_gettime(CLOCK_REALTIME) on Linux System.currentTimeMillis() in Java
- return the number of seconds since the epoch: midnight UTC on January 1, 1970
- usually synchronized with NTP (Network Time Protocol), which means that a time‐stamp from one machine (ideally) means the same as a timestamp on another machine.
- if the local clock is too far ahead of the NTP server, it maybe forcibly reset and appear to jump back to a previous point in time => make time-of-day clocks unsuitable for measuring elapsed time
-
Monotonic clocks : are guaranteed to always move forward
- A monotonic clock is suitable for measuring a duration, such as a timeout or a service’s response time
- clock_gettime(CLOCK_MONOTONIC) on Linux and System.nanoTime() in Java time.monotonic() in python
- By default, NTP allows the clock rate to be speeded up or slowed down by up to 0.05%, but NTP cannot cause the monotonic clock to jump forward or backward.
8.3.2 Clock Synchronization and Accuracy
- Monotonic clocks don’t need synchronization, but time-of-day clocks need to be set according to an NTP server
- Unfortunately, our methods for getting a clock to tell the correct time aren’t nearly as reliable or accurate as you might hope
- It is possible to achieve very good clock accuracy if you care about it sufficiently to invest significant resources. (e.g. financial institutions, trading funds)
- Such accuracy can be achieved using GPS receivers, and careful deployment and monitoring. However, it requires significant effort and expertise, and there are plenty of ways clock synchronization can go wrong.
8.3.3 Relying on Synchronized Clocks
- Although clocks work quite well most of the time, robust software needs to be prepared to deal with incorrect clocks
- However incorrect clockes easily go unnoticed. If its quartz clock is defective or its NTP client is misconfigured, most things will seem to work fine, even though its clock gradually drifts further and further away from reality.
- Timestamps for ordering events : (Figure 8-3)
- Clock readings have a confidence interval
- Thus, it doesn’t make sense to think of a clock reading as a point in time - it is more like a range of times,
- Google’s TrueTime API (Spanner) explicitly reports the confidence interval on the local clock. => returns [earliest, latest]
8.3.4 Process Pauses
- Let’s consider another example of dangerous clock use in a distributed system.
- What if there is an unexpected pause in the execution of the program?
- leader paused => another leader take over => previous leader resumed
- Is it crazy to assume that a thread might be paused for so long? Unfortunately not. There are various reasons why this could happen:
- Garbage collector (GC) that occasionally needs to stop all running threads.
- In virtualized environments, a virtual machine can be suspended and resumed
- If the application performs synchronous disk access, a thread may be paused waiting for a slow disk I/O operation to complete
- A Unix process can be paused by sending it the SIGSTOP signal, for example bypressing Ctrl-Z in a shell
- When writing multi-threaded code on a single machine, we have fairly good tools for making it thread-safe: mutexes, semaphores, atomic counters, lock-free data structures, blocking queues, and so on. Unfortunately, these tools don’t directly translate to distributed systems
- A node in a distributed system must assume that its execution can be paused for a significant length of time at any point, even in the middle of a function. During the pause, the rest of the world keeps moving and may even declare the paused node dead because it’s not responding.
- Response time guarantees : requires a large amount of additional work and severely restricts the range of programming languages, libraries, and tools that can be used
- Limiting the impact of garbage collection : The negative effects of process pauses can be mitigated without resorting to expensive real-time scheduling guarantees.
GC 같은 이유로 process가 멈추면 문제가 될 수 있다. 이를 해결하기 위해, response time 을 guarantee 하도록 개발하는것은 expensive 하고 restrict도 많아 비현실적이고, 대신 memory 사용률을 체크하는 것만으로도 GC로 인한 pause를 예방할 수 있다.
8.4 Knowledge, Truth, and Lies
- In the rest of this chapter, we will further explore the notions of knowledge and truth in distributed systems, which will help us think about the kinds of assumptions we can make and the guarantees we may want to provide.
8.4.1 The Truth is Defined by the Majority
-
Imagine a network with an asymmetric fault:
- a node is able to receive all messages sent to it, but any outgoing messages are dropped or delayed
- After some timeout, the other nodes declare it dead,
- the semi-disconnected node is dragged to the graveyard, kicking and screaming “I’m not dead!”— but since nobody can hear its screaming, the funeral procession continues with stoic determination.
-
The moral of these stories is that a node cannot necessarily trust its own judgment of a situation. => Instead, many distributed algorithms rely on a quorum, that is, voting among the nodes
-
The leader and the lock : Frequently, a system requires there to be only one of some thing. (one node is allowed to be the leader)
- Implementing this in a distributed system requires care:
- even if a node believes that it is “the chosen one” that doesn’t necessarily mean a quorum of nodes agrees!
- A node may have formerly been the leader, but if the other nodes declared it dead in the meantime it may have been demoted and another leader may have already been elected. (Fig8-4)
-
Fencing tokens : When using a lock or lease to protect access to some resource, such as the file storage in Figure 8-4, we need to ensure that a node that is under a false belief of being “the chosen one” cannot disrupt the rest of the system. A fairly simple technique that achieves this goal is called fencing, and is illustrated in Figure 8-5.
어떠한 이유로 죽은 older token 의 소지자가 storage에 접근할 수 없도록 lease 를 몇번이나 해줬는지 알 수 있도록 기록
8.4.2 Byzantine Faults
- Fencing tokens can detect and block a node that is inadvertently acting in error.
- However, if the node deliberately wanted to subvert the system’s guarantees, it could easily do so by sending messages with a fake fencing token.
- Byzantine fault : nodes may lie
- if a node may claim to have received a particular message when in fact it didn’t.
- This concern is relevant in certain specific circumstances. For example:
- in aerospace environments, the data in a computer’s memory or CPU register could become corrupted by radiation,
- multiple participating organizations, some participants may attempt to cheat or defraud others.
- Weak forms of lying : it can be worth adding mechanisms to guard against weak forms of lying
8.4.3 System Model and Reality
-
Many algorithms have been designed to solve distributed systems problems—in Chapter 9.
-
We somehow formalize the kinds of faults that we expect to happen in a system. We do this by defining a system model, which is an abstraction that describes what things an algorithm may assume.
-
With regard to timing assumptions, three system models are in common use
- Synchronous model : assumes bounded network delay, bounded process pau‐ses, and bounded clock error
- Partially synchronous model : behaves like a synchronous system most ofthe time, but it sometimes exceeds the bounds for network delay, process pauses,and clock drift : realistic model
- Asynchronous model : is not allowed to make any timing assumptions
-
Consider node failures.
- Crash-stop faults : node may suddenly stop responding at any moment, and thereafter that node is gone forever
- Crash-recovery faults : nodes may crash at any moment, and perhaps start responding again after some unknown time.
- Byzantine (arbitrary) faults : Nodes may do absolutely anything, including trying to trick and deceive other nodes,
-
Correctness : An algorithm is correct in some system model if it always satisfies its properties in all situations that we assume may occur in that system model.
-
If we are generating fencing tokens for a lock we may require the algorithm to have the following properties:
- Uniqueness: No two requests for a fencing token return the same value.
- Monotonic sequence : If request x returned token tx, and request y returned token ty, and x completed before y began, then tx < ty.
- Availability: A node that requests a fencing token and does not crash eventually receives a response.
-
Safety and liveness : uniqueness and monotonic sequence are safety properties, but availability is a liveness property
-
Mapping system models to the real world : when implementing an algorithm in practice, the messy facts of reality come back to bite you again, and it becomes clear that the system model is a simplified abstraction of reality.
이러한 property들을 바탕으로 system model 의 correctness를 판단 => 현실적으로는 어렵지만, 놓치기 쉬운 문제들을 찾아내는데 도움.
Summary
-
In this chapter, we have discussed a wide range of problems that can occur in distributed systems, including:
- Sended packet over the network, may be lost or delayed.
- A node’s clock may be significantly out of sync with other node
- A process may pause for a substantial amount of time at any point in its execution
-
we try to build tolerance of partial failures into software, so that the system as a whole may continue functioning even when some of its constituent parts are broken.
-
To tolerate faults, the first step is to detect them,
- most distributed algorithms rely on timeouts to determine whether a remote node is still available.
-
Once a fault is detected, making a system tolerate is not easy either: no global variable, no shared memory, no common knowledge
-
This chapter has been all about problems, and has given us a bleak outlook. In the next chapter we will move on to solutions, and discuss some algorithms that have been designed to cope with all the problems in distributed systems.