endregion region ÜRÜN
18365
function f_temp_sil_urun(_tahta_id) {
    if (_tahta_id) {
        return db.redis.dbQ.del(db.redis.kp.temp.ssetTahtaUrun(_tahta_id));
    } else {
        return null;
    }
}
1312829
public String resolveEndpointUri(Message message, String defaultUri) {
        Map<String, Object> headers = message.getHeaders();

        String requestUri;
        if (headers.containsKey(ENDPOINT_URI_HEADER_NAME)) {
            requestUri = headers.get(ENDPOINT_URI_HEADER_NAME).toString();
        } else if (StringUtils.hasText(defaultUri)) {
            requestUri = defaultUri;
        } else {
            requestUri = defaultEndpointUri;
        }

        if (requestUri == null) {
            throw new CitrusRuntimeException("Unable to resolve dynamic endpoint uri! Neither header entry '" +
                    ENDPOINT_URI_HEADER_NAME + "' nor default endpoint uri is set");
        }

        requestUri = appendRequestPath(requestUri, headers);
        requestUri = appendQueryParams(requestUri, headers);

        return requestUri;
    }
147722
@Override
    public void endElement(String uri, String localName, String qName) throws SAXException {
        if ("Node".equals(qName)) {
            node = new Node(this.name, this.np, this.ntype, QueueState.fromString(this.state));
            if (StringUtils.isNotBlank(properties)) {
                final String[] props = properties.split(",");
                for (final String prop : props) {
                    node.getProperties().add(prop);
                }
            }
            if (StringUtils.isNotBlank(status)) {
                final String[] statuses = status.split(",");
                for (final String statuss : statuses) {
                    if (statuss.indexOf('=') > 0) {
                        String[] temp = statuss.split("=");
                        if (temp.length == 2)
                            node.getStatus().put(temp[0].trim(), temp[1].trim());
                    }
                }
            }
            if (StringUtils.isNotBlank(jobs)) {
                final String[] jobses = jobs.split(",");
                for (String jobss : jobses) {
                    if (jobss.indexOf('/') > 0) {
                        String[] temp = jobss.split("/");
                        if (temp.length == 2) {
                            int index = Integer.parseInt(temp[0].trim());
                            String name = temp[1];
                            Job job = new Job();
                            job.setQueueIndex(index);
                            job.setName(name);
                            node.getJobs().add(job);
                        }
                    }
                }
            }
            this.nodes.add(node);
        }
    }
765163
@Override
    public void endElement(String uri, String localName, String qName) throws SAXException {
        if (HINT.equals(qName) && rule != null) {
            hintRules.add(rule);
            rule = null;
        }
    }
495258
def beginning_of_each(unit, options = {}, &block)
      iterate(unit, options.merge(:map_result => false, :beginning_of => true), &block)
    end
1050709
function f_urun_sil(_tahta_id, _urun_id, _kul_id) {
        //l.info("silinecek ürün_id:" + _urun_id);

        // Validasyon yapalım
        if (!_urun_id) {
            throw new exception.Istisna("Ürün Silinemedi!", "Silinecek ürün bulunamadı! Tekrar deneyiniz.");
        }

        /** @type {OptionsUrun} */
        var opts = {};
        opts.bArrAnahtarKelimeler = false;
        opts.bArrIliskiliFirmalar = false;
        opts.bUreticiKurum = false;

        return f_urun_id(_urun_id, _tahta_id, opts)
            .then(function (_dbUrun) {

                emitter.emit(schema.SABIT.OLAY.URUN_SILINDI, _dbUrun, _tahta_id, _kul_id);

                return result.dbQ.Q.all([
                    result.dbQ.srem(result.kp.tahta.ssetOzelUrunleri(_tahta_id, true), _urun_id),
                    result.dbQ.sadd(result.kp.tahta.ssetOzelUrunleri(_tahta_id, false), _urun_id)

                ]).then(function () {

                    return result.dbQ.smembers(result.kp.urun.ssetTeklifleri(_tahta_id, _urun_id))
                        .then(function (_iTeklif_idler) {
                            if (Array.isArray(_iTeklif_idler) && _iTeklif_idler.length > 0) {

                                // teklif verilmiş
                                return [
                                    result.dbQ.hdel(result.kp.teklif.hsetUrunleri, _iTeklif_idler),
                                    result.dbQ.srem(result.kp.urun.ssetTeklifleri(_tahta_id, _urun_id), _iTeklif_idler)
                                ]
                                    .allX()
                                    .then(function () {
                                        return _urun_id;
                                    });
                            }
                            return _urun_id;
                        });
                });
            });


    }
92413
@Override
    public void endElement(String uri, String localName, String name) throws SAXException {
        if ("table".equals(name)) {
            for (final Column column : this.currentColumns.values()) {
                this.currentTable.addColumn(column);
            }

            if (this.primaryKey != null) {
                this.currentTable.setPrimaryKey(this.primaryKey);
            }

            this.tables.put(this.currentTable.getName(), this.currentTable);
            this.tableColumnTypes.put(this.currentTable.getName(), this.currentColumnTypes);
            this.primaryKey = null;
            this.currentColumns = null;
            this.currentColumnTypes = null;
            this.currentTable = null;
        } else if ("column".equals(name)) {
            this.currentColumns.put(this.currentColumn.getName(), this.currentColumn);
            this.currentColumn = null;
        } else if ("name".equals(name)) {
            final String itemName = this.chars.toString().trim();

            if (this.currentIndex != null) {
                this.currentIndex.setName(itemName);
            } else if (this.currentUnique != null) {
                this.currentUnique.setName(itemName);
            } else if (this.currentTable == null) {
                this.currentTable = new Table(itemName);
            } else if (this.currentColumn == null) {
                this.currentColumn = new Column(itemName);
            }
        } else if ("type".equals(name)) {
            final String sqlTypeName = this.chars.toString().trim();

            final int sqlType = this.getSqlType(sqlTypeName);
            this.currentColumnTypes.put(this.currentColumn.getName(), sqlType);

            final String hibType = this.getHibernateType(sqlType);

            final SimpleValue value = new SimpleValue(this.mappings, this.currentTable);
            value.setTypeName(hibType);

            this.currentColumn.setValue(value);
        } else if ("param".equals(name)) {
            final String param = this.chars.toString().trim();

            final Integer length = Integer.valueOf(param);
            this.currentColumn.setLength(length);
        } else if ("primary-key".equals(name)) {
            final String columnName = this.chars.toString().trim();

            if (this.primaryKey == null) {
                this.primaryKey = new PrimaryKey();
            }

            final Column column = this.currentColumns.get(columnName);
            this.primaryKey.addColumn(column);
        } else if ("not-null".equals(name)) {
            final String columnName = this.chars.toString().trim();
            final Column column = this.currentColumns.get(columnName);
            column.setNullable(false);
        } else if ("column-ref".equals(name)) {
            final String columnName = this.chars.toString().trim();
            final Column column = this.currentColumns.get(columnName);

            if (this.currentIndex != null) {
                this.currentIndex.addColumn(column);
            } else if (this.currentUnique != null) {
                this.currentUnique.addColumn(column);
            }
        } else if ("index".equals(name)) {
            this.currentTable.addIndex(this.currentIndex);
            this.currentIndex = null;
        } else if ("unique".equals(name)) {
            this.currentTable.addUniqueKey(this.currentUnique);
            this.currentUnique = null;
        } else if ("key".equals(name)) {
            this.logger.warn(
                    "the 'key' element is ignored, use the table level 'primary-key' element instead");
        }

        this.chars = null;
    }
1120104
def _region_to_coords(region):
    
    chrom, coords = region.split(":")
    start, end = coords.split("-")
    return (chrom, int(start), int(end))
916742
def end(self):
    """"""
    self.end_time = time.time()

    return self.path(), self.duration(), self._self_time(), self.has_label(WorkUnitLabel.TOOL)
613312
public final void endElement(
        final String namespaceURI,
        final String localName,
        final String name)
        throws org.xml.sax.SAXException
    {
        // deal with any pending issues
        if (m_cdataTagOpen)
            closeCDATA();

        // if the element has a namespace, treat it like XML, not HTML
        if (null != namespaceURI && namespaceURI.length() > 0)
        {
            super.endElement(namespaceURI, localName, name);

            return;
        }

        try
        {

            ElemContext elemContext = m_elemContext;
            final ElemDesc elemDesc = elemContext.m_elementDesc;
            final int elemFlags = elemDesc.getFlags();
            final boolean elemEmpty = (elemFlags & ElemDesc.EMPTY) != 0;

            // deal with any indentation issues
            if (m_doIndent)
            {
                final boolean isBlockElement = (elemFlags&ElemDesc.BLOCK) != 0;
                boolean shouldIndent = false;

                if (m_ispreserve)
                {
                    m_ispreserve = false;
                }
                else if (m_doIndent && (!m_inBlockElem || isBlockElement))
                {
                    m_startNewLine = true;
                    shouldIndent = true;
                }
                if (!elemContext.m_startTagOpen && shouldIndent)
                    indent(elemContext.m_currentElemDepth - 1);
                m_inBlockElem = !isBlockElement;
            }

            final java.io.Writer writer = m_writer;
            if (!elemContext.m_startTagOpen)
            {
                writer.write("</");
                writer.write(name);
                writer.write('>');
            }
            else
            {
                // the start-tag open when this method was called,
                // so we need to process it now.
                
                if (m_tracer != null)
                    super.fireStartElem(name);

                // the starting tag was still open when we received this endElement() call
                // so we need to process any gathered attributes NOW, before they go away.
                int nAttrs = m_attributes.getLength();
                if (nAttrs > 0)
                {
                    processAttributes(m_writer, nAttrs);
                    // clear attributes object for re-use with next element
                    m_attributes.clear();
                }
                if (!elemEmpty)
                {
                    // As per Dave/Paul recommendation 12/06/2000
                    // if (shouldIndent)
                    // writer.write('>');
                    //  indent(m_currentIndent);

                    writer.write("></");
                    writer.write(name);
                    writer.write('>');
                }
                else
                {
                    writer.write('>');
                }
            }
            
            // clean up because the element has ended
            if ((elemFlags & ElemDesc.WHITESPACESENSITIVE) != 0)
                m_ispreserve = true;
            m_isprevtext = false;

            // fire off the end element event
            if (m_tracer != null)
                super.fireEndElem(name);            
                           
            // OPTIMIZE-EMPTY                
            if (elemEmpty)
            {
                // a quick exit if the HTML element had no children.
                // This block of code can be removed if the corresponding block of code
                // in startElement() also labeled with "OPTIMIZE-EMPTY" is also removed
                m_elemContext = elemContext.m_prev;
                return;
            }

            // some more clean because the element has ended. 
            if (!elemContext.m_startTagOpen)
            {
                if (m_doIndent && !m_preserves.isEmpty())
                    m_preserves.pop();
            }
            m_elemContext = elemContext.m_prev;
//            m_isRawStack.pop();
        }
        catch (IOException e)
        {
            throw new SAXException(e);
        }
    }
927406
function checkUri1(i) {
  const start = i;
  let l;

  if (l = checkSC(i)) i += l;

  while (i < tokensLength) {
    if (l = checkInterpolation(i) || checkUriRaw(i)) i += l;
    else break;
  }

  if (l = checkSC(i)) i += l;

  // Check that we are at the end of the uri
  if (i < tokens[start - 1].right) return 0;

  tokens[start].uri_end = i;

  return i - start;
}
1317666
function getUri() {
  const startPos = pos;
  const uriExcluding = {};
  let uri;
  let token;
  let l;
  let raw;

  pos += 2;

  uriExcluding[TokenType.Space] = 1;
  uriExcluding[TokenType.Tab] = 1;
  uriExcluding[TokenType.Newline] = 1;
  uriExcluding[TokenType.LeftParenthesis] = 1;
  uriExcluding[TokenType.RightParenthesis] = 1;

  if (checkUri1(pos)) {
    uri = []
        .concat(getSC())
        .concat([getString()])
        .concat(getSC());
  } else {
    uri = getSC();
    l = checkExcluding(uriExcluding, pos);
    token = tokens[pos];
    raw = newNode(NodeType.RawType, joinValues(pos, pos + l), token.ln,
        token.col);

    uri.push(raw);

    pos += l + 1;

    uri = uri.concat(getSC());
  }

  token = tokens[startPos];
  const line = token.ln;
  const column = token.col;
  const end = getLastPosition(uri, line, column, 1);
  pos++;

  return newNode(NodeType.UriType, uri, line, column, end);
}
74041
function Region() {

        this.subRegions = [];

        this.nSubRegions = 0;

        this.node = null;

        this.mass = 0;

        this.centerOfMass = null;

        this.bbox = new Float32Array(4);

        this.size = 0;
    }
244791
def area_uri(self, area_uuid):
        
        if area_uuid not in self.areas:
            raise UploadException("I don't know about area {uuid}".format(uuid=area_uuid))
        return UploadAreaURI(self._config.upload.areas[area_uuid]['uri'])
88549
function f_urunun_teklif_verildigi_fiyatlari(_tahta_id, _urun_id, _parabirim_id) {
        return f_urun_teklif_temp(_tahta_id, _urun_id, _parabirim_id)
            .then(function () {
                return result.dbQ.zrangebyscore(result.kp.temp.zsetUrunTeklifleriParaBirimli(_tahta_id, _urun_id, _parabirim_id), "-inf", "+inf")
                    .then(function (_teklif_idler) {
                        if (Array.isArray(_teklif_idler) && _teklif_idler.length > 0) {

                            var db_teklif = require('./db_teklif');

                            /** @type {OptionsTeklif} */
                            var opts = db_teklif.OptionsTeklif({
                                bArrUrunler: false,
                                bKalemBilgisi: false,
                                bIhaleBilgisi: false,
                                bKurumBilgisi: false,
                                optUrun: {}
                            });

                            return db_teklif.f_db_teklif_id(_teklif_idler, _tahta_id, opts)
                                .then(function (_teklifler) {
                                    var teklifler = [].concat(_teklifler);
                                    //sadece teklif fiyatlarını al
                                    //aynı fiyatları yazmaya gerek yok filtrele ve sırala
                                    return _.uniq(_.map(teklifler, "Fiyat"), true);
                                });

                        } else {
                            return [];
                        }
                    });
            });
    }
1097604
def end_workunit(self, workunit):
    """"""
    if workunit in self._workunits_to_spans:
      span = self._workunits_to_spans.pop(workunit)
      span.stop()
120856
public void endInvalidatingRegion() {
		synchronized (this) {
			if (--regionInvalidations == 0) {
				regionInvalidationTimestamp = timeSource.nextTimestamp();
				if (trace) {
					log.tracef("Finished invalidating region %s at %d", cache.getName(), regionInvalidationTimestamp);
				}
			}
			else {
				if (trace) {
					log.tracef("Finished invalidating region %s, but there are %d ongoing invalidations", cache.getName(), regionInvalidations);
				}
			}
		}
	}