- 博客(195)
- 资源 (231)
- 收藏
- 关注
原创 windows 处理语音时需要注意的地方(directSound, ACM)
windows 处理语音时需要注意的地方(directSound, ACM)1.DirectSound播放语音(流式方式)时:secondBuffer 如果采用的是循环缓冲区的,需要在播放时采用循环方式,另外向缓冲区填充语音数据时,LockFlag最好是EntireBuffer2.语音编码/解码(调用ACM)需要注意 nBlockAlign 应该为相应的 WaveFormat 的 Bloc
2009-10-21 12:10:00 1118
原创 short数组 到 byte 数组的转换
这里的转换是指在二制上的转换,不是指数值上的转换 public static void Run() { short[] arrs = { -1, 2, 3, -2, 1 }; byte[] arrb = new byte[arrs.Length * 2]; Buffer
2009-10-13 16:27:00 2706
原创 jasper reports - parameters for ‘in clause’
今天有个需求,把参数传到 jasperReport 中,并且放到 where 的 in 条件式中, 比如 where id in (1,2,3)后来发现了 $X{} 的用法,如下 Supply the parameter as a List:Then use the the function$X{IN, , }For example<![CDATA[SELEC
2009-09-25 15:26:00 770
转载 google 的使用技巧
在Google的输入框里,所有的空格都被Google理解为加号(+)。另外,过分常用的、单独存在没有意义的词汇往往被忽略掉..............如果你想要找含有“purpose of education”这个词组的文章,那么你必须输入【“purpose of education”】。..........为了进一步筛选搜索结果,还需要学会另外一个符号——减号(-)。比如,【
2009-08-27 11:32:00 1060
原创 C# 用 DirectX Sound 播放音乐文章时的异常
Value does not fall within the expected range.C#播放音乐创建 SecondaryBuffer 辅助的 buffer 时出现了异常,开始不清楚什么原因,后来才发现,应该是语音文件的格式不对,这种方式只能播放 Wav 文件格式(PCM格式),所以随便选一个语音文件应该是不行的,如果没有现成的语音文件,可以考虑用 windows 的 录音机来录一个。
2009-08-25 17:44:00 1712
原创 DLL is attempting managed execution inside OS Loader lock 解决
在使用 Direct sound 时,会弹出下面的信息,如果一直按 VS 中的运行,程序会一直运行下去的,即下面的这个异常似乎可以去掉。 DLL bin/Debug/Microsoft.DirectX.DirectSound.dll is attempting managed execution inside OS Loader lock. Do not attempt to
2009-08-25 10:46:00 2549
原创 C# winform 的闭关按钮变灰,及取消关闭事件
转载请注明来自: http://blog.csdn.net/laorer查了些资料,有两种方式,下面是一种,但是没有达到效果,不知道哪里出了问题 private bool isEnableCloseButton = true; protected override CreateParams CreateParams {
2009-08-14 13:59:00 3934
原创 C# winform 中数据获取与界面显示有关的多线程问题
转载请注明来自: http://blog.csdn.net/laorer 代码中的 Print 可以当做是获取数据,需要注意的是 While(t !=1) 这部分里要加上 Refresh,否则 gif 是不会动的。 找了一些资料,要用到 InvokeRequred , 不清楚具体怎么用,留着后面考虑. 可以考下: http://topic.csdn.net/u/200
2009-08-13 17:07:00 3435 2
原创 PropertyGrid 中修改属性后, 即时显示出来
比如 一个对象 obj(:UserControl), 有一个属性 prop, 其可以在 PropertyGrid 显示出来并能在上面改变,现在在 PropertyGrid 中改变 属性 prop, 希望 其能立即显示出来,而不是等 propertyGrid 失去焦点后 obj 的改变再显示出来, 只需要在 属性 Prop 的 set 的最后一行加上 Invalid()基本上就可以了
2009-07-31 15:18:00 1680
原创 列举 所有的 culture
private void InitLocale() { CultureInfo[] cultures = CultureInfo.GetCultures(CultureTypes.AllCultures); foreach (CultureInfo c in cultures) {
2009-07-31 09:16:00 693
原创 C# Panel 中加入 hScrollBar
需求: 要在 Panel 动态的放置多个 Button, 而且是一字排开, 不换行, Panel 的宽度固定的, 所以 Button 特别多时, 就需要有滚动条, 由于某种原因, Panel 的 AutoScroll 要设为 false解决:因为不能使用 Panel 自带的 Scroll 功能, 所以需要加个 HScrollBar, 并且要在设置其 OnScroll 事件具体代码如
2009-07-21 18:21:00 4530
转载 关于使用dom4j生成xml时特殊字符处理的解决方法
转自: http://hrbyzq.blogbus.com/logs/20355420.html在使用dom4j生成xml文件时,对于特殊字符“&”,总会自动生成"&",因此在输入""时,<代表在创建writer对象时操作如下:XMLWriter writer = new XMLWriter(fmt); //以输出格式为参数创建xml输出对象 writer.setEscapeTe
2009-07-17 14:38:00 6231
转载 VS2005 C#WinForms控件 的一些属性
转自:http://hi.baidu.com/276598908/blog/item/df473eecb713de3b279791dd.htmlVS2005 C#WinForms控件笔记2008年09月07日 星期日 20:37窗体属性 1,AcceptButton 默认“回车”选定的按钮,在不使用Table键的情况下,用户敲击
2009-07-09 11:11:00 1886
转载 servlet里经常会用到一些GET方法
servlet里经常会用到一些GET方法refer: http://hi.baidu.com/atomicface/blog/item/de62ac10c099c8cea6ef3f5b.html2009-05-18 14:04servlet里经常会用到一些GET方法,容易弄混,把它们记在这儿了。servletContext.getContextPath()=se
2009-07-03 09:26:00 2253 1
转载 常用长度单位PX/EM/PT/百分比转换公式
后两个可以稍微看下,一般情况下就用 px = (4*pt)/3 吧 http://www.weste.net/2009/2-3/1106261329.html PX、PT、EM、ex和in等都是我们常用的长度单位,尤其在网页的字体大小中经常用到。但是你知道PX、PT和EM之间是如何进行准换的吗?这里icech为大家找到了一个px、pt、em和percent大小转换的一个表格,尤其针
2009-06-29 11:05:00 4174
原创 C# 调用 colorDialog, 列举 字体
private void btnColor_Click(object sender, EventArgs e) { Button btn = sender as Button; ColorDialog colorDialog = new ColorDialog(); colorDialog.Allo
2009-06-25 17:20:00 1995 2
转载 浅学rdl报表
浅学rdl报表 2007-12-21 11:28http://yan.sunny86.blog.163.com/blog/static/421871372007112111284452/分类:编程 字号: 大大 中中 小小 应用于:Microsoft® SQL Server™ 2005 报表服务目录关于这篇文档 其他信息来源 产品版本 简介
2009-06-23 14:39:00 7838 4
原创 java. socket 通信之后要 flush
socket通信最后数据流要flush一下 http://topic.csdn.net/u/20090603/22/be82eb2a-dee3-445b-b618-31c1cc2107b1.html 写了一个手机程序,上面是所有的import,在模拟器中可以运行 用SUN JAVA WTK生成JAR的程序,放到手机中安装显示程序不兼容, 不知道问什么啊? 我用了诺基亚E**的一个智
2009-06-08 11:13:00 2774
原创 vba 中, 创建文件夹, 获取行数, 新建excel文件
在文件夹不存在的情况,建立一个文件夹Sub createDir(pathName As String) Dim tmpDir As String On Error Resume Next tmpDir = Dir(pathName) If tmpDir = "" Then MkDir pathName End If End Sub
2009-06-06 18:42:00 3565 4
原创 java 处理 带有 namespace 的 XPath
由 RobinKin 提供需要对命名空间一一定义 string xml = ""; XmlDocument xmldoc = new XmlDocument(); xmldoc.LoadXml(xml); XmlNamespaceManager xnm = new XmlNamespace
2009-05-22 09:32:00 1833 1
原创 ant 配置 停止 tomcat, 打包程序成 war 文件夹,启动 tomcat 一体
转载请保留: http://blog.csdn.net/laorer , 谢谢! 没什么好说的,就是一个文件,把几个功能集成在一起, 其他的好说,就是停止和启动 tomcat 时遇到了问题,不过已经解决, 代码里有些多余的,你可以自己去掉他
2009-05-21 21:52:00 3302
原创 js window.open('url','_blank') 打开服务器端临时文件, ie窗口一闪而过
http://blog.csdn.net/laorer String showWindow =" window.open(url,_blank) "; http://xxx.xxx.xxx.xxx/xxxx/files/20090519160357312.doc 功能目的:在客户端用ie打开服务器目录下的一个doc文件实现预览。 我的实现是自己写了个树读取服务器所有的目录文件。用户
2009-05-21 18:00:00 4673
原创 rdlc 报表中 Width, PageWidth, InteractiveWidth 各指的是什么?
http://blog.csdn.net/laorerWidth:报表的宽度,注意这里的宽度不是最终宽度。子容器宽度超过Report.width。最终宽度会改变。 这个似乎是不包含在 margin 的宽度 PageWidth:报表的默认宽度,默认为8.5in(8.5*2.54=21.59cm),整张纸的宽度 这个宽度是 美国 A4纸的宽度 (letter size),与国内的标准不一
2009-05-13 17:30:00 2654
原创 OnMouseHover事件获取坐标信息
C# winform 中, OnMouseHover事件没有 坐标信息,如何获取坐标信息呢?可以通过 Control.MousePosition 或 Cursor.Position 得到鼠标所在的屏幕坐标信息,然后通过 PointToClient 转换成工作区的坐标信息Point pt = this.PointToClient(Control.MousePosition)
2009-05-08 16:03:00 2226
原创 C# ReportViewer 的显示控制
下面的这段代码可以显示为 printLayout 形式, rptViewer.SetDisplayMode(DisplayMode.PrintLayout); rptViewer.ZoomMode = ZoomMode.Percent; rptViewer.ZoomPercent = 100; Reference:http://so
2009-04-30 17:36:00 1360
原创 ControlDesigner 不存在的解决
在 c#2.0 中,如果自定义设计时的事件,就需要扩展 ControlDesigner,从 msdn 上拷了一个例子,结果报了下面的错误:错误 1 命名空间“System.Windows.Forms.Design”中不存在类型或命名空间名称“ControlDesigner”(是缺少程序集引用吗?) 用对象浏览器查了一下,这个类是存在的,但是编译一直不能通过,而且我的引用中 System.
2009-04-30 10:07:00 5101 2
原创 C# 获取被调用函数的信息
C# 获取被调用函数的信息可以在实现自己的 log 方法中使用在参考中加了两条语句... public partial class CallStack : Form { public CallStack() { InitializeComponent(); } privat
2009-04-24 09:48:00 3813
原创 自定义UserControl中包含封装了集合对象的属性被设计器自动初始化所引起的错误
http://social.microsoft.com/Forums/zh-CN/visualcshartzhchs/thread/231fdd62-8157-43c0-b48a-78b05e9f0b11 写的一个 userControl中,打开使用的 form 的设计页面时,总是出现 "的对象无法转换为类型" 上面这个链接给出院解决方法 在相应的 属性上面加上下面这段,就
2009-04-09 17:53:00 877
原创 c#2.0 中的 dataGridView 的使用
C#中 DataGridView 属性说明http://blog.csdn.net/tangcx/archive/2007/09/12/1782297.aspxDataGridView重绘代码参考--C# http://www.cnblogs.com/ghostljj/archive/2007/10/05/914423.htmlDataGridView Tutorial in C#http
2009-04-08 17:25:00 783
原创 java解析xml时出现 java.net.MalformedURLException: unknown protocol:异常
java解析xml时出现 java.net.MalformedURLException: unknown protocol:异常http://topic.csdn.net/u/20090330/11/e9458948-6700-4703-94df-69c4776a91f5.html?1532567408解决办法:在应用路径里去掉对gnujaxp.jar包的引用。 原因:jdom在解释xml
2009-04-07 11:41:00 2232 1
原创 修改代码时,请不要引用新的 bug
今天上班,准备继续上周的问题来修改代码,做一些已经实现过的操作,但是突然发现,原来已经实现过的东西,现在有问题了。调试吧,调了几遍,发现有个 list 比原来多加了 一些内容,这些内容是在初始化时操作的,再继续,发现问题所在,开始时,在把 list 的初始化放在form 的构造函数中,后来由于放在 构造函数中引出了一些问题,就放其放在 formLoad 事件中,这样,当重新变化 lis
2009-03-30 10:13:00 1226
原创 C# 中关于 List 的 Xml序列化
具体代码如下,就是加了两个 Attribute,注意不要写成了 [XmlElement], 否则出现的结果会是 并排的情况, Exrpe Exrpe2而下面产生的结果将是 Exrpe Exrpe2 [XmlArray("Expressions")] [XmlArrayItem("Expression")] pub
2009-03-16 14:37:00 4456
原创 重写 TypeConverter 时,自定义子属性顺序
重写 TypeConverter 时,如果子属性需要按一定的顺序 public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes) { Strin
2009-03-16 10:46:00 1189
原创 xml 序列化时, 去掉默认的命名空间
C# 的 xml 序列化时,文档总会带有xmlns:xsd="http://www.w3.org/2001/XMLSchema"andxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"如果想去掉,或者添加自己的命名空间,可以考虑下面的做法 //Create our own namespaces for the outpu
2009-03-11 17:25:00 8721 1
转载 XmlSerializer 常见问题疑难解答
XmlSerializer 常见问题疑难解答 http://msdn.microsoft.com/zh-cn/library/aa302290.aspx发布日期 : 6/30/2004 | 更新日期 : 6/30/2004Christoph Schittko适用于:Microsoft ®Visual Studio ®.NET摘要:Christoph Schitt
2009-03-09 10:11:00 2288
原创 .net 序列化时,需要注意的一些问题
1. 需要序列化的类可以继承其他类(但好像要满足一些条件),可以实现其他接口2.需要序列化的字段不可以为空值实验所得 3. enum 不会为空,所以在序列化的时候,带有 enum 类型的属性必须要赋值,否则会报 InvalidOperationException 异常
2009-03-02 10:14:00 658
原创 引入 System.Drawing时,引入不进来
用VS2005 开始新建一个 console 项目,后来要用到 Font,但引入 System.Drawing时,引入不进来,这时可以先新建一个 windows form,然后再引入,基本上就可以解决问题了
2009-02-27 13:58:00 1309
原创 C#, 画线后,移动时去掉重影
开始想的是记住原来的位置,重新用背景色画一次http://topic.csdn.net/u/20090129/13/e259e01f-00e1-4b9d-ac74-4961b79027bc.html 后来在画之前先 graphics.clear(parentColor)就可以了
2009-02-20 17:00:00 2283
原创 winform 在不同的机子上显示不一样的解决
上次做了个 winform 的东东,在本机上显示得好好的,但到了 pe 机子上时,winform就拉长了,不清楚什么原因,后来网上找到原因:AutoScale属性 (http://blog.csdn.net/hesicong/archive/2005/02/09/284907.aspx)最近我我在英文XP SP2环境下制作了一个比较精美的界面,请一个同学帮忙测试。他用的是中文版的操
2009-02-09 16:40:00 1483
Solving Everyday Problems With the Scientific Method Thinking Like a Scientist
2010-08-18
Manning.jQuery.in.Action.2nd.Edition.Jun.2010
2010-08-12
droiddraw-r1b13
2010-07-21
roller 另外要加入的 jar包
2010-06-30
PortableGit-1.7.3.1-preview20101002.7z
2010-11-09
egit.0.9.3
2010-11-09
unlocking_android.pdf.pdf
2010-11-03
ProgrammingInScala --draft june 13,2007
2010-10-28
Sams.Sams.Teach.Yourself.PHP.in.10.Minutes.Mar.2005.eBook-LiB.chm
2010-10-22
php_manual_zh(2010-08-16).chm
2010-10-21
Structure and Interpretation .chm
2010-10-21
Agile Web Application Development with Yii 1.1 and PHP5.pdf
2010-10-21
PHP Hacks -Jack Herrington -December 2005
2010-10-19
GETTING THINGS DONE
2010-09-17
gettingthingsdone.
2010-09-17
Getting StartED with Dojo.pdf
2010-09-15
Mastering Dojo-JavaScript and Ajax Tools for Great Web Experiences
2010-09-15
Dojo中文手册-- 简单的体验
2010-09-15
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人