in almost all cases the material to be parsed will be variable (e.g. values of real numbers)
and this is captured through regular expressions or regexes. No matter what programming language
is used (Perl, Python, Java, etc.) there is no escape from these, but we have tried to make them
as simple and error-free as possible. As an example let's assume that all keywords can be
truncated to 4 characters (this is quite a common length) so that all the following are valid
DIHE, DIHED, DIHEDR, DIHEDRA, DIHEDRAL
and possibly DIHEDRALS
It would be possible , but very inefficient, to write a template for each case. Regexes allow
us to express this by
DIHE.*
. This means:
Look for exactly 4 characters in order (D I H E
) and then allow any character (.) any number
of times including 0 (*).
The symbols (.) and (*) are known as "metacharacters".
Regexes are now fairly standardised and the Java syntax is common (see the Java tutorial). It's worth following these tutorials to get a basic understanding. You'll also benefit from online tutorials such as listed on StackOverflow as Regular-expressions.info. However you can go a long way with JUMBOParser with only a small amount. Here's 99% of what I use in writing parsers. Note that the backslash is necessary and fairly common.
| Metacharacter | Meaning |
|---|---|
| . | any character |
| \s | a single space |
| \S | a non-space character |
| \d | any single digit |
| [JUMBO] | any of the characters J, U, M, B, O |
| [A-Z] | any of the characters A,B,C...Z |
| [A-Za-z] | any of the characters A,B,C...Z and a,b,c,...z |
| ? | optional: count of 0 or 1 |
| * | count of 0 or more |
| + | count of 1 or more |
The downside of this is that when metacharacters (. [ ] { } ( ) - + * \
- not a complete list) occur normally they have to be escaped with a backslash.
So you will frequently see \. \[ \] \{ \} \( \) \- \+ \* \\
. This can be tedious and
is also error-prone so we have created a number of macros that make it easier for you.
Here are some examples:
Charge = 0 Multiplicity = 1is matched by
Charge = \d Multiplicity = \dIn this the whitespace is fragile, so I tend to write:
\s*Charge\s*=\s*\d\s*Multiplicity\s*=\s*\d\s*which means that if space is stripped by any tool in the chain, it's still parsed. However it's not pretty. Therefore we have a series of macros (symbols for common regexes) which manage the spaces and avoid many of the backslashes.
\s*Charge ={I}Multiplicity ={I}where the JUMBO-specific syntax {I} denotes an integer. The power comes when we include floats and capture. Another example with an ASCII-formatted table:
-------------------------------------------------------------------------------- ! R1 R(1,2) 1.394 calculate D2E/DX2 analytically ! ! R41 R(22,23) 1.066 calculate D2E/DX2 analytically ! ! A1 A(2,1,3) 110.8657 calculate D2E/DX2 analytically !is matched by:
\s\-+\s*This is read as: 1 space; followed by 1-or-more minus signs (escaped as it's a metacharacter);followed by 0-or-more spaces. (We cannot be sure that there aren't trailing spaces so we almost always end regexes with \s*).
\s!\s[RAD]\d+\s+\S+\s+[\d\.]+\s+.*!\s*This is read as: 1 space; one shriek; 1 space; an A, R or D followed by one or more digits; 1-or-more spaces; 1-or-more non-spaces; 1-or-more spaces; a mixture of digits and periods; 1-or-more spaces; anything; 1 shriek; optional trailing whitespace.
You may have thought that there are better ways to do this - there are almost always many different regexes which can parse the files and the best strategy will depend on the variability in the corpus. In the current example we almost certainly want to capture the values and the next section shows us how.
The macros will protect you from raw regexes from JUMBO, but here are the basics of how fields are captured. In the above example we can capture the name and the value by:
\s!\s([RAD]\d+)\s+\S+\s+([\d\.]+)\s+.*!\s*This gives two captureGroups (1 and 2 - the whole string is captureGroup 0). Normally you need access to the Java code to pick them up but JUMBO does this for you. It can also, optionally, give symbolic names (and even units). So in JUMBO specifically we can write:
\s!\s(A,am:name)\s+\S+\s+(F,am:distance)\s+.*!\s*This captures the names (R12, D3, A32, etc.) into the symbolic variable am:name and the distances into am:distance. There are a a small number of these macros, and we'll add more gradually:
| macro | captures | examples |
|---|---|---|
| I | any integer | 123 -34 0 |
| F | real number | 1.23 2. 3 -13.4 -4 |
| E | scientific notation | 1.23E+02 1.23D-04 2.1 -1.34 |
| A | string without spaces | A23 -12Z df=3.2 |
| X | any string | "A23 -12Z df=3.2" |
\s*((?:\-?\d+\.?\d*)|(?:\-?\d*\.?\d+))\s*(The exponential is worse!). That's more advanced than you need to know and the macros protect you from it!
Sometimes fields are repeated horizontally and here JUMBO allows for repeated fields:
Rotational constants (GHZ): 1.2383395 0.8928269 0.6713269is matched by:
\s*Rotational constants \(GHZ\):{3F,g:rotconst}which extracts exactly 3 floats into an array. Sometimes the number varies, as in:
Eigenvalues --- 0.35005 0.35915 0.36224 0.36629 0.37167 Eigenvalues --- 0.51910 1.01166 1.02582and we write
\s*Eigenvalues \-\-\- {1_5F,g:eigenval}where 1_5 means 1 to5. Sometimes we need precise columns, as in:
Eigenvalues --- 0.37456 0.37560 0.38218 0.38586 0.39602 Eigenvalues --- 0.40148 0.40211 0.40329 0.46257 0.48142 Eigenvalues --- 0.51910 1.01166 1.025821000.000001000.00000where the floats have run into each other. Counting the columns shows F10.5 with one space after the dashes. The following will capture this:
\s*Eigenvalues \-\-\-\s{1_5F10.5,g:eigenval}


RADIUS is an access control protocol that uses a challenge and response method for authenticating users. Setting up RADIUS server authentication is optional.Enabling this feature is optional.You can prioritize local, RADIUS, and TACACS+ authentication methods for the system and set the authorization policy and default user for RADIUS and TACACS+ authorization systems in the Configure > Security > General Settings page.For details about setting up RADIUS and TACACS+ servers, see the Steelhead Appliance Deployment Guide.
3. Click Apply to apply your changes to the running configuration.
Hostname or IP AddressPAP - Password authentication protocol (PAP), which validates users before allowing them access to the RADIUS server resources. PAP is the most flexible protocol but is less secure than CHAP. CHAP - Challenge handshake authentication protocol (CHAP), which provides better security than PAP. CHAP validates the identity of remote clients by periodically verifying the identity of the client using a three-way handshake. This happens at the time of establishing the initial link and might happen again at any time. CHAP bases verification on a user password and transmits an MD5 sum of the password from the client to the server. Override the Global Default Key Server Key - Specify the override server key. Confirm Server Key - Confirm the override server key. Specify the number of times you want to allow the user to retry authentication. Valid values are 0-5. The default value is 1. Select the check box next to the name and click Remove Selected.Note: If you add a new server to your network and you do not specify these fields at that time, the global settings are applied automatically.
5. Click Save to save your settings permanently.Note: To modify RADIUS server settings, click the server IP address in the list of Radius Servers. Use the Status drop-down list to enable or disable a server in the list.Configuring General Security Settings


What I am trying to do here is bundle a package for distribution and reuse, but still allow using Parcel to test and develop.
I want to be able to just write code and run it, the normal way for me is
npm run chrome
And to build the library for separate use.
import fun from "myfunlibrary";
fun("times");
Open the console (F12) to see if things worked, you won't know by looking at this page.
I think I can do this by using a separate entry point + build command.


- Facebook, Instagram, Pinterest,Snapchat.
- Guaranteed follower growth for increas brand awareness.
- Daily updates on choose platforms
- Stronger customer service through daily interaction
- Monthly progress report
- 1 Million Followers
Get Started
- Facebook, Instagram, Pinterest,Snapchat.
- Guaranteed follower growth for increas brand awareness.
- Daily updates on choose platforms
- Stronger customer service through daily interaction
- Monthly progress report
- 2 Blog Post & 3 Social Post
- 5 Millions Followers
- Growth Result
Get Started
- Facebook, Instagram, Pinterest,Snapchat.
- Guaranteed follower growth for increas brand awareness.
- Daily updates on choose platforms
- Stronger customer service through daily interaction
- Monthly progress report & Growth Result
- 4 Blog Post & 6 Social Post
Contact us
- Up to 10 Templates
- Unlimited Download & Access
- Support
- Integer in lorem dapibus
- Lacinia libero eget, faucibus leo.
- Quisque consectetur arcu
- Integer cursus metus quis
- Vivamus in velit at mauris imperdiet
- Nunc pellentesque facilisis finibus.
Get Started
- Up to 10 Templates
- Unlimited Download & Access
- Support
- Integer in lorem dapibus
- Lacinia libero eget, faucibus leo.
- Quisque consectetur arcu
- Integer cursus metus quis
- Vivamus in velit at mauris imperdiet
- Nunc pellentesque facilisis finibus.
Get Started
- Up to 10 Templates
- Unlimited Download & Access
- Support
- Integer in lorem dapibus
- Lacinia libero eget, faucibus leo.
- Quisque consectetur arcu
- Integer cursus metus quis
- Vivamus in velit at mauris imperdiet
- Nunc pellentesque facilisis finibus.
Get Started


The quick-fix can delete the unused definition.
See https://facilityapi.github.io/define/fsd for more information.


Motivation
How does life look through the 'pleasure, passion and purpose' lens?
- 1. Pleasure: This type of happiness is about always chasing the next high. It is the rock-star type of happiness because it is very hard to maintain unless you are living the lifestyle of a rock star
- 2. Passion: Also known as “flow,” where peak performance meets peak engagement, and time flies by.
- 3. Higher Purpose: This is about being part of something bigger than yourself that has meaning to you.
From the 'discovering values and higher purpose' exercise,
What are your core values?
What do you stand for?
- 1. Autonomy: The urge to direct our own lives
- 2. Mastery: The desire to get better and better at something that matters
- Purpose: The yearning to do what we do in service of something larger than ourselves
How did you find the resilience ideas and meditation exercise?
Any other musings?
it’s much easier to achieve something if you can visualize yourself already achieving it.mmmmmmmm
Flow is a state of peak performance discovered
quotes that hit resonance


Arrays an hashes are, in simplest terms, ways to store a group of information. Once your array or hash is full of the information you want it to store, you can access that information for use later in your program. You can also add, delete and alter the stored information at any time making arrays and hashes a powerful tool for programming.
I will start by explaining the simpler of the two, arrays. You can think of an array of a list of items, and just like a written list the first piece of information you add goes in the first spot, the second in the second and so on. As I said before you can edit your array to change what spot the information is in, but the important thing to remember is that the place the information takes in the array is how you access it. Below I have a sample block of code that gives you an example of one way to create an array and how to access the information inside.
array = [1,2,3,"one", "two", "three"]
array[4]
Arrays can hold pretty much any information, including other arrays, but in this example we have 6 pieces of information; 3 integers and 3 strings. On the second line we see how we access the information. As I said information is accessed by where that info is in the array. Also one thing to note is that in programming we start counting at zero instead of one. So what that second line says is that we are accessing the 5th piece of information in the array, or the string, "two".
Hashes are very similar to arrays. The biggest difference is that we are storing two pieces of information, where the first is pointing at and referencing the second. We call the first piece a key, and the second a value. You can think of the key like the "4" in "array[4]". Except that it can be anything you want it to be, just like the value. Here is an example of one way to create a hash and how to access information inside it.
hash = {
"first" => 1,
"second" => 2,
"third" => 3,
:fourth => "one",
:fifth => "two",
:sixth => "three"
}
hash[fifth]
In this example the values are the same as the information we had stored in our array. I have set the keys to a mix of strings and objects. On the bottom line I have accessed the same information we did from the array, the difference of course is that we need to use the key to access it instead of the place where it resides. The major benefit of using hashes instead of arrays, besides setting our own keys, is that the keys themselves are pieces of information that can be accessed and used. And these are the basics of arrays an hashes.


Welcome to the Yammer URL shortener extension!
To get started, log in!
Enter your server URL.
Enter your email.
Enter your password.
Submit


--- layout: post title: Allowing developers to use the tools they love categories: - praise author: admin published: true date: 2005-04-09 02:18:02.000000000 +01:00 ---
Hank Roar is the customer on a project being developed by ThoughtWorker Obie. He’s quite pleased with the progress:
Never under estimate the importance of allowing developers to use the tools they love. I don’t personally know Obie well, but I think he feels passionate about Ruby and Rails. This, coupled with the fact that the simulators will not go to my ultimate users, has resulted in the simulators being fun to use, not just simple data entry forms. The executive sponsor was very impressed with the simulator. I think the sponsor really enjoyed how much fun it was to use.


Paper: arXiv 2019 Fast, Accurate and Lightweight Super-Resolution with Neural Architecture Search
Best Method and Code: FALSR-A
Last Update: 2019-02-21


Home
Surf Freely
Bookmarklets
Games
Watch-movies/tv
Forums
Mine Litecoin
Choose the server you wish to use.
Expect more servers to be added in the future.
Local CensorDodge Proxy (
Running.
)
Node Unblocker (
Running.
)
Local PHP-Proxy (
Running.
)
YouTube Proxy (
Running.
)


US to extend license allowing its cos to continue business with Huawei: NYT
The United States is set to extend a license allowing U.S. companies to continue doing business with Chinese technology company Huawei Technologies Co Ltd, the New York Times reported https://nyti.ms/2OcpWYo on Friday, citing people familiar with the deliberations.
REUTERS: The United States is set to extend a license allowing U.S. companies to continue doing business with Chinese technology company Huawei Technologies Co Ltd, the New York Times reported https://nyti.ms/2OcpWYo on Friday, citing people familiar with the deliberations.
An earlier reprieve issued by the U.S. Commerce Department is set to expire on Monday, but the administration of U.S. President Donald Trump is expected to extend it for a period of time, according to the report, which added that the decision could change given the ongoing trade talks between the U.S. and China.
Huawei and the Commerce Department did not immediately respond to a Reuters request for comment outside regular working hours.
(Reporting by Kanishka Singh in Bengaluru; Editing by Sandra Maler)


Followings Are The Features Of Our Institute
We Provide Free Demo Classes For New Students , So They Can Decide Whether They Will Join Or Not.
Our Institute Provides 4 Days Classes In A Week , So The Students Can Learn Well.
If Anyone Misses Our Class Due To Valid Reason(s) We Will Provide Them Free Backup Classes.
For Better Understanding Of The Students We Provide Small Batches , So Every Student Can Understand And Learn Very Easily.
We Keep Our Students Motivated During Classes , So They Can Understand And Study Easily.
Our Motto Is To Educate Our Every Student Very Well , So We Guide Weak Students Individually.
Kishan Kanhaiya Singh - The Founder Of The C2 Institute. He Is A CA Finalist And Done Accounting Technician Course (ATC) , CS Inter And B.Com(Hons.)
Kishan Kanhaiya Singh , The C2 Institute.“Our Motto Is To Give Quality Education To Our Students”
Following Are The Subjects For Which We Provide Classes


about |
download |
install |
reference |
faq |
tips&tricks |
about security
Why
People always ask me 'why?'. So here is a little explanation how I came to develop xxm.
Before I learned ASP, I had done PHP and ColdFusion, and a bit of client-side JavaScript. Those did what they needed to do and the platforms I was working on supported them.
It was only when I needed to program for hosting that didn't support anything else than ASP that I made some time to get a hang of ASP.
Soon I learned that ASP is based on the script manager much like Internet Explorer and Windows Scripting Host uses for running script in any language of choice. All I needed to do was learn about Request and Response objects.
So I preferred ASP/JScript (over ASP/VBScript), though it generally is harder to read and get the syntax right (in plain Notepad!). Back then I also wondered what it would be like to have something similar in Delphi. Pascal is a nice langauge to code in, but embedding it in HTML would take some effort.
Ever since then I dreamed about making xxm, but I only got around to doing it a few years later (2007).
The advantages are numerous:
- compile over parsing
- HTML and embedded code are re-parsed into a Delphi project, which is compiled and run. This beats parsing the same code over and over again, even with cached parse-data. Light-weight libraries can get loaded by the web-server and even shared by instances on the same server. Also, Delphi's compiler is already known to be one of the fastest around.
- speed
- Not only will a compiled module perform better than scripting, the Delphi compiler is really fast, and only compiles changed source-files, which makes it as painless to code for xxm as any parsed platform. Also, xxm's internals are all geared towards getting data in and out as fast and as direct as possible. Other Delphi-Web-tools have the nasty habit of reading all of the request data first, and building all of the response data before sending it. xxm provides the PostData stream, with its position at zero, ready for you to read from, even with the client still sending data. Also all data that you send is sent to the client as soon as possible.
- portability
- In a develop-release-environment, only the compiled module needs to get published to the live server(s) for the web-application to run. This adds to security and is less data. Also no resources on the live servers are wasted on processing source-files (again).
- extensibility
- Since the embedded code is re-worked for the Delphi compiler to build, any code that would work in Delphi works. Which enables easy access to existing projects or platforms and re-use of code.
- more percs
- xxm churns out a Delphi project. Open it, and use the local handler to debug it!
And, important to me personally, I know Object Pascal best. Yes, I could look into existing solutions like ASP.Net, Python or Ruby, but to obtain an equally high level of knowledge of these languages new to me, would take far longer than to develop xxm.


There are, admittedly, fractions of moments that strike every urbanite when they wish they were judges pounding a gavel resentfully and claiming back the golden silence of their own from the hustle and bustle of urban life.
And the bogey of noise is not exclusive to our times. “In a thousand senses, I proclaim the indispensable worth of Silence, our only safe dwelling-place often”. So wrote Thomas Carlyle, a Scottish historian, in a letter to his friend in 1840 - when all the mechanical monsters condemned as noise sources were still beyond imagination.
Noise is often defined as the sound that is unwanted, disturbing, annoying, and even detrimental to health when it is excessive and becomes noise pollution. Intrinsic to the modern soundscape, noise is everywhere, yet in many cases nowhere to be solved.
According to the United Nation, noise pollution is regarded as “an increasingly omnipresent, yet underestimated, form of pollution”. A report by World Health Organization in 2011 shows that at least one million healthy life years are lost every year from traffic-related noises in Western Europe.
As in China, an increasing emphasis on noise pollution has been witnessed in recent decades, in tandem with its ambitious plan of urbanization, the astounding economic development and the overwhelming number of population.
The Chinese Ministry of Environmental Protection has published annual reports on environmental noise prevention and control since 2011, demonstrating the situation of environmental noises in China with possible solutions proposed.
Thumbing through the reports from 2011 to 2017, one may soon realize the danger of the background grumble of our daily life and how noise is more than a nuisance. To begin with, there is something about noise that you need to know.
So, to what extent should an “unwanted sound” be considered as “noise”? Have a look at our interactive body map and embark a journey through the soundscape in your mind.
Imagine walking in the quiet suburb areas at midnight – no traffic, no residence, no murmuring of insects with no names – that’s about 30 decibels (dB), also the WHO recommended level of sounds to have a good night of sleep.
When it fluctuates between 40 and 50dB, which are still considered to be a “comfortable” sound level, it is equivalent to the sound of typing or printing in a quite office where no one talks, yet considered to be disturbing for medical, education and residence areas at night, according to the annual reports.
At 55dB, a similar sound level to people talking in normal voice, could be affecting the aforementioned areas during the day, while noises between 55 and 60dB will be “slightly noisy” and categorized as “average” level of urban environmental noise.
To goes beyond 70dB, noises are considered to be “pollution” and start to distract people from what they are doing. The sound of phone ringing, the environmental sound inside a moving train, noises at this level can result in a rise in blood pressure with a decline in concentration.
A bus passing by at around 80dB, a dog barking ferociously at around 90dB, human would feel very uncomfortable, with the levels of endocrine starting to change and resulting in anxiety and bad headaches. Working in a sound environment with noises higher than 80dB would also cause blurred vision and dizzy head.
It would be ‘extremely noisy and uncomfortable’ when the decibels arrive at 100dB, which is similar to a train passing by an iron railway bridge, whereas the singing of Karaoke inside a confined room would reach at 110dB, causing reflective movement of muscles and the intention to sing and dance.
Beyond that, noises are no more fussy issues but deadly threats to our health. Severe damages would be made to ears when noises fly above 120dB to 130dB, equivalent to the sound of a working combustion engine of airplane. Hearing lost and eardrum rupture could be caused by noises louder than 140dB.
Quite alarming, isn’t it? In an effort to better prevent and control the adverse influences of the unwanted sounds, China has developed a series of measurements regarding the categorization of different urban spaces and standards of environmental noises in each zone at different time respectively.
The dozens of annual reports released by the environment protection ministry offered a glimpse of the noise environment of China from various perspectives – some are not so surprising, while the others are rather jaw-dropping findings.
Urban spaces are well defined and categorized into five general zones with different requirements of environmental noises.
The Zone 0 of sanatoriums and villas, where people resided there to recover from illnesses, has the strictest noise requirement of less than 50dB by day and 40dB at night, followed by neighborhoods of hospitals, schools and residence areas, or the Zone 1, requiring the noise decibels to be lower than 55 by day and 45 at night.
Zone 2 is the mixed areas of commercial buildings and residential community, 60dB by day and 50 by night. After that, the other zones would be clear of residential community, with only industrial and transport areas included.
The noise environment of Zone 3, the industrial areas, is limited to 65dB by day and 55dB at night, whereas Zone 4, including Zone 4a as roadside areas and Zone 4b as areas near railways, is required to keep the noises down to 70dB by the day and 55dB (4a) or 60dB (4b) at night.
To divide the noise environment into day and night, the reported compliance rate of different areas reveal a stark contrast that worth our attention.
From 2013 to 2016, during daytime, most zones have seen a rather satisfying compliance rate, with most of them higher than 90 per cent, especially the mixed areas of commercial and residential community (Zone 2) together with the industrial areas (Zone 3).
Zone 0 falls short in the daytime environmental noise ranking, 20 per cent lower than other zones on average, yet has seen an improvement from 66 per cent in 2013 to 78.6 per cent in 2016.
However, the noise environment of different zones at night is way below standard.
Zone 1, where people resided and sleep at night, has only attained a compliance rate less than 75 per cent – meaning that one quarter of cities in China are sleeping in noises that are already disturbing to their normal life.
The most unqualified areas are Zone 4 on the roadside or near the railways, seeing the lowest compliance rate at 42 per cent in 2014 and the highest at 61 per cent in 2016 only. Traffic noises remain one of the biggest and most difficult noise sources in China.
Moreover, Zone 0, where the sanatoriums are located in, has seen a 46.6 per cent compliance rate in 2013, lowest among the five zones. It indicates that those who were in greatest need for a quiet environment suffered most from the ill-managed noise environment.
Even though the rate of Zone 0 improves a lot during the years, peaked at 64.9 per cent in 2015, it is still below the average level and requires greater attention.
Moreover, the background grumble of our daily life turns out to be one of the most critical environment issues. From 2010 to 2016, the number of complaints filed against noise pollution has doubled from 250,000 to more than 500,000, taking up more than half of the environment-related complaints.
Despite consistent investment in noise prevention and control, with more than one billion yuan each year, the overall situation of environmental noise in China is still alarming, due to several major noise sources, ranging from traffic noise to population density, and the absence of effective management system.
“Ancient life was all silence. In the 19th century, with the invention of the machine, noise was born”, said Luigi Russolo, Italian painter and composer, in his futurist manifesto called The Art of Noises in 1913.
Yet in reality, noises are rather fussy than artsy – just like how the unwanted sound sabotages the harmonics of urban life with the existence of which is hardly avoidable or traceable.
Walking across the urban soundscapes of different cities in China, one may get to notice the looming cloud of noises that comes from all directions, no matter you are at home or one the way back home, asleep or trying to get some sleep, working or just off work.
WU Fei, a 23-year-old young historian studying in Hong Kong, found herself helpless when dealing with the noises from a construction site next to her home in Dandong City.
“The residential community we live in has been under construction for years now, ever since we moved in”, she said. “The workers start working after 5:30 am every day, and last night it did not stop until 11:30pm.”
The official construction time period set by the government is from 6am to 10pm.Wu tried to negotiate with the property management office, which passed the buck of complaints to the local environmental protection bureau.
“The officials of the bureau said it is not at their position to stop the construction, since the workers have only exceeded the quiet hours for a few minutes”, Wu said, questioning if this was not their responsibility, then what else should be.
Yet for the 26-year-old engineer, WANG Ziwen, who pays frequent visits to construction sites in Hang Zhou, the noises of excavator digging up rocks and muds did not seem to bother him much.
“The noises of excavator tearing down walls are rather loud”, said Wang, who works in a board room at the construction site for more than eight hours every day. “But it is not so harsh and irritating that I could not bear.”
Wang said the noises and dust caused by the construction sites were under strict supervision of the urban management officers, which makes it less likely for the company to violate the regulations.
He added that the company did not provide earplugs or other protection for the workers, nor was he aware how high is the decibels of the construction or whether or not the noises are harmful to his health.
In Shanghai, another cosmopolitan city located next to Hangzhou, what annoys ZHAI Jihong most is the noises inside the metro station.
“The sound of an old crappy train braking at the platform is like an upgraded version of that irritating noise when a chalk scratches on the blackboard,” said the 22-year-old data analyst. She takes the metro to work every day, and has to put up with that unwanted soundbite every day as well.
“But isn’t it difficult to define what is noise?” She asked. “My younger sister found that braking noises so unbearable that she had to cover her ears, while my mother was just fine with it.”
Zhai said it was also difficult to file complaints against the noises pollution in public spaces, especially places extremely crowded like metro stations.
“Everyone is talking, shouting and trying to squeeze into the train. Even if the noises make you feel very uncomfortable, people are still there. And it is impossible to have the train changed.”
Noise pollution in public areas is also tough to deal with for ZHANG Ping living in Tongcheng, Anhui Province. What strikes her most is not construction or traffic noises, but the sound of music played by a dozens of retirees dancing at the square downstairs every day.
“It is extremely annoying,” the 22-year-old student said. “All the squares nearby are taken by female retirees who live here. They played pop songs at really high volumes which even gives me headaches.”
Similar with Wu’s case in Dandong, Zhang’s attempt to negotiate with the residential property management office was in vain.
“All the officers did was just to post an announcement, suggesting the residents to appropriately arrange their time for the square dances in order not to bother others. That’s it.” She added that it would be difficult for the office to take serious actions since all the retirees were residents from the neighborhood.
It feels like a dilemma in which no one wins, and everyone has got their hands tied up when facing the unwelcome yet unavoidable existence of noises.


Allison Yee is a senior at San Jose State University. She is pursuing a major in International Business and a minor in Spanish. Last fall, she studied abroad in Barcelona, Spain at Toulouse Business School. Her time living and traveling abroad enhanced her understanding of other cultures, and she looks forward to interacting with others who share her interests.
Allison has always been fascinated by foreign languages and cultures, and she often spends her free time self-studying a language that interests her. She has a passion for traveling and hopes to one day explore Japan, South Korea, and Turkey. In addition to her passion for traveling and interest in other cultures, Allison is a puzzle enthusiast. She aims to be a globally-aware leader working towards innovative solutions to meet global needs.


 Your identity level is {{profile.ial}}, but most services require level 2. Please see your point of contact so they can help you verify your identity.
{% else %}Your identity has been verified to level {{profile.ial}}. You may now access the:


Files | |
| file | CGenericObject.cpp |
| file | CGenericObject.h [code] |
| Implements a base class for all objects. | |
| file | CMesh.cpp |
| file | CMesh.h [code] |
| Implements a class to model polygonal meshes. | |
| file | CMultiMesh.cpp |
| file | CMultiMesh.h [code] |
| Implements a 3D multi-mesh object. | |
| file | CMultiPoint.cpp |
| file | CMultiPoint.h [code] |
| Implements a 3D point cloud object. | |
| file | CMultiSegment.cpp |
| file | CMultiSegment.h [code] |
| Implements a collection of 3D segments. | |
| file | CShapeBox.cpp |
| file | CShapeBox.h [code] |
| Implementation of a 3D shape box object. | |
| file | CShapeCylinder.cpp |
| file | CShapeCylinder.h [code] |
| Implementation of a 3D cylinder object. | |
| file | CShapeEllipsoid.cpp |
| file | CShapeEllipsoid.h [code] |
| Implementation of a 3D shape ellipsoid object. | |
| file | CShapeLine.cpp |
| file | CShapeLine.h [code] |
| Implementation of a 3D line object. | |
| file | CShapeSphere.cpp |
| file | CShapeSphere.h [code] |
| Implementation of a 3D shape sphere object. | |
| file | CShapeTorus.cpp |
| file | CShapeTorus.h [code] |
| Implementation of a 3D shape torus object. | |
| file | CVoxelObject.cpp |
| file | CVoxelObject.h [code] |
| Implementation of a 3D volumetric object. | |
| file | CWorld.cpp |
| file | CWorld.h [code] |
| Implementation of a virtual world. | |


"""RethinkDB connection manager.
It only contains the :code:`connect()` function. It's preferable to use
the :meth:`rethinkmodel.config()` function to set up connection informations
before to call :code:`connec()` function, or use environment variables.
- RM_DBNAME
- RM_PORT
- RM_HOST
- RM_USER
- RM_PASSWORD
- RM_TIMEOUT
"""
import os
from typing import Any, Tuple
from rethinkdb import RethinkDB
DB_NAME = os.environ.get("RM_DBNAME", "test")
PORT = int(os.environ.get("RM_PORT", 28015))
HOST = os.environ.get("RM_HOST", "<IP_ADDRESS>")
USER = os.environ.get("RM_USER", "admin")
PASSWORD = os.environ.get("RM_PASSWORD", "")
TIMEOUT = int(os.environ.get("RM_TIMEOUT", 20))
SSL: Any = None
SOFT_DELETE = os.environ.get("RM_SOFT_DELETE", "false").lower() in (
"true",
"yes",
"y",
"1",
)
[docs]def connect() -> Tuple[RethinkDB, Any]:
"""Return a RethinkDB object + connection.
You will usually not need to call this function. Rethink:Model use
this function to internally open and close database connection.
"""
rdb = RethinkDB()
connection = rdb.connect(
host=HOST,
port=PORT,
db=DB_NAME,
user=USER,
password=PASSWORD,
timeout=TIMEOUT,
ssl=SSL,
)
return rdb, connection


{{client_id}}
{{user|e}}
{{store|e}}
curl -XGET -v -H 'Accept: application/json' -H 'X-Auth-Client: {{client_id}}' -H 'X-Auth-Token: {{store.access_token}}' https://{{api_url}}/stores/{{store.store_hash}}/v3/catalog/products


Grab your we are going to Code here.
But coding is not mandatory, you can just listen and watch.
If you want to code, you will need 0.10.40 <= node < 6 and a laptop with any editor.
While you wait, then install oc: [sudo] npm i -g oc
Coding, technology, conferences
London, UK
OpenTable

...
<oc-component href="//oc-registry.com/component/1.X.X/?a=b">

hello John Doe

</oc-component>
...

$ curl https://oc-registry.com/component/1.X.X/?a=b
{
"href": "https://oc-registry.com/component/1.X.X/?a=b",
"version": "1.0.0",
"requestVersion": "1.X.X",
"html": "
hello John Doe
",
"type": "oc-component",
"renderMode": "rendered"
}
$ curl https://oc-registry.internal.com/header/1.X.X/?userType=Admin&country=UK -H Accept-Language:ja-JP
{
"href": "http://components-789/header/1.X.X?userType=Admin&country=UK",
"html": "
...
"
}
$ npm install -g oc
$ mkdir components && cd components
$ oc init test-component jade
$ echo 'div this is my component' > test-component/template.jade
$ oc dev . 3030
$ oc preview http://localhost:3030/test-component
$ oc registry add http://oc-registry.herokuapp.com
$ oc publish /test-component
$ oc preview http://oc-registry.herokuapp.com/test-component
// template.jade
img(src=staticPath+'img/img.jpg')
// server.js
module.exports.data = function(context, cb){
cb(null, { staticPath: context.staticPath });
};
Enables people to create new components independently and publish them
Flexibility (unopinionated)
Granular ownership
Resiliency
Performance
Robustness
Serve as framework for experimenting and A/B testing new ideas in the front-end
github.com/matteofigus/awesome-oc
follow me on twitter - @matteofigus


gratis
Store
Simulator
Support
About
Log in
Sign up
Settings:
Background colour:
Foreground colour:
Logo image:
Submit
Total: $50.00


Made with aframe. Get project on Github
Scan with cardboard compatible device to start stereo 3d mode


Xamarin Certified Mobile Professional
Completed all required courses and exams to be considered a Xamarin Certified Mobile Professional.
PWA - Estácio de Sá College of Belo Horizonte - Lecturer
PWA - What you should know about
Inspiratio - Squadra Tecnologia - Speaker
Inspiratio is an initiative by Squadra Tecnologia that aims to bring mini-lectures to its employees on various technology issues.
DependencyService and Custom Renderers in Xamarin Forms - Cotemig - Speaker
DependencyService Accessing native functionality
Custom Renderers change the appearance and behavior of controls
Xamarin Dev Day BH - Speaker
Xamarin Dev Days are community-driven learning experiences geared towards entry-level mobile developers to help build, test, and connect iOS, Android, and Windows native.
Xamarin Basic Marathon - Certified
Microsoft Certificate of Participation - Basic Xamarin Marathon
Microsoft Certification 70-480
Microsoft Certification 70-480: Programming in HTML5 with JavaScript and CSS3
Microsoft Certification MB2-876
Microsoft Certification MB2-876:Extending Microsoft Dynamics CRM 2011


This is a basic set of test pages to support:
the online training course
"Selenium WebDriver API With Java"
The test pages are
here


Utopia::Controller::Actions
Actions let you match path patterns in your controller and execute code. In your controller.rb
simply add:
prepend Actions
If you are adding multiple things, like rewriting, they should come earlier in the chain, e.g:
prepend Rewrite, Actions
A simple CRUD controller might look like:
prepend Actions
on 'index' do
@users = User.all
end
on 'new' do |request|
@user = User.new
if request.post?
@user.update_attributes(request.params['user'])
redirect! "index"
end
end
on 'edit' do |request|
@user = User.find(request.params['id'])
if request.post?
@user.update_attributes(request.params['user'])
redirect! "index"
end
end
on 'delete' do |request|
User.find(request.params['id']).destroy
redirect! "index"
end
Path Matching
Path matching works from right to left, and '**'
is a greedy operator. Controllers are invoked with a path relative to the controller's URI_PATH
, so all lookups are relative to the controller.
"*"
- Match a single path element
"**"
- Match all remaining path elements
String
- Match a named path component, e.g.
"edit"
. Symbol
- Equivalent to
["**", symbol.to_s]
, e.g.:logout
.
Otherwise Matching
If no action was matched, it is sometimes useful to perform some specific behaviour. You can specify this by using the otherwise handler:
otherwise do |request, path|
fail! :teapot
end
If you are doing this to perform some kind of rewriting, it may be preferable to use the Rewrite controller layer.
Nested
Definitions
def process!(request, path)
Invoke all matching actions. If no actions match, will call otherwise. If no action gives a response, the request is passed to super.
Implementation
def process!(request, path)
catch_response do
self.class.dispatch(self, request, path)
end || super
end


10 February 1998
Disease Outbreak Reported
The outbreak which began in the port city of Beira two weeks ago has increased dramatically and around 2000 cases with 109 deaths had occurred up to 9 February according to reports from the national health authorities. Strict control measures are being implemented by the Ministry of Health in cooperation with other health organizations but are hampered by the very poor sanitary conditions prevailing in the city.


2 columns on small and above, stacked on rest
3 columns on small and above, stacked on rest
7 columns on small and above, stacked on rest
2 columns on small and above, 4 on large and above
3 columns on small and above, 4 on large and above
7 columns on small and above, 4 on large and above


This is a very small bay just west of Prickly Bay and is primarily a charter base for Horizon Yachts.
Position 11° 55'55"N, 61° 46'10"W (bay entrance)
The bay is totally open to the south and rolly. Dockage is very limited.


TEMA
Tumor Evolution Manager and Analyzer
User activation
We are verifying the provided confirmation token...
Your user has been activated!
An error occurred during the activation of your user.
User already activated.
An error occurred during the activation of your user.
...


---
layout: post
title: Second release of "Learning CFEngine 3"
permalink: /second-release-of-learning-cfengine-3
date: 2012-11-14 20:33:23.000000000 -06:00
comments: true
categories:
- booknews
published: true
---
I am happy to announce that as of today, the second release of "Learning CFEngine 3" is available. If you have purchased the e-book version of the book you can get the new release from the "Your Products" page at oreilly.com (pro tip: set up Dropbox synchronization, and you will always have the latest version with you!). And if you haven't purchased it, now it's an excellent time to do it! You get all the fresh content, and all future releases for free.
These are the main updates in this release:
- The book has been updated to reflect changes introduced up to CFEngine 3.3.9 (the latest stable release as of this writing), including many features that were previously only available in CFEngine Enterprise, such as guest_environments promises, databases promises, and more.
- The installation instructions now reflect the availability of binary package repositories for many Linux distributions, as well as the “Free 25” Enterprise packages that allow you to try CFEngine Enterprise for free, for up to 25 machines.
- Vim fans rejoice! A new Appendix, contributed by Neil H. Watson, provides details on how to use Vim to edit CFEngine policy files.
- This release fixes all known errata, including many typos, omissions, and other numerous miscellaneous things.
I hope you enjoy this update! And if you have any feedback, please feel free to contact me.


|
Franco Pestilli Project Director |
Soichi Hayashi Software Engineer |
Brent McPherson Graduate Student |
|
Dan Bullock Graduate Student |
Lindsey Kitchell Graduate Student |
Bradley Caron Graduate Student |
|
Sophia Vinci-Booher Postdoctoral Researcher |
Josiah Leong Postdoctoral Researcher |
Josh Faskowitz Graduate Student |
|
Stephanie Andrea Communications and Outreach |
Key collaborators
Robert HenschelDirector of Science Community Tools at Research Technologies, Indiana University |
Eleftherios GaryfallidisAssistant Professor of Intelligent Systems Engineering, Indiana University |
Lei WangAssistant Professor of Psychiatry and Behavioral Sciences and Radiology, Northwestern University |
Ivo DinovAssociate Director for Education and Training, Michigan Institute for Data Science, University of Michigan |


The Diner is a text-based, perma-death game built in React with an integrated chat lobby. Players connect, give their name, pick from randomly generated stats, and then join the chat lobby. Once in the lobby, players can communicate with each other normally or with "/me" emotes. Players can challenge each other to a fight, with the loser being ejected from the app.


Some experimental loaders
Add class light to spinner element when placed against light background.
light


Get £10 off Nintendo Switch Lite ahead of Black Friday
by Emily GeraLooking for a Nintendo Switch deal?
Black Friday is kicking off a week early over at Game, and one of the first deals to trickle out from the UK retailer comes in the shape of Nintendo Switch Lite.
While it’s only a tenner off its original price, you can pick up a turquoise, gray, or yellow Switch Lite for the very tempting £189.99. Nintendo Switch Lite consoles will typically set you back about £200.
But if the lite version isn’t quite up your street, Game also has a deal on a full Nintendo Switch with improved battery. The Nintendo Switch Neon is bundled with a Steelseries Arctis 1 wireless headset, together for £319. The wireless headset will typically go for around £100, while Nintendo Switch is generally priced at £279.99.
Want even more Nintendo Switch Black Friday deals? The Nintendo Switch Black Friday deals hub will sort you out. If you want something from Sony or Microsoft, the PS4 Black Friday and Xbox One Black Friday deals hubs will have everything you need.


If you would like to practice pronunciation using contextual learning based on your environment, choose "Pick a Scenario"
If you would like to practice with your own words and sentence, choose "User Your Own Sentence"


Vesa Karvonen
Programs are about state. It can't be completely eliminated. It must be managed.
State changes over time so immutable state is an oxymoron. One can capture state at a point as an immutable value but that is not all.
One of the points of this talk is to argue that external shared global state is actually better than internal encapsulated local state.
There are no new "innovations" in this talk.
Most papers in computer science describe how their author learned what someone else already knew. — Peter Landin
State complects: Value and Identity and Time
Both identity and time are subtly complex!
Tracking identities often complicates algorithms e.g. React keys.
Change over time invalidates computations dependent on state.
Bugs, bugs, and more bugs!
let x = 1 // Creates mutable state
let y = 2
let sum = x + y // Takes snapshots of state
x = 3
sum // No longer valid
function foo() {
let x = 1 // Creates mutable state
bar(x) // Doesn't pass state - only value
x = 2 // Mutates state - not visible to `bar`
return x // Doesn't return state - only value
}
interface State<T> {
get(): T;
set(value: T): void;
}
class Atom {
constructor(value) {
this.value = value
}
get() {
return this.value
}
set(value) {
this.value = value
}
}
First-class: can pass as arguments and return as results
Program components can declare state as parameters
class Atom {
constructor(value) {
this.value = value
this.observers = []
}
get() { return this.value }
set(value) {
this.value = value
this.observers.forEach(observer => observer(value))
}
subscribe(observer) {
observer(this.get())
this.observers.push(observer)
}
}
Independence from time
class LensedAtom {
constructor({getter, setter}, source) {
this.getter = getter
this.setter = setter
this.source = source
}
get() {
return this.getter(this.source.get())
}
set(value) {
this.source.set(this.setter(value, this.source.get()))
}
}
Store state as a whole and slice elements of said state to components
class PairAtom {
constructor([lhs, rhs]) {
this.lhs = lhs
this.rhs = rhs
}
get() {
return [this.lhs.get(), this.rhs.get()]
}
set([lhs, rhs]) {
this.lhs.set(lhs)
this.rhs.set(rhs)
}
}
Transactionality
Independence from storage
Yes: Anyone who has access to a slice of state can mutate it.
Scope: A component that is given a slice of state as a parameter can only mutate that slice — not everything.
Intent: If you give mutable state to a component, the intention is that the component can mutate it.
Observe: Even if someone mutates the state, components can observe the state change and act accordingly.


May 2015 Archives by thread
Starting: Fri May 1 00:09:13 CEST 2015
Ending: Sun May 31 19:16:41 CEST 2015
Messages: 389
- [erlang-questions] Measuring message queue delay
Geoff Cant
- [erlang-questions] Automatic currying
Pierre Fenoll
- [erlang-questions] OTP in FIPS mode ?
Dániel Szoboszlay
- [erlang-questions] Error in Common Tests
Peter Andersson
- [erlang-questions] {error,closed} vs. {error,econnreset}
Bekes, Andras G
- [erlang-questions] SSL certificate examination (otp/lib/ssl and otp/lib/public_key questions)
Red Davies
- [erlang-questions] Server stops responding
Sid Muller
- [erlang-questions] User defined types: Floats
Juan Gamella Martín
- [erlang-questions] mnesia dirty writes & race conditions
Roberto Ostinelli
- [erlang-questions] my first crash.dump
Peter J Etheridge
- [erlang-questions] [riak] comile riak error cannot stat ‘solr-4.7.0-yz-1.tgz’: No such file or directory
Christopher Meiklejohn
- [erlang-questions] remote service discovery?
Ben Hsu
- [erlang-questions] IFL 2015 -- call for papers
Simon Thompson
- [erlang-questions] [ANN] Curry On Prague! 2015 Schedule Announced
Christopher Meiklejohn
- [erlang-questions] ErlangBA 2015 - CFP
Fernando 'Brujo' Benavides
- [erlang-questions] <CAOvwQ4hs9D3dh++fATa7v30U=Cwh2+=H-uo+Ly=P6miyQwkqHg at mail.gmail.com>
Peter J Etheridge
- [erlang-questions] Erlang update on CentOS
Lee Sylvester
- [erlang-questions] Patch Package OTP 17.5.3 Released
Zandra Hird
- [erlang-questions] Re : Re: Patch Package OTP 17.5.3 Released
david.koch
- [erlang-questions] gen_event handler error_logger_file_h crashed
Bogdan Andu
- [erlang-questions] Possibly to change TLS record size?
John Foldager
- [erlang-questions] Reporting vulnerabilities in Erlang/OTP
otpcoder
- [erlang-questions] Why intra-node messages are copied and not refcounted, rationale?
Nahuel Greco
- [erlang-questions] New Erlang job openings at Erlang Central
Bruce Yinhe
- [erlang-questions] can i tell what version or erlang a .beam was compiled with?
Garry Hodgson
- [erlang-questions] [ANN] CTO Position is open for Erlang enthusiast
Barco You
- [erlang-questions] Emysql: Switch to Redundant MySQl DB connection When Primary Mysql DB down
Sanath Prasanna
- [erlang-questions] Retrieving "semi-constant" data from a function versus Mnesia
Peter Johansson
- [erlang-questions] Retrieving "semi-constant" data from a function versus Mnesia ( corrected line-breaks ! )
Peter Johansson
- [erlang-questions] What makes erlang scalable?
Yash Ganthe
- [erlang-questions] EXMPP and Rebar
Chris Clark
- [erlang-questions] information on actor-based algorithms?
Rich Morin
- [erlang-questions] and the argument is...?
Peter J Etheridge
- [erlang-questions] Observer Crashdump Viewer bug?
Tuncer Ayaz
- [erlang-questions] First Call for Papers for IFL 2015
publicityifl
- [erlang-questions] <3f13067c82b13e494226b8e5d7ebba994dfdda20 at webmail.iinet.net.au>
Peter J Etheridge
- [erlang-questions] New Functional Programming Job Opportunities
Functional Jobs
- [erlang-questions] Apply Erlang configuration file (for multiple applications) to Common Test with rebar
Luis Gerhorst
- [erlang-questions] HEART
Roberto Ostinelli
- [erlang-questions] Which applications does Observer show ?
Luca Finzi Contini
- [erlang-questions] Final Call for Papers: Erlang Workshop 2015
Hans Svensson
- [erlang-questions] beam.smp[20162]: segfault at 00002aaad3e84bc8 rip<PHONE_NUMBER>4ee448 rsp<PHONE_NUMBER>877c60 error 4
Steven
- [erlang-questions] FYI: current erlang master (soon to be 18.0-rc2) fails using common test
Nico Kruber
- [erlang-questions] Erlang/OTP 18.0-rc2 is available for testing
Kenneth Lundin
- [erlang-questions] The upcoming leap second
Youngkin, Rich
- [erlang-questions] [ANN] Ruster-Unsafe and Ruster
Daniel Goertzen
- [erlang-questions] [ANN] ErlangBA CFP
Fernando 'Brujo' Benavides
- [erlang-questions] Ets read concurrency tweak
Viacheslav V. Kovalev
- [erlang-questions] OSCON Europe, Amsterdam
Bruce Yinhe
- [erlang-questions] {tls_alert,"certificate unknown"}
Roberto Ostinelli
- [erlang-questions] How to load a port driver which itself uses a shared library?
Diptansu Das
- [erlang-questions] Cowboy and links: weird delayed times
Roberto Ostinelli
- [erlang-questions] UDP multicast on Raspberry Pi
Rad Gruchalski
- [erlang-questions] Erlang microservice architecture ?
Thomas Elsgaard
- [erlang-questions] [ANN] geas 1.0.0 released
PAILLEAU Eric
- [erlang-questions] erlang-questions Digest, Vol 217, Issue 9
Christopher Phillips
- [erlang-questions] Erlang on Arduino - ArduinoBoardYun?
Lloyd R. Prentice
- [erlang-questions] [ANN] Other Erldocs α
Pierre Fenoll
- [erlang-questions] Can Pid be maps key ?
月忧茗
- [erlang-questions] how are implemented lists?
Benoit Chesneau
- [erlang-questions] Patch Package OTP 17.5.4 Released
Zandra Hird
- [erlang-questions] [ANN] ErlangBA 2015 - Final date confirmed
Fernando 'Brujo' Benavides
- [erlang-questions] XML validation using XSD
Norberto Ortigoza
- [erlang-questions] ErlIDE and rebar integration
Luca Finzi Contini
- [erlang-questions] Windows
Loïc Hoguin
- [erlang-questions] Trying to understand the performance impact of binary:split/3
José Valim
- [erlang-questions] Erlang Workshop 2015: deadline extension
Hans Svensson
- [erlang-questions] how search and search_quit are handled by user_drv?
Leo Liu
- [erlang-questions] Distributed Erlang Architecture
Chris Clark
- [erlang-questions] SO_REUSEPORT with UDP
pablo platt
- [erlang-questions] Why have a supervisor behaviour?
Roger Lipscombe
- [erlang-questions] inet options / getopts
Antonio SJ Musumeci
- [erlang-questions] Ranch listeners exiting
Roberto Ostinelli
- [erlang-questions] Mnesia doesn't report insertion errors when underlying DETS file is full?
Kenneth Lakin
- [erlang-questions] 回复:erlang-questions Digest, Vol 218, Issue 8
kgd130kgd
- [erlang-questions] Chengdu, meetup
Tony Rogvall
- [erlang-questions] PropEr after test clean up
Hynek Vychodil
- [erlang-questions] atoms in iodata() / iolist()
Antonio SJ Musumeci
- [erlang-questions] Using maps from NIFs
Knut Nesheim
- [erlang-questions] Call for Talks - Code Mesh London 3-5 Nov
Andra Dinu
- [erlang-questions] Using erlang instead of jmx
prasanna diwadkar
- [erlang-questions] lowering jitter: best practices?
Felix Gallo
- [erlang-questions] Erlang meetup this Wednesday night - Chicago
Garrett Smith
- [erlang-questions] Application environment
Serge Aleynikov
- [erlang-questions] s.j.thompson at kent.ac.uk has indicated you're a friend. Accept?
s.j.thompson
- [erlang-questions] looking into actor-based algorithms?
Rich Morin
- [erlang-questions] Apologies
Simon Thompson
- [erlang-questions] Chengdu-meetup
Tony Rogvall
- [erlang-questions] Erlounge in Boston next week
Robert Virding
- [erlang-questions] [ANN] Release An Erlang MQTT Broker
李楓
- [erlang-questions] What is the best way to test rpm installed Erlang? (smoke test)
Bing Li
- [erlang-questions] [ANN] First Call for Papers, Third Workshop on Planetary-Scale Distributed Systems, W-PSDS
Christopher Meiklejohn
- [erlang-questions] Turn based game server in erlang
Unix One
- [erlang-questions] Implemented Poisson and Exponential Distribution
John-Paul Bader
Last message date:
Sun May 31 19:16:41 CEST 2015
Archived on: Sun May 31 19:16:47 CEST 2015
This archive was generated by
Pipermail 0.09 (Mailman edition).


'It is time' - Manchester United handed major injury boost ahead of Sheffield United clash
Manchester United latest news | Ole Gunnar Solskjaer's side travel to Sheffield United and then host Aston Villa in their next two matches in the Premier League
by Richard CusackFormer Aston Villa defender Axel Tuanzebe could return to fitness for Manchester United's Premier League clash with his old side next month.
Villa travel to Old Trafford on December 1 (4.30pm) in their next away trip in the top flight and will be hoping to end a run of three-straight away defeats on the road.
And last season's Villa loan star Tuanzebe has issued a fitness update as he edges close to a return from a hip injury.
Tuanzebe made 35 appearances for Dean Smith's side last season, helping the Villa Park side to promotion through the Championship's play-offs.
Aston Villa latest
This is your round up of all things Villa; the one-stop shop that will keep you updated on the latest goings on at the club and beyond.
Transfers, injuries, match-days and managers, we’ve got you covered.
We’ll be bringing the very latest on the Villains throughout the week and around the clock.
Make sure you keep yourself updated with our handy daily catch up...
Must reads...
- Director reveals John McGinn's reaction to failed transfer
- Martin Keown fires puzzling criticism at Tyrone Mings
- What Jarrad Branthwaite has said about Villa interest
- Dean Smith urged to have a 'quiet word' with Frederic Guilbert
For all your latest AVFC news, opinion, analysis and transfer gossip, click here
You can follow our Villa reporter Ashley Preece on Twitter, and his email address is<EMAIL_ADDRESS>Some Villa fans harboured hopes that he would come back to B6 for another stint, but Ole Gunnar Solskjaer has made him part of the first-team setup this season.
Indeed, he was even handed the captain's armband for the Carabao Cup clash with Rochdale in September.
He hasn't featured since October 6, though, missing the past five matches in all competitions through injury.
But he's well and truly on the comeback trail, posting on Instagram: "Vitamin D. Now it is time to get back on the pitch!"


I'm a user experience designer with over 4 years of experience crafting enterprise products. I also have a solid understanding of visual design principles and user research methods, a background in software development, and a knack to balance form and function in digital interfaces.


The chart below shows a list of HTML elements and the roles and possible accessible names available via Chrome's accessibility tree.
| Element | Example | Role and accessible name options | Description | ||
|---|---|---|---|---|---|
a |
|
|
Represents a hyperlink when the href attribute is present.
|
||
abbr |
Test
|
|
Represents an abbreviation or acronym of a longer word or phrase. The optional title attribute can provide an expansion or description for the abbreviation. |
||
address |
Test
|
N/A | Specifies the author's contact information. | ||
area |
N/A
|
N/A | Represents a specific area within an image map. | ||
article |
Test
|
|
Represents an article. | ||
aside |
|
|
Represents some content loosely related to the page content. | ||
audio |
|
|
Embeds a sound, or an audio stream in an HTML document. | ||
b |
Test
|
N/A | Displays text in a bold style. | ||
base |
N/A
|
N/A | Represents the base URL for all relative URLs in a document. | ||
bdi |
Test
|
N/A | Represents text that is isolated from its surrounding for the purposes of bidirectional text formatting. | ||
bdo |
Test
|
N/A | Overrides the current text direction. | ||
blockquote |
Test
|
|
Represents a section that is quoted from another source. | ||
body |
N/A
|
N/A | Represents the document's body. | ||
br |
Test
Test
|
|
Produces a single line break. | ||
button |
|
|
Creates a clickable button. | ||
canvas |
|
|
Represents a region in the document, which can be used to present graphics via scripting (usually JavaScript). | ||
caption
|
N/A
|
|
Represents the caption or title of the <table> . |
||
cide |
Test
|
N/A | Represents a citation or reference to another source. | ||
code |
Test
|
N/A | Represents text as computer code. | ||
col |
N/A
|
N/A | Represents attribute values for one or more columns in a <table> . |
||
colgroup |
N/A
|
N/A | Specifies attributes for multiple columns in a <table> . |
||
data |
Test
|
N/A | Links a piece of content with a machine-readable translation. | ||
datalist |
|
N/A | Represents a set of pre-defined options for an <input> element. |
||
dd |
|
|
Represents a description, or value for the term (<dt> ) in a description list (<dl> ). |
||
del |
|
|
Represents text that has been deleted from the document. | ||
details |
TestDetailed information.
|
|
Represents a widget from which the user can obtain additional information or controls on-demand. | ||
dfn |
Test
|
N/A | Specifies a definition. | ||
dialog |
|
|
Represents a dialog box or subwindow. | ||
div |
Test
|
N/A | Specifies a division or a section in a document. | ||
dl |
|
|
Represents a description list. | ||
dt |
|
|
Represents a term (an item) in a description list. | ||
em |
Test
|
N/A | Represents emphasized text. | ||
embed |
|
|
Embeds external application, typically multimedia content like audio or video into an HTML document. | ||
fieldset |
|
|
Specifies a set of related form fields. | ||
figcaption |
|
|
Represents a caption or legend for a figure. | ||
figure |
|
|
Represents a figure illustrated as part of the document. | ||
footer |
|
|
Represents the footer of a document or a section. | ||
form |
|
|
Represents an HTML form for user input. | ||
h3 |
Test
|
|
Represents HTML headings. | ||
head |
N/A
|
N/A | Represents the head portion of the document that contains information about the document such as title. | ||
header |
Test
|
|
Represents the header of a document or a section. | ||
hgroup |
Test
|
N/A | Represents a group of headings. | ||
hr |
|
|
Produce a horizontal line. | ||
html |
N/A
|
N/A | Represents the root of an HTML document. | ||
i |
Test
|
N/A | Displays text in an italic style. | ||
iframe |
|
|
Displays a URL in an inline frame. | ||
img |
|
|
Represents an image. | ||
input |
|
|
Represents an input control. | ||
ins |
Test
|
|
Represents a block of text that has been inserted into a document. | ||
kbd |
Test
|
N/A | Specifies text as keyboard input. | ||
label |
|
|
Represents a label for an <input> control. |
||
legend |
|
|
Represents a caption for a <fieldset> element. |
||
li |
|
|
Represents a list item. | ||
link |
N/A
|
N/A | Represents the relationship between the current document and an external resource. | ||
main |
N/A
|
|
Represents the main or dominant content of the document. | ||
map |
N/A
|
N/A | Represents a client-side image-map. | ||
mark |
Test
|
|
Represents text highlighted for reference purposes. | ||
menu |
N/A
|
N/A | Represents a list of commands. | ||
menuitem |
N/A
|
N/A | Represents a list (or menuitem) of commands that a user can perform. | ||
meta |
N/A
|
N/A | Provides structured metadata about the document content. | ||
meter |
|
|
Represents a scalar measurement within a known range. | ||
nav |
|
|
Represents a section of navigation links. | ||
noscript |
N/A
|
N/A | Represents alternative content to display when the browser doesn't support scripting. | ||
object |
|
|
Represents an embedded object. | ||
ol |
|
|
Represents an ordered list. | ||
optgroup |
N/A
|
N/A | Represents a group of related options in a selection list. | ||
option |
|
|
Represents an option in a selection list. | ||
output |
|
|
Represents the result of a calculation. | ||
p |
Test
|
|
Represents a paragraph. A paragraph is typically a run of phrasing content that forms a block of text with one or more sentences that discuss a particular topic, as in typography, but can also be used for more general thematic grouping. For instance, an address is also a paragraph, as is a part of a form, a byline, or a stanza in a poem. | ||
param |
N/A
|
N/A | Represents a parameter for an object or applet element. | ||
picture |
|
N/A | Represents a container for multiple image sources. | ||
pre |
N/A
|
|
Represents a block of preformatted text. | ||
progress |
|
|
Represents the completion progress of a task. | ||
q |
Test
|
N/A | Represents a short inline quotation. | ||
rp |
N/A
|
N/A | Provides fall-back parenthesis for browsers that that don't support ruby annotations. | ||
rt |
N/A
|
N/A | Represents the pronunciation of character presented in a ruby annotations. | ||
ruby |
N/A
|
N/A | Represents a ruby annotation. | ||
s |
|
N/A | Represents contents that are no longer accurate or no longer relevant. | ||
samp |
Test
|
N/A | Specifies text as sample output from a computer program. | ||
script |
N/A
|
N/A | Places script in the document for client-side processing. | ||
section |
Test
|
|
Represents a section of a document, such as header, footer etc. | ||
select |
|
|
Represents a selection list within a form. | ||
small |
Test
|
N/A | Displays text in a smaller size. | ||
source |
N/A
|
N/A | Represents alternative media resources for the media elements like <audio> or <video> . |
||
span |
Test
|
N/A | Represents an inline styleless section in a document. | ||
strong |
Test
|
N/A | Indicate strongly emphasized text. | ||
style |
N/A
|
N/A | Inserts style information (commonly CSS) into the head of a document. | ||
sub |
Test
|
N/A | Represents subscripted text. | ||
summary |
TestDetailed information.
|
|
Represents a summary for the <details> element. |
||
sup |
Test
|
N/A | Represents superscripted text. | ||
svg |
|
|
Embed SVG (Scalable Vector Graphics) content in an HTML document. | ||
table |
|
|
Represents a data table. | ||
tbody |
N/A
|
N/A | Groups a set of rows defining the main body of the table data. | ||
td |
|
|
Represents a cell in a table. | ||
template |
N/A
|
N/A | Represents the fragments of HTML that should be hidden when the page is loaded, but can be cloned and inserted in the document by JavaScript. | ||
textarea |
|
|
Represents a multi-line text input control (text area). | ||
tfoot |
N/A
|
N/A | Groups a set of rows summarizing the columns of the table. | ||
th |
|
|
Represents a header cell in a table. | ||
thead |
|
N/A | Groups a set of rows that describes the column labels of a table. | ||
time |
|
|
Represents a time and/or date. | ||
title |
N/A
|
N/A | Represents a title for the document. | ||
tr |
|
|
Represents a row of cells in a table. | ||
track |
N/A
|
N/A | Represents text tracks for the media elements like <audio> or <video> . |
||
u |
Test
|
N/A | Displays text with an underline. | ||
ul |
|
|
Represents an unordered list. | ||
var |
Test
|
N/A | Represents a variable. | ||
video |
|
|
Embeds video content in an HTML document. | ||
wbr |
Test
|
N/A | Represents a line break opportunity. |


We are currently undergoing scheduled maintenance on this site. We expect to have a better version in place shortly, please check back in a few minutes.


| Document number: | P1248R1 | |
|---|---|---|
| Date: | 2018-11-04 | |
| Audience: | Library Evolution Working Group | |
| Reply-to: | Tomasz Kamiński <tomaszkam at gmail dot com> |
CommonReference
requirement from StrictWeakOrdering
(a.k.a Fixing Relation
s)This paper proposes changing the Relation
and related concepts, to achieve following goals:
The secondary goal is to simplify migration to the rangified version of algorithms, however reaching of this goal should not undermine above properties.
This paper argues that the currently specified Relation
concept does not achieve above goal, due the additional
requirement of CommonReference
for types of parameters of callable. As consequence we propose to relax this concept
(and derived StrictWeakOrdering
concept) by removing above requirement.
[ Note: This affects only requirements on comparators used with STL algorithms, and are not affecting relational operators
(<
, ==
, ...). ]
The need for applying this change, was recognized with the inception of the current concept design - similar change is discussed as alternative design in Appendix D.2 Cross-type Concepts of A Concept Design for the STL (The Palo Alto report) paper.
Initial revision.
equal_range
with std::ranges
namespaces,
in situations when range version is discussed.Family of the standard algorithms related to sorting and operations on sorted sequence (sort
, lower_bound
, set_intersection
, ...)
are accepting an functor, that is representing a weak ordering. Examples of such ordering, includes relation resulting from a composition of the key function
that extracts certain part of the object, and the strong ordering relation over extracted part.
To illustrate lets us consider following NameLess
functor, that is comparing object of Employee
by
comparing only name
member:
struct NameLess { bool operator()(Employee const& lhs, Employee const& rhs) const { return lhs.name < rhs.name; } bool operator()(Employee const& lhs, std::string_view rhs) const { return lhs.name < rhs; } bool operator()(std::string_view lhs, Employee const& rhs) const { return lhs < rhs.name; } bool operator()(std::string_view lhs, std::string_view rhs) const { return lhs < rhs; } };
Having above functor, we may sort a vector ve
of the Employee
object by name:
std::sort(ve.begin(), ve.end(), NameLess{});
Now that code can be upgraded to use Ranges:
std::ranges::sort(ve.begin(), ve.end(), NameLess{}); std::ranges::sort(ve, NameLess{});
Finally we have an option to provide our key function and strong ordering separately:
std::ranges::sort(ve, std::less<>{}, &Employee::name);
Once the vector is sorted, we can use one of the other algorithms to find all employee's with given name (i.e. find equivalence class for given value):
std::equal_range(ve.begin(), ve.end(), "Kowalski"sv, NameLess{});
However, if we want to migrate the above code to Ranges, by stating:
std::ranges::equal_range(ve.begin(), ve.end(), "Kowalski"sv, NameLess{}); std::ranges::equal_range(ve, "Kowalski"sv, NameLess{});
The above invocations will not compile, and we will be forced to rewrite my functor into separate projection and comparison:
std::ranges::equal_range(ve, "Kowalski"sv, std::less<>{}, &Employee::name);
The above compilation problem is caused by the fact that for the relation to satisfy StrictWeakOrdering<NameLess, Employee, std::string_view>
,
such functor needs to satisfy Relation<NameLess, Employee, std::string_view>
, which requires that the types Employee
and
std::string_view
has a common reference (CommonReference<Employee, std::string_view>
).
In situation when weak ordering is defined in terms of the composition of the key function and strong ordering, the type returned by key function may be unrelated to the actual object type, as we are usually returning a member of that object. This means that the user is forced to rewrite they comparators into separate projection and homogeneous functor. This puts an limitation on the implementation freedom for the users, and have negative consequences on expressiveness and runtime performance of the code.
To illustrate the effect of above limitation, let us consider the following problem: We have a vector<Itinerary>
representing round-trip flights (to specific destination and back), and we want to find ones that are having departures
on specific dates.
Firstly we defined the required comparators, LegDepartureDateLess
compares departure date on leg, while ItneraryDepartureDatesLess
compares departures of all legs:
struct LegDepartureDateLess { bool operator()(Leg const& lhs, Leg const& rhs) const { return lhs.departureDate < rhs.departureDate; } bool operator()(Leg const& lhs, std::chrono::local_days const& rhs) const { return lhs.departureDate < rhs; } bool operator()(std::chrono::local_days const& lhs, Leg const& rhs) const { return lhs < rhs.departureDate; } bool operator()(std::chrono::local_days const& lhs, std::chrono::local_days const& rhs) const { return lhs < rhs; } }; struct ItineraryDepartureDatesLess { bool operator()(Itinerary const& lhs, Itinerary const& rhs) const { return less_impl(lhs.legs, rhs.legs); } bool operator()(std::vector<std::chrono::local_days> const& lhs, Itinerary const& rhs) const { return less_impl(lhs, rhs.legs); } bool operator()(Itinerary const& lhs, std::vector<std::chrono::local_days> const& rhs) const { return less_impl(lhs.legs, rhs); } bool operator()(std::vector<std::chrono::local_days> const& lhs, std::vector<std::chrono::local_days> const& rhs) const { return less_impl(lhs, rhs); } private: template<typename Sequence1, typename Sequence2> bool less_impl(Sequence1 const& lhs, Sequence2 const& rhs) const { return std::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end(), LegDepartureDateLess{}); } };
Given above comparison functions, we can sort the vector vi
of Itinerary
:
std::sort(vi.begin(), vi.end(), ItineraryDepartureDatesLess{});
After that we can search for specific set of departure dates (given as vector vd
) in the logarithmic time:
std::equal_range(vi.begin(), vi.end(), vd, ItineraryDepartureDatesLess{});
If we want to implement the same functionality using the ranges, we can mechanically transform the code sorting elements:
std::ranges::sort(vi, ItineraryDepartureDatesLess{});
However such manual transformation will not work if we want to search itineraries departing on specific dates (std::vector<std::chrono::local_days>
vd
):
std::ranges::equal_range(vi, vd, ItineraryDepartureDatesLess{});
will not compile, as (unsuprisingly) there is no common reference between the Itinerary
and std::vector<std::chrono::local_days>
—
it will be ambiguous if std::vector<std::chrono::local_days>
meant to represent departure or arrival dates of either
all legs or all flights constituting given itinerary.
To fix above code, we need to split our comparator into separate projection and relation. In the first attempt we may define projection as follows:
auto const toDepartureDates = [](Itinerary const& i) -> std::vector<std::chrono::local_days> { std::vector<std::chrono::local_days> result(i.legs.size()); std::ranges::transform(i.legs, result.begin(), &Leg::departureDate); return result; }
For the comparator, we just need to invoke lexicographical_compare
giving following code:
std::ranges::equal_range(vi, vd, [](auto const& lhs, auto const& rhs) { return std::ranges::lexicographical_compare(lhs, rhs); }, toDepartureDates);
The above code has a major drawback - for each comparison of elements (that is limited by O(nlog(n))
) a temporary vector is created, leading
to degradation of the code performance comparing to STL1 example.
This problem can be mitigated by returning a transform view from the toDepartureDates
function, to reduce the cost of temporary production:
auto const toDepartureDatesView = [](Itinerary const& i) { return i.legs | ranges::view::transform(&Leg::departureDate); };
Above solution does not eliminate the problems caused by common reference requirement, just pushes is one level down.
std::ranges::equal_range(vi, vd, [](auto const& lhs, auto const& rhs) { return std::ranges::lexicographical_compare(lhs, rhs); }, toDepartureDatesView);
In the above code, provided lambda needs to satisfy StrictWeakOrdering
on std::vector<std::chrono::local_days>
and TransformView
(result of toDepartureDateView
), which means that common reference between these two
types needs to exists. This happens to be true for this specific case, as all proposed views are convertible to
containers, however if we modify the example to use std::span<std::chrono::local_days>
instead of std::vector<std::chrono::local_days>
the code will again fail to compile,
as there is no common reference for different views - this specialization also cannot be defined
by user.
As presented above, the implementation options limitation imposed by requiring a CommonReference
for orderings, is negatively impacting the performance in the resulting code.
Furthermore, this problem will not be fully addressed by the introduction of the views from P0896R2: The One Ranges Proposal
in C++ standard, as resulting code may fail victim of the same problem — code fails to compile due lack of `CommonReference` for views.
In authors opinion, this means that current design of Ranges are breaking zero-overhead principle, which is backbone of
C++ language - the user is able to implement same functionality in more efficient manner, by simply using older version
of algorithms, that was not imposing such limitation.
One of the arguments for the introduction of the CommonReference
requirement, is that it is required
to make StrictWeakOrdering
mathematically sound. The definition of soundness is a bit subjective, but to counteract the argument,
the author proposes following approach: The concept is considered to be sound, if it:
In our case we are interested in the definition of the weak ordering over some domain X. The mathematical definition of weak ordering requires following axioms to be true:
x
in X: !r(x, x)
x
, y
in X: r(x, y)
=> !r(y, x)
x
, y
, z
in X: r(x, y) && r(y, z)
=> r(x, z)
x
, y
, z
in X: (!r(x, y) && !r(y, x)) && (!r(y, z) && !r(z, y))
=> (!r(x, z) && !r(z, x))
The last requirement is necessary to show that the function eq(x, y)
equivalent to !r(x, y) && !r(y, x)
is an equivalence relation,
i.e. the relation is reflexive (guaranteed by irreflexivity of r
), symmetric (from definition), and transitive (imposed
directly by transitivity of incomparability for r
).
This guarantees that for any x
, y
in the X only one of following is true: r(x, y)
, eq(x, y)
, r(y, x)
,
where eq
is equality relation.
That means that r
also satisfies definition of weak ordering presented in section "4.2 Total and Weak Orderings" of "Elements of Programming" by Alexander Stepanov and Paul McJones.
To verify if given functor f
is strict weak ordering over an domain consisting of objects of type T
and of type U
(note that domain is just a set of elements, which may be of different type), we will require following invocation to be well-formed:
f(t, u)
, f(u, t)
, f(t, t)
, f(u, u)
, where t
is object of type T
and u
of type U
.
In summary, neither the semantic requirement of the weak ordering nor the syntactic requirement imposed by them require existence
of the common reference (common type) for the objects in the domain. As a consequence the definition of StrictWeakOrdering
that
does not impose CommonReference
is equally sound as current definition.
The current definition of the StrictWeakOrdering
, was coined in the context of its usage with newly proposed
range version of standard algorithms, that accept separate relation and projection arguments.
This reasoning, misses other standard library components, that also accepts comparators. This is especially important
in case of ordered containers (set
, map
) that are accepting weak ordering as a comparator,
and were expanded with heterogeneous lookup (is_transparent
nested typename).
To illustrate, lets us consider following example, we want to have mapping from the employee's name to the full object, the easiest approach would be to use the following map:
std::map<std::string, Employee> nameMap;
The drawback of above solution is that the name of the employee is held twice in the structure, once as a key, and once inside the
object. To mitigate the problem, we could construct a set
of Employee
that compares only its name, i.e.
std::set<Employee, NameLess> nameSet;
In addition we can allow queering nameSet
by actual names, by adding is_transparent
nested typedef
to the NameLess
comparator. This solution esentially removes the value duplication.
Note that if the set definition would be changed, so the provided comparator is required to satisfy StrictWeakOrdering
the code will no longer compile due to CommonReference
requirement - this is same situation as in case of
equal_range
example presented in first paragraph.
As a consequence, constraining the ordered containers with current StrictWeakOrdering
concept, will de-facto
remove functionality of heterogeneous lookup from ordered associative containers.
Of course, it would be possible to introduce a second concept that would be used for ordered containers, however creating multiple concepts representing the same mathematical concept (weak ordering) is against Design Ideas (section 1.3) presented in the The Palo Alto report: limiting number of concepts and providing concept representing general idea in the domain.
common_reference
It might be pointed out that the examples presented above as "not working", may be fixed by provding the common_reference
for the compared types. As the compared types may be unrelated (one is subobject is the other), such specialization,
will not have expected semantics of common type - once the Employee
will be reduced to only its name,
it cannot be reconstructed back.
To illustrate, lets as return to our NameLess
example, presented at beginning of this section. For the code
to compile, we need to make sure that the CommonReference<Employee, std::string_view>
is satisfied
- to achieve that we may provide an implicit conversion from Employee
to std::string_view
that would return name
member.
However, this solution is riddled with problems. Not only it is introducing undesired conversion to the std::string_view
that affects existing code, but fails in situations when we want to provide relation comparing other members of class Employee
that have std::string type
.
For example, if we will want to write a second relation, SurnameLess
that would compare the surname
member of the
Employee
class, that also happen to have std::string
type, we will also need to introduce conversion to std::string_view
that would return surname
member, which directly conflicts with conversion we have provided to support NameLess
.
[ Note: The conversion operator needs to return corresponding members of the Employee
, to satisfy semantic requirements
of the Relation
concept, i.e:
NameLess{}(e, sv)
(e.name < sv
), needs to be equivalent to NameLess{}(std::string_view(e), sv)
(std::string_view(e) < sv
),SurnameLess{}(e, sv)
(e.surname < sv
), needs to be equivalent to SurameLess{}(std::string_view(e), sv)
(std::string_view(e) < sv
).Above requirements cannot be both satisfied at the same time, as they require conversion from Employee
to std::string_view
to have different semantics. ]
We may attempt to mitigate need of implicit conversion, by providing an specialized common type for the Employee
to std::string_view
, for example:
class EmployeeNameView { EmployeeNameView(std::string_view s) : value(s) {} EmployeeNameView(Employee const& e) : value(s.name) {} std::strong_ordering operator<=>(EmployeeNameView, EmployeeNameView) = default; private: std::string_view value; };
And then provide an explicit specialization of common_type
(or basic_common_reference
) for Employee
and std::string_view
:
namespace std { template<> struct common_type<Employee, std::string_view> { using type = EmployeeNameView; }; template<> struct common_type<std::string_view, Employee> { using type = EmployeeNameView; }; }
Again this solution fails, if we also want to introduce the SurnameLess
relation. For these relation we need to specialize common_type
for
Employee
and std::string_view
to point to EmployeeSurnameView
type, that is very similar to the EmployeeNameView
with
one important difference - the construction of this type from Employee
object needs to store view to the surname
member.
This in the end leads to conflicting declaration of common_type
, leading to same problem as in case of solution using conversion operator.
Futhermore above, solutions would not applicable, if the NameLess
would accept std::shared_ptr<Employee>
(or any other library wrapper
specialized for Employee
), as we cannot specialize common_type
or common_reference
for types that are not user defined.
Which means we cannot use it to allow lookups into vector
of optionals or smart pointers.
As we need to provide different common_type
specialization for comparison with either name
and surname
,
the other solution is to use a different type to represent such object, so instead of using std::string_view
to represent above values,
we will use specialized object (like above EmployeeNameView
and EmployeeSurnameView
) when search for value.
Instead of:
std::ranges::equal_range(ve, "Kowalski"sv, NameLess{});
we will write
std::ranges::equal_range(ve, EmployeeNameView("Kowalski"));
Note that we not longer need to provide the comparator object, as Employee
are comparable with EmployeeNameView
, due
to existence of implicit conversion. Essentially, this solution replaces custom comparison functor (which can be created using lambda)
with custom type.
Finally, we could drop any attempts to provide an semantically meaningful type for the CommonReference
and define common_type
to be
a variant of the std::variant<Employee, std::string_view>
(or basic_common_type
to return variant
of references).
Of course this workaround cannot be applied in case of relation accepting standard-library types specialized for user-defined type.
Furthermore, it unnecessarily complicates the definition of the comparator operators, as they need to able to compare variant object with correct semantics.
In contrast to previous sections, when we were unable to implement desired ordering (or implement it effectively), in this section
we will discuss the example ordering, that cannot be implemented as a comparator, due existing specialization of common_type
.
Let us consider implementing an MathematicalLess
functor, that will compare class of integral types, according
to mathematical meaning of this relation, i.e. MathematicalLess{}(-1, 1u)
return true
. We may
implement it as follows:
struct MathematicalLess { template<typename T, typename U> bool operator()(T t, U u) const { using UT = std::make_unsigned_t<T>; using UU = std::make_unsigned_t<U>; if constexpr (std::is_signed_v<T> == std::is_signed_v<U>) // types has same signedness return t < u; else if constexpr (std::is_signed_v<T>) // U is unsigned return t < 0 ? true : UT(t) < u; else // T is unsigned return u < 0 ? false : t < UU(u); } };
Now let us discuss if StrictWeakOrdering<MathematicalLess, unsigned, int>
. Firstly, the unsigned
and
int
types has a common type: std::common_type_t<unsigned, int>
is unsigned
. Secondly
MathematicalLess
can be invoked with any combination of objects of type either int
or unsigned
.
This means that we are satisfying our syntactic requirements.
However, if we consider following semantic requirement that the invocation of relation r(a, b)
is always equivalent to
invocation r(C(a), C(b))
, where C
is common reference type for a
and b
.
In case of our functor, that requires that MathematicalLess{}(-1, 1u)
, is required to return the same value
as MathematicalLess{}(unsigned(-1), unsigned(1u))
, which is equal to false
. However, by the design
of MathematicalLess
the result shall be true..
Note that this problem cannot be fixed without introducing opaque typedefs, as user is not allowed to change the common type for built-in types.
Even after removal of the CommonReference
requirement for the StrictWeakOrdering
, this concept will be more strict
that the minimal STL1 requirements - the StrictWeakOrdering<F, T, U>
requires F
requires that F
is both invocable with combination of types (Predicate<F, T, U>
and Predicate<F, U, T>
), but also two
object of the same type (Predicate<F, T, T>
and Predicate<F, U, U>
).
To illustrate, if we consider and reduced an version of the NameLess
comparator:
struct ReducedNameLess { bool operator()(Employee const& lhs, std::string_view rhs) const { return lhs.name < rhs; } bool operator()(std::string_view lhs, Employee const& rhs) const { return lhs < rhs.name; } };
The following invocation compiles and gives correct result:
std::equal_range(ve.begin(), ve.end(), "Kowalski"sv, ReducedNameLess{});
as implementation of std::equal_range
does not need to invoke supplied comparator on two objects of same collection.
However, even with the proposed relaxation of the StrictWeakOrdering
concept, the range version of the above invocation,
will still fail to compile:
std::ranges::equal_range(ve.begin(), ve.end(), "Kowalski"sv, ReducedNameLess{});
The above additional requirement are required to fulfill the goal of soudness of the design - we explicitly require
that the requirements of the invoked algorithm could be checkable as the runtime. In case of the equal_range(range, value,
comp)
, we require that the:
comp
model weak ordering over sum of elements in range
and value
,range
elements is sorted in order defined by the comp
.The second requirement can be checked by simply checking if std::is_sorted(range.begin(), range.end(), comp)
is true,
which impose that comp
can be invoked with two elements of supplied range. For the first requirement
we need to verify axioms described in section 3.2. Mathematical soundness of this paper -
such validation requires comp
to be invocable with any combination of types.
StrictTotallyOrderedWith<T, U>
The StrictTotallyOrderedWith<T, U>
concept may be viewed as the special case of the
StrictWeakOrdering<std::less<>, T, U>
, where the ordering is represented as operator<
instead of custom comparator. With such view we may want to apply similar relaxation of requirement for
this concept.
However, the underlying semantics of the StrictTotallyOrderedWith<T, U>
is different
than the StrictWeakOrdering<std::less<>, T, U>
, as it is meant to represent
strong order - in contrast to the weak ordering for the strong ordering,
if a
and b
are not ordered (!(a < b) && !(b < a)
),
then they are the same (a == b
).
In other words, even if situation when types of a
and b
differs, they
are different representation of the same entity (e.g. std::string
and std::string_view
),
and should have a notion of "common type" (e.g. sequences of characters).
Unfortunately, in some cases, implementing an representation of such common type, may be task that is orders of
magnitude harder than implementing comparator itself. To illustrate lets as consider the
comparison between class representing variable length integer wide_int
i
and floating
point value double
d
. The implementation of such comparison may work as follow:
std::floor(d)
as wide_int
di
,i != di
, return i < di
,false
, if fraction part of d
(d - std::floor(d)
) is non-zero.In contrast providing a common_type<wide_int, double>
would require the user
to implement class representing arbitrary precision floating point numbers.
Changes proposed in this paper allow to mitigate the problem, by implementing the above compassion
custom comparison function. Note that without proposed relaxation of StrictWeakOrdering
requirements, the burden of implementing such common type would be unavoidable.
The proposed wording changes refer to N4762 (C++ Working Draft, 2018-07-07).
Apply following changes to the [concept.relation] Concept Relation
section:
template<class R, class T, class U> concept Relation = Predicate<R, T, T> && Predicate<R, U, U> &&CommonReference<const remove_reference_t<T>&, const remove_reference_t<U>&> &&Predicate<R,common_reference_t<const remove_reference_t<T>&, const remove_reference_t<U>&>,common_reference_t<const remove_reference_t<T>&, const remove_reference_t<U>&>> &&Predicate<R, T, U> && Predicate<R, U, T>;
Let
r
be an expression such thatdecltype((r))
isR
,t
be an expression such thatdecltype((t))
isT
,u
be an expression such thatdecltype((u))
isU
, andC
becommon_reference_t<const remove_reference_t<T>&, const remove_reference_t<U>&>
Relation<R, T, U> is satisfied only if
bool(r(t, u)) == bool(r(C(t), C(u)))
.bool(r(u, t)) == bool(r(C(u), C(t)))
.
Note that the definition of concept StrictWeakOrder
in [concept.strictweakorder] does not need to be updated
as it does not rely on the existence of common_reference_t<const remove_reference_t<T>&, const remove_reference_t<U>&>
in any way.
Casey Carter, Andrzej Krzemieński and Michał Łoś offered many useful suggestions and corrections to the proposal.


Child One
Child Two
Child Three
Child Four
Child Five
Text Element
SuperGlue.js — Sample
Parent Element


GeodesicLine (geodesic,
lat1,
lon1,
azi1,
caps=3979)
|
|
Return a wrapped geodesicline.GeodesicLine
instance from Karney's Python geographiclib, provided the latter is installed,
otherwise an ImportError .
- Arguments:
geodesic - A wrapped Geodesic instance.
lat1 - Latitude of the first points (degrees ).
lon1 - Longitude of the first points (degrees ).
azi1 - Azimuth at the first points (compass degrees360 ).
caps - Optional, bit-or'ed combination of Caps values specifying the
capabilities the GeodesicLine instance should
possess, i.e., which quantities can be returned by calls to
GeodesicLine.Position and
GeodesicLine.ArcPosition .
|


Gypsy Folk Tales, by Francis Hindes Groome, [1899], at sacred-texts.com
There was a great city. In that city was great mourning; every day it was hung with black cloth and with red. There was in a cave a great dragon; it had four-and-twenty heads. Every day must he eat a woman--ah! God! what can be done in such a case? It is clean impossible every day to find food for that dragon. There was but one girl left. Her father was a very wealthy man; he was a king; over all kings he was lord. And there came a certain wanderer, came into the city, and asked what's new there.
They said to him, 'Here is very great mourning.'
'Why so? any one dead?'
'Every day we must feed the dragon with twenty-four heads. If we failed to feed him, he would crush all our city underneath his feet.'
'I'll help you out of that. It is just twelve o'clock; I will go there alone with my dog.'
He had such a big dog: whatever a man just thought of, that dog immediately knew. It would have striven with the very devil. When the wanderer came to the cave, he kept crying, 'Dragon, come out here with your blind mother. Bread and men you have eaten, but will eat no more. I'll see if you are any good.'
The dragon called him into his cave, and the wanderer said to him, 'Now give me whatever I ask for to eat and to drink, and swear to me always to give that city peace, and never to eat men, no, not one. For if ever I hear of your doing so I shall come back and cut your throat.'
'My good man, fear not; I swear to you. For I see you're a proper man.  Then tell me what you want of me.'
'I only want you to bring me the finest wine to drink, and meat such as no man has ever eaten.
He went and brought him such meat as no man ever had eaten. When he had eaten and drunk his fill, then the dragon must swear to him never to eat anybody, but sooner to die of hunger.
'Good, so let us leave it.'
He went back, that man, who thus had delivered the city, so that it had peace. Then all the gentlemen asked him what he wanted for doing so well. The dragon from that hour never ate any one. And if they are not dead they are still alive.
This story belongs to the 'Valiant Little Tailor' group (No. 21). The maiden-tribute is a familiar feature; the Tobit-like dog seems superfluous, but cf. Hahn's No. 22, i. 170, ii. 217. English-Gypsy women wear black and red in mourning.


Strictly viewers slam judges' scoring as they claim Karim Zeroual was 'robbed' of perfect 40
They received an incredible 39 points out of 40
by Rebecca CarterViewers of Strictly Come Dancing have slammed the judges' scoring as they claim Karim Zeroual was 'robbed' of 40 out of 40.
Fans were also left fuming as Michelle Visage ended up at the bottom of the leaderboard with her professional partner Giovanni Pernice.
As the celebrities and their pro partners took to the dance floor at the iconic Blackpool Tower ballroom, judges were giving out 8s, 9s and 10s throughout the show.
Read more: Strictly Come Dancing viewers hail Blackpool show a triumph
Karim and his partner Amy Dowden received 39 points out of 40 for their Charleston.
But viewers thought they should have got the perfect 40 and shared their thoughts on Twitter.
One person said: "#Strictly can't believe the judges have been overmarking all night just because it's Blackpool and then when we see a dance that was a clear 40, it doesn't get a 40! Karim was robbed."
Another wrote: "Karim and Amy were robbed he deserved 40 #Strictly."
A third tweeted: "Karim and Amy were robbed should of been 40!!!!!!!!! #Strictly."
Meanwhile, Michelle and Giovanni performed a couple's choice routine to Madonna's Vogue.
The judges gave them a score of 32 out of 40, which even though is a good score it positioned them at the bottom of the leaderboard.
After she found herself in the bottom two last week, viewers complained about the RuPaul's Drag Race star receiving the least amount of points.
One person wrote: "The top of the leaderboard is looking so good. Those dances were incredible. Although Michelle being at the bottom seems weird. #Strictly."
Another said: "I’m sorry but Michelle does NOT deserve to be bottom of the leaderboard I am FURIOUS #Strictly."
A third added: "Livid that Michelle Visage is bottom... LIVID! #strictlyblackpool."
Read more: Strictly Come Dancing viewers distracted by Tess Daly's dress strap
Elsewhere in last night's show, professional dancer Anton Due Beke scored his first ever 10s in the history of his time on Strictly with his American smooth to Let's Face the Music and Dance with EastEnders' Emma Barton.
Kelvin Fletcher and partner Oti Mabuse were joint top of the leaderboard as they scored 39 points for their Jive to Jailhouse Rock from Smokey Joe’s Cafe.
- Strictly Come Dancing airs tonight on BBC One at 7.15pm
Leave us a comment on our Facebook page @EntertainmentDailyFix and let us know what you think of this story.