分类 技术 下的文章
删除文件中含特定字符串的行:sed -e '/abc/d' a.txt // 删除a.txt中含"abc"的行,但不改变a.txt文件本身,操作之后的结果在终端显示 sed -e '/abc/d' a.txt > a.log // 删除a.txt中含"abc"的行,将操作之后的结果保存到a.log sed '/abc/d;/efg/d' a.txt > a.log // 删除含字符串"abc"或“efg"的行,将结果保存到a.log其中,"abc"也可以用正则表达式来代替。
sed删除文件中包含指定字符串的行

sed删除文件中包含指定字符串的行

步骤1: 安装Speech Platform v11go here: http://www.microsoft.com/en-us/download/details.aspx?id=27225click "Download"select the "x64\_SpeechPlatformRuntime\SpeechPlatformRuntime.msi"run the installer第2步:获得备用声音go here: http://www.microsoft.com/en-us/download/details.aspx?id=27224click "Download"select the voice files you want. > GB\_Hazel和US\_ZiraPro音质较佳run the installers for each (duh :P)第3步:提取注册表令牌Open RegeditUnder - HKEY\_LOCAL\_MACHINE\SOFTWARE\Microsoft\Speech Server\v11.0\Voices - right cl...
为Windows Speech添加更多声音

为Windows Speech添加更多声音

using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Net.Sockets; using System.Text; using System.Threading; using System.Threading.Tasks; using System.Xml; namespace ClassLibrary { /// <summary> /// 文件传输服务器 /// </summary> public class FileTransferServer { /* 服务器接收文件Socket */ private static Socket ServerSocket; /* 文件根目录 */ private static string ServerRoot; /...
C#文件服务器

C#文件服务器

ExeEmbedForm类/// <summary> /// 将外部exe嵌入至winform中 /// </summary> public class ExeEmbedForm { EventHandler appIdleEvent = null; Control ParentCon = null; string strGUID = ""; public ExeEmbedForm(Control C, string Titlestr) { appIdleEvent = new EventHandler(Application_Idle); ParentCon = C; strGUID = Titlestr; } /// <summary> /// 将属性<code>AppFilename</code>指向的应用程序打开并嵌入此容器 /// </summary> ...
exe程序嵌入Winform窗体

exe程序嵌入Winform窗体

@echo off setlocal enabledelayedexpansion set /p port=请输入端口号: for /f "tokens=1-5" %%a in ('netstat -ano ^| find ":%port%"') do ( if "%%e%" == "" ( set pid=%%d ) else ( set pid=%%e ) echo !pid! taskkill /f /pid !pid! ) pause
批处理杀死指定端口进程

批处理杀死指定端口进程