Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

ImageView takes Full Width

Below is the code to adjust ImageView taking full width. It is mainly required when we need to show cover photos which take the full width of the screen. The images that are in landscape looks ok, but we find a problem with the portrait pic...

Open facebook, twitter and linkedIn user profile using username

Sometimes we need to open user profile of Facebook, Twitter or LinkedIn by using the username in android. To do this, we just create a uri to open the profile. We can implement this in onclick() of any view. For Facebook: String url =...

Functions in MySQL

Function is a predefined program in which we pass the parameters and it return a value. There are two types of function create function and predefined functions. Create function- Like other languages we can also create function in MySQL. Below...

Javascript Dialog box

Dialog Box: A dialog box is a temporary window used to retrieve user input while creating application. It can be used to raise or alert and to get the confirmation of input from the user Types of Dialog box: Alert dialog box Confirmation...

How to swap two variables in one line in Java?

How to swap two variables in one line in Java? // Java program to swap two variables in single line class Demo { public static void main (String[] args) { int a = 6, b = 11; a = a ^ b ^ (b = a); System.out.prin...

UIAlertController in iOS

For iOS 8 and above Apple have introduced UIAlertController to present action Sheet and alerts. In order to present alert set preferredStyle to UIAlertControllerStyleAlert and for actionSheet preferredStyle to UIAlertControllerStyleActionShee...

Creating Svg in Android

Creating Svg images reduces the effort of putting different resolution drawable (png's). Steps to Create Svg images. Right Click on drawable folder,Select New ,Select Vector Image. (view attachment vector_asset.png). Choose the material ...

StringBuffer in Java

StringBuffer: As we know in Java String is immutable means we cannot reassign a new value to the same string object. That's why in Java to provide mutability we use either StringBuffer or StringBuilder. StringBuffer is a class in Java which pr...

FORM VALIDATION USING JAVASCRIPT

We can do validation of a form which is created in html by using javascript. In below example if we do not put any thing in fname field, then validateName function will alert a message that Name field is empty. eg:- function validateN...

Arithmetic operations by using only one variable

Hey Guys, Today we are going to perform Arithmetic operations by using only one variable. It means, if we have define a single variable for loops or anything else then it must be used for all the operation. So, here, your only friend is ...

Saving data into internal storage location in Android

Android provide many ways to store or save data of an application, like Shared Preferences, internal storage,external storage, SQLite database and storage on network. Here we will learn how to save data in the internal memory of the android de...

Panel controls in ASP.NET

Panel control is works as a container for static text and other controls or we can say that it acts as a parent for other controls in a web page. It displays or hides the other controls as per the need of the program. Uses of panel control:- 1...

:nth-child in css

The :nth-child selector in CSS code is here it will allow you to select one or more elements according to the formula. It is used to style content based on parent and child relationship. :nth-child iterates throughs elements from the top ...

Set the maximum date in UIDatePicker to Today

To set the maximum date of date picker in ios to today. for example , if we want to pick the date of birth of a user then the date is can not be greater then today date . So we can use following step to set the maximum date of datePicker ...

OVERRIDING IN JAVA

Overriding method is different than overloading, as in overloading of a method, their are more than one method with same name but different parameter with in same class unlike this, In overriding of a method, a method in child class(sub class) ha...

SORT FUNCTIONS FOR ARRAY IN PHP

Below are the php sort functions use for sorting an array in php. sort() - This sort function is used for sorting an array in ascending order in php. rsort() - This sort function is used for sorting an array in descending order in php. as...

CONCEPT OF EVEN AND ODD RULE.

CONCEPT OF EVEN AND ODD RULE USED IN A ROW- Readability of rows in a large table is hard to read and understand but it can be easily verified by using even odd concept. FOR EXAMPLE Following Table have 7 row and 6 columns. The number of eve...

How to make a textfield multiline?

We have textfield of 150px and we have a string that is too long to fit into this 150px container, How can we make a textfield multiline if needed? For this:- There is property of textfield 'TextFieldAutoSize'. var tf:TextField = new Te...

Purpose of onerror event handler in javascript

In JavaScript onerror is a Document Object Model event handler. It occurs when error occur during object loading. In JavaScript window.onerror is used as an event handler, there is no error event being triggered: Alternatively, when the exceptio...

Shared Preferences in Android

Android provide many ways to store or save data of an application, one of the method is using Shared Preferences. Shared Preferences are used to store and retrieve primitive data information(such as int, boolean, and String). The data is stored i...

Sort a stack using recursion in C?

Sort a stack using recursion in C Sort a stack means inserting elements in Stack in sorted order.The sorting is to be implemented using recursion. In this first a stack is created by pushing elements into it then by popping elements from it,so...

ACHIEVING ABSTRACTION BY INTERFACES IN JAVA

Abstraction is a concept which shows only important(essential) feature and hide background details. In other way, abstraction shows only those things to user which are important and hides the background details. In java we can achieve abstractio...

Minification in Javascript

Minification in Javascript: Minification means removing/clearing. In javacript, Minification is the process of removing all characters(i.e extra whitespace, comments, new line characters, etc.) from the javascript source code that are not ne...

How to stop a video in AVplayer in iOS

For those who are new & trying to use AVplayer in their iphone apps,i would like to share that AVplayer has in built functions for only PLAY & PAUSE as "[self.myAvPlayer play]; & [self.myAvPlayer pause];",which are handy to use,where...

Validation Group in asp.net

Try to understand it with an Example:consider the image below. Here the problem is that whenever I'll click on Login button, only textboxes of the Login section(UserName and Password) needs to be validated. And whenever I'll click on the "...

LITERAL IN JAVA

LITERAL IN JAVA A literal is a value that may be assigned to a primitive or string variable or passed as an argument to a method call. Literals can be any thing like number, text or other information who represents a value. Literals a...

How to Set frame of a Video in Avplayer in iOS

While using AVplayer in iOS sumtimes the video frames are not proportionate to the iphone screen that can led to distortion in UI of your app,therefore to overcome this problem we have to use a simple piece of code.. Go to the function -(v...

Activity and its life cycle in Android?

An activity represents a single screen with user interface(UI) i.e.,a window with which you interact with your android phone. It is a pre-defined class in Android and every android application which has a UI must inherit it to create a window.Us...

OVERLOADING IN JAVA

In java we can define more than one method inside one class(same class), whose names are same until their parameters or signature are different. This process or method of having more than one method within same class with different parameters or ...

UpdatePanel Control

UpdatePanel Control 1)UpdatePanel Control is available in ASP.NET AJAX package. 2)This control allows partial rendering of the page i.e.it AJAX'ify controls contained within it. This control allows to refresh selected parts of the page inst...

Future of web designed is RWD:-

RWD:RESPONSIVE WEB DESIGNED is making the elements and pages responsive for all devices. A responsive website consist of CSS3, ,media queries and @media rule, flexible images, flexible videos, and fluid type, all of which allow responsive websi...

Exception handling statement in javascript

In JavaScript try/catch/finally are called exception handling statements. In JavaScript try/catch/finally statement manage some or all of the errors that might occur in a block of code. Try/catch/finally in JavaScript lets you deal with exception...

Which Code Editor is Best to teach PHP?

So Friends, There are such a variety of decisions out there nowadays with regards to composing PHP code. Here are only a couple of prevalent IDE: Notepad++ NetBeans Superb Text Dreamweaver jEdit Eclipse What's more, there are...

difference between HAS_ONE and BELONGS_TO association in rails?

Has_one and Belongs_to relationship sometime become confusing so the main difference can be explained with the help of example: 1>Has_one :- class Department < ActiveRecord::Base has_one: employee end this means that employee tab...

How to run a program without a main metod in JAVA?

First of all see the following program:: public class Hello{ static{ System.out.print("Hello! Running Java program without main method.") System.exit(0); } } The output of above program will be:: Hello! Run...

Printf() function inside another Printf(function)

What happens when you use a printf() function inside another printf() function. To understand this lets see the following example: #include<stdio.h> int main() { int number = 1234; printf("%d", printf("%d", printf("%d", number)))...

Use of AVG() Function in MySql

The MySql provides us with various for wide use for handling the database. The AVG() function is also one of the important function used in MySql. The AVG() is used to calculate the average value of the columns. Syntax: SELECT AVG(column-n...

Function parameters in javascript

We know that in JavaScript functions have parameters function(parameter1, parameter2, parameter3) { code to be executed } // here function is the name of the function Rules for the parameters We do not specify data types fo...

Reversing a string without using library function

In this c program we are reversing a string without using library function( Strrev). we are using a temporary variable store for reversing the string. #include<stdio.h> #include<string.h> int main() { char str[100], s...

Early binding and Late binding

In C++ program the compiler converts every statement in machine language of one or more lines, during compiled time. Every line is provided with the unique address. So each function of the program is provided with the unique machine language addr...

Arrow functions

Arrow functions are the functions that have a shorter syntax compared to function expressions and arrow function lexically bind the this value. Arrow functions effectively turn function (arguments) { expression } into arguments => expression a...

How to reverse a number without using % operator?

#include<string.h> int main() { int number1, number2; char str[10]; printf("\nEnter a Number:::"); scanf("%d", &number1); sprintf(str, "%d", number1);//step 1 strrev(str);//step 2 number2 = atoi(str);/...

TOP Clause in SQL

SELECT TOP clause: TOP clause is used to fetch specific number of records from a table. This clause is very handy when we have huge table of thousands of record in it . And fetching data from these tables are quite time-consuming , in ...

Finding frequency of a character in a string

This program is all about finding how many times a character comes in a string. In the program there is a count variable which will be incremented if the same character appears again and then that count variable will be printed. #include &l...

Steps to connect to the Oracle Database using JDBC in Java

Steps to connect to the database in java using JDBC for Oracle database 1) Driver class is registered The driver class is registered first with the help of the forName() method. e.g. Class.forName("oracle.jdbc.driver.OracleDriver"); ...

ACHIEVING ABSTRACTION BY ABSTRACT CLASS IN JAVA

Abstraction Abstraction is a concept which shows only important(essential) feature and hide background details. In other way, abstraction shows only those things to user which are important and hides the background details. for eg :- examp...

Interfaces in java

Interface: Interface is similar to class and represented by interface keyword. It contain only pure abstract methods means only declaration of methods is given inside interface and the class which implements it write the body for that ...

Types of validation controls in ASP.NET

Validation is an essential part of any web application. It is used to validate user input data. Before sending the user's input to different layers it must be validated. Validation is of two types:- 1. CLIENT SIDE- client side validation is c...

Difference between call by value and call by reference in java

1) Call by value: When you are passing values of primitive data types as arguments to the function , then a copy of the values is created and the changes which are done are reflected in the duplicate values and hence, the original values rem...

INHERITANCE IN JAVA

Inheritance is a process where sub class have same properties then its super class. In this process sub class acquire all the characteristics of its super class. By using inheritance we can manage information in hierarchical manner. The c...
1 127 269
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: