Skip to content

Instantly share code, notes, and snippets.

{"app_vendor":"Neptune Software Group","app_version_nm":"1.0.2","app_prev_version":"1.0.1","app_download_url":"http://192.168.2.251:8080/OrbitLite/Orbit.apk","app_name":"OrbitLite","app_version_cd":"1"}
<?
$value[] = null;
$result = mysql_query("SELECT * FROM users WHERE uname='$uname'") or die(mysql_error());
$row = mysql_fetch_array($result);
if($row)
{
$title = $row['title'];
$val = unseralize($row['values']);
for ($val as $v){
$value[] = unseralize($v);
@olupotd
olupotd / sources.list
Created February 17, 2014 20:09
A sources list file for 12.04 ubuntu default
deb http://archive.ubuntu.com/ubuntu precise main universe restricted multiverse
deb http://archive.ubuntu.com/ubuntu precise-security universe main multiverse restricted
deb http://archive.ubuntu.com/ubuntu precise-updates universe main multiverse restricted
deb http://archive.ubuntu.com/ubuntu precise-proposed universe main multiverse restricted
@olupotd
olupotd / openGl_installer.sh
Created December 19, 2013 14:01
OpenGL installation
#!/usr/bin/sh
sudo apt-get update
#OpenGL:
sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev
#OpenAL:
sudo apt-get install libopenal0a libopenal-dev
#ALUT:
sudo apt-get install libalut0 libalut-dev
@olupotd
olupotd / Listing
Created December 5, 2013 16:58
Linked List
import java.util.*;
public class Listing {
LinkedList ll = new LinkedList();
Listing()
{
//adding an item to the list
l.add(3);
l.add(2);
@olupotd
olupotd / Binary
Created December 5, 2013 15:12
Binary Search
#include <stdio.h>
int main()
{
int c, first, last, middle, n, search, array[100];
printf("Enter number of elements\n");
scanf("%d",&n);
@olupotd
olupotd / Insertion
Created December 5, 2013 14:45
Insertion Sort in Brief
Here's the algorithm for this type of sort. please implement it also
so that you can learn. Thanks.
function insertionSort(array A)
for i from 1 to length[A]-1 do
value := A[i]
j := i-1
while j >= 0 and A[j] > value do
A[j+1] := A[j]
j := j-1
@olupotd
olupotd / Selection
Created December 5, 2013 14:41
Selection Sort in C
#include <stdio.h>
int main()
{
int array[100], n, c, d, position, swap;
printf("Enter number of elements\n");
scanf("%d", &n);
@olupotd
olupotd / BubbleSort
Created December 5, 2013 14:36
Bubble Sort in C
#include<stdio.h>
int numb[8];
int i, j, temp;
int main(int argc, char* argv[])
{
//populate the array
while(i < sizeof(numb)){
numb[i] = i+2;
@olupotd
olupotd / Bubble
Created December 5, 2013 14:31
Bubble sort in C++
#include<iostream>
using namespace std;
int numb[20];
int i (0), j (0), temp;
int main(int argc, char* argv[])
{
while(i < sizeof(numb)){
numb[i] = i+2;