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 | |
/** | |
* Validate Dutch Phone number | |
* | |
* Can be a local or mobile phone number. | |
*/ | |
function validate_dutch_phone_number( $phone_number ){ | |
if ( preg_match( "/^(\+|00|0)(31\s?)?(6[\s-]?[1-9][0-9]{7}|[1-9][0-9][\s-]?[1-9][0-9]{6}|[1-9][0-9]{2}[\s-]?[1-9][0-9]{5})$/", $phone_number ) ) { | |
return true; | |
} else { |
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 | |
/** | |
* Put this file in the root of your WordPress installation. | |
* When done remove it! | |
*/ | |
include 'wp-blog-header.php'; | |
global $wpdb; |
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 | |
/** | |
* This class is based on the loader class from this tutorial; | |
* https://code.tutsplus.com/tutorials/object-oriented-programming-in-wordpress-document-the-plugin-ii--cms-21167 | |
* | |
* In this example I have added the ability to define the priority and arguments for actiond and filters. | |
*/ | |
class Single_Post_Meta_Manager_Loader { | |
protected $actions; |
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 | |
/** | |
* Website: http://sourceforge.net/projects/simplehtmldom/ | |
* Additional projects that may be used: http://sourceforge.net/projects/debugobject/ | |
* Acknowledge: Jose Solorzano (https://sourceforge.net/projects/php-html/) | |
* Contributions by: | |
* Yousuke Kumakura (Attribute filters) | |
* Vadim Voituk (Negative indexes supports of "find" method) | |
* Antcs (Constructor with automatically load contents either text or file/url) | |
* |
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\Listeners; | |
use Illuminate\Auth\Events\Failed; | |
use Illuminate\Queue\InteractsWithQueue; | |
use Illuminate\Contracts\Queue\ShouldQueue; | |
use App\User as User; | |
use MikeMcLin\WpPassword\Facades\WpPassword; | |
use Auth; |
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
[{"name":"Villa del Balbianello","address":"via comoedia, 5, 22016 Tremezzina CO, Italy","lat":"45.9661118","lng":"9.2011346"},{"name":"Cortina d'Ampezzo","address":"Cortina d'Ampezzo, Italy","lat":"46.5396066","lng":"12.1343257"},{"name":"Museo della Civilt\u00e0 Romana","address":"Piazza Giovanni Agnelli, 10, 00144 Roma RM, Italy","lat":"41.8308835","lng":"12.4751877"},{"name":"Villa di Fiorano","address":"Via Appia Antica, 400, 00178 Roma RM, Italy","lat":"41.7991554","lng":"12.573976"},{"name":"Hotel Danieli","address":"Castello, 4196, 30122 Venezia VE, Italy","lat":"45.4338669","lng":"12.3399006"},{"name":"Hotel Cala Di Volpe","address":"Costa Smeralda, 07020 Porto Cervo, OT, Italy","lat":"41.0902363","lng":"9.5387878"}] |
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
Option Compare Database | |
Private Sub LoginBtn_Click() | |
Dim db As DAO.Database | |
Dim rst As DAO.Recordset | |
Set db = CurrentDb | |
Set rst = db.OpenRecordset("select * from dbo_Medewerker where medewerkerloginnaam='" & GebruikersnaamTxt.Value & "'") | |
If rst.RecordCount <= 0 Then |
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 categories = getCategories(); // this function gets the categories with ajax (you'll have to do that yourself ;-)) | |
var html = ""; | |
var tpl_categories = []; // top level categories | |
var top_cat_count = 0; | |
for (i = 0; i < categories.length; i++) { | |
if ( categories[i].parent == 0 ) { |
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 color_brightness($hex) { | |
$hex = str_replace('#', '', $hex); | |
$strl = strlen($hex)/3; | |
$c_r = hexdec(substr($hex, 0, $strl)); | |
$c_g = hexdec(substr($hex, $strl, $strl)); | |
$c_b = hexdec(substr($hex, $strl*2, $strl)); | |
$brightness = (($c_r * 299) + ($c_g * 587) + ($c_b * 114)) / 1000; |
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\Helpers; | |
use Config; | |
class MjmlHelper | |
{ | |
public static function auth() { | |
if ( empty( env('MJML_APPID') ) || empty( env('MJML_APPSECRET') ) ) return; | |
return base64_encode(env('MJML_APPID').':'.env('MJML_APPSECRET')); |
OlderNewer