Missing Girl Florida
by Associated Press1 / 3In this Amber Alert made available by the Jacksonville, Fla., Police, shows an undated photo of Taylor Williams. On Tuesday, Nov. 12, 2019, authorities in Alabama say they have found human remains while searching in the woods for Williams. The child was reported missing from her Jacksonville, Fla., home last Wednesday. (Jacksonville Police via AP)
DEMOPOLIS, Ala. (AP) — The Latest on a missing Florida girl (all times local):
7 p.m.
Authorities say they've charged the mother of a missing 5-year-old Florida girl with child neglect and giving false information to investigators.
Jacksonville Sheriff Mike Williams announced the charges against Brianna Williams during a news conference Tuesday evening. She has been absentee booked at a local hospital after being admitted because of an apparent overdose.
Taylor Rose Williams was reported missing from her Jacksonville, Florida, home last Wednesday.
Earlier Tuesday, police announced the discovery of human remains in a wooded area of Marengo County, Alabama, located about 100 miles (160 kilometers) west of Montgomery. Authorities are working to confirm the victim's identification.
___
1:45 p.m.
Police searching for a 5-year-old Florida girl who's been missing since last week found human remains in rural Alabama, authorities said Tuesday.
The team looking for Taylor Rose Williams found a body, according to a statement issued by police in Demopolis, Alabama.
The remains were located in a wooded area between two towns in Marengo County, located about 100 miles (160 kilometers) west of Montgomery, police said.
Authorities are working to confirm the victim's identification, according to the statement.
The child was reported missing from her Jacksonville, Florida, home last Wednesday. Jacksonville Sheriff Mike Williams sheriff has said Taylor's mother, Brianna Williams, hasn't spoken with investigators since that day.
Authorities from Alabama and Florida assisted in the search.


Back to index
Legends
A legend provides an easy way to provide a color-coded “key” for another chart.


-
Site Of The Day
Activation Nodeplus Website
Agency website of Activation Nodeplus, the digital subsidiary of leading marketing agency Activation Group. A site with WebGL experience, and an addtional feature for Google Cardboard.
-
HOT!
FWA emoji competition - call for entries!
Calling all designers and agencies! We've teamed up with Snaps to create an FWA branded keyboard.
-
HOT!
New ARTICLE: Insights... Paristories
Get the insight! Paristories, Mobile of the Day, 28th July 2015
-
Mobile Of The Day
Activation Nodeplus Website (iOS)
Agency website of Activation Nodeplus, the digital subsidiary of leading marketing agency Activation Group. A site with WebGL experience, and an addtional feature for Google Cardboard.
-
The Cutting Edge
Project Of The Week
Nike Digital Retail Experience
Nikes new digital retail experience blends the digital and physical customer journey. Interfaces built on Unity3D leverage RFID, 3D cameras and multiuser surfaces with mobile connectivity for a seamless environment
CREDITS: Demodern Digital Agency
Latest Jobs
submit a job- Interactive Developer - Full Stack
Company: Column Five
Irvine, CA, USA - Creative Technologist - Director of Technology Mng
Company: OneMethod
Toronto , Canada - Senior Designer
Company: deltatre
London , UK - Senior Interactive Designer
Company: Bluecadet
Philadelphia, USA - Sr Full Stack Developer
Company: MRM//McCann
Salt Lake City, The United States of America
The Cutting Edge
Project of the Week
Once a week Adobe presents The Cutting Edge award to the project that best highlights the newest capabilities of the modern web.
→About Adobe's The Cutting Edge award


Dec. 2017 - Present
My consulting services include:
Sept. 2017 - Dec. 2017
Shapiro Bernstein is one of the oldest independent music publishers in the United States.
I proposed, developed, and implemented software to:
June 2017 - Aug. 2017
Advanced Acoustic Concepts is a naval defense contractor owned by DRS/Thales.
I developed the backend of an automated system testing infrastructure prototype for AAC's tactical simulation software. Previously, any simulation scenario could only be run and recorded manually. The prototype allowed any amount and kind of test to be run based off user-specific criteria.
By the end of the summer, the prototype was deemed successful and viable, moving to a partial implementation phase.
Sept. 2016 - April 2018
The Columbia Graduate School of Chemistry Office handles all operations and administration related to chemistry graduate students at Columbia University.
As an administrative assistant, I perform a wide range of administrative and office support activities including creating large-scale digital databases and organizing student materials to facilitate efficient running of the office.
July 2015 - Aug. 2015
The Forsyth Institute is a leader in oral and systemic disease research. I proposed and conducted an original experiment involving C. elegans and M. smegmatis, a mycobacterium closely related to M. tuberculosis, with a focus on studying how C. elegans impact the unique cell wall and mycolic acid lattice of M. smegmatis.
My work eventually held a provisional patent.
Morocco Project Manager
Engineers Without Borders is an organization consisting of various collegiate and professional chapters that work on designing and implementing infrastructural solutions to developing communities. As Columbia's Engineers Without Borders-Morocco project manager, my responsibility is to coordinate and direct the efforts of all EWB-Morocco project teams:
President
The Columbia Vietnamese Students Association works to foster a community for the Vietnamese and Vietnamese-American community at Columbia University, and also on sharing Vietnamese culture within NYC.
As president, I oversee and coordinate all of our events, projects, and initiatives. Additionally, I handle communications with the university. I also made the VSA website.
Studio Engineer
CU Records is a student-run recording studio at Columbia whose mission is to provide a free and open studio for local artists. As one of the earliest studio engineers for CU records, I work on maintaining and improving the studio. I also work with musicians, filmmakers, and other artists to make high quality recordings, and to mix and master songs.
Studio Member
The Barnard-Columbia Design for America is a consulting club that works with local non-profits in NYC to develop human-centered design solutions to pain points within each organization. Past work I've done through DFA includes:
Coordinator
Muse House is Columbia University's music-focused residence community, new this year. As a coordinator, I work on fostering a floor community and I organize music-related events for Columbia University. I also developed the website for Muse House.
Micro-G Outreach Lead & Design Member
As a part of the Micro-G NeXT team, I worked on a small team to develop a subsurface sampling device for asteroid use. Given a set of design criteria, the device was expected to be able to collect both regolith (similar to sand/gravel) and rock core samples while maintaining stratification.
After design approval, the device was manufactured and presented at NASA's Neutral Buoyancy Lab in June 2017. There, it was the most successful device at collecting regolith.
I also acted as the team's outreach lead, organizing several aerospace workshops and presentations within NYC.
Fast, robust, no-frills data management for licensing companies
This is a project I initially developed as a consultant for Shapiro, Bersntein, & Co, a music publisher. As an over 100 year old company, their song data was expansive to the point of intense inefficiency. A single search could take several minutes to process.
I developed a new data management system and database for the company to use. The software allowed Shapiro Bernstein to reorganize their data, sync data between files and the database, add metadata easily and quickly, and to use more flexible and in-depth searching. A single search went from taking several minutes to happening instantaneously.
This is a modular solution that can apply to similar companies.
Exploring an old wive's tale in stocks
The Super Bowl Indicator is a superstition that says that the stock market's performance in a given year can be predicted based on the outcome of the Super Bowl of that year. More specifically, a win from the American Football Conference (AFC) foretells a decline in the stock market for the coming year, and a win for a team from the National Football Conference (NFC), or the old National Football League (NFL) before the merger of NFL and American Football League (AFL) in 1966, means the stock market will be up for the year.
A classmate and I decided to explore this indicator on a statistical level for a school project. We also developed an interactive web application that allows users to learn about different stocks and stock relationships through various dynamic tests.
What Wikipedia data reveals about society
The Pantheon dataset is curated by MIT, and contains information about historical figures from around the world documented in Wikipedia with associated popularity indices. I explored the following questions:
The world's first high-density polymer simple suspension footbridge
This is one of the two projects I manage for Engineers Without Borders. The community of Ait Bayoud is separated from a set of schools, markets, clinics, and hospitals by a ravine which floods during the rainy season. The goal of the bridge was to provide a way to traverse the ravine during this season, opening up the community to resources and education.
One of the challenges we faced was the inability to set up a traditional steel bridge. Instead, we worked with a new material that was cheaper and ultimately more effective.
A 7 km pipeline providing potable water to Ilguiloda & Izgouaren
When Engineers Without Borders was working on the Ait Bayoud bridge, two remote dwars in the area -- Ilguiloda and Izgouaren -- reached out to us for help on increasing water accessibility. Currently, women and children must walk for hours each day back and forth to retrieve water. In 2015, a well was drilled on the outskirts of the region (the only area with a sufficient aquifer). Now, we are working on powering the system and on implementing a 7 km pipeline.
Columbia's first medical-themed hackathon
HealthHacks NYC was Columbia's first ever medical-themed hackathon. It was a 36 hour event bringing in hundreds of college students from around the country to program and build solutions to today's health problems. As the branding lead, I was responsible for creating branded material for marketing and communication purposes, as well as helping to define the vision for the event. The total valuation of the event in the end was $30,000.
A subsurface sampling device for asteroids, presented to NASA
The Lion Drill was designed and manufactured as a part of the NASA Micro-G NExT competition. The challenge was to create a single mechanical device that could collect samples from different layers of an asteroid while maintaining stratification. It was tested at NASA's Neutral Buoyancy Lab.
Integrating new engineering curricula and a public MakerSpace
I designed new engineering curricula and teacher training materials for the Lexington, MA public school system, culminating in a $10,000 initiative to transition the curricula to all elementary schools. After a successful pilot year at 1/3 of the elementary schools in Lexington, $20,000 was added to its funding, and I transitioned the project to a new team. Today, the curriculum has expanded and is fully integrated across all six Lexington elementary public school systems, impacting several thousand students.
Additionally, I established a $5,000 MakerSpace called "OpenSource" for students and faculty to create whatever, whenever. After a successful pilot year, $10,000 was added to funding, and I transitioned the project to a new team.
A pioneering 12-hour high school hackathon
I co-founded and led an annual 150+ student high school hackathon in the Greater Boston Area from 2014-2016. It has since transitioned to a new team.
Captain of 2 Bits and a Byte, 2016 World Championship division semi-finalists
I was the captain of 2 Bits and a Byte (FTC 4029), the LHS robotics team from 2014-2016. During both years of my captainship the team qualified to the FTC World Championship and made it to World Division Semi-Finals in the 2015-2016 season.
Studying the interaction between C. elegans and M. smegmatis
As an intern at Forsyth, a partner and I explored an original research proposal designed by us. We studied the interaction between C. elegans and M. smegmatis, which is closely related to tuberculosis. Our work eventually held a provisional patent.
Influenced by rock and metal
Since I was a kid, I have been playing piano. I started writing my own music when I was 14, and it's a passion of mine that I do for fun in my free time to destress. I like to view it as my audio diary. Stylistically, I'm most influenced by punk, rock, and classical music.


Tentacles of the enigmatic Unicode Consortium constrict the globe in their merciless grip to enforce with nefarious intent conformity of data encoding at the highest level. The consortium is thus able to control the governments and industries that rely on encoded interchange. Members recognize and communicate with each other through UTF-8 decoder rings, which appear to be completely ordinary for anyone with maleficent intent. Non members have infiltrated the Consortium with varying degrees of success. One such source, before he was eliminated by the Unicode Technical Committee, discovered the Consortium finesses its publications with great skill. Just enough is said to make it appear that the Consortium knows what it's talking about, but not so clearly that anyone actually understands. This makes the world dependent upon the normative yet inscrutable publications the Consortium releases on a well timed basis, and thus guarantees the Consortium an unprecendented degree of influence. Therefore, anyone wishing to learn Unicode must be aware of the dangers and do so at their own peril.
Meouzer
The origianl goal was to wirte an HTML/JavaScript editor of HTML, which is shelved for article ???. It truns out that a miniscule knowlege of Uncicode allows a minisucle improvement of the editor, and knowing more unicode doesn't do any good at all. However, this got me interested in Unicode. Unicode is a very complicated subject, so I just reserached some of its simpler aspects to get a basic feel. The reader shouldn't take this article as being any more than that. Readers with intermediate to expert knowledge of Unicode probably won't get anything out of this article.
Of the three UTF-8, UTF-16, and UTF-32, only UTF-16 is discussed to any extent. On reason for this is the author's emphasis on JavaScript, which always acts as though UTF-16 is used.
The next section has a collection of excellent Unicode references.
The term canonical is used as a synonym of salient. So canonical can refer to any of the following.
In the surrogate math section, the canonical mappings are not obvious, even though they are obtained by "following your nose", so canonical there means the most important. Every where else it means obvious and trivial. When that's the meaning, details will not necessarily be provided.
The notatoin x ∈ X means x is an element of of the set X. Let's look at the notation. m:X → Y, m(x) = x + 1 (if x ∈ X) This means that m is a map from the set X to the set Y. After this may come the rule or formula for the map, written in green. Then after this may come a description of the elements for which the formula holds, written in maroon. Also X is called the domain of the map.
If m is one-one then there is an inverse map from the maps image back to it's domain.
It is also true that
The delimiters [] are used to dentote ranges (of integers)
[2,6] is the range of integers from 2 to 6 inclusive. It's the set {2,3,4,5,6}.
The delimiters <> are used to denote sequences.
<A, D, F> is a sequence of three letters.
A pair is a seqence of two. X x Y is the set of all pairs where the first entry is an element of X, and the second entry is an element of Y. X x Y is also called the cross product of X and Y.
If X is a set then Xs denotes the set of all sequences whose entries are menbers of X. It is implility understood that Xs has the natural operator of concatenation, which is denoted with the dot ·. Concatenation is an associative operation.
A map m:Xs → Ys is a sequential map if it preserves concatenation. That is m(s·t) = m(s)·m(t) (whenever s, t ∈ Xs)
If m:X → Ys is a map then there is a canonical sequential extension ms:Xs → Ys, ms(<x1,...,xn>) = m(x1)···m(xn) (if x1,...,xn ∈ X)
If m:X → Y is a map then there is a canonical sequential extension ms:Xs → Ys, ms(<x1,...,xn>) = <m(x1),...,m(xn)> (if x1,...,xn ∈ X)
A bit stream is a sequence of bits in computer storage. Commas are not used to separate the entries. Spaces may be used for readability
The concatentation of the three bit streams 1011, 11001, and 0 is 10 1111 0010.
Both of these will be defined and used in subsequent sections. They are mentioned now, so they won't be glossed over.
When we get to surrogate math, 𝔸 dentotes the canonical astral decomposition of an astral number into a high surrogate and low surrogate pair. Since this map is one-one and onto, 𝔸-1 is the canonical composition of a high surrogate, low surrogate pair into an astral number.
𝕍 denotes the virtual encoding of a Unicode abtract character to an encoded character.
First, you should buy the book O'Reilly Unicode Explained because Meouzer gets a commision, and I a kickback.
Sometimes information can be quickly obtained from Wikipedia. The alternative might be the time consuming searchi throughout numerous official Unicode documents.
Unicode Table covers all supported characters, with an example glyph if there is one. I don't think Unicode.org made this table.
This with the following contains the latest up to date documentation on Unicode.
Any particular reading of the Unicode specification may not be thorough or the last word. Only weight of evidence or the most detailed discussion determines what the standard is. Gaggles of gooses are easily raised in the specificaiton's abmiguities.
We get a head start. You need to know nada about Unicode and UTF-16 to understand this section.
We show how to canonically decompose an astral number into a high surrogate number and a low surrogate number pair.
We also show how to canonically compose a high surrogate number and low surrogate number pair into
an astral number.
This means there is a canonical equivalence between astral numbers and high surrogate numbers/low surrogate number pairs.
If you are good with binary and hexidecimal numbers you can very quickly come up with the surrogate formulas from "Wikipedia UTF-16: Examples". The following is the long approach since it gives all the simple details.
The quick summary is that given any 20 bit range of numbers and any two 10 bit range of numbers, any number a
in the
20 bit range detrmines a pair of numbers <h,l>
where h
lies in the first 10 bit range and l
lies in the second
10 bit range. This map is reversible, in that a
determines <h,l>
and <h,l> determines a
.
In our particular example, the astral numbers form the 20 bit range. The high surrogates and low surrogates form the two 10 bit ranges.
The 20 bit numbers are all the non-negative integers that can be written with exactly 20 binary bits with possible leading zeros. Likewise for 10 bit numbers.
20 bit numbers = the range [0, 1...1220-times] = [0x0, 0xFFFFF]
(All integers between 0x0
and 0xFFFFF
inclusive)
10 bit numbers = the range [0, 1...1210-times] = [0x0, 0x3FFF]
(All integers between 0x0
and 0x3FFF
inclusive)
The calculations for the diagram are
[0, 1...1220-times] = 1111 1111 1111 1111 11112 = FFFF16= 0xFFFF
.
[0, 1...1210-times] = 11 1111 11112 = 3FFF16= 0x3FFF
.
0x10FFFF - 0x10000 = 0xFFFF
.
The high 10 bits of a 20 bit number x is y = x >> 10
.
The low 10 bits of x is z = 11 1111 11112 & x = 0x3FF & x
.
0x3FF + 0xD800 = 0xDBFF
.
0x3FF + 0xDC00 = 0xDFFF
.
We also need to know that if y
and z
are the high and low 10 bits of x
then they can
be snapped together via x = y << 10 + z
to get x
.
Canonical Decompositon of an Astral Number into a High and Low Surrogate Pair
Following the diagram yields the following formula.
a → <h,l>
h = ((a - 0x10000) >>10) + 0xD800
and l = (a - 0x10000) & 0x3FFF + 0xDC00
You could also follow the diagram bottoms up and use substitution.
h = y + 0xD800
= (x >> 10) + 0xD800
= ((a - 0x10000) >> 10) + 0xD800;
l = z + 0xD800
= (x & 0x3FF) + 0xDC00
= ((a - 0x10000) & 0x3FF) + 0xDC00
Canonical Composition of a High and Low Surrogate Pair into an Astral Number
To get the reverse formula, we just follow the diagram top down, and use substitution by reversing each step individually.
a = x + 0x10000
=(y << 10 + z) + 0x10000
= ((h - 0xD800) << 10 + (l - 0xDC00)) + 0x10000
So the reverse forumula follows.
a ← <h,l>
a = ((h - 0xD800) << 10) + (l - 0xDC00) + 0x10000
We have encoded an astral number into its high and low surrogates (canonical decomposition). Its high and low surrogates can be used to obtain the original astral number (cononical composition). We used different functional notations than in the introduction. Let's make amends now.
The map
is a canonical equivalence (is one to one and onto). It's inverse is
OK! This section is written ahead of schedule to force reading of the rest of the article. The worst is saved for last, or perhaps everywhere. For example, the material on stand alone surrogates as being ill formed must be read. JavaScript is based on UTF-16 even if it's not. You'll understand later.
We adopted one of the conformatn techniques of dealing with stand alone surrogates. Simply filter them out. The code above is easily modifiied for either one of the other two methods mentioned below.
✰ Unicode Strings §2.7 𝕡43A number of techniques are available for dealing with an isolated surrogate, such as omitting it, converting it into U+FFFD replacement character to produce well-formed UTF-16, or simply halting the processing of the string with an error. For more information on this topic, see Unicode Technical Standard #22, “Character Mapping Markup Language (CharMapML).”
UTF-8 works differently, but in specific situations ill formed code unit sequence can be corrected by filtering code units out. See "Unicode: §3.2 #C10 𝕡 83" and Unicode: Corrigendum 1 After C12
A unicode code point is any integer in the range [0, 1114111] = [0x0,0x10FFFF]
. The code point
is usually written in decimal or hexidecimal. Every code point determines a unicode number obtained by
concatenating the abstract unit U
with the code point's hexidecimal digits through addition.
Thus the code point 193 = 0xC1
determines the unicode number U + C1
, and the code point of
U + C1
is 0xC1 = 193
.
The range of unicode space is [U + 0, U + 10FFFF]
which corresponds to the range
[0, 1114111] = [0x0,0x10FFFF]
of code points.
Since there is a canonical/trivial one-one correspondence between unicode numbers and (unicode) code points, the notions of unicode number and code point may be conflated without any misunderstanding.
For example, even expert source material will call the unicode number U + FECD
a code point.
Conversely, the code point 0xFECD
may be referred to as a Unicode number.
Since code points are numbers, we know what the surrogate code points are, what the high surrogate code points are, what the low surrogate code points are, and what the astral code points are. The non astral code points are the the BMP code points.
| Partition of Unicode Space [U + 0000, U + 10FFFF] into BMP, Surrogate, and Astral Code Point Ranges |
|||
|---|---|---|---|
| BMP Code Points [U + 0000, U + 10FFFF] |
Low BMP Code Points | [U + 0000, U + D7FF] | |
|
Surrogate Code Points [U + D800, U + DFFF] |
High Surrogte Code Points | [U + D800, U + DBFF] | |
| Low Surrogate Code Points | [U + DC00, U + DFFF] | ||
| High BMP Code Points | [U + E000, U + FFFF] | ||
| Astral Code Points | [U + 10000, U + 10FFFF] |
Since the surrogate code point range [U + D800, U + DFFF] is smack dab in the middle of the BMP code point range [U + 0000, U + FFFF], there are the left over low BMP and high BMP code points.
Any code point that is not a surrogate code point is called a scalar value.
We get some math out the way before continuing.
The astral decomposition 𝔸 is extedned to BMP scalar values so that 𝔸(x) = <x> for all BMP scalar values x. The extended map, which uses the same name 𝔸, is described as follows.
| 𝔸(a) = | { | <high surrogate of a, low surrogate of a> (if a in an astral number) |
| <a> (if a is a BMP scalar value) |
The canonical sequential extension of 𝔸 is
𝔸s is one to one. So
is a sequential canonical equivalence.
Unicode space is a virtual itermediary encoding space between abstract characetrs section??? and bytes of computer storage. An abstract character is virtually encoded as a scalar value or sequence of scalar values, which themsevles are concretely encoded into bytes of computer storage through one of the encoding forms UTF-8, UTF-16, or UTF-32 to otain a sequence of bytes that concretely encodes the abstract character in computer storage.
The Unicode Database is the main tool for virtual encodings of abstract characters.
Non scalar values (surrogates) are not listed in the database. Not all scalar values are listed in the database. However, if a scalar value is listed in the database with a corresponding abstract character, then the following definitions hold.
In each record of the database, the first field is the scalar value or encoded character. The second field is the Unicode abstract character (name). If for some reason the second field is not informative then use the eleventh field.
Two examples from the Unicode database
Now there are private use scalar values, that a third party can assign an abstract character too. In this case the scalar value is also called an encoded character, and the abstract character will also be called a Unicode abstract character. It's just as if the third party made their own entry into the databasse.
Technically the abstract character is not a Unicode abstract character because it is defined by a third party, not the Unicode standard. But let's not quibble because our definition is useful and nothing bad will arise as the result. It's important to combine Unicode abstractract characters and private use characters into a single concept, However, making another definition to do so is akward and completely unnecessary, at least until I find out otherwise by actually reading the Unicode specification.
Example
0xE000 is a private use scalar value. A third party (or parties) has assinged to it the abstract character VIAMUS CONSORTIUM. So 0xE000 virtually encodes the Unicode abstract character VIAMUS CONSORTIUM. This encoding is recognized by the third parties involed, but no one else.
The first definiton is the Consortium's. Almost all the time it's too broad, so our hand is forced is writing the latter two specializations. The Consortium missed two chances to define something useful to cut down on their verbage.
Since there is a a virtual encoding equivalence 𝕍: Unicode abstract characters → Encoded Charaters, there is a cononical sequential extensoin 𝕍s: Abstract Character Sequences → Encoded Character Sequences, which is a virtual encoding equivalence.
Example:
The virtual encoding of the Unicode abtract character sequence
<LATIN CAPITAL LETTER A,
LATIN SMALL LETTER E WITH ACUTE, START OF HEADING, VIAMUS CONSORTIUM >
is the encoded character sequence
<0x0041, 0x00E9, 0x0001, 0xE000 >
the virtual encodings of each of the Unicode abstract characters having been previously given.
Definitions to follow are mildly different than might be found elsewhere, but only because total accuracy is desired. For example, a sequence of code units is not the same as their concatenation. If we mean concatenation (because the specification means it), we say it, not imply it.
There are exactly three machine encodings of Unicode space that are currently part of the Unicode standard, UTF-8, UTF-16, and UTF-32. By machine encoding, it is meant that scalar values are concretely encoded as bit streams.
In each UTF encoding form, every scalar value is concretely encoded as the concatenation of a sequence of code
units, where a code unit is a bit stream of fixed length.
A UTF encoding form does not encode surrogate code points. You could but you can't. Well you probably can,
but it's illegal and you would end up in the gulag run by the Consortium's Unicode Technical Committee.
UTF encodings of scalar values canonically extend to UTF encodings of scalar value sequences. The UTF encoding of a scalar value sequence is the result of concatenating the UTF encodings of each scalar value in the sequence.
A sequence of code units such as
(1) <0x0041, 0xD835, 0xDD61>
is canonically equivalent to a sequnce of binary bits.
Merely convert each code unit into a 16 bit binary sequence and concatentate the results to obtain
(2) 0000 0000 0002 0001 1110 1000 0011 0101 1110 1110 1110 0110 0001.
Since (1) and (2) are canonically equivalent we can use (1) as shorthand for (2).
UTF-16 encoding is defined as follows
It can be deduced that there are no restrictions on a UTF-16 code unit other than that it consists of 16 bits. Thus there is a canonical equivalence between code units and the numbers in the range [0x0000, 0xFFFF], which is the range of BMP code points. Also there is a canonical equivalence between code units and hexidecimal representations with exactly four hexidecimal digits, with possible leading zeros to be implicitly understood.
Through the former canonical equivlannce we know what the surrogate code units are, and in particular the high surrogate code units and the low surrogate code untis. Merely convert the 16 bit code unit to a number. If the number is a surrogate number then the code unit is a surrogate code unit. Likewise for high and low surrogate code units.
Surrogate code units are allowed, and are in fact necessary in UTF-16 encoding. Keep in mind the nuanced contrast that UTF-16 does not encode surrogate code points.
By canonical extension, UTF-16 concretely encodes every scalar value sequence into a well formed
UTF-16 Unicode string.
Consequently, UTF-16 concretely encodes every UTF-16 coded character sequence into a well formed
UTF-16 Unicode string.
By canonical extension, UTF-16 concretely encodes every abstract character sequence into a well formed UTF-16 Unicode string.
Ok! Let's go over this picture. It's emphasized that only UTF-16 is discussed.
The explicitness of the followiing table is needed to resolve ambiguites elswhere in the standard. It is copied as is from Unicode: Major General Categories §2.4 𝕡 30.
| Types of Code Points | ||||
|---|---|---|---|---|
| Basic Type | Brief Description | General Category |
Character Status |
Code Point Status |
| Graphic | Letter, mark, number, punctuation, symbol, spaces |
L, M, N, P, S, Zs |
Assigned to Abstract Character (Assigned Character) |
Designated Code Point (Assigned Code Point) |
| Format | Invisible but affects neighboring characters includes line/paragraph separators |
Cf, Zl, Zp | ||
| Control | Usage defined by protocols or standards outside the Unicode Standard |
Cc | ||
| Private Use | Usage defined by private agreement outside the Unicode Standard |
Co | ||
| Surrogate | Permanently reserved for UTF-16; restricted interchange |
Cs | Will never be assigned to abstract character |
|
| Non Character | Permanently reserved for internal usage;restricted interchange |
Cn | Will never be assigned to an abstrac character |
|
| Reserved | Reserved for future assignment; restricted interchange |
Cn |
May be assinged to an abstract character in the future by the Unicode Consortium. |
Undesignated code point (unassigned code point) |
The terminology Assigned Character is very unfortunate, since Assigned Characters are actuall code points, not what one normally thinks of as a character. Even worse, it causes confusion with the term Assigned Code Point, which is someting else.
You need to look at one of the following to see a break down of the major general categores into minor general categories.
OK! §3.4 of the Unicode specification is filled with ambiguities and discrepencies. "And what is the use of a specification," thought Alice, "with ambiguites and discrepencies?" Hopefully our discussion is more explicit, but there is still a painful awareness that further improvements are possible.
A clear definition of abstract character is hard to obtain because without exception all definitions this author has seen, including the one in §3.4, discuss some properties that are expected of abstract characters but without saying what abstract characters actually are. For example, because of the complete lack of specificty in §3.4, a code point meets the criteria for being an abstract character, but it's well known that code points are not abstract characters. Let's be more explicit.
There are three types of abstract characters.
Examples:
A definition specific to Unicode would be that an abstract control character is simply the named identifier of a code point with general category Cc as given in the Unicode database. Again, different third parties/protocals are free to intpret thse abstract control characters their own way.
In any case, the Unicode idea is that the abstract control character is virtually encoded as a code point, which is then concretley encoded as a sequnece of bits in computer storage through use of UTF-8, UTF-16, or UTF-32.
The bottom line is that we are pretty much on our own in the interpretation of §3.4 D7. We emphasize that private use characters are never Unicode abstract characters (see ramblings). However, there is a possibility that the Consortium didn't expect this as a side effect given their general lack of clarity.
A Unicode abstract character is an abstract character that is directly encoded in Unicode space, by which we mean the abstract character is explicitly given in the Unicode database with its encoded code point.
| Unicode Abstract Character | ||
|---|---|---|
| A unit of information used for | Type of Chacter | General Category |
| The organization of textual data | Format Characters | Cf, Zl, Zp |
| The control of textural data | Control Characters | Cc |
| The representation of textual data | Graphic Characters | L, M, N, P, S, Zs |
The header and first column gives the definition, which is very nebulous. The three possibiiites could mean pretty much anything. So yours truly put the pieces of the puzzle together as the second and third columns.
Note that the Co, Cs, and Cn categories are absent.
Unicode abstract characters are identified by name. They are written after the code point in the Unicode data base, but not always immediately after. The general category of the code point is written after the general category name.
Examples from the Unicode Database.The definition given in §3.4 does't require the abstract characters to be Unicode absstract characters or private use characters. However, only sequences of Unicode abstract characters or private use characters can be of any interest. For example, sequences of company logos are besides the point.
Every abstract character sequence is virtually encoded by a coded character sequence. Merely encode the abstract characters in the sequence in a left to right manner to obtain the sequence of encoded characters.
This is why we included private use characters is the definition of abstract character sequence to make this virtual encoding more inclusive. It would be plain silly to exclude private use characters.
Any code point that has either been assigned to an abstract character (assigned characters) or that has otherwise been given a normative function by the standard (surrogate code points and noncharacters). This definition excludes reserved code points. Also known as assigned code point.
More simply, the designated code points are all code points except for the reserved code points.
Ok! I tried, but can't say it as well as Unicode: Prevate Use and Non Characters.
In the section on Planes, the codepoints for priavte use and non characters are explicitly given.
Code points that have been reserved for future use by the Consortium are reserved code points or unassigned code points. The Consortium may at any time, without your permission, assign abstract characters to these code points.
After awhile I made the following observations.
As later shown, we know exactly what the non characetrs are and exactly what the susrrogate code points are. This means all other code points not listed in the data base are reserved code points. So the data base is parsed to find all reserved code points. The results are listed in Appendix ???
A unicode code point is any integer in the range [0, 1114111] = [0x0,0x10FFFF]
. The code point
is usually written in decimal or hexidecimal. Every code point determines a unicode number obtained by
concatenating the abstract unit U
with the code point's hexidecimal digits through addition.
Thus the code point 193 = 0xC1
determines the unicode number U + C1
, and the code point of
U + C1
is 0xC1 = 193
.
The range of unicode space is [U + 0, U + 10FFFF]
which corresponds to the range
[0, 1114111] = [0x0,0x10FFFF]
of code points.
Since there is a trivial one-one correspondence between unicode numbers and (unicode) code points, the notions of unicode number and code point may, and will be, conflated without any misunderstanding.
For example, even expert source material will call the unicode number U + FECD
a code point.
The author will use the terms interchangebly.
Unicode space is a virtual itermediary encoding space between abstract characetrs (next section) and bytes of computer storage. An abstract character is virtually encoded as a code point or sequence of code points, which themsevles are concretely encoded into bytes of computer storage through one of the encoding forms UTF-8, UTF-16, or UTF-32 to otain a sequence of bytes that concretely encodes the abstract character in computer storage.
The explicitness of the followiing table is needed to resolve ambiguites elswhere in the standard. It is copied as is from Unicode: Major General Categories §2.4 𝕡 30.
| Types of Code Points | ||||
|---|---|---|---|---|
| Basic Type | Brief Description | General Category |
Character Status |
Code Point Status |
| Graphic | Letter, mark, number, punctuation, symbol, spaces |
L, M, N, P, S, Zs |
Assigned to Abstract Character (Assigned Character) |
Designated Code Point (Assigned Code Point) |
| Format | Invisible but affects neighboring characters includes line/paragraph separators |
Cf, Zl, Zp | ||
| Control | Usage defined by protocols or standards outside the Unicode Standard |
Cc | ||
| Private Use | Usage defined by private agreement outside the Unicode Standard |
Co | ||
| Surrogate | Permanently reserved for UTF-16; restricted interchange |
Cs | Will never be assigned to abstract character |
|
| Non Character | Permanently reserved for internal usage;restricted interchange |
Cn | Will never be assigned to an abstrac character |
|
| Reserved | Reserved for future assignment; restricted interchange |
Cn |
May be assinged to an abstract character in the future by the Unicode Consortium. |
Undesignated code point (unassigned code point) |
The terminology Assigned Character is very unfortunate, since Assigned Characters are actuall code points, not what one normally thinks of as a character. Even worse, it causes confusion with the term Assigned Code Point, which is someting else.
You need to look at one of the following to see a break down of the major general categores into minor general categories.
OK! §3.4 of the Unicode specification is filled with ambiguities and discrepencies. "And what is the use of a specification," thought Alice, "with ambiguites and discrepencies?" Hopefully our discussion is more explicit, but there is still a painful awareness that further improvements are possible.
A clear definition of abstract character is hard to obtain because without exception all definitions this author has seen, including the one in §3.4, discuss some properties that are expected of abstract characters but without saying what abstract characters actually are. For example, because of the complete lack of specificty in §3.4, a code point meets the criteria for being an abstract character, but it's well known that code points are not abstract characters. Let's be more explicit.
There are three types of abstract characters.
Examples:
A definition specific to Unicode would be that an abstract control character is simply the named identifier of a code point with general category Cc as given in the Unicode database. Again, different third parties/protocals are free to intpret thse abstract control characters their own way.
In any case, the Unicode idea is that the abstract control character is virtually encoded as a code point, which is then concretley encoded as a sequnece of bits in computer storage through use of UTF-8, UTF-16, or UTF-32.
The bottom line is that we are pretty much on our own in the interpretation of §3.4 D7. We emphasize that private use characters are never Unicode abstract characters (see ramblings). However, there is a possibility that the Consortium didn't expect this as a side effect given their general lack of clarity.
A Unicode abstract character is an abstract character that is directly encoded in Unicode space, by which we mean the abstract character is explicitly given in the Unicode database with its encoded code point.
| Unicode Abstract Character | ||
|---|---|---|
| A unit of information used for | Type of Chacter | General Category |
| The organization of textual data | Format Characters | Cf, Zl, Zp |
| The control of textural data | Control Characters | Cc |
| The representation of textual data | Graphic Characters | L, M, N, P, S, Zs |
The header and first column gives the definition, which is very nebulous. The three possibiiites could mean pretty much anything. So yours truly put the pieces of the puzzle together as the second and third columns.
Note that the Co, Cs, and Cn categories are absent.
Unicode abstract characters are identified by name. They are written after the code point in the Unicode data base, but not always immediately after. The general category of the code point is written after the general category name.
Examples from the Unicode Database.The definition given in §3.4 does't require the abstract characters to be Unicode absstract characters or private use characters. However, only sequences of Unicode abstract characters or private use characters can be of any interest. For example, sequences of company logos are besides the point.
Every abstract character sequence is virtually encoded by a coded character sequence. Merely encode the abstract characters in the sequence in a left to right manner to obtain the sequence of encoded characters.
This is why we included private use characters is the definition of abstract character sequence to make this virtual encoding more inclusive. It would be plain silly to exclude private use characters.
Any code point that has either been assigned to an abstract character (assigned characters) or that has otherwise been given a normative function by the standard (surrogate code points and noncharacters). This definition excludes reserved code points. Also known as assigned code point.
More simply, the designated code points are all code points except for the reserved code points.
Ok! I tried, but can't say it as well as Unicode: Prevate Use and Non Characters.
In the section on Planes, the codepoints for priavte use and non characters are explicitly given.
Code points that have been reserved for future use by the Consortium are reserved code points or unassigned code points. The Consortium may at any time, without your permission, assign abstract characters to these code points.
After awhile I made the following observations.
As later shown, we know exactly what the non characetrs are and exactly what the susrrogate code points are. This means all other code points not listed in the data base are reserved code points. So the data base is parsed to find all reserved code points. The results are listed in Appendix ???
Approved readings of the Meouzer Consortium.
Some of Wikipedia's unicode charts will didplay ᪾ garbage for an entry, while the corresponding Unicode.org chart doesn't. The explantion is that Wikipedia uses character references that aren't yet supported by the browsers, while Unicode.org charts uses images or else uses a customized web font.
Unicode space is divided into 17 planes [U + 0xN0000, U +0xNFFFF]
, where
N is to be replaced by the hexidecimal digits (one or two) of an integer between 0 = 0X0
and 16 = 0x10
.
| The 17 Unicode Planes | ||
|---|---|---|
| Index | Range | Name |
| 0 | [U + 0000, U + FFFF] | Basic Multilingual Plane (BMP) |
| 1 | [U + 10000, U + 1FFFF] | Supplementary Multilingual Plane (SMP) |
| 2 | [U + 20000, U + 2FFFF] | Supplementary Ideographic Plane (SIP) |
| 3-13 | [U + 30000, U + 3FFFF] to
|
Unassigned Supplementary Planes
All code points in each plane has category Cn. |
| 14 | [U + E0000, U + EFFFF] |
Supplementary Special Purpose Plane (SSP) §2.8 𝕡 45 The Supplementary Special-purpose Plane
Only a small handful of code points in this plane are |
| 15 | [U + F0000, U + FFFFF] |
Supplementary Private Use Area (SPUA-A)
All code points in this plane, except for the last two, |
| 16 | [U + 100000, U + 10FFFF] |
Supplementary Private Use Area (SPUA-B)
All code points in this plane, except for the last two, |
Planes other than the BMP are supplementary or astral planes. Any unicode number in one of these planes is a supplementary or astral unicode number/code point
Each plane is partitoned into a number of blocks. Each block is a range of code points. The blocks don't overlap
and together form the entire plane (Wikipedia doesn't say that, but it's easily observed).
The last four digits of any block range from abc0
to abcF
where a
,
b
, and c
are three hexidecimal digits.
Wikipedia: Blocks lists the blocks. At frist glance, it appears that each block is a set of highly related characters, such as characters in a particular language, geometric shapes, mathematical symbols etc. But wait, Unicode: §2.8 𝕡 45 says hold your horses, it ain't necessarily so.
This author doesn't have anything to say about blocks.
| Private Use Areas | |
|---|---|
| Containing Plane | Range |
| BMP (plane 0) | [U+E000, U+F8FF] |
| SPUA-A (plane 15) | [U+F0000, U+FFFFD] |
| SPUA-B (plane 16) | [U+100000, U+10FFFD] |
| Non Characters | |
|---|---|
| Plane | Non Characters in Plane |
| Plane 0 | [U+FDD0, U+FDEF], U+FFFE, U+FFFF |
| Plane 1 | U+1FFFE, U+1FFFF |
| ... | ... |
| Plane N | U+NFFFE, U+NFFFF |
| Plane 15 | U+FFFFE, U+FFFFF |
| Plane 16 | U+10FFFE, U+10FFFF |
This table gives another way to partition unicode space into subranges.
| Improtant Unicode Ranges | ||||
|---|---|---|---|---|
| Low BMP Code Points | [U + 0000, U + D7FF] | |||
| Surrogate Code Points | [U + D800, U + DFFF] | |||
| High Surrogate Code Points | [U + D800, U + DBFF] | 10 bit range | ||
| Low Surrogate Code Points | [U + DC00, U + DFFF] | 10 bit range | ||
| High BMP Scalar Values | [U + E000, U+FFFF] | |||
| Astral Code Points | [U + 10000, U + 10FFFF] | 20 bit range |
Any unicode number that is not a surrogate is a scalar value, but the author somtimes prefers the term scalar code point.
The surrogate range is divided into the high and low surrogate ranges. The astral Unicode numbers are also called supplementary scalar values, and are the elements of the 16 astral or supplementary planes.
From Wikipedia: Non Characters Wikipedia: Private Use, and Unicode: Surrogates Area §23.6 𝕡 830 a more detailed partition of the BMP into subranges emerges.
| Partition of the BMP (65536 code points) | ||||
|---|---|---|---|---|
| Name | Range | Number Code Points | ||
| Low BMP Scalar Values | [U + 0000, U + D7FF] | 55296 | ||
| High Surrogates | Non Private Use High Surrogates |
[U + D800, U + DB7F] (896 code points) | 1024 | |
| Private Use High Surrogates | [U + DB80, U + DBFF] (128 code points) | |||
| Low Surrogates | [U + DC00, U + DFFF] | 1024 | ||
| Private Use Scalar Values | [U + E000, U + F8FF] | 6400 | ||
| Mid BMP Scalar Values | [U + F900, U + FDCF] | 1232 | ||
| Non Character Scalar Values | [U + FDD0, U + FDEF] | 32 | ||
| High BMP Scalar Values | [U + FDF0, U+FFFD] | 526 | ||
| Non Character Scalar Values | [U + FFFE, U+FFFF] | 2 |
Also see Unicode: Allocation on the BMP §2.9 𝕡49 for more information on the BMP.
There are exactly three encodings that are currently part of the Unicode standard, UTF-8, UTF-16, and UTF-32.
In each UTF encoding form, every scalar valueUnicode number is encoded or
mapped to a sequence of code units, where a code unit is a sequence of bits of fixed length. The mapped to sequence of
code units is the encoding of the Unicode number. It represents a sequence of bits in computer storage.
- A code unit in UTF-8 consists of 8 bits. (a code point is encoded by one to four code units)
- A code unit in UTF-16 consists of 16 bits. (a code point is encoded by one or two code units)
- A code unit in UTF-32 consists of 32 bits. (a code point is encoded by one code unit)
In the HTML document's meta tag, any of the three machine encodings may be specified, and will apply to HTML. I found no documentation that says it applies to JavaScript. However, it probably does since we shall later see that any of the three machine encodings may applly to JavaScript. It's just that magic must be performed behind the scenes to make it appear that JavaScript is using UTF-16 even if it isn't
W3.org has a strong opinion of which machine encoding to specify in the meta tag. (You will have to scroll down the page to find the quote).
"W3: HTML encoding"You should always use the UTF-8 character encoding unless you shouldn't. (Remember that this means you also need to save your content as UTF-8.) See what you should consider if you really cannot use UTF-8.
We briefly/barely mentioned machine encodings only because at the lanuage level, JavaScript uses a native UTF-16 encoding form no matter which of the three macnine encodings is used. Furthermore, JavaScript encodings may be written directly to HTML, which has the same effect no matter which of the three machine encodings is used.
Any scalar value Unicode number in [U + 0, U + FFFF], the Basic Multilingual Plane,
is encoded as as single code unit equal to its code point. Astral scalar code points are encoded as two code units,
equal to the code unit of its hign surrogate followed by the code unit of its low surrogate. The following table
expands on this by breaking the BMP into its separate ranges.
| UTF-16 | ||||
|---|---|---|---|---|
| Low BMP Code Points | [U + 0000, U + D7FF] | encoded as a single code unit equal to its code point | ||
| Surrogate Code Points | [U + D800, U + DFFF] | encoded as a single code unit equal to its code point |
||
| High Surrogate Code Points | [U + D800, U + DBFF] | ill formed encoding as a single code unit equal to its code point | ||
| Low Surrogate Code Points | [U + DC00, U + DFFF] | ill formed encoding as a single code unit equal to its code point | ||
| High BMP Code Points | [U + E000, U+FFFF] | encoded as a single code unit equal to its code point | ||
| Astral Code Points | [U + 10000, U + 10FFFF] | encoded as two code units equal to the code point of its hign surrogate followed by the code point of its low surrogate |
RETHINK Out of necesssity, we shall use slightly different nomenclature than the Unicode standard. A Unicode string is a sequence of Unicode code points. An encoded Unicode string is a sequence of code units. (The encodinf of a Unicode string is an encoded Unicode string).
The two types of strings are in a one-one relationship.
Given a Unicode string merely form the corresponding sequence of code units to obtain the correspoindign encoded Unicode string.
Given an encoded Unicode string, determine the corresponding Unicode string by reading the encoded Unicode string left to right. Onnce the code point of a high surrogate followed by the codepoint of a low surrogate is read, it is mapped to the correspoinding astral code point. Otherwise once read a single code point is mapped to the corresponding BMP code point.
give exampleOk! A concise summary of a lot of information from Wikipedia: UTF-16, Unicode Standard: Encodings 3.9-D77 and D91, and Unicode Strings §2.7 𝕡43 is given.
Stand alone surrogates are ill formed. Given a string of UTF-16 codeponts, the ill formed stand alone surrogates are obtained by reading left to right. If a high surrogate is not followed by a low surrogate, then the high surrogate is ill formed. The whole string is then ill formed. If a low surrogate is encountered, not preceded by a high surrogate, then the low surrogate is ill formed and the whole string is ill formed.
If an UTF-16 Unicod string is specified as being well formed then it is highly illegal/non coformant for the string to be ill formed, of course because that would be an outright lie. If the UTF-16 string is not specified as being well formed, then it is not illegal for it to be ill foremd. In fact it is expected that the string might be ill formed. For example, strings in Java, C#, or ECMAScript are Unicode 16-bit strings, but are not necessarily well-formed UTF-16 sequences.
The majority of industry UTF-16 encoders allow indivdual encodings of surrogate code points as single code units. And apparently, it's common for UTF-8 and UTF-32 encoders to violate the standard in a similar manner.
OK! You may encode a stand alone surrogate. You can, but if you do it's bold, and if you do so while your boss is telling you that it will break existing software, then that's bolder than bold. And if you do so while eating a butterfinger in all of its crispity crunchity peanut buttery glory, then that's bolder than bolder than bold.
In Microsoft Edge, Unicode is fully supported. The most common Unicode code points are represented by four hexadecimal digits, such as \u0009 for a tab character. Astral code points, which include all symbols that require more than four hexadecimal digits, are now supported in a simplified format. By using the format "\u{codepoint}", the full Unicode character set can be represented in a literal format. For example, to represent the symbol "𠮷", you can use the following format: "\u{20BB7}"
Microsoft Edge is the only browser I know about that fully supports unicode. Firefox, Chrome, and Opera support literal encodings. However, currently the latest versions IE-11 and Safari-5 don't.
'\u{H}'
where H
is to be substituted
by the hexidecimal digits of the code point. Any number of leading zeros are allowed.
0xFFFF
may be encoded by the literal reference '\uH'
,
where H
represents the hexidecimal digits of the code point padded on the left with zeros, if necessary,
to obtain exactly 4 hexidecimal digits.
0xFF
may be encoded as the literal reference '\xH'
,
where H
represents the hexidecimal digits of the code point padded on the left with a leading zero,
if necessary, to objtain exactly two hexidecimal digits.
| Examples of JavaScript Literal Encodings | |
|---|---|
| Unicode Number | Encoding |
| U + 10FFFF | '\u{10FFFF}' |
| U + 1D566 | '\u{1D566}' |
| U + 2283 | '\u2283' = '\u{2283}' |
| U + FD | '\xFD' = '\u00FD' = '\u{FD}' |
| U + F | '\x0F' = '\u000F' = '\u{F}' |
| U + 0 | '\x00' = '\u0000' = '\u{0}' |
The following three are equivalent methods for producing a result on the web page.
One reason for this section is that IE and Safari currently do not support literal encodings of astral code ponts.
JavaScript encodes Unicode numbers at the language level. Like the UTF-16 machine encodings, a Unicode number still maps to a sequence of one or two code units. But at the language level, the meaning of code unit must change. A code unit refers to a 16 bit logical value of text. Read on.
Now even though UTF-8 is most commonly used and is the recommended machine encoding, it's ironic that only UTF-16 corresponds extremely well with JavaScript language encodings. You can directly use big endian UTF-16 encodings in JavaScript. The UTF-16 encoding of certain Unicode numbers into surrogate pairs translates directly into JavaScript. See Wikipedia: UTF-16, which you probably should read.
So simple facts about UTF-16 encoding can be used as ratinoliaztions for JavaScript language encodings, even if UTF-8 or UTF-32 machine encodings are used. Further definitive evidence follows.
"O'Reilly--Speaking JavaScript--An In-Depth Guide for Programmers: Source Code Internally"Internally, JavaScript source code is treated as a sequence of UTF-16 code units. According to Section 6 of the EMCAScript specification:
"EMAC Specification: Section 6"ECMAScript source text is represented as a sequence of characters in the Unicode character encoding, version 3.0 or later. [...] ECMAScript source text is assumed to be a sequence of 16-bit code units for the purposes of this specification. [...] If an actual source text is encoded in a form other than 16-bit code units, it must be processed as if it was first converted to UTF-16.
We faitfully follow section 6 of the EMAC specification to narrown down the meaning of character in JavaScript. At the language level, a code unit and a character both refer to 16-bit logical values of text.
'\u223C'
is a JavaScript encoding of U + 223C
. If you count the number of logical
bits its 4 x 4 = 16. Thus '\u223C'
is a JavaScript character.
'\x0F'
which can be
written as '\u000F'
counts as 16 bits, whence '\x0F'
is a JavaScript character.
'\u{1D566}'
counts as 20 logical bits, whence '\u{1D566}'
is not a JavaScript character.
The table for JavaScript encodings of Unicode numbers is really the same as the table for UTF-16 encodings.
| JavaScript Encodings | ||||
|---|---|---|---|---|
| Low BMP Code Points | [U + 0000, U + D7FF] | Encoded as a single character corresponding to the code point | ||
| Surrogate Code Points | High Surrogates | [U + D800, U + DBFF] |
Encoded as a single character corresponding to the code point |
|
| Low Surrogates | [U + DC00, U + DFFF] | Encoded as a single character corresponding to the code point |
||
| High BMP Code Points | [U + E000, U+FFFF] | Encoded as a single character corresponding to the code point | ||
| Astral Code Points | [U + 10000, U + 10FFFF] | Encoded as a sequence of two characters. The first corresponds to the code point of the hign surrogate. The second corresponds to the codepoint of the low surrogate. |
ECMAScript source text is represented as a sequence of characters in the Unicode character encoding, version 3.0 or later. The text is expected to have been normalised to Unicode Normalization Form C (canonical composition), as described in Unicode Technical Report #15. Conforming ECMAScript implementations are not required to perform any normalisation of text, or behave as though they were performing normalisation of text, themselves. ECMAScript source text is assumed to be a sequence of 16-bit code units for the purposes of this specification. Such a source text may include sequences of 16-bit code units that are not valid UTF-16 character encodings. If an actual source text is encoded in a form other than 16-bit code units it must be processed as if it was first converted to UTF-16.
In UTF-16, only the encoding of stand alone surrogates are ill formed. So the above qoute, with previous discussions, is proof that both Unicode specs and EMAC specs allow ill formed unicode strings in JavaScript.
Source text is what is written in a js file or between script tags. With common HTML editors, it's proably impossible to enter invalid characters. However, one can write content to a script's inner HTML that does contain illegal characters.
HTML encodes code points as (HTML) character references. Character references can be expressed in two or three forms. It doesn't matter how large the code point is.
&#xH;
, where H
is to be substitued
by the hexidecimal digits of the code point.
&#D;
, where D
is to be substitued
by the decimal digits of the code point.
&A;
,
where A
is some alphabetic sequence (name).
Almost all the time, the sole purpose of writing a character reference in HTML or to HTML is to display a glyph or symbol on the web page. ???? How do you write a character reference to HMTL. You can't
give exampleInformation is straight fr0m W3.org and Unicode.org
The numeric character reference forms described above are allowed to reference any Unicode code point other than U+0000, U+000D, permanently undefined Unicode characters (noncharacters), surrogates (U+D800–U+DFFF), and control characters other than space characters.W3.org: Control Characters
The control characters are those whose Unicode "General_Category" property has the value "Cc" in the Unicode UnicodeData.txt data file. (Unicode.org: UnicodeData.text) (Unicode.or Read Data.txt gives some informatoin on how to read UnicodeData.txt )
0x7F
(Delete)
[0x0,0x19]
other than
0x9
(horizontal tab)0xA
(line feed or new line)0xB
(vertical tab)0xC
(form feed)[0x80, 0x9F]
other than
0x85
Keep in mind that there are some double negations, e.g., 0x9
(horizontal tab) is encodable
by HTML. A very good question is why some white spaces such as the vertical tab may be written in HTML,
but has no effect on the display of HTML -- it's exactly like the vertical tab is not written at all.
The experts need to explain that.
0x0
and 0xD
are not individually listed as excluded because they lie in the range
[0x0, 0x19]
of C0 control points. According to UnicodeData.txt 0x7F
is a control character.
Also the space character 0x20
is not a control character. So the space character is not excluded, and
is allowed in HTML. For those that do consider 0x20
as a control character,
its excluded anyway. The same discussion holds for 0x0A
, the non breaking space character.
When I first saw C1 control points being displayed as other characters, it was very perplexing. However, Mouzer found the following reference as explanation. W3 Schools: C1 Controls (Scroll down to C1 Controls).
We already knew what the surrogates and non characters are. Now we know what the control characters other than the space characters are. There is now have enough informaton to allow our HTML editor to vaildate HTML characters if you're the person who is into that type of thing.
There are hundreds of HTML entities that are deemed worthy enough to be given alphabetic names. See
W3: Named Character References
The names listed in the first column of the table must be prefixed with the amepersand character &
to obtain
the corresponding HTML entity.
The sole purpse of the named entity Æ
is to produce the glyph
Æ
. The follwoing example shows how to obtain the decimal and hexidecimal
character codes of Æ
.
Æ
are 198 = 0xC6
.
Æ = &xC6;
.
'\xC6' = '\u00C6' = 'Á'
.
Æ
may be referenced by the Unicode number U + 00C6
.
Æ = Æ = &xC6; = Æ
can be used as HTML markup.
There are named HTML entities that combine exactly two (currently never more than two) Unicode numbers. For example the named
HTML entity ⊵⃒
produces the web symbol
⊵⃒
This web symbol is the concactenation of the glyph ⊵
associated with the Unicode number U + 22B5
,
with the glyph ⃓
associated with the Unicode number U + 20D3
. Thus the named entity
⊵⃒
corresonds to the ordered pair (U + 22B5, U + 20D3)
of Unicode numbers.
One can also obtain the web symbol in unnamed fashion as ⊵⃓
No JavaScript character corresponds to &nvtire;
, but there is a corresponding JavaScript string, namely
'\u22B5\20D3'
.
Writing ⊵⃓
in HTML is the same as writing
⊵
and ⃓
back to back, which is the same as writing the JavaScript characters
'\u22B5'
and '\20D3'
to HTML back to back, which is the same as writing the string
'\u22B5\20D3'
to HTML.
Again, observe how '\u22B5\20D3'
is formatted in excactly the same manner as the characters associated with
surrogate pairs. OK make sure disusions are extant; Read table -two unicode numbers: JavaScript surrogate encodings
mae sure have examples of two code ponts from the table: use the first one
In writing HTML or JavaScript, computeantion of surrogates is completely unnecessary.
Take the code point 0x10437
which lies in the range of code points that can be decomposed into
two surrages, in this case 0xD801
and 0xDC37
.
One can use 𐐷
as is to produce the glyph 𐐷
, surrogates not needed.
Now, while one can use the surrogate pair to obtain the corresponding JavaScript character '\uD801\uDC37'
(this counts as a single character), doing so simply represents a waste of time in computing surrogates since one
can just use '\u{10437}'
as the corresponding JavaScript character.
Suppose we want to read characters from HTML and write them back (somewhere else).
Some characters are really read back as two code points in the ranges
[55296, 56319]
and [56320, 57343]
, each of which alone is completely useless.
These two code points will be surrogate pairs. So for example if the two surrogate pairs are
the code points 55378
and 57186
they must be combined, throgh combineSurrogates,
to produce the single code point 66615
. Then one can use ᧗
to write to back
the original character to HTML.
Now if you want the corresponding JavaScript character, it's just String.fromCodePoint(66615);
Conversions to hexidcimal are more work. Since 66615 = 0x10437
the corresponding JavasCript
character is '\u{10437}'
. Also 55378 = 0xD852
and 57186 = 0xDF62
, so the
corresponding JavaScript character is also '\uD852\uDF62'
.
There is a high degree of duplicty in most rows of the tables. Like whatever! Meouzer don't care!  Besides for beginners, this is a good thing. There are nine anomalies, inidcated by red coloriong, to normal rules that the otherwise duplicitous format of the tables give.
Any of the three equivalent forms of an HTML entity, in the first column, is written in the HTML editor to display the Web page symbol shown in the third column. If there is an editor symbol it displays the same web symbol (itself). To obtain the editor page symbol, merely copy the web page symbol from the table and past it into the editor.
If the web page symbol or editor symbol is some type of space, its cell is colored aqua. Double click on the cell to see the displayed space.
| HTML Entities | Editor | JavaScript Character | Web page |
|---|---|---|---|
| Named/Dec/Hex | Symbol | Hex/Symbolic | Symbol |
| Á = Á = Á | Á | '\C1' = 'Á' | Á |
| á = á = á | á | '\E1' = 'á' | á |
| Â = Â = Â | Â | '\C2' = 'Â' | Â |
| â = â = â | â | '\E2' = 'â' | â |
| ´ = ´ = ´ | ´ | '\B4' = '´' | ´ |
| Æ = Æ = Æ | Æ | '\C6' = 'Æ' | Æ |
| æ = æ = æ | æ | '\E6' = 'æ' | æ |
| À = À = À | À | '\C0' = 'À' | À |
| à = à = à | à | '\E0' = 'à' | à |
| ℵ = ℵ = ℵ | ℵ | '\u2135' = 'ℵ' | ℵ |
| Α = Α = Α | Α | '\u0391' = 'Α' | Α |
| HTML Entities | Editor | JavaScript Character | Web page |
|---|---|---|---|
| Named/Dec/Hex | Symbol | Hex/Symbolic | Symbol |
| α = α = α | α | '\u03B1' = 'α' | α |
| & = & = & | none | '\x26' = '&' | & |
| ∧ = ∧ = ∧ | ∧ | '\u2227' = '∧' | ∧ |
| ∠ = ∠ = ∠ | ∠ | '\u2220' = '∠' | ∠ |
| Å = Å = Å | Å | '\xC5' = 'Å' | Å |
| ≈ = ≈ = ≈ | ≈ | '\u2248' = '≈' | ≈ |
| Ã = Ã = Ã | Ã | '\xC3' = 'Ã' | Ã |
| ã = ã = ã | ã | '\xE3' = 'ã' | ã |
| Ä = Ä = Ä | Ä | '\xC4' = 'Ä' | Ä |
| ä = ä = ä | ä | '\xE4' = 'ä' | ä |
| HTML Entities | Editor | JavaScript Character | Web page |
|---|---|---|---|
| Named/Dec/Hex | Symbol | Hex/Symbolic | Symbol |
| „ = „ = „ | „ | '\u201E' = '„' | „ |
| Β = Β = Β | Β | '\u0392' = 'Β' | Β |
| β = β = β | β | '\u03B2' = 'β' | β |
| ¦ = ¦ = ¦ | ¦ | '\xA6' = '¦' | ¦ |
| • = • = • | • | '\u2022' = '•' | • |
| ∩ = ∩ = ∩ | ∩ | '\u2229' = '∩' | ∩ |
| Ç = Ç = Ç | Ç | '\xC7' = 'Ç' | Ç |
| ¸ = ¸ = ¸ | ¸ | '\xB8' = '¸' | ¸ |
| ¢ = ¢ = ¢ | ¢ | '\xA2' = '¢' | ¢ |
| HTML Entities | Editor | JavaScript Character | Web page |
|---|---|---|---|
| Named/Dec/Hex | Symbol | Hex/Symbolic | Symbol |
| Χ = Χ = Χ | Χ | '\u03A7' = 'Χ' | Χ |
| χ = χ = χ | χ | '\u03C7' = 'χ' | χ |
| ˆ = ˆ = ˆ | ˆ | '\u02C6' = 'ˆ' | ˆ |
| ♣ = ♣ = ♣ | ♣ | '\u2663' = '♣' | ♣ |
| ≅ = ≅ = ≅ | ≅ | '\u2245' = '≅' | ≅ |
| © = © = © | © | '\xA9' = '©' | © |
| ↵ = ↵ = ↵ | ↵ | '\u21B5' = '↵' | ↵ |
| ∪ = ∪= = ∪ | ∪ | '\u222A' = '∪' | ∪ |
| ¤ = ¤ = ¤ | ¤ | '\xA4' = '¤' | ¤ |
| HTML Entities | Editor | JavaScript Character | Web page |
|---|---|---|---|
| Named/Dec/Hex | Symbol | Hex/Symbolic | Symbol |
| ‡ = ‡ = ‡ | ‡ | '\u2021' = '‡' | ‡ |
| † = † = † | † | '\u2020' = '†' | † |
| ⇓ = ⇓ = ⇓ | ⇓ | '\u21D3' = '⇓' | ⇓ |
| ↓ = ↓ = ↓ | ↓ | '\u2193' = '↓' | ↓ |
| ° = ° = ° | ° | '\xB0' = '°' | ° |
| Δ = Δ = Δ | Δ | '\u0394' = 'Δ' | Δ |
| δ = δ = δ | δ | '\u03B4' = 'δ' | δ |
| ♦ = ♦ = ♦ | ♦ | '\u2666' = '♦' | ♦ |
| ÷ = ÷ = ÷ | ÷ | '\xF7' = '÷' | ÷ |
| É = É = É | É | '\xC9' = 'É' | É |
| é = é = é | é | '\xE9' = 'é' | é |
| Ê = Ê = Ê | Ê | '\xCA' = 'Ê' | Ê |
| ê = ê = ê | ê | '\xEA' = 'ê' | ê |
| È = È = Ë | È | '\xC8' = 'È' | È |
| è = è = è | è | '\xE8' = 'è' | è |
| HTML Entities | Editor | JavaScript Character | Web page |
|---|---|---|---|
| Named/Dec/Hex | Symbol | Hex/Symbolic | Symbol |
| ∅ = ∅ = ∅ | ∅ | '\u2205' = '∅' | ∅ |
|   =   =   | '\u2003' = ' ' | ||
|   =   =   | '\u2002' = ' ' | ||
| Ε = Ε = Ε | Ε | '\u0395' = 'Ε' | Ε |
| ε = ε = ε | ε | '\u03B5' = 'ε' | ε |
| ≡ = ≡ = ≡ | ≡ | '\u2261' = '≡' | ≡ |
| Η = Η = Η | Η | '\u0397' = 'Η' | Η |
| η = η = η | η | '\u03B7' = 'η' | η |
| Ð = &#;208 = Ð | Ð | '\xD0' = 'Ð' | Ð |
| ð = ð = ð | ð | '\xF0' = 'ð' | ð |
| Ë = &#;203 = Ë | Ë | '\xCB' = 'Ë' | Ë |
| ë = &#;235 = ë | ë | '\xEB' = 'ë' | ë |
| € = € = € | € | '\u20AC' = '€' | € |
| ∃ = ∃ = ∃ | ∃ | '\u2203' = '∃' | ∃ |
| HTML Entities | Editor | JavaScript Character | Web page |
|---|---|---|---|
| Named/Dec/Hex | Symbol | Hex/Symbolic | Symbol |
| ƒ = ƒ = ƒ | ƒ | '\u0192' = 'ƒ' | ƒ |
| ∀ = ∀ = ∠ | ∀ | '\u2200' = '∀' | ∀ |
| ½ = ½ = ½ | ½ | '\xBD' = '½' | ½ |
| ¼ = &#;188 = ¼ | ¼ | '\xBC' = '¼' | ¼ |
| ¾ = ¾ = ¾ | ¾ | '\xBE' = '¾' | ¾ |
| ⁄ = ⁄ = ⁄ | ⁄ | '\u2044' = '⁄' | ⁄ |
| Γ = Γ = Γ | Γ | '\u0393' = 'Γ' | Γ |
| γ = γ = γ | γ | '\u03B3' = 'γ' | γ |
| ≥ = ≥ = ≥ | ≥ | '\u2265' = '≥' | ≥ |
| > = > = > | none | '\x3E' = '>' | > |
| ⇔ = &#;8660 = ⇔ | ⇔ | '\u21D4' = '⇔' | ⇔ |
| ↔ = ↔ = ↔ | ↔ | '\u2194' = '↔' | ↔ |
| ♥ = ♥ = ♥ | ♥ | '\u2665' = '♥' | ♥ |
| … = … = … | … | '\u2026' = '…' | … |
| HTML Entities | Editor | JavaScript Character | Web page |
|---|---|---|---|
| Named/Dec/Hex | Symbol | Hex/Symbolic | Symbol |
| Í = Í = Í | Í | '\xCD' = 'Í' | Í |
| í = í = í | í | '\xED' = 'í' | í |
| Î = Î = Î | Î | '\xCE' = 'Î' | Î |
| î = î = î | î | '\xEE' = 'î' | î |
| ¡ = ¡ = ¡ | ¡ | '\xA1' = '¡' | ¡ |
| Ì = Ì = Ì | Ì | '\xCC' = 'Ì' | Ì |
| ì = ì = ì | ì | '\xEC' = 'ì' | ì |
| ℑ = ℑ = ℑ | ℑ | '\u2111' = 'ℑ' | ℑ |
| ∞ = ∞ = ∞ | ∞ | '\u221E' = '∞' | ∞ |
| ∫ = ∫ = ∫ | ∫ | '\u222B' = '∫' | ∫ |
| Ι = Ι = Ι | Ι | '\u0399' = 'Ι' | Ι |
| ι = ι = ι | ι | '\u03B9' = 'ι' | ι |
| ¿ = ¿ = ¿ | ¿ | '\xBF' = '¿' | ¿ |
| ∈ = ∈ = ∈ | ∈ | '\u2208' = '∈' | ∈ |
| Ï = Ï = Ï | Ï | '\xCF' = 'Ï' | Ï |
| ï = &#;239 = ï | ï | '\xEF' = 'ï' | ï |
| HTML Entities | Editor | JavaScript Character | Web page |
|---|---|---|---|
| Named/Dec/Hex | Symbol | Hex/Symbolic | Symbol |
| Κ = Κ = Κ | Κ | '\u039A' = 'Κ' | Κ |
| κ = κ = κ | κ | '\u03BA' = 'κ' | κ |
| Λ = Λ = Λ | Λ | '\u039B' = 'Λ' | Λ |
| ⟨ = ⟨ = ⟨ | ⟨ | '\u27E8' = '⟨' | 〈 |
| « = « = « | « | '\xAB' = '«' | « |
| ⇐ = ⇐ = ⇐ | ⇐ | '\u21D0' = '⇐' | ⇐ |
| ← = ← = ← | ← | '\u2190' = '←' | ← |
| ⌈ = ⌈ = ⌈ | ⌈ | '\u2308' = '⌈' | ⌈ |
| “ = “ = “ | “ | '\u201C' = '“' | “ |
| ≤ = ≤ = ≤ | ≤ | '\u2264' = '≤' | ≤ |
| ⌊ = ⌊ = ⌊ | ⌊ | '\u230A' = '⌊' | ⌊ |
| ∗ = ∗ = ∗ | ∗ | '\u2217' = '∗' | ∗ |
| HTML Entities | Editor | JavaScript Character | Web page |
|---|---|---|---|
| Named/Dec/Hex | Symbol | Hex/Symbolic | Symbol |
| ◊ = ◊ = ◊ | ◊ | '\u25CA' = '◊' | ◊ |
|  = &#;8206 =  | none | '\u200E' | none |
| ‹ = ‹ = ‹ | ‹ | '\u2039' = '‹' | ‹ |
| ‘ = ‘ = ‘ | ‘ | '\u2018' = '‘' | ‘ |
| < = < = < | none | '\x3C' = '<' | < |
| ¯ = ¯ = ¯ | ¯ | '\xAF' = '¯' | ¯ |
| — = — = — | — | '\u2014' = '—' | — |
| µ = µ = µ | µ | '\xB5' = 'µ' | µ |
| · = · = · | · | '\xB7' = '·' | · |
| − = − = − | − | '\u2212' = '−' | − |
| Μ = Μ = Μ | Μ | '\u039C' = 'Μ' | Μ |
| μ = μ = μ | μ | '\u03BC' = 'μ' | μ |
| HTML Entities | Editor | JavaScript Character | Web page |
|---|---|---|---|
| Named/Dec/Hex | Symbol | Hex/Symbolic | Symbol |
| ∇ = ∇ = ∇ | ∇ | '\u2207' = '∇' | ∇ |
| =   =   | none | '\x0A' = 'none' | |
| – = – = – | – | '\u2013' = '–' | – |
| ≠ = ≠ = ≠ | ≠ | '\u2260' = '≠' | ≠ |
| ∋ = ∋ = ∋ | ∋ | '\u220B' = '∋' | ∋ |
| ¬ = ¬ = ¬ | ¬ | '\xAC' = '¬' | ¬ |
| ∉ = ∉ = ∉ | ∉ | '\u2209' = '∉' | ∉ |
| ⊄ = ⊄ = ⊄ | ⊄' | '\u2284' = '⊄' | ⊄ |
| Ñ = Ñ = Ñ | Ñ | '\xD1' = 'Ñ' | Ñ |
| ñ = ñ = ñ | ñ | '\xF1' = 'ñ' | ñ |
| Ν = Ν = Ν | Ν | '\u039D' = 'Ν' | Ν |
| ν = ν = ν | ν | '\u03BD' = 'ν' | ν |
| Ó = Ó = Ó | Ó | '\xD3' = 'Ó' | Ó |
| ó = ó = ó | ó | '\xF3' = 'ó' | ó |
| Ô = Ô = Ô | Ô | '\xD4' = 'Ô' | Ô |
| ô = ô = ô | ô | '\xF4' = 'ô' | ô |
| Œ = Œ = Œ | Œ | '\u0152' = 'Œ' | Œ |
| œ = œ = œ | œ | '\u0153' = 'œ' | œ |
| HTML Entities | Editor | JavaScript Character | Web page |
|---|---|---|---|
| Named/Dec/Hex | Symbol | Hex/Symbolic | Symbol |
| Ò = Ò = Ò | Ò | '\xD2' = 'Ò' | Ò |
| ò = ò = ò | ò | '\xF2' = 'ò' | ò |
| ‾ = ‾ = ‾ | ‾ | '\u203E' = '‾' | ‾ |
| Ω = Ω = Ω | Ω | '\u03A9' = 'Ω' | Ω |
| ω = ω = ω | ω | '\u03C9' = 'ω' | ω |
| Ο = Ο = Ο | Ο | '\u039F' = 'Ο' | Ο |
| ο = ο = ο | ο | '\u03BF' = 'ο' | ο |
| ⊕ = ⊕ = ⊕ | ⊕ | '\u2295' = '⊕' | ⊕ |
| ∨ = ∨ = ∨ | ∨ | '\u2228' = '∨' | ∨ |
| ª = ª = ª | ª | '\xAA' = 'ª' | ª |
| º = º = º | º | '\xBA' = 'º' | º |
| Ø = Ø = Û | Ø | '\xD8' = 'Ø' | Ø |
| ø = ø = ø | ø | '\xF8' = 'ø' | ø |
| Õ = Õ = Õ | Õ | '\xD5' = 'Õ' | Õ |
| õ = õ = õ | õ | '\xF5' = 'õ' | õ |
| ⊗ = ⊗ = 圙 | ⊗ | '\u2297' = '⊗' | ⊗ |
| Ö = Ö = Ö | Ö | '\xD6' = 'Ö' | Ö |
| ö = ö = ö | ö | '\xF6' = 'ö' | ö |
| HTML Entities | Editor | JavaScript Character | Web page |
|---|---|---|---|
| Named/Dec/Hex | Symbol | Hex/Symbolic | Symbol |
| ¶ = ¶ = ¶ | ¶ | '\xB6' = '¶' | ¶ |
| ∂ = ∂ = ∂ | ∂ | '\u2202' = '∂' | ∂ |
| ‰ = ‰ = ߮ | ‰ | '\u2030' = '‰' | ‰ |
| ⊥ = ⊥ = ⊥ | ⊥ | '\u22A5' = '⊥' | ⊥ |
| Φ = Φ = Φ | Φ | '\u03A6' = 'Φ' | Φ |
| φ = φ = φ | φ | '\u03C6' = 'φ' | φ |
| Π = Π = Π | Π | '\u03A0' = 'Π' | Π |
| π = π = π | π | '\u03C0' = 'π' | π |
| ϖ = ϖ = ϖ | ϖ | '\u03D6' = 'ϖ' | ϖ |
| ± = ± = ± | ± | '\xB1' = '±' | ± |
| £ = £ = £ | £ | '\xA3' = '£' | £ |
| ″ = ″ = ″ | ″ | '\u2033' = '″' | ″ |
| ′ = ′ = ′ | ′ | '\u2032' = '′' | ′ |
| ∏ = ∏ = ∏ | ∏ | '\u220F' = '∏' | ∏ |
| ∝ = ∝ = ∝ | ∝ | '\u221D' = '∝' | ∝ |
| Ψ = Ψ = Ψ | Ψ | '\u03A8' = 'Ψ' | Ψ |
| ψ = ψ = ψ | ψ | '\u03C8' = 'ψ' | ψ |
| HTML Entities | Editor | JavaScript Character | Web page |
|---|---|---|---|
| Named/Dec/Hex | Symbol | Hex/Symbolic | Symbol |
| " = " = " | " | '\x22' = '"' | " |
| √ = √ = ÝA; | √ | '\u221A' = '√' | √ |
| ⟩ = ⟩ = ⟩ | ⟩ | '\u27E9' = '⟩' | 〉 |
| » = » = » | » | '\xBB' = '»' | » |
| ⇒ = ⇒ = ⇒ | ⇒ | '\u21D2' = '⇒' | ⇒ |
| → = → = → | → | '\u2192' = '→' | → |
| ⌉ = ⌉ = ⌉ | ⌉ | '\u2309' = '⌉' | ⌉ |
| ” = ” = ” | ” | '\u201D' = '”' | ” |
| ℜ = ℜ = ℜ | ℜ | '\u211C' = 'ℜ' | ℜ |
| ® = ® = ® | ® | '\xAE' = '®' | ® |
| ⌋ = ⌋ = ⌋ | ⌋ | '\u230B' = '⌋' | ⌋ |
| Ρ = Ρ = Ρ | Ρ | '\u03A1' = 'Ρ' | Ρ |
| ρ = ρ = ρ | ρ | '\u03C1' = 'ρ' | ρ |
|  =  =  | none | '\200F' = 'none' | none |
| › = › = › | › | '\u203A' = '›' | › |
| ’ = ’ = ’ | ’ | '\u2019' = '’' | ’ |
| HTML Entities | Editor | JavaScript Character | Web page |
|---|---|---|---|
| Named/Dec/Hex | Symbol | Hex/Symbolic | Symbol |
| ‚ = ‚ = ‚ | ‚ | '\u201A' = '‚' | ‚ |
| Š = Š = Š | Š | '\u0160' = 'Š' | Š |
| š = š = š | š | '\u0161' = 'š' | š |
| ⋅ = ⋅ = ⋅ | ⋅ | '\u22C5' = '⋅' | ⋅ |
| § = § = § | § | '\xA7' = '§' | § |
|  =  =  | none | '\AD' = 'none' | none |
| Σ = Σ = A; | Σ | '\u03A3' = 'Σ' | Σ |
| σ = σ = σ | σ | '\u03C3' = 'σ' | σ |
| ς = ς = ς | ς | '\u03C2' = 'ς' | ς |
| ∼ = ∼ = ∼ | ∼ | '\u223C' = '∼' | ∼ |
| ♠ = ♠ = ♠ | ♠ | '\u2660' = '♠' | ♠ |
| ⊂ = ⊂ = ⊂ | ⊂ | '\u2282' = '⊂' | ⊂ |
| ⊆ = ⊆ = ⊆ | ⊆ | '\u2286' = '⊆' | ⊆ |
| ∑ = ∑ = ∑ | ∑ | '\u2211' = '∑' | ∑ |
| ¹ = ¹ = ¹ | ¹ | '\xB9' = '¹' | ¹ |
| ² = ² = ² | ² | '\xB2' = '²' | ² |
| HTML Entities | Editor | JavaScript Character | Web page |
|---|---|---|---|
| Named/Dec/Hex | Symbol | Hex/Symbolic | Symbol |
| ³ = ³ = ³ | ³ | '\xB3' = '³' | ³ |
| ⊃ = ⊃ = ⊃ | ⊃ | '\u2283' = '⊃' | ⊃ |
| ⊇ = ⊇ = ⊇ | ⊇ | '\u2287' = '⊇' | ⊇ |
| ß = ß = ß | ß | '\xDF' = 'ß' | ß |
| Τ = Τ = Τ | Τ | '\u03A4' = 'Τ' | Τ |
| τ = τ = τ | τ | '\u03C4' = 'τ' | τ |
| ∴ = ∴ = ∴ | ∴ | '\u2234' = '∴' | ∴ |
| Θ = Θ = Θ | Θ | '\u0398' = 'Θ' | Θ |
| θ = θ = θ | θ | '\u03B8' = 'θ' | θ |
| ϑ = ϑ = ϑ | ϑ | '\u03D1' = 'ϑ' | ϑ |
|   =   =   | '\u2009' = ' ' | ||
| Þ = Þ = Þ | Þ | '\xDE' = 'Þ' | Þ |
| þ = þ = þ | þ | '\xFE' = 'þ' | þ |
| ˜ = ˜ = ˜ | ˜ | '\u02DC' = '˜' | ˜ |
| × = × = × | × | '\xD7' = '×' | × |
| ™ = ™ = ™ | ™ | '\u2122' = '™' | ™ |
| HTML Entities | Editor | JavaScript Character | Web page |
|---|---|---|---|
| Named/Dec/Hex | Symbol | Hex/Symbolic | Symbol |
| Ú = Ú = Ú | Ú | '\xDA' = 'Ú' | Ú |
| ú = ú = ú | ú | '\xFA' = 'ú' | ú |
| ⇑ = ⇑ = ⇑ | ⇑ | '\u21D1' = '⇑' | ⇑ |
| ↑ = ↑ = ↑ | ↑ | '\u2191' = '↑' | ↑ |
| Û = Û = Û | Û | '\xDB' = 'Û' | Û |
| û = û = û | û | '\xFB' = 'û' | û |
| Ù = Ù = Ù | Ù | '\xD9' = 'Ù' | Ù |
| ù = ù = ù | ù | '\xF9' = 'ù' | ù |
| ¨ = ¨ = ¨ | ¨ | '\xA8' = '¨' | ¨ |
| ϒ = ϒ = ϒ | ϒ | '\u03D2' = 'ϒ' | ϒ |
| Υ = Υ = Υ | Υ | '\u03A5' = 'Υ' | Υ |
| Ü = Ü = Ü | Ü | '\xDC' = 'Ü' | Ü |
| ü = ü = ü | ü | '\xFC' = 'ü' | ü |
| ℘ = ℘ = ℘ | ℘ | '\u2118' = '℘' | ℘ |
| HTML Entities | Editor | JavaScript Character | Web page |
|---|---|---|---|
| Named/Dec/Hex | Symbol | Hex/Symbolic | Symbol |
| Ξ = Ξ = Ξ | Ξ | '\u039E' = 'Ξ' | Ξ |
| ξ = ξ = ξ | ξ | '\u03BE' = 'ξ' | ξ |
| Ý = Ý = Ý | Ý | '\xDD' = 'Ý' | Ý |
| ý = ý = ý | ý | '\xFD' = 'ý' | ý |
| ¥ = ¥ = ¥ | ¥ | '\xA5' = '¥' | ¥ |
| Ÿ = Ÿ = Ÿ | Ÿ | '\u0178' = 'Ÿ' | Ÿ |
| ÿ = ÿ = ÿ | ÿ | '\xFF' = 'ÿ' | ÿ |
| Ζ = Ζ = Ζ | Ζ | '\u0396' = 'Ζ' | Ζ |
| ζ = ζ = ζ | ζ | '\u03B6' = 'ζ' | ζ |
|  =  =  | none | '\u200D' = 'none' | none |
|  =  =  | none | '\u200C' = 'none' | none |
<
, >
, and &
and
<
and '\x3C'
are the hexidecimal entity and JavaScript character for <
,
<div> < </div>
and read back the innerHTM you
get the named entity string "<"
, of four charachters, and not the single character
'<' or '\x3C'
.
div.innerHTML = '\x3C'
, then when reading back the innerHTML you would expect the
inner HTML to be the single character '\x3C'
, but again what you get is <
, a
string of four characters.
The moral of the story is that if you map <
, >
, &
and
,
their equivalent decimal or hexidecimal entities, or their equivalent JavaSript characters '\x3C',
'\x3E',
'\x26',
and '\x0A'
to HTML, you get the named entities as strings, not the single JavaScript characters.
does produce a web symbol, which is a thin amount of white space.
However, it does more. It with its adjoining characters on its left and right will not be broken across lines in the
web page.
The non breaking space has no editor symbol, i.e., there is no symbol that you can write in the editor to
produce the non breaking space on the web page . If you copy the non breaking space's web symbol, then it is pasted into the editor
as the normal space '\x20'
obtained by striking the space bar. However, if you paste the web symbol
into a content editable div you do get the non breaking space
.
Also if you press the space bar inside a content editable div, it becomes the non breaking space
in the source code.

The following characters.
'\x0A' = = 'u000A' = '\n'
(new line obtained by striking the enter key)
'\x09' = '\u0009' = '\t'
(horizontal tab obtained by striking the tab key)
'\x20' = '\u0020'
(normal space character obtained by striking the space bar)
There is one exception. White space occurring inside a tag may or may not show up in the outerHTML depending upon the browser.
Thus one may parse an HTMLElement's outer HTML and write new HTML by substituting different characters for these white spaces. This is an important key in the author's JSHTML, which is bacically an editor for displaying JavaScript in HTML.
Writing the En space
entity in the editor shows up as the character '\x2002'
in outerHTML, which is displayed as a space. Likwise copy and pastiong the En space web symbol into the
editor has the same effect. The same discussion holds for the for the Em space   = '\x2003'
and the thin space   = '\u2009'
.
The <
symbol inside the editor is reserved for the start of tags. If you used this character outside this scenario,
parsing the HTML, even if possible, would be a nightmare to determine whether <
stands for a start tag or the less than symbol.
Thus if not used as the start of a tag, the less than symbol must be escaped. <
is used for this
purpose and produces the less than symbol on the web page.
Like wise in the editor the >
symbol is used to terminate tagd and so must be escaped
as >
to produce the greater than symbol on the web page.
Since the &
character is used in the editor for writing HTML entities such as Á
,
parsing is possible but very inefficient to also use &
to display &
on the web page.
Thus &
is escaped as &
to efficiently display &
on the web page.
The author has a two way HTML Editor written in HTML/JavaScript (A one way editor is simpler). A content editable pre element is used as the HTML editor, while an content editable div is used as the "web page". Changes to the source HTML in the pre are updated to the div web page. Conversely changes to the div web page are updated to the pre HTML editor. Since En, Em and thin spaces pasted into the the web page can display as white space characters in the editor, when the web page is parsed to obtain editor code, HTML entities can be substituted for the white spaces. This means readabiltiy, for otherwise there's no way to know how the spaces were obtained.
Believe it or not, we now know everything to write HTML editors in HTML.
STILL UNDER CONSTRUCTION
I'ts fun and easy to exchange secret messages with your friends using your new UTF-8 decoder rings. Hiding important activiities parents has never been simpler. All you need is a PhD in mathematics, which as item #UTF8-LQeX is sold in four easy payments of $30.00 per month.
M[a,b]
is the mask consisting of (b - a + 1)
binary digits in positions a to b
.
a
will start at 1, not 0.
M[a,b] = M[1, 1+b-a] ⋅ 2a-1 = (21+b-a -1) ⋅ 2a-1
c
if we move some its hghter bits to the left, and possibly some even higher bits to the
left so that there is no overlap we get a number e
, and there will be a formula mapping e
back to c
.
This actually easy. An example follows.
c → e
e = c & M [0,5] + ((c & M [6,10]) << 3)
has inverse map
c ← e
c = e & M [0,5] + ((e & M [9,13]) >> 3)
e
is an encoding of c
. Now c
and e
determine each othe by the inverse formulas.
Now we are going to encode numbers c
in the range [0x0, 0x10FFFF] via the UTF-8 encoding form to numbers e
.
The background information is found at Widipedia: UTF Description
c ∈ [0x0, 0x7F]
c → e
e = c
has inverse map
e ∈ [0x0, 0x7F]
e ← c
c = e
c ∈ [0x80, 0x7FF]
c → e
e = c & M [1,6] + ((c & M [7,11]) << 2) + 0xC080
has inverse map
c ← e
c = (e - 0xC080) & M [1,6] + (((e - 0xC080) & M [9,13] ) >> 2)
c ∈ [0x800, 0xFFFF]
c → e
e = c & M [1,6] + ((c & M [7,12]) << 2)
+ ((c & M [13,16]) << 4) + 0xE08080
has inverse map e
e ∈ [0xE0A080, 0xEFBFBF]
c ← e
c = (e - 0xE08080) & M [1,6] + (((e - ExD08080) & M [9,14]) >> 2)
+ (((e - 0xE08080) & M [17,20]) >> 4)
c ∈ [0x10000, 0x10FFFF]
c → e
e = c & M [1,6] + ((c & M [7,12]) << 2)
+ ((c & M [13,18]) << 4)
+ ((c & M [19,21]) << 6))
+ 0xE0808080
has inverse map
e ∈ [0xE0908080, 0xE48FBFBF]
c ← e
c = (e - 0xE0808080) & M [1,6] + (((e - 0xE0808080) & M [9,14]) >> 2)
+ (((e - 0xE0808080) & M [17,22]) >> 4) + (((e - 0xE0808080) & M [25,27]) >> 6)


Here at Luigi's we believe in building your own pizza. This allows your inner creativity to flow into a delicious circle of gooeyness. To get started click the pizza icon below and you will be on your way to flavor town!
Luigi's prides itself on providing pizza from sustainable ingredients, we only use the best of the best! Started in 1971, Luigi's has quickly become the hot spot in Portland, Oregon's pizza connoisseur's. If you don't believe it try it for yourself!
Our hours are 12 P.M. - 10 P.M. and are currently pick-up only.
Each topping is an extra $1.50.
The total for one pizza is $ with the following toppings:


---
layout: post
title: Firefox OS using Utility Components for Appmaker Part 2
date: 2014-07-27 12:01:00.000000000 +05:30
type: post
published: true
status: publish
categories:
- Firefox
- Firefox OS
- Firefox OS Apps
- Firefox OS Tutorials
tags: []
meta:
blogger_blog: www.technoruler.com
blogger_author: VISWAPRASATH KS
blogger_cb097c283b9bbfde97b4822e7250157d_permalink: '3174874876647085779'
author:
login: viswaprasath
email<EMAIL_ADDRESS>display_name: Vitchu
first_name: ''
last_name: ''
---
In our previous
blog post we have developed a App using Appmaker to show that Doing good is part of Mozillians. Before that we had a small introduction about
Utility Components now we can see some other Utility components which we have missed. Previously we have missed
- Metronome
- Double Button
- Spacer
- Button
Any how we will be using some of the previously used components. Kindly read previous two post to know more about Utility bricks.
The first part of the application is Always header for us. Followed by that only we will use different things.
After header since we need more space we have used Spacer. We can easily increase the height of the space.
The we have place Metronome. We can give upto 5 different inputs for this. The different inputs are Start ticking, stop ticking, Set Autostart, Set button increment, Set Beats Per Minute (BPM). In our application except BPM we will be using everything.
Followed by that we have Double Button. We can get two different output from this. Here we will not get any pop-up. And also we can't pass any value. Only it is used to pass the action.
Below that is a Button which has the ability to send only one value when it is clicked.
Finally have used Text to tell what the application will be doing, and it will also have how to use it.
How the applications works
First we will be clicking the Button, we have used its output as one of the input of Metronome. We have used it to start Metronome automatically and also for setting the increment as 100.
So Metronome start. We can stop the Metronome by click the Stop button which is one of the button in Double Button, if we want to start again we can click Start button.
Previous blog post we have seen what are the different components or bricks in Utility. The Utility components are awesome to build large number of interesting Firefox OS applications. - See more at: http://technoruler.blogspot.in/2014/07/firefox-os-using-utility-components-for.html#sthash.kEYlXOaY.dpuf
Previous blog post we have seen what are the different components or bricks in Utility. The Utility components are awesome to build large number of interesting Firefox OS applications. - See more at: http://technoruler.blogspot.in/2014/07/firefox-os-using-utility-components-for.html#sthash.kEYlXOaY.dpuf
Previous blog post we have seen what are the different components or bricks in Utility. The Utility components are awesome to build large number of interesting Firefox OS applications. - See more at: http://technoruler.blogspot.in/2014/07/firefox-os-using-utility-components-for.html#sthash.kEYlXOaY.dpuf
Previous blog post we have seen what are the different components or bricks in Utility. The Utility components are awesome to build large number of interesting Firefox OS applications. - See more at: http://technoruler.blogspot.in/2014/07/firefox-os-using-utility-components-for.html#sthash.kEYlXOaY.dpuf
Previous blog post we have seen what are the different components or bricks in Utility. The Utility components are awesome to build large number of interesting Firefox OS applications. - See more at: http://technoruler.blogspot.in/2014/07/firefox-os-using-utility-components-for.html#sthash.kEYlXOaY.dpuf


Video content server
Navigation
Convert to MPEG-DASH
Play uploaded MPEG-DASH content
Play regular MP4 content
Upload file and convert it to MPEG-DASH format
File
Submit
Created file folder: {{ createdFileFolder }}
Created mpd name: {{ createdMpdName }}
Current status: {{ is_uploaded }}
Play uploaded MPEG-DASH content
File folder
Mpd file
Play
00:00:00
00:00:00
Play regular MP4 video from classpath


+
Click on the image to change
A name is required
An age is required
A phone number is required
Email not valid


--- layout: post permalink: bravina.html Tags: Array NameOfCoupon: Bravina Cash Back Summary: See our Bravina Coupon Code, Bravina Rebate, Bravina Promo Code, Bravina Discount, Bravina Coupon Cash Back Rebate here. MetaKeywords: Bravina Coupon Code, Bravina Rebate, Bravina Promo Code, Bravina Cash Back Rebate, Bravina Discount, Bravina Coupon Image: images/25487.jpg LinkURL: http://www.shareasale.com/r.cfm?b=209430&u=412002&m=25487 affiliate_url_link: http://www.icouponblog.com/jane.php?id=245 thesis_readmore: See the Bravina Coupon thesis_thumb: http://www.icouponblog.com/tn.php?merchantURL=bravina.com Title: Save 20% - Bravina Coupon Code for bravina.com. Bravina Rebate & Discount thesis_description: Our Bravina Discount Coupon Code for bravina.com. We have the best Bravina Rebate anywhere. thesis_keywords: Bravina, Bravina Coupon Code, Bravina Discount, Bravina Rebate product_name: Bravina hop_url: http://www.icouponblog.com/hop.php?id=245 ---
Do you get stage fright? Are you scared of public speaking? Don't worry you are not alone. Even famous celebrities feel anxious when speaking up on the podium. But Deephaven Nutraceuticals Bravina will make you brave. It will help you conquer the fear of public speaking. Bravina is a totally safe product. It is made of all natural supplements and is specifically designed for overcoming the number one phobia in the world...Public speaking! Get 20% discount with our discount coupon on Bravina.
You no longer have to use old, outdated tactics like imagining people in their undergarments to overcome the fear of public speaking. Bravina has nine natural ingredients which promotes relaxation and concentration. Bravina has no side effects. Bravina is highly effective in helping speakers overcome the anxiety that breaks up the voice and makes a person stutter.  Our 20% discount on Bravina, will make the deal sweeter!
Bravina is a product that works. Countless speakers, musicians, interviewers have used Bravina successfully to overcome their anxiety and fear of public speaking. Bravina will give you confidence, help your career, will help you speak and concentrate better. You will only gain from Bravina….The only thing you will lose is your fear of public speaking. Get Bravina today and use our discount coupon now.


Frequently Asked Questions¶
Does X library do the same thing?¶
See Prior Work.
In particular, does the library in question know to invalidate when your source
code changes? What if foo()
calls bar()
, foo()
is cached, and
bar()
changes?
Just use a workflow manager¶
Workflow managers help when you need to get a fresh copy of the results, but they have a blind spot. lot of engineers practice iterative development where small changes are common. Do you have to rerun a long-running task if one line changes?
The better answer is: Use both. Workflow managers decide whether or not to run
your program. If they decide to run your program, charmonium.cache
will
speed that up.
Does this work on instance methods?¶
Yes.
>>> from charmonium.cache import memoize
>>> class Class:
... def __init__(self, y):
... self.y = y
... @memoize()
... def foo(self, x):
... print("Recomputing")
... return x + self.y
...
>>> obj = Class(3)
>>> obj.foo(4)
Recomputing
7
>>> obj.foo(4)
7
>>> obj.y = 5
>>> obj.foo(4)
Recomputing
9
Just make sure to put the @classmethod
and @staticmethod
above the @memoize()
, as usual.
Does the cache detect changing something by inheritance?¶
Yes.
class A:
def foo(self):
return 1
class B(A):
pass
@memoize()
def do_foo(obj):
return obj.foo()
print(do_foo(B())) # prints 1
...
class A:
def foo(self):
return 2
...
print(do_foo(B())) # prints 2
This works because the library does not use the default language hash
. It uses
a comprehensive charmonium.freeze
, which takes into account the methods
attached to an object. Likewise, the cache will detect adding the method in the
child class.
...
class B(A):
def foo(self):
return 3
...
print(do_foo(B())) # prints 3
Does the cache know about global variables?¶
Yes.
>>> from charmonium.cache import memoize
>>> i = 0
>>> @memoize()
... def square(x):
... return x**2 + i
...
>>> print(square(4))
16
>>> i = 1
>>> print(square(4))
17
charmonium.freeze
knows how to find the closure of the function square
, which
includes the global variables it refernces.
Does the cache know about reflection?¶
The cache is safe with respect to getattr
reflection. This is because
charmonium.freeze
hashes all of the attributes.
>>> from charmonium.cache import memoize
>>> @memoize()
... def get_x(obj):
... return getattr(obj, "x")
...
>>> class Struct:
... pass
>>> obj = Struct()
>>> obj.x = 4
>>> get_x(obj)
4
>>> obj.x = 5
>>> get_x(obj)
5
However, the cache doesn’t know about purely string-based reflection, like
globals()["variable"]
. This is a useful escape hatch when you want the cache
to ignore something.
>>> from charmonium.cache import memoize
>>> @memoize()
... def get_x():
... return globals()["x"]
...
>>> x = 4
>>> get_x()
4
>>> x = 5
>>> get_x() # we get a stale result
4
How does the cache know about source-code changes in a C library?¶
It doesn’t. That is one of the shortcomings. However, in practice this is probably ok. Most C libraries are not going to be changing frequently (projects that use Numpy rarely change Numpy).
What about impure functions?¶
The library does its best to detect language-level impurities: that is,
modifying global variables. However, there exist environmental impurities:
open(file).read()
will be non-deterministic if the underlying file
changes. This library has a much harder time detecting this, but it should be
fairly obvious to the user when they write a non-deterministic function. Don’t
cache those.
What about reading the filesystem or network?¶
Unfortunately, this library can’t tell if your function reads the filesystem or network to get its result. If you still want to cache this function, see Capturing Filesystem Side-Effects.
I’m working on a way of detecting this kind of impurity and warning the user, so they don’t get blindsided by stale results.
What about random number generators?¶
The RNG state for builtin random
and most other random number generators is
stored in a module-level global variable, which means the cache will know to
re-call the function.
>>> from charmonium.cache import memoize
>>> from random import randint, seed; seed(1)
>>> @memoize()
... def foo():
... return randint(0, 10)
...
>>> foo()
4
>>> foo()
1
I’m still not convinced this is safe for my particular use-case.¶
If you suspect the cache is returning stale results, you can disable it globally
with export CHARMONIUM_CACHE_DISABLE=1
. This makes it easy to tell if this
library is causing your problem.
This library is not invalidating when it should or invalidating when it shouldn’t.¶
You’ve found a bug. See Debugging if you want to debug this yourself. Please file it on GitHub, so I know about it.
Isn’t Pickle insecure?¶
This library is un/pickling data that one of your dependent packages wrote. If that dependent package was malicious, it could already execute arbitrary code on your machine when you included it in your project. Using this library does not increase your attack surface. Always vet your dependencies.


--- layout: page extra_class: fullscreen title: Jekyll Themes and Templates heading: Templates permalink: /templates/ ---
Free Jekyll themes and templates to get you started on your next project


throw
finally
While occasionally intended, such throw statements may mask exceptions thrown and tremendously complicate debugging.


Done


Sure, you can get a salad anywhere, but what fun is that? Vegans should be able to enjoy hearty, satisfying dining experiences too. Type in your desired location below to find vegan food options in that area!
There are many different reasons people choose to lead a vegan lifestyle. Go to the
ABOUT VEGANISM
page for a little bit of the history, and reasoning behind veganism.


{{ .Title }}
By {{ .Params.Author }}
Posted {{ .Date.Format "January 2, 2006" }}
{{ define "sidebar" }}
{{ end }} {{ define "main" }}This website has multiple purposes. The first is to present articles about projects I'm working on or trending topics in the computer field. The second purpose--and the more ambitious one--is to organize my notes from studying various technologies, such as the Go language, Spring Boot, and Angular.
I think I'm like many computer professionals in that I get carried away by new technologies as they come along. I'll read the book, take a course, learn a great deal, make notes on my computer. Time goes by, and I gradually forget what I struggled so hard to learn. If only I had some way of maintaining what I learned, I'd feel more of a sense of mastering new skills.
I don't think there is enough on the web about how to take good notes. My goal with this website is to develop effective ways of maintaining technical notes and to share what I learn.
By {{ .Params.Author }}
Posted {{ .Date.Format "January 2, 2006" }}


Reproduce figure 2.2 from GP book
setSeed(0);
L = 1;
xs = (-5:0.2:5)';
ns = length(xs);
keps = 1e-8;
muFn = @(x) 0*x(:).^2;
Kfn = @(x,z) 1*exp(-sq_dist(x'/L,z'/L)/2);
figure; hold on
for i=1:3
model = struct('mu', muFn(xs), 'Sigma', Kfn(xs, xs) + 1e-15*eye(size(xs, 1)));
fs = gaussSample(model, 1);
plot(xs, fs, 'k-', 'linewidth', 2)
end
printPmtkFigure('gprDemoNoiseFreePrior')
Xtrain = [-4, -3, -2, -1, 1]';
ftrain = sin(Xtrain);
K = Kfn(Xtrain, Xtrain);
Ks = Kfn(Xtrain, xs);
Kss = Kfn(xs, xs) + keps*eye(length(xs));
Ki = inv(K);
postMu = muFn(xs) + Ks'*Ki*(ftrain - muFn(Xtrain));
postCov = Kss - Ks'*Ki*Ks;
figure; hold on
mu = postMu(:);
S2 = diag(postCov);
f = [mu+2*sqrt(S2);flipdim(mu-2*sqrt(S2),1)];
fill([xs; flipdim(xs,1)], f, [7 7 7]/8, 'EdgeColor', [7 7 7]/8);
for i=1:3
model = struct('mu', postMu(:)', 'Sigma', postCov);
fs = gaussSample(model, 1);
plot(xs, fs, 'k-', 'linewidth', 2)
h=plot(Xtrain, ftrain, 'kx', 'markersize', 12, 'linewidth', 3);
end
printPmtkFigure('gprDemoNoiseFreePost')