Hello,
I need help dealing with an array in my java program. in my first class, "test", I set 4 variables and then send them to my other class (test2).
arr[i] = new test2(id, fname, lname, case);
at that point, variables are set and then I want to return those variables. So in the test2 class, I have a method that strictly returns one...
Say i have an single dimension array (to keep it simple). Is there a simple way to tell what the highest index of an element that was explicitly assigned a value? other than to loop through and count?
I know Ubound finds the highest dimension of the array but that's not what I need. Is there something like Ubound but it only counts popu...
ArrayList<String> veri1 = new ArrayList<String>();
String[] veri2 = {"Fatih", "Ferhat", "Furkan"};
How can i add "veri2" to "veri1" like one element ? I mean if i call veri.get(0), it returns veri2..
Regards.
...
Why does
static char *opcode_str[] = { "DATA"
, "DATA_REQUEST_ACK"
, "ACK_TIMER_EXPIRED"
, "ACK_UNEXPECTED_SEQ"
, "ACK_AS_REQUESTED"
} ;
work, but
static char **opcode_str = { "DATA"
...
I know the center (x,y) coordinates of a subarray in terms of the subarray space and general array. For other parts of the subarray I also know the coordinates in the subarray space - but I want to find the coordinates in the general array? Is there an elegant way to do it in MATLAB? In principle I think you should still be able to find ...
In a program I am writing I am doing a lot of string manipulation. I am trying to increase performance and am wondering if using char arrays would show a decent performance increase. Any suggestions?
...
I am trying to access individual elements of my array. This is an example of the contents of the array i am trying to access.
<City: 0x4b77fd0> (entity: Spot; id: 0x4b7e580 <x-coredata://D902D50B-C945-42E2-8F71-EDB62222C0A7/Spot/p5> ; data: {
CityToProvince = 0x4b7dbd0 <x-coredata://D902D50B-C945-42E2-8F71-EDB62222C0A7/County/p15>;
...
I have CSV file with sample data in this form :
220 30 255 0 0 Javascript
200 20 0 255 128 Thinking in java
, where the first column is height, second thickness, next three are rgb values for color and last one is title. All need to be treated as separate variables. I have already written my own solution for this, ...
Hi,
I don't understand the rational behind the decision of this part of Lua. Why does indexing start at 1? I have read(as many others did) this great paper. It seems to me a strange corner of a language that is very pleasant to learn and program. Don't get me wrong, Lua is just great but there has to be an explanation somewhere. Most of...
Hey all, I'm trying to write a sort function but am having trouble figuring out how to initialize a value, and making this function work as a generic template. The sort works by:
Find a pair =(ii,jj)= with a minimum value = ii+jj = such at A[ii]>A[jj]
If such a pair exists, then
swap A[ii] and A[jj] else
b...
Hi guys,
I like to convert string for example :
String data = "1|apple,2|ball,3|cat";
into a two dimensional array like this
{{1,apple},{2,ball},{3,cat}}
I have tried using the split("") method but still no solution :(
Thanks..
Kai
...
Hello,
for my study purpose I need to build an array of array filled with the partitions of an integer with fixed term. That is given an integer, suppose 10 and given the fixed number of terms, suppose 5 I need to populate an array like this
10 0 0 0 0
9 0 0 0 1
8 0 0 0 2
7 0 0 0 3
............
9 0 0 1 0
8 0 0 1 1
.............
7 0 1 1...
I want to know from where the index of a string and an array starts from.
I am getting a lot of confusion while making programs.
While calculating string length of a string is the null character also counted?
...
1- How to smartly initialize an Array with 2 (or more) other arrays in C#?
double[] d1=new double[5];
double[] d2=new double[3];
double[] dTotal=new double[8];// I need this to be {d1 then d2}
2- Another question: How to concatenate C# arrays efficiently?
Thanks
...
I have an array that I have to add a new value to array value. I am new to arrays.
how do I loop thru the array and add to the value in the existing array.
...
Hi
OK I need to figure out how to count how many numbers are in the following example.
07000000000,07000000001,07000000002,07000000003,07000000004 etc...
I have tried the following PHP functions.
explode, implode, count, foreach and for.
None of them seemed to have worked and I am really stuck now.
Any help will is appriciated.
Ky...
elementData = Arrays.copyOf(elementData, newCapacity);
Gives error: "The method copyOf(Object[], int) is undefined for the type Arrays"
This was not a problem on my home computer, but at my school's it gives the error above. I'm guessing it's running an older JRE version - any workaround?
Thanks
...
Let's say I have an array of objects from the same class, with two attributes of concern here: name and created_at.
How do I find objects with the same name (considered dups) in the array, and then delete the duplicate record in the database. The object with the most-recent created_at date, however, is the one that must be deleted.
...
Is it possible to set 'MaxDegreeOfParallelism' (that is maximum number of threads to use) for Array.Parallel module since under the hood it uses Parallel.For?
...
Hi,
I have a array inside my PHP app that looks like this:
Array
(
[0] => Array
(
[name] => Name1
[language] => 1
)
[1] => Array
(
[name] => Name2
[language] => 1
)
)
How can I check that "language" with value 1 doesnt appear twice, as effective...