Skip to content

Instantly share code, notes, and snippets.

View neel's full-sized avatar

Neel Basu neel

View GitHub Profile
<div id="studentInfoBox" class="infoBox">
<span>Name: </span> <?= $name ?>
<span>Department: </span><?= $deptName ?>
<span>
</div>
<div id="studentInfoBox" class="infoBox">
<span>Name: </span> <?= $name ?>
<span>Department: </span><?= $deptName ?>
</div>
<?php
class stdInfoModel extends manualModel{
public function attachOrmMap(){
parent::attachOrmMap('StudentOrm');//attach an Orm Map on file StudentOrm.orm.map.php
}
}
?>
#include <stdio.h>
int main()
{
int i=1,j=1,n=20,gap=5;
for(;i<=n;i++){
for(j=1;j<=n;j++){
if(i==n && j==n){
printf(" ");
}else if(i==1 && j==1){
@neel
neel / main.cpp
Created September 28, 2008 16:55
int main(int argc, char *argv[]){
thing t;
t.addCallback("one", &thing::one);
t.addCallback("two", &thing::two);
t.addCallback("three", &thing::three);
t.call("one");
t.call("two");
t.call("three");
matter m;
m.addCallback("one", &thing::one);
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "myapp.h"
int main(int argc, char *argv[]) {
SessionConfig::setSessPath("/tmp/cgi++/session/");
myApp app;
app.setRoute("/test", CALLBACK(&myApp::subTest));
return app.exec();
#include "jvar.h"
namespace Js {
JVar::JVar(){
}
JVar::~JVar(){
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <iostream>
#include <cstdlib>
#include "myapp.h"
int main(int argc, char *argv[]){
MyApp app;
@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
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);