Skip to content

Instantly share code, notes, and snippets.

Avatar

Davide Spataro knotman90

View GitHub Profile
View cmd_line_args_manager.cpp
#include <string>
#include <algorithm>
#include <vector>
#include <tuple>
#include <iostream>
#include <optional>
void usage(const std::string& progName) {
std::cout << progName << " -X FILE -P FILE -O DIRECTORY " << std::endl
View codechef_DPAIR.cpp
#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
using pii = pair<int, int>;
using l = long;
using ll = long long;
using ull = unsigned long long;
void solve();
View stefano_mock_interview.cpp
#include <algorithm>
#include <array>
#include <cmath>
#include <iostream>
#include <iterator>
#include <limits>
#include <numeric>
#include <unordered_map>
#include <vector>
using namespace std;
View ProjectEuler_problem68.cpp
//problem 68---
template<class COLLECTION>
bool cmp_arr(const COLLECTION& v1, const COLLECTION& v2) {
for(int i=0; i<v1.size() ; i++) {
if(v1[i]==v2[i])
continue;
if(v1[i]<v2[i])
return true;
else
return false;
View ProjectEulerProblem#187.cpp
#include <bits/stdc++.h>
#include <gmpxx.h>
#include <functional>
#include <numeric>
//TYPEDEFS
typedef unsigned long long ull;
typedef signed long long ll;
View keybase.md

Keybase proof

I hereby claim:

  • I am knotman90 on github.
  • I am davidespataro (https://keybase.io/davidespataro) on keybase.
  • I have a public key whose fingerprint is 7D5A 3C6B 50E3 16C3 BAAB 3D12 8069 C984 9E14 40FC

To claim this, I am signing this object:

View cl_complex.cl
/**
Author: Davide Spataro
email:davide.spataro@unical.it
www.davidespataro.it
*/
#define DOUBLE_PRECISION (1)
typedef double2 cl_double_complex;
typedef float2 cl_float_complex;
View list.c
#include <stdio.h>
#include<stdlib.h>
typedef struct node{
int payload;
node* next;
} node;
void print(node* head){
while(head){
printf("%d ",head->payload);
@knotman90
knotman90 / NERDTree.mkd
Created May 11, 2016 — forked from m3nd3s/NERDTree.mkd
My Vim Cheat Sheet
View NERDTree.mkd

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|
O.......Recursively open the selected directory..................|NERDTree-O|
You can’t perform that action at this time.