list

how to implement contact like A to Z list items viewer

Hi, In android there is A to Z selector on right side of the contacts. one can just select on of the alphabet and only those contacts will be displayed which are starting with that selected alphabet. I want to implement such kind of list.. !! Any idea ?? ...

Embedding a table in a list in a report in iReport

I am trying to do something like this in iReport: Main Report of all schools in a district. Let's say, select * from schools where district_id = $P{dist_id} A list of teachers in each school (eg, select * from teachers where school_id = $P{school_id}, and school_idea is populated by the above.) A table of each student in each teacher...

List of footnotes in latex

Hi, I was wondering if I'll have the option to add something like \listoffootnotes in my document like I can use \listoffigures or tables... Anyone knows how? ...

Is there a more elegant / pythonic way to express this construct?

itemList = ["a","b","c","d","e","f","g","h"] aa = "NULL" bb = "NULL" cc = "NULL" for item in itemList: aa = bb bb = cc cc = item if aa == "NULL": continue print "%s_%s_%s" % (aa, bb, cc) ...

Advanced sorting criteria for a list of nested tuples

I have a list of nested tuples of the form: [(a, (b, c)), ...] Now I would like to pick the element which maximizes a while minimizing b and c at the same time. For example in [(7, (5, 1)), (7, (4, 1)), (6, (3, 1))] the winner should be (7, (4, 1)) Any help is appreciated. ...

Simple ListBox w/ PyGTK Issues

Environment: PyGTK Glade Problem: After following several tutorials detailing how to get a ListBox up and running using the GtkTreeView widget alongside a gtk.ListStore object I still can't seem to get my data from the ListStore to show up in the GtkTreeView. Request: Anyone have a link to a thorough tutorial I can follow or willin...

Java: Collections.list for iterator / iterable

Hi, Why is java.util.Collections.list only for Enumeration but not for Iterator (or Iterable)? Or why is there not an overload of this function for Iterator (or Iterable)? Is there any other method which does that? Is there any reason why that is? ...

How could I represent a series of events like google calendar?

I need to be able to plot events on a vertical timeline and I like the way Google Calendar achieves this: Currently I'm displaying the information with a ListView component, but this two practical drawbacks: It's far from clear when there's a gap Or, conversely, when there's an overlap Both problems stem from the lack of represent...

Erlang: How does one avoid Lists being translated to ASCII Strings?

[97, 98, 99]. yields "abc", in the Erlang shell. I realize this is because the ASCII values of a, b and c are 97, 98 and 99 respectively. So.. how would one go about returning [97,98,99] without Erlang translating it to ASCII? ...

Wrong output in Python - as per my logic

Can someone tell me why my program is working weird. I am trying to sort list1 in ascending order. This code is part of my quick sort program I am trying to write. As per my logic which I am applying in this code, and I checked manually too, the output should be [1,2,3,4,5]. However the output is coming out to be [1,2,2,4,5]. Can you tel...

List in app widget

Is it possible to have a list with dynamic amount of items in app widget? ...

List<T> to DataView

Hi, How to convert List to a dataview in .Net. ...

How to call WP Theme Templates from WP Plugin?

Ok, you know when you're editing a page in Wordpress? You can change the page template under Page Attributes. How can I call a list of the current theme's page templates? I need that to use in my plugin. ...

Searching a python list quickly?

I have a dictionary and a list. The list is made up of values. The dictionary has all of the values plus some more values. I'm trying to count the number of times the values in the list show up in the dictionary per key/values pair. It looks something like this: for k in dict: count = 0 for value in dict[k]: if value in list: ...

python app gets stuck on shuffle and loop

I am working on this small little piece in python and when I run it, It never gets past the print 'c' line and is stuck on the while loop. What am I doing wrong? link to text file: http://downloads.sourceforge.net/wordlist/12dicts-5.0.zip enter code here import sys import random inp = open('5desk.txt', 'r') lis = inp.readlines() inp.cl...

PHP, What do you need for a full Server manager?

I will soon be making a Debian-based OS and I was wondering what are the main things that a Server Manager would need to include? I already have a few ideas: Package Manager. Ability to restart. Manage: sites, users, pages, blog-posts, comments, etc. Email Manager. VM Manager -- If VMs is enabled in the Package Manager. Storage Manager...

Remove empty strings from a list of strings

I want to remove all empty strings from a list of strings in python. My idea looks like this: while '' in str_list: str_list.remove('') Is there any more pythonic way to do this? ...

Testing if a list contains another list with Python

How can I test if a list contains another list. Say there was a function called contains: contains([1,2], [-1, 0, 1, 2]) # Returns [2, 3] (conatins returns [start, end]) contains([1,3], [-1, 0, 1, 2]) # Returns False contains([1, 2], [[1, 2], 3) # Returns False contains([[1, 2]], [[1, 2], 3]) # Returns [0, 0] Edit: contains([2, 1], [...

IE6, IE7: stretch last li to cumulative width of previous li's

Given this markup: <ul class="grafiek"> <li class="first-child">item</li> <li>item</li> <li>item</li> <li>item</li> <li>item</li> <li class="last-child">item</li> </ul> How do I make it appear, cross-browser, like so: In other words: the last item (with the fake pseudo-class last-child) should always stretch...

Python: Why Lists do not have a find method?

I was trying to write an answer to this question and was quite surprised to find out that there is no find method for lists, lists have only the index method (strings have find and index). Can anyone tell me the rationale behind that? Why strings have both? ...