What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-07 20:44:26
delete value from json array with index
ArrayList<String> list = new ArrayList<String>(); JSONArray jsonArray = (JSONArray)jsonObject; int len = jsonArray.length(); if (jsonArray != null) { for (int i=0;i<len;i++){ list.add(jsonArray.get(i).toString()); } } //R... Add solution -
Java 2021-11-07 12:13:09
java count frequency of characters in a string
+++METHOD WITH NONDUP+++ public static String FrequencyOfChars(String str) { String nonDup = ""; for(int i=0; i < str.length(); i++) if(!nonDup.contains(""+str.charAt(i))) nonDup+= ""+str.charAt(i); String expectedRe... Add solution -
Java 2021-11-07 11:48:21
compare string integer java
/** * Similar to compareTo method But compareTo doesn't return correct result for string+integer strings something like `A11` and `A9` */ private int newCompareTo(String comp1, String comp2) { // If any value has 0 length it means other value is bi... Add solution -
Other 2021-11-07 05:56:09
gsap scroll trigger
gsap.registerPlugin(ScrollTrigger); let tl_main = gsap.timeline({ paused: true }); var crc1 = document.querySelector('.path-18'); var l = crc1.getTotalLength(); // tl first circle let tl_circle1 = gsap.timeline(); tl_circle1.fromTo(crc1, 3, { strokeDas... Add solution -
Other 2021-11-06 18:03:13
program code for counting the similarwrod in the sentences
public static int count(String word) { if (word == null || word.isEmpty()) { return 0; } int wordCount = 0; boolean isWord = false; int endOfLine = word.length() - 1; char[] characters = word.toCharArray(); for (int i... Add solution -
Other 2021-11-06 17:17:10
Argument data type text is invalid for argument 1 of len function.
If you try to use len() on a Text field, you will get an error Argument data type text is invalid for argument 1 of len function. The answer to this is the Datalength() function which will return the length of any expression. This can be used on all data... Add solution -
Java 2021-11-06 02:17:13
hadoop in mapper combiner
public static class Map extends Mapper<Object, Text, Text, IntWritable> { Map count = new HashMap<Integer, Integer>(); public void map(Object key, Text value, Context context) throws IOException, InterruptedException { StringT... Add solution -
Java 2021-11-04 14:42:21
java iterate over a string
String scientistName = "Isaac Newton"; for (int i = 0; i < scientistName.length(); i++) { System.out.print(scientistName.charAt(i) + " "); // I s a a c N e w t o n } //*******************************************************... Add solution