endregion region ROL_İD
439604
function f_rol_id(_id) {
        return Array.isArray(_id)
            ? result.dbQ.hmget_json_parse(result.kp.rol.tablo, _id)
            : result.dbQ.hget_json_parse(result.kp.rol.tablo, _id);
    }
1064255
function f_rol_ekle(_rol, _tahta_id) {

        return result.dbQ.incr(result.kp.rol.idx)
            .then(function (_id) {
                _rol.Id = _id;
                // 1. Rollere ekleyelim
                // 2. Tahtayla ilişkilendirelim
                return result.dbQ.Q.all([
                    result.dbQ.hset(result.kp.rol.tablo, _id, JSON.stringify(_rol)),// 1
                    result.dbQ.sadd(result.kp.tahta.ssetOzelTahtaRolleri(_tahta_id, true), _rol.Id) // 2
                ]).then(function () {
                    return f_ol_id(_rol.Id);
                });
            });
    }
125293
def _ep_for_region(self, region):
        
        rgn = region.upper()
        try:
            rgn_ep = [ep for ep in list(self.endpoints.values())
                    if ep.region.upper() == rgn][0]
        except IndexError:
            # See if there is an 'ALL' region.
            try:
                rgn_ep = [ep for ep in list(self.endpoints.values())
                        if ep.region.upper() == "ALL"][0]
            except IndexError:
                rgn_ep = None
        return rgn_ep
1140362
function(jid_or_user_id) {
        var jid;
        if (typeof jid_or_user_id === 'string') {
            jid = jid_or_user_id;
        } else if (typeof jid_or_user_id === 'number') {
            jid = jid_or_user_id + '-' + config.creds.appId + '@' + config.endpoints.chat;
        } else {
            throw new Error('The method "jidOrUserId" may take jid or id');
        }
        return jid;
    }
343681
private void boundaryAreaBoundaryLine_(int half_edge, int id_a, int id_b,
			int cluster_index_b) {
		if (m_matrix[MatrixPredicate.BoundaryBoundary] == 0)
			return;

		if (m_topo_graph.getHalfEdgeUserIndex(m_topo_graph
				.getHalfEdgePrev(m_topo_graph.getHalfEdgeTwin(half_edge)),
				m_visited_index) != 1) {
			int cluster = m_topo_graph.getHalfEdgeTo(half_edge);
			int clusterParentage = m_topo_graph.getClusterParentage(cluster);

			if ((clusterParentage & id_a) != 0) {
				int index = m_topo_graph.getClusterUserIndex(cluster,
						cluster_index_b);

				if ((clusterParentage & id_b) != 0 && (index % 2 != 0)) {
					assert (index != -1);
					m_matrix[MatrixPredicate.BoundaryBoundary] = 0;
				}
			}
		}
	}
509601
def _safe_region(region=None, context=None):
    """"""
    ret = region or settings.get("region")
    context = context or identity
    if not ret:
        # Nothing specified; get the default from the identity object.
        if not context:
            _create_identity()
            context = identity
        ret = context.get_default_region()
    if not ret:
        # Use the first available region
        try:
            ret = regions[0]
        except IndexError:
            ret = ""
    return ret
566940
def transaction_location_id=(transaction_location_id)
      if transaction_location_id.nil?
        fail ArgumentError, "transaction_location_id cannot be nil"
      end

      if transaction_location_id.to_s.length < 1
        fail ArgumentError, "invalid value for 'transaction_location_id', the character length must be great than or equal to 1."
      end

      @transaction_location_id = transaction_location_id
    end
124348
public String getAmazonRegion(String endpoint) {
        if (isBlank(endpoint)) {
            return DEFAULT_AMAZON_REGION;
        }
        final Pattern pattern = Pattern.compile("(https://)?(.+)?\\.(.+)\\."+AMAZON_HOSTNAME+"(\\.cn)?");
        final Matcher matcher = pattern.matcher(endpoint);
        if (matcher.find()) {
            return matcher.group(3);
        }
        return DEFAULT_AMAZON_REGION;
    }
478799
protected function getPulledRegionIDs()
    {
        if (!$this->request) {
            return array();
        }
        $header = $this->request->getHeader(self::PULL_HEADER);
        if (!empty($header)) {
            return explode(',', $header);
        }
        $param  = $this->request->requestVar(self::PULL_PARAM);
        if (!empty($param)) {
            return explode(',', $param);
        }
        return array();
    }
1312196
def find_region_end(self, lines):
        """"""
        if self.metadata and 'cell_type' in self.metadata:
            self.cell_type = self.metadata.pop('cell_type')
        else:
            self.cell_type = 'code'

        parser = StringParser(self.language or self.default_language)
        for i, line in enumerate(lines):
            # skip cell header
            if self.metadata is not None and i == 0:
                continue

            if parser.is_quoted():
                parser.read_line(line)
                continue

            parser.read_line(line)

            # New code region
            # Simple code pattern in LightScripts must be preceded with a blank line
            if self.start_code_re.match(line) or (
                    self.simple_start_code_re and self.simple_start_code_re.match(line) and
                    (self.cell_marker_start or i == 0 or _BLANK_LINE.match(lines[i - 1]))):

                if self.explicit_end_marker_required:
                    # Metadata here was conditioned on finding an explicit end marker
                    # before the next start marker. So we dismiss it.
                    self.metadata = None
                    self.language = None

                if i > 0 and _BLANK_LINE.match(lines[i - 1]):
                    if i > 1 and _BLANK_LINE.match(lines[i - 2]):
                        return i - 2, i, False
                    return i - 1, i, False
                return i, i, False

            if not self.ignore_end_marker and self.end_code_re:
                if self.end_code_re.match(line):
                    return i, i + 1, True
            elif _BLANK_LINE.match(line):
                if not next_code_is_indented(lines[i:]):
                    if i > 0:
                        return i, i + 1, False
                    if len(lines) > 1 and not _BLANK_LINE.match(lines[1]):
                        return 1, 1, False
                    return 1, 2, False

        return len(lines), len(lines), False
1241197
def create_region_from_border_clip(self, onerror = None):
    

    rid = self.display.allocate_resource_id()
    CreateRegionFromBorderClip(
        display = self.display,
        onerror = onerror,
        opcode = self.display.get_extension_major(extname),
        region = rid,
        window = self,
        )

    # FIXME: create Region object and return it
    return rid
846652
public EndMemberInfo getEndMemberInfo(int orgId, int userId) {
		return getResourceFactory().getApiResource(
				"/org/" + orgId + "/member/" + userId + "/end_member_info").get(
						EndMemberInfo.class);		
	}
141086
def inMicrolensRegion_main(args=None):
    """"""
    import argparse
    parser = argparse.ArgumentParser(
                    description="Check if a celestial coordinate is "
                                "inside the K2C9 microlensing superstamp.")
    parser.add_argument('ra', nargs=1, type=float,
                        help="Right Ascension in decimal degrees (J2000).")
    parser.add_argument('dec', nargs=1, type=float,
                        help="Declination in decimal degrees (J2000).")
    args = parser.parse_args(args)
    if inMicrolensRegion(args.ra[0], args.dec[0]):
        print("Yes! The coordinate is inside the K2C9 superstamp.")
    else:
        print("Sorry, the coordinate is NOT inside the K2C9 superstamp.")
384175
def _client(self, key_id):
        
        region_name = _region_from_key_id(key_id, self.default_region)
        self.add_regional_client(region_name)
        return self._regional_clients[region_name]
1052207
def id
      parts = socket.object_id.to_s.split("")
      parts = parts.each_slice(parts.length / 2).to_a

      [parts.first.join(""), parts.last.join("")].join(".")
    end
405190
def do_region(self, x, y, w, h):
        """"""
        infile = self.tmpfile
        outfile = self.basename + '.reg'
        # simeon@ice ~>cat m.pnm | pnmcut 10 10 100 200 > m1.pnm
        if (x is None):
            # print "region: full"
            self.tmpfile = infile
        else:
            # print "region: (%d,%d,%d,%d)" % (x,y,w,h)
            if (self.shell_call('cat ' + infile + ' | ' + self.pnmcut + ' ' + str(x) + ' ' + str(y) + ' ' + str(w) + ' ' + str(h) + '  > ' + outfile)):
                raise IIIFError(text="Oops... got nonzero output from pnmcut.")
            self.width = w
            self.height = h
            self.tmpfile = outfile
1338918
function f_uye_id(_uye_id, _tahta_id, _opts) {
        // 1. Temel Tahta Üye bilgileri
        // 2. Tahtadaki rolleri


        /** @type {OptionsUye} */
        var opts = result.OptionsUye(_opts);

        return (Array.isArray(_uye_id)
            ? result.dbQ.hmget_json_parse(result.kp.kullanici.tablo, _uye_id)
            : result.dbQ.hget_json_parse(result.kp.kullanici.tablo, _uye_id))
            .then(function (_dbUye) {
                if (!_dbUye) {
                    return null;
                }

                function f_uye_bilgileri(_uye) {
                    /** @type {Uye} */
                    var olusan_uye = schema.f_create_default_object(schema.SCHEMA.UYE);

                    _.extend(olusan_uye, _uye);

                    if (_tahta_id) {
                        //tahtaya bağlı üyelerin rollerini bul
                        return [
                            opts.bArrTahtaUyeRolId
                                ? result.dbQ.hget_json_parse(result.kp.tahta.hsUyeleri(_tahta_id), _uye.Id)
                                : []]
                            .allX()
                            .then(function (_dbReplies) {
                                olusan_uye.Roller = _dbReplies[0];
                                return olusan_uye;
                            });
                    } else {
                        return olusan_uye;
                    }
                }

                return (Array.isArray(_dbUye)
                    ? _dbUye.map(f_uye_bilgileri).allX()
                    : f_uye_bilgileri(_dbUye))
                    .then(function (_olusan_uye) {
                        return _olusan_uye;
                    });
            });


        /* /!** @type {Uye} *!/
         var uye = schema.f_create_default_object(schema.SCHEMA.UYE);

         return [
         // 1
         opts.bTemelTahtaUyeBilgileri
         ? result.dbQ.hget_json_parse(result.kp.kullanici.tablo, _uye_id)
         : null,
         // 2
         opts.bArrTahtaUyeRolId && _tahta_id
         ? result.dbQ.hget_json_parse(result.kp.tahta.hsUyeleri(_tahta_id), _uye_id)
         : null]
         .allX()
         .then(function (_dbReplies) {
         extension.ssg = [{"_dbReplies": _dbReplies}];
         // 1
         _.extend(uye, _dbReplies[0]);

         // 2
         uye.Roller = _dbReplies[1];

         return uye;
         });*/
    }