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 reverse(value) { | |
| if (!Array.isArray(value)) value = [...value.toString()] | |
| return value.reverse().join('') | |
| } |
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 getZeroLevel = (digitLevel) => { | |
| if (digitLevel < 1) return 1 | |
| let output = 10 | |
| for (let i = 1; i < digitLevel; i++) { | |
| output *= 10 | |
| } | |
| return output | |
| } |
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
| /** | |
| * @param {number} x | |
| * @return {number} | |
| */ | |
| var reverse = function(x) { | |
| if (x === 0) return 0 | |
| const isNegative = x < 0 | |
| if (isNegative) x *= -1 | |
| let output = "" | |
| while (x > 0) { |
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
| /** | |
| * @param {string} s | |
| * @return {number} | |
| */ | |
| var romanToInt = function(s) { | |
| s = s.toUpperCase() | |
| const chars = s.split('') | |
| const romans = { | |
| I: 1, | |
| V: 5, |
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
| @echo off | |
| ECHO "%~1" | |
| pause > nul |
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
| using System; | |
| using System.Runtime.InteropServices; | |
| using System.Windows.Forms; | |
| namespace Example | |
| { | |
| public class FormMover | |
| { | |
| private const int WM_NCLBUTTONDOWN = 0xA1; | |
| private const int HT_CAPTION = 0x2; |
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
| @ECHO off | |
| SET domain=FuLLKade.COM | |
| CALL :strLength domain domainLength | |
| ECHO Domains length is %domainLength%. | |
| PAUSE | |
| :strLength | |
| SETLOCAL enabledelayedexpansion |
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
| @ECHO off | |
| SET numbers[0]=1 | |
| SET numbers[1]=2 | |
| SET numbers[2]=3 | |
| SET numbers[3]=4 | |
| CALL :arrayLength numbers arrayLength | |
| ECHO The array length is %arrayLength%. | |
| PAUSE |
NewerOlder