region PROFİL BİLGİLERİ
424658
function f_kullanici_profil(kul_id) {
        return result.dbQ.hget_json_parse(result.kp.kullanici.hsetKullaniciProfilleri, kul_id);
    }
1320827
function f_role_bagli_uyeler(_tahta_id, _rol_ids, _uyari) {
        //o role sahip üyeleri çekeceğiz
        l.info("---------f_role_bagli_uyeler-----------")

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

        var defer = result.dbQ.Q.defer(),
            arrPromise = _rol_ids.map(function (_elm) {
                return db_tahta.f_db_tahta_uyeleri_x_rolune_sahip(_tahta_id, _elm)
                    .then(function (_uyeler) {

                        _uyeler.map(function (_uye) {
                            if (_uye.EPosta) {
                                _uyari.RENDER.Uyeler.mail_listesi.push(_uye.EPosta);
                            }

                            if (_uye.GSM) {
                                _uyari.RENDER.Uyeler.gsm_listesi.push(_uye.GSM);
                            }

                            _uyari.RENDER.Uyeler.id_listesi.push(_uye.Id);
                            _uyari.RENDER.Uyeler.uye_listesi.push(_uye);
                            return _uyari;
                        });
                    });
            });

        result.dbQ.Q.all(arrPromise)
            .then(function () {
                defer.resolve(_uyari.RENDER.Uyeler);
            });

        return defer.promise;
    }
1214601
def get_region(service, region, profile):
    
    _, region, _, _ = _get_profile(service, region, None, None, profile)

    return region
105839
public function indexAction()
    {
        $this->view->roles = (new \Cms\Orm\CmsRoleQuery)->find();
        //jeśli niewybrana rola - przekierowanie na pierwszą istniejącą
        if (!$this->roleId && count($this->view->roles)) {
            $this->getResponse()->redirect('cmsAdmin', 'categoryAcl', 'index', ['roleId' => $this->view->roles[0]->id]);
        }
        //formularz edycji uprawnień
        $form = new Form\CategoryAclForm(null, ['roleId' => $this->roleId]);
        //po zapisie
        if ($form->isSaved()) {
            $this->getMessenger()->addMessage('messenger.categoryAcl.permissions.saved', true);
            //przekierowanie na zapisaną stronę
            $this->getResponse()->redirect('cmsAdmin', 'categoryAcl', 'index', ['roleId' => $this->roleId]);
        }
        $this->view->categoryAclForm = $form;
    }
985433
def printProfile(self, reset=False):
    
    print "Profiling information for {}".format(type(self).__name__)
    totalTime = 0.000001
    for region in self.network.regions.values():
      timer = region.getComputeTimer()
      totalTime += timer.getElapsed()

    # Sort the region names
    regionNames = list(self.network.regions.keys())
    regionNames.sort()

    count = 1
    profileInfo = []
    L2Time = 0.0
    L4Time = 0.0
    for regionName in regionNames:
      region = self.network.regions[regionName]
      timer = region.getComputeTimer()
      count = max(timer.getStartCount(), count)
      profileInfo.append([region.name,
                          timer.getStartCount(),
                          timer.getElapsed(),
                          100.0 * timer.getElapsed() / totalTime,
                          timer.getElapsed() / max(timer.getStartCount(), 1)])
      if "L2Column" in regionName:
        L2Time += timer.getElapsed()
      elif "L4Column" in regionName:
        L4Time += timer.getElapsed()

    profileInfo.append(
      ["Total time", "", totalTime, "100.0", totalTime / count])
    print tabulate(profileInfo, headers=["Region", "Count",
                                         "Elapsed", "Pct of total",
                                         "Secs/iteration"],
                   tablefmt="grid", floatfmt="6.3f")
    print
    print "Total time in L2 =", L2Time
    print "Total time in L4 =", L4Time

    if reset:
      self.resetProfile()
255648
function (_tahta_id, _kul_id) {
            l.info("f_kullaniciyi_rol_iliskilendir");
            // 3. Kullanıcıya rolü atayalım
            // 3.1 Kullanıcının rollerini çek
            // 3.2 Rollerine yeni rolü ekle
            return result.dbQ.Q.all([
                result.dbQ.smembers(result.kp.tahta.ssetOzelTahtaRolleri(_tahta_id, true)),
                result.dbQ.hget(result.kp.tahta.hsUyeleri(_tahta_id), _kul_id) // 3.1
            ]).then(function (_arrDbReplies) {
                var dbRol_idler = _arrDbReplies[1];
                // 3.2
                var roller = Array.isArray(dbRol_idler) ? dbRol_idler : [];

                //şemaya uygun hale getirmek için int yapılıyor
                var arr_tahta_rol_idler = _arrDbReplies[0].mapX(null, parseInt);

                var son = roller.concat(arr_tahta_rol_idler);
                return f_tahta_uye_rol_guncelle(_tahta_id, _kul_id, son)
            });
        }
237235
public function regionslist()
    {
        $id = $this->getRequest()->param("ID");
        $data = $this->getList($id)->map("Code", "Name")->toArray();

        return json_encode($data);
    }
1274211
def _reclassify_Bird_regions_with_data(self):
        '''
        
        '''
        # Treat trivial cases of subduction zones and oceanic types
        self.strain.data['region'][
            self.strain.data['region'] == b'IPL'] = ['IPL']
        self.strain.data['region'][
            self.strain.data['region'] == b'S'] = ['SUB']
        self.strain.data['region'][
            self.strain.data['region'] == b'O'] = ['OCB']

        # Continental types
        id0 = self.strain.data['region'] == b'C'
        self.strain.data['region'][id0] = ['CTF']
        id0_pos_err = np.logical_and(
            self.strain.data['err'] > 0.,
            self.strain.data['err'] > (0.364 * self.strain.data['e2h']))

        id0_neg_err = np.logical_and(
            self.strain.data['err'] < 0.,
            self.strain.data['err'] <= (0.364 * self.strain.data['e1h']))

        self.strain.data['region'][np.logical_and(id0, id0_pos_err)] = 'CCB'
        self.strain.data['region'][np.logical_and(id0, id0_neg_err)] = 'CRB'

        # Ridge Types
        id0 = self.strain.data['region'] == b'R'
        for iloc in np.where(id0)[0]:
            cond = (self.strain.data['e1h'][iloc] > 0.0 and
                    self.strain.data['e2h'][iloc] > 0.0)
            if cond:
                self.strain.data['region'][iloc] = 'OSRnor'
            # Effective == 0.0
            elif fabs(self.strain.data['e1h'][iloc]) < 1E-99:
                self.strain.data['region'][iloc] = 'OSRnor'
            elif ((self.strain.data['e1h'][iloc] *
                   self.strain.data['e2h'][iloc]) < 0.0) and\
                 ((self.strain.data['e1h'][iloc] +
                   self.strain.data['e2h'][iloc]) >= 0.):
                self.strain.data['region'][iloc] = 'OSR_special_1'
            elif ((self.strain.data['e1h'][iloc] *
                   self.strain.data['e2h'][iloc]) < 0.) and\
                 ((self.strain.data['e1h'][iloc] +
                   self.strain.data['e2h'][iloc]) < 0.):
                self.strain.data['region'][iloc] = 'OSR_special_2'
            else:
                self.strain.data['region'][iloc] = 'OCB'
669102
public static function getProfilerHtml()
    {
        $percentSum = 0;
        $html = '';
        //pętla po profilerze
        foreach (FrontController::getInstance()->getProfiler()->get() as $event) {
            $percentSum += $event['percent'];
            $html .= '<div style="color: #' . self::_colorifyPercent($event['percent']) . '"><div style="float: left; width: 450px; margin-right: 20px; font-size: 10px; word-wrap: break-word; white-space: pre-wrap;">' . $event['name'] . '</div><div style="float: left; width: 60px;"><b>' . round($event['elapsed'], 4) . 's</b></div><div style="float: left; width: 60px;"><b>' . round($event['percent'], 2) . '%</b></div><div style="float: left;"><b>' . round($percentSum, 2) . '%</b></div></div><div style="clear: both"></div>';
        }
        return $html;
    }
1176790
Collection<QProfileDto> getChildProfiles() {
    loadDescendants();
    return getProfiles().stream()
      .flatMap(p -> profilesByParentUuid.get(p.getKee()).stream())
      .collect(Collectors.toList());
  }
1007135
function f_rol_bolgesi_ekle(_rol_id, _bolge_id, _tahta_id) {
        return result.dbQ.sadd(result.kp.rol.ssetBolgeleri(_rol_id), _bolge_id);
    }
845772
public static function getDbProfilerHtml()
    {
        $percentSum = 0;
        $html = '';
        $profilerData = \App\Registry::$db && \App\Registry::$db->getProfiler() ? \App\Registry::$db->getProfiler()->get() : [];
        //brak zapytań
        if (!count($profilerData)) {
            return 'No SQL queries';
        }
        //pętla po profilerze
        foreach ($profilerData as $index => $event) {
            $percentSum += $event['percent'];
            $html .= '<div style="color: #' . self::_colorifyPercent($event['percent']) . '"><div style="float: left; width: 450px; margin-right: 20px; font-size: 10px; word-wrap: break-word; white-space: pre-wrap;">' . ($index + 1) . '. '. $event['sql'] . '</div><div style="float: left; width: 60px;"><b>' . round($event['elapsed'], 4) . 's</b></div><div style="float: left; width: 60px;"><b>' . round($event['percent'], 2) . '%</b></div><div style="float: left;"><b>' . round($percentSum, 2) . '%</b></div></div><div style="clear: both"></div>';
        }
        return $html;
    }
632571
function loadRegionIds(regionMapping, rawRegionDetails) {
  var promises = rawRegionDetails.map(function(rawRegionDetail) {
    return rawRegionDetail.regionProvider.loadRegionIDs();
  });
  return when
    .all(promises)
    .then(function() {
      // Cache the details in a nicer format, storing the actual columns rather than just the column names.
      regionMapping._regionDetails = rawRegionDetails.map(function(
        rawRegionDetail
      ) {
        return {
          regionProvider: rawRegionDetail.regionProvider,
          columnName: rawRegionDetail.variableName,
          disambigColumnName: rawRegionDetail.disambigVariableName
        };
      });
      return regionMapping._regionDetails;
    })
    .otherwise(function(e) {
      console.log("error loading region ids", e);
    });
}
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);
                });
            });
    }
386290
def profiles(self):
        '''
        
        '''
        limit = []

        if self.is_admin():
            limit.append(_("Administrator"))
        limit.sort()

        return limit
629942
public function actionProfile() {

		// Find Model
		$model = Yii::$app->core->getUser();

		// Avatar
		$avatar = $model->avatar;

		// Address
		$address = $model->primaryAddress;

		if( empty( $address ) ) {

			$address = $this->addressService->getModelObject();
		}

		// Clear Sidebar
		$this->sidebar = [];

		$genderMap = $this->optionService->getIdNameMapByCategorySlug( CoreGlobal::CATEGORY_GENDER, [ 'default' => true ] );

		$countryMap		= Yii::$app->factory->get( 'countryService' )->getIdNameMap();
		$countryId		= isset( $address->country ) ? $address->country->id : array_keys( $countryMap )[ 0 ];
		$provinceMap	= Yii::$app->factory->get( 'provinceService' )->getMapByCountryId( $countryId, [ 'default' => true, 'defaultValue' => Yii::$app->core->provinceLabel ] );
		$provinceId		= isset( $address->province ) ? $address->province->id : array_keys( $provinceMap )[ 0 ];
		$regionMap		= Yii::$app->factory->get( 'regionService' )->getMapByProvinceId( $provinceId, [ 'default' => true, 'defaultValue' => Yii::$app->core->regionLabel ] );

		return $this->render( 'profile', [
			'model' => $model,
			'avatar' => $avatar,
			'address' => $address,
			'genderMap' => $genderMap,
			'countryMap' => $countryMap,
			'provinceMap' => $provinceMap,
			'regionMap' => $regionMap
		]);
	}
186499
function GroupProfile(_id, _owner) {
                this._id = _id;
                this._owner = _owner;
                this._parent = null; //!< 親 GroupProfile インスタンス
                this._children = []; //!< 子 GroupProfile インスタンス
                this._expanded = false; //!< 開閉情報
                this._status = "unregistered"; //!< _owner への登録状態 [ unregistered | registered ]
                this._mapLines = {}; //!< 自身が管轄する LineProfile を key とともに格納
            }