Search Results

Search found 186 results on 8 pages for 'ashish ashu'.

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

  • Help in XPath expression

    - by Ashish Gupta
    I have an XML document which contains nodes like following:- <a class="custom">test</a> <a class="xyz"></a> I was tryng to get the nodes for which class is NOT "Custom" and I wrote an expression like following:- XmlNodeList nodeList = document.SelectNodes("//*[self::A[@class!='custom'] or self::a[@class!='custom']]"); Now, I want to get IMG tags as well and I want to add the following experession as well to the above expression:- //*[self::IMG or self::img] ...so that I get all the IMG nodes as well and any tag other than having "custom" as value in the class attribute. Any help will be appreciated. EDIT :- I tried the following and this is an invalid syntax as this returns a boolean and not any nodelist:- XmlNodeList nodeList = document.SelectNodes("//*[self::A[@class!='custom'] or self::a[@class!='custom']] && [self::IMG or self::img]");

    Read the article

  • RestKit : Not able to perform mapping using coredata

    - by Ashish Beuwria
    I'm using rest kit 0.20.3 and Xcode 5. Without core data I'm able to perform all rest kit operation, but when I've tried it with core data, I'm not even able to perform GET due to some problem. I can't figure it out. I'm new with core data. So pls help. Here is my code: AppDelegate.m @implementation CardGameAppDelegate @synthesize managedObjectContext = _managedObjectContext; @synthesize managedObjectModel = _managedObjectModel; @synthesize persistentStoreCoordinator = _persistentStoreCoordinator; - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { RKLogConfigureByName("RestKit", RKLogLevelWarning); RKLogConfigureByName("RestKit/ObjectMapping", RKLogLevelTrace); RKLogConfigureByName("RestKit/Network", RKLogLevelTrace); RKObjectManager *objectManager = [RKObjectManager managerWithBaseURL:[NSURL URLWithString:@"http://192.168.1.3:3010/"]]; RKManagedObjectStore *objectStore = [[RKManagedObjectStore alloc] initWithManagedObjectModel:self.managedObjectModel]; objectManager.managedObjectStore = objectStore; RKEntityMapping *playerMapping = [RKEntityMapping mappingForEntityForName:@"Player" inManagedObjectStore:objectStore]; [playerMapping addAttributeMappingsFromDictionary:@{@"id": @"playerId", @"name": @"playerName", @"age" : @"playerAge", @"created_at": @"createdAt", @"updated_at": @"updatedAt"}]; RKResponseDescriptor *responseDesc = [RKResponseDescriptor responseDescriptorWithMapping:playerMapping method:RKRequestMethodGET pathPattern:@"/players.json" keyPath:nil statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)]; [objectManager addResponseDescriptor:responseDesc]; PlayersTableViewController *ptvc = (PlayersTableViewController *)self.window.rootViewController; ptvc.managedObjectContext = self.managedObjectContext; return YES; } and code for playerTableViewController.h #import <UIKit/UIKit.h> @interface PlayersTableViewController : UITableViewController <NSFetchedResultsControllerDelegate> @property (strong, nonatomic) NSFetchedResultsController *fetchedResultsController; @property (strong, nonatomic) NSManagedObjectContext *managedObjectContext; @end and PlayerTableViewController.m get method: -(void)loadPlayers{ [[RKObjectManager sharedManager] getObjectsAtPath:@"/players.json" parameters:nil success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult){ [self.refreshControl endRefreshing]; } failure:^(RKObjectRequestOperation *operation, NSError *error) { [self.refreshControl endRefreshing]; UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"An Error Has Occurred" message:[error localizedDescription] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alertView show]; }]; } I'm getting the following error : Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unable to perform mapping: No `managedObjectContext` assigned. (Mapping response.URL = http://192.168.1.3:3010/players.json)'

    Read the article

  • Email mime parsing

    - by Ashish
    Hi, I was trying to find a user friendly mime parser for java that could just get rid of all that message part parsing a user have to do. see this for more info about my requirement. Until now i have not been able to find one, so i think i need to write one for myself, that should be robust enough to handle all kind of emails. (I know this is not going to be easy.) Since there are a ton of email RFC's , can somebody guide me in the right direction from where should i start.

    Read the article

  • Sql Server - INSERT INTO SELECT to avoid duplicates

    - by Ashish Gupta
    I have following two tables:- Table1 ------------- ID Name 1 A 2 B 3 C Table2 -------- ID Name 1 Z I need to insert data from Table1 to Table2 and I can use following sytax for the same:- INSERT INTO Table2(Id, Name) SELECT Id, Name FROM Table1 However, In my case duplicate Ids might exist in Table2 (In my case Its Just "1") and I dont want to copy that again as that would throw an error. I can write something like this:- IF NOT EXISTS(SELECT 1 FROM Table2 WHERE Id=1) INSERT INTO Table2 (Id, name) SELECT Id, name FROM Table1 ELSE INSERT INTO Table2 (Id, name) SELECT Id, name FROM Table1 WHERE Table1.Id<>1 Is there a better way to do this without using IF - ELSE? I want to avoid two INSERT INTO-SELECT statements based on some condition. Any help is appreciated.

    Read the article

  • change background color with change in mouse position

    - by Ashish Rajan
    I was wondering if it is possible to set background-color with help of mouse coordinates. What is have is: I have a DIV-A which is draggable and some other divs which are droppable. What is need is : I need to highlight other divs on my page which are droppable, whenever my DIV-A passes over them. What i have is mouse coordinates, is it possible to apply css on the bases of mouse coordinates using jquery.

    Read the article

  • Add data in bulk.

    - by Ashish Rajan
    Hi all, I need your suggestion for this. I need to add data to mysql database through the admin interface, at initial i need to add data in bulk, so i thought of using csv upload but how to add images with csv i.e. when doing single add i insert name , description and a image via a form, but how to do the same for bulk. Thanks in advance.

    Read the article

  • Alert on moving to a different page of a grid when user changes contents of textboxes in a Grid

    - by Ashish Gupta
    In a ASP.NET application I have a paging RadGrid which shows up textbox in each row. Outside the grid, there is an OK button to save the content of all the textbox. If user changes text in any one or more of the textbox and without clicking on the "OK" button, tries to move to a different page number (of the grid by clicking on the page number), he should be prompted for confirmation of save or cancel the changes. I am guessing that one can write a Javascript function which would look for any form input control (textbox in my case) and detect changes and If there are changes, would prompt the user. However, I am not sure where I can call this function from? Any suggestion on this or a better way to achieve this would be appreciated. I am using RadGrid but I guess this should be applicable to GridView as well.

    Read the article

  • No postback on any button click on ASP.NET 4.0 application

    - by Ashish Gupta
    The weird thing is If there is a javascript onClick() on a button, postback works otherwise, there is no postback. This was working very recently. I am not sure what recent changes made to the application made this happening throughout the site. The solution suggested by this link does not work as well (that link is applicable to .NET 1.1 though). Any idea whats going on?

    Read the article

  • Validate a string in a table in SQL Server

    - by Ashish Gupta
    I need to check If a column value (string) in SQL server table starts with a small letter and can only contain '_', '-', numbers and alphabets. I know I can use a SQL server CLR function for that. However, I am trying to implement that validation using a scalar UDF and could make very little here...I can use 'NOT LIKE', but I am not sure how to make sure I validate the string irrespective of the order of characters or in other words write a pattern in SQL for this. Am I better off using a SQL CLR function? Any help will be appreciated.. Thanks in advance

    Read the article

  • vsts load testing wcf app

    - by ashish.s
    I have a simple test written like this public class Test { [ThreadStatic] private static ServiceClient client; [TestMethod] public void TestCase1() { If( client == null) { .... //instantiate client } client.CallMyServiceMethod() } [TestMethod] public void TestCase2() { using(var newClient = new ServiceClient()) { newClient.CallMyServiceMethod() } } The percentage of new users is set to 100 % for the test, and the user load is constant load of 1. But the response time for TestCase1 is about 3 times better than TestCase2. Can someone see what i am missing here ? many thanks

    Read the article

  • why does this code crash?

    - by ashish yadav
    why does this code crash? is using strcat illegal on character pointers? #include <stdio.h> #include <string.h> int main() { char *s1 = "Hello, "; char *s2 = "world!"; char *s3 = strcat(s1, s2); printf("%s",s3); return 0; } please give a proper way with referring to both array and pointers.

    Read the article

  • best algorithm for swapping?

    - by ashish yadav
    i have heard from a friend of mine that the best algorithm for swapping is " (a^=b^=a^=b)" where a and b are two integers to be swapped. but when i applied this using c language it resulted in crashing. can anyone of you fine people explain the possible reason for that? please suggest the best algorithm for swapping. thank you!!!!

    Read the article

  • accessing base class's method with derived class's object which has a method of same name.

    - by ashish yadav
    when accessing foo() of "base" using derived class's object. include class base { public: void foo() { std::cout<<"\nHello from foo\n"; } }; class derived : public base { public: void foo(int k) { std::cout<<"\nHello from foo with value = "< } how to access base class method having a method of same name in derived class. the error generated has been shown. i apologize if i am not clear but i feel i have made myself clear as water. thanks in advance.

    Read the article

  • change font in sharedbook api in php

    - by ashish
    I m using Sharedbook api to generate a memory book, although it's working perfect, but font of the memory book is unchangeable ...means i can't change the font family of that book. I tried to change the font then it display error. please suggest me how to change Font of that memory book.. Thank is advance

    Read the article

  • How to change the direction of wpf marquee dynamically?

    - by ashish semwal
    Hi all, I want to change the direction of my marquee on changeDirection button click. My code for changing direction is : private void changeDirection_click(object sender, RoutedEventArgs e) { if (_marqueeType == MarqueeType.RightToLeft) { _marqueeType = MarqueeType.LeftToRight; StartMarqueeing(_marqueeType); } else if (_marqueeType == MarqueeType.LeftToRight) { _marqueeType = MarqueeType.RightToLeft; StartMarqueeing(_marqueeType); } } And code for start marquee is : public void StartMarqueeing(MarqueeType marqueeType) { double height = canMain.ActualHeight - marqueeList.ActualHeight; marqueeList.Margin = new Thickness(0, 0, 0, 0); doubleAnimation.From = -marqueeList.ActualWidth; doubleAnimation.To = canMain.ActualWidth; doubleAnimation.RepeatBehavior = RepeatBehavior.Forever; doubleAnimation.Duration = new Duration(TimeSpan.FromSeconds(_marqueeTimeInSeconds)); if (marqueeType == MarqueeType.RightToLeft) { Storyboard.SetTargetProperty(doubleAnimation, new PropertyPath("(Canvas.Right)")); _storyBoard.Children.Add(doubleAnimation); _storyBoard.Begin(marqueeList, true); } else if (marqueeType == MarqueeType.LeftToRight) { Storyboard.SetTargetProperty(doubleAnimation, new PropertyPath("(Canvas.Left)")); _storyBoard.Children.Add(doubleAnimation); _storyBoard.Begin(marqueeList, true); } } Now here I am able to change the direction from Right to Left only first time. But when I am change it from Left to Right it’s not changing the marquee position Left to Right. Please help me on this...........its urgent!!!!!!!!!!!

    Read the article

  • Can jpg images support animation?

    - by Ashish
    Well guys. we are not supposed to ask theoratical questions here .. but dint know any other forum where someone would answer this :) jpeg image How is the above jpg image can be animated? As far as I know jpg format does not support animation.

    Read the article

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