Skip to content

Instantly share code, notes, and snippets.

View maksadbek's full-sized avatar
💭
Chilling

maksadbek

💭
Chilling
View GitHub Profile
'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
#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;
@maksadbek
maksadbek / rubius.md
Last active August 29, 2015 14:03
ruby installation
#!/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
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/

Pub/sub with MongoDB and Node.js

Setup:

$ mongo
> use pubsub
> db.createCollection('messages', { capped: true, size: 100000 })
> db.messages.insert({})
@maksadbek
maksadbek / test.js
Created July 14, 2014 13:13 — forked from hfcorriez/test.js
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
#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);
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
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
Ext.require([
'Ext.grid.*',
'Ext.data.*',
'Ext.panel.*',
'Ext.layout.container.Border'
]);
Ext.onReady(function(){
var Mydata = [
{