Is there a built-in function that works like zip() but that will pad the results so that the length of the resultant list is the length of the longest input rather than the shortest input?
>>> a=['a1']
>>> b=['b1','b2','b3']
>>> c=['c1','c2']
>>> zip(a,b,c)
[('a1', 'b1', 'c1')]
>>> What command goes here?
[('a1', 'b1', 'c1'), (None, '...
Hi Everyone
This is probably very simple!
I followed a tutorial from http://webdesignerwall.com/demo/jquery-sequential/jquery-sequential-list.html
It works fine when there is one ol list on the page. But when there are 2 ol lists I have an issue:
$(document).ready(function(){
$("ol.step li").each(function (i) {
i = i+1;
...
I am trying to pull data from a single column from my database but I would like to make it come out alphabetized and in two columns. I have tried floating the list but it ends up looking like this:
A_____B
C_____D
E_____F
I would like it to look like this:
A_____D
B_____E
C_____F
...
Hi, I would like to ask if there is a more elegant way to do this:
List<char> unallowed = new List<char>();
for (char c = '\u0000'; c <= '\u0008'; c++) {
unallowed.Add(c);
}
for (char c = '\u000B'; c <= '\u000C'; c++) {
unallowed.Add(c);
}
// And so on...
I have to add to the list a few contiguous ranges of Unicode characte...
When recursing with Lists in Java, I frequently end up allocating and copying lists many many times. For example, I want to generate a List<List<Integer>> of all possible Integer sequences where:
Every number is between 1 and 9
Every number is greater or equal to the number before it
A number can appear between 0 and 3 times in a row.
...
Many many programs have communities that adds languages to the application after it got released.
So, in the settings window of a program, people can see a dropdown list of available languages. Well how do people code this while using resx files for localization? I've searched the web over and over again, but couldn't find any answer. ...
I have created a field in a list in Sharepoint WSS3.
The field's type is:"Date and Time" and the format is "Date Only".
When trying to export to spreadsheet a view that contains this field I get the following error : "can not the get the list schema column property from the sharepoint list".
Is there any way that I can export this data...
Hello,
I would like to filter this list,
l = [0,1,1,2,2]
to only leave,
[0].
I'm struggling to do it in a 'pythonic' way :o) Is it possible without nested loops?
...
Hello,
I have a class that stores a list of dictionary entries. I want bind that to a datasource for gridview from codebehind.
Code for dictionary type of , representing ErrorMessage and failed field.
public partial class FailedFields
{
private Dictionary<string, string> Code_Error = new Dictionary<string, string>();
public voi...
Hi People :) ,
I am Totally new to flex and Action script..
I have a List control in my Air application. When I install the application I want a file created automatically on the local folder, and then when I start using the application .i.e. start typing in the List control, after exiting the application I want this data saved in that ...
Is there a .NET equivalent of Java's List.subList() that works on IList<T>?
...
I have an object which can be of any collection type like IEnumerable or IQueryable or List.
Now i want this object to be converted into type List.
Can anyone tell me how can i achieve this??
Thanks
...
Hello, I am using eclips for python and i am facing a problem. I have many classes with many properties and want a list of objects from one of my declared classes. The problem is:When i am accessing any item from the list, the IDE does not know it's type because in python we do not declare the variable with it's type, so there is no auto...
How can I edit the innerText property of a li inside a ul using jquery?
I used this approach and wasn't able to get it working.
$(document).ready(function() {
var lis = $("#SuperTextbox1_Results li").get();
for (var i = 0; i < lis.length; i++) {
lis[i].innerText = "<lable>added text!<label>";
...
Hello,
newbie question again.
Let's say i have a list of nested dictionaries.
a = [{"value1": 1234, "value2": 23423423421, "value3": norway, "value4": charlie},
{"value1": 1398, "value2": 23423412221, "value3": england, "value4": alpha},
{"value1": 1234, "value2": 23234231221, "value3": norway, "value4": charlie},
{"val...
Hello,
I understand that i cannot do something like List<List<string,string>>. So i have to put each object in a class, and then have a list of classes.
Below is the problem as I understand it.
Class FailedField has properties FieldName, Error
sample data: "year", "must be between 1900-2100"
Class FailedFields is a list of FailedFiel...
See i have a situation like this...
object myRoledata = List<Roles>() --> (some list or Ienumerable type)
Now i have a generic method which creates an XML object from List<T> -
Something like this..
public string GetXML<T>(object listdata)
{
List<T> objLists = (List<T>)Convert.ChangeType(listData, typeof(List<T>));
for...
I have a page with 10 images in and I want to fade them in one after another once the image has been downloaded. how can I detect the image is loaded and ready to be displayed? and should I loop through the loaded images fadeIn and once fadedIn wait for the next to load?
...
Hello,
Let us suppose I have to deal with lots of grandmothers that have lots of cats. I have a table granny_cat :
granny_id | kitty_name
--------------------
1 Kizzy
1 Jimmy
1 Katty
2 Georges
2 Albert
3 Panther
and I want to retrieve a list of granny 1 cat's, i.e. to get so...
I have an Asp.Net GridView. One of the Columns is a List, but I only want to show the Last Item in the list. How can I do this?
List<string> Column1
I am binding the Gridview to a business object:
public Class GridObject
{
List<string> Column1 { get; set; }
}
EDIT
This worked, but is it the best solution:
<%# ((List<string>...