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

Thread Safe Dictionary (ConcurrentDictionary)

.NET has introduced a thread safe dictionary (4.0 onward). Essentially, it does something similar like conventional dictionary plus lock system. Read the MSDN documentation for the same at following link: http://msdn.microsoft.com/en-us/library...

Objects message sending and receiving in Objective C

In Objective C language one don't "invoke a method on object" it "passes the message to object". Between these to concepts "calling a method" and "message passing", there is no major difference in implementation but they are different in executio...

How to repeat header row in LibreOffice

In order to repeat header row in LibreOffice do following: Format->Print Ranges->Rows to Repeat > Edit Print Ranges Print range -entire sheet Rows to repeat -user defined- $1:$5 ...

Inheritance in Objective C

Inheritance in Objective C can be done by Subclassing. Here is an example of inheritance that works in objective-c. **In Rectangle.h** @interface Rectangle: NSObject @property (nonatomic) int width; @property (nonatomic) int height; ...

Dependency resolution process in spring framework

The Spring IoC container performs bean dependency resolution : The ApplicationContext is created and initialized with configuration metadata that describes all the beans. Configuration metadata can be specified via XML, Java code or annotat...

How to remove trailing white-spaces automatically in Sublime Text Editor

Did you ever think if trailing white-spaces could be removed automatically from file before saving it in Sublime Text Editor? Sublime Text Editor is very liberal to provide such a functionality without installing any extra plugins. Follow t...

NSLog with Locale

NSLocale class provides information about system language like the language that iPhone is currently running on, the list of supported language etc. To get the current language code use following lines of code. NSString *code = [[NSLocale c...

How to underline label text of UIButton?

Underlining title text of UIButton can be done with attributed string using following code (In this case yourTitleLabelText is title text for button and yourButtonObject is button object): NSMutableAttributedString *titleString = [[NSMutableAt...

Push Notification in iOS8 and other versions

PushNotification code for Latest iOS8 and earlier versions. You need to find out the iOS version first. Use below Macro keys for iOS check:- #define IS_iOS7 [[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0?YES:NO #define IS_...

Protocols it's usage and Types

Protocols are powerful functionality provided by iOS. These are set of behavior that is expected from an object to behave/respond in a given situation. Protocols are set of methods and properties. One can define protocol as: @protocol protoco...

NSDictionary

NSDictionary class represents an unordered collection of objects associate each value with a key. Create NSDictionary NSDictionary *cars = @{ @"Mercedes" : @"Benz SLK250"], @"BMW M3 Coupe" : @"M3 Coupe", @"Honda" : @"Civi...

Passing block as function argument in Objective C

Yes, we can pass the Block as argument in function. Here it is : let suppose i create a class Downloader First declare a Block in Downloader.h: typedef void (^DownloadComplete)(double,double,double,BOOL,id,id); then declare method a...

ApplicationContextAware and BeanNameAware Interfaces in Spring

ApplicationContextAware Interface : Like in every web applications, we can also use application context in Spring Framework. Spring Framework provide this object in a different way. One way is that, to create new instance every time when you need...

Bean Definition Inheritance in Spring

Spring Bean Definition Inheritance: Spring Framework provides the facility of Inheritance in it's bean configuration file. Bean configuration consists lots of configuration regarding of bean like bean's id, name, class, properties etc. Spring bea...

Press Release Creation for Announcing the Company's News or Event

Releasing the Company's news related to the launch of a new product or service, hosting of an event or a function is an efficient way to grab immediate attention of audience which is an important & first step needed to market any product or s...

How to load ApplicationContext in spring framwork?

ApplicationContext is an interface and it's provides configuration information to an application. Here multiple classes are provided by springframework that implements this interface and helps us to use configuration information in applications. ...

Setter-based and constructor based dependency injection in Spring

In this blog I am going to explain you about the Spring Framework implementation of the Inversion of Control (IoC), which is also known as Dependency Injection (DI). DI is a process in which objects define their dependencies and the other objects...

Weak and Strong Reference

Strong- A strong reference means we want to own that object we are referencing with property or variable. Any object assign to this property will not be destroyed as long as it is not assign to strong reference. Weak - A weak reference is not...

How to read data from CSV file in Java?

Sometimes we need to read data from a CSV file as per requirement. You can easily read the data from CSV file by following the below steps: Write the following Maven configuration in pom.xml file in your project: <dependency> ...

Creating Custom Scope in Spring

Using Custom Scopes, we can define new scope as well as modify the existing scope. Custom Scope is useful for following scenarios- creating a bean scope where beans can be shared between servlet contexts creating a bean scope where bean...

Instantiating beans using static factory and instance factory in Spring

The benefit of using the spring framework is the masterful beans management by the IOC container. Spring framework confers options to impart the IOC container to use the factory methods for creating the instances. Types of factory methods: 1....

Liferay Development Setup on Windows 8 64 bit

Below document will assist you in creating Liferay Development environment on Windows 8 64 bit OS. Please be noted that you need at least 2 GB RAM for Liferay to work smoothly. For more details on development, customization and consultation, plea...

Monetize your Application by adding Ad banners in your android application

Adding ad banners into you app To monetize your app you can add advertisements and earn revenues based on viewers visiting the ads. You'll see below how easily you can add advertisement banners through Admob. Admobs is a Google acquired company...

Spring @Component Example

In Spring Framework normally we register all our components or beans in the XML configuration file. So when program runs spring container scan this XML file for beans and instantiate the bean components as per requirement. In the case of big proj...

NSMutableSet

Add/Remove objects from a NSMutableSet. If you want to remove add or remove objects from NSMutableSet follow the below code- NSMutableSet *brokenCars = [NSMutableSet setWithObjects: @"Honda Civic", @"Nissan Vers...

How to combine two NSSet objects?

Hello all, If you want to combine to NSSet objects, use the below code- NSSet *affordableMakes = [NSSet setWithObjects:@"Ford", @"Honda", @"Nissan", @"Toyota", nil]; NSSet *fancyMakes = [NSSet setWithObj...

Merge code: Branch to Trunk on SVN

Hello all, If you want to Merge code: Branch to Trunk on SVN or you can say it in other way "SVN Merge - Branch to Trunk", for this you have to follow 3 simple steps as given below- Do the following step to Merge code: Branch to Trunk on SV...

NSSet

An NSSet object represents a static, unordered collection of distinct objects. NSSet/NSMutableSet, NSArray/NSMutableArray, and NSDictionary/NSMutableDictionary are the three core collection classes . NSSet is immutable and NSMutableSet is mu...

NSArray with different functions and operations.

NSArray and NSMutableArray are Objective-Cs general array types. It represents an ordered collection of objects, and it provides a high-level interface for sorting and manipulating lists of data. NSArray are immutable type where NSMutableArray...

Spring Bean Life Cycle: Initialization & Destruction

Spring Bean Life Cycle has two core start and end points, namely Initialization and Destruction. When bean is instantiated it require set of actions which need to performed those are set into Initialization callbacks/method and one which are requ...

How to initialize method using Spring-beans

Hello Guy's Bellow code will help you to initialize method using Spring-beans.Here, I am using init and destroy method as attribute in bean configuration for bean to perform assigned actions upon initialization and destruction. Follow the be...

Spring @PostConstruct and @PreDestroy

Spring Framework @PostConstruct and @PreDestroy annotations are used to just like life cycle callback methods. @PostConstruct and @PreDestroy are used widely for the process of bean initialization and to free resources at the time of bean destruc...

Life Cycle and Callback Methods in Spring Bean

Spring Framework defines some callback methods at the time of bean life cycle. These callback methods are used to perform some useful operations between the bean initialization to bean destroy. Spring provide two interface InitializingBean and Di...

OpenERP module configuration file

How to Make an OpenERP module configuration file?: It is very simple to Create a module in OpenErp. All you need to know is the basic structure of any module to be used in the system. So if you want to make a simple module in openerp, here ...

What is Glimpse in asp.net and MVC?

Glimpse is an open source tool to Check the performance of every page in asp.net OR MVC. You can install it in very simple way. 1. search the key word Glimpse in NuGet and you will find different versions for Glimpe Asp.Net, Glimpe MVC, Glimpe ...

How to deal with Out of Memory Exception in Android ?

How to deal with Out of Memory exception in android: In android we encounter with out of memory exception many times. The reasons are we don't have expanding memory and completely dependent on device the memory available on phone. So we don't...

Auto detect Components in Spring.

When we define the annotations @Component, @Service, @Repository, @Controller with classes, Spring automatically scan and identifies those classes and register the Bean definition with the ApplicationContext. The @Component annotations are: ...

Spring Collections Examples

Spring supports collection framework, the list of collections Spring framework supports are List, Set, Map, and Properties. Spring allow us to inject the values at the time of bean definition in XML configuration file. Tags used to inject coll...

Spring Inner bean

Inner beans in spring are those beans which are under the scope of another beans. In spring framework normally to inject a bean, we define it first on container with some id and pass the reference of that bean wherever dependency is needed, using...

Block variable in objective C

Block access the data in normal way as the other normal function do. Block can access any class variable or function variable out side it but cannot modified it. int x= 111; void (^printXAndY)(int) = ^(int y) { printf("%d %d\n", x, y);...

Delete all documents form solr

Hello all, If you want to Delete all documents from solr, follow any one of the step given below. There are 2 ways to do this. 1. http://localhost:8983/solr/update?stream.body=<delete><query>*:*</query></delete>&a...

idref Element in Spring

Spring idref Attribute : The idref is an attribute used in spring configuration. In spring, idref is used to pass the id or name of a bean as a string to other bean. Before using the idref, ensure that the bean must be defined in configuration w...

replacement of the deprecated sizeWithFont: method in iOS 7

we all know NSString method sizeWithFont [@"abacfe" sizeWithFont:[UIFont systemFontOfSize:11] constrainedToSize:maximumLabelSize lineBreakMode:NSLineBreakByCharWrapping]; deprecated in iOS 7. So here is the replacement of this method. ...

@Resource annotaion in Spring

@Resource annotation allows you to specify a name of the injected bean. @Resource annotation takes a 'name' attribute which will be treated as the bean name we want to inject in the class. In other words we can say, it follows by-name autowiring ...

When to use copy Attribute in declaring a property in objective c

We all use attributes in Objective C to declare properties. Attributes commonly used are strong, nonatomic, weak, assign. But we never take it seriously why we are using these attributes. One of the common mistakes I often see is the wrong us...

BeanPostProcessor in Spring

BeanPostProcessor :- It is an interface that defines callback methods by which you can provide your own instantiation logic and your own custom logic before and after the bean creation. along with this you can perform some additional logic or y...

What is use of synthesize?

The @property and @synthesize keywords simply automate the creation of getter and setter methods, @interface MyClass : NSObject @property int value; @end   @implementation MyClass @synthesize value; @end The @property keyword d...

depends-on attributes in spring

dependsOn attribute for loading the depended beans referenced by another bean. dependsOn is a bean tag that can indicate bean depends on another bean . In this Example we can see when ApplicationContext Container is initialize first it...

How to use Autowire With Qualifiers?

In Spring we use @Qualifier to indicate which bean we want to qualify to autowired on a field. when we create multiple beans of the same type( for example: Department) and want to autowire only one of them with a property in some other class (...

__weak and __unsafe_retained

__weak and __unsafe_unretained are the ownership qualifiers introduced by LLVM Compiler 3.0. By default all pointers are __strong under ARC which means that when an object is assigned to a pointer, it is retained for as long as that pointer re...
1 245 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: