Skip to main content


Fix For Toshiba Satellite "RTC Battery is Low" Error (with Pictures)

RTC Battery is Low Error on a Toshiba Satellite laptop "RTC Battery is Low..." An error message flashing while you try to boot your laptop is enough to panic many people. But worry not! "RTC Battery" stands for Real-Time Clock battery which almost all laptops and PCs have on their motherboard to power the clock and sometimes to also keep the CMOS settings from getting erased while the system is switched off.  It is not uncommon for these batteries to last for years before requiring a replacement as the clock consumes very less power. And contrary to what some people tell you - they are not rechargeable or getting charged while your computer or laptop is running. In this article, we'll learn everything about RTC batteries and how to fix the error on your Toshiba Satellite laptop. What is an RTC Battery? RTC or CMOS batteries are small coin-shaped lithium batteries with a 3-volts output. Most laptops use
Recent posts

How to Change CSS with JavaScript

HTML and CSS are the base on which all websites in the WWW have been made since the inception of the Internet. Even JavaScript has been around for decades but with the advancement in technology and refinement of User-Interface designs, it has become all the more important for the modern Web2.0 websites that have a tight and seamless server-side and client-side interaction. In today's article, we'll be learning about using JavaScript to change the CSS properties of HTML elements. There are many ways to change the styling of an element using JavaScript and depending on certain things, which we'll get to later, you might want to use one method over the other. See this article for more CSS tips and tricks. Let's get started! How to Get the Element from the DOM? There are many ways to get the element we' re trying to change the CSS or styling properties of in JavaScript like document.getElementById() , document.getElementsByClassName() and document.querySelector() . Fo

CSS Tips and Tricks on How to Get Common Things Done

CSS stands for Cascading Style Sheet and is the styling part of HTML (though not just limited to HTML). It is the primary part of modern WWW alongside HTML and JavaScript. CSS is designed to separate the presentation or the appearance part of a web page so that there is more control and flexibility, and less repetition owing to the fact that the same CSS file can be shared across all or many of the pages of a website. You can make changes just once and it will reflect in all the pages as modern websites use a certain style for most if not all the pages. In this article we are going to learn how to make certain styling with CSS in an HTML page . See this article for ways to change CSS with JavaScript. How to Center an Image HTML <img src="" class="center-img" /> CSS .center-img { display: block; margin: 0 auto; } Please note that the image needs to be smaller in width to be centered. You can also change the width by

C++ Hello World Program: Example Code with Detailed Explanation

C++ Hello World Program Output C++ is one of the most popular and powerful programming languages in the world. In this short article, we are going to go back to the basics and take a look at the simplest of the C++ program - the "Hello World" program which prints "Hello World!" to the screen. While you can set up a C++ environment very easily using one of the IDEs (including free ones such as CodeBlock  or Eclipse ), we'll be using a free online C++ compiler (or runner) for the sake of keeping things very simple and straightforward. C++ Hello World Program Code #include <iostream>   int main ( ) { // Comment std :: cout << "Hello World!" ; return 0 ; } Line-by-line Explanation C++ is a vast and very flexible language and a lot of functionality is offered by different libraries which we can include at the start of the program depending on what we need to do. Anything starting with a pound sign # is called a preprocessor

Pong Game in HTML & JavaScript (Updated)

HTML Pong Game Gameplay Pong is one of the first games that many people from the 80s or 90s had played as children. Lots of people know it as a simple arcade game but what they probably do not know is that this simple game helped establish the video game industry! In this post, we'll be making our version of a very simple but fully working Pong game in HTML, CSS and JavaScript. Basic Game Structure Games, however simple or complex they may be, follow the basic Game Loop design as shown in the chart below. Event-oriented game engines usually encapsulate the design and provide you with an event mechanism for handling various parts like the input, update, and rendering but internally the basic design is being followed. Pong Game Loop For our Game Loop, we'll be using JavaScript setInterval so that the game code remains asynchronous and separate. As you may have guessed a while (or any other loop) will freeze the page. For our input, we'll be using onmousemove event to update t

How to Link to a Specific Part of a Page Using Anchors Links in HTML

Anchor Links are links that link to a specific part of a page. These are useful when you want the user to easily skim-read through a page or when the page is long, or both. Wikipedia, like many other websites, uses anchor links as you can see in the following video: You need two HTML elements for Linking to a specific part of the page - the link itself and the page section marked by what we call a named anchor. Anchor Link We create the hyperlink using the HTML   <a> tag with the href attribute linking containing #anchor-name . The # tells the browser that this is an anchor link <a href="#anchor-name">Anchor Link</a> Page Section Anchor We can mark any part of the page by providing id attribute to any of the elements. Usually, we create anchor links to headings as they section the page into various parts but you can create named anchors for any elements. <h2 id="anchor-name">Heading</h2> Do remember id by definition have to be uniq

How to Fetch Data from MySQL Database in PHP and Display in Table

This is going to be the second part of the tutorial on how to save and retrieve data from a MySQL database in PHP. In the last post, we learned how to create an HTML form and link in with a database in PHP . In this tutorial, we will learn how to fetch the saved information from the database and display it in a nice HTML table. MySQL Table The database backend (MySQL table) is the common part that this tutorial will share with the last one. If you recall, the database phonebook consisted of just one table table1  which contained the following fields or columns: id, fname, lname, phonenumber, email . PHP Script (show.php) The following code retrieves the data and shows it in a table, the code with the comments is pretty self-explanatory: <?php define ( 'DB' ,  'phonebook' ); define ( 'DB_HOST' ,  'localhost' ); define ( 'DB_USER' ,  'db_user' ); define ( 'DB_PASS' ,  'db_pass' ); define ( 'DB_TABLE' ,  '

How to Remove Bullet Points in CSS

This will be a short guide on how to remove bullet points from ordered/unordered lists with CSS, you only need two lines of CSS for this. The first removes the actual bullet points and the second one removes the space to the left, as evident from the following video: We'll also be doing some bullet beautification in the last section if that's what you are looking to do. How to Remove Bullet Points in HTML/CSS Now that we know what CSS properties actually accomplish what we want let's see how we can implement this in our HTML code. Using Inline "style" Tag (The quick and dirty way) As the title suggests, this is the quickest way to remove bullet points in which you wouldn't have to edit any CSS files (for example, for Blogger or WordPress). This method would be useful for a one-off case - just add the following " style " attribute to the list you want to remove the bullet points from: <h1>Ordered List</h1> <ol  style="list-styl

The Best Way(s) to Comment out PHP/HTML Code

PHP supports various styles of comments. Please check the following example: <?php // Single line comment code (); # Single line Comment code2 (); /* Multi Line comment code(); The code inside doesn't run */ // /* This doesn NOT start a multi-line comment block /* Multi line comment block The following line still ends the multi-line comment block //*/ The " # " comment style, though, is rarely used. Do note, in the example, that anything (even a multi-block comment /* ) after a " // " or " # " is a comment, and /* */ around any single-line comment overrides it. This information will come in handy when we learn about some neat tricks next. Comment out PHP Code Blocks Check the following code <?php //* Toggle line if ( 1 ) {      // } else {      // } //*/ //* Toggle line if ( 2 ) {      // } else {      // } //*/ Now see how easy it is to toggle a part of PHP code by just removing or adding a single " / " from th

How to Create an HTML Form Linked with MySQL Database in PHP

If you're looking for example code and detailed discussion on how to create an HTML form that stores data in a MySQL database using PHP then this post might be what you're looking for. I assume that you're familiar with basic HTML, CSS, PHP coding, and  MySQL. I am going to divide this small project into two parts: The HTML form itself that takes input from the user and the PHP script that saves it into the database A table that displays the user-added data that has been saved in the database. We'll be dealing with the first part in this tutorial. Again I'd like to break this problem into a few parts so that it's easier for you to understand and probably gives you an insight into how breaking up a problem into smaller chunks can help make things clearer in your mind. Let's think about it, there is an HTML form (that is HTML code), then there is the PHP code that deals with the user-input data, and the MySQL database itself. For this tutorial, we'll b