R | opcode | rs | rt | rd | shamt |
#include <iostream> | |
#include <chrono> | |
void print_I64(long long num) { | |
// Try NOT using `if` statement, since it will make the program slower | |
char str[32] = {0}; | |
short idx = 31; | |
long long sign = num >> 63; // -1 for negative, 0 for positive | |
// by doing this we assume that the spaces are filled with num's sign bit | |
num ^= sign; |
Next to a great forest there lived a poor woodcutter with his wife and his two children. | |
The boy's name was Hansel and the girl's name was Gretel. He had but little to eat, and | |
once, when a great famine came to the land, he could no longer provide even their daily | |
bread. | |
One evening as he was lying in bed worrying about his problems, he sighed and said to his | |
wife, "What is to become of us? How can we feed our children when we have nothing for | |
ourselves?" | |
"Man, do you know what?" answered the woman. "Early tomorrow morning we will take the two |
#include <iostream> | |
#include <map> | |
#include <string> | |
// Assume Cow B in each line appeared before | |
class Solution { | |
public: | |
enum class Relation {BEFORE, AFTER}; | |
enum class Zodiac { |
package com.henry.net; | |
import java.io.IOException; | |
import java.io.ObjectInputStream; | |
import java.io.ObjectOutputStream; | |
import java.net.Socket; | |
import java.util.Arrays; | |
public class Client { | |
private Socket socket; |
C++ implementation: Solving a 9 × 9 Sudoku
GitHub Repo: https://github.com/tsagaanbar/sudoku-solve
The reason I built this was that I was unable to find a tool to convert Windows Terminal's output to SVG (not a animated SVG, just a screenshot).
Since one can copy Windows Terminal's output as HTML code, I tried to find some tools to convert HTML to SVG. But I can't find any either.
By the way, Asciinema can record CLI output in its own format, and it can save its recordings as 'raw' format, in which I guess are some escape sequences. Maybe one can choose to convert those sequence to SVG.
Update: I found something that might be seful:
__pycache__/ |
draw.io, available at https://app.diagrams.net, is an easy-to-use diagramming tool. However, the exporting of *.drawio
files needs to be taken care of most of the times.
As for PNG exporting, currently the default setting may generates blurring image. Fortunately, this can be fixed by scaling the diagram into a larger one. [^png-export]
As for the SVG, things become a bit complicated.
When user viewing the software exported SVG files in a web browser, everything seems just fine. But when they try importing these SVGs into softwares like Word or Inkscape, users may see a "Viewer does not support full SVG 1.1" (now changed to "Text is not SVG - cannot display") text on their image.