Hello.
I need to sort a list that contains paths (relative or absolute) so that the deepest path appears first, for example:
\New Folder\Item1\tools\1
\New Folder\Item1\tools
\New Folder\Item1
\New Folder
etc...
Is there an API in Path class I can use to do it?
Thanks!
J.
...
Could anyone explain me why the generics list's Contains() function is so slow?
I have a List with about a million numbers, and the code that is constantly checking if there's a specific number within these numbers.
I tried doing the same thing using Dictionary and the ContainsKey() function, and it was about 10-20 times faster than with...
I'm creating this cool answer engine that answers "who" questions. I will share the URL soon.
However, I need a list of English words for that, so find "proper nouns". Can I get an English dictionary dump or just a list of all English words, preferably British and American.
Any help will be amazingly helpful!
...
Here's my situation:
I'm working in SharePoint 2007 Enterprise, I have a feature that creates a list for me when I deploy and activate it. My usual workflow thus far has been to deploy the solution, activate it, then open up SharePoint Designer to customize the list.
My customizations are typically pretty complex, but I'll keep things ...
I have a comparison I'd like to make more efficient in SQL.
The input field (fldInputField) is a comma separated list of "1,3,4,5"
The database has a field (fldRoleList) which contains "1,2,3,4,5,6,7,8"
So, for the first occurrence of fldInputField within fldRoleList, tell us which value it was.
Is there a way to achieve the followin...
Say I have a java.util.List list and I want to create a new List by adding an element e to the beginning of list (i.e., I want to cons e and list). For example, if list is
[1,2,3,4]
and e is 5, then cons(e,list) will be
[5,1,2,3,4]
It's OK for the elements of list and cons(e,list) to be shared, but list should not be modified.
Wha...
I am trying to see if i can make thsi code more interesting/exciting using list comprehensions. Lets say i have the following lists defined:
a_list = [ 'HELLO',
'FOO',
'FO1BAR',
'ROOBAR',
'SHOEBAR']
regex_list = [lambda x: re.search(r'FOO', x, re.IGNORECASE),
lambda x: re.search(r'RO',...
I have a function that receives three different "people" objects and generates a new "compatibility" object based on the combined values in the "people" objects.
However, about 1/3 of the time the three "people" objects that it receives as input are the same as one before, though possibly in a different order. In these cases I do NOT wa...
In a list appending is possible. But how I achieve appending in dictionary?
Symbols from __ctype_tab.o:
Name Value Class Type Size Line Section
__ctype |00000000| D | OBJECT|00000004| |.data
__ctype_tab |00000000| r | OBJECT|00000101| |.ro...
I'm using the jQuery library to have an ordered list with the ability to re-order items with drag and drop. I want to send the information of the order to the database and the next time you refresh the page (or load it on another browser/computer) it would have your order.
I have a table for each element of the list in mySQL and right n...
This came up in a real-world situation, and I thought I would share it, as it could lead to some interesting solutions. Essentially, the algorithm needs to diff two lists, but let me give you a more rigorous definition of the problem.
Mathematical Formulation
Suppose you have two lists, L and R each of which contain elements from some...
I have a routine that takes a list of strings as a parameter, but I'd like to support passing in a single string and converting it to a list of one string. For example:
def func( files ):
for f in files:
doSomethingWithFile( f )
func( ['file1','file2','file3'] )
func( 'file1' ) # should be treated like ['file1']
How can ...
Suppose I have a list, in which no new nodes are added or deleted. However, the nodes may be shuffled around.
Is it safe to save an iterator, pointing to a node in the list, and access it at some arbitrarily later time?
Edit (followup question):
The documentation for list::splice() says that it removes elements from the argument list....
Something seems to be breaking the display of lists (ul and ol) in IE7. They work fine in IE8, FF, Safari etc but not IE7 and IE6.
I just want them to be displayed normally: ul lists should show bullet points and ol lists should show numbers.
I've narrowed it down to the first 1000 lines of code in styles_layout.css... ;)
Actually, I ...
Hi,
We need to fetch the items added/updated after the user's last visit.
We need this information from 3 separate lists under the same web.
Pointers on how to accomplish this would be very helpful (and does SharePoint provide any API for this).
Kind regards,
...
I have a SQLite database that contains a huge set of log messages.
I want to display this in a list view (using wxWidgets).
The user can reorder the list (by pressing the column header), apply a filter on the result set and navigate through it as a usual list, using the scroll bar. The user can also select one or multiple entries in th...
You can get a list of databases using
PRAGMA database_list
or a list of tables in the "main" database using
select name from sqlite_master where type='table'
but as I just wrote, it only returns the tables from the "main" DB only, and I don't see a way to know which tables are in the other DBs.
So how does one list the tables in t...
Has anyone been successful doing this w/o php, asp, etc...? I can get this far: http://www.pastey.net/113859/20 but can't figure out a simple way to make it an HTML list... any help would be GREATLY appreciated.
...
Hello all
The following procedure (explanation follows) works fine for really small lists, but when the list contains a larger number of items (1/2 million) the application enters "not responding" state,and it takes about 2.5 minutes to finish (very bad time).
I might add the application needs to process lists of 100 million items
at le...
I have a 2 lists of strings
eg:
listx = ["name","age","rank"]
input = ["name","age"]
How can I compare the two lists to check whether the listx contains "name" & "age" given in input?
...