list

(C++) How to declare a stl list as extern?

I have: std::list<Particle> particles; std::list<Particle>::iterator particleit; in my main.cpp. I need to declare both of these as extern in one of my class files, but my compiler gives me some error about a missing '>' when I try the straightforward way. How would I go about fixing this? ...

How to get the sql queries when trigger was triggered, upto n levels?

Hi, I want to list down the queries executed before the 'AFTER UPDATE TRIGGER' triggered upto n levels. The listing will be done within the TRIGGER itself. The n can be 4 or less. Any pointer or if listing can be done by any other way will be helpful? I have to debug the frontend and backend if bug is there. --Edit-- Accually a cell ...

Showing list item tooltips in flex

I have a list of objects containing an icon, a label, and a tooltip. I want to show only the icon and the label. The tooltips should be visible on mouse over an item. Is there a way i can achieve this without writing my own mouse-over/out functions? (Please notice that dataTips are a different thing as they are displayed only when the ...

Retrieve Control/select value with XPath in SharePoint

A form is populated from a list and I need it filtered. I have a table with a date column and would like to display only the rows of the required month. For this I have used XPath filtering: [((ddwrt:FormatDateTime(string(@MyDateColumn) ,1061 ,'MM'))=02)] This gives me the results for February, all ok. Now what I am trying to achieve ...

Generate a list of videos on Blackberry device

I am trying to find a way to generate a list of videos that are found on the Blackberry SD card. I recently did an Android app that did this using the MediaStore API; however, that obviously isn't available on the Blackberry. In that application, it searched through the phone for supported video files and added the name of the files in a...

Python, format this list

I've got a list like [(1, 2), (1, 8), (2, 3), (2, 7), (2, 8), (2, 9), (3, 1), (3, 2), (3, 5), (3, 6), (3, 7), (3, 7), (3, 9)] I want to make it looks like [('1',' ', '2', '8'), ('2', ' ', '3', '7', '8', '9'), ('3', " ", '2', '5', '6', '7', '7', '9')] How can I code this loop? Really tried times, and nothing came up. Please help~~ ...

C# List<string> "contains" question

Is there an easy way, either through LINQ or Generics, to find out if elements in one List are all available in another List. I'm currently using Intersect to check this. For e.g. List<string> list1; //{ 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 } List<string> list2; //{ 1, 3, 9 } list1.Contains(list2) == true Thanks in advance ...

List iterator error

Hello, I make stack based in std:list. Now i try to make functions for showing all elements from this stack: I try to declare iterator: void show_elements() { list<T>::iterator it; } But i get error: error: dependent-name ‘std::list::iterator’ is parsed as a non-type, but instantiation yields a type What's wrong? Thank you. ...

Scala: Remove duplicates in list of objects

Hi Folks, I've got a list of objects List[Object] which are all instantiated from the same class. This class has a field which must be unique Object.property. What is the cleanest way to iterate the list of objects and remove all objects(but the first) with the same property? Cheers Parsa ...

Centering a ul with floated li

I have <div id="container"> <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ul> </div> With the following CSS: #container li { float:left; height:33px; line-height:30px; text-align:center; width:auto; } #container{ width:600px; } However I am having difficulty in horizontally centering the ul inside #container. It appears ...

Linq selecting items that exist in both list

Hi, I have 2 list: myObject object1 = new myObject(id = 1, title = "object1"}; myObject object2 = new myObject(id = 2, title = "object2"}; myObject object3 = new myObject(id = 3, title = "object3"}; //List 1 List<myObject> myObjectList = new List<myObject>{object1, object2, object3}; //List 2 List<int> idList = new List<int>{2, 3}; ...

[Android] How to make list multi items(image and text) in alertdialog

hii .. I want to make this kind alertdialog.. http://mobile.tutsplus.com/tutorials/android/android-sdk-sending-pictures-the-easy-way/ can you help find a solution??? thanks before.. :D ...

Why is my code using monadic lists from the List package so slow?

Last week user Masse asked a question about recursively listing files in a directory in Haskell. My first thought was to try using monadic lists from the List package to avoid building the entire list in memory before the printing can start. I implemented this as follows: module Main where import Prelude hiding (filter) import Control...

How is Python's List Implemented?

Is it a linked list, an array? I searched around and only found people guessing. My C knowledge isn't good enough to look at the source code. ...

Android Development: ListPreference Trouble

I don't understand what's going on here. I have a ListPreference with the entries and entryValues correctly set. When I go in the prefernces activity and change the value it successfully works (I added a Toast to output the value after changing the option to test). But when I do the following to compare it, it always executes the else ...

Navigating an Array (Android String Array)

Hi. I'm new to android developing but right now I'm working on an application that displays Random Facts. Since I don't want it to be in a random order, I would like to have them in a list. I would like to order through them one by one and show them using TextView. Resources res = getResources(); myString = res.getStringArray(R.array.Fa...

Filtering a list in Haskell

I am trying to start learning haskell, and a question came up. Say, I have a function countFilter :: (a -> Bool) -> [a] -> ([a], Int) countFilter a z = case z of [] -> ([], 0); (x:xs) -> (filter a z , length (filter a z)) It returns a list, all the items of which apply to a certain predicate and a...

How get List from Set and Comparator

What is the "good" (and why ?) solution to get a List from a Set and sorted against a given Comparator ? ...

Compliment List of a sub List

listSuper listSub_A listSub_B Is there any extension methods that replace the following piece of code? foreach(int a in listSuper) { if (!listSub_A.Contains(a)) { listSub_B.Add(a); } } In short I want to fill listSub_B with elements in listSuper which are not in listSub_A. ...

How best to structure a definition list with accessibility in mind

I have a dl that I've coded like so: <dl> <dt>term 1</dt> <dd>definition 1</dd> <dt>term 2</dt> <dd>definition 2</dd> <dt>term 3</dt> <dd>definition 3</dd> </dl> I'm finding it hard to apply the right css for the layout that i want ie. each term and definition in a column. structuring the html in the following way wo...