Questions tagged [items]
637 questions
-1
votes
1 answer
For each loop with items from an array
Can anyone help me convert my current loop to a loop that does not contain an index or length. I need it to print the ages and names within the array. The loop I have worked as is but the instructions say to avoid using an index and length.
var…

coding cat
- 17
- 5
-1
votes
1 answer
How to get duplicated item substrings from a list? c#
lets say I have a list with items :
TEST1 -- 99,56$ -- 25 PCS -- 10:56
TEST2 -- 56,57$ -- 57 PCS -- 11:01
TEST3 -- 56,57$ -- 43 PCS -- 11:06
TEST4 -- 56,57$ -- 59 PCS -- 11:33
TEST3 -- 56,57$ -- 43 PCS -- 11:06
TEST3 -- 56,57$ -- 43 PCS --…

Hassan Brate
- 13
- 5
-1
votes
1 answer
How to set Default Value for a Map attribute of an item in Items.xml Hybris?
I need to initialize a maptyped attribute of a item with defaultvalues of map.
lets say that we have defined a maptype
and…

Amirtha Rajan
- 605
- 10
- 19
-1
votes
1 answer
VIsual Studio 2017 shared items project not working
I have spent several hours trying to get this working with no luck. Adding a reference to a shared items project in VS2017 does not compile properly. It seems like the source files do not compile so I end up with a bunch of unresolved externals.

Alex Wennström
- 59
- 4
-1
votes
1 answer
Trying to select and output data from a list of Items but receiving this instead of the name I want
System.Linq.Enumerable+WhereSelectListIterator`2[ShopApp_Sem2_Project.Item,System.String]
public class Item
{
#region Properties
public int ItemID { get; set; }
public string ProductName { get; set; }
public string Manufacturer {…

Luke Browne
- 131
- 1
- 7
-1
votes
1 answer
Not an array and not a string, what type of data is?
I found a script in js but I don't understand what type of data is the variable "n".
The script is:
var buttons= document.getElementByTagName("button");
var n= buttons.length, counters=[];
//initialize the vector of counters
counters.length=…

Ale17
- 1
- 1
- 1
-1
votes
2 answers
Best way to find previous and next elements in a list
What is the efficient way to find the previous and next elements based on a given element index?
list = [(100, 112), (100, 100), (200, 100), (200, 125), (240, 130), (240, 100), (272, 100)]
idx = 2 # for example
print('Next elements are', list[idx +…

smc
- 205
- 2
- 10
-1
votes
1 answer
Top volume T-SQL
Up above, I want to transform the first dataset into the latter. The goal is to order the Numbers by highest volume and then select the TOP 2 Letters among those numbers in descending order by Volume. Any solution in T-SQL? Thanks!

puj831
- 109
- 7
-1
votes
2 answers
How can I print specific items from a list without using a loop
I want to be able to somehow print several specific items without using a loop
my_list = [0,1,2,3,4,5,6,7,8]
print(my_list[0,5,7])
I got this error:
TypeError: list indices must be integers or slices, not tuple

John-Peter Krause
- 16
- 5
-1
votes
2 answers
Array of List, get the same character of each list, how?
I am new to C Sharp. I have following code
List[] a = new List[3];
for(int i = 0; i < a.Length; i++)
{
a[i] = new List();
}
a[0].Add("a");
a[0].Add("c");
a[1].Add("a");
a[1].Add("d");
a[2].Add("a");
a[2].Add("f");
I…

G.Don
- 17
- 6
-1
votes
3 answers
certain number of choices in TKinter
I made a checkbar in Tkinter with many items but I want the user can only choose the equal or less than a certain number of items. This is my current code:
from tkinter import *
class Checkbar(Frame):
def __init__(self, parent=None, picks=[],…

mohsen amini
- 13
- 3
-1
votes
3 answers
Python re-order proportion inversely in a dictionary
A = {0:{'a':1,'b':7, 'weight':0.6},
1:{'a':5,'b':5, 'weight':0.3},
2:{'a':4,'b':6, 'weight':0.1}}
I want to assign inverse_weight to each sub dictionary based on the inverse order of value b;
The order these b value is
A[1]['b'] <…

Kevin
- 587
- 1
- 7
- 17
-1
votes
1 answer
Component: Update `Items` from `TComboBox`
I have an own component derived from TWinControl which contain inside more standard components (e.g. TEdit, TCombobox). This sub-components are not published, therefore their properties are not visible.
But some of them I would like to make them…

REALSOFO
- 852
- 9
- 37
-1
votes
1 answer
In python while using list.remove(value_of_the_list) a ValueError is thrown
While clearing some values from the global variable of type list via list.remove(value) function, I get an error "ValueError: list.remove(x): x not in list"
My class definition looks like this:
class Deck(object):
global_l_init =…

Roft
- 3
- 5