本文是对不同平台不同 IP packet 过滤程序透明代理实现的一些思考,主要考虑过滤规则以及如何在代理程序中获取客户端网络请求的原目标 IP 地址。
dst_addr:所需获取的目标地址;
client_addr:客户端请求的源地址,可通过 accept() 获取;
local_addr:代理程序绑定的地址,在 bind() 调用中传入的地址;
log_printf():类比 printf(),只不过用来输出信息至日志文件,这里没有给出具体的实现。
| /** For advanced users. */ | |
| { | |
| "defaultFontFamily": { | |
| "standard": "Source Han Serif", //String - Defaults to "Times New Roman". | |
| "serif": "Source Han Serif", // String - Defaults to "Times New Roman". | |
| "sansSerif": "Source Han Sans", // String - Defaults to "Arial". | |
| "monospace": "JetBrains Mono" // String - Defaults to "Courier New". | |
| }, | |
| "autoHideMenuBar": false, //Boolean - Auto hide the menu bar unless the `Alt` key is pressed. Default is false. |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include <time.h> | |
| #include <sys/time.h> | |
| /* | |
| Build: | |
| gcc -o time_perf time_perf.c |
かならず、 ISUCON10 予選レギュレーション も併せてご確認ください。レギュレーションの内容と本マニュアルの内容に矛盾がある場合、本マニュアルの内容が優先されます。
(時刻はすべて JST)
| local sleep, get_time | |
| local math_floor = math.floor | |
| if not jit then -- not LuaJIT? | |
| return require "timer.c" | |
| elseif jit.os == "Windows" then | |
| local ffi = require "ffi" | |
| ffi.cdef [[ | |
| void __stdcall Sleep(unsigned dwMilliseconds); | |
| unsigned __stdcall GetTickCount(void); |
A while ago I tried implementing a photo mask tool in MockoFun which is based on FabricJS
Check out an working example: https://jsfiddle.net/codingdude/sk84xLh2/
The solution I came up was combining the built in fabric.Image.filters.BlendImage filter with a custom FabricJS brush. Here's a glimpse at my implementation of that.
(function(){| <!DOCTYPE NETSCAPE-Bookmark-file-1> | |
| <!-- This is an automatically generated file. | |
| It will be read and overwritten. | |
| DO NOT EDIT! --> | |
| <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> | |
| <TITLE>Bookmarks</TITLE> | |
| <DT><H3 ADD_DATE="1619442857" LAST_MODIFIED="1621171927">K8s-CKA-CAKD-Bookmarks</H3> | |
| <DL><p> | |
| <DT><A HREF="https://kubernetes.io/docs/reference/kubectl/cheatsheet/" ADD_DATE="1573290265" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAADbElEQVQ4jW2TS2xUdRjFz/f/35k7z86LAcaWBlDSEtBWSgUbUiIYTRtQ6yNRHkZDJBFNBMSNBq0kuNCYaAl1IbJwYcBqFETFKgmMEbAxausQpdQOpsVhOoxt58773v/9XNQ2LPytvvMl56zOAf6DmeXcDRBPDT2WL1tfF8rWCc79/ABugpkF/g/uhsbTg49nctap9/sNs7N7krsOTvNH5/KVXNH8jHO/dTFAN3vmBOevbM1Yi3d8esG85+SAhd+Thr0oKm1lM1JZJZsbgvTgXcBDba5vAtbIB+Rv7JsLYC7v6/tRf+vtvkmkMkUV8hFfy1ryyXt9KFcZfd8XEQtLNVVgWnqLV+59JIjNd1aeJ+k6TPxVh/732s8vdHYXmxb4y1bFJG0qr2j7Ri/aV7qgFPDtryUcO1fEwqBkm9k0TI/zi/3us7Ee530amncvSSTNJUa+RE31mmNDkwsNdU4MDJfpH0OhXGXMDwi891yYR9MWnfml5Lg4XMLQqFwe23Y4JuC |
| (function() { | |
| /** | |
| * 记录方法使用情况的类 | |
| * @param {Array.<boolean>} umMap 初始的使用情况 | |
| */ | |
| var UsageManager = function(umMap) { | |
| this.umMap = umMap || []; | |
| }; | |
| /** | |
| * 记录新的使用情况 |
This script reads PascalVOC xml files, and converts them to YOLO txt files.
Note: This script was written and tested on Ubuntu. YMMV on other OS's.
Disclaimer: This code is a modified version of Joseph Redmon's voc_label.py