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
| define pustring | |
| if $argc == 0 | |
| help pustring | |
| else | |
| if $arg0.str_ == 0 | |
| printf "String \t\t\t= NULL\n" | |
| else | |
| printf "String \t\t\t= \"%s\"\n", $arg0._str | |
| end | |
| printf "String length/size \t= %u/%u\n", $arg0.length_, $arg0.max_size_ |
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
| ;; use appt-convert-time instead if appt is loaded | |
| (defun iy/convert-time (time2conv) | |
| "Convert hour:min[am/pm] format TIME2CONV to minutes from midnight. | |
| A period (.) can be used instead of a colon (:) to separate the | |
| hour and minute parts." | |
| ;; Formats that should be accepted: | |
| ;; 10:00 10.00 10h00 10h 10am 10:00am 10.00am | |
| (let ((min (if (string-match "[h:.]\\([0-9][0-9]\\)" time2conv) | |
| (string-to-number (match-string 1 time2conv)) | |
| 0)) |
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 ruby | |
| # A script move removed file or direcotry to trash. It is compatible with Thunar, | |
| # so I have not implemented trash file listing and recovering, you can use Thunar | |
| # to do that. This file depends on trash.rb | |
| $VERBOSE = true | |
| require "optparse" | |
| require "fileutils" |
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
| #include <iostream> | |
| class OnErrorHandlerBase | |
| { | |
| public: | |
| virtual ~OnErrorHandlerBase() {} | |
| virtual void on_error(int error) = 0; | |
| }; | |
| template<typename Func> |
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
| set terminal png transparent truecolor size 1200 800 | |
| set output "time1.png" | |
| set terminal png font "DejaVuSansMono" | |
| set title "Query Time" | |
| set xtics nomirror rotate by -45 | |
| set xlabel "Keywords" | |
| set ylabel "Time(s)" | |
| set style data linespoints | |
| set key autotitle columnheader |
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
| import org.json.simple.JSONObject; | |
| class CmClient | |
| { | |
| private String cmServerUrl; | |
| public CmClient(String url) | |
| { | |
| cmServerUrl = url; | |
| } |
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
| #--- | |
| # Author:: Ian Yang | |
| # Created:: <2010-05-24 16:18:23> | |
| #+++ | |
| # | |
| require 'pp' | |
| def optimal_choise(diff) | |
| optimal_value = 0 | |
| optimal_index = 0 |
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
| #--- | |
| # Author:: Ian Yang | |
| # Created:: <2010-05-24 19:44:53> | |
| #+++ | |
| # | |
| require 'pp' | |
| class Strategy | |
| attr_accessor :penalty | |
| attr_accessor :debug |
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
| #--- | |
| # Author:: Ian Yang | |
| # Created:: <2010-05-24 19:44:53> | |
| #+++ | |
| # | |
| require 'pp' | |
| class Strategy | |
| attr_accessor :penalty | |
| attr_accessor :debug |
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
| CC = g++ | |
| LD = $(CC) | |
| CC_FLAGS = -O2 -g0 -Wall | |
| LD_FLAGS = | |
| SRC = $(wildcard *.cpp) | |
| OBJ = $(SRC:.cpp=.o) | |
| BIN = $(SRC:.cpp=) |