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

How to get complete current URL using Cakephp Framework in PHP

If you need to print the complete current url you can do following steps. 1. In the view file code will go like this: <?php echo $this->here; ?> This syntax'll give you the absolute url starting from hostname i.e. /controller/...

Difference between Html.RenderPartial and Html.Partial

"Difference between Html.RenderPartial and Html.Partial"     Html.RenderPartial and Html.Partial both are the methods to render a Partial View in MVC Razor. Following table shows the difference between these two: ...

DropBox Login Integration Using iOS SDK

Download the DropBox SDK from the https://www.dropbox.com/developers/sync/sdks/ios add this sdk to Your project and also add some other Frameworks. 1. Foundation.framework 2. UIKit.framework 3. CoreGraphics.framework 4. QuartzCore.fra...

How to export GridView to Excel in .Net

Hello all, In asp.net we show our database records in tabular format using GridView control and to export that GridView Data to excel, we can use following code packet. protected void gridViewExportToExcel() { if (GridView.Ro...

How to bind DropDownList from DataBase in asp.net

Hello all, In asp.net we use DropDownList control which has multiple select items(options) from which we can select one. We can either set the values of DropDownList list items by hard coding it or we can also bind the the select items and se...

How to show JavaScript popup from C#

Hello all, In asp.net if we want to show JavaScript pop box from Code behind file (C# file), we can do that by using following block of code : string script = "<script language='javascript'>alert('This is a JavaScript popup');</scr...

How to wrap a Div with para tag using JavaScript

Hello all, working with richtext editor at time we have to wrap any content with para tag. To do that we have following code packet. in HTML we have: <div> <ul> <li><input type="submit" onclick="wrapWithP" /...

Declaring modules in Angularjs

A module is a container for different part of an App which includes controller, services, filters, directives and many more. We can also say that it is a collection of controllers, filters, services, directives, etc. Syntax for creating a m...

Partial view was not found or no view engine supports the searched location

"The partial view was not found or no view engine supports the searched locations."     While working on a Application of rendering Partial View in a parent View, I got the following Exception: "The partial view '~/Home/Par...

Programatically close/hide Android Soft Keyboard on Events

When there are one or more EditText in the activity, a soft keyboard automatically appears when the activity is launched, which hides some visible portion of the screen and we don't always have a requirement to automatically pop-up the soft inp...

How to use Partial View in Asp.Net MVC

"Partial View in Asp.Net MVC" Key Features: 1. The View defined inside the parent View is called the Partial View. 2. It is same like a user control (.ascx) in Asp.Net. 3. The Partial View has access to the data of the parent View. 4. ...

Facebook login using CakePHP

To create a Facebook login using cakephp we need facebook app with appId, apiKey and secret key which are required for facebook login to work. Facebook connect and enables users to authenticate your application instantly with a Facebook Account. ...

How to move data from column to row and vice versa in excel- Transpose

I have a worksheet containing data in rows and columns and I want it change or rotate the data of row to column and vice-versa, for that I have to use feature named Transpose. Lets learn this from example As in below image my data in Colum...

How to write a join query across multiple tables in CakePHP?

Fetching data from the database takes a lot time process. Eventually when you need to combine multiple tables in order to fetch the data, reducing database calls becomes very meaningful. Although in CakePhp's model, by default if the associat...

How to make Custom Error pages in Asp.Net MVC

"Custom Error pages in Asp.Net MVC"     In this article we will learn how to make custom error pages in Asp.Net MVC. Getting Started:     By default if we get any exception while running our code, w...

Close/hide the Android Soft Keyboard

When we perform any action on button click and many times we have seen that the keyboard is open and the further activities are going on. The opened keyboard looks very bad on the screen. So to over come this problem here is the method to close t...

How to use Generic bind() Function

Here's an example of a generic bind() function, applied directly to an anonymous event handler. The object in XML Request gets bound to its onreadystatechange() event. The search string variable is being pre-applied as well. when the parseMes...

ASP.NET MVC Do's and Dont's or Best Practices

Hello Friends, Asp.net MVC is now getting more popular day by day, So before dealing with MVC we need to understand some Do's and Dont's of it. This blog will help you to understand Do's and Dont's of ASP.NET MVC. ASP.NET MVC Do's and Dont's ...

Fetch profile pic from Facebook

For some reasons Facebook doesnt provide profile picture with user info dictionary/data. We need to fetch profile pic using graph api. Once user is done with successful authentication he can use following snippet to get profile picture URL. ...

Deleting a list of objects in Entity Framework

Entity framework provides numerous ways to batch delete the objects from Database. Below are the step for way 1 : Load objects that has to be deleted in memory. Remove the objects from context And then save these changes. This statemen...

How to remove unwanted Namespace in asp.net C#

Hiii All.. Working with asp.net we use using statement to add name space to our code behind file (C# file) if we want to use any specific namespace, but if there are unused using statement that are present in your code than it can cause perfor...

Send mail using iOS

Sometimes we need to send the email from iOS application for that we have to integrate MFMailComposeViewController in our application so that we can send email. This program will help you to send email through your app using swift. Steps Requ...

How to View and Download a file in Asp.Net MVC Application

"Returning a file to View/Download in MVC"     In this article I will try to explain how to view and download a file in Asp.Net MVC Application. Let us understand it with the help of the folowing example. Getting Starte...

Some Optimization and Performance Tricks in .Net

Hi Friends. My "Hello World" blog in MVC is taking some time ,so I thought that I should share some performance tips here. Some of them are followed by code and explanations and I believe that you'll find them useful. Static Methods are Faste...

What are Contextual filters in Drupal Views

Contextual filters are much similar as regular filters in views. The only and main difference between them is in the way values are fetched. A contextual filter allows user to filter content based on dynamic information rather then setting a valu...

PHP functions for applying user defined functions on array values.

There are two predefined functions in PHP for applying user defined function on each element of an array. 1. array_walk() : array_walk() applied a user function on each element of an array. It returns TRUE on success and FALSE on failure. The...

Submit form data in Ajax

We will learn here, how we can submit form data with the help of Ajax. First step:- Create index.html file and create a form with the three labels/fields:- Name,Email and Superhero Alias. Inside head tag we have included one css file and ...

Hide and reopen menu icons from Action Bar when search view expand's and close respectively

To hide other menu items from ActionBar/Toolbar when SearchView is expanded or open you need to apply OnSearchClickListener on it. On the onCreateOptionsMenu method set OnSearchClickListener like this:- // hide other menu item when SearchView...

How to check null value in NSDictionary

Hi , If you want to check the null values in NSDictionary then use the following code : id value = [dict valueForKey:akey]; if (value == [NSNull null] || value == nil || value == NULL || value == Nil || [valu...

Sending Email in android

Email is any message distributed by electronic means. For sending email from our application, we dont have to built email client from scratch. We can implement existing one like Gmail, outlook etc. We use ACTION_SEND action to launch an ex...

Formatting currency using Angular

Hi all, Here is an example how to format currency using Angular filters. Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default symbol for current locale is used. - AngularJS HTML:- <body ng...

The server response was: 5.5.1 Authentication Required

"Error - The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required."     While I was integrating Email functionality using Gmail SMTP Server in ...

How to Send email with attachment using Gmail SMTP Server in ASP.Net

" Send email with attachment using Gmail SMTP Server in ASP.Net. "     In this article I will discuss how to integrate the email functionality along with the attachment in a Asp.Net Application. Getting Started: Step ...

How to generate a dropdownlist control in asp.net mvc using HTML helpers

Hello All, In MVC (Model, View and Controllers), to create a dropdownlist control we use HTML helpers which helps us to to create various HTML and server side controls. A dropdownlist is a collection of objects of SelectListItem class in .n...

Top 5 features of Android 5.0 Lollipop

Android has reached to its current peak position in the mobile market by three factors - 1. Open Source to work. 2. Google's backing. 3. Application Ecosystem. Recently, Google has launched new version of Android, Name, Android 5.0 Lollipop....

How can we find the number of days between given two dates on php 5.3 and above

Hi if you are using php version 5.3 or greater then some functions are really very quick to write and use. In this blog I am calculating the days between your given two dates. This is by far the most accurate way of calculating the differenc...

Insertion in Linklist at Different Places

Insertion in Linklist:- The Insertion of Element in Singly linklist at different places like: insertion at beginning, last and middle in the linklist. In below code I will show you how to insert the element in linklist at beginning, middle and la...

Removing data from a list on click using angular

Hi all, Below is an example to remove names from a list using ng-click. Here is a simple form for editing, adding or removing user name, all of these methods are declared on the controller. These methods can easily be called from the angul...

How to use Razor View Engine in Asp.Net

"Introduction to Razor View Engine"     Razor is used to create dynamic Web pages, it supports both C# as well as VB.Net. Razor is used like a markup syntax for adding server-side code to web pages inorder to make them dyn...

looping list using ng-repeat

Hi folks, The below example will demonstrate how to do looping over lists in templates using ng-repeat. <html ng-app="nameApp"> <head> <meta charset="utf-8"> <title>Angular.js Example</title> ...

Initializing the model using an Angular controller

Hi all, Below example will demonstrate, How to Initializing the model using an Angular controller, defined with a global function. <html ng-app="nameApp"> <head> <meta charset="utf-8"> <title>Angular.js ...

Get all modified files of all commits in a branch

We can check the modified files of a branch using: git status But it will list all those files which are not committed. Once these will be committed "git status" will not list these files. For this we can use following command which will ...

How to use Phonegap SoftKeyboard Plugin for Android?

Hello All, Here I am sharing some information to include and use of the SoftKeyboard Plugin for Android. 1.Install SoftKeyboard plugin using the latest version from GitHub: $ cordova plugin add https://github.com/phonostar/PhoneGap-Soft...

Spring Security: Obtaining current username (i.e. SecurityContext) information in a bean?

Instead of calling static method inside the controller like below: @RequestMapping(value="/welcome", method = RequestMethod.GET) public String getUserDetails(ModelMap model) { Authentication authentication = SecurityContextHolder.getCont...

Sprint Security: Getting Active user's UserDetails

We can easily get active user's UserDetails in Spring Security. Spring Security provides "org.springframework.security.core.Authentication" which provides the required API for retrieving the logged in user details. The methods of this class are g...

How to use Variables in Stylus

Hi Guys, We can use variables in Stylus like the example given below. $fontColor = #000 $basefont = 'Raleway' sans-serif; How can use this ? .block font-size 15em color $fontColor font-family $basefont You ...

How to inherit a class in stylus

Hello all, In prior tutorial I have explained you about Stylus and Creating Syntax in Stylus. Now in this Tutorial I have demonstrated examples to inherit a class in stylus. @extend We can use @extend for inherit the css class check the...

Looping over list in template using ng-repeat (angularJS)

The ngRepeat directive instantiates a template once per item from a collection. Each template instance gets its own scope, where the given loop variable is set to the current collection item, and $index is set to the item index or key. - angularJ...

C# Naming Conventions and Coding Standards

"C# Naming Conventions and Coding Standards" Naming Convention:     Basicaly three types of naming conventions are used in C#, Camel, Pascal and Hungarian. We should use PascalCasing for class names and method names: ...

Spring MVC @PathVariable getting truncated

We generally face a problem when we hit server with path variable that contains special character like dot(.) it gets truncated. For Example: If you have the mapping @RequestMapping(value = "/findMe/{emailId}", method = RequestMethod.GET) ...
1 223 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: