hunspell tag with missing characters and not ordered correctly - hunspell

As per the official documentation the TRY parameter can look something like this...
TRY esianrtolcdugmphbyfvkwzESIANRTOLCDUGMPHBYFVKWZ'
In this example - j, q and x capital and small letters (jqx JQX) are missing.
Is there any specific reason that the 3 characters were not included in the list? Instead of writing a, b, c, d the list starts with e, s, i. Is there any reason behind the ordering?

Related

unfamiliar html/react tag row- , col-

I was browsing through the source code of a moderately popular repo, and not sure what are the following tags.
see https://github.com/pusher/react-slack-clone/blob/master/src/index.js#L243
<row->
<col->
....
</col->
</row->
why - after the html tags? and how is it an acceptable tag?
They are custom elements. In regards to the tag's validity, you may have noticed that it is not defined anywhere in the code. As per step 5 of the spec, it is valid, and has a namespace of Element.
For a higher-level overview of custom elements, take a look at the MDN tutorial on using custom elements.
An additional note: These tags could be replaced by regular <div> tags with classes, and the functionality would be no different.
This is most likely an error in the source code which has gone unnoticed (possibly by using search & replace?). React accepts element names which end on a - character and it gets rendered to the DOM via document.createElement() as any other element (for a simple example see here: https://jsfiddle.net/nso3gjpw/ ). Since browsers are very forgiving in case of weird html, it just renders the element as an unknown custom element which behaves roughly like a span element. The row- and col- elements are also styled (https://github.com/pusher/react-slack-clone/blob/master/src/index.css#L73).
In the Blink rendering engine source code the following definition for tag names is given (https://www.w3.org/TR/REC-xml/#NT-CombiningChar):
// DOM Level 2 says (letters added):
//
// a) Name start characters must have one of the categories Ll, Lu, Lo, Lt, Nl.
// b) Name characters other than Name-start characters must have one of the categories Mc, Me, Mn, Lm, or Nd.
// c) Characters in the compatibility area (i.e. with character code greater than #xF900 and less than #xFFFE) are not allowed in XML names.
// d) Characters which have a font or compatibility decomposition (i.e. those with a "compatibility formatting tag" in field 5 of the database -- marked by field 5 beginning with a "<") are not allowed.
// e) The following characters are treated as name-start characters rather than name characters, because the property file classifies them as Alphabetic: [#x02BB-#x02C1], #x0559, #x06E5, #x06E6.
// f) Characters #x20DD-#x20E0 are excluded (in accordance with Unicode, section 5.14).
// g) Character #x00B7 is classified as an extender, because the property list so identifies it.
// h) Character #x0387 is added as a name character, because #x00B7 is its canonical equivalent.
// i) Characters ':' and '_' are allowed as name-start characters.
// j) Characters '-' and '.' are allowed as name characters.
//
// It also contains complete tables. If we decide it's better, we could include those instead of the following code.
Especially important here is rule j) Characters '-' and '.' are allowed as name characters.

Need a regex for matching one of multiple classes

I'm upgrading all my websites and have redesigned them so that all the URL's default to lower case, which forced me to also change all my image names and paths to lower case. The regexes I used did the job. Unfortunately, they changed a lot of other things to lower case as well.
For example, this is what a typical div looked like before:
<div class="Cool R P Wx500">
And this is what SOME of them look like now:
<div class="cool r p wx500">
I emphasized SOME, because some div's (and other tags) were changed and others weren't.
So I'd like to find a regex that will help me search for a particular class - e.g. Cool, R or Wx500. It's a little tricky because 1) my classes aren't always listed in a particular order, and some class names consist of a single letter (e.g. B = border and R = float to the right).
So I guess what I'd like to be able to do is search for div's that include the class "Cool," then search for div's that include the class "R." It would also be helpful if I could make my searches case sensitive. For example, I might need to search for div's with the class R - but only in cases where it was changed to lower case (e.g. [div class="cool r"]
Can that be done? Dreamweaver has a pretty good regular expression utility, but it can't pick one class out of a series, as far as I know. I'm working on a Mac, and Dreamweaver and TextWrangler are my primary text editors.
You can use the following
(class=".*?\b)r(\b.*?")
Instead of r use the class that you want to search for and replace with $1new$2 where new is the new class name that you want.
Explanation:
.*? non-greedy match any character.
\b match word boundary (" counts as a boundary).
() group, the first part will be in group 1 ($1), the second part in group 2 ($2)
For example the following will be matched:
<div class="r">
<div class="r cool p wx500">
<div class="cool r p wx500">
<div class="cool c wx300 r">
But the following will not be matched:
<div class="runcool c wx300">
<div class="uncool cr wrx300">
<div class="uncool c wx300r">
<div class="R">
If Dreamweaver doesn't support lookarounds (I don't have a copy to test with), you should also be able to use this:
using cool as an example class
Find (<div ([^>]+ )?class="([^"]+ )?)cool( |")
Replace with $1Cool$4
Since $1/$4 means "everything matched by the first/fourth subexpression in parentheses".

First letter is capital letter

Help, please, I'm programming in google Script and I'm not getting to do the following: Leave the first capital letter, eg.
Only got together words using
var pagename = projectname.replace (/ \ s / g,'');
When pagename to get "my first project", it's got, myfirstproject, but I'd like that first letter is capital letter, that is, "Myfirstprocect with the letter m in capital letter, "M".
But let missing the first letter is capital Letter . Could anyone help me?
Thank you.
I assume this is not GWT since you have used var to declare the variables. There can be various ways to do this in javascript. one way is
var newpagename = pagename.charAt(0).toUpperCase() + pagename.slice(1);

Ordered Lists - Double Letters

This might be a simple question but it is eluding me right now.
I have an ordered list and it is extending past the A-Z and is going into the double letters, which is fine. The double letters come out in this format:
AA. AB. AC.
and was wondering if there is a way to make them come out as:
AA. BB. CC.
Thanks in advance!
From the docs over at Mozilla Dev:
The CSS specification does not define how alphabetic systems wrap at
the end of the alphabet. For instance, after 26 list items,
upper-alpha rendering is undefined. Firefox and other browsers will
continue as AA, AB, AC,... For long lists, it is recommended that
authors specify true numbers.

Involutary cipher (like ROT13) for an alphabet with an odd number of symbols

ROT13 has the nice property of being an involution for an A-Z alphabet (26 letters), that is to say:
ROT13(ROT13(string-A-to-Z)) = string-A-to-Z ;
What is a simple cipher function for an alphabet with an odd number of symbols that has the same property? Obviously, a straight-up substitution won't work, but I'm looking for something nearly as simple.
Either exclude one of the symbols in the alphabet from the cipher, or supplement it with a symbol not in the alphabet.
Such a cipher is necessarily the product of disjoint transpositions, so if you had an odd number of letters, one would have to remain in place.
You could "reverse" the alphabet, switching A with Z and B with Y etc.