Hi,
I have a list (List1) which I can drag boxes from, and two lists where I can drag List1 boxes to (List2 & List3).
I have 'sortable' code for List2 & List3 which reformats what I've dragged from List1 (eg. it changes the colour of the box etc using the 'receive:' function. Say List2 boxes turn blue & List3 boxes turn red). The code ...
I have a file in which every line is an integer which represents an id. What I want to do is just check whether some specific ids are in this list.
But the code didn't work. It never tells me it exists even if 123 is a line in that file. I don't know why? Help appreciated.
open (FILE, "list.txt") or die ("unable to open !");
my @da...
I am parsing an arbitrary length byte array that is going to be passed around to a few different layers of parsing. Each parser creates a Header and a Packet payload just like any ordinary encapsulation. And my problem lies in how the encapsulation holds its packet byte array payload. Say i have a 100 byte array, and it has 3 levels of e...
In my Listview i am binding data using Eval and Bind. So Does use of Eval & Bind in ListView effects the performance?
If yes then why?
...
I want to do this without javascript.
I can't figure out how to make all li with class "item" align to the bottom of the div#recent. Basically, every li is 192px wide. The problem is that each product image is a different height, so if one is only 40px tall, the text is at a different position than the one next to it.
<div id="recent">...
Say I have two lists:
List<String>products = new ArrayList<String>();
products.add("computer");
products.add("phone");
products.add("mouse");
products.add("keyboard");
List<String>cart = new ArrayList<String>();
cart.add("phone");
cart.add("monitor");
I need to find how many items in the cart list exist in the products list. ...
I have a C# List, that is filled from a database.. So far its only 1400 records, but I expect it to grow a LOT.. Routinely I do a check for new data on the entire list.. What I'm trying to figure out is this, is it faster to simply clear the List and reload all the data from the table, or would checking each record be faster..
Intuit...
I have class like
public class ProgressBars
{
public ProgressBars()
{ }
private Int32 _ID;
private string _Name;
public virtual Int32 ID {get { return _ID; } set { _ID = value; } }
public virtual string Name { get { return _Name; } set { _Name = value; }}
}
here is List collection
List<ProgressBars> progress;
...
Hi,
I have a list of numbers for input, e.g.
671.00
1,636.00
436.00
9,224.00
and I want to generate all possible sums with a way to id it for output, e.g.:
671.00 + 1,636.00 = 2,307.00
671.00 + 436.00 = 1,107.00
671.00 + 9,224.00 = 9,224.00
671.00 + 1,636.00 + 436.00 = 2,743.00
...
and I would like to do it in Python
My current...
I was looking for a decent implementation of a generic lazy non-modifiable list implementation to wrap my search result entries. The unmodifiable part of the task is easy as it can be achieved by Collections.unmodifiableList() so I only need to sort out the the lazy part.
Surprisingly, google-collections doesn't have anything to offer; ...
In Mathematica I have a list of point coordinates
size = 50;
points = Table[{RandomInteger[{0, size}], RandomInteger[{0, size}]}, {i, 1, n}];
and a list of cluster indices these points belong to
clusterIndices = {1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1};
what is the easiest way to split the points into two separa...
I have:
L1 = ['11', '10', '13', '12', '15', '14', '1', '3', '2', '5', '4', '7', '6', '9', '8']
this is a list of strings, right?
I need to make it a list of integers as follows:
L2 = [11, 10, 13, 12, 15, 14, 1, 3, 2, 5, 4, 7, 6, 9, 8]
finally I will sort it like below:
L3 = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] by L2.sort()
please let ...
I have two lists A and B, at the beginning of my program, they are both filled with information from a database (List A = List B). My program runs, List A is used and modified, List B is left alone. After a while I reload List B with new information from the database, and then do a check with that against List A.
foreach (CPlayer play...
I am trying to build a sortable navigation tree using jQuery UI Sortable. I have it working great in Firefox with no prblems. In IE it works pretty well, however, there seems to be some inconsistent issues when trying to move an item with a nested list down in its navigational tier. The list doesn't expand to create a drop point for t...
I'm trying to build a string using data elements stored in a std::list, where I want commas placed only between the elements (ie, if elements are {A,B,C,D} in list, result string should be "A,B,C,D".
This code does not work:
typedef std::list< shared_ptr<EventDataItem> > DataItemList;
// ...
std::string Compose(DataItemList& dilList)
{...
Hey guys, -- I just parsed a big file and I created a list containing 42.000 strings/words. I want to query [against this list] to check if a given word/string belongs to it. So my question is: What is the most efficient way for such a lookup? A first approach is to sort the list [list.sort()] and then just use the >> if word in list: ...
Consider the following list:
[LinkNode * head -- LinkNode * node1 -- LinkNode * node2]
I'm creating a stack of FIFO.
I Call pop() which I want to pop node1.
LinkNode::LinkNode(int numIn) {
this->numIn = numIn;
next = null;
}
.
.
.
int LinkNode::pop() {
Link * temp = head->next;
head = temp->next;
int popped =...
The code:
[1]
private delegate void ThreadStatusCallback(ReceiveMessageAction action,
Dictionary<int, List<string>> message);
[2]
Dictionary<int, List<string>> messagesForNotification =
new Dictionary<int, List<string>>();
[3]
Invoke(new ThreadStatusCallback(ReceivesMessagesStatus),
ReceiveMessageAction.Notif...
I want to pass a List into a method, but I only want it to contain 1 item.
Is it possible for me to do this similar to
MyType myType = new MyType();
MyMethod(new List<MyType>{ myType }); // somehow add myType to the list as I'm creating it
...
Hi!
I am thinking about different solutions for one problem. Assume we have K sorted linked lists and we are merging them into one. All these lists together have N elements.
The well known solution is to use priority queue and pop / push first elements from every lists and I can understand why it takes O(N log K) time.
But let's take ...