Skip to content

Instantly share code, notes, and snippets.

View neel's full-sized avatar

Neel Basu neel

View GitHub Profile
#include "config.h"
#include <iostream>
Config::Config(int data):_pimpl(new Impl(data)){
}
Config::Impl::Impl(int data): _data(data){
#include "config.h"
#include <iostream>
Config::Config():_pimpl(new Impl), _refCount(1){
}
Config::Config(const Config& config): _pimpl(config._pimpl), _refCount(1){
config.ref();
}
var core = {
clone: function(o){
var c;
if(typeof o != 'object'){
c = o;
}else{
c = {};
for(i in o){
c[i] = this.clone(o[i]);
}
@neel
neel / jana
Created August 28, 2011 19:13
Written for Arghyadeep Jana
U2FsYSBCb2thY2hvZGEgSGFyYW1pIFN1b3JlciBCYWNoY2hhLiBHYXJlIGVrIExhdGhpIE1hcmJl
IEdhbmR1IGVraG9uIHRvciBHaHVtIFBhY2hjaGhlID8gYm9sIG5hIGtha2UgYWRkcmVzcyBrb3Jl
IExpa2hsaSA/Pw==
var FMRuntime = {
/**
* Changes Directory
* \internal Just Calls _cd() and _ls() serialy.
* \return void
*/
cd : function(){
},
/**
void ArthurStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const{
Q_ASSERT(option);
switch (element) {
case PE_FrameFocusRect:
break;
case PE_IndicatorRadioButton:
if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) {
bool hover = (button->state & State_Enabled) && (button->state & State_MouseOver);
#ifndef PHPCONSTRUCTIDENTITY_H
#define PHPCONSTRUCTIDENTITY_H
#include <QStringList>
#include <map>
#include <algorithm>
class PHPConstructIdentity{
public:
PHPConstructIdentity();
class MarkSheetTableModel : public QAbstractTableModel{
public:
MarkSheetTableModel(QObject* parent=0);
~MarkSheetTableModel();
private:
QList<QString> subjects;//Headers Come from Here
QHash<QString, QList<double>* > students;//each student and their corresponding marks make a row
public:
QList<double>& addStudent(const QString& stdName);
QList<double>& student(const QString& stdName);
@neel
neel / gist:30037
Created November 28, 2008 18:24
undefined
<?php
class UserManagerConfig extends Config{
public host = "";
public user = "";
public pass = "";
//.....
public database = "";
}
/*
when you are in OOPS avoid using associative arrays use Objects Instead
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <iostream>
#include <cstdlib>
#include "myapp.h"
int main(int argc, char *argv[]){
MyApp app;