list

How can I fix list components that overrun to the side in Flex?

So you've created a list and hooked it up to your data. But wait! Someone decided to enter, say WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW street as their address. Or named their kid John Jacob Jingleheimer Schmidt, and all of a sudden, your list has a bizarre scrollbar running across it, right in the middle of the component, where no human b...

Convert List of longs to string array

What is the best way to convert a List of primitive longs to an array of strings? I think I'm looking for something fancier than writing my own loop, etc.. ...

C# Hashset conversion to Lists

I have looked this up on the net but I am asking this to make sure I haven't missed out on something. Is there a built-in function to convert HashSets to Lists in C#? I need to avoid duplicity of elements but I need to return a List. ...

C# Performance setting value for each list item.

Hello, I am trying to find the fasted way to set a specific property of every item in a generic list. Basicly the requirement is to iterate over a list of items and resetting the IsHit property to FALSE. Only the items in a second "hit"-list should be set to TRUE afterwards. My first attempt looked like this: listItems.ForEach(delega...

Speed of C# lists

Are C# lists fast? What are the good and bad sides of using lists to handle objects? Extensive use of lists will make software slower? What are the alternatives to lists in C#? How many objects is "too many objects" for lists? ...

List iPhone application document files

Is there a way to get the filenames of the files in an iPhone application's document-folder? How do you do that? ...

How to efficiently get rest of a Tcl list starting from an index?

I would like to get all elements following a particular index of a list. This could be written as: set foo {0 1 2 3 4 5 6 <...> n} puts [lrange $foo 1 [llength $foo]] However, it seems like a waste to compute the length of the list. It would be nice if the last argument to lrange was optional and omitting it meant to continue until ...

Does Lists in C# support slicing like in Python?

Sorry for such a basic question regarding lists, but do we have this feature in C#? e.g. imagine this Python List: a = ['a','b,'c'] print a[0:1] >>>>['a','b'] Is there something like this in C#? I currently have the necessity to test some object properties in pairs. edit: pairs are always of two :P Imagine a larger (python) list: ...

C++ STL containers: what's the difference between deque and list?

What is the difference between the two? I mean the methods are all the same. So, for a user, they work identically. Is that correct?? ...

Python Web-Scrape Loop via CSV list of URLs ???

HI, I've got a list of 10 websites in CSV. All of the sites have the same general format, including a large table. I only want the the data in the 7th columns. I am able to extract the html and filter the 7th column data (via RegEx) on an individual basis but I can't figure out how to loop through the CSV. I think I'm close but my script...

Accessing a Python variable in a list

Hi-- I think this is probably something really simple, but I'd appreciate a hint: I am using a python list to hold some some database insert statements: list = [ "table_to_insert_to" ],["column1","column2"],[getValue.value1],["value2"]] The problem is one of the values isn't evaluated until runtime-- so before the page even gets run,...

Python program to split a list into two lists with alternating elements

Can you make it more simple/elegant? def zigzag(seq): """Return two sequences with alternating elements from `seq`""" x, y = [], [] p, q = x, y for e in seq: p.append(e) p, q = q, p return x, y ...

FindAll in a list of custom objects

Hello! Well, I got an object called Mamamia and inside of it has some string properties. I created a list of this object and populated it with 150 items. I'm trying to use List.FindAll but I reaaally don't know how to do it. I've tried this way: produto = products.FindAll(delegate(Mamamia cv) {return cv.LocalPackage.Remove(1,21) == cm...

How to copy a list in Scala

I want to shallow copy a list in Scala. I wanted to do somehing like: val myList = List("foo", "bar") val myListCopy = myList.clone But the clone method is protected. ...

CSS: Two-element "table" aligned nicely

Hi This is a somewhat open-ended question, but I really want to understand this one so I don't care. I have a two-element "table" (CSS with spans). The left column always has an icon which is 20x20 pixels. The second column has a single line of text associated with the icon. I have gone through all sorts of ideas I could come up with ...

Implementing keyboard volume control buttons in Applescript - setting volume inside loop doesn't work

Background I have a MacAlly IceKey keyboard. This keyboard has volume buttons that require a driver to function. This driver has not been updated since 2006, and I suspect it as the source of a recent spat of recurring kernel panics I've been experiencing under Mac OS X 10.6.1. So, out it goes; but I want my volume keys back! Using the...

how to append a list<T> object to another

in C++, I have two list<T> objects A and B and I want to add all the members of B to the end of A. I've searched a few different sources and haven't found a simple solution (e.i. A.append(B);) and this surprises me a bit. What is the best way to do this? As it happens, I don't care about B after this (it gets deleted in the very next l...

div containing jquery progress bar inside <ul> list

Hello, I am trying to add a jquery progress bar inside a ul li tag. <ul> <li> <a href="test">test</a> <div id="progressbar"></div> </li> </ul> I use display: block for the anchor tag and I tried the same for the div tag but with no luck. The div elements displays below the anchor tag. I would like the progress bar to be o...

Delete many elements of list (python)

I have a list L. I can delete element i by doing: del L[i] But what if I have a set of non contiguous indexes to delete? I=set([i1, i2, i3,...]) Doing: for i in I: del L[i] Won't work. Any ideas? ...

scheme list equivalence comparison

Hello I need to check if two lists have same elements in same order but I wasn't able to achieve as it seems like scheme eq? and eqv? checks by reference so giving false to such: > (eq? (list 1 2 3) (list 1 2 3)) #f > (eqv? (list 1 2 3) (list 1 2 3)) #f How to achieve this ? ...