Search Results

Search found 63 results on 3 pages for 'aman virk'.

Page 1/3 | 1 2 3  | Next Page >

  • Here i m sending my code for presentmodelViewController

    - by aman-gupta
    Hi Please help me out i want to switch to first view from third view directly here is my code:-where i m using presentModelViewcontroller // // ExperimentAppDelegate.h // Experiment // // Created by Aman on 4/20/10. // Copyright __MyCompanyName__ 2010. All rights reserved. // #import <UIKit/UIKit.h> @class ExperimentViewController; @class SecondView; @class ThirdView; BOOL parentScreenNo; @interface ExperimentAppDelegate : NSObject <UIApplicationDelegate> { UIWindow *window; ExperimentViewController *viewController; SecondView *ptrSecond; ThirdView *ptrThird; } @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet ExperimentViewController *viewController; @property (nonatomic, retain) IBOutlet SecondView *ptrSecond; @property (nonatomic, retain) IBOutlet ThirdView *ptrThird; @end ///////////////////////////////////// // // ExperimentAppDelegate.m // Experiment // // Created by Aman on 4/20/10. // Copyright __MyCompanyName__ 2010. All rights reserved. // #import "ExperimentAppDelegate.h" #import "ExperimentViewController.h" @implementation ExperimentAppDelegate @synthesize window; @synthesize viewController,ptrThird,ptrSecond; - (void)applicationDidFinishLaunching:(UIApplication *)application { parentScreenNo = NO; // Override point for customization after app launch [window addSubview:viewController.view]; [window makeKeyAndVisible]; } - (void)dealloc { [viewController release]; [window release]; [super dealloc]; } @end ///////////////////////////////////////// // // ExperimentViewController.h // Experiment // // Created by Aman on 4/20/10. // Copyright __MyCompanyName__ 2010. All rights reserved. // #import <UIKit/UIKit.h> @interface ExperimentViewController : UIViewController { } -(IBAction)second:(id)sender; @end /////////////////////////////// // // ExperimentViewController.m // Experiment // // Created by Aman on 4/20/10. // Copyright __MyCompanyName__ 2010. All rights reserved. // #import "ExperimentViewController.h" #import "ExperimentAppDelegate.h" @implementation ExperimentViewController /* // The designated initializer. Override to perform setup that is required before the view is loaded. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { // Custom initialization } return self; } */ -(IBAction)second:(id)sender { ExperimentAppDelegate *app = (ExperimentAppDelegate *)[[UIApplication sharedApplication]delegate]; [self presentModalViewController:app.ptrSecond animated:YES]; } /* // Implement loadView to create a view hierarchy programmatically, without using a nib. - (void)loadView { } */ /* // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; } */ /* // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationPortrait); } */ - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)dealloc { [super dealloc]; } @end ///////////////////////////////// // // SecondView.h // Experiment // // Created by Aman on 4/20/10. // Copyright 2010 __MyCompanyName__. All rights reserved. // #import <UIKit/UIKit.h> @interface SecondView : UIViewController { } -(IBAction)third:(id)sender; -(void)down; @end //////////////////////////////////////////// // // SecondView.m // Experiment // // Created by Aman on 4/20/10. // Copyright 2010 __MyCompanyName__. All rights reserved. // #import "SecondView.h" #import "ExperimentAppDelegate.h" @implementation SecondView /* // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { // Custom initialization } return self; } */ // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; } -(void)viewWillAppear:(BOOL)animated { if(parentScreenNo == YES) { [self performSelector:@selector(down) withObject:nil]; } [super viewWillAppear:YES]; } -(IBAction)third:(id)sender { ExperimentAppDelegate *app = (ExperimentAppDelegate *)[[UIApplication sharedApplication]delegate]; [self presentModalViewController:app.ptrThird animated:YES]; } -(void)down { [self dismissModalViewControllerAnimated:YES]; } /* // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationPortrait); } */ - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)dealloc { [super dealloc]; } @end ////////////////////////////////// // // ThirdView.h // Experiment // // Created by Aman on 4/20/10. // Copyright 2010 __MyCompanyName__. All rights reserved. // #import <UIKit/UIKit.h> @interface ThirdView : UIViewController { } -(IBAction)back:(id)sender; @end ////////////////////////////////// // // ThirdView.m // Experiment // // Created by Aman on 4/20/10. // Copyright 2010 __MyCompanyName__. All rights reserved. // #import "ThirdView.h" #import "ExperimentAppDelegate.h" @implementation ThirdView /* // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { // Custom initialization } return self; } */ /* // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; } */ -(IBAction)back:(id)sender { [self dismissModalViewControllerAnimated:YES]; parentScreenNo = YES; } /* // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationPortrait); } */ - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)dealloc { [super dealloc]; } @end Above is my code for calling other view please tell how i can call my first view by using dismismodelViewController from third screen Please help me out

    Read the article

  • MySQL query to view vertical data

    - by wenkhairu
    I have MySQL data that looks like this: +----------------------------------------+ |Name | kode | jum | +----------------------------------------+ | aman |kode1 | 2 | | aman |kode2 | 1 | | jhon |kode1 | 4 | | amir |kode2 | 4 | +--------------------+-----------+-------+ How can I make the table look like this one, using a MySQL query? kode1 kode2 count aman 2 1 3 jhon 0 4 4 amir 0 4 4

    Read the article

  • Why google is not crawling my website

    - by Aman Virk
    I am running a design and development blog http://www.thetutlage.com/ . From last couple of days my search traffic have been reduced from 70% to 10%. I myself is against black hat seo and all it do is write my own unique content almost everyday. Last week my search traffic was really good but now is dropping like heck. I have checked my webmasters dashboard and no message there from google. When i checked server logs i came to know last time google crawled my website was on 27 september 2012. Really i have no idea what i am doing wrong. I follow all google guidelines like bible, please help me

    Read the article

  • Website Stopped Showing From Google Search Results Sunddenly

    - by Aman Virk
    I have a design and development blog http://www.thetutlage.com (1.5 years old), which was doing really well in Google search as I was getting over 70% of my traffic from Google. Now suddenly from last two days it reduced the amount of traffic from 70% to 20% and also when I am trying to search for the exact posts that I can created even after appending my website name to it does not show any results for that. Sample Search Text: JQuery Game Programming Creating A Ping Pong Game Part 1 I have post with exact same title and it does not show it on Google search anywhere. I am totally shocked, I write my own unique content and follow Google guide lines like bible. Also there is no message under my webmasters account stating any problem or error.

    Read the article

  • How to upload a huge(GBs) file to a webserver

    - by Aman Jain
    Hi I want to create a web interface that will allow users to upload huge files. These files are actually vmdk files(Virtual Machine Disks), and they can be multi GB in size. I think this makes the situation different from normal file uploads(10-20MB file uploads). So any advise on how to achieve the same in an efficient and fault tolerant way, is appreciated. Thanks Aman Jain

    Read the article

  • Ubuntu 12.04 Boot Error

    - by Aman
    My Laptop was working just fine a day back but it started show the following error on booting: error: couldn't read file So, I googled about it and used a Live-CD to use Boot-Repair as told here: "can't read file" error after installation causes system to not boot I was given this link: http://paste.ubuntu.com/1441528/ if there are issues still. I also tried to do it again by a Boot-Repair-Disk this time and now I am getting the following error: error: couldn't read file error: you need to load the kernel first The boot-repair-disk gave me this link: http://paste2.org/p/2609703 if there are further issues.

    Read the article

  • How to publish paid Android apps if you're not from US/UK

    - by Sheikh Aman
    I was pretty excited while creating one of my apps but as it turns out you can't actually sign up for Google Checkout if you don't live either in the USA or in the UK. And since Google Checkout is the only way Android Market will pay you, all my efforts seem to be going in vain. So because I live in India, I can't sell my apps. I tried contacting Google by various means on this, but haven't got any response so far. I tried searching the web as well just to find out that one can't be paid via any other way. I am pretty sure that many people here might have gone through the same problem. How did you solve it? I have a PayPal account and an AdSense account as well. Can they help in any way? And if nothing works out, how am I supposed to be selling my app?

    Read the article

  • How to remove java.sql.BatchUpdateException in Grails? [closed]

    - by aman.nepid
    I have a domain like this: class BusinessOrganization { static hasMany = [organizationBusinessTypes:OrganizationBusinessType] String name String icon static constraints = { name(blank:false,unique:true) icon(unique:true) } String toString() { return "${name}" } } When I save some data for first time it works fine. But when by the next time it shows this error : Error 500: Internal Server Error URI /nLocatePortal/businessOrganization/save Class java.sql.BatchUpdateException Message Batch entry 0 insert into business_organization (version, icon, name, id) values ('0', '', 'dddd', '2') was aborted. Call getNextException to see the cause. **Around line 24 of grails-app/controllers/com/nlocate/portal/BusinessOrganizationController.groovy** 21: 22: def save() { 23: def businessOrganizationInstance = new BusinessOrganization(params) 24: if (!businessOrganizationInstance.save(flush: true)) { 25: render(view: "create", model: [businessOrganizationInstance: businessOrganizationInstance]) 26: return 27: } Please someone help me why this is happening. I am new to Grails. I have not modified the controllers but still I get this error.

    Read the article

  • Commnunity Technology Update (CTU) 2011

    - by Aman Garg
    Spoke at the session on Webforms in CTU 2011 (Community Technology Update) in Singapore. Had a good interaction with the Developer community here in Singapore. I covered the following topics during the session:   *Dynamic Data *Routing *Web Form Additions         *Predictable Client IDs          *Programmable Meta Data           *Better control over ViewState           *Persist selected rows *Web Deployment   The Slide Deck used can be accessed using the following URL: http://www.slideshare.net/amangarg516/web-forms-im-still-alive

    Read the article

  • Can I use copyrighted images and music in my game? [duplicate]

    - by Aman Grover
    This question already has an answer here: Using modified copyrighted music in non-commercial games 3 answers I am working on my first ever project , and I have used some copyrighted images(images taken from some other well recognized games). Is it even possible that I edit the images a little bit and then use them as royalty free images? If not, then can anyone tell me some web links from where I can get royalty free images?

    Read the article

  • How to hide graph on button click ?

    - by aman-gupta
    Hi, In my application I m using following codes to draw a graph but I want that graph will be displayed on button click :- import @interface frmGraphView : UIView { } @end ///////////////////// // // frmGraphView.m // UV Alarm // // Created by Aman on 4/4/10. // Copyright 2010 MyCompanyName. All rights reserved. // import "frmGraphView.h" @implementation frmGraphView struct TCo_ordinates { float x; float y; }; (id)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { // Initialization code } return self; } /* // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; } */ /* // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationPortrait); } */ -(void)drawHGrid { //struct gridForXYaxis *gridForX = (struct gridForX *) calloc(sizeof(struct gridFor)) } (void)drawRect:(CGRect)rect { ifdef _DEBUG NSLog(@"frmGraph_drawRect_start"); endif CGContextRef ctx = UIGraphicsGetCurrentContext(); struct TCo_ordinates *tCoordianates; //creating the object of structure. float fltX1,fltX2,fltY1,fltY2=0; //Dividing the Y-axis ifdef _DEBUG NSLog(@"Start drawing Y-Axis"); endif fltX1 = 25; fltY1 = 2; fltX2 = fltX1; fltY2 = 254; //CGContextSetRGBStrokeColor(ctx, 2.0, 2.0, 2.0, 1.0); CGContextSetLineWidth(ctx, 2.0); CGContextMoveToPoint(ctx, fltX1, fltY1); CGContextAddLineToPoint(ctx, fltX2, fltY2); NSArray *hoursInDays = [[NSArray alloc] initWithObjects:@"1",@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10",@"11",@"12", nil]; NSMutableArray *yAxisCoordinates = [[[NSMutableArray alloc] init] autorelease]; for(int intIndex = 0 ; intIndex < [hoursInDays count] ; fltY2-=20, intIndex++) { ifdef _DEBUG NSLog(@"Start of the partition of y axis"); endif //CGContextSetRGBStrokeColor(ctx, 2, 2, 2, 1); //CGContextSetRGBStrokeColor(ctx, 1.0f/255.0f, 1.0f/255.0f, 1.0f/255.0f, 1.0f); //to draw the black line. CGContextMoveToPoint(ctx, fltX1-3 , fltY2-20); CGContextAddLineToPoint(ctx, fltX1+3, fltY2-20); CGContextSelectFont(ctx, "Helvetica", 12.0, kCGEncodingMacRoman); CGContextSetTextDrawingMode(ctx, kCGTextFill); //CGContextSetRGBFillColor(ctx, 0, 255, 255, 1); CGContextSetStrokeColorWithColor(ctx, [UIColor blueColor].CGColor); CGAffineTransform xform = CGAffineTransformMake( 1.0, 0.0, 0.0, -1.0, 0.0, 0.0); CGContextSetTextMatrix(ctx, xform); const char *arrayDataForYAxis = [[hoursInDays objectAtIndex:intIndex] UTF8String]; CGContextShowTextAtPoint(ctx,fltX1-20 , fltY2-15, arrayDataForYAxis, strlen(arrayDataForYAxis)); CGContextStrokePath(ctx); ifdef _DEBUG NSLog(@"End of the partition of graph"); endif //NSValue *yAxis = [NSValue valueWithCGPoint:CGPointMake((tCoordianates-x = fltX1-21), (tCoordianates-y = fltY2-20))]; // [yAxisCoordinates addObject:yAxis]; ifdef _DEBUG // NSLog(@"The value of yAxisCoordintes: %@", yAxisCoordinates); endif } ifdef _DEBUG NSLog(@"End of drawing Y-Axis"); endif //Dividing the X-axis ifdef _DEBUG NSLog(@"Start drawing X-Axis"); endif fltX1 = 25; fltY1 = 255; fltX2 = 320; fltY2 = fltY1; CGContextMoveToPoint(ctx, fltX1, fltY1); CGContextAddLineToPoint(ctx, fltX2, fltY2); //CGContextSetRGBStrokeColor(ctx, 2, 2, 2, 1); CGContextSetLineWidth(ctx, 2.0); NSArray *weekDays =[[NSArray alloc] initWithObjects:@"Sun", @"Mon", @"Tue", @"Wed", @"Thu", @"Fri", @"Sat", nil]; NSMutableArray *xAxisCoordinates = [[[NSMutableArray alloc] init] autorelease]; for(int intIndex = 0 ; intIndex < [weekDays count] ; fltX1+=40, intIndex++) { //CGContextSetRGBStrokeColor(ctx, 2, 2, 2, 1); //CGContextSetStrokeColorWithColor(ctx, [UIColor orangeColor].CGColor); CGContextMoveToPoint(ctx, fltX1+40 , fltY2-3); CGContextAddLineToPoint(ctx, fltX1+40, fltY2+3); CGContextSelectFont(ctx, "Italic", 12.0, kCGEncodingMacRoman); CGContextSetTextDrawingMode(ctx, kCGTextFill); CGContextSetStrokeColorWithColor(ctx, [UIColor blueColor].CGColor); CGAffineTransform xform = CGAffineTransformMake( 1.0, 0.0, 0.0, -1.0, 0.0, 0.0); CGContextSetTextMatrix(ctx, xform); const char *arrayDataForXAxis = [[weekDays objectAtIndex:intIndex] UTF8String]; CGContextShowTextAtPoint(ctx, fltX1+27, fltY2+20 , arrayDataForXAxis, strlen(arrayDataForXAxis)); CGContextStrokePath(ctx); ifdef _DEBUG NSLog(@"End of drawing X-Axis"); endif //NSValue *xAxis = [NSValue valueWithCGPoint:CGPointMake((tCoordianates->x = fltX1+40), (tCoordianates->y = fltY2+18))]; // [xAxisCoordinates addObject:xAxis]; ifdef _DEBUG //NSLog(@"The value of xAxisCoordintes: %@", xAxisCoordinates); NSLog(@"frmGraph_drawRect_end"); endif } CGContextSetLineWidth(ctx, 10.0); fltX1 = 25; fltY1 = 235; fltX2 = 320; fltY2 = fltY1; NSArray *coordinate1 = [[NSArray alloc] initWithObjects:@"65",@"105",@"145",@"185",@"225",@"265",@"305",nil]; NSArray *coordinate2 = [[NSArray alloc] initWithObjects:@"214",@"174",@"154",@"134",@"114",@"74",@"34",nil]; ifdef _DEBUG NSLog(@"Fuction of Bar_start"); endif for(int intIndex = 0; intIndex < [coordinate1 count], intIndex < [coordinate2 count]; fltX1+=40, intIndex++) { //CGContextSetRGBFillColor(ctx, 0, 0, 245, 1); CGContextMoveToPoint(ctx, fltX1+40, fltY2+19); const char *arrayDataForCoordinate1 = [[coordinate1 objectAtIndex:intIndex] UTF8String]; const char *arrayDataForCoordinate2 = [[coordinate2 objectAtIndex:intIndex] UTF8String]; CGContextAddLineToPoint(ctx, (atof(arrayDataForCoordinate1)), atof(arrayDataForCoordinate2)); } ifdef _DEBUG NSLog(@"Fuction of Bar_end"); endif CGContextClosePath(ctx); CGContextStrokePath(ctx); [hoursInDays release]; [weekDays release]; [coordinate1 release]; [coordinate2 release]; hoursInDays = nil; weekDays = nil; coordinate1 = nil; coordinate2 = nil; } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } (void)dealloc { [super dealloc]; } @end please help me out its urgent

    Read the article

  • Google I/O 2010 - Google Buzz, location, and social gaming

    Google I/O 2010 - Google Buzz, location, and social gaming Google I/O 2010 - Surf the stream: Google Buzz, location, and social gaming Social Web 201 Bob Aman, Timothy Jordan Google Buzz has a feature-rich API that allows you to do all kinds of interesting things with conversations and location. In this session we'll build a Buzz-tastic mobile game using App Engine, HTML5, and the Buzz API for social awesomeness. For all I/O 2010 sessions, please go to code.google.com From: GoogleDevelopers Views: 2 0 ratings Time: 31:18 More in Science & Technology

    Read the article

  • minimal rsync installation on windows xp?

    - by Aman Jain
    Hi I want to install rsync on windows xp. I have searched the web, but most of the solutions suggest using cygwin, but is there any other way to do this? I don't want to install cygwin because it takes lot of space. Moreover, I need to make it communicate with a rsync daemon on Linux, therefore alternatives to rsync on windows won't help. Thanks

    Read the article

  • VSFTPD says "500 OOPS: cannot change directory"

    - by Aman Kumar Jain
    As soon as I login with my virtual users in ftp I get "cannot change directoy", I have the following configuration in vsftpd.conf. Please suggest listen=YES anonymous_enable=NO local_enable=YES write_enable=YES local_umask=002 dirmessage_enable=YES xferlog_enable=YES connect_from_port_20=YES chroot_local_user=YES secure_chroot_dir=/var/run/vsftpd pam_service_name=vsftpd virtual_use_local_privs=YES guest_enable=YES user_sub_token=$USER hide_ids=YES user_config_dir=/data/some-path/ftp/users local_root=/data/some-path/ftp/data/$USER guest_username=vsftpd

    Read the article

  • Uninstall SQL Server 2005 Express after Demoting the DC

    - by Walter Aman
    A Windows Server 2003 SP2 hosting a now orphan installation of SQL 2005 Workgroup was pressed into service as a DC in a disaster recovery scenario. It has since been demoted. The server also hosts legacy apps for which we lack reinstallation resources; thus our desire to preserve it as close to intact as possible while removing the orphaned roles. All efforts to remove SQL 2005 thru Control Panel and ARPWrapper /remove fail with error 29528. Should I abandon this and leave the orphan SQL dormant, or is it reasonable to remove it post-demote?

    Read the article

  • How to get skin tone color pixel in iPhone?

    - by aman-gupta
    Hi In my application I m using following way to get red pixel in a image // // PixelsAccessAppDelegate.h // PixelsAccess // // Created by Fortune1 on 14/04/10. // Copyright MyCompanyName 2010. All rights reserved. // import @class clsPixelAccess; NSUInteger numberOfRedPixels; NSUInteger numberOfRedPixels1; NSUInteger numberOfRedPixels2; NSUInteger numberOfRedPixels3; NSUInteger numberOfRedPixels4; NSUInteger numberOfRedPixels5; NSUInteger numberOfRedPixels6; NSUInteger numberOfRedPixels7; NSUInteger numberOfRedPixels8; NSUInteger numberOfRedPixels9; NSUInteger numberOfRedPixels10; NSUInteger numberOfRedPixels11; NSUInteger numberOfRedPixels12; NSUInteger numberOfRedPixels13; NSUInteger numberOfRedPixels14; NSUInteger numberOfRedPixels15; NSUInteger numberOfRedPixels16; NSUInteger numberOfRedPixels17; NSUInteger numberOfRedPixels18; NSUInteger numberOfRedPixels19; NSUInteger numberOfRedPixels20; NSUInteger numberOfRedPixels21; NSUInteger numberOfRedPixels22; NSUInteger numberOfRedPixels23; NSUInteger numberOfRedPixels24; NSUInteger numberOfRedPixels25; NSUInteger numberOfRedPixels26; NSUInteger numberOfRedPixels27; NSUInteger numberOfRedPixels28; NSUInteger numberOfRedPixels29; NSUInteger numberOfRedPixels30; NSUInteger numberOfRedPixels31; @interface PixelsAccessAppDelegate : NSObject { UIWindow *window; clsPixelAccess *obj; } @property (nonatomic, retain) IBOutlet UIWindow *window; -(IBAction)processImage:(id)sender; @end //////////////////// // // PixelsAccessAppDelegate.m // PixelsAccess // // Created by Fortune1 on 14/04/10. // Copyright MyCompanyName 2010. All rights reserved. // import "PixelsAccessAppDelegate.h" import "clsPixelAccess.h" @implementation PixelsAccessAppDelegate @synthesize window; (IBAction)processImage:(id)sender { NSUInteger retVal; obj = [[clsPixelAccess alloc] init]; NSInteger imageSend =[obj processImage1:[UIImage imageNamed:@"s.jpg"]]; NSInteger iamgeCall =[obj getPixelData:retVal]; NSUInteger *numberOfRedPixels = retVal; //lblPixelCount.text = [NSString stringWithFormat: @"There are %d red pixels in the image", numberOfRedPixels]; } (void)applicationDidFinishLaunching:(UIApplication *)application { // Override point for customization after application launch [window makeKeyAndVisible]; } (void)dealloc { [window release]; [super dealloc]; } @end /////////////// // // clsPixelsAccess.h // PixelsAccess // // Created by Fortune1 on 14/04/10. // Copyright 2010 MyCompanyName. All rights reserved. // import @interface clsPixelAccess : NSObject { } -(NSInteger) processImage1: (UIImage*) image; -(NSInteger)getPixelData:(NSUInteger *)pixelCount; @end ///////// // // clsPixelsAccess.m // PixelsAccess // // Created by Fortune1 on 14/04/10. // Copyright 2010 MyCompanyName. All rights reserved. // import "clsPixelAccess.h" import "PixelsAccessAppDelegate.h" @implementation clsPixelAccess struct pixel { //unsigned char r, g, b,a; Byte r, g, b, a; int count; }; -(NSInteger)getPixelData:(NSUInteger *)pixelCount { *pixelCount =numberOfRedPixels; return 1; } // Process the image and return the number of pure red pixels in it. (NSInteger) processImage1: (UIImage*) image { // Allocate a buffer big enough to hold all the pixels struct pixel* pixels = (struct pixel*) calloc(1, image.size.width * image.size.height * sizeof(struct pixel)); if (pixels != nil) { // Create a new bitmap CGContextRef context = CGBitmapContextCreate( (void*) pixels, image.size.width, image.size.height, 8, image.size.width * 4, CGImageGetColorSpace(image.CGImage), kCGImageAlphaPremultipliedLast ); //NSLog(@"1=%d, 2=%d, 3=%d", CGImageGetBitsPerComponent(image), CGImageGetBitsPerPixel(image),CGImageGetBytesPerRow(image)); if (context != NULL) { // Draw the image in the bitmap CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, image.size.width, image.size.height), image.CGImage); NSUInteger numberOfPixels = image.size.width * image.size.height; NSMutableArray *numberOfPixelsArray = [[[NSMutableArray alloc] initWithCapacity:numberOfPixelsArray] autorelease]; NSLog( @"Pixel data %d", numberOfPixelsArray); /* NSMatrix *newMatrix = [[NSMatrix alloc] initWithFrame:NSMakeRect(138.0f, 85.0f, 0.0f, 0.0f) mode:NSRadioModeMatrix prototype:prototypeButtonCell numberOfRows: numberOfColumns:]; */ while (numberOfPixels &gt; 0) { if (pixels-&gt;r &gt; 0 &amp;&amp; pixels-&gt;r &lt;= 7) { numberOfRedPixels++; } NSLog( @"Red pixel data %d",numberOfRedPixels); if (pixels-&gt;r &gt;= 8 &amp;&amp; pixels-&gt;r &lt;= 15) { numberOfRedPixels1++; } NSLog( @"Red pixel data1 %d",numberOfRedPixels1); if (pixels-&gt;r &gt;= 16 &amp;&amp; pixels-&gt;r &lt;=23 ) { numberOfRedPixels2++; } NSLog( @"Red pixel data2 %d",numberOfRedPixels2); if (pixels-&gt;r &gt;= 24 &amp;&amp; pixels-&gt;r &lt;=31 ) { numberOfRedPixels3++; } NSLog( @"Red pixel data3 %d",numberOfRedPixels3); if (pixels-&gt;r &gt;= 32 &amp;&amp; pixels-&gt;r &lt;= 39) { numberOfRedPixels4++; } NSLog( @"Red pixel data4 %d",numberOfRedPixels4); if (pixels-&gt;r &gt;= 40 &amp;&amp; pixels-&gt;r &lt;= 47) { numberOfRedPixels5++; } NSLog( @"Red pixel data5 %d",numberOfRedPixels5); if (pixels-&gt;r &gt;= 48 &amp;&amp; pixels-&gt;r &lt;= 55) { numberOfRedPixels6++; } NSLog( @"Red pixel data6 %d",numberOfRedPixels6); if(pixels-&gt;r &gt;= 56 &amp;&amp; pixels-&gt;r &lt;= 63) { numberOfRedPixels7++; } NSLog( @"Red pixel data7 %d",numberOfRedPixels7); if (pixels-&gt;r &gt;= 64 &amp;&amp; pixels-&gt;r &lt;= 71) { numberOfRedPixels8++; } NSLog( @"Red pixel data8 %d",numberOfRedPixels8); if (pixels-&gt;r &gt;= 72 &amp;&amp; pixels-&gt;r &lt;= 79) { numberOfRedPixels9++; } NSLog( @"Red pixel data9 %d",numberOfRedPixels9); if (pixels-&gt;r &gt;= 80 &amp;&amp; pixels-&gt;r &lt;= 87) { numberOfRedPixels10++; } NSLog( @"Red pixel data10 %d",numberOfRedPixels10); if (pixels-&gt;r &gt;= 88 &amp;&amp; pixels-&gt;r &lt;= 95) { numberOfRedPixels11++; } NSLog( @"Red pixel data11 %d",numberOfRedPixels11); if (pixels-&gt;r &gt;= 96 &amp;&amp; pixels-&gt;r &lt;= 103) { numberOfRedPixels12++; } NSLog( @"Red pixel data12 %d",numberOfRedPixels12); if (pixels-&gt;r &gt;= 104 &amp;&amp; pixels-&gt;r &lt;= 111) { numberOfRedPixels13++; } NSLog( @"Red pixel data13 %d",numberOfRedPixels13); if (pixels-&gt;r &gt;= 112 &amp;&amp; pixels-&gt;r &lt;= 119) { numberOfRedPixels14++; } NSLog( @"Red pixel data14 %d",numberOfRedPixels14); if (pixels-&gt;r &gt;= 120 &amp;&amp; pixels-&gt;r &lt;= 127) { numberOfRedPixels15++; } NSLog( @"Red pixel data15 %d",numberOfRedPixels15); if (pixels-&gt;r &gt; 128 &amp;&amp; pixels-&gt;r &lt;= 135) { numberOfRedPixels16++; } NSLog( @"Red pixel data16 %d",numberOfRedPixels16); if (pixels-&gt;r &gt;= 136 &amp;&amp; pixels-&gt;r &lt;= 143) { numberOfRedPixels17++; } NSLog( @"Red pixel data17 %d",numberOfRedPixels17); if (pixels-&gt;r &gt;= 144 &amp;&amp; pixels-&gt;r &lt;=151) { numberOfRedPixels18++; } NSLog( @"Red pixel data18 %d",numberOfRedPixels18); if (pixels-&gt;r &gt;= 152 &amp;&amp; pixels-&gt;r &lt;=159 ) { numberOfRedPixels19++; } NSLog( @"Red pixel data19 %d",numberOfRedPixels19); if (pixels-&gt;r &gt;= 160 &amp;&amp; pixels-&gt;r &lt;= 167) { numberOfRedPixels20++; } NSLog( @"Red pixel data20 %d",numberOfRedPixels20); if (pixels-&gt;r &gt;= 168 &amp;&amp; pixels-&gt;r &lt;= 175) { numberOfRedPixels21++; } NSLog( @"Red pixel data21 %d",numberOfRedPixels21); if (pixels-&gt;r &gt;= 176 &amp;&amp; pixels-&gt;r &lt;= 199) { numberOfRedPixels22++; } NSLog( @"Red pixel data22 %d",numberOfRedPixels22); if(pixels-&gt;r &gt;= 184 &amp;&amp; pixels-&gt;r &lt;= 191) { numberOfRedPixels23++; } NSLog( @"Red pixel data23 %d",numberOfRedPixels23); if (pixels-&gt;r &gt;= 192 &amp;&amp; pixels-&gt;r &lt;= 199) { numberOfRedPixels24++; } NSLog( @"Red pixel data24 %d",numberOfRedPixels24); if (pixels-&gt;r &gt;= 200 &amp;&amp; pixels-&gt;r &lt;= 207) { numberOfRedPixels25++; } NSLog( @"Red pixel data25 %d",numberOfRedPixels25); if (pixels-&gt;r &gt;= 208 &amp;&amp; pixels-&gt;r &lt;= 215) { numberOfRedPixels26++; } NSLog( @"Red pixel data26 %d",numberOfRedPixels26); if (pixels-&gt;r &gt;= 216 &amp;&amp; pixels-&gt;r &lt;= 223) { numberOfRedPixels27++; } NSLog( @"Red pixel data27 %d",numberOfRedPixels27); if (pixels-&gt;r &gt;= 224 &amp;&amp; pixels-&gt;r &lt;= 231) { numberOfRedPixels28++; } NSLog( @"Red pixel data28 %d",numberOfRedPixels28); if (pixels-&gt;r &gt;= 232 &amp;&amp; pixels-&gt;r &lt;= 239) { numberOfRedPixels29++; } NSLog( @"Red pixel data29 %d",numberOfRedPixels29); if (pixels-&gt;r &gt;= 240 &amp;&amp; pixels-&gt;r &lt;= 247) { numberOfRedPixels30++; } NSLog( @"Red pixel data30 %d",numberOfRedPixels30); if (pixels-&gt;r &gt;= 248) { numberOfRedPixels31++; } NSLog( @"Red pixel data31 %d",numberOfRedPixels31); pixels++; numberOfPixels--; } CGContextRelease(context); } free(pixels); } return 1; } @end My problem is I want skin Tone Pixel how it could be possible Please help me out. Thanks in Advance

    Read the article

  • Error 404: No target servlet configured for uri

    - by Aman
    Hi Experts, I just got done with a new Web module built with Spring Framework. Till now I was testing all the pages on my local machine using Tomcat. Today after I moved the application to Websphere, I am getting the following error: Error 404: No target servlet configured for uri is there anything I need to do in web.xml or somewhere? I deployed an EAR file on my WAS , which has another war file. Below is the output I am seeing on the console, if thats any help. The resource WEB-INF/ibm-web-bnd.xmi that is defined in URI WEB-INF/ibm-web-bnd.xmi for module analytics.war is not valid. The resource has a cross reference org.eclipse.jst.j2ee.webapplication.internal.impl.WebAppImpl@4be44be4 (eProxyURI: WEB-INF/web.xml#WebApp_ID) that cannot be resolved. [6/17/09 15:24:49:465 CDT] 00000011 ArchiveDeploy W ADMA0091E: The resource WEB-INF/ibm-web-ext.xmi that is defined in URI WEB-INF/ibm-web-ext.xmi for module analytics.war is not valid. The resource has a cross reference org.eclipse.jst.j2ee.webapplication.internal.impl.WebAppImpl@7b7a7b7a (eProxyURI: WEB-INF/web.xml#WebApp_ID) that cannot be resolved.

    Read the article

  • How does an unsharp mask work?

    - by Bob Aman
    I've been playing around with image processing lately, and I'd like to know how the unsharp mask algorithm works. I'm looking at the source code for Gimp and it's implementation, but so far I'm still in the dark about how it actually works. I need to implement it for a project I'm working on, but I'd like to actually understand the algorithm I'm using.

    Read the article

  • How to crop Image in iPhone?

    - by aman-gupta
    Hi, In my application I m using following codes to crop the captured image :- -(void)imagePickerController:(UIImagePickerController *) picker didFinishPickingMediaWithInfo:(NSDictionary *)info { #ifdef _DEBUG NSLog(@"frmSkinImage-imagePickerController-Start"); #endif imageView.image = [info objectForKey:@"UIImagePickerControllerOriginalImage"]; //======================================= UIImage *image =imageView.image; CGRect cropRect = CGRectMake(100, 100, 125,128); CGImageRef imageRef = CGImageCreateWithImageInRect([image CGImage], cropRect); [imageView setImage:[UIImage imageWithCGImage:imageRef]]; CGImageRelease(imageRef); //=================================================== //imgglobal = [info objectForKey:@"UIImagePickerControllerOriginalImage"]; // for saving image to photo album //UIImageWriteToSavedPhotosAlbum(imageView.image, self, @selector(image:didFinishSavingWithError:contextInfo:), self); [picker dismissModalViewControllerAnimated:YES]; #ifdef _DEBUG NSLog(@"frmSkinImage-imagePickerController-End"); #endif } But my problem is that when I use camera to take photo to crop the captured image it rotates the image to 90 degree towards right and in case I use Photo library it works perfectly. So Can u filter my above codes to know where I m wrong. Please help me out its urgent Thanks In Advance

    Read the article

1 2 3  | Next Page >