Clion: Change watch memory content to hex (from octal) - clion

In Clion 2022.3.1 Watch, the content of pointer is shown in octal, how do I change this to hex ?

Related

Visual Studio Color Codes?

I'm trying to change the color manually to my liking.
Default looks somewhat like this:
<Item Background="0x02000000" BoldFont="No" Foreground="0x008CFAF1" Name="XML Attribute Quotes" />
So I want to change the Foreground, but I don't quite understand the format of the Color Code.
When I search hexadecimal color codes, they're 6 digits. For example: https://peteroupc.github.io/html3dutil/tutorial-colors.html
So Is it right to just add "0x00" in front of that? Seemingly all Colors I want to change start with that anyways. As far as I can tell only exception would be a default value starting with 0x02.
You don't need to do any conversion with these, as they are already hex (actual code hex, not the #... web stuff). To "convert" a web hex triplet, just remove the # and prepend 0x00 and you should be good. All the other characters remain the same (case shouldn't matter, though some people like uppercase as procedure).
-according to this: .vssettings file (Visual Studio Settings) Color Format
It says 0x02 default down below there

How do i use SF Symbol icons on macOS

I want to add glyhps from the MacOS Catalina icon font into my NSString.
I use the SF Symbols app and the few icons which show a unicode codepoint are easy to embed like normal characters but how do i use the ones where no codepoint is shown (the overwhelming majority).
Ok i found the website http://mathew-kurian.github.io/CharacterMap
Just upload your SF Symbol font from /Library/Fonts and then the character name contains the unicode hex codepoint.

A0N size is different than expected when printed

I have a strange problem. I got a new ZT220 printer (203 dpi - 8dpmm) and when I use simple A0N sizing to adjust font it prints font of incorrect size.
For example a simple code:
^XA
^A0N,80^FO80,80^FD1^FS
^XZ
Should print number 1 exactly 1 centimeter tall (80 / 8 = 10mm), yet it comes out at around 7mm. Any advice?
When I print a graphic, for example a box:
^XA
^FO80,80^GB80,80,1,B,0^FS
^XZ
This box comes out precisely 10x10mm.
Why is it that the font doesn't scale properly?
Note that I'm new to ZPL and this is my first Zebra printer. I use Ubuntu environment to send files to print, e.g.:
lpr -P <printer name> -o raw text.zpl
All I did was connect the printer through CUPS. Do I have to install the default fonts? If yes how do I do that on Ubuntu?
The space for characters is what you are specifying. Not all characters take up the full space. For example a lower case 'g' or 'p' would go below the bottom of the '1' character.
Also, different fonts may act differently. Try below to see how differently some behave.
^XA
^A0N,80^FO80,100^FD1gpi|0^FS
^FO80,100^GB400,80,1,B,0^FS
^A1N,80^FO80,200^FD1gpi|0^FS
^FO80,200^GB400,80,1,B,0^FS
^AbN,80^FO80,300^FD1gpi|0^FS
^FO80,300^GB400,80,1,B,0^FS
^AcN,80^FO80,400^FD1gpi|0^FS
^FO80,400^GB400,80,1,B,0^FS
^AeN,80^FO80,500^FD1gpi|0^FS
^FO80,500^GB400,80,1,B,0^FS
^AfN,80^FO80,600^FD1gpi|0^FS
^FO80,600^GB400,80,1,B,0^FS
^XZ

QTextDocument print to pdf and unicode

I try to print pdf file from QTextDocument. Content of document is set by setHtml().
Simplified example:
QTextDocument document;
document.setHtml("<h1>My html \304\205</h1>"); // Octal encoded ą
QPrinter printer(QPrinter::HighResolution);
printer.setPageSize(QPrinter::A4);
printer.setOutputFormat(QPrinter::PdfFormat);
printer.setOutputFileName("cert.pdf");
document.print(&printer);
It does not work as expected on windows (msvc). I get pdf file with "?" in place of most polish characters. It works on ubuntu.
On windows It makes pdf with tahoma font embedded subset. How to force QPrinter or QPrintEngine to embed more characters from this (or any other) font?
As pepe suggested in comments. I needed to wrap this string one of:
QString::fromUtf8
tr() (in case of joining translated parts)
Use html escape sequence (ex. &#261 for ę)
My original html in program was build from tr() parts, but I forgot to octal escape some of them. (which worked on gcc, not on msvc, even with utf-8 with BOM)

Monospace fonts , quotes, and circumflex a

Most of the monospace fonts normally used for programming on Windows (all I have found so far) don't display 'funny quotes' (0xE2) properly. For example, an error message from the gcc compiler like
warning: conflicting types for built-in function âprintfâ
which is really
{funny quote}fname{funnyquote}
displays in Ludida Console, DejaVu, etc. as
{circumflex a}fname{circumflex a}
(It may be doing so for you right now). Is there a a helvetica-like monospace font that respects that particular 8-bit codepage?
Windows has a split personality. Most of it is based on Unicode, while some parts still rely on code page character translations.
The character you're getting for 0xE2 is the proper Unicode translation, and is the same in the very common code page 1252 and most of the rest as well. The only code page that has a quote for that value is code page 10000, Mac OS Roman.
The chcp command is used to change the code page of the command window, but I can't get it to work for your specific case.

Resources