What do you want to save?
Add Code snippet
New code examples
-
Other 2021-08-29 23:28:02
How to see your reports in cucumber
There are different type of Cucumber reports. 1. Pretty Report: It only generates a very basic report on IntelliJ/Eclipse console. We can make the console output more readable by using "monochrome = true" under @CucumberOptions. 2. Cucumber ... Add solution -
Other 2021-08-29 22:55:01
google place api online example
// This example displays an address form, using the autocomplete feature // of the Google Places API to help users fill in the information. function fillInAddress() { // Get the place details from the autocomplete object. var place = autocomplete.get... Add solution -
Other 2021-08-29 22:23:01
add jquery
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> // Put this script in the head of your index.html to load jQuery // The Google Hosted Libraries is a stable, reliable, high-speed, // globally... Add solution -
Javascript 2021-08-29 21:37:02
Sum All Primes
// I will update this code later, cause this is already very tasky, // bad performance(Two loops inside a loop) // Very bad, but it works const sumPrimes = num => { const divisor = [] for(let i = 2; i <= num; i++){ let factorial = [], j = ... Add solution -
Python 2021-08-29 20:38:01
how to check if a number is armstrong in python
num = 1634 # Changed num variable to string, # and calculated the length (number of digits) order = len(str(num)) # initialize sum sum = 0 # find the sum of the cube of each digit temp = num while temp > 0: digit = temp % 10 sum += digit ** o... Add solution -
Ruby 2021-08-29 19:24:03
iterating over hash, ruby
# iterating_over_hashes.rb person = {name: 'bob', height: '6 ft', weight: '160 lbs', hair: 'brown'} person.each do |key, value| puts "Bob's #{key} is #{value}" end #Returns #Bob's name is bob #Bob's height is 6 ft #Bob's weight is 160 lbs ... Add solution -
PHP 2021-08-29 18:40:02
woocommerce disable payment method if coupon appied and total is 0
add_filter('woocommerce_available_payment_gateways', 'applied_coupons_hide_payment_gateways', 20, 1 ); function applied_coupons_hide_payment_gateways( $available_gateways){ // Not in backend (admin) if( is_admin() ) return $available_gate... Add solution -
Other 2021-08-29 17:58:02
authorization type in api
Authorization : It's a process of granting or denying access to resources. Mostly it happens after Authentatication. Most of the projects I worked on use Bearer token with JWT in Authorizaiton header. I have endpoint that I can use to generate this token... Add solution -
Other 2021-08-29 17:13:01
sass create color utility classes
@mixin modifiers($map, $attribute, $prefix: '-', $separator: '-', $base: 'base') { @each $key, $value in $map { &#{if($key != $base, #{$prefix}#{$key}, '')} { @if type-of($value) == 'map' { @include modifiers($value, $attribute, $s... Add solution -
Shell/Bash 2021-08-29 16:41:01
bash remove duplicate lines from a file
# Basic syntax: sort input_file | uniq --unique # Sort the file first because uniq requires a sorted file to work. Uniq # then eliminates all duplicated lines in the file, keeping one instance # of each duplicated line # Note, this doesn't return only no... Add solution