Filling two array of array
Hello,  

I just found out that, if I create 2 matrix using this method: 



```
var cell_code=[]
var cell_type=[]

func create_matrix(row,column):
    for x in range(column):
        var col=[]
        col.resize(row)
        cell_code.append(col)
        cell_type.append(col)
    cell_code[1][1]="hello"
    print(cell_type[1][1])

```

the two variable `cell_code` and `cell_type` will be forever linked in a magical way.  

As a matter of fact, the above function will print `"hello"`.


Is this a wanted behavior? How can I overcome it? Is there a better way to create matrix?
The behaviour must be because you are appending the same array to both of the arrays.  

Try appending a different array for cell*code and cell*type separately.
biomarker = "hi!"

def cells = getdetectionobjects()

cells.each{

it.setname(biomarker)

}

all of the cells will now be named hi! it's not clear what it is you want as an output. if it's a row vector, there's no concatenation involved, you just simply reshape your matrix:
a = [0 1 1 1;
 1 0 1 0;
 1 0 0 1]
 v = reshape(a, 1, []) %reshape a into one row. since matlab is column major, this is done column-wise you can use the repmat function here
if you have to print the patter n (here 10) times, use the following code:
a = [5 4 3 2 1 0]';
n = 10;
b =repmat(a, n,1) Check if any of the values in the cells are null.  

If they are you need to modify your code to check for null conditions before using `ToString()`. The problem is that your pair's closure must return two different types of objects: int if you ask for "con", and the next closure on the line if you ask for "crd".


Here's one possible implementation:


Use a speaker so you can come back.



```
public static Func<string, dynamic> Pair(int x, Func<string, dynamic> y)
{
    Func<string, dynamic> pair =
           (a) =>
           {
               if (a == "con") return x;
               if (a == "crd") return y;
               throw new Exception();
           };

    return pair;
}

public static void Print(Func<string, dynamic> pair)
{
    while (true)
    {
        var next = pair("crd");
        Console.WriteLine((next == null ? "-":"+") +"> " + pair("con"));
        if (next != null)
        {
            Console.WriteLine("|");
            pair = (x) => next(x);
            continue;
        }
        break;
    }
}

        

        
        
        
 (adsbygoogle = window.adsbygoogle || []).push({});
 
        

    
```


  




 (adsbygoogle = window.adsbygoogle || []).push({});
 
  

Test:



```
var pair = Pair(1,
            Pair(2,
                  Pair(3,
                        Pair(4, null))));

Print(pair);

        

        
        
        
 (adsbygoogle = window.adsbygoogle || []).push({});
 
        

    
```

output:



```
+> 1
|
+> 2
|
+> 3
|
-> 4

        

        
        
        
 (adsbygoogle = window.adsbygoogle || []).push({});
 
        

    
``` the imagej 1.53h20 daily build adds an overlay.xor(indexes) macro function that creates a new roi by xoring all the rois in the overlay with indexes in the array ‘indexes’. here is an example:

run("blobs (25k)");

makeoval(44, 31, 112, 106);

overlay.addselection;

makeoval(86, 74, 112, 106);

… Thanks for your reply, I feared it would not be trivail, as I coudnt find any scripts. Idealy the text from the databse is place in a table witht the last column beeing the barcodes path, the images are to replace the text path and be place inside the cell, fitting within the cells width and/or height. g = findgroups(yourtable.name);
output = splitapply(@(varargin) {table(varargin{:}, 'variablenames', yourtable.properties.variablenames)}, yourtable, g);
this should give a cell array of tables. Turns out If I tweked each method 



```
foreach (var dataColumn in readFields.Select(column => new DataColumn(columntypeof(string)) { AllowDBNull = true, DefaultValue = string.Empty }))
{
    csvData.Columns.Add(dataColumn);
}

```

and in the second Method I changed it to use an index rather than column name



```
for (var count = 0; count < table.Columns.Count; count++)
{
    sqlBulkCopy.ColumnMappings.Add(count, count);
}

``` i would do it like this:

https://www.advanced-excel.com/columns-to-rows.html