list

HTML list wrapping problem

I have a HTML list with this style: font-weight: bold; padding: 0px; margin: 0px; list-style-type: none; display: block; width:700px; font-size: 14px; white-space: pre-wrap; and the cells have this style: display: inline; and I have spacer cells between each cell with this style: padding-right: 20px; display: inline; My problem ...

[WPF Datagrid] Binding to a List<>

I have a datagrid like this: <dg:DataGrid Name="dg" AutoGenerateColumns="False" CanUserDeleteRows="True"> <dg:DataGrid.Columns> <dg:DataGridTextColumn Header="Product Code" x:Name="columnProductCode" Binding="{Binding Path=Product.ProductCode}" IsReadOnly="True" ></dg:DataGridTextColumn> ...

How to slice a list of objects in association of the object attributes

I have a list of fixtures.Each fixture has a home club and a away club attribute.I want to slice the list in association of its home club and away club.The sliced list should be of homeclub items and awayclub items. Easier way to implement this is to first slice a list of fixtures.Then make a new list of the corresponding Home Clubs and...

Importing MSN contact list

How to import import Msn contact in our application? I want to learn about importing msn contact list in my java appication. Need help on this and where can i find the sample java code for achieving this? ...

List of all domain classes in Grails

Hi there, how can I get a list of alle domain classes I use in my project? Something like GORM.domains.list()... Greetings from Germany Jan ...

jQuery nextUntill id < num or alternative

Hi, i'm using jQuery to show/hide different LI-elements based on their classes. Look at this example. <li id="1" class="fp de1"></li> <li id="2" class="fp de1"><button onclick="hide(2,2);"></li> <li id="3" class="fp de2"><button onclick="hide(3,3);"></li> <li id="4" class="fp de3"><button onclick="hide(4,4);"></li> <li id="5" class=...

how to get a sub list from a list in ocaml

Hi, I'm looking at the List document. It seems the library does not provide a sublist function. I'm trying to get list of elements from i to j. Now I have to write it as: let rec sublist list i j = if i > j then [] else (List.nth list i) :: (sublist list (i+1) j) which is quite concise but I'm questioning the efficiency of List.nth, b...

prolog program to find equality of two lists in any order

I wanted to write a prolog program to find equality of two lists, the order of elements doesn't matter. So I wrote following: del( _ , [ ] , [ ] ) . del( X , [ X|T ] , T ). del( X , [ H|T ] , [ H|T1 ] ) :- X \= H , del( X , T , T1 ). member( X, [ X | _ ] ) . member( X, [ _ | T ] ) :- member( X, T ). eq...

Algorithm to generate all possible permutations of a list?

Say I have a list of n elements, I know there are n! possible ways to order these elements. What is an algorithm to generate all possible orderings of this list? Example, I have list [a, b, c]. The algorithm would return [[a, b, c], [a, c, b,], [b, a, c], [b, c, a], [c, a, b], [c, b, a]]. I'm reading this here http://en.wikipedia.org/wi...

Difference between Array and List in scala

In what cases I should use Array(Buffer) and List(Buffer). Only one difference that I know is that arrays are nonvariant and lists are covariant. But what about performance and some other characteristics? ...

multiple argument list with NS_REQUIRES_NIL_TERMINATION

Hello I have a function -(id) func: params1, ... NS_REQUIRES_NIL_TERMINATION and2: params2, ... NS_REQUIRES_NIL_TERMINATION; Compiler says: error: expected `;' before 'and2' Is there any way to make function with 2 argument lists? ...

List with non-null elements ends up containing null. A synchronization issue?

Hi. First of all, sorry about the title -- I couldn't figure out one that was short and clear enough. Here's the issue: I have a list List<MyClass> list to which I always add newly-created instances of MyClass, like this: list.Add(new MyClass()). I don't add elements any other way. However, then I iterate over the list with foreach and...

Problem with underscore(_) in Collections.binarySearch (Java)

Hi all. Problem: I am using Java Tutorials™ sourcecode for this. This is the source code. I tried this: --following with another section of sorted words-- words.add("count"); words.add("cvs"); words.add("dce"); words.add("depth"); --following with another section of sorted words-- and it works perfectly. However when I use this: ...

Parse <li> list with C++

I have webpage I downloaded with C++ to a string, and it is basically a massive <li> list of links. I need to find the last 2 elements of the list. Can anyone help me on how to do this? ...

What's the formal name for this Syntax?

Sometimes in Scheme, I have functions that take arguments like this add 3 4 What do you call this kind of "list" where it's elements are like a1 a2 a3 ? I don't think you can call it a list because lists are contained in parenthesis and elements are comma-seperated. ...

What is the most elegant way to find index of duplicate items in C# List

I've got a List<string> that contains duplicates and I need to find the indexes of each. What is the most elegant, efficient way other than looping through all the items. I'm on .NET 4.0 so LINQ is an option. I've done tons of searching and connect find anything. Sample data: var data = new List<string>{"fname", "lname", "home", "ho...

html lists with specific characters?

Is there a way to style a unordered list using the greater than symbol or any symbol I choose? > one > two > three ♦ one ♦ two ♦ three without the use of url()? Thanks ...

List - Strings - Textfiles

I've got a few questions concerning text files,list and strings. I wonder if it is possible to put in a code which reads the text in a textfile,and then using "string line;" or something else to define each new row of the text and turn all of them into one list. So I can sort the rows, remove a row or two or even all of them or search t...

python: list manipulation

I have a list L of objects (for what it's worth this is in scons). I would like to create two lists L1 and L2 where L1 is L with an item I1 appended, and L2 is L with an item I2 appended. I would use append but that modifies the original list. How can I do this in Python? (sorry for the beginner question, I don't use the language much,...

Why is recordset result being returned in this way for Python database query?

I have searched high and low for an answer to why query results returned in this format and how to convert to a list. data = cursor.fetchall() When I print data, it results in: (('car',), ('boat',), ('plane',), ('truck',)) I want to have the results in a list as ["car", "boat", "plane", "truck"] ...