================ Ser/de methods =================
432754
@Override
    public int encodingLengthBytes() {
        //TODO convert Strings to byte[] only once

        //First: determine buffer size.
        //(a) Header: 8 bytes (4x uint16 = 8 bytes)
        //(b) Fixed length entries length (sie.BlockLength())
        //(c) Group 1: Memory use.
        //(d) Group 2: Performance stats
        //(e) Group 3: GC stats
        //(f) Group 4: param names (variable length strings)
        //(g) Group 5: layer names (variable length strings)
        //(g) Group 6: Per parameter performance stats
        //Variable length String fields: 4 - session/type/worker IDs and metadata -> 4*4=16 bytes header, plus content

        UpdateEncoder ue = new UpdateEncoder();
        int bufferSize = 8 + ue.sbeBlockLength() + 16;

        //Memory use group length...
        int memoryUseCount;
        if (!memoryUsePresent) {
            memoryUseCount = 0;
        } else {
            memoryUseCount = 4 + (deviceCurrentBytes == null ? 0 : deviceCurrentBytes.length)
                            + (deviceMaxBytes == null ? 0 : deviceMaxBytes.length);
        }
        bufferSize += 4 + 9 * memoryUseCount; //Group header: 4 bytes (always present); Each entry in group - 1x MemoryType (uint8) + 1x int64 -> 1+8 = 9 bytes

        //Performance group length
        bufferSize += 4 + (performanceStatsPresent ? 32 : 0); //Group header: 4 bytes (always present); Only 1 group: 3xint64 + 2xfloat = 32 bytes

        //GC stats group length
        bufferSize += 4; //Group header: always present
        List<byte[]> gcStatsLabelBytes = null;
        if (gcStats != null && !gcStats.isEmpty()) {
            gcStatsLabelBytes = new ArrayList<>();
            for (int i = 0; i < gcStats.size(); i++) {
                GCStats stats = gcStats.get(i);
                bufferSize += 12; //Fixed per group entry: 2x int32 -> 8 bytes PLUS the header for the variable length GC name: another 4 bytes
                byte[] nameAsBytes = SbeUtil.toBytes(true, stats.gcName);
                bufferSize += nameAsBytes.length;
                gcStatsLabelBytes.add(nameAsBytes);
            }
        }

        //Param names group
        bufferSize += 4; //Header; always present
        List<String> paramNames = getParamNames();
        for (String s : paramNames) {
            bufferSize += 4; //header for each entry
            bufferSize += SbeUtil.toBytes(true, s).length; //Content
        }

        //Layer names group
        bufferSize += 4; //Header; always present
        List<String> layerNames = getlayerNames();
        for (String s : layerNames) {
            bufferSize += 4;
            bufferSize += SbeUtil.toBytes(true, s).length; //Content
        }

        //Per parameter and per layer (activations) stats group length
        bufferSize += 4; //Per parameter/layer stats group header: always present
        int nEntries = paramNames.size() + layerNames.size();
        bufferSize += nEntries * 12; //Each parameter/layer entry: has learning rate -> float -> 4 bytes PLUS headers for 2 nested groups: 2*4 = 8 each -> 12 bytes total
        bufferSize += entrySize(paramNames, StatsType.Parameters, StatsType.Gradients, StatsType.Updates);
        bufferSize += entrySize(layerNames, StatsType.Activations);

        //Metadata group:
        bufferSize += 4; //Metadata group header: always present
        if (dataSetMetaData != null && !dataSetMetaData.isEmpty()) {
            for (byte[] b : dataSetMetaData) {
                bufferSize += 4 + b.length; //4 bytes header + content
            }
        }

        //Session/worker IDs
        byte[] bSessionID = SbeUtil.toBytes(true, sessionID);
        byte[] bTypeID = SbeUtil.toBytes(true, typeID);
        byte[] bWorkerID = SbeUtil.toBytes(true, workerID);
        bufferSize += bSessionID.length + bTypeID.length + bWorkerID.length;

        //Metadata class name:
        byte[] metaDataClassNameBytes = SbeUtil.toBytes(true, metaDataClassName);
        bufferSize += metaDataClassNameBytes.length;

        return bufferSize;
    }
801170
function() {
            var newMethods = $._.$.iot.extraCAMethods();
            $._.$.log && $._.$.log.debug('Adding CA methods:' +
                                         JSON.stringify(Object
                                                        .keys(newMethods)));
            myUtils.mixin($.handler, newMethods, true);
        }
1000152
function() {
      var properties = {
        normal: [],
        relational: [],
        derived: []
      };
      var privateProps = this._private || {};
      var relations = _.result(this, 'relations') || {};
      var derived = _.result(this, 'derived') || {};

      var isEditable = function(value) {
        if (!_.isObject(value)) {
          return true;
        } else if (_.isArray(value)) {
          var result = true;
          _.each(value, function(i) {
            result = result && isEditable(i);
          });
          return result;
        } else {
          try {
            JSON.stringify(value);
            return true;
          } catch (ex) {
            return false;
          }
        }
      };

      _.each(this.attributes, function(value, key) {
        if (privateProps[key]) {
          return;
        }
        var prop;
        if (relations && relations[key]) {
          properties.relational.push({
            key: key,
            data: {
              isRelation: true,
              name: value.getDebugName()
            }
          });
        } else if (derived && derived[key]) {
          properties.derived.push({
            key: key,
            data: {
              isDerived: derived[key],
              value: value,
              displayValue: isEditable(value) ? JSON.stringify(value) : Object.prototype.toString.call(value)
            }
          });
        } else {
          prop = {
            key: key,
            data: {
              isEditable: isEditable(value),
              isEditing: false,
              isRemovable: true,
              value: value
            }
          };

          prop.data.displayValue = prop.data.isEditable ? JSON.stringify(value) : Object.prototype.toString.call(value);
          properties.normal.push(prop);
        }
      });

      properties.normal = _.sortBy(properties.normal, 'key');
      properties.relational = _.sortBy(properties.relational, 'key');
      properties.derived = _.sortBy(properties.derived, 'key');

      return properties;
    }
1356909
public function ajouter()
    {
        $newIdPersonne=0;
        $formulaire = new formGenerator();
        if (isset($this->variablesPost['submit'])) {
            $modeAffichage='';
            if (isset($this->variablesGet['modeAffichage']) && $this->variablesGet['modeAffichage']!='') {
                $modeAffichage = $this->variablesGet['modeAffichage'];
            }


            switch ($modeAffichage) {
                case 'nouveauDossier':
                case "modifEvenement":
                    $tabForm = array(
                    'prenom'    => array('default'=> '',  'value' => '',  'required'=>false, 'error'=>'', 'type'=>'text'),
                    'nom'        => array('default'=> '',  'value' => '',  'required'=>true, 'error'=>'', 'type'=>'text'),
                    'description'    => array('default'=> '',  'value' => '',  'required'=>false, 'error'=>'', 'type'=>'text'),
                    'dateNaissance'    => array('default'=> '',  'value' => '',  'required'=>false, 'error'=>'', 'type'=>'date'),
                    'dateDeces'    => array('default'=> '',  'value' => '',  'required'=>false, 'error'=>'', 'type'=>'date'),
                    'metier'    => array('default'=> 'aucune' ,  'value' => '',  'required'=>false , 'error'=>'', 'type'=>'numeric',  'checkExist'=>
                                    array('table'=> 'metier',  'primaryKey'=> 'idMetier')));

                    break;

                default:
                    $tabForm = array(
                    'prenom'    => array('default'=> '',  'value' => '',  'required'=>false, 'error'=>'', 'type'=>'text'),
                    'nom'        => array('default'=> '',  'value' => '',  'required'=>true, 'error'=>'', 'type'=>'text'),
                    'description'    => array('default'=> '',  'value' => '',  'required'=>false, 'error'=>'', 'type'=>'text'),
                    'nouveauMetier'    => array('default'=> '',  'value' => '',  'required'=>false, 'error'=>'', 'type'=>'text'),
                    'dateNaissance'    => array('default'=> '',  'value' => '',  'required'=>false, 'error'=>'', 'type'=>'date'),
                    'dateDeces'    => array('default'=> '',  'value' => '',  'required'=>false, 'error'=>'', 'type'=>'date'),
                    'metier'    => array('default'=> 'aucune' ,  'value' => '',  'required'=>false , 'error'=>'', 'type'=>'numeric',  'checkExist'=>
                                    array('table'=> 'metier',  'primaryKey'=> 'idMetier')));

                    break;
            }
            $erreur = $formulaire->getArrayFromPost($tabForm);

            if (count($erreur) === 0) {
                $prenom = mysql_escape_string($tabForm['prenom']['value']);
                $nom    = mysql_escape_string($tabForm['nom']['value']);
                $description   = isset($_POST['descriptionPerson'])?mysql_escape_string($_POST['descriptionPerson']):mysql_escape_string(htmlspecialchars($tabForm['description']['value']));
                $dateNaissance = $this->date->toBdd($this->date->convertYears($tabForm['dateNaissance']['value']));
                $dateDeces     = $this->date->toBdd($this->date->convertYears($tabForm['dateDeces']['value']));

                /*if (!empty($tabForm['nouveauMetier']['value']))
                {
                    // nouveau metier
                    $nomMetier = mysql_escape_string($tabForm['nouveauMetier']['value']);
                    $sql = "SELECT idMetier FROM metier WHERE nom='".$nomMetier."' LIMIT 1";
                    $rep = $this->connexionBdd->requete($sql);
                    if (mysql_num_rows($rep) === 1)
                    {
                        $res = mysql_fetch_object($rep);
                        $idMetier = $res->idMetier;
                        echo "métier existe";
                    }
                    else
                    {
                        $sql = "INSERT INTO metier (nom) VALUES ('".$nomMetier."')";
                        $this->connexionBdd->requete($sql);
                        $idMetier = mysql_insert_id();
                        echo 'métier existe pas';
                    }
                }
                else if (empty($tabForm['metier']['error']) AND !empty($tabForm['metier']['value']))
                {*/
                    // valeur du select
                    $idMetier      = $tabForm['metier']['value'];
                    //echo 'métier select';
                /*}
                else
                {
                    // choix par défaut
                    $idMetier = 1;
                    echo 'défaut';
                }*/
                $sql ="INSERT INTO personne (prenom,  nom,  dateNaissance,  dateDeces,  description,  idMetier ) VALUES
                    ('".$prenom."', '".$nom."', '".$dateNaissance."', '".$dateDeces."', '".$description."', ".$idMetier.")";


                $this->connexionBdd->requete($sql);

                $newIdPersonne = mysql_insert_id();
            } else {
                $this->erreurs->ajouter($tabForm);
            }
            $this->erreurs->ajouter($tabForm);
        }

        return $newIdPersonne;
    }
84854
@Override
    protected void doPost(final HttpServletRequest req, final HttpServletResponse res) throws ServletException, IOException {
        LOG.debug("Entering");
        final AtomHandler handler = createAtomRequestHandler(req, res);
        final String userName = handler.getAuthenticatedUsername();
        if (userName != null) {
            final AtomRequest areq = new AtomRequestImpl(req);
            try {
                if (handler.isCollectionURI(areq)) {

                    if (req.getContentType().startsWith("application/atom+xml")) {

                        // parse incoming entry
                        final Entry entry = Atom10Parser.parseEntry(new BufferedReader(new InputStreamReader(req.getInputStream(), "UTF-8")), null, Locale.US);

                        // call handler to post it
                        final Entry newEntry = handler.postEntry(areq, entry);

                        // set Location and Content-Location headers
                        for (final Object element : newEntry.getOtherLinks()) {
                            final Link link = (Link) element;
                            if ("edit".equals(link.getRel())) {
                                res.addHeader("Location", link.getHrefResolved());
                                break;
                            }
                        }
                        for (final Object element : newEntry.getAlternateLinks()) {
                            final Link link = (Link) element;
                            if ("alternate".equals(link.getRel())) {
                                res.addHeader("Content-Location", link.getHrefResolved());
                                break;
                            }
                        }

                        // write entry back out to response
                        res.setStatus(HttpServletResponse.SC_CREATED);
                        res.setContentType("application/atom+xml; type=entry; charset=utf-8");

                        final Writer writer = res.getWriter();
                        Atom10Generator.serializeEntry(newEntry, writer);
                        writer.close();

                    } else if (req.getContentType() != null) {

                        // get incoming title and slug from HTTP header
                        final String title = areq.getHeader("Title");

                        // create new entry for resource, set title and type
                        final Entry resource = new Entry();
                        resource.setTitle(title);
                        final Content content = new Content();
                        content.setType(areq.getContentType());
                        resource.setContents(Collections.singletonList(content));

                        // hand input stream off to hander to post file
                        final Entry newEntry = handler.postMedia(areq, resource);

                        // set Location and Content-Location headers
                        for (final Object element : newEntry.getOtherLinks()) {
                            final Link link = (Link) element;
                            if ("edit".equals(link.getRel())) {
                                res.addHeader("Location", link.getHrefResolved());
                                break;
                            }
                        }
                        for (final Object element : newEntry.getAlternateLinks()) {
                            final Link link = (Link) element;
                            if ("alternate".equals(link.getRel())) {
                                res.addHeader("Content-Location", link.getHrefResolved());
                                break;
                            }
                        }

                        res.setStatus(HttpServletResponse.SC_CREATED);
                        res.setContentType("application/atom+xml; type=entry; charset=utf-8");

                        final Writer writer = res.getWriter();
                        Atom10Generator.serializeEntry(newEntry, writer);
                        writer.close();

                    } else {
                        res.sendError(HttpServletResponse.SC_UNSUPPORTED_MEDIA_TYPE, "No content-type specified in request");
                    }

                } else {
                    res.sendError(HttpServletResponse.SC_NOT_FOUND, "Invalid collection specified in request");
                }
            } catch (final AtomException ae) {
                res.sendError(ae.getStatus(), ae.getMessage());
                LOG.debug("An error occured while processing POST", ae);
            } catch (final Exception e) {
                res.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage());
                LOG.debug("An error occured while processing POST", e);
            }
        } else {
            res.setHeader("WWW-Authenticate", "BASIC realm=\"AtomPub\"");
            res.sendError(HttpServletResponse.SC_UNAUTHORIZED);
        }
        LOG.debug("Exiting");
    }
886466
public function index()
    {
        //  Set method info
        $this->data['page']->title = 'Manage ' . ucfirst($this->data['postNamePlural']);

        // --------------------------------------------------------------------------

        $sTableAlias = $this->blog_post_model->getTableAlias();

        // --------------------------------------------------------------------------

        //  Get pagination and search/sort variables
        $iPage      = (int) $this->input->get('page') ? (int) $this->input->get('page') : 0;
        $iPerPage   = (int) $this->input->get('perPage') ? (int) $this->input->get('perPage') : 50;
        $sSortOn    = $this->input->get('sortOn') ? $this->input->get('sortOn') : $sTableAlias . '.published';
        $sSortOrder = $this->input->get('sortOrder') ? $this->input->get('sortOrder') : 'desc';
        $sKeywords  = $this->input->get('keywords') ? $this->input->get('keywords') : '';

        // --------------------------------------------------------------------------

        //  Define the sortable columns
        $aSortColumns = array(
            $sTableAlias . '.published' => 'Published Date',
            $sTableAlias . '.modified'  => 'Modified Date',
            $sTableAlias . '.title'     => 'Title'
        );

        // --------------------------------------------------------------------------

        //  Checkbox filters
        $aCbFilters   = array();
        $aCbFilters[] = Helper::searchFilterObject(
            $sTableAlias . '.is_published',
            'State',
            array(
                array('Published', true, true),
                array('Unpublished', false, true)
            )
        );

        //  Generate options
        $filterOpts = array();
        foreach ($this->data['postTypes'] as $sValue => $sLabel) {
            $filterOpts[] = array($sLabel, $sValue, true);
        }

        $aCbFilters[] = Helper::searchFilterObject(
            $sTableAlias . '.type',
            'Type',
            $filterOpts
        );

        // --------------------------------------------------------------------------

        //  Define the $aData variable for the queries
        $aData = array(
            'where' => array(
                array(
                    'column' => 'blog_id',
                    'value' => $this->blog->id
                )
            ),
            'sort' => array(
                array($sSortOn, $sSortOrder)
            ),
            'keywords' => $sKeywords,
            'cbFilters' => $aCbFilters
        );

        //  Get the items for the page
        $iTotalRows          = $this->blog_post_model->countAll($aData);
        $this->data['posts'] = $this->blog_post_model->getAll($iPage, $iPerPage, $aData);

        //  Set Search and Pagination objects for the view
        $this->data['search']     = Helper::searchObject(true, $aSortColumns, $sSortOn, $sSortOrder, $iPerPage, $sKeywords, $aCbFilters);
        $this->data['pagination'] = Helper::paginationObject($iPage, $iPerPage, $iTotalRows);

        //  Add a header button
        if (userHasPermission('admin:blog:post:' . $this->blog->id . ':create')) {

            Helper::addHeaderButton(
                'admin/blog/post/create/' . $this->blog->id,
                'New ' . ucfirst($this->data['postName'])
            );
        }

        // --------------------------------------------------------------------------

        Helper::loadView('index');
    }
641365
@Override
    public String getMethod() {
        ServletRESTRequestImpl ret = castRequest();
        if (ret != null)
            return ret.getMethod();
        return null;
    }
933408
private function processCategory(array $element, $parent = null)
    {
        if ($this->isMasterCategory($element)) {
            $this->createCategory($element, MasterCategoryElement::class, $this->parseResult);
        }

        if ($this->isResourceGroup($element)) {
            $this->createCategory($element, ResourceGroupElement::class, $parent);
        }

        if ($this->isDataStructureCategory($element)) {
            $this->createCategory($element, DataStructureCategoryElement::class, $parent);
        }
    }
844913
public function chamar(
        Request $request,
        AtendimentoService $atendimentoService,
        FilaService $filaService,
        UsuarioService $usuarioService,
        TranslatorInterface $translator
    ) {
        $envelope = new Envelope();
        
        $attempts = 5;
        $proximo = null;
        $success = false;
        $usuario = $this->getUser();
        $unidade = $usuario->getLotacao()->getUnidade();
        
        // verifica se ja esta atendendo alguem
        $atual = $atendimentoService->atendimentoAndamento($usuario->getId(), $unidade);

        // se ja existe um atendimento em andamento (chamando senha novamente)
        if ($atual) {
            $success = true;
            $proximo = $atual;
        } else {
            $local    = $this->getNumeroLocalAtendimento($usuarioService, $usuario);
            $servicos = $usuarioService->servicos($usuario, $unidade);

            do {
                $tipo         = $this->getTipoAtendimento($usuarioService, $usuario);
                $atendimentos = $filaService->filaAtendimento($unidade, $usuario, $servicos, $tipo, 1);
                if (count($atendimentos)) {
                    $proximo = $atendimentos[0];
                    $success = $atendimentoService->chamar($proximo, $usuario, $local);
                    if (!$success) {
                        usleep(100);
                    }
                    --$attempts;
                } else {
                    // nao existe proximo
                    break;
                }
            } while (!$success && $attempts > 0);
        }
        
        // response
        if (!$success) {
            if (!$proximo) {
                throw new Exception(
                    $translator->trans('error.queue.empty', [], self::DOMAIN)
                );
            } else {
                throw new Exception(
                    $translator->trans('error.attendance.in_process', [], self::DOMAIN)
                );
            }
        }

        $atendimentoService->chamarSenha($unidade, $proximo);

        $data = $proximo->jsonSerialize();
        $envelope->setData($data);

        return $this->json($envelope);
    }
27016
public void writeMethodInterface(String strProtection, String strMethodName, String strReturns, String strParams, String strThrows, String strDescription, String strCodeBody)
    {
        if ((strProtection == null) || (strProtection.length() == 0))
            strProtection = "public";
        String strInterfaceEnd = "\n";
        if (strCodeBody == null)
            strCodeBody = "{\n";
        if (";\n".equals(strCodeBody))
        {
            strInterfaceEnd = strCodeBody;
            strCodeBody = null;
        }
        String strDesc = strDescription;
        if (strDesc.length() == 0)
        {
            strDesc = strMethodName + " Method";
            strDesc = new Character(Character.toUpperCase(strDesc.charAt(0))) + strDesc.substring(1);
        }
        strDesc = this.convertDescToJavaDoc(strDesc);
        if (strThrows.length() > 0)
            strThrows = " throws " + strThrows;
        m_StreamOut.writeit("/**\n" + strDesc + "\n */\n");
        if (strParams.equalsIgnoreCase("void"))
            strParams = DBConstants.BLANK;
        if (strReturns.length() == 0)
        {
            m_StreamOut.writeit("public " + strMethodName + "(" + strParams + ")" + strThrows + "\n");
            m_strParams = strParams;    // Also default params for Init() call!
        }
        else
            m_StreamOut.writeit(strProtection + " " + strReturns + " " + strMethodName + "(" + strParams + ")" + strThrows + strInterfaceEnd);
        if (strCodeBody != null)
            m_StreamOut.writeit(strCodeBody);
    }
381587
public function index() {
        $this->layout = 'Stats.default';
        $this->elementMenu = 'Stats.menu';
        
        // por default ordenar por sumatoria de dinero vendido
        $conditions['order'] = array('ventas DESC',"cant DESC");
        if ( !empty( $this->request->query ) && $this->request->query['cant_o_tot'] == 1 ) {
            // ordenado por cantidad de unidades vendidas            
            $conditions['order'] = array("cant DESC", 'ventas DESC');
        }

        

        $this->Prg->commonProcess();
        $conds = $this->DetalleComanda->parseCriteria( $this->Prg->parsedParams() );
        $conditions['conditions'] = $conds;
        $conditions['conditions']['Mesa.deleted'] = 0;


		$this->DetalleComanda->Producto->recursive = -1;        
        $conditions['group'] = array('Producto.id', 'Producto.name');        
        $conditions['joins'] = array(
            array(
                'table' => 'detalle_comandas',
                'alias' => 'DetalleComanda',
                'type' => 'left',
                'conditions' => 'Producto.id = DetalleComanda.producto_id',
            ),
            array(
                'table' => 'comandas',
                'alias' => 'Comanda',
                'type' => 'left',
                'conditions' => 'Comanda.id = DetalleComanda.comanda_id',
            ),
            array(
                'table' => 'mesas',
                'alias' => 'Mesa',
                'type' => 'left',
                'conditions' => 'Mesa.id = Comanda.mesa_id',
            ), 
        );
        $conditions['fields'] = array(
            'Producto.name', 
            'sum(DetalleComanda.cant-DetalleComanda.cant_eliminada)*Producto.precio as "ventas"',
            'Producto.precio', 
            'sum(DetalleComanda.cant-DetalleComanda.cant_eliminada) as "cant"',
            );


        if ( empty($this->request->query['desde']) ) {
            $desde = $this->DetalleComanda->find('first', array(
                'order' => array('DetalleComanda.created' => 'ASC')
                ));
            $desde = $desde['DetalleComanda']['created'];
        } else {
            $desde = $this->request->query['desde'];
        }

        if ( empty($this->request->query['hasta']) ) {
            $hasta = $this->DetalleComanda->find('first', array(
                'order' => array('DetalleComanda.created' => 'DESC')
                ));
            $hasta = $hasta['DetalleComanda']['created'];
        } else {
            $hasta = $this->request->query['hasta'];
        }
                                

        $comandas  = $this->DetalleComanda->Producto->find('all', $conditions);
        $cantTotal = 0;
        $ventasTotal = 0;
        foreach ($comandas as $c) {
            $cantTotal += $c[0]['cant'];
            $ventasTotal += $c[0]['ventas'];
        }

        if ( !empty( $this->request->query ) && $this->request->query['cant_o_tot'] == 1 ) {
            $this->request->data['DetalleComanda']['cant_o_tot']  = 1;
        }

        $this->set('categorias', $this->DetalleComanda->Producto->Categoria->generateTreeList());
        $this->set('productos', $this->DetalleComanda->Producto->find('list', array('order' => 'name')));
        $this->set('tags', $this->DetalleComanda->Producto->Tag->find('list', array('order' => 'name')));
		$this->set(compact('comandas', 'cantTotal', 'ventasTotal','tags', 'desde', 'hasta'));
	}
1344959
function(cb) {
		var todos = [], prevTodos;
		var model = this;

		open().then(function(db){
			var os = db.transaction(["todos"], "readwrite")
				.objectStore("todos");

			var req = os.openCursor();

			req.onsuccess = function(e){
				var cursor = e.target.result;
				if(cursor){
					todos.push(cursor.value);
					cursor.continue();
				} else {
					prevTodos = todos.slice();
					cb.call(model, todos);
					done();
				}
			};

			function done(){
				(todos || []).forEach(function(todo){
					os.put(todo);
				});
				prevTodos.forEach(function(todo){
					if(todos.indexOf(todo) === -1) {
						os["delete"](todo.text);
					}
				});
			}
		});
	  }
273703
function _process_submission($method) {
        $submission = array();
        if (!empty($this->_ajaxformdata)) {
            $submission = $this->_ajaxformdata;
        } else if ($method == 'post') {
            if (!empty($_POST)) {
                $submission = $_POST;
            }
        } else {
            $submission = $_GET;
            merge_query_params($submission, $_POST); // Emulate handling of parameters in xxxx_param().
        }

        // following trick is needed to enable proper sesskey checks when using GET forms
        // the _qf__.$this->_formname serves as a marker that form was actually submitted
        if (array_key_exists('_qf__'.$this->_formname, $submission) and $submission['_qf__'.$this->_formname] == 1) {
            if (!confirm_sesskey()) {
                print_error('invalidsesskey');
            }
            $files = $_FILES;
        } else {
            $submission = array();
            $files = array();
        }
        $this->detectMissingSetType();

        $this->_form->updateSubmission($submission, $files);
    }
848488
public function defineMethods()
    {
        parent::defineMethods();

        if (static::class === self::class) {
            return;
        }

        // Set up accessors for joined items
        if ($manyMany = $this->manyMany()) {
            foreach ($manyMany as $relationship => $class) {
                $this->addWrapperMethod($relationship, 'getManyManyComponents');
            }
        }
        if ($hasMany = $this->hasMany()) {
            foreach ($hasMany as $relationship => $class) {
                $this->addWrapperMethod($relationship, 'getComponents');
            }
        }
        if ($hasOne = $this->hasOne()) {
            foreach ($hasOne as $relationship => $class) {
                $this->addWrapperMethod($relationship, 'getComponent');
            }
        }
        if ($belongsTo = $this->belongsTo()) {
            foreach (array_keys($belongsTo) as $relationship) {
                $this->addWrapperMethod($relationship, 'getComponent');
            }
        }
    }
717307
protected void moskitoDoPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
		super.doPost(req, res);
	}
688967
@Override
    public int doEndTag() throws JspException {
        Tag t = findAncestorWithClass(this, ParamParent.class);
        if (t == null) {
            throw new JspTagException(
                    Resources.getMessage("PARAM_OUTSIDE_PARENT"));
        }

        // take no action for null or empty names
        if (name == null || name.equals("")) {
            return EVAL_PAGE;
        }

        // send the parameter to the appropriate ancestor
        ParamParent parent = (ParamParent) t;
        String value = this.value;
        if (value == null) {
            if (bodyContent == null || bodyContent.getString() == null) {
                value = "";
            } else {
                value = bodyContent.getString().trim();
            }
        }
        if (encode) {
            String enc = pageContext.getResponse().getCharacterEncoding();
            try {
                parent.addParameter(URLEncoder.encode(name, enc), URLEncoder.encode(value, enc));
            } catch (UnsupportedEncodingException e) {
                throw new JspTagException(e);
            }
        } else {
            parent.addParameter(name, value);
        }
        return EVAL_PAGE;
    }
505741
function self_method(data, methods) {
            if (!data) {
                return data;
            }

            var i, ii, prop;

            if (data.constructor === ({}).constructor) {
                for (prop in data) {
                    if (_.isUndefined(data[prop])) {
                        delete data[prop];
                        continue;
                    }

                    data[prop] = self_method(data[prop], methods);
                }
            }
            else if (_.isArray(data)) {
                for (i = 0, ii = data.length; i < ii; ++i) {
                    if (_.isUndefined(data[i])) {
                        --i; --ii;
                        continue;
                    }

                    data[i] = self_method(data[i], methods);
                }
            }
            else {

                methods = _.extend({}, methods, { __getData: null });

                _.each(methods, function(params, method) {

                    if (!_.isFunction(data[method])) {
                        return;
                    }

                    if (_.isNull(params) || _.isUndefined(params)) {
                        params = [];
                    }
                    if (!_.isArray(params)) {
                        params = [params];
                    }

                    data = data[method].apply(data, params);
                });
            }

            return data;
        }