当我尝试解析这样的日期时:
DateTime t1 = DateTime.ParseExact("August 11, 2013, 11:00:00 PM", "MMMM dd, yyyy, hh:mm:ss tt", System.Globalization.CultureInfo.InvariantCulture);
Run Code Online (Sandbox Code Playgroud)
它工作正常,但当我做这样的事情:
string s ="?August ?11, ?2013, ??11:00:00 PM";
DateTime t = DateTime.ParseExact(s, "MMMM dd, yyyy, hh:mm:ss tt", System.Globalization.CultureInfo.InvariantCulture);
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
mscorlib.ni.dll中出现"System.FormatException"类型的异常,但未在用户代码中处理
我的应用程序中有一个案例,我需要在应用程序离线时向用户设备发送推送通知,并显示为Toast通知.
当用户点击toast消息时,我需要根据消息导航到我的应用程序中的特定页面.我知道这在吐司通知中可用,但我可以将参数从我的服务器发送到吐司以确定页面吗?
toast push-notification windows-phone-7 windows-phone-8 mpns
我发现这种使用i元素将默认图标添加到任何HTML页面的方法: W3.CSS Icons
我可以通过添加图像来使用相同的方式来使用自定义图标吗?
更改后添加标记:
<li class="treeview">
<a href="#"><span class="icon"></span><span>Main Itmes</span> <i class="fa fa-angle-left pull-right"></i></a>
<ul class="treeview-menu">
<li>
<a href="/Page1.aspx">Item1</a>
</li>
<li>
<a href="/Page2.aspx">Item2</a>
</li>
<li>
<a href="/Pagee3.aspx">Item3</a>
</li>
</ul>
</li>
Run Code Online (Sandbox Code Playgroud)
CSS:
<style>
.icon {
background: url("Images/logo.png");
height: 20px;
width: 20px;
display: block;
/* Other styles here */
}
</style>
Run Code Online (Sandbox Code Playgroud) 当我尝试通过模板在Windows Phone 8中将我的地图添加用户位置标记时,所有点都会出现在地图的左上角.我确信我有不同的位置这是我的代码:
<maps:Map x:Name="myMap" Center="{Binding CenterPoint}" ZoomLevel="5">
<toolkit:MapExtensions.Children>
<ItemsControl ItemsSource="{Binding AllLocations}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Grid/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<toolkit:MapChildControl>
<toolkit:UserLocationMarker Background="Blue" Foreground="Green" GeoCoordinate="{Binding coordinate,Converter={StaticResource GeoCoordinateConverter}}"/>
</toolkit:MapChildControl>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</toolkit:MapExtensions.Children>
</maps:Map>
Run Code Online (Sandbox Code Playgroud) 我有一个表,我想在实体框架工作中执行以下操作:
1-从对象返回一些列而不是所有列(我为这个新类型创建了新类,只包含我需要的列,并在select语句中返回其中的值.
2-返回列应按某些列分组,其中两列将包含计数值.(这是我的问题).
有关更多说明:我需要在Entity Framework中对我的数据集的可共享对象映射以下查询:
select SUM (Col1) SUM_Col1, SUM (Col2) SUM_Col2, COUNT (*) RECORDS, Col3, Col4, Col5
from myTable
where col3 = 'some value'
group by Col3, Col4, Col5;
Run Code Online (Sandbox Code Playgroud)
我的分组审判如下:
query = from record in context.tables
group record by new
{
record.Col3,
record.Col4,
record.Col5,
} into g
select new QueryResult
{
Col1 = (need Sum of Col1 here),
Col2 = (need Sumn of Col2 here),
Col3 = g.Key.Col3,
Col4 = g.Key.Col4,
Col5 = g.Key.Col5,
Col6 = ( need count …Run Code Online (Sandbox Code Playgroud)