ISO 369 (german) != 639 (english) - translation

I found two translations of one article at:
https://www.w3.org/International/questions/qa-lang-2or3.en.html
began with either a ISO 639-1 two-letter language code or ISO 639-2 three-letter code
vs
https://www.w3.org/International/questions/qa-lang-2or3.de.html
begannen entweder mit einem zweibuchstabigen Code nach ISO 369-1 oder einem dreibuchstabigen Code nach ISO 369-2
Have there ever been a ISO 369-x what have been changed to ISO 639-x?
I have a table SYSTEM_LANGUAGE having a field ISO_369_CODE.
SYSTEM_LANGUAGE
+----+--------------+
| id | iso_369_code |
+----+--------------+
| 1 | en |
+----+--------------+
Is the field named correctly?

No the field is named incorrectly International standard 369 it is about something else:
ISO 369:2009 Machine tools - Symbols for indications appearing on machine tools

Related

Undefined control sequence when using tufte-latex package

I have a pandoc grid table in an otherwise brand-new bookdown project:
# Hello bookdown
All chapters start with a first-level heading followed by your chapter title, like the line above. There should be only one first-level heading (`#`) per .Rmd file.
+---------------+---------------+--------------------+
| Fruit | Price | Advantages |
+===============+===============+====================+
| Bananas | $1.34 | - built-in wrapper |
| | | - bright color |
+---------------+---------------+--------------------+
| Oranges | $2.10 | - cures scurvy |
| | | - tasty |
+---------------+---------------+--------------------+
Rendering to html and normal pdf via bookdown::gitbook and bookdown::pdf_book are fine, however rendering to a tufte format via tufte::tufte_book or bookdown::tufte_book2 fails with:
! Undefined control sequence.
<argument> #{} >{\raggedright \arraybackslash
}p{(\columnwidth - 4\tabcolsep...
l.93 ...umnwidth - 4\tabcolsep) * \real{0.29}}#{}}
The table structure is different to the other tables generated:
\begin{longtable}[]{#{}
>{\raggedright\arraybackslash}p{(\columnwidth - 4\tabcolsep) * \real{0.22}}
>{\raggedright\arraybackslash}p{(\columnwidth - 4\tabcolsep) * \real{0.22}}
>{\raggedright\arraybackslash}p{(\columnwidth - 4\tabcolsep) * \real{0.29}}#{}}
\toprule
Fruit & Price & Advantages \\
...
Therefore I think the source of the problem is in the tufte-latex package which tufte_book relies on, but I am unable to narrow it down further.
The tex code of the document is here - the culprit section starts at line 96.
This was an issue in the tufte package.
It has now been fixed in dev version 0.10.2 one can install from github
remotes::install_github("rstudio/tufte")
The fix will be on CRAN for next version 0.11

How to replace space with space pipe and space?

I am writing documentation on GitHub. Tabular data needs to be represented on the Github page. For that one has to use pipe.
Below is the sample data:
SalesAgent SalesCountry SalesAmount
Tom UK 200
John US 180
John UK 260
David India 450
Tom India 350
This should be converted into tabular data that should be represented on Github page.
|SalesAgent|SalesCountry|SalesAmount|
|----------|------------|-----------|
|Tom |UK |200|
|John |US |180|
|John |UK |260|
|David |India |450|
|Tom |India |350|
The same process needs to done for several tables.
So one quick hack I thought of is to replace space with space pipe and space.
Tried replacing a space in atom and notepad++ editor. But it is not working.
How to do that using atom text editor. Please suggest, if there is any other text editor that does it more efficiently.
You can make use of Prettier to format GitHub Flavoured Markdown tables correctly. There are several ways to do so: CLI, web or using an Atom plugin (note that there are several others to choose from).
The following example uses the CLI version of Prettier, but the result should be the same with any other version.
$ cat example.md
|SalesAgent|SalesCountry|SalesAmount|
|----------|------------|-----------|
|Tom |UK |200|
|John |US |180|
|John |UK |260|
|David |India |450|
|Tom |India |350|
$ npx -q prettier example.md
| SalesAgent | SalesCountry | SalesAmount |
| ---------- | ------------ | ----------- |
| Tom | UK | 200 |
| John | US | 180 |
| John | UK | 260 |
| David | India | 450 |
| Tom | India | 350 |
Please note that I'm using npx to execute it once without installing. If you prefer, you can also install prettier globally and directly use prettier example.md.

ELF32 binary, little endian or not?

I know that printf(%08x) shows 4 octets of the stack (410484e4 for instance). Let's say that this value correspond to the begining of a char array (called tab), so what would be the value of tab[0], would it be 08 ('A' converted in ASCII) or e4 (ä) ?
Thank you
p.s: the executable I'm working on is an ELF 32 binary

The alias for "Europe/Moscow" timezone is "W-SU". What does it stands for?

Wild guess:
a) "SU" stands for Soviet Union;
b) "W" stands for Western
Thorough internet search didn't help.
As of today, a google search found these links and others:
"Country code(s) TZ database name Area(s) covered Type UTC offset Time zone Source file Notes
...
STD DST abbreviation
RU W-SU <blank> Link +03:00 +03:00 MSK backward Link to Europe/Moscow
..."
--https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
"...
The current W-SU time zone offset is:
UTC/GMT +3 hours
...
This time zone does not change for daylight savings.
...
Time zones in MSD, MSK
Europe/Moscow"
--https://www.travelmath.com/time-zone/W-SU
It is also in the TZ DB:
Mac_3.2.57$find . -type f -exec grep -Hn 'W-SU' {} \;
./backward:127:Link Europe/Moscow W-SU
./frickenAll:15370:Link Europe/Moscow W-SU
Mac_3.2.57$cat backward | head -n 137 | tail -n 20
Link America/New_York US/Eastern
Link Pacific/Honolulu US/Hawaii
Link America/Indiana/Knox US/Indiana-Starke
Link America/Detroit US/Michigan
Link America/Denver US/Mountain
Link America/Los_Angeles US/Pacific
Link Pacific/Pago_Pago US/Samoa
Link Etc/UTC UTC
Link Etc/UTC Universal
Link Europe/Moscow W-SU
Link Etc/UTC Zulu
# Two-part names that were renamed mostly to three-part names in 1995
# Link TARGET LINK-NAME #= TARGET1
Link America/Argentina/Buenos_Aires America/Buenos_Aires
Link America/Argentina/Catamarca America/Catamarca
Link America/Argentina/Cordoba America/Cordoba
Link America/Indiana/Indianapolis America/Indianapolis
Mac_3.2.57$

Which characters are included in the Lua punctuation string pattern (%p)?

I haven't been able to find documentation of which characters compound the punctuation set "%p" in Lua.
The answer is locale dependent, it is a direct interface to the C function.
Actually, if there is a C standard function which does something similar to the Lua function, it is near-certain that the Lua function just wraps the C function, warts and all, even without looking at the specific case.
(This is part of the reason file:read() still has trouble reading text with embedded zeroes in 5.2, maybe even will have in 5.3)
While Amaden gave a good answer for the "C" locale, and ColonelThirtyTwo gave the right way to check for the current locale, the C standard only says:
ispunct(): The ispunct function tests for any printing character that is one of a locale-specific set of punctuation characters for which neither isspace nor isalnum is true. In the "C" locale, ispunct returns true for every printing character for which neither isspace nor isalnum is true.
A small script to find them:
for i=0,255 do
if string.match(string.char(i), "%p") then
io.write(string.char(i))
end
end
io.write("\n")
-- $ luajit test.lua
-- !"#$%&'()*+,-./:;<=>?#[\]^_`{|}~
%p is matched by the C function ispunct (C source v 5.2), which matches the following:
041 ‘‘!’’ 042 ‘‘ ’’ 043 ‘‘#’’ 044 ‘‘$’’ 045 ‘‘%’’
046 ‘‘&’’ 047 ‘‘’’’ 050 ‘‘(’’ 051 ‘‘)’’ 052 ‘‘*’’
053 ‘‘+’’ 054 ‘‘,’’ 055 ‘‘-’’ 056 ‘‘.’’ 057 ‘‘/’’
072 ‘‘:’’ 073 ‘‘;’’ 074 ‘‘<’’ 075 ‘‘=’’ 076 ‘‘>’’
077 ‘‘?’’ 100 ‘‘#’’ 133 ‘‘[’’ 134 ‘‘\’’ 135 ‘‘]’’
136 ‘‘^’’ 137 ‘‘_’’ 140 ‘‘‘’’ 173 ‘‘{’’ 174 ‘‘|’’
175 ‘‘}’’ 176 ‘‘~’’
(From man ispunct)

Resources