x, y, z = 0, 1, 0 if x == 1 or y == 1 or z == 1: print('passed') if 1 in (x, y, z): print('passed') # These only test for truthiness: if x or y or z: print('passed') if any((x, y, z)): print('passed')…
x, y, z = 0, 1, 0 if x == 1 or y == 1 or z == 1: print('passed') if 1 in (x, y, z): print('passed') if x or y or z: print('passed') if any((x, y, z)): print('passed') 上面的公式效果是等效的.…
原文:https://coryrylan.com/blog/angular-multiple-http-requests-with-rxjs --------------------------------------------------------------- Cory Rylan Nov 15, 2016 Updated Feb 25, 2018 - 5 min readangular rxjs This article has been updated to the latest v…
http://docs.oracle.com/javase/tutorial/essential/regex/index.html This lesson explains how to use the java.util.regex API for pattern matching with regular expressions. Although the syntax accepted by this package is similar to the Perl programming l…
Beej's Guide to Network Programming Using Internet Sockets Brian "Beej Jorgensen" Hallbeej@beej.us Version 3.0.15July 3, 2012 Copyright © 2012 Brian "Beej Jorgensen" Hall Contents 1. Intro 1.1. Audience 1.2. Platform and Compiler 1.3. …
Introduction to text manipulation on UNIX-based systems https://www.ibm.com/developerworks/aix/library/au-unixtext/index.html     A basic tenets of UNIX philosophy is to create programs (or processes) that do one thing, and do that one thing well. It…
摘要 前面介绍了使用vs2015新建asp.net core web的内容,这篇文章学习下project.json文件的内容. project.json 原文:https://docs.microsoft.com/zh-cn/dotnet/articles/core/tools/project-json project.json文件用来定义asp.net core项目的元数据,编译信息和依赖.在本篇文章中,你可以看到你能在project.json中定义的所有属性列表. Note .NET Cor…
winsock教程- windows下的socket编程(c语言实现) 使用winsock进行socket 编程     这是一个学习windows下socket编程(c语言)的快速指南.这是因为一下代码片段只能运行在windows下.windows API中的socket编程部分叫做winsock.   你电脑上做出的任何网络通信背后基本上都有socket,它是一个网络的基本组成部分.举个例子说当你在浏览器键入www.google.com的时候,socket连接到google.com并且取回那…
BlogEngine.Net 是个功能点很全面的开源博客系统,容易安装和实现定制,开放接口支持TrackBack,可以定义主题配置数据源等等.可谓五脏俱全,这里先记录一下它基于Membership的权限管理(一般只说到角色就没了). Membership是.net2.0的时候就出来了,现在的最新版本是Identity(微软已经将这个Asp.net项目开源 https://github.com/aspnet/Identity ).权限管理就是处理用户.角色.和具体权限的关系.用户和角色是多对多的关…
CoffeeScript is a little language that compiles into JavaScript. Underneath that awkward Java-esque patina, JavaScript has always had a gorgeous heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way. The golden rule…
influxdb influxdb是最新的一个时间序列数据库,最新一两年才产生,但已经拥有极高的人气.influxdb 是用Go写的,0.9版本的influxdb对于之前会有很大的改变,后端存储有LevelDB换成了BoltDB,读写的API也是有了很大的变化,也将支持集群化,continuous query,支持retention policy,读写性能也是哇哇的,可以说是时间序列存储的完美方案,但是由于还很年轻,可能还会存在诸多的问题,就像现在正在开发的0.9一样,发布一拖再拖,就是由于还有…
文章引用自NPoco官方Wiki,地址:https://github.com/schotime/NPoco/wiki,因公司网络不稳定,有时无法访问,特将其摘抄. Home Adam Schroder edited this page on 1 Jul 2016 · 49 revisions   Welcome to the NPoco wiki! NPoco is a fork of PetaPoco with a handful of extra features. Getting Star…
本文为阅读MDN文档笔记 目录 Different types of Selectors Attribute Selectors Presence and value attribute selectors Substring and value attribute selectors Pseudo-selectors Pseudo-classes Pseudo-elements Combinators Different types of Selectors Simple selectors:…
Serial Wire Debug interface The Serial Wire Debug protocol operates with a synchronous serial interface. This uses a single bidirectional data signal, and a clock signal. This section gives an overview of the physical Serial Wire Debug interface. Lin…
influxdb influxdb是最新的一个时间序列数据库,最新一两年才产生,但已经拥有极高的人气.influxdb 是用Go写的,0.9版本的influxdb对于之前会有很大的改变,后端存储有LevelDB换成了BoltDB,读写的API也是有了很大的变化,也将支持集群化,continuous query,支持retention policy,读写性能也是哇哇的,可以说是时间序列存储的完美方案,但是由于还很年轻,可能还会存在诸多的问题,就像现在正在开发的0.9一样,发布一拖再拖,就是由于还有…
知识结构 pyplot.plot()流程 1. _axes.py中plot()函数说明 a. 调用说明 plot([x], y, [fmt], data=None, **kwargs)       plot([x], y, [fmt], [x2], y2, [fmt2], ..., **kwargs) You can use `.Line2D` properties as keyword arguments for more control on the appearance. Line pro…
CoffeeScript is a little language that compiles into JavaScript. Underneath that awkward Java-esque patina, JavaScript has always had a gorgeous heart. CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way. The golden rule…
LOCKFILE(1) LOCKFILE(1) NAME lockfile - conditional semaphore-file creator SYNOPSIS lockfile -sleeptime | -r retries | -l locktimeout | -s suspend | -! | -ml | -mu | filename ... DESCRIPTION lockfile can be used to create one or more semaphore files.…
转自:http://kernel.meizu.com/linux-workqueue.html 21 August 2016   Workqueue 是内核里面很重要的一个机制,特别是内核驱动,一般的小型任务 (work) 都不会自己起一个线程来处理,而是扔到 Workqueue 中处理.Workqueue 的主要工作就是用进程上下文来处理内核中大量的小任务. 所以 Workqueue 的主要设计思想:一个是并行,多个 work 不要相互阻塞:另外一个是节省资源,多个 work 尽量共享资源 (…
Manual -- curl usage explained Related: Man Page FAQ LATEST VERSION   You always find news about what's going on as well as the latest versions from the curl web pages, located at:   https://curl.haxx.se   SIMPLE USAGE   Get the main page from Netsca…
influxdb和boltDB简介——MVCC+B+树,Go写成,Bolt类似于LMDB,这个被认为是在现代kye/value存储中最好的,influxdb后端存储有LevelDB换成了BoltDB https://www.cnblogs.com/bonelee/p/6236234.html influxdb influxdb是最新的一个时间序列数据库,最新一两年才产生,但已经拥有极高的人气.influxdb 是用Go写的,0.9版本的influxdb对于之前会有很大的改变,后端存储有Level…
Golang的标准命令简述 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. Go本身包含了大量用于处理Go程序的命令和工具.go命令就是其中最常见的一个,它有许多子命令,接下来就跟随博主一起了解一下吧~ 一.go build   1>.go build 子命令功能概述 用于编译指定的代码包括Go语言源码文件. 命令源码文件会编译生成可执行文件,并存放在命令指令的目录或指定目录下. 而库源码文件被编译后,则不会在非临时目录中留下任何文件. 2>.查看帮助信息 C:\Users\…
[译]Android API 规范 译者按: 修改R代码遇到Lint tool的报错,搜到了这篇文档,aosp仓库地址:Android API Guidelines. 58e9b5f Project import generated by Copybara. by Android API Council · 9 months ago c0b835d Initial empty repository by Baligh Uddin · 8 years ago 提交记录显示最近才更新的,是官方的应用…
前言 上一篇介绍了Vite启动,HMR等时间的获取. 但各阶段详细的耗时信息,只能通过debug的日志获取 本文就实现一下debug日志的拦截 插件效果预览 --debug做了什么 项目启动指令 vite --debug 在源码中搜索 --debug,可以在vite/packages/vite/bin/vite.js文件中定位到目标代码 const debugIndex = process.argv.findIndex((arg) => /^(?:-d|--debug)$/.test(arg))…
今天写了一条iptables的规则 iptables -t filter -A INPUT -s 192.168.192.0/24 -d 192.168.192.140 -p tcp -dport 22 -j ACCEPT  然后一直出现上面的错误 原来是-dport 写错了 应该写成--dport…
Convert from list Apply np.array() method to convert a list to a numpy array: import numpy as np mylist = [1, 2, 3] x = np.array(mylist) x Output: array([1, 2, 3]) Or just pass in a list directly: y = np.array([4, 5, 6]) y Output: array([4, 5, 6]) Pa…
Virtual addresses from multiple address spaces are translated to real addresses in main memory by generating for each virtual address an address space identifier (AID) identifying its address space. Then, the virtual address and its AID are used to o…
The present invention allocates resources in a multi-operating system computing system, thereby avoiding bottlenecks and other degradations that result from competition for limited resources. In one embodiment, a computer system includes resources an…
https://datatracker.ietf.org/doc/rfc8684/?include_text=1 TCP Extensions for Multipath Operation with Multiple AddressesRFC 8684   Document Type   RFC - Proposed Standard (March 2020; No errata) Obsoletes RFC 6824 Was draft-ietf-mptcp-rfc6824bis (mptc…
1225. Flags Time limit: 1.0 secondMemory limit: 64 MB On the Day of the Flag of Russia a shop-owner decided to decorate the show-window of his shop with textile stripes of white, blue and red colors. He wants to satisfy the following conditions: Stri…