Hello, I have problem.
I need to read a line like this from a file:
5 Chair 12.49
EDIT: I want to be able to have more lines of data.
I need to separate each word/number into different data types. First one is an int, second is a String, third is a double. Then I need to have them formatted like this:
Item: Chair Price: $12.49 Quantit...
I'm creating a javascript array in an overridden PageLoad() event on a class that I'm including inside my UpdatePanel using something like this:
Page.ClientScript.RegisterArrayDeclaration("myArray", "'one','two','three'");
I have a button I'm using to "Post Back" (with ajax since it's in an update panel) that then shows a specified nu...
I'm getting "illegal offset type" error for every iteration of this code. Here's the code in case anyone can help:
$s = array();
for($i=0;$i<20;$i++){
$source = $xml->entry[$i]->source;
$s[$source] += 1;
}
print_r($s)
Any ideas. Thanks in advance.
...
I've got an array of different sized images. I want to place these images on a canvas in a sort of automated collage.
Does anyone have an idea of how to work the logic behind this concept?
All my images have heights divisible by 36 pixels and widths divisible by 9 pixels. They have mouseDown functions that allow you to drag and drop. ...
I read in a file with a few numbers using a scanner, and then split them using the split method. My main issue is if there is a method that can just give me ranges, probably in the math class. The numbers are currently in an array, and I wanna move those numbers and there ranges into a two-dimensional array. Could anyone give me some tip...
void display_totals();
int exam1[100][3];// array that can hold 100 numbers for 1st column
int exam2[100][3];// array that can hold 100 numbers for 2nd column
int exam3[100][3];// array that can hold 100 numbers for 3rd column
int main()
{
int go,go2,go3;
go=read_file_in_array;
go2= calculate_total(exam1[],exam2[],exam3[]);
...
TLDR:
Started with this question simplified it after got some of it working and continuing it here.
I need to 'GET' the JSON array
Format it correctly and for each within the array place it in the corresponding DIV.
??
It works.
This is a followup from this question to simplify and continue.
I need to some complicated JSON data f...
Hi.
I'm trying to create 2D array and initialize it with NSStrings.
When I try to copy content of a cell from the array to a label.text, the application crashes.
NSMutableArray *array = [NSMutableArray arrayWithCapacity:0];
[array addObject:[NSMutableArray arrayWithObjects:
[NSArray arrayWithObjects: @"0-0", @"0-1",...
Ok, I need keys to be preserved within this array and I just want to shift the 1st element from this array. Actually I know that the first key of this array will always be 1 when I do this:
// Sort it by 1st group and 1st layout.
ksort($disabled_sections);
foreach($disabled_sections as &$grouplayout)
ksort($grouplayout);
...
Hi,
So currently I have an array with smarty..
{foreach from=$_sequences key=k item=v}
Name => {$v.menu}
Type => {$v.type}
Step => {$v.pri}
Data =>{$v.data}
{/foreach}
which gives me:
Name => Test
Type => Audio
Step => 1
Data => audio1
Name => Test2
Type => Audio
Step => 2
D...
Hi all,
I got an array which contains some data like this:
$arrs = Array("ABC_efg", "@@zzAG", "@$abc", "ABC_abc")
I was trying to print the data out in this way (Printing in alphabetic order):
[String begins with character A]
ABC_abc
ABC_efg
[String begins with character other than A to Z]
@$abc
@@zzAG
I don't know how to do it.
...
hello, i get this error when i retrieve an XML that only has 1 node (no repeating nodes) and i try to store in an ArrayCollection. -When I have MORE than 1 "name" nodes...i do NOT get an error.
TypeError: Error #1034: Type Coercion failed: cannot convert "XXXXXX" to mx.collections.ArrayCollection.
this error occurs as the line of code...
Hi,
Please help me, i need to merge multiple arrays then sorting it by array value count. Below is the problem:
$array1 = array("abc", "def", "ghi", "jkl", "mno");
$array2 = array("mno", "jkl", "mno", "ghi", "pqr", "stu");
$array3 = array_merge($array1, $array2);
$array4 = ???
print_r($array4);
I want the returns of $array4 like thi...
basically im getting an allocation limit error/warning when i create a float** array.
the function i am calling to fill the float** retrieves data from a struct loaded from a file.
The function works fine when i use one object but when i load 2 objects into memory i get the limit error.
I am pretty sure this is to do with byte alignment ...
I have a function that checks multiple form items and returns either boolean(true) if the check passed or the name of the check that was run if it didn't pass. I built the function to run multiple checks at once, so it will return an array of these results (one result for each check that was run). When I run the function, I get this arra...
This seems to be a very common problem of mine:
data = [1 2 3; 4 5 6];
mask = [true false true];
mask = repmat(mask, 2, 1);
data(mask) ==> [1; 4; 3; 6]
What I wanted was [1 3; 4 6].
Yes I can just reshape it to the right size, but that seems the wrong way to do it. Is there a better way? Why doesn't data(mask) return a matrix whe...
take this string as an example: "will see you in London tomorrow and Kent the day after tomorrow".
How would I convert this to an associative array that contains the keywords as keys, whilst preferably missing out the common words, like this:
Array ( [tomorrow] => 2 [London] => 1 [Kent] => 1)
Any help greatly appreciated.
...
I'm building an interpreter and as I'm aiming for raw speed this time, every clock cycle matters for me in this (raw) case.
Do you have any experience or information what of the both is faster: Vector or Array?
All what matters is the speed I can access an element (opcode receiving), I don't care about inserting, allocation, sorting, et...
When dealing with cell arrays, I can use the deal() function to assign cells to output variables, such as:
[a, b, c] = deal(myCell{:});
or just:
[a, b, c] = myCell{:};
I would like to do the same thing for a simple array, such as:
myArray = [1, 2, 3];
[a, b, c] = deal(myArray(:));
But this doesn't work. What's the alternative?
...
so I have array like ParamsArray
{a,b,a,a,...b} (so i have 2 kinds of parameters in this array - a and b) (here I have N strings)
and another array - DataArray
{data1,data2,...dataN} (different strings) (here I have N strings)
Now I created 2 new arrays ArrayA and ArrayB and I wanta want to feel arra ArrayA with all data (strings) fr...