text:
# PMSerial: OLED_64x48.ino

Read PMS5003 sensor and display results on a 0.66 inch OLED.

## OLED display

In particular this example uses the [WEMOS OLED shield][oled_shield],
and the [esp8266-oled-ssd1306][OLEDlib] library.

```bash
# install the libraries (one time setup)
platformio lib install "thingpulse/ESP8266 and ESP32 OLED driver for SSD1306 displays"
```

[oled_shield]: https://wiki.wemos.cc/products:d1_mini_shields:oled_shield
[OLEDlib]: https://github.com/ThingPulse/esp8266-oled-ssd1306

## ESP8266 `d1_mini`

**Note** This is a 3.3V board, and the PMS5003 requires 5V.

- SoftwareSerial on pins gpio2/D4 (RX) and gpio0/D3 (TX).
- OLED shield is on pins gpio4/D3 (SDA) and gpio5/D5 (SCL).

```bash
# compile
platformio run -e d1_mini

# upload
platformio run -e d1_mini -t upload

# open serial monitor
platformio run -e d1_mini -t monitor
```

## ESP32 `esp32minikit`

**Note** This is a 3.3V board, and the PMS5003 requires 5V.
You need provide 5V for the fan to operate properly.

- Serial2 on pins gpio16 (RX) and gpio17 (TX).
- OLED shield is on pins gpio21 (SDA) and gpio22 (SCL).

```bash
# compile
platformio run -e esp32minikit

# upload
platformio run -e esp32minikit -t upload

# open serial monitor
platformio run -e esp32minikit -t monitor
```

repository: avaldebe/PMserial

repo_name: avaldebe/PMserial


text:
# center-line-fitting
Takes track images output by SLAM and outputs points along the center-line in a csv file.

![image](https://user-images.githubusercontent.com/8052622/62645450-3e7a4700-b91a-11e9-846e-29a0dad7f218.png)

## Prerequisites
Get track image and info files from [Cartographer](https://github.com/googlecartographer) or some other SLAM tool. The image file should be in pgm format and the info file should be in yaml format. Here is an example track pgm and yaml combination:
##### track.pgm
![image](https://user-images.githubusercontent.com/8052622/62554222-bd01b680-b83e-11e9-8084-12e16ce1e749.png)
##### track.yaml
```
image: track.pgm
resolution: 0.050000
origin: [-5.659398, -4.766974, 0.000000]
negate: 0
occupied_thresh: 0.65
free_thresh: 0.196
```

## How It Works
This center-line-fitting algorithm uses four steps:
1. Denoise
2. Skeletonize
3. Prune and Order
4. Subsample

### Denoise
In this step, we run the [DBSCAN](https://en.wikipedia.org/wiki/DBSCAN) clustering algorithm on the image twice. The first time, we run it on the positive space and keep only the pixels from the largest cluster. The second time, we run it on the negative space and keep only the pixels from the *two* largest clusters.

##### Denoised Image:
![image](https://user-images.githubusercontent.com/8052622/62556920-e53fe400-b843-11e9-883e-ecd6d408df63.png)

### Skeletonize
Next we run Zhang's Skeletonize algorithm on the image. Here is the output of "Skeletonize" overlayed over the denoised image:

##### Skeletonized Image:
![image](https://user-images.githubusercontent.com/8052622/62557299-bbd38800-b844-11e9-88ed-803fb8859980.png)

### Prune
Next we use a Depth First Search to try to find a large cycle in graph defined by adjacent pixels in the image. We remove all pixels that do not fall along the cycle. Not only does pruning remove extra branches in the skeleton, it gives us an ordering of the pixels that goes around the track. Here is the output of "Pruning" overlayed over the denoised image:

##### Pruned Image:
![image](https://user-images.githubusercontent.com/8052622/62551846-af4a3200-b83a-11e9-87c7-78e9e341d901.png)

### Subsample
Finally, we subsample pixels along the cycle we came up with. Basically, if the x is the subsample period, we keep every xth pixel on the cycle. The result with subsample period 6 looks like this:

##### Subsampled Image:
![image](https://user-images.githubusercontent.com/8052622/62557733-88ddc400-b845-11e9-8948-b11c0663131d.png)

## Usage
Clone the repository and run the center-line-fitting script:
```
git clone https://github.com/mlab-upenn/center-line-fitting.git
cd center-line-fitting
python src/fit_centerline.py
```

## Plots
To control the plots that are displayed, use
```
python center-line-fitting.py --plot_mode <0, 1, or 2>
```
0 shows no plots, 1 (default) shows basic plots, and 2 shows all plots

## I/O
You can specify the input file paths and output directory using the command line:
```
python center-line-fitting.py --pgm_path <path to track image> --yaml_path <path to track info> --out_dir <path to output directory>
```

## Subsampling Period
You can change the subsampling period as follows:
```
python center-line-fitting.py --subsample_period 20
```
This changes how sparesly the points are sampled from the center-line path
##### subsample_period = 20
![image](https://user-images.githubusercontent.com/8052622/62555068-44035e80-b840-11e9-9fe8-1cfba5de01db.png)
##### subsample_period = 6
![image](https://user-images.githubusercontent.com/8052622/62552918-6e531d00-b83c-11e9-8702-9aae2c749327.png)

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Sequence Labeling with BiRNN and CRF

This example trains a bidirectional RNN (LSTM or GRU) with CRF for part-of-speech tagging task. It uses the UDPOS dataset
 in `torchtext` and can be extended to other sequence labeling tasks by replacing the dataset accordingly.

The `train.py` script accepts the following arguments:

```bash
optional arguments:
  -h, --help            show this help message and exit
  --emb_path EMB_PATH   path to pretrained embeddings
  --optimizer {sgd,adam,nesterov}
                        optimizer to use
  --sgd_momentum SGD_MOMENTUM
                        momentum for stochastic gradient descent
  --rnn {lstm,gru}      RNN type
  --rnn_dim RNN_DIM     RNN hidden state dimension
  --word_emb_dim WORD_EMB_DIM
                        word embedding dimension
  --char_emb_dim CHAR_EMB_DIM
                        char embedding dimension
  --char_rnn_dim CHAR_RNN_DIM
                        char RNN hidden state dimension
  --word_min_freq WORD_MIN_FREQ
                        minimum frequency threshold in word vocabulary
  --train_batch_size TRAIN_BATCH_SIZE
                        batch size for training phase
  --val_batch_size VAL_BATCH_SIZE
                        batch size for evaluation phase
  --early_stopping_patience EARLY_STOPPING_PATIENCE
                        early stopping patience
  --dropout_before_rnn DROPOUT_BEFORE_RNN
                        dropout rate on RNN inputs
  --dropout_after_rnn DROPOUT_AFTER_RNN
                        dropout rate on RNN outputs
  --lr LR               starting learning rate
  --lr_decay LR_DECAY   learning rate decay factor
  --min_lr MIN_LR       minimum learning rate
  --lr_shrink LR_SHRINK
                        learning rate reducing factor
  --lr_shrink_patience LR_SHRINK_PATIENCE
                        learning rate reducing patience
  --crf {none,small,large}
                        CRF type or no CRF
  --max_epochs MAX_EPOCHS
                        maximum training epochs
```

repository: kahne/examples

repo_name: kahne/examples


text:
# corpus-analysis-tools-list

![corpus-analysis.com](https://github.com/IngoKl/corpus-analysis-tools-list/blob/master/img/corpus-analysis.com.png)

This repository contains the code behind the list at [corpus-analysis.com](https://corpus-analysis.com).

The site is written in old-school PHP and definitely not an example of great software engineering. That being said, you're more than welcome to optimize the code!

The **architecture** is a bit odd:
The actual data is stored in a Google Sheets sheet. This sheet, which effectively works as a multiuser backend, is then being downloaded as a CSV file and processed.

If you want to **run your own version**, you simply need to change and rename `config.default.php` to `config.php`. Also, make sure to remove the analytics code and change the copyright/impressum.

license: MIT

repository: droliveira/corpus-analysis-tools-list

gha_license_id: MIT

repo_name: droliveira/corpus-analysis-tools-list


text:
# CFUnmitigate
![APM](https://img.shields.io/apm/l/vim-mode?style=for-the-badge)
[![cloudscraper](https://img.shields.io/badge/NPM-cloudscraper-red?logo=npm&style=for-the-badge)](https://github.com/codemanki/cloudscraper)
[![Build Status](https://img.shields.io/travis/com/Mrakovic-ORG/CFUnmitigate?style=for-the-badge)](https://travis-ci.com/Mrakovic-ORG/CFUnmitigate)

UAM Bypass only by using CloudScraper requests.

![uam-bypass](images/uam-bypass.png)

### Install
```sh
git clone https://github.com/Mrakovic-ORG/CFUnmitigate
cd CFUnmitigate
npm install
node CFUnmitigate.js
```
### Disclaimer
We are not responsible for any damage done with this script, its has been made for educational purpose.

branch_name: refs/heads/main


text:
# pi-timolo
### Raspberry (Pi) - (Ti)melapse, (Mo)tion, (Lo)wlight
### Wiki https://github.com/pageauc/pi-timolo/wiki
YouTube Videos https://www.youtube.com/playlist?list=PLLXJw_uJtQLa11A4qjVpn2D2T0pgfaSG0

**NEW Release 5.0** with optional video stream thread, improved day/night transitions with no greenish images + Misc updates
**NEW Release 6.0** with optional DateTime Named subfolders, recent files option and Disk Space Management + Misc updates
**See Minimal Upgrade Below**

### Description
pi-timolo is a python picamara module application for a Raspberry PI computer (RPI).
A RPI camera module must be attached. pi-timolo can take timelapse and motion detection
images/videos, separately or together. Takes Long exposure Night (lowlight) images for
Time Lapse and/or Motion. Has smooth twilight transitions based on a threshold light
setting, so a real time clock is not required. Customization settings are saved in a config.py and conf files.
The application is primarily designed for headless operation and includes sync.sh that
can securely synchronize files with a users google drive.  This works well for remote security
cameras. Camera config.py settings can be administered remotely from a google drive using sync.sh.
Includes makevideo.sh to create timelapse or motion lapse videos from images, convid.sh to convert/combine
h264 to mp4 format, a simple minumum or no setup web server to view images or videos and menubox.sh
to admin settings and stop start pi-timolo and webserver as background tasks.

***NEW*** - Added two config.py templates config.py.stream uses video streaming thread (best with quad core) config.py.default
uses normal picamera image capture for motion detection and is less resource intensive for single core RPI's
Make a backup of config.py then Copy a template over the original config.py per example below

    cd ~/pi-timolo.py
    cp config.py config.py.bak
    cp config.py.stream config.py

***Note:*** use nano to reinstate any customized settings

see Github Wiki for More Details https://github.com/pageauc/pi-timolo/wiki

### Quick Install
For Easy pi-timolo-install.sh onto raspbian RPI.

    curl -L https://raw.github.com/pageauc/pi-timolo/master/source/pi-timolo-install.sh | bash

From a computer logged into the RPI via SSH(Putty) or desktop terminal session
* Use mouse to highlight curl command above, right click, copy.
* Select RPI SSH(Putty) window, mouse right click, paste.
The command will download and execute the GitHub pi-timolo-install.sh script

**IMPORTANT** - A raspbian apt-get update and upgrade will be performed as part of install
so it may take some time if these are not up-to-date

### Minimal Upgrade
If you are just interested in a minimal upgrade (must have pi-timolo previously installed)
from a logged in ssh or terminal session execute the following commands.

    cd ~/pi-timolo
    cp config.py config.py.old
    wget -O config.py https://raw.github.com/pageauc/pi-timolo/master/source/config.py
    wget -O pi-timolo.py https://raw.github.com/pageauc/pi-timolo/master/source/pi-timolo.py

Edit config.py to transfer any customized settings from config.py.old

### or Manual Install
From logged in RPI SSH session or console terminal perform the following. You can review
the pi-timolo-install.sh script code before executing.

    cd ~
    wget https://raw.github.com/pageauc/pi-timolo/master/source/pi-timolo-install.sh
    chmod +x pi-timolo-install.sh
    ./pi-timolo-install.sh

### Run pi-timolo
Default is motion only see config.py for detailed settings

    cd ~/pi-timolo
    ./pi-timolo.py

### Menubox
The lastest version of pi-timolo has a whiptail admin menu system. The menu's allow
start/stop of pi-timolo.py and webserver.py as background tasks, as well as
editing configuration files, making timelapse videos from jpg images, converting or joining mp4 files Etc.
To run from ssh console or terminal session.

    cd ~/pi-timolo
    ./menubox.sh

![menubox main menu](menubox.png)

### Webserver
I have also written a standalone LAN based webserver.py to allow easy access to pi-timolo image and video files
on the Raspberry from another LAN computer web browser.  There is no setup required but the display
settings can be customized via variables in the config.py file or via menubox admin menuing.
To run from ssh console or terminal session.

    cd ~/pi-timolo
    ./webserver.py

![webserver browser screen shot](webserver.png)

### Reference Links
Detailed pi-timolo Wiki https://github.com/pageauc/pi-timolo/wiki
YouTube Videos https://www.youtube.com/playlist?list=PLLXJw_uJtQLa11A4qjVpn2D2T0pgfaSG0

Good Luck
Claude Pageau

repository: ajmendez/pi-timolo

repo_name: ajmendez/pi-timolo


text:
---
layout: default
---

# 1994-01-10 - Beware of forged messages

## Header Data

From<EMAIL_ADDRESS>(Greg Broiles)

To<EMAIL_ADDRESS>Message Hash: d87351a258ecac2400c0e8e760e7f83901b9d8c2557bbf2144998a7c8b2815dd

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1994-01-10 04:51:15 UTC

Raw Date: Sun, 9 Jan 94 20:51:15 PST

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Greg Broiles)
Date: Sun, 9 Jan 94 20:51:15 PST
To<EMAIL_ADDRESS>Subject: Beware of forged messages
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

-----BEGIN PGP SIGNED MESSAGE-----

Someone recently posted a forged message with my name on it to the
Cypherwonks list. In the future, all of my messages will be sent
PGP-clearsigned. Please ignore (or mail to me) any messages which
aren't - particularly if they appear to support Detweiler and his
totalitarian schemes, which this particular forgery did.

The header of the message in question was a byte-for-byte duplicate
of an authentic header from a message I did write; apparently our
favorite cyberspatial lunatic has moved beyond just signature blocks.

-----BEGIN PGP SIGNATURE-----
Version: 2.4

iQCVAgUBLTDdcH3YhjZY3fMNAQGwigQAtPhZpZoC8SXR0tstHQgabIVLq04jzTNz
kWOibwRd4Zvvs+tnxkKhkMQU2qR13e4Go0N/RV19cVpqA2Yr3DEnCkCbqKnVz54V
qK6Pyu+fw3wNROobzCAsTZw25H4zRgqmxjkSW7hbIQVU35mZt+pLn23BKV+ck3L4
cdZeOer6Q7w=
=MXpV
-----END PGP SIGNATURE-----

--
Greg Broiles                   "Sometimes you're the windshield,
<EMAIL_ADDRESS>           sometimes you're the bug." -- Mark Knopfler

{% endraw %}
```

## Thread

+ Return to [January 1994](/archive/1994/01)

+ Return to<EMAIL_ADDRESS>(Greg Broiles)](/authors/greg_at_ideath_goldenbear_com_greg_broiles_)"

+ 1994-01-10 (Sun, 9 Jan 94 20:51:15 PST) - Beware of forged messages -<EMAIL_ADDRESS>(Greg Broiles)_


text:
---
layout: post
title: Hacknews2020-09-21新闻
category: Hacknews
tags: hacknews
keywords: hacknews
coverage: hacknews-banner.jpg
---

Hacker News 是一家关于计算机黑客和创业公司的社会化新闻网站，由保罗·格雷厄姆的创业孵化器 Y Combinator 创建。
与其它社会化新闻网站不同的是 Hacker News 没有踩或反对一条提交新闻的选项（不过评论还是可以被有足够 Karma 的用户投反对票）；只可以赞或是完全不投票。简而言之，Hacker News 允许提交任何可以被理解为“任何满足人们求知欲”的新闻。

## HackNews Hack新闻

- [DuckDB – An embeddable SQL database like SQLite, but supports Postgres features](https://duckdb.org/)
- `DuckDB –可嵌入的SQL数据库，如SQLite，但支持Postgres功能`
- [uMatrix has been archived](https://github.com/gorhill/uMatrix)
- `uMatrix已存档`
- [Dream Vendor "Canna_Bars" Sentenced to Prison](https://darknetlive.com/post/dream-vendor-canna-bars-sentenced-to-prison/)
- `通过照片中的指纹识别的暗网市场供应商`
- [Designing a standard sewage network for refugee camps](https://monacivilengineering.blogspot.com/2020/09/standard-sewage-network-for-refugee.html)
- `为难民营设计标准污水网络`
- [The Vampire Ship: The seizure of Europe's largest heroin shipment](https://newrepublic.com/article/159252/vampire-ship)
- `吸血鬼船（欧洲最大的海洛因货物）`
- [Robert Gore has died](https://www.bbc.com/news/world-us-canada-54224405)
- `Gore-Tex发明家Robert Gore去世了`
- [Trump’s WeChat curbs halted by judge on free speech concerns](https://www.bloomberg.com/news/articles/2020-09-20/trump-s-wechat-prohibition-in-u-s-put-on-hold-by-judge)
- `特朗普因言论自由问题而暂停微信遏制`
- [Laid Off, Now What?](https://bharathpbhat.github.io/2020/09/19/laid-off-now-what.html)
- `下岗，现在呢？`
- [We need physical audio kill switches](https://rubenerd.com/we-need-physical-audio-kill-switches/)
- `我们需要物理音频抑制开关`
- [Sarcophagi buried for 2,500 years unearthed in Saqqara](https://www.bbc.com/news/world-middle-east-54227282)
- `埃及墓葬：萨加法尔的石棺被埋葬了2500年`
- [FinCEN Files show trillions in tainted dollars flow freely through major banks](https://www.icij.org/investigations/fincen-files/global-banks-defy-u-s-crackdowns-by-serving-oligarchs-criminals-and-terrorists/)
- `全球银行通过为寡头，罪犯和恐怖分子提供服务来抵抗美国的镇压行动`
- [Communicating with Interactive Articles](https://distill.pub/2020/communicating-with-interactive-articles/)
- `与互动文章交流`
- [Introduction to Computer Graphics Online Textbook (2018)](http://math.hws.edu/graphicsbook/index.html)
- `计算机图形学在线教科书简介（2018）`
- [Basic Printing on OpenBSD](https://paedubucher.ch/articles/2020-09-20-basic-printing-on-openbsd.html)
- `OpenBSD上的基本打印`
- [Tarsnap – cleaning up old backups](https://dan.langille.org/2020/09/10/tarsnap-cleaning-up-old-backups/)
- `Tarsnap –清理旧备份`
- [Marc Andreessen on productivity, scheduling, reading habits, work](https://a16z.com/2020/09/07/on-productivity-scheduling-reading-habits-marc-andreessen/)
- `马克·安德森（Marc Andreessen）谈生产力，日程安排，阅读习惯，工作等`
- [Why is unauthenticated encryption insecure?](https://cybergibbons.com/reverse-engineering-2/why-is-unauthenticated-encryption-insecure/)
- `为什么未经身份验证的加密不安全？`
- [Java Turns 25 – Whats Next? pdf](https://www.oracle.com/a/ocom/docs/corporate/analystrelations/omdia-java-turns-25.pdf)
- `Java 25岁-接下来是什么？ `
- [Apache Arrow and MinIO](https://blog.min.io/turbocharging-minio-datalakes-with-arrowrdd/)
- `Apache Arrow和MinIO`
- [What is the value of browser diversity?](https://daverupert.com/2020/09/the-value-of-browser-diversity/)
- `浏览器多样性的价值是什么？`
- [Let's Encrypt's New Root and Intermediate Certificates](https://letsencrypt.org/2020/09/17/new-root-and-intermediates.html)
- `让我们加密新的根证书和中间证书`
- [Why Not Rust?](https://matklad.github.io/2020/09/20/why-not-rust.html)
- `为什么不生锈？`
- [Backing up data like the adult I supposedly am](https://magnusson.io/post/backups/)
- `像我应该是成年人一样备份数据`
- [Kraken Wins Bank Charter Approval](https://blog.kraken.com/post/6241/kraken-wyoming-first-digital-asset-bank/)
- `海妖获银行宪章批准`
- [The Little Things: Speeding up C++ compilation](https://codingnest.com/the-little-things-speeding-up-c-compilation/)
- `小事情：加速C ++编译`
- [The Social Dilemma](https://www.thesocialdilemma.com/)
- `社会困境`
- [Make School (YC W12) Is Hiring a VP of Finance](https://www.make.sc/vp-finance)
- `Make School（YC W12）聘请财务副总裁`
- [On the Use of a Life](http://www.daemonology.net/blog/2020-09-20-On-the-use-of-a-life.html)
- `关于生命的运用`
- [Generative Bad Handwriting](https://avinayak.github.io/programming/art/2020/09/18/p5-strokes.html)
- `生成不良手写`
- [Stanisław Leśniewski: rethinking the philosophy of mathematics pdf](https://biblio.ugent.be/publication/4443772/file/4443780.pdf)
- `StanisławLeśniewski：重新思考数学哲学pdf`
- [The Rise and Fall of High Performance Fortran (2011)](https://cacm.acm.org/magazines/2011/11/138217-the-rise-and-fall-of-high-performance-fortran/fulltext)
- `高性能Fortran的兴衰（2011）`
- [Domains for the Rest of Us](https://www.domainsfortherestofus.com/)
- `我们其他人的域名`
- [Haskell RecordDotSyntax language extension proposal (Accepted)](https://github.com/ghc-proposals/ghc-proposals/pull/282)
- `Haskell RecordDotSyntax语言扩展建议（已接受）`
- [Build Personal Moats](https://eriktorenberg.substack.com/p/build-personal-moats)
- `建立护城河`
- [Tracing the NYC Trip in “The Warriors” (2006)](http://www.stonegreasers.com/greaser/conclay.html)
- `在“勇士”（2006）中追踪纽约之旅`
- [Good Quality DOSBox Video Capture](https://susam.in/blog/good-quality-dosbox-video-capture/)
- `高质量DOSBox视频捕获`
- [Jet Fuel Is Now So Cheap It’s Being Blended for Use by Ships](https://www.bloomberg.com/news/articles/2020-09-20/jet-fuel-is-now-so-cheap-it-s-being-blended-for-use-by-ships)
- `喷气燃料现在是如此便宜，可以混合供船用`
- [FinCEN Files: HSBC moved Ponzi scheme millions despite warning](https://www.bbc.com/news/uk-54225572)
- `FinCEN文件：尽管有警告，汇丰还是动用了数百万的庞氏骗局`
- [A New Back End for Cranelift: Instruction Selection](https://cfallin.org/blog/2020/09/18/cranelift-isel-1/)
- `起重机的新后端：指令选择`
- [How marketers convinced America to eat fish sticks](https://thehustle.co/how-marketers-convinced-america-to-eat-fish-sticks/)
- `营销人员如何说服美国吃鱼棒`
- [Ask HN: Favourite blogs?](item?id=24539445)
- `问HN：最喜欢的博客？`
- [Logic board with 20 USB3 ports](https://portwell.com/products/detail.php?CUSTCHAR1=PEB-9783G2AR)
- `带有20个USB3端口的逻辑板`
- [Describing and Inventing a New Regular Expression Quantifier](https://blog.robertelder.org/regular-expression-quantifiers/)
- `描述和发明新的正则表达式量词`
- [In the computer](https://chris-martin.org/2020/in-the-computer)
- `在电脑里`
- [Trevor Milton Out of Nikola Motors](https://www.freightwaves.com/news/breaking-news-trevor-milton-out-of-nikola)
- `特雷弗·米尔顿（Trevor Milton）走出尼古拉汽车`
- [The Dark Side of the ‘Angel’s Share’ (2019)](https://www.atlasobscura.com/articles/what-is-whiskey-fungus)
- `“天使共享”的阴暗面（2019）`
- [Webots robot simulator went open-source](https://github.com/cyberbotics/webots)
- `Webots机器人模拟器开源`
- [Nikola founder Trevor Milton to voluntarily step down as executive chairman](https://www.cnbc.com/2020/09/21/nikola-founder-trevor-milton-to-voluntarily-step-down-as-executive-chairman.html)
- `Nikola创始人Trevor Milton自愿辞任执行董事长`
- [World's richest 1% cause double CO2 emissions of poorest 50%, says Oxfam](https://www.theguardian.com/environment/2020/sep/21/worlds-richest-1-cause-double-co2-emissions-of-poorest-50-says-oxfam)
- `乐施会表示，世界上最富裕的1％的二氧化碳排放量是最贫穷的50％的两倍`
- [Ask HN: What are your instruments for investment?](item?id=24539605)
- `问HN：您的投资工具是什么？`
- [We need young programmers; We need old programmers](https://blog.ploeh.dk/2020/09/14/we-need-young-programmers-we-need-old-programmers/)
- `我们需要年轻的程序员。`
- [The Future Is Decentralized](https://modernconsensus.com/commentary/the-future-is-decentralized/)
- `未来去中心化`
- [Microsoft Teams as a Platform](https://jukkaniiranen.com/2020/09/microsoft-teams-as-a-platform/)
- `Microsoft Teams作为平台`
- [Mysterious carvings and evidence of human sacrifice uncovered in ancient city](https://www.nationalgeographic.com/history/2020/08/mysterious-carvings-evidence-human-sacrifice-uncovered-ancient-city-china/)
- `在古城发现的神秘雕刻和人类牺牲的证据`
- [“I no longer build software”](https://github.com/docker/cli/issues/267#issuecomment-695149477)
- `“我不再构建软件”`
- [Update on Mozilla WebThings](https://discourse.mozilla.org/t/an-important-update-on-mozilla-webthings/67764)
- `Mozilla WebThings IoT平台作为独立的开源项目衍生出来`
- [Creating a Home IPv6 Network](https://blog.hansenpartnership.com/creating-a-home-ipv6-network/)
- `创建家庭IPv6网络`
- [How to catch a spy that is using a numbers station – The KGB Experience](https://www.numbers-stations.com/how-to-catch-a-spy-who-uses-numbers-stations-the-kgb-experience/)
- `如何捕捉正在使用数字电台的间谍–克格勃经验`
- [Sktime: A Unified Python Toolbox for Machine Learning with Time Series](https://github.com/alan-turing-institute/sktime)
- `Sktime：具有时间序列的机器学习统一Python工具箱`
- [Free Learning Resources related to Web-Development](https://github.com/krishnadevz/OpensourceResources)
- `与Web开发A到Z相关的免费开源学习资源`
- [Computer science professor Christian Grothoff testifies in Assange hearing](https://twitter.com/DefenseAssange/status/1307968505866846209)
- `计算机科学教授Christian Grothoff在阿桑奇听证会上作证`
- [Google search gets personal (2005)](https://www.cnet.com/news/google-search-gets-personal-1/)
- `Google搜索变得个性化（2005）`
- [Moving Your SSH Port Isn’t Security by Obscurity](https://danielmiessler.com/blog/no-moving-your-ssh-port-isnt-security-by-obscurity/)
- `默默无闻地移动SSH端口并不安全`
- [Companies can track your phone’s movements to target ads](https://arstechnica.com/information-technology/2020/09/companies-can-track-your-phones-movements-to-target-ads/)
- `公司可以跟踪您手机的移动以定位广告`
- [Microsoft to Buy Bethesda and Other Studios for $7.5B](https://bethesda.net/en/article/1iLtcvwY6Nb1GeKADyDUEX/why-microsoft-is-the-perfect-fit)
- `微软以$ 7.5B的价格购买Bethesda和其他工作室`
- [Why are Amnesty International monitors not able to observe the Assange hearing?](https://www.amnesty.org/en/latest/news/2020/09/why-are-amnesty-international-monitors-not-able-to-observe-the-assange-hearing/)
- `为什么大赦国际的监护人无法观察到阿桑奇的听力？`
- [Amazon staffers took bribes, manipulated marketplace, leaked search algorithms](https://www.theregister.com/2020/09/21/amazon_fraud_bribery_charges/)
- `亚马逊员工受贿，操纵市场，泄露搜索算法`
- [Revisiting Apple Notes (6): The Protobuf](https://ciofecaforensics.com/2020/09/18/apple-notes-revisited-protobuf/)
- `重温Apple Notes（6）：Protobuf`
- [Nikola’s founder steps down from board as company faces fraud allegations](https://www.theverge.com/2020/9/21/21448729/nikola-electric-hydrogen-truck-fraud-allegations-executive-chairman-founder-trevor-milton)
- `Nikola的创始人因公司面临欺诈指控而辞职`
- [Microsoft to Acquire ZeniMax Media and Its Game Publisher Bethesda Softworks](https://news.microsoft.com/2020/09/21/microsoft-to-acquire-zenimax-media-and-its-game-publisher-bethesda-softworks/)
- `微软将收购ZeniMax Media及其游戏发行商Bethesda Softworks`
- [Phosphine, Life, and Venus](https://blogs.sciencemag.org/pipeline/archives/2020/09/15/phosphine-life-and-venus)
- `磷化氢，生命和金星`
- [Welcoming the Talented Teams and Beloved Game Franchises of Bethesda to Xbox](https://news.xbox.com/en-us/2020/09/21/welcoming-bethesda-to-the-xbox-family/)
- `将贝塞斯达的才华横溢的团队和心爱的游戏专营权欢迎到Xbox`

## HackShows Hacks展示

- [ Mass delete Spotify playlists using RegEx](https://github.com/kabirvirji/spoticlean)
- `使用RegEx清理您的Spotify播放列表`
- [ Evaluate mortgage cost with discounted cash flow](https://www.walletcal.com/)
- `使用现金流量折现的抵押计算器`
- [ Find missing/stale translations for Android apps using GitHub actions](https://github.com/ashutoshgngwr/noice)
- `Android版Noice –不确定的背景噪声（环境）生成器`
- [ Build a DIY license plate reader with machine learning](https://github.com/cortexlabs/cortex/tree/master/examples/tensorflow/license-plate-reader)
- `展示HN：通过机器学习构建DIY车牌阅读器`
- [ Market your product to 1m+ journalists](http://meansheep.com)
- `当他们写/发关于你的新闻时自动回复记者`
- [ SubStats – Substack Newsletter Leaderboard](https://substats.actionably.com/)
- `SubStats –子堆栈通讯排行榜`
- [ Tobab, a poor mans identity aware proxy. “BeyondCorp” for selfhosters](https://github.com/gnur/tobab/)
- `托巴布（Tobab）是穷人的身份识别代理。`
- [ Oscillator Bank / Spectral Synthesizer](https://github.com/grz0zrg/fas)
- `振荡器库/频谱合成器`
- [ Remoty – Work like you're in the same office](https://remoty.dev)
- `远程处理–就像在同一间办公室一样工作`
- [ ugit – Learn Git Internals by Building Git in Python](https://www.leshenko.net/p/ugit/)
- `ugit –通过Python构建Git来学习Git内部`
- [ Dendron – open-source, local first, anti-roam note-taking tool](https://dendron.so)
- `Dendron –开源，本地优先，防漫游记笔记工具`
- [ sus – static site based URL shortener](https://github.com/nkantar/sus)
- `sus –基于静态站点的URL缩短器`
- [ Laguna – See what your friends are trading and make bets](https://withlaguna.com/)
- `拉古纳–看看您的朋友正在交易并下注`
- [ Bulk Fusion 360 Export and Sync](https://github.com/aconz2/Fusion360Exporter)
- `显示HN：批量Fusion 360导出和同步`
- [ How attractive is your website? Check using Visual Mind AI](https://myraah.io/visualmind)
- `显示HN：您的网站有多漂亮–使用Visual Mind AI检查`
- [ Debut – a retro terminal PowerPoint clone](item?id=24526383)
- `首次亮相–复古终端PowerPoint克隆`
- [ I made a scraper that finds the Best Remote Jobs Every Week on the web](https://blog.noicejobs.com/best-remote-jobs-in-the-world-between-sep-11-and-sep-18/)
- `我做了一个刮板，可以每周在网上找到最佳的远程工作`
- [ Plenary – A privacy focused RSS feed and offline reader app for Android](https://play.google.com/store/apps/details?id=com.spians.plenary)
- `全体会议–面向隐私的RSS提要和适用于Android的离线阅读器应用`
- [ Control Chromecasts from Linux](https://github.com/alexdelorenzo/chromecast_mpris)
- `显示HN：从Linux控制Chromecast`
- [ My Python Notebook Driven Book on Evolutionary Algorithms](https://datacrayon.com/posts/search-and-optimisation/practical-evolutionary-algorithms/preface/)
- `我的Python笔记本驱动的关于进化算法的书`
- [ The Financial Status Template](https://jordivillar.com/financial-status/)
- `财务状况模板`
- [ FileConverter using FFMPEG as WASM to convert files](https://fileconverter.digital/)
- `FileConverter使用FFMPEG作为WASM来转换文件`
- [ Air Quality Alerts via SMS](https://github.com/airq-dev/hazebot)
- `通过短信发送空气质量警报`
- [ Video feedback widget with cam and audio](https://howuku.com)
- `带有凸轮和音频的视频反馈小部件`
- [ Interactive tutorial for learning Git's internals](https://docable.cloud/chrisparnin/examples/tutorials/Git.md)
- `用于学习Git内部知识的交互式教程`
- [ AndIodine raw UDP mode on xfinitywifi](https://gitlab.com/Zinnia_Zirconium/andiodine/-/tree/xfinitywifi)
- `xfinitywifi上的And碘原始UDP模式`
- [ Epsy Widgets for Epilepsy](https://www.epsyhealth.com/news/epsy-introduces-new-ios14-widgets)
- `癫痫病的小部件`
- [ CUDA Pathtracer with Lots of Features](https://github.com/jan-van-bergen/GPU-Pathtracer)
- `具有很多功能的CUDA Pathtracer`
- [ Like Momentum in Chrome but for VS Code](https://marketplace.visualstudio.com/items?itemName=activecove.marquee)
- `类似于Chrome中的Momentum，但适用于VS Code`
- [ Interactive: Visualizing Caffeine Halflives and Bedtime](https://observablehq.com/@elibryan/caffeine-simulator)
- `互动：可视化咖啡因半衰期和就寝时间`
- [ Compile Ruby to C](https://github.com/agrafix/rubyspeed)
- `显示HN：将Ruby编译为C`
- [ CSS Grid Browserslist](https://github.com/rafgraph/browserslist-config-css-grid)
- `CSS网格浏览器列表`
- [ Commons – Simple mini-forums for communities](https://www.startcommons.com/634fcf24-7448-4ac3-b393-35f52699dc23)
- `公地–社区的简单迷你论坛`
- [ Monitor your internet speed with a Raspberry Pi](https://perryizgr8.github.io/raspberry-pi/2020/09/20/monitoring-speed-rpi.html)
- `使用Raspberry Pi监控您的互联网速度`
- [ The definitive guide on brand names](https://www.nickkolenda.com/brand-names/)
- `有关品牌名称的权威指南`
- [ An Open Source Memex POC](http://steveliu.co/memex)
- `开源Memex POC`


text:
# Changelog

All Notable changes to `laravel-share` will be documented in this file

## 1.0.0 - 2016-11-20

- initial release

## 1.0.1 - 2016-11-27

- Add currentPage method
- Apply some cleanups

## 1.0.2 - 2017-06-30
- Fix publish path for translation files

## 1.0.3 - 2017-08-30
- Add support for Laravel 5.5 Package Auto-Discovery

## 1.0.4 - 2017-09-28
- Bug fix for Laravel 5.5 Package Auto-Discovery, this fixes issue #9

## 2.0 - 2018-01-20
- Add support for Font Awesome 5, next to Font Awesome 4. PR #16

repository: damminhtien/bkfa

gha_language: HTML

repo_name: damminhtien/bkfa


text:
## Word-Stack

Word Stack is a single player word game. The user is shown a string of jumbled characters which consists of 2 different words.
Tiles of the letters are shown to the user one at a time using which the user has to build the 2 words.


text:
Code Example
============

At the moment I'm working on different Widgets and Operators for the Wirecloud Application MashUp-Platform, part of the FIWARE (https://www.fiware.org/) ecosystem. The following operator ([src/js/main.js](src/js/main.js)) should serve as code example for my job application.

The purpose of the operator called "sth-dual-chart-operator" is to retrieve historical data for two sensors and attributes within a given time range, merge the received data and provide a JSON object for Google Charts (Dual-Y LineChart). The operator acts as link between the input mask and Google Charts (shown below).

![Wirecloud - input mask and google charts](https://github.com/stefan-leitner/sth-dual-chart-operator/blob/master/src/images/wirecloud.png?raw=true)

The operator recevies as input a JSON object with the follwoing format

```json
{
    "aggregationMethod": "max",
    "aggregationPeriod": "day",
    "attribute1": "airPressure",
    "attribute2": "humidity",
    "datetime": "30. Juli 2018 00:00 - 5. August 2018 23:00",
    "entity1": "Sensor3",
    "entity2": "Sensor6"
}
```
Based on this input the operator creates an url for `entityX` and and `attributeX` to receive the historical data. `datetime`, `aggregationMethod` as well as the `aggregationPeriod` are send as requestParameters.

e.g. `http://pep-comet:8666/STH/v1/contextEntities/type/static/id/Sensor3/attributes/airPressure`.

The received data is processed by the operator and the following JSON object is created and forwared to the Google Charts widget.

```json
{
  "type": "LineChart",
  "options": {
    "title": "Maximum pro Tag",
    "series": {
      "0": {
        "targetAxisIndex": 0
      },
      "1": {
        "targetAxisIndex": 1
      }
    },
    "vAxes": {
      "0": {
        "title": "airPressure [hPa]"
      },
      "1": {
        "title": "humidity [%]"
      }
    },
    "hAxis": {
      "title": "Datum und Zeit"
    },
    "pointSize": 1
  },
  "data": [
    [
      "Time",
      "airPressure - Sensor3",
      "humidity - Sensor6"
    ],
    [
      "30.07.18",
      974.04,
      null
    ],
    [
      "31.07.18",
      974.12,
      70.01
    ],
    [
      "01.08.18",
      975.59,
      77.25
    ],
    [
      "02.08.18",
      977.42,
      90.61
    ],
    [
      "03.08.18",
      977.22,
      90.74
    ],
    [
      "04.08.18",
      975.93,
      90.35
    ],
    [
      "05.08.18",
      974.93,
      84.96
    ]
  ]
}

```

repository: stefan-leitner/sth-dual-chart-operator

repo_name: stefan-leitner/sth-dual-chart-operator


text:
# Health-Inspector
A server agent for system monitoring and automatic recovery. The intention is to
be chef-like in construction.

## General service architecture
The health-inspector service should have 3 major components:

1. A primary thread of scheduled system checks using
[Rufus](https://github.com/jmettraux/rufus-scheduler)
  * scheduled checks publish events to subscribers for response processing
2. A series of event subscribers for conditioning handling and remediation using
[Wisper](https://github.com/krisleech/wisper)
3. A notification pipeline for alerting interested parties. architecture TBD.

## Remedy
Health checks, their responses, and their alert formatting should be drawn from
plugins in the form of class extensions of `HealthInspector::Remedy` that has
these key components:

1. An :inspection function returning a `HealthInspector::Inspection` variable.
  1. `HealthInspector::Inspection` contains the following items:
    * an **interpreter** flag `[:bash, :cmd, :powershell]`
    * a **script** field with code to execute to check the system's state
(should return non-zero on failure)
    * a **schedule** field with a [Rufus](https://github.com/jmettraux/rufus-scheduler)
compatible 'every' schedule string
2. A :remediation function returning a `HealthInspector::Remediation` variable.
  2. `HealthInspector::Remediation` contains the following items:
    * an **interpreter** flag `[:bash, :cmd, :powershell]`
    * a **script** field with code to execute to repair the undesired system state
(should return non-zero on failure)
2. A :report function returning a `HealthInspector::IncidentReport` variable.
  2. `HealthInspector::IncidentReport` will be definied in a future milestone.

repository: alphanumeric-sd/health-inspector

gha_language: Ruby

repo_name: alphanumeric-sd/health-inspector


text:
---
path: '/tips/post-287'
date: '2021-05-05'
title: "How to use the 'every' and 'some' array methods in JS"
languages: ['Javascript']
img: 'https://res.cloudinary.com/duejrcpct/image/upload/q_auto/f_auto/w_1000/v1620215342/tips/287-1_mpheoo.png'
description: 'Javascript - every and some array methods'
number: 287
status: true
---

Hey guys! 😁✌

Today we'll check some basic examples on how we can use the 'every' and 'some' array methods in Javascript.

Both methods are super straightforward to use and, unlike array methods like 'filter', 'map' , 'sort', etc, they both return a boolean - either true or false.

The name of each method pretty much describes what it does. The 'every' method returns true if all the items on an array pass a given condition, otherwise it will return false.

On the snippet we first check if every user has 'HTML' on their languages array. Since all of them have it' will return true. Then we do the same with 'CSS' which will return false since not all users have it.

```javascript
const users = [
  {
    id: 1,
    name: 'John',
    languages: ['HTML', 'CSS', 'JS', 'PHP'],
  },
  { id: 2, name: 'Erick', languages: ['HTML', 'CSS', 'C#'] },
  { id: 3, name: 'Megan', languages: ['HTML', 'PHP'] },
  { id: 4, name: 'Anthony', languages: ['HTML', 'CSS', 'JS'] },
  {
    id: 5,
    name: 'Diana',
    languages: ['HTML', 'CSS', 'Python', 'Java'],
  },
]

const doAllUsersKnowHTML = users.every(user => user.languages.includes('HTML'))
console.log(doAllUsersKnowHTML) // -> true

const doAllUsersKnowCSS = users.every(user => user.languages.includes('CSS'))
console.log(doAllUsersKnowCSS) // -> false

const doSomeUsersKnowPython = users.some(user =>
  user.languages.includes('Python')
)
console.log(doSomeUsersKnowPython) // -> true

const doSomeUsersKnowGO = users.some(user => user.languages.includes('GO'))
console.log(doSomeUsersKnowGO) // -> false
```

On the other hand, 'some' will return true if at least one of the items on an array passes a given condition. If none the items pass this condition it will return false.

So on the example we first check if some user has 'Python'. Since one of them has it' it will return true. We then check if some user has 'GO' and since none of the users has it, it will return false.

And that's pretty much it. Let me know if you have any doubts 🤗🙏

gha_language: JavaScript


text:
#### Logger settings

We can enable/disable logger using configuration `settings/configuration/logger.php`. We can also specify where log should stored and how log file should be rotated.

##### Enable/Disable

Using `enable` setting we can enable or disable logger within our application. Value should be boolean. When logger is disabled, trying log message results in an exception.

##### Log to file or database

We can store in log in file or database, this can done by setting `type`. Value of this setting can be `file` or `db`.

###### Log location file

Use `path` setting to set path where log messages should be logged. Here path must be directory. `path` setting is applicable for log type `file`.

###### Log location DB

Section `db` contains setting to log messages in db. This is applicable only when log type is `db`. See below settings

| Name | Description |
|-----|-----|
| connection | Database connection name. Keep it `null` to use default database connection. |
| table | Table name where log should be logged. |

Table strcture for log(MySQL database):

```sql
CREATE TABLE `RequestLog` (
  `requestLogId` bigint(20) NOT NULL AUTO_INCREMENT,
  `type` varchar(255) DEFAULT NULL,
  `message` text,
  `createdAt` datetime DEFAULT NULL
  PRIMARY KEY (`requestLogId`)
) DEFAULT CHARSET=latin1
```

##### Log rotations

Logging all logs into one files results in big file. Log file should be rotated date, week or monthly. Means there shoulld new log file after some duration. Nishchay allow to define this duration. Suppose if we set log to rotated to daily, then new log file will be created daily with file name as date in `Y-m-d` format.

Log rotation options.

| Name | Description |
|-----|-----|
| date | New log file will be created daily |
| week |New Log file will be created weekly and file name will date of first day of week. |
| biweek | To create log file every 15 days. File name will be for the first 15 day `Y-m-1` and another 15 days it will be `Y-m-16`. |
| month | To create log file once a month and in this case log file name will be first date for month. |

Log files are created in `Y-m-d` format only.

repository: pratikptl/translations

repo_name: pratikptl/translations


text:
# HW #1

You are given some code. The main purpose of code handout is to show you expected output but feel free to ask on Piazza in case of concerns, however, it should be more or less clear from the homework document.

Using GCC is not complicated but we slowly will start to use Makefiles. By the link you can find a tutorial
http://mrbook.org/blog/tutorials/make/
I recommend start to learn how to use Makefiles as starting from the next homework you will need to write your own.

Most likely 'make' is not yet installed in your VM so please install it
```
sudo apt-get install make
```

In your new repository you will have hidden file for Travis CI. Please don't modify it unless we specifically ask. You also will have a `main.c` file. You will use it for development (feel free to use more *.h files and *.c if needed). You also may see Makefile.config. Please put your data into that file in the appropriate fields. In case you will be doing any of the extra credit options please change corresponding value in this file from zero to one.

You also can see Makefile file. It helps to build you programin by issuing a simple command
```
make
```
And that's it. Please modify it according to your needs but we still should be able just to run `make` and then everything should work. Most likely you will not need to change it. There is also this README file in the repository.

Below you can find few examples of different output. First two, are when there is some error:

- ADD 4 john doe 3.43 AMS
- ADD 4 mary jane 3.87 ART

You program is supposed to printf `ID NOT UNIQUE`.

 - ADD 3 john doe 3.43 AMS
 - ADD 5 mary jane 3.87 ART
 - DELETE 4

Now you should see `STUDENT  RECORD  CANNOT  BE  DELETED  NOR  UPDATED`.

Examples of correct input

 - ADD 3 john doe 3.43 AMS
 - ADD 5 mary jane 3.87 ART

Then imagine we are trying to print everyone in the database. We should see following results
```
3 John Doe 3.43 AMS
5 Mary Jane 3.87 ART
```

 - ADD 3 john doe 3.43 AMS
 - ADD 5 mary jane 3.87 ART
 - UPDATE 3 john Wonka 3.41 AMS

Then imagine we are trying to print everyone in the database. We should see following results
```
3 John Wonka 3.41 AMS
5 Mary Jane 3.87 ART
```


text:
---
title: "com.snc.pa.widget.max_widget_indicators"
description: "Property"
---

Description: Maximum number of widget indicators, in addition to the main indicator, that can be added to a widget

Value: `7`

repository: ASHISH-SERVICENOW/sn

repo_name: ASHISH-SERVICENOW/sn


text:
Types of Recommender Systems

* **Collaborative Filtering**
	* **Memory Based**: Memorizes user-item interaction matrix. There is no dimensionality reduction or model learning. Two variants of Memory based collaborative filtering are:
		* User Based: Uses rating of other similar users to determine rating
		* Item Based: Uses rating of other similar items to determine rating
	* Model Based: Uses dimensionality reduction techniques such as [[Matrix Factorization]] ([[Matrix Factorization#ALS|ALS]]), [[Clustering]], [[Deep Learning]], etc to compare large scale user-item matrix into fewer dimensions.
* **Content Based Recommender System**
* **Hybrid**:

Based on how feedback is obtained, recommender system can also be classified as:
1. Implicit Feedback
2. Explicit Feedback

repository: ragrawal/kbase

path: /Recommender System.md

filename: Recommender System.md

repo_name: ragrawal/kbase


text:
[com.github.salomonbrys.kodein](index.md) / [provider](.)

# provider

`inline fun <reified T : Any> `[`KodeinInjectedBase`](-kodein-injected-base/index.md)`.provider(tag: Any? = null): `[`InjectedProperty`](-injected-property/index.md)`<() -> T>`

Gets a lazy provider for the given type and tag.

The returned property should not be accessed before calling [KodeinInjectedBase.inject](-kodein-injected-base/inject.md).

T generics will be kept.

### Parameters

`T` - The type of object to retrieve with the provider held by this property.

`tag` - The bound tag, if any.

### Exceptions

`KodeinInjector.UninjectedException` - When accessing the property, if it was accessed before calling [KodeinInjectedBase.inject](-kodein-injected-base/inject.md).

`Kodein.DependencyLoopException` - When calling the provider, if the value construction triggered a dependency loop.

**Receiver**
Either a [KodeinInjector](-kodein-injector/index.md) instance or a [KodeinInjected](-kodein-injected.md) class.

**Return**
A lazy property that yields a provider of `T`.

`inline fun <reified T : Any> `[`CurriedInjectorFactory`](-curried-injector-factory/index.md)`<*>.provider(tag: Any? = null): Lazy<() -> T>`

Gets a lazy curried provider of `T` for the given tag from a factory with an `A` argument.

The returned property should not be accessed before calling [KodeinInjectedBase.inject](-kodein-injected-base/inject.md).

T generics will be kept.

### Parameters

`T` - The type of object to retrieve with the provider.

`tag` - The bound tag, if any.

### Exceptions

`KodeinInjector.UninjectedException` - When accessing the property, if it was accessed before calling [KodeinInjectedBase.inject](-kodein-injected-base/inject.md).

`Kodein.DependencyLoopException` - When calling the provider, if the value construction triggered a dependency loop.

**Return**
A lazy property that yields a provider of `T`.

`inline fun <reified T : Any> `[`Builder`](-kodein/-builder/index.md)`.provider(noinline creator: `[`NoArgBindingKodein`](../com.github.salomonbrys.kodein.bindings/-no-arg-binding-kodein/index.md)`.() -> T): `[`ProviderBinding`](../com.github.salomonbrys.kodein.bindings/-provider-binding/index.md)`<T>`

Creates a factory: each time an instance is needed, the function [creator](provider.md#com.github.salomonbrys.kodein$provider(com.github.salomonbrys.kodein.Kodein.Builder, kotlin.Function1((com.github.salomonbrys.kodein.bindings.NoArgBindingKodein, com.github.salomonbrys.kodein.provider.T)))/creator) function will be called.

T generics will be kept.

A provider is like a [factory](factory.md), but without argument.

### Parameters

`T` - The created type.

`creator` - The function that will be called each time an instance is requested. Should create a new instance.

**Return**
A provider ready to be bound.

`inline fun <reified T : Any> `[`LazyKodeinAwareBase`](-lazy-kodein-aware-base/index.md)`.provider(tag: Any? = null): Lazy<() -> T>`

Gets a lazy provider for the given type and tag.

T generics will be kept.

### Parameters

`T` - The type of object to retrieve with the provider held by this property.

`tag` - The bound tag, if any.

### Exceptions

`Kodein.NotFoundException` - When accessing the property, if no provider was found.

`Kodein.DependencyLoopException` - When calling the provider, if the value construction triggered a dependency loop.

**Receiver**
Either a [LazyKodein](-lazy-kodein/index.md) instance or a [LazyKodeinAware](-lazy-kodein-aware.md) class.

**Return**
A lazy property that yields a provider of `T`.

`inline fun <reified T : Any> `[`CurriedLazyKodeinFactory`](-curried-lazy-kodein-factory/index.md)`<*>.provider(tag: Any? = null): Lazy<() -> T>`

Gets a lazy provider of `T` for the given tag from a curried factory with an `A` argument.

T generics will be kept.

### Parameters

`T` - The type of object to retrieve with the provider held by this property.

`tag` - The bound tag, if any.

### Exceptions

`Kodein.NotFoundException` - When accessing the property, if no factory was found.

`Kodein.DependencyLoopException` - When calling the provider, if the value construction triggered a dependency loop.

**Return**
A lazy property that yields a provider of `T`.

`inline fun <reified T : Any> `[`KodeinAwareBase`](-kodein-aware-base/index.md)`.provider(tag: Any? = null): () -> T`

Gets a provider of `T` for the given type and tag.

Whether this provider will re-create a new instance at each call or not depends on the binding scope.

T generics will be kept.

### Parameters

`T` - The type of object the provider returns.

`tag` - The bound tag, if any.

### Exceptions

`Kodein.NotFoundException` - if no provider was found.

`Kodein.DependencyLoopException` - When calling the provider function, if the instance construction triggered a dependency loop.

**Receiver**
Either a [Kodein](-kodein/index.md) instance or a [KodeinAware](-kodein-aware.md) class.

**Return**
A provider.

`inline fun <reified T : Any> `[`CurriedKodeinFactory`](-curried-kodein-factory/index.md)`<*>.provider(tag: Any? = null): () -> T`

Gets a provider of `T` for the given tag from a curried factory with an `A` argument.

Whether this provider will re-create a new instance at each call or not depends on the binding scope.

T generics will be kept.

### Parameters

`T` - The type of object the factory returns.

`tag` - The bound tag, if any.

### Exceptions

`Kodein.NotFoundException` - if no factory was found.

`Kodein.DependencyLoopException` - When calling the provider function, if the instance construction triggered a dependency loop.

**Return**
A provider.

repository: suclike/Kodein

repo_name: suclike/Kodein


text:
# Running local development server on https

I was working on a spare project where I was going to work with Facebook APIs. This was my first time working with Facebook API and in couple of hours of going through the API docs, I came to know that facebook has updated their security settings and it only allows an API call from a secured HTTP server.

This resulted in a need of finding a way to run your development server with https. After going through a lot many articles, I was able to run my local dev server on https. You may follow the below steps to achieve the same.

## You will need OpenSSL to generate SSL certificate.

> "OpenSSL is a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library."

Unfortunately, binaries aren't available on [OpenlSSL.org](https://www.openssl.org/) However, You can downoad it from [here.](http://slproweb.com/products/Win32OpenSSL.html) Run through the installer.

Warning: don't use version 1.1.0 or later, you'll get this error: "problem creating object tsa_policy1=<IP_ADDRESS>.1"

Now during installaton phase, if you get an error of "Visual C++ 2008 Redistributable component is missing", then please install it from [Mircrosoft.](https://www.microsoft.com/en-in/download/details.aspx?id=29) Once you finish that installation, continue with OpenSSL installation.

Before you start using OpenSSL, you need to set two environment variables as follows:
```
set RANDFILE=c:\demo\.rnd
set OPENSSL_CONF=<path-to-openssl-folder>\bin\openssl.cfg
```
Now, You can start OpenSSL by executing below command:
```
<path-openssl-foder>\bin\openssl.exe
```

This completes the setup of OpenSSL on your windows machine.

## Generating SSL certificate

Firstly, there are two types of certificates: One being signed by a 'Certificate Authority(CA)' and other one being 'self-signed certificate'. A CA is a trusted source for an SSL certificate, and using a certificate from a CA allows your users to trust the identity of your website. In most cases, you would want to use a CA-signed certificate in a production environment - for testing purposes, however, a self-signed certicate will be sufficient.

As we need to run local development server with https, a self-signed certificate would do just great. To generate it, execute below commands:

- Start OpenSSL by running below command in cmd,
    ```
    <path-openssl-foder>\bin\openssl.exe
    ```

Once you are in OpenSSL, execute below commands one by one:
1. First we generate a RSA key for our root CA and store it in file key.pem. If you want to password-protect this key, add option -des3.
  ```
  genrsa -out key.pem
  ```
2.
   ```
   req -new -key key.pem -out csr.pem
   ```

3. Next, we create our self-signed root CA certificate cert.pem; you’ll need to provide an identity for your root CA. The -x509 option is used for a self-signed certificate.
   ```
   x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem
   ```

This will create key.pem, csr.pem anf cert.pem file in the bin folder of your OpenSSL. You will only require cert.pem(The Certificate) & key.pem(The Private Key) for an SSL connection.

## Running local development server

Go to your project directory. Install npm module http-server.
```
npm install --save-dev http-server
```

Copy cert.pem & key.pem to root of your project directory.

Run below command:
```
http-server --ssl -c-1 -p 8080 -a <IP_ADDRESS>

Starting up http-server, serving ./ through https
Available on:
https://<IP_ADDRESS>:8080
Hit CTRL-C to stop the server
```
After this, hit the URL https://localhost:8080 and see the magic. You might need to approve a security warning from your browser before continuing.

repository: parthsw/local-dev-server-on-https

repo_name: parthsw/local-dev-server-on-https


text:
# Edit a page

Bludit API provides the features to edit a page.

All request to the API need the `API Token`, you can find the token in the settings of the plugin.

All request to the API to write content is necessary to provide an `Authorization Token`. To get this kind of token you need a user with **ADMINISTRATOR** role. You can get the `Authorization Token` on **Admin panel > Manage > Users > {Username} > Edit User > Authentication Token > Token**.

Request

- Endpoint: `/api/pages/{key}`
- Method: `PUT`
- Content-Type: `application/json`
- Content

```
{
	"token": "<TOKEN>",
	"authentication": "<AUTHENTICATION_TOKEN>",
	"title": "<PAGE_TITLE>",
	"content": "<PAGE_CONTENT>"
}
```

Response

- HTTP Code: `200`
- Content-Type: `application/json`
- Content

```
{
	"status": "0",
	"message": "Page edited.",
	"data": {
		"key": "<PAGE_KEY>"
	}
}
```

CURL command example

The follow curl example shows how to edit a page with the key `my-dog`.

Content of file `data.json`

```
{
	"token": "24a8857ed78a8c89a91c99afd503afa7",
	"authentication": "193569a9d341624e967486efb3d36d75",
	"title": "My dog",
	"content": "Content of the page here, support Markdown code and HTML code."
}
```

Execute the command and attaching the file `data.json`

```
$ curl  -X PUT \
	-H "Content-Type: application/json" \
	-d @data.json \
	"https://www.example.com/api/pages/my-dog"
```

Output:

```
{
	"status": "0",
	"message": "Page created.",
	"data": {
		"key": "my-dog"
	}
}
```


text:
![Image of Nikos](https://github.com/NikosDoulaveras/MyCV/PB250057l2l.jpg)

![Image of Nikos](PB250057l2l.jpg "Nikos Doulaveras")

Nikos Doulaveras
============

Occupation: IT and Privacy Project Consultant
-----------------------------------

-------------------     ----------------------------
1 Hippocratous Str<EMAIL_ADDRESS>Athens 11472        linkedin.com/in/nikosdoulaveras/
Greece                                +30<PHONE_NUMBER>
Date of birth: 1977-11-7         Nationality: Greece
-------------------     ----------------------------

 >  Seamless for IOT can be observable in terms of progress.

# Experience
----------

**IT and Privacy Project Consultant:**
_  Master S.A. _
Master S.A.
Neo Heracleion
`2018-06 - Currently`

**Communication and Digital Marketing:**
* Freelancer
Athens
`2010-11 - 2018-05`

**Research Executive:**
* MRB Hellas SA
Ampelokipoi, Athens
`2007-07 - 2010-10`

**Account Executive Advertising Projects:**
* Spot JWT Athens
Marousi- Athens
`2004-05 - 2016-12`

# Education
----------
**Computer Science:**
* Hellenic Open University
Patras, `2017`

**Political Communication and New Technologies:**
* Communication and Mass Media- MA- Postgraduate
National and Kapoditristrian University of Athens/ MA Program
Athens, `2003`

**Communication and Mass Media:**
* Ptychion
National and Kapodistrian University of Athens
Athens, `2000`

# Skills
----------

• CMS development (Wordpress, Joomla)

• Arduino automation

• project management

• GDPR Certification DPO

 # Languages
----------

• English, Advanced

• German, Advanced

# Objectives
----------

-Present proposals that are actionable
-Project management
-GDPR readiness
-Security as a priviledge
-HCI advancements

repository: niveras/MyCV

repo_name: niveras/MyCV


text:
__Description__: Process multiple styles with multiple require entry points in a single files.

__Notes__

+ Currently, I think this is an anti-pattern and you should only have one entry point for `ctr` per `.js` file
+ You should avoid using `require` in `ctr` styles, however for testing purposes I use `require` in `/basic` and `requireWatch`, what you should use, in `/watch`

repository: ctr-lang/ctr-loader

repo_name: ctr-lang/ctr-loader


text:
# About
Proxymity is a 1 way data binding library with the aim to keep everything as simple and close to vanilla javascript and html as possible. Because it's a library and not a framework, you are in control the whole way through.

## Quickstart

#### script.js
```javascript
var view = proxymity(document.querySelector("body"), {}, "controller")
var controller = view.controller
var sequence = [0, 1]
controller.fibonacci = function(n){
	if (n < 0){
		return 0;
	}
	return sequence[n] || (sequence[n] = controller.fibonacci(n - 2) + controller.fibonacci(n - 1))
}
```

#### index.html
```html
<!DOCTYPE html>
<html>

	<head>
		<script src="/path/to/proxymity.min.js"></script>
		<style>
			body.this {
				opacity: 0;
			}
		</style>
	</head>

	<body class="{: void this :}">
		<h1>Welcome {:this.controller.user.name:}|{user.name}|</h1>
		<div>
			name: <input type="text" onkeyup="this.controller.user.name = this.value" data-value="{:this.controller.user.name:}|{user.name}|">
		</div>
		<div>
			age: <input type="number" onkeyup="this.controller.user.age = this.valueAsNumber" data-value="{:this.controller.user.age:}|{user.age}|">
		</div>
		<p>
			The Fibonacci number associated with your age is {:this.controller.fibonacci(parseInt(this.controller.user.age)):}|{user.age}|
		</p>

		<script src="script.js"></script>
	</body>
</html>
```

lets go through this chunks at a time

### Head
```html
<head>
	<script src="/path/to/proxymity.min.js"></script>
	<style>
		body.this {
			opacity: 0;
		}
	</style>
</head>
```

The script tag is pretty self explanatory, you may be wondering why we have a selector for body.this. The reason for this class is to hide the html from view before we're actually ready to go since the view is inlined rather than loaded in via ajax. Because anything separated by a space on both sides is recognized as a class to css, we can select for any pre-rendered elements this way as long as we space things right. you get the idea. Be creative and you'll find interesting solutions to problems!

### Body
```html
<body class="{: void this :}">
	...
</body>
```

The body element is the first instance of when we see how we render out data from our controller to the view. the syntax for this is {: code :} and in this case the code that we are running is " void this " which runs in the global scope with `this` being a reference of the current element that the code is attached to. This means that you can call any method/variable that you'd normally be able to call from the global scope

When the code gets executed the whole part will get replaced but until then, as far as the html parser is concerned, the body element has a class of "{:", "void", "this", and ":}" meaning we can take advantage of it

### Body Continued
```html
<h1>Welcome {:this.controller.user.name:}|{user.name}|</h1>
<div>
	name: <input type="text" onkeyup="this.controller.user.name = this.value" data-value="{:this.controller.user.name:}|{user.name}|">
</div>
<div>
	age: <input type="number" onkeyup="this.controller.user.age = this.valueAsNumber" data-value="{:this.controller.user.age:}|{user.age}|">
</div>
<p>
	The Fibonacci number associated with your age is {:this.controller.fibonacci(parseInt(this.controller.user.age)):}|{user.age}|
</p>
```

Here we see the data binding in action. The name of each input element on the input is also used to denote where on the controller object the item should look for. Because it can only be connected to the controller object, we do not need to define `this.controller` on it.

You may also be noticing that the binding syntax is slightly different that there's 2 chunks. the first chunk that's wrapped inside `{: ... :}`. This chunk is the chunk that you execute. The next chunk is the chunk that is wrapped inside `|{ ... }|` which is the chunk that watches a specific path for changes. This path always starts at the root so you do not need to include `this.controller` in it. It specifies that the code within `{: ... :}` should be reran when a change to `|{ ... }|` happens.

However none of this actually works unless the body gets initialized.

### Javascript Initialization
```javascript
var view = proxymity(document.querySelector("body"), {}, "controller")
var controller = view.controller
```
Would you look at that, the first thing we do is initialize the html with the proxymity function. Next, we save the controller into our current run time.

### Fibonacci
```javascript
var sequence = [0, 1]
controller.fibonacci = function(n){
	if (n < 0){
		return 0;
	}
	return sequence[n] || (sequence[n] = controller.fibonacci(n - 2) + controller.fibonacci(n - 1))
}
```
We could put this in a number of different places and we can implement this in a bunch of different ways such as the global scope or with true recursion but we're putting it here in the controller and caching our pre-calculated numbers in a variable called sequence

## Why
"Isn't there already a plethora of frameworks and libraries out there that does exactly this and more? Why are you re-inventing the wheel?" you may ask. The answer is, simplicity. Majority of other libraries that accomplish this take one of 2 routs because of the nature of this problem. The first rout is to create an all encompassing framework that is in control the whole way through (eg: angular) and your code is called when it sees fit. This means that it will always knows when it calls your code and when to (re)render when needed. The other approach to solving this problem is to use a pre-compiler and specialized languages which will accomplish a similar effect of knowing where and when you're updating the data. Both of these approaches works but both will take you some distance from the native JavaScript and HTML that most beginners and even many experts are more familiar with.

In the case of an all encompassing framework (like angular) issue arises when your code needs to do something that's not a part of the framework's supported operations (eg: Web sockets and WebAssembly) and you spend time trying to get it to play nice with your framework of choice (fortunately, angular has $apply). In the case of a pre-compiled solution, the problem is you are stuck with an overhead of learning the new language that your pre-compiler uses and whatever dev you bring onto your team either needs to learn how to work with this new intermediary language and also the overhead of trying to set everything up just right the first time around (we all know how much this sucks)

Proxymity takes a different approach to both sides where it does not use a pre compiler nor does it run your code inside an all encompassing framework. Instead, it runs it's own render cycle and as long as your code is modifying data that proxymity is keeping tabs on, it will know when to re-render. This means that there is no pre-compiler in the mix and the library that connects everything only handles one thing, converting data => view. You are in control of everything else meaning there's no restrictions of what kind of other tech you can use in conjunction nor is there a major learning process associated to working with the code base.

## How??
Proxymity tries to be as small and as out of the way as possible letting you be as close to the native JavaScript and HTML. Earlier iterations accomplished this by using the [Proxy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) API in JavaScript which is where this library gets it's name. however, as of version 2.0.0, this is no longer the case.

the magic happens in the templating language of the library where you define what the action is and what that specific segment of template should react to if anything and using this info, Proxymity's able to reconstruct the paths to watch as watchable and then watch for changes on those paths.

## docs
[Docs are work in progress but here you go :)](docs)

## License
MIT = free for all yay :D?

## Get it on NPM
```npm i proxymity```


text:
# Eagle MK4

Platform (hardware specs + ROS package) for building awesome autonomous RC robocars.

Inspired and inherited from [MIT racecar](https://mit-racecar.github.io/) and [RacecarJ](https://racecarj.com/).

![real1](docs/EagleLidarOnly.jpg)

# Installation

[Installation guide](docs/installation-guide.md)

# Components

| Component | Model | Comments |
| --------- | ----- | -------- |
| 1/10 RC chassis | [Hobbyking SCT Trooper 4x4](https://hobbyking.com/en_us/trooper-pro-4x4-1-10-brushless-sct-arr.html) | only chassis and brishless motor are used, any similar 1/10 chassis will fit |
| 2D Lidar | [YDLIDAR X4](https://www.robotshop.com/de/en/ydlidar-x4-360-laser-scanner.html) | |
| IMU | [SparkFun MPU-9250 9DoF Razor IMU M0](https://www.exp-tech.de/sensoren/beschleunigung/7879/sparkfun-mpu-9250-9dof-razor-imu-m0) | |
| Camera | [Logitech-C920](https://www.amazon.de/Logitech-C920-Webcam-Videogespr%C3%A4che-Stereo-Mikrofonen/dp/B006A2Q81M) | |
| VESC | [Turnigy SK8-ESC V4.12](https://hobbyking.com/en_us/turnigy-sk8-esc-v4-12-for-electric-skateboard-conversion-w-bec.html) | |
| Compute module  | [Jetson TX1](https://developer.nvidia.com/embedded/buy/jetson-tx1) | |
| SSD (Optional)| [SanDisk SSD 120GB](https://www.amazon.de/gp/product/B07621PNWC) + [SATA cable](https://www.amazon.de/gp/product/B001VBLM9K) | Jetson has only 16GB of disk by default |
| 10x USB 3.0 hub | [ORICO 40W 10 Ports USB 3.0 hub](https://www.amazon.de/gp/product/B075QZ88DM) | |
| Hobby glass | 2 x [25cm x 50cm x 4mm](https://www.amazon.de/70101022-Hobbyglas-Gr%C3%B6%C3%9Fe-transparent-Glasscheibe/dp/B00ZZPHZ08) | |
| Camera mount | 2 x [Camera Wall Mount](https://www.amazon.de/gp/product/B00CKE5FBS/) | |
| LiPo battery 3S | 2 x [ZIPPY Flightmax 5000mAh 3S1P 20C](https://hobbyking.com/en_us/zippy-flightmax-5000mah-3s1p-20c.html) | One for car, one for Jetson |
| LiPo voltage checker | [lipo voltage checker](https://hobbyking.com/en_us/hobbykingtm-lipo-voltage-checker-2s-8s.html) | |
| LiPo charger | [Turnigy Accucell-6 50W 6A Charger](https://hobbyking.com/en_us/turnigy-accucell-6-50w-6a-balancer-charger-lihv-capable.html) | Requires power supply DC 11-18V |
| M3 standoffs/nuts/etc. | [M3 Nylon Black Hex Screw Nut Spacer Standoff (260 pieces)](https://www.amazon.de/gp/product/B01MFF5XIC) |

Tools
- [Electro Screwdriver](https://www.amazon.de/gp/product/B01MR4JWO6)
- [Drill bits set](https://www.amazon.de/gp/product/B01D17N8CA)
- Hacksaw

# Misc

The name Eagle MK4 refers to a same name car from Carmageddon TDR 2000 game.

![eaglemk4](docs/Eagle4.jpg)


text:
# 为什么c++会移除throw而改用noexcept?

## 1

答案来自[知乎](https://www.zhihu.com/question/62301046/answer/196906160)：

一个原因是用throw关键字进行异常规范你会发现根本不能确定该怎么写：
比如模板：
```c++
template<class T>
void f( T k )
{
     T x( k );
     x.x();
}
```
比如依赖一些第三方库的函数，你根本不知道该写什么。
而且如果非要列出所有可能抛出的异常，可扩展性很差。

## 2

[stackoverflow](https://stackoverflow.com/questions/88573/should-i-use-an-exception-specifier-in-c/88905#88905) 给出的观点

No.

Here are several examples why:

Template code is **impossible** to write with exception specifications,

```c++
template<class T>
void f( T k )
{
     T x( k );
     x.x();
}
```
The copies might throw, the parameter passing might throw, and `x()` might throw some unknown exception.

Exception-specifications tend to prohibit extensibility.

`virtual void open() throw( FileNotFound );`

might evolve into

`virtual void open() throw( FileNotFound, SocketNotReady, InterprocessObjectNotImplemented, HardwareUnresponsive );`

You could really write that as

`throw( ... )`

The first is not extensible, the second is overambitious and the third is really what you mean, when you write virtual functions.

Legacy code

When you write code which relies on another library, you don't really know what it might do when something goes horribly wrong.

```
int lib_f();

void g() throw( k_too_small_exception )
{
   int k = lib_f();
   if( k < 0 ) throw k_too_small_exception();
}
```
`g` will terminate, when `lib_f()` throws. This is (in most cases) not what you really want. std::terminate() should never be called. It is always better to let the application crash with an unhandled exception, from which you can retrieve a stack-trace, than to silently/violently die.

Write code that returns common errors and throws on exceptional occasions.
```c++
Error e = open( "bla.txt" );
if( e == FileNotFound )
    MessageUser( "File bla.txt not found" );
if( e == AccessDenied )
    MessageUser( "Failed to open bla.txt, because we don't have read rights ..." );
if( e != Success )
    MessageUser( "Failed due to some other error, error code = " + itoa( e ) );
try
{
   std::vector<TObj> k( 1000 );
   // ...
}
catch( const bad_alloc& b )
{
   MessageUser( "out of memory, exiting process" );
   throw;
}
```
Nevertheless, when your library just throws your own exceptions, you can use exception specifications to state your intent.
### commit
1. in 3, it would technically be std::unexpected not std::terminate. But when this function is called, the default invokes abort(). This generates a core dump. How is this worse than an unhandled exception? (which does basically the same thing)
2. You left out: This effectively wraps everything in a `try {...} catch (<specified exceptions>) { <do whatever> } catch (...) { unexpected();` ] construct, whether or not you want a try block there.
3. An uncatched exception still does stack unwinding. This means destructors will be called. And in those destructors, a lot can be done, like: Resources correctly freed, logs correctly written, other processes will be told the current process is crashing, etc.. To summarize, it's RAII
4.

## 3
来自 `boost` 的一些看法：(Exception-specification)[https://www.boost.org/development/requirements.html#Exception-specification]

1. 一个愚蠢的编译器会对一个标有异常的函数做出一些令人令人费解的判断：如关闭内敛，增加`try...catch`代码块

## 4
来自另一篇关于异常规范的指导：[A Pragmatic Look at Exception Specifications](http://www.gotw.ca/publications/mill22.htm)

异常规范不参与类型系统，因此你无法定义一个这个样的代码(这是因为异常规范不参与类型的推导与定义)：
```c++

typedef void (*PF)() throw(A,B); // syntax error

```
但是我们也有其他手段如这种直接定义：
```
void (*PF)() throw(A,B);
```
在 virtual function 的 override 种异常函数参与了类型的推导，子类的异常规范，必须符合父类的异常规范。

## 5
这句话给了我一个我们该如何使用异常的观点（和主题无关）：

A function should always support the strictest guarantee that it can support without penalizing users who don't need it.

## summary

1. 异常规范造成类型上的问题
2. 模板的出现使得异常规范的抛出类型难以追踪
3. 虚函数也导致抛出的异常规范难以追踪
4. 编译器优化问题
5. 知不知道抛出异常比抛出什么异常更重要
5. *异常的使用使得程序上下文难以追踪（待商榷）*

repository: yuzhishuo/cpp

repo_name: yuzhishuo/cpp


text:
# Laravel DB Translation
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](http://choosealicense.com/licenses/mit/)

### Change the standard Laravel file-based translation to DB based.
### Key features
1. Easy GUI for modifying translations
2. The new keys will be **automatically added** to the DB
3. It can easily import **lang** files to the DB
4. Translation is stored in the **cache**, and editing it automatically refreshes the cache from DB. We use cache tags, so regular file or database cache drivers doesn't work, please use **memcached** instead.
5. It is now showing the **missing tranlations** fields for each language and group. Also you can toogle views between "Show only missing translations" and "Show all translations".
6. Now you can **export database** to .CSV.
![Screenshot](https://raw.githubusercontent.com/xdroidteam/images/master/translationUI.png)

## Installation
### **Below laravel 6.x use version 1.5.x, for Laravel/Lumen 6.x, 7.x use version 2.x**
Require this package in your **composer.json** and run composer update:

    "xdroidteam/translation": "1.5.*"

**or run**
```shell
composer require xdroidteam/translation
```
directly.

After updating composer, add the ServiceProvider to the providers array in **config/app.php**
```php
'XdroidTeam\Translation\TranslationServiceProvider',
```

Deploy migration and config file.
```shell
php artisan vendor:publish --tag=xdroidteam-translation
```
You need to run the migrations for this package.
```shell
php artisan migrate
```

Add following line to your **.env** file:
```
LANGUAGES=en,hu,de
```

Import existing language files to DB:
```shell
php artisan translations:import
```
or import with override existing records:
```shell
php artisan translations:import --overwrite
```

Routes are added in the ServiceProvider, available at `http://yourdomain.com/translations`

You can change the route prefix in the deployed config file `config/xdroidteam-translation.php`. Also you can modify the middleware or exclude translation groups (excluded groups will not appear on the GUI). See the example below.

```php
<?php

return array(

    'route' => [
        'prefix' => 'custom-translations-route',
        'middleware' => [
            'web',
            'auth',
            'custom middleware',
        ],
    ],

	'exclude_groups' => ['auth', 'base'],

    'translation_model' => '\App\Models\Translation',

);

```
You can use other Translation model, to overwrite methods. For example:

```php
<?php

namespace App\Models;

use XdroidTeam\Translation\Translation as XdroidTranslation;

class Translation extends XdroidTranslation
{
    public static function getLanguages(){
        // original:
        // return explode(',', env('LANGUAGES'));

        //custom:
        return ['en', 'hu'];
    }
}

```

## Export
You can export your db to a .CSV file, with call this function:
```php
XdroidTeam\Translation::exportToCSV('path/to/file');
```

repository: xdroidteam/translation

repo_name: xdroidteam/translation


text:
---
title: "upload.cdnFileReuploadNeeded"
description: "The file was cleared from the temporary RAM cache of the CDN and has to be re-uploaded."
nav_exclude: true
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
redirect_from: /API_docs/constructors/upload_cdnFileReuploadNeeded.html
---
# Constructor: upload.cdnFileReuploadNeeded
[Back to constructors index](/API_docs/constructors/index.html)

The file was cleared from the temporary RAM cache of the [CDN](https://core.telegram.org/cdn) and has to be re-uploaded.

### Attributes:

| Name     |    Type       | Required | Description |
|----------|---------------|----------|-------------|
|request\_token|[bytes](/API_docs/types/bytes.html) | Yes|Request token (see [CDN](https://core.telegram.org/cdn))|

### Type: [upload.CdnFile](/API_docs/types/upload.CdnFile.html)

### Example:

```
$upload_cdnFileReuploadNeeded = ['_' => 'upload.cdnFileReuploadNeeded', 'request_token' => 'bytes'];
```

repository: danog/MadelineProtoDocs

gha_language: PHP

repo_name: danog/MadelineProtoDocs


text:
Akka Paint [![Build Status](https://travis-ci.org/liosedhel/akkapaint.svg?branch=master)](https://travis-ci.org/liosedhel/akkapaint)
=================================
Akka Paint is web application that implements scalable, multiuser, with real time changes painting board.
This is a simple project demonstrating Play! and Akka features such as:

* persistent actors
* cluster sharding
* akka-streams

More info about the project can be found [here](http://virtuslab.com/blog/akkapaint-simplicity-and-power-of-akka/).

Try it!
===========

* Install and run [cassandra](http://cassandra.apache.org/) database

Probably the easiest way to do so:
```bash
docker run --name akka-paint-cassandra -p 9042:9042 -d cassandra:latest
```
Create tables structure for akkapaint-history feature:
```bash
docker cp ./akkapaint-history/src/main/resources/images.cql akka-paint-cassandra:images.cql
docker exec -it akka-paint-cassandra cqlsh -f images.cql
```
* Simply type `sbt run` and go to the address [http://localhost:9000/demo](http://localhost:9000/demo).

Open the second window to see real time changes!

Or try the online demo: [http://demo.akkapaint.org/](http://demo.akkapaint.org/)

Load the whole image
===========
Type `sbt "runMain org.akkapaint.perf.AkkaPaintSimulationMain"` to load default image. It will send whole image pixel by pixel (aka. stress test ;))

repository: liosedhel/akkapaint

gha_license_id: NOASSERTION

repo_name: liosedhel/akkapaint


text:
# gatsby-plugin-sitemap

Create a sitemap for your Gatsby site.

**Please note:** This plugin only generates output when run in `production` mode! To test your sitemap, run: `gatsby build && gatsby serve`.

## Install

```shell
npm install gatsby-plugin-sitemap
```

## How to Use

```javascript:title=gatsby-config.js
module.exports = {
  siteMetadata: {
    // If you didn't use the resolveSiteUrl option this needs to be set
    siteUrl: `https://www.example.com`,
  },
  plugins: [`gatsby-plugin-sitemap`]
}
```

Above is the minimal configuration required to have it work. By default, the generated sitemap will include all of your site's pages, except the ones you exclude. It will generate a `sitemap-index.xml` file at the root of your site and for every 45000 URLs a new `sitemap-X.xml` file. The `sitemap-index.xml` file will point at the generated `.xml` files.

You then can point your service (e.g. Google Search Console) at `https://www.example.com/sitemap-index.xml`.

## Recommended usage

You probably do not want to use the defaults in this plugin. Here's an example of the default output:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.net/blog/</loc>
    <changefreq>daily</changefreq>
    <priority>0.7</priority>
  </url>
  <url>
    <loc>https://example.net/</loc>
    <changefreq>daily</changefreq>
    <priority>0.7</priority>
  </url>
</urlset>
```

See the `changefreq` and `priority` fields? Those will be the same for every page, no matter how important or how often it gets updated. They will most likely be wrong. But wait, there's more, in their [docs](https://support.google.com/webmasters/answer/183668?hl=en) Google says:

> - Google ignores `<priority>` and `<changefreq>` values, so don't bother adding them.
> - Google reads the `<lastmod>` value, but if you misrepresent this value, Google will stop reading it.

You really want to customize this plugin config to include an accurate `lastmod` date. Checkout the [example](#example) for an example of how to do this.

## Options

The [`default config`](https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-sitemap/src/options-validation.js) can be overridden.

The options are as follows:

- `output` (string = `/`) Folder path where sitemaps are stored.
- `createLinkInHead` (boolean = true) Whether to populate the `<head>` of your site with a link to the sitemap.
- `entryLimit` (number = 45000) Number of entries per sitemap file. A sitemap index (as `sitemap-index.xml`) will always be created and multiple sitemaps are created for every `entryLimit` increment (e.g under 45000 entries only `sitemap-0.xml` will be created).
- `excludes` (string[] = []) An array of paths to exclude from the sitemap. You can use glob matching using [minimatch](https://github.com/isaacs/minimatch). While `excludes` is usually an array of strings it is possible to enter other data types into this array for custom filtering, but doing so will require customization of the [`filterPages`](#filterPages) function.
- `query` (GraphQL Query) The query for the data you need to generate the sitemap. It's required to get the site's URL, if you are not fetching it from `site.siteMetadata.siteUrl`, you will need to set a custom [`resolveSiteUrl`](#resolveSiteUrl) function. If you override the query, you may need to pass in a custom [`resolvePagePath`](#resolvePagePath), [`resolvePages`](#resolvePages) to keep everything working. If you fetch pages without using `allSitePage.nodes` query structure you will definitely need to customize the [`resolvePages`](#resolvePages) function.
- [`resolveSiteUrl`](#resolveSiteUrl) (function) Takes the output of the data query and lets you return the site URL. Sync or async functions allowed.
- [`resolvePagePath`](#resolvePagePath) (function) Takes a page object and returns the uri of the page (no domain or protocol).
- [`resolvePages`](#resolvePagePath) (function) Takes the output of the data query and expects an array of page objects to be returned. Sync or async functions allowed.
- [`filterPages`](#filterPages) (function) Takes the current page and a string (or other object) from the `exclude` array and expects a boolean to be returned. `true` excludes the path, `false` keeps it. Note that when the `excludes` array is undefined or empty this function will not be called.
- [`serialize`](#serialize) (function) Takes the output of `filterPages` and lets you return a sitemap entry. Sync or async functions allowed.

The following pages are **always** excluded: `/dev-404-page`,`/404` &`/offline-plugin-app-shell-fallback`, this cannot be changed even by customizing the [`filterPages`](#filterPages) function.

## Example:

```javascript
const siteUrl = process.env.URL || `https://fallback.net`

// In your gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: "gatsby-plugin-sitemap",
      options: {
        query: `
        {
          allSitePage {
            nodes {
              path
            }
          }
          allWpContentNode(filter: {nodeType: {in: ["Post", "Page"]}}) {
            nodes {
              ... on WpPost {
                uri
                modifiedGmt
              }
              ... on WpPage {
                uri
                modifiedGmt
              }
            }
          }
        }
      `,
        resolveSiteUrl: () => siteUrl,
        resolvePages: ({
          allSitePage: { nodes: allPages },
          allWpContentNode: { nodes: allWpNodes },
        }) => {
          const wpNodeMap = allWpNodes.reduce((acc, node) => {
            const { uri } = node
            acc[uri] = node

            return acc
          }, {})

          return allPages.map(page => {
            return { ...page, ...wpNodeMap[page.path] }
          })
        },
        serialize: ({ path, modifiedGmt }) => {
          return {
            url: path,
            lastmod: modifiedGmt,
          }
        },
      },
    },
  ],
}
```

## API Reference

## resolveSiteUrl ⇒ string

Sync or async functions allowed.

**Returns**: string - - site URL, this can come from the graphql query or another scope.

| Param | Type                | Description                  |
| ----- | ------------------- | ---------------------------- |
| data  | object | Results of the GraphQL query |

## resolvePagePath ⇒ string

If you don't want to place the URI in `path` then `resolvePagePath`
is needed.

**Returns**: string - - uri of the page without domain or protocol

| Param | Type                | Description                           |
| ----- | ------------------- | ------------------------------------- |
| page  | object | Array Item returned from resolvePages |

## resolvePages ⇒ Array

This allows custom resolution of the array of pages.
This also where users could merge multiple sources into
a single array if needed. Sync or async functions allowed.

**Returns**: object[] - - Array of objects representing each page

| Param | Type                | Description                  |
| ----- | ------------------- | ---------------------------- |
| data  | object | results of the GraphQL query |

## filterPages ⇒ boolean

This allows filtering any data in any way.

This function is executed via:

```javascript
allPages.filter(
  page => !excludes.some(excludedRoute => thisFunc(page, excludedRoute, tools))
)
```

`allPages` is the results of the [`resolvePages`](#resolvePages) function.

**Returns**: Boolean - - `true` excludes the path, `false` keeps it.

| Param         | Type                | Description                                                                         |
| ------------- | ------------------- | ----------------------------------------------------------------------------------- |
| page          | object | contains the path key `{ path }`                                                    |
| excludedRoute | string | Element from `excludes` Array in plugin config                                      |
| tools         | object | contains tools for filtering `{ minimatch, withoutTrailingSlash, resolvePagePath }` |

## serialize ⇒ object

This function is executed by:

```javascript
allPages.map(page => thisFunc(page, tools))
```

`allpages` is the result of the [`filterPages`](#filterPages) function. Sync or async functions allowed.

**Kind**: global variable

| Param | Type                | Description                                                      |
| ----- | ------------------- | ---------------------------------------------------------------- |
| page  | object | A single element from the results of the `resolvePages` function |
| tools | object | contains tools for serializing `{ resolvePagePath }`             |

repository: gatsbyjs/gatsby

repo_name: gatsbyjs/gatsby


text:
# Cohort Server

## Getting started
### environment setup
- install node 6.12.3
  - we recommend that you use [nvm](https://github.com/nvm-sh/nvm) to manage your node installed versions
  - use nvm to make node 6.12.3 the active version
- install postgresql ([best instructions](https://gist.github.com/ibraheem4/ce5ccd3e4d7a65589ce84f2a3b7c23a3))
- clone repo from github

### database setup
- ensure postgresql is running as a service (`pg_ctl -D /usr/local/var/postgres start`, or if you installed with Homebrew, `brew services start postgresql`)
- `npm install`
- `npm install -g knex`
- `createdb cohort`
- `createdb cohort_test`
- `createuser cohort_admin`
- from `src/knex` : `knex migrate:latest`
- `knex seed:run`

### admin site setup
- from `public/admin`:
- `yarn install`
- `yarn run dev`

### tests setup
- `npm install -g jest`
- `jest app`

### building the server
- `npx babel src --out-dir lib -w --source-maps --ignore 'src/**/*.test.js'`

### obtaining secret key files
- ask project lead for APN key and dot-env files
- put these in the root folder

### starting the server
- `node lib/cohort-server.js`
- you should see:
```
preparing notification service using 'development' environment
starting cohort server...
   environment: development
   http server started on port 3000
   websocket server started
event midway is now open
event fluxdelux is now open
   cohort session started
   mailer service started
```

### using VS Code for development
This repo includes a workspace for Visual Studio Code. The workspace is set up with launch and build scripts.

repository: kathleenmsmith/cohort-server

repo_name: kathleenmsmith/cohort-server


text:
# Lesson 3

## First assignment

- Confusion matrices: As a result we have to show a $2 \times 2$ matrix for accelerometer data and a $4 \times 4$ matrix for localization results
- Picture of App: only a picture is enough
- 1 Page:
    - Don't explain things already known
    - If you use another machine learning method should be explained
- All the code must be on the phone

### Radio map

- Each cell has now a probability mass function (pmf)
- The higher the difference among pmf's the better
- Notice that the big room has two cells

1. .
2. .
3. Store data in phone
4. .
5. Apply Bayes. Probability I am in cell $i$ given that I got an RSS measurement $r$ from access point $j$

$$
P(cell_i|rss_j^r) = \frac{P(cell_i) P(rss_j^r|cell_j)}{P(rss_j^r)}
$$

6. When do I stop iterations?
    - No clear answer
    - At every step you can update _prior_ with
        - data from other access points
        - new scans
    - Stops when you
        - Pass a threshold
        - Reach a "steady state": oscillation around a max $p$

To decide when to stop there are two different approaches:

- **Serial**: You keep multiplying the information by the prior knowledge until you find a good enough value

- **Parallel**:
    $$
    \begin{aligned}
    \overrightarrow{P}_0 \cdot \overrightarrow{W}_i^r = P_1 \\
    \overrightarrow{P}_1 \cdot \overrightarrow{W}_i^r = P_2 \\
    \cdots \\
    \end{aligned}
    $$
    Then:

    $$
    P = P_1 + P_2 + \cdots
    $$

7. Motion model

## Log Normal Model

repository: jmigual/Teoria

path: /Notes/Smart Phone Sensing/lesson_03.md

gha_language: TeX

repo_name: jmigual/Teoria


text:
---
layout: post
title:  "Spider-Man: Across the Spider-Verse"
date:   2023-05-06 15:39:40
preview: /assets/img/spider_thumbnail.png
category: [professional, techart]
---

![Picture 1](/assets/img/AcrossTheSpiderVerse_1.gif)

# Tool Development

## Inklines Tool

I got the chance to design and write one of the main animation tools for this ambitious sequel. The goal was to be flexible, yet intuitive. It accommodated various types of line and shape geometries that were used for smears and facial accents.

To ensure the anim team had an intuitive way to draw on their work no matter their preferred work flow, we built two ways to draw:

1: The spline-based Ink Line Tool. Upgraded from the first film.

2: A new pipeline to Blender for hand-drawn sketching.#AcrossTheSpiderVerse pic.twitter.com/PatbdfOaKH
— Nick Kondo 近藤 (@NickTyson) June 10, 2023

## Clonestamps - Smear Tool

My first assignment on the show was to rethink our body smears (also known as "multiples") workflow. Some of the main goals were:
* Optimizing the idle time that took to load our assets.
* Re-writing the api to be more modular and scalable.
* Redesigning the UI and selection methods to keep artists in their flow, without disruption.

I pitched a new selection system that accommodated a variety of ways to automatically split the mesh. This system proved to be very flexible for artists, allowing them to use it in different ways without overcrowding the UI with options. Later, the tool had to account for things like variants, groom, and cfx meshes. The new API allowed us to implement various updates requested by downstream departments, which were seamless to the artists.

## Ben Reilly Real-Time Shader

Due to the variety of rendering styles on the movie and the complexity of our final look-of-picture pipeline, we also experimented with different ways of representing those looks inside the Maya viewport. It was important for both the animators and the clients to be able to visualize how lighting and shading could influence the performances. That meant that characters like Ben Reilly needed their own independent light rig. To achieve this, I helped the team by mocking up a custom viewport shader that could potentially be re-used for characters like Peni or Hobie.

Ben Reilly. Direct homage to the inking style of Tom Lyle and Steve Butler. Really had fun drawing in this style and all those muscles. Those drawings were the base for the CG team to nail to render look. 3D model by @winanimata #AcrossTheSpiderVerse pic.twitter.com/eUu2sskHuz
— Aymeric Kevin (@AYMRC) June 24, 2023

I spent some time studying this amazing target from Aymeric, as well as this great [paper from Valve on TF2's shaders](https://steamcdn-a.akamaihd.net/apps/valve/2007/NPAR07_IllustrativeRenderingInTeamFortress2.pdf). The final shader basically consisted of a diffuse, specular and a fresnel/rim component.

After this proof of concept, the shader - along with other Ben Reilly specific workflows - was made into its own tool by the awesome Alan Zheng.

# FX Shots
Towards the end of the show, I also got to work in Houdini as part of the FX department. I was super grateful for this oppurtunity to do more hands-on shot work!

extension: markdown