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
#= CSV -> table 変換 | |
# :CSV ファイルを table タグに変換する | |
# 第1引数:変換対象の CSV ファイル名 | |
# 第2引数:align を c,l,l,r,r,l のように指定(省略可、デフォルトは "l") | |
#--------------------------------------------------------------------------------- | |
#++ | |
require 'csv' | |
# [CLASS] 引数 | |
class Arg |
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
@aidTable = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_" | |
def aidc2aidu(aid) | |
aidu = 0 | |
aid.split('').each do |c| | |
break if c == "@" | |
if v = @aidTable.index(c) | |
# aidu = aidu << 6 | |
# aidu = aidu | (v & 0x3f) |