I've got a list of number that I need to keep track of. The numbers are loosely related, but represent distinctly different items. I'd like to keep a list of the numbers but be able to refer to them by name so that I can call them and use them where needed easily. Kind of like an inventory listing, where the numbers all refer to a part I...
I have some code in which I apply a join to a list.
The list before the join looks like this:
["'DealerwebAgcy_NYK_GW_UAT'", "'DealerwebAgcy'", "'UAT'", '@ECNPhysicalMarketCo
nfigId', "'GATEWAY'", "'DEALERWEB_MD_AGCY'", "'NU1MKVETC'", "'mkvetcu'", "'C:\te
mp'", '0', "'NYK'", '0', '1', "'isqlw.exe'", 'GetDate()', '12345', "'NYK'",...
Dear StackOverFlowers (flowers in short),
I have a list of data.frames (walk.sample) that I would like to collapse into a single (giant) data.frame. While collapsing, I would like to mark (adding another column) which rows have came from which element of the list. This is what I've got so far.
This is the data.frame that needs to be co...
Hello,
I have written this piece of code
public class Test{
public static void main(String[] args) {
List<Integer> list = new ArrayList<Integer>();
for(int i = 1;i<= 4;i++){
new Thread(new TestTask(i, list)).start();
}
while(list.size() != 4){
// this while loop required so that all threads complete t...
I've clearly been stuck in Java land for too long... Is it possible to do the C++ equivalent of the following Java code:
interface Foo {}
class Bar implements Foo {}
static List<Foo> getFoo() {
return new LinkedList<Foo>();
}
static List<Bar> getBar() {
return new LinkedList<Bar>();
}
List<? extends Foo> stuff = getBar();
Wher...
In Sharepoint 2007, how do I hide the Quick Launch bar for all pages in a List?
...
I created a class with 3 fields:
class Gente
{
int _ID;
string _nome, _sexo;
public Gente()
{
_ID = 0;
_nome = "";
_sexo = "";
}
public int ID
{
set { _ID = value; }
get { return _ID; }
}
public str...
When I click the Settings|Document Library Settings menu the page that appears for my list has this at the top:
List Information
Name: Wisdom
Web Address: http://<our intranet>/wisdom/forms/allpages.aspx
Description:
How do I change the "Web Address" to http://<our intranet>/wisdom/home.aspx
...
Ok...here's a softball question...
I just need to be able to insert a key/value pair into an object at a specific position. I'm currently working with a Hashtable which, of course, doesn't allow for this functionality. What would be the best approach?
UPDATE: Also, I do need the ability to lookup by the key.
For example...oversimplifi...
I am having a problem changing a List that has a set-size in Java.
I understand that I can't add or remove from this list but why can't I use set?
When I use set the UnsupportedOperationException is thrown as well as when I use add and remove which is expected.
set
public Object set(int index,
Object element)
...
I recently created a menu for a web page where buttons are DIV elements. I've been Googling around and see that many people create UL lists and each button is a LI element. What benefit is using an UL and LIs instead of just DIVs? Is it somehow better for SEO? Does this have to do with "semantic" markup? Any compelling reason to rewrite ...
Python's list type has an index(x) method. It takes a single parameter x, and returns the (integer) index of the first item in the list that has the value x.
Basically, I need to invert the index(x) method. I need to get the index of the first value in a list that does NOT have the value x. I would probably be able to even just use a fu...
Hello,
Please help me with writing function which takes two arguments : list of ints and index (int) and returns list of integers with negative of value on specified index position in the table
MyReverse :: [Int]->Int->[Int]
for example
myReverse [1,2,3,4,5] 3 = [1,2,-3,4,5]
if index is bigger then length of the list or smaller then...
Lets say we have a generic list of Class1, typically having ~100 objects for a given session.
I would like to see if the list has a particular object. ASP.NET 2.0 allows me to do this:
Dim objResult as Class1 = objList.Find(objSearch)
How does this approach rate when compared to a traditional For loop, looking at a performance perspe...
I am having some issues involving Parallel for loops and adding to a List. The problem is, the same code may generate different output at different times. I have set up some test code below. In this code, I create a List of 10,000 int values. 1/10th of the values will be 0, 1/10th of the values will be 1, all the way up to 1/10th of the ...
I'm trying to solve problem 50 on Project Euler. Don't give me the answer or solve it for me, just try to answer this specific question.
The goal is to find the longest sum of consecutive primes that adds to a prime below one million. I wrote a sieve to find all the primes below n, and I have confirmed that it is correct. Next, I am goi...
I created my list:
private static List list = new LinkedList();
and my iterator:
ListIterator itr = list.listIterator();
and use this code to try to print out the list... Only problem is, it never comes out of the loop. When it reaches the tail, shouldn't it come out of the loop, because there is no next? Or is it going back to the...
I'm building a simple interpreter in python and I'm having trouble handling differing numbers of arguments to my functions. My current method is to get a list of the commands/arguments as follows.
args = str(raw_input('>> ')).split()
com = args.pop(0)
Then to execute com, I check to see if it is in my dictionary of command-> code mapp...
I am trying to have a list of functions, but seem to be coming up empty handed. The basic code is something like this:
let doSomething var =
var
let doSomething2 var =
var
let listOfStuff = [doSomething; doSomething2]
and I am getting the following exception:
Error 2 Value restriction. The value
'listOfStuff' has ...
Hello,
By a question that I made, I figured out that tho copy elements from one list to an array I just need to use the method toArray() for this.
But let's suppose I have a List with n objects. I want to copy then into a array sized n+1 and add into the first position another object and in the other n positions the n data of the list....