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
=begin | |
author Eftakhairul Islam <eftakhairul@gmail.com> | |
website http://eftakhairul.com | |
=end | |
#My First Program at Ruby. | |
puts 'Hello World' | |
puts ("I'm here") |
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 map; | |
var saveLat = 0; | |
var saveLng = 0; | |
var lat = 23.71003142406148; | |
var lon = 90.407231156616290; | |
var image = "<?php echo site_url('assets/images/pirates.png')?>"; | |
if (!navigator.geolocation) { | |
alert('Get a better browser'); | |
} |
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 | |
$json = 'YOUR JOSN HERE'; | |
$patterns = json_decode($json); | |
$patternObjects = array(); | |
foreach ($patterns->patterns as $pattern) { | |
$patternObj = new Pattern(); | |
$patternObjects[] = mapJsonToObject($patternObj, $pattern); | |
} |
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
# | |
# The default server | |
# | |
server { | |
listen 80; | |
server_name _; | |
#charset koi8-r; | |
#access_log logs/host.access.log main; |
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
server { | |
listen 80; | |
server_name www.example.com example.com; | |
#access_log /usr/share/nginx/html/example/logs/access.log; | |
#error_log /usr/share/nginx/html/example/logs/error.log; | |
location / { | |
root /usr/share/nginx/html/example; | |
index index.html index.htm 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
class Debug | |
{ | |
private $debug = true; | |
private $start_time = 0; | |
/** | |
* prints debug message | |
* @param type $message | |
*/ |
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 is the custom extractvalue function for doctrine. | |
* | |
* www.eftakhairul.com | |
*/ | |
use Doctrine\ORM\Query\Lexer; | |
use Doctrine\ORM\Query\AST\Functions\FunctionNode; |
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
SAVEPOINT INSERT_DOCUMENT_DATE; | |
BEGIN | |
FOR i in (SELECT document_id | |
FROM document_date | |
WHERE type_id = 5 AND document_id not in (SELECT document_id FROM document_date where type_id = 6) AND day < TO_DATE(CURRENT_DATE, 'DD-MON-RR')) LOOP | |
INSERT INTO document_date(ID,DOCUMENT_ID,type_id,day) VALUES(DOCUMENT_DATE_ID_SEQ.nextval, i.document_id, 6, TO_DATE(CURRENT_DATE, 'DD-MON-RR')); | |
END LOOP; | |
END; | |
/ |
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
INSERT INTO SENDABLE_DOCUMENT (DOCUMENT_ID) | |
SELECT p1.ID FROM ( | |
SELECT p2.document_id AS ID, ROWNUM AS ID_ROWNUM FROM ( | |
SELECT document_id FROM document_date | |
INNER JOIN SYNDICATED_DOCUMENT sd ON document_date.document_id = sd.ID | |
WHERE type_id = :published and document_id not in (SELECT document_id FROM document_date where type_id = :sent) | |
) p2 WHERE ROWNUM <= :maxRow | |
) p1 WHERE ID_ROWNUM >= :minRow |
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
#Static initialization | |
All static initialization get call first before main method and contractor. | |
#constructor | |
If a sub class extends from parents class, then if you create the instance of Subclass, automatically parents constructor will get called. | |
#Protected Modifier | |
he protected modifier specifies that the member can only be accessed within its own package (as with package-private) and, in addition, by a subclass of its class in another package. | |
#final |
OlderNewer