Search Results

Search found 10804 results on 433 pages for 'attribute keys'.

Page 231/433 | < Previous Page | 227 228 229 230 231 232 233 234 235 236 237 238  | Next Page >

  • "Grouping" dictionary by value

    - by user1260827
    I have a dictionary: Dictionary<int,int>. I want to get new dictionary where keys of original dictionary represent as List<int>. This is what I mean: var prices = new Dictionary<int,int>(); The prices contain the following data: 1 100 2 200 3 100 4 300 I want to get the IList<Dictionary<int,List<int>>>: int List<int> 100 1,3 200 2 300 4 How can I do this?

    Read the article

  • set movie clip "on-top"

    - by Remus Rigo
    I want to do a effect like the switching windows from Win 7 [Win]+[Tab] keys pressed. I created two "windows" (movie clips) and when I click on the 1st it displays on top of the other, but the problem is when I click on the 2nd I can see the 1st one displayed in it. Is there any way that i put a movie clip on top of the other. Thanks

    Read the article

  • Retrieving Data in A NSTableView

    - by Heisennberg
    I have a three column Table View populated by two NSMutableDictionaries which share the same keys (ie key | value1 | value2 ) with dict1(key,value1) and dict2(key,value2). I want to manually enter data in the third column and create the key/value objects in dict2. But when I do that, my code picks the wrong key :S Here's the code for the delegate : - (void)tableView:(NSTableView *)aTableView setObjectValue:(id)anObject forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex { if ([[aTableColumn identifier] isEqualToString:@"value2"]) { [dict2 setValue:anObject forKey:[[[aTableView tableColumnWithIdentifier:@"key"] dataCellForRow:rowIndex] stringValue ]]; } } Any idea ?

    Read the article

  • c++ class in cocoa

    - by joels
    Any ideas why Xcode wont let me define a c++ class in my cocoa project? I am trying to use a C++ class in my cocoa project but I am getting build errors just creating the c++ header file. class SomeClass{ public: int count; } Expected '=', ',', ';', 'asm' or 'attribute' before 'SomeClass' in ..... If I remove all code from the header file, ?the cpp file builds without any errors and is included in the list of compiled sources...

    Read the article

  • Can I change an NSDictionaries key?

    - by Mark Reid
    I have an NSDictionary object that is populated by NSMutableStrings for its keys and objects. I have been able to change the key by changing the original NSMutableString with the setString: method. They key however remains the same regardless of the contents of the string used to set the key initially. My question is, is the key protected from being changed meaning it will always be the same unless I remove it and add another to the dictionary? Thanks.

    Read the article

  • How do I delete orphan entities using hibernate and JPA on a many-to-many relationship?

    - by user368453
    I want to delete orphan entities using hibernate and JPA on a many-to-many relationship but all that I found was this atibute the attribute. org.hibernate.annotations.CascadeType.DELETE_ORPHAN ( i.e. @Cascade(value={org.hibernate.annotations.CascadeType.DELETE_ORPHAN) ), which works only for one-to-many relationships. I want to know if I can delete the orphan ones on my many-to-many relationship. I´d be happy if anyone could help me... Thanks in advance !

    Read the article

  • Weird jQuery UI Slider behavior using Page Up/Down

    - by qlassic
    I'm using jQuery UI's slider to update a div containing a number. Dragging or using the left/right keys should only allow the user to choose a number between 1 and 5 (this works as intended). However, if the handle has focus and I use page up/down, I start to get rounded values that are well out of the range of 1-5. Anybody experience the same? Thoughts?

    Read the article

  • Flickering Image in Java?

    - by Noah Cagle
    OK so I am coding a game right now to prepair for Ludum Dare SharkJam, and I am using a new method for programming, because the last method I had crashes my PC, so this one should work. Well it does work and all, better too, but the images that I put in it flicker. Here is the whole main class (where the images are drawn) package me.NoahCagle.watermaze; import java.awt.Color; import java.awt.Graphics; import java.awt.Image; import java.awt.image.BufferedImage; import javax.swing.JFrame; import me.NoahCagle.watermaze.entity.EntityShark; import me.NoahCagle.watermaze.entity.Player; import me.NoahCagle.watermaze.input.Keys; import me.NoahCagle.watermaze.map.Map; public class Game extends JFrame { private static final long serialVersionUID = 1L; Map map = new Map(0, 0); Player player = new Player(50, 30); static EntityShark shark = new EntityShark(400, 400); public Image dbImage; public Game() { setSize(800, 600); setDefaultCloseOperation(EXIT_ON_CLOSE); setLocationRelativeTo(null); setVisible(true); setTitle("Water Maze"); setResizable(false); setBackground(Color.blue); addKeyListener(new Keys()); } public static void main(String[] args) { new Game(); Thread s = new Thread(shark); s.start(); } public void paint(Graphics g) { dbImage = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB); g.drawImage(dbImage, map.x, map.y, null); g.drawImage(player.player, player.x, player.y, this); g.drawImage(shark.shark, shark.x, shark.y, this); repaint(); } } What this code does for me is makes the Images work correctly, just flickering, alot. Can anyone help me with my issue? EDIT: I think it has something to do with where I call the repaint method in the paint method, so look there.

    Read the article

  • Entity Relationships - Can a weak entity take part in a 'one to many' relationship as the 'one'

    - by jonos
    Hi, With the following entity relationship structure I'm struggling to figure out if the relationship between the LOAN and ITEM is valid? The weak entity of Loan uses a partial key of 'loan_dateLeant' and the primary keys from CUSTOMER and ITEM to form its primary key. However LOAN has a 'one to many' relationship with ITEM as a loan can consist of more than one item. But surely this means that if more than one item is loaned, then the loan record will have two item_id values for part of its primary key?

    Read the article

  • WP7 Return the last 7 days of data from an xml web service

    - by cvandal
    Hello, I'm trying to return the last 7 days of data from an xml web service but with no luck. Could someone please explain me to how I would accomplish this? The XML is as follows: <node> <api> <usagelist> <usage day="2011-01-01"> <traffic name="total" unit="bytes">23579797</traffic> </usage> <usage day="2011-01-02"> <traffic name="total" unit="bytes">23579797</traffic> </usage> <usage day="2011-01-03"> <traffic name="total" unit="bytes">23579797</traffic> </usage> <usage day="2011-01-04"> <traffic name="total" unit="bytes">23579797</traffic> </usage> </usagelist> </api> </node> EDIT The data I want to retrieve will be used to populate a line graph. Specificly I require the day attribute value and the traffic element value for the past 7 days. At the moment, I have the code below in place, howevewr it's only showing the first day 7 times and traffic for the first day 7 times. XDocument xDocument = XDocument.Parse(e.Result); var values = from query in xDocument.Descendants("usagelist") select new History { day = query.Element("usage").Attribute("day").Value, traffic = query.Element("usage").Element("traffic").Value }; foreach (History history in values) { ObservableCollection<LineGraphItem> Data = new ObservableCollection<LineGraphItem>() { new LineGraphItem() { yyyymmdd = history.day, value = double.Parse(history.traffic) }, new LineGraphItem() { yyyymmdd = history.day, value = double.Parse(history.traffic) }, new LineGraphItem() { yyyymmdd = history.day, value = double.Parse(history.traffic) }, new LineGraphItem() { yyyymmdd = history.day, value = double.Parse(history.traffic) }, new LineGraphItem() { yyyymmdd = history.day, value = double.Parse(history.traffic) }, new LineGraphItem() { yyyymmdd = history.day, value = double.Parse(history.traffic) }, new LineGraphItem() { yyyymmdd = history.day, value = double.Parse(history.traffic) }, }; lineGraph1.DataSource = Data; }

    Read the article

  • Returning Null values with COUNT

    - by Randy B.
    With this query, I get a result that is two short of the table because they are not included in count, and I would like get the NULL values in the result. To do this, I am pretty sure I need to use a subquery of some kind, but I am not sure how, since the attribute in question is an aggregate. SELECT Equipment.SerialNo , Name, COUNT(Assignment.SerialNo) FROM Equipment INNER JOIN Assignment ON Assignment.SerialNo = Equipment.SerialNo GROUP BY Equipment.SerialNo, Name

    Read the article

  • How to declare different non-JPA annotations on embedded classes

    - by e99y
    @Embedded public class EmbedMe { private String prop1; private String prop2; } @Entity public class EncryptedEmbedded { @Embeddable private EmbedMe enc; } I am current using Jasypt for encryption. Is there a way to indicate that the @Embeddable in EncryptedEmbedded will use @Type(value = "newDeclaredTypeHere") per attribute (prop1, prop2)? Thanks in advance... ;)

    Read the article

  • Which kind of changes can't I do with lightweight migration in Core Data?

    - by dontWatchMyProfile
    I recently tried a lot of different stuff with lightweight migration. These all work: 1) Rename attributes (with renaming identifier specified) 2) Add attributes 3) Add new entity + new attribute + inverse relationship to an already existing entity 4) remove existing entity + relationships to that entity = It almost looks like just about anything can be handled with LM. Did I miss something? In which cases am I getting into trouble and need an some more complex approach?

    Read the article

  • How do I change the CSS from a web page contained in an object tag? (XHTML, jquery)

    - by Jose
    Hi! I've been having a bit of a problem with jQuery and XHTML. Basically, I've got an object tag that contains a Web Page in its data attribute. Now, what I want is that when I click a button I get this web page and dinamically change the CSS file it's currently using. I've tried to get the page by using jquery, but all I get is the object itself, not the webpage contained in the object. Thanks!! :)

    Read the article

< Previous Page | 227 228 229 230 231 232 233 234 235 236 237 238  | Next Page >