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
; Ender 3 Custom End G-Code v1.2 ; https://gist.github.com/ahmet-cetinkaya/4fea5998f3fe1a1958d5587479959313 | |
G4 ; Wait | |
M220 S100 ; Reset Speed factor override percentage to default (100%) | |
M221 S100 ; Reset Extrude factor override percentage to default (100%) | |
M140 S0 ; Turn-off bed | |
G91 ; Set relative positioning | |
G1 F3000 Z20 ; Move Z Axis up 20 mm to allow filament ooze freely | |
G1 X5 Y5 F3000 ; Wipe out | |
G1 F1800 E-50 ; Retract filament 50 mm to prevent oozing and deformation |
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
public class Solution | |
{ | |
public int CoinChange(int[] coins, int amount) | |
{ | |
int[] dp = new int[amount + 1]; | |
Array.Fill(dp, amount + 1); | |
dp[0] = 0; | |
for (int i = 0; i <= amount; ++i) |
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
[System] | |
Name='btuValue_v0.7.3' | |
Type='mamdani' | |
Version=2.0 | |
NumInputs=5 | |
NumOutputs=1 | |
NumRules=132 | |
AndMethod='min' | |
OrMethod='max' | |
ImpMethod='min' |
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
// ==UserScript== | |
// @name Skip Silence Sync Fix | |
// @namespace ahmetcetinkaya.me | |
// @version 1.0.2 | |
// @description Fixing audio and video sync. | |
// @author ahmetcetinkaya <ahmetcetinkaya7@outlook.com> | |
// @match *://*.youtube.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=youtube.com | |
// @grant none | |
// ==/UserScript== |
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
#NoEnv | |
SetWorkingDir %A_ScriptDir% | |
CoordMode, Mouse, Window | |
SendMode Input | |
#SingleInstance Force | |
SetTitleMatchMode 2 | |
#WinActivateForce | |
SetControlDelay 1 | |
SetWinDelay 0 | |
SetKeyDelay -1 |
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
// Helper | |
const findDivisors = number => { | |
const divisors = [1]; | |
for (let i = 2; i < number - 1; ++i) if (number % i === 0) divisors.push(i); | |
return divisors; | |
}; | |
const sum = (...numbers) => numbers.reduce((a, b) => a + b); | |
// Perfect Number | |
const isPerfectNumber = number => sum(...findDivisors(number)) === number; |
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
// Helpers | |
const findDivisors = number => { | |
const divisors = [1]; | |
for (let i = 2; i < number - 1; ++i) if (number % i === 0) divisors.push(i); | |
return divisors; | |
}; | |
const sum = (...numbers) => numbers.reduce((a, b) => a + b); | |
// Friendly Numbers | |
const areFriendlyNumbers = (number, number2) => |
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
public class Solution { | |
public bool IsIsomorphic(string s, string t) { | |
var length = s.Length; | |
var dict = new Dictionary<char, char>(); | |
for (var i = 0; i < length; ++i) | |
if (dict.ContainsKey(s[i])) | |
{ | |
if (dict[s[i]] != t[i]) return false; | |
} | |
else |
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
public class Solution { | |
public int NumIdenticalPairs(int[] nums) { | |
var sum = 0; | |
var arr = new int[101]; | |
foreach (var num in nums) sum += arr[num]++; | |
return sum; | |
} | |
} | |
// Result: https://leetcode.com/submissions/detail/570762775/ |
NewerOlder