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 refresh all modules and database at a time in OpenERP (Odoo)?
Step-1 Go to terminal -> Start the OpenERP Server-> and enter the below commands
Step-2 ~/workspace/OE7_Test$ ./openerp-server
Step-3 ~/workspace/OE7_Test$ ./openerp-server u all Database name
So this will Refresh all the modul...
How to send SMS via Asp.Net Application
"Send SMS via Asp.Net Application"
In this article I will explain how to send Free single/bulk SMS through Asp.Net Application.
There are many websites that allow sending free messages such as Way2...
How to hide the field in OpenERP (Odoo) ?
To hide the field first we have to go in .XML file (OpenERP)
After that we have to decide where we want to hide the field and then give attribute invisible to that field.
As in example below, .XMLcode in XML file : -
<record id="view_or...
Read and Write JSON data in MySQL
Store JSON in MYSQL:- Here below snippet will show you how we can store json data in mysql and read the json data from mysql and convert into a java object. Remember that the field where you can store the JSON data in mysql to set data type of t...
Using Enum.TryParse for parsing value to enum
This is a demo of using Enum.TryParse method for converting string values to enum type.
We have function Enum.TryParse under System namespace in Enum class. This method is used for parsing string values to enum type. Signature of the method is...
ASP.Net MVC-What's inside-Part1
The previous article shows a conceptual flow in ASP.Net MVC framework. There we saw that the controller is the central point of execution in MVC.And as you have gone through two theoretical articles on MVC flow, I think you've understood why con...
Send email using gmail SMTP C#
This is a simple C# program that send email to recipient. It uses gmail smtp.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Mail;
using System.Net;
namespace SendEmail
{
cl...
How to change the theme or highlighted color of EditText
In order to change the theme or highlighted color of EditText do the following steps:-
1) Create colors.xml file inside the values folder (if you don't have) and then declare colors
<color name="ColorPrimary">#4484F6</color>
<...
How to connect to Sql Server in C#.Net
To Create the DataBase Connectin locally with the sql server using c#.net some steps need to be follow .
But Before establish the connection with the database the sql server need to be configured .
Steps to connect with sql server is given be...
How to show alert view in Swift (iOS8) with OK and Cancel button?
To show an alert view in swift while using iOS8.
Here is an example of how to use it:
var MyAlert = UIAlertController(title: "Logout", message: "Are you sure?", preferredStyle: UIAlertControllerStyle.Alert)
var MyOkayAction = UIAlertAction...
Add new element to an array in javascript
Javascript provide us a push() method by using this method we can add new element in to the array.
Ex:-
var name = ["Amit", "Rohit", "Manoj"]; // existing array with names
name.push("Kapil"); // adding new element
Output:-
name arra...
Difference between 'var' and 'let' in swift programming language
In Swift, both defines a variable.
The let keyword define a constant like
let api_key = 42979
The api_key cannot be changed afterwards; Its value is set once and only once
The var define an ordinary variable that hold the data like
...
How to show an alert view in Swift Programming Language?
To show an alert in Swift programming language, you need to first import the UIKit framework then use UIAlertController object.
A UIAlertController object displays an alert message to the user.
Important: UIAlertView is deprecated in iOS 8....
ORDER BY keyword in SQL
We use ORDER BY to make our record list in a ordered manner in the sense of descending /ascending sort.
Syntax:-
SELECT column_name, column_name
FROM table_name
ORDER BY column_name ASC|DESC
Note:- User can ORDER BY more then o...
Simulating click event in Javascript or Faking Javascript click event..
<script>
function fakeClick(event, objId) {
var obj=document.getElementById(objId);
if (obj.click) {
obj.click()
} else if(document.createEvent) {
if(event.target !== obj) {
var evt = document.createEvent("MouseEven...
Mail function PHP
PHP provides us a predefined function named as mail() for sending mails.
Syntax:
mail(to,subject,message,headers,parameters);
Ex:-
$mail_msg = "This is my test mail";
mail("abc@gmail.com","My subject",$mail_msg); // Sent mail
...
Reverse a string php
We have predefined function name as strrev() to reverse a string in php.
Syntax is:-
strrev(string);
Ex:-
$data = "Good Book";
$reverse = strrev($data);
echo $reverse;
Output is:- kooB dooG
Count No. of words in a string php
User can count the number of words in a string using php predefined function name as str_word_count()
Syntax is:
str_word_count(string name);
Ex:-
$string = "This is new text";
$count = str_word_count($string);
echo $count;
...
Handling Child Javascript Window Close events
More often than not you want to create a child window and want to capture its events. This example simply captures its close event.
var childWindow = window.open("new.html");
function doStuffOnUnload() {
alert("Child Windows Cl...
Implement Stack Using Dynamic LinkList
Stack:- The Below code can shown you how to implement stack using dynamic linklist in data structure using C. We can insert the node dynamically and the Linklist works on principal Last-In-First-Out(LIFO).
#include<stdio.h>
#include<...
Liferay: Enable custom password on Registration form
You can enable custom password on Registration form. Use the below steps to enable custom password on Registration form:
If portal-ext.properties is not available then you can manually create portal-ext.properties file into the /tomcat-7.0.4...
Select Image from Device
Hi,
If you want to select image from device in Xcode, you can use the below code for this.
#import <uikit.h>
@interface ViewController : UIViewController<UIImagePickerControllerDelegate,UINavigationControllerDelegate>
{
...
Liferay: Make screen name auto-generated on Registration
There is Screen name field on Liferay registration form, you can hide that field and make screen name auto-generated.
Use the below steps to make screen name auto-generated on Registration:
If portal-ext.properties is not available then ...
Read and Write the Structure in File using C ( File Handling )
File Handling in C:- The File handling is used in c to store the information in file. we can read the data from file and write the data into file for securing your data. Here the below example can show you how to write and read the data of struct...
Liferay: Hide Birthday and Gender fields from Registration form
You can hide Birthday and Gender fields from Registration form. Use the below steps to hide Birthday and Gender fields from Registration form:
If portal-ext.properties is not available then you can manually create portal-ext.properties file ...
Horizontal slide toggle
Hi all,
If you would like to have the horizontal toggle options, according to example when you click on the button to slide, it will play the animation reversed and hide the element. See the below example to toggle slide a div.
Script:-
...
How to use DIV tags as TABLE layout ?
Hi Folks,
This article is about, how to use DIV tags as table layout using CSS. Sometime we all face some problem with table layout in creating responsive design. Here I am using the class name same as table layout and I hope it will be more c...
Error:A potentially dangerous Request.Form value was detected from the client
"A potentially dangerous Request.Form value was detected from the client "
If the "ValidateRequest" is set to true and someone tries to submit HTML content (Example:<a> Hello </a>) to the server, this error occurs...
Phonegap apps plugins installation issue
When we use cordova plugin in phonegap apps, sometimes we get plugin installation error. We can get rid of from this error by first installing plugman.
The code to install plugman is given below. hit it in terminal and then we can install cam...
Java.lang.OutOfMemoryError: Java heap space
If you are facing following exception while running your code:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
Default size of most of JVM Java Heap Space is around 64MB, it can easily ran out of memory if your appl...
Deleting information from database in android
Deleting record from database using Sqlite Helper class.
We have taken Name, Age and City as input from user and saving them on click of Save button and deleting on click of Delete button from database.
MainActivity.java
public class Ma...
Loops(Control statement ) in Swift
For loop:
In swift there are two types of for
loop:
1: for-in loop
for-in loop with Array:
let myIntArray = [
10,20,30,40,50,60,70];
var index = 0;
for value in myIntArray {
println(" MyIntArray[\(index)]=\(value));
...
Perspective mockup using CSS
Hello all,
Below is an example, how to create 3D mockup to create this you should know about css Transfrom and about pseudo class.
CSS:-
div{height:240px;width: 160px;background: #ccc; position: relative;
top:40px;padding:5px;bo...
How to protect rails application sql injection
There are times when SQL injection is the most shocking attacks on the internet. SQL injection means a condition where user is molding a SQL query in a unexpected form.If the queries are not handled properly it can lead to results like leaking of...
Asp.Net Website v/s Asp.Net Web Application
"WebSite v/s Web Application"
In this article we will try to find out the differences between the WebSite and a WebApplication.
Generally a WebSite is defined as a collection of web pages, i.e it can be defined by its ...
Loading module/class from lib folder in Rails 3
Autoloading of modules/classes from lib directory is no more supported by Rails 3. There has been number of if and buts in its support and against but unfortunately it has been removed. While lazy loading was a very good feature where developer n...
Read and Write the File in C ( File Handling )
File Handling in C:- The below example will show you how you can read the data from file and write the data in file using C language.
file.c
#include<stdio.h>
#include<conio.h>
#include<process.h>
#define true 1
main()...
Implementation of Insertion Sort in C
Insertion Sort:- The Insertion sort is used to sort an array. The array can be sorted in each round means, In each Iteration of an array the element can be find in sorted.
Steps:-
1: The second element of array compared with the elements w...
Blogging or Video Blogging Both are Advantageous
As we all know that Change is only Constant in this World. To meet those changes and pace-up with the world people keep on joining hands with new technologies. These new technologies have rapidly grown in the world of Blogging which has transform...
Showing camera view inside html in android and then snap a picture
Hello All
Today we will discuss about Showing camera view inside html in android and then click a picture:
In PhoneGap we can Show Camera view inside HTML. Before we proceed with the plugin let me give you a walk-through of its features.
Th...
Reading information from database in Android
Storing and reading record from database using Sqlite Helper class.
We have taken Name, Age and City as input from user and saving them on click of Save button and reading on click of Fetch Data button from database.
MainActivity.java
p...
Liferay Integaration with Log4j
Liferay+Log4j:- This blog will show you how you can implement logging in Liferay with Log4j. By using this you can use the custom logging using Log4j in Lifeary. To make this possible follow the below steps:-
1. Create log4j.xml and log4j.dtd...
How to integrate PAYPAL for future payment
Hello Readers
To integrate PayPal in an ios application for future payment , the following steps need to be followed:
Step 1: Download the PayPal ios sdk from the link given below:
[https://github.com/paypal/PayPal-iOS-SDK][1]
Step 2 : ...
Rollover with a Mouse Event
With the help of JavaScript and html we create a "Rollover with a mouse event" function. Here we have two images. when we place mouse over image(1), the image(1) changes to image (2) and when we move the mouse away from that image, the original i...
Saving information in database in Android
Storing record in database using Sqlite Helper class.
We have taken Name, Age and City as input from user and saving them on click of Save button in database.
MainActivity.java
public class MainActivity extends Activity {
CreateDat...
How to iterate or remove all key object from NSUserDefaults
Hi Readers,
In any iPhone app if it is needed to iterate or remove NSUserDefault keys (as in logout feature), following code can be used:
To iterate key objects:
NSUserDefaults *userDefault = [NSUserDefaults standardUserDefaults];
...
Handle NSLog in iPhone sdk
Through this code we can use NSLOG whenever required. Write this snippet in some common file(say utility) so that it would be easily handled throughout the project. Make sure class should import utility class to handle NSLog.
All you need is to ...
How to get Common Values from two Arrays
This is a simple method to compare two arrays and get all the common objects from these arrays.
Take two arrays(say firstArray & secondArray)
NSMutableSet* arraySet1 = [NSMutableSet setWithArray:firstArray]; //create NSMutableSet for f...
Spring AOP Pointcut, Advisor
Spring AOP :- In Spring we can use AOP module. The AOP is Aspect Oriented Programming that works on cross-cutting concerns. This breaks the program logic into distinct part and these cross-cutting concerns are separated from the business logic of...
Tuples in Swift
Tuples is a new concept that is introduced in swift programing. Tuples group the multiple values in a single compound value. It is not necessary that the each tuples value should have the same datatype. The datatype can be different and number of...