What is the unicode for julia 1.0 Integer Div symbol - julia

On vi program, I can enter the unicode by
first enter the "insert mode" using 'i'
Then type 'CTRL-v' follow by 'u2611' to enter unicode-2611
I wish to enter the unicode character for "julia 1.0 Integer Div symbol"
But I have no idea what the unicode value for it is and when I looked at the julia 1.0 documentation, it does not tell me
https://docs.julialang.org/en/v1.0.0/manual/mathematical-operations/
What is the unicode for julia 1.0 Integer Div symbol?

You can find all unicode that could be entered by tab completion. For you question,
U+000F7 ÷ \div Division Sign
In julia repl, type \div then Tab to complete this.

Related

What do these characters mean?(ANSI Code)

It's the code I'm printing with node:
const m = `[38;5;1;48;5;16m TEST`
console.log(m)
output:
It changes the text color.
As you can see `` is a special char I don't understand(It's not being shown by the browser). How does it work?
Is there any alternative for ESC?
As #puucee already mentions they are terminal control characters. I find it surprising that it says ESC[ in the code as that won't be escaped in normal node. I suspect that maybe your IDE is converting the "true" escape character to ESC. Node does not support octal escapes (such as \033), but hexadecimal escapes. That is, you string should usually be like this:
console.log('\x1b[38;5;1;48;5;16m TEST \x1b[0m')
These are terminal control characters. They are often used e.g. for coloring the output. Some are non-printable. Backticks ` in your javascript example are called template literals.

Julia: docstrings and LaTeX

Julia has docstrings capabilities, which are documented here https://docs.julialang.org/en/stable/manual/documentation/. I'm under the impression that it has support for LaTeX code, but I'm not sure if the intention is that the LaTeX code should look like code or like an interpretation. In the following, the LaTeX code is garbled somewhat (see rho, for instance) and not interpreted (rho does not look like ρ). Am I doing something wrong?
Is there a way to get LaTeX code look interpreted?
What I mean by interpreted is something like what they do at https://math.stackexchange.com/.
The documentation says that LaTeX code should be wrapped around double back-quotes and that Greek letters should be typed as ρ rather than \rho. But that rather defeats the point of being able to include LaTeX code, doesn't it?
Note: Version 0.5.2 run in Juno/Atom console.
"""
Module blabla
The objective function is:
``\max \mathbb{E}_0 \int_0^{\infty} e^{-\rho t} F(x_t) dt``
"""
module blabla
end
If I then execute the module and query I get this:
With triple quotes, the dollar signs disappear, but the formula is printed on a dark background:
EDIT Follow-up to David P. Sanders' suggestion to use the Documenter.jl package.
using Documenter
doc"""
Module blabla
The objective function is:
$\max \mathbb{E}_0 \int_0^{\infty} e^{-\rho t} F(x_t) dt$
"""
module blabla
end
Gives the following: the LaTeX code appears to print correctly, but it's not interpreted (ρ is displayed as \rho. I followed suggestions in: https://juliadocs.github.io/Documenter.jl/stable/man/latex.html to
Rendering LaTeX code as actual equations has to be supported by whichever software renders your docstrings. So, the short answer to why you're not seeing any rendered equations in Juno is that LaTeX rendering is currently not supported in Juno (as Matt B. pointed out, there's an open issue for that).
The doc"" string literal / string macro is there to get around another issue. Backslashes and dollar signs normally have a special meaning in string literals -- escape sequences and variable interpolation, respectively (e.g. \n gets replaced by a newline character, $(variable) inserts the value of variable into the string). This, of course, clashes with the ordinary LaTeX commands and delimiters (e.g. \frac, $...$). So, to actually have backslashes and dollar signs in a string you need to escape them all with backslashes, e.g.:
julia> "\$\\frac{x}{y}\$" |> print
$\frac{x}{y}$
Not doing that will either give an error:
julia> "$\frac{x}{y}$" |> print
ERROR: syntax: invalid interpolation syntax: "$\"
or invalid characters in the resulting strings:
julia> "``\e^x``" |> print
``^x``
Having to escape everything all the time would, of course, be annoying when writing docstrings. So, to get around this, as David pointed out out, you can use the doc string macro / non-standard string literal. In a doc literal all standard escape sequences are ignored, so an unescaped LaTeX string doesn't cause any issues:
julia> doc"$\frac{x}{y}$" |> print
$$
\frac{x}{y}
$$
Note: doc also parses the Markdown in the string and actually returns a Base.Markdown.MD object, not a string, which is why the printed string is a bit different from the input.
Finally, you can then use these doc-literals as normal docstrings, but you can then freely use LaTeX syntax without having to worry about escaping everything:
doc"""
$\frac{x}{y}$
"""
function foo end
This is also documented in Documenter's manual, although it is not actually specific to Documenter.
Double backticks vs dollar signs. The preferred way to mark LaTeX in Julia docstrings or documentation is by using double backticks or ```math blocks, as documented in the manual. Dollar signs are supported for backwards compatibility.
Note: Documenter's manual and the show methods for Markdown objects in Julia should be updated to reflect this.
You can use
doc"""
...
"""
This is a "non-standard string literal" used by the Documenter.jl package; see https://docs.julialang.org/en/stable/manual/strings/#non-standard-string-literals.

How to print a number as exponent in R

Figures can be displayed as exponent in unicode, like ¹. How can I use that to convert an arbitrary number to a string with exponent characters, and print that with R?
I can print figures 1 and 2 using http://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts but the other figures and minus doesn't work.
FWIW, I use Rstudio on Windows.
As you pointed out, unicode has support for all digits in a superscript form, so it should not be a problem if you can print/render UTF-8 characters. The problem is that the font you will use to display the string must support those characters and I guess most of them do not. If you are printing to a console, check out what font it uses and check if that font supports the characters you want to print.

QR code generator that has "alphanumeric characters" option?

I tried to use online tools, like google/qr_codes and
goQR.me, but neither have an "alphanumeric characters" option, only complete binary (UTF8 or ISO) character set. I need only a little alphanumeric (A-Z,0-9,-,/,etc.), so a string like "http://bit.ly/1234" (a string with length=18) can be expressed by a Version-1 (21 rows) QR-Code symbol.
I also try to install (Linux, PHP, Python, etc.) tools... And, to my surprise, no "alphanumeric" option! (only, indirectly, the "binary" option).
Examples:
Good: https://chart.googleapis.com/chart?chs=250x250&cht=qr&chl=http://bit.ly/12&chld=L|1 Generates a symbol of "http://bit.ly/12" (a string with length=16) with a version-1 QR-Code. OK! The guide say "... can encode up to 25 alphanumeric characters", so 16<25, then espected to version-1.
1.1 Bad: https://chart.googleapis.com/chart?chs=250x250&cht=qr&chl=http://bit.ly/12&chld=M|1 (change L to M), generates a version-2 (25 rows) symbol.
1.2 Bad: https://chart.googleapis.com/chart?chs=250x250&cht=qr&chl=http://bit.ly/1234&chld=L|1 (change length from 16 to 18), generates a version-2 (25 rows) symbol.
Trying to programm it... bad... See http://phpqrcode.sourceforge.net/ , even when I programming, I can't select a real "alphanumeric" option! No Version-1 symbol can be generated (!) with this kind of tools.
The QR alphanumeric set does not include lowercase letters. The standard's definitive but the the wikipedia page lists the characters in the alphanumeric set.

Printing ASCII value of BB (HEX) in Unix

When I am trying to paste the character » (right double angle quotes) in Unix from my Notepad, it's converting to /273. The corresponding Hex value is BB and the Decimal value is 187.
My actual requirement is to have this character as the file delimiter when I export a .dat file from a database table. So, this character was put in as the delimiter after each column name. But, while copy-pasting, it's getting converted to /273.
Any idea about how to fix this? I am on Solaris (SunOS 5.10).
Thanks,
Visakh
ASCII only defines the character codes up to 127 (0x7F) - everything after that is another encoding, such as ISO-8859-1 or UTF-8. Make sure your locale is set to the encoding you are trying to use - the locale command will report your current locale settings, the locale(5) and environ(5) man pages cover how to set them. A much more in-depth introduction to the whole character encoding concept can be found in Joel Spolsky's The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)
The character code 0xBB is shown as » in the IS0-8859-1 character chart, so that's probably the character set you want, so the locale would be something like en_US.ISO8859-1 for that character set with US/English messages/date formats/currency settings/etc.

Resources