Skip to content

Instantly share code, notes, and snippets.

@DuoZhangRobotics
DuoZhangRobotics / .vimrc
Last active April 2, 2023 05:35
vim config
" Basic settings
" Set line numbers
set number
" Set relative line numbers to the current line where the cursor stays in
set relativenumber
" Set the spaces that one tab hit goes
set tabstop=4
set shiftwidth=4
set spell
@DuoZhangRobotics
DuoZhangRobotics / helper.cpp
Last active January 13, 2023 01:56
helper function in c++ for printing like python including vectors
#include <iostream>
#define repIter(i,a,b) for(int i=a;i<b;i++)
#define rep(ele,elements) for(const auto& ele: elements)
void print(){cout<<'\n';}
void print(const vector<int>&num){
repIter(i,0,num.size()){
cout<<num[i] <<" ";
}
cout<<endl;