What do you want to save?
Add Code snippet
New code examples
-
Java 2021-09-26 20:21:04
String indexOf(String str int fromIndex) method in java
import java.util.*; public class StringIndexOfMethodExample { public static void main(String[] args) { String strInput = new String("hello world core java"); String strSub = new String("core"); System.out.print(... Add solution -
Javascript 2021-09-26 15:43:02
javascript remove duplicate in two arrays
// 1. filter() function removeDuplicates(array) { return array.filter((a, b) => array.indexOf(a) === b) }; // 2. forEach() function removeDuplicates(array) { let x = {}; array.forEach(function(i) { if(!x[i]) { x[i] = true } }) r... Add solution -
Javascript 2021-09-25 22:59:03
javascript map return array with distinc values
//ES6 let array = [ { "name": "Joe", "age": 17 }, { "name": "Bob", "age": 17 }, { "name": "Carl", "age": 35 } ]; array.map(item => item.age) .filter((valu... Add solution -
Javascript 2021-09-25 03:06:04
array remove element js
var colors = ["red","blue","car","green"]; var carIndex = colors.indexOf("car");//get "car" index //remove car from the colors array colors.splice(carIndex, 1); // colors = ["red",&... Add solution -
Other 2021-09-24 12:00:04
arr.remove
var colors = ["red","blue","car","green"]; var carIndex = colors.indexOf("car");//get "car" index //remove car from the colors array colors.splice(carIndex, 1); // colors = ["red",&... Add solution -
Html 2021-09-24 05:15:02
html ecommerece search box
<div class="row"> <div class="left" style="background-color:transparent;"> <h3 style="text-align: center;">Plants</h3> <input type="text" id="mySearch" ... Add solution -
Javascript 2021-09-24 03:49:04
show only three caraters email javascript
function hideemail(target) { var email = target //[email protected] var hiddenEmail = ""; for (i = 0; i < email.length; i++) { if (i > 2 && i< email.indexOf("@") ) { hiddenEmail += "*"; ... Add solution -
Javascript 2021-09-23 17:13:02
angular browser detector
import {Injectable} from '@angular/core'; @Injectable({ providedIn: 'root' }) export class BrowserDetectorService { private browser: string; private version: number | string; private os: any; private versionSearchString: any; private dataB... Add solution