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
#r "nuget:Microsoft.AspNetCore.WebUtilities" | |
using System.Net.Http; | |
using Microsoft.AspNetCore.WebUtilities; | |
using System.Text.Json; | |
using System.Threading.Tasks; | |
// 查詢台北公車 | |
var api = $"https://ptx.transportdata.tw/MOTC/v2/Bus/EstimatedTimeOfArrival/City/Taipei/307"; | |
var filter = $"stopId eq '15250'"; // 站牌代號 |
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
async Task Main() | |
{ | |
var key = "2330"; | |
var url = $"https://tw.stock.yahoo.com/quote/{key}"; | |
var config = AngleSharp.Configuration.Default.WithDefaultLoader( | |
new LoaderOptions | |
{ | |
IsResourceLoadingEnabled = true | |
}); |
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
<Query Kind="Program"> | |
<NuGetReference>AutoMapper</NuGetReference> | |
<Namespace>AutoMapper</Namespace> | |
</Query> | |
void Main() | |
{ | |
Sut().Dump(); | |
} |
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
[{ | |
"date": "2021-11-01", | |
"income": 40000, | |
"expense": 7270, | |
"surplus": 32730 | |
}, { | |
"date": "2021-12-01", | |
"income": 42253, | |
"expense": 12940, | |
"surplus": 29313 |
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
[{"date":"2010-01-01","assets":1000000},{"date":"2010-02-01","assets":1005071},{"date":"2010-03-01","assets":971782},{"date":"2010-04-01","assets":951410},{"date":"2010-05-01","assets":921696},{"date":"2010-06-01","assets":935989},{"date":"2010-07-01","assets":955785},{"date":"2010-08-01","assets":963051},{"date":"2010-09-01","assets":957508},{"date":"2010-10-01","assets":966978},{"date":"2010-11-01","assets":954005},{"date":"2010-12-01","assets":930165},{"date":"2011-01-01","assets":930158},{"date":"2011-02-01","assets":912424},{"date":"2011-03-01","assets":937339},{"date":"2011-04-01","assets":965512},{"date":"2011-05-01","assets":944426},{"date":"2011-06-01","assets":912848},{"date":"2011-07-01","assets":896753},{"date":"2011-08-01","assets":871802},{"date":"2011-09-01","assets":838515},{"date":"2011-10-01","assets":877834},{"date":"2011-11-01","assets":868697},{"date":"2011-12-01","assets":858742},{"date":"2012-01-01","assets":827313},{"date":"2012-02-01","assets":810711},{"date":"2012-03-01","assets":840 |
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
async Task Main() | |
{ | |
var pttUser = ""; | |
var page = 1; | |
var crawlar = new PttMessageCrawler(); | |
var result = await crawlar.GetMessages(pttUser, page); | |
result.Dump(); | |
} |
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
# Your init script | |
# | |
# Atom will evaluate this file each time a new window is opened. It is run | |
# after packages are loaded/activated and after the previous editor state | |
# has been restored. | |
# | |
# An example hack to log to the console when each text editor is saved. | |
# | |
# atom.workspace.observeTextEditors (editor) -> | |
# editor.onDidSave -> |