type StringBool = "true"|"false";
interface AnyNumber { prev?: any, isZero: StringBool };
interface PositiveNumber { prev: any, isZero: "false" };
type IsZero<TNumber extends AnyNumber> = TNumber["isZero"];
type Next<TNumber extends AnyNumber> = { prev: TNumber, isZero: "false" };
type Prev<TNumber extends PositiveNumber> = TNumber["prev"];All of these diagrams are dynamically rendered during html display by Github, the images generated from text inside the Github-Flavored Markdown. None are static images. Mermaid support was released for Github on 2022-02-14
Pros & Cons:
- Pro: You don't need to care about the layout.
- Con: You cannot control the layout.
Notes:
- Not all the features of Mermaid (in particular symbols
B-->C[fa:fa-ban forbidden], hyperlink and tooltips) are supported by Github.
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
| if (!!root.EventSource) { | |
| /** | |
| * This method wraps an EventSource as an observable sequence. | |
| * @param {String} url The url of the server-side script. | |
| * @param {Observer} [openObserver] An optional observer for the 'open' event for the server side event. | |
| * @returns {Observable} An observable sequence which represents the data from a server-side event. | |
| */ | |
| dom.fromEventSource = function (url, openObserver) { | |
| return new AnonymousObservable(function (observer) { |
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
| use std::ffi::{OsStr, OsString}; | |
| let as_ref1: OsString = OsString::from(OsString::from("stellar contract build")); | |
| assert_eq!("stellar contract build", as_ref1); |
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
| $ curl --help | |
| Usage: curl [options...] <url> | |
| --abstract-unix-socket <path> Connect via abstract Unix domain socket | |
| --alt-svc <file name> Enable alt-svc with this cache file | |
| --anyauth Pick any authentication method | |
| -a, --append Append to target file when uploading | |
| --basic Use HTTP Basic Authentication | |
| --cacert <file> CA certificate to verify peer against | |
| --capath <dir> CA directory to verify peer against | |
| -E, --cert <certificate[:password]> Client certificate file and password |
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
| fn miniMaxSum(arr: &[i32]) { | |
| let len = arr.len(); | |
| let mut list: Vec<i64> = vec![]; | |
| for n in 0..len { | |
| let &sum = &arr.iter() | |
| .enumerate() | |
| .filter(|(index, &y)| !index.eq(&n)) | |
| .map(|(i, &y)| i64::from(y)) |
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
| 65214908 |
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
| 300068107 | |
| 621903189 |
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
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.17; | |
| contract Primitives { | |
| bool public boo = true; | |
| /* | |
| uint stands for unsigned integer, meaning non negative integers | |
| different sizes are available | |
| uint8 ranges from 0 to 2 ** 8 - 1 |
NewerOlder