Profile cover photo
Profile photo
Ankit garg
169 followers
169 followers
About
Posts

Post has attachment
Add a comment...

Post has attachment
Remove Bitnami Info Page for AWS Cloud
Command for removing  sudo /opt/bitnami/apps/APPNAME/bnconfig -disable_banner 1 AppName: your application name (wordpress, joomla, oodeo) Restart the web server If apache sudo /opt/bitnami/ctlscript.sh restart apache In nginx sudo /opt/bitnami/ctlscript.s...
Add a comment...

Post has attachment
Add a comment...

Post has attachment
format numbers with 00 prefixes in php?
Prob:-  Is there any function to have numbers with 5 digit as  00001, or  00123…  this number should be not random but have to increase the value of a previous field. Ans:- $n2 = str_pad($n + 1, 5, 0, STR_PAD_LEFT); Use str_pad() by adding 0s (third paramet...
Add a comment...

Post has attachment
Only number will taken in text box using javascript
if you want only number will be taken in the text box. so we will use this formet for javascript. $(document).on('keyup','.numbersOnly', function() {      this.value = this.value.replace(/[^0-9\.]/g,''); });
Add a comment...

Post has attachment
How to get the taxonomy values of a custom post type
If we want to fetch the taxonomy term of a specific post then we could do that. $terms = get_the_terms( $post->ID, 'publication_category' ); if ($terms) {     foreach($terms as $term) {       echo $term->name;     } } in this function  $post->ID :- Your pos...
Add a comment...

Post has attachment
html 5 password validation
<input id = "password" name = "password" type = "password" pattern = "^\S{6,}$" onchange = " this . setCustomValidity ( this . validity . patternMismatch ? 'Must have at least 6 characters' : '' ); if ( this . checkValidity ()) form . password_two . pattern...
Add a comment...

Post has attachment
How can you check for a #hash in a URL using JavaScript?
if we are using ajax and on the response we want to know the url has # or not. so by this code we can find it it have the # on the url or not. Method 1:- if ( window . location . hash ) { // Fragment exists } else { // Fragment doesn't exist } Method 2:- if...
Add a comment...

Post has attachment
Get spreedsheet from the google doc in php
Github Url:- https://github.com/ankitgarg306/googledrive <?php require_once _DIR_ . '/vendor/autoload.php'; define('APPLICATION_NAME', 'Google Sheets API PHP Quickstart'); define('CREDENTIALS_PATH', '~/.credentials/sheets.googleapis.com-php-quickstart.jso...
Add a comment...

Post has attachment
Get Current User Role in Sugar CRM
global $current_user; include_once(‘modules/ACLRoles/ ACLRole.php ’); $roles = getUserRoleNames($current_user->id); print_r($roles);
Add a comment...
Wait while more posts are being loaded