08 2009 档案

摘要:由于需要用到实时读取影音文件(mp3、wma、wmv …)播放时间长度的功能,搜索到的结果有: (1) 硬编码分析影音文件,需要分析各种媒体格式,代价最大;(2) 使用WMLib SDK,需要熟悉SDK各个接口,且不同版本的WM接口有别,代价次之;(3) 使用系统Shell32的COM接口,直接访问媒体文体属性,取其特定内容,代价最小。  显然第3种方案见效最快,立即操刀:①... 阅读全文
posted @ 2009-08-31 15:17 94cool 阅读(402) 评论(0) 推荐(0) 编辑
摘要:C#没有提供播放MP3等音频文件的类,要编写播放MP3等音频文件程序,必须使用第三方控件或类。本文使用API函数mciSendString,编写一个播放MP3等音频文件的类。   具体源码如下:   一、使用API函数mciSendString构成的媒体播放类。 usingSystem; usingSystem.Runtime.InteropServices; usingSystem.Text; ... 阅读全文
posted @ 2009-08-31 15:16 94cool 阅读(285) 评论(0) 推荐(0) 编辑
摘要:using System.Runtime.InteropServices; 定义: [DllImport("kernel32.dll", CharSet = CharSet.Auto)] public static extern int GetShortPathName( [MarshalAs(UnmanagedType.LPTStr)] string path, [MarshalAs(... 阅读全文
posted @ 2009-08-31 15:16 94cool 阅读(706) 评论(0) 推荐(0) 编辑
摘要:1、将附件中的压缩文件全部解压,全部放到WEB根目录下(其中包括FFMPEG.EXE和其他的DLL文件)2、在页面中添加一个BUTTON,ONClick事件内容如下:(代码如下) [代码] 阅读全文
posted @ 2009-08-31 12:53 94cool 阅读(226) 评论(0) 推荐(0) 编辑
摘要:前段时间做了一个项目,其中要求调用一个VC6开发的Dll文件,而该文件有多个不同的版本,所以要支持动态调用,并支持卸载。在收集了一些这方面的资料后,编写了下面的类,该类可以方便的调用各种类型的dll,而且简单实用。view plaincopy to clipboardprint?using System; using System.Collections.Generic; using System... 阅读全文
posted @ 2009-08-31 09:46 94cool 阅读(200) 评论(0) 推荐(0) 编辑
摘要:译 File.cs 以产生 File.exe: csc File.cs 编译 File.cs 以产生 File.dll: csc /target:library File.cs编译 File.cs 并创建 My.exe: csc /out:My.exe File.cs通过使用优化和定义 DEBUG 符号,编译当前目录中所有的 C# 文件。输出为 File2.exe: csc /define:DEB... 阅读全文
posted @ 2009-08-31 09:44 94cool 阅读(198) 评论(0) 推荐(0) 编辑
摘要:<< VB.Net >> ImportsSystem.IO ImportsMicrosoft.Win32'API宣告 PrivateDeclareFunctionmciSendStringALib"Winmm.dll"_ (ByVallpszCommandAsString,ByVallpszReturnStringAsString,_ ByValcchReturnAsInt... 阅读全文
posted @ 2009-08-31 09:06 94cool 阅读(380) 评论(0) 推荐(0) 编辑
摘要:ffmpeg能做到把一段音频"连接"到另一段音频后面,用到-newaudio参数.注意是"连接"不是"合并". 非要做合并的话,只可以是合并一段视频和一段音频: ffmpeg -i 1.avi -vcodec copy -an 2.avi (这段命令是先去掉视频中原有的音频部分,如果有的话) ffmpeg -i 2.avi -i 3.mp3 -vcodec copy -acodec copy 0.... 阅读全文
posted @ 2009-08-31 08:56 94cool 阅读(2115) 评论(1) 推荐(0) 编辑
摘要:a) 通用选项-L license-h 帮助-fromats 显示可用的格式,编解码的,协议的...-f fmt 强迫采用格式fmt-I filename 输入文件-y 覆盖输出文件-t duration 设置纪录时间 hh:mm:ss[.xxx]格式的记录时间也支持-ss position 搜索到指定的时间 [-]hh:mm:ss[.xxx]的格式也支持-title string 设置标题-au... 阅读全文
posted @ 2009-08-30 15:59 94cool 阅读(244) 评论(0) 推荐(0) 编辑
摘要:Mencoder 转 flv mencoder -ffourcc FLV1 -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames -of lavf -oac mp3lame -lameopts aq=9:cbr:br=64:vol=2 -ovc lavc -lavcopts vcodec=flv:vbitrate=200:ac... 阅读全文
posted @ 2009-08-30 15:59 94cool 阅读(252) 评论(0) 推荐(0) 编辑
摘要:try { Process proc = new Process(); proc.StartInfo.FileName = Server.MapPath("~/Bin/") + "ffmpeg.exe"; proc.StartInfo.Arguments = string.Format(@"-i ""{0}"" -acodec wmav1 -ac 2 -ar 44100 -ab 96000 ""{... 阅读全文
posted @ 2009-08-28 17:12 94cool 阅读(242) 评论(0) 推荐(0) 编辑
摘要:www.ffmpeg.com.cn.NET 2.0 调用FFMPEG,并异步读取输出信息的代码... public void ConvertVideo(){ Process p = new Process();//建立外部调用线程 p.StartInfo.FileName = @"c:\ffmpeg.exe";//要调用外部程序的绝对路径 p.StartInfo.Arguments = "-i X... 阅读全文
posted @ 2009-08-28 17:12 94cool 阅读(217) 评论(0) 推荐(0) 编辑
摘要:ffmpeg参数设定解说 y%w(W&E:e0-bitexact 使用标准比特率 麻城热线^!J)H2A3|(b\ Cl.?+C:AD-vcodec xvid 使用xvid压缩 麻城热线Jx)O~_ o;?-s 320x240 指定分辨率 FPl+H5dj,kd0-r 29.97 桢速率(可以改,确认非标准桢率会导致音画不同步,所以只能设定为15或者29.97)... 阅读全文
posted @ 2009-08-28 15:34 94cool 阅读(826) 评论(1) 推荐(0) 编辑
摘要:命令行下:ffmpeg -i "a.flv" -acodec wmav1 -ac 2 -ar 44100 -ab 96000 "a.wma" (flv 2 wma)ffmpeg -i "a.flv" -acodec pcm_u8 -ac1 -ar 800 -ab8 "a.wav" (flv 2 wav--8kHz*8bit单声道wav) 阅读全文
posted @ 2009-08-28 15:30 94cool 阅读(349) 评论(0) 推荐(0) 编辑
摘要:在命令行里$ ./configure --list-decodersaascac3adpcm_4xmadpcm_adxadpcm_ctadpcm_eaadpcm_ea_maxis_xaadpcm_ea_r1adpcm_ea_r2adpcm_ea_r3adpcm_ea_xasadpcm_g726adpcm_ima_amvadpcm_ima_dk3adpcm_ima_dk4adpcm_ima_ea_e... 阅读全文
posted @ 2009-08-28 15:29 94cool 阅读(2176) 评论(0) 推荐(0) 编辑
摘要:包flash.media类public final class SoundCodec继承SoundCodec Object语言版本:ActionScript 3.0运行时版本:Flash Player 10, AIR 1.5SoundCodec 类是在设置 Microphone 类的 codec 属性时使用的常量值的枚举。 公共属性 隐藏继承的公共属性 显示继承的公共属性属性定义方constru... 阅读全文
posted @ 2009-08-27 15:37 94cool 阅读(506) 评论(0) 推荐(0) 编辑
摘要:FlexBuilder3.2默认是用Flash9来调试的,但随着Flash10的发布,很多的浏览器都已经升级到Flash10,但FlexBuilder3.2还没有及时更新,导致每次调试Flex/Air项目都弹出提示框说定位不到Flash9的调试器,很是不爽!不过现在可以通过以下步骤来让FlexBuilder3.2在Flash10下调试和运行:第一部分:1.选中一个已存在的Flex或Air项目,右键... 阅读全文
posted @ 2009-08-27 15:35 94cool 阅读(241) 评论(0) 推荐(0) 编辑
摘要:减小flex文件(swf)的方法1、使用Release模式(这个通常会被忽视,呵呵) (1).点击flexbuilder上方的工具栏中的””, 弹出Export Release Build窗口,如下所示: 选择你要优化的mxml文件; 在Export to folder 中填入你要导出到的文件夹. 然后点击”finish”,在” F:\w... 阅读全文
posted @ 2009-08-27 08:35 94cool 阅读(305) 评论(0) 推荐(0) 编辑
摘要:用RSL来为你的flex程序减肥 问题:一个只有几个控件的flex project也有500多k ? 那是因为FLEX在发布的时候会带一个框架文件,框架文件包含了所有的Flex内置类,该文件大小大概是500多K,以致一个空的FLEX项目.发布后就有500多K 解决办法:利用RSL RSL是 Runtime Shared Library的简称,意思是运行时共享库当前RSL主要有3个级别的,一个是... 阅读全文
posted @ 2009-08-27 08:35 94cool 阅读(490) 评论(0) 推荐(0) 编辑
摘要:先把问题讲一下吧,按照一些简单的例子写client-script录制麦克风(网上很多的),常规配置fms, 也不需要写server-script,一切都很简单,但是录制完毕根本没有生成flv,bandwidth上面没有波动。trace下 info.code先后得到NetConnection.Connect.Success和NetStream.Publish.Start。呵呵,乍看下这样的输出挺正常... 阅读全文
posted @ 2009-08-26 16:24 94cool 阅读(238) 评论(0) 推荐(0) 编辑
摘要:主窗口:var Win:WinUpload = new WinUpload(); Win.RName=RecSongName;//参数1 Win.UserMobile=this.UserMobile;//参数2 Win.array=this.lbarray;//参数3 PopUpManager.addPopUp(Win,this,true); this.btn_upload.enabled=tru... 阅读全文
posted @ 2009-08-26 10:57 94cool 阅读(691) 评论(0) 推荐(0) 编辑
摘要:方法1:例如,在程序初始化的时候需要从服务器获取该用户的个性化配置文件setting.xml。通常我们会使用URLLoader,直接把该文件的url地址赋给URLRequest然后载入。在运行的过程中,用户修改了一些个性化设置,于是程序把最新的设置提交给服务器,让后台重新生成一个setting.xml替换原来的文件。但是如果浏览器打开了缓存功能,那么下一次运行程序的时候,当再次请求这个文件,浏览器... 阅读全文
posted @ 2009-08-26 09:27 94cool 阅读(319) 评论(0) 推荐(0) 编辑
摘要:usingSystem.Runtime.InteropServices;[DllImport("user32.dll")]publicstaticexternboolReleaseCapture();[DllImport("user32.dll")]publicstaticexternboolSendMessage(IntPtrhwnd,intwMsg,intwParam,intlParam);p... 阅读全文
posted @ 2009-08-25 17:17 94cool 阅读(273) 评论(0) 推荐(0) 编辑
摘要:基本上就是用 navigateToURL(request:URLRequest, window:String = null)..而它的2個參數request跟window在預設狀態下window值為_blank...而我一開始就是一直在使用_blank這個方法..如果使用這個方法..效果就會一彈出就馬上被關閉..所以需要改用_self來開啟新視窗..我的寫法如下:var url:String = ... 阅读全文
posted @ 2009-08-25 14:41 94cool 阅读(278) 评论(0) 推荐(0) 编辑
摘要:xml数据:<?xml version="1.0" encoding="utf-8" ?> - <cllblist>- <cllb> <typename>翻唱彩铃</typename> <typevalue>1</typevalue> </cllb>- <cllb> <typena... 阅读全文
posted @ 2009-08-25 11:09 94cool 阅读(578) 评论(0) 推荐(0) 编辑
摘要:显示图片:(4-4-5显示)数据绑定:private void BindDate() {DataView dv = null; try//新闻列表 { dv = zhan.Data.Sql.PubClass.ExecuteDataView("", "select top 13 * from t_xw where xwlb_id=2 order by XW_SJ desc"); count = dv... 阅读全文
posted @ 2009-08-24 10:23 94cool 阅读(235) 评论(0) 推荐(0) 编辑
摘要:public string RemoveHtml(string str) { string temp = Regex.Replace(str, "<[^>]*>", ""); temp = temp.Replace(" ", " ").Replace("&#8221;", "”").Replace("&#8220;","“"); retur... 阅读全文
posted @ 2009-08-24 08:54 94cool 阅读(364) 评论(0) 推荐(0) 编辑
摘要:返回:傍晚好,今天是2009年08月21日,星期五create proc sp_dtasdeclare @ts nvarchar(10)declare @tm intset @tm=DATENAME(hh,getdate())if(@tm < 6)set @ts='凌晨好,' else if (@tm < 9)set @ts='早上好,'else if (@tm < 12)set... 阅读全文
posted @ 2009-08-21 17:31 94cool 阅读(290) 评论(0) 推荐(0) 编辑
摘要:using System;using System.Management;class remote{ static void Main() { string host = "";//输入指定计算机IP或计算机名 string userName = "";//帐号 string password = "";//密码 ConnectionOptions connectionOptions = new ... 阅读全文
posted @ 2009-08-19 08:36 94cool 阅读(375) 评论(0) 推荐(0) 编辑
摘要:这是一篇阅读小结,是关于《Windows Forms 程序设计》中模式与非模式对话框的部分。书乃大师所写,精妙至极,大师下笔慎重而惜墨,平淡之中蕴含新奇,因而往往点到即止。作为读者的我乃凡夫俗子,必定细细揣摩而后得之。本文所写即是在阅读了书中的有关段落之后,根据自己试验所得之体会,为了便于自己理解,做了必要扩充。虽然只是简单的窗体调用,但如果能用好其中的某些细节,相信会带来意想不到的效果。一、如何... 阅读全文
posted @ 2009-08-18 17:22 94cool 阅读(272) 评论(0) 推荐(0) 编辑
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Runtime.InteropServices;names... 阅读全文
posted @ 2009-08-18 16:52 94cool 阅读(378) 评论(0) 推荐(0) 编辑
摘要:转:http://blog.csdn.net/danseshi/using System;using System.Windows.Forms;using System.Drawing;using System.Runtime.InteropServices;using System.Diagnostics;namespace MouseHook{ public partial class For... 阅读全文
posted @ 2009-08-18 11:31 94cool 阅读(1289) 评论(0) 推荐(0) 编辑
摘要:经过微软.net Framework 2.0的革新,.net平台的开发越来越精彩。笔者收集基于.net开发的n个项目,一方面为新手提供有价值学习资源,培养起软件开发的乐趣,另一方面共勉已从事.net领域工作多年并有明确发展目标的同仁,提高自己,更上一层楼。 SharpDevelop 强大的插件系统,通过Addin构建成一个功能齐全的.net开发IDE。核心是AddInTree。跟随这个项目开发许... 阅读全文
posted @ 2009-08-17 16:28 94cool 阅读(178) 评论(0) 推荐(0) 编辑
摘要:了解HTTP断点续传的原理之前,让我们先来了解一下HTTP协议,HTTP协议是一种基于tcp的简单协议,分为请求和回复两种。请求协议是由客户机(浏览器)向服务器(WEB SERVER)提交请求时发送报文的协议。回复协议是由服务器(web server),向客户机(浏览器)回复报文时的协议。请求和回复协议都由头和体组成。头和体之间以一行空行为分隔。 以下是一个请求报文与相应的回复报文的例子: GET... 阅读全文
posted @ 2009-08-17 16:20 94cool 阅读(209) 评论(0) 推荐(0) 编辑
摘要:第一:Control.CheckForIllegalCrossThreadCalls=false;线程开始的时候加这么一句,OK,看不到错误了~啥都能用了~第二:用委托,在05里,每个控件都有个InvokeRequired的属性~判断一下是不是true,是的话进行Invoke操作的,完事了~ //建立个委托privatedelegatestringreturnStrDelegate();//搞个最... 阅读全文
posted @ 2009-08-17 08:28 94cool 编辑
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Net.NetworkInformation;using ... 阅读全文
posted @ 2009-08-14 16:34 94cool 阅读(1726) 评论(0) 推荐(0) 编辑
摘要:连续不断向listview中加载数据时界面会不停的闪烁public partial class Form1 : Form……{ private int counter = 0; public Form1() ...{ InitializeComponent(); } DoubleBufferListView lv = new DoubleBufferListView();... 阅读全文
posted @ 2009-08-14 14:29 94cool 编辑
摘要:// test.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include "test.h"#include <Wininet.h>#include <Sensapi.h>#ifdef _DEBUG#define new DEBUG_NEW#undef THI... 阅读全文
posted @ 2009-08-14 14:24 94cool 编辑
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Management;namespace Record{ ... 阅读全文
posted @ 2009-08-14 09:26 94cool 阅读(350) 评论(0) 推荐(0) 编辑
摘要:C# code using System;using System.Collections.Generic;using System.Text;using System.Runtime.InteropServices;namespace Hardware{ /// <summary> /// 下列所需函数可参考MSDN中与驱动程序相关的API函数 /// </summary>... 阅读全文
posted @ 2009-08-14 08:26 94cool 编辑
摘要:用C#实现实现简单的 Ping 的功能,用于测试网络是否已经联通1. 根据IP地址获得主机名称 /// <summary> /// 根据IP地址获得主机名称 /// </summary> /// <param name="ip">主机的IP地址</param> /// <returns>主机名称</returns> publi... 阅读全文
posted @ 2009-08-13 21:06 94cool 编辑
摘要:一、前言   .net框架是Windows应用领域中一个非常新的技术,可以肯定在未来的一段时间内,.NET应用必须与现存的Windows技术交互作用。这种交互作用主要体现在两个领域:COM和应用编程接口(API)。为此,.NET框架在Windows API之上提供了一个OO层,但是有时候可能需要使用一个.NET不可到达的API调用。在这种情况下,可以使用.NET平台调用(P/Invoke)机制从.... 阅读全文
posted @ 2009-08-13 16:15 94cool 编辑
摘要:using System;using System.Collections.Generic;using System.Text;using System.Runtime.InteropServices; class NetStatus { private const long INTERNET_CONNECTION_MODEM = 1;//Local system uses a modem to ... 阅读全文
posted @ 2009-08-13 15:48 94cool 阅读(358) 评论(0) 推荐(0) 编辑
摘要:常见的处理方法是,在用户登录时,判断此用户是否已经在Application中存在,如果存在就报错,不存在的话就加到Application中(Application是所有Session共有的,整个web应用程序唯一的一个对象):以下是引用片段:string strUserId = txtUser.Text; ArrayList list = Application.Get("GLOBAL_USER_... 阅读全文
posted @ 2009-08-13 14:27 94cool 阅读(201) 评论(0) 推荐(0) 编辑
摘要:值得一提的是:如果使用全局性的检验方式,则在开发之初无需考虑Sql注入的情况/// <summary>/// 防SQL注入检查器/// </summary>public class SqlChecker{ //当前请求对象 private HttpRequest request; //当前响应对象 private HttpResponse response; //安全Url... 阅读全文
posted @ 2009-08-13 11:55 94cool 阅读(229) 评论(0) 推荐(0) 编辑
摘要:例如: 在 1.js 文件中的方法想引用2. js 文件的方法, 需要在1.js中顶部加入下面代码方法一:document.write(”<script language=javascript src=’/js/2.js’><\/script>”);立法二:new_element=document.createElement(... 阅读全文
posted @ 2009-08-13 11:51 94cool 阅读(750) 评论(0) 推荐(0) 编辑
摘要:CREATE proc sp_user@username nvarchar(20),@pwd nvarchar(20)asdeclare @sql nvarchar(500)set @sql='select a.*,b.rolename from t_user a,t_role b where a.username='''+@username+''' and a.pwd='''+@pwd+''' ... 阅读全文
posted @ 2009-08-12 14:48 94cool 阅读(163) 评论(0) 推荐(0) 编辑
摘要:文件兼容性用于定义让IE如何编译你的网页。此文件解释文件兼容性,如何指定你网站的文件兼容性模式以及如何判断一个网页该使用的文件模式。前言为了帮助确保你的网页在所有未来的IE版本都有一致的外观,IE8引入了文件兼容性。在IE6中引入一个增设的兼容性模式,文件兼容性使你能够在IE呈现你的网页时选择特定编译模式。新的IE为了确保网页在未来的版本中都有一支的外观,IE8引入了文件兼容性。当你引入一个增设的... 阅读全文
posted @ 2009-08-10 09:55 94cool 阅读(204) 评论(0) 推荐(0) 编辑
摘要:1。安装web服务器(IIS)修改相应配置文件使其支持JAD和JAR两种MIME   类型   JAD: text/vnd.sun.j2me.app-descriptor   JAR: application/java-archive   打开IIS中站点的属性,如下图:在HTTP头标签下面的MIME映射,按文件类型按钮点”新类型“按钮添加两种类型jad和jar①... 阅读全文
posted @ 2009-08-05 12:28 94cool 阅读(222) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts... 阅读全文
posted @ 2009-08-05 09:34 94cool 阅读(310) 评论(0) 推荐(0) 编辑
摘要:在ASP.NET里操作Word的第一步就是添加COM引用到你的工程里,通过右键点击“解决方案资源管理器”的“引用”,添加引用。选择COM选项卡,添加Microsoft Word 12.0 Object Library(其中12.0是Word版本号,根据当前电脑上安装的Word版本确定)。 ASP.Net会自动生成Word的COM包装类程序集添加到应用... 阅读全文
posted @ 2009-08-05 09:22 94cool 阅读(317) 评论(0) 推荐(0) 编辑
摘要:using Word;public string creatwordFile() { object Missing = Type.Missing; //取得Word文件路径 string strTemp = "Doc/联盟推广协议.doc"; //新Word文件保存路径 string newFileName = "doc/"+name+".doc"; //创建一个名为WordApp的组件对象 ... 阅读全文
posted @ 2009-08-05 09:20 94cool 阅读(416) 评论(0) 推荐(0) 编辑
摘要:1种:前台:<div class="overdiv"> <asp:Repeater runat="server" ID="rpt_hobby"> <HeaderTemplate><ol></HeaderTemplate> <ItemTemplate> <li><input type="checkbox" i... 阅读全文
posted @ 2009-08-05 09:01 94cool 阅读(201) 评论(0) 推荐(0) 编辑
摘要:样式:<style type="text/css"> .overdiv{width:400px;overflow:hidden;} .overdiv ol {float:left;} .overdiv li {width:20%;float:left;} </style>内容:<div class="overdiv"> <asp:Repeater run... 阅读全文
posted @ 2009-08-05 08:56 94cool 阅读(155) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示