list

Array of paths to html lists

I wrote a recursive function, which returns an array with the paths to all files/folders in a given path. An array is already sorted and returns the exact information i want, but i struggle to display it properly in html lists. Array_of_paths = ( [0] => /path/to/folderA/ [1] => /path/to/folderA/subfolderAA/ [2] => /path/to/folderB/ [3]...

How do I sort a list of python Django objects?

In Django, I have a model object in a list. [object, object, object] Each object has ".name" which is the title of the thing. How do I sort alphabetically by this title? This doesn't work: catlist.sort(key=lambda x.name: x.name.lower()) ...

Prolog: find all numbers of unique digits that can be formed from a list of digits

The best thing I could come up with so far is this function: numberFromList([X], X) :- digit(X), !. numberFromList(List, N) :- member(X, List), delete(List, X, LX), numberFromList(LX, NX), N is NX * 10 + X. where digit/1 is a function verifying if an atom is a decimal digit. The numberFromLis...

searching a list of tuples in python

So I have a list of tuple like: [(1,"juca"),(22,"james"),(53,"xuxa"),(44,"delicia")] I want this list for a tuple whose number value is equal to something. So that if I do search(53) it will return 2 Is is an easy way to do that? ...

Is it better to use List or Collection?

I have an object that stores some data in a list. The implementation could change later, and I don't want to expose the internal implementation to the end user. However, the user must have the ability to modify and access this collection of data. Currently I have something like this: public List<SomeDataType> getData() { return this....

Fix buttons at the bottom of the screen.

I am a beginner in Android programming. I want to build a simple application with a main list view in the screen and two buttons at the bottom of the screen. When more items are added to the list view, the list view should scroll without increasing the overall length of the list view. ...

List problem in Reporting Services 2005

Hi, I have a problem with a list in srss 2005. The list is grouping too much information and I dont know how to un-group it. I made a picture to show it. But because I'm new, I can only show it with this link: http://img32.imageshack.us/img32/6058/listproblem.gif So the list is also grouping the weeks, but that is not what I would lik...

Difference between list, sequence and slice in Python?

What are the differences between these built-in Python data types: list, sequence and slice? As I see it, all three essentially represent what C++ and Java call array. ...

What is faster when looking in lists of strings? "In" or "index"?

Hello! I have a bunch of lists of strings and I need to know if an string is in any of them so I have to look for the string in the first list, if not found, in the second, if not found, in the third... and so on. My question is: What is faster? if (string in stringList1): return True else: if (string in stringList2): ...

Reverse List<Object>

Hello, i have a List List<DataClient> listDataClient; My class DataCLient: Client client; List<String> phoneNumber; i have a second list List<DataPhoneNumber> listPhoneNumber; My class DataPhoneNumber: String phoneNumber; List<Client> client; In my code i put data in my first list but now i want to reverse my list in the sec...

SharePoint itemDeleting evert is not working

Hi! I have a site in SharePoint and I want to custom delete from a list. So, I'm creating the public class ListItemEventReceiver : SPItemEventReceiver { public override void ItemDeleting(SPItemEventProperties properties) { if (properties.ListTitle.Equals("Projects List")) { Projects pr...

Groovy built-in to split an array into equal sized subarrays?

If I have this: def array = [1,2,3,4,5,6] Is there some built-in which allows me to do this ( or something similar ): array.split(2) and get: [[1,2],[3,4],[5,6]] ? ...

Check for free domain names from a list of 5000 words

I have a list of 5000 words I would like automatically to check which ones are free as xxxx.com domain. Is there a free service to do so instead of copy/pasting thousands of times in register.com I am not searching for an automated solution to make profit of it. I need to buy a domain for myself. ...

List and ReadOnly property

List (and List) instances can be readonly, seeing ReadOnly property; methods throws exceptions in the case the collection have the property ReadOnly property. How can I create readonly List instances? What are the main uses? ...

Code won't exit foreach block

I've got the following C# code segment that takes a list, finds objects that are ready to update, then shoves them into a temp list, deletes from the main list, and then goes on its merry way. My issue is that the foreach block, which cycles through my main list, won't exit. TempLog.Clear(); //Ensure TempLog is empty foreach (CLogg...

The best way to use dictionary items as we use the advantages of List

I want to get use of dictionary items like I do in List generic class, e.g; foreach(item in ItemList) { item.BlaBla; } But in dictionary there s no chance, like e method above... Dictionary<string, HtmlInputImage> smartPenImageDictionary; I mean I got to know the key item for the dictionary item.. but what I want, I want to trave...

Memory consumption of resource manager

I'm writing a resource manager, which is required to be fast and has small memory foot-print. For example, I have an resource class class Abc { string m_name; string m_path; string handle; void SomeFunctions(); } And so on. Now I create and List< Tuple< int,Abc>> and add 5000 items to it. How much memory will it consum...

SharePoint form-based authentication problem with itemDeleting event?

Hi! I have a SharePoint site (I'm the farm administrator with full control over the farm and site) and I used Windows authentication. I had a event receiver feature installed which manage add/update/delete for my lists to have custom behavior. Everything worked ok on Windows Authentication. But... now I am using form-based authenticati...

I want to cache an entire list...but it won't fit in Memcache...

Because this list is like 2MB big...and memcache max memory is only 1MB. Is there a simple key/value alternative, just like memcache, except it can do bigger size? ...

how best to use phplist to avoid getting emails marked spam

I am thinking of using phplist to manage newsletter and other types of subscriptions. but i guess there is a limit applied by ISP on how much email i can send.. Any tips and tricks around how to use phplist and have a professional mass mailing software running ...