Search Results

Search found 388 results on 16 pages for 'amit yadav'.

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

  • How to set permalink of your blog post according to date and title of post?

    - by Amit
    I am having this website http://www.finalyearondesk.com . My blogs post link are set like this.. http://www.finalyearondesk.com/index.php?id=28 . I want it to set like this ... finalyearondesk.com/2011/09/22/how-to-recover-ubuntu-after-it-is-crashed/ . I am using the following function to get these posts... function get_content($id = '') { if($id != ""): $id = mysql_real_escape_string($id); $sql = "SELECT * from blog WHERE id = '$id'"; $return = '<p><a href="http://www.finalyearondesk.com/">Go back to Home page</a></p>'; echo $return; else: $sql = "select * from blog ORDER BY id DESC"; endif; $res = mysql_query($sql) or die(mysql_error()); if(mysql_num_rows($res) != 0): while($row = mysql_fetch_assoc($res)) { echo '<h1><a href="index.php?id=' . $row['id'] . '">' . $row['title'] . '</a></h1>'; echo '<p>' . "By: " . '<font color="orange">' . $row['author'] . '</font>' . ", Posted on: " . $row['date'] . '<p>'; echo '<p>' . $row['body'] . '</p><br />'; } else: echo '<p>We are really very sorry, this page does not exist!</p>'; endif; } Any suggestions how to do this? And can we do this by using .htaccess?

    Read the article

  • Eclipse Juno (4.2.1) crashes frequently after upgrading to Ubuntu12.10 from 12.04 (both 64bits)?

    - by Amit
    I was using eclipse Juno (ver 4.2.1) on my 64bit ubuntu 12.04 for almost a month or more. It was working perfectly and I really enjoyed working on it. However two days back I upgraded my machine to Ubuntu 12.10 since than eclipse Juno is working strangely irritating. It crashes frequently. I even removed the old installation completely and reinstalled everything (ADT, Subclipse, CDT etc.) What could be the possible reason behind this ? How I solve it ?

    Read the article

  • Is it possible to use 3G internet for a TCP/IP game server?

    - by Amit Ofer
    I'm working on a turned based multiplayer android game with a friend. I started working on the game server and client using socket programming. I found a few tutorials on how to implement a basic chat on android and I started extending that example to suit my needs. Basically the game is really simple and the communication only include sending a few string from the client to the server every turn and sending the calculated scores back to all the clients after each turn. the idea is that one of the players creates the game and thus initialize the server, and each player connects to this client using ip. I tried this solution and it seems to work great when all the players are using the same wifi connection or by using router port forwarding. The problem is when trying to use 3G internet for the server, I guess the problem is that 3G ip address isn't global and you can't use port forwarding there, correct me if I'm wrong here. Is there a way to overcome this issue? or the only solution is to limit my game to wifi only or think of a different solution than the standard socket programming solution? I.E web server etc. what do you think would be the best approach here? Thanks.

    Read the article

  • Memory Leak Issue in Weblogic, SUN, Apache and Oracle classes Options

    - by Amit
    Hi All, Please find below the description of memory leaks issues. Statistics show major growth in the perm area (static classes). Flows were ran for 8 hours , Heap dump was taken after 2 hours and at the end. A growth in Perm area was identified Statistics show from our last run 240MB growth in 6 hour,40mb growth every hour 2GB heap –can hold ¾ days ,heap will be full in ¾ days Heap dump show –growth in area as mentioned below JMS connection/session Area Apache org.apache.xml.dtm.DTM[] org.apache.xml.dtm.ref.ExpandedNameTable$ExtendedType org.jdom.AttributeList org.jdom.Content[] org.jdom.ContentList org.jdom.Element SUN * ConstantPoolCacheKlass * ConstantPoolKlass * ConstMethodKlass * MethodDataKlass * MethodKlass * SymbolKlass byte[] char[] com.sun.org.apache.xml.internal.dtm.DTM[] com.sun.org.apache.xml.internal.dtm.ref.ExtendedType java.beans.PropertyDescriptor java.lang.Class java.lang.Long java.lang.ref.WeakReference java.lang.ref.SoftReference java.lang.String java.text.Format[] java.util.concurrent.ConcurrentHashMap$Segment java.util.LinkedList$Entry Weblogic com.bea.console.cvo.ConsoleValueObject$PropertyInfo com.bea.jsptools.tree.TreeNode com.bea.netuix.servlets.controls.content.StrutsContent com.bea.netuix.servlets.controls.layout.FlowLayout com.bea.netuix.servlets.controls.layout.GridLayout com.bea.netuix.servlets.controls.layout.Placeholder com.bea.netuix.servlets.controls.page.Book com.bea.netuix.servlets.controls.window.Window[] com.bea.netuix.servlets.controls.window.WindowMode javax.management.modelmbean.ModelMBeanAttributeInfo weblogic.apache.xerces.parsers.SecurityConfiguration weblogic.apache.xerces.util.AugmentationsImpl weblogic.apache.xerces.util.AugmentationsImpl$SmallContainer weblogic.apache.xerces.util.SymbolTable$Entry weblogic.apache.xerces.util.XMLAttributesImpl$Attribute weblogic.apache.xerces.xni.QName weblogic.apache.xerces.xni.QName[] weblogic.ejb.container.cache.CacheKey weblogic.ejb20.manager.SimpleKey weblogic.jdbc.common.internal.ConnectionEnv weblogic.jdbc.common.internal.StatementCacheKey weblogic.jms.common.Item weblogic.jms.common.JMSID weblogic.jms.frontend.FEConnection weblogic.logging.MessageLogger$1 weblogic.logging.WLLogRecord weblogic.rjvm.BubblingAbbrever$BubblingAbbreverEntry weblogic.rjvm.ClassTableEntry weblogic.rjvm.JVMID weblogic.rmi.cluster.ClusterableRemoteRef weblogic.rmi.internal.CollocatedRemoteRef weblogic.rmi.internal.PhantomRef weblogic.rmi.spi.ServiceContext[] weblogic.security.acl.internal.AuthenticatedSubject weblogic.security.acl.internal.AuthenticatedSubject$SealableSet weblogic.servlet.internal.ServletRuntimeMBeanImpl weblogic.transaction.internal.XidImpl weblogic.utils.collections.ConcurrentHashMap$Entry Oracle XA Transaction oracle.jdbc.driver.Binder[] oracle.jdbc.driver.OracleDatabaseMetaData oracle.jdbc.driver.T4C7Ocommoncall oracle.jdbc.driver.T4C7Oversion oracle.jdbc.driver.T4C8Oall oracle.jdbc.driver.T4C8Oclose oracle.jdbc.driver.T4C8TTIBfile oracle.jdbc.driver.T4C8TTIBlob oracle.jdbc.driver.T4C8TTIClob oracle.jdbc.driver.T4C8TTIdty oracle.jdbc.driver.T4C8TTILobd oracle.jdbc.driver.T4C8TTIpro oracle.jdbc.driver.T4C8TTIrxh oracle.jdbc.driver.T4C8TTIuds oracle.jdbc.driver.T4CCallableStatement oracle.jdbc.driver.T4CClobAccessor oracle.jdbc.driver.T4CConnection oracle.jdbc.driver.T4CMAREngine oracle.jdbc.driver.T4CNumberAccessor oracle.jdbc.driver.T4CPreparedStatement oracle.jdbc.driver.T4CTTIdcb oracle.jdbc.driver.T4CTTIk2rpc oracle.jdbc.driver.T4CTTIoac oracle.jdbc.driver.T4CTTIoac[] oracle.jdbc.driver.T4CTTIoauthenticate oracle.jdbc.driver.T4CTTIokeyval oracle.jdbc.driver.T4CTTIoscid oracle.jdbc.driver.T4CTTIoses oracle.jdbc.driver.T4CTTIOtxen oracle.jdbc.driver.T4CTTIOtxse oracle.jdbc.driver.T4CTTIsto oracle.jdbc.driver.T4CXAConnection oracle.jdbc.driver.T4CXAResource oracle.jdbc.oracore.OracleTypeADT[] oracle.jdbc.xa.OracleXAResource$XidListEntry oracle.net.ano.Ano oracle.net.ns.ClientProfile oracle.net.ns.ClientProfile oracle.net.ns.NetInputStream oracle.net.ns.NetOutputStream oracle.net.ns.SessionAtts oracle.net.nt.ConnOption oracle.net.nt.ConnStrategy oracle.net.resolver.AddrResolution oracle.sql.CharacterSet1Byte we are using Oracle BEA Weblogic 9.2 MP3 JDK 1.5.12 Oracle versoin 10.2.0.4 (for oracle we found one path which is needed to applied to avoid XA transaction memory leaks). But we are stuck to resolve SUN, BEA Weblgogic and Apache leaks. please suggest... regards, Amit J.

    Read the article

  • Remove specific definitions from a variable in PHP

    - by Amit
    Hi everyone, I have a PHP mail script that validates name, email address, and phone number before sending the mail. This then means that the Name, Email address, and Phone fields are Required Fields. I want to have it so that the Name and EITHER Email or Phone are required. Such that if a name and phone are inputted, it sends the mail, or if a name and an email are inputted, it also sends the email. The way the script works right now is it has several IF statements that check for (1) name, (2) email and (3) phone. Here's an example of an if statement of the code: if ( ($email == "") ) { $errors .= $emailError; // no email address entered $email_error = true; } if ( !(preg_match($match,$email)) ) { $errors .= $invalidEmailError; // checks validity of email $email_error = true; } And here's how it sends the mail: if ( !($errors) ) { mail ($to, $subject, $message, $headers); echo "<p id='correct'>"; echo "?????? ????? ??????!"; echo "</p>"; } else { if (($email_error == true)) { $errors != $phoneError; /*echo "<p id='errors'>"; echo $errors; echo "</p>";*/ } if (($phone_error == true)) { $errors != $emailError; $errors != $invalidEmailError; /*echo "<p id='errors'>"; echo $errors; echo "</p>";*/ } echo "<p id='errors'>"; echo $errors; echo "</p>"; } This doesn't work though. Basically this is what I want to do: If no email address was entered or if it was entered incorrectly, set a variable called $email_error to be true. Then check for that variable, and if it's true, then remove the $phoneError part of the $errors variable. Man I hope I'm making some sense here. Does anyone know why this doesn't work? It reports all errors if all fields are left empty :( Thanks! Amit

    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

  • Download Super Mario Bros Game For Offline Playing [Free Stuff]

    - by Gopinath
    If you love to play the classic Super Mario Bros, here is some interesting stuff for you. This classic & world’s favorite game is available a free download for everyone to play offline on their computers. Game developer Jay Pavlina recreated Super Mario Bros in flash and offering his 1 year hard work as a free download to every one. To play the game offline, download Super Mario Bros from here (5.2 MB)  and drag and drop  the downloaded swf file on to your web browse(IE or Firefox is preferred. Chrome does not play nice with Flash). The same game is hosted online at newgrounds.com. The moment I read about the free download on Amit’s blog, i downloaded it immediately as kids enjoying summer vacation at my home love to play this game all the day. Thanks Amit. Join us on Facebook to read all our stories right inside your Facebook news feed.

    Read the article

  • Oracle OpenWorld Series: Fusion Middleware Lineup

    - by Michelle Kimihira
    With Oracle OpenWorld just days away, I just wanted to highlight once again these three must-attend session: Monday, 10/1 10:45 AM – 11:45 AM GEN9504 - General Session: Innovation Platform for Oracle Apps, Including Fusion Applications Amit Zavery, Vice President, Fusion Middleware Product Management Strategy and roadmap session for Fusion Middleware for Enterprise Applications with customers, Boeing, Electronic Arts and Underwriters Laboratories Moscone West, 3002/3004 Tuesday, 10/2 10:15 AM – 11:15 AM GEN9394 - General Session: Oracle Fusion Middleware Strategies Driving Business Innovation Hasan Rizvi, Executive Vice President of Product Development Strategy and roadmap session for Fusion Middleware with customers, Nintendo, Los Angeles Dept. of Water & Power and Nike Moscone North, Hall D Tuesday, 10/2 11:45 AM – 12:45AM CON9162 – Oracle Fusion Middleware: Meet This Year’s Most Impressive Customer Projects Hear from the winners of the 2012 Oracle Fusion Middleware Innovation Awards and see which customers are taking home a trophy for the 2012 Oracle Fusion Middleware Innovation Award.  Read more about the Innovation Awards here. Moscone West, 3001 Be sure to check out the individual Focus On documents to serve as your roadmap to must-attend sessions and demos. All other Focus On documents can be found here. Best of Oracle Fusion Middleware Mobile Computing Fusion Middleware for Enterprise Applications Oracle ADF and Fusion Development Business Process Management Oracle Coherence Cloud Application Foundation Oracle WebLogic Server Data Integration SOA and BPM Exalogic Elastic Cloud SOA for Developers Identity Management Social Master Data Management WebCenter   We look forward to seeing you at Oracle OpenWorld and in our Fusion Middleware sessions! Additional Information ·         Relevant Blogs: Oracle OpenWorld Countdown Begins ,  Best of Oracle Fusion Middleware, Fusion Middleware for Enterprise Applications, Amit Zavery’s General Session, Hasan Rizvi’s General Session, All Things Mobile, Oracle OpenWorld Blog ·         Product Information on Oracle.com: Oracle Fusion Middleware ·         Subscribe to our regular Fusion Middleware Newsletter ·         Follow us on Twitter and Facebook

    Read the article

  • Security Newsletter November Edition is Out

    - by Tanu Sood
    The November edition of the Security Inside Out Newsletter is now out. This month’s newsletter captures the highlights from Oracle OpenWorld. The conference registration broken all the past records and so did all Security related events and activities at OpenWorld. From Security keynotes, conference sessions, hands-on-labs, product demonstrations to the very successful Executive Edge @ Openworld: Chief Security Officer Summit. The main feature discuses the key topics and trends compiled from across all the Security related sessions. The newsletter also features an interview with Amit Jasuja, Senior Vice President, Security and Identity Management at Oracle. Amit discusses the key trends in the industry and how these have helped shape innovation in the latest release of Oracle Identity Management solution set. If you are looking at cloud, social and mobile and are concerned about security, you don’t want to miss this feature. As always, the newsletter captures both recent and upcoming Security and Identity Management events, conferences, training, news and more. So, if you haven’t done so, we recommend you subscribe to the Security Inside Out Newsletter today. We’d love to hear from you. Let us know some topics you’d like to see covered in the upcoming editions. Or just let us know how we are doing. We look forward to hearing from you.

    Read the article

  • Oracle OpenWorld Countdown Begins

    - by Michelle Kimihira
    Oracle OpenWorld is a little over 3 weeks away and it is bigger than ever!  We are very excited to meet with you and share our exciting innovations around Oracle Fusion Middleware. To help you navigate, there will be a series of blogs to help you make the most out of the event. Thomas Kurian, Executive Vice President, Product Development will be delivering his keynote, “The Oracle Cloud: Oracle’s Cloud Platform and Applications Strategy” on Tuesday, October 2 at 8:00 AM – 9:45 AM in Moscone North, Hall D. Be sure to attend this session and gain insight on how Oracle’s complete suite of cloud applications are transforming how customers manage their businesses. Here are the top 5 Oracle Fusion Middleware General Sessions you don’t want to miss: Monday, 10/1 10:45 AM – 11:45 AM GEN9504 - General Session: Innovation Platform for Oracle Apps, Including Fusion Applications Amit Zavery, Vice President, Fusion Middleware Product Management Moscone West, 3002/3004 Monday, 10/1 1:45PM – 2:45 PM GEN11554 – General Session: Extend Oracle Applications to Mobile Devices with Oracle’s Mobile Technologies Moscone West, 3002/3004 Monday, 10/1 4:45 PM – 5:45 PM GEN11422 – General Session: Building and Managing a Private Oracle Java and Middleware Cloud Moscone West, 3014 Tuesday, 10/2 10:15 AM – 11:15 AM GEN9394 - General Session: Oracle Fusion Middleware Strategies Driving Business Innovation Hassan Rizvi, Executive Vice President of Product Development Moscone North, Hall D Tuesday, 10/2 11:45 AM – 12:45AM CON9162 – Oracle Fusion Middleware: Meet This Year’s Most Impressive Customer Projects Moscone West, 3001 Here is what else you can expect to see on the Oracle Fusion Middleware Blog leading up to Oracle OpenWorld 2012. §  Week of 10-14 September: Best of Oracle Fusion Middleware and Oracle Fusion Middleware for Enterprise Applications §  Week of 17-21 September: What to expect in Hassan Rizvi’s (Executive Vice President of Product Development) and Amit Zavery’s (Vice President of Product Management) sessions §  Week of 24-28 September: All Things Mobile and Fusion Middleware Lineup

    Read the article

  • Blackberry Development, communicating two Blackberry device in a multiplayer game programatically

    - by Nikesh Yadav
    Hi Forum, We are developing a game application for Blackberry, which will have multi player option to let two or more player compete against each other. We have implemented the logic for that and already two or more player are able to play the game simultaneously on single device. Now we want to upgrade our application so that two or more user can compete each other playing from different device and different locations. Can anyone please help me by providing me the way (or code) to achieve this (communicating two blackberry devices over the air to access single session programmaticaly)? I found the code to connect two device using Bluetooth but as the player may situated in different geographic regions we need to achieve this using over the air connection. Thanks in advance. Thanks, Nikesh

    Read the article

  • how to update database table in sqlite3 iphone

    - by Ajeet Kumar Yadav
    Hi I am new in Iphone i am developing application that is use database but i am face problem. In My application I am using table view. I am fetch the value from database in the table view this is done after that we also insert value throw text field in that table of database and display that value in table view.I am also use another table in database table name is Alootikki the value of table alootikki is display in other table view in application and user want to add this table alootikki value in first table of database and display that value in table view when we do this value is display only in the table view this is not write in the database table. when value is display and user want to add other data throw text field then only that add value is show first value is remove from table view. I am not able to solve this plz help me. The code is given bellow for database -(void)Data1 { //////databaseName = @"dataa.sqlite"; databaseName = @"Recipe1.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(Incredients ) Values(?)"; if(sqlite3_prepare_v2(database, sql, -1, &addStmt, NULL) != SQLITE_OK) NSAssert1(0, @"Error while creating add statement. '%s'", sqlite3_errmsg(database)); } sqlite3_bind_text(addStmt, 1, [i 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); } -(void)sopinglist { databaseName= @"Recipe1.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(Incredients,Recipename,foodtype ) Values(?,?,?)"; ///////////// 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); } -(void)Data { ////////////////databaseName = @"dataa.sqlite"; databaseName = @"Recipe1.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 Slist "; 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 *item= [NSString stringWithUTF8String:(char *)sqlite3_column_text(detailStmt, 0)]; char *str=( char*)sqlite3_column_text(detailStmt, 0); if( str) { item = [ NSString stringWithUTF8String:str ]; } else { item= @""; } //+ (NSString*)stringWithCharsIfNotNull: (char*)item /// { // if ( item == NULL ) // return nil; //else // return [[NSString stringWithUTF8String: item] //stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]]; //} //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); } (void)recpies { /////////////////////databaseName = @"Data.sqlite"; databaseName = @"Recipe1.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"; const char *sql ="select *from alootikki"; 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 *item= [NSString stringWithUTF8String:(char *)sqlite3_column_text(detailStmt, 0)]; char *str=( char*)sqlite3_column_text(detailStmt, 0); if( str) { item = [ NSString stringWithUTF8String:str ]; } else { item= @""; } //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); }

    Read the article

  • CakePHP session sharing between two apps, on the same domain

    - by Amit Yadav
    I am having two cakephp application working on the same domain. I access them like localhost:8080/wishlist & localhost:8080/lighthouse The wishlist is a separate cakePHP application and the lighthouse is a separate CakePHP application. The login page is at localhost:8080/lighthouse, now i want the session generated by the lighthouse application to be used in the wishlist application. The directory structure is /htdocs /wishlist /app /config .... /lighthouse /app /config .... I have edited the core.php file for both the application. I am using the same session cookie name and the same security sale but i am not able to get the session on the wishlist application. Can some one let me know how can i share session in between my two application.

    Read the article

  • what is duck typing?

    - by ashish yadav
    I recently read an article about duck-typing.It said about calling functions of different classes using object of any class. Is it true?And how will the compiler do it on runtime? I apologize if i am not clear.But it really fascinates me , if we could do it dynamically. So if u people got any idea.I am all ears. thank you!! how will the function be accessed by object of any other class. that violates the basic principle of OOP.and that too dynamically during runtime. And is this feature possible in case of OOP languages?

    Read the article

  • Blackberry Development, adding dynamic number of buttons and setting Fieldchangelistener() for them

    - by Nikesh Yadav
    Hi, I am adding dynamic number of buttons in a Blackberry application and trying to get different events on each button click. I am not able to apply the setchangelistener() for these array of buttons as once the loop finishes after adding all the buttons, the events gets generated only for the last indexed button. If I make us of getIndex(), it runs fine only if I am not adding any other fields on my screen, but if I add other fields along with these array of buttons, the getIndex() function count them in the indexing as well. Can anyone please help me out in setting FieldChangeListener to array of ButtonField? Here is a sample code of the way I am using the array of ButtonField. I the code I have added two test LabelField at the top of the screen, if I remove them the code will run fine and I will get different result for each button click, but if I keep them active, the indexing gets effected and the Button wont work. package buttonclickloop; import net.rim.device.api.ui.DrawStyle; import net.rim.device.api.ui.Field; import net.rim.device.api.ui.FieldChangeListener; import net.rim.device.api.ui.component.ButtonField; import net.rim.device.api.ui.component.LabelField; import net.rim.device.api.ui.container.HorizontalFieldManager; import net.rim.device.api.ui.container.MainScreen; public class ButtoncClickLoop extends MainScreen { int i = 0; private ButtonField[] btn = new ButtonField[50]; public ButtoncClickLoop() { // TODO Auto-generated constructor stub LabelField Field1 = new LabelField("Field1"); LabelField Field2 = new LabelField("Field2",DrawStyle.RIGHT | ButtonField.USE_ALL_WIDTH); HorizontalFieldManager FieldHmgr = new HorizontalFieldManager(); FieldHmgr.add(Field1); FieldHmgr.add(Field2); FieldHmgr.setMargin(0,0,10,5); add(FieldHmgr); while (i < 3){ FieldChangeListener listener = new FieldChangeListener() { public void fieldChanged(Field field, int context) { context = field.getIndex(); if (field == btn[context]){ add(new LabelField("Label" + context + "")); } } }; btn[i] = new ButtonField("Button" + i + ""); btn[i].setChangeListener(listener); add(btn[i]); i = i + 1; } } } Thanks, Nikesh

    Read the article

  • My Application running very slow..

    - by Atul Yadav
    Hi All.. I develop a application based on Advance data grid. In this grid every column add with help of item render and I have added check box in all the column header also.In the Grid i used xml data provider. I am creating xml as string and cast this string in to xml. When i click any cell it takes 10-13 sec and in the cell click handler i get value of System.totalMemory is 255205376. Please any one suggest me what i will do. Thanks

    Read the article

  • View hide problem

    - by Ajeet Kumar Yadav
    Hello, I am using a Xib (tab bar controller with navigation bar). when i use navigation bar in app delegate then Xib slides little bit bellow.Actually i want a navigation bar on enter page so it is compulsory to define navigation bar in app delegate. Please help me how i solve this problem.

    Read the article

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