This file contains 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
// … | |
@NgModule({ | |
imports: [ | |
AppRouterModule, | |
// … | |
], | |
bootstrap: [RootComponent], | |
providers: [ | |
// … |
This file contains 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
// 1. Implement `reduce` via forEach. Expected api for the function: | |
reduce(arr, (acc, item) => acc + item, 0); | |
// example of implementation: | |
function reduce(arr, reducerCallback, initialValue) { | |
let result; | |
……forEach(…) | |
return result; | |
} |
This file contains 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
for filename in *.mp4; do ffmpeg -ss 12 -i "$filename" -c copy out-"$filename";done; # trim first 12 seconds | |
for filename in *.mp4; do printf "file '%s'\n" "$filename" >> ffmpeg_concat.txt;done;ffmpeg -f concat -i ffmpeg_concat.txt -c copy output-result.mp4; rm ffmpeg_concat.txt # concat ffmpeg | |
for filename in *.mp4; do ffmpeg -i "$filename" 2>&1 | grep Duration | awk '{print $2}' | tr -d , >> ffmpeg_concat.txt;done; # video duration time | |
ffmpeg -i video.mp4 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - > out.gif # video to gif | |
ffmpeg -i input.mp4 -c:v libx264 -crf 23 -preset medium -c:a copy video-out.mp4 #optimize reduce size |
This file contains 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 times = { | |
'Video 0': '00:39:13', | |
'Video 1': '00:29:03', | |
'Video 2': '00:24:02', | |
'Video 3': '00:31:55', | |
'Video 4': '00:32:26', | |
'Video 5': '00:42:29', | |
'Video 6': '00:49:11', | |
}; |
This file contains 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
#!/usr/bin/env node | |
// Raycast Script Command Template | |
// | |
// Dependency: This script requires Nodejs. | |
// Install Node: https://nodejs.org/en/download/ | |
// | |
// Duplicate this file and remove ".template" from the filename to get started. | |
// See full documentation here: https://github.com/raycast/script-commands | |
// |
This file contains 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
bind → unbind | |
on → off | |
link → unlink | |
attach → detach | |
add → remove delete | |
start → stop finish | |
begin → end | |
init → destroy | |
set → unset | |
delegate → undelegate |
This file contains 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 IS_PASSED(arRange, currentDay, immunityCount) { | |
const IMMUNITY_SCORE = 1; | |
const NO_REPORT_SCORE = 0; | |
const range = arRange[0]; | |
var immunities = immunityCount; | |
for (var day = 0; day < currentDay; day++) { | |
var score = Number(range[day]); | |
This file contains 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
amp = .1; //Чем больше значение, тем больше амблитуда | |
freq = 5; //Чем больше значение, тем больше частота | |
decay = 7; //Чем больше значение, тем меньше задержка | |
n = 0;if (numKeys > 0){n = nearestKey(time).index;if (key(n).time > time){n--;}}if (n == 0){t = 0;}else{t = time - key(n).time;} if (n > 0){v = velocityAtTime(key(n).time - thisComp.frameDuration/10);value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);}else{value;} |
- Microsoft REST API Guidelines
- Learn REST: A RESTful Tutorial и книга по мотивам сайта
- How to design a REST API
- Best Practices for Designing a Pragmatic RESTful API
- White House Web API Standards
- 10 Best Practices for Better RESTful API
- API design best practices
- Создание RESTful API
- Шпаргалка по созданию RESTful API
NewerOlder