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...
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 =...
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.
...
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...
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?
...
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 ...
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...
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...
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...
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}')
]
...
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?
...
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_...
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
...
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...
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 ...
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...
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...
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
...
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...
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.
...