_self_ が終了して結果が出るまで呼び出し側のDeferredを停止し、 _self_ の結果を返す。
 呼び出し側はDeferredブロック内でなければならないが、 _Deferred#next_ を使わずに
 直接戻り値を得ることが出来る。
 _self_ が失敗した場合は、呼び出し側のDeferredの直近の _trap_ ブロックが呼ばれる。
173727
def +@
      response = Fiber.yield(Delayer::Deferred::Request::Await.new(self))
      if response.ok?
        response.value
      else
        Delayer::Deferred.fail(response.value)
      end
    end
393088
private function parseDefer()
    {
        if($this->defer instanceof Defer)
        {
            $this->defer->call();
        }
        if($this->statement instanceof IStatement)
        {
            $this->isSuccess = '' === $this->statement->errorInfo();
        }
        else
        {
            $this->isSuccess = false;
        }
    }
1301736
function instantDeferred(resolve, returnValue, context) {
	var deferred = $.Deferred();
	if (resolve) {
		deferred.resolveWith(context, [returnValue]);
	} else {
		deferred.rejectWith(context, [returnValue]);
	}

	return deferred;
}
18589
function (self, type, success, error, method) {
            var args;
            // if we pass an array as `self` it it means we are coming from
            // the queued request, and we're passing already serialized data
            // self's signature will be: [self, serializedData]
            if (can.isArray(self)) {
                args = self[1];
                self = self[0];
            } else {
                args = self.serialize();
            }
            args = [args];
            var deferred,
            // The model.
            model = self.constructor,
                jqXHR;

            // `destroy` does not need data.
            if (type == 'destroy') {
                args.shift();
            }
            // `update` and `destroy` need the `id`.
            if (type !== 'create') {
                args.unshift(getId(self));
            }


            jqXHR = model[type].apply(model, args);

            deferred = jqXHR.pipe(function (data) {
                self[method || type + "d"](data, jqXHR);
                return self;
            });

            // Hook up `abort`
            if (jqXHR.abort) {
                deferred.abort = function () {
                    jqXHR.abort();
                };
            }

            deferred.then(success, error);
            return deferred;
        }
1297132
function(argument) {
				//console.log("deep.Deferred.resolve : ", argument);
				if (this.rejected || this.resolved)
					throw new Error("deferred has already been ended !");
				if (argument instanceof Error)
					return this.reject(argument);
				this._success = argument;
				this.resolved = true;
				var self = this;
				this._promises.forEach(function(promise) {
					promise.resolve(argument);
				});
			}
933114
public function execute(){
		$options = $this->form_endpoint->get_options();
		$action = @$this->query_options['action'];
		$data = $options['post_params'];

		$errors = $this->exdb->validate($this->table_name, $data);

		if( $action == 'write' ){
			if( count($errors) ){
				// validation でエラーが検出されたら、入力画面に戻る。
				return $this->input($data, $errors);
			}
			return $this->write($data);
		}elseif( $action == 'done' ){
			return $this->done();
		}elseif( $action == 'confirm' ){
			if( count($errors) ){
				// validation でエラーが検出されたら、入力画面に戻る。
				return $this->input($data, $errors);
			}
			return $this->confirm($data);
		}
		return $this->input($data);
	}
766454
function() {
      var resultDeferred = $.Deferred();
      if (this.isDisposed()) {
        var rejectArguments = Array.prototype.slice.call(arguments);
        rejectArguments.push('Data Behavior disposed, aborting.');
        resultDeferred.reject.apply(resultDeferred, rejectArguments);
      } else {
        resultDeferred.resolve.apply(resultDeferred, arguments);
      }
      return resultDeferred.promise();
    }
285230
function makeDeferred() {
  var resolvePromise = null;
  var rejectPromise = null;

  var promise = new Promise(function (resolve, reject) {
    resolvePromise = resolve;
    rejectPromise = reject;
  });

  return {
    promise: promise,
    resolve: resolvePromise,
    reject: rejectPromise
  };
}
825797
function curveRegisterInfoUpdate(){
    //レジスタ値の取得 複数取得は返り値がObject
    KMB.cmdReadRegister([KMMotorOneWebBLE.cmdReadRegister_COMMAND.curveType,KMMotorOneWebBLE.cmdReadRegister_COMMAND.acc,KMMotorOneWebBLE.cmdReadRegister_COMMAND.dec]).then(function(val){
        let str="";
        Object.keys(val).forEach(function(k){str+=k+":"+val[k]+" "});
        $("#curveRegisterInfo").text(str);
    }).catch(function(msg){
        console.log(msg);
    });
}
567209
@Weight(value = Weight.Unit.VARIABLE, comment = "Depends on the current call stack depth")
  public static void cancelDeferredActions() {
    final int stackDepth = ThreadUtils.stackDepth();

    final List<Deferred> list = REGISTRY.get();
    final Iterator<Deferred> iterator = list.iterator();

    while (iterator.hasNext()) {
      final Deferred deferred = iterator.next();
      if (deferred.getStackDepth() >= stackDepth) {
        iterator.remove();
      }
    }
    if (list.isEmpty()) {
      REGISTRY.remove();
    }
  }
331667
public static function Comparison ($operand_left, $operator, $operand_right, $replace_value_list = []) {
		// チェックボックスの!=判定用に元のIDを保持しておく。
		$left_value_id = $operand_left;

		//値のどちらかがnullの場合は即死
		if ($operand_left === null || $operand_right === null) {
			return false;
		}

		//左辺値のフォーマット
		$operand_left = is_array($operand_left) ? static::ExecuteCalcList($operand_left, $replace_value_list) : $replace_value_list[$operand_left] ?? '';

		//右辺値のフォーマット
		$operand_right = is_array($operand_right) ? static::ExecuteCalcList($operand_right, $replace_value_list) : $replace_value_list[$operand_right] ?? $operand_right;

		if ($operand_left === false || $operand_right === false) {
			return false;
		}

		// データ有無チェック
		switch ($operator) {
			case static::COMP_OP_EQ:
			case static::COMP_OP_N_EQ:
			case static::COMP_OP_LT:
			case static::COMP_OP_LT_EQ:
			case static::COMP_OP_GT:
			case static::COMP_OP_GT_EQ:
			case static::COMP_OP_REGEX:
				if ($operand_left === null ||
					$operand_left === '' ||
					$operand_right === null ||
					$operand_right === '') {
					return false;
				}
		}

		//比較演算
		switch ($operator) {
			case static::COMP_OP_EQ:
				return $operand_left	==	$operand_right;
			case static::COMP_OP_N_EQ:
				return $operand_left	!=	$operand_right;
			case static::COMP_OP_LT:
				return $operand_left	<	$operand_right;
			case static::COMP_OP_LT_EQ:
				return $operand_left	<=	$operand_right;
			case static::COMP_OP_GT:
				return $operand_left	>	$operand_right;
			case static::COMP_OP_GT_EQ:
				return $operand_left	>=	$operand_right;
			case static::COMP_OP_ANY:
				return $operand_left	!=	null && ($operand_left != '' || $operand_left === 0);
			case static::COMP_OP_EMPTY:
				return $operand_left	==	null || ($operand_left == '' && $operand_left !== 0);
			case static::COMP_OP_REGEX:
				return preg_match("/". $operand_right ."/", $operand_left) === 1;
		}

		//対象となる比較演算子がない場合はfalse
		return false;
	}
1272221
function(e){
		if(e.touches!==void 0){
			/* touchイベントだった場合 */
			return (e.touches.length===1 ? 'left' : '');
		}
		else if(!!e.pointerType && e.pointerType!=='mouse'){
			/* pointerイベントだった場合 */
			return (e.isPrimary ? 'left' : '');
		}
		return ['left','middle','right'][(e.button!==void 0 ? e.button : e.which-1)] || '';
	}
421610
void accept(PassedRoute passRoute) {
		//各行の通過情報を集計
		for (LineRange range : lineRanges) {
			if (passRoute.isHit(range)) {
				hitLines[range.getLineIndex()]++;
			}
		}
		//各行のブランチ情報を集計
		passRoute.getRangeBranchStatus().forEach((range, state) -> {
			RangeBranch branch = branches.computeIfAbsent(range, RangeBranch::new);
			branch.add(state);
		});

		//各通過情報を集計
		passRanges.addAll(passRoute.getHitRanges());

		updated = true;

	}
612970
private List<Token> convertFactor(final Token.Factor factor) {
        
        final String item = factor.getValue();
        final int itemLength = item.length();
        
        final List<Token> list = new ArrayList<>();
        
        int idx = 0;
        StringBuilder noTermChar = new StringBuilder(); // フォーマット以外の文字列を積む。
        while(idx < itemLength) {
            
            String matchChars = null;
            for(String chars : SORTED_DATE_CHARS) {
                if(Utils.startsWithIgnoreCase(item, chars, idx)) {
                    matchChars = item.substring(idx, idx + chars.length());
                    break;
                }
            }
            
            if(matchChars == null) {
                // フォーマットでない場合は、文字列としてバッファに追加する。
                noTermChar.append(item.charAt(idx));
                idx++;
            } else {
                if(noTermChar.length() > 0) {
                    // 今まで積んだバッファを、文字列として分割する。
                    list.add(Token.factor(noTermChar.toString()));
                    noTermChar = new StringBuilder();
                }
                
                list.add(Token.formatter(matchChars));
                idx += matchChars.length();
                
            }
        }
        
        if(noTermChar.length() > 0) {
            list.add(Token.factor(noTermChar.toString()));
        }
        
        return list;
    }
289025
function task () {
  run = true;
  var item = messages.shift();
  if (!item) {
    run = false;

  // 書き込み
  } else if ('message' in item) {
    if (output_) {
      write(item);
    } else {
      task();
    }

  // パスの変更
  } else if (item.path) {
    p_ = path.resolve(p_, item.path);
    task();

  // 出力のコントロール
  } else if ('output' in item) {
    output_ = item.output;
    task();

  } else {
    task();
  }
}
469337
public function automatic_form(){
		@header('text/html; charset=UTF-8');

		$rtn = '';

		if( !strlen($this->options['table']) ){
			// --------------------
			// 対象のテーブルが選択されていない
			echo $this->page_table_list();
			return null;
		}

		$table_definition = $this->get_current_table_definition();
		// var_dump($table_definition);
		if( !$table_definition ){
			@header("HTTP/1.0 404 Not Found");
			$rtn = $this->page_fatal_error('Table NOT Exists.');
			echo $rtn;
			return null;
		}

		if( !strlen($this->options['id']) ){
			// ID無指定の場合、一覧情報を返す
			echo $this->page_list($this->options['table']);
			return null;
		}elseif( $this->options['id'] == ':create' ){
			// IDの代わりに文字列 `:create` が指定されたら、新規作成画面を返す
			echo $this->page_edit($this->options['table']);
			return null;
		}else{
			// ID指定がある場合、詳細情報1件を返す
			$row_data = $this->get_current_row_data();
			if( !$row_data && !($this->options['action'] == 'delete' && $this->query_options['action'] == 'done') ){
				@header("HTTP/1.0 404 Not Found");
				$rtn = $this->page_fatal_error('ID NOT Exists.');
				echo $rtn;
				return null;
			}

			if( $this->options['action'] == 'delete' ){
				echo $this->page_delete($this->options['table'], $this->options['id']);
			}elseif( $this->options['action'] == 'edit' ){
				echo $this->page_edit($this->options['table'], $this->options['id']);
			}else{
				echo $this->page_detail($this->options['table'], $this->options['id']);
			}
			return null;
		}



		// エラー画面
		$rtn = $this->page_fatal_error('Unknown method');
		echo $rtn;

		return null;
	}
1153874
function (resolvedCallback, errorCallback, progressCallback) {
        var returnDeferred = new Deferred(this._canceller), //new Deferred(this.getPromise().cancel)
            listener = {
                resolved : resolvedCallback,
                error : errorCallback,
                progress : progressCallback,
                deferred : returnDeferred
            };

        if (this.finished) {
            this._notify(listener);
        } else {
            this.waiting.push(listener);
        }
        return returnDeferred.getPromise();
    }