Category: Web Development
Wordprerss | Upload SVG or other files in Media Library
In WordPress, by default svg type of files are not permitted to upload. So in order to upload the SVG files to WordPress media library, we will need to add following code to child theme’s functions.php file: //To allow svg
Asp.NET | Adding New table Mapping to .edmx file manually
Asp.NET: Adding New table Mapping to Existing entity framework Designer .edmx manually from Xml View As we know that .edmx designer entity framework mapping is generated either from ‘Database First Approach’ or from ‘Model First Approach’ (in case ‘Code First
Jquery | Display progress circle according to percentage
Display Progress Circle according to Percentage on Web page Sometimes, the requirement arises to display progress circle with the percentage value. For example : 1. Various social networking or professional websites depict the percentage of user profile completed with a
Assure vs Ensure vs Insure
In insurance which one is the right word when it comes to Assure vs Insure? When you want to make something certain which one do you pick from Assure vs Ensure? It can get confusing, right? Here’s some help in this
Postgres | Function to remove HTML tags from text
Problem : How to create a function in Postgres that will remove HTML tags from a piece of text? Solution : Create function in postgres : CREATE OR REPLACE FUNCTION strip_tags(TEXT) RETURNS TEXT AS $$ SELECT regexp_replace($1, ‘<[^>]*>’, ”, ‘g’)
Javascript | How to lighten a color by some percentage
We can lighten any color using a custom javascript function: function shadeColor(color, percent) { var R = parseInt(color.substring(1,3),16); var G = parseInt(color.substring(3,5),16); var B = parseInt(color.substring(5,7),16); R = parseInt(R * (100 + percent) / 100); G = parseInt(G * (100
Allow WordPress to Duplicate Page or Post
In WordPress, sometimes a situation occurs when we need to recreate a page with very similar content or design of another page. Then instead of recreating a page from scratch we can duplicate or clone a page and can modify
Captivate | Remove strange captivate icon from text
We had faced an issue of captivate icon displaying in quiz question while viewing it in browser : We can resolve this issue by using these two alternative methods : 1. First way is if we give equivalent space around
WordPress | Using PHP Session
Many times it may happen that you create session variables in a particular code of the WordPress site and you are not able to access that session variable in any other part of the site except in your custom code.
