如您所知,Jalali 日历每四年有一次飞跃(当然,也有一些例外)
而不是一年 365 天,它有 366 天 :)
另一个问题是有些月份是 29 天,有些月份是 30 天,有些月份是 31 天:|
我使用矩库来生成这些日期(当然使用 fa 方法)
这个网站叫????? 做得很好。
var moment = require('moment-jalaali')
moment().format('jYYYY/jM/jD')
Run Code Online (Sandbox Code Playgroud)
现在我的问题是如何确定哪些月份是 29、30 和 31,哪一年是闰年?
我在活动中间有一个布局(或标签布局),我希望当用户滚动并且此布局到达顶部时,它保持在顶部(替换工具栏),其余内容保持滚动.例如,我的页面如下所示:
________________________________
| custom toolbar |
|------------------------------|
| |
| some content |
| |
|------------------------------|
| layout (or tab layout) |
|------------------------------|
| |
| rest of the contents |
| |
| |
| |
| |
|______________________________|
Run Code Online (Sandbox Code Playgroud)
滚动后我希望它像这样:
________________________________
| layout (or tab layout) |
|------------------------------|
| |
| rest of the contents |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|______________________________|
Run Code Online (Sandbox Code Playgroud)
有点像Play商店应用中的"我的应用和游戏"页面.
我是休息webservices的新手,我试着了解如何使用它们.
我在C#中定义一个http get请求,如下所示:
static string HttpGet(string url)
{
HttpWebRequest req = WebRequest.Create(url)
as HttpWebRequest;
string result = null;
using (HttpWebResponse resp = req.GetResponse()
as HttpWebResponse)
{
StreamReader reader =
new StreamReader(resp.GetResponseStream());
result = reader.ReadToEnd();
}
return result;
}
Run Code Online (Sandbox Code Playgroud)
然后我在一个按钮中使用HttpGet从这个天气webservice 获取xml数据(我把txtOut发现我的代码工作).
private void btnGet_Click(object sender, RoutedEventArgs e)
{
string test = HttpGet("http://api.openweathermap.org/data/2.5/weather?q=London&mode=xml");
txtOut.Text = test;
}
Run Code Online (Sandbox Code Playgroud)
它将整个xml从发送获取请求发送到该URL:http://api.openweathermap.org/data/2.5/weather?q = London&mode = xml
所以我的问题是如何在变量中保存该xml的特定部分?像卡尔文的最低温度,所以我可以将其转换为华氏温度或摄氏温度.
请帮帮我.