What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-01-30 12:46:23
regex
Let regex; /* shorthand character classes */ regex = /d/; // matches any digit, short for [0-9] regex = /D/; // matches non-digits, short for [^0-9] regex = /S/; // matches non-white space character regex = /s/; // matches any white space character regex ... Add solution -
-
CSS 2022-01-27 06:55:04
css responsive navigation
#header{ position:fixed; z-index:1000; left:0; top:0; width:100vw; height:auto; } #header .header{ min-height:8vh; background-color: rgba(0,0,0,0.3); } #header .nav-bar{ display:flex; align-items:center; justify-content:space-between; width:100%... Add solution -
Javascript 2022-01-26 05:02:14
find capital word in string javascript
//capitalize only the first letter of the string. function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); } //capitalize all words of a string. function capitalizeWords(string) { return string.repl... Add solution -
Javascript 2022-01-24 01:05:43
display only initials from full name reactjs
var getInitials = function (string) { var names = string.split(' '), initials = names[0].substring(0, 1).toUpperCase(); if (names.length > 1) { initials += names[names.length - 1].substring(0, 1).toUpperCase(); } re... Add solution -
Java 2022-01-23 07:46:50
java 8 function supplier consumer
@Testpublic void whenNamesPresentUseBothConsumer(){ List<String> cities = Arrays.asList("Sydney", "Dhaka", "New York", "London"); Consumer<List<String>> upperCaseConsumer = list -> {... Add solution