Skip to content

Instantly share code, notes, and snippets.

View MingjiHan99's full-sized avatar

MingjiHan MingjiHan99

  • ByteDance
  • Bellevue, WA
  • 08:20 (UTC -07:00)
View GitHub Profile

CPP Tutorial

Introduction

In this tutorial, we are going to introduce key features of C++. We assume the readers know other object-oriented and high level languages including Java and Python.

Basics

We use a sample program to show the basics structure and syntax of C++.

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

#include <iostream>
#include <bits/stdc++.h>
#include <unordered_set>
#include <sw/redis++/redis++.h>
#include <hiredis/hiredis.h>
using namespace std;
using namespace sw::redis;
int main() {
time_t start, end;
@MingjiHan99
MingjiHan99 / dbgen_to_sql.py
Created June 25, 2021 15:33
Covert `lineitem.tbl` to sql statements
import os
import re
from datetime import datetime
index = 0
output = open('lineitem' + str(index) +'.sql', 'w', encoding='utf-8')
output.write('insert into lineitem values ')
with open('lineitem.tbl', 'r', encoding='utf-8') as f:
lines = f.readlines()
print(len(lines))
for l in range(len(lines)):