Search Results

Search found 164 results on 7 pages for 'pankaj khurana'.

Page 6/7 | < Previous Page | 2 3 4 5 6 7  | Next Page >

  • xml parser not able to read all the nodes of the xml

    - by pankaj
    Hi i am trying to get values from all the nodes of a xml returned from a web service. But my code only reads first node, it does not read it further. code: -(void)parseData{ NuanceAppDelegate *appDel = (NuanceAppDelegate *)[[UIApplication sharedApplication] delegate]; NSString *url = @"http://cmweb.bpomatrix.net/SmartPhoneService.svc/login/"; url = [[[url stringByAppendingString:UserName] stringByAppendingString:@"/"] stringByAppendingString:Password]; url = [[url stringByAppendingString:@"/"] stringByAppendingString:appDel.CPAID]; NSLog(@"log: @%",url); NSURL *loginURL = [NSURL URLWithString:url]; NSXMLParser *home_Parser = [[NSXMLParser alloc] initWithContentsOfURL:loginURL]; [home_Parser setDelegate:self]; dict = [[NSMutableDictionary alloc] init]; [home_Parser parse]; } - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict{ if([elementName isEqualToString:@"Address"]) addressFound = TRUE; if([elementName isEqualToString:@"Name"]) nameFound = TRUE; if([elementName isEqualToString:@"LoyaltyNum"]) loyaltyNumFound = TRUE; if([elementName isEqualToString:@"City"]) cityFound = TRUE; if([elementName isEqualToString:@"Province"]) proFound = TRUE; if([elementName isEqualToString:@"Zip"]) zipFound = TRUE; //NSLog(@"Response %@",responseFound); } - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string{ if(addressFound) { [dict setObject:string forKey:@"address"]; addressFound = FALSE; } else if(nameFound) { [dict setObject:string forKey:@"name"]; nameFound = FALSE; } else if(loyaltyNumFound) { [dict setObject:string forKey:@"loyaltyNum"]; loyaltyNumFound = FALSE; } else if(cityFound) { [dict setObject:string forKey:@"city"]; cityFound = FALSE; } else if(proFound) { [dict setObject:string forKey:@"province"]; proFound = FALSE; } else if(zipFound) { [dict setObject:string forKey:@"zip"]; zipFound = FALSE; } } - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { if([elementName isEqualToString:@"clsUserProfile"]) { [self parsingOver]; } } -(void)parsingOver { NuanceAppDelegate *appDel = (NuanceAppDelegate *)[[UIApplication sharedApplication] delegate]; appDel.dictProfile = dict; }

    Read the article

  • Optimal directory structure for filesystem

    - by Pankaj
    We have large scale web application which has millions of customer. Each customer can have document based on document type. We may have 20-30 types of documents. We are planning to use GlusterFS for storing these documents. I'm trying to find out what are the limitations of Gluster as far as number of files/directories ? Do we need to have hierarchical directory structure ? What would be the optimal directory structure ? Does this make sense - CustmerId Documenttype File1 File2

    Read the article

  • Detecting keyPress inside an IFRAME using jQuery

    - by Pankaj
    Hello All can i detecting keyPress inside an IFRAME using jQuery? when user paste any copy text in ifram i want to check this text, Is this text contain HTML tags or not. Please help me. <iframe class="abc"> <html> <head> </head> <body> some text here(This text may contain html tag) </body> </html> </iframe>

    Read the article

  • rowupdating not giving new values.

    - by pankaj
    Hi, I am working on a application where i am using rowupdating event of the gridview. I am using templatefield in my columns so i am not able to get the new values from the textboxws that i am having in the gridview. How can i get the new values from the textboxes. Following is my code in rowupdating: protected void gviewTemplate_RowUpdating(object sender, GridViewUpdateEventArgs e) { gviewTemplate.EditIndex = -1; string rowNum = ViewState["ID"].ToString(); Label lbl2 = (Label)gviewTemplate.Rows[e.RowIndex].FindControl("lblTemplateName"); Label lbl1 = (Label)gviewTemplate.Rows[e.RowIndex].FindControl("lblUploaded"); TextBox txtTempName = (TextBox)gviewTemplate.Rows[e.RowIndex].FindControl("txtTemplateName"); TextBox txtHeading = (TextBox)gviewTemplate.Rows[e.RowIndex].FindControl("txtHeading"); TextBox txtCoupon = (TextBox)gviewTemplate.Rows[e.RowIndex].FindControl("txtCouponText"); TextBox txtBrand = (TextBox)gviewTemplate.Rows[e.RowIndex].FindControl("txtBrandName"); TextBox txtSearchText = (TextBox)gviewTemplate.Rows[e.RowIndex].FindControl("txtSearch"); TextBox txtDiscount = (TextBox)gviewTemplate.Rows[e.RowIndex].FindControl("txtDiscount"); TextBox txtStartDt = (TextBox)gviewTemplate.Rows[e.RowIndex].FindControl("txtStartDt"); } i want to get the new values form these textboxes but it is always giving me old values. and yes, e.Newvalues is not giving me anything. It is always empty. This is small extract from my gridview design: <asp:GridView runat="server" AutoGenerateColumns="False" ID="gviewTemplate" onrowdatabound="gviewTemplate_RowDataBound" DataKeyNames="F1" onrowcommand="gviewTemplate_RowCommand" onrowediting="gviewTemplate_RowEditing" onrowcancelingedit="gviewTemplate_RowCancelingEdit" onrowupdating="gviewTemplate_RowUpdating" onrowdeleting="gviewTemplate_RowDeleting" onrowupdated="gviewTemplate_RowUpdated"> <Columns> <asp:TemplateField HeaderText="Uploaded Image"> <EditItemTemplate> <asp:LinkButton Text="Reload" runat="server" OnClick="lbtnReloadImage_Click" CommandName="reload" ID="lbtnReloadImage"></asp:LinkButton> </EditItemTemplate> <ItemTemplate> <table id="Table2" runat="server" width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td> <asp:Label Runat="server" Text='<%# Eval("Uploaded") %>' ID="lblUploaded"></asp:Label> </td> </tr> </table> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Template Name"> <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" /> <EditItemTemplate> <asp:TextBox ID="txtTemplateName" Width="60" Runat="server" Text='<%# Eval("F1") %>'></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator1" Runat="server" ErrorMessage="You must provide a Product Name." ControlToValidate="txtTemplateName">*</asp:RequiredFieldValidator> </EditItemTemplate> <ItemTemplate> <table id="Table3" runat="server" width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td> <asp:Label ID="lblTemplateName" runat="server" Text='<%# Eval("F1") %>'></asp:Label> </td> </tr> </table> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Heading"> <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" /> <EditItemTemplate> <asp:TextBox ID="txtHeading" Runat="server" Width="60" Text='<%# Eval("F2") %>'></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator2" Runat="server" ErrorMessage="You must provide a Product Name." ControlToValidate="txtHeading">*</asp:RequiredFieldValidator> </EditItemTemplate> <ItemTemplate> <table id="Table4" runat="server" width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td> <asp:Label ID="lblHeading" runat="server" Text='<%# Eval("F2") %>'></asp:Label> </td> </tr> </table> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Coupon Text"> <ItemStyle VerticalAlign="Top" HorizontalAlign="Center" /> <EditItemTemplate> <asp:TextBox ID="txtCouponText" Runat="server" Width="80" Text='<%# Bind("F3") %>'></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator3" Runat="server" ErrorMessage="You must provide a Product Name." ControlToValidate="txtCouponText">*</asp:RequiredFieldValidator> </EditItemTemplate> <ItemTemplate> <table id="Table5" runat="server" width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td> <asp:Label Runat="server" Text='<%# Bind("F3") %>' ID="lblCouponText"></asp:Label> </td> </tr> </table> </ItemTemplate> </asp:TemplateField> Can anyone please tell me how to get the new values from these textboxes?

    Read the article

  • My iphone app gets memory warning and killed at 6.8MB

    - by Pankaj
    My app has a thread that does some time consuming job for more than a minute and the app consumes around 6.8MB of memory. I receive a memory warning after sometime and then it gets killed. There is nothing that I can release, and I am using not even 7MB of memory...driving me crazy...any advice please?

    Read the article

  • Content alignment for Gridviewcolumn in the listview

    - by Pankaj Upadhyay
    Please see the picture below Following is the code for this :: <Grid> <ListView Style="{StaticResource listViewStyle}" Name="transactionListView" HorizontalAlignment="Stretch" VerticalAlignment="Top" ItemsSource="{Binding}" MouseDoubleClick="transactionListView_MouseDoubleClick" IsSynchronizedWithCurrentItem="True" > <ListView.View> <GridView ColumnHeaderContainerStyle="{StaticResource gridViewHeaderColumnStyle}"> <GridView.Columns> <GridViewColumn Width="70" Header="Serial" DisplayMemberBinding="{Binding Path=Serial}" /> <GridViewColumn Width="100" Header="Date" DisplayMemberBinding="{Binding Path=Date, StringFormat={}{0:dd-MM-yyyy}}" /> <GridViewColumn Width="200" Header="Seller" DisplayMemberBinding="{Binding Path=Seller}" /> <GridViewColumn Width="200" Header="Buyer" DisplayMemberBinding="{Binding Path=Buyer}" /> <GridViewColumn Width="70" Header="Bales" DisplayMemberBinding="{Binding Path=Bales}" /> </GridView.Columns> </GridView> </ListView.View> </ListView> </Grid>

    Read the article

  • Display a loading message / gif

    - by Pankaj
    I am facing a problem on load pdf on browser. its working fine but slow in load. That's why i want to display a loading message / gif until it's fully loaded so the user isn't looking at a blank screen. My question is same as previous question http://stackoverflow.com/questions/1138232/html-embedded-pdfs-onload

    Read the article

  • import a text file into a temporary table using 'Load data infile' in a stored procedure- MySQL

    - by Pankaj
    I need to import a text file into a temporary table and from that select portions of it to insert in different tables. I wanted to use 'LOAD DATA INFILE'. Is there any way, i can use 'Load data infile' in a stored procedure. I am using mysql. LOAD DATA LOCAL INFILE 'C:\\MyData.txt' INTO TABLE tempprod fields terminated by ',' lines terminated by '\r\n'; SELECT * FROM product p;

    Read the article

  • nsuserdefault not able to save values.

    - by pankaj
    hi i am trying to use nsuser defaults to save some default values in database. I am able to save the values in the nsuserdefault(even checked it in nslog). Now i need the values in app delegate when the application is restarted. But i am not getting anything in the nsuserdefault. Following is my code from my class where i save the values in nsuserdefault: NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; [prefs setObject:appDel.dictProfile forKey:@"dict"]; NSLog(@"%@",[prefs valueForKey:@"dict"]); Following is my code from App Delegagte: NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; NSLog(@"%@",[prefs valueForKey:@"dict"]); the above code always returns me null. Can some one please help me

    Read the article

  • how to delete a image from iphone application

    - by pankaj
    I am working an iphone app where i am giving the option of downloading an image to user's iphone. Following is my code for downloading of image. UIImage *image = [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:urlAddress]]]; NSString *pngFilePath = [[[NSString stringWithFormat:@"%@/",docDir] stringByAppendingString:[NSString stringWithFormat:@"%@",couponID]] stringByAppendingString:@".png"]; NSData *data1 = [NSData dataWithData:UIImagePNGRepresentation(image)]; [data1 writeToFile:pngFilePath atomically:YES]; My above code works fine but now i want to give option of deleting the image downloaded from above code. Can some one please advice me how can i delete a image file from iphone.

    Read the article

  • Show pdf in the browser in asp.net mvc

    - by Pankaj
    I have a tab on my page, when i click on this tab, i need to show a pdf file on page(browser). For this i am writing function on control like this public ActionResult PricedPdf(string projID,string fileName) { byte[] bArr = new byte[] { }; bArr =getdata(); return File(bArr, System.Net.Mime.MediaTypeNames.Application.Pdf, fileName+".pdf"); } Now my problem is when i render this, page only show some unreadable data not pdf.

    Read the article

  • Insert Update using Nhibernate

    - by Pankaj
    Hello All I am inserting Product on database, My Product Model like this public class Product { public int ProductID { get; set; } public string ProductNumber { get; set; } public string Description { get; set; } public string KeyWords { get; set; } } here my ProductNumber is coming on counter table Table- Counter Field- Counter- int when product insert then its ProductNumber come from Counter table, after insert counter increase 1. In update counter not increase. How can i insert Product in such situation using Nhibernate? Thanks

    Read the article

  • create uiviewcontroller programmically

    - by pankaj
    hi, I am working in a app where i have data in uitableview. It is like a drill down application. User will click on a row and will go to next page showing more records in a uitableview. But problem in my case is that i dont know upto how many level user can drill. The number of levels are not fixed. So now i am thinking to create and add the viewcontrollers programically. Is it possible?? if yes how? thanks in advance.

    Read the article

  • htaccess subdomain redirct with last url parameter

    - by Pankaj
    I want to write a .htaccess file for redirecting my subdomains and URL's last variable to a new location. Here is what I want to do: http(s)://abc.example.com/books I want my internal URL to be like: http://example.com/?name=abc&type=books I have already gotten the subdomain redirect to work but I am not able to do subdomain with variable in last part of URL. How can I accomplish this?

    Read the article

< Previous Page | 2 3 4 5 6 7  | Next Page >