function spread(...$args){
return $args;
}
print_r(spread(1,2,3));
//ritorna: Array ( [0] => 1 [1] => 2 [2] => 3 )
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This function enables horizontal scrolling on a specified element when the mouse wheel is used. | |
* @param {string} selector - The CSS selector of the element on which to enable horizontal scrolling. | |
* @param {number} scrollValue - The amount to scroll each time the mouse wheel is used. Defaults to 100. | |
* @param {number} extraScroll - The number of times to allow scrolling past the end of the element. Defaults to 5. | |
* @returns {void} | |
*/ | |
export let horizMouseScroll = ( | |
selector, | |
scrollValue = 100, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Script per il backup del database | |
# Modificare le variabili seguenti | |
database=nome_del_db | |
username=username_db | |
password=password_db | |
# Fine modifiche | |
today=$(date +"%Y-%m-%d-%H-%M-%S") | |
filename=${database}-${today}.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var babelify = require('babelify'); | |
var browserSync = require('browser-sync'); | |
var browserify = require('browserify'); | |
var buffer = require('vinyl-buffer'); | |
var gulp = require('gulp'); | |
var plugins = require('gulp-load-plugins'); | |
var source = require('vinyl-source-stream'); | |
/* Configuration */ | |
var config = { |
da: https://octobercms.com/plugin/support/renatio-formbuilder/how-to-save-form-data-to-table
Event::listen('formBuilder.beforeSendMessage', function ($form, $data) {
DB::table('products')->insert(
['name' => $data['name']
);
return true; // this will prevent sending email message
});
NewerOlder