#Build
$ cd tmp
$ git clone <this gist> timelineview
$ cd timelineview
$ git clone https://github.com/alphaKAI/twitter4d
$ cp twitter4d/source/twitter4d.d .
$ (any editor) setting.json#Build
$ cd tmp
$ git clone <this gist> timelineview
$ cd timelineview
$ git clone https://github.com/alphaKAI/twitter4d
$ cp twitter4d/source/twitter4d.d .
$ (any editor) setting.json| import gtk.MainWindow, | |
| gtk.Button, | |
| gtk.Widget, | |
| gtk.Label, | |
| gtk.Entry, | |
| gtk.Main, | |
| gtk.VBox, | |
| gtk.HBox; | |
| import core.thread; |
| import std.stdio, | |
| std.string, | |
| std.array, | |
| std.net.curl, | |
| std.format, | |
| std.algorithm, | |
| std.ascii; | |
| static string urlEncode(string urlString){ | |
| // Exclude A..Z a..z 0..9 - . _ ~ |
| import std.stdio, | |
| std.conv; | |
| immutable string[] fb = { | |
| string[] t; | |
| foreach(i;1..401) | |
| t ~= !(i % 15) ? "FizzBuzz" : | |
| !(i % 3) ? "Fizz" : | |
| !(i % 5) ? "Buzz" : i.to!string; | |
| return t; |
| import std.stdio; | |
| void main(){ | |
| string charset = "abcdefghijklmnopqrstuvwxyz0123456789_"; | |
| string[] strs; | |
| foreach(w; charset) | |
| foreach(x; charset) | |
| foreach(y; charset) | |
| foreach(z; charset) | |
| strs[++strs.length - 1]= cast(string)[w, x, y, z]; |
| batterywidget = wibox.widget.textbox() | |
| batterywidget:set_text(" | Battery | ") | |
| batterywidgettimer = timer({ timeout = 1 }) | |
| batterywidgettimer:connect_signal("timeout", | |
| function() | |
| now = tonumber(io.open("/sys/class/power_supply/BAT1/energy_now", "r"):read("*a")) | |
| full = tonumber(io.open("/sys/class/power_supply/BAT1/energy_full", "r"):read("*a")) | |
| chars = tonumber(io.open("/sys/class/power_supply/ADP1/online", "r"):read("*a")) | |
| cur = now / full * 100 | |
| import std.stdio, | |
| std.array, | |
| std.algorithm; | |
| void main(){ | |
| ((()=>"H")()~(()=>"e")() ~(()=>"l")()~(()=>"l")()~(()=>"o")()~(()=>" ")()~(()=>"w")()~(()=>"o")()~(()=>"r")()~(()=>"l")()~(()=>"d")()).writeln; | |
| ([()=>"H", ()=>"e", ()=>"l", ()=>"l", ()=>"o", ()=>" ", ()=>"w", ()=>"o", ()=>"r", ()=>"l", ()=>"d"].map!(x => x())).join.writeln; | |
| } |
| core.thread.ThreadException@src/core/thread.d(702): Error creating thread | |
| ---------------- | |
| ./add(void add.loop(ref long)+0x96) [0x42b95e] | |
| ./add(_Dmain+0x19) [0x42baf1] | |
| ./add(_D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv+0x1f) [0x4306c3] | |
| ./add(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x2a) [0x430616] | |
| ./add(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll()+0x30) [0x43067c] | |
| ./add(void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate())+0x2a) [0x430616] | |
| ./add(_d_run_main+0x193) [0x430597] | |
| ./add(main+0x17) [0x42c657] |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| typedef struct tagListNode{ | |
| struct tagListNode * next, | |
| * prev; | |
| int data; | |
| } ListNode; | |
| typedef struct tagListStruct{ |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| //ユーザー名の最大 : 20 + 1(null文字) | |
| #define USER_NAME_MAX_LENGTH 21 | |
| //Flag Defines | |
| #define MONEY_STATUS 1 | |
| #define VERSION "0.0.1" |