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
const passwordInput = useRef<HTMLIonInputElement>(null); | |
passwordInput.current?.getInputElement().then( (element) => { | |
if ( element.value ) { | |
setPassword(element.value); | |
} | |
}); |
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 | |
/** | |
* Class RD_Text_Extraction | |
* | |
* Example usage: | |
* | |
* $response = RD_Text_Extraction::convert_to_text($path_to_valid_file); | |
* | |
* For PDF text extraction, this class requires the Smalot\PdfParser\Parser class. |
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
function rd_set_custom_order_id_for_chase_paymentech( $order_id, $order ) { | |
return uniqid() . '-' . substr($order->get_id(), -4); | |
} | |
add_filter( 'chase_paymentech_gateway_transaction_order_id', 'rd_set_custom_order_id_for_chase_paymentech', 10, 2 ); |
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
class ExampleSingleton { | |
private $properties = array(); | |
private static $instance; | |
private __construct(){} | |
public getInstance() | |
{ | |
if (empty(self::$instance)) { |
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 | |
$string = "madam"; | |
$array = str_split($string); | |
$reverse_array = array_reverse( $array, true ); | |
$new_string = implode('', $reverse_array); | |
echo "<pre>"; | |
var_dump($array, $reverse_array); | |
echo ( $string === $new_string) ? "Yes, {$string} is a palindrome." : "No, {$string} is not a palindrome."; |
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
<allow-navigation href="*" /> | |
<allow-intent href="*" /> | |
<access origin="*" /> |
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
cordova plugin add [email protected] |
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
<key>NSAppTransportSecurity</key> | |
<dict> | |
<key>NSExceptionDomains</key> | |
<dict> | |
<key>ReplaceWithYourDomanName.com</key> | |
<dict> | |
<key>NSIncludesSubdomains</key> | |
<true/> | |
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> | |
<true/> |
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 scans through all files in the wp-content/uploads | |
* folders and imports them into the media library. This should be | |
* included in your theme's functions.php file. Simply visit your | |
* website, including the URL param: | |
* http://www.example.org/?import_non_existing_media_library_entries=1 | |
* | |
* Plan on it timing out a few times. Just keep refreshing. It won't | |
* duplicate files being imported. | |
*/ |
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 | |
/** | |
* ACF Layout | |
* @version 1.0 | November 12th 2013 | |
* @author Beau Charman | http://twitter.com/beaucharman | |
* @link https://gist.github.com/beaucharman/7181406 | |
* @license MIT license | |
* | |
* Logical layout automation for Advanced Custom Fields and it's Flexible Content Field add on. |
NewerOlder