
Search In
Steps to Create a WCF service in Visual Studio 2010
1.To create a new WCF service application project, go to File->New->Project. Then select WCF under Visual C# installed templates and then select wcf service application.
2.In the solution ex
Method to cut image in Objective-c/cocoa (OSX)
-(IBAction)cutItem:(id)sender
{
hasBeenDragged = NO;
NSImage *_sourceImage = [self image];
float width = selectedArea.size.width;
float height = selectedArea.size.height;
float cente
Export Data to Excel
First get the data in a DataTable and call the below function.
if (dtGetData.Rows.Count > 0)
{
string filename = "ExcelName.xls";
System.IO.StringWriter tw = new System.IO.StringWriter();
Error after running Maven install
Error: Unable to locate the Javac Compiler in:
C:\Program Files (x86)\Java\jre6..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most
With the following method stated below you can crop an UIImageView.
-(UIImage *)cropedImage:(UIView *)view{
UIGraphicsBeginImageContextWithOptions(view.frame.size, imageView.opaque, 4.0);
CGContextRef c = UIGraphicsGetCurrentContext();
Use the below code for cutting UIImage in high quality without blur (not screenshot)
tmp is image view
<p>UIGraphicsBeginImageContextWithOptions(tmp.frame.size,YES, 4.0);</p>
<p>CGContextRef c = UIGraphicsGetCurrentContext();<
Block are piece of code introduced in ios 4.0. Block are used to make code cleaner and reduce dependency from delegates.
To use the block first we have to declare the block and then its definition.
Here is the syntax to declare to the Block.
retur
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);
};
print
Array in C# works as it works in any other language except few differences. When we declare an array we must use a square bracket ([ ]) after the data type.
int[ ] number
Unlike c arrays, in c# size of array is not part of its type. This allows u
Following steps help you to set the JAVA_HOME Environment Variable in Windows OS
First check where the Java Development Kit is installed.
Usually path would be similar to one below:
C:\Program Files\Java\jdk1.6.0_10
Copy this path and do followin