Static functions in C
The static keyword with a function in C makes it Static function. The function without static keyword in C are global by default. The difference between them is static function are only accessible in the file in which it ...
For storing new user information in database, first we have to create a new table in database which contain user name,email,password fields.
The logic of the controller is written below. In below code we have create a function registrati...
What Is Development Environment ?
The development environment supports to the programmers or developers to create the software or application or product employing a group of approaches and programming tools.
Normally any developme...
Statement interface:
It provides methods to interact with database means using Statement interface we can execute SQL queries.The createStatement() is present in java.sql.Connection interface and it does not take any argument.
To use Statem...
I was facing this issue of passing the array from php to the bash file. To pass array to bash file write the following lines of code.
Php Code:
$array= $countries_array; // Countries array from database
shell_exec('sh get_countries.sh '....
Implementing code of login and logout in cakephp by using auth component in this process appController needs to be modified so that it uses Cake’s Auth component will work at the time of login and logout. This is where we tell the Auth comp...
Hello Friends,
If you are facing this error "Fatal error: Call to undefined function base_url() .........." in codelgniter, this is very simple to resolve this. You need to open "codelgniter/application/config/autoload.php"...
Hi all,
Apple has introduced new Contacts Framework in iOS 9, which replaces the AddressBook framework. Accessing contacts information using AddressBook framework was very tough task for developer. But new Contacts framework of iOS 9 provides ...
My objective for posting this blog is to tell how do we convert shell scripting code to php. In some cases we need to use php code instead of executing shell script. Therefore I am writing the blog which may help someone to understand how do we c...
Validation is a process of analyzing the exactness of data. It assures that the data entered is according to our requirement or not.
CakePHP has it's own inbuilt validation rules. In CakePHP validation rule is locate in the Model file of t...
In the below example I have created draggable panel function. This will works like a notification bar up and down. Here first I have added slidinguppanel support library in build.gradle file. Then in next step i have added SlidingUpPanelLayout, B...
Hi guys,
I have created a tiny animation in Adobe Flash by using guide layers. It seems perfect when I play it or export the .swf file (https://drive.google.com/open?id=0B_T22xCgWSZsRVBUQ0JuTVJ5UkE).
but when I'm exporting the png seque...
Helpers that are used in CakePHP are associated with the Presentation layers of application. Helpers basically contain presentational logic that are available to share between many views, elements, or layouts. We have different h...
Let us start with the simple CRUD (Create, Read, Update and Delete) Application. Before we begin let me split the processes we are going to do this this blog into the following steps:
Creating the Database
Create models
Create controlle...
Hello Friends,
Configuration variable are the core variables in any project. In Codelgniter we have codelgniter/application/config/config.php file to set configuration variable. Like I want to set a font_size globally in my project then I need...
Hello Readers..
By this blog i am contributing few common test scenarios for the OTP testing. OTP stands for ‘One Time Password’. Now a days, OTP testing is an modernization plan. OTP testing is an innovation testing technique or t...
In the below example I have created a RecyclerView, In RecyclerView I have added CardView item. When you click on FloatingActionButton a dialog box will open on screen where user will fill name, address and gender and then finally click on ok but...
Database is used to collect information, which is organized in a proper way so that it can be accessed, managed and updated easily.
CakePHP supports following database servers:
MySQL 5.1+
SQLite 3
PostgreSQL 8+
SQLServer 2008+
...
In order to include the content of another PHP page in the current PHP page we can use two methods provided by PHP which are:
include()
require()
With the above two methods we can make HEADER, FOOTER, FUNCTIONS when user is working o...
A function in PHP which starts with a double underscore”__” are called magic functions in PHP. __autoload functions is used to add very large number of include statements automatically without the programmer.
For instance:
inc...
CakePHP is a swift development framework for PHP which manipulate frequently recognized design patterns like Associative Data Mapping, Front Controller, and MVC. Our key target is to impart a structured framework that accredit PHP users at a...
PHP does not provide any specific definitions of the magic methods or functions. It is the programmer who actually writes the code to the functions that defines which states what the magic functions will do. But, magic functions are not directly ...
I was facing issues regarding adding attributes to the product with color and size. (i.e configurable products). I have added products to the cart and then went to view the cart, but I didn't see the attributes color and size which should be ...
Aloha,also called the Aloha method used in networking it is a multiple access protocol at the datalink layer.
It refers to a simple communications scheme in which each source i.e transmitter in a network sends a data whenever there i...
In cakephp, whenever you want to create an application, You have to create following three files :
Model.
Controller.
View files.
For all these files, there are some naming convention standard you must follow.
...
js-model is a library that allows user to work with models by using javascript code. This will help to user for creating a pop-up window for the further details. It contain the interactive data as well as a large part of the logic surrounding for...
What is Blowfish Authentication:
It is an authentication adapter for AuthComponent. Blowfish is a symmetric-key block cipher. It provides the ability to authenticate Post Data using Blow Fishing. In order to add Blow fish authentication add it...
ViewBag in asp.net mvc
ViewBag is an object type which is a dynamic property of ControllerBase class.
public Object ViewBag { get; }
ViewBag provides communication between controller and view. ViewBag passes data...
In solr we can create a field which can update as the related doc is searched by user.
For that we need to add a field in schema.xml as:
<field name="popularity" type="long" indexed="true" stored="true"/>
In the below code we hav...
Currently i have 100+ URLs on my site in this format:
http://www.example.in/view_retailer/homepage
I want to remove /view_retailer/ from all URLs, so they should look something like this
http://www.example.in/homepage
In other words I...
If you are trying HTML 5 GeoLocation to get longitude and latitude and after then using Google Maps API to get the country code of that longitude/latitude. SO in this tutoril I will tell you a very simple way to get country code from Google place...
In order to add static block in page (.phtml) template. Follow the steps below:
Display Static Block in Phtml file & CMS page.
In XML File:
<referenceContainer name="content">
<block class="Magento\Cms\Block\Block" name="...
First get logged in to a GCE instance via SSH. From there you can access the Storage with the help of a Service Account:
Step 1: Open Command line of google app engine and enter following command.
&...
Hello Friends,
As you know base_url is a very important component in web development we need this many time in our project, If you are new in codelgniter and wants to define base_url. Please review the below code
Please open "codelgnit...
Hello Friends,
If you are looking to auto load any model function or many models functions like I want to user model will be auto load in my project. Please review the below code for the same and make the changes accordingly.
Please open &q...
Sometimes we need to generate a unique number for an emailId, for example when a user register then we need to generate a number by using that user can verify his EmailId. For this we can use SHA1 encoding method.
Example - In the below method...
Generally we need to encode the password in our Applications for security purpose and we can use MD5 for this purpose.
Example - In the below method I'm encoding sting by using MD5
import java.security.MessageDigest;
import java.secu...
In this article I will guide you to use the tinymce-rails gem to add text editor functionality. TinyMCE is a rich text editor that outputs HTML, makes it easy to add content in rails application.
First you need to add...
How to setup a rating feature in rails application.
The best and simple way of doing so is by using RAILS GEM ratyrate by following simple steps.
Step 1: Include GEM in your gem file
gem 'ratyrate'
Step...
When we need to perform mutiple operations on an object in database or on multiple objects, then using transaction is considered a good practice as it maintains data consistency
Here is the sample code of how we can use transaction in EF
...
Sometimes we want to sort a List based on some property. Suppose we have a List of UserModel and we want to sort List by firstName then we can do that easily by using Collections.sort() and Comparator interface.
Example: In the below example I...
In OpenERP first we create the form and browse the record of account invoice line and then select to the product in product form and then find to the the current user’s ID for security checks. In account invoice line we chec...
1.CakePhp is basically a framework which is based on MVC pattern i.e(model view controller).
2.Cakephp have built in validation.
3.Cakephp have fast and flexible php syntax with helpers.
4.Cakephp is very friendly because developer done ...
In OpenERP first current row of the database cursor finds the current user’s ID for security checks. Then This Function return Membership State For Given Partner and return dictionary of membership state Value.
Use this function show bel...
Hello Friends,
If you are looking to update timezone in codelgniter application you need to make changes in index.php. By default timezone represent server local time suppose server is placed in Singapore then your default timezone would be Si...
Wild pointers
The pointers which are not initialized and are pointing to some random location are wild pointers. Pointers pointing to a known defined variable are not wild pointers but if it is pointing to a value or a set of values without va...
CakePHP database configuration details are in a file that is located at app/Config/database.php.
This database file user can edit the file in the notepad or sublime and can edit the feilds by which it will be connected to the database.Filling al...
To get only year from a date you can use the below code. You can pass any date that you wan to change, I'm getting year from the date in the below example:
/**
* Get year from Date
*
* @param createDate
*...
What Is Cause Effect Graph ?
Cause effect graph is a kind of black box testing approach which graphically demonstrates the connection between the granted result and all the components which control the outcomes.
Conditio...