list

Sharepoint Lists.asmx: query returns deleted items?

Hello All, While running caml query's against the sharepoint list.asmx service, I have this strange behaviour that the GetListItems method also returns deleted items; found item: test found item: already done found item: recurring found item: recurring event 3-4 found item: Deleted: recurring event 3-4 found item: Deleted: recurring ev...

Making a flat list out of list of lists in Python

Possible Duplicates: Flattening a shallow list in Python Comprehension for flattening a sequence of sequences? I wonder whether there is a shortcut to make a simple list out of list of lists in Python. I can do that in a for loop, but maybe there is some cool "one-liner"? I tried it with reduce, but I get an error. Code l =...

How to store related data

In my program (a program that assists with pathfinding), i need to store a list that contains entries consisting of a start node and an end node. A dictionary won't work as i cannot guarantee that the "key" (a node of course) will be unique. What is the best way to store this manner of data? Edit: i use C# and .Net 3.5. ...

Most efficient sorting algorithm for a large set of numbers

I'm working on a large project, I won't bother to summarize it here, but this section of the project is to take a very large document of text (minimum of around 50,000 words (not unique)), and output each unique word in order of most used to least used (probably top three will be "a" "an" and "the"). My question is of course, what would...

UL LI CSS problem in IE 8

I have the following problem, where an LI item in the list appears to be moved from the rest of the LI items: Has anyone faced a similar issue? Any solutions/hacks that worked? ...

C#: Creating objects that does not exist in a different list

I have two lists of two different kinds of objects representing data rows from two sql queries. The first list contains data, and the second contains more detailed data. So as an example: List1: List2: 1 Alice 1 15 2 Bob 1 19 3 Carol 2 5 4 Dave 2 7 2 20 4 ...

Iterating through large lists with potential conditions in Python

I have large chunks of data, normally at around 2000+ entries, but in this report we have the ability to look as far as we want so it could be up to 10,000 records The report is split up into: Two categories and then within each Category, we split by Currency so we have several sub categories within the list. My issue comes in efficien...

Speed of IN keyword in MySQL/PostgreSQL

I've heard lots of people saying that the IN keyword in most relational databases is slow. How true is this? An example query would be this, off the top of my head: SELECT * FROM someTable WHERE someColumn IN (value1, value2, value3) I've heard that is much slower than doing this: SELECT * FROM someTable WHERE someColumn = value1 O...

jquery sortable > nested uls

Hi, I'm trying to nest several lists inside the main list. Goal is to organize the menu and submenus. The html: <ul id="pages_0" class="sortable-list"> <li id="page_14">home <ul id="pages_14" class="sortable-list"> <li id="page_21">nieuwsarchief</li> <li id="page_19">waarom bouwelement</li> <li id="page_20">vac...

Clean Python Regular Expressions

Is there a cleaner way to write long regex patterns in python? I saw this approach somewhere but regex in python doesn't allow lists. patterns = [ re.compile(r'<!--([^->]|(-+[^->])|(-?>))*-{2,}>'), re.compile(r'\n+|\s{2}') ] ...

Casting IEnumerable<T> to List<T>

I was wondering if it is possible to cast an IEnumerable to a List. Is there any way to do it other than copying out each item into a list? ...

One question about element inserting in STL list.

CODE: struct Stringdata { // Length of data in buffer. size_t len; // Allocated size of buffer. size_t alc; // Buffer. char data[1]; }; typedef std::list<Stringdata*> Stringdata_list; Stringdata_list strings_; Stringdata *psd = this->strings_.front(); //... if (len > psd->alc - psd->len) alc = sizeof(Stringdata) + buffer_...

[Appengine + Django] Can't seem to get list() working

I am trying to convert a set object to list...for example "p=list('abc')" is not working. any ideas or is it inherent in appengine ...

How to perform a binary search on IList<T>?

Simple question - given an IList<T> how do you perform a binary search without writing the method yourself and without copying the data to a type with build-in binary search support. My current status is the following. List<T>.BinarySearch() is not a member of IList<T> There is no equivalent of the ArrayList.Adapter() method for List<T...

Finding equality in items in two lists of differing types

I have two objects that are derived from same the base class. Lets say ObjA is the base class, and ClassB and ClassC inherits ObjA. If I have a dim lst1 as List(Of ClassB) dim list2 as List(Of ClassA) and and I want to check for the existence of something being in lst1 that it is in list2, now I am only interested in comparing ...

Can I define multiple itemRenderers in a Flex / Actionscript list

Basically I want to override some function in the flex/actionscript list class which creates a new ItemRenderer and passes it the required data ready to be displayed. I need to do this because I wish to show a different renderer based on the type of data being displayed. Is there such a function? I don't really want to pass the list a...

When to Be Specific About the Type of List You Want

Let's say I have a class which, internally, stores a List of data: import java.util.List; public class Wrapper { private List<Integer> list; public Wrapper(List<Integer> list) { this.list = list; } public Integer get(int index) { return list.get(index); } } For the sake of this example, pretend it's a usefu...

convert nested lists to string

how can i convert the following list to a string? list1= [[1, '1', 1], [2,'2',2], [3,'3',3]] Result: '1 1 1' '2 2 2' '3 3 3' Thanks ...

Shuffling a list of objects in python

I have a list of objects in python and I want to shuffle them. I thought I could use the random.shuffle method, but this seems to fail when the list is of objects. Is there a method for shuffling object or another way around this? import random class a: foo = "bar" a1 = a() a2 = a() b = [a1,a2] print random.shuffle(b) This will...

In MOSS, can you add a Publishing Image field to an Announcements list?

Using Sharepoint MOSS 2007, I want to add a Publishing Image field to my Announcements list which I am using for news. Is this possible? Should I make a new list type that instead inherits from Publishing Page? Ultimately, I want to display the contents of this list using a Content Query Web Part. Thanks. ...