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
# Compiled source (source: http://goo.gl/hVcp7b) # | |
################################################## | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Simple HTML Template</title> | |
</head> | |
<body> | |
<div>Content here..</div> | |
</body> | |
</html> |
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
/** | |
* make_slug | |
* @author @AmrMekkawy | |
* | |
* based on http://goo.gl/7WULfc & http://goo.gl/P6j345 | |
* and modified by @AmrMekkawy to be used with Arabic language | |
*/ | |
if (!function_exists("make_slug")) { | |
function make_slug($string = null, $separator = "-") { | |
if (is_null($string)) { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title></title> | |
<!-- Bootstrap core CSS --> |
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
<select name=""> | |
<option value='UTC' selected='selected'>توقيت جرينيتش</option> | |
<optgroup label='آسيا'> | |
<option value='Asia/Hebron'>Hebron</option> | |
<option value='Asia/Kathmandu'>Kathmandu</option> | |
<option value='Asia/Khandyga'>Khandyga</option> | |
<option value='Asia/Novokuznetsk'>Novokuznetsk</option> | |
<option value='Asia/Ust-Nera'>Ust-Nera</option> | |
<option value='Asia/Ashgabat'>أشكبات</option> | |
<option value='Asia/Aqtau'>أكتو</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
/** | |
* returns a specific number of words | |
* | |
* @param string $string the whole string | |
* @param integer $num_words number of words to return from the whole string | |
* @return string returned string | |
*/ | |
if (!function_exists("brief_text")) { | |
function brief_text($string, $num_words = 50) { | |
$string = trim(preg_replace('/\s+/', ' ', $string)); |
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
### Selecting Data ### | |
###################### | |
// Runs the selection query and returns the result. Can be used by itself to retrieve all records from a table: | |
$query = $this->db->get("table_name"); // Produces: SELECT * FROM table_name | |
$result = $query->result(); // result(): returns the query result as an array of objects, or an empty array on failure | |
$query = $this->db->get("table_name", $limit, $offset); | |
$query = $this->db->get("table_name", 10, 20); // Produces: SELECT * FROM table_name LIMIT 20, 10 |
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
/** | |
* Remove "kasheda" character from Arabic text | |
* | |
* @author @AmrMekkawy | |
* @param string $text arabic text with (kasheda) character | |
* @return string arabic text without the (kasheda) character | |
*/ | |
function remove_kasheda($text = '') | |
{ | |
$text_without_kasheda = str_replace('ـ', '', $text); |
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
x = sumAll(1, 123, 500, 115, 44, 88); | |
function sumAll() { | |
var i, sum = 0; | |
for (i = 0; i < arguments.length; i++) { | |
sum += arguments[i]; | |
} | |
return sum; | |
} |
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 arabic_date_format($timestamp) | |
{ | |
$periods = array( | |
"second" => "ثانية", | |
"seconds" => "ثواني", | |
"minute" => "دقيقة", | |
"minutes" => "دقائق", | |
"hour" => "ساعة", |
OlderNewer