Question: Using Java, write a program to calculate available credit. The program must prompt the user for their credit limit and the amount owing. Based on the user input, print the available credit limit.
Category Archives: Computer Science
Computer Science (CS) and Information Technology (IT) related items will be posted under this category. Topics include, but not limited to, system administration, hardware/software troubleshooting, coding/programming (PHP, HTML, Java, Python, etc) and more.
How to replace WPTouch search with Google Site Search
The Google Programmable Search Engine (Google Custom Search Engine/Google Site Search) when used with Google Webmaster Console is a very powerful tool for all website owners and developers. It enhances the search experience for your users. WordPress and other Content Management System (CMS) platforms are not natively designed to integrate this search feature by default. You can add them either by manually or by using extensions or plugins. WPTouch is a mobile theme plugin for WordPress CMS. There are two versions of WPTouch; free and pro (premium). The following guide explains how you can replace the default WPTouch search with Google Programmable Search Engine.
Continue reading How to replace WPTouch search with Google Site Search
Increase Security Using .htaccess
The .htaccess is a very useful file in web servers such as Apache HTTP Server. It can be used to change the behavior of the web server. I have written few other articles on how you can use the .htaccess to modify different aspects of your website. We can also use it to increase the security.
Force SSL/TLS (HTTPS) with .htaccess
Google has announced that implementation of TLS (SSL) certificates benefit the web site owners and can boost SEO ranking of your website. Secure Sockets Layer (SSL) is the predecessor to Transport Layer Security (TLS). It is a misnomer that people call SSL and TLS are interchangeable. Simply put, as a website owner, what you should care about is that your website requests are served in HTTPS (port 443) rather than HTTP (port 80) with a valid certificate.
Redirect Domain to Include or Exclude www
This guide is based on the .htaccess file which is a directory-level configuration file supported by several web servers such as Apache web server. It is used for configuration of website resources such as URL redirection, URL shortening, access control, and more. The ‘dot’ before the file name makes it a hidden file in Unix-based environments. You can read more about this file at Wikipedia.
Using the .htaccess file in the main domain directory, you can either redirect all requests to sanuja.com or www.sanuja.com. This type of redirection is known as a HTTP 301 redirect.