| PostgreSQL 9.0.10 Documentation | ||||
|---|---|---|---|---|
| Prev | Up | Chapter 5. Data Definition | Next |
Data types are a way to limit the kind of data that can be stored in a table. For many applications, however, the constraint they provide is too coarse. For example, a column containing a product price should probably only accept positive values. But there is no standard data type that accepts only positive numbers. Another issue is that you might want to constrain column data with respect to other columns or rows. For example, in a table containing product information, there should be only one row for each product number.
To that end, SQL allows you to define constraints on columns and tables. Constraints give you as much control over the data in your tables as you wish. If a user attempts to store data in a column that would violate a constraint, an error is raised. This applies even if the value came from the default value definition.
A check constraint is the most generic constraint type. It allows you to specify that the value in a certain column must satisfy a Boolean (truth-value) expression. For instance, to require positive product prices, you could use:
CREATE TABLE products ( product_no integer, name text, price numeric CHECK (price > 0) );
As you see, the constraint definition comes after the data type, just like default value definitions. Default values and constraints can be listed in any order. A check constraint consists of the key word CHECK followed by an expression in parentheses. The check constraint expression should involve the column thus constrained, otherwise the constraint would not make too much sense.
You can also give the constraint a separate name. This clarifies error messages and allows you to refer to the constraint when you need to change it. The syntax is:
CREATE TABLE products ( product_no integer, name text, price numeric CONSTRAINT positive_price CHECK (price > 0) );
So, to specify a named constraint, use the key word CONSTRAINT followed by an identifier followed by the constraint definition. (If you don't specify a constraint name in this way, the system chooses a name for you.)
A check constraint can also refer to several columns. Say you store a regular price and a discounted price, and you want to ensure that the discounted price is lower than the regular price:
CREATE TABLE products ( product_no integer, name text, price numeric CHECK (price > 0), discounted_price numeric CHECK (discounted_price > 0), CHECK (price > discounted_price) );
The first two constraints should look familiar. The third one uses a new syntax. It is not attached to a particular column, instead it appears as a separate item in the comma-separated column list. Column definitions and these constraint definitions can be listed in mixed order.
We say that the first two constraints are column constraints, whereas the third one is a table constraint because it is written separately from any one column definition. Column constraints can also be written as table constraints, while the reverse is not necessarily possible, since a column constraint is supposed to refer to only the column it is attached to. (PostgreSQL doesn't enforce that rule, but you should follow it if you want your table definitions to work with other database systems.) The above example could also be written as:
CREATE TABLE products ( product_no integer, name text, price numeric, CHECK (price > 0), discounted_price numeric, CHECK (discounted_price > 0), CHECK (price > discounted_price) );
or even:
CREATE TABLE products ( product_no integer, name text, price numeric CHECK (price > 0), discounted_price numeric, CHECK (discounted_price > 0 AND price > discounted_price) );
It's a matter of taste.
Names can be assigned to table constraints in the same way as column constraints:
CREATE TABLE products ( product_no integer, name text, price numeric, CHECK (price > 0), discounted_price numeric, CHECK (discounted_price > 0), CONSTRAINT valid_discount CHECK (price > discounted_price) );
It should be noted that a check constraint is satisfied if the check expression evaluates to true or the null value. Since most expressions will evaluate to the null value if any operand is null, they will not prevent null values in the constrained columns. To ensure that a column does not contain null values, the not-null constraint described in the next section can be used.
A not-null constraint simply specifies that a column must not assume the null value. A syntax example:
CREATE TABLE products ( product_no integer NOT NULL, name text NOT NULL, price numeric );
A not-null constraint is always written as a column constraint. A not-null constraint is functionally equivalent to creating a check constraint CHECK (column_name IS NOT NULL), but in PostgreSQL creating an explicit not-null constraint is more efficient. The drawback is that you cannot give explicit names to not-null constraints created this way.
Of course, a column can have more than one constraint. Just write the constraints one after another:
CREATE TABLE products ( product_no integer NOT NULL, name text NOT NULL, price numeric NOT NULL CHECK (price > 0) );
The order doesn't matter. It does not necessarily determine in which order the constraints are checked.
The NOT NULL constraint has an inverse: the NULL constraint. This does not mean that the column must be null, which would surely be useless. Instead, this simply selects the default behavior that the column might be null. The NULL constraint is not present in the SQL standard and should not be used in portable applications. (It was only added to PostgreSQL to be compatible with some other database systems.) Some users, however, like it because it makes it easy to toggle the constraint in a script file. For example, you could start with:
CREATE TABLE products ( product_no integer NULL, name text NULL, price numeric NULL );
and then insert the NOT key word where desired.
Tip: In most database designs the majority of columns should be marked not null.
Unique constraints ensure that the data contained in a column or a group of columns is unique with respect to all the rows in the table. The syntax is:
CREATE TABLE products ( product_no integer UNIQUE, name text, price numeric );
when written as a column constraint, and:
CREATE TABLE products ( product_no integer, name text, price numeric, UNIQUE (product_no) );
when written as a table constraint.
If a unique constraint refers to a group of columns, the columns are listed separated by commas:
CREATE TABLE example ( a integer, b integer, c integer, UNIQUE (a, c) );
This specifies that the combination of values in the indicated columns is unique across the whole table, though any one of the columns need not be (and ordinarily isn't) unique.
You can assign your own name for a unique constraint, in the usual way:
CREATE TABLE products ( product_no integer CONSTRAINT must_be_different UNIQUE, name text, price numeric );
Adding a unique constraint will automatically create a unique btree index on the column or group of columns used in the constraint.
In general, a unique constraint is violated when there is more than one row in the table where the values of all of the columns included in the constraint are equal. However, two null values are not considered equal in this comparison. That means even in the presence of a unique constraint it is possible to store duplicate rows that contain a null value in at least one of the constrained columns. This behavior conforms to the SQL standard, but we have heard that other SQL databases might not follow this rule. So be careful when developing applications that are intended to be portable.
Technically, a primary key constraint is simply a combination of a unique constraint and a not-null constraint. So, the following two table definitions accept the same data:
CREATE TABLE products ( product_no integer UNIQUE NOT NULL, name text, price numeric );
CREATE TABLE products ( product_no integer PRIMARY KEY, name text, price numeric );
Primary keys can also constrain more than one column; the syntax is similar to unique constraints:
CREATE TABLE example ( a integer, b integer, c integer, PRIMARY KEY (a, c) );
A primary key indicates that a column or group of columns can be used as a unique identifier for rows in the table. (This is a direct consequence of the definition of a primary key. Note that a unique constraint does not, by itself, provide a unique identifier because it does not exclude null values.) This is useful both for documentation purposes and for client applications. For example, a GUI application that allows modifying row values probably needs to know the primary key of a table to be able to identify rows uniquely.
Adding a primary key will automatically create a unique btree index on the column or group of columns used in the primary key.
A table can have at most one primary key. (There can be any number of unique and not-null constraints, which are functionally the same thing, but only one can be identified as the primary key.) Relational database theory dictates that every table must have a primary key. This rule is not enforced by PostgreSQL, but it is usually best to follow it.
A foreign key constraint specifies that the values in a column (or a group of columns) must match the values appearing in some row of another table. We say this maintains the referential integrity between two related tables.
Say you have the product table that we have used several times already:
CREATE TABLE products ( product_no integer PRIMARY KEY, name text, price numeric );
Let's also assume you have a table storing orders of those products. We want to ensure that the orders table only contains orders of products that actually exist. So we define a foreign key constraint in the orders table that references the products table:
CREATE TABLE orders ( order_id integer PRIMARY KEY, product_no integer REFERENCES products (product_no), quantity integer );
Now it is impossible to create orders with product_no entries that do not appear in the products table.
We say that in this situation the orders table is the referencing table and the products table is the referenced table. Similarly, there are referencing and referenced columns.
You can also shorten the above command to:
CREATE TABLE orders ( order_id integer PRIMARY KEY, product_no integer REFERENCES products, quantity integer );
because in absence of a column list the primary key of the referenced table is used as the referenced column(s).
A foreign key can also constrain and reference a group of columns. As usual, it then needs to be written in table constraint form. Here is a contrived syntax example:
CREATE TABLE t1 ( a integer PRIMARY KEY, b integer, c integer, FOREIGN KEY (b, c) REFERENCES other_table (c1, c2) );
Of course, the number and type of the constrained columns need to match the number and type of the referenced columns.
You can assign your own name for a foreign key constraint, in the usual way.
A table can contain more than one foreign key constraint. This is used to implement many-to-many relationships between tables. Say you have tables about products and orders, but now you want to allow one order to contain possibly many products (which the structure above did not allow). You could use this table structure:
CREATE TABLE products ( product_no integer PRIMARY KEY, name text, price numeric ); CREATE TABLE orders ( order_id integer PRIMARY KEY, shipping_address text, ... ); CREATE TABLE order_items ( product_no integer REFERENCES products, order_id integer REFERENCES orders, quantity integer, PRIMARY KEY (product_no, order_id) );
Notice that the primary key overlaps with the foreign keys in the last table.
We know that the foreign keys disallow creation of orders that do not relate to any products. But what if a product is removed after an order is created that references it? SQL allows you to handle that as well. Intuitively, we have a few options:
Disallow deleting a referenced product
Delete the orders as well
Something else?
To illustrate this, let's implement the following policy on the many-to-many relationship example above: when someone wants to remove a product that is still referenced by an order (via order_items), we disallow it. If someone removes an order, the order items are removed as well:
CREATE TABLE products ( product_no integer PRIMARY KEY, name text, price numeric ); CREATE TABLE orders ( order_id integer PRIMARY KEY, shipping_address text, ... ); CREATE TABLE order_items ( product_no integer REFERENCES products ON DELETE RESTRICT, order_id integer REFERENCES orders ON DELETE CASCADE, quantity integer, PRIMARY KEY (product_no, order_id) );
Restricting and cascading deletes are the two most common options. RESTRICT prevents deletion of a referenced row. NO ACTION means that if any referencing rows still exist when the constraint is checked, an error is raised; this is the default behavior if you do not specify anything. (The essential difference between these two choices is that NO ACTION allows the check to be deferred until later in the transaction, whereas RESTRICT does not.) CASCADE specifies that when a referenced row is deleted, row(s) referencing it should be automatically deleted as well. There are two other options: SET NULL and SET DEFAULT. These cause the referencing columns to be set to nulls or default values, respectively, when the referenced row is deleted. Note that these do not excuse you from observing any constraints. For example, if an action specifies SET DEFAULT but the default value would not satisfy the foreign key, the operation will fail.
Analogous to ON DELETE there is also ON UPDATE which is invoked when a referenced column is changed (updated). The possible actions are the same.
Since a DELETE of a row from the referenced table or an UPDATE of a referenced column will require a scan of the referencing table for rows matching the old value, it is often a good idea to index the referencing columns. Because this is not always needed, and there are many choices available on how to index, declaration of a foreign key constraint does not automatically create an index on the referencing columns.
More information about updating and deleting data is in Chapter 6.
Finally, we should mention that a foreign key must reference columns that either are a primary key or form a unique constraint. If the foreign key references a unique constraint, there are some additional possibilities regarding how null values are matched. These are explained in the reference documentation for CREATE TABLE.
Exclusion constraints ensure that if any two rows are compared on the specified columns or expressions using the specified operators, at least one of these operator comparisons will return false or null. The syntax is:
CREATE TABLE circles ( c circle, EXCLUDE USING gist (c WITH &&) );
See also CREATE TABLE ... CONSTRAINT ... EXCLUDE for details.
Adding an exclusion constraint will automatically create an index of the type specified in the constraint declaration.


{% extends "email/template.html" %} {% block content %}
In the past {{ subscription_fuzzy_time }} or so, tapiriik has kept your {{ account_list }} in sync, automatically transferring {% if distance %}over {{ distance }} km of activities{% else %}your fitness activities night and day{% endif %}.
If you want to keep automatic synchronization for another year, visit tapiriik.com, connect to one of your accounts, and click the "Automatic Synchronization" link.
(and if you were dissatisfied with your experience, please reply to this email to let me know why!)
{% endblock %} {% block plaintextcontent %} It's been a good {{ subscription_days }} days! In the past {{ subscription_fuzzy_time }} or so, tapiriik has kept your {{ account_list }} in sync, automatically monitoring and transferring {% if distance %}over {{ distance }} km of your activities{% else %}your fitness activities night and day{% endif %}. If you want to keep automatic synchronization for another year, visit https://tapiriik.com then connect to one of your accounts, and click the "Automatic Synchronization" link. Don't worry - you won't automatically be billed. If you were dissatisfied with your experience, please reply to this email to let me know why!) {% endblock %}


HOME
ABOUT
MENU
CONTACT
Give us some feedback about your recent experience at Donut Delights! We are always looking to improve!
Would you visit again?
Subscribe to our newsletter for the latest on our seasonal offerings and special events!
CONTACT INFO
Donut Delights 2112 Main St. Urbana, Illinois 61801 phone:<PHONE_NUMBER> email<EMAIL_ADDRESS>HOURS


Webbnet Digital is the most creative and trendiest digital marketing agency of Kolkata. We offer some of the highest demanding motion graphics logos, posters banners and all sorts of online promotion.
Our team at Webbnet Digital is working constantly to produce some of the cutting edge technology that results in smooth and responsive website layouts. We choose a variety of colour depending on the mode of business. Help us create your future.
We are offering First Month Free Trial to all our clients. Come join us to create a unique business and marketing strategy.


Notebooks
Story: Words and sentences (including the names of stars)
Words and sentences (including the names of stars)
Title
Words and sentences (including the names of stars)
Collection
Summary
Words and sentences with many entries concerning the names of celestial bodies and the heavens. p.199v features a note on the great star, which follows daybreak (the Day's Heart star, or Jupiter). p.200v contains further notes on stars and their names and movements as well as what the |xam call them (such as the 'husband', and the 'mother' and 'child').
Comments
1) Note on the inside of the back cover of this notebook: 'Finished correcting Sept 15/71 from Jantje Toorm himself'; additional corrections made on 27 May, 2) This story is found in Book II-1
Contributors
Date
10 March 1871 (given on or about)
Categories
Words and sentences, Celestial bodies and aeroscopy
Keywords
eating (and hunger) , heavens (stars) , heavens (planets) , heavens (sun) , heavens (Moon) , heavens (names of) , stars (the Day's Heart star) , stars (Jupiter) , stars (the Great star) , stars (names of) , stars (descriptions of) , words and sentences (including names of stars) , vocabulary (|xam) , names (of stars) , names (of celestial bodies)
Story Pages
199-201


|
| Local Properties | ||
| Managed Object Types | Data Object Types | All Properties | All Methods |
Properties
| Name | Type | Description |
|---|---|---|
| dataEfficiencyInfo* | VsanDataEfficiencyConfig |
Data efficiency configuration.
|
| datastoreInfo* | VsanDatastoreConfig |
Datastore configuration.
Since vSAN API 6.6.2 |
| encryptionInfo* | VsanHostEncryptionInfo |
Encryption configuration.
|
| extendedConfig* | VsanExtendedConfig |
vSAN Extended configurations.
Since vSAN API 6.7 |
| internalExtendedConfig* | VsanInternalExtendedConfig |
vSAN host-level extended configurations.
Since vSAN API vSAN 6.7U3 |
| resyncIopsLimitInfo* | ResyncIopsInfo |
Resync IOPS limit configuration in Mbps. The value should be between
0 and 512.
|
| unmapConfig* | VsanUnmapConfig |
SCSI unmap command configuration on vSAN.
Since vSAN API vSAN 6.7U1 |
| witnessHostConfig* | VsanWitnessHostConfig[] |
Witness host configuration, available only when host works
as witness node in vSAN stretched cluster, otherwise this field
will be omitted.
Since vSAN API 6.8.7 |
| Properties inherited from VsanHostConfigInfo | ||
| clusterInfo, enabled, faultDomainInfo, hostSystem, networkInfo, storageInfo | ||
| Properties inherited from DynamicData | ||
| None |
| Top of page | Local Properties | ||
| Managed Object Types | Data Object Types | All Properties | All Methods |


IOG
Currently I work at IOG as the team lead for the Haskell networking team. I also held a teaching assistance position for IOG / Well-Typed's Haskell course which took place in Barbados in 2018.
Majority of my work at IOG is available as open source. I mostly work on ouroboros-network repository. I contributed both to the design as well as implementation, which is documented in a technical report.
Here are my main achievements:
-
I contributed to the session type framework
typed-protocols.
Using type level description of a protocol not only turned
protocol errors into type errors but also made it much easier
to share and discuss ideas: using
typed-protocols
protocol state machines became the primary focus point. It allowed us to reason about protocol behaviour, especially about adversarial behaviour. The novelty oftyped-protocols
is using protocol pipelining in the context of session types. I am currently finishing a redesign of the library, which allows to reduce the number of threads required by pipelining, provide simpler and more functional api. -
I authored Win32-network library.
One of IOG's products the Daedalus wallet is a primary Windows application, with thousands of users. This library, together with a small abstraction layer allowed us to write platform independent code (which runs primarily on Linux, Windows and MacOs). With
Win32-network
we ware able to achieve a similar throughput to one observed on Linux and we never heard back complains from Windows users regarding networking! -
I am one of the primary contributors to
io-sim:
an
IO
simulator and a drop in replacement forIO
monad.IOSim
is a pure monad (free monad) which supports:Haskell
thread interfaceHaskell
synchronous and asynchronous exceptionsasync
interfacestm
(software transaction memory) interface- time primitives, which are important for writing network simulations
- it has been extended by prof. John Hughes to explore different thread schedules (using approach similar to one described in Optimal Partial Order Reduction
- and more ...
IO
and in simulation. Testing components in simulation using property testing proved to be a thorough and efficient way of checking correctness. We combined simulation testing together with contravariant tracing, which gave us insight how internal state evolves during the simulation and verify that it behaves as specified. We applied this approach to multiple complex components. -
I wrote a network
simulator
using the
io-sim
library, which allowed us to testcardano-node
diffusion layer. The simulator allows to:- simulate communication between multiple components in a distributed system
- do error injection, and simulation of network attenuation
- simulate a TCP simultaneous open, which as observed by us, is not a rare event on Cardano mainnet
- I wrote and maintained several protocols using typed-protocols package.
-
I have been one of the main contributors to the
Stake-Driven Peer Selection with Robust Peer Discovery , also known aspeer-2-peer
of theouroboros-network
. This layer automates creation of the overlay network. It was designed specifically to be able to- connect across NATs
- utilise full-duplex connections, to save the number of file descriptors used by the diffusion layer and punch holes in NATs
- be able to respond and adapt to changing network conditions
- be robust, in particular protect against resource exhausting attacks
-
I also helped to maintain CI using
github-actions
, and an early version of CI using nix.


Hello World!
01 May 2015Hello. This is my first blog post. Its been so long that I wanted to have a website that could act as a blog-cum-profile. After toiling for more than a week, going through 100s (if not 1000s!) of website and blogs, I realized nothing beats minimalism. And so I have settled down with Jekyll or poole to be precise. It took me another week to modify the themes and bring down to a point where it has just enough things. I have integrated DISQUS for comments, took some lovely icons from FontAwesome, added navigation at the top bar, added page scroller to top, social media icons to share posts, among other. Mark Dotto’s website is a great inspiration on aesthetics. I hope I will be able to focus more on content now than on the feel of it.
Feel free to share how it looks now in comments!


|
Boss2D
2.6.1
|
Classes | |
| class | Cookie |
Public Types | |
| typedef std::function< bool()> | RecvLoopCB |
Public Member Functions | |
| void | InitForFirstTime (chars domain, uint16 port, sint32 timeout) |
| bool | Connect () |
| void | Disconnect () |
| bool | Send (chars data, sint32 size) |
| bool | Recv (chararray &data) |
| bool | RecvLoop (chararray &data, RecvLoopCB cb) |
| chars | domain () const |
| bool | isTimeOut (uint64 msec) const |
Static Public Member Functions | |
| static ContactPool & | GetContact (chars domain, uint16 port) |
| static bool | RemoveContact (chars domain, uint16 port) |
Public Attributes | |
| Array< Cookie > | mCookies |
| Map< Cookie * > | mCookieMap |


--- layout: default baseurl: "../" header: Support ---
Need help? We'll get you patched up in a jiffy.


+ Add blog post
Title:
Preview:
Published {{post.publishDate|date}}
Zero comments. {{post.commentCount}} comments


Can we contact you for feedback to help improve our services? For more information see the privacy policy.
The Foreign and Commonwealth Office will use the information you provide to answer your enquiry. We may also use it to improve the service we offer to other people by analysing common questions and updating the content available on GOV.UK.
We'll use the information you provide to answer your enquiry and improve our service


Spanish Publisher Withdraws Book by Russian Napoleon Expert-Turned-Murderer From Its Catalogue
This is the only book by Sokolov published in Spain, a country that he visited regularly to participate in historical re-enactments. However, publisher’s decision has provoked mixed reactions from experts.
The Spanish publisher Desperta Ferro has withdrawn a book written by Russian historian Oleg Sokolov, accused of murdering his girlfriend, from its catalogue, co-founder of the publishing house Javier Gómez revealed.
According to Gómez, the publisher also asked bookstores to return unsold copies of his book titled "Austerlitz. Napoleon, Russia and Europe".
"Even though the demand for the book has drastically increased on Amazon after the news of the murder in St. Petersburg, we decided not to sell it anymore. We don't want to do business with the tragedy. In this situation, the human factor should prevail", Gómez said.
Sokolov's book, which has previously been published in France and Russia, was translated into Spanish and published in April of this year.
Gómez admitted that some experts have criticised the decision because they believe that the murder committed by Sokolov does not deny the "scientific value of his works".
Oleg Sokolov, 63, is accused of murdering his former female student and girlfriend, 24-year-old Anastasia Eshchenko. He attempted to dispose of the body by dismembering it. He was later caught by the police standing in the Moika River in Saint Petersburg with a backpack containing the woman's severed limbs and a firearm.


It started as an idea, a small vision of a consumable Pacific Northwest. As we grew, we saw the potential to involve out community and bring a new coffee time confection for your enjoyment.
We here at Salmon Cookies LLC believe in our mission to find the perfect coffee treat combination that represents the embodiment of what it means to be Seattle. We aim to serve to our fellow seattle-ites and spread the experience of a gray soothing morning with our visitors.


Step up collection of GST, Bedi urges officials in Yanam, Mahe
‘Form groups and go from shop to shop to ensure filing of returns’
by Special CorrespondentLieutenant Governor Kiran Bedi held a video conference with officials of Mahe and Yanam for shoring up GST collections across the U.T. regions.
An action plan on achieving GST targets was put in place on the basis of recommendations submitted by the Finance Secretary recently.
Ms. Bedi has scheduled a meeting to take stock of progress in mid-December.
During the meeting with officials in Mahe, Ms. Bedi sought the cooperation of market associations. “Teams comprising officers are being constituted to track compliance,” she said.
She wanted officials to form groups in partnership with market associations and go shop to shop to see if the eligible shopkeepers had filed their returns. This measure by itself would increase the returns, she said.
The Lt. Governor had asked Social Welfare Department personnel and local police to work with NGOs and youth to engage the community members in city development as well as to conduct “shramadaan” on Saturday mornings.
L-G’s visit
The Lieutenant Governor was due to revisit Mahe in January.
Addressing officials in Yanam, she urged them to uphold the law and go by the rule book to avoid punitive action when irregularities were brought to light during audits, enquiries or RTI pleas sooner or later.
“The only assured protection for any serving public official is to follow the law and rules scrupulously without any fear or favour,” Ms. Bedi told officials as they were accountable only to law.


Match Play. 2-2 to 7. How should Red play 42?
pips Red=101 White=118
(CorrectAnswer= 0/0, ErrorScore= 0)
This is not the time for the overly cautious 8/4, 3/1. Red must take his chance and play 8/2*. The play creates gammons for both sides but is Red’s best chance to win the game (giving him just over 37%).
8/4, 3/1 is a bad error.
8/4, 3/1 is a bad error.
1. Cubeful 0-ply 8/2* Eq.: -0.104 0.403 0.201 0.002 - 0.597 0.215 0.007 2. Cubeful 0-ply 8/4 3/1 Eq.: -0.322 (-0.218) 0.327 0.102 0.002 - 0.673 0.165 0.003 3. Cubeful 0-ply 6/4 6/2* Eq.: -0.496 (-0.392) 0.300 0.104 0.001 - 0.700 0.254 0.005 4. Cubeful 0-ply 8/6 8/4 Eq.: -0.758 (-0.654) 0.235 0.081 0.001 - 0.765 0.314 0.010 5. Cubeful 0-ply 8/4 6/4 Eq.: -0.819 (-0.715) 0.225 0.066 0.001 - 0.775 0.331 0.013


This corpus were recorded in silence in-door environment using cellphone. It has 855 speakers. Each speaker has 120 utterances. All utterances were carefully transcribed and checked by human. Transcription accuracy is guaranteed. If there is any problem, we agree to correct them for you. The corpus contains: audio files; transcriptions; metadata; Please cite the data as “ST-CMDS-20170001_1, Free ST Chinese Mandarin Corpus”. The data set is a subset of a much bigger data set which was recorded in the same environment as this open source data. Please visit our website www.surfing.ai for details.


ICFP Programming Contest 2018
Execute Trace (Full)
Source Model:
empty
Target Model:
empty
Trace:
Steps per Frame:
1/60
1/30
1
10
50
100
500
1000
Screenshot


Events
June 2017
- 6th June 2017 - Landscape & Koi Pond exhibition
August 2017
- 8th August 2017 - Pets grooming services
- 20th August 2017 - Puppy show with Animal Planet
September 2017
- 20th September 2017 -Special event with dog whisperer
October 2017
- 5th October 2017 - Fish Forum
November 2017
- 15th November 2017 - Vet consultation service *FREE
- 30th November 2017 -Landscaping competition
December 2017
- 9th December 2017 - Pets grooming competition
- 15th December 2017 - Fish exhibition
January 2018
- 1st January 2018 - Puppies fashion show
- 19th January 2018 - Pets fashion show


You will be able to
A Collection of approved and verified articles
Researchers have identified some general risk factors – these are things that could make paranoid thoughts more likely:
Read MoreDepression is classified as a mood disorder. It may be described as feelings of sadness, loss, or anger that interfere with a person’s
Read Morefollows physical or sexual abuse, witnessing something extremely frightening of traumatising.
Read MoreAnxiety is your body’s natural response to stress. It’s a feeling of fear or apprehension about what’s to come.
Read MoreASchizophrenia is a chronic psychiatric disorder. People with this disorder experience distortions of reality, often experiencing delusions or hallucinations
Read MoreDementia is a decline in cognitive function. To be considered dementia, mental impairment must affect at least two brain functions. Dementia may affect:
Read MoreBipolar disorder is a mental illness marked by extreme shifts in mood. Symptoms can include an extremely elevated mood called mania
Read MoreAn addiction is a chronic dysfunction of the brain system that involves reward, motivation, and memory. It’s about the way your body craves a
Read More


I Love you 3000!!!❤
Love of My Life ❤
My Best Friend ❤
Your Jaan ❤
Your Sweety❤
Here , The Journey Of Ours
When I came along with my frnd who came to see you for her date😅
When We are frnds i guess at movie theater🤔🤔 !!!
Just after my birthday end at 12:47 I proposed u ❤
bcz u r fattu🤣
when i need u to overcome from my break up😁
And ur in shock bcz I proposed u😎
You said yes😍
bcz we both are waiting for this moment☺❤
Went for the long drive on bike😍
Tamasha🎥
When we first time went for long drive on bike😍
On first movie date in theater
(bdw this also i did the first)❤💏
When i had a chocolate from ur enemy,
Omg how angry u r just blasted on me
My angry young man💪
So many movies together don't even remember the number😂😅
how crazy we are and that theater masti(raaz)🤪😛
When we are just frnds but having crush on
each other🥰🥰 but tu khali mane jova
avto bcz garba to avdata nai😂
when u came to meet me
bt i love black on u the most👻🙈
-I Promise, I'll Always there for you untill my last breath.
-I am only urs and u r only mine
-I love you 3000❤❤
Niku and Sanju
hahhaha 👻 !!!
Hey handsome..😎 its been 4 n half yr since we are in a relationship
(5yr n 10 mon of frndship❤❤)the craziest yr with u😍 and sooooo many to come yet.
tane 6odis nai akhi zindagi amj heran karis😅😂u know very well how much i love u..u crazy man❤❤
happy birthday to the most handsome man on the earth🍻🍻 love u to the moon n back 😘😘
always keep smiling 😊bcz uk na i love ur smily face❤❤😘😘💋💋💋
We❤


Make a magic
Clear
Copy to clipboard
Clear
JSON to JSON
JSON to XML
2 Tab Space
3 Tab Space
4 Tab Space
Minify/Compress


WHO WE ARE
The purpose of our association is to foster the study and pursuit of the game of chess by conducting tournaments for players, sponsoring teams to represent the state of Ohio in interstate and international play, promote chess organizations in the state of Ohio, and the overall general promotion of chess.


Home Animated Knots is the world's leading site for learning how to tie knots of any kind. From Boating Knots, Fishing Knots and Climbing Knots to how to tie a Tie, or even Surgical Knots — we’ve got it covered.
ASP.NET Community Standup - August 13th 2019 - Performance and Benchmarks with Sébastien Ros Join members from the ASP.NET teams for our community standup covering great community contributions for ASP.NET, ASP.NET Core, and more. Community links for this week: https://www.theurlist.com/aspnet-standup-2019-08-13
1859 - Loading issue... - project-zero - Project Zero - Monorail View in the old UI About Monorail User Guide Release Notes Feedback on Monorail Terms Privacy
Hamster Has Epic Fail on Running Wheel To use this video in a commercial player or broadcast, contact<EMAIL_ADDRESS>Credit: Elder Sanchez via Storyful Original video: www.twitter.com/_missmiranduh/status/890338393401442304
Announcing .NET Core 3.0 Preview 8 | .NET Blog Today, we are announcing .NET Core 3.0 Preview 8. Just like with Preview 7, we’ve focused on polishing .NET Core 3.0 for a final release and are not adding new features. If these final previews seem anti-climatic, that’s by design. Download .NET Core 3.0 ...
ASP.NET Blog | ASP.NET Core and Blazor updates in .NET Core 3.0 Preview 8 .NET Core 3.0 Preview 8 is now available and it includes a bunch of new updates to ASP.NET Core and Blazor. Check out the great new features and improvements in this release!
Summer vacation 2019 part 1 I’m back from my annual vacation where I fly south to Canada and take way too many photos. As with all my hobbies, I’m not a very good nature photographer but I do enjoy it, and this ye…
What is Cloud Native, Really? Get the definition from the engineers on campus up close and personal on the Cloud Native Show. In our Pilot episode, follow Shayne as he explores the Microsoft campus to have Cloud Native explained t
Turmoil in the SSL market - Domain Name Wire | Domain Name News A big revenue generator is quickly declining. Google’s campaign in recent years to push websites to use an SSL certificate has been a boon to everyone in the SSL marketplace, including certificate issuers and hosting companies. But what Google giveth, Goo...
The San Francisco Car Break-In Tracker Car break-ins have been at epidemic levels in San Francisco. Use this map to track the number and locations of break-ins occurring across the city.
A bootstrapper script for the Cake .NET Core Global Tool on Windows In this post I provide a Windows PowerShell bootstrapper for the Cake.Tool .NET Core global tool.
Personalize Visual Studio with custom keyboard shortcuts Make sure you have easy-to-remember keyboard shortcuts for the tasks you do every day. In this video, Mads Kristensen shows you how easy it is change existing shortcuts and assign new ones for commands that don’t have any.
.NET Analyzers An organization for the development of analyzers (diagnostics, code fixes, and refactorings) using the .NET Compiler Platform - .NET Analyzers
dotnet/coreclr CoreCLR is the runtime for .NET Core. It includes the garbage collector, JIT compiler, primitive data types and low-level classes. - dotnet/coreclr
Potentially unsafe uses of unsafe · Issue #145 · mozilla/neqo (I'm super excited to see QUIC for Firefox built in rust!) I did a quick review of the uses of unsafe and a few potential issues jumped out at me. neqo/neqo-crypto/src/aead.rs Lines 79 to 86 in...
dotnet/coreclr CoreCLR is the runtime for .NET Core. It includes the garbage collector, JIT compiler, primitive data types and low-level classes. - dotnet/coreclr
Investigating Drag and Drop with Blazor In this post, I give an overview of the drag and drop API and what parts are available to use in Blazor. I then walk through a todo prototype app which uses a drag and drop interface.
Bloomberg - Are you a robot? Please make sure your browser supports JavaScript and cookies and that you are not blocking them from loading. For more information you can review our Terms of Service and Cookie Policy.
me-no-dev/ESPAsyncWebServer Async Web Server for ESP8266 and ESP32. Contribute to me-no-dev/ESPAsyncWebServer development by creating an account on GitHub.


Pär Carlshamre
They propose a usability-oriented requirements capture process, specifically drawing on technical communicators!
Discuss gaps between academic theory and commercial practice, connecting usability and requirements capture - but old (2001) so things may have changed since then!
Usability, Requirements capture


Using Meson
Meson has been designed to be as easy to use as possible. This page outlines the basic use cases. For more advanced cases refer to Meson's command line help which is accessible with the command meson --help
.
Requirements
Meson has two main dependencies.
Ninja is only needed if you use the Ninja backend. Meson can also generate native VS and XCode project files.
On Ubuntu these can be easily installed with the following command:
$ sudo apt-get install python3 ninja-build
The best way to get Meson is to pip install
it for your user
$ pip3 install --user meson
You can also use Meson as packaged by your distro, but beware that due to our frequent release cycle and development speed this version might be out of date.
Another option is to clone the git repository and run it directly from there.
Compiling a Meson project
The most common use case of Meson is compiling code on a code base you are working on. The steps to take are very simple.
$ cd /path/to/source/root
$ meson build && cd build
$ ninja
$ ninja test
The only thing to note is that you need to create a separate build directory. Meson will not allow you to build source code inside your source tree. All build artifacts are stored in the build directory. This allows you to have multiple build trees with different configurations at the same time. This way generated files are not added into revision control by accident.
To recompile after code changes, just type ninja
. The build command is always the same. You can do arbitrary changes to source code and build system files and Meson will detect those and will do the right thing. If you want to build optimized binaries, just use the argument --buildtype=debugoptimized
when running Meson. It is recommended that you keep one build directory for unoptimized builds and one for optimized ones. To compile any given configuration, just go into the corresponding build directory and run ninja
.
Meson will automatically add compiler flags to enable debug information and compiler warnings (i.e. -g
and -Wall
). This means the user does not have to deal with them and can instead focus on coding.
Using Meson as a distro packager
Distro packagers usually want total control on the build flags used. Meson supports this use case natively. The commands needed to build and install Meson projects are the following.
$ cd /path/to/source/root
$ CFLAGS=... CXXFLAGS=... LDFLAGS=.. meson --prefix /usr --buildtype=plain build
$ ninja -v -C build
$ ninja -C build test
$ DESTDIR=/path/to/staging/root ninja -C build install
The command line switch --buildtype=plain
tells Meson not to add its own flags to the command line. This gives the packager total control on used flags.
This is very similar to other build systems. The only difference is that the DESTDIR
variable is passed as an environment variable rather than as an argument to ninja install
.
As distro builds happen always from scratch, we recommend you to enable [unity builds](Unity builds) whenever possible on your packages because they are faster and produce better code.
The results of the search are


Welcome to XUI. A set of defaults for simplified mobile web app guis. Include xui.app.js and
the following behaviors are enabled:
- lists with links become link groups as in the native guis
- relative links loaded via ajax and animated in (with a left to right swipe by default)
- animations can be changed with class="left-to-right|right-to-left|top-to-bottom|bottom-to-top"
- complete paths will open in mobile safari
- skinable via css


--- layout: page title: "Workforce Analytics" subtitle: Workforce Data Analytics css: "/css/index.css" meta-title: "Chad (Chungil Chae)" meta-description: "Graduate student in WFED / CIED with a Bachelor of Business." bigimg: - "/img/big-imgs/1.jpeg" : " ()" - "/img/big-imgs/2.jpeg" : " ()" - "/img/big-imgs/3.jpeg" : " ()" - "/img/big-imgs/4.jpeg" : " ()" - "/img/big-imgs/5.jpeg" : " ()" - "/img/big-imgs/6.jpeg" : " ()" - "/img/big-imgs/7.jpeg" : " ()" - "/img/big-imgs/8.jpeg" : " ()" - "/img/big-imgs/9.jpeg" : " ()" - "/img/big-imgs/10.jpeg" : " ()" - "/img/big-imgs/11.jpeg" : " ()" - "/img/big-imgs/12.jpeg" : " ()" - "/img/big-imgs/13.jpeg" : " ()" - "/img/big-imgs/14.jpeg" : " ()" - "/img/big-imgs/15.jpgg" : " ()" - "/img/big-imgs/16.jpeg" : " ()" - "/img/big-imgs/17.jpeg" : " ()" - "/img/big-imgs/18.jpeg" : " ()" - "/img/big-imgs/19.jpeg" : " ()" - "/img/big-imgs/20.jpeg" : " ()" - "/img/big-imgs/21.jpeg" : " ()" - "/img/big-imgs/22.jpeg" : " ()" - "/img/big-imgs/23_.jpeg" : " ()" - "/img/big-imgs/24.jpeg" : " ()" - "/img/big-imgs/25.jpeg" : " ()" - "/img/big-imgs/26.jpeg" : " ()" - "/img/big-imgs/27.jpeg" : " ()" - "/img/big-imgs/28.jpeg" : " ()" - "/img/big-imgs/29.jpeg" : " ()" - "/img/big-imgs/30.jpeg" : " ()" ---


About me
I am a highly experienced Project Manager (Testing) and Automation Test Architect based in Toronto, Canada, with a distinguished track record of over 13 years in IT software development and testing. I take immense satisfaction in meticulously crafting automation testing workflows that are designed to perfection, while consistently adhering to industry-leading frameworks and standards.
Within my role, I excel in overseeing and coordinating automation testing projects, encompassing the full spectrum of activities from conceptualization to implementation. I possess an exceptional aptitude for designing and developing cutting-edge automation testing frameworks that cater to diverse functional and non-functional testing requirements. Furthermore, I possess a remarkable proficiency in seamlessly integrating manual testing teams into the automation workflow through the deployment of enterprise-level, industry-standard automation test frameworks.
My unwavering objective throughout my career has been to drive the complete replacement of manual testing with automated solutions across multiple projects, thus bolstering reliability and instigating shorter regression test cycles. My past accomplishments bear testimony to my ability to create and implement highly successful frameworks based on a range of methodologies, including Data-Driven, Keyword-Driven, Page Object Model, and Hybrid approaches.
Beyond my professional commitments, I actively engage in various ventures that enhance my industry influence. As a part-time blogger and YouTuber, I continuously share my insights and expertise, fostering discussions on propelling automation testing to new heights. Additionally, I have previously served as a distinguished corporate trainer on testing technology, further solidifying my reputation as a thought leader in the field.
I relish the opportunity to delve into enriching conversations surrounding the advancement of automation testing, eagerly exploring the latest updates and state-of-the-art tools that shape the ever-evolving landscape of the automation industry.
My Expertise
-
Automation Frameworks
Develop various automation frameworks for Web, Mobile native Apps, and API automation to solve functional testing, Accessibility testing, Visual testing, and Performance testing challenges in Quality Engineering.
-
Test Monitoring and Dashboards
Create and setup dashboards to easily monitor automation test execution, test metrics, and test trends.
-
TestOps - Continuous Testing in CI CD
Setup continuous testing pipelines as part of CI CD bbuilds on jenkins.
-
Test Lab & Infrastructure
Create automation testing lab Infrastructure with Grids, external automation clouds such as BrowserStack, LambdaTest, Perfecto, SauceLabs.


Perlbrew is a Perl module that orchestrates the building of Perls within your home directory, and modifying your session's environment so that you can use your local Perl automatically. Almost all major versions of Perl can be built using Perlbrew, and Perl code run by your local Perl does not know (or care) that you are running from a local Perl (as opposed to the system Perl).
There are two major advantages to using Perlbrew:
Perlbrew is by far the best option when you are doing any sort of Perl development, because it is so easy to blow away and rebuild the environment when something goes wrong. However, there are also disadvantages to using Perlbrew:
It is up to you to decide if Perlbrew is the right way to go, or it SRCC should build it for you as a module. Another alternative, if you just want a module and are OK with using the system Perl, is to use local::lib.
This part is really easy! You don't need to install anything (we did that already), but you do need to initialize Perlbrew. You only have to do this once, and it's easy:
akkornel@rice05:~$ perlbrew init perlbrew root (~/perl5/perlbrew) is initialized. Append the following piece of code to the end of your ~/.bash_profile and start a new shell, perlbrew should be up and fully functional from there: source ~/perl5/perlbrew/etc/bashrc Simply run `perlbrew` for usage details. Happy brewing!
You might be told to add something to your ~/.bash_profile
file, or you might be told to edit a different file (it depends on what shell you are using). Once that is done, log out and log back in.
For reference, Perlbrew installs all of its software at the path ~/perl5/perlbrew
. If you really want to get rid of everything, simply delete that directory, undo the change to your shell profile, log out, and log back in.
Once Perlbrew has been configured, you can go ahead and install Perl! Perlbrew has Perls going back as far as 5.4.5; new Perls become available once they are released.
First, find out what Perl versions are available:
akkornel@rice05:~$ perlbrew available perl-5.24.0 perl-5.22.2 perl-5.20.3 ... there are lots more!
Once you have chosen the Perl you want to install, simply run perlbrew install
with the Perl version you want. For example, perlbrew install perl-5.24.0
. Or, to get the latest stable Perl, you can run perlbrew install stable
, like so:
akkornel@rice05:~$ perlbrew --notest install stable Installing /home/akkornel/perl5/perlbrew/build/perl-5.24.0 into ~/perl5/perlbrew/perls/perl-5.24.0 This could take a while. You can run the following command on another shell to track the status: tail -f ~/perl5/perlbrew/build.perl-5.24.0.log perl-5.24.0 is successfully installed.
The --notest
option is used to disable all of the post-build tests. This is needed because one of the tests (the filesystem access-time test) fails (because we don't track last-accessed time on network storage). This is expected by us, but Perlbrew expects all tests to pass, so --notest
is used to disable post-build testing.
You should expect the entire build process to take about half an hour. Once built, your Perl will remain available until you change or delete it.
Once Perl is installed, you can use it on any of the systems in the cluster. To see what versions are available, run perlbrew list
:
akkornel@rice05:~$ perlbrew list perl-5.24.0
To actually use a particular Perl, the command is perlbrew use
:
akkornel@rice05:~$ perl -v | grep version This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux-gnu-thread-multi akkornel@rice05:~$ perlbrew list perl-5.24.0 akkornel@rice05:~$ perlbrew use 5.24 ERROR: The installation "5.24" is unknown. akkornel@rice05:~$ perlbrew use 5.24.0 akkornel@rice05:~$ perl -v | grep version This is perl 5, version 24, subversion 0 (v5.24.0) built for x86_64-linux
The perlbrew use
command can also be placed into scripts, so that your batch jobs can use the Perl you built. You can also leave out the "perl-" prefix when you run perlbrew use
.
NOTE: In this section, we are talking about the software modules that are loaded using the module load
command. This section does not refer to Perl modules, unless it explciitly says "Perl module".
Your local Perls might conflict with software modules loaded using the module load
command. There are several ways that conflicts can occur:
perlbrew use
, and then use module load
to load a module, and that module uses Perl, then that module might end up using your local Perl. This is normally OK, as long as your local Perl has all of the Perl modules that the software wants to use.perlbrew install
, then your Perl will be built with that newer compiler. That should be OK, but you will want to test your newly-built Perl without the GCC/clang module loaded.The important thing to remember is, in most cases, the later software is loaded, the higher its precedence. If you run module load perl/5.24.0
, and then run perlbrew use 5.22.2
, then you will probably be using Perl 5.22 (running perl -v
will tell you for sure).
Now that you have a Perl built, you probably want to install modules. Installing modules is easy enough with Perlbrew: First you run perlbrew use
to load the Perl version that should get the modules, then you run cpan install Module_Name
, which will find the latest version of the module, build it, test it, and (assuming all those steps passed) install it:
akkornel@rice05:~$ perlbrew list perl-5.24.0 akkornel@rice05:~$ perlbrew use 5.24.0 akkornel@rice05:~$ cpan install Crypt::SSLeay Loading internal null logger. Install Log::Log4perl for logging messages Reading '/home/akkornel/.cpan/Metadata' Database was generated on Tue, 18 Oct 2016 16:29:02 GMT Running install for module 'Crypt::SSLeay' ... many, many lines of output skipped here ... Appending installation info to /home/akkornel/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0/x86_64-linux/perllocal.pod NANIS/Crypt-SSLeay-0.72.tar.gz /usr/bin/make install -- OK
in the above example, the Crypt::SSLeay module had several required packages that were not installed, so cpan
downloaded and installed those as well. The system's compiler, and system libraries, were used for the build, but all Perl code was executed by your local Perl (not system Perl), and the modules you build will only be used by your local Perl (specifically, the one you're using to run the cpan
command).
One issue you may encounter, when building your own modules, is missing header files. For example, the first time cpan install Crypt::SSLeay
was run on FarmShare 2, it failed to build:
akkornel@rice05:~$ perlbrew use 5.24.0 akkornel@rice05:~$ cpan install Crypt::SSLeay Loading internal null logger. Install Log::Log4perl for logging messages Reading '/home/akkornel/.cpan/Metadata' Database was generated on Tue, 18 Oct 2016 16:29:02 GMT Running install for module 'Crypt::SSLeay' ... many, many lines of output skipped here ... openssl-version.c:2:30: fatal error: openssl/opensslv.h: No such file or directory compilation terminated. Failed to build and link a simple executable using OpenSSL No 'Makefile' created NANIS/Crypt-SSLeay-0.72.tar.gz /home/akkornel/perl5/perlbrew/perls/perl-5.24.0/bin/perl Makefile.PL -- NOT OK akkornel@rice05:~$
This failure happened because a package was missing: Crypt::SSLeay uses OpenSSL to do the actual work; although the OpenSSL libraries were installed, the OpenSSL header files were not. Header files are only needed when you are building software, so the lack of header files caused the build to fail. In this case, installing the libssl-dev package was enough to solve the problem.
If you are trying to use cpan
in your own Perl, and cpan
fails, it may be due to missing libraries or missing header files. Feel free to contact us for help!
In addition to the commands we've explored so far, there are other helpful commands available:
perlbrew off
turns off Perlbrew for the current shell. In other words, this switches you back to the Perl version that is installed on the system.perlbrew upgrade-perl
will take an already-installed Perl, and upgrade it. For example, if you used perlbrew install perl-5.22.1
to build and install Perl 5.22.1, you could upgrade that by running perlbrew use 5.22.1
, followed by perlbrew upgrade-perl
.perlbrew switch
makes a specific Perl the defaut one for all future sessions. So, if you have already built Perl 5.24.0 (using perlbrew install perl-5.24.0
), then running perlbrew switch 5.24.0
will make Perl 5.24.0 available every time you start a new session. To un-do this command, run perlbrew switch-off
.SRCC is happy to help you! To get support, all you need to do is email us. When you email us, be sure to include the following information:
perlbrew list
and perl -V
commands.If the problem is a missing library or missing header files, we can normally address that quickly. If the problem is an out-of-date library, that will take longer to address.
Good luck!


@(params: Map[String, Any]) @uk.gov.hmrc.hmrcemailrenderer.templates.helpers.html.template_main(params, "Your registration is complete") {
Dear @params("f_name") @params("s_name")
Your country-by-country ID is : @params("cbcrId")
Keep this ID safe, as you'll need it each time you send a report.
You gave this contact email address when you registered to send a country-by-country report.
From HMRC Country-by-Country Reporting
}


| PhotoLine Tip: A rainbow |
| 1. You have
an image of a landscape (or any other).
2. Create
a rainbow blend. It should look like this:
3. Now create the blend from the middle bottom point in the image to the top. You will get a rainbow like this:
|
| ««Previous Tip <Contents> Next Tip»» |
| Please email questions and suggestions on these tips to Gerhard Huber. |


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/associativity.html ---
I'm writing a tactic about associativity and I'm inferring the associativity of the operators that appear in an expression. It turns out that this is the bottleneck of my script: building an instance of is_associative
takes hundreds of ms. Is there a faster way to do it?
I hardly ever understand your questions Simon (too CS!), but I'd like to begin to try. Do you mean "type class inference is taking a long time checking that my random operation is associative"? You know better than I do that you can just make your own instance and add it to the type class inference system. It occurs to me that in contrast to simp
, where I can look at traces, I don't really know how to look at what type class inference is doing. I don't want to derail this thread though.
Of course you know it: set_option trace.class_instances true
But you only think of it when things go wrong
@Kevin Buzzard That's exactly it. It's not clear to me that adding instances would improve the situation
Are you trying to infer the associativity of some operations which don't have is_associative
instances? If so, could you give an example?
Or is it instance lookup itself that takes a long time?
Instance lookup is taking a really long lime. My work around right now is, the first time I need that information, I add it to the local assumptions and I keep looking at assumptions to see if it's there before calling mk_instance
.
The other idea I'm considering is to have an internal table where I cache that kind of information. That could be faster still and less intrusive but I would redo the instance inference at least once per call to the overall tactic (which I call assoc_rewrite
)
Whoa, assoc_rewrite
! I need this more than you can possibly imagine.
How hard do you think it would be to make this work with category-style associativity, where the composition operator is indexed on the source and target types? I haven't looked at the implementation yet. I can probably rig up a representative example at some point if that would be helpful.
I imagine it could involve internally needing a "thrist" rather than just a list, though maybe you can just ignore the type indices.
Checking that a diagram in a category commutes usually comes down to these alternately reassociating and then rewriting arguments and when there are more than three morphisms involved it's a real pain to specify the reassociation you want.
That is very good to know! I can consider categories. I don't think it would be too hard. Given a categorical composition operator, is there an analogue to is_associative
to get me the associativity law?
It's just a constant--a class method of category
(category.associativity
)
Cool :) can you give me a proof example? I'll see if I can add it to my PR
That is, my compositions are already written syntactically in terms of the fixed composition operator category.compose
.
Well, hmm. It might be a bit tricky, since categories are not in mathlib yet.
I guess I'll give you a self-contained example, including the category
class, for starters.
Yeah, that's tricky. Are you working on a branch of mathlib? If so I could make a version for that. Alternatively, I could make a associativity
attribute that you can put on that associativity law.
That's a good start.
Here is a simple, but very common sort of example: https://gist.github.com/rwbarton/b10c0229be25bd6880661afb2f1b32f5
An associativity
attribute would be a good solution for me.
Cool! Thanks! With the associativity attribute, it would probably be enough to put it on the associativity law from semigroup
and add_semigroup
and semi_lattice
, what do you think?
From an aesthetic perspective, if you use x*y = a*b
to rewrite p * x * y * q
, do you prefer the tactic to leave the expression flat (i.e. p * a * b * q
) or manipulated only minimally after rewrite (i.e. p * (a * b) * q
)?
If using an attribute is faster than instance lookup then that sounds like a good approach, since users can mark their own operations with the attribute anyways. I doubt we need the Prolog-style search power here. (I'm also wondering why instance synthesis is so slow, though.)
Good question. Probably I can answer it better after trying it out in a few dozen proofs :slight_smile:
What I'm suspecting that there are some dead alleys in the set of instances. Maybe I should start tracing the instance search process
I think it usually won't matter for me, since I'd probably follow it with either more assoc_rw
s or simp
, which applies associativity
everywhere anyways.
If you follow with simp
, it might be more effective to flatten the expression so that simp
doesn't waste time flattening it one associativity at a time.
BTW, when do I get assoc_simp
? :)
On Christmas if you've been a good boy ;-)
Actually, I'd like to tackle simp
as well but it seems like a bigger project.
I'll keep you posted
I have a way to deal with associativity in simp
to some degree already, so it's not so bad. Actually it's stolen from @Scott Morrison's idea here: https://github.com/semorrison/lean-category-theory-pr/blob/lean-3.4.1/src/categories/isomorphism.lean#L34
The general form is: if you have a @[simp]
lemma which states that a * b = c * d * e
, first generalize it to the form z * (a * b) = z * (c * d * e)
, and then reassociate the parentheses on the left side (there can be more than two original factors).
Make that another simp lemma. Then you have a left-hand side of the form (z * a) * b = ...
where z
can be anything. So it will match any left-nested tree in which a
and b
appear "consecutively".
(You can reassociate the parentheses on the right-hand side too, so that simp
doesn't have to do it every time you apply the lemma.)
This is like a Knuth-Bendix completion step: we could simplify z * (a * b)
to either z * (c * d * e)
or (z * a) * b
, so add another rewrite rule to make those confluent.
So one wishlist item is an tactic/attribute to put on a simp lemma which will apply this transformation and make a new simp lemma.
I've done this by hand in a few cases, and it simplified some proofs.
But this is not by itself sufficient to deal with situations where we want to use hypotheses, rather than simp lemmas, like the equation e
in my example earlier. That's why I still want assoc_rw
for this situation. (Maybe an alternative is to generate a transformed version of the hypotheses, but I might also want to rewrite using equations tucked away inside fields of structures and things like that.)
Ah I see! So assoc_simp
would be better still I assume because then you wouldn't need to duplicate so many lemmas
Right, I mean in general rw
and simp
are distinct, but overlapping in their uses, so both assoc_rw
and assoc_simp
ought to be useful as well.
Maybe assoc_simp
with arguments could apply this transformation to those arguments, as well as all simp lemmas
I was thinking of rewriting the simp
tactic and changing the rewriting function so that it matches modulo associativity.
Ah, I see. Sounds more ambitious, but probably more powerful as well.
Is simp
in Lean? Maybe worth waiting for Lean 4?
Where it gets tricky I find is when you have a lemma forall x, x * y = foo
, you may instantiate x
with a * b
which is harder for my current matching to consider.
Ah, I see. Sounds more ambitious, but probably more powerful as well.
Issimp
in Lean? Maybe worth waiting for Lean 4?
It might be. In any case, maybe I should first roll out assoc_rw
and wait for feedback before getting started on assoc_simp
I think the category theory development looks beautiful, by the way. I wish I understood more of it
On the subject of associativity, there is something I would like to work on soon, but that I think it still orthogonal to rw_assoc
and simp_assoc
.
When working with monoidal categories, very often one has to insert associators (which are isomorphisms, not equations!) in order to be able to compose.
For example, if I have f : A -> (B ⊗ C) ⊗ D
and g : B ⊗ (C ⊗ D) -> E
, of course f ≫ g
doesn't typecheck.
I would like to define some extra notation, e.g. f ⊗≫ g
, which would invoke a tactic that inspects the target of f
and the source of g
, and decides if they are isomorphic via associator isomorphisms (probably also via identity isomorphisms, absorbing the monoidal unit on either side), and if so contructs that isomorphism α
and returns f ≫ α ≫ g
.
(By the axioms for monoidal categories, it doesn't matter _which_ associator isomorphism we use, as they are all equal.)
should there be an arrow in the type of g
?
I think I see where you're going for. Similar logic to my assoc_rw
tactic can be used to construct α
@Reid Barton applying assoc_rw
to categories is more complicated than I thought. It might be that I should just write a cat_rw
specifically for categories. Is there any other context in which such a tactic would be useful or would it make sense to just refer to composition from category
?
a semigroupoid? :D
:) Shouldn't that be an ancestor of category?
I could hard-code semigroupoid composition instead of category composition, no?
I've heard the word semicategory
, and there's actually some natural reasons to study them.
(Idempotent completion takes semicategories to categories, and in a certain sense is adjoint to the functor which forgets identities)
Would it be worth introducing a has_comp
type class?
(I assume semicategories have an associative composition)
I'm joking. I prefer to introduce concepts when they become useful and not before
it's not hard to retrofit them if some time in the future we see a genuine semigroupoid which is not a category
Fair enough :) my sense of usefulness for category theory still needs sharpening
While we wait for the category theory stuff to be merged, would it be worth it to add has_comp
to mathlib if I can use it in assoc_rw
? That might facilitate the development of the category theory proofs.
that sounds like it would be tied to a notation, but probably assoc_rw
will need to be usable with at least a few notations, in particular +
, *
, and o
What I'm thinking is for operators with simpler types (e.g. +
, *
) I can rely on is_associative
and then make a special case for categorical composition. The matching is a bit different anyway
that sounds reasonable. I doubt categorical composition will use any other notation than whatever Scott is setting up
I also have something like Scott's associators everywhere in my group completion work. For every uniform space a
, I have a complete Hausdorff completion a
and a map from a
to completion a
, and every uniformly continuous map from a
to b
lifts to a map between completions. This is all fun. The trouble comes when product spaces are involved. I have an isomorphism from completion (a × b)
tocompletion a × completion b
, but I need to insert it and its inverse at a lot of places.
Would it be worth introducing a
has_comp
type class?
Hmm, I wonder if moving ∘
to notation for a has_comp
class would be viable, with an instance for function.comp
... though I guess that is all in core Lean, so not viable at the moment.
Although this is even less under our control, is the correct long-term solution really to try and rethink how the actual type class system works? Or is the type class system some sort of standard machine which clearly will never change and we have to figure out how to work around it?
The mechanism will not change, at least there are no public plans for Lean 4 to change the type class mechanism. What will change, is the type class hierarchy. One thing is to move properties like commutativity, or zero_ne_one
to be type class mixins, i.e. predicates over other type classes. [comm_ring A]
will become [ring A] [is_commutative A (*)]
(or similar). Also the lower type classes in the hierarcht like semigroups, monoid, etc, will be parameterized in their operators. This could eliminate parts of the additive / multiplicative split of the type class hierarchy.
Concerning Lean 4: in what time scales should I think about the release? 3 weeks, 3 months, 3 years, 3 decades? Is there any hope/expectation/statement about this?
"Not before the end of 2018" said Leo in Oxford IIRC
Maybe some of my students with better memories than me can confirm this
Ok. I didn't know anything at all. So if people said we would have to wait till at least 2025, I wouldn't have been surprised either.
@Simon Hudon was there a question here left over from yesterday?
There isn't currently anything which generalizes category.compose
nor any concrete plans to add such a thing.
I assume it would be easy to change assoc_rw
later if this changes, anyways.
By the way how do you feel about the name rw_assoc
(and potentially simp_assoc
) instead? Potentially more discoverable by autocompletion, for one
Yes you're right. The other thing that such a generalization helps with is separating the category code from the code of assoc_rw
I chose assoc_rw
to conform with ac_refl
. I think I could be convinced in favor of rw_assoc
Last updated: Apr 24 2020 at 19:02 UTC


CRM 2016 Deactivate Record on Form With Emtpy Required Fields Bug and Workaround
2016-08-22 14:02:51ZSummary
Problem:
If an entity record is missing required fields, you get an error when trying to deactivate the record from the form.
Solution Summary:
I assume you know how to use RibbonWorkbench to edit entity ribbons so I gloss over the setup specifics. Review the Getting Started Guide at the author's website and the CRM 2016 RibbonWorkbench beta announcement post for more information about Ribbon Workbench.
- Open a solution containing the entities you want to fix in Ribbon Workbench.
- Add a Custom Javascript Action above the existing Custom Javascript Action. Our new action must execute first.
- Have the action call a function that does the following:
- remove the required level from all form fields then return. This must be synchronous code because the next Action will execute immediately after the first action returns. It should remember which fields were required if you want to restore them after
statecode
changes. - (optional) add an OnChange event to the
statecode
attribute (make sure this is on the form) to restore the required level to the correct attributes.
- remove the required level from all form fields then return. This must be synchronous code because the next Action will execute immediately after the first action returns. It should remember which fields were required if you want to restore them after
- Publish the solution from Ribbon Workbench.
The Workaround
In CRM 2016 (and similarly for others in 2013+), we ran into an odd error around deactivating Accounts and Contacts from their forms. This likely can happen on any record having a Deactivate button. If a Contact record is missing a required field denoted by a red *, then clicking the Deactivate button and completing the popup window by clicking OK, you get a not so helpful error message:
(The obscured window is the "Confirm Deactivation" CRM lightbox.)
If you fill in the required fields and try again (with or without saving the form), then the Deactivate button click works. Deactivating the record from a homepage grid or subgrid works regardless of the required fields. The grid approach does not need required fields to be filled. Why does the form need it? Since the required fields were the apparent blockers, I thought the button was changing the statecode and statuscode fields, saving the form, and failing because you can't save the form when required fields are empty. We have to see how the Deactivate button works, and I used Ribbon Workbench for CRM 2016 (beta) to see the function name I need to find.
The bottom right Custom Javascript Action is what an uncustomized Deactivate Button command does when clicked. Ignore the action above it for now - it is the workaround I will describe later.
The RibbonWorkbench showed me the library and function the Deactivate button calls - CommandBarActions.js
and Mscrm.CommandBarActions.changeState
. If I am on the Account form, the button calls Mscrm.CommandBarActions.changeState("deactivate", "{my-account-guid}", "account")
. I copied into a gist the code that I followed while trying to mentally trace what happens when Deactivate is clicked in our scenario. It is not the full CommandBarActions.js file. I don't find a definitive answer, but if you want to read the optional ramblings, follow the comments from top to bottom in this gist. It is suffice to know that empty required fields are the root of the problem that we can fix.
I think this is a bug in CRM 2016 forms, but we can work around it in a supported way. I wonder why the form does not do a specialized UpdateRequest (fancy name for "just update the statecode and statuscode in the UpdateRequest") through REST or WebApi? It might be on a backlog somewhere.
Check the top right Custom Javascript Action again. Notice the Custom Javascript Action called deactivateFromFormWorkaround
taking PrimaryEntityTypeName
as a parameter. This will temporarily remove the required level from required fields so deactivating from the form will complete.
This code could have instead done a Metadata query to retrieve which fields are required for this form. The SDK javascript libraries do asynchronous calls, and you can modify the functions to add a parameter to make them synchronous calls if you want. I think the presented approach is simpler and definitely less code. You do not have to restore the required levels as it is just a cleanup step.
One problem with this approach is if the user cancels the Deactivate confirmation, then the formerly required fields will still be not required.