我想做一个随时间减少的酒吧.
使用的xaml是
<Grid x:Name="LayoutRoot" Background="Transparent">
<TextBlock Text="Timer :-" FontSize="35" Width="120" Height="70" Margin="138,167,222,531" ></TextBlock>
<TextBlock x:Name="clock" FontSize="35" Width="100" Height="70" Margin="259,169,121,529" ></TextBlock>
<Image x:Name="bar" Width="350" Height="20" Source="Assets/progress_bar_bg.png" Margin="65,271,65,477" ></Image>
<Image x:Name="gbar" Width="350" Height="20" Source="Assets/green_progress_bar.png" Margin="65,271,65,477" ></Image>
</Grid>
Run Code Online (Sandbox Code Playgroud)
我的c#代码是
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using System.Windows.Threading;
using Microsoft.Phone.Shell;
namespace PhoneApp1
{
public partial class ProgressBar : PhoneApplicationPage
{
public ProgressBar()
{
InitializeComponent();
newTimer.Interval = TimeSpan.FromSeconds(1);
newTimer.Tick += OnTimerTick;
newTimer.Start();
clock.Text = " …Run Code Online (Sandbox Code Playgroud) 我正在编写Elasticsearch聚合查询以查找可用的总数:
GET zap/_search
{
"aggregations": {
"Brand_Name_Count": {
"terms": {"field": "brand_name", "size" : 0}
},
"Stock_Status_Count" : {
"terms" : { "field" : "stock_status", "size" : 50}
},
"Category_Id_Count" : {
"terms" : { "field" : "category_id", "size" : 50}
}
}
}
Run Code Online (Sandbox Code Playgroud)
我正在得到正确的计数.我如何在PHP代码中编写这些类型的查询?由于我是elasticsearch的新手,任何帮助都会有所帮助