Tagged Questions
-4
votes
4answers
68 views
How to add elements to a fixed size array in Java after the last non-null element?
So I have a String array with length 10. I add one or two values and the rest is still null. I want to be able to go back and add more values starting from the first non-null element. How do i get the ...
-1
votes
2answers
32 views
Append data to new cell arrays using Token
I have a problem I couldnt solve it. I have a set of data present in lines (generally text that are organized in number of sentences)
Example of my text in sentence:
1. Hello, world, It, is, ...
0
votes
4answers
32 views
Matlab: convert int array into string array?
In Matlab I have integer array a=[1 2 3]. I need to convert them into one string, separated by ',':
c = '1,2,3'
If somehow I can have a string array b=['1' '2' '3'], then I can use
c = ...
2
votes
3answers
60 views
C - Array of strings (2D array) and memory allocation gets me unwanted characters
I have a tiny problem with my assignment. The whole program is about tree data structures but I do not have problems with that.
My problem is about some basic stuff: reading strings from user input ...
-1
votes
2answers
35 views
Split content of a cell if it has more than one string
I am kinda confuse with my problem.
I am working with a cell array,generally, I have a set of words in which scattered in different cells and I want to split the cell that contains more than one ...
2
votes
2answers
22 views
Reading double values from a file and storing them in an array then display in listbox
these are the values from the textfile
1245.67
1189.55
1098.72
1456.88
2109.34
1987.55
1872.36
they are obviously decimals
not sure what i'm missing but when i debug i get Input string was not ...
-4
votes
0answers
33 views
Pointer to arrays of characters [closed]
I tried to create pointer to arrays of characters but there is an error. I used next line for allocation: char* array[3];
The only idea that i have is that the arrays are allocated statically and I ...
-1
votes
4answers
36 views
How to split a string by delimiter? [closed]
I'm making a call to http://rolz.org/api/?4d20.json and the details element looks is a string in the format of [ 12 +14 +2 +8 ].
I want to be able to segregate each value from this string to display ...
2
votes
3answers
117 views
Is it correct to create array of strings this way in c++?
Is it correct to create array of n strings this way in c++?
string *a = (string*)malloc(sizeof(string)*n);
...
free(a);
4
votes
2answers
54 views
Pythonic way to print a multidimensional complex numpy array to a string
I have a 3D complex numpy array defined like this:
> import numpy as np
> a = np.random.rand(2,3,4) + np.random.rand(2,3,4) * 1j
> a
array([[[ 0.40506245+0.68587874j, ...
-4
votes
1answer
39 views
Stored Procedure to Array [closed]
im having trouble with making my Stored Procedure to an array.
The given SP:
call my_store ( 'Test', '1', '2' )
Now i want the variables of a stored procedure in an array like:
[0] = 'Test'
[1] ...
1
vote
2answers
34 views
Swapping array elements in coffeescript
I'm learning coffeescript and wrote the following function to reverse a given word:
reverse = (word) ->
if word.length is 0
return "empty string"
if word.length is 1
return word
left ...
0
votes
5answers
72 views
How to get rid of the braces and commas returned by Arrays.toString()?
Consider this code-
import java.util.Arrays;
class Test {
public static void main(String args[]) {
int[] arr=new int[5];
for (int i=0; i<5; i++) {arr[i]=i;}
String ...
1
vote
4answers
52 views
Sorting a 2D array in java (Sorting all letters)
I wanted to sort the following 2D array:
String[][] rows = {
{"M","O","N","K","E","Y"},
{"D","O","N","K","E","Y"},
{"M","A","K","E"},
...
0
votes
0answers
32 views
searching an array for a partial string match then using the element number in later code
I have an array and I want to search through the array for a string which contains "return to card" or "funding sent to" (which could be in capitals). I need to now which element contains this part so ...