This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" let Vundle manage Vundle, required | |
Plugin 'gmarik/Vundle.vim' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerName localhost | |
ServerAdmin admin@web.com | |
DocumentRoot /var/www/html/laravel/public | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride All | |
</Directory> | |
<Directory /var/www/html/laravel/public/> | |
Options Indexes FollowSymLinks MultiViews |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int fact(int n){ | |
if (n<1) return 1; | |
else | |
return n*fact(n-1); | |
} | |
fact: | |
SUB sp,sp,#8 ;Adjust stack for 2 times | |
STR lr,[sp,#4] ;Save return address | |
STR r0,[sp,#0] ;Save argument n | |
CMP r0,#1 ;compare n to 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fact: ; fact 3 r0=3 | |
SUB sp,sp,#8 ;Adjust stack for 2 times | |
STR lr,[sp,#4] ;Save return address | |
STR r0,[sp,#0] ;Save argument n | |
CMP r0,#1 ;compare n to 1 ; r0=3 ~~~ 1 | |
;BGE L1 | |
SUB r0,r0,#1 ;else decrement n | |
BL fact ;Recursive caller ; r0=2 | |
SUB sp,sp,#8 ;Adjust stack for 2 times |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_ssl.c> | |
<VirtualHost _default_:443> | |
ServerAdmin supagorn@kmi.tl | |
ServerName CEDD | |
ServerAlias cedd.cloudapp.net | |
DocumentRoot /var/www/html/laravel/public | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride All |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.PriorityQueue; | |
import java.util.List; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Scanner; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
class Vertex implements Comparable<Vertex> { | |
public final String name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.math.BigInteger; | |
import java.security.SecureRandom; | |
public class RSA { | |
private static BigInteger n; | |
private static BigInteger d; | |
private static BigInteger e; | |
public static BigInteger randomPrimeBigIntegerRange(int bitLengthFrom, int bitLengthtTo){ | |
SecureRandom rnd = new SecureRandom(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math/big" | |
"time" | |
mRand "math/rand" | |
cRand "crypto/rand" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DATABASE IF NOT EXISTS `leafbox` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; | |
USE `leafbox`; | |
CREATE TABLE IF NOT EXISTS `book` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`isbn` varchar(13) COLLATE utf8_unicode_ci DEFAULT NULL, | |
`title` text COLLATE utf8_unicode_ci NOT NULL, | |
`author` text COLLATE utf8_unicode_ci, | |
`translate` text COLLATE utf8_unicode_ci, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Route::pattern('id', '[0-9]+'); | |
//,'https'=>'https' | |
Route::group(array(), function(){ | |
//--Home | |
Route::group(array(), function(){ | |
// Index | |
Route::get('/',array('as'=>'home','uses'=>'HomeController@showIndex')); | |
Route::get('home',array('uses'=>'HomeController@showIndex')); |
OlderNewer