#!/bin/bash
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffe-dev
cd
wget http://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.2.0.tar.gz
tar -xzvf ruby-2.1.2.tar.gz
cd ruby-2.1.2/
./configure
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
'Conversion | |
Public Class Form1 | |
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load | |
Dim dataInMeters As Double | |
Dim dataInMiles, dataInFeets, dataInInches As Double | |
dataInMeters = InputBox("Please type date in meters") | |
dataInFeets = dataInMeters / 0.3048 | |
dataInInches = dataInMeters / 0.0254 | |
dataInMiles = dataInMeters / 1610 |
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 <iostream> | |
#include <boost/asio.hpp> | |
#include <boost/date_time/posix_time/posix_time.hpp> | |
void print(const boost::system::error_code&){ | |
std::cout<<"Hello, boost!"<<std::endl; | |
} | |
int main(){ | |
boost::asio::io_service io; |
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
As I discussed last time (msdn.microsoft.com/magazine/JJ553519), Cassandra is a “column-oriented” data store, which means that instead of storing identically structured tuples of data arranged according to a fixed structure (the table schema), Cassandra stores “column families” in “keyspaces.” In more descriptive terms, Cassandra associates a key value with a varying number of name/value pairs (columns) that might be entirely different from one “row” to another. | |
db.collection.find({}).sort($natural: -1}).limit(1); | |
http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2010/video-lectures/ |
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
var mongoose = require('mongoose'); | |
var db = mongoose.createConnection('127.0.0.1', 'test'); | |
// Make schema | |
var schema = mongoose.Schema({ name: String }); | |
// Create subscribers collection | |
var subscribers = []; | |
// Hook `save` post method |
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 <iostream> | |
int taxi(int one, int two, int three, int four) | |
{ | |
int cars = 0; | |
cars = four; | |
if((three - one) != 0) | |
{ | |
cars += three - one; | |
three = (three % one); |
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
var loopback = require('loopback'); | |
var Item = require('./models').Item; | |
var app = module.exports = loopback(); | |
app.model(Item); | |
app.use('/api', loopback.rest()); | |
app.listen(8080); | |
/* | |
GET /items | |
GET /items/count |
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
1 set number | |
2 set autoindent | |
3 set nocompatible | |
4 set autoindent | |
5 set backup | |
6 set nu | |
7 set smartindent | |
8 set showmatch | |
9 set textwidth=80 | |
10 set title |
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
Ext.require([ | |
'Ext.grid.*', | |
'Ext.data.*', | |
'Ext.panel.*', | |
'Ext.layout.container.Border' | |
]); | |
Ext.onReady(function(){ | |
var Mydata = [ | |
{ |