Testing the basic and critical features of an application before proceeding with deep rigorous testing to make sure that there are no blocker bugs and the build is testable or not is known as smoke testing.
Whenever a build is installed,its a go...
Sometime we don't know name of the method at compile time. So pass the method name as argument and use the following lines of code.
NSString *methodname=@"calltest";
SEL aSelector = NSSelectorFromString(methodname);
NSInvocation *inv = [NS...
Blocks are a language-level feature, which allow us to create distinct segment of code.
there are three way to recognize the semaphore.
dispatch_semaphore_create =>
creates a semaphore with initial value
dispatch_semaphore_signal => i...
INTRODUCTION
An enum type in Java is a special data type that is defined whenever you need to define a variable with a set of predefined values such as Days of the Week, Months of the Year, items in a menu, etc.
KEY POINTS ABOUT ENUM
...
When we are having multiple tableviews with a common datasource we must make sure that only one table view is being reloaded at a time. We cannot load data on one table while other is scrolling as it would invoke datasource methods for the scroll...
We might face situation where we need to do something after slider is released. This may be some code that takes a bit long to execute or makes a request to server or invokes a secondary thread or any such code executing continuously with slider ...
This error generally comes when we want to delete child table row. To solve this problem we have to disable the
foreign key checks.
SET FOREIGN_KEY_CHECKS=0;
Now you can fire your query.
DELETE FROM TABLE WHERE ID = 'Somthing';
You can ena...
Add following line of code in your Plist file to open CSV and PDF file in your application. Please note that UTTypeIdentifier should be unique.
<key>CFBundleDocumentTypes</key>
<array>
<dict>
...
Re-executing the old test cases across multiple releases or built to make sure that changes or bug fixes has not affected the existing functionalities is known as regression testing.
5 Strategies should be remember while doing regression:
...
Hello friends,This code is to make custom right bar button in UINavigation bar. it helped me to make custom right bar button in UINavigation bar, Hope this will help you too.
UIButton *homeButton = [UIButton buttonWithType:UIButtonTypeCustom...
Hello Friends, these lines of code will help you to detect device orientation and set UI dynamically according to orientation.
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
NSLog(@"rotate");...
iOS Push Notification Tutorial:-
Note:- Start following steps and dont do anything else.
There are so many Gotchas while creating certificates but dont get confuse and follow these steps.
Step 1:- Generating the Certificate Signing Req...
Hello All, Following lines of code will help you to load url in UIWebView and make it fit to IPhone screen.
In .h file
IBOutlet UIWebView *webView;
In .m file
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@...
Hello All, Sometime we want to play all videos of gallery sequentially. These lines of code will help you to play videos sequentially using MPMoviePlayerController.it worked for me.
In .h file..
MPMoviePlayerController *moviePlayer;
in...
Hi Friends, sometimes we face problem in internet connectivity, With the following lines of code we can check whether we are connected to internet or not.
- (BOOL)isNetworkAvailable
{
CFNetDiagnosticRef dReference;
dReference = CFNe...
The following lines of code helped me to draw a route between two Annotation point in MKMapView
Hope this will help you in your coding
CSRouteAnnotation* routeAnnotation = (CSRouteAnnotation*)self.routeView.annotation;
// only draw o...
Cloud Testing:
In Cloud Testing we uses virtual environment on cloud. There are many companies which provide cloud testing environments in the market. In cloud testing we can use different virtual testing environments on single machine like Wi...
Following method will encode and decode NSString. Characters to leave unescaped (NULL = all escaped sequences are replaced).
- (NSString *)URLEncodedString {
CFStringRef url = CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (...
Hi ,
If anybody needs to truncate the text without any server side script then it is possible using css3. We just need to add following css to container of text:
text-overflow:ellipsis;
overflow: hidden;
width: 200px
white-space: nowrap;
...
Servlet is very powerful server side scripting language. It is a class which basically handle network request-response model. It is very powerful as we had earlier like CGI.
Basic Request-Rsponse Model
When browser send http request to jav...
In many application we need to hide the title bar of Activity/Fragment Activity. For this we need to add following line in onCreate() method before calling setContentView()
requestWindowFeature(Window.FEATURE_NO_TITLE);
Example:-
publi...
Its sometimes very tedious and time consuming to search for a product or a partner or anything by typing and still not getting the desired result and then you have to wait for the Search More wizard.
To compensate this, I have got a solution, ...
Hi All,
Below you can find the code to verify if the given text is present in the Putty Console window. Function require three parameters i.e. Object of putty, the text to verify on console and the position to search for the text( Here the allow...
Hey guys, Welcome back to "Part 4 - Types on Mask in Photoshop".
In this Blog i am gonna tell you about Quick Mask.
OK Let's get started.
Question 1: How to apply Quick Mask?
Quick Mask is simply a Mask, but slightly different from prev...
Multithreading is the process of running two or more threads executing altogether within a single program in Java. Before understanding this let me first explain what threads exactly are.
A thread is a light-weight process that runs independen...
We seldom need a code to check whether the ISBN of book we are trying to search is a valid ISBN or not. So as to validate a provided ISBN we can use the below code for ISBN10 and ISBN13 respectively :
Code for checking validity of ISBN10 :
...
It seems today every application needs background jobs, here we are going to learn how to integrate Quartz Scheduler with Spring.
Version we are using
Spring 3.x
Quartz 1.8.6
Maven 3
we have to follow few steps for configure qua...
With the help of following code you can sort the given dictionary containing key as Date.
@implementation NSMutableDictionary (SortingNSMutableDictionary)
-(NSArray *)getAllSortedKeys{
NSMutableArray *array = [NSMutableArray arrayWithA...
We have an associative array where its values are all Boolean and if we search for a string, we got true.
Lets see an example.
<?php
$array = array(
'count' => 1,
'references' => 0,
'ghosts' => 1
);
var_dump...
Rotating and zooming a view is a pretty simple task. This blog shows how rotate and zoom a view by implementing UIPinchGestureRecognizer and UIRotateGestureRecognizer.
1. Add pinch and rotate gesture recognizers to the target view. (Gesture ...
Hi guys ,
Here is a quick help of saving a class on parse cloud.
Download Parse FrameWork.
Import it.
ParseSave.m
NSMutableDictionary *dict=[[NSMutableDictionary alloc]initWithObjectsAndKeys:[data objectForKey:@"Id"],@"Id",[da...
To drag a view we can either use the touch methods of UIViewController or we can use UIPanGestureRecognizer. UIPanGestureRecognizer is much easier and simple to implement. This blog explains how to use it.
Add pan gesture to the view (or any...
Hey guys, Welcome back to "Part 3 - Types on Mask in Photoshop".
OK Let's get started.
Question 1: what is Vector Mask?
Vector means a path or shape which will not lose the quality if we increase or decrease its size.
The vector Shapes...
Issue to update shopping cart quantity in magento -
To solve the issue go to your theme's cart.phtml file find the form tag then
add
<?php echo $this->getBlockHtml(\'formkey\') ?>
after start form tag like...
Sometimes we might need to filter a list of records. For instance : We have an array of employees and we want to get all employees who live in the city Dehradun.
Here is the structure of Employee class :
@interface Employee : NSObject
@p...
Following code will help in you to check the network availability for 3G and 4G connection
const char *host_name = "google.com";
BOOL _isDataSourceAvailable = NO;
Boolean success;
//Creates a reachability reference to ...
Recently Laravel framework has been launched in the market as I am not familiar with it, because still I have not worked on this framework but it seems to be one of the best MVC framework, below link provides you an average of mostly used/popular...
Hello all, Below is the process to create Line Items in DPP (Double Click for Publishers),
To create a line item first you need to create an order if the order is already created then you don't need to do that, else every time whenever you hav...
If we have latitude and longitude with us and we need to get location name out of that from google api then we need to do the following code;
public function findlocation($lat,$long){
$url_data = 'http://maps.googleapis.com/maps/a...
Sometime we do need to send additional data while sending Push-notification on iPhone , this can be easily achieved by adding following line to your code. But one should keep in mind that apple does have a limitation of 144 character while sendin...
Following code will help you to create dynamic UITableViewCell w.r.t to its content of message.
-(void)setChatData:(ChatMessage *)messageObj memberDict:(NSDictionary *)memberDict isCurrentUser:(BOOL)isCurrentUser{
NSDictionary *user...
An electronic book is commonly known as eBook or Digital Book. Printed books are always been familiar to all the people from a very long time, as everyone from his/her childhood to older ages are involved in reading books whether it is related to...
Full Text Search is a way to provide faster search on your website. Suppose you creating a website for a newspaper where lots of article written on various subject and now you want to fetch all news related to word Modi. Full text search is ideal...
Hey guys, Welcome back to "Part 2 - Types on Mask in Photoshop".
OK Let's get started.
Question 1: How to Apply Layer Mask?
Well, It is simple.
I have an Image on layer 1 and on the next layer i have written my name "ABHISHEK".
I wan...
Hello Friends !!
If you are familiar with Photoshop then it is well and good. If you are a fresher then don't worry, Today i gonna tell you about Mask and types of Mask.
Ok now the question arise "What is Mask??"
Question 1: What is Mask?
...
Get the complete list of phonebook contacts inside the app.
We need to add two frameworks before proceed. Goo to Build Phase and Add these two:-
#import < AddressBook/AddressBook.h>
#import < AddressBookUI/AddressBookUI.h>
...
How To Create & Import a List In MailChimp?
You can create as many lists as required in your MailChimp account, but if you're looking to target specific audiences depends on your company business, It would be best if you manage one list.
...
Read/Write able paths on Unity iOS and Android
Most of the users are always worried about the path on which they can write data at runtime.
Sometimes we need to save screen shorts, or text files in our game or app.
So there I am going to g...
Hi All,
I was searching for multiple skype window in linux (Ubuntu 13.10) and found lot of options but they are quite complicated for beginners. I found a post and found a simple and working option:
1: Open run window (Alt+ F2 or direct cli...
MailChimp (Email marketing service provider)
MailChimp is an email marketing service provider, founded in 2001 or we can say that its is a web-based email marketing service which helps us to design email newsletters, share them on social netwo...