sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
Smith, | |
Johnson, | |
Williams, | |
Brown, | |
Jones, | |
Garcia, | |
Miller, | |
Davis, | |
Rodriguez, | |
Martinez, |
import jwt | |
import requests | |
import datetime | |
from simple_salesforce import Salesforce | |
from simple_salesforce.exceptions import SalesforceAuthenticationFailed | |
def jwt_login(consumer_id, username, private_key, sandbox=False): | |
endpoint = 'https://test.salesforce.com' if sandbox is True else 'https://login.salesforce.com' | |
jwt_payload = jwt.encode( | |
{ |
This is a reconstruction of http://www.roman10.net/2011/11/27/how-to-calculate-iptcpudp-checksumpart-2-implementation/ The site is gone so I took it from the archive for the sake of C Programming TCP Checksum's answer Enjoy! All credits go to https://github.com/roman10.
This is a follow up of the previous post, how to calculate IP/TCP/UDP checksum part 1 — theory.
To calculate the IP checksum, one can use the code below,
#!ipxe | |
set talos_type controlplane | |
chain talos-unattended.ipxe |
<?xml version="1.0" encoding="UTF-8"?> | |
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd" securityLevel="any"> | |
<meta> | |
<author>Picplz</author> | |
<documentationURL>http://picplz.com</documentationURL> | |
<sampleQuery>select * from {table} WHERE entity='feed' AND type='interesting'</sampleQuery> | |
<sampleQuery>select * from {table} WHERE entity='city' AND id=2 AND include_pics=1</sampleQuery> | |
<sampleQuery>select * from {table} WHERE entity='user' AND username='zubillaga' AND include_pics=1;</sampleQuery> | |
</meta> | |
<bindings> |
long_tweet = 'asdfasdf asd fasd fasdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdfasdf asdfasdfas dfasd fasd fasdf asdf asdf asdf asdf asdf asdf ' | |
short_tweet = 'asdfasdf asd fasd fasdf asdf asdf asdf asdf asdf asdf asdf asdf' | |
url = "http://sia.tw/4fgs4" | |
def join_url(tweet, url): | |
max_tweet_length = 139 |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Z-Index Example</title> | |
<style> | |
@font-face { | |
font-family: 'Win95F'; | |
src: url('data:application/font-woff2;base64,d09GMk9UVE8AAB7IAAoAAAAAfLQAAB54AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAADYHcRQZgAIpcATYCJAOFAAQGP21ldGGCBAWHeQcgG/17FeyYl7gdUKg+MzYSIWwchCaAJ1GUTdZM2f+fEtQxhLpXsjlMOBl1rtM5kVqBMp1XeGh4M/bhm1fyGODBICrJYyX3cIpIfVYz8+zf7k/1poo76F5SyxV35u42RuK58Pyzv//2ufiSI5FINEWNWcddrlPZZr353F4vNRtmfpL6FyCmfDO+2gEHHHZoxKaa7jrsXaZOHea+XXQOfP8/9vs9cxcVqniikQnZQ7JE62SzSFJJlfXTq1/snkEVLh3bgX9wrpvZrHU6h4r8an+wJ/mf+G0eKltj8Y0CE6MTzFphsWCV6tY3xQxWaSyijN4a1jYsZYEPgty2j1NBvFO5ztS8L7nCE3R9JjsC1hSKoT3X3uY/v7/vz137WW3kOP6K38nIPwlujGIbNkGXOwLg//99U20JOQ0Yh4DD0LlU0bhPcFDIsBzy6t0Td7+5d9mjCFAJA0VwEQ4h4M07M9/hM0P5S4sBznkkVa5S5dxVIbUt2bl0SRWdWndyVbjrtXoXfWko9Ixf8mAlKsgL1qjQb5oCz6Y4siXFEeB8+MN2upYd8LuBdoR/31iLxhoVBZhAB3bnZRRIIKn3s59aH/bm9DqFEgRElDEz/m5qk9vHmEbteKX0j35isACCAoJ0hS2/QNAEEf |
""" | |
Extractive is a cool new service that does some on the fly web | |
crawling, and machine learning stuff like Entity Extraction, Full | |
text extraction, and more things I don't even understand. There | |
on demand api was very easy to use, but I built my first crawl | |
job the other night, and had some trouble parsing the results. | |
I thought I would put this up so people can see how I fixed the | |
output. | |
""" |
最近は .NET Core の仕事をしています。
さて、ASP.NET Core を使っていると、とりあえず構成情報みたいなものは IOptions<TOptions>
で受け取っておけみたいな雑な話を目にします。
一応 公式のドキュメント はあるのですが、正直読んでもよくわからない。柔軟なんだねー、なるほどねーみたいな感じになりました。なので、ここではできる限り(?)網羅的に解説してみようと思います。
IOptions<TOptions>
って何?(TOptions
を直接注入すればいいじゃん)IOptionsSnapshot<TOptions>
とかたくさんあってよくわかんない