REST using jersey in springs.

RESTful web services A RESTful web accommodations are predicated on HTTP methods and the concept of REST. A RESTFul web service defines the base URI for the accommodations, the fortified MIME-types and operations like POST, GET, etc. JAX-RS...

jQuery - Selectors

jQuery Selectors are used to find out matching elements and select one or more HTML elements using jQuery and then perform operations on them. Factory function is a synonym of jQuery() function start with the dollar sign and parentheses $(...

What is unwrap() in jquery method ?

Hello Readers, unwrap() is the jquery method which is used to removes the element of the parent of the selected or matched element in jquery and after that it returns the jquery object as a result. Syntax : $(selector).unwrap() In ...

How to split an Image in android

I am facing problem to split an Image. Please help me to find out the solution. Please share any library if you know.

How to take frame from video

Please provide me the solution to take frame from video in android If you have code. Please share it.

Executing a parameterised bat file in C#

In one of my recent projects, I had to execute a bat file which was expecting one argument before execution. Content of bat file was like this : "%~dp0phantomjs.exe" "%~dp0..\examples\rasterize.js" "%1" "%~dp0twingle.jpg" If you Analise t...

How to create table using PDO in PHP?

PDO is PHP Data Objects which is used to connect to any database. Benefit of using PDO is that if there is any problem in our query it has an exception class to handle it. If any exception thrown to the try block, the script stops and directly fl...

Best Practice for Creating Quality Backlinks

In my recent blog, I have written about the topic Natural Link Building & Attributes of Quality Backlinks, in which I described completely what is natural link building and what are ...

How to convert a string to uppercase and lowercase?

Convert a string to uppercase: strtoupper() function is used to convert a string to uppercase. It convert all characters of string to uppercase. Syntax: strtoupper(string) You have to pass only one parameter to the function i.e., th...

How to remove index.php in Codelgniter URL

Hello Friends, If you are looking to remove index.php from URL. By default Codelginter Path will appear like this "http://www.abc.com/index.php/users/userinfo", if you want to change this with "http://www.abc.com/users/userinfo" //Replace y...

How to covert first character and every word of a string to Uppercase?

Convert first character to uppercase: To convert first character of a string to uppercase we use a function in PHP ucfirst(). Syntax: ucfirst(string) This function includes only one parameter that is the string whose first character...

How to generates and returns pdf version of a report in openerp?

In openerp you make a request to read the assets while the transaction creating is not done and As the assets are generated during the same transaction and the rendering of the templates will call them. There is a scenario where the assets are un...

aggregrate function mysql

Aggregrate function is a function which returns single value by performing a calculation on a set of values.MySQL provides many aggregate functions such as AVG, COUNT, SUM, MIN, MAX, etc. MIN returns the smallest value in a given column MI...

Opening the current HTML in a new tab

Here is the exmaple for opening your HTML in a new tab with jQuery, first we define a function for the window in which we take variables for the tab (w) and for HTML (html) that will be opened in a new tab. Then we define a click event from whic...

How to use image in background with color ?

Hi Guys, Here i am posting that how you can use image with color in background. <div> block { background: #1e7f00 url("http://api.ning.com/files/rBZCY6X2uOlTJ8P9qLiTaHrX71x-bhRd9qAkTQBwNkSJPHtbC0Md09jy7l2JFbAGIWeexn8YrPUqqxKklZ5...

How to remove nil elements from an array in Rails

We can remove nil elements from an array in number of ways. Here i am demonstrating the frequently used methods for removing nil elements from an array. 1> using present method with reject >> [ "a", nil, "b", nil, "c", nil ].reje...

How to add custom logo in wordpress

Many of the wordpress themes are having options in admin panel for uploading and changing the logo. But if we want to make a custom logo that is used in converting HTML to wordpress or for making any custom wordpress theme or we do not have any o...

How to preview an image on its click from a list of images using angularjs

In this example I have a list of images that loads after getting the response. I want to preview the image which is clicked. So I am sending the images url and its unique id into the click function and then comparing the ids, display that image o...

How to create a custom two-dimensional Array in javascript

Hello friends, Most of time we need to create 2-D array in javascript but javascript does not provide direct syntax of multidimensional array . But we can create custom two-dimensional array in javascript. For Example : var myarray=new Arra...

How to use library in Zend Framework

Hello Friends, If you are you looking to implement any Zend library in your development. Please follow the below example for the same. Here we are using mailing library in the below example: 1) Include library path as below include '/def...

how to get questions with jquery,ajax,php

have a quiz script. My script contains quiz.js, getquestions.php, insertresults.php. In quiz.js: var i = 1; var sec = 20; var timetaken = 0; var answer; var points; var result = .5; var score = 0; var f = new Date(); var duration; var...

cal_info() Function

cal_info() Function in PHP as the name suggests, is the function that returns the information about a particular calender that you have specified. Syntax: cal_info(calendar); In above function there is only one parameter which is the c...

How to convert XML to JSON using PHP

Hello readers, In this blog I guide you "How to convert XML to JSON using PHP" Below is the 2 example converting XML to JSON. 1. example $xml = simplexml_load_string($xml_string); $json = json_encode($xml); $array = json_decode($json,T...

How to convert hexadecimal values to ASCII characters?

To convert hexadecimal values to ASCII characters we will use a PHP function hex2bin(). Syntax: hex2bin(string); In above line we have a passed a parameter string in the function which is basically the hexadecimal value that we need t...

What is the difference between isset and array_key_exists in PHP

Hello Everyone today I guide you "What is the difference between isset and array_key_exists in PHP" The below example helps you to differentiate between isset() and array_key_exists() . isset() will only return true or false array_key_exists...

What is parent() method in jquery ?

Hello Readers, parent() is the jquery method which is used to return the parent element of the given selector or the current element in jquery. We use parent() method without parameter as default but if we pass any parameter inside the parent(...

How to write custom mysql query in CakePHP

Hello Friends, Some time we need implement custom mysql queries in CakePHP. If you are looking to implement custom mysql query in cake php please follow the below example: // Define your query and replace this with query written below $qu...

How to create getter and setter methods in Ruby

Ruby setter & getter methods are similar to properties used in .net. They are used to access the instance variables of a class outside the class using the object of the class. By default instance variables are only accessible inside the insta...

Showing confirm dialog box using cordova-plugin-dialogs

This plugin provides us some native dialog elements that are much more customizable than the browers dialogs. There are some methods in it:- navigator.notification.alert navigator.notification.confirm navigator.notification.prom...

How to show pdf file in html page

Hello all, While playing with of code, we came across a situation where had to show a pdf file in our html page and to do that, I found a very simple solution where showed the file by passing the file path to the src attribute of the iframe. ...

mysqli_num_fields() in PHP

The mysqli_num_fields() function is used to display the number of fields in a result set. In other words, you can say that it returns the number of columns that is coming from a select query. Syntax: mysqli_num_fields(result); In above...

Filtering multiple variables

Here we will learn how to filter multiple variable using the filter_var_array() function.It returns an array of values for all the requested variables else it will return FALSE if failed. Example $abcd = array ( "firstname" =>...

SQL Tutorial -> Sql Joins

<-- Chapter 24: SQL Aliases Chapter 25 SQL Joins SQL Joins clause are used to combine data rows from two or more than two tables according to common field values between them. Lets see an examples from the below tables "customer...

Laravel with Bootstrap open modal or popup automatically

Hi Readers, If you are using Bootstrap in your application you should use modal to show popups in your web application. Modal is a very nice feature provided by the Bootstrap to show nice and beautiful popups which can be easily modifiable...

What does keyword 'var' do in PHP

Hello readers, In this blog I will help you to know "What does keyword 'var' do in PHP ?" It's regarding declaring class new member factors inside PHP4, and it will no longer needed. It'll operate inside PHP5, however it will increase an E_STR...

How to generates and returns html version of a report in openerp

In openerp If the report is using a custom model to render its html and fallback on the generic html rendering. report is generates and returns html version of a new report. use this function in your own module in .py file, def get_html(...

How to resize iframe dynamically

Hello all, While working on a project, we came across a situation where we had an iframe that had dynamic content inside it, and to make our page responsive, we were not allowed to give fix height to the iframe, but since the iframe had th...

setting portlet preferences from portlet controller in liferay

Hello Guys Portlet preferences is use for layout setup in liferay. Here, We have setup layout from controller of the custom portlet in liferay. Follow the below steps to setup layout: Step 1: add below lines in Liferay-portlet.xml ...

Inserting data using replace statement

REPLACE INTO Statement: It is used to insert a row in a table.It is similar to INSERT INTO statement but it does not allow duplicate row as it replaces the old one with the new one. Syntax: REPLACE INTO tablename (column1, column2, col...

How to create and Allow to render a QWeb template python-side openerp

In openerp render function returns the 'ir.ui.view' but embellish it with some variables/methods used in reports. param values is additional methods/variables used in the rendering returns is html representation of the template. use this code sh...

How to change the color of placeholder ?

Here I am posting that how to change the color of placeholder. you can use the code below. ::-webkit-input-placeholder { color: red; } :-moz-placeholder { /* Firefox 18- */ color: red; } ::-moz-placeholder { /* Firefox 19+ */ ...

SQL: WHERE ,AND and OR Clause

1. SQL WHERE Clause:- SQL WHERE Clause is one of the most useful feature of the SQL query as it is used to specify a condition while fetching the data from single table or joining with multiple tables,it also allows you to select specific ...

Difference between DELETE and TRUNCATE in MySQL.

In MySQL, DELETE and TRUNCATE both are used for deleting data from table. DELETE DELETE comes under DML(Data Manipulation Language). DELETE can be used to delete a particular row by using WHERE clause. It is slower than TRUNCATE as...

How to create Simple Client in python

In python simple client program opens a connection to a given port 9876543 and given host. It is very simple to create a socket client using Python's socket module function. The socket.connect(hosname, port ) opens a TCP connection to hostname on...

Constructors in Ruby

Ruby also supports constructors like other Object Oriented Languages. Constructors are used to initialize the instance variables. In most of the Object Oriented Languages constructors has the same name as that of the class, and does not have any ...

How to create A Simple Server in python

In python simple server is Internet servers, we use the socket function available in socket module to create a socket object. After then a socket object is used to call other functions to setup a socket server. after this call bind(hostname, port...

how to detect search engine bots using php

Hello readers today I will guide you "To detect search engine bots using php". Search Engine Bots:- Search engines refers to, generally people which make use of programmed software program providers referred to as spiders, crawlers, software i...

How to display random image from a directory?

To display images from a directory randomly first of all we will give the path to the directory. Then we will select the directory. After that we will open the directory and will get all the files of the directory. <?php $Image_Path = "";...

Displaying date into a particular format using angularjs

In angular we are provided with date $filter that formats date to a string based on the requested format. There are several formats.Some of them are :- 'medium': equivalent to 'MMM d, y h:mm:ss a' for en_US locale (e.g. Dec 4 201512:05:08 ...

How to integrate adaptive payment in php

Adaptive payment provides facility to allow payment between sender and multiple recievers. Steps for adaptive payment are as follows:- 1 First need to create app for paypal. Get username,passsword,applicationid and signature recieved fr...
1 153 292