
Featured
-
How Regression Testing Detects Integral Errors In Business Processes
Humans are forever changing and evolving and so to
by kristina.rigina -
Get Display Banner Advertising Opportunity on FindNerd Platform
“Do you have a product or service that nee
by manoj.rawat -
Android O Released with Top 7 New Features for App Developers
Android was founded by Andy Rubin, Rich Miner, Nic
by sudhanshu.tripathi -
Top 5 Features That Make Laravel the Best PHP Framework for Development
Laravel is a free open source Web Framework of PHP
by abhishek.tiwari.458 -
Objective C or Swift - Which Technology to Learn for iOS Development?
Swift programming language is completely based on
by siddharth.sindhi
Tags
question for output for xml
hii,
my question is if we work with html in notepad and save as .html extension . On opening that html file in browser the output is displayed but in XML file when we open the file in browser the same coding done in notepad appears.. why?
...
Constant in PHP
Constant value cannot be changed or undefined during the execution of script. By default constant is case-sensitive.
Constant cannot be defined by simple assignment, they may only be defined using the define() function.
Create a PHP Constant...
implode and explode string functions in php
Implode()
It is a string function which returns the Join array elements as a string.
The Implode() returns a string with elements of array arranged in a string in the same order.
example:
<?php
$str = array('Hello','World!...
How to add a Facebook plugin.. com.phonegap.plugins.Facebookconnect?
Hi i am making an iOS app using cordova Phonegap .
I want to add Facebook plugin so user can register to Facebook.
So i Did so many things but still not getting proper way?
Please help guys
Thanks
How to use define() function php ?
What is define() function ?
The define() function basically use for creating a constant.
It depends on 3 parameters:
1-name-> this is the name of the constant.
2-value->value of the constant.
3-case_insensitive-> define co...
find and save the records by using cakePHP models
make a controller name Pagescontroller.php and paste the following below code
<?php
class PagesController extends AppController {
public $name = 'Pages';
/* Use Customer model */
public $uses = array('Customer');
...
How to make custom toast in android.
In the below example I have created a custom toast Function in Android, the toast will open in center of the screen. Here I have used a image, image shown below contains a toast at the bottom of the screen. For more see the below code, in which I...
Adding CSS on a click in AngularJs
If you want to add some css or change css on a button click in angularjs,you need to use angular directive mg-class for this.
It is very simple you just need to bind a variable into the directive mg-class and change it from the controller.
...
How to use compact() Function in php ?
What is compact() Function ?
compact() Function is used for creating an array from variables and their values.
Syntax compact() Function:
compact(variable1,variable1,variable3....)
Note:If any strings that does not match variable name...
'Failed to open stream: Permission denied' error - Laravel
Some time when we want to access our public folder then we get the error "Failed to open stream: Permission denie' error - Laravel" . So when we get this error .Do not think much we have to clear our cache and just give permission to our folder a...
Seat Selector For iOS
Hi All,
Now days , we start booking seats online so if you also want to implement seat selection functionality than follow these steps .
Download ZSeatSelector from this link https://github.com/richzertuche/ZSeatSelector
Now drag two fil...
How to save data in CakePHP
This is a very simple application in cake php for saving the data into database. We can simple make it by making the database and connecting it to cake php.
After making the database and tables we can use this code for saving the data input in...
Making any element resizeable
For making an element resizeable vertically, horizontally or both we use the CSS3 attribute resize. The resizeability in a textarea can be be disabled using the same.
Property and value:-
resize: vertical;
resize: horizontal;
resize: both...
How to Upload File In PHP ?
File uploads is not difficult, it is easy to upload files or Images to the particular Folder. But before uploading the files ,you have to configure "php.ini" File. So, Check your php.ini file and verify the file_uploads directive is set On.
Sy...
Animating the box Borders
We first create the borders well use a dashed outline and a box shadow.
The outline have all its values; width, type and color. The box-shadow only needs the value for spread which should be the same as the outlines width and its color. The outl...
Adding Component Dynamically In Swings
Hi All,
If you are adding JButton ,JLabel or JComboBox etc dynamically or adding them during runtime For example
public class Main {
public JPanel buttonPanel ;
public static void main(String[] args) {
JFrame frame = new J...
substr_count() string function in php
The substr_count() in php is a string function which counts the no of times the sub string occurred in the string.
this function is case-sensitive.
the syntax of the function is as :
substr_count(string,substring,start,length)
Here , ...
How to handle default error in PHP
We can handle default error in PHP in a very simple way. This can be done by sending an error message with its filename, error line number and a message that describes the error to the browser.
Error handling plays an important role whenever we ...
Laravel: Load method in another controller without changing the url
We can load method in another controller without changing the url using Laravel.
If you are using Laravel 3 then we will define:
Controller::call('ApplesController@getSomething');
If We are using Larval 4.x then we will define:
$req...
strcmp string function in php
The strcmp is a string function in php which compares the two strings. strcmp is a binary-safe and case-sensitive function.This means the comparison is case sensitive.
The syntax of strcmp:
strcmp(string1,string2)
Here, the string1 is...
Get Multiple Parameters with same name from a URL in PHP
Hello readers, Below example will help you to "Get Multiple Parameters with same name from a URL in PHP".
<?php
$query = explode('&', $_SERVER['QUERY_STRING']);
$params = array();
foreach( $query as $param )
{
list($name, $v...
How to autoload 'libraries' in laravel 4
We can easily auto-load libraries in Laravel 4.x by using namespaces in our application. Then put all libraries you code under that namespace.
Suppose our directory structure would then be:
libraries
Myapp
Search (note directo...
Handling data in a PHP JSON
Hello readers, today we discuss about "Handling data in a PHP JSON Object".
There are many tutorials available for handling JSON using PHP, but problem with most of them is they don't help more than organizing an assortment towards json_encod...
How to use current() function and end() function in php ?
why use current() function:
current() returns the value of the current element in an array:
Syntax of current() function:
current(array)
why use end() function:
end() returns the value of the last element in an array:
Syntax of...
Difference between echo, print and print_r in php
The echo and print are similar ones as they are not a functions they are the language constructs.
echo
The echo as a language construct it outputs one or more strings. The echo has a void data type.As it is a construct and not a function s...
How to use each() function in php ?
What is the work of each() function ?
PHP each() function mainly Return the current key and value pair from an array.
Syntax of each() function:
each(array_name)
You can take reference form below example to use of each() function.
...
10 Useful questions related to Squid
Below are some sought-after interview questions asked, related to Squid
Question1: What is Squid?
Answer: Squid is an Application software that works as a proxy server as well as web cache Daemon. Squid Protocols such as FTP, HTTP, HTTPS, ...
How to count the number of occurrences of values in an array
There is a function array_count_values() in PHP which counts the frequency of occurrences of all values of an array. The function returns an associative array with original values as keys and the number of occurrences as values.
Syntax: array_...
How to use strrev() function in Php?
What is the strrev() function?
strrev() function is uses for reversing a string. strrev() function is also used for reversing a number.
In the given below example you can easily understand the use of strrev() function
<?php
//here c...
3D Flip Rotate animation CSS3
For making a flip roatation we use CSS3 3D property. Child elements will preserve its 3D position that is specified by Preserve-3d. The nested elements are rendered in 3D space are specified by transform-style property.
Here is the example:-
...
How to implement translations system in OpenERP/Odoo ?
The procedure to translate text in Python and JavaScript code is very similar. You could have noticed these lines at the beginning of the petstore.js file.
var _t = instance.web_t,
_lt = instance.web_lt;
These lines are simply used to ...
Convert Bitmap to ParseFile in android
Hi,
I am writing my method that convert Bitmap to ParseFile that we need to upload image on parse.com server.
Below is the method in which we just pass our bitmap of image and we get ParseFile.
We use ByteArrayOutputStream then convert i...
Displaying and Adding server-supplied data into your drop down list using AngularJs.
If you want to extract data from the server through hitting an api and display it in your dropdown list of select box using angular js, you need make a service(factory) with some functions and then inject this into your controller.
Here is the...
How to set inspection and introspection in OpenERP/Odoo ?
Odoo stores most model metadata inside a few meta-models which allow both querying the system and altering models and fields on the fly over XML-RPC.
For example code like below.
models.execute _kw(db, uid, password, 'ir.model', 'create', [{
...
How to use list() function in php ?
What is the use of list() function?
The list() function is used to assign values to a list of variables in one operation. list() function basically works on numerical arrays.
Syntax of list() function:-
list(variable1,variable2,variable3...
How to make workflow manipulations in OpenERP/Odoo ?
Workflows can be moved along by sending them signals. Instead of using the top-level execute_kw, signals are sent using exec_workflow. For example code is like below.
client = models.execute_kw(
db, uid, password,
'res.partner', 'sea...
Push Notification for iphone using laravel 4.x
There are few steps which we have to follow to implement Push Notification.
Step 1: First we will write the api to get token and device type . Here is the controller code of push notification.
public function pushNotification() {
$...
How to create more Action in OpenERP(Odoo)
Actions are used to trigger one or more actions to be performed on the server side, when a specific stage of a workflow is reached. To write this code in .xml file in openerp(odoo), use the Code given below.
<record id="company_normal_actio...
Push Notification for Android using Laravel 4.x
There are few steps which we have to follow to implement Push Notification.
Step 1: First we will write the api to get token and device type . Here is the controller code of push notification.
public function pushNotification() {
$...
How to create form in CakePHP ?
We can create form by using FormHelper class in Cake PHP.
For Example:
Create file register.ctp in (/app/view/users) directory.
<?php
echo $this->Form->create('User', array('controller'=>'users', 'action'=>'login))
echo...
How to share in whats app from Android application
Using Android Intent system we can share on whats app from our application. Whats App application have listeners that listen to intents to share media and texts.
Simply create an intent to share text, for example, and WhatsApp will be display...
Abort the current XMLHttpRequest in AJAX?
For this operation we have a function abort().
Here is the process code.
var xhr;
xhr = $.ajax({
url: 'ajax/userDetails/user_id/3',
success: function(data) {
console.log(data);
}
})
fn();
//Abort the Ajax...
ir.model.fields in OpenERP/Odoo ?
ir.model.fields provides information about the fields of Odoo models and allows adding custom fields without using Python code.
model_id: Many2one to ir.model to which the field belongs
name: the field's technical name (used in read or write)
...
load text file content from assest folder to textview
If you want to read some file from assest folder of your project then first you have to get assest folder file named read.txt.
InputStream class is used to read data or content from file, network or from memory, we can also use this input stre...
Closures in javascript?
Whenever we defined a function within another function, the inner function has accessibility for the variables in the outer function.
Following is the example of closure.
function mainFunction(outerData) {
var mainFuncData = 3;
...
ir.model in OpenERP/Odoo ?
ir.model provides information about Odoo models via its various fields. such as
name : a human-readable description of the model
model : the name of each model in the system
state : whether the model was generated in Python code (base) or by c...
How to use md5() function in php ?
What is utilization of md5() function ?
MD5 stand to Message-Digest Algorithm, and MD5 is widely utilized in security-cognate applications.
It Calculates the MD5 hash of str utilizing the RSA Data Security, and returns that hash.
So, b...
How to delete records in OpenERP/Odoo ?
Records can be deleted in bulk by providing their ids to unlink().
For example code like below.
models.execute_kw(db, uid, password, 'res.partner', 'unlink', [[id]])
check if the deleted record is still in the database
models.execute_kw(db, ...
read phone call logs in android
Android provides Cursor interface to get all calls logs. A cursor interface provides read-write to get the result set by database query.
Here stringOrder query will access phone calls date wise in desc order.
Cursor loader basically perform q...
