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
| #include <stdio.h> | |
| #include <stdbool.h> | |
| bool isPalindrome(int n) | |
| { | |
| if (n < 0) { | |
| return false; | |
| } | |
| int original = n; |
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
| /* | |
| ============================================================================ | |
| Program Name : Palindrome Number Checker | |
| Filename : check-palindrome-v0.c | |
| Description : This program checks whether a given integer is a palindrome. | |
| A palindrome number reads the same forwards and backwards. | |
| Example: 121, 1331, 7. | |
| Approach : The number is reversed using arithmetic operations | |
| (modulus and division). The reversed value is then |
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
| /** | |
| * @file palindrome.c | |
| * @brief Palindrome number checker using arithmetic digit reversal. | |
| * | |
| * This program checks whether a given integer is a palindrome. | |
| * A palindrome number reads the same forwards and backwards | |
| * (e.g., 121, 1331, 7). | |
| * | |
| * @details | |
| * The algorithm reverses the digits of the input number using |
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
| <!-- paste the entire code where you would be using your search box --> | |
| <script type="text/javascript"> | |
| (function() { | |
| // Get your API Key at expertrec.com by creating a free account. | |
| var id = 'your_api_key'; | |
| var ci_search = document.createElement('script'); | |
| ci_search.type = 'text/javascript'; | |
| ci_search.async = true; | |
| ci_search.src = 'https://cse.expertrec.com/api/js/ci_common.js?id=' + id; |
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
| for /f "usebackq" %%d in (`"dir /ad/b/s | sort /R"`) do rd "%%d" |
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
| @ECHO OFF | |
| REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| REM | |
| REM FILENAME : DOSMODE.BAT | |
| REM | |
| REM DESCRIPTION : Change console mode to display as in old DOS Mode | |
| REM | |
| REM AUTHOR : Napoleon Arouldas S. (princeofcode@gmail.com) | |
| REM | |
| REM WEB : http://neps.in |
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
| <?php | |
| //Even words can be use as delimiters in php explode function. | |
| $s = 'Napoleon and Arouldas'; | |
| $s_pieces = explode('and', $s); | |
| $rating = $s_pieces[0]; | |
| $review_count = $s_pieces[1]; |
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
| -- Mysql commandline option to change the baseurl or siteur or home url of a wordpress website | |
| -- This option will be handy, when you are not able to loging to admin panel of wordpress website. | |
| update wp_options set option_value='http://newwebsite.com' where option_name = 'siteurl'; | |
| update wp_options set option_value='http://newwebsite.com' where option_name = 'home'; |
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
| /* Courtesy : https://dev.to/gajus/my-favorite-css-hack-32g3 */ | |
| * { background-color: rgba(255,0,0,.2); } | |
| * * { background-color: rgba(0,255,0,.2); } | |
| * * * { background-color: rgba(0,0,255,.2); } | |
| * * * * { background-color: rgba(255,0,255,.2); } | |
| * * * * * { background-color: rgba(0,255,255,.2); } | |
| * * * * * * { background-color: rgba(255,255,0,.2); } |
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
| // This snippet will get the width, height of the viewport everytime you resize the browser window. | |
| // The weight, height will be displayed on console window. | |
| $(document).ready(function(){ | |
| var viewportWidth = $(window).width(); | |
| var viewportHeight = $(window).height(); | |
| console.info('Viewport W = ' + viewportWidth); | |
| console.info('Viewport H = ' + viewportHeight); |
NewerOlder