- On the starting slide:
- Set the variable introPlayed with a default of false on the starting slide.
- Add a trigger with the following settings:
- Action: Execute JavaScript
- Script: see "Lock the menu"
- When: Timeline starts
- Object: make sure your starting slide is selected
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
<?php | |
/* | |
* Accept array or string | |
*/ | |
function convertSameCaracterToSameAscii($string) | |
{ | |
$tab_chr = array() ; | |
for($control = 0; $control < 32; $control++) { | |
if ($control != 9 && $control != 10) { | |
$tab_chr[]= chr($control) ; |
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
<?php | |
function valueExpected ($analyse, $expect, $strict = false) | |
{ | |
if ($strict) | |
{ | |
if ($analyse === $expect) | |
{ | |
return '<span style="background-color:darkolivegreen; color:darkgrey;">Received : ' . | |
$analyse . | |
', Expected : ' . |
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
<?php | |
$a = array(); | |
for ($i = 0; $i < 100000; $i++) { | |
$a[] = $i; | |
} | |
$start = microtime(true); | |
foreach ($a as $k => $v) { | |
$a[$k] = $v + 1; | |
} |
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/bash | |
# | |
# To download from command line : | |
# wget https://gist.githubusercontent.com/jonathanlaf/0240b8c401651af742ac826a69125440/raw/822eafea11056f55f5a239f8fa7062a43a05d600/fix_permission.sh | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# |
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
/* | |
* Use case: | |
* Need to toggle the next row | |
* | |
* The first part of this script is for demo purpose. (In order to make the demo work, you need bootstrap.) | |
*/ | |
// Get all the btns | |
const informationToggleBtns = document.querySelectorAll('.toggle-info'); |
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
<?php | |
namespace App\Services; | |
use Exception; | |
use Illuminate\Support\Carbon; | |
use PhpOffice\PhpSpreadsheet\Calculation\Functions; | |
use PhpOffice\PhpSpreadsheet\IOFactory; | |
use PhpOffice\PhpSpreadsheet\Reader\IReader; | |
use PhpOffice\PhpSpreadsheet\Spreadsheet; |
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
// Inspired by : https://www.relevanssi.com/knowledge-base/natural-language-date-queries/?replytocom=264649#respond | |
add_filter('relevanssi_modify_wp_query', 'rlv_date_query'); | |
function rlv_date_query($query) | |
{ | |
if (substr($query->query_vars['s'], 0, 10) === "published:") { | |
// Remove "published:" from search string. | |
$query->query_vars['s'] = substr($query->query_vars['s'], 10); | |
// If The query string is a year... (We check that it's an integer between 1900 and current year) |
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
/* | |
* Numbered Pagination | |
* http://www.wpexplorer.com/pagination-wordpress-theme/ | |
*/ | |
if ( !function_exists( 'wpex_pagination' ) ) { | |
function wpex_pagination($wpex_query) { | |
$prev_arrow = is_rtl() ? '→' : '←'; | |
$next_arrow = is_rtl() ? '←' : '→'; | |
/* |
OlderNewer