Hi
I want to pass an Arraylist from one activity to another.
I use putStringArrayListExtra(), but there shows an error :
"The method putStringArrayListExtra(String,ArrayList is undefined for the type bundle."
Is there any other method available for passing ArrayList?
String test[]=new String[3];
ArrayList<String[]> al=new ArrayList...
Hi,
I have passed one multi-dimensional array to another activity using putSerializable() and retrieve using getSerializable. But I got some problems. Please help me to solve my problem..
First activity
String [][] selected_list= new String[10][];
Bundle list_bundle=new Bundle();
list_bundle.putSerializable("lists",se...
Is it possible to take the contents of a variable and stick it into an array like so (I've tried to no avail):
First I get these values from a database and using php form into a hidden input:
{value: '1', name: 'name1'},{value: '2', name: 'name2'}
Then collect with javascript
document.getElementById("myelement").value
Then put the...
Hi I have to sort this array in desc. order on the basis of ratingVal using php. How can I do that.
Array
(
[0] => Array
(
[rating_postid] => 26
[raCnt] => 6
[sRate] => 18
[ratingVal] => 3
)
[1] => Array
(
[rating_postid] => 714
[raC...
How can I assign value to a 2-dimensional array?
My array is
String[][] arr=new String[2][3];
And when I am assigning value to this array, application is stopped.
Example: arr[0][0]="hello";
Please give me the solution...
...
I would like to be able to sort this array by the element array's size;
array(
[0] => array( [0] => 'B', [1] => 'C');
[1] => array( [0] => 'B');
[2] => array( [0] => 'A', [1] => 'C');
[3] => array( [0] => 'A', [1] => 'B', [2] => 'C');
[4] => array( [0] => 'C');
[5] => array( [0] => 'A');
[6]...
Hello,
I've been trying to think of a way to dynamically return property values for a class using __call instead of creating a slew of functions whose only purpose would be to return those values. The idea I have is to be able to request ( for example ) $this->fetch_PersonFirstName() and have the class check if $this->person["first_name"...
Hello,
I'm trying to use preg_match_all to return an separate arrays for various elements in a CamelCase string.
In my example, I'm attempting to obtain the prefix of a string in one array and everything else ( the camelcase portion of the string ) split up into a second array. For instance, get_BookGenreTitle is supposed to return get_ ...
I am trying to store values in php, like a HashTable with multiple keys. For example I am I would want this to return two different values:
$value1=$content['var1']['var2']['var3']['typea'];
$value2=$content['var1']['var2']['var3']['typeb'];
What would be the best way to go about implementing a feature like this?
...
I have an array as following. I order that array by the value of the key "attack". Everything is ok until then, but I want to get for example only 9 of that total attack values are summed up: I want to sum up 3 of key1 (3 * 45), 4 of key3 (4 * 35) and 2 of key2 (2* 25) are automatically summed up. I would be greatly appreciated if somebo...
Hi I have two different tables containing lot of images.
I need to display 50 random images from both tables. How can I do like that.
How can I select random images using MySQL?
or
if I select 100 images from both tables. How can I choose 50 random images from that array using php?
any body knows the solution please help me.
...
Hello.
I have the next array:
Array(
[id] => 1
[children] => Array(
[2] => Array(
[id] => 2
[inactive] => true
[children] => Array(
[4] => Array(
[id] => 4
[children] => Array()
)
)
)
[3] => array(
[id] => 3
...
Hello,
i want to store some kind of distance-matrix (2D), where each entry has some alternatives (different coordinates). So i want to access the distance for example x=1 with x_alt=3 and y=3 with y_alt=1, looking in a 4-dim multi-array with array[1][3][3][1].
The important thing to notice is the following: the 2 most inner arrays/vect...
I am having two major problems with the source code below (and probably other problems I haven't yet discovered...).
Problem Number 1:
I have to apply the declared integer fields (day, month, year) under the class Friend to a string array in my Main() method. The way that I wrote the source code below doesn't allow for a definition for...
I can't find a definite answer to this question in the documentation. If a column is an array type, will all the entered values be individually indexed?
I created a simple table with 1 int[] column, and put a unique index on it. What I noticed is that I couldn't add the same array of ints, which leads me to believe the index is a compos...
Hi,
I'm doing my first steps with 2D arrays. Help needed on a practical example. Below code should store students and each of their results for 3 courses in a table. Below code returns an error. The error is caused by int studentResults[x][y] = sc.nextInt(); . Any ideas?
import java.util.*;
class CalcAverage
{
public static void ...
Out of curiosity, how many dimensions of an array can you have in java.
...
Hello everyone,
I will be honest, this is an assignment question but I just cant find a solution to it. Please remember I am not asking for the answer but simply some guidance.
Problem:
Design an algorithm that runs in O(n) time (linear) which can locate a single suspicious house (point) on a 2D grid. It is suspicious if it consumes eq...