Search Results

Search found 618 results on 25 pages for 'rahul gupta'.

Page 12/25 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Rails belongs_to issues

    - by Rahul
    I was trying to follow the answer provided by this post About Event_calendar.Showing only events for current user and not all events present However when I tried to add the belongs_to user in the event model, it gives me the following error. NameError (undefined local variable or method 'user' for #<Class:0x007fff15d1f6c0>): app/models/event.rb:3:in '<class:Event>' app/models/event.rb:1:in '<top (required)>' app/controllers/calendar_controller.rb:9:in 'index' Rendered .../.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_trace.erb (2.8ms) Rendered .../.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (2.0ms) Rendered .../.rvm/gems/ruby-1.9.3-p194/gems/actionpack-3.2.8/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (23.6ms) in my user.rb model I have included has_many :events Any idea how to fix this?

    Read the article

  • Play Sound while UIImageView animating crashes the app?

    - by Rahul Vyas
    Hello all, I am having a strange problem in my app. I am creating a app in which i have 9 buttons on the view i want to play sound and animation same time. I am using UIImageview for this but i am having starnge behaviour sometimes sound play early and then animation runs.So how do i play them at same time? I am also having crash on device on a specific animation in which i have 60 jpg files. So what's the best way to do this?

    Read the article

  • Silverlight Vs. WPF Vs. Winforms What is good for specifically my purpose?

    - by Cyril Gupta
    I am about to start a new Windows applications and the contenders for the platform are: Windows Forms WPF Silverlight Now my experience with WPF at least in my last application was not very encouraging (the app failed to run on the deployment machines and I had to re-do it in Winforms). So my confidence is shaken here. My app is for mass-distribution (the last version had some 100,000+ installations). So I want to make absolutely sure that my users will be able to use it and enjoy it without any problems. I would love to create a nice interface, going the next step like a Flex or Silverlight, iPhone app, with animations and effects. So I would really like to go with WPF or Silverlight if I can. My needs are Good support for visuals and animation effects. Support for database connectivity. Support for printing (Is there an equivalent of PrintDocument in Silverlight) Must not suffer from deployment troubles. Silverlight is universal, but does it have printing support and good controls toolset? WPF has printing support and a nice toolset, but can I depend on it? Winforms is dated already and is not so impressive, but should I go with it anyway? Your advice would be appreciated

    Read the article

  • Decoration View *above* cells in UICollectionView

    - by Dhiraj Gupta
    I've got a decoration view showing the way I want, in my UICollectionView. The position and size is right. The decoration view stays at the frame I'm setting for it in my layout. But, I want the decoration view to be above the cells, not below them. I tried setting the zIndex property on the UICollectionViewLayoutAttributes for the decoration view, but this has no effect - I tried logging out the zindex of the cells, and they're all returning 0, and my decoration view's zIndex is set to 20. I'm guessing having decoration views above the cells is not supported, at least in UICollectionViewFlowLayout? Someone please confirm this, thanks! In the meantime, I'm going back to having a custom UIView subclass as a subview in the parent controller of the collection view and laying out the frame of it in the - (void) viewWillLayoutSubviews() method.

    Read the article

  • sending an email using user input from android

    - by Rahul Varma
    Hey, I am designing an app in which the data is stored in the database. There's a button in the form which is on clicked to send an email to pre defined mail address with the data that is stored in the database. Since i am a newbie to android i need help regarding sending the mail... So please help me...

    Read the article

  • strange xcode error Could not compile reconstructed dtrace script:

    - by Rahul Vyas
    Hello all , i am getting this error when i try to compile an iPhone app. error: Could not compile reconstructed dtrace script: provider CorePlot { probe layer_position_change(char *,int,int,int,int); }; #pragma D attributes PRIVATE/PRIVATE/UNKNOWN provider CorePlot provider #pragma D attributes PRIVATE/PRIVATE/UNKNOWN provider CorePlot module #pragma D attributes PRIVATE/PRIVATE/UNKNOWN provider CorePlot function #pragma D attributes PRIVATE/PRIVATE/UNKNOWN provider CorePlot name #pragma D attributes PRIVATE/PRIVATE/UNKNOWN provider CorePlot args ld: error creating dtrace DOF section collect2: ld returned 1 exit status

    Read the article

  • How to hide graph on button click ?

    - by aman-gupta
    Hi, In my application I m using following codes to draw a graph but I want that graph will be displayed on button click :- import @interface frmGraphView : UIView { } @end ///////////////////// // // frmGraphView.m // UV Alarm // // Created by Aman on 4/4/10. // Copyright 2010 MyCompanyName. All rights reserved. // import "frmGraphView.h" @implementation frmGraphView struct TCo_ordinates { float x; float y; }; (id)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { // Initialization code } return self; } /* // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; } */ /* // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationPortrait); } */ -(void)drawHGrid { //struct gridForXYaxis *gridForX = (struct gridForX *) calloc(sizeof(struct gridFor)) } (void)drawRect:(CGRect)rect { ifdef _DEBUG NSLog(@"frmGraph_drawRect_start"); endif CGContextRef ctx = UIGraphicsGetCurrentContext(); struct TCo_ordinates *tCoordianates; //creating the object of structure. float fltX1,fltX2,fltY1,fltY2=0; //Dividing the Y-axis ifdef _DEBUG NSLog(@"Start drawing Y-Axis"); endif fltX1 = 25; fltY1 = 2; fltX2 = fltX1; fltY2 = 254; //CGContextSetRGBStrokeColor(ctx, 2.0, 2.0, 2.0, 1.0); CGContextSetLineWidth(ctx, 2.0); CGContextMoveToPoint(ctx, fltX1, fltY1); CGContextAddLineToPoint(ctx, fltX2, fltY2); NSArray *hoursInDays = [[NSArray alloc] initWithObjects:@"1",@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10",@"11",@"12", nil]; NSMutableArray *yAxisCoordinates = [[[NSMutableArray alloc] init] autorelease]; for(int intIndex = 0 ; intIndex < [hoursInDays count] ; fltY2-=20, intIndex++) { ifdef _DEBUG NSLog(@"Start of the partition of y axis"); endif //CGContextSetRGBStrokeColor(ctx, 2, 2, 2, 1); //CGContextSetRGBStrokeColor(ctx, 1.0f/255.0f, 1.0f/255.0f, 1.0f/255.0f, 1.0f); //to draw the black line. CGContextMoveToPoint(ctx, fltX1-3 , fltY2-20); CGContextAddLineToPoint(ctx, fltX1+3, fltY2-20); CGContextSelectFont(ctx, "Helvetica", 12.0, kCGEncodingMacRoman); CGContextSetTextDrawingMode(ctx, kCGTextFill); //CGContextSetRGBFillColor(ctx, 0, 255, 255, 1); CGContextSetStrokeColorWithColor(ctx, [UIColor blueColor].CGColor); CGAffineTransform xform = CGAffineTransformMake( 1.0, 0.0, 0.0, -1.0, 0.0, 0.0); CGContextSetTextMatrix(ctx, xform); const char *arrayDataForYAxis = [[hoursInDays objectAtIndex:intIndex] UTF8String]; CGContextShowTextAtPoint(ctx,fltX1-20 , fltY2-15, arrayDataForYAxis, strlen(arrayDataForYAxis)); CGContextStrokePath(ctx); ifdef _DEBUG NSLog(@"End of the partition of graph"); endif //NSValue *yAxis = [NSValue valueWithCGPoint:CGPointMake((tCoordianates-x = fltX1-21), (tCoordianates-y = fltY2-20))]; // [yAxisCoordinates addObject:yAxis]; ifdef _DEBUG // NSLog(@"The value of yAxisCoordintes: %@", yAxisCoordinates); endif } ifdef _DEBUG NSLog(@"End of drawing Y-Axis"); endif //Dividing the X-axis ifdef _DEBUG NSLog(@"Start drawing X-Axis"); endif fltX1 = 25; fltY1 = 255; fltX2 = 320; fltY2 = fltY1; CGContextMoveToPoint(ctx, fltX1, fltY1); CGContextAddLineToPoint(ctx, fltX2, fltY2); //CGContextSetRGBStrokeColor(ctx, 2, 2, 2, 1); CGContextSetLineWidth(ctx, 2.0); NSArray *weekDays =[[NSArray alloc] initWithObjects:@"Sun", @"Mon", @"Tue", @"Wed", @"Thu", @"Fri", @"Sat", nil]; NSMutableArray *xAxisCoordinates = [[[NSMutableArray alloc] init] autorelease]; for(int intIndex = 0 ; intIndex < [weekDays count] ; fltX1+=40, intIndex++) { //CGContextSetRGBStrokeColor(ctx, 2, 2, 2, 1); //CGContextSetStrokeColorWithColor(ctx, [UIColor orangeColor].CGColor); CGContextMoveToPoint(ctx, fltX1+40 , fltY2-3); CGContextAddLineToPoint(ctx, fltX1+40, fltY2+3); CGContextSelectFont(ctx, "Italic", 12.0, kCGEncodingMacRoman); CGContextSetTextDrawingMode(ctx, kCGTextFill); CGContextSetStrokeColorWithColor(ctx, [UIColor blueColor].CGColor); CGAffineTransform xform = CGAffineTransformMake( 1.0, 0.0, 0.0, -1.0, 0.0, 0.0); CGContextSetTextMatrix(ctx, xform); const char *arrayDataForXAxis = [[weekDays objectAtIndex:intIndex] UTF8String]; CGContextShowTextAtPoint(ctx, fltX1+27, fltY2+20 , arrayDataForXAxis, strlen(arrayDataForXAxis)); CGContextStrokePath(ctx); ifdef _DEBUG NSLog(@"End of drawing X-Axis"); endif //NSValue *xAxis = [NSValue valueWithCGPoint:CGPointMake((tCoordianates->x = fltX1+40), (tCoordianates->y = fltY2+18))]; // [xAxisCoordinates addObject:xAxis]; ifdef _DEBUG //NSLog(@"The value of xAxisCoordintes: %@", xAxisCoordinates); NSLog(@"frmGraph_drawRect_end"); endif } CGContextSetLineWidth(ctx, 10.0); fltX1 = 25; fltY1 = 235; fltX2 = 320; fltY2 = fltY1; NSArray *coordinate1 = [[NSArray alloc] initWithObjects:@"65",@"105",@"145",@"185",@"225",@"265",@"305",nil]; NSArray *coordinate2 = [[NSArray alloc] initWithObjects:@"214",@"174",@"154",@"134",@"114",@"74",@"34",nil]; ifdef _DEBUG NSLog(@"Fuction of Bar_start"); endif for(int intIndex = 0; intIndex < [coordinate1 count], intIndex < [coordinate2 count]; fltX1+=40, intIndex++) { //CGContextSetRGBFillColor(ctx, 0, 0, 245, 1); CGContextMoveToPoint(ctx, fltX1+40, fltY2+19); const char *arrayDataForCoordinate1 = [[coordinate1 objectAtIndex:intIndex] UTF8String]; const char *arrayDataForCoordinate2 = [[coordinate2 objectAtIndex:intIndex] UTF8String]; CGContextAddLineToPoint(ctx, (atof(arrayDataForCoordinate1)), atof(arrayDataForCoordinate2)); } ifdef _DEBUG NSLog(@"Fuction of Bar_end"); endif CGContextClosePath(ctx); CGContextStrokePath(ctx); [hoursInDays release]; [weekDays release]; [coordinate1 release]; [coordinate2 release]; hoursInDays = nil; weekDays = nil; coordinate1 = nil; coordinate2 = nil; } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } (void)dealloc { [super dealloc]; } @end please help me out its urgent

    Read the article

  • Public Wildcard Domain Name To Resolve To 127.0.0.1

    - by Rahul
    Is anyone aware of a public wildcard domain name that resolves to IP address 127.0.0.1. For example if I wanted to test a URL locally such as mywebsite.localhost.com or example.localhost.com but I don't have control of DNS settings (hosts file or whatever) then I would use this public DNS to resolve to 127.0.0.1. It needs to be wildcarded so that no matter whatever comes before localhost.com it still resolves to 127.0.0.1.

    Read the article

  • Wordpress is ignoring Unicode Chars in URL

    - by Ankur Gupta
    Hi, I am using wordpress with this type of permalink: /%year%/%monthnum%/%postname%/ if I use this type of url: example.com/2010/03/????? it treats this url like this example.com/2010/03/ (By ignoring unicode chars) and displays March 2010 archive list. if I use english url: example.com/2010/03/technology then it works perfectly. This problem occurs even on tags page: for example example.com/tag/??????? is treated like example.com/tag/ and displays 404 page. Why wordpress is ignoring unicode chars? If I use default querystring structure then it works perfectly even with unicode characters. Server Info: IIS7 Win2008 Server (Url rewriting enabled) Wordpress 2.9.2

    Read the article

  • Understanding colors

    - by Ankur Gupta
    Hello everyone, Kindly point towards theory/material to read for understanding colors and what makes a good color combinations. Mind it that I am not interested in say "Color combinations for web application" etc. More of the lines of say "Colors and humans". Material free to read is what i am looking for. Thanks

    Read the article

  • C++/Qt Apps on Ovi Store ?

    - by Ankur Gupta
    Can one develop C++/Qt based application for Symbian and N series phone and upload the same to Ovi store ?. I hear conflicting stories. I understand the existence of Smart Installer etc. But my question is as of today can I code and ship apps to Ovi store ?. If not any clue how long before it becomes a reality ?. Ankur

    Read the article

  • Need some ignition for learning Embedded Systems

    - by Rahul
    I'm very much interested in building applications for Embedded Devices. I'm in my 3rd year Electrical Engineering and I'm passionate about coding, algorithms, Linux OS, etc. And also by Googling I found out that Linux OS is one of the best OSes for Embedded devices(may be/may not be). I want to work for companies which work on mobile applications. I'm a newbie/naive to this domain & my skills include C/C++ & MySQL. I need help to get started in the domain of Embedded Systems; like how/where to start off, Hardware prerequisites, necessary programming skills, also what kind of Embedded Applications etc. I've heard of ARM, firmware, PIC Micorcontrollers; but I don't know anything & just need proper introduction about them. Thanx. P.S: I'm currently reading Bjarne Struotsup's lecture in C++ at Texas A&M University, and one chapter in it describes about Embedded Systems Programming.

    Read the article

  • How to create Query syntax for multiple DataTable for implementing IN operator of Sql Server

    - by Shantanu Gupta
    I have fetched 3-4 tables by executing my stored procedure. Now they resides on my dataset. I have to maintain this dataset for multiple forms and I am not doing any DML operation on this dataset. Now this dataset contains 4 tables out of which i have to fetch some records to display data. Data stored in tables are in form of one to many relationship. i.e. In case of transactions. N records per record. Then these N records are further mapped to M records of 3rd table. Table 1 MAP_ID GUEST_ID DEPARTMENT_ID PARENT_ID PREFERENCE_ID -------------------- -------------------- -------------------- -------------------- -------------------- 19 61 1 1 5 14 61 1 5 15 15 61 2 4 10 18 61 2 13 23 17 61 2 20 26 16 61 40 40 41 20 62 1 5 14 21 62 1 5 15 22 62 1 6 16 24 62 2 3 4 23 62 2 4 9 27 62 2 13 23 25 62 2 20 24 26 62 2 20 25 28 63 1 1 5 29 63 1 1 8 34 63 1 5 15 30 63 2 4 10 33 63 2 4 11 31 63 2 13 23 32 63 40 40 41 35 65 1 NULL 1 36 65 1 NULL 1 38 68 2 13 22 37 68 2 20 25 39 68 2 23 27 40 92 1 NULL 1 Table 2 Department_ID Department_Name Parent_Id Parent_Name -------------------- ----------------------- --------------- ---------------------------------------------------------------------------------- 1 Food 1, 5, 6 Food, North Indian, South Indian 2 Lodging 3, 4, 13, 20, 23 Room, Floor, Non Air Conditioned, With Balcony, Without Balcony 40 New 40 SubNew TABLE 3 Parent_Id Parent_Name Preference_ID Preference_Name -------------------- ----------------------------------------------- ----------------------- ------------------- NULL NULL NULL NULL 1 Food 5, 8 North Indian, Italian 3 Room 4 Floor 4 Floor 9, 10, 11 First, Second, Third 5 North Indian 14, 15 X, Y 6 South Indian 16 Dosa 13 Non Air Conditioned 22, 23 With Balcony, Without Balcony 20 With Balcony 24, 25, 26 Mountain View, Ocean View, Garden View 23 Without Balcony 27 Mountain View 40 New 41 SubNew I have these 3 tables that are related in some fashion like this. Table 1 will be the master for these 2 tables i.e. table 2 and table 3. I need to query on them as SELECT Department_Id, Department_Name, Parent_Name FROM Table2 WHERE Department_Id in ( SELECT Department_Id FROM Table1 WHERE guest_id=65 ) SELECT Parent_Id, Parent_Name, Preference_Name FROM Table3 WHERE PARENT_ID in ( SELECT parent_id FROM Table1 WHERE guest_id=65 ) Now I need to use these queries on DataTables. So I am using Query Syntax for this and reached up to this point. var dept_list= from dept in DtMapGuestDepartment.AsEnumerable() where dept.Field<long>("PK_GUEST_ID")==long.Parse(63) select dept; This should give me the list of all departments that has guest id =63 Now I want to select all departments_name and parent_name from Table 2 where guest_id=63 i.e. departments that i fetched above. This same case will be followed for Table3. Please suggest how to do this. Thanks for keeping up patience for reading my question.

    Read the article

  • Getting Json data into a list view

    - by Rahul Varma
    Hi, I have been searching for a way to get the json data from a URl (for example: http://search.twitter.com/trends.json) and display it in a listview. Couldnt get a perfect example to get it done. Can anyone plz help me out by getting the solution and providing a good example of how to do it...

    Read the article

  • Attaching Files to QC defect by Java code from local machine

    - by Rahul
    Hi All, When we open a defect in QC generally we need to attach the logs of the server i want to Make an application such that It will take files(logs from all the relevant server) and stores in our local machine and then we can rar those files and directly attach it to QC defect mentioned by person opening defect Now my question is how can i access the defect and attach the files to that particular defect Please give your suggestions if any

    Read the article

  • HOw to use UIIMagePickerController?

    - by aman-gupta
    Hey, IN my application I m using this code on button click for getting image from PhotoLibrary:- -(IBAction) getPhoto:(id) sender { UIImagePickerController *picker = [[UIImagePickerController alloc]init]; picker.delegate = self; picker.sourceType =UIImagePickerControllerSourceTypePhotoLibrary; [self presentModalViewController:picker animated:YES]; [picker release]; //picker = nil; } -(void)imagePickerController:(UIImagePickerController *) picker didFinishPickingMediaWithInfo:(NSDictionary *)info { imageView.image = [info objectForKey:@"UIImagePickerControllerOriginalImage"]; [picker dismissModalViewControllerAnimated:YES]; } But problem is that when i run my application in mobile it will get terminated on button click.Where I m wrong it works properly on iphone simulator but termninating on iphone Device Please reply me its urgent Thanks in Advance

    Read the article

  • COGNOS 8 Bi value prompt

    - by Rahul Kadam
    Currently I have a value prompt added to my report (with UI selected as List-Box) and the date item used is name 'YEAR'. Now when I run the report the values in the value prompt are seen as below: YEAR 2004 2005 2006 What I want to do is get rid of the year tag that is present in the output of the value prompt box, more clearly the output in the value prompt box should be as below: 2004 2005 2006 Can someone let me know how that can be achieved?

    Read the article

  • Using ckEditor on selective text areas in django admin forms

    - by Rahul
    Hi, I want to apply ckeditor on specific textarea in django admin form not on all the text areas. Like snippet below will apply ckeditor on every textarea present on django form: class ProjectAdmin(admin.ModelAdmin): formfield_overrides = {models.TextField: {'widget': forms.Textarea(attrs={'class':'ckeditor'})}, } class Media: js = ('ckeditor/ckeditor.js',) but i want it on a specific textarea not on every textarea.

    Read the article

  • Cursor on Path doesn't appear in SilverLight

    - by Rahul Soni
    I am trying to draw a circle with a glass effect using Alpha. I am successful in creating that by using the below XAML. The cursor changes to Hand for the Ellipses, but it doesn't affect Path. Basically, I want to show "hand" cursor wherever the mouse appears over the circle. I hope this is not a known issue and I am missing something small. Any help is really appreciated. <Ellipse Cursor="Hand" Width="200" Height="200" Fill="#C42222" Canvas.Left="0" Canvas.Top="0" /> <Ellipse Cursor="Hand" Width="200" Height="200" Canvas.Left="0" Canvas.Top="0"> <Ellipse.Fill> <RadialGradientBrush GradientOrigin="0.3,0.7"> <GradientStop Offset="0" Color="#00000000" /> <GradientStop Offset="1" Color="#66000000" /> </RadialGradientBrush> </Ellipse.Fill> </Ellipse> <Path Cursor="Hand" Stretch="Fill" Height="114.598" Width="198.696" Data="M98.388435,-1.3301961 C98.388435,-1.3301961 117.1151,-3.094949 141.69321,8.1370029 C156.42262,14.868201 167.67375,23.694145 175.66234,33.657074 C183.67349,43.648144 181.90166,37.8708 191.90166,58.8708 C201.90166,79.870796 199.16658,89.212738 199.13568,92.90377 C198.77556,135.92146 175.45959,97.59124 156.75465,81.024025 C140.98892,67.060104 117.41241,64.357407 114.41241,64.357407 C111.4124,64.357407 83.061241,60.114159 63.061195,71.114143 C43.061146,82.114136 39.637829,86.429352 22.999804,100.99996 C6.5005584,115.44904 2.9997537,112.99996 2.9997537,112.99996 C2.9997537,112.99996 -1.1832786,97.194221 1.9997513,81.999893 C7.2054667,57.150185 13.999762,47.999939 17.999771,42.999943 C21.999781,37.99995 29.935833,23.400871 54.053131,10.21261 C78.91642,-3.3835876 98.388435,-1.3301961 98.388435,-1.3301961 z"> <Path.Fill> <LinearGradientBrush EndPoint="0,1" StartPoint="0,0"> <GradientStop Color="#55FFFFFF" Offset="0"/> <GradientStop Color="#11FFFFFF" Offset="0.5"/> <GradientStop Color="#00FFFFFF" Offset="1"/> </LinearGradientBrush> </Path.Fill> </Path>

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >