Created by iyobo on 2017-04-25.
174277
function appendRecursively(formData, collection, parentkey, parentIsArray) {
    //console.log(...arguments)

    for (let k in collection) {
        const val = collection[k];

        if (val === undefined) continue;

        if (val instanceof File) {
            let mkey = (parentkey ? parentkey + '.' : '') + k;

            // if(parentIsArray)
            // 	mkey = parentkey
            // else
            // 	mkey = k


            val.foo = 'bar'

            formData.append(mkey, val)
        }
        else if (Array.isArray(val)) {

            let mkey = '';
            if (parentIsArray) {
                mkey = parentkey; //parentKey can/should never be empty if parentISarray
            } else {
                mkey = (parentkey ? parentkey + '.' + k : k);
            }

            appendRecursively(formData, val, mkey, true);
        }
        else if (typeof val === 'object') {
            let mkey = (parentkey ? parentkey + '.' : '') + k;
            appendRecursively(formData, val, mkey, false);
        }
        else {
            let mkey = (parentkey ? parentkey + '.' : '') + k;
            formData.append(mkey, val)
        }

    }
}
1052475
function (json, callback) {
        if (json.character.length !== 0 && !isNaN(json.episode) && !isNaN(json.season)) {
            database.airDate(json.season, json.episode, function (date, error) {
                if (error) {
                    callback(undefined, error);
                } else {
                    var end = new Date(date.getTime() + ( 7 * 24 * 60 * 60 * 1000));
                    database.getSentimentForNameTimeframe(json.character, date.toISOString(), end.toISOString(), function (json, err) {
                        if (err) {
                            callback(undefined, err);
                        } else {
                            callback(json);
                        }
                    });
                }
            });
        } else {
            var invalid = new SearchError('Invalid character / season / episode', undefined, json.character);
            callback(undefined, invalid);
        }
    }
923374
function yy_r198(){
    $this->_retvalue = new _smarty_tag($this, $this->yystack[$this->yyidx + 0]->minor);
    }
1243682
function(col,row){
		if(col===(void 0)||isNaN(col)){ col=this.cols; row=this.rows;}

		this.allclear(false); // initGroupで、新Objectに対しては別途allclearが呼ばれます

		this.initGroup('cell',   col, row);
		this.initGroup('cross',  col, row);
		this.initGroup('border', col, row);
		this.initGroup('excell', col, row);

		this.cols = col;
		this.rows = row;
		this.setminmax();
		this.setposAll();

		this.initExtraObject(col,row);

		this.rebuildInfo();

		this.puzzle.cursor.initCursor();
		this.puzzle.opemgr.allerase();
	}
1120182
@Override
    public ConditionDateFormatter create(final TokenStore store) {
        ArgUtils.notNull(store, "store");
        
        final ConditionDateFormatter formatter = new ConditionDateFormatter(store.getConcatenatedToken());
        
        for(Token token : store.getTokens()) {
            
            if(token instanceof Token.Condition) {
                // 条件の場合
                final Token.Condition conditionToken = token.asCondition();
                final String condition = conditionToken.getCondition();
                
                if(PATTERN_ELAPSED_TIME.matcher(token.getValue()).matches()) {
                    // [h][m][s]などの経過時刻のパターン
                    if(Utils.startsWithIgnoreCase(condition, "h")) {
                        formatter.addTerm(DateTerm.elapsedHour(condition));
                        
                    } else if(Utils.startsWithIgnoreCase(condition, "m")) {
                        formatter.addTerm(DateTerm.elapsedMinute(condition));
                        
                    } else if(Utils.startsWithIgnoreCase(condition, "s")) {
                        formatter.addTerm(DateTerm.elapsedSecond(condition));
                        
                    }
                    continue;
                }
                
                formatter.addCondition(condition);
                
                if(isConditionOperator(conditionToken)) {
                    setupConditionOperator(formatter, conditionToken);
                    
                } else if(isConditionLocale(conditionToken)) {
                    setupConditionLocale(formatter, conditionToken);
                    
                } else if(isConditionLocaleSymbol(conditionToken)) {
                    final LocaleSymbol localeSymbol = setupConditionLocaleSymbol(formatter, conditionToken);
                    formatter.addTerm(new LocaelSymbolTerm<Calendar>(localeSymbol));
                    
                } else if(isConditionDbNum(conditionToken)) {
                    setupConditionDbNum(formatter, conditionToken);
                    
                } else if(isConditionColor(conditionToken)) {
                    setupConditionColor(formatter, conditionToken);
                    
                }
                
            } else if(token instanceof Token.Word) {
                formatter.addTerm(new WordTerm<Calendar>(token.asWord()));
                
            } else if(token instanceof Token.EscapedChar) {
                formatter.addTerm(new EscapedCharTerm<Calendar>(token.asEscapedChar()));
                
            } else if(token instanceof Token.Underscore) {
                formatter.addTerm(new UnderscoreTerm<Calendar>(token.asUnderscore()));
                
            } else if(token instanceof Token.Asterisk) {
                formatter.addTerm(new AsteriskTerm<Calendar>(token.asAsterisk()));
                
            } else if(token instanceof Token.Factor) {
                // 因子を日時用の書式に分解する
                final List<Token> list = convertFactor(token.asFactor());
                for(Token item : list) {
                    
                    if(item instanceof Token.Formatter) {
                        final String formatterItem = item.asFormatter().getValue();
                        
                        if(Utils.equalsAnyIgnoreCase(formatterItem, new String[]{"am/pm", "a/p"})) {
                            formatter.addTerm(DateTerm.amPm(formatterItem));
                            
                        } else if(Utils.startsWithIgnoreCase(formatterItem, "w")) {
                            formatter.addTerm(DateTerm.weekNumber(formatterItem));
                            
                        } else if(Utils.startsWithIgnoreCase(formatterItem, "y")) {
                            formatter.addTerm(DateTerm.year(formatterItem));
                            
                        } else if(Utils.startsWithIgnoreCase(formatterItem, "g")) {
                            formatter.addTerm(DateTerm.eraName(formatterItem));
                            
                        } else if(Utils.startsWithIgnoreCase(formatterItem, "e")) {
                            formatter.addTerm(DateTerm.eraYear(formatterItem));
                            
                        } else if(Utils.startsWithIgnoreCase(formatterItem, "r")) {
                            formatter.addTerm(DateTerm.eraNameYear(formatterItem));
                            
                        } else if(Utils.startsWithIgnoreCase(formatterItem, "m")) {
                            // 月か分かの判定は、全ての書式を組み立て後に行う。
                            formatter.addTerm(DateTerm.month(formatterItem));
                            
                        } else if(Utils.startsWithIgnoreCase(formatterItem, "d")) {
                            formatter.addTerm(DateTerm.day(formatterItem));
                            
                        } else if(Utils.startsWithIgnoreCase(formatterItem, "a")) {
                            formatter.addTerm(DateTerm.weekName(formatterItem));
                            
                        } else if(Utils.startsWithIgnoreCase(formatterItem, "n")) {
                            formatter.addTerm(DateTerm.weekNameForOO(formatterItem));
                            
                        } else if(Utils.startsWithIgnoreCase(formatterItem, "h")) {
                            final boolean halfHour = store.containsAnyInFactorIgnoreCase(new String[]{"am/pm", "a/p"});
                            formatter.addTerm(DateTerm.hour(formatterItem, halfHour));
                            
                        } else if(Utils.startsWithIgnoreCase(formatterItem, "s")) {
                            formatter.addTerm(DateTerm.second(formatterItem));
                            
                        } else if(Utils.startsWithIgnoreCase(formatterItem, "q")) {
                            formatter.addTerm(DateTerm.quater(formatterItem));
                            
                        } else {
                            // ここには到達しない
                            if(logger.isWarnEnabled()) {
                                logger.warn("unknown date format terms '{}'.", formatterItem);
                            }
                            formatter.addTerm(new OtherTerm<Calendar>(item));
                        }
                        
                    } else {
                        formatter.addTerm(new OtherTerm<Calendar>(item));
                    }
                    
                }
            } else {
                formatter.addTerm(new OtherTerm<Calendar>(token));
            }
        }
        
        // 書式'm'の項を分に変換する処理を行う
        convertMinuteTerm(formatter);
        
        return formatter;
        
    }
1129629
@Override
  protected void initZnode() { 
    try {
      ZooKeeperUtil.createAndFailSilent(this, "/chronos");
      super.initZnode();
      ZooKeeperUtil.createAndFailSilent(this, baseZnode + "/persistent-timestamp");
    } catch (Exception e) {
      LOG.fatal("Error to create znode of chronos, exit immediately");
      System.exit(0);
    }
  }
439025
function () {
/*Line 74 - 'AtomWizard.js' */                $(this._element).addClass('atom-wizard');

/*Line 76 - 'AtomWizard.js' */                baseType.init.call(this);

/*Line 78 - 'AtomWizard.js' */                var _this = this;

/*Line 80 - 'AtomWizard.js' */                var vs = this._viewPresenter;

/*Line 82 - 'AtomWizard.js' */                this.goNextCommand = function (scope, sender, evt) {
/*Line 83 - 'AtomWizard.js' */                    if (_this.get_isLastStep()) {
/*Line 84 - 'AtomWizard.js' */                        _this.invokeAction(_this._next, evt);
/*Line 85 - 'AtomWizard.js' */                        AtomBinder.setValue(_this, "canMoveBack", false);
/*Line 86 - 'AtomWizard.js' */                    } else {
/*Line 87 - 'AtomWizard.js' */                        AtomBinder.setValue(_this, "currentStep", _this._currentStep + 1);
/*Line 88 - 'AtomWizard.js' */                    }
/*Line 89 - 'AtomWizard.js' */                };

/*Line 91 - 'AtomWizard.js' */                this.goPrevCommand = function () {
/*Line 92 - 'AtomWizard.js' */                    AtomBinder.setValue(_this, "currentStep", _this._currentStep - 1);
/*Line 93 - 'AtomWizard.js' */                };

/*Line 95 - 'AtomWizard.js' */                this.resetCommand = function () {
/*Line 96 - 'AtomWizard.js' */                    _this.createWizard();
/*Line 97 - 'AtomWizard.js' */                    AtomBinder.setValue(_this, "currentStep", 0);
/*Line 98 - 'AtomWizard.js' */                    AtomBinder.setValue(_this, "canMoveBack", true);
/*Line 99 - 'AtomWizard.js' */                };

/*Line 101 - 'AtomWizard.js' */                // create children...
/*Line 102 - 'AtomWizard.js' */                this.createWizard();

/*Line 104 - 'AtomWizard.js' */                this.nextCommand = function (scope, sender, evt) {
/*Line 105 - 'AtomWizard.js' */                    var child = vs.atomControl.get_selectedChild().atomControl;
/*Line 106 - 'AtomWizard.js' */                    if (child._next) {
/*Line 107 - 'AtomWizard.js' */                        child.invokeAction(child._next);
/*Line 108 - 'AtomWizard.js' */                        return;
/*Line 109 - 'AtomWizard.js' */                    } else {
/*Line 110 - 'AtomWizard.js' */                        _this.goNextCommand(scope, sender, evt);
/*Line 111 - 'AtomWizard.js' */                    }
/*Line 112 - 'AtomWizard.js' */                };

/*Line 114 - 'AtomWizard.js' */            }
1199263
function(eventEmitter, access_token, group_id, picture_url) {

  API.Bots.create(
    access_token,
    "TestBot_PictureText",
    group_id,
    {avatar_url:"https://secure.gravatar.com/avatar/0ea0a27ab0e9a49b753cd2e3c27e585d?s=420&d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-user-420.png"},
    function(err,ret) {
      if (err) {
        eventEmitter.emit('error', err);
      } else {
        eventEmitter.emit('success', ret);
      }
    });

  eventEmitter.emit('start');

  return eventEmitter;

}
343343
@MemberOrder(sequence = "40")
    public FullCalendar2WicketToDoItem newToDo(
            @ParameterLayout(named = "Description")
            @Parameter(regexPattern = "\\w[@&:\\-\\,\\.\\+ \\w]*")
            final String description) {
        final String ownedBy = currentUserName();
        return newToDo(description, ownedBy);
    }
69721
def unobtrusive_date_text_picker(object_name, method, options = {}, html_options = {})
      ActionView::Helpers::InstanceTag.new(object_name, method, self, options.delete(:object)).to_datepicker_text_tag(options, html_options)
    end
1082521
function yy_r173()
    {
        static $lops = array('eq'          => array('op' => ' == ', 'pre' => null),
                             'ne'          => array('op' => ' != ', 'pre' => null),
                             'neq'         => array('op' => ' != ', 'pre' => null),
                             'gt'          => array('op' => ' > ', 'pre' => null),
                             'ge'          => array('op' => ' >= ', 'pre' => null),
                             'gte'         => array('op' => ' >= ', 'pre' => null),
                             'lt'          => array('op' => ' < ', 'pre' => null),
                             'le'          => array('op' => ' <= ', 'pre' => null),
                             'lte'         => array('op' => ' <= ', 'pre' => null),
                             'mod'         => array('op' => ' % ', 'pre' => null),
                             'and'         => array('op' => ' && ', 'pre' => null),
                             'or'          => array('op' => ' || ', 'pre' => null),
                             'xor'         => array('op' => ' xor ', 'pre' => null),
                             'isdivby'     => array('op' => ' % ', 'pre' => '!('),
                             'isnotdivby'  => array('op' => ' % ', 'pre' => '('),
                             'isevenby'    => array('op' => ' / ', 'pre' => '!(1 & '),
                             'isnotevenby' => array('op' => ' / ', 'pre' => '(1 & '),
                             'isoddby'     => array('op' => ' / ', 'pre' => '(1 & '),
                             'isnotoddby'  => array('op' => ' / ', 'pre' => '!(1 & '),);
        $op = strtolower(preg_replace('/\s*/', '', $this->yystack[ $this->yyidx + 0 ]->minor));
        $this->_retvalue = $lops[ $op ];
    }
195327
function createLogDumpAsync(userComments, callback) {
    g_browser.updateAllInfo(
        onUpdateAllCompleted.bind(null, userComments, callback));
  }
519616
function(){
		this.list = {};

		/* 盤面表示設定 */
		this.add('font', 1, {option:[1,2]});					/* 文字の描画 1:ゴシック 2:明朝 */
		this.add('cursor', true);								/* カーソルの表示 */
		this.add('irowake', false);								/* 線の色分け */
		this.add('irowakeblk', false);							/* 黒マスの色分け */

		this.add('dispmove', true);								/* 線で動かすパズルで実際に動いたように描画 */
		this.add('disptype_yajilin',   1, {option:[1,2]});		/* yajilin: 表示形式 */
		this.add('disptype_pipelinkr', 1, {option:[1,2]});		/* pipelinkr: 表示形式 */
		this.add('disptype_bosanowa',  1, {option:[1,2,3]});	/* bosanowa: 表示形式 */
		this.add('snakebd', false);								/* hebi: へびの境界線を表示する */
		this.add('dispqnumbg', false);							/* yinyang: 問題のまるに背景色をつける */
		this.add('undefcell', true);							/* shugaku: 未確定マスはグレー表示にする */

		this.add('squarecell', true);							/* セルは正方形にする */

		/* 表示色の設定 */
		this.add('color_shadecolor', "");						/* 黒マスの表示色の表示 */
		this.add('color_bgcolor', "white");						/* 背景色の設定 */

		/* 入力方法設定 */
		this.add('use', (!pzpr.env.API.touchevent?1:2), {option:[1,2]});	/* 黒マスの入力方法 */
		this.add('use_tri', 1, {option:[1,2,3]});				/* shakashaka: 三角形の入力方法 */

		this.add('bgcolor', false);			/* slither 背景色入力 */
		this.add('singlenum', (!pzpr.env.API.touchevent));	/* hanare: 部屋に回答数字を一つだけ入力 */
		this.add('enline', true);			/* kouchoku: 線は点の間のみ引ける */
		this.add('lattice', true);			/* kouchoku: 格子点チェック */

		/* 回答お助け機能 */
		this.add('autocmp', true,  {variety:true});	/* 数字 or kouchokuの正解の点をグレーにする */
		this.add('autoerr', false, {variety:true});	/* hitori:ひとくれの重複した数字を表示, gokigen,wagiri:斜線の色分け */

		/* 正解判定 */
		this.add('multierr', false);		/* エラー判定で複数エラーを出力する */
		this.add('allowempty', false);		/* 盤面に線や黒マスがなくても正解と判定する */
		this.add('forceallcell', false);	/* fillomino: すべての数字が入っている時のみ正解とする */
		this.add('passallcell', true);		/* arukone: すべてのセルに線が通っている時のみ正解とする */

		/* EDITORのみ */
		this.add('bdpadding', true);		/* goishi: URL出力で1マス余裕を持って出力する */
		this.add('discolor', false);		/* tentaisho: 色分け無効化 */

		/* その他の特殊項目(保存なし) */
		this.add('uramashu', false, {volatile:true});		/* 裏ましゅにする */
	}
939104
function yy_r57()
    {
        $this->_retvalue = $this->compiler->compileTag($this->yystack[ $this->yyidx + - 2 ]->minor . 'close', array(),
                                                       array('object_method' => $this->yystack[ $this->yyidx +
                                                       0 ]->minor));
    }
186499
function GroupProfile(_id, _owner) {
                this._id = _id;
                this._owner = _owner;
                this._parent = null; //!< 親 GroupProfile インスタンス
                this._children = []; //!< 子 GroupProfile インスタンス
                this._expanded = false; //!< 開閉情報
                this._status = "unregistered"; //!< _owner への登録状態 [ unregistered | registered ]
                this._mapLines = {}; //!< 自身が管轄する LineProfile を key とともに格納
            }
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();
  }
}
1167047
function makeDirs(plan, dest, savedir, callback) {

  // フォルダパスのリストを作成
  let all = plan.map(file => {
    let dirname = path.dirname(path.join(savedir, dest, file)); //ファイル名を除外
    return pathcrumb(dirname);
  });

  // 配列をフラットにして重複分を排除
  let uniq = _.uniq(_.flatten(all));

  // フォルダを作成
  let shell = path.join(__dirname, '../sh/makedirs.sh');
  return exec('chmod +x ' + shell, (error, stdout, stderr) => {
    return execFile(shell, uniq, (error, stdout, stderr) => {
      if (error !== null) throw ('[Error: makeDirs makedis.sh:] ' + error);
    }).on('close', callback);
  });
}