
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
How to make SeekBar in android?
Below code will help you to created SeekBar function in android. In android SeekBar is used by the end user, the user can drag the left and right to move the progress of runing file like audio song, video song etc. In the below code example, I h...
Odoo Tree View
If you want to make tree view in OpenERP(Odoo) follow the below mentioned code and paste it in your .xml file: -
<tree string="Idea list">
<field name="name">
<field name="inventor_id">
</field></field>...
Generic view declaration in Odoo
If you want generic view declaration in OpenERP(Odoo) use the below mentioned code by pasting it in your .xml file: -
<record model="ir.ui.view" id="view_id">
<field name="name">view.name</field>
<field name="mo...
How to replace any string using str_replace function in PHP
Hello Readers ,
While doing web development many times we stuck with the concept of str_replace .
For understanding this, let's suppose we have one email template file stored in project directory and when we going to replace any string dyna...
Urlencode and Urldecode in php
Hello Readers
Urlencode can be used to encode the given string that can be used as a url. Urlencode replaces the ASCII characters with % followed by two hexadecimal digits.
OR
Other non-alphanumeric characters are converted % followed...
if-else in jstl
In JSTL, the functionality if-else is provided by choose-when-otherwise statement .
<c:choose> tag is an enclosing tag for <c:when> and <c:otherwise>. And it is also known as mutual exclusion as only a block of code withi...
Hiding all the URL in a text except a particular one
There was a requirement of hiding all the wesite URL in a message except for a particular one. While looking for a solution I came across a particular solution which I think might help other .
params[:meal_note] = params[:meal_note].gsub(/...
How to validate file extension and size before upload?
Here is the example to validate the file extension and size before upload. Regular expression has been used to validate the file extension. And to validate file size, we use size property of file input i.e., img.files[0].size. Onclick event of bu...
Using rescue in single line
We can use rescue in single line to return a value if code of that line raise an error/exception, example shown below-:
Let say we have a hash:
person = {:name => "ABC"}
person[:name].downcase # "abc"
...
Send data through ajax call and receive Json response from controller in Springs
Here is the sample code implementing ajax call to send the data of a form to the controller and receiving json response from controller.
Student.java
Create a java bean class and generate setter and getter.
public class Student
{
...
How to make Digital clock in android?
Using below code I have created Digital clock app in android. Android digital clock is used to show time in android app. In android, digitalclock is the sub class of TextView class. Here below code example will help you create Digital Clock funct...
How to get the data of a form in javascript?
We can use the serialize() method to get the data of a form. This method creates a text string in URL-encoded notation by serializing form values. It helps to select more than one element of the form.
Syntax:
$(selector).serilaize();
...
How to detect if user click inside and outside of an Iframe
Hello Reader's! If you are developing the contents with Iframe window and you want make it show the click inside and outside the iframe, Then you can use the code below:-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
&...
Odoo Actions and Menus
Action- There are different types of actions in Odoo:
1- Window: Opening of a new window
2- Report: The printing of a report
3- Custom Report: The personalized reports or RML Report: The XSL:RML reports
4- Execut...
How to Build an Odoo module
If you want to build an Odoo module in OpenERP(Odoo) follow the below mentioned step.
For creation of any module in Odoo you have to make four files,given below-
1-__init__.py // its indicate the import instructions for various Python fi...
How to Start/Stop the Odoo server ?
If you want to Start/Stop the Odoo server in OpenERP(Odoo) follow the below mentioned step-
Step-1 Go to the start menu-> Service-> search service ->Select line and click on it.
Step-2 After that Restart/Start/Stop's buttons .
That...
Java Interview Coding problems for Freshers- Part III
In the previous part, Java Interview Questions and Answers Part I and Java Interview Coding problems for Freshers- Part II, we have explained some basic questions of Java. This part is in continuation with the previous Java Interview Questions an...
How to search a specific column in all the tables of database?
Hello All,
Working with the SQL Database, I wanted to search a specific column in all the tables of database and to do that I use the following code packet.
SELECT TABLE_NAME,COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME LI...
Remove duplication from array list
If you want to remove duplicate entries from your array list you can use hash set to make all items unique rather than use of algorithms.
Set is a ordered collection of items and contains only unique items. And Hashset creates a collection th...
Discussions and notifications in Odoo
One is likely to mistake Odoos technical models for directly fulfilling business needs. The models actually enable to add capabilities to business objects, by eliminating the need of building them by hand.
Odoo's email and messaging system, ca...
Editing in the Odoo administration
If you want to setup editing in the Odoo administration in OpenERP(Odoo) follow the below mentioned code and paste it in your model.py file -
model.py
'data': [
'security/ir.model.access.csv',
'templates.xml',
...
Issue: Fatal Error while Debugging in Godaddy Shared Server
Hello readers today we discuss about the Godaddy shared server issue.
Yesterday I faced issue in Godaddy shared server. When I navigate our site sometime link break and blank page come, but when I reload or refresh again the page is working fi...
Field edition in Odoo
If you want to make field edition in OpenERP(Odoo) follow the below mentioned code and paste it in your models .py file: -
_name = 'test.demo'
name = fields.Char()
biography = fields.Html()
academy/templates.xml
...
Drupal 7 Adding Javascript and CSS file
including both of them to.info file
scripts[] = hello_world.js
stylesheets[screen][] = hello_world.css
Adding a JavaScript file and a CSS file to a page
$path = drupal_get_path('module', 'hello_world');
drupal_add_js($path . ...
User login to appear in a block
There could be a situation where you need to call login on multiple pages or block the below snippet of code could be helpful in this situation
Calling the form function directly could help you getting the login form in a block or page
...
URLs and routing in Odoo
Hello Friends,
If you want to use urls and routing in OpenERP(Odoo) paste the below mentioned code in your .controllers.py file: -
'Url': url.search([])
})
@http.route('/academy//', auth='public', website=True)
d...
How to show loading icon while page is loading
Hello Reader's, If your webpage is taking too long to take data from database and you want to fix a loading icon for the time then you can use the following Javascript based code for that:-
First Step:-
Write the following code just after yo...
How to create progress bar for uploading file using PHP
Hello Reader's!, If you are developing the html 5 based form and need to show the progress bar of file uploading then you can use the following code written in PHP and Javascript:-
The PHP html file will be go like this:-
<?php
//get ...
Drupal t() function and translations
syntax :
t($string, array $args = array(), array $options = array())
Every string that may be displayed to a user should be wrapped in the t() function actually it takes the responsibility for translating strings from one language into ot...
Ruby Overriding
Ruby is a object oriented programming language , it support to provide a specific implementation to the methods of subclasses that is already defined in superclasses . If there is any method in subclasses is same as the method of superclass then ...
Digital Marketing and Traditional Marketing: The Difference
Source: pinagkaiba.blogspot.com
For ages, marketing has been the most important cog in the wheel of brand establishment, and with technology advancement, it has only become easier and more effective to reach out masses to market a prod...
How to make a cookie with no expire lifetime
Hello Reader's If you have writing the code that makes the cookies for valid lifetime then you just need to set big number for it's validity. As the example below PHP code:-
Maximum value: 2147483647
setcookie("CookieName", "CookieValue", ...
Caputre Screen Shot in IPhone
if you want to capture the screen shot of the screen in swift use the code below. this function will return an image that can be used as background image of a view
The size of the captured image is same as the size of device.
func caputreSc...
How to check if a user has liked your Facebook page or not
Hello Reader's, If you are making the code for facebook page likes details and you want to know if the user has already liked your page or not, Then you can use the following library code for that :-
<html>
<head>
<scrip...
FIND_IN_SET() Function in MySql
find_in_set() is a function which returns the position of a string within second string.
We mostly found a situation where we want to fetch records on the basis of particular string and that string are stored in comma separated values in data...
Laravel 4 eloquent WHERE with OR AND OR?
In Laravel 4.x we can easily use where condition with OR AND OR .Below is the example of this
Example:
User::where(function ($query) {
$query->where('a', '=', 1)
->orWhere('b', '=', 1);
})->where(function ($query)...
Laravel 5.0 Including Sub View Into Another View
Many times we need some sections of HTML which need to be incorporated in many views and just to reduce redundancy we create separate views for it.
An example to accomplish that is stated below:-
Including other views in other view synt...
What are the best practices and best places for laravel 4 helpers or basic functions?
Many user will make a helper in app folder but if you want to use helper the best practice and best place to use Laravel 4.x helper in app/libraries folder.
So all the basic function and helper we should define in app/libraries.
Advantage o...
Laravel 5.0 Writing Static Query In Laravel
Many times we needs to write static query in Laravel. Some time due to the complexity of the query or sometime due to the MYSQL build in functions not supported in the Query Builder or in Eloquent in Laravel example LPAD. Thus at that time Larave...
How to Stop Search Engines from Indexing a Particular Pages
Hello Friends,
Sometimes we need to remove URL/Pages/Directory from indexing in Various search engine. So in this Blog we will be discussing about various method to disallow or stop major search engine from indexing search engine crawler like ...
Laravel check if related model exists
Below is the situation which I want to solve
I have an Eloquent model which has a related model:
public function option() {
return $this->hasOne('RepairOption', 'repair_item_id');
}
public function setOptionArray...
PHP Getting Time Elapsed Per Last Comment
Passing date to the function and returning the time passed or elapsed when it was commented/posted. It is very useful when you have comment section in your website and you want to show how earlier comment was posted.
/**
* Creating the dat...
Present UIViewController in swift from storyboard or XIB
Hi All,
If you want to present UIViewController in swift from storyboard . For example :- FirstViewController.swift is a viewcontroller in your Storyboard with storyboard Identifier FirstViewController then to present this viewcontroller use t...
Get the query executed in Laravel 4.x
In Laravel 4.x, We have a function by which we can run our query the syntax is
Syntax:
DB::getQueryLog()
By using this function We can run our query.
Example
$queries = DB::getQueryLog();
$last_query = end($queries);
We hav...
Oops and its features
Hello Readers
Oops was introduced in php version 4 but the area of php version 4 is not very fast, as version 4 consists few features, hence the major concept of Oops are introduced in php version 5 which is called php5.
Oops include the b...
How to search parse DB in iOS app
No separate method is provided to do search in Parse document. Following code can be used to search a column .
PFQuery *query = [PFUser query];
[query whereKey:@"username" hasPrefix:searchText.lowercaseString];
[query whereKey:@"obj...
Could not execute command 'lessc' in odoo-9
If "Could not execute command 'lessc'" Error ocour while installing odoo-9 and the login page will not show clearly.
Then use this six command in terminal and run it one by one
1- sudo apt-get install nodejs
2- sudo apt-get install npm
3-...
Laravel 5.0 Relationship In Laravel And How To Use It
In laravel we can create relation between the tables and can use them where ever we need it we need not to create custom queries or use query builder to retrieve data. I have written one of example of my worked project.
//hasOne relationsh...
How to get Directory size using PHP
Hello Reader's!, If you are looking for a code that can give the directory size from a given path, Then you can use below library code for both Windows and Linux hosting:-
If on a Windows Host:
<?
$filePath = 'c:/www/myfolder';
...
How to create zip folder on server with linux terminal or putty
If you are looking to create zip folder on your server with terminal or putty, please follow the step below:
1) Get connected with server
ssh -i "/pemfilepath/my_server.pem" username@serverIP
2) Replace your pem file path and username ...