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
| class Point | |
| { | |
| constructor ( x, y ) | |
| { | |
| this.x = parseFloat(x); | |
| this.y = parseFloat(y); | |
| if ( isNaN(this.x) || isNaN(this.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
| function events_multiply ( trys, ...list ) | |
| { | |
| var stat = { | |
| all: 0, | |
| }; | |
| for ( var i=0; i<list.length; i++ ) { | |
| stat[i] = 0; | |
| } | |
| for ( ; trys > 0; trys-- ) { | |
| // количество одновременных событий |
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
| DSAIndex | |
| // ---------------------------------------------------------------- | |
| Investor: | |
| *Panel // (Главная) | |
| // Основной график, | |
| // График изменения капитализации топ20 валют во времени | |
| // Ось Y индекс | |
| // Ось X дата |
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
| <?php | |
| function one_test ( $hash, $count = 1000000 ) | |
| { | |
| $time_start = microtime(true); | |
| for ( $i=0; $i<$count; $i++ ) { | |
| $value = $hash('data' . $i); |
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
| function balancedNum(number) | |
| { | |
| let digits = (''+number).split('').map(n => +n); | |
| let count = Math.floor((digits.length - 1)/2); | |
| let sum = (arr) => arr.reduce((n, sum) => sum + n, 0); | |
| let result = sum(digits.slice(0, count)) === sum(digits.slice(digits.length-count, digits.length)); | |
| return {true: "Balanced", false:"Not Balanced"}[result]; | |
| } |
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
| #!/bin/sh | |
| BOT_TOKEN= | |
| CHAT_ID= | |
| CHECK_IP=1.1.1.1 | |
| ENDLINE=$(echo ) | |
| while [ true ]; do | |
| sleep 2 |
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
| const UINT8 hi704_init_tbl[][2] = { | |
| {0x01,0xF1}, | |
| {0x01,0xF3}, | |
| {0x01,0xF1}, | |
| {0x03,0x00}, | |
| {0x11,0x90}, | |
| {0x12,0x2C}, | |
| {0x20,0x00}, | |
| {0x21,0x02}, | |
| {0x22,0x00}, |
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
| #!/bin/sh | |
| TG_TOKEN= | |
| TG_CHAT_ID= | |
| INTERNET_RESOURCES="1.1.1.1 8.8.8.8" | |
| LOCAL_RESOURCES="wlan0.home pi.home asusrouter.home wlan0.home" | |
| trace() | |
| { | |
| echo $(date "+%Y-%m-%d %R:%S %z") ":" $1 |