This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Homebrew build logs for python on macOS 10.14 | |
Build date: 2018-11-05 20:05:36 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
#include <map> | |
#include <string> | |
#include <iostream> | |
#include <cctype> | |
using namespace std; | |
bool Substitude(const string &template_str, map<string,string> &mapping, string &output) { | |
int state=0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//gcc -o itimer_demo itimer_demo.c -lrt | |
#include <sys/timerfd.h> | |
#include <time.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <stdint.h> /* Definition of uint64_t */ | |
#define handle_error(msg) \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* tunproxy.c --- small demo program for tunneling over UDP with tun/tap | |
* | |
* Copyright (C) 2003 Philippe Biondi <[email protected]> | |
* | |
* This program is free software; you can redistribute it and/or modify it | |
* under the terms of the GNU Lesser General Public License as published by | |
* the Free Software Foundation. | |
* | |
* This program is distributed in the hope that it will be useful, but |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INC=/usr/local/ssl/include/ | |
LIB=/usr/local/ssl/lib/ | |
all: | |
g++ -I$(INC) -L$(LIB) cli.cpp -o cli -lssl -lcrypto -ldl -fpermissive | |
g++ -I$(INC) -L$(LIB) serv.cpp -o serv -lssl -lcrypto -ldl -fpermissive | |
clean: | |
rm -rf *~ cli serv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: C12:ReferenceCounting.cpp | |
// From Thinking in C++, 2nd Edition | |
// Available at http://www.BruceEckel.com | |
// (c) Bruce Eckel 2000 | |
// Copyright notice in Copyright.txt | |
// Reference count, copy-on-write | |
#include "../require.h" | |
#include <string> | |
#include <iostream> | |
using namespace std; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int lis(int A[], int n){ | |
int *d = new int[n]; | |
int len = 1; | |
for(int i=0; i<n; ++i){ | |
d[i] = 1; | |
for(int j=0; j<i; ++j) | |
if(A[j]<=A[i] && d[j]+1>d[i]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A simple LRU cache written in C++ | |
// Hash map + doubly linked list | |
#include <iostream> | |
#include <vector> | |
#include <ext/hash_map> | |
using namespace std; | |
using namespace __gnu_cxx; | |
template <class K, class T> | |
struct Node{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ====================================================================== | |
* Copyright (c) 2000,2006 Theo Schlossnagle | |
* All rights reserved. | |
* The following code was written by Theo Schlossnagle for use in the | |
* Backhand project at The Center for Networking and Distributed Systems | |
* at The Johns Hopkins University. | |
* | |
* This is a skiplist implementation to be used for abstract structures | |
* and is release under the LGPL license version 2.1 or later. A copy | |
* of this license can be found file LGPL. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************************** | |
* simpletun.c * | |
* * | |
* A simplistic, simple-minded, naive tunnelling program using tun/tap * | |
* interfaces and TCP. Handles (badly) IPv4 for tun, ARP and IPv4 for * | |
* tap. DO NOT USE THIS PROGRAM FOR SERIOUS PURPOSES. * | |
* * | |
* You have been warned. * | |
* * | |
* (C) 2009 Davide Brini. * |
NewerOlder