CodeIgniter 2.20 – How to set up in XAMPP

Codeigniter_1_Installation_in_xampp

This is the first part of the CodeIgniter 2.20 tutorials series. In this part, you will learn how simple it is to install CodeIgniter in XAMPP.

Lets assume that the web application you are making is “yourapp”.

  1. First go to CodeIgniter website and download it.
  2. Now go to your www or htdocs folder in XAMPP and create a new folder for your application. Lets name it yourapp.

    CI_in_xampp

  3. Copy the downloaded CodeIgniter .zip file into your folder (yourapp) and unzip it. You will have a folder looking like this.
  4. Now go to the following link in your browser: http://localhost/yourapp/
  5. You will be presented with the welcome screen of codeigniter.

Codeigniter default welcome screen

At this stage, you have CodeIgniter ready for your application development. The page you are seeing is a view at application/views/welcome_message.php which is loaded using the controller at application/controllers/welcome.php

Back to CodeIgniter Tutorials

Learn how to get rid of the “You may use these HTML tags and attributes” from WordPress

 

WordPress is amazing and facilitates bloggers in every aspect. Everything can be adjusted to personal taste. But there is one thing and many people including myself would like to be removed from their pages.

If you look at the bottom of your wordpress pages, then just below the comments box, you will see this.

[edsanimate animation=”tada” delay=”12″ infinite_animation=”yes” animate_on=””]

The HTML suggestions concerning the comment text

[/edsanimate]

 

With or without the highlighter and regardless of the theme selected, this looks like the HTML code itself. It is just like handing over the engine and tires to the driver when he comes to buy a car. Lets get rid of that!

If we look at the code of my page, it is easy to spot the CLASS and ID of the HTML element responsible for that text.

[edsanimate animation=”bounceInUp” delay=”1″ duration=”3″ infinite_animation=”no” animate_on=”scroll”]

tags2

[/edsanimate]

Both the ID and the CLASS of that element is form-allowed-tags. In CSS, we can make an HTML element invisible using the following code.

Now, we will simply add our CSS to the wordpress using the following menu.

[edsanimate animation=”flip” delay=”2″ infinite_animation=”no” animate_on=”scroll”]

Click to enlarge!
Click to enlarge!

[/edsanimate]

Basically, click Appearance and then go to Edit CSS. Then paste your the following code and then click Save Stylesheet.

Now if you visit your page again, you will see that is is gone. The “You may use these HTML tags and attributes” message used to be at the highlighted section below.

[edsanimate animation=”zoomInRight” delay=”2″ infinite_animation=”no” animate_on=”scroll”]

You may use these HTML tags and attributes is gone as highlighted
You may use these HTML tags and attributes is gone as highlighted

[/edsanimate]

Congratulations! now your blog looks better and your comments section will be pleasant 🙂

[edsanimate animation=”shake” infinite_animation=”yes” animate_on=”scroll”]

And please, do SHARE! 😀

[/edsanimate]

 

Learn to use jQuery shorthand and extended method

The extended method of writing jQuery

 

The shorthand method of writing jQuery

 

It has been so many times that I could not find the jQuery shorthand for myself. So, in order to settle this once and for all, I am going to post it in my own blog so that whenever anybody (including me) has to find this information, my blog will be among the places to come looking for it.

I hope this helps somebody in the future as it will help me from now on.

Thanks! and remember to share 😉

How to switch between Activities in Android

To switch Menus/Activities in Android App

  1. I called this function in XML file as android:onClick=”backToMainMenu” in the attributes of button.
  2. The function must be public and have only one attribute i.e. “View view”
  3. You can call “i” whatever you wish.
  4. “PreviousMenuClassName” is the name of the Activity where you want to go after clicking the button.

Android: Want camera in your app?

So why not use the camera that already exists in your Android Phone!

First put the following in AndroidManifest.xml before the <application…></application> tag

Then go to the MainActivity class or wherever you want to call “Camera opening function”. Add the following function:

  1. Here, startCamera is a function called when a button is pressed.
  2. The default camera app of your phone opens and you will have all the advanced features without any work.
  3. Done 😀

 

Knoppix touchpad click workaround

Problem: I can’t click with my touchpad in Knoppix. I can use USB/bluetooth mouse normally but the Laptop’s touchpad can’t be tapped to click.

Solution:

  1. Go to terminal and enter the following

    knoppix@Microknoppix:~$ synclient Tapbutton1=1

  2. Now try closing the terminal by tapping the [X] in the terminal window and it will work.

Note: This only works for the current session which means if you restart knoppix, the touchpad will be back to unclickable. I will update the post as soon as I discover the permanent solution to the problem. But as far as I am concerned, I can do that on every boot 🙂

 

I should have known that Wifi Can also be turned on by Windows+X

Windows mobility center

Recently my laptop had a malfunction in hardware making the WiFi and sound touch buttons unusable. I tried all kind of driver and none worked. Then I tried Linux Mint 13 and it also didn’t work because the problem was in hardware.

Linux has manual controls which may turn the switches for WiFi and Sound on and off but it is not the point here.

Finally after skimming through the internet for help, I found a very easy way to trigger WiFi in windows. It is something some people including myself either do not know or are not used to. Simply pressing Windows+X buttons will produce a menu which will allow the user to turn WiFi on or off. Moreover, it allows many more facilities on the same platform. The following will help understanding.

Windows mobility center
Windows mobility center
 Press Windows + X

You will be presented with the Windows Mobility center.

Windows mobility center
Windows mobility center

Now, if you press the highlighted button (highlighted below), you will turn the WiFi on or off (unless the hardware is completely failed). That way, I was able to use WiFi without repairing my laptop. Also not the other options which you may find useful.

Windows mobility center
Windows mobility center

“Turn Wireless Off” Option highlighted.

I hope this helped you. please do leave a message if you found any problem in the above steps. I will do my best to respond.

Installing, running and testing and stopping Xampp services in Knoppix

Knoppix is very portable and easy to use. Being a developer, I know that it is important to keep your tools handy.  This post is about installing Xampp in Knoppix. The following steps can get it running in no time ;D

  1. Get the latest .tar.gz of Xampp and download it in a folder.
  2. Go to the downloaded file’s folder using File Manager.
  3. Open Terminal in the .tar.gz file’s folder by pressing

    Tools>Open Current Folder in Terminal

The next step will Install Xampp in /opt folder.

  1. Type the following command in the terminal (make sure the name of the .tar.gz file is correct)

…:~$ sudo tar xvfs NAME OF FILE.tar.gz -C/opt

Afterwards, you will see a lot of installation activity in the terminal window. When it finishes, it is necessary to change permissions to the htdocs folder in xampp in order to make development easy and possible.

  1. Type the following in Terminal to allow file permissions in htdocs

…:~$ chmod 777 /opt/lampp/htdocs

  1. Now we can start Xampp

…:~$ /opt/lampp/lampp start

  1. Now go to browser and type localhost and it will be working fine. Also check if phpmyadmin is working.
  1. To stop Xampp services, go to terminal and type this

…:~$ /opt/lampp/lampp stop

  1. Enjoy! 🙂

 

Installing WINE in knoppix (CD and DVD)

Wine in Knoppix CD version

Type the following in Terminal

It will download and install wine along with its required repositories. Afterwards, you can install Wine by typing sudo apt-get install wine1.5.

Afterwards, if you with to install a Windows program in Knoppix, then simply copy the setup on the desktop (makes it easy) and then click the setup file. If everything was set properly, then Wine will appear to install the program. It is important to note that some programs require some files (such as .dll files) which are mostly provided in Windows but not in Linux. Therefore it is important that those files are to be copied in the required folders.

Wine in Knoppix DVD version

As for those users of Knoppix who intend to use the DVD version, then there is no need to install anything because Wine comes as a pre-installed package in the DVD version.

Sublime Text default theme for Netbeans IDE

I like the Sublime Text theme because it is easy to look at and everything looks readable. This is a must-have theme for Netbeans. It looks exactly like Sublime text and you sill keep all the features of Netbeans.

The installation of this theme is very simple.

Link: http://plugins.netbeans.org/plugin/51424/sublime-theme

  1. Click Options.
  2. Click Fonts & Colors.
  3. At bottom left, click Import.
  4. Click Browse button.
  5. Select the Downloaded file (which in my instance was 1411559204_Sublime-Theme.zip.
  6. Well, finally select the theme as shown below and click apply.

 

sublime-theme-for-netbeans
sublime-theme-for-netbeans

I hope this enhances your experience with development of your projects. Don’t forget to share  ;D