I have an array of arrays with objects and now want to get all objects for a certain date (which is an object property).
what's the best way to query it?
Hi,
I'm a beginner in java. I want the logic of the small program.
I have two arrays
array = {a1,a2,a3,a4,a5,,,,,,,,,an}
and
array2 = {b1,b2,b3,b4,,,,,,,,,,,bn}
I want string as:
a1b1,a2a3b2b3,a4a5a6b4b5b6,..........an
Please tell me what will be the logic.
I used JQuery.serializeArray() on a form to create an array of objects on a GreaseMonkey application:
[
{
name: a
value: 1
},
{
name: b
value: 2
},
{
name: c
value: 3
},
{
name: d
value: 4
},
{
name: e
value: 5
}
]
I need to use GM_xmlhttpRequest to serve these fields back to a server side application. What is the best way to return these fields?
Thanks in advance,
D
Can somebody demonstrate how to send an array of bytes over a TCP connection from a sender program to a receiver program in Java. (I'm new to Java programming, and can't seem to find an example of how to do this that shows both ends of the connection (sender and receiver.) If you know of an existing example, maybe you could post the link. (No need to reinvent the wheel.) P.S. This is NOT homework! :-)
I'm getting the following error in my ASP.net web page:
Invalid length for a Base-64 char array.
This happens when a user activates an ajax request before the previous request completes. How can I prevent this error fro occurring?
I have a PHP array of strings: ie: "Big green car parked outside"..etc
I would like to perform boolean search operations on these strings, similar to MySQL fulltext searching , or Sphinx Searching.
For example, I would like to find all strings containing word "green" but not "car"
Does anyone know of any existing PHP classes or libraries which would help me accomplish this ? Or can anyone suggest any google terms I could search for ?
Thank you in advance!
Intention is to take a current line which contains commas, store trimmed values of all space and store the line into the array.
Why does this not work?
String[] currentLineArray = currentInputLine.replace("\\s", "").split(",");
hi there, are there any way to create an object form any class inside a numpy array?¿. Something like:
a = zeros(4)
for i in range(4):
a[i]=Register()
Thanks
print_r($pages);
print max($pages);
print min($pages);
shows me
Array ( [0] => 1 [1] => 2 [2] => 3 ) 1 2
While I was expecting the last two numbers to be 3 and 1. How come?
Is following array initialization correct? I guess it is, but i'm not really sure if i can use const char* or if i better should use std::string. Beside the first question, do the char pointers point to memory segments of same sizes?
struct qinfo
{
const char* name;
int nr;
};
qinfo queues[] = {
{"QALARM", 1},
{"QTESTLONGNAME", 2},
{"QTEST2", 3},
{"QIEC", 4}
};
I've looked around for a good example of this, but I haven't run into one yet. I want to pass a custom string array from java to oracle and back, using the IBATIS framework. Does anyone have a good link to an example? I'm calling stored procs from IBATIS.
Thanks
Hi all,
looks like a memory leak when i try to initializing an array of pointers, this my code:
void initLabelTable(){
register int i;
hashNode** hp;
labelHashTable = (hashNode**) malloc(HASHSIZE*sizeof(hashNode*));
hp = labelHashTable;
for(i=0; i<HASHSIZE; i++) {
*(hp+i) = NULL;
}
}
any idea?
Hi friends,
Yet I use Soft Keyboard sample from http://developer.android.com/resources/samples/SoftKeyboard/index.html
Here we uses ASCII value from XML ,now at the place of XML I want to generate these value using array.
How can I do this
Thanks in Advance
What's the simplest way of printing an array of primitives or of objects in Java? Here are some example inputs and outputs:
int[] intArray = new int[] {1, 2, 3, 4, 5};
//output: [1, 2, 3, 4, 5]
String[] strArray = new String[] {"John", "Mary", "Bob"};
//output: [John, Mary, Bob]
Given an array of size n, which contains numbers in the range 1 to n, and in which each number is present at least once, but some numbers may be missing, how can I find the missing numbers?
I have the following array:
procs=(
'one a b c'
'two d e f'
'three g h i'
)
I try run these processes from a loop (using echo instead of eval so I can debug):
for proc in ${procs[@]}
do
echo $proc
done
I get:
one
a
b
c
two
d
e
f
three
g
h
i
I wanted:
one a b c
two d e f
three g h i
What went wrong?
I know I can do
for (id obj in array)
{
if ([obj isKindOfClass:[Elephant class]])
[elephants addObject:obj];
}
but I feel there must be a more elegant way of doing this. I've looked at filtering arrays but can't come up with a good predicate. Thoughts?
Hi,
I'm wondering if someone knows how to store an array into a user session?
This is the method to store a single attribute:
$this->getUser()->setAttribute('something', $something);
And the documentation says:
"User attributes can store any type of data (strings, arrays, and associative arrays)"
... but doesn't say anything more. The API documentation doesn't have a "SetAttributes" or something similarly obvious.
Thank you.
We have to write the nodes of a binary tree to a file. What is the most space efficient way of writing a binary tree . We can store it inarray format with parent in position 'i' and its childs in 2i,2i+1. But this will waste lot of space in case of sparse binary trees.
HI,
I have a string:
NEW ALPINESTAR?S SMX PLUS WHITE
MOTORCYCLE BOOTS! 44/9.5$349.95 Time
Left 1h 2m NEW AGV BLADE FLAT MATTE
WHITE LARGE/LG HELMET$75.53Time Left
1h 2m
I want result inarray like this:
Productname
Price time NEW ALPINESTAR?S SMX
PLUS WHITE MOTORCYCLE BOOTS! 44/9.5
$349.95 Time Left 1h 2m
Hi -
I'm getting JSON-encoded output from another organization's API.
In many cases, the output can be either an array of objects (if there are many) or an object (if there's just one). Right now I'm writing tortured code like this:
if ( is_array($json['candidateList']['candidate'][0]) ) {
foreach ($json['candidateList']['candidate'] as $candidate) {
// do something to each object
}
}
else {
// do something to the single object
}
How can I handle it so the "do something" part of my code only appears once and uses a standard syntax?
Hi,
I am trying to convert an integer number in C into an array containing each of that number's digits
i.e. if I have
int number = 5400
how can I get to
int numberArray[4]
where
numberArray[0] = 0;
numberArray[1] = 0;
numberArray[2] = 4;
numberArray[3] = 5;
Any suggestions gratefully received
--dave