我有一个Windows窗体,上面有两个列表框.每个顶部都有一个标签
listbox1 | | | | |______| listbox2 | | | | |______|
当用户调整表单大小(例如最大化它)时,我希望列表框自动扩展高度:
listbox1 | | | | | | | | |______| listbox2 | | | | | | | | |______|
这几天我正在使用 spring mvc 进行一些测试,但有一个问题。对于要测试的基本应用程序,我选择本教程: http://loianegroner.com/2010/09/extjs-spring-mvc-3-and-hibernate-3-5-crud-datagrid-example/ 我已下载该示例和一切都按预期工作。问题是当我尝试添加另一个控制器时。看来我添加的文件没有被扫描。
我的 web.xml 文件:
<servlet>
<servlet-name>extjs-crud-grid-spring-hibernate</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/spring/app-config.xml
</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>extjs-crud-grid-spring-hibernate</servlet-name>
<url-pattern>*.action</url-pattern>
</servlet-mapping>
Run Code Online (Sandbox Code Playgroud)
/WEB-INF/spring/app-config.xml:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
<!-- Scans the classpath of this application for @Components to deploy as beans -->
<context:component-scan base-package="com.loiane" />
<!-- Configures the @Controller programming model -->
<mvc:annotation-driven />
<!-- misc -->
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
<property name="suffix" value=".jsp"/>
</bean>
<!-- Configures Hibernate - …
Run Code Online (Sandbox Code Playgroud) 我正在尝试为画布中的图像的左侧属性设置动画.
当我在做的时候:
image.SetValue(Canvas.LeftProperty, destX[i]);
Run Code Online (Sandbox Code Playgroud)
这是有效的.但是当我在做的时候:
Animate(image, lastValue, destX[i], 500);
Run Code Online (Sandbox Code Playgroud)
同
private void Animate(Image image, double val1, double val2, double miliseconds)
{
DoubleAnimation myDoubleAnimation = new DoubleAnimation { From = val1, To = val2, Duration = new Duration(TimeSpan.FromMilliseconds(miliseconds)) };
TranslateTransform ts = new TranslateTransform();
image.RenderTransform = ts;
Storyboard.SetTarget(myDoubleAnimation, ts);
Storyboard.SetTargetProperty(myDoubleAnimation, new PropertyPath(TranslateTransform.XProperty));
Storyboard myMovementStoryboard = new Storyboard();
myMovementStoryboard.Children.Add(myDoubleAnimation);
myMovementStoryboard.Begin();
myMovementStoryboard.Completed += (s, e) =>
{
image.SetValue(Canvas.LeftProperty, val2);
};
}
Run Code Online (Sandbox Code Playgroud)
它不起作用
我的Animate功能有什么问题?即使动画可能做得不好,完成的事件也应该将好的值重置为canvas.leftproperty.
但就我而言,出了点问题.
你将如何完成Animate功能?
在此先感谢您的帮助
我有一个在php中运行的循环..
如果本地(悉尼,澳大利亚)时间在下午1点到3点之间,我只希望循环运行.
任何人都可以提供一个如何运作的例子吗?谢谢!
如何将字符串拆分为C#中的字符数组?
示例使用的字符串字是"机器人".
该程序应打印出来:
r
o
b
o
t
Run Code Online (Sandbox Code Playgroud)
原始代码段:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.IO;
using System.Text.RegularExpressions;
namespace Testing
{
class Program
{
static void Main(string[] args)
{
String word = "robot";
String[] token = word.Split(); // Something should be placed into the () to
//print letter by letter??
foreach (String r in token)
{
Console.WriteLine(r);
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
如何正确实施代码?
在什么条件下应该使用InnoDB而不是MyISAM?我见过一些MySQL优化测试,其中MyISAM被证明更快.我的所有表都是MyISAM,为什么要切换到InnoDB?
我正在使用DateTime.UtcNow来测量我的软件中的时间,并且需要能够判断"动作a"是否在"动作b"后不到10秒发生
但是,如果系统时间发生变化怎么办?那么我该如何检测系统时间是否改变了?
我不想使用秒表,因为我们需要在具有多个CPU的服务器上运行,请参阅http://kristofverbiest.blogspot.com/2008/10/beware-of-stopwatch.html
我还需要处理暂停和重新启动的虚拟机,因此"滴答计数"对我来说不太可能有用.
是的,我正在努力解决这个问题.我无法区分它们,因为我读到的每一个解释都是如此不清楚和充满哲学.有人可以为我清理这些定义吗?多谢你们.
这些定义同样适用于程序编程和oop一样多吗?谢谢.
这是一个ffmpeg问题.我有这个错误,说它无法找到hq预设文件,然后我在文档中读到它在'PREFIX/share/ffmpeg'以及'$ HOME/.ffmpeg'中查找预设文件.问题是我从一个调用python脚本的php文件中调用ffmpeg,该文件最终执行类似'commands.getstatusoutput(command)'的命令,所以我不确定用户是谁.
解决方案?我刚刚使用了-fpre,我的调用现在看起来像这样:
/ usr/local/bin/ffmpeg -i ../files/tmpvideos/myStream.flv -y -acodec libfaac -ab 96k -b 800k -maxrate 800k -minrate 600k -bufsize 800k -s 720x640 -vcodec libx264 -g 300 - r 20 -fpre /home/admin/.ffmpeg/libx264-hq.ffpreset -threads 0 ../files/tmpvideos/4647-60.mp4
我在/ home/admin下创建了该目录,并且100%确定文件现在存在,但仍然ffmpeg说:
File for preset '/home/admin/.ffmpeg/libx264-hq.ffpreset' not found
Run Code Online (Sandbox Code Playgroud)
所以我不确定为什么它不起作用,因为我现在指定了完整的路径.有任何想法吗?
我想到的一个原因是它可能没有正确编译,就像所有的标志和东西一样.我的意思是,虽然有些输出看起来像这样:
FFmpeg version SVN-r22976, Copyright (c) 2000-2010 the FFmpeg developers
built on Apr 30 2010 12:03:12 with gcc 4.2.1-sjlj (mingw32-2)
configuration: --enable-shared --enable-static --enable-memalign-hack
--enable
-libmp3lame --enable-libx264 --enable-gpl
libavutil 50.14. 0 / 50.14. 0
libavcodec 52.66. 0 …
Run Code Online (Sandbox Code Playgroud) 当我试图打开window.open('file///C:\calendar.html')
它时抛出
访问被拒绝错误
我该如何解决?谢谢