javascript – how to iterate via POST in Symfony

**some url modification** URL = 

public function imageupload($request.. blah blah){

  $multiplefiles = $request->files;         
  foreach ($multiplefiles as $file) {
    $this->addFlash('success', $s++); // this always 1 why?


I send multiple images using dropzone.js via Post to this function in symfony

PS: super new on symfony

example of post that the mailing

java – Make the code more readable, iterate on the internal map

So currently, I'm looking for clues from more experienced programmers. I'm at the point where, when I look in my code, it seems like it's not legible, which is probably a big flaw. So let's go to the code itself:

In one of the classes I have method:

    protected void createModelsCharacterisitcListGroup(Map> characters) {

        for (Entry> outterEntry : characters.entrySet()) {
            for (Entry innerEntry : outterEntry.getValue().entrySet()) {
                outterEntry.getKey().create(characters.get(outterEntry.getKey()).get(innerEntry.getKey()), source.getStringified(innerEntry.getKey()));


And CharacterType Is the enumeration like this:

public enum CharacteristicType {
    TYPE1 {

        public void create(String name, String value){


        public void create(String name, String value) {


    public abstract void create(String name, String value);

So what I want to do is:

Method of call create for given CharacterType in Map with Strings of the inner map

macos – How to iterate elements of the window with a dynamic title

I'm trying to get all the lines of an application table.

set ProcName to "AppName"
tell application ProcName to activate
tell application "System Events"
    tell process ProcName
        tell tab group 1 of window 1
            set items to every row of table 1 of scroll area 1
            set itemValues to {}
            repeat with aRow in items
                set itemValue to (value of text field 1 of aRow)
                log itemValue
                set the end of itemValues to itemValue
            end repeat
        end tell

    end tell
end tell

However, when I run the script, it prints only several items because the window title changes constantly and the following error message is displayed.

 "System Events got an error: Can’t get window "App name window title"

Is it possible to tell the script to use other identifiers than title?
Or please suggest how to solve the problem.

Thank you.

python – How to iterate separately in a list of tuples

I'm trying to browse each item in the list separately, but together in the tuples.
Ex: calculate -1% of 15000, then 2% of 14850 and finally + 3% of 15147. And then -1% of 15000, -3% of 14850 and finally + 2% of 14404.5. And so with each item in the list. The problem is that I do not know how to start from 15,000 with each iteration of the list item, but from the value of the capital variable of each tuple. thank you so much
lista=((-1, 2, -3), (-1, -3, 2), (2, -1, -3), (2, -3, -1), (-3, -1, 2), (-3, 2, -1))
for i in lista:
for j in i:

c # – iterate XmlDocument with xpath

How do we script an XmlDocument using an xpath?

I'm trying to return a list of nodes by xpath:

    public static List Filter(string xpath, string input, string ns, string nsUrl)
        var bytes = Encoding.UTF8.GetBytes(input);
        var stream = new MemoryStream(bytes);
        var doc = new XmlDocument();
        XmlNamespaceManager namespaceManager = new XmlNamespaceManager(doc.NameTable);
        namespaceManager.AddNamespace(ns, nsUrl);
        var links = new List();
        var nodes = doc.SelectNodes(xpath, namespaceManager);
        using (var reader = new XmlTextReader(stream))
            reader.Namespaces = false;
        foreach (XmlNode node in nodes)
            if (IsNullOrWhiteSpace(node.InnerText))

        return links;

However, the account is still 0!

I'm using this xpath:


The header of the file looks like this:

I am sure to use the correct xpath because I tested it against my payload:

enter the description of the image here

I call the function this way:

            var links = Filter(xpath, xml, "ns0", "http://NameSpace.ExternalSchemas.Patient");

How do we script an XmlDocument using an xpath?

Google Sheets, how to iterate between columns and rows

I'm running the following forumula:

= IF (INDEX (C $ 2: US $ 2, 1, ROW (1: 1))), CONCATENATE (C $ 2.00, "-", INDEX (C $ 1: 1, 1, ROW (1 : 1)))))

On the following table

Basically, if a value is present in column C2, I return the value + the value of B2. I'd like to do this for all columns up to O2, however, once I reach the O2 column, I'd like to go to the next line and have the process start with a new one. line. How would I do that?

google sheets – Iterate on a range, copy the value of a cell into the unique cell reference

I have a sheet on which I would like to keep track of inventory transfers and update the inventory master sheet accordingly. I'm a bit new to this. I have a range that consists of a column of new values ​​(calculated with formulas) and a column with cell references where I would like to copy these values ​​(into another sheet).

Currently, my code only works for the first line, but it does not walk the beach and I do not quite understand why. I thought that using an "index" variable would correctly reassign the values ​​for sourceCell and sourceRef, but maybe it's redundant?

Any help would be appreciated.

copypaste function () {
var ss = SpreadsheetApp.getActiveSpreadsheet ();
var sheet1 = ss.getSheetByName ("FMGXfers");
var sheet2 = ss.getSheetByName ("FMGInventory");
var numRows = sheet1.getRange (& # 39; R1). getDisplayValue ();

var index = 3
var sourceCell = & # 39; T & # 39; + index;
var sourceRef = "U" + index;
var targetCell = sheet1.getRange (sourceRef) .getDisplayValue ();
var sourceValue = sheet1.getRange (sourceCell) .getValues ​​();

for (var i = 1; i <numRows; i ++) {
sheet2.getRange (targetCell) .setValues ​​(sourceValue);
var index = index ++;
var sourceCell = & # 39; T & # 39; + index;
var sourceRef = "U" + index;

react – How to iterate a Javascript URL

I have an img tag and I need to iterate the src, changing the uri, ex. in a need (url), someone has ideas?

python – Iterate on a board and record in a dict

Given this table:

board ([[0, 0, 0, ..., 0, 0, 0],
       [0, 0, 0, ..., 0, 0, 0],
       [0, 0, 0, ..., 0, 0, 0],
       [0, 0, 0, ..., 0, 0, 0],
       [0, 0, 0, ..., 0, 0, 0],
       [0, 0, 0, ..., 0, 0, 0]], dtype = uint8)

I want to iterate to count the values ​​on each line, then save them per line.
The code below is a general sum. I would like to have the account per line.

number of def (image):
array = np.array (image)
board[[ array == 0 ]]= 1
board[[ array == 255 ]]= 0
for the line in the table:
single, count = np.unique (table[row,] , return_counts = True)
d = dict (zip (unique, account))
return again

The result:

{0: 234710, 1: 515}

c # – Iterate on properties of myclass (IEnumerable)

This question already has an answer here:

I have a course …

public class recording
private string Name {get; }
private int Age {get; }

public record (string name, int age)
Name = name;
Age = age;

and I'm trying to use the code below to add a record, then list each property and perform an action. In this case, display it in the console.

listing list = new list();

list.Add (new Record ("bob", 25));
list.Add (new record ("sue", 20));

foreach (Registration in the list)
foreach (var v in the recording)
Console.Write (v.ToString ());


Console.WriteLine ();

I think I would need my disk class to implement IEnumerable but I do not know how … You looked here but I can not find something that matches the example or that I can understand enough to be able to convert.