list

Hide the attachment list on the top of the Hotmail mailmerge

Hello, I am just starting to use Microsoft Word or Publisher to sent a Email Newsletter Mailshot to my clients, The attachment list of the photos i have used at the top of the Email does not look good. Is there any way i can use photo's without showing the attachment list on top, or hide the list. Many Thanks David. ...

Sorting in Matlab

Hi, I would like to sort elements in a comma-separated list. The elements in the list are structs and I would like the list to be sorted according to one of the fields in the struct. For example, given the following code: L = {struct('obs', [1 2 3 4], 'n', 4), struct('obs', [6 7 5 3], 'n', 2)}; I would want to have a way to sort L ...

Sharepoint list fields stored in content database?

Hi, I am trying to find out where data for Sharepoint List Fields are stored in the Content Database. For example from the AllLists table filtering on the listid i am interested in I can derive the following Field from the tp_ContentTypes column: <Field Type="CascadingDropDownListFieldWithFilter" DisplayName="Secondary Subject" Requ...

How should I grab pairs from a list in python?

Say I have a list that looks like this: ['item1', 'item2', 'item3', 'item4', 'item5', 'item6', 'item7', 'item8', 'item9', 'item10'] Using Python, how would I grab pairs from it, where each item is included in a pair with both the item before and after it? ['item1', 'item2'] ['item2', 'item3'] ['item3', 'item4'] ['item4', 'item5'] ['i...

Problem with inheritance and List<>

I have an abstract class called Grouping. I have a subclass called GroupingNNA. public class GroupingNNA : Grouping { // blah blah blah } I have a List that contains items of type GroupingNNA, but is actually declared to contain items of type Grouping. List<Grouping> lstGroupings = new List<Grouping>(); lstGroupings.Add( new Grou...

Python Sets vs Lists

In Python, which data structure is more efficient/speedy? Assuming that order is not important to me and I would be checking for duplicates anyway, is a Python set slower than a Python list? ...

STL list - how to find a list element by its object fields

I have a list: list<Unit *> UnitCollection; containing Unit objects, which has an accessor like: bool Unit::isUnit(string uCode) { if(this->unitCode == uCode) return true; else return false; } How do I search my UnitCollection list by uCode and return the corresponding element (preferably and iterator). In ...

pythonic way to associate list elements with their indices

Hello Everybody, I have a list of values and I want to put them in a dictionary that would map each value to it's index. I can do it this way: >>> t = (5,6,7) >>> d = dict(zip(t, range(len(t)))) >>> d {5: 0, 6: 1, 7: 2} this is not bad, but I'm looking for something more elegant. I've come across the following, but it does the opp...

click li, go to next li

Can't find a simple solution to this, I know it's easy and I've tried a few things but I can't quite get it to work. I'm currently working with a sidescrolling site and I want every time you click an image (contained in an li) it scrolls to the next li. I have jQuery plugin localscroll so it smoothly goes from one to the next, and that's...

Seaching for an element in a circular sorted array

We want to search for a given element in a circular sorted array in complexity not greater than O(Log n). ex: search for 13 in {5,9,13,1,3}. My idea was to convert the circular array into a regular sorted array then do a binary search on the resulting array, but my problem was the algorithm i came up was stupid that it takes O(n) in the ...

Can I Cast a Generic List by Type??

NavigatorItem NavItem = (NavigatorItem)cboItems.SelectedItem; lblTitle.Text = NavItem.Title; RadWrapPanel Panel = new RadWrapPanel(); Type t = NavItem.ItemsType; //<------ The Type inside my List is here. List<???> items = (List<???>)NavItem.Items; // <----Here Is the problem foreach (object i...

remove distinct items

how to remove distinct items in list from another list in c# ? ...

Cast Object to Generic List

I have 3 generict type list. List<Contact> = new List<Contact>(); List<Address> = new List<Address>(); List<Document> = new List<Document>(); And save it on a variable with type object. Now i nedd do Cast Back to List to perfom a foreach, some like this: List<Contact> = (List<Contact>)obj; But obj content change every time, and i h...

Why doesn't this image sprite menu display properly, and why aren't the links working?

The code validates. There should be two more images in the menu on the left, above the visible one of the silo. And each should be a link. http://www.briligg.com/agnosticism.html css is: external style sheet: .menu { position: relative; float: left; margin: 10px; padding: 0; width: 150px; } .menu li { margin: 0; padding: 0; list-styl...

Is there a better way of replacing duplicates in a list (Python)

Given a list: l1: ['a', 'b', 'c', 'a', 'a', 'b'] output: ['a', 'b', 'c', 'a_1', 'a_2', 'b_1' ] I created the following code to get the output. It's messyyy.. for index in range(len(l1)): counter = 1 list_of_duplicates_for_item = [dup_index for dup_index, item in enumerate(l1) if item == l1[index] and l1.count(l1[index]) > 1]...

Updating List Elements, Haskell

I have homework where I am to update a list using a function that takes two elements and returns a value of part of the first element given in the function. So it's required to update the entire listing by going through each element and update its value by applying the function against all other elements in the list (including itself). ...

Can we add any type of value in the list object ?

Can we add in the list object any type of value ? Like if we List<string> str=new List<string>(); then only string value can be added to list.But I want to add any type of value in the list like string,decimal. ...

Listing localstorage

I did my own feature using this: function save(title, url) { for (var i = 1; i < localStorage.length; i++) { localStorage["saved-title_" + i + ""] = title; localStorage["saved-url_" + i + ""] = url; } } function listFavs() { for (var i = 1; i < localStorage.length; i++) { console.log(localStorage["saved-fav-title_" + i + ...

DataView boolean cell

How would I add a cell to a DataView that was toggleable between True and False like the dataview in the Microsoft Visual C# properties window? I can only find a way to add a text box type cell to it, but I need to add a toggleable one, and also a dropdown list type. Thanks for any help. ...

Applying a function with multiple inputs using Map? (Haskell)

G'day guys, Trying currently to finish up a bit of homework I'm working on, and having an issue where I'm trying to apply map across a function that accepts multiple inputs. so in the case I'm using processList f (x:xs) = map accelerateList f xs x xs processList is given a floating value (f) and a List that it sorts into another List ...