Hello Friends,
Changing the default text of search bar:
Using storyboard:
The search bar has a placeholder property, you may give it any text value as per your requirement.
Using code:
ObjectofSearchBar.placeholder = @"Your Value";
...
If you want to redirect to another page,simply use window.location property of javascript. You can use window.loacation.replace or window.loaction.href to accomplish this purpose.
If you use window.location.replace,the replace() method do not ...
In search function returns directly a RecordSet.
In below code i have explain search function.
def LinkedIn_check_similar_partner(self, cr, uid, LinkedIn_datas, context=None):
res = []
res_partner = self.pool.get('res.partne...
Hi guys,
Today, I was analyzing Bing Webamster tool to inspect crawls errors for one of my website and found 342 issues under 500 internal server error column. But I didn't find any option to fix or remove all these crawl errors just like we...
Hello Reader's!
If you are new to wordpress and need to set your own logo from admin then you can use the wordpress custom logo management in the code:-
First create of open the file, Functions.php in the root directory.
now paste the code ...
if your drupal installation having problem in implementing Clean URLs then please check your Apache is configured as mentioned below
Apache uses httpd.conf file for its configuration.
In order for Drupal to implement clean URLs, Ap...
Navigate to Logging and errors in the `DEVELOPMENT` section of the `Configuration`. This page provides a few options used to control how errors are displayed and logged
Under the ERROR MESSAGES TO DISPLAY you have three options
No...
Use a combination of JavaScript Math methods: random to generate a random value
between 0 and 1, which is then multiplied by 255.
var randomNumber = Math.floor(Math.random() * 255);
console.log(randomNumber);
The random method generates...
All major development or changes to a site should be performed on the development machine and once thoroughly tested then only be implemented to the live site.
There are chances when you have to make changes on live site directly. In t...
The best way to clone an object in javascript is to use $.extend(). We can use it in two ways:-
1.Shallow copy
2.Deep copy
1.The syntax for shallow copy is: var newObject = jQuery.extend({}, oldObject);
2.The syntax for deep copy is: ...
Why we need JavaScript Closure or uses of JavaScript Closure?
In previous blog(Introduction to JavaScript Closure and Elements for Closure Pattern), we talked about the Closure and Elements. In this blog we are going to c...
Here is the simple example of SVG animation. We use HTML structure to show svg graphics in browser.
Tags used:-
svg <svg>:- Makes the svg structure.
circle <circle>:- Element is used to draw circles.
g <g>:- Element is...
What and why we need to use Var dataType? This is one simple question that many of us might not know. So here it is, illustrated with a simple example:
When we declare any variable as int i = 0; this is an explicit conversion.
But when we wri...
Many time it happen we want the Drupal to perform certain task or action automatically We use action in drupal to automate certain task mainly task which need to be acted upon content and user account. By default there are number of simple and ad...
Welcome to Findnerd. There are simple steps to set up the zend2 on Ubuntu. We need to use the terminal for same. Please follow these steps.
A) LAMP should be installed on your system. Create a folder with any name in /var/www. We are givin...
Hey guys!
I tried using hammer.js alongside with ngHammer to recognize mobile events but it's not working so hot. distinguishing between tap/double tap is arbitrary and a little fuzzy and some other events weren't working as I expected.
Did...
Amazon EBS(Elastic Block Store) volume offers high availability and durability with capability to automatically replicate in its availability zone. To create an EBS volume follow the following steps :
1) AWS Account >> EC2 Dashboard >...
This blog is the continuation series of my last blog posted on Facebook Marketing Tips for Your Business. In earlier blog I have explained in detail various tips and techniques req...
Joomla works on positions. Position works as a placeholder in Joomla Template where we place a module. According to those positions Joomla application able to place the module to a particular portion of a page. For example, the module position le...
Hello Readers
Below is the Sorting functions in PHP:
sort(): It is an array function which is used to sorts the array and it will be arranged the elements in ascending order (lowest to highest).
Example of sort():
<?php
$su...
Math.log() function compute a natural logarithm. The method returns the natural logarithm (base E) of a number if the value of number is negative, the return value is always NaN or If the number is 0, the function returns -Infinity.
Syntax
...
Welcome to Findnerd. PHP owners modified the zend framework that is zend framework 2. We can simply download the framework setup from github that is known
as zend skeleton application. Below is the link to download.
https://github.com/zendfr...
There are two ways to dynamically access object property:-
1.Dot Notation
2.Bracket notation
var eg = {first1: "101", second: "202"};
console.log(eg.first1);
var key1 = first+1; alert(eg1); // first1
console.log(eg[key1]);
The d...
To get the user's current location use the getCurrentPosition() method. This method contains two parameters, first parameter is success for providing locationd and second one is error to handle errors for ex: getCurrentPosition(success,error)
...
Low level sql is the cursor for the current database transaction and allows executing SQL directly, either for queries which are difficult to express using the ORM
For example you can take idea from below code-
self.env.cr.execute("some_sql",...
Hello Readers
In php we count the number of elements of an array by two ways:
1. sizeof()
2. count()
sizeof()
sizeof() function is an alias of count() and it is used to count the elements of an array.
Syntax of the function siz...
Whether you are newbie web Developer or Tech Geek, WordPress is great CMS (Content Management System) platform experimenting to make a website with thousands of tweaking plugins for customization. For changing header or footer you need to install...
The delegation method is performed the reference fields automatically set up on the parent model:
For example you can take idea from below code-
class Child0(models.Model):
_name = 'delegation.child0'
field_0 = fields.Integer...
To make the submit button disable until all the fields have some values, we will be using keyup() function that provide handler to check not null values.
We disabled the register button in the starting and according to the value from handler, ...
When using _inherit but leaving out _name, the new model replaces the existing one, essentially extending it in-place. This is useful to add new fields or methods to existing models (created in other modules), or to customize or re...
When using the _inherit and _name attributes together, Odoo creates a new model using the existing one as a base. The new model gets all the fields, methods and meta-information from its base.
For example you can take idea f...
What Is Data Flow Testing?
Data flow testing is a lineage of test approaches established on choosing routes or paths throughout the schemes or programs control flow in form to inspect consequences of circumstances affiliated to the position ...
.keyup() method is used to bind an event handler with the keyup javascript event. Suppose we have an input field and we want to invoke an alert box for each key we press. Then, the event handler should be bind to that input field.
Example:
...
JavaScript Closure and Uses of Closure
What is JavaScript Closure?
In simple words Closure means- to bind local variables in a function.
A Closure is a logical statement or function that can have free variables composite with an ent...
If you want to Computed fields in OpenERP(Odoo) follow the below mentioned code and paste it in your (Python).py file:
upper = fields.Char(compute='_compute_upper',
inverse='_inverse_upper',
search='_...
If you want to mapped the records in OpenERP(Odoo) follow the below mentioned code and paste it in your (Python).py file:
# returns a list of summing two fields for each record in the set
records.mapped(lambda r: r.field1 + r.field2)
# retu...
When we type any Accented char(not all) in input field and try to submit it gets encoded to some other chars automatically. To resolve this we need to enable CharacterEncoding.
Follow the below steps in order to resolve problems with Request ...
If you want to use model reference in OpenERP(Odoo) follow the below mentioned code and paste it in your (Python).py file:
class openerp.models.Model(pool, cr)
class user(Model):
Note-Above code are created by inheriting from t...
If you want to use method decorators in OpenERP(Odoo) follow the below mentioned code and paste it in your (Python).py file:
model = self.pool.get(MODEL)
ids = model.search(cr, uid, DOMAIN, context=context)
for rec in model.browse(cr, uid, ...
If you want to open remote server folder using python in OpenERP(Odoo) follow the below mentioned code and paste it in your (Python).py file:
def copy_folder(src, dest):
if not os.access(dest, os.W_OK):
return(False)
cmd = ...
If you want to import customize module in OpenERP(Odoo) follow the below mentioned code and paste it in your (Python).py file:
import decimal_precision as dp
from osv import fields, osv, orm
from tools.translate import _
import one2many_so...
UTC stands for Coordinated Universal Time. It is the common time standard across the world.
In order to get the date-time in UTC, we need to set the timezone in UTC, like this:-
Step 1
Define your format in which you want to get date/time:-
...
Its right to call a domain a list of criteria. The point to note here is that each criterion is a triple (either a list or a tuple) of (field_name, operator, value) where:
field_name (str)
It can be defined as a field name of the current...
Hello readers, today we discuss about "How to add a simple jQuery script to WordPress?".
There are two way to add script in our wordpress.
In header.php file, and in function.php file
In header.php file you can put the below line into he...
What is SOAK Testing ?
Soak testing is a kind of performance testing. This testing is also called endurance testing. This specify the constancy and accomplishment qualities beyond the expanded time period of any system. Soak testing is a kind ...
Sometimes we need to identify the clients timezone to make some calculation on time. For example - we want to save current time based on user's timezone into database, so in this case we need to get the user's current timezone.
To do this down...
Sometimes we need to detect where ENTER key is pressed or not to do some action.
The "enter" key is represent by code 13 (ASCII value).
To detect whether ENTER key is pressed on Web-page or inside an input field, we can bind keypress() eve...
Here I have created Set Image and Image ScrollView. In the below example when we clicked Image that image will be set on page. Below example will described you how to make Image View and ScrollView.
Step(1)activity_main.xml Layout-
<?xml v...
Sometimes we need to show HTML based on some conditions, so for this we use JSTl in JSP file.
Example: In the below code I'm changinf heading based on condition.
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<h...