Skip to content

Instantly share code, notes, and snippets.

View Panchatcharam's full-sized avatar
🏠
Working from home

Panchatcharam Panchatcharam

🏠
Working from home
  • Expedia Inc
  • Brisbane, Australia
View GitHub Profile
@Panchatcharam
Panchatcharam / Stack.cpp
Created February 19, 2017 15:03
Stack implemented using C++ template
#include <iostream>
using namespace std;
// Class Stack with default parameter
template<typename T, int N=10>
class Stack
{
public:
Stack();
~Stack();
@Panchatcharam
Panchatcharam / variadic_template.cpp
Created February 19, 2017 15:07
Simple program which use variadic template
#include<iostream>
#include<string>
using namespace std;
// This function is required, and it will be called at the end.
void print()
{
cout<<"\n Print is Complete"<<endl;
}
#include <iostream>
#include <vector>
#include <memory>
#include <numeric>
#include <exception>
using namespace std;
class base
{
#include <iostream>
#include <algorithm>
#include <string>
#include <map>
using namespace std;
int main()
{
unsigned long totalQuery = 0;
@Panchatcharam
Panchatcharam / iron.cpp
Last active January 28, 2018 14:10
This is the modified version of Ironhouse Pattern at https://github.com/zeromq/czmq/blob/master/examples/security/ironhouse2.c, where the original version is implementing the PUSH PULL and this version implements the PUB/SUB. This works fine but still lots of improvements to be done.
// The Ironhouse Pattern
//
// This is exactly the same example but broken into two threads
// so you can better see what client and server do, separately.
#include <czmq.h>
#include <iostream>
#include <sstream>
#include <sys/time.h>
#include <string>