Search Results

Search found 165 results on 7 pages for 'srikanth naidu'.

Page 7/7 | < Previous Page | 3 4 5 6 7 

  • can I store an id value in array of float type ?

    - by srikanth rongali
    I used, for(id value in values) to get the value from an NSArray. Now I want to store it in 2 dimensional float array[][]. When I try to assign the values to array it is giving error:incompatible types in assignment. I tried to cast the value but I got error: pointer value used where a floating point value was expected. I need to store the values in an 2 dimensional array . How can I make it ? Thank You. @implementation fromFileRead1 NSString *fileNameString; int numberOfEnemies, numberOfValues; -(id)init { if( (self = [super init]) ) { NSString *path = @"/Users/sridhar/Desktop/Projects/exampleOnFile2/enemyDetals.txt"; NSString *contentsOfFile = [[NSString alloc] initWithContentsOfFile:path]; NSArray *lines = [contentsOfFile componentsSeparatedByString:@"\n"]; numberOfEnemies = [lines count]; NSLog(@"The number of Lines: %d", numberOfEnemies); for (id line in lines) { NSLog(@"Line %@", line ); NSString *string1 = line; NSArray *split1 = [string1 componentsSeparatedByString:@","]; numberOfValues = [split1 count]; NSLog(@"The number of values in Row: %d", numberOfValues); for (id value in split1) { NSLog(@"value %@", value); float value1; value1 = [split1 objectAtIndex:2]); NSLog(@"VAlue of Value1 at index 2: %f", value1 ); } } } return self; } @end In enemyDetal.txt I have 1,3,3 2,3,2.8 10,2,1.6

    Read the article

  • How can I set different sound for different players by using [[SimpleAudioEngine sharedEngine] playE

    - by srikanth rongali
    I need to set sounds for different players in my game. There are 10 players. And I have 10 sounds. The players are loaded int his way for( int i = 1; i <5; i++ ) { [playerAnimation addFrameWithFilename: [NSString stringWithFormat:@"Player %02d gun draw_%02d.png", playerNumber, i]]; } How can I set the sounds in this way by giving the filenames. And player1 shoots player1sound should play. How can I do it using [[SimpleAudioEngine sharedEngine] playEffect:@"player1.sound.wav"];

    Read the article

  • IIS 6.0 Server and Unicode Characters

    - by Srikanth
    We are performing a pen test on a simple asp application that uses MS SQL Database. It seems for the authentication they are using dynamic constructed queries but escaping single qoutes. When we use Unicode quotes like %uFFO7,%u02b9 etc we are able to successfully inject SQL injections. Want to understand is it more a kind of configuration issue of IIS server to cannonicalize Unicode characters or the way the validation function to escape single quotes is written is the cause of the problem?

    Read the article

  • logarithms in python

    - by Srikanth
    write a program to find the sum of the logarithms of all the primes from 2 to some number n, and print out the sum of the logs of the primes, the number n, and the ratio of these two quantities in python

    Read the article

  • WebSQL Databases between two different pages?

    - by Srikanth Rayabhagi
    Is there any particular way in which we can access the Web SQL Database of one page, by other page. To make it more clear, suppose a.com creates the database DB and store some info. Now b.com comes and want to access the same database DB. Is there a way? Or are there any alternatives to do this? I tried to implement in HTML5 and Javascript but the databases as well as the localStorages are confining only to particular pages, I want this to be cross the pages.

    Read the article

  • lookup datasource in context every time, Is it right?

    - by Srikanth Dyapa
    In my application i configured more than one datasource (for diff databases). Whenever user sends a request depends upon user category i need to look up for the respective datasource in the context and get a connection from that datasource to execute queries which are assigned to that user. Is it right way to achieve my requirement? I am using tomcat 6, struts 1.3. The databases may be oracle or mysql or both. Give me an optimized solution. Thanks in advance.

    Read the article

  • how can I pass method Of one class to another class ?

    - by srikanth rongali
    I have a ClassA. in ClassA there is a method(-(void)parseData:). I have a ClassB which have ClassA object. And ClassB *aClassB is member variable of ClassA. In ClassB the code is aClassB = [[ClassB alloc]init]; [aClassB parseData]; I have ClassC. I need to use the method parseData of ClassB in ClassC. I think I can use the object created in ClassB of ClassA. How can I pass the method to ClassC ? Thank You.

    Read the article

  • Using Predicate of a class to Search Generic list - Faster than looping?

    - by Srikanth
    Lets say we have a generic list of Class1, typically having ~100 objects for a given session. I would like to see if the list has a particular object. ASP.NET 2.0 allows me to do this: Dim objResult as Class1 = objList.Find(objSearch) How does this approach rate when compared to a traditional For loop, looking at a performance perspective? How would this vary with increase or decrease in length of the list?

    Read the article

  • Can we use (id) in if- else condition ?

    - by srikanth rongali
    I have written my code in following way in cocos2d. id actionTo = [CCFadeOut actionWithDuration:4.0f]; id actionTo0 = [CCSequence actionWithDuration:2.0f]; if (m < enemyNumber) id actionTo1 = [CCCallFunc actionWithTarget:self selector:@selector(goToNextScene)]; else id actionTo1 = [CCCallFunc actionWithTarget:self selector:@selector(goToEndScene)]; id actionSeq = [CCSequence actions:actionTo, actionTo0, actionTo1, nil]; [targetE runAction: [CCSequence actions:actionSeq, nil]]; error: expected expression before 'id' I am getting the above error. Should not we use (id) in if condition ? I want to get called two selectors by using the if- else condition. How can I make it ? Thank You.

    Read the article

  • How to set the attributes of cell progamatically without using nib file ?

    - by srikanth rongali
    - (void)viewDidLoad { [super viewDidLoad]; // Uncomment the following line to display an Edit button in the navigation bar for this view controller. self.title = @"Library"; self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Close" style:UIBarButtonItemStyleBordered target:self action:@selector(close:)]; self.tableView.rowHeight = 80; } -(void)close:(id)sender { // } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease]; UILabel *dateLabel = [[UILabel alloc]init]; dateLabel.frame = CGRectMake(85.0f, 6.0f, 200.0f, 20.0f); dateLabel.tag = tag1; [cell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; cell.contentView.frame = CGRectMake(0.0f, 0.0f, 320.0f, 80.0f); [cell.contentView addSubview:dateLabel]; [dateLabel release]; } // Set up the cell... //[(UILabel *)[cell viewWithTag:tag1] setText:@"Date"]; cell.textLabel.text = @"Date"; return cell; } But the control is not entering into the tableView: method. So I could not see any label in my table. How can I make this ? Thank You

    Read the article

  • How to overcome case sensitive problem with contains method.??

    - by Srikanth
    Is there any solution to overcome case-sensitive problem for contains method. I have code like below string str = m_name; return avobj.Viewname.Contains(str); Eg: Welcome Here welcome here Both are same names but case is different. If I give 'W' in search box it is returning only 1st one. but I need both names display. I am storing the names in collection. And resultant values ( searched values ) are storing in List.

    Read the article

  • Google I/O 2010 - Exploring the Google PowerMeter API

    Google I/O 2010 - Exploring the Google PowerMeter API Google I/O 2010 - Knowledge is (less) power: Exploring the Google PowerMeter API Google APIs 101 Srikanth Rajagopalan, Rus Heywood In this session we will discuss interesting ways to make users understand and manage their home energy use through Google PowerMeter. The Google PowerMeter API currently available allows devices to integrate with Google PowerMeter. Come learn how you can build with the API and about exciting developments ahead. We will dig into the implementation details for integrations and open up the floor for other ideas that may be relevant. For all I/O 2010 sessions, please go to code.google.com From: GoogleDevelopers Views: 5 0 ratings Time: 58:20 More in Science & Technology

    Read the article

  • X server not starting up after new kernel compilation

    - by tech_learner
    I have compiled the Kernel on my 64-bit Debian XPS Studio 1340 Dell system. srikanth@debian:~ - 05:40:52 PM - $ uname -a Linux debian 2.6.32-5-amd64 #1 SMP Thu Mar 22 17:26:33 UTC 2012 x86_64 GNU/Linux Kernel version that I have used and compiled from kernel.org is 2.6.35.13 I have nvidia installed on old kernel. I got the old config and I used the same config to compile the new kernel. Everything went well and I got two debian packages ( image and headers ) which I have installed on my system. When I select the new kernel on the boot menu and I go into it, the X server is not starting up possibly because I have to "rebuild" ( not sure how to do that ) according to this link: http://www.linuxquestions.org/questions/slackware-14/x-server-not-starting-after-kernel-compilation-605265/ Can you suggest how to do the rebuild on nvidia module so that I can start x ( without seeing any blank screen or error saying nvidia module is missing ) ? PS: The link that I have used to compile the kernel is https://help.ubuntu.com/community/Kernel/Compile#Alternate_Build_Method:_The_Old-Fashioned_Debian_Way

    Read the article

  • ios UITableView reloadData don't increase content height

    - by Zoltan Varadi
    I'm facing a strange error in my iOS app and haven't been able to figure out the reason why. In my UITableView i can add new cells, so i refresh the array that is the datasource and call reloadData. Everything works without error. The numberOfRowsInSection is called again, and it's value is one more than it's previous value was. The new cell even gets inserted at the bottom of the tableview, but i cant scroll down to it. I only know that it's there because the tableview bounces and i can see it. I'm guessing the tableview's content height is not getting increased for some reason, but i have no idea why. I'm using iOS 6 btw. Any help is very much appreciated! Thanks, Zoli EDIT, answers for Srikanth's questions: How is data getting added. There's an NSArray containing objects of a specific type. The array.count is the number of the number of cells. This NSArray gets its values from a database query. When you say, you are refreshing the array, what do you mean. By refreshing the array i mean i execute a new query in the database and put the results of this query into an NSArray. this will be the tableview's datasource array. Like this: dataSourceArray = [dbManager executeQuery]; [tableView reloadData]; Are you adding the data within the same view controller Yes. Can you show some code as to what you are doing See above. Is the table view at the root of the view controllers view or is it within another view The tableview is the main view's first child. Can you try adding data to the array at the beginning, so that you can view the cell being added at the top. I don't understand what you mean.

    Read the article

< Previous Page | 3 4 5 6 7