Data dodania Pytanie
2017-11-18 13:11 ArrayList object is returing one row on ListView in java android »
I am trying to add Objects from MySQL database on ArrayList Object but result gives me only one row i am using custom adapter on my ListView, i think...
(3) odpowiedzi
2017-11-18 10:11 Sorting array of dictionary in alphabetic order »
I have an array of 3 objects. The objects are of type of dictionaries. Each dictionary has different keys. I want sort this array in alphabetic order....
(1) odpowiedzi
2017-11-11 20:11 How do you order the elements in an ArrayList in Java? »
Suppose that you have a class Person with several attributes, and an ArrayList ordered in ascending order of an attribute of Person (age for example)....
(1) odpowiedzi
2017-11-04 14:11 First list is sorted and the other is unsorted now which is the better approach to merge both list »
I have one Sorted ArrayList A and one unsorted ArrayList B, now I want to merge items of B in A such that A remains sorted. Now I can think of only t...
(2) odpowiedzi
2017-10-22 08:10 sort listview by existence in another arraylist »
In an android program I am creating, each user will have an arraylist preference, the code i'm using will just make the question needlessly complex, b...
(3) odpowiedzi
2017-10-19 13:10 Return specific value when list is out of range in Python »
How can I return a specific value if the list is out of range? This is the code I have so far: def word(num): return ['Sunday','Monday','Tuesday','...
(5) odpowiedzi
2017-10-12 16:10 Arranging strings in ascending and descending order using array lists »
I wrote a post before with a much more rudimentary version of the following code. I rearranged it, but it still doesn't work. Whenever I input a new ...
(2) odpowiedzi
2017-10-06 15:10 ArrayList find custom object quickly »
I'm using ArrayList to store CustomObjects, problem is that it takes time to find an object in that list in order to remove it. (around 100K elements)...
(1) odpowiedzi
2017-09-26 08:09 Removing Objects in Java ArrayList - Time Consumption »
I'm trying to remove 140,000 objects from an ArrayList of size 7,140,000. I expected this would take seconds (if that), but instead Java is taking mu...
(2) odpowiedzi
2017-09-02 11:09 How to print a list by adding a new line after every 3rd element in a list in java lambda expression? »
Suppose I have a list as below Collection<?> mainList = new ArrayList<String>(); mainList=//some method call// Currently, I am displayi...
(3) odpowiedzi
2017-08-22 09:08 Traverse an arraylist of objects and get the maximum quantity value from duplicate objects »
So I have this ArrayList of Product objects. What I'm doing is on click of + button, I am making an object of Product and setting all the attributes f...
(3) odpowiedzi
2017-08-07 19:08 for loop performance iteration »
The question is, "We might expect method3 to run faster than method2, why is that?" but I have no idea. It seems like both methods do the same amount ...
(2) odpowiedzi
2017-07-24 21:07 How to improve Java multi-threading performance? Time efficiency of saving/loading data from NoSQL database (like Redis) vs ArrayList? »
I am evaluating an SDK and I need to cross compare ~15000 iris images stored in a gallery folder and generate the similarity scores as a 15000 x 15000...
(1) odpowiedzi
2017-07-14 03:07 how to add objects extracted from a database to an arraylist? »
i wrote a simple program extracting some data from a database, each line from the table of the database is structured in an object that i create using...
(1) odpowiedzi
2017-07-10 16:07 Java - Overwriting values in a HashMap that are in an ArrayList<String> »
I'm fairly new to coding and I'm running into a slight problem here that I can't figure out. Let's say I have a HashMap with String keys and Integer v...
(8) odpowiedzi
2017-06-11 19:06 How could i transfer duplicate items in other ArrayList? »
I have an array list ArrayList<String> list=new ArrayList<String>(); list.add("Apple"); list.add("Ball"); list.add("Ball"); ...
(5) odpowiedzi
2017-06-01 22:06 Is Java ArrayList really this much slower than C++ vector? »
I do not want to start yet another pointless flamewar about whether Java or C++ is the better language in general. I want to know whether a comparison...
(1) odpowiedzi
2017-05-09 05:05 Why is an ArrayList of ArrayLists not multidimensional? »
I recently appeared for an interview in which the interviewer asked me a question regarding arrays and ArrayList. He asked me if an array of arrays ...
(7) odpowiedzi
2017-04-30 01:04 How to find the max element from an array list of objects? »
Collections.max(arraylist) doesn't work, and a regular for loop won't work either. What I have is: ArrayList<Forecast> forecasts = current.get...
(5) odpowiedzi
2017-03-29 22:03 SilverStripe random order for ArrayList() »
I know that we can randomly sort a DataList with the following: $example = Example::get()->sort('RAND()'); But when I try to randomly sort an Ar...
(2) odpowiedzi
2017-03-16 15:03 toString Method ArrayList simple recursion »
I am trying to print the contents of a list recursively and this is what I should be getting [6, 8] but I am getting [8, 8 6, 6] But it's printing...
(3) odpowiedzi
2017-03-04 20:03 Accessing object's elements of Multiple ArrayList in java »
I cannot access Multiple ArrayList element. The code is given below and it cannot access the values 5 or 6. My IDE is not accepting the last statement...
(2) odpowiedzi
2017-03-04 01:03 How to get distinct values and sum the total on JSON using JS »
How do you get the data from distinct values also sum the total values from the same unique row Here is the JSON Data result As you can see they h...
(2) odpowiedzi
2017-02-11 18:02 Find position of an Imageview inside listview »
I have a List view that I fill the rows via mysql database. This is a view of what I have done: This names that you saw are coming from my databas...
(1) odpowiedzi
2017-02-06 15:02 Pass class type as parameter to use in ArrayList? »
I need to write a java method which takes a class (not an object) and then creates an ArrayList with that class as the element of each member in the a...
(3) odpowiedzi
2017-01-20 12:01 Foreach loop only working in order for elements stored inside ArrayList »
i've an ArrayList of products "Snacks" that are being read from a file and stored inside this ArrayList, displaying their CODES,NAMES,PRICES. using th...
(3) odpowiedzi
2017-01-11 08:01 Adding element to 2d arraylist in java »
ArrayList<Integer> a =new ArrayList<Integer>(); ArrayList<ArrayList<Integer>> j =new ArrayList<ArrayList<Integer>>...
(4) odpowiedzi
2016-12-31 21:12 Java List Horrible Adding Performance »
I'm adding millions of entries of a custom object to a List. This turns out to be very slow and the graphical user interface keeps freezing randomly a...
(1) odpowiedzi
2016-12-29 14:12 Create Delete Dialog on selected piechart value? »
I created this android app using the MPAndroidChart Library, which allows the user to create a quick PieChart using an ArrayList (I added some screens...
(1) odpowiedzi
2016-12-20 04:12 Is List<Item> faster than List? »
I am developing a Java application with many List-s and procedures and I need it to execute very fast. I would like to know when I specify the type el...
(4) odpowiedzi
2016-11-18 08:11 Dynamic Spinners - if an item is selected from one spinner, hide it from other spinners - Android »
How to hide an item from other spinners that is currently selected in one spinner? I've tried removing the items via ArrayList of strings and ArrayAd...
(1) odpowiedzi
2016-11-11 21:11 Adding only sub-classes instances to my collection class »
I am writing a program with different classes and there there is a collection class which will store only the sub-classes of the superclass. Okay, so ...
(3) odpowiedzi
2016-10-30 04:10 Sharing an ArrayList between two threads? »
So I have two threads running where one of them is supposed to get information from the user and the other thread is suppose to work with information ...
(5) odpowiedzi
2016-09-24 17:09 Convert Arraylist<Object> value in to byte[] »
I m trying to get/convert the value of Arraylist in byte[] below is my code final ArrayList<Object> imglists = new ArrayList<Object>(); ...
(2) odpowiedzi
2016-09-01 08:09 How to check if a string contains all the letters of the alphabet? »
I am trying to check if a string contains all the letters of the alphabet. I created an ArrayList which contains the whole alphabet. I converted the s...
(17) odpowiedzi