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
applyDefaults = (source, defaults) -> | |
### | |
# Recursively applies defaults to the source object | |
### | |
#The Mandatory safety checks | |
return source if not source? | |
return defaults if not defaults? | |
#First fill the results with defaults of each proprerty, recursively | |
result = {} | |
for prop of defaults |
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
mongoskin = require 'mongoskin' | |
server = 'localhost' | |
db = 'foobar' | |
timeElapsed = 0 | |
timeLimit = 10 #total time the benchmark should run in seconds | |
docsRetrieved = { 0 : 0 } | |
ids = [] | |
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
# | |
# My Fancy Node.js project | |
# | |
PROJECT = "My Fancy Node.js project" | |
all: install test server | |
debug: ;@echo "Debugging ${PROJECT}.....http://0.0.0.0:8080/debug?port=5858 to start debugging"; \ |
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 <QtGui> | |
#include <phonon/audiodataoutput.h> | |
class AudioClass: public QWidget{ | |
Q_OBJECT | |
QMap<Phonon::AudioDataOutput::Channel, QVector<qint16> > m_audiodata; | |
public slots: | |
void dataReceived(const QMap<Phonon::AudioDataOutput::Channel, QVector<qint16> >& data){ | |
//qDebug()<<"Hii"<<data[Phonon::AudioDataOutput::LeftChannel][512]; |
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<stdio.h> | |
#include<stdlib.h> | |
#include<time.h> | |
#include<conio.h> | |
int main_array[10][10],disp_array[10][10],i,j,x,y,marked=0,correct=0; | |
//left over items : | |
//Game menu. | |
void new_random_board() | |
{ |
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
.pragma library | |
// | |
// Originally taken from: | |
// https://gist.github.com/dsamarin/1258353 | |
// | |
var Complex = function(real, imag) { | |
if (!(this instanceof Complex)) { | |
return new Complex (real, imag); |
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
/* | |
* Perfect Hash implementation as described in: | |
* http://www.drdobbs.com/architecture-and-design/generating-perfect-hash-functions/184404506 | |
* | |
* Copyright 2015-2020 Dinesh Manajipet <[email protected]> | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are | |
* met: | |
* |
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
###################################################################### | |
# Automatically generated by qmake (3.0) Sat Jan 24 06:11:57 2015 | |
###################################################################### | |
TEMPLATE = app | |
TARGET = benchmark | |
INCLUDEPATH += . | |
CONFIG += c++11 | |
QT += testlib | |
QT -= gui quick qml |
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
#!/bin/sh | |
#Host to ping to check pingability, by default it is the default gateway | |
PING_HOST=$(ip route show default | awk '/default/ {print $3}') | |
PING_INTERVAL=10 | |
PING_TIMEOUT=5 | |
#Number of consecutive ping successes to note that the server is up | |
SUCCESS_ALERT_COUNT=1 |
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
#!/bin/sh | |
LOGIN_USERNAME="<your mail id>%40<your mail provider>.com" | |
LOGIN_PASSWORD="<your password>" | |
LOGIN_SERVER_ADDRESS="http://portal.actcorp.in" | |
LOGIN_PAGE="/tmp/loginPage" | |
CONNECTIVITY_CHECK_PING_TIMEOUT=3 | |
CONNECTIVITY_CHECK_PING_HOST=www.google.com |
OlderNewer