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 | |
error_reporting(E_ALL); | |
ini_set('display_errors', 1); | |
$url = 'https://196.200.24.46/Rent/Service1.asmx?wsdl'; | |
// options for ssl in php 5.6.5 | |
$opts = array( | |
'ssl' => array('ciphers'=>'RC4-SHA', 'verify_peer'=>false, 'verify_peer_name'=>false) | |
); |
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
jQuery.validator.addMethod("notEqualToGroup", function (value, element, options) { | |
// get all the elements passed here with the same class | |
var elems = $(element).parents('form').find(options[0]); | |
// the value of the current element | |
var valueToCompare = value; | |
// count | |
var matchesFound = 0; | |
// loop each element and compare its value with the current value | |
// and increase the count every time we find one | |
jQuery.each(elems, function () { |
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
jQuery.validator.methods.email = function( value, element ) { | |
var email = /^([\w-.]+@(gmail|yahoo|hotmail|icloud)(\.+)?[a-zA-Z])\/?/; | |
return email.test(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
set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; | |
set session sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; |
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
public async Task<bool> SendPushNotification() | |
{ | |
var applicationID = "xxx"; | |
var senderId = "xxx"; | |
var deviceId = "xxxx" | |
using (var client = new HttpClient()) | |
{ | |
//do something with http client | |
client.BaseAddress = new Uri("https://fcm.googleapis.com"); |
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
UPDATE backup | |
SET agent_code = ELT(1 + FLOOR(RAND()*8), | |
'73572689', | |
'82778947', | |
'65857689', | |
'93335986', | |
'39894552', | |
'25344286', | |
'35939776', | |
'79822264'); |
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
CREATE TABLE `test` ( | |
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, | |
`name` VARBINARY(100) NULL | |
PRIMARY KEY (`id`)) | |
ENGINE = InnoDB | |
DEFAULT CHARACTER SET = utf8 | |
COLLATE = utf8_general_ci; | |
INSERT INTO test (name) | |
VALUE (AES_ENCRYPT('valuegoeshere','secretkeygoeshere')); |
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
upstream php { | |
server unix:/var/run/php/php7.2-fpm.sock; | |
} | |
server { | |
listen 80; | |
server_name www.example.com example.com; | |
root /var/www/example.com; | |
index index.html index.php; |
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
ext.postBuildExtras = { | |
dependencies { | |
// Multidex lib for Android v4 | |
compile 'com.android.support:multidex:1.0.3' | |
} | |
android { | |
dexOptions { | |
jumboMode 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
<?php | |
$kra_regex = "/^[A]{1}[0-9]{9}[a-zA-Z]{1}$/"; | |
$kra_pin = "A001234567J"; | |
if(preg_match($kra_regex, $kra_pin)){ | |
echo "Success! Valid KRA PIN"; | |
} | |
else{ | |
echo "Error! Invalid KRA PIN"; | |
} |
OlderNewer