Interact with the user.

        :param banner: (optional) the banner to print before the first
                       interaction. Defaults to ``None``.
508861
def serve_forever(self, banner=None):
        
        if hasattr(readline, "read_history_file"):
            try:
                readline.read_history_file(self.histfile)
            except IOError:
                pass
            atexit.register(self._save_history)
        super(Shell, self).serve_forever(banner)
1155985
def interact(self, insock=sys.stdin, outsock=sys.stdout):
        
        self._print_header('======== Beginning interactive session ========')

        if hasattr(outsock, 'buffer'):
            outsock = outsock.buffer    # pylint: disable=no-member

        self.timed_out = False

        save_verbose = self.verbose
        self.verbose = 0
        try:
            if self.buf:
                outsock.write(self.buf)
                outsock.flush()
                self.buf = b''

            while True:
                readable_socks = select(self.sock, insock)
                for readable in readable_socks:
                    if readable is insock:
                        data = os.read(insock.fileno(), 4096)
                        self.send(data)
                        if not data:
                            raise NetcatError
                    else:
                        data = self.recv(timeout=None)
                        outsock.write(data)
                        outsock.flush()
                        if not data:
                            raise NetcatError
        except KeyboardInterrupt:
            self.verbose = save_verbose
            self._print_header('\n======== Connection interrupted! ========')
            raise
        except (socket.error, NetcatError):
            self.verbose = save_verbose
            self._print_header('\n======== Connection dropped! ========')
        finally:
            self.verbose = save_verbose
1262626
def pass(message=nil)
      banner PASS

      if message
        message = Colorize.magenta(message)
        message = message.to_s.tabto(TAB_SIZE)

        io.puts(message)
      end
    end
14890
def init_widget(self):
        
        if not self.widget:
            return
        super(AndroidSnackbar, self).init_widget()

        d = self.declaration

        #: Bind events
        self.widget.onClick.connect(self.on_click)

        #: Use the custom callback to listen to events
        callback = BridgedSnackbarCallback()
        callback.setListener(self.widget.getId())
        self.widget.onDismissed.connect(self.on_dismissed)
        self.widget.onShown.connect(self.on_shown)
        self.widget.addCallback(callback)


        #: if d.text: #: Set during creation
        #: self.set_duration(d.duration) #: Set during creation
        if d.action_text:
            self.set_action_text(d.action_text)
        if d.action_text_color:
            self.set_action_text_color(d.action_text_color)
        if d.show:
            self.set_show(d.show)
750485
def on(*args,&block)
      @accept_options = true
      args = add_default_value_to_docstring(*args)
      if block
        @option_parser.on(*args,&block)
      else
        opt_names = option_names(*args)
        @option_parser.on(*args) do |value|
          opt_names.each do |name|
            @options[name] = value
            @options[name.to_s] = value
          end
        end
      end
      set_banner
    end
201113
protected void applyBanners() {
        DynamicReportOptions options = getReport().getOptions();
        if (options.getFirstPageImageBanners().isEmpty() && options.getImageBanners().isEmpty()){
            return;
        }

		/*
		  First create image banners for the first page only
		 */
		JRDesignBand title = (JRDesignBand) getDesign().getTitle();
		//if there is no title band, but there are banner images for the first page, we create a title band
		if (title == null && !options.getFirstPageImageBanners().isEmpty()){
			title = new JRDesignBand();
			getDesign().setTitle(title);
		}
		applyImageBannersToBand(title, options.getFirstPageImageBanners().values(), null, true);

		/*
		  Now create image banner for the rest of the pages
		 */
		JRDesignBand pageHeader = (JRDesignBand) getDesign().getPageHeader();
		//if there is no title band, but there are banner images for the first page, we create a title band
		if (pageHeader == null && !options.getImageBanners().isEmpty()){
			pageHeader = new JRDesignBand();
			getDesign().setPageHeader(pageHeader);
		}
		JRDesignExpression printWhenExpression = null;
		if (!options.getFirstPageImageBanners().isEmpty()){
			printWhenExpression = new JRDesignExpression();
			printWhenExpression.setValueClass(Boolean.class);
			printWhenExpression.setText(EXPRESSION_TRUE_WHEN_NOT_FIRST_PAGE);
		}
		applyImageBannersToBand(pageHeader, options.getImageBanners().values(),printWhenExpression, true);



	}
1199340
def long_banner(self):
        """"""
        # Default banner
        try:
            from IPython.core.usage import quick_guide
        except Exception:
            quick_guide = ''
        banner_parts = [
            'Python %s\n' % self.interpreter_versions['python_version'],
            'Type "copyright", "credits" or "license" for more information.\n\n',
            'IPython %s -- An enhanced Interactive Python.\n' % \
            self.interpreter_versions['ipython_version'],
            quick_guide
        ]
        banner = ''.join(banner_parts)

        # Pylab additions
        pylab_o = self.additional_options['pylab']
        autoload_pylab_o = self.additional_options['autoload_pylab']
        mpl_installed = programs.is_module_installed('matplotlib')
        if mpl_installed and (pylab_o and autoload_pylab_o):
            pylab_message = ("\nPopulating the interactive namespace from "
                             "numpy and matplotlib\n")
            banner = banner + pylab_message

        # Sympy additions
        sympy_o = self.additional_options['sympy']
        if sympy_o:
            lines = """
These commands were executed:
>>> from __future__ import division
>>> from sympy import *
>>> x, y, z, t = symbols('x y z t')
>>> k, m, n = symbols('k m n', integer=True)
>>> f, g, h = symbols('f g h', cls=Function)
"""
            banner = banner + lines
        if (pylab_o and sympy_o):
            lines = """
Warning: pylab (numpy and matplotlib) and symbolic math (sympy) are both 
enabled at the same time. Some pylab functions are going to be overrided by 
the sympy module (e.g. plot)
"""
            banner = banner + lines
        return banner
1257745
def user_call(self, frame, argument_list):
        """"""
        if self.stop_here(frame):
            pdb.Pdb.user_call(self, frame, argument_list)
1093018
private void printBanner() {
        if (null != blade.bannerText()) {
            System.out.println(blade.bannerText());
        } else {
            String text = Const.BANNER_TEXT + NEW_LINE +
                    StringKit.padLeft(" :: Blade :: (v", Const.BANNER_PADDING - 9) + Const.VERSION + ") " + NEW_LINE;
            System.out.println(Ansi.Magenta.format(text));
        }
    }
1260043
def shell():
    
    ctx = _get_shell_ctx()
    try:
        import IPython
        IPython.embed(header=_get_shell_banner(), user_ns=ctx)
    except ImportError:
        import code
        code.interact(banner=_get_shell_banner(verbose=True), local=ctx)
1296493
def update
      @banner = Banner.find(params[:id])
  
      respond_to do |format|
        if @banner.update(banner_params)
          format.html { redirect_to @banner, :notice => 'Banner was successfully updated.' }
          format.json { head :no_content }
        else
          format.html { render :action => "edit" }
          format.json { render :json => @banner.errors, :status => :unprocessable_entity }
        end
      end
    end
667058
def _interact(self, location, error_info, payload):
        '''
        '''
        if (self._interaction_methods is None or
                len(self._interaction_methods) == 0):
            raise InteractionError('interaction required but not possible')
        # TODO(rogpeppe) make the robust against a wider range of error info.
        if error_info.info.interaction_methods is None and \
                error_info.info.visit_url is not None:
            # It's an old-style error; deal with it differently.
            return None, self._legacy_interact(location, error_info)
        for interactor in self._interaction_methods:
            found = error_info.info.interaction_methods.get(interactor.kind())
            if found is None:
                continue
            try:
                token = interactor.interact(self, location, error_info)
            except InteractionMethodNotFound:
                continue
            if token is None:
                raise InteractionError('interaction method returned an empty '
                                       'token')
            return token, None

        raise InteractionError('no supported interaction method')
475397
public function init() 
	{
		$this->permission = 0;
		$permission = BannerSetting::getInfo('permission');
		if($permission == 1 || ($permission == 0 && !Yii::app()->user->isGuest))
			$this->permission = 1;
			
		$arrThemes = $this->currentTemplate('public');
		Yii::app()->theme = $arrThemes['folder'];
		$this->layout = $arrThemes['layout'];
	}
264766
def _draw_banner(self):
        
        n_rows, n_cols = self.term.stdscr.getmaxyx()
        window = self.term.stdscr.derwin(1, n_cols, self._row, 0)
        window.erase()
        window.bkgd(str(' '), self.term.attr('OrderBar'))

        banner = docs.BANNER_SEARCH if self.content.query else self.BANNER
        items = banner.strip().split(' ')

        distance = (n_cols - sum(len(t) for t in items) - 1) / (len(items) - 1)
        spacing = max(1, int(distance)) * ' '
        text = spacing.join(items)
        self.term.add_line(window, text, 0, 0)
        if self.content.order is not None:
            order = self.content.order.split('-')[0]
            col = text.find(order) - 3
            attr = self.term.attr('OrderBarHighlight')
            window.chgat(0, col, 3, attr)

        self._row += 1
164033
def _on_item_activated(self, item):
        
        msg = item.data(QtCore.Qt.UserRole)
        self.msg_activated.emit(msg)
97868
def OnPrintPreview(self, event):
        """"""

        print_area = self._get_print_area()
        print_data = self.main_window.print_data

        self.main_window.actions.print_preview(print_area, print_data)
1255979
def before_render(self):
        
        # Render the Add button if the user has the AddClient permission
        if check_permission(AddClient, self.context):
            self.context_actions[_("Add")] = {
                "url": "createObject?type_name=Client",
                "icon": "++resource++bika.lims.images/add.png"
            }

        # Display a checkbox next to each client in the list if the user has
        # rights for ModifyPortalContent
        self.show_select_column = check_permission(ModifyPortalContent,
                                                   self.context)