Skip to content

Instantly share code, notes, and snippets.

View dtinth's full-sized avatar
🎶
𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪

Thai Pangsakulyanont dtinth

🎶
𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪𒐪
  • @bemusic                 @creatorsgarten                 @eventpop                 @showdownspace                 @spacetme                @wonderfulsoftware                
  • Krungthepmahanakhonamonrattanakosinmahintharayutthayamahadilokphopnoppharatratchathaniburiromudomratchaniwetmahasathanamonphimanawatansathitsakkathattiyawitsanukamprasit (Bangkok), Thailand
  • YouTube @dtinth
View GitHub Profile
@dtinth
dtinth / Main.java
Created May 17, 2012 16:50
Example of using Polymorphism for Strategy/Command pattern in Java
import java.util.Scanner;
interface Operator {
int calc(int a, int b);
}
class Add implements Operator {
public int calc(int a, int b) { return a + b; }
}
class Sub implements Operator {
using System;
using System.Collections.Generic;
namespace PreExceed_Karaoke
{
class Program
{
static void Main(string[] args)
{
List<int> l = new List<int>();
@dtinth
dtinth / rainbow.vim
Created July 7, 2012 05:19
Rainbow Comments
" rainbow comments!!
let s:currentcolor = 9
function! ChangeColor()
let s:currentcolor += 1
if s:currentcolor >= 15
let s:currentcolor = 9
end
exe "hi Comment ctermfg=" . s:currentcolor
endfunction
@dtinth
dtinth / code.js
Created July 28, 2012 05:31
Running Ruby
print("Enter your name: ")
puts("Hello, " + gets())
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import org.mozilla.javascript.*;
public class Main {
static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
@dtinth
dtinth / SortByLength.java
Created September 23, 2012 14:56
Java vs Ruby
import java.util.*;
public class SortByLength {
private static Scanner scanner = new Scanner(System.in);
public static void main(String[] args) {
String[] strings = new String[Integer.parseInt(scanner.nextLine())];
for (int i = 0; i < strings.length; i ++) {
strings[i] = scanner.nextLine();
}
Arrays.sort(strings, new Comparator<String>() {
@dtinth
dtinth / proof.md
Last active October 11, 2015 18:08
a^2 - 3 is never divisible by 9.

(a^2 - 3) is never divisible by (9).

Proof

Suppose that (a) is any positive integer, we must show that

$$ a^2 - 3 = 9n + r; n \in \mathbb{Z}, r \in \mathbb{Z}, 0 < r < 9 $$

@dtinth
dtinth / 01-hello.md
Last active October 11, 2015 18:17
Pagist Kitchen Sink

Kitchen Sink

This is a kitchen sink.

A beautiful math inside a blockquote:

( \begin{aligned} \dot{x} & = \sigma(y-x) \ \dot{y} & = \rho x - y - xz \

@dtinth
dtinth / 00-MathJaxConfig.html
Created October 17, 2012 03:05
Discrete Mathematics 2012 Midterm
<script type="text/x-mathjax-config">MathJax.Hub.Config({ TeX: { Macros: {
'NOT': '{\\sim}'
, 'AND': '\\wedge'
, 'OR': '\\vee'
, 'IMPL': '\\rightarrow'
, 'IMPLL': '\\Rightarrow'
, 'IFF': '\\leftrightarrow'
, 'IFFF': '\\Leftrightarrow'
, 'EQUIV': '\\equiv'
, 'taut': '\\textbf{t}'
@dtinth
dtinth / mergesortlinkedlist.c
Created October 18, 2012 17:08
linked list
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#define DEBUG 1
typedef struct CELL *LIST;