list

Iterative find/replace from a list of tuples in Python

I have a list of tuples, each containing a find/replace value that I would like to apply to a string. What would be the most efficient way to do so? I will be applying this iteratively, so performance is my biggest concern. More concretely, what would the innards of processThis() look like? x = 'find1, find2, find3' y = [('find1', 'rep...

Any advantages of binding a list of objects to a grid instead of to a datatable? (.NET)

I have a business object let's say a Customer. I have a DAL method which brings back a datatable of customers. I have a UI which has a grid which will display a list of customers. My question is.. is it OK to bind the grid to the datatable, which means the UI will have a reference to System.Data or should the datatable be converted firs...

style a cascade list into table

Hello all css coder Just asking if there is a way to style a cascade list like this <ol> <li> <ol> <li>col 1 row 1</li> <li>column 2 row 1</li> </ol> </li> <li> <ol> <li>column 1 row 2</li> <li>col 2 row 2</li> </ol> </li> </ol> into a tab...

Python dictionary/list help

This is a python application that's supposed to get all the followers from one table and get their latest updates from another table. - All happening in the dashboard. dashboard.html: http://bizteen.pastebin.com/m65c4ae2d the dashboard function in views.py: http://bizteen.pastebin.com/m39798bd5 result: http://bizteen.pastebin.com/m...

Multiple attachments columns in SharePoint lists

What I need is to clearly differentiate between the attachments (this is an approval, this is an offer, this is a PO, etc). Is this possible, or it is working only in bulk (attach all files together)? Thanks, ...

CSS UL removing indent in IE

I am having problems with IE, In FF and Chrome the navigation at the top displays fine. However in IE8 (with or without compatibility) the UL seems to indent from the left hand side, not each li just the whole li; despite declaring text-align:center; width:600px; margin:auto; padding-left:0;. Any ideas what could be causing this? Thanks...

Mathematica: Determine if all integers in a list are less than a number?

Is there a way in Mathematica to determine if all the integers in a list are less than a set number. For example if I want to know if all the numbers in a list are less than 10: theList = {1, 2, 3, 10}; magicFunction[theList, 10]; --> returns False Thanks for your help. ...

working with string arrays in c++

I wanna create a list of 50 elements which consist of four chars each. Every four char string should go into a loop one by one and get checked for one of three letters (o, a, e) anywhere in the current string. dependent on whether or not these letters are identified different commands are executed I tried all day im frustrated please he...

Best way to convert a flat list to a set of two-tuples in Erlang?

Is there a fast way to convert a flat list into a list of two-tuples such that a flat list like [1,2,3,4,5,6] becomes [{1,2},{3,4},{5,6}]? This works, but it feels just plain WRONG: tuples_from_flat_list(Target) -> TargetWithIndex = lists:zip(lists:seq(1, length(Target)), Target), {K, V} = lists:partition(fun({I, _}) -> I rem 2...

Is it possible to 'freeze panes' in SharePoint lists?

I need to keep my columns header, so people can see what data is displayed there, but I can not find if it is possible, or how to do it. Also will be nice to add a navigation bar to the list. Any suggestions? Thanks, ...

All picks of a list in F# - more elegant and simple

Could someone propose better and/or more elegant implementation of this: let each xs = let rec each' acc left right = match right with | [] -> acc | right -> let new_left = left @ [List.hd right] let next = List.tl right let result = (List.hd right), left @ next ...

Parse XML With jQuery

I have a XML that needs to be parsed using jQuery. I understand how to get the first level of site map nodes but some of my node are 3 or 4 levels deep. I cant seem to get past 2 level. Here is my XML and my code. I am tiring to output it to a list to be able to do a jQuery drop down on hover for one of the sites im working on. Please an...

Split a list into parts based on a set of indexes in Python

What is the best way to split a list into parts based on an arbitrary number of indexes? E.g. given the code below indexes = [5, 12, 17] list = range(20) return something like this part1 = list[:5] part2 = list[5:12] part3 = list[12:17] part4 = list[17:] If there are no indexes it should return the entire list. ...

Sharepoint Javascript Lists

Hi, Is it possible to iterate through a survey response list using javascript on a webform in Sharepoint? Is it also possible to iterate through a user group list as well - again using javascript? Additionally, is it possible to create a table or list or something to: a) Display a group of users b) Display their responses to a survey ...

Adding items to list results in duplicates. What is a better way?

I have this code to return a list of fund sources for our organization. Dim FundSourceList As New List(Of FundSource) Dim fs As New FundSource If results.Count > 0 Then For Each result In results fs.FundID = result.Item("strFundID") fs.FundDescription = result.Item("txtFundIDDescr") ...

Convert rows from a data reader into typed results

I'm using a third party library which returns a data reader. I would like a simple way and as generic as possible to convert it into a List of objects. For example, say I have a class 'Employee' with 2 properties EmployeeId and Name, I would like the data reader (which contains a list of employees) to be converted into List< Employee>. I...

How to create a scroll bar (up-down) in a SharePoint list?

I need to create a scroll bar in a SharePoint list so I can keep the toolbar visible when scrolling down the page. Is this possible? ...

CSS horizontal menu - equally spaced?

Hi all, I guess this is a common question but haven't found any good answer about it, and questions around here are not exactly my case. Also, this is my first question so please don't be too harsh on me. lol I have a standard CSS menu, made with UL and LI tags. I need them to get to cover the whole page, horizontally (not my real case...

Setting SharePoint List Metadata

Metadata seems to be used frequently to describe a SharePoint list's structure. That structure allows the storage of data at the list item level. How can I specify information about the list itself without relying on an additional column? Ideally I want something like SPList.Properties ["Mykey"] = "MyValue" PropertiesXml isn't setta...

Scala best way of turning a Collection into a Map-by-key? (2nd variant)

(This is a variant to this Q&A) Say I have this: List( "foo", "bar", "spam" ) I want to create a Map for which the key is the length of the String and the value is a Collection of all the Strings that have that length. In other words, given the about List, we'd get: Map( 3 -> List(foo, bar), 4 -> List(spam) ) The code I've written...