Content :
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 | |
$countries = array( | |
array('name' => 'Afghanistan','iso_alpha2' => 'AF','iso_alpha3' => 'AFG','iso_numeric' => '4','calling_code' => '93','currency_code' => 'AFN','currency_name' => 'Afghani','currency_symbol' => '؋'), | |
array('name' => 'Albania','iso_alpha2' => 'AL','iso_alpha3' => 'ALB','iso_numeric' => '8','calling_code' => '355','currency_code' => 'ALL','currency_name' => 'Lek','currency_symbol' => 'Lek'), | |
array('name' => 'Algeria','iso_alpha2' => 'DZ','iso_alpha3' => 'DZA','iso_numeric' => '12','calling_code' => '213','currency_code' => 'DZD','currency_name' => 'Dinar','currency_symbol' => ''), | |
array('name' => 'American Samoa','iso_alpha2' => 'AS','iso_alpha3' => 'ASM','iso_numeric' => '16','calling_code' => '1684','currency_code' => 'USD','currency_name' => 'Dollar','currency_symbol' => '$'), | |
array('name' => 'Andorra','iso_alpha2' => 'AD','iso_alpha3' => 'AND','iso_numeric' => '20','calling_code' => '376','currency_code' => 'EUR','currency_name' => 'Euro','currency_symbol' => '€'), | |
array |
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
export default class MyWeb extends Component { | |
mainUrl = "https://facebook.github.io/"; | |
state = { | |
url: this.mainUrl, | |
}; | |
render() { | |
return [ | |
<WebView | |
key="comp1" |
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
# post a message to discord api via a bot | |
# bot must be added to the server and have write access to the channel | |
# you may need to connect with a websocket the first time you run the bot | |
# use a library like discord.py to do so | |
import requests | |
import json | |
channelID = "your_id_goes_here" # enable dev mode on discord, right-click on the channel, copy ID | |
botToken = "your_token_here" # get from the bot page. must be a bot, not a discord app |
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
/* | |
* Smooth Scroll on Pageload | |
* Smooth scrolling on page load if URL have a hash | |
* Author: Franco Moya - @iamravenous | |
*/ | |
if (window.location.hash) { | |
var hash = window.location.hash; | |
if ($(hash).length) { |
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
<!-- Country List in Arabic | source: https://github.com/umpirsky/country-list -- > | |
<select name="country"> | |
<option value="AW">آروبا</option> | |
<option value="AZ">أذربيجان</option> | |
<option value="AM">أرمينيا</option> | |
<option value="ES">أسبانيا</option> | |
<option value="AU">أستراليا</option> | |
<option value="AF">أفغانستان</option> | |
<option value="AL">ألبانيا</option> | |
<option value="DE">ألمانيا</option> |
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
<VirtualHost *:80> | |
# The ServerName directive sets the request scheme, hostname and port that | |
# the server uses to identify itself. This is used when creating | |
# redirection URLs. In the context of virtual hosts, the ServerName | |
# specifies what hostname must appear in the request's Host: header to | |
# match this virtual host. For the default virtual host (this file) this | |
# value is not decisive as it is used as a last resort host regardless. | |
# However, you must set it for any further virtual host explicitly. | |
#ServerName www.example.com |
السلام عليكم ، هذا كود ريجيكس بسيط للتحقق من صحة أرقام الجوالات السعودية ، يقوم الريجيكس بالتحقق من مفتاح الدولة ، مفتاح شركة الإتصالات لضمان صحة النص المدخل .
Hello, this is a simple regex to validate saudi mobile numbers, the code will validate country code, telecome company code and make sure the tested sting is correct .
/^(009665|9665|\+9665|05|5)(5|0|3|6|4|9|1|8|7)([0-9]{7})$/
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 | |
$countryArray = array( | |
'AD'=>array('name'=>'ANDORRA','code'=>'376'), | |
'AE'=>array('name'=>'UNITED ARAB EMIRATES','code'=>'971'), | |
'AF'=>array('name'=>'AFGHANISTAN','code'=>'93'), | |
'AG'=>array('name'=>'ANTIGUA AND BARBUDA','code'=>'1268'), | |
'AI'=>array('name'=>'ANGUILLA','code'=>'1264'), | |
'AL'=>array('name'=>'ALBANIA','code'=>'355'), | |
'AM'=>array('name'=>'ARMENIA','code'=>'374'), | |
'AN'=>array('name'=>'NETHERLANDS ANTILLES','code'=>'599'), |
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 | |
// Does string contain letters? | |
function _s_has_letters( $string ) { | |
return preg_match( '/[a-zA-Z]/', $string ); | |
} | |
// Does string contain numbers? | |
function _s_has_numbers( $string ) { | |
return preg_match( '/\d/', $string ); |
NewerOlder