This file contains hidden or 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 count=30; | |
| var counter=setInterval(timer, 1000); //1000 will run it every 1 second | |
| function timer() | |
| { | |
| count=count-1; | |
| if (count <= 0) | |
| { | |
| clearInterval(counter); |
This file contains hidden or 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 DocxConversion{ | |
| private $filename; | |
| public function __construct($filePath) { | |
| $this->filename = $filePath; | |
| } | |
| private function read_doc() { | |
| $fileHandle = fopen($this->filename, "r"); | |
| $line = @fread($fileHandle, filesize($this->filename)); |
This file contains hidden or 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 palindrome(str) { | |
| var punct = str.replace(/[.,-\/#!$%\^&\*;:{}=\-_`~()]/g, "").split(' ').join('').toLowerCase(); | |
| var string = punct.split('').reverse().join('').replace(/[.,-\/#!$%\^&\*;:{}=\-_`~()]/g, ""); | |
| if (punct == string) { | |
| return true; | |
| } | |
| else { | |
| return false; | |
| } | |
| } |
NewerOlder