int arr[1];
int *p;
arr = xxx; // Error
p = xxx; // OK
int arr[10];
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import hashlib | |
| import mst_card_text_pb2 | |
| import json | |
| from Crypto.Cipher import AES | |
| from Crypto.Util.Padding import unpad, pad | |
| from protodeep.lib import guess_schema | |
| from Crypto.Protocol.KDF import PBKDF2 # From PyCryptodome | |
| from Crypto.Hash import HMAC, SHA1 # PBKDF2 default hash = HMAC-SHA1 | |
| from collections import OrderedDict | |
| from pathlib import Path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.IO; | |
| using System.Security.Cryptography; | |
| using System.Text; | |
| namespace CardMasterDecompile | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Originated from http://pdinda.org/Papers/ipdps18.pdf | |
| a, b != NaN, a b are floating numbers | |
| a + b = b + a ? True | |
| a + b + c = a + (b + c) ? False | |
| a(b + c) = ab + ac ? False | |
| (a + b) - a = b ? False (Inf, rounding) | |
| a * a >= 0 ? True (but false for integer arithmetic => overflow) | |
| a overflows ? saturation, Inf (integer => wrap-around) | |
| a := 1, b := 0, a / b = ? (Inf, will propagate to ordinary numeric) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from urllib.request import urlretrieve | |
| import requests | |
| from bs4 import BeautifulSoup | |
| import sys | |
| import os | |
| import socket | |
| socket.setdefaulttimeout(150) | |
| import re | |
| class DownloadError: |
I'm just tired of constant optimization and I wrote this note to show some tricks of optimization. Note: no multithread/coroutine
While keeping the structure of std::vector::resize(reserve, push_back/emplace_back) and getopt_long, instead of using dynamic std::string for storing mode, just using (char*)optarg and strcmp and return integer sign to indicate the mode. (It's simple switch (only 3 modes and 2 options), some techniques like place your case index in order and Duff's device are useless.)
NewerOlder