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

How to use another model in current model using cakephp?

Hi If you want a condition where you can load another model inside you model. you can do as I code, see the example below App::import('Model', 'MyModel'); $my_model = new MyModel(); Or you can write $this->SomeModel->MyModel;...

How to load Vendors in CakePhp

Loading vendors usually means you are loading packages , so in CakePHP you can use: App::import('Vendor',''); As an expample if you want to load a vendor named recurly which is saved in your app's Vendor folder and you want to access the...

How to create a DropDownList from an Enum in ASP.NET MVC

"Creating a DropDownList from an Enum in ASP.NET MVC"     In this article I will try to explain, how can we bind an Enum to a DropDownList in ASP.NET MVC. Let us understand it with the help of an example: Step 1: Crea...

Updating one field in database using CakePhp

Updation in CakePHP is basically based on knowing the primary key(Id) of the records one wants to change/edit. You can update a field in CakePhp by two ways:- a)By using saveField method $this->ModelName->id=$id; $this->Mode...

cakephp excel/csv export component

Hello, If you want to add CSV export component using cake php, for that you can do by following steps:- First take the controller file and create an action, the code will go like this:- <?php class Export_my_dataController extend...

Directives in Angular Js

AngularJS directives are what controls the rendering of the HTML inside an AngularJS application, it also lets you to extends HTML by adding the directives. In angular js directives are represented by prefix ng- Some of the mostly used di...

What is the equivalent to getLastInsertId() in Cakephp?

Hello if you want to get last insert id or something equivalent to this you can try following steps:- Lets take this example, Here I just inserted the field in column $data = array('menuName' =$_REQUEST['menuname']) $this->Menu...

Implementing Singleton in C#

Hello Friends, This blog explains how to implement singleton design pattern in c#. So lets start with few basic things:-- What is Singleton ? A singleton is a class which only allows one instance of itself to be created - and gives s...

Variables in JAVA

Variable is a name. Variable name reserved an area which is allocated in memory. In java each and every variable has some specific type, this specific type defines the size in variable's memory. One should declare variables before used. Eg. ...

How to load xml data into sql server table using SqlBulkCopy

Hello all Working with SQL Server we have to copy data from multiple sources and from this purpose we can use SqlBulkCopy Class which helps us to bulk copy data from different data sources to SQL Server database. This class is present in the S...

What is a .ctp file used for in CakePHP?

CakePHP provides user to do advance view designing and making custom architecture for designing, for quick web developments. The CTP file extension is associated with the CakePHP. Ctp file contains template CakePHP template. It is as same as a...

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 set crone for scheduling Push notifications?

hello I want to send automatic server notifications (push) on every Sunday. Also is there any way how to activate the new links activate only after 24 hrs.

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...
1 245 292
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: