export PROJ_ROOT=$(pwd)
mkdir -p llvm && cd llvm
# Using Ubuntu 18.04 Prebuild Toolchain from https://releases.llvm.org/download.html
wget https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz \
https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.0/clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz.sig \
https://releases.llvm.org/10.0.0/hans-gpg-key.asc
gpg --import hans-gpg-key.asc
gpg --verify clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz.sig clang+llvm-10.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
This gist was inspired by the Geeks for Geeks' writeup How to dynamically allocate a 2D array in C? by Abhay Rathi. It has been formatted to remove interstitial ads, provide a fixed URL for links, and to modify the problem statement to match that which is commonly used in Hackerrank/Grind75/LeetCode/ACM problems where the input must be read from standard input.
We want to read input from standard input, where the nature of the input is as follows:
- On line 1,
$R$ : the number of rows, and$C$ : the number of columns in a 2D array, space-separated and newline-terminated. - On lines 2 through
$R+1$ , the row's columns, space-separated and newline-terminated.
To add a userspace program that can be executed in xv6 shell, make the following additions/edits:
- Include the headers needed to gain access to system call wrapper prototypes: types.h, user.h.
- If you need access to
struct stat
, include its header: stat.h
When updating using apt-update
, you get the following warnings:
$ sudo apt update
[sudo] password for matthew:
...
Hit:10 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Fetched 9,870 B in 1s (7,957 B/s)
Reading package lists... Done
Building dependency tree... Done
\documentclass{beamer} | |
\begin{document} | |
\begin{frame} | |
\begin{thebibliography}{9} | |
\setbeamertemplate{bibliography item}[online] | |
\bibitem{A} ItemA | |
\setbeamertemplate{bibliography item}[book] | |
\bibitem{B} ItemB |
import signal | |
import time | |
class timeout: | |
def __init__(self, seconds=1, error_message='Timeout'): | |
self.seconds = seconds | |
self.error_message = error_message | |
def handle_timeout(self, signum, frame): | |
raise TimeoutError(self.error_message) | |
def __enter__(self): |
By default, history
will only give an event designator and command line entry. Unless the event reference is absolute, the events are relative to the current position in the history list.
history
1995 ls S*.pdf
1996 ls -lh S*.pdf
1997 xdg-open System_01Jun2018_30Jun2018_0133*.pdf
1998 ssh matthew@localhost
I hereby claim:
- I am colematt on github.
- I am colematthew (https://keybase.io/colematthew) on keybase.
- I have a public key ASArTG7xdS6WqkVEnPIuqXqZ_8Ur79INXvBpEfq4lykRPQo
To claim this, I am signing this object: