多线程:(百度百科借一波定义) 多线程(英语:multithreading),是指从软件或者硬件上实现多个线程并发执行的技术.具有多线程能力的计算机因有硬件支持而能够在同一时间执行多于一个线程,进而提升整体处理性能.具有这种能力的系统包括对称多处理机.多核心处理器以及芯片级多处理(Chip-level multithreading)或同时多线程(Simultaneous multithreading)处理器. 在一个程序中,这些独立运行的程序片段叫作"线程"(Thread),利用它编程…
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-…
Time again to attempt to implement that exciting technology, Federation Services (Web Single Sign On, SAML, WS-Federation, or whatever you want to call it) with SharePoint. Last time we tried this, SharePoint 2010 was a baby product, MS was just test…
According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970." Given a board with m by n cells, each cell has an initial state live (1…
The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a 2D grid. Our valiant knight (K) was initially positioned in the top-left room and must fight his wa…
catalogue . 相关基础知识 . Deviare API Hook Overview . 使用ctypes调用Windows API . pydbg . winappdbg . dll injection . process monitor with WMI . sobek-hids 0.  相关基础知识 0x1: Python 程序和 C 程序的整合 为了节省软件开发成本,软件开发人员希望能够缩短的软件的开发时间,希望能够在短时间内开发出稳定的产品.Python 功能强大,简单易用,能…
import sys from subprocess import PIPE, Popen from threading import Thread try: from Queue import Queue, Empty except ImportError: from queue import Queue, Empty # python 3.x ON_POSIX = 'posix' in sys.builtin_module_names def enqueue_output(out, queu…
Gym 101047E Escape from Ayutthaya Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u  Practice  Description standard input/output Ayutthaya was one of the first kingdoms in Thailand, spanning since its foundation in 1350 to…
一.RabbitMQ队列 1.安装: a.官网: 安装 http://www.rabbitmq.com/install-standalone-mac.html b.安装python rabbitMQ module pip install pika or easy_install pika or 源码 https://pypi.python.org/pypi/pika 2.实现最简单的队列通信 a.示意图 3.代码: a.send端 #!/usr/bin/env python import pik…
前言 现在工作中基本离不开requireJS这种模块管理工具了,之前一直在用,但是对其原理不甚熟悉,整两天我们来试着学习其源码,而后在探寻其背后的AMD思想吧 于是今天的目标是熟悉requireJS整体框架结构,顺便看看之前的简单demo RequireJS学习笔记 程序入口 源码阅读仍然有一定门槛,通看的做法不适合我等素质的选手,所以还是得由入口开始,requireJS的入口便是引入时候指定的data-main <script src="require.js" type=&qu…
接上文http://www.cnblogs.com/aaronjs/p/3447483.html 本文重点:自定义事件 “通过事件机制,可以将类设计为独立的模块,通过事件对外通信,提高了程序的开发效率.” 对象之间通过直接方法调用来交互 1)对象A直接调用对象B的某个方法,实现交互:直接方法调用本质上也是属于一种特殊的发送与接受消息,它把发送消息和接收消息合并为一个动作完成: 方法调用方和被调用方被紧密耦合在一起:因为发送消息和接收消息是在一个动作内完成,所以无法做到消息的异步发送和接收: 2)…
1.1 IntroductionKafka is a distributed streaming platform. What exactly does that mean?kafka是一个分布式的流式平台,它到底是什么意思? We think of a streaming platform as having three key capabilities:我们认为流式平台有以下三个主要的功能: It let's you publish and subscribe to streams of r…
Linux 系统中僵尸进程和现实中僵尸(虽然我也没见过)类似,虽然已经死了,但是由于没人给它们收尸,还能四处走动.僵尸进程指的是那些虽然已经终止的进程,但仍然保留一些信息,等待其父进程为其收尸.配图源自 Flickr  僵尸进程如何产生的? 如果一个进程在其终止的时候,自己就回收所有分配给它的资源,系统就不会产生所谓的僵尸进程了.那么我们说一个进程终止之后,还保留哪些信息?为什么终止之后还需要保留这些信息呢? 一个进程终止的方法很多,进程终止后有些信息对于父进程和内核还是很有用的,例如进程的ID…
Basic usage: th neural_style.lua -style_image <image.jpg> -content_image <image.jpg> OpenCL usage with NIN Model (This requires you download the NIN Imagenet model files as described above): th neural_style.lua -style_image examples/inputs/pic…
笔记(二)也分为三部分: 一. 介绍: 注释说明:v2.0.3版本.Sizzle选择器.MIT软件许可注释中的#的信息索引.查询地址(英文版)匿名函数自执行:window参数及undefined参数意义 'use strict' 严格模式:代码规范及其不推荐严格模式理由rootjQuery根节点:document 获取及其声明意义readyList DOM加载相关……typeof undefined 字符串形式'undefined'的存放及其意义. 先看开头的注释: /*! * jQuery J…
官方文档说: If a consumer dies (its channel is closed, connection is closed, or TCP connection is lost) without sending an ack, RabbitMQ will understand that a message wasn't processed fully and will re-queue it 即: 如果消费者进程挂掉了(channel关闭, connection关闭,或者tcp…
Vanya and his friend Vova play a computer game where they need to destroy n monsters to pass a level. Vanya's character performs attack with frequency x hits per second and Vova's character performs attack with frequency y hits per second. Each chara…
此处的Activex是ATL方式的. [ComVisible(false)]    [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("00000001-0000-0000-C000-000000000046")]    internal interface IClassFactory    {        void CreateInstance([MarshalAs(UnmanagedType…
listeners, Listener List - Comma-separated list of URIs we will listen on and their protocols. Specify hostname as 0.0.0.0 to bind to all interfaces. Leave hostname empty to bind to default interface. Examples of legal listener lists: PLAINTEXT://myh…
414. Third Maximum Number 给一个非空的整数数组,找到这个数组中第三大的值,如果不存在,那么返回最大的值.要求时间复杂度为o(n) 例如: Example 1: Input: [3, 2, 1] Output: 1 Explanation: The third maximum is 1. Example 2: Input: [1, 2] Output: 2 Explanation: The third maximum does not exist, so the maxi…
答案待定 1.请用shell查询file1 里面空行的所在行号2.编写ShellScript查询file1 以abc 结尾的行3.打印出file1 文件第1 到第3 行4.如何将本地80 端口的请求转发到8080 端口,当前主机IP 为192.168.2.15.crontab在11 月份内,每天的早上6 点到12 点中,每隔2 小时执行一次/usr/bin/httpd.sh 怎么实现6.编写个shell 脚本将/usr/local/test 目录下大于100K 的文件转移到/tmp 目录下7.简…
There are 1000 buckets, one and only one of them contains poison, the rest are filled with water. They all look the same. If a pig drinks that poison it will die within 15 minutes. What is the minimum amount of pigs you need to figure out which bucke…
在Linux中每一个进程的数据是存储在一个task_struct结构(定义在sched.h中)中的. struct task_struct { volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ struct thread_info *thread_info; atomic_t usage; unsigned long flags; /* per process flags, defined below */ unsi…
Redis redis是一个key-value存储系统.和Memcached类似,它支持存储的value类型相对更多,包括string(字符串).list(链表).set(集合).zset(sorted set --有序集合)和hash(哈希类型).这些数据类型都支持push/pop.add/remove及取交集并集和差集及更丰富的操作,而且这些操作都是原子性的.在此基础上,redis支持各种不同方式的排序.与memcached一样,为了保证效率,数据都是缓存在内存中.区别的是redis会周期性…
001 Love your neighbor as yourself.         要爱人如己.--<旧·利>19:18      002 Resentment kills a fool, and envy slays the simple.         忿怒害死愚妄人,嫉妒杀死痴迷人.--<旧·伯>5:2 003 Does a wild donkey bray when it has grass, or an ox bellow when it has fodder?  …
作者:陈伟明联系 :  QQ 942923305 | 微信 toby942923305E-mail: cwm.win@hotmail.com==================================服务器操作系统: Ubuntu trusty14.04nginx 版本: 1.10.1 ==================================修订时间:15:09 2015-10-20 星期二17:13 2015-10-23 星期五 修订错误21:45 2016-06-09 星…
According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970." Given a board with m by n cells, each cell has an initial state live (1…
1.Install [Anaconda](https://docs.continuum.io/anaconda/install#anaconda-install) 实际上安装了anaconda就已经安装好了jupyter,但是为了便于一些分析,我们配置一些环境. 2.配置环境 conda env create -f environment.yml 其中environment.yml中的内容如下: name: vdl dependencies: - cycler==py35_0 - decorat…
/* ptrace.c *//* By Ross Biro 1/23/92 *//* edited by Linus Torvalds */ #include <linux/head.h>#include <linux/kernel.h>#include <linux/sched.h>#include <linux/mm.h>#include <linux/errno.h>#include <linux/ptrace.h>#inclu…
objdump -H 显示如下: 一般常用的是 objdump -x 显示文件头信息 objdump -d 反汇编代码段代码 objdump -D 反汇编所有代码 用法:objdump <选项> <文件> 显示来自目标 <文件> 的信息. 至少必须给出以下选项之一: -a, --archive-headers Display archive header information -f, --file-headers Display the contents of the…