I have a centered ul (styled like a table ala cssplay) that is having li elements added to it after page render, and it seems to work beautifully in everything but FF and Opera.
The desired effect is to have the row of li elements centered even if there's only one or two of them. This example simulates the issue with jQuery adding an li...
How can I convert a List to an IEnumerable and back again.
The reason I want to do this is to run a series of LINQ statements on the List i.e. sort etc
...
Hello,
i am trying to figure out a way to let the user sort records (etc a list of friends).
I want to give the user the opportunity to move a record (friend) straight to the top or bottom of the list, or by entering a number (in between).
First i thought of just adding a column called SortOrder (int) to the table with all the users f...
I have a field object and I create a list of fields:
class Field {
string objectName;
string objectType;
string fieldName;
string fieldValue;
//constructor...
}
List<Field> fieldList = new List<Field>();
Suppose I wanted to query this list to return a collection of distinct object names (to then be inserted into a checkedlistbox...
Dear all I am using jQuery, I have
little doubt of how to Extract list data effectively?
My List having
<li class="add"><a href="#">Data1</a></li>
<li class="add"><a href="#">Data2</a> </li>
...
My JQuery has
$(".add").click(function(e){
e.preventDefault();
// Here is to get the Value of Data1 and data2 ..
...
Hi, can someone point me in the direction as to how I would do the following:
I want to create a list, which pulls say (top 3) items from other lists (more than one), and displays them in one consolidated list. Is this possible? If so please point me in the direction as to how I can accomplish this, thanks.
...
Given a list of strings, I want to sort it alphabetically and remove duplicates. I know I can do this:
from sets import Set
[...]
myHash = Set(myList)
but I don't know how to retrieve the list members from the hash in alphabetical order.
I'm not married to the hash, so any way to accomplish this will work. Also, performance is not an...
I have two List's which I want to check for corresponding numbers.
for example
List<int> a = new List<int>(){1, 2, 3, 4, 5};
List<int> b = new List<int>() {0, 4, 8, 12};
Should give the result 4.
Is there an easy way to do this without too much looping through the lists?
I'm on 3.0 for the project where I need this so no Linq.
...
Is there a built-in that removes duplicates from list in Python, whilst preserving order? I know that I can use a set to remove duplicates, but that destroys the original order. I also know that I can roll my own like this:
def uniq(input):
output = []
for x in input:
if x not in output:
output.append(x)
return output
...
hi,
i have a list of regex patterns (stored in a list type) that I would like to apply to a string.
Does anyone know a good way to:
Apply every regex pattern in the list to the string
and
Call a different function that is associated with that pattern in the list if it matches.
I would like to do this in python if possible
thanks ...
I have this class.
public class Foo
{
public Guid Id { get; set; }
public override bool Equals(object obj)
{
Foo otherObj = obj as Foo;
return otherObj == null && otherObj.Id == this.Id;
}
public override int GetHashCode()
{
return this.Id.GetHashCode();
}
}
You can see I overro...
Given a List<T> in c# is there a way to extend it (within its capacity) and set the new elements to null? I'd like something that works like a memset. I'm not looking for sugar here, I want fast code. I known that in C the operation could be done in something like 1-3 asm ops per entry.
The best solution I've found is this:
list.AddRan...
I've got a stylesheet that will not, for whatever reason, apply list-style-type to a UL element. I'm using YUI's Grid CSS with their reset-fonts-grid.css file, which I know strips that out as part of the CSS reset.
After calling YUI, I call the stylesheet for the website and in there have a block for UL:
ul {list-style-type: disc;}
I...
<ol>
<li>test</li>
<li>test</li>
</ol>
will show as:
test
test
I want to have numbers coloured and text black!
I can edit the css, but I do not have access to the HTML.
...
I have a list of files (stored as c style strings) that I will be performing a search on and I will remove those files that do not match my parameters. What is the best container to use for this purpose? I'm thinking Set as of now. Note the list of files will never be larger than when it is initialized. I'll only be deleting from the con...
In SharePoint 2007, is there a limit to the number of lookup-fields that you can have in a list?
...
Hi there,
I very much like the sound of this ElementAtOrDefaultOperator for use with generic lists, but I cant figure out how to define a default type for my list of objects. From what I understand, the defaultvalue will be null if I have a list of objects as below, but I would like to return my own version of a default object with prop...
Given [1,2,3,4,5], how can i do something like 1/1, 1/2, 1/3,1/4,1/5, ...., 3/1,3/2,3/3,3/4,3/5,.... 5/1,5/2,5/3,5/4,5/5
I would like to store all the results, find the minimum, and return the two numbers used to find the minimum. So in the case i've described above i would like to return (1,5).
So basically I would like to do somethin...
Hi,
I got an Java application using SQL tables that contains an ordered list of entities, ordered by
an order column. I would like to add/remove things in/from the middle
of the list. Now, I'm wondering if some persistence framework / orm / you-name-it
could provide this kind of functionality with batch update of order
column.
At the...
Hello,
has anyone ever tried to get the list of all the movieclips (even the nested ones) that are on Stage at a specified stopped (and current) frame in Flash 8, AS 2?
I did the following:
for(i in _root){
if(typeof(_root[i])=="movieclip"){
trace(_root[i]);}
}
But this is good for a first level search: that is, if inside the moviec...