Required functionality.
325503
def find_one(self, cls, id):
        """"""
        db_result = None
        for rec in read_rec(cls.get_table_name(), id):
            db_result = rec
            break  # Only read the first returned - which should be all we get
        if not db_result:
            return None

        obj = cls.from_data(db_result['value'])
        return obj
298585
function (methodName, argName) {
            var required = this.findParameter(methodName, argName).required;
            //default is false, so if "required" is undefined, return false anyway
            if (required) {
                return true;
            }
            return false;
        }
319346
function makeRequire(m, self) {
    function _require(_path) {
        return m.require(_path);
    }

    _require.resolve = function(request) {
        return _module._resolveFilename(request, self);
    };
    _require.cache = _module._cache;
    _require.extensions = _module._extensions;

    return _require;
}
595172
function requireModel(filePath, cb) {
        //check if file exist. if not return error
        fs.exists(filePath, function (exists) {
            if (!exists) {
                soajs.log.error('Requested Model Not Found!');
                return cb(601);
            }

            driver.model = require(filePath);
            return cb();
        });
    }
160881
function tap(nextOrObserver, error, complete) {
    return function tapOperatorFunction(source) {
        return source.lift(new DoOperator(nextOrObserver, error, complete));
    };
}
1103111
def show_minimum_needs(self):
        """"""
        # import here only so that it is AFTER i18n set up
        from safe.gui.tools.minimum_needs.needs_calculator_dialog import (
            NeedsCalculatorDialog
        )

        dialog = NeedsCalculatorDialog(self.iface.mainWindow())
        dialog.exec_()
524015
def provide(prompt, options = {})
      options.reverse_merge! required: true, default: nil
      required = options[:required] && !options[:default]
      prompt = "#{defaulted_prompt(prompt, options[:default])}: "

      if Stairs.configuration.use_defaults && options[:default]
        options[:default]
      else
        Stairs::Util::CLI.collect(prompt.blue, required: required) ||
          options[:default]
      end
    end
602081
function(content, opts, onOk, oncancel) {
        Dialog.setup('prompt', content, opts, onOk, oncancel);
      }
155235
function makeRequireFunction() {
    const Module = this.constructor;
    const self = this;

    function require(path) {
        try {
            exports.requireDepth += 1;
            return self.require(path);
        } finally {
            exports.requireDepth -= 1;
        }
    }

    function resolve(request) {
        return Module._resolveFilename(request, self);
    }

    require.resolve = resolve;

    require.main = process.mainModule;

    // Enable support to add extra extension types.
    require.extensions = Module._extensions;

    require.cache = Module._cache;

    return require;
}
58440
def do_transaction(self, function, *args, **kwargs):
        """"""
        with self.config.db_transaction() as trans:
            function(trans, *args, **kwargs)
186520
def superuser_required(f):
    """"""
    @functools.wraps(f)
    @login_required
    def wrapped(*args, **kwargs):
        if not (current_user.is_authenticated() and current_user.superuser):
            abort(403)
        return f(*args, **kwargs)
    return wrapped
1110333
private function AddRequiredField()
    {
        $field = new Fields\Checkbox('Required', '1', $this->checkbox->GetRequired());
        $this->AddField($field);
    }
253935
public function loadRequirements()
    {
        // Load Required CSS:
        
        foreach ($this->getRequiredCSS() as $css) {
            Requirements::css($css);
        }
        
        // Load Required JavaScript:
        
        foreach ($this->getRequiredJS() as $js) {
            Requirements::javascript($js);
        }
    }
233156
function( required, startFunc ) {
		if ( required !== render.state ) {
			render._stateError( startFunc || render.requireState );
		}
	}
944406
def required(self, method, _dict, require):
        
        for key in require:
            if key not in _dict:
                raise LunrError("'%s' is required argument for method '%s'"
                                % (key, method))
1011218
def Requires(self, target, prerequisite):
        """"""
        tlist = self.arg2nodes(target, self.fs.Entry)
        plist = self.arg2nodes(prerequisite, self.fs.Entry)
        for t in tlist:
            t.add_prerequisite(plist)
        return tlist
182093
function( m, opts ) {
        return function( o, cb ) {
            var r = __request.apply( this, arguments );
            m.trigger( "request", m, r, opts );
            return r;
        }
    }