called if the user requested to view an item.
185607
protected function ViewArticleHook()
    {
        $this->SetTemplate('MTShopArticleCatalog', 'system/article');

        // add review item and fill with user data
        $oReviewItem = TdbShopArticleReview::GetNewInstance();
        /** @var $oReviewItem TdbShopArticleReview */
        $oGlobal = TGlobal::instance();
        $aReviewData = array();
        if ($oGlobal->UserDataExists(TdbShopArticleReview::INPUT_BASE_NAME)) {
            $aReviewData = $oGlobal->GetUserData(TdbShopArticleReview::INPUT_BASE_NAME);
        } else {
            $oUser = TdbDataExtranetUser::GetInstance();
            if ($oUser->IsLoggedIn()) {
                $aReviewData['author_name'] = $oUser->GetUserAlias();
                $aReviewData['author_email'] = $oUser->GetUserEMail();
            }
        }
        $aReviewData['captcha-question'] = $this->GenerateCaptcha();

        if (is_array($aReviewData)) {
            $oReviewItem->LoadFromRowProtected($aReviewData);
        }
        $this->data['oReviewEntryItem'] = &$oReviewItem;
    }
603974
@Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, int position, List payloads) {
        if (shouldInsertItemAtPosition(position)) {
            getItem(position).bindView(holder, payloads);
        } else {
            mAdapter.onBindViewHolder(holder, position - itemInsertedBeforeCount(position), payloads);
        }
    }
635442
def run(self, value, errors, request):
        """"""
        thing = super(ViewableDBThing, self).run(value, errors, request)
        if errors:
            return None
        if not thing.can_view(request.user):
            message = 'Insufficient permissions for {0}'.format(self.param)
            raise HTTPForbidden(message)
        return thing
1033913
function(item, reroot) {
			return this.showItem(item, reroot).then(function(result) {
				this.select(result);
			}.bind(this));
		}
904069
function checkThreshold(item, ctx) {
		if (item.count >= item.opts.minRequestCount) {
			const rate = item.failures / item.count;
			if (rate >= item.opts.threshold)
				trip(item, ctx);
		}
	}
831461
def _on_scan(_loop, adapter, _adapter_id, info, expiration_time):
    """"""

    info['validity_period'] = expiration_time
    adapter.notify_event_nowait(info.get('connection_string'), 'device_seen', info)
60495
def OnGetItemAttr(self, item):
        """"""
        if self.indicated > -1 and item == self.indicated:
            return self.indicated_attribute
        return None
943688
def item_selected(self, item=None):
        """"""
        if item is None:
            item = self.currentItem()

        # stack history is in inverse order
        try:
            index = self.stack_history[-(self.currentRow()+1)]
        except IndexError:
            pass
        else:
            self.editor.set_stack_index(index)
            self.editor.current_changed(index)
        self.hide()
994356
function(items, handler, userData) {
			if (this.choiceCallback) {
				return this.choiceCallback.call(handler, items, userData);
			}
			return null;
		}
485005
def show_item(h):
    
    if isinstance(h, rf.Rar3Info):
        show_item_v3(h)
    elif isinstance(h, rf.Rar5Info):
        show_item_v5(h)
    else:
        xprint('Unknown info record')
452196
function Views(options) {
  Collection.call(this, options);
  this.options.collection = this.options.collection || this;
  this.define('View', this.options.View || require('./view'));
  this.define('Item', this.View);
}
902905
public void showRerouteState() {
    if (rerouteLayout.getVisibility() == INVISIBLE) {
      rerouteLayout.startAnimation(rerouteSlideDownTop);
      rerouteLayout.setVisibility(VISIBLE);
    }
  }
46433
def selected_items
      ((m = marked_items).any? ? m : Array(current_item)).reject {|i| %w(. ..).include? i.name}
    end
329642
def show():
    """"""
    items = list(collection.find())
    # JSON conversion chokes on the _id objects, so we convert
    # them to strings here
    for i in items:
        i['_id'] = str(i['_id'])
    return items
1249154
def _view_or_add(self, uid):
        '''
        
        '''
        postinfo = MPost.get_by_uid(uid)
        if postinfo:
            self.viewinfo(postinfo)
        elif self.userinfo:
            self._to_add(uid=uid)
        else:
            self.show404()
918318
def check_generic_request(self, item_session: ItemSession) -> Tuple[bool, str]:
        '''
        '''
        verdict, reason, test_info = self.consult_filters(
            item_session.request.url_info,
            item_session.url_record)

        verdict, reason = self.consult_hook(item_session, verdict,
                                            reason, test_info)

        return verdict, reason
879597
void onRendererSelected() {
        if (view.getRendererSelected() != null) {
            rendererLibrary = rendererManager.getRendererByName(view.getRendererSelected());
            selectCommand.execute();
        }
    }