
Search In
Sometimes in mysql we have to count the values that are comma separated from a field in mysql. For this we will use the length function in mysql as follows:
select LENGTH(fieldname)-LENGTH( REPLACE( fieldname , ',', '' ) )+1 from tablename where TRI
If you want to create a specific page layout in OpenERP(Odoo) follow the below mentioned code in your .xml file: -
<!--?xml version="1.0" encoding="utf-8" ?-->
<openerp>
<data>
<!-- === Demo Page === -->
<templa
the horizontal alignment of a text can be set by using this property
we can aligned the Text to center or to the left or right, or justified.
Example
h1 {
text-align: center;
}
p.date {
text-align: right;
}
p.main {
text-align: justi
To set the day of the month (1-31), we use setDate() method
Example
<!DOCTYPE html>
<html>
<body>
<h1>Evon technologies</h1>
<p>The Example of setDate() method to set the date of a month</p>
<p id="z">
Hello Reader! If you having the timestamp generated by Unix and you want it to be in format of time then you can use the example code below:-
function MakeTime(TimeUnix) {
var d = new Date(TimeUnix);
var h = (d.getHours().toString().length
1> To delete an element from an array, use reject as shown below:
arr = ['a','b','c','d','e']
arr.reject! { |i| i.match('d')}
Result :=> ["a", "b", "c", "e"]
2> To delete particular keys from the array whose elements are also arrays,
To rename a table in MySQL you need to execute the following command:
RENAME TABLE old_table_name TO new_table_name;
The old_table_name must exist n the database and the new_table_name must not. For example, we have a table name demo and we want t
Hello readres, today we discuss about "Get Cookies from Php Curl into a variable?".
CURL provides an option (CURLOPT_RETURNTRANSFER) to set a callback that will be called for each response header line. The function will receive the curl object and a
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 from b
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 a random n
