var sbLeft =
this.el.FindResource(
"sbLeft")
as Storyboard;
var sbSlow =
this.el.FindResource(
"sbSlow")
as Storyboard;
var sbRight =
this.el.FindResource(
"sbRight")
as Storyboard;
var sbLeft1 =
this.el1.FindResource(
"sbLeft1")
as Storyboard;
var sbSlow1 =
this.el1.FindResource(
"sbSlow1")
as Storyboard;
var sbRight1 =
this.el1.FindResource(
"sbRight1")
as Storyboard;
var sbLeft2 =
this.el2.FindResource(
"sbLeft2")
as Storyboard;
var sbSlow2 =
this.el2.FindResource(
"sbSlow2")
as Storyboard;
var sbRight2 =
this.el2.FindResource(
"sbRight2")
as Storyboard;
var sbLeft3 =
this.el3.FindResource(
"sbLeft3")
as Storyboard;
var sbSlow3 =
this.el3.FindResource(
"sbSlow3")
as Storyboard;
var sbRight3 =
this.el3.FindResource(
"sbRight3")
as Storyboard;
//第一个点第一个动画结束后开启缓动,第二个点启动 sbLeft.Completed += (a, b) =>
{
sbSlow.Begin();
el1.Opacity =
1;
sbLeft1.Begin();
};
//第一个点缓动结束,右边动画启动 sbSlow.Completed += (a, b) => sbRight.Begin();
sbRight.Completed += (a, b) => el.Opacity =
0;
//以下类推 sbLeft1.Completed += (a, b) =>
{
sbSlow1.Begin();
el2.Opacity =
1;
sbLeft2.Begin();
};
sbSlow1.Completed += (a, b) => sbRight1.Begin();
sbRight1.Completed += (a, b) => el1.Opacity =
0;
sbLeft2.Completed += (a, b) =>
{
sbSlow2.Begin();
el3.Opacity =
1;
sbLeft3.Begin();
};
sbSlow2.Completed += (a, b) => sbRight2.Begin();
sbRight2.Completed += (a, b) => el2.Opacity =
0;
sbLeft3.Completed += (a, b) => sbSlow3.Begin();
sbSlow3.Completed += (a, b) => sbRight3.Begin();
//最后一个点动画结束,第一个点重启 如此循环 sbRight3.Completed += (a, b) =>
{
el3.Opacity =
0;
el.Opacity =
1;
sbLeft.Begin();
};
}
publicvoid Start()
{
var sb =
this.el.FindResource(
"sbLeft")
as Storyboard;
this.el.Opacity =
1;
if (sb !=
null)
sb.Begin();
}
publicevent PropertyChangedEventHandler PropertyChanged;
privatevoid NotifyPropertyChanged(String propertyName =
"")
{
if (PropertyChanged !=
null)
{
PropertyChanged(
this,
new PropertyChangedEventArgs(propertyName));
}
}
}
web.xml报错
The content of element type "web-app" must match "(icon?,display-
name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,s
JUnit4:Test文档中的解释:
The Test annotation supports two optional parameters.
The first, expected, declares that a test method should throw an exception.
If it doesn't throw an exception or if it
借鉴网上的思路,用java实现:
public class NoIfWhile {
/**
* @param args
*
* find x=1+2+3+....n
*/
public static void main(String[] args) {
int n=10;
int re=find(n);
System.o
在Linux中执行.sh脚本,异常/bin/sh^M: bad interpreter: No such file or directory。
分析:这是不同系统编码格式引起的:在windows系统中编辑的.sh文件可能有不可见字符,所以在Linux系统下执行会报以上异常信息。
解决:
1)在windows下转换:
利用一些编辑器如UltraEdit或EditPlus等工具
Binary search tree works well for a wide variety of applications, but they have poor worst-case performance. Now we introduce a type of binary search tree where costs are guaranteed to be loga