Learn and live.
简单的说 Node.js 就是运行在服务端的 JavaScript。Node.js 是一个基于 Chrome V8 引擎的 JavaScript 运行环境。Node.js 使用了一个事件驱动、非阻塞式 I/O 的模型,使其轻量又高效。Node.js 的包管理器 npm,是全球最大的开源库生态系统。
阅读全文
容器是一种把多个元素组织在一起的数据结构,容器中的元素可以逐个地迭代获取,可以用 in, not in关键字判断元素是否包含在容器中。在Python中,常见的容器对象有:list, deque, ….set, frozensets, ….dict, defaultdict, OrderedDict, Counter, ….tuple, namedtuple, …str
谈装饰器前,还要先要明白一件事,Python 中的函数和 Java、C++不太一样,Python 中的函数可以像普通变量一样当做参数传递给另外一个函数.装饰器本质上是一个 Python 函数或类,其返回值也是一个函数或类对象, 作用是让其他函数或类在不需要做任何代码修改的前提下增加额外功能。123456789#!/usr/bin/env# -*-coding:utf-8-*-__author__ = 'arvin'def decorator(func): print("%s was called" % func.__name__) func()def hello(name="arvin"): print("Hello %s!" % name)decorator(hello)
123456789
#!/usr/bin/env# -*-coding:utf-8-*-__author__ = 'arvin'def decorator(func): print("%s was called" % func.__name__) func()def hello(name="arvin"): print("Hello %s!" % name)decorator(hello)
第一步: 编写个C文件,功能是将两个数字相加并输出,命名为add.c,这个将成为在Python中的模块名,如下:1234567/* File : add.c */ int add(int x, int y) { int g; g = x + y; return g; }
1234567
/* File : add.c */ int add(int x, int y) { int g; g = x + y; return g; }
NSIS(Nullsoft Scriptable Install System)是一种为Windows创建安装程序的工具,开源免费。NSIS创建能够安装,卸载,设置系统设置,提取文件等的安装程序。可完全控制安装程序的每个部分, 使用默认选项,开销只有34 KB。