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

How to disable user registration in Laravel 5

Laravel 5 provides built-in user registration and login functionality which allow developer to easily integrate both functionality in their application. But some times laravel developer wants to disable the user registration or restrict user for ...

How to create an object in JavaScript

Hello all, In JavaScript we can create objects in many ways, some of them are listed below: We can create objects by using new keyword and we can assign a value to the object while creating in or we can also set the various properties of...

How to disable caching completely in Cakephp

To completely disable caching application wide, you will have to edit /app/config/core.php and change the line Configure::write(Cache.disable, true); This line is commented by default and you will have to remove comment to disable caching...

How to enable CakePHP's SQL dump in the controller

Hello All, In this blog we will discuss about how to enable the SQL dump in your CakePhp's controller. For this you have to write in below code in your controller function- $db=ConnectionManager::getDataSource('default'); $...

Spring MVC 3 and handling static content - am I missing something?

We can handle static content for example: js,css,images in Spring MVC by using mvc:resources element. mvc:resources element is used to point to the location of static content with a specific public URL pattern. For example define the bel...

How to catch phone number in string

While sending internal message on a system people usally share there phone number and making call outside the system which divert traffic from our system. So while exchanging messages within system we need to hide the phone number. This can be ac...

Android - basic gesture detection using MotionEventCompat class

Android - basic gesture detection using MotionEventCompat class A touch gesture occurs when a user places one or more fingers on the touch screen. In order to get a touch gesture of a touch event we can use GestureDetectorCompat or MotionEven...

Why I switched from CakePHP to Symfony2

CakePHP or Symphony2? This is a common question that are arising in the developers community and topic lists this may lead developers sometimes get undermine to clarify users as which is the best framework in php. Lets talk about Symphony2...

TestNG Annotations

TestNG is a testing framework and there are many annotations supported by testNG @BeforeSuite: The annotated method will be executed before all tests in the suite. @AfterSuite: The annotated method will be executed after all tests in this s...

Difference between WebApplicationContext and ApplicationContext in SpringsMVC

Well, when we start off with SpringMVC first of all we have Dependency Injection in mind and then comes ApplicationContext but when we dig deep we get stuck with a lot of issues one of which is Difference between ApplicationContext and WebApplica...

Difference between assert and verify?

Assertion: In Assertion if the verification fails in any of the testcase then the further execution of same testcase will not take place and the error will be logged but then the next testcase will be executed. For eg: If we are on the login...

How to configure PhoneGap project in Eclipse

To configure PhoneGap project in Eclipse follow the below steps- Step -1 Go to Terminal Step -2 Install frist - $ sudo npm install -g cordova. Step -3 $ cd Desktop/ Step - 4 $ cordova create Raj007 com .example.Raj007 raj Ste...

How to set the incoming email servers in OpenERP (Odoo)?

How to set the incoming email servers in OpenERP (Odoo)? Step-1 Go to settings -> General Settings Step-2 Click on configure incoming email servers->Create Step-4 Name->Server Type ->POP Server Step-5 Click On Server Informatio...

Manifest file __openerp__.py in OpenERP

In OpenERP all the content is included in Manifest file __openerp__.py. This file, which must be a Python dict literal, is responsible to- 1- Determine the XML files that will be parsed during the initialization of the server. 2- Determine...

C Loops Syntax

C provides following types of loops: for loop. while loop. do-while loop. nested loop. For Loop : Syntax: for( initialization; condition; increment/decrement) { // Statement1 //Statement2 ...

Category on View to animate subview like popup in iPhone sdk

Hi Readers, In our app we usually make custom alerts which we need to animate at the time adding it on its superview. To achieve it with you custom view make a category like this : Put this code into your .h file of category named as...

How to get date of past days in java?

To get the date of the past day you can use the below code. You can pass any number of day for which you want to get date instead of 7, I'm getting date of past 7 days in the below example: /** * Get date before past 7 days * * @return...

How to convert Model Object into JSON string and JSON string into Model Object in Java?

Sometimes we need to get JSON string direct from Model object and to read JSON values from Model object. We can do this functionality very easily by using Jackson Mapper. Follow to steps in order to do conversion from Model Object to JSON stri...

base_url in CakePHP

Hello if you want current base url(Include Domain) or Get current url. Lets take an example http:// localhost/root_folder. you just need to write the following code below:- <?php echo $this->Html->url('/', true)?>

How to disable caching completely in Cakephp?

Hello if you want to disable you website's caching complety you just need to write configure code in core.php file ex You will have to look into /app/config/core.php and look for the line Open app/config/core.php file and try to find Con...

How to implement onClickListener on a view

Hello again, this tutorial describe you to implement an OnClickListener on a view in android. This tutorial describes the two ways to implement an OnClickListener.

How to check wether the checkbox is selected or not using jquery

"How to check wether the checkbox is selected or not using jquery" While working in a project, I got stuck in the following issue. This is the code I am using: <input type="radio" name="optionsRadiosbillingmethod" id="optionsRadios1-b...

How to set the priority of testcases in testng.xml file?

We use @Test method to make a class as a part of our testcase. We can set priority by using "priority=" with @Test annotation in testng.xml file. @Test(priority=1) @Test(priority=0) Priority 0 testcase will be executed first and the...

How to get the selected text from dropdown using jquery

"How to get the selected text from dropdown using jquery" While working in Asp.Net Application I got stuck in a following issue. This is the code I am using: <select class="form-control" id="new-account-prefix" name="newaccountprefix"&g...

Change password from Custom portlet in liferay

Hello Below code will help you to implement change password from custom portlet. Please follow below steps : step 1 : create Action URL <portlet:actionURL name="updatePassword" var="updatePassword"/> step 2 : Write below c...

Data binding in AngularJs

Data-binding in AngularJs refers to the synchronization of data b/w the model and view components. When the model changes i.e if user changes in something then the view reflects the changes done. So in below example i am demonstrating you th...

How to convert NSData to NSString or vice versa in Objective C and Swift

Hi Readers! In this blog you can find both versions (Obj C & Swift) for converting NSData to NSString or vice-versa. Objective C NSString * str = @"Hello"; NSData * data =[str dataUsingEncoding:NSUTF8StringEncoding]; NSLog(@"Data = ...

How to configure testNG in Eclipse?

Follow the following steps to configure testNG in eclipse: Open Eclipse Goto Help >> Install new Software Enter URL http://beust.com/eclipse/ in "Work with" textbox and press enter. Select testNG and press next button. Now restart ...

Difference between var and dynamic in C#

"Difference between var and dynamic in C#"     To understand the differences more clearly, let us go through the following table: VAR DYNAMIC This was introduced in C# 3.0 This was introduced i...

how to consume Asp.net webservice from php client

i want to fetch data from asp.net webservice from php client. WHile doing that i got an error. 'faultstring' => string 'Server was unable to process request. ---> Input string was not in a correct format.' (length=84). I am using SOAP

Add your Application on Gallery Sharing option

Add your App on Gallery Sharing option. If you want to add image sharing from gallery option to your application, there is a perfect code for this requirement.. You just need to add these lines to your manifest file on that activity which y...

How to set the outgoing email servers in OpenERP (Odoo)?

To set the outgoing email servers in OpenERP (Odoo) follow the below steps? Step-1 Go to settings -> General Settings Step-2 Click on configure outgoing email servers->Create Step-4 Description ->Priority ->SMTP Server ->SMT...

How to configure maven in Eclipse?

Maven can be configured in two ways in eclipse. Ist method: Open Eclipse Goto Help >> Install New Software. Enter the URL "http://download.eclipse.org/technology/m2e/releases "in Work" with field and press enter button. Select m...

How to get current date with start time and end time?

Sometimes we need to get current date but we need to get time with date that starts from 12 O'clock morning and sometimes ends with 12 O'clock night. To achieve this use the below code: 1- Write the below code to set time fields to start ...

Spring MVC : How to perform validation?

Here I'm giving the example of validating form fields in a Spring Web MVC application using Bean Validation API. We'll develop a login form in Spring MVC in which we'll apply validation constraints on two fields email and password. We use the ...

SSL authentication login Script in CakePHP2.3

( https) SSL authentication login Script in CakePHP2.3 Linux server , but its working fine in normal http format could you pls help me to resolve this issue ,

Difference between px,dp,sp,dip in android

Difference between px,dp,sp,dip They all make UI compatible for Android Devices px: Its the standard pixel. We cas say actual pixel on the screen or one pixel. px = dp * (dpi / 160) dp: (Density Pixels). Its based on physical ...

How to Restore database in PostgreSQL in ubuntu

To restore database in PostgreSQL in ubuntu follow these step in terminal 1- sudo su - postgres 2- psql 3- psql -d abc1 < /home/sachin/pqr.sql abc1 = is dbname from where I am restoring backup pqr = backup file which will res...

How to set checkbox to checked in CakePhp

Hi All, In this blog we will discuss about how to set checkbox checked in cakePhp application. You should set the checkbox checked/selected with the 'selected' option. For example- You can find a list of categories from the database t...

How to take backup database in PostgreSQL in ubuntu

To take backup database in PostgreSQL in ubuntu follow these step in terminal 1- sudo su - postgres 2- psql 3- pg_dump abctest_db > /home/sachin/abc.sql Here, abctest_db = is a dbname whose backup I want to take abc.sql fil...

get_magic_quotes_gpc() function is deprecated, please help

Hi everybody, i am a newbie php programmer. get_magic_quotes_gpc() function is deprecated; Is there any function or way to create backslahes to prevent sql injection? any tips and advises will help. thanks /=======THIS IS THE FUNCTION...

Factory Pattern

Factory Method Design Pattern What is Factory Pattern? Factory pattern is one of the most commonly used design pattern. It comes under creational design pattern as we have control on object creation logic. In this approach we have control o...

AutoComplete TextView in Android

AutoComplete TextView in Android AutocompleteTextView is an editable textview, It shows dropdown box of suggested item based on the reserved word. So by using this we don't need to write complete letter. Basically AutoCompleteTextView is...

Fat models with skinny controllers in cakephp

In fat model and skinny controllers method we write our database query in model. Normally we use validation rules and model binding in our model and all query write in controllers but as we know that when url routing requests first comes to contr...

How to change user password in CakePhp using Auth

Hi All, In this blog we will discuss how to change the password in cakePhp by using Auth. Firstly, in your model you have to define a function beforeSave which will hash your password to auth password, you can do this by writing the below co...

How to use chart control in asp.net

Hello all, Working with asp.net, at times, we have to show graphical reports user which can be implemented using Chart like Area Chart, Bar Chart, Box Plot Chart, Bubble Chart, Column Chart, Doughnut Chart, Line Chart, Pie Chart etc. In my ...

Submitting current timestamp in CakePHP

Hi If you want to send curret_timestamp, you can store it by using function below. DboSource::expression('NOW()'); Lets take an example, save your timestamp in a key 'your_datetime_field' $this->data['SomeModel']['your_datetime_f...

How to Change HTML Content in JavaScript

With the help of this javascript function we can change the html content of an element., when we will click on button it will manipulate the DOM (change HTML contents). <p class="demo">Hello everyone </p> <button type="b...

Checking an Ajax request incakephp

For checking the ajax request one have to use the request handler component. In Cake PHP to obtain the information about the HTTP request as a form of AJAX which are requested into your application for that the Component Request Handler is use...
1 244 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: