Search Results

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

Page 3/3 | < Previous Page | 1 2 3 

  • Stil facing the problem in Orientation in iphone

    - by aman-gupta
    Hi, In my application I have 15 screens in that i m using UIViewController for all screens and in all screens i m using the below way to call other screen :- AppDelegate *appRefre = (AppDelegate *)[[UIApplication sharedApplication]delegate]; [self.navigationController pushViewController:appRefre.frmReferencesLink animated:YES]; And the below code is activated in all screen for orientation to control the user to switch from one orientation to other mode (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if (interfaceOrientation == UIInterfaceOrientationPortrait) { return YES; } else { return NO; } } But when i run my application in iPhone device my application gets terminated when i physically rotate my iphone device from UIInterfaceOrientationPortrait to UIInterfaceOrientationPortraitUpsideDown or UIInterfaceOrientationLandscapeLeft,UIInterfaceOrientationLandscapeRight. And One more things is that when my application lauch i used following code for launching my appliaction :- 1) I made a pointer in mydelegate.h file: UINavigationController *navigationController; Then synthesize its property @property(nonatomic,retain)UINavigationController *navigationController 2) In mydelegat.m I Wrote @synthesize navigationController; (void)applicationDidFinishLaunching:(UIApplication *)application { navigationController = [[UINavigationController alloc] initWithRootViewController:DefaultViewLink]; [window addSubview:navigationController.view]; [window makeKeyAndVisible]; } 3) In above point DefaultView is launch first and gets remove from view and then actual my appliaction come into picture. So exactly what i want i want my appliaction to be in portrait mode for all screens i dont want my appliaction will switch to other mode.It remains the same as in portrait mode after rotation to any other mode. Please help me out its very urgent. Thanks in Advance and humble request to help me out

    Read the article

  • minifying final html output using regex with codeigniter

    - by Aman
    Google pages suggest you to minify html i.e. remove all the un-necessary spaces. Codeigniter does have feature of giziping output or it can be done via .htaccess. But still I also would like to remove un-necessary spaces from final html output as well. I played a bit with this peace of code to do it, and it seem to work. This does indeed result in html that is without excess spaces and removes other tab formatting. class Welcome extends CI_Controller { function _output() { echo preg_replace('!\s+!', ' ', $output); } function index(){ ... } } Now the problem with this is there may be tag like <pre>,<textarea>, etc.. which may have space in it and regx should remove them. So, how do I remove excess space from final html, without effecting spaces or formatting for these certain tags using regx? Thanks to @Alan Moore got the answer, this worked for me echo preg_replace('#(?ix)(?>[^\S ]\s*|\s{2,})(?=(?:(?:[^<]++|<(?!/?(?:textarea|pre)\b))*+)(?:<(?>textarea|pre)\b|\z))#', ' ', $output); @ridgerunner here did very good job of analyzing this regx, ended up using his solution. Cheers to ridgerunner.

    Read the article

  • Best way to call other class view in iphone?

    - by aman-gupta
    Hi, Generally i call my other class view by creating a pointer of delegate and then call the other class by using its link as below:- First Way :- Mydelegate *ptr = (Mydelegate *)[[UIApplication sharedApplication]delegate]; [self.navigationController pushViewController:ptr.NextClasspointer animated:YES]; Second Way :- Create a pointer of that class which u want to call :-- NextClass *nextptr = [[NextClass alloc]initWithnibName:@"NextClass" bundle:nil]; [self.navigationController pushViewController:nextptr animated:YES]; [nextptr release]; nextptr = nil; These above two methods i generally used but my problem is that which one is best for big project so that my stack problem will be removed I mean memory issue will be solved.And is it necessary to release pointer in first and second case is the way i release is correct or wrong Please help me Thanks in Advance

    Read the article

  • generate an array from an array with conditions

    - by Aman
    Suppose i have an array $x = (31,12,13,25,18,10); I want to reduce this array in such a way that the value of each array element is 32. so after work my array will become $newx = (32,32,32,13); I have to generate this array in such a way the sum of array values is never greater than 32. so to create first value, i will reduce 1 from second index value i.e. 12, so the second value will become 11 and first index value will become 31+1 =32. This process should continue so that each array value becomes equal to 32.

    Read the article

  • How would you calculate all possible permutations of 0 through N iteratively?

    - by Bob Aman
    I need to calculate permutations iteratively. The method signature looks like: int[][] permute(int n) For n = 3 for example, the return value would be: [[0,1,2], [0,2,1], [1,0,2], [1,2,0], [2,0,1], [2,1,0]] How would you go about doing this iteratively in the most efficient way possible? I can do this recursively, but I'm interested in seeing lots of alternate ways to doing it iteratively.

    Read the article

  • segmentation fault while using format string to scan input

    - by Aman Deep Gautam
    consider the code and its result: while ((row = mysql_fetch_row (table_info)) != NULL) { answer='\0'; printf ( "%s: ", row[0] ); scanf ( "%c", &answer ); getchar(); if ( answer == 'y') { printf ( "*****\n" ); table_name[index] = malloc ( strlen(row[0]) + 1 ); printf ( "*****\n" ); memcpy ( &table_name[index], &row[0], strlen(row[0]) + 1 ); } printf ( "finally inserted: %s \n", table_name[index]); } The result on execution: 1_time_access: y ***** ***** finally inserted: 1_time_access 2_time_access: y ***** ***** finally inserted: 2_time_access 39_time_access: y ***** ***** finally inserted: 39_time_access Explanation of result: row[0] has value 1_time_access, 2_time_access, 39_time_access. Now Consider a better way of doing it which is using a format string to escape the \n. I run the following code but it gives segentation fault, I cannot understand why. Code: while ((row = mysql_fetch_row (table_info)) != NULL) { answer='\0'; printf ( "%s: ", row[0] ); scanf ( "%[^\n]%*c", &answer ); if ( answer == 'y') { printf ( "*****\n" ); fflush(stdout); table_name[index] = malloc ( strlen(row[0]) + 1 ); printf ( "*****\n" ); fflush(stdout); memcpy ( &table_name[index], &row[0], strlen(row[0]) + 1 ); } printf ( "finally inserted: %s \n", table_name[index]); fflush(stdout); } Result: 1_time_access: y ***** ./set-env.sh: line 17: 15263 Segmentation fault (core dumped) ./exec dataset_one (do not worry about set-env.sh, it is the script running th program.) I canot understand why this is happening.

    Read the article

  • How to retreive Bundle Version in a label from project test-Info.plist in iphone?

    - by aman-gupta
    Hi, Here I m pasting my codes where i want to retrive Bundle version from my test-Info.plist. // // testAppDelegate.h // test // // Created by Fortune1 on 20/04/10. // Copyright __MyCompanyName__ 2010. All rights reserved. // #import <UIKit/UIKit.h> @class testViewController; @interface testAppDelegate : NSObject <UIApplicationDelegate> { UIWindow *window; testViewController *viewController; } @property (nonatomic, retain) IBOutlet UIWindow *window; @property (nonatomic, retain) IBOutlet testViewController *viewController; @end ////////////// // // testAppDelegate.m // test // // Created by Fortune1 on 20/04/10. // Copyright __MyCompanyName__ 2010. All rights reserved. // #import "testAppDelegate.h" #import "testViewController.h" @implementation testAppDelegate @synthesize window; @synthesize viewController; - (void)applicationDidFinishLaunching:(UIApplication *)application { // Override point for customization after app launch [window addSubview:viewController.view]; [window makeKeyAndVisible]; } - (void)dealloc { [viewController release]; [window release]; [super dealloc]; } @end ///////////////////// // // testViewController.h // test // // Created by Fortune1 on 20/04/10. // Copyright __MyCompanyName__ 2010. All rights reserved. // #import <UIKit/UIKit.h> @interface testViewController : UIViewController { UILabel *label; } @property(nonatomic,retain) IBOutlet UILabel *label; @end /////////////////////// // // testViewController.m // test // // Created by Fortune1 on 20/04/10. // Copyright __MyCompanyName__ 2010. All rights reserved. // #import "testViewController.h" @implementation testViewController @synthesize label; /* // 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; } */ /* // Implement loadView to create a view hierarchy programmatically, without using a nib. - (void)loadView { } */ - (void)viewDidLoad { [super viewDidLoad]; NSString *path = [[NSBundle mainBundle] pathForResource:@"test-info" ofType:@"plist"]; NSString *versionString = [NSString stringWithFormat:@"v%d", [plistData objectForKey:@"Bundle version"]]; label.text = versionString; } /* // 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 But still I got null value where i m wrong please help me out Thanks in advance

    Read the article

  • How to release my view from stack ?

    - by aman-gupta
    Hi, In my application I m using following coding convention to open my default screen :-- AppDelegate *ptrDefaultScreen = (AppDelegate *)[[UIApplication sharedApplication]delegate]; [self.navigationController presentModalViewController:ptrDefaultScreen.FrmFlashScreenLink animated:YES]; but when I move to other screen after default screen ,my default screen is still exists even i used [self dismissModelViewController:YES]; to dimiss default screen from view. where I m wrong I want my default screen will be completely removed from view. Is any other way to call default screen before actual application. Please help me out.Thanks in advance

    Read the article

  • Starting an Intent to Launch an app to Background in Android

    - by Tista
    Hi all, I'm using Wikitude API 1.1 as an AR viewer in my application. The problem with Wikitude, if I haven't launched the actual Wikitude application since the phone's bootup, I will get a NullPointerException everytime I start my own application. So I figure if I can start my app first and them check if Wikitude is installed and or running. If it's not installed, go to market n download. If it's not running, then we should run it straight to background so that my app doesn't loose its focus. // Workaround for Wikitude this.WIKITUDE_PACKAGE_NAME = "com.wikitude"; PackageManager pacMan = Poligamy.this.getPackageManager(); try { PackageInfo pacInfo = pacMan.getPackageInfo(this.WIKITUDE_PACKAGE_NAME, pacMan.GET_SERVICES); Log.i("CheckWKTD", "Wikitude is Installed"); ActivityManager aMan = (ActivityManager) this.getSystemService(ACTIVITY_SERVICE); List<RunningAppProcessInfo> runningApps = aMan.getRunningAppProcesses(); int numberOfApps = runningApps.size(); for(int i=0; i<numberOfApps; i++) { if(runningApps.get(i).processName.equals(this.WIKITUDE_PACKAGE_NAME)) { this.WIKITUDE_RUNNING = 1; Log.i("CheckWKTD", "Wikitude is Running"); } } if(this.WIKITUDE_RUNNING == 0) { Log.i("CheckWKTD", "Wikitude is NOT Running"); /*final Intent wIntent = new Intent(Intent.ACTION_MAIN, null); wIntent.addCategory(Intent.CATEGORY_LAUNCHER); final ComponentName cn = new ComponentName("com.wikitude", "com.mobilizy.wikitudepremium.initial.Splash"); wIntent.setComponent(cn); wIntent.setFlags(Intent.FLAG_ACTIVITY_NO_USER_ACTION); startActivityIfNeeded(wIntent, 0);*/ } } catch (NameNotFoundException e) { // TODO Auto-generated catch block Log.i("CheckWKTD", "Wikitude is NOT Installed"); e.printStackTrace(); //finish(); } The part I block commented is the intent to start Wikitude. But I always failed in restricting Wikitude to background. Any help? Thanks before. Best, Tista

    Read the article

  • Problem with Arcam rpac and Ubuntu 12.04

    - by user108393
    I have recently (?mistakenly) purchased an Arcam rpac USB DAC for my Ubuntu (12.04) PC. I have torn out all but 3 of my hairs trying to get this to work and have had absolutely no luck so far. I can see the Arcam USB audio device when i run aplay -l, however I cannot see it listed under the Sound settings. I can see the soundcard device when running alsamixer also, but if I try and select it, alsamixer crashes, stating "cannot load mixer controls: Invalid argument". Any ideas how to get this working (if it's even possible)? Does anyone else out there have the rpac with ubuntu? Thank you! Aman

    Read the article

  • AIOUG TechDay @ Lovely Professional University, Jalandhar, India

    - by Tori Wieldt
    by guest blogger Jitendra Chittoda, co-leader, Delhi and NCR JUG On 30 August 2013, Lovely Professional University (LPU) Jalandhar organized an All India Oracle User Group (AIOUG) TechDay event on Oracle and Java. This was a full day event with various sessions on J2EE 6, Java Concurrency, NoSQL, MongoDB, Oracle 12c, Oracle ADF etc. It was an overwhelming response from students, auditorium was jam packed with 600+ LPU energetic students of B.Tech and MCA stream. Navein Juneja Sr. Director LPU gave the keynote and introduced the speakers of AIOUG and Delhi & NCR Java User Group (DaNJUG). Mr. Juneja explained about the LPU and its students. He explained how Oracle and Java is most used and accepted technologies in world. Rohit Dhand Additional Dean LPU came on stage and share about how his career started with Oracle databases. He encouraged students to learn these technologies and build their career. Satyendra Kumar vice-president AIOUG thanked LPU and their stuff for organizing such a good technical event and students for their overwhelming response.  He talked about the India Oracle group and its events at various geographical locations all over India. Jitendra Chittoda Co-Leader DaNJUG explained how to make a new Java User Groups (JUG), what are its benefits and how to promote it. He explained how the Indian JUGs are contributing to the different initiatives like Adopt-a-JSR and Adopt-OpenJDK. After the inaugural address event started with two different tracks one for Oracle Database and another for Java and its related technologies. Speakers: Satyendra Kumar Pasalapudi (Co-founder and Vice President of AIOUG) Aman Sharma (Oracle Database Consultant and Instructor) Shekhar Gulati (OpenShift Developer Evangelist at RedHat) Rohan Walia (Oracle ADF Consultant at Oracle) Jitendra Chittoda (Co-leader Delhi & NCR JUG and Senior Developer at ION Trading)

    Read the article

  • UITextField with the lookup

    - by leon
    Hello, I would like to achive the same functinoanlity in the UUTextField control as Google search web site (which uses Ajax for this): as user start typing, list of suggestion searches is shown. Then more letteres you type, suggestion list changes. So imaging I have array of words: Apple Abc Aman As user types A, all thress suggesions are shown, if user type one more letter p, then Apple is suggested. How would I do something like this? Mail type of applicatins do it, when receipent name is typed in the To: edit control I guess I can use UITableView with the search, is it correct approach?

    Read the article

  • 2 dimensional array

    - by ankit
    we have these arrays.... $cities = array("nagpur","kanpur","delhi","chd","Noida","mumbai","nagpur"); $names = array("munish","imteyaz","ram","shyam","ankit","Rahul","mohan"); now i want a 2 dimensional array with name of city as key and all the corresponding names as its values. <?php $cities = array("nagpur","kanpur","nagpur","delhi","kanpur"); $names = array("ankit","atul","aman","amit","manu"); foreach ($cities as $i => $value) { echo "\n"; echo $value; $city=$value; $k=0; foreach ($cities as $ii => $m) { If($city==$m) { echo$names[$ii] ; $final[$i][$k]=$names[$ii]; $arr = array($city => array($k =>$names[$ii] )); $k++; } } echo"\n<tr></tr>"; } wat i tried is this.but it doesnt work.help me

    Read the article

< Previous Page | 1 2 3