srcstr := filecontent[i-1]
srcstr = strings.TrimRight(srcstr, "\r\n")
srcstr = strings.TrimRight(srcstr, "\n")
h := md5.New()
h.Write([]byte(srcstr))
md5str := base64.URLEncoding.EncodeToString(h.Sum(nil))
md5str = strings.TrimRight(md5str, "==")
md5str = strings.Replace(md5str, "_", "/", -1)
md5str = strings.Replace(md5str, "-", "+", -1)
#define _XOPEN_SOURCE 700 /* for wcswidth and 700 is for mbsnrtowcs */ #include<wchar.h> #include<ncurses.h> /* ncurses.h includes stdio.h */ #include<stdlib.h> #include<string.h> #include<readline/readline.h> #include<locale.h> int mygetstr( char *str, int y, int x){ WINDOW *win; int size, col; int ok = 0; int width; wchar_t wstr[80]; char *p; getmaxyx(stdscr, size, col); void getaline( char *s){ str = s; rl_callback_handler_remove(); ok = 1; } rl_callback_handler_install( "" , getaline); win = newwin(1, col-x, y, x); while (1){ rl_callback_read_char(); ...
评论
发表评论