Tagged Questions
0
votes
3answers
25 views
Convert a string in char to array in MATLAB
I have a list of strings in a char array:
'gvs(0.000000000000000e+000, 1.601985139535780e+002)'
'gvs(-5.000000000000000e-005, 1.365231866954370e+002)'
'gvs(-1.000000000000000e-004, ...
-3
votes
2answers
27 views
split/parse php form data one input
I don't know how to parse this data with this format :
name<space>age<space>city
when the name and the city can contain more than one word and can handle when user type 22 yr or 2 yr
...
0
votes
2answers
41 views
Cant get last value from JSON
im trying to get all value from a JSON API, i've managed to get almost all of them, except one! As you can see, this is the JSON output from the server. (i cant change it)
{
"error":"",
...
-3
votes
1answer
46 views
Remove numbers only from array [on hold]
I have an array
ar = [4, "f", 4, "d", 4]
In ruby the output should be
["d","f"]
How to get it? Only numbers should be removed. Rest all the characters should present in the array.
I have ...
0
votes
6answers
65 views
Bad compile errors for a setup wizard-Cannot find symbol
I am making a setup wizard for a tax application and I get errors that I don't know how to solve. Please help!
My Error is:
Setup.java:16: error: cannot find symbol
Colors = new ...
0
votes
3answers
40 views
How to check if a string is one of several distinct values?
i have a string variable which can only contain 6 different values. I want to check if it contains one of the first 4 values or one of the 2 second values.
Is there a more elegant way than this:
if ...
-4
votes
2answers
79 views
index out of bounds in c array
I get an exception on the last line.
Im not sure why, as res_name="engine_wooo_idle"
meaning long enough.
static void searchEnginesIcons_download_callback(const char* res_name,
int success, ...
1
vote
1answer
27 views
Fast string array - Cython
Having following hypothetical code:
cdef extern from "string.h":
int strcmp(char* str1, char* str2)
def foo(list_str1, list_str2):
cdef unsigned int i, j
c_arr1 = ??
c_arr2 = ??
...
1
vote
2answers
47 views
Concatenate two WCHAR_T arrays in C++
Dealing with these insane strings and arrays is giving me a headache...
Here's my code so far
wchar_t mypath[MAX_PATH];
wchar_t temppath[MAX_PATH];
GetModuleFileName(0, mypath, MAX_PATH);
...
1
vote
3answers
55 views
buffering a set of lines from a file and storing it in an array in C
This might be a very inefficient way to do it, but its sort of working
This code reads through a file, stores 8 line of text at a time in a global array (Would like a better option to do this if ...
2
votes
7answers
147 views
Fast Lookup of Java
I currently have a String array that I need to search many times for an exact match. What would be the best data structure to use?
Example - String array with elements
cat
dog
squirrel
raccoon
...
-3
votes
2answers
64 views
assigning strings to a variable
I want to know why the first code works but the second one doesn't.
#include <stdio.h>
#include <string.h>
int main()
{
char *last, *first, *middle;
char pres[20] = "Adams, John ...
0
votes
3answers
25 views
How to convert an array to string with index
I would like to convert an Array like this:
array ( [1_1] => 1 [1_2] => 2 [1_3] => 3 [1_4] => 4 [1_5] => 5 )
to an string like this:
"1_1-1/1_2-2/1_3-3/1_4-4/1_5-5"
how can I do ...
1
vote
3answers
52 views
how to print a string in a struct in C
I have a problem with my code when I'm trying to store and print a string in a struct.
I have extracted the essential parts of the code here:
#include <stdio.h>
#include <stdlib.h>
...
0
votes
3answers
70 views
How to convert Int To String in C# without using library functions?
What is the most effective code to convert int to string without using a native convert function.
public static void Main(string[] args)
{
string y = Convert(990);
...