Delegate unknown messages to the settings object
339223
def method_missing(name, *args, &block)
      return type.send(name) if type if name.to_s.end_with?('?')
      @settings.send(name, *args, &block)
    end
319988
def message_options(self):
        
        o = {}
        options = self.options
        for key in self._default_message_options:
            if key in options:
                o[key] = options[key]
        return o
1171444
function setMessageIdsAndSeqNos(state, messageIdsAndSeqNos) {
  const {ids, keys, seqNos} = messageIdsAndSeqNos || {};

  setIds(state, ids);
  setKeys(state, keys);
  setSeqNos(state, seqNos);

  return state;
}
1295902
def set_chat_description(self, *args, **kwargs):
        """"""
        return set_chat_description(*args, **self._merge_overrides(**kwargs)).run()
903332
function(message, title, options) {
        this.message = message;
        this.title = title || MessageBox.defaultTitle;
        this.options = options || MessageBox.defaultOptions;
    }
1358861
async def message_fields(self, msg, fields, obj=None):
        
        for field in fields:
            await self.message_field(msg, field, obj)
        return msg
591238
function getDefinedMessage(unusedVar) {
            const defType = unusedVar.defs && unusedVar.defs[0] && unusedVar.defs[0].type;
            let type;
            let pattern;

            if (defType === "CatchClause" && config.caughtErrorsIgnorePattern) {
                type = "args";
                pattern = config.caughtErrorsIgnorePattern.toString();
            } else if (defType === "Parameter" && config.argsIgnorePattern) {
                type = "args";
                pattern = config.argsIgnorePattern.toString();
            } else if (defType !== "Parameter" && config.varsIgnorePattern) {
                type = "vars";
                pattern = config.varsIgnorePattern.toString();
            }

            const additional = type ? ` Allowed unused ${type} must match ${pattern}.` : "";

            return `'{{name}}' is defined but never used.${additional}`;
        }
187444
function unknownCommand (ev) {
        var raw_cmd = ev.command + ' ' + ev.params.join(' ');
        this.app.connections.active_connection.gateway.raw(raw_cmd);
    }
652276
def on_message(self, message):
        

        msg = tornado.escape.json_decode(message)

        if msg['type'] == 'config_file':

            if self.application.verbose:
                print(msg['data'])

            self.config = list(yaml.load_all(msg['data']))

            if len(self.config) > 1:
                error = 'Please, provide only one configuration.'
                if self.application.verbose:
                    logger.error(error)
                self.write_message({'type': 'error',
                    'error': error})
                return

            self.config = self.config[0]
            self.send_log('INFO.' + self.simulation_name,
                          'Using config: {name}'.format(name=self.config['name']))

            if 'visualization_params' in self.config:
                self.write_message({'type': 'visualization_params',
                    'data': self.config['visualization_params']})
            self.name = self.config['name']
            self.run_simulation()

            settings = []
            for key in self.config['environment_params']: 
                if type(self.config['environment_params'][key]) == float or type(self.config['environment_params'][key]) == int:
                    if self.config['environment_params'][key] <= 1:
                        setting_type = 'number'
                    else:
                        setting_type = 'great_number'
                elif type(self.config['environment_params'][key]) == bool:
                    setting_type = 'boolean'
                else:
                    setting_type = 'undefined'

                settings.append({
                    'label': key,
                    'type': setting_type,
                    'value': self.config['environment_params'][key]
                })

            self.write_message({'type': 'settings',
                'data': settings})

        elif msg['type'] == 'get_trial':
            if self.application.verbose:
                logger.info('Trial {} requested!'.format(msg['data']))
            self.send_log('INFO.' + __name__, 'Trial {} requested!'.format(msg['data']))
            self.write_message({'type': 'get_trial',
                                'data': self.get_trial(int(msg['data']))})

        elif msg['type'] == 'run_simulation':
            if self.application.verbose:
                logger.info('Running new simulation for {name}'.format(name=self.config['name']))
            self.send_log('INFO.' + self.simulation_name, 'Running new simulation for {name}'.format(name=self.config['name']))
            self.config['environment_params'] = msg['data']
            self.run_simulation()

        elif msg['type'] == 'download_gexf':
            G = self.trials[ int(msg['data']) ].history_to_graph()
            for node in G.nodes():
                if 'pos' in G.node[node]:
                    G.node[node]['viz'] = {"position": {"x": G.node[node]['pos'][0], "y": G.node[node]['pos'][1], "z": 0.0}}
                    del (G.node[node]['pos'])
            writer = nx.readwrite.gexf.GEXFWriter(version='1.2draft')
            writer.add_graph(G)
            self.write_message({'type': 'download_gexf',
                'filename': self.config['name'] + '_trial_' + str(msg['data']),
                'data': tostring(writer.xml).decode(writer.encoding) })

        elif msg['type'] == 'download_json':
            G = self.trials[ int(msg['data']) ].history_to_graph()
            for node in G.nodes():
                if 'pos' in G.node[node]:
                    G.node[node]['viz'] = {"position": {"x": G.node[node]['pos'][0], "y": G.node[node]['pos'][1], "z": 0.0}}
                    del (G.node[node]['pos'])
            self.write_message({'type': 'download_json',
                'filename': self.config['name'] + '_trial_' + str(msg['data']),
                'data': nx.node_link_data(G) })

        else:
            if self.application.verbose:
                logger.info('Unexpected message!')
503958
function(config){
    BareNotification.apply( this, arguments ); // Call the Statement (super) contructor
    if (!config)
        config = {};
    
    this._errmsg = config.errmsg || config.message || "Unspecified exception";
    this.verb = KIND_EXCEPTION;
    
    return this; //Chainig
}
1360516
public static void notNull(Object[] objs, String msg) {
        notNull(objs, msg);
        for (Object obj : objs) {
            notNull(obj, msg);
        }
    }
118755
function(_target,_message){
                var _from = _message.from;
                while(!!_target){
                    if (_target._$getPath()!=_from){
                        _doSendMessage(_target,_message);
                    }
                    _target = _target._$getParent();
                }
            }
543568
def set_on_level(self, val):
        """"""
        on_cmd = self._create_set_property_msg("_on_level", 0x06,
                                               val)
        self._send_method(on_cmd, self._property_set)
        self._send_method(on_cmd, self._on_message_received)
715019
def _handler(self, sender, setting, value, **kwargs):
        
        if setting.startswith(self.prefix):
            self._set_attr(setting, value)
36645
def configure(settings: Settings):
    
    if not settings or not isinstance(settings, Settings):
        raise TypeError('Settings is expected to be non-None and of type Settings')
    global SETTINGS  # pylint: disable=global-statement
    SETTINGS = settings
428174
def make_messages(context: Context, javascript=False, fuzzy=False):
    
    kwargs = {
        'all': True,
        'keep_pot': True,
        'no_wrap': True,
    }
    if fuzzy:
        kwargs['allow_fuzzy'] = True
    if javascript:
        kwargs.update(domain='djangojs', ignore_patterns=['*.bundle.js'])
    with in_dir(context.app.django_app_name):
        return context.management_command('makemessages', **kwargs)
972350
def unknown(*args, **kwargs):
    
    name = kwargs.get('name', '')
    return "%s(%s)" % (name, ', '.join(str(a) for a in args))