从wpf应用程序迁移到Windows 10 uwp的新手。我知道之前曾有人问过这个问题,但没有一个能够解决我的问题。最近,我尝试按照GitHub页面https://github.com/vborovikov/hamburger上的说明为正在创建的uwp应用程序重新创建Hamburger菜单 。
一切都进行得很好,直到遇到错误“灾难性失败(HRESULT的异常:0x8000FFFF(E_UNEXPECTED))”。调试后,我意识到下面的代码行导致了错误
<Setter Property="BorderBrush" Value="{x:Null}" />
Run Code Online (Sandbox Code Playgroud)
只是为了从GitHub页面解释项目;假设您有一个空白的uwp xaml页面,则必须将2个文件shell.xaml和shell.xaml.cs添加到您的项目中,并修改app.xaml。进一步的说明在Github页面上。我添加了此内容,但运行此后遇到了错误。
我还尝试了http://windows.microsoft.com/en-gb/windows-vista/windows-update-error-8000ffff中的说明,但无济于事。我对解释很困惑,因为我找不到页面上描述的组件。
请任何建议将有所帮助。
我有一个List<List<int>[]>包含列表项目,例如
List<int> a= new List<int>(){ 2, 2, 3, 4, 5};
List<int> b= new List<int>() { 2, 2, 2, 6 };
List<List<int>[]> c = new List<List<int>[]>();
c.Add(new[]{a,b});
Run Code Online (Sandbox Code Playgroud)
我想检查c中包含的任何数组是否有2作为值.这或多或少是一个真或假的答案.
到目前为止,我可以使用Linq代码检查a或b是否包含2
var result = a.Any(p=> p==2); // this outputs 2
Run Code Online (Sandbox Code Playgroud)
将此扩展到c
var result=c.Any(p=> p.Select(value => value.Contains(2)).First());
Run Code Online (Sandbox Code Playgroud)
//上面的代码p => p.Select(value => value.Contains(2))返回一个Enumerable,我拿第一个.我不肯定这是使用linq解决这个问题的正确方法.有没有更好的方法呢?
该
void ReversePrint(Node* head)方法采用一个参数 - 链表的头部.你不应该从stdin/console读取任何输入.头部可能是空的,因此不应打印任何东西.以相反的顺序将链接列表的元素打印到stdout/console(使用printf或cout),每行一个.样本输入
1 - > 2 - > NULL
2 - > 1 - > 4 - > 5 - > NULL
样本输出
Run Code Online (Sandbox Code Playgroud)2 1 5 4 1 2
我用这个解决了它
#include <vector>
void ReversePrint(Node *head)
{
// This is a "method-only" submission.
// You only need to complete this method.
std::vector<int> nodeList;
if(head != NULL){
while(head != NULL){
nodeList.push_back(head->data);
head = head->next;
}
for (std::vector<int>::iterator it = nodeList.end()-1 ; it …Run Code Online (Sandbox Code Playgroud)