Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Panchatcharam Panchatcharam

🏠
Working from home
  • Expedia Inc
  • Brisbane, Australia
View GitHub Profile
@Panchatcharam
Panchatcharam / iron.cpp
Last active Jan 28, 2018
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.
View iron.cpp
// 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>
View sample_map.cpp
#include <iostream>
#include <algorithm>
#include <string>
#include <map>
using namespace std;
int main()
{
unsigned long totalQuery = 0;
View crtp_unique_ptr.cpp
#include <iostream>
#include <vector>
#include <memory>
#include <numeric>
#include <exception>
using namespace std;
class base
{
@Panchatcharam
Panchatcharam / variadic_template.cpp
Created Feb 19, 2017
Simple program which use variadic template
View variadic_template.cpp
#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;
}
@Panchatcharam
Panchatcharam / Stack.cpp
Created Feb 19, 2017
Stack implemented using C++ template
View Stack.cpp
#include <iostream>
using namespace std;
// Class Stack with default parameter
template<typename T, int N=10>
class Stack
{
public:
Stack();
~Stack();