list

Best way to store 3 pieces of data as a single entry

For a game server, I want to record details when a player makes a kill, store this, and then at intervals update to a sql database. The part i'm interested in right now is the best method of storing the kill information. What i'd like to pass to the sql server on update would be {PlayerName, Kills, Deaths}, where the kills and deaths ar...

Using Large Lists

In an Outlook AddIn I'm working on, I use a list to grab all the messages in the current folder, then process them, then save them. First, I create a list of all messages, then I create another list from the list of messages, then finally I create a third list of messages that need to be moved. Essentially, they are all copies of each ...

Using `<List>` when dealing with pointers in C#.

How can I add an item to a list if that item is essentially a pointer and avoid changing every item in my list to the newest instance of that item? Here's what I mean: I am doing image processing, and there is a chance that I will need to deal with images that come in faster than I can process (for a short period of time). After this "b...

Spring MVC jsp list of objects

I use Spring MVC 3.0 and JSP. I have an object: public class ObjectWrapper { private List<SomeTO> someTOs; } Class SomeTO contains fields like name and id. How can I create a form on which an user can dynamically add to list of SomeTO? I googled it and found something about spring:bind, but it's unclear for me. ...

sharepoint list relationship question

I have two custom lists in sharepoint with a one to many relationship on a column in both lists. So list A has text column 1 and list B has a lookup column 1' on list A's column 1. I want to display the rows in list A, where column 1 has a match on column 1' and a 2nd column in list B with a specific text string. I have Sharepoint Des...

Typed DefaultListModel to avoid casting

Is there a way in java to have a ListModel that only accepts a certain type? What I'm looking for is something like DefaultListModel<String> oder TypedListModel<String>, because the DefaultListModel only implements addElement(Object obj) and get(int index) which returns Object of course. That way I always have to cast from Object to e....

SImplifying with LINQ - Basic selection

Hello foreach (var person in peopleList.Where(person => person.FirstName == "Messi")) { selectPeople.Add(person); } I am just wondering if there is any way to simplify this using LINQ. Like rather than look at all the people I was trying to use LINQ to just fill a list with the "Messi"'s... was trying something like... var s...

display each record of list into a separate line in jython

Hi everyone, how to display record of the list in different line ['0 , INDIVS08 , ODI_TEMP', '1 , C$_0EMPLOYEES , ODI_TEMP', '2 , C$_0PACS08 , ODI_TEMP'] i want to display as '0 , INDIVS08 , ODI_TEMP' , '1 , C$_0EMPLOYEES , ODI_TEMP', '2 , C$_0PACS08 , ODI_TEMP' Thanks for all of your help ...

Retrieving the list of markers loaded from a ggeoxml

I need to get the list of markers after I load them on the map from a kml file with map.addOverlay(geoxml); I tried this geoxml = new GGeoXml("http://www.mydomain.com/mykmlfile.kml"); GEvent.addListener( geoxml, "load", function( ) { if ( geoxml.loadedCorrectly( )) { var markers = geoxml.overlayman.markers ...

Get a specific string from a service list using WSDiscovery

Hello, I am using the WSDiscovery module for python. I have been able to search for services on my network. I am trying to discover a client and get the XAddress from this. The WSDiscovery module has very little documentation, actually so little the only piece is in the readme file of the module which is a few lines long. I have manged ...

java casting a list

Let's say I had: protected void performLogic(List<Object> docs) { ... } In the code where I'm going to be calling this method, I have a List<String> list. I want to call performLogic, passing this list. But it won't work because the lists are 2 different types: public void execute() { List<String> docs = new ArrayList<String>()...

Why doesn't list.get(0).equals(null) work?

The first index is set to null (empty), but it doesn't print the right output, why? //set the first index as null and the rest as "High" String a []= {null,"High","High","High","High","High"}; //add array to arraylist ArrayList<Object> choice = new ArrayList<Object>(Arrays.asList(a)); for(int i=0; i<choice.size(); i++){ if(i==0){ ...

How to sort a list alphabetically and have additional lists sorted in the same order

I have 3 lists, each with equal elements: email addresses, salaries and IDs I'd like to sort the email addresses alphabetically and in some way sort the other 2 lists (salaries and IDs). E.g., Emails: [email protected] [email protected] Salaries: 50000 60000 IDs: 2 1 The puzzle: I'd like to sort Emails such that [email protected] is first and [email protected]...

Sharepoint List Filter by Profile Property

How would you filter a list in Sharepoint (WSS 3.0) by a current user's profile property. For example, I have a list with a Department column and I want to filter the list based on the current user's department (which would be a user profile's property). Any idea's on how to do this? ...

Reordering Lists like playlists in the media player

Hi, I have a list of items that are displayed using a ListView from a SQLCursor. The SQL table includes(as well as other things) a _id field and an order field. I use the order field to sort the list before it gets to the ListView. What I need is a widget like the MediaPlayer has in its playlist view. It allows you to click the icon...

Apply function to one element of a list in Python

I'm looking for a concise and functional style way to apply a function to one element of a tuple and return the new tuple, in Python. For example, for the following input: inp = ("hello", "my", "friend") I would like to be able to get the following output: out = ("hello", "MY", "friend") I came up with two solutions which I'm not ...

IE6 list issue - First list on page ignores horizontal margins

Hi Folks, I am creating a store in Magento and have a weird issue with IE6 and the ordered lists on my page. For some reason, IE6 ignores the horizontal margin on my first list. Not the first element in the list but the whole list. I have multiple list on the page. Here is a link to the offending page: http://byerofma.nexcess.net/produ...

How do I most efficienty check the unique elements in a list?

let's say I have a list li = [{'q':'apple','code':'2B'}, {'q':'orange','code':'2A'}, {'q':'plum','code':'2A'}] What is the most efficient way to return the count of unique "codes" in this list? In this case, the unique codes is 2, because only 2B and 2A are unique. I could put everything in a list and compare, but is this...

I'm doing a lot of lists and dictionary sorting...and this is causing memory errors in Python website.

I retrieved data from the log table in my database. Then I started finding unique users, comparing/sorting lists, etc. In the end I got down to this. stats = {'2010-03-19': {'date': '2010-03-19', 'unique_users': 312, 'queries': 1465}, '2010-03-18': {'date': '2010-03-18', 'unique_users': 329, 'queries': 1659}, '2010-03-17': {'date': '20...

Returning a list in this recursive coi function in python.

Hello. I'm having trouble getting my list to return in my code. Instead of returning the list, it keeps returning None, but if I replace the return with print in the elif statement, it prints the list just fine. How can I repair this? def makeChange2(amount, coinDenomination, listofcoins = None): #makes a list of coins from an amoun...