Skip to content

Instantly share code, notes, and snippets.

@olupotd
olupotd / Simple
Last active December 30, 2015 08:49
A much simpler version of the Whole Application. Data structures
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.lang3.ArrayUtils;
/*
NB You shall need the org.apache.commons library installed on your system.
Get it from here or run this http://github.com/olupotd/installApache.sh script
like this if you are using Linux.
wget -c http://mirror.ucu.ac.ug/apache//commons/lang/binaries/commons-lang3-3.1-bin.tar.gz && tar -zxvf commons-lang3-3.1-bin.tar.gz
Go to your project properties and add it to them or just paste the jar files in your libs files in the Java Folder.
@olupotd
olupotd / DataStructures
Last active December 30, 2015 08:39
Simple Data Structures and Algorithms implementation
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
public class DataStructures {
//declared an array of
Object[] orderedList = {20,45,51,78,84,91,98};
int[] elems = {10,15,77,92,200};
List<Integer> list = new ArrayList<Integer>();
@olupotd
olupotd / Client_Server_Communicatio
Created December 2, 2013 07:20
A simple technique of retrieving all the document keys in a couchdb app
import java.io.*
class Client_Server_Communication
{
private static String msg = "";
private static Socket socket;
private static ServerSocket sever;
static DataInputStream in;
static DataOutputStream out;
@olupotd
olupotd / gist:7655081
Created November 26, 2013 08:29
A simple commanding manager for your apps.
#!flask/bin/python
from migrate.versioning import *
from config import SQLALCHEMY_DATABASE_URI
from config import SQLALCHEMY_MIGRATE_REPO
from app import db
import os.path
db.create_all()
if not os.path.exists(SQLALCHEMY_MIGRATE_REPO):
api.create(SQLALCHEMY_MIGRATE_REPO, 'database repository')
api.version_control(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO)