Attention: if you attempt to fork this gist, github will think that you are a spammer and you will have to confirm that you are human with them. Apparantly there are too many links in this list. Also I update it rather frequently (see revisions on the left), so it's probably wise to not fork it anyway.
This file contains hidden or 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
| /* | |
| ** Learn the data structure <Skip List> | |
| ** see also http://en.literateprograms.org/Skip_list_(Java) | |
| */ | |
| class SkipNode<E extends Comparable<? super E>> { | |
| public final E value; | |
| public final SkipNode<E>[] forward; // array of pointers | |
| @SuppressWarnings("unchecked") |
This file contains hidden or 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
| $(document).ready(function() { | |
| // Support for AJAX loaded modal window. | |
| // Focuses on first input textbox after it loads the window. | |
| $('[data-toggle="modal"]').click(function(e) { | |
| e.preventDefault(); | |
| var url = $(this).attr('href'); | |
| if (url.indexOf('#') == 0) { | |
| $(url).modal('open'); | |
| } else { |
This file contains hidden or 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
| """ | |
| 45度角打印矩阵,示例如下: | |
| <--------x,y(0,0) | |
| 1 2 3 4 5| | |
| 6 7 8 9 a| | |
| b c d e f| | |
| _ | |
| 打成: | |
This file contains hidden or 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
| #!/usr/bin/env scala | |
| !# | |
| import scala.collection.mutable.Map | |
| import java.io._ | |
| val rootDir = new File(args(0)) | |
| if (!rootDir.exists) throw new IllegalArgumentException(rootDir + " dose not exist") |
This file contains hidden or 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
| #!/usr/bin/env python | |
| #-*- coding: utf-8 -*- | |
| import urllib | |
| import urllib2 | |
| import json | |
| import re | |
| import time | |
| import datetime | |
| import csv |
This file contains hidden or 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 com.example; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| public class MinMax<T extends Comparable<T>> { | |
| private List<T> lst = null; | |
| public MinMax(List<T> com) |
This file contains hidden or 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
| /******************************************* | |
| * 参考http://howtonode.org/object-graphs-2 | |
| * *****************************************/ | |
| /** | |
| * 方法一:典型构造器方法 | |
| */ | |
| function Rectangle(width, height) { | |
| this.width = width; | |
| this.height = height; | |
| } |