Home » Programming

How To Clean Up Unnecessary Code From WordPress Header Without Plugins

Published on 28-Oct-2021 9:42:13
How To Clean Up Unnecessary Code From WordPress Header Without Plugins How To Remove Weblog Client Link Example: <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.example.com/xmlrpc.php?rsd" /> To remove the EditURI/RSD link from WordPress header, paste the below code into your theme’s function.php. remove_action ('wp_head', 'rsd_link'); How To Remove Windows Live Writer Manifest Link Example: ... Read More

How to redirect HTTP to HTTPS Using htaccess

Published on 14-Oct-2021 13:50:16
Chrome and Firefox have started showing insecure warnings on sites without SSL certificates. Without SSL, your website will show insecure to the visitors. Therefore, using an SSL-encrypted connection for safety, accessibility or PCI compliance reasons is necessary. It becomes very important to redirect from HTTP to HTTPS. What is SSL? SSL (Secure Sockets Layer) is a standard security protocol for establishing encrypted links between a web s... Read More

How to make a chain of function decorators in Python?

Published on 03-Oct-2021 13:33:57
Decorators are “wrappers”, which allow us to execute code before and after the function they decorate without modifying the function itself. Example The given code can be wrapped in a chain of decorators as follows. def makebold(fn): def wrapped(): return "" + fn() + "" return wrapped def makeitalic(fn): def wrapped(): return "" + fn() + "" return wrapped @makebold @makeitalic def hello(): return "hello world" pr... Read More

What are Python function attributes?

Published on 03-Oct-2021 13:29:18
Everything in Python is an object, and almost everything has attributes and methods. In python, functions too are objects. So they have attributes like other objects. All functions have a built-in attribute __doc__, which returns the doc string defined in the function source code. We can also assign new attributes to them, as well as retrieve the values of those attributes. For handling attributes, Python provides us with “getattr” and “... Read More

Top 50 Programming Interview Questions & Answers (2021)

Published on 27-Sep-2021 15:34:46
1) What is Computer programming? Computer Programming is also known as programming or coding. Programming is a process which includes processes such as coding, maintaining, updating, debugging, writing, designing (algorithm), etc. 2) How does programming work? Programming contains a set of instructions for the computer to perform different tasks. In fact, those instructions are executable commands, each having a different purpose. 3) ... Read More