
Search In
Hi! :)
Today we're going to take a first look at the Unity3D game development engine. This engine is pretty easy to use and has gained a lot of popularity in recent years. It supports multiple languages (including C#) and multiple operating systems
Opening a .pdf file in new window
On the First page write the following code:-
string Url = "Wite the url of the page to be opened";
ClientScript.RegisterStartupScript(this.GetType(), "", "window.open('" + Url + "');", true);
On the second page
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
