I'm trying to use the XmlSerializer to persist a List(T) where T is an interface. The serializer deos not like interfaces. I'm curious if there is a simple way to serialize a list of hetrogenous objects easily with XmlSerializer. Here's what I'm going for:
public interface IAnimal
{
int Age();
}
public class ...
$string = '<ul>
<li id="34334" class="some_class"><a href="/stack/">Text</a></li>
<li id="someid" class="more_class"><a href="/overflow/">Text</a></li>
</ul>';
What I need (actually don't know how to do, please help):
We must check <a> inside each <li>
If href of <a> == /stack/, then add extra class current for parent <li>
...
Ok, so I'm writing some python code (I don't write python much, I'm more used to java and C).
Anyway, so I have collection of integer literals I need to store.
(Ideally >10,000 of them, currently I've only got 1000 of them)
I would have liked to be accessing the literals by file IO, or by accessing there source API, but that is disallow...
I have a config file that contains a list of strings. I need to read these strings in order and store them in memory and I'm going to be iterating over them many times when certain events take place. Since once they're read from the file I don't need to add or modify the list, a tuple seems like the most appropriate data structure.
Howe...
I am getting following output in Dataset
ActivityID ParentActivityID ActivityName AcivityLevel
0 NULL Dashboard 0
1 NULL Market Trends 0
2 1 News 1
3 NULL Master 0
4 3 Products 1
5 3 Segments 1
6 3 ...
Hey Guys, I've seen a few hints on StackOverflow but cant really see a solution to my specific problem.
I have a pure css menu with dropdowns, in IE8 and FF it works great, but compatibility mode for IE7 and IE6 it doesnt work.
The thing is, it does drop down - but then when the mouse goes over the main website banner below, which has ...
Hi, I need to write a script which merges a list with a dictionary to create a third dictionary. I'm pretty new to programming and am struggling with the basics here.
So far I've created the following class which generates a list of dates. I have another class which generates a dictionary and I want to basically create a third dictiona...
I have this member function in my Folder class:
string _recFullPath() {
list<Folder*> folders;
list<Folder*>::iterator it = folders.begin();
folders.push_front(this);
it = folders.begin();
while((*it)->hasParent()) {
folders.push_front((*it)->parent());
it = folders.begin();
}
folders.push_back(this);
for(it = folders.begin(...
Hello, I have a questions, and I would love you to try to answer it.
Is it possible to get the list of files from a remote folder in java, knowing just the URL???
for example:
http://localhost/img get all the images names in this directory.
Thanks in advance
...
Is there a straight-forward combination of standard higher-order funtions to count the unique elements in a list?
For example the result for
[1, 1, 4, 0, 4, 4]
would be something like
[(1,2), (4,3), (0,1)]
...
Hello I have some touble overloading operators for std::list.
I store pairs in a list, consisting in an int value and a position array :
typedef std::pair< int, std::vector<int,3> > pointPairType;
typedef std::list< pointPairType > pointListQueueType;
pointListQueueType pointsQueue;
// adding some points to the list
And I wou...
I have two lists (L1,L2) of an object A, L1 is used to store the list of objects(many to many relationship) before they are changed. L2 is the relationship after it has been changed. I need to keep the common elements but add the new ones and remove the ones that aren't in L2. I was wondering if there was a one liner I could use with LIN...
I want to create a generic list of the Type object.
I have ...
Type type = typeof(Foo);
object model = GetModel();
Now I want to create a new List<Foo>((Foo)model)
Is this possible in C#?
...
Hi I've got a list and the selectedIndex doesn't seem to have any effect. Is the alternatingItemColors causing a problem?
I've got a panel with this list and a few radio buttons. I've set the defaults on the radio buttons, but I'm having problems setting 2010 as the default selection in the list.
<mx:List
id="myList"
w...
How would I make use of a List(of String) in a structure in vb.net. for example
Structure examplestrut
Public exampleslist As List(Of String)
End Structure
How would I call exampleslist.add("example 1")?
...
I have a 2 list of dictionaries. The first list contains sphere definitions in terms of x, y, z, radius. The second list contains various points in space as x, y, z. These lists are both very long, so iterating over each list and compare against all values is inefficient.
I've been trying the map and reduce terms, but both of them take...
Error Details:
The Web application at
http://dev001aaamaaind:333/ could
not be found. Verify that you have
typed the URL correctly. If the URL
should be serving existing content,
the system administrator may need to
add a new request URL mapping to the
intended application.
string urlSite = "http://dev001aaamaaind:333/";
usi...
How to find the recently added item in the share point page
If the any user added the items in the custom list, library, list,Announcement, Picture library,etc.........
i need to show all item that added last 2 days. Is that any object model available to find all item in the share point site???Instead of searching every list.
...
Hi, can anyone tell me how to create a list in one class and access it from another?
...
Hi Guys,
I have a Radmenu which has 6 buttons in it which need to have equal spacing between them in my horizontal menu. I have managed to get this right using a percentage value but what if someone decides to add another menu button?
Is there a way of aligning my UL menu in the middle of my wrapping DIV and then spacing the buttons eq...