What do you want to save?
Add Code snippet
New code examples
-
Other 2021-11-22 05:00:31
Create a Confirmation Modal When a User Adds a Promotion Code
var Cart = container.getComponent('Cart'); Cart.cancelableOn('beforeAddPromotion', function confirmPromo () { var deferred = jQuery.Deferred(); function resolvePromise () { return deferred.resolve() }; function rejectPromise () { var... Add solution -
Other 2021-11-21 21:54:41
regular expression to make slug for local language
//this slug with encoding for any language function CleanURL($string, $delimiter = '-') { // Remove special characters $string = preg_replace("/[~`{}.'\"\!\@\#\$\%\^\&\*\(\)\_\=\+\/\?\>\<\,\[\]\:\;\|\\\]/&q... Add solution -
Javascript 2021-11-20 18:35:15
create an observabloe js
// Requires RXJS 6+ // Create an observable of any Type // Ask yourself if the function creates a new observable or not // If it creates a new one then it is imported from 'rxjs' // Operators are imported from 'rxjs/operators' import { of } from 'rxjs'; ... Add solution -
Javascript 2021-11-20 10:56:11
object diff javascript
// const { inspect } = require('util') const { transform, isEqual, isArray, isObject } = require('lodash') /** * Find difference between two objects * https://davidwells.io/snippets/get-difference-between-two-objects-javascript * * @param {object} o... Add solution -
PHP 2021-11-20 02:55:14
How to use php to set title
function set_page_title(){ global $page_title; /* you should make the variable global so the function can access it and set it to the page title otherwise you will get an error. */ if(isset($page_title)){ /*Check if my code has that varia... Add solution
Best helpers
Cob
+5
Nick Rowe
+5
V0ight
+5
Jun Czyrka
+5
AppleFix88
+5
Kapil
+5
Oddthinking
+5
Arttu
+5
Geoffre14
+5
Lvoyster
+5
BuckNaked69
+5
S9527
+5