Search Results

Search found 3931 results on 158 pages for 'roulette wheel selection'.

Page 28/158 | < Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >

  • Nhibernate mapping: fixed count multiple members instead of collection

    - by AhmetC
    I don't want to put wheels into a collection. How can i map kind of relation? Class Wheel { int id; Car Owner; } Class Car { int id; Wheel Wheel1; Wheel Wheel2; Wheel Wheel3; Wheel Wheel4; } I tried this but Wheelmap.Owner comes always null : Class WheelMap : ClassMap<Wheel> { Id(x=>x.Id); References(x=>x.Owner); } Class CarMap : ClassMap<Car> { Id(x=>x.Id); References(x=>x.Wheel1).Cascade.All(); References(x=>x.Wheel2).Cascade.All(); References(x=>x.Wheel3).Cascade.All(); References(x=>x.Wheel4).Cascade.All(); }

    Read the article

  • Excel 2003 - VBA for looping through every cell in a row to provide attributes/formatting

    - by Justin
    say I want to make the first row of the excel ss something like this: .Rows("1:1").Select With Selection.Borders(xlEdgeLeft) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeTop) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With With Selection.Borders(xlEdgeRight) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With only I want each individual cells to have the outline, not the entire selection. how can i say for each cell in row 1, do the above idea Thanks!

    Read the article

  • How do I set the default selection for NSTreeController at startup?

    - by John Gallagher
    The Background I've built a source list (similar to iTunes et al.) in my Cocoa app. I've got an NSOutlineView, with Value column bound to arrangedObjects.name key path of an NSTreeController. The NSTreeController accesses JGSourceListNode entities in a Core Data store. I have three subclasses of JGSourceListNode - JGProjectNode, JGGroupNode and JGFolderNode. I have selectedIndexPaths on NSTreeController bound to an NSArray called selectedIndexPaths in my App Delegate. On startup, I search for group nodes and if they're not found in the core data store I create them: if ([allGroupNodes count] == 0) { JGGroupNode *rootTrainingNode = [JGGroupNode insertInManagedObjectContext:context]; [rootTrainingNode setNodeName:@"TRAIN"]; JGProjectNode *childUntrainedNode = [JGProjectNode insertInManagedObjectContext:context]; [childUntrainedNode setParent:rootTrainingNode]; [childUntrainedNode setNodeName:@"Untrained"]; JGGroupNode *rootBrowsingNode = [JGGroupNode insertInManagedObjectContext:context]; [rootBrowsingNode setNodeName:@"BROWSE"]; JGFolderNode *childFolder = [JGFolderNode insertInManagedObjectContext:context]; [childFolder setNodeName:@"Folder"]; [childFolder setParent:rootBrowsingNode]; [context save:nil]; } What I Want When I start the app, I want both top level groups to be expanded and "Untrained" to be highlighted as shown: The Problem I put the following code in the applicationDidFinishLaunching: method of the app delegate: [sourceListOutlineView expandItem:[sourceListOutlineView itemAtRow:0]]; [sourceListOutlineView expandItem:[sourceListOutlineView itemAtRow:2]]; NSIndexPath *rootIndexPath = [NSIndexPath indexPathWithIndex:0]; NSIndexPath *childIndexPath = [rootIndexPath indexPathByAddingIndex:0]; [self setSelectedIndexPaths:[NSArray arrayWithObject:childIndexPath]]; but the outline view seems to not have been prepared yet, so this code does nothing. Ideally, eventually I want to save the last selection the user had made and restore this on a restart. The Question I'm sure it's possible using some crazy KVO to observe when the NSTreeController or NSOutlineView gets populated then expand the items and change the selection, but that feels clumsy and too much like a work around. How would I do this elegantly?

    Read the article

  • Can a WPF ComboBox display alternative text when its selection is null?

    - by Garth T Kidd
    G'day! I want my WPF ComboBox to display some alternative text when its data-bound selection is null. The view model has the expected properties: public ThingoSelectionViewModel : INotifyPropertyChanged { public ThingoSelectionViewModel(IProvideThingos) { this.Thingos = IProvideThingos.GetThingos(); } public ObservableCollection<Thingo> Thingos { get; set; } public Thingo SelectedThingo { get { return this.selectedThingo; } set { // set this.selectedThingo and raise the property change notification } // ... } The view has XAML binding to the view model in the expected way: <ComboBox x:Name="ComboboxDrive" SelectedItem="{Binding Path=SelectedThingo}" IsEditable="false" HorizontalAlignment="Left" MinWidth="100" IsReadOnly="false" Style="{StaticResource ComboboxStyle}" Grid.Column="1" Grid.Row="1" Margin="5" SelectedIndex="0"> <ComboBox.ItemsSource> <CompositeCollection> <ComboBoxItem IsEnabled="False">Select a thingo</ComboBoxItem> <CollectionContainer Collection="{Binding Source={StaticResource Thingos}}" /> </CompositeCollection> </ComboBox.ItemsSource> </ComboBox> The ComboBoxItem wedged into the top is a way to get an extra item at the top. It's pure chrome: the view model stays pure and simple. There's just one problem: the users want "Select a thingo" displayed whenever the ComboBox' selection is null. The users do not want a thingo selected by default. They want to see a message telling them to select a thingo. I'd like to avoid having to pollute the viewmodel with a ThingoWrapper class with a ToString method returning "Select a thingo" if its .ActualThingo property is null, wrapping each Thingo as I populate Thingos, and figuring out some way to prevent the user from selecting the nulled Thingo. Is there a way to display "Select a thingo" within the ComboBox' boundaries using pure XAML, or pure XAML and a few lines of code in the view's code-behind class?

    Read the article

  • is there a way to show Uitableviewcell selection on limited frame?

    - by Rahul Vyas
    i have a uitableview cell added some labels something like this - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; UIImage* myImage = [UIImage imageNamed:@"AccessoryForDealsMain.png"]; UIImageView *MyimageView = [[UIImageView alloc] initWithImage:myImage]; MyimageView.contentMode=UIViewContentModeScaleToFill; cell.accessoryView=MyimageView; [MyimageView release]; UILabel *BluePatti = [[UILabel alloc] init]; BluePatti.frame=CGRectMake(0,0,4,44); BluePatti.backgroundColor = BLUEPATTI;//[UIColor blueColor]; UILabel *BlackLine = [[UILabel alloc] init]; BlackLine.frame=CGRectMake(3,0,1, 45); BlackLine.backgroundColor = BLACK_LINE; [BluePatti addSubview:BlackLine]; [BlackLine release]; [cell.contentView addSubview:BluePatti]; [BluePatti release]; UILabel *Seperator = [[UILabel alloc] initWithFrame:CGRectZero]; Seperator.backgroundColor = [UIColor colorWithRed:234/256.0 green:234/256.0 blue:234/256.0 alpha:1.0]; //[UIColor lightGrayColor]; Seperator.frame = CGRectMake(4,43,316,1); [cell.contentView addSubview:Seperator]; [Seperator release]; } if(indexPath.section==5) { cell.textLabel.text=[self.GenderCellData objectAtIndex:indexPath.row]; cell.textLabel.textColor=CELL_TEXT_COLOR; cell.textLabel.font=CELL_FONT; } else { cell.textLabel.text=@"Cells"; cell.textLabel.font=CELL_FONT; } return cell; } now when i touch cell it shows blue selection above all subviews.How do i change selection frame and colour?

    Read the article

  • Trying to reinvent the wheel of StackOverflow to have a good learning experience. Need some suggesti

    - by Legend
    I want to learn and am not able to do it unless I have a real "mission" to complete. SO is my favorite and I can't imagine a better experience than actually recreating it but not in ASP. I'd like to use PHP+MySQL+jQuery. So far, I have been a self-taught programmer but I would like to master one paradigm that forces you to adhere to the standards. For instance, recently, jQuery forced me to use some "rules". The plugins were supposed to be written in a particular way and that's it. When I started off, everything seemed like Greek and Latin but when I finished a very small plugin, I felt really happy because it forced me to program in a certain way. I am looking for something like this only in a larger project. I've heard a lot about MVC and all but I am confused about the various frameworks out there. Zend seems awesome but looks heavy at the same time and also requires you to have a lot more control over the web-server whereas CakePHP is a good and a fast framework that needs only little control. Do I use one of these or just write my own MVC? I have the following goals: Goals: Site should be fast - I know this depends on my coding skills but I will learn on my way. The framework itself should not slow me down) Setting up the site should not require you to use command-line - This requirement is ok during development. But some frameworks like Symphony require you to initialize certain things through command-line Should support pluggable modules - For instance, if I want to be able to use the FCK editor, I should be able to organize things in a good way. Should be possible to extend - For instance, SO is mainly a Q&A site but I should be able to logically extend it into an Idea Management System (optional but I'm curious). This goes more into code re-usability I guess. I am comfortable with MySQL so I should be done with database design etc. with some serious effort. As for PHP, I can write code on my own but haven't really used any frameworks that much. jQuery, I started off recently and love it. I would be glad if someone can guide me during these initial steps. Precisely, when designing something like SO, I have the following questions: Do I use a framework? If yes, should it be MVC? If MVC, which one is a good and a scalable one? (I'd love something like jQuery that will not die anytime soon) How do I balance the functionality? The same logic can sometimes be made server centric or client centric. (more Ajax?). Is it a good idea to make a heavy javascript site considering the recent advances on client-side JS processing? Just in case anyone is wondering, I am not interested in commercializing any of this. I need a reason to learn something :)

    Read the article

  • Changing mouse behaviour in EOG

    - by Wauzl
    When I open a photo in eog I can easily zoom with the mouse mouse wheel. This is kind of nice but since I have a touchpad with two-fingered scrolling and horizontal scrolling I'd rather scroll in the image and zoom by using Ctrl+Mouse Wheel? I basically want the same behaviour as in evince: Horizontal Scroll and Normal Scroll navigate within the image and Ctrl + Mouse Wheel zooms in and out. Is this possible somehow? [EDIT] I just figured out that what I want is already implemented: I can pan the image by using Ctrl + Mouse Wheel. This is fine as it is the behaviour I want only with the Ctrl inverted. But I cannot pan to the left. Up, down and right work fine. What's the problem?

    Read the article

  • IE9 selectAllChildren on an out-of-view element

    - by MrSlayer
    I am trying to replicate a service that is provided by Tynt.com that appends some text to a user's selection when copying. I understand that users don't particularly like this, but it is a client's request to append the URL and copyright notice whenever a user copies something from their website. In current browsers, I am able to do this by creating a DOM element, adding the selected text, appending the copyright text and then selecting the new node: var newSelection = document.createElement( 'div' ); newSelection.style.cssText = "height: 1px; width: 1px; overflow: hidden;"; if( window.getSelection ) { var selection = window.getSelection( ); if( selection.getRangeAt ) { var range = selection.getRangeAt( 0 ); newSelection.appendChild( range.cloneContents( ) ); appendCopyright( ); document.body.appendChild( newSelection ); selection.selectAllChildren( newSelection ); // ... remove element, return selection } } In IE9, this errors out on the selection.selectAllChildren( newSelection ) statement and I was able to figure out that this is because newSelection was effectively "hidden" from the viewport due to the styles applied in the second line above. Commenting that out works, but obviously the new node is shown to the end user. It appears that this was resolved in later versions of IE, but I am having trouble coming up with a workaround that is sufficient for IE9, a browser that I need to support. I've tried a variety of alternatives, like setting visibility: hidden;, positioning it off-screen, and trying some alternative selection functions, but they each present different problems. The error thrown by IE is: SCRIPT16389: Unspecified error.

    Read the article

  • Excel 2003 VBA - Method to duplicate this code that select and colors rows

    - by Justin
    so this is a fragment of a procedure that exports a dataset from access to excel Dim rs As Recordset Dim intMaxCol As Integer Dim intMaxRow As Integer Dim objxls As Excel.Application Dim objWkb As Excel.Workbook Dim objSht As Excel.Worksheet Set rs = CurrentDb.OpenRecordset("qryOutput", dbOpenSnapshot) intMaxCol = rs.Fields.Count If rs.RecordCount > 0 Then rs.MoveLast: rs.MoveFirst intMaxRow = rs.RecordCount Set objxls = New Excel.Application objxls.Visible = True With objxls Set objWkb = .Workbooks.Add Set objSht = objWkb.Worksheets(1) With objSht On Error Resume Next .Range(.Cells(1, 1), .Cells(intMaxRow, intMaxCol)).CopyFromRecordset rs .Name = conSHT_NAME .Cells.WrapText = False .Cells.EntireColumn.AutoFit .Cells.RowHeight = 17 .Cells.Select With Selection.Font .Name = "Calibri" .Size = 10 End With .Rows("1:1").Select With Selection .Insert Shift:=xlDown End With .Rows("1:1").Interior.ColorIndex = 15 .Rows("1:1").RowHeight = 30 .Rows("2:2").Select With Selection.Interior .ColorIndex = 40 .Pattern = xlSolid End With .Rows("4:4").Select With Selection.Interior .ColorIndex = 40 .Pattern = xlSolid End With .Rows("6:6").Select With Selection.Interior .ColorIndex = 40 .Pattern = xlSolid End With .Rows("1:1").Select With Selection.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = xlAutomatic End With End With End With End If Set objSht = Nothing Set objWkb = Nothing Set objxls = Nothing Set rs = Nothing Set DB = Nothing End Sub see where I am looking at coloring the rows. I wanted to select and fill (with any color) every other row, kinda like some of those access reports. I can do it manually coding each and every row, but two problems: 1) its a pain 2) i don't know what the record count is before hand. How can I make the code more efficient in this respect while incorporating the recordcount to know how many rows to "loop through" EDIT: Another question I have is with the selection methods I am using in the module, is there a better excel syntax instead of these with selections.... .Cells.Select With Selection.Font .Name = "Calibri" .Size = 10 End With is the only way i figure out how to accomplish this piece, but literally every other time I run this code, it fails. It says there is no object and points to the .font ....every other time? is this because the code is poor, or that I am not closing the xls app in the code? if so how do i do that? Thanks as always!

    Read the article

  • how do i work bool!

    - by user350217
    HI! im a beginner and im really getting frustrated with this whole concept. i dont understand how to exactly use the bool function. i know what it is but i cantfigure out how to make it work in my program. Im trying to say that if my variable "selection" is any letter beween 'A' and 'I' then it is valid and can continue on to the next function which is called calcExchangeAmt(amtExchanged, selection). if it is false i want it to ask the user if they want to repeat the program and if they agree to repeat i want it to clear the screen and restart to the main function. please help edit my work! this is my bool function: bool isSelectionValid(char selection, char yesNo, double amtExchanged) { bool validData; validData = true; if((selection >= 'a' && selection <= 'i') || (selection >= 'A' && selection <= 'I')) { validData = calcExchangeAmt (amtExchanged, selection); } else(validData == false); { cout<<"Do you wish to continue? (Y for Yes / N for No)"; cin>>yesNo; } do { main(); } while ((yesNo =='y')||(yesNo == 'Y')); { system("cls"); } return 0; } this is the warning that im gettng: warning C4800: 'double' : forcing value to bool 'true' or 'false' (performance warning)

    Read the article

  • Jquery Tools Tabs: How to capture onClick event when selection is on current tab?

    - by littlenewton
    Hi All, I tried to ask this question on the jquery tools forum, but didn't get a response, hopefully someone here can help. Question: It seems the onClick event does not get fired when user is already on current tab, I think that make sense for most cases. However, in my case, I do want to capture the onClick event even when the curent tab is already the selection. Is there a way to do this? Thanks!

    Read the article

  • Trying to retrieve the contents of UITableView cell on selection by user.

    - by chubsta
    Hi, this is my first post here and as i am very new (2 weeks in...) to iPhone (or any!) development i am a little unsure as to how much detail is needed or relevant, so please forgive me if I dont provide enough to be useful at this stage... Anyway, on to my problem - I have set up a UITableView-based app, which has a .plist for holding the data. The .plist has a dictionary as its root, followed by a number of Arrays, each containing the data-strings that display in the table. Everything is working fine until the point where i select a row. I have set it up so i get an alert with the results of the button press and it is here that i want to see the contents of the cell being produced. Instead of the expected string eg. "data line 1", all i get is the number of the row within the section. I have gone backwards and forwards but dont seem to be getting anywhere although i am sure it is something simple. The code compiles fine, with no warnings or errors, and if i can just get the string of the selected cell i will be well on my way, so any help appreciated. I know that I need to do more following the 'NSUInteger row = [indexPath row]; part but thats where my mind dries up... here is the relevant 'selection' section, if i need to post more code please let me know, and i really appreciate any help with this...(please forgive my 'alert' message, i was just happy at that point that i get SOMETHING back from the row selection!) (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; NSUInteger row = [indexPath row]; NSString *message = [[NSString alloc] initWithFormat: @"You selected Cell %d from this Section, "@"which is a very good choice indeed!" @"Unfortunately I can't work out how to get the info out of the cell so it's not much use at the moment!" @"Still, this is a good chance to see how much space I have in an alert box!", row]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"My God! It works..." message:message delegate:nil cancelButtonTitle:@"You are awesome Karl!!" otherButtonTitles:nil]; [alert show]; [message release]; [alert release]; }

    Read the article

  • How to make selection color be "on top" when background color for any text element is set in Visual

    - by Confused Developer
    Faced problem while setting background color for any element in Visual Studio 2010 editor. Selection color doesn't override this background color. So then it's very inconvenient to work with selections in editor. Case when only string literal is selected it's almost impossible to distinguish colors and see what part of string is selected. Is there any possibility to fix the problem by changing some options? Or it's a Visual Studio bug?

    Read the article

  • difference between -> and . for member selection operator.

    - by TimothyTech
    in this book i have I'm learning pointers, and i just got done with the chapter about OOP (spits on ground) anyways its telling me i can use a member selection operator like this ( - ). it sayd that is is like the "." except points to objects rather than member objects. whats the difference, it looks like it is used the same way...

    Read the article

< Previous Page | 24 25 26 27 28 29 30 31 32 33 34 35  | Next Page >