openfire database connection problem in setup

When you setup the openfire on your server and if you face the database connection problem on your server than in many case the problem with the hostname. you need to use the hostname as “localhost” in case of database connection with your own server database.

Use hostname as domain or ip in case of  remote database connection. otherwise you need to use localhost  as hostname. so this issue will fix for sure.

 

Read More

Android Studio Shortcuts

I use a Mac for Android development, so apologies to the Linux and Windows users out there. You can find a list of similar shortcuts here.

url

 

 

  • ⌘ + Shift + O – Search by file name

  • ⌘ + B – Go to definition in code, layout files, XML values files…pretty much everywhere

  • Shift + F6 – Rename. It doesn’t matter if it’s a class, an XML file, or even a resource ID (R.id.thing). It just works.

  • ⌥ + F7 – Find usages. Similar to other shortcuts, this works on classes and XML files.

  • ⌘ + N – Generate code. Getters and setters, override methods, etc.

  • Control + T – Refactor menu. Extract methods & classes, generate interfaces, etc.

  • ⌥ + Enter – Quick fixes. This may be one of my most frequently used shortcuts. Implement methods for a superclass or interface, generate a layout file on-the-fly, import a package.

  • Ctrl + ⌥ + I – Auto-indent. Everyone loves pretty code.

  • Ctrl + ⌥ + O – Clean up imports. Again, everyone loves pretty code.

Read More

Top 10 php frameworks 2015

PHP frameworks widely used in web development so below is the report for php top frameworks that widely used for web development..

1. CakePHP 3.0

CakePHP 3.0

Considered as a contemporary framework for PHP development, CakePHP 3.0 comes loaded with remarkable features including enhanced components and helpers, improved session management, improved consistency of conventions, ORM improvements and many more. CakePHP 3.0 comes with increased modularity, allowing you to create more standalone libraries in addition to reducing coupling. Plus, there are tools like PSR-0, PSR-1 and composer which have helped in improving the interoperability.

2. Laravel

laravel

Laravel is yet another brilliant PHP Framework that’s equipped with tons of interesting features including RESTful routing, native PHP or light weight tempting engine and many more. Built using several Symfony components, Laravel offers you web application an amazing foundation of reliable and well-tested code. Some other interesting features of Laravel include: a powerful queue library, an amazing ORM, painless routing and a simple authentication.

Books

Considered as one of the fastest PHP Frameworks, Phalcon has been implemented as a C extension coupled with lower resource consumption. Some of the excellent features included within this PHP Framework are: translations, security, assets management, universal auto-loader and many more. You can use Phalcon for developing full MVC applications viz: single-module, multi-module and micro applications.

4. Symfony 2

symfony 2

Available in its version 2, Symfony is an excellent PHP Framework for creating websites and web applications. It has been built on top of Symfony components such as Drupal, Ez Publish and phpBB. With over 300,000 developers on-board, Symfony has witnessed over 1,000,000 downloads till date. There have been more than 1000 code contributors for Symfony till date. Backed by a huge community of Symfony fans, it is believed that the framework will go to a whole new level in the forthcoming years.

5. Codeigniter

Codeigniter

If you’re a web developer who’s in need of a simple and an elegant toolkit for creating feature-loaded and visualling impressive web applications, then Codeigniter is the framework for you. Currently available in its version 2.2.1, Codeigniter comes with clear documentation. Some other interesting features of this PHP framework include: nearly zero configuration, no large-scale monolithic libraries, compatibility with standard hosting, no restrictive coding rules, no need for template language and many more.

Books

6. Yii Framework

Yii-php-Framework

Considered as a fast, stable, secure and high-performing PHP framework, Yii has worked wonders for developing Web 2.0 applications. It provides the basis and advanced application installations based on the project requirement. Equipped with Model-View-Controller(MVC) design pattern, rich feature layered caching scheme, Role based access and authentication, Database Access Objects(DAO), Ajax-enabled widgets and a detailed documents; Yii serves as an ideal framework for developing enterprise web applications, social media applications, SaaS, PaaS and a lot more.

Books

7. Aura

auraPHP

Aura is a PHP Framework that provides independent library packages for PHP 5.4+. You may opt for using these packages alone, in collaboration with one other or as combined into a separate full-stack framework. As the second major version of Solar(a PHP framework), Aura has been reimagined and rewritten into the form of a library collection with a dependency injection. Aura has been specially developed to leverage the features available in PHP 5.4+.

8. Zend

Zend

Considered as one of the most popular PHP Frameworks for building high performing web applications, Zend comes with cryptographic and secure coding tools which allow you to execute web app development projects in a flawless manner. Some interesting features of Zend framework include: modularity, extensibility, enterprise ready and a vibrant community.

Books

9. FlightPHP

FlightPHP

Flight is an extensible micro-framework for PHP. It enables you to build RESTFul web applications in a quick and simple way. Compatible with PHP version 5.3 and above, Flight can be installed quite conveniently.

10. FuelPHP

fuelphp

FuelPHP is a simple and highly flexible MVC(Model View Control) framework specially created for PHP web developers. Irrespective of whether you’re an experienced PHP developer or an amateur; using FuelPHP framework can turn to be your best decision. PHPFuel supports a router-based approach. That means, you are directly navigated to a closure which deals with input uri, offering the closure a complete control over any further execution.

Books

With these 10 handy PHP frameworks at your disposal, I’m sure it’d become comfortable for you to come up with web applications that are truly amazing and able to impress the targeted audience. So, just try these frameworks and you’ll soon be able to pick your favorite.

Read More

download

Codeigniter common select query

 

This is the codeigniter function for common select query that you need to place in model. and call it from controller. suppose your model name is say “basic_model” than you need to call this function in controller like..

 

Parameter understanding :

$select           : string of database table column in comma separated or * for all column
$from             : string of database table name
$where          : An associative array in which array key should be table column and array value would be table column value
$group          : an array of database column e.g array(“user_id”) so it gives output as group by user_id
$order           : string of database column with ASC or DESC parameter e.g ‘user_id DESC’
$having        : string of database column with condition say sum(‘coin’) > 0
$limit            : an array of limit string e.g array(“10,0″) so this gives output as limit 0,10
$result_way : string for output way
$echo           : 0 or 1 . if you want the query string from codeigniter than set this value as 1

By changing the query guide functionality you can use this function for other framework or in cms.

Read More

Inapp purchase receipt validation in ios

There is a below function for validating the receipt for in-app purchase in ios. it return 1 or 0 for the receipt is an valid or an invalid.

The function contains two parameter in which the first parameter “$purchase” is a receipt that you get from apple server when a user has make the in-app purchase from device.

Read More

rewrite

wordpress post name Permalink for localhost

If you getting trouble on running the wordpress system in your local system with post-name permalink than it is the problem of that your local server has disable the “rewrite module”.

For enable the “rewrite module” in your server you need to edit app-ache module stetting. So, after enaled this module you need to restart the server and then set post-name permalink from your wordpress system through admin panel and access any wordpress page or post you will see the permalink with post-name.

Read More

mozmenu

remove ads from Mozilla firefox

If you tired from ads in mozzila firefox browser and you need to remove the ads from your browser than you need to follow the below procedure.

->go to tools menu
-> then click on add on

.moz-addon

So, you will get the above screen. Now you need to remove unnecessary extension and plugins also visit the apprentice too. Than restart your browse and you will get the surfing with ads free.

Read More

Mysql set column character set

For converting mysql table character set for particular column than there is below query you can use. here we have change the character set of column say “col1″from default character set type may it Latin type to utf-8. this is support for all language and all characters of world wide.

Also if you want to change the character type of whole table means all column for the table than below query you need to use.

Read More

send push notification from server to ios device using php

For sending the push notification from server to ios device using php than you can use below code function.
Requirement : you need to xyz.pem file that can be generate from your apple account. this certificate is in two type one id development and other is distribute certificate.

Now if you want to send the push notification to multiple devices than replace the try—catch code with below code snippet.

Read More

send push notification from server to android device using php

For sending the push notification from server to android device using php than you can use below code function.
ANDROID_APIKEY : this is api key of google project. you can find this key from google api console as server key.you must use here server key not android key.

You can set your custom parameter also as per your app requirement.

By providing multiple device token you can send push notification parallely to all devices.

Read More