当前位置: 首页 > news >正文

百度站长seo广告推广怎么赚钱

百度站长seo,广告推广怎么赚钱,怎样下载wordpress,工作心得体会感悟简短虽然handle和handler只有一个字符之差#xff0c;但在计算机的世界里#xff0c;含义却大相径庭。 1. 先说说handle 北京话说一边儿玩儿去#xff0c;玩勺子把儿去#xff0c;勺子把儿说的就是handle。而将handle译成句柄绝对是一个…虽然handle和handler只有一个字符之差但在计算机的世界里含义却大相径庭。 1. 先说说handle 北京话说一边儿玩儿去玩勺子把儿去勺子把儿说的就是handle。而将handle译成句柄绝对是一个相当文雅相当阳春白雪的翻译因为太文绉绉啦很多文化底蕴不够的码农就看不大懂了或者望而生畏。为了弄明白为什么这么整我费了点儿周折。 句柄者弯杆杆儿弯把手儿也。注意 句为勾的通假字句柄应该读作gou柄才是。《说文解字》对句的解释是句 曲也。《说文解字注》(作者清代学者段玉裁简称段注)里是这么说的凡曲折之物侈为倨敛为句。考工记多言倨句。 因此如果将handle翻译成大白话弯把手儿进不得教科书也写不进那些晦涩乏味的计算机图书。那么程序员当如何理解handle呢简单来说handle就是一个带把儿的物件的那个把儿。 1.1 handle的本来含义 A handle is a part of, or attachment to, an object that can be moved or used by hand. 例如 o 带橡胶handle的现代拔钉锤(A modern claw hammer with rubber handle 【图片来源: https://en.wikipedia.org/wiki/File:Claw-hammer.jpg】) o 带handle的平底锅 1.2 handle在计算机世界里的含义 A handle is an abstract reference to a resource.1: A handle is a unique identifier for an object managed by Windows. 2: A handle can be anything from an integer index to a pointer to a resource in kernel space. The idea is that they provide an abstraction of a resource, so you dont need to know much about the resource itself to use it. 注 1 is from what-is-a-windows-handle; 2 is from what-is-a-handle-in-c 例如 (在Unix/Linux系统中) 【鉴于个人对windows了解甚少故不谈windows】 进程号pid就是一个handle, 文件描述符(fd)也是一个handle, 系统调用号(syscall num)仍然是一个handle, ... 不胜枚举。 在操作系统中一切对用户来说是透明(注这里的透明指的是看不见摸不着就如空气一样而不是一览无余毫无秘密可言)的但是操作系统内核看得懂的无符号整数(unsigned int)都可以被看作是handle。 在操作系统设计与实现中联系内核态和用户态靠的就是一个个无符号整数。因为用数字来做通信密码(比如操作码错误码等)实在是太方便了。而且一个unsigned int占4个字节可以表征的通信密码总数为2^32(4G, 约40亿)。 如果不用无符号整数来做通信密码而是采用可读性很好的明文(字符串string)来做通信那是何等的情何以堪 因为计算机做字符串比较的代价要远远大于无符号整数的比较。 好啦扯远了一句话下次看到句柄不用害怕啦。因为它就是handle, 说白了就是跟一个黑盒子进行通信的密码。一旦通信密码传给了黑盒子黑盒子具体怎么操作对持有handle的用户来说完全不用关心。不看过程只看结果就得了。 古人云微曲为倨甚曲为句将handle翻译成句柄还是有一定道理的因为用户程序拿到的handle通常并不能够径直通向真实的内核资源而是需要绕个弯儿也就是被内核映射成一个指向内核资源的首地址的pointer才能够访问真实的内核资源。 2. 什么是handler 在编程中使用过信号(signal)的朋友一定跟handler不会陌生。 例如 $ man -s2 signal NAMEsignal - ANSI C signal handlingSYNOPSIS#include signal.htypedef void (*sighandler_t)(int);sighandler_t signal(int signum, sighandler_t handler); ... hanlder就是一个回调函数(callback)。当某个事件到达时事先注册的handler会被接收到事件的主体所调用。 示例代码 o foo.c 1 #include stdio.h2 #include signal.h3 #include unistd.h4 5 unsigned int g_flag 0;6 7 static void foo_handler(int signum)8 {9 printf(signal %d is caught, %s is called\n, signum, __func__); 10 g_flag; 11 } 12 13 int main(int argc, char *argv[]) 14 { 15 signal(SIGUSR1, foo_handler); 16 17 while (!g_flag) 18 sleep(10); 19 printf(good bye\n); 20 21 return 0; 22 } o 编译并测试 T1$ gcc -g -Wall -m32 -o foo foo.cT1$ ./fooT2$ ps -ef | grep foo | grep -v grep veli 9239 2293 0 21:06 pts/7 00:00:00 ./fooT2$ kill -SIGUSR1 9239The output from T1 looks like:T1$ ./foo signal 10 is caught, foo_handler is called good bye 维基百科对handler的解释是这样的 Handler, an asynchronous callback (computer programming) subroutine in computing ... Event handler, a routine for processing a programming event Interrupt handler, a routine for processing CPU interrupts Signal handler, a routine for handling signals sent to a process Exception handler, a routine for handling software exceptions 而维基百科对handle的解释是这样的 In computer programming, a handle is an abstract reference to a resource. Handles are used when application software references blocks of memory or objects managed by another system, such as a database or an operating system. A resource handle can be an opaque identifier, in which case it is often an integer number (often an array index in an array or table that is used to manage that type of resource), or it can be a pointer that allows access to further information.Common resource handles are file descriptors, network sockets, database connections, process identifiers (PIDs), and job IDs. Process IDs and job IDs are explicitly visible integers, while file descriptors and sockets (which are often implemented as a form of file descriptor) are represented as integers, but are typically considered opaque. In traditional implementations, file descriptors are indices into a (per-process) file descriptor table, thence a (system-wide) file table. 3. 总结 A handle  is an abstract reference to a resource. Handle是对某个资源的抽象引用。A handler is an asynchronous callback subroutine. Handler则是一个异步的回调函数(子程序)。 附注 《柯林斯高阶英语学习词典》对handle和handler的解释(供参考并帮助理解其在计算机世界里的含义) A handle is the part of an object such as a tool, bag, or cup that you hold in order to be able to pick up and use the object. A handler is someone whose job is to deal with a particular type of object.
http://www.hkea.cn/news/14290990/

相关文章:

  • 网站建设 经验网站建设评比标准
  • 网站设计计划书怎么建立自己企业网站
  • 网站开发三剑客海口专业做网站
  • 怎么接做网站私单网站建设 工作室
  • 企业网站建设的请示睢宁网站建设xzqjwl
  • 在线考试系统网站开发港口建设费申报网站
  • 江门免费网站建站模板司法公开网站建设情况汇报
  • 房地产的设计网站建设网站建设后台管理实训报告
  • 建设单位经常去哪个网站东莞市网站建设分站
  • 网站商城建设的维度赣州新闻联播今天回放
  • 网站建站请示app页面制作
  • 黄骅市海边做搜狗手机网站优化快
  • 全国十大网站建设公司排名湖北省建设工程信息网官网
  • 短网址生成站长工具wordpress 去除图片
  • 网站视频下载windows注册公司代理电话
  • 有人用dw做网站吗公司简介范本
  • 惠州建设银行网站crm客户端
  • 成都私人做网站建设网络营销工具及其特点
  • 可做兼职的翻译网站有哪些网站界面的版式架构
  • 企业手机网站建设市场早晨网站建设
  • 网站建建设儿童网站模板免费下载
  • 个人定制网站怎么做陕西省住房与建设厅网站
  • 网站出现弹窗住房和城乡建设部网站统计
  • 西昌有做网站的公司吗wordpress支持页面模版
  • 万江建设网站网站ui设计
  • 外贸公司网站建设费用 如何申请做网站怎么宣传运营
  • apache 创建网站网站设计的流程简答题
  • 扬州住房城乡建设局网站wordpress新用户权限
  • 网站没有做301定向优秀的设计案例及说明
  • 临沧网站制作常用python编程软件