Login
Discover
Waves
Communities
Write
Login
Signup
Alessandra
@drago18121996
72
Writer / Researcher
Followers
2258
Following
1349
Follow
Email digest
Resource Credits
Available
Used
Location
Köln
Created
2017-03-24 22:29
RSS Feed
Subscribe
Posts
Blog
Posts
Comments
Communities
Wallet
drago18121996
ita
1y
Square
using System; using System.Text.RegularExpressions; public static class CryptoSquare { public static string NormalizedPlaintext(string plaintext) { string result = ""; for(int i=0;
$ 0.095
9
drago18121996
ita
1y
Matrix
using System; using System.Collections.Generic; public class Matrix{ public string input; public Matrix(string input){ this.input = input; } public int[] Row(int row){ List<int> parts = new
$ 0.059
7
6
drago18121996
ita
1y
Bottle
using System; using System.Collections.Generic; using System.Linq; public class TreeBuildingRecord{ public int ParentId { get; set; } public int RecordId { get; set; } } public class Tree{ public int Id
drago18121996
ita
2y
Edin il sovrano... :D
Edin il sovrano... :D
drago18121996
ita
2y
System Windowing
class ProgramWindow{ public $x; public $y; public $width; public $height; function __construct(){ $this->x = 0; $this->y = 0; $this->width = 800; $this->height = 600; } function resize($size){
drago18121996
ita
2y
Count
export function nucleotideCounts(lett:string) { const res: Record<string, number> = { A: 0, C: 0, G: 0, T: 0,}; // ricordarsi la virgola alla fine! for(let i=0; i<lett.length; i++){ let char =
drago18121996
ita
2y
Binary search
export function find(haystack: number[], needle: number, counter: number = 0): number | never { const maxNumber = Math.max(...haystack); let middle = Math.floor(haystack.length/2); if(needle === 0 ||
drago18121996
ita
2y
Handshake
let arr : string[] =["wink" ,"double blink","close your eyes", "jump"]; export function commands(num: number): string[] { let res: string[] = []; const binArr
drago18121996
ita
2y
Length
export function encode(text:string) { let res = ""; let num = 1; for(let i=0; i<text.length; i++){ if(i<text.length - 1 && text[i] === text[i+1]){ num +=1; } else{ if(num === 1){
drago18121996
ita
2y
Bases
export function convert( digits: number[], inputBase: number, outputBase: number ): number[] { let res: number[] = []; let resNum = 0; let exp = digits.length-1; let toAdd = 0; if (inputBase <=1) throw
drago18121996
ita
2y
Series
export class Series { series: string; constructor(series: string) { this.series = series; if(this.series.length === 0) throw new Error('series cannot be empty'); } slices(sliceLength: number): number[][]
drago18121996
ita
2y
Affine
export const encode = (phrase, key) => { let lower = phrase.toLowerCase().replaceAll(' ', ''); let alphabet = ['a','b','c','d','e','f','g','h','i','j','k','l','m',
drago18121996
ita
2y
Affine
<?php . \* \* To disable strict typing, comment out the directive below. \*/ declare(strict\_types=1); function encode(string $text, int $num1, int $num2): string{ $res = ""; $alphabet = range('a', 'z');
drago18121996
ita
2y
Sum
declare(strict_types=1); function sumOfMultiples(int $number, array $multiples): int{ $res = 1; $setres = []; foreach($multiples as $mult){ if($mult < 1 || $mult > $number) continue; $i = 1; while
drago18121996
ita
2y
ETL
export function transform(old: {[key: string]: string[]}) { let expected: {[key: string]: number} = {}; for(const [keys, values] of Object.entries(old)){ for(const elm of values){ expected[elm.toLowerCase()]
drago18121996
ita
2y
Diamont
def rows(letter): list\_start = ['A','B','C','D','E','F','G','H','I','J', 'K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'] row\_conf=[] n = list\_start.index(letter) for i in range(n+1):
drago18121996
ita
2y
Sum total
export class Squares { count: number; constructor(count: number) { this.count = count; } get sumOfSquares(): number { let tot = 0; for(let i=0; i<=this.count; i++){ tot += i\*i; } return tot; }
drago18121996
ita
2y
Kindergarten
// // This is only a SKELETON file for the 'Kindergarten Garden' exercise. // It's been provided as a convenience to get you started writing code faster. // const DEFAULT_STUDENTS: Student[] = [ 'Alice',
drago18121996
ita
2y
Garden
// // This is only a SKELETON file for the 'Kindergarten Garden' exercise. // It's been provided as a convenience to get you started writing code faster. // const DEFAULT_STUDENTS = [ 'Alice', 'Bob',
drago18121996
ita
2y
Anagram
export class Anagram { input : string; constructor(input: string) { this.input = input.toLowerCase(); } public matches(...potentials: string[]): string[] { let res: string[] = []; let sortedStringFirst:
← Latest
Older →