What do you want to save?
Add Code snippet
New code examples
-
C# 2022-03-27 16:05:25
Find Number of Repetitions of Substring
using System; using System.Linq; public class Program { public static int NumberOfRepeats(string str) { int length = str.Length; int checkLength = 2; while (checkLength < length) { if (length % checkLength == 0) { var times ... Add solution -
Other 2022-03-05 22:40:08
settimeout dart
In addition to Timer mentioned by Chris, there is a Future-based API: var future = new Future.delayed(const Duration(milliseconds: 10), doStuffCallback); There is not yet direct support for cancelling a Future callback, but this works pretty well: var f... Add solution -
Other 2022-02-26 16:35:18
image upload from link in ckeditor 5
Inside the config.js of ckeditor add the following code CKEDITOR.editorConfig = function( config ) { .............. .............. .............. config.filebrowserUploadMethod = 'form', config.filebrowserUploadUrl = '/api/v1/ckeditor... Add solution -
Other 2022-02-19 23:45:03
how to use validation split data as validation data in callback
x = np.random.randn(150, 9) y = np.random.randint(0, 10, 150) x_train, y_train, x_val, y_val = split(x, y) train_dataset = tf.data.Dataset.from_tensor_slices((x_train, tf.one_hot(y_train, depth=10))) train_dataset = train_dataset.batch(32).repeat() val... Add solution -
CSS 2022-02-01 12:21:33
basic os in assembly
BITS 16 start: mov ax, 07C0h ; Set up 4K stack space after this bootloader add ax, 288 ; (4096 + 512) / 16 bytes per paragraph mov ss, ax mov sp, 4096 mov ax, 07C0h ; Set data segment to where we're loaded mov ds, ax mov si, text_string ; P... Add solution -
C# 2022-01-23 07:50:05
c# multiply string
String.Concat(Enumerable.Repeat("Hello", 4)) Add solution -
C# 2022-01-23 06:41:06
how to generate random letters in C#
private static Random random = new Random(); public static string RandomString(int length) { const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; return new string(Enumerable.Repeat(chars, length) .Select(s => s[random.N... Add solution -
Javascript 2022-01-22 02:10:28
js new array of length
ES6 gives us Array.from so now you can also use Array.from(Array(5)).forEach(alert) If you want to initialize with a certain value, these are good to knows... Array.from('abcde'), Array.from('x'.repeat(5)) or Array.from({length: 5}, (v, i) => i) /... Add solution
Best helpers
Ranking is empty