Search Results

Search found 1016 results on 41 pages for 'ajeet kumar yadav'.

Page 5/41 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to detect internet connectivity using java program

    - by Sunil Kumar Sahoo
    How to write a java program which will tell me whether I have internet access or not. I donot want to ping or create connection with some external url because if that server will be down then my program will not work. I want reliable way to detect which will tell me 100% guarantee that whether I have internet connection or not irrespective of my Operating System. I want the program for the computers who are directly connected to internet. I have tried with the below program URL url = new URL("http://www.xyz.com/"); URLConnection conn = url.openConnection(); conn.connect(); I want something more appropriate than this program Thanks Sunil Kumar Sahoo

    Read the article

  • How to maximize java swing application

    - by Sunil Kumar Sahoo
    Hi All, I have created a login page using java swing. and i created jar for the application. Now when I run the jar then my login page is displayed then i minimize the application and again run the jar then another instance of my application is displayed (means now in my system I have two login page. 1 is in minimized format and another is in normal state. But I want that if in my system login page is already running and is minimized then if i run the jar once again then it will not start as a new application rather it should maximize the earlier login page. How to achieve this type of functionality ? please help me Thanks Sunil Kumar Sahoo

    Read the article

  • how to reload the whole page through a button placed in a division in jsp

    - by ajeet singh
    when i tried to make web project, i placed the links on the left on one division and a bigger division on the right to load the jsp pages on clicking the links making the main page same... but when there is a need arises to load the whole page by clicking the button placed on the right division, i found that the only page is loaded on the right division jsp calling its action... please help me to sort out this problem..

    Read the article

  • iPhone: Crash When Deleting UITableView Rows

    - by Ajeet Kumar Yadav
    Hi, I am new in iPhone development. I am developing an application that fetches a value from a database and displays it in a table view. I want to delete table rows one by one but the rows do not delete and the application crashes. Here is my row deletion code: - (void)tableView:(UITableView *)tv commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { if(editingStyle == UITableViewCellEditingStyleDelete) { SanjeevKapoorAppDelegate *appDelegate =(SanjeevKapoorAppDelegate *)[[UIApplication sharedApplication] delegate]; list *animal =[appDelegate.list1 objectAtIndex:indexPath.row]; [appDelegate deleteCoffee]; [self.tableView reloadData]; //Delete the object from the table. [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade]; } I also delete all rows with this action: -(IBAction)deletebtn:(id)sender{ SanjeevKapoorAppDelegate *appDelegate =(SanjeevKapoorAppDelegate *)[[UIApplication sharedApplication] delegate]; [appDelegate deleteCoffee]; [self.tableView reloadData]; } How do I properly implement delete in an UITableView?

    Read the article

  • how to solve ran time error NSString, sqlite3_column_text NULL problem?

    - by Ajeet Kumar Yadav
    I am new in iphone application developer i am using sqlite3 database and in app delegate i am wright following code and run properly we also find value from database to in my aplication, but immediately the application is going to crass why this is occurs i am not understand. code is given bellow -(void)Data { databaseName = @"dataa.sqlite"; NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDir = [documentPaths objectAtIndex:0]; databasePath =[documentsDir stringByAppendingPathComponent:databaseName]; [self checkAndCreateDatabase]; list1 = [[NSMutableArray alloc] init]; sqlite3 *database; if (sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) { if(detailStmt == nil) { const char *sql = "Select * from Dataa"; if(sqlite3_prepare_v2(database, sql, -1, &detailStmt, NULL) == SQLITE_OK) { //NSLog(@"Hiiiiiii"); //sqlite3_bind_text(detailStmt, 1, [t1 UTF8String], -1, SQLITE_TRANSIENT); //sqlite3_bind_text(detailStmt, 2, [t2 UTF8String], -2, SQLITE_TRANSIENT); //sqlite3_bind_int(detailStmt, 3, t3); while(sqlite3_step(detailStmt) == SQLITE_ROW) { //NSLog(@"Helllloooooo"); NSString *item= [NSString stringWithUTF8String:(char *)sqlite3_column_text(detailStmt, 0)]; //NSString *fame= [NSString stringWithUTF8String:(char *)sqlite3_column_text(detailStmt, 1)]; //NSString *cinemax = [NSString stringWithUTF8String:(char *)sqlite3_column_text(detailStmt, 2)]; //NSString *big= [NSString stringWithUTF8String:(char *)sqlite3_column_text(detailStmt, 3)]; //pvr1 = pvr; item1=item; //NSLog(@"%@",item1); data = [[NSMutableArray alloc] init]; list *animal=[[list alloc] initWithName:item1]; // Add the animal object to the animals Array [list1 addObject:animal]; //[list1 addObject:item]; } sqlite3_reset(detailStmt); } sqlite3_finalize(detailStmt); // sqlite3_clear_bindings(detailStmt); } } detailStmt = nil; sqlite3_close(database); } when we see console they show the following error giving bellow 2010-03-09 10:02:40.262 SanjeevKapoor[430:20b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[NSString stringWithUTF8String:]: NULL cString' when we see debugger they show error in following line NSString *item= [NSString stringWithUTF8String:(char *)sqlite3_column_text(detailStmt, 0)]; I am not able to solve that problum plz help me.

    Read the article

  • generate all subsets of size k from a set

    - by Kumar
    hi, i want to generate all the subsets of size k from a set. eg:-say i have a set of 6 elements, i have to list all the subsets in which the cardinality of elements is 3. I tried looking for solution,but those are code snippets. Its been long since I have done coding,so I find it hard to understand the code and construct a executable program around it. A complete executable program in C or C++ will be quite helpful. Hoping of an optimal solution using recursion. Thanks in advance. Kumar.

    Read the article

  • how to reloadData in tableView when tableview access data from database.

    - by Ajeet Kumar Yadav
    I am new in iphone i am developing a application that take value from data base and display data in tableview. in this application we save data from one data table to other data table this is when add first time work and when we do second time application is crash. how to solve this problem i am not understand code is given bellow my appdelegate code for insert value from one table to other is given bellow -(void)sopinglist { //////databaseName= @"SanjeevKapoor.sqlite"; databaseName =@"AjeetTest.sqlite"; NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDir = [documentPaths objectAtIndex:0]; databasePath =[documentsDir stringByAppendingPathComponent:databaseName]; [self checkAndCreateDatabase]; list1 = [[NSMutableArray alloc] init]; sqlite3 *database; if (sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) { if(addStmt == nil) { ///////////const char *sql = "insert into Dataa(item) Values(?)"; const char *sql = " insert into Slist select * from alootikki"; ///////////// const char *sql =" Update Slist ( Incredients, Recipename,foodtype) Values(?,?,?)"; if(sqlite3_prepare_v2(database, sql, -1, &addStmt, NULL) != SQLITE_OK) NSAssert1(0, @"Error while creating add statement. '%s'", sqlite3_errmsg(database)); } /////for( NSString * j in k) sqlite3_bind_text(addStmt, 1, [k UTF8String], -1, SQLITE_TRANSIENT); //sqlite3_bind_int(addStmt,1,i); // sqlite3_bind_text(addStmt, 1, [coffeeName UTF8String], -1, SQLITE_TRANSIENT); // sqlite3_bind_double(addStmt, 2, [price doubleValue]); if(SQLITE_DONE != sqlite3_step(addStmt)) NSAssert1(0, @"Error while inserting data. '%s'", sqlite3_errmsg(database)); else //SQLite provides a method to get the last primary key inserted by using sqlite3_last_insert_rowid coffeeID = sqlite3_last_insert_rowid(database); //Reset the add statement. sqlite3_reset(addStmt); // sqlite3_clear_bindings(detailStmt); //} } sqlite3_finalize(addStmt); addStmt = nil; sqlite3_close(database); } And the table View code for access data from database is given bellow SanjeevKapoorAppDelegate *appDelegate =(SanjeevKapoorAppDelegate *)[[UIApplication sharedApplication] delegate]; [appDelegate sopinglist]; ////[appDelegate recpies]; /// NSArray *a =[[appDelegate list1] componentsJoinedByString:@","]; k= [[appDelegate list1] componentsJoinedByString:@","];

    Read the article

  • Optimal strategy to make a C++ hash table, thread safe

    - by Ajeet
    (I am interested in design of implementation NOT a readymade construct that will do it all.) Suppose we have a class HashTable (not hash-map implemented as a tree but hash-table) and say there are eight threads. Suppose read to write ratio is about 100:1 or even better 1000:1. Case A) Only one thread is a writer and others including writer can read from HashTable(they may simply iterate over entire hash table) Case B) All threads are identical and all could read/write. Can someone suggest best strategy to make the class thread safe with following consideration 1. Top priority to least lock contention 2. Second priority to least number of locks My understanding so far is thus : One BIG reader-writer lock(semaphore). Specialize the semaphore so that there could be eight instances writer-resource for case B, where each each writer resource locks one row(or range for that matter). (so i guess 1+8 mutexes) Please let me know if I am thinking on the correct line, and how could we improve on this solution.

    Read the article

  • Internet doesn't work when enable local network

    - by rakesh yadav
    We have the following network setup: A) Router IP 192.168.51.49 B) Windows Server 2008 R2 with dual NIC: Lan A) WAN interface (192.168.51.50) ( Used for internet) Lan B) LAN interface (192.168.30.228) ( used for local connectivity ) When I keep both LAN Enabled than my internet doesn't work, but if I disable my local LAN then internet works fine. How can I resolve this issue? Do I need to do routing on my server Please find the below attached route print result C:\Users\Administrator>route print =========================================================================== IPv4 Route Table =========================================================================== Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 192.168.51.49 192.168.51.50 276 0.0.0.0 0.0.0.0 192.168.30.227 192.168.30.228 266 192.168.30.224 255.255.255.240 On-link 192.168.30.228 266 192.168.30.228 255.255.255.255 On-link 192.168.30.228 266 192.168.30.239 255.255.255.255 On-link 192.168.30.228 266 192.168.51.48 255.255.255.240 On-link 192.168.51.50 276 192.168.51.50 255.255.255.255 On-link 192.168.51.50 276 192.168.51.63 255.255.255.255 On-link 192.168.51.50 276 127.0.0.0 255.0.0.0 On-link 127.0.0.1 306 127.0.0.1 255.255.255.255 On-link 127.0.0.1 306 127.255.255.255 255.255.255.255 On-link 127.0.0.1 306 202.56.230.5 255.255.255.255 192.168.51.49 192.168.51.50 21 202.56.230.6 255.255.255.255 192.168.51.49 192.168.51.50 21 192.168.26.124 255.255.255.255 192.168.51.49 192.168.51.50 21 224.0.0.0 240.0.0.0 On-link 127.0.0.1 306 224.0.0.0 240.0.0.0 On-link 192.168.51.50 276 224.0.0.0 240.0.0.0 On-link 192.168.30.228 266 255.255.255.255 255.255.255.255 On-link 127.0.0.1 306 255.255.255.255 255.255.255.255 On-link 192.168.51.50 276 255.255.255.255 255.255.255.255 On-link 192.168.30.228 266 =========================================================================== Persistent Routes: Network Address Netmask Gateway Address Metric 0.0.0.0 0.0.0.0 192.168.30.227 Default 0.0.0.0 0.0.0.0 192.168.51.49 Default ===========================================================================

    Read the article

  • Passive Scan using wpa_supplicant-0.7.3

    - by Ashish Yadav
    I am using wpa_supplicant-0.7.3 and WL12xx TI Driver(WiFi) . Looking into both code,I seen that both support passive scan . Also, nl80211 driver is used (not wext). I am not able to find any command for passive scan in wpa_cli . With iw , for passive scan we can use : iw dev wlan0 scan passive Similar I want to do passive scan using wpa_supplicant . So need help to know how to do passive scan using wpa_supplicant?

    Read the article

  • Internet doesn't work when enable local Lan

    - by rakesh yadav
    We have the following network setup: A) Router IP 192.168.51.49 B) Windows Server 2008 R2 with dual NIC: B1) WAN interface (192.168.0.2) ( Used for internet) B2) LAN interface (192.168.1.2) ( used for local connectivity) when i keep both LAN Enabled than my internet doesn't work, but if I disabled my local Lan than internet working fine. so please help me how can resolved this issue or should i need to do routing on my server Please find the below attached route print result C:\Users\Administrator>route print =========================================================================== IPv4 Route Table =========================================================================== Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 192.168.51.49 192.168.51.50 276 0.0.0.0 0.0.0.0 192.168.30.227 192.168.30.228 266 192.168.30.224 255.255.255.240 On-link 192.168.30.228 266 192.168.30.228 255.255.255.255 On-link 192.168.30.228 266 192.168.30.239 255.255.255.255 On-link 192.168.30.228 266 192.168.51.48 255.255.255.240 On-link 192.168.51.50 276 192.168.51.50 255.255.255.255 On-link 192.168.51.50 276 192.168.51.63 255.255.255.255 On-link 192.168.51.50 276 127.0.0.0 255.0.0.0 On-link 127.0.0.1 306 127.0.0.1 255.255.255.255 On-link 127.0.0.1 306 127.255.255.255 255.255.255.255 On-link 127.0.0.1 306 202.56.230.5 255.255.255.255 192.168.51.49 192.168.51.50 21 202.56.230.6 255.255.255.255 192.168.51.49 192.168.51.50 21 192.168.26.124 255.255.255.255 192.168.51.49 192.168.51.50 21 224.0.0.0 240.0.0.0 On-link 127.0.0.1 306 224.0.0.0 240.0.0.0 On-link 192.168.51.50 276 224.0.0.0 240.0.0.0 On-link 192.168.30.228 266 255.255.255.255 255.255.255.255 On-link 127.0.0.1 306 255.255.255.255 255.255.255.255 On-link 192.168.51.50 276 255.255.255.255 255.255.255.255 On-link 192.168.30.228 266 =========================================================================== Persistent Routes: Network Address Netmask Gateway Address Metric 0.0.0.0 0.0.0.0 192.168.30.227 Default 0.0.0.0 0.0.0.0 192.168.51.49 Default ===========================================================================

    Read the article

  • Upgrade to ubuntu 13.04 from 12.04 with iso image

    - by Digvijay Yadav
    I have ubuntu 12.04 installed on my system. I want to upgrade it to ubuntu 13.04. I want to do this upgrade using an iso image of ubuntu 13.04. I tried this Solution But it didn't work for me. After running these command I didn't get any alerts about updating. Also I don't understand the gksu part of the solution. Here are the steps I tried: sudo mount -t iso9660 -o loop PATH/TO/ISO /cdrom then sudo /cdrom/cdromupgrade Read more: http://linuxpoison.blogspot.tw/2011/06/how-to-upgrade-ubuntu-using-alternate.html#ixzz2SFMqlOPx I also wanted to know, If I can do this using a networked computer. By this I mean the iso file is on some other computer. Thank you.

    Read the article

  • problem with intel 82865 motherboard graphic driver in windows 7

    - by Sanjay Kumar Yadav
    I have cpu with Pentium 4 3GHz processor. My motherboard is Intel 82865. I have installed the graphic driver for intel 82865 by using the graphic driver of Windows XP and changing the program's compatibility to Windows XP SP2. I got many thing ok with that. For example many resolutions and I can also play GTA. But what I want to know is why I cant view Aero and transparency effect in windows 7. It says contact the manufacturer for compbatible WDDM graphic driver.

    Read the article

  • Cannot get Correct month for a call from call log history

    - by Nishant Kumar
    I am trying to extract information from the call log of the android. I am getting the call date that is one month back from the actual time of call. I mean to say that the information extracted by my code for the date of call is one mont back than the actual call date. I have the following in the Emulator: I saved a contact. Then I made a call to the contact. Code: I have 3 ways of extracting call Date information but getting the same wrong result. My code is as follows: /* Make the query to call log content */ Cursor callLogResult = context.getContentResolver().query( CallLog.Calls.CONTENT_URI, null, null, null, null); int columnIndex = callLogResult.getColumnIndex(Calls.DATE); Long timeInResult = callLogResult.getLong(columnIndex); /* Method 1 to change the milliseconds obtained to the readable date formate */ Time time = new Time(); time.toMillis(true); time.set(timeInResult); String callDate= time.monthDay+"-"+time.month+"-"+time.year; /* Method 2 for extracting the date from tha value read from the column */ Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(time); String Month = calendar.get(Calendar.MONTH) ; /* Method 3 for extracting date from the result obtained */ Date date = new Date(timeInResult); String mont = date.getMonth() While using the Calendar method , I also tried to set the DayLight SAving Offset but it didnot worked, calendar.setTimeZone(TimeZone.getTimeZone("Europe/Paris")); int DST_OFFSET = calendar.get( Calendar.DST_OFFSET ); // DST_OFFSET Boolean isSet = calendar.getTimeZone().useDaylightTime(); if(isSet) calendar.set(Calendar.DST_OFFSET , 0); int reCheck = calendar.get(Calendar.DST_OFFSET ); But the value is not set to 0 in recheck. I am getting the wrong month value by using this also. Please some one help me where I am wrong? or is this the error in emulator ?? Thanks, Nishant Kumar Engineering Student

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >