包含若干待定整理内容。
const/常量表达式(constant expression) 的联系和不同。
参考:
| // TUPLE MICRO-BENCHMARKS, based on https://www.dotnetperls.com/tuple-keyvaluepair | |
| // | |
| // Tuples are generally fastest. | |
| // ValueTuple is fastest in the particular case of GetHashCode. | |
| // KeyValuePair is always worst. | |
| // | |
| // | |
| // RAW RESULTS | |
| // Numbers in milliseconds (lower is better) | |
| // |
| 000(023Rb|001Rb) | |
| 001(017La|002Rb) | |
| 002(021La|003Rb) | |
| 003(021La|004La) | |
| 004(009Rb|005Lb) | |
| 005(004Ra|005La) | |
| 006(008La|007La) | |
| 007(009Rb|007La) | |
| 008(009Ra|008La) | |
| 009(010Ra|026Ra) |
| <?php | |
| /** | |
| * Dirty, dirty Reddit bot: Decronym | |
| */ | |
| class Reddit { | |
| const USERNAME = 'Decronym'; | |
| const PASSWORD = '***'; | |
| const CLIENTID = '***'; | |
| const SECRET = '***'; |
Following are instructions on how to use the Internet Archive command-line tool, "ia", to download a collection from Archive.org and keep it synced. The only requirements are that you have Python 2 installed on a Unix-like operating system (i.e. Mac OS X, Linux).
ia command-line tool:All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent| <?xml version="1.0" encoding="UTF-8"?> | |
| <ruleset name="Laravel and similar phpmd ruleset" | |
| xmlns="http://pmd.sf.net/ruleset/1.0.0" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd" | |
| xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"> | |
| <description> | |
| Inspired by https://github.com/phpmd/phpmd/issues/137 | |
| using http://phpmd.org/documentation/creating-a-ruleset.html | |
| </description> |
If field type is message, what should getter return if it is not set?
Proto2 specification does not define default value for message type, it is defined only for scalar types:
If the default value is not specified for an optional element, a type-specific
| CREATE EXTENSION btree_gist; | |
| CREATE TABLE room_reservations ( | |
| room_id integer, | |
| reserved_at timestamptz, | |
| reserved_until timestamptz, | |
| canceled boolean DEFAULT false, | |
| EXCLUDE USING gist ( | |
| room_id WITH =, tstzrange(reserved_at, reserved_until) WITH && | |
| ) WHERE (not canceled) |