lista

Print chained list in C

I am creating a program that receives a vector and creates a chained list. I need help to create the "print ()" function, whi ... aLista and deVetorParaLista return "list". How could I merge these two functions into one or use programming best practices?

How to extract every nth element from a list?

Considering a list composed of several vectors: lista<-list(c("1949", "1963", "45", "X2752009", "X2752013", "X2753007", ... The other analyzes are follow the same level and will be possible only with the manipulation of the solution of this case.

How to print an element from a list each time a certain method is called?

I'm trying to make a set of mathematical expressions in python, but I need my MandaExp method to return an expression each ti ... as the elements of explain, each time the method was called it would exit an element from the list, example: 36 + 0, 30/0,...

Error populating combobox-An unhandled exception of type 'System.InvalidOperationException ' occurred in mscorlib.dll

This is a cod. to fill a combobox with a list that will be populated through the insert event that will rescue a value from a ... em)) combo.Items.Remove(item); }); }); } Note: the error only appears when triggering the event.

Find item in a List with Contains method

I have an object of the given type, which has the attributes name (string) and transacblocking(int). I have a Data List calle ... ansacaoBloqueio(1); if (!dadosBloqueioCompartilhado.Contains(dadoAtual)) { dadosBloqueioCompartilhado.Add(dadoAtual); }

list problems in python

I am trying to solve this problem in python: Make a program that loads a list with the models of five cars (example of mode ... } - {} litros - R$ {}\n'.format(p+1, listaCarro[p], listaConsumo[p], round(listaDistancia[p],1), round(listaCusto[p],2)))

Saving multiple instances of a class to a list in Java

I'm having a college job that I need to create multiple instances of an object Pessoa and save those instances in a listing t ... n the code without using TXT files, databases or the like. Is there any method of doing this in Java, something like a cache?

Python, increasing order of numbers

My goal in the code is to print an increasing order of integers. For example: The user enters 2 numbers and I want the ascend ... é [2,9] nessa ordem(o menor primeiro e depois o maior) What would be the best way to do this? Note: I'm a python beginner

list assignment index out of range

A part of my Python program is: dt=1 maxt=3600*2 t=range(0,maxt,dt) r=len(t) Tsup_i=20 for i in range(1,r): Tsup[0]=Ts ... ment of the list is equal to Tsup_i, that gives to determine P[i] and further in the code can determine Tsup[i+1] using P[i].

Sequential list implementation exercise

I am trying to solve this exercise of the faculty in which I have already implemented a good part, but still missing 3 things ... passing instead of the index, the element itself. In case, that removes the first occurrence found. Anyone give me a help?

How to turn a list into a vector in R?

How to transform a list into a vector in R? The list is a set of words and numbers and I need to add the numbers present in the list. mylist <- list ("2 tomates", "5 tomates", "9 tomates") If I want the total of tomatoes, how to do?

how to search for an element in a list that is inside another list?

I have the following list consisting of lists. [['julian', '0', '5'], ['ana', '10', '4']] And I need to use a funct ... in which of the lists within the main list to search, How could I make it search within all the lists and show the position?

Matrix 4x4 ta getting 20 elements

Guys I did a Python code whose exercise asked to make a 4x4 array, show the amount of elements greater than 10 and show the f ... [j] > 10 : contadorp = contadorp + 1 print('A quantidade de numeros maiores que 10 é ' , contadorp) print(m,m1)

Change color marker li

Hello! I would like to know how I do to change the color of the marker ball <li> via CSS. From what I've read on the internet, so far I've only been able to do this using an image to replace the ball.

How to compare two lists in Python?

I have two lists whose contents of one refer to a file1.txt and the other one file2.txt, there are differences in the conte ... oblem is that I'd have to go through that whole list. is there an easier and simplified way to do this list match in Python?

Save data inside a looped vector in Python

Good afternoon guys. I've been learning a lot of C and C++, and the python part too. It confuses me a lot the syntaxes someti ... ite o nome do aluno: ") i+=1 while i<len(estudantes): print("Aluno {}: {}".format(i, estudantes[i])) i+=1

Is there a performative difference between Tuple and List?

In Python, I know there is the difference between a Tuple and a List. Tuple is immutable, and List is changeable. Even you a ... than the other. The Tuple, because it is immutable, can generate more performance/performance than if it were to use a List?

Generate random numbers in Python without repeating

I have the following situation: I have a vector with 4 indexes. Each index generates a random value from 0 to 100. I have ... randint(0, 100)] print AP_X I wish that never repeated numbers are generated. For example: [4,4,6,7] How can I do this?

Create vector automatically in Python

I'm new to Python and need the help with the following: I have a variable (x) that gets an integer value. I want this va ... is vector must have random and integer values from 0 to 100. Example: For x = 4 My output should be: [50,40,60,70]

What is the difference between sorted() and. sort()?

Why is the function sorted() considered more direct than the method .sort() used in lists with tuples?