Say there is a list of integers [1,2,3,4,5] and a map function that multiplies each element with 10 and returns modified list as [10,20,30,40,50] , with out modifying the original list.
How this can be done efficiently in c++.
...
I have two nested lists, each nested list containing two strings e.g.:
list 1 [('EFG', '[3,4,5]'), ('DEF', '[2,3,4]')] and list 2 [('DEF', '[2,3,4]'), ('FGH', '[4,5,6]')]
I would like to compare the two lists and recover those nested lists which are identical with each other. In this case only ('DEF','[2,3,4]') would be returned. Th...
I am trying to find out how to get the length of every list that is held within a particular list. For example:
a = []
a.append([])
a[0].append([1,2,3,4,5])
a[0].append([1,2,3,4])
a[0].append([1,2,3])
I'd like to run a command like:
len(a[0][:])
which would output the answer I want which is a list of the lengths [5,4,3]. That com...
Hi peeps
I've managed to write a 'for dummies' how to calculate the area of irregular polygon in C#, but I need it to be dynamic for any amount of verticies.
Can someone please help?
Class:
public class Vertex
{
private int _vertexIdx;
private double _coordX;
private double _coordY;
private double _coordZ;
public...
Hello Guys,
sorry for this dumb question, but i am really stuck...
the thing is i am trying to create a todo list application on android.
I am stuck because at the moment I dont know the way to create many todo lists.
I have created the GUI for one list, using listview. entries of the list are added by the user when running the appli...
I have this class:
public class User {
public User(String nickname, String ipAddress) {
nickname = nickname.toLowerCase();
System.out.println(nickname + " " + ipAddress);
}
}
And another class that creates an array containing User objects.
class UserMananger {
static User user;
static User user2;
...
Hi,
I'm working with a custom List component in flex4. I've created a custom ItemRenderer and everything looks and works as i want, but i'm trying to get the double click event. I'm receiving key down and all other events, but not this one. I've enabled the double click on the List component
doubleClickEnabled="true"
and i've added ...
Hi,
I have been having problems simply adding more than 2 views to the stack through the Dashcode GUI interface. I have seen how to do that programmatically, but is there a way to statically keep extra views within the stack?
I am actually okay with using a different stack, but the problem there is that I have to add another browser ar...
This is a follow-up on a previous question of mine regarding searching in lists of lists
I have a list with pairs of values as lists in it.
[['a',5], ['b',3], ['c',2] ]
I know the first element of each pair but I don't know the second (it's the result of a calculation and stored in the list with the first element. I sorted the li...
which one is more memory efficient?
which one works faster with 1000000 items?
is there anything better?
...
I've create a custom list and included the basic pieces (schema.xml, list template,..) to package it as a .wsp. I have a list instance defined, but I would like to add some folders to the xml. I know you can add SPListItems using ..., but I'm not sure how to add an SPFolder. Ultimately I want to add some SPFolders to the list instance b...
I have a vertical menu using lists (li) and I've got it changing background color on hover.
#limenu:hover {background-color:#000}
However, I don't want the background to fill 100% width. Is there a way of setting the background width or creating a padding on both sides?
...
I have quite large List named items (>= 1,000,000 items) and some condition denoted by <cond> that selects items to be deleted and <cond> is true for many (maybe half) of items on my list.
My goal is to efficiently remove items selected by <cond> and retain all other items, source list may be modified, new list may be created - best way...
List-1 List-2
one one
two three
three three
four four
five six
six seven
eight eighttt
nine nine
Looking to output
one | one PASS
two | * FAIL MISSING
three | three PASS
* | three FAIL EXTRA
four | four PASS
five |...
I've create a custom list with schema.xml, custom DefaultTemplates.ascx [copy of the DefaultTemplates.ascx render template "ListForm"], and custom variations of the NewForm.aspx, EditForm.aspx, and DispForm.aspx. I've hooked up the forms in the schema.xml and clicking "New" on the default AllItems view does go to NewPage.aspx as I would ...
I have a "manager" class maintaining a list of objects. Each Object has a certain "position", but this is not known to them, only the manager knows about this. The manager must assign each Object a position and maintain its list of Objects sorted according to this "external attribute".
Note that an Object's position can change at any ti...
Assume you deploy a Sharepoint solution, which consists of multiple WebParts and multiple Lists. Now in a later version of this solution, you want to extend/modify these lists, like add or remove columns.
How do you deploy such changes to a production environment? Meaning, how do you apply these changes to a production environment where...
I want to select the first option in a select list which matches a certain value, currently the last match is selected, like so:
jQuery('.edit-item').click(function(){
var id = jQuery(this).attr('id');
var assignee = jQuery('#assignee-'+id).text();
jQuery('#edit-form-'+id+' select[name=item[responsible]]').val(assignee);
re...
Hi,
I have this code and i need to be able to search through different lists of HierarchyItems and return a list of the correct type
i.e. Hierarchy h = new Hierarchy();
//add a load of items of HierarchyItemA type;
List<HierarchyItemA> results = h.Search("text");
CODE:
public class Hierarchy
{
private List<HierarchyItem> items;...
Hey I'm just revising for my functional programming exam coming up on friday and I'm just working through exercises given by our lecturer. I've come across one which I neep a bit of help on:
6. a) Write a function that zips a given list xs with every list in a list yss of lists. Use partial
applications and lambda expressions to the gre...