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
Commands = new Dictionary<string, Command>() { { "はい", null }, { "いいえ", null }, { "教えて", null } }; |
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
_rec = new SpeechRecognitionEngine(new System.Globalization.CultureInfo("ja-JP")); |
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
<rss version="2.0" xmlns:p="http://pinga.mu/terms/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:dcndl="http://ndl.go.jp/dcndl/terms/" xmlns:dc="http://purl.org/dc/elements/1.1/"> | |
<channel> | |
<title>すぱこー</title> | |
<link>http://pronama.azurewebsites.net/tag/spaco/</link> | |
<description>高校生の暮井 慧(プロ生ちゃん)と、部活「情報処理研究会」のメンバー 戸増千由莉とフィネス・ヒルヴィレッジが活躍する Web 4コマ漫画「すぱこー」!</description> | |
<pubDate>Sun, 15 Nov 2015 12:30:39 GMT</pubDate> | |
<image>http://pronama.azurewebsites.net/wp-content/uploads/2015/05/spaco_banner.png</image> | |
<dc:creator>池村ヒロイチ</dc:creator> | |
<item> |
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
app.UseTwitterAuthentication( | |
New TwitterAuthenticationOptions With { | |
.ConsumerKey = "xxx", | |
.ConsumerSecret = "xxx", | |
.Provider = New TwitterAuthenticationProvider With { | |
.OnAuthenticated = Async Function(context) | |
context.Identity.AddClaim(New Claim("urn:tokens:twitter:accesstoken", context.AccessToken)) | |
context.Identity.AddClaim(New Claim("urn:tokens:twitter:accesstokensecret", context.AccessTokenSecret)) | |
End Function | |
}, |
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
static void Main(string[] args) | |
{ | |
var birthDate = GetBathDate("5zj").Result?.Trim(); | |
Console.WriteLine(birthDate); | |
// birthDate の例: | |
// "誕生日 1990年7月7日" | |
// "誕生日 July 07" | |
// "誕生日 1990" | |
// 英語の場合: |
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
static public async Task<string> GetBathDate(string screenName) | |
{ | |
// ユーザープロフィールページの HTML 取得 | |
string html; | |
using (var client = new WebClient() { Encoding = Encoding.UTF8 }) | |
{ | |
html = await client.DownloadStringTaskAsync("https://twitter.com/" + screenName); | |
} | |
// <span class="ProfileHeaderCard-birthdateText u-dir" dir="ltr"> 直下の <span> のテキスト値取得 |
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
<div class="ProfileHeaderCard-birthdate "> | |
<span class="Icon Icon--balloon Icon--medium"></span> | |
<span class="ProfileHeaderCard-birthdateText u-dir" dir="ltr"><span class="js-tooltip" title="公開"> 誕生日 January 11 | |
</span> | |
</span> |
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
Imports CoreTweet | |
Module Module1 | |
Sub Main() | |
Dim consumerKey = "***" | |
Dim consumerSecret = "***" | |
Dim accessToken = "***" | |
Dim accessSecret = "***" |
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
public class SharedCountReulst | |
{ | |
public string Url { get; set; } | |
public long MaxId { get; set; } | |
public int Count { get; set; } | |
} | |
public static SharedCountReulst Count(string url, long sinceId) | |
{ | |
var tokens = CoreTweet.Tokens.Create(consumerKey, consumerSecret, accessToken, accessTokenSecret); |
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
Public Class FooTraceListener | |
Inherits TraceListener | |
Public Overrides Sub Write(message As String) | |
' どこかに出力する | |
End Sub | |
Public Overrides Sub WriteLine(message As String) | |
' どこかに出力する | |
End Sub |