Top Menu

Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Sunday, 14 May 2017

Create 'assets' folder in Android Studio

It is not easy to add 'assets' folder in Android Studio, today we learn how to add 'assets' folder in Android Studio.
In Android Studio you got to create it, lets see how it has to be done:
1. Navigate to Packages
2. You would see app as the root folder, right click on it and select : New -> Folder -> Assets Folder
3.You would get a Dialog : Create a source root for assets which will be included in APK. Target Source Set : main
4. Click Finish
5. Now move back to Android Project view, you should be able to see the 'assets' folder now 
 

Hope it helps, Enjoy (Y) 
Read more...

Tuesday, 9 May 2017

Setting up WordPress Multisite

Setting up Multisite on a localhost provides a quick and easy way to test/develop themes and plugins away from a live site.

Open your wp-config.php file again and add/edit the following lines to activate Multisite’s installation mode:


Click on the WampServer icon in your system tray and ensure your Apache and MySQL servers are running.
Login to your localhost site in your browser and under “Tools” you will now have a new option, “Network Setup.”


Enter a name for your network and your email address, then click “Install.”
WordPress will prompt you to edit your wp-config.php and .htaccess files.
Following the onscreen instructions, open wp-config.php and add the following lines underneath your previous edit:



Next, open .htaccess. If you can’t find it, make sure hidden files are displaying on your computer.
Your .htaccess file should look like this:



Edit your .htaccess file to complete your Multisite installation.
Multisite should now be enabled and working on your WordPress site!



WampServer offers a relatively easy way to run a local server environment on your Windows machine, allowing you to test and develop locally rather than online.

Running WordPress locally will save you a lot of time since you won’t have to install and uninstall a fresh copy of WordPress each time you test themes and plugins with your web host.

While WampServer is free and open source software, it’s easy to run into trouble setting it up on Windows. While putting this tutorial together I ran into a bunch of issues trying to get Apache working. XAMPP is relatively easier to setup and I would recommend that as a more reliable alternative.

Read more...

Troubleshooting WAMP Skype Error after installation Wordpress

If you have Skype installed and running, then WampServer may not work properly due to a conflict with Skype. The conflict is caused because both Apache and Skype using the same port 80. There is a simple solution to fix this problem.

1. Open Skype and go to Tools » Options.


2. Click on Advanced and then Connections.


3. Uncheck the box that says Use port 80 and 443 as alternatives for incoming connections.


4. Save options and restart Skype.

Read more...

Install WordPress locally on your Windows using WAMP Server

Having WordPress set up as a localhost on my computer has become invaluable to my workflow, particularly as I regularly test themes and plugins.


WordPress is a free and open source tool – a content management system (CMS) based on PHP and MySQL. WordPress powers 24% of the internet and growing stronger day by day. Numerous websites are created using WordPress every single day. It is the most powerful hosting platform and is the easiest way to create a free website or blog in short span of time.

WordPress is a fun blogging software, and if you are one of those who likes to try new things on your WordPress blog, it’s always a good idea to get a local installation of WordPress on your system. You can use it to try new WordPress plugin, making changes in your theme and many more task.

Benefits of using WordPress:

  • Before setting up and configuring custom domain using WordPress, one can always install WordPress locally for testing or learning or developing plugins for the same.
  • Users can install WordPress in their machines to test the themes, plugins and ensure that setup is perfect to deploy to the server.
  • WordPress is very easy to use. Adding new pages, blog posts, images, etc. on a regular basis is a can be done quickly.
  • It is SEO friendly.
  • As an administrator of a WordPress site, one can set-up multiple users for the website and assign access levels and capabilities to each user.
  • Supports Multilanguage

Did you know that you can install WordPress on your own Windows computer for learning and testing? Working with WordPress for Windows is a great way to test plugins, updates, and other website changes before pushing them live to your audience.

Setting up a local server environment for WordPress isn’t difficult and will save you time in the long run since you won’t have to install and uninstall a fresh copy of WordPress online each time you test or develop something for WordPress.
There are many options for Windows. I’ve previously looked at how to set up a localhost using XAMPP. WAMP is a Windows web development environment and is combination of Apache2, PHP, and a MySQL database. In this tutorial I’ll walk you through how to set up WampServer, including installation, creating a MySQL database, and installing WordPress.


Please follow the steps mentioned in below link for installing WAMP on your PC

Installing WampServer on your PC

After installing WAMP you have to run the WAMP server. Always remember to first activate WAMP server simply by double clicking on its icon. After activating it, the icon will become green from red in the task-bar. Also make sure that you have started 'Start all services'

The color of the WampServer icon allows you to quickly determine the status of your servers.
  1. If the icon is red, the server isn’t running and is offline. You may need to restart WampServer or check out the WampServer forums for more help.
  2. If it is orange, the server is partially running, i.e. Apache may be running and the MySQL service is offline. Click on the WampServer icon and check the service status next to Apache and MySQL to see if they are running. You may need to restart WampServer, and if it still doesn’t work, check out the WampServer forums.
  3. If the icon is green, it means the server is running and you should be able to access localhost from your browser.
To test it, go to “localhost” in your browser.


Note: At times, While installing sometimes WAMP shows error 'MSVCR100.dll' is missing.


How to remove or fix this  above error click here

Before we install WordPress, we need a database.

Setting Up Your MySQL Database

Click on the WampServer icon in your system tray and then click on phpMyAdmin.


 A new browser window will automatically open with the phpMyAdmin interface.


Click on “Databases” near the top-left and you’ll be prompted to create a new database. I’ve called mine “WP”.
When you’ve entered a name, click “Create” and close the window.


Download and Install WordPress

 

Download the latest version of WordPress.
In order to get WordPress working with WampServer you need to unzip WordPress to the right folder. Extract WordPress to the C:/wamp/www/ folder.
You can rename the WordPress folder whatever you like. I’m going to keep it as “wordpress.”

Next, open your WordPress folder, find the wp-config-sample.php file and rename it wp-config.php. Open the file and scroll down until you see the following lines:


 These lines of code define the login details for your database. Replace “database_name_here” with the name of your database, which in my case is “WP.”
Replace “username_here” with “root” and leave “password_here” blank.
Save the file and close it.
Now we can get on with installing WordPress.
Open your browser and go to http://localhost/wordpress/
The WordPress database setup will start automatically. First it will ask you to select your language. After that it will show you some information about setting up your database. Click the Let’s Go button when you’re ready.
On the next screen, you’ll need to provide your database information. The database name will be the one that you entered in the last step. In our case, we called it test_db.
Your default database username will be root and you can leave the password blank.
Next, click on the submit button and WordPress will create a configuration file for you.


 After this you will see a screen informing you that WordPress has successfully connected to your database, and you can proceed with the installation.
Go ahead and click the Run the install button.


On the next screen, you can fill out the installation form. You need to provide a title for your website, choose an admin username / password, and provide admin email address.
Once you’re ready, press the Install WordPress button.


WordPress will quickly run the installation and create database tables. Once done, you will see a success message after the installation is complete.
You can then proceed to your WordPress dashboard by clicking on the Log in button.
Congratulations, you have successfully installed WordPress on a windows computer using WAMP.






Read more...

Friday, 5 May 2017

The program can’t start because MSVCR110.dll is missing from your computer.

If you receive a The program can’t start because MSVCR110.dll is missing from your computer, Try reinstalling the program to fix this problem error message while launching a program on your Windows machine, this post is sure to help you resolve the issue.

When you receive this error, the installation process will not show any issue as the installer file may not contain any error that leads to this problem. However, while installing WAMP Server on your Windows computer, there is a high probability of getting this problem right after installing, and at the time of launching it.

WAMP server is a popular Windows software that assists users to install WordPress on a local computer. You can do almost all the things related to developing/testing themes, plugins, etc. with the help of WAMP server. However, if you receive this MSVCR110.dll is missing error after installing WAMP server, you can fix the problem using this tutorial.


MSVCR110.dll is missing

Downloading the MSVCR110.dll file from the internet and pasting it to a particular place is not the actual solution. You can try that method, but you may not get any positive result from it.

You have to download Visual C++ Redistributable for Visual Studio 2012 Update 4 from the Microsoft website and install it on your PC in order to fix MSVCR110.dll is missing error after installing WAMP.

Before downloading this package from Microsoft website, you should know that it requires Windows 10, Windows 7 Service Pack 1, Windows 8, Windows 8.1, Windows Server 2003, Windows Server 2008 R2 SP1, Windows Server 2008 Service Pack 2, Windows Server 2012, Windows Vista Service Pack 2, Windows XP.

Although Windows 10 has not been explicitly mentioned there under system requirements, you can install the same on your Windows 10 machine to fix the same issue. All you need is a 900 MHz or faster processor, minimum 512 MB of RAM, 50 MB free space on hard disk and minimum 1024 x 768 pixel of screen resolution.

 

Orange WAMP Icon in System Tray

After installing Visual C++ Redistributable for Visual Studio 2012 Update 4 on your Windows machine, you may get an orange icon of WAMP in your system tray, which may not be green. As long as your icon is orange, you cannot use WAMP on your computer.

There is a simple workaround to fix this problem. First, make sure that WAMP is running. Then click on the WAMP icon and go to Apache >> Service >> Install Service.



Following that, a command prompt window will open, and you have to hit the Enter key to continue. Now you will be able to see a green WAMP icon in your system tray. If the problem still exists, just click on WAMP icon and select Restart All Services.



That’s it!
Hope this simple guide will help you.
Read more...

How to make an android app to always run in background?

If you want to make an Android app to always run in background, then below is the process of doing it.
You have to start a service in your Application class to run it always. If you do that, your service will be always running. Even though user terminates your app from task manager or force stop your app, it will start running again.
Create a service:
public class YourService extends Service {

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        // do your jobs here
        return super.onStartCommand(intent, flags, startId);
    }
}
Create an Application class and start your service:
public class App extends Application {

    @Override
    public void onCreate() {
        super.onCreate();

        startService(new Intent(this, YourService.class));
    }
}
Don't forget add this in "application" tag of your AndroidManifest.xml
android:name=".App"
Read more...

How to install WAMP Server on Windows 10

If you are looking forward to developing application in PHP, first thing you want is to set up a development environment. On Windows, WAMP is a popular choice. Let me show you how to install it on Windows 10.

Note: WAMP is not the only choice you have for windows. You can also choose XAMPP which is also stable and good. For Linux you can try LAMP and for Mac, MAMP. Please don’t waste your time in comparing various alternatives available to you. They are all good. All I can say is that get yourself a development environment quickly and start coding. WAMP is a very good choice and is very stable. Go for it.

Here are the installation steps.
Step 1- Download Wampserver from the WampServer website.

Step 2- Scroll down to the download section of the WampServer Home page.

Based on your system, choose 32 bit or 64 bit version of the installer. I choose 64 bit, PHP 7 version because this is the latest release of PHP.

Step 3- Click the appropriate link to download the Installer.

You should see something like this. Click the download directly link to start download.

You will see download will begin from the sourceforge.net webpage. 

Step 4- Locate the downloaded file.

By default it should be in your downloads folder if you have not changed the default settings.

Step 5- Double click the installer to begin the installation.

You should see something like this.

Click Run to proceed. Now you should see Windows User access control dialog box. Click Yes to continue.

Step 6- The dialog box that appears will now ask you to choose your language for installation.

Select your preferred language from the drop down list and click OK. We will be using English for this demonstration.

Step 7- Next dialog box is Welcome to WampServer64 Installation Wizard.

Click Next to Continue.

Step 8- You should see WampServer Licence agreement dialog box.

Click “I accept the agreement” radio button and next to continue.

Step 9- Now you should see an information dialog box.

This informs you about the prerequisites, or the required component that must be present on your windows machine for the WampServer to function correctly. What’s required is the appropriate version of Microsoft VC++ re-distributable package. You can still continue to install WampServer without issues. 

Step 10- Select the location where you want to install WampServer.

You can accept the default and click next.

Step 11- Select Startup Menu Folder.

In this dialog box you have to select the folder in which the program shortcuts should be placed. If you select the default, it would be placed in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Wampserver64. This folder content is accessible from the windows start button, all apps in windows 10. If you place in any other folder, the shortcut will not be visible from the start menu.

You can change it to something else but accepting the defaults is perfectly good. The 64 at the end of Wampserver64 is tell you that you will be using the 64 bit version of the application. If you dont see 64, then you will be using the 32 bit version of the application.

Step 12- Finally you see the Ready to install dialog box.

You can review the details and make the changes by going back by clicking the Back button. Once you click Next, installation begins.

Click Next to begin Installation. Now you will see installation begins. 

Step 13- Select default browser dialog box

Now you should see a dialog box asking you if Internet Explorer should be made the default browser and asks you if you want to change the default browser to something else. Click NO to accept Internet explorer as the default browser.

If you want to change the default browser to say Google Chrome, click Yes and you should see the screen to change the default browser.

In Windows 10, Google Chrome executable is located in C:\Program Files (x86)\Google\Chrome\Application folder by default. Go to this folder and select chrome.exe and click open. If you click cancel, it would again default to Internet Explorer.

Again the choice between Internet Explorer and Chrome or anything else is purely personal and I don’t see any issue in accepting the default and leaving it as Internet explorer.

Step 14- Select default Text Editor

I would suggest you can accept the default, which is notepad by clicking No. Its just that if you want to edit apache or PHP config files such as http.config or php.ini, it would open in notepad. Still if you want to change it you can click Yes and navigate to the executable .exe file of your preferred text editor. But, as I said, the default notepad is perfect.

Step 15- phpmyadmin Information dialog box

After the installation is complete, you will see a dialog box informing you that the user name for phpmyadmin is “root” and password is not set, that is there is no password for it. Click Next to continue.

Step 16- Installtion Complete

Now you should see installation complete dialog box. Click finish to exit the WampServer installation wizard. WampServer should now be installed on your system.

Step 17- Start WampServer

You can now start the WampServer by double clicking on the shortcut wampserver icon on your desktop or alternatively launch it from the start menu. After the WamServer starts, you can see the Green icon on the taskbar as shown in the screenshot. Initially it will be Red, then turn amber and then Green. When it turns green, it means all the services are now running. Else, the WampServer has not started. Please note that you will have to give adminsitrative privilages for the Server to start. That is just click Yes when you see UAC confirmation dialog box when you click the Wamserver icon to start the server.

When you right click on the icon, you can see the options to start, stop and restart the WampServer along with other option which I leave for you to explore. If you face any problem, please leave the question as a comment, I will answer them.

That’s it, you are done.


Read more...