Skip to content

Instantly share code, notes, and snippets.

View Winiex's full-sized avatar
🎯
Focusing

winiex Winiex

🎯
Focusing
View GitHub Profile
@Winiex
Winiex / infix-to-postfix-regexp.js
Created October 30, 2012 01:30 — forked from DmitrySoshnikov/infix-to-postfix-regexp.js
JavaScript : Infix to postfix notation RegExp converter
/**
* Infix to postfix notation RegExp converter
*
* To implement RegExp machine (NFA, DFA) we need
* to transform first RegExp string to postfix notation
* for more convinient work with the stack. This function
* does exactly this.
*
* See: http://swtch.com/~rsc/regexp/regexp1.html
*
@Winiex
Winiex / SquareGridLayout.java
Created October 4, 2012 14:00 — forked from tomgibara/SquareGridLayout.java
Square grid layout for Android
package com.tomgibara.android.util;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.View;
import android.view.ViewGroup;
/**
* A layout that arranges views into a grid of same-sized squares.
@Winiex
Winiex / DashboardLayout.java
Created September 30, 2012 19:40 — forked from romannurik/DashboardLayout.java
Android - DashboardLayout
/*
* ATTENTION:
*
* This layout is now maintained in the `iosched' code.google.com project:
*
* http://code.google.com/p/iosched/source/browse/android/src/com/google/android/apps/iosched/ui/widget/DashboardLayout.java
*
*/
/*
@Winiex
Winiex / quick.c
Created August 17, 2012 13:09 — forked from rohit-nsit08/quick.c
C: Quick Sort
//quick sort
#include<stdio.h>
void quicksort(int*arr,int left, int right);
int partition(int *arr,int left,int right);
int main()
{
int arr[6]={5,4,1,2,8,3};
int i;
@Winiex
Winiex / quicksort.rb
Created August 17, 2012 12:44 — forked from felipernb/quicksort.rb
Ruby: Quick Sort
#In-place QuickSort
def quicksort(a, l = 0, r = a.length)
return a if l >= r
p = partition(a,l,r)
quicksort(a, l, p)
quicksort(a, p+1, r)
a
end
def partition(a, l, r)