Author: Shiva Charan Devabhaktuni

  • Android apps using Apache Cordova

    Making native Android apps requires some basic knowledge of Java and it takes some time to learn. But you can use your HTML 5, CSS3,
    and Js knowledge to make native Android apps using Apache Cordova, an open source initiative from Apache, Mozilla and Adobe.

    Using Apache Cordova, you can access the Android APIs to access native device capabilities such as the camera, accelerometer, NFC beam, Bluetooth from JavaScript. Apache Cordova has a great Js library which is easy to implement in the apps.

    Making your First app with Apache Cordova

    To start developing apps for Android using Apache Cordova, you need to go through the list of requirements :

    • Latest version of Java RE
    • Latest version of JDK
    • Android Studio
    • Latest Cordova SDK

    Installing up Android Studio

    Download the latest version of Android Studio from Android Developer site. Android Studio is available for different operating systems like Linux, Mac OSX and Windows. The setup file has all the dependents like Android SDK, emulator, Device Bridge. Install the Android Studio setup and Android Studio is ready to use.

    Installing Cordova SDK

    Now download the latest Cordova SDK from the Apache site. Extract the downloaded file and we will use it later.

    Creating the project in Android Studio

    Follow these steps to create a project in Android Studio

      • Open the Android Studio
      • Select New Project
    • Enter the required name of the project
    • Select the required icon from the explorer
    • Select Blank activity
    • Select Finish
    • A blank project is created.

    Configuring Project to Cordova

    • Now create two blank folders assets/www and libs inside the Andorid project directory
    • Go to the downloaded Cordova folder
    • Now copy the corodova-”version”.jar file to libs folder in Android project folder
    • Copy the corodova-”version”.js file to assets/www folder in Android project folder
    • Next, create a file named index.html in the assets/www. This file will be used as the main entry point for your Cordova application’s interface.
    • In index.html, add the following HTML code to act as a main part for your app content
    <!DOCTYPE HTML>
    <html>
     <head>
      <title>Cordova</title>
      <script type="text/javascript" charset="utf-8" src="cordova-2.7.0.js"></script>
     </head>
     <body>
        <h1>Hello World!</h1>
     </body>
    </html>

    Hello World!

    •  You need to add the Cordova.jar file as library file.
    • Go to libs file in Android Studio, right click the Cordova.jar file and select Add as library.

    Update the activity class

    Now you are ready to update the Android project to start using Cordova

    • Open your main application Activity file. This file will have the same name as your project, followed by the word “Activity”. It will be located under the src folder in the project package that you specified earlier in this process.
    • In the main Activity class, add an import statement for org.apache.cordova.MyApplication
    import org.apache.cordova.MyApplication;
    •  Change the base class from Activity to MyApplication ; this is in the class definition following the word extends :
    public class HelloGapActivity extends MyApplication {
    •  Replace the call to setContentView() with a reference to load the Cordova interface from the local assets/www/index.html file, which you created earlier
    super.loadUrl("file:///android_asset/www/index.html");

    Configure the project metainfo

    • Begin by opening the AndroidManifest.xml file in your project root. Use the Notepad++ text editor by right-clicking the AndroidManifest.xml file and selecting Open With > Text Editor
    • In AndroidManifest.xml, add the following supports-screen XML node as a child of the root manifest node:
    <supports-screens
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true"
        android:resizeable="true"
        android:anyDensity="true"
        />
    •  The supports-screen XML node identifies the screen sizes that are supported by your application. You can change screen and form factor support by altering the contents of this entry.
    • Copy the following <uses-permission> XML nodes and paste them as children of the root <manifest> node in the AndroidManifest.xml file:
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.RECEIVE_SMS" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.WRITE_CONTACTS" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.BROADCAST_STICKY" />

    The <uses-permission> XML values identify the features that you want to be enabled for your application. The lines above enable all permissions required for all features of Cordova to function. After you have built your application, you may want to remove any permissions that you are not actually using; this will remove security warnings during application installation.

    After you have configured application permissions, you need to modify the existing <activity> node.

    • Locate the <activity> node, which is a child of the <application> XML node. Add the following attribute to the <activity> node:
    android:configChanges="orientation|keyboardHidden"
    •  Next, you need to create a second <activity> node for the org.apache.cordova.MyApplication class. Add the following <activity> node as a sibling of the existing <activity> XML node:
    <activity 
        android:name="org.apache.cordova.MyApplication" 
        android:label="@string/app_name" 
        android:configChanges="orientation|keyboardHidden"> 
        <intent-filter></intent-filter> 
    </activity>

    Now the project is ready to build your first Android app.

    Running the application

    To launch your Cordova application in the emulator, right-click the project configuration, and select Run As > Android Application.

    If you don’t have any Android virtual devices set up, you will be need to configure it.

    Andorid Studio will have preinstalled emulator configuration so there will hardly be any program.

    Download the source code of the above tutorial at github.com/saivarunk/example

  • Migrate from MySQL to MySQLi & vice versa

    There have been many questions on how to migrate from MySQL to MySQLi. Well adding the letter i to mysql wouldn’t solve the problem while you are migrating. There is a change in the method of query. First of all you need to have a basic knowledge of MySQL to follow this post.

    MySQL – Create a Table

    $table = "CREATE TABLE IF NOT EXISTS Users (
    		 		 id int(11) NOT NULL auto_increment,
    				 username varchar(255) NOT NULL
                                                )";
    
    mysql_query($table);

    MySQLi – Create a Table

    $link = mysqli_connect("localhost","username","password", "databasename");
    $table = "CREATE TABLE IF NOT EXISTS Users (
    		 		 id int(11) NOT NULL auto_increment,
    				 username varchar(255) NOT NULL
                                                )";
    $query = mysqli_query($link, $table);

    The same $link has to be passed whenever you are using the MySQLi type mysqli_query()command. For example when you are using commands like INSERT, SELECT,  DELETE,etc you have to pass the $link parameter shown above. The mysqli_query() defaultly expects two parameters to be passed. One is the $link paramter which connects to the database and the other is the query operation.

    In case you do not provide the $link parameter in your query, then you will get an error like this while processing your page:
    mysqli_query() expects at least 2 parameters

    Also read: MySQL vs MySQLi which is better and What’s the difference – Explained!

    Now moving onto other MySQL commands, like mysql_real_escape_string() the change in the MySQLi format can be seen below.

    $demo = mysql_real_escape_string($email1);
    $demo = mysqli_real_escape_string($link, $email1);

    If the $link parameter isn’t passed through the mysqli_real_escape_string() then you will see the following error when you go to your page:
    mysqli_real_escape_string() expects exactly 2 parameters

    the mysql_error() command in MySQL and it’s equivalent in MySQLi can be seen below:

    mysql_error();

     

    mysqli_error($link);

    If you do not pass the $link parameter then you are likely to see the following error:
    mysqli_error() expects exactly 1 parameter, 0 given

    the mysql_num_rows() command in MySQL and it’s equivalent in MySQLi can be seen below:

    $sql = mysql_query("SELECT username FROM Users WHERE username='admin'"); 
    $check = mysql_num_rows($sql);
    $sql = mysqli_query($link, "SELECT username FROM Users WHERE username='admin'"); 
    $check = mysqli_num_rows($sql);

    the mysqli_fetch_array() command in MySQL and it’s equivalent in MySQLi can be seen below:

    $sql = mysql_query("SELECT id, username, firstname, lastname FROM myMembers WHERE id='123' LIMIT 1");
    $row = mysql_fetch_array($sql);
    $sql = mysqli_query($link, "SELECT id, username, firstname, lastname FROM myMembers WHERE id='123' LIMIT 1");
    $row = mysqli_fetch_array($sql);

    So these are the major differences between MySQL and MySQLi commands. Hope you will find it easy to migrate from MySQL to MySQLi using these. The MySQLi commands are all in precedural form instead of Object-Oriented Style. If you have any queries regarding this process then please feel free to reach me through the comment section.

  • MySQL vs MySQLi which is better and What’s the difference – Explained!

    There has been a huge discussion over the internet about using MySQL or MySQLi in their PHP code. Before getting to that part, one must have a basic knowledge of it, so lets get started on it. To start off with, there are three main API options when considering connecting to a MySQL database server. They are,

    • PHP’s MySQL Extension
    • PHP’s mysqli Extension
    • PHP Data Objects (PDO)

    Of course each of them have their own set of advantages and disadvantages.

    What is PHP’s MySQL Extension?

    This is the original extension designed to allow you to develop PHP applications that interact with a MySQL database. The mysql extension provides a procedural interface and is intended for use only with MySQL versions older than 4.1.3. This extension can be used with versions of MySQL 4.1.3 or newer, but not all of the latest MySQL server features will be available.

    If you are using MySQL versions 4.1.3 or later it is strongly recommended that you use the mysqli extension instead.

    In the PHP installation on the remote server or local server, the mysql extension source code is located in the PHP extension directory ext/mysql.

     

    What is PHP’s mysqli Extension?

    The mysqli extension, or as it is sometimes known, the MySQL improved extension, was developed to take advantage of new features found in MySQL systems versions 4.1.3 and newer. The mysqli extension is included with PHP versions 5 and later.

    The mysqli extension has a number of benefits, the key enhancements over the mysql extension being:

    • Object-oriented interface
    • Support for Prepared Statements
    • Support for Multiple Statements
    • Support for Transactions
    • Enhanced debugging capabilities
    • Embedded server support

    If you are using MySQL versions 4.1.3 or later it is strongly recommended that you use this extension.

    Along with the object-oriented interface the extension also provides a procedural interface.

    The mysqli extension is built using the PHP extension framework, its source code is located in the directory ext/mysqli in the PHP installation in the remote server or local server

    I personally use MySQLi extension in my projects as i feel it has future use and it can be used in both Object-Oriented Style and Procedural Style. The official website for PHP itself states reasons for opting the MySQLi extension.

    Read about: Migrate from MySQL to MySQLi & vice versa

    Why MySQLi?

    The mysqli extension allows you to access the functionality provided by MySQL 4.1 and above.

    The persistent connection of the mysqli extension however provides built-in cleanup handling code. The cleanup carried out by mysqli includes:

    • Rollback active transactions
    • Close and drop temporary tables
    • Unlock tables
    • Reset session variables
    • Close prepared statements (always happens with PHP)
    • Close handler
    • Release locks acquired with GET_LOCK()

    This ensures that persistent connections are in a clean state on return from the connection pool, before the client process uses them.

    The mysqli extension does this cleanup by automatically calling the C-API function mysql_change_user().

    The automatic cleanup feature has advantages and disadvantages though. The advantage is that the programmer no longer needs to worry about adding cleanup code, as it is called automatically. However, the disadvantage is that the code could potentially be a little slower, as the code to perform the cleanup needs to run each time a connection is returned from the connection pool.

    It is possible to switch off the automatic cleanup code, by compiling PHP with MYSQLI_NO_CHANGE_USER_ON_PCONNECT defined.

    For more information regarding MySQL, you can visit their official website here.
    If you have any queries regarding this topic then please feel free to reach me through the comment section below.4

  • Learn “How to use Google Effectively” in under 5 minutes!

    Google is the most powerful tool out there for everyone today, but most of the people still don’t know how to use it to the fullest. Few interesting ways to use Google are listed below.

    Search within a particular Site

    To search for results from a particular site all you have to do is follow the following Syntax shown here.
    site:collegestash.com windows 8

    Phone Numbers

    Search for phone numbers in Google using the following Syntax that has the word phonebook followed by a ” : ” and the unknown phone number or to be more specific you can use the other formet also listed below.
    phonebook:555-555-5555
    or
    555-555-5555

    Files

    To search for specific file types all you have to do is, specifying the specific filetype as shown below.
    “Famous Five” filetype:pdf

    Word Definitions

    Google can also be used to get word definitions by using the following Syntax.
    define:cricket

    Weather

    You can know the weather conditions of your current location by just a few keystrokes as shown below.
    weather:hyderabad

    Calculator

    Google can be used effectively as a calculator.  Few examples are given below.
    sin(72)-cos(45)
    and
    175^34

    This HD video will show you the demonstration:

    https://www.youtube.com/watch?v=Wngp8I4HrkU

    If you have any queries regarding this, then please feel free to reach me through the comment section below.

  • TASM 64-Bit (Full screen)

    TASM (Turbo Assembler by Borland) Version 5.0 doesn’t work directly on a 64-bit Windows OS. You will have to install DOS Box on your system and then mount Drive E to work like it does on a 32-bit OS running system. But you still won’t be able to run it in full-screen mode. The file provided here will let you do that in a single step and you can also run it in full screen mode.

     Compatible with the following Windows OSs:

    • Windows 11 Pro 64-bit
    • Windows 10 Pro 64-bit
    • Windows 8 Pro 64-bit
    • Windows 7 64-bit
    • Windows Vista 64-bit
    • Windows XP 64-bit

    Download the setup file and install it, then run the program through the shortcut to start coding.

    Install TASM 5.0 32-bit version

  • Create a robots.txt file for your Site or Blog

    Creating a robots.txt file for your site is very easy, even for beginners. You don’t have to know anything about Search Engine Optimization(S.E.O) to do this. Setting your own robots.txt file lets you communicate with the search engine bots on the Internet that crawl your site for fresh content regularly. This is how my robots.txt file looks like:

    #Created by www.CollegeStash.com do not remove this
    sitemap: http://www.collegestash.com/sitemap.xml
    
    User-agent:  *
    # disallow all files in these directories
    Disallow: /cgi-bin/
    Disallow: /wp-admin/
    Disallow: /wp-content/
    Disallow: /wp-includes/
    Disallow: /recommends/
    Disallow: /go/
    Disallow: /category/
    Disallow: /tag/
    Disallow: /tag/*
    Disallow: /archives/
    Disallow: /comments/feed/
    Disallow: /trackback/
    Disallow: /index.php
    Disallow: /xmlrpc.php
    Disallow: *?wptheme
    Disallow: ?comments=*
    Disallow: /search?
    Disallow: /?p=*
    
    Disallow: /wp-content/plugins/
    
    User-agent: Mediapartners-Google*
    Allow: /
    
    User-agent: Googlebot-Image
    Allow: /wp-content/uploads/
    
    User-agent: Adsbot-Google
    Allow: /
    
    User-agent: Googlebot-Mobile
    Allow: /
    #Created by www.CollegeStash.com do not remove this

    You can copy the text above, paste in your file text file and name it as robots.txt and then upload it to the root directory of your server(The directory where you have index.php or index.html files of your Site). You can also download this file and edit the existing sitemap URL with yours and  upload it directly to your root folder. The robots.txt of anysite is available directly and can be copied but I advice you to do it on your own cause it won’t take much of your time.

    Understanding the commands

    Allow /
    As the name itself suggests, this command allows the bots to crawl the particular sub-directory of your Site if mentioned.

    Disallow:
    /feed

    This command blocks the bots from crawling the “feed” sub-directory of your Site.

    Sitemap: http://www.collegestash.com/sitemap.xml
    This command allows the search engine bots to crawl your site through your sitemap, given explicitly in the command.

    # This is a comment, i.e., the text after this symbol on the same line will not be read by the bot.
    This # symbol is used for single line comments, and any text following it is a comment in the robots.txt file.

     What is a robots.txt file

    The robots.txt file is used to tell the search engines which part of your site they should be crawling and which part they shouldn’t crawl. For privacy and security related issues people would like to exclude few areas of their website or blog from the search engines because they don’t want their private data to be indexed in a popular search engine like Google, so that everyone can access it. The search engines all over the Internet use bots to crawl the web and index new content onto their databases. This robots.txt file is useful in communicating directly with the bots or crawlers of the search engines.

    Advantages of having your own robots.txt file

    It is a good technique in S.E.O. to have a robots.txt file for your site as it helps you in blocking the search engine crawlers where you don’t want to have them. To grab the robots.txt file of any site just use this line in your address bar http://www.sitename.com/robots.txt ( For Example: https://www.facebook.com/robots.txt ).

    If you have any problems regarding this, then please feel free to mention them in the comments section below.

  • Transfer files via WiFi from PC to Android (Wireless): Websharing Lite

    In today’s lesson, we will show you how to easily transfer files between Android and your computer. Best of all, we’ll show you how to transfer the files via WiFi without the hassle of having to look for a USB cable or removing the SD card from your Droid. You can follow along on the lesson via the Video tutorial or scroll down to the bottom for the Step-by-Step instructions.


    There’s a lot of different ways to get files to/from your Android device to your computer. But I’ve been searching for the easiest method possible, so that I could teach users of all levels how to do it in a matter of minutes. Luckily, I was able to find a great app that makes transferring files between Android and your computer extremely simple. The app is WebSharingLite and it allows you to connect your Android device and computer together via the WiFi network in your home and/or office. There is no set up needed, just run the WebSharingLite app and it tells you exactly what to enter into any web browser’s URL bar to get there. You’ll then be able to upload/download whatever files you need. File sharing on Android has never been simpler than this! Take a look at the video tutorial below and let us know if you have any questions!

    Also read: Battery Doctor – A real Battery Saving app

    Step-by-Step Instructions for Websharing Lite

    • Go to the Android Market Store
    • Search for “WebSharingLite” app
    • Install the “WebSharingLite” app by NextApp, Inc.
    • Launch the App and click on the Start button at the bottom left
    • WebSharing will then be activated and you can go to your PC and type in the URL displayed on the screen into your web browser. If prompted, enter the password listed on the screen.
    • That’s it! Start transferring the files you need!
    • WebSharingLite not working properly for your device? Try this other great app that is very similar, WiFi File Explorer.
  • Earn money from YouTube: How to link your Adsense account to Monetized videos

    Monetizing your videos on YouTube is one part of starting your earning process, whereas linking your Adsense account to it is another. You can monetize your videos but you need a working(fully activated) Adsense account to earn money from YouTube content owned by you.

    Make sure you already have the following

    • YouTube account
    • Monetized videos
    • Approved Adsense account

    Monetization

    • Your uploaded videos need to have original content that is completely owned by you including the audio.
    • You should have a minimum number of subscribers.
    • Your account needs to be active for a particular period of time.

    Once you get options to monetize your videos, all you will need is an Adsense account that is already active. Note that you wont be able to make much money unless you have a lot of subscribers and are getting a lot of regular views on your channel.

    Linking Adsense to YouTube

    Now coming to the second part, go to monetization in YouTube account and click on Add an Adsense account and associate your Adsense account with your YouTube account as shown below or if you have already associated an account and want to change it, then also it is feasible.

    The money earned by this type of Adsense is nothing but the “Hosted Adsense” earnings that is displayed in your Adsense account Dashboard. It also includes a Blogger blog and it’s earning if you have one linked to your Adsense Publisher ID.

    To learn how to get your Adsense account approved click here to read this.

  • Adobe Dreamweaver Cloud Shortcuts

    Adobe Dreamweaver is an Industry-leading Web Design Software. Adobe Dreamweaver shortcut keys make life easier for the user. 

    SHORTCUT KEYS

    INSERT
    Single Line Break <br /> Shift-Enter
    Non-Breaking Space ( ) Ctrl-Shift-Space
    Line Break Shift-Return
    Image Ctrl-Alt-I
    Table Ctrl-Alt-T
    Modify
    Quick Tag Editor Ctrl-T
    Show Code Navigator Ctrl-Alt-Click
    Working with Tables
    Select individual (or multiple, discontinuous) table cells Ctrl-click cell(s)
    Select Table (with cursor inside the table) Ctrl-A (may need to do twice)
    Insert Row Ctrl-M
    Insert Column Ctrl-Shift-A
    Delete Row Ctrl-Shift-M
    Delete Column Ctrl-Shift-hyphen(-)
    Merge Selected Cells Ctrl-Alt-M
    Split Cell… Ctrl-Alt-S
    Increase Column Span Ctrl-Shift-]
    Decrease Column Span Ctrl-Shift-[
    Add new row at bottom of table with cursor in bottom right table cell, hit Tab
    working with Frames
    Add a new frame to frameset In the Frames panel select the frame, then in the document window Alt-drag frame border
    Pull out solid frame (creates Nested Frameset) Ctrl-drag frame border
    Select a frame Alt-click in frame
    Select next frame or frameset Alt-Right arrow
    Select previous frame or frameset Alt-Left arrow
    Select parent frameset Alt-Up arrow
    Select first child frame or frameset Alt-Down arrow
    working with Images
    Replace image with a different one Double-click image
    Edit image in external editor Ctrl-Double-click image
    working with Divs
    Select a div (without having to click its grab tag) Ctrl-Shift-click
    working with Links
    Make Link… Ctrl-L
    Remove Link Ctrl-Shift-L
    Open the link-to document in Dreamweaver Ctrl-Double-click link
    Drag & drop to create link Select the text, then Shift-drag it to file in Site panel
    Formatting Text
    None Ctrl-0
    Heading 1 Ctrl-1
    Heading 2 Ctrl-2
    Heading 3 Ctrl-3
    Heading 4 Ctrl-4
    Heading 5 Ctrl-5
    Heading 6 Ctrl-6
    Paragraph Ctrl-Shift-P
    Left … Ctrl-Alt-Shift-L
    Center Ctrl-Alt-Shift-C
    Right Ctrl-Alt-Shift-R
    Justify Ctrl-Alt-Shift-J
    Text Indent Ctrl-Alt+]
    Text Outdent Ctrl-Alt+[
    Document Editing
    Go to Next Word Ctrl-Right arrow
    Go to Previous Word Ctrl-Left arrow
    Go to Previous Paragraph Ctrl-Up arrow
    Go to Next Paragraph Ctrl-Down arrow
    Select Until Next Word Ctrl-Shift-Right arrow
    Select From Previous Word Ctrl-Shift-Left arrow
    Select From Previous Paragraph Ctrl-Shift-Up arrow
    Select Until Next Paragraph Ctrl-Shift-Down arrow
    Edit Tag Shift-F5
    Exit Paragraph Ctrl-Enter
    Code Editing
    Show Code Hints Ctrl-Space
    Quick Tag Editor Ctrl-T
    Select Parent Tag Ctrl-[
    Select Child Ctrl-]
    Balance Braces Ctrl-’
    Find Next (Find Again) F3
    Select line up/down Shift-Up/Down arrow
    Character select left/right Shift-Left/Right arrow
    Select to page up/down Shift-Page Up/Page Down
    Move to word on left/right Ctrl-Left/Right arrow
    Select to word on left/right Ctrl-Shift-Left/Right arrow
    Move to start/end of line Home/ End
    Select to start/end of line Shift-Home/End
    Move to top/end of file Ctrl-Home/End
    Select to start/end of file Ctrl-Shift-Home/End
    Go to Line Ctrl-G
    Indent Code Ctrl-Shift->
    Outdent Code Ctrl-Shift-<
    View
    Switch between Code and Design Views Ctrl-` (that’s the ~ key)
    Switch All Windows to a Specific View Ctrl-Click Code or Design View Button
    Switch between Documents (Tabs) Ctrl-Tab
    Refresh Design View F5
    Live View Alt-F11
    Working with Documents & panels
    Show/Hide Panels F4
    Switch to Next Document (Tab) Ctrl-Tab
    Switch to Previous Document (Tab) Ctrl-Shift-Tab
    Behaviors Shift-F4
    Bindings Ctrl-F10
    Code Inspector F10
    Components Ctrl-F7
    CSS Styles Shift-F11
    Databases Ctrl-Shift-F10
    Files. F8
    Frames Shift-F2
    History Shift-F10
    AP Elements F2
    Properties Ctrl-F3
    Reference Shift-F1
    Results F7
    Server Behaviors Ctrl-F9
    Snippets Shift-F9
    Tag Inspector F9
    Misc
    Check Spelling Shift-F7
    Get File from Server Ctrl-Shift-D
    Put File on Server Ctrl-Shift-U
  • CPU Fan Error! Press F1 to Resume, FIXED!

    CPU Fan Error
    A lot of people might have experienced the same boot error mentioned here in this post.
    ” CPU Fan Error!
    Press F1 to Resume

    This could be caused by a few issues.
    1. THE FAN IS NOT SPINNING
    If this is the case, we have to agree with the BIOS message, and face the sad truth that our fan might be broken, it can also be the fan header on the motherboard itself. To test this, try connecting your fan to another port, if the fan spins, it is probably the connector on the motherboard. If it does not spin, you will probably have to buy a new fan.
    2. THE FAN IS SPINNING
    If the fan is spinning, and you are certain the fan is connected to the right socket. You should consider the following things:
        (a) If the problem came out of no where, the fan might have collected a lot of dust, making it hard for the fan to get up to speed during boot.
        (b) If the problem started after some meddling with the hardware, the problem could be like (a), but it could have made a change in the BIOS. Eg. Most ASUS motherboards require 600 RPM during boot, for INTEL and 800 RPM for AMD. This could easily have been decreased without you noticing it.

    To rectify this problem, you should open your BIOS settings and go to something like a “Hardware Monitor” section, in the BIOS settings, or where
    ever, you can find CPU fan speed settings. The CPU Fan Speed might say “N/A”, change this to ignore. Which will make the motherboard ignore the current RPM of the CPU fan during boot.

    In some cases you will be able to also Disable the CPU Q-Fan Control. However this might cause your fan to burst with full throttle all the time, and you will have to face a lot of unnecessary noise.