c#制作视频音频歌词相关技术代码记录
开发类似千千静听或者KMplayer等音频视频播放器播放字幕或者歌词的技术 从两方面着手,一是时间轴,二是帧(对于视频)。 方法一的实现比较简单,只需要内置一个定时器,在媒体播放时开始计时,然后读指定的脚本即可。
July 1, 2010
C#调用IE浏览器设置
using System.Diagnostics; ProcessStartInfo Info=new ProcessStartInfo(); Info.FileName = "inetcpl.cpl "; Process.Start(Info);
May 29, 2010
数据结构cpp二叉树
using namespace std; typedef struct btreenode { char data; struct btreenode *lchild; struct btreenode *rchild; }BTreeNode, *BTree; typedef struct { BTree link; int flag; }Stack; void InitBTree(BTree &BT) { BT = NULL; } void CreatBTree(BTree &BT) { char ch; ch = getchar(); if (ch == ' ') BT = NULL; else { BT = new BTreeNode; BT->data = ch; CreatBTree(BT->lchild); CreatBTree(BT->rchild); } } void PreOrder(BTree BT) { if (BT == NULL) { cout << "NULL"; return; } else { cout << BT->data; if (BT->lchild != NULL) PreOrder(BT->lchild); if (BT->rchild != NULL) PreOrder(BT->rchild); } } void InOrder(BTree BT) { if (BT == NULL) { cout << "NULL"; return; } if (BT->lchild != NULL) InOrder(BT->lchild); cout << BT->data; if (BT->rchild != NULL) InOrder(BT->rchild); } void PostOrder(BTree BT) { if (BT == NULL) { cout << "NULL"; return; } if (BT->lchild != NULL) PostOrder(BT->lchild); if (BT->rchild != NULL) PostOrder(BT->rchild); cout << BT->data; } void LevelOrder(BTree BT) { BTree Queue[30]; int front, rear; if (BT == NULL) return; front = -1; rear = 0; Queue[rear] = BT; while (front != rear) { front++; cout << Queue[front]->data; if (Queue[front]->lchild != NULL) { rear++; Queue[rear] = Queue[front]->lchild; } if (Queue[front]->rchild != NULL) { rear++; Queue[rear] = Queue[front]->rchild; } } } void PreOrder_2(BTree BT) { BTree stack[30], p; int top; if (BT == NULL) return; top = -1; p = BT; while (!(p == NULL && top == -1)) { while (p != NULL) { cout << p->data; if (top < 30) { stack[top + 1] = p; top++; } else { cout << "Stack is full!" << endl; return; } p = p->lchild; } if (top < 0) return; else { top--; p = stack[top + 1]; p = p->rchild; } } } void PostOrder_2(BTree BT) { Stack s[30]; BTree p; int top, sign; if (BT == NULL) return; top = -1; p = BT; while (!(p == NULL && top == -1)) { if (p != NULL) { s[++top].link = p; s[top].flag = 1; p = p->lchild; } else { p = s[top].link; sign = s[top].flag; top--; if (sign == 1) { s[++top].link = p; s[top].flag = 2; p = p->rchild; } else { cout << p->data; p = NULL; } } } } void main() { BTree T; InitBTree(T); cout << "InitTree completed!" << endl; cout << "Create Tree:" << endl; CreatBTree(T); cout << "/nPreOrder:" << endl; PreOrder(T); cout << "/nInOrder:" << endl; InOrder(T); cout << "/nPosetOrder:" << endl; PostOrder(T); cout << "/nLevelOrder:" << endl; LevelOrder(T); cout << "/nPreOrder_2:" << endl; PreOrder_2(T); cout << "/nPostOrder_2:" << endl; PostOrder_2(T); system("pause"); }
May 21, 2010
重装Windows后修复引导ubuntu
重装了windows后ubuntu就不能自动引导了,网上有很多方法,这里只说两种简单的 win xp: 复制wubildr.mbr,wubildr到C盘(这两个文件在安装Ubuntu磁盘下的winboot文件夹中)
May 15, 2010
Win7安装vs2010
安装VS2010到内牛满面 开始在win7 64位旗舰版下遇到错误无法安装vs2010,网上查找说与office07冲突……卸载后还是无法安装。 随后换成win7 32位,安装Framework4成功,可接下来遇到Object model失败,查了N久,无解,网上有人提出修改注册表RightOUT什么的,我是没见有谁用那个成功。偶然看到某些评论说是win7版本问题,原因不知。便更换了Lenovo的OEM版,重装vs2010。
May 15, 2010
ubuntu自动挂载NTFS分区
终端输入 sudo apt-get install ntfs-config sudo ntfs-config 然后就会弹出来一个对话框。 选择你需要挂载的分区,点应用,再选择"启用内部设备写支持"就可以了。
May 9, 2010
Linux下Eclipse设置汉字编码
今天把windows下的工程导入到了Linux下eclipse中,由于以前的工程代码,都是GBK编码的,而Ubuntu默认是不支持GBK编码的。所以,首先我们要先让Ubuntu支持GBK,方法如下:
May 9, 2010
linux安装JDK
首先,从http://java.sun.com 中下载jdk,我的版本是jdk1.6.0_20 然后,终端输入代码: sudo chmod u+x /(路径名称)/jdk1.6.0_12.bin
May 9, 2010
ubuntu安装c/c++集成开发环境
首先确保系统已经安装了gcc/g++ Anjuta 打开终端: 命令:sudo apt-get install anjuta 不能安装的需要添加安装源 **添加源:**点击主菜单上的"系统"》“系统管理”》“软件源”,输入密码后,在出现的对话框中点"第三方软件",贴上下面这一行,再按"添加源"》“关闭”》“重新载入”。
May 8, 2010
ubuntu3D桌面设置
安装Compiz: 代码: sudo apt-get install compiz compiz-gnome sudo apt-get install compizconfig-settings-manager sudo apt-get install compiz-fusion-* Compiz 使用emerald 主题: 代码:
May 5, 2010