What do you want to save?
Add Code snippet
New code examples
-
Java 2021-10-17 07:47:06
Given a string and a non-empty substring sub, compute recursively the number of times that sub appears in the string, without the sub strings overlapping.
public int strCount(String str, String sub) { int strlen = str.length(); int sublen = sub.length(); if (strlen < sublen) return 0; if (str.substring(0,sublen).equals(sub)) return 1 + strCount(str.substring(sublen), sub); else r... Add solution -
Javascript 2021-10-06 18:28:04
js save and load an array of different types into localstorage
var myArray = [1,"word",23,-12,"string"];//your list of values, they can be strings or numbers //SAVING function save(a,b,c,d,e) {//the number of parameters you add is how many items you save var itemArray = [a,b,c,d,e];//number of... Add solution -
Dart 2021-09-22 14:04:06
dart char is uppercase
extension CapExtension on String { String get inCaps => '${this[0].toUpperCase()}${this.substring(1)}'; String get allInCaps => this.toUpperCase(); String get capitalizeFirstofEach => this.split(" ").map((str) => str.capitalize... Add solution -
Java 2021-09-21 15:12:02
getting java code for hashing files
private static String getFileChecksum(MessageDigest digest, File file) throws IOException { //Get file input stream for reading the file content FileInputStream fis = new FileInputStream(file); &... Add solution -
C# 2021-09-21 10:21:04
mapping dictionary to object c#
using System.Collections.Generic; using System.Linq; using System.Reflection; namespace WebOpsApi.Shared.Helpers { public static class MappingExtension { public static T ToObject<T>(this IDictionary<string, object> source) ... Add solution