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 LIMIT = 30; | |
| const endStringWithThreeDots = (str) => { | |
| if (str.length <= LIMIT) { | |
| return str; | |
| } else { | |
| const updatedString = str.slice(0, LIMIT - 3) + "..."; | |
| return updatedString; | |
| } | |
| }; |
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 newGuid = Date.now().toString(36) + Math.random().toString(36).substring(2); | |
| export default newGuid; |
Help Ukraine by attacking Russian web sites. Good load testing training.
Tools:
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
| /** | |
| * @name SYNOPSIS | |
| * @link http://nodejs.org/api/synopsis.html | |
| */ | |
| var http = require('http'); | |
| // An example of a web server written with Node which responds with 'Hello World'. | |
| // To run the server, put the code into a file called example.js and execute it with the node program. | |
| http.createServer(function (request, response) { | |
| response.writeHead(200, {'Content-Type': 'text/plain'}); |
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
| CULTURE SPEC.CULTURE ENGLISH NAME | |
| -------------------------------------------------------------- | |
| Invariant Language (Invariant Country) | |
| af af-ZA Afrikaans | |
| af-ZA af-ZA Afrikaans (South Africa) | |
| ar ar-SA Arabic | |
| ar-AE ar-AE Arabic (U.A.E.) | |
| ar-BH ar-BH Arabic (Bahrain) | |
| ar-DZ ar-DZ Arabic (Algeria) | |
| ar-EG ar-EG Arabic (Egypt) |
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 newtonSquareRoot = (num) => { | |
| let x = 1; | |
| let result; | |
| for (let i = 0; i < 20; i++) | |
| { | |
| result = x - ( x*x - num )/( 2*x ); | |
| x = 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
| $symbols = '!@#$%^&*'.ToCharArray() | |
| $characterList = 'a'..'z' + 'A'..'Z' + '0'..'9' + $symbols | |
| function GeneratePassword { | |
| param( | |
| [Parameter(Mandatory = $false)] | |
| [ValidateRange(12, 256)] | |
| [int] | |
| $length = 14 | |
| ) | |
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
| // Five Lines Iterator [ fliter (╥﹏╥) ] | |
| const fliter = (a, p = 0) => ({ | |
| hasNext: () => p < a.length, | |
| next: () => a[p++], | |
| remove: () => a.splice(--p, 1) | |
| }) | |
| /* Minified | |
| * const fliter=(a,p=0)=>({hasNext:()=>p<a.length,next:()=>a[p++],remove:()=>a.splice(--p,1)}) | |
| */ |
NewerOlder