http://blog.sina.com.cn/s/blog_502b2e970100949s.html 获取键盘输入以控制无法接受输入焦点的控件考虑一些游戏,显示图片在TPainBox,但是TPainBox无法获取输入焦点,当用户按下键的时候,没有任何事件产生,我们无法获取光标键以移动战舰,Delphi能够帮助我们做点这一点.获取键盘输入大多数Delphi应用程序通过指定的事件处理器有选择地处理输入,这使我们能够捕捉击键并处理鼠标动作.我们知道只有能够获取焦点的控件才有能力处理用户鼠标或者键盘…
SQL Server中获取当前日期的年.月.日.时.分.秒数据: SELECT GETDATE() as '当前日期',DateName(year,GetDate()) as '年',DateName(month,GetDate()) as '月',DateName(day,GetDate()) as '日',DateName(dw,GetDate()) as '星期',DateName(week,GetDate()) as '周数',DateName(hour,GetDate()) as '时…
什么是 GUID ? 全球唯一标识符 (GUID) 是一个字母数字标识符,用于指示产品的唯一性安装.在许多流行软件应用程序(例如 Web 浏览器和媒体播放器)中,都使用 GUID. GUID 的格式为8-4-4-4-12 :“xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx”其中每个 x 是 0-9 或 A-F 范围内的一个十六进制的数字.例如:6F9619FF-8B86-D011-B42D-00C04FC964FF 即为有效的 GUID 值. 为什么要使用 GUID ?…
第一种:需要引用Windows单元 ShowMessage(IntToStr(GetSystemMetrics(SM_CYSCREEN)-GetSystemMetrics(SM_CYFULLSCREEN)-GetSystemMetrics(SM_CYCAPTION))); 第二种:需要引用Windows单元 function GetSystemTaskBarHeight:Integer; var R:TRect; begin SystemParametersInfo(SPI_GETWORKARE…
procedure Tform1.Edit1KeyPress(Sender: TObject; var Key: Char);var edt: TEdit; str, strL, strR: string; p: integer;begin   // 获取当前文本内容, 注意要去掉选中部分(因为会被改写). edt := TEdit(Sender); str := edt.text; if Length(edt.SelText) <> 0 then begin   strL := LeftSt…
var date = new Date(strTime); return date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate(); 获取年份:getFullYear(): 获取月份:date.getMonth()+1: 获取日期:date.getDate(): 然后可以随意组合成自己想要的字符串.   实例: var BizDate=gsp.rtf.context.get('BizDate'): v…
title: ipfs使用 date: "2019-09-26 10:17:16" tags: ipfs categories: 技术驿站 1.mac安装ipfs--使用npm工具 sudo npm install ipfs --global 2.本地上传文件并同步网络 touch index.html vim index.html 初始化过程,生成本地节点 ipfs init 保存在本地ipfs ipfs add index.html 同步到网络中 ipfs daemon 注意链接的…
.NET 5 Preview1现在可用,可以进行评估了! .NET 5将是当前版本. 开始 要在.NET 5.0中开始使用 ASP.NET Core,请安装.NET 5.0 SDK. 如果您使用的是Windows上的Visual Studio,建议您安装Visual Studio 2019 16.6的最新预览版. 升级现有项目 将现有的 ASP.NET Core 3.1应用程序升级到.NET 5: 将TargetFramework属性更新为netcoreapp5.0 更新所有 Microsoft…
NSDate * nowDate = [NSDate new]; NSCalendar *calendar = [NSCalendar currentCalendar]; NSUInteger unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSWeekdayCalendarUnit; NSArray * weekTitleArray = @[@"周日",@"周一"…
CustomFormat属性设置为: yyyy-MM-dd HH:mm:ss 记住还要修改一个属性值,DateFormat属性 可选项改为Custom,默认是Long…