list

How can i preserve list contents on postbacks?

On the page load event of my webpage i fill the list of with the contents of the structure Structure MainStruct Dim Ans1 As String Dim Ans2 As String End Structure Dim Build As New List(Of MainStruct) The problem i that on post-back the contents of the list-of get lost. So, how can i preserve the contents of the l...

List of functions references

Hello, I'm using boost::function for making references to the functions. Can I make a list of references? For example: boost::function<bool (Entity &handle)> behaviorRef; And I need in a list of such pointers. For example: std::vector<behaviorRef> listPointers; Of course it's wrong code due to behaviorRef isn't a type. So the ques...

List Component that acts as if control was permanently pressed

Hey, I have a list control and i want the user to be able to select many items at a time. Thus I want it to act that if the control key is pressed while he is clicking. Eg if he clicks on a selected row it should become unselected and if he clicks on a unselected row it should become selected. Do you have any idea how to do this? Than...

Find "not the same" elements in two arrays

I have two integer lists (List<int>). They contain the same elements, but List 1 contains elements that are not in the List 2. How to find which elements of the List 1 ARE NOT in the List 2. Thanks :) PS. lang is c# ...

Lists as arguments in Scheme

Let's say I have a procedure foo that takes three arguments, and returns a list of them all doubled: (define (foo a b c) (list (* 2 a ) (* 2 b) (* 2 c))) What I'd like to be able to do is create another procedure which accepts a list, and calls foo using the list elements as arguments, like this: (define (fooInterface myList) .....

Checkbox Images in List

It seems like it should be a simple concept. I need a vertical list. This list has an image with a checkbox and pathname of that image underneath it. The user should be able to check the checkboxes of the images they want to appear in their "shopping cart". The images, checkbox label, and list are populated by an XmlList. How can I do th...

taking intersection of N-many lists in python

what's the easiest way to take the intersection of N-many lists in python? if I have two lists a and b, I know I can do: a = set(a) b = set(b) intersect = a.intersection(b) but I want to do something like a & b & c & d & ... for an arbitrary set of lists (ideally without converting to a set first, but if that's the easiest / most eff...

Combining Variable Numbers of Lists w/ LINQ

I have a list (List) of objects. Each of those objects contains a list (List) of strings describing them. I'm needing to create a dropdown containing all of the distinct strings used to describe the objects (Cards). To do this, I need a list of distinct strings used. Any idea how/if this can be done with LINQ? ...

Why is my WCF RIA Services custom object deserializing with an extra list member?

I have been developing a Silverlight WCF RIA Services application dealing with mock financial transactions. To more efficiently send summary data to the client without going overboard with serialized entities I have created a summary class that isn’t in my EDM, and figured out how to serialize and send it over the wire to the SL client ...

Adding a vector of numbers from MATLAB to a list in C#

Hi, Could anyone suggest a straightforward way to take a vector of numbers from MATLAB and add those numbers to a list in C# to be called upon by an event in the C# program? I've found a lot of information on the interface between the two languages, but I'm very new to c# and could use the specificity. Any suggestions welcome! ...

Web image loaded by thread in android

I have an extended BaseAdapter in a ListActivity: private static class RequestAdapter extends BaseAdapter { and some handlers and runnables defined in it // Need handler for callbacks to the UI thread final Handler mHandler = new Handler(); // Create runnable for posting final Runnable mUpdateResults = new Runnable() { ...

Upgrading a SharePoint list instance that was deployed via feature

I'm curious how others address this issue. Using VSEWSS 1.3, I have created a site content type, a list definition (w event receivers), and a list instance. All of them are in the same WSP solution and each is activated individually via features. Now let's assume that all the features have been activated for some time, and the list in...

Python - alternative to list.remove(x)?

Hi, I wish to compare two lists. Generally this is not a problem as I usually use a nested for loop and append the intersection to a new list. In this case, I need to delete the intersection of A and B from A. A = [['ab', 'cd', 'ef', '0', '567'], ['ghy5'], ['pop', 'eye']] B = [['ab'], ['hi'], ['op'], ['ej']] My objective is to com...

Strange error message while syncing Project tasks to Sharepoint list

Using new Project 2010 feature "Sync to Tasks List" get following message- Microsoft Project Unable to write information for task "XXX" to SharePoint. Ensure "XXX" contains valid data and try again. Any ideas on the root cause -what exactly could be wrong with the task data? ...

List.Contains is not working as hoped

If I have an object of type MyBull and a List<MyBull> orig: // Just an example MyBull x = getMeTheObjectWithIdFromDB(9); orig.add(x); // Again same? data object MyBull y = getMeTheObjectWithIdFromDB(9); Why is this false then? // This is false, even though all the properties // of x and y are the same. orig.Contains<MyBull>(y); ...

Problem parsing a list in batch

I am trying to extract tokens from a list of strings using a batch script, but for some reason it ignores my string if it contains an asterisk. An example to illustrate this problem is as follows: @echo off set mylist="test1a,test1b" set mylist="test2a,test2b*" %mylist% set mylist="test3a,test3b" %mylist% echo %mylist% for %%a in ( ...

C# Changing Objects within a List

Hi, I'm having a little problem changing members of an object in a list using a found index. So this is the method I am currently working with: static void addToInventory(ref List<baseItem> myArray, baseItem item, float maxAmount, ref float currentAmount) { if (currentAmount + item.getWeight() <= maxAmount) { Console.Wr...

Why I get UnsupportedOperationException when trying to remove from the List?

I have this code: public static String SelectRandomFromTemplate(String template,int count) { String[] split = template.split("|"); List<String> list=Arrays.asList(split); Random r = new Random(); while (list.size()>count) { list.remove(r.nextInt(list.size())); } return StringUt...

Read ListItems from Sharepoint List Programmatically

Hi, I have a custom list in sharepoint, which contains two colums such as date and person. Based on some condition on date, i need to send a mail to the respective person. This is my requirements. So i need to know how to get the ListItem programmatically. If anyother alternate way such as, through web services, help me put step by step ...

How to center li items in quicksand jQuery plugin

My problem is that in some screen resolutions the list items are not in the center of the div while the ul is centered. Does anyone know a solution? Thanks! <ul class="news-grid"> <li></li> <li></li> </ul> $(function() { $('#buttons a').click(function(e) { $.get( $(this).attr('href'), function(data) { ...