text:
package com.suwonsmartapp.tourlist.database;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.Locale;

/**
 * Created by HYUN.KI.UNG on 2015-04-07.
 */
public class DatabaseHelper {

    public String DATABASE_NAME = "TourList.db";
    public int DATABASE_VERSION = 1;
    public String DATABASE_PATH = "";

    private String TNAME_CODEMT = "TT_CODEMT";
    private String TNAME_LISTMT = "TT_LISTMT";
    private String TNAME_PHOTODT = "TT_PHOTODT";

    private String TCREATE_CODEMT = "create table if not exists "+ TNAME_CODEMT +
                                    " (" +
                                    "    _id integer PRIMARY KEY autoincrement" +
                                    "   ,key text" +
                                    "   ,value text" +
                                    "   ,wdt text" +
                                    " )";

    private String TCREATE_LISTMT = "create table if not exists "+ TNAME_LISTMT +
                                    " (" +
                                    "    _id integer PRIMARY KEY autoincrement" +
                                    "   ,title1 text" +
                                    "   ,title2 text" +
                                    "   ,title3 text" +
                                    "   ,contents text" +
                                    "   ,weather text" +
                                    "   ,companion text" +
                                    "   ,location text" +
                                    "   ,pid integer default 0" +
                                    "   ,tdt text" +
                                    "   ,wdt text" +
                                    "   ,edt text" +
                                    " )";

    private String TCREATE_PHOTODT = "create table if not exists "+ TNAME_PHOTODT +
                                    " (" +
                                    "    _id integer PRIMARY KEY autoincrement" +
                                    "   ,mid integer" +
                                    "   ,FullUrl text" +
                                    "   ,wdt text" +
                                    " )";

    private String sqlQuery = "";

    // DB 관련 객체 선언
    private DB_Helper opener; // DB opener
    private SQLiteDatabase db; // DB controller

    // 부가적인 객체들
    private Context activity_Context;
    private ArrayList<String> Helper_TABLE_List;

    private Info_CODEMT infoClass_CODEMT;
    private ArrayList<Info_CODEMT> ArrayList_CODEMT;

    private Info_LISTMT infoClass_LISTMT;
    private ArrayList<Info_LISTMT> ArrayList_LISTMT;

    private Info_PHOTODT infoClass_PHOTODT;
    private ArrayList<Info_PHOTODT> ArrayList_PHOTODT;

    public DatabaseHelper(Context context) {
        Result_Log("TourList_DB_Helper() 생성자");
        this.activity_Context = context;
        opener = new DB_Helper(context);
    }

    // Class Open
    public boolean open() throws SQLException {
        Result_Log("TourList_DB_Helper --> open()");
        db = opener.getWritableDatabase();
        DATABASE_VERSION = db.getVersion();
        DATABASE_PATH = db.getPath();
        db.setLocale(Locale.KOREA); // SQLite 다국어처리 NO_LOCALIZED_COLLATORS
        return true;
    }

    // Class Close
    public void close() {
        Result_Log("TourList_DB_Helper --> close()");
        opener.close();
    }

    //==================================================
    // Table Control Method Start ======================
    //==================================================
    // ★★ 커스텀 메소드 ★★ TABLE 내역 메소드
    public ArrayList<String> TABLE_TableAll_inDB() {
        Result_Log("상위클래스 메소드 TABLE_TableAll_inDB : " + DATABASE_NAME);
        // 1. 배열선언
        Helper_TABLE_List = new ArrayList<>();
        // 2. 쿼리 생성
        String strSQL = "select name from sqlite_master where type = 'table' "
                + "and name not in ('android_metadata', 'sqlite_sequence') "
                + "order by name asc";
        // 3. 커서에 쿼리 실행 수행
        Cursor cursor = db.rawQuery(strSQL, null);
        // 4. cursor가 비어 있으면 빈데이터 넣어주고 값 존재시 조회 데이터 add
        if (cursor.getCount() == 0) {
            Helper_TABLE_List.add("NONE_TABLE");
        } else {
            // 5. 첫번째 행으로 이동한뒤 다음행이 있을때까지 반복
            cursor.moveToFirst();
            while (!cursor.isAfterLast()) {
                Helper_TABLE_List.add(cursor.getString(0));
                cursor.moveToNext();
            }
        }
        // 6. 커서 닫고, 배열리턴
        cursor.close();
        return Helper_TABLE_List;
    }
    //==================================================
    // Table Control Method End ========================
    //==================================================

    //==============================================================
    // Table Control TT_CODEMT Method Start ========================
    //==============================================================
    // TT_CODEMT : Insert Data
    public long CODEMT_insertColumn(String key, String value, String wdt){
        Result_Log("CODEMT_insertColumn() : " + key + value + wdt);
        ContentValues values = new ContentValues();
        values.put("key", key);
        values.put("value", value);
        values.put("wdt", wdt);
        long addResult = db.insert(TNAME_CODEMT, null, values);
        return addResult;
    }

    // TT_CODEMT : Delete Data
    public int CODEMT_deleteColumn(int id){
        Result_Log("CODEMT_deleteColumn() : _id = " + id);
        int delCount = db.delete(TNAME_CODEMT, "_id =" + id, null);
        return delCount;
    }

    // TT_CODEMT : Update Data
    public int CODEMT_updateColumn(int id, String key, String value, String wdt) {
        Result_Log("CODEMT_deleteColumn() : _id = " + id);
        ContentValues values = new ContentValues();
        values.put("key", key);
        values.put("value", value);
        values.put("wdt", wdt);
        int upCount = db.update(TNAME_CODEMT, values, "_id ="+id, null);
        return upCount;
    }

    // TT_CODEMT : Select All Data
    public ArrayList<Info_CODEMT> CODEMT_selectColumn_All(int sel_id) {
        Result_Log("CODEMT_selectColumn_All() : " + TNAME_CODEMT);
        ArrayList_CODEMT = new ArrayList<>();

        if(sel_id == 0) {
            sqlQuery = "select _id, key, value, wdt from " + TNAME_CODEMT;
        } else {
            sqlQuery = "select _id, key, value, wdt from " + TNAME_CODEMT + " where _id=" + sel_id;
        }
        Cursor cur = db.rawQuery(sqlQuery, null);

        if (cur.getCount() == 0) {
            //Helper_TABLE_List.add("NONE_DATA", "NONE_DATA", "NONE_DATA", "NONE_DATA");
        } else {
            cur.moveToFirst();
            while (!cur.isAfterLast()) {
                infoClass_CODEMT = new Info_CODEMT(
                        cur.getInt(cur.getColumnIndex("_id")),
                        cur.getString(cur.getColumnIndex("key")),
                        cur.getString(cur.getColumnIndex("value")),
                        cur.getString(cur.getColumnIndex("wdt"))
                );
                ArrayList_CODEMT.add(infoClass_CODEMT);
                Result_Log("CODEMT_selectColumn_All() while == " + infoClass_CODEMT);
                cur.moveToNext();
            }
        }
        cur.close();
        return ArrayList_CODEMT;
    }
    //==============================================================
    // Table Control TT_CODEMT Method End ==========================
    //==============================================================

    //==============================================================
    // Table Control TT_LISTMT Method Start ========================
    //==============================================================
    // TT_LISTMT : Insert Data
    public long LISTMT_insertColumn(String title1, String title2, String title3, String contents, String weather, String companion, String location, String tdt, String wdt, String edt){
        Result_Log("LISTMT_insertColumn()" + title1 + title2 + title3);
        ContentValues values = new ContentValues();
        values.put("title1", title1);
        values.put("title2", title2);
        values.put("title3", title3);
        values.put("contents", contents);
        values.put("weather", weather);
        values.put("companion", companion);
        values.put("location", location);
        values.put("tdt", tdt);
        values.put("wdt", wdt);
        values.put("edt", edt);
        long addResult = db.insert(TNAME_LISTMT, null, values);
        return addResult;
    }

    /**
     *
     * @param title1
     * @param title2
     * @param title3
     * @param contents
     * @param weather
     * @param companion
     * @param location
     * @param tdt
     * @return
     */
    public long LISTMT_insertColumn(String title1, String title2, String title3, String contents, String weather, String companion, String location, String tdt){
        Result_Log("LISTMT_insertColumn()" + title1 + title2 + title3);
        ContentValues values = new ContentValues();
        values.put("title1", title1);
        values.put("title2", title2);
        values.put("title3", title3);
        values.put("contents", contents);
        values.put("weather", weather);
        values.put("companion", companion);
        values.put("location", location);
        values.put("tdt", tdt);
        long addResult = db.insert(TNAME_LISTMT, null, values);
        return addResult;
    }

    /**
     * for TEST
     * @param title1
     * @return
     */
    public long LISTMT_insertColumn(String title1){
        Result_Log("LISTMT_insertColumn()" + title1);
        ContentValues values = new ContentValues();
        values.put("title1", title1);
        long addResult = db.insert(TNAME_LISTMT, null, values);
        return addResult;
    }

//    public long LISTMT_insertColumn(Info_LISTMT data) {
//        return this.LISTMT_insertColumn(data.title1);
//    }

    public long LISTMT_insertColumn(Info_LISTMT data) {
        return this.LISTMT_insertColumn(data.title1, data.title2, data.title3, data.contents,
                data.weather, data.companion, data.location, data.tdt);
    }

    // TT_LISTMT : Delete Data
    public int LISTMT_deleteColumn(int id){
        Result_Log("LISTMT_deleteColumn() : _id = " + id);
        int delCount = db.delete(TNAME_LISTMT, "_id =" + id, null);
        return delCount;
    }

    // TT_LISTMT : Update Data
    public int LISTMT_updateColumn(int id, String title1, String title2, String title3, String contents, String weather, String companion, String location, String tdt,String edt) {
        Result_Log("LISTMT_updateColumn() : _id = " + id);
        ContentValues values = new ContentValues();
        values.put("title1", title1);
        values.put("title2", title2);
        values.put("title3", title3);
        values.put("contents", contents);
        values.put("weather", weather);
        values.put("companion", companion);
        values.put("location", location);
        values.put("tdt", tdt);
        values.put("edt", edt);
        int upCount = db.update(TNAME_LISTMT, values, "_id = "+id, null);
        return upCount;
    }

    // TT_LISTMT : Update Data : 대표사진 수정 (pid)
    public int LISTMT_updatePhoto(int id, int pid) {
        Result_Log("LISTMT_updatePhoto() : _id = " + id + ", pid = " + pid);
        ContentValues values = new ContentValues();
        values.put("pid", pid);
        int upCount = db.update(TNAME_LISTMT, values, "_id = "+id, null);
        return upCount;
    }

    // TT_LISTMT : Select All Data
    public ArrayList<Info_LISTMT> LISTMT_selectColumn_All(int sel_id) {
        Result_Log("LISTMT_selectColumn_All() : " + TNAME_LISTMT);
        ArrayList_LISTMT = new ArrayList<>();
        // pid로 PHOTODT 조인해서 사진 경로 추가할것
        if(sel_id == 0) {
            sqlQuery = " select a._id, a.title1, a.title2, a.title3, a.contents, a.weather, " +
                    "       a.companion, a.location, a.pid, a.tdt, a.wdt, a.edt, b.FullUrl as pFullUrl " +
                    " from " + TNAME_LISTMT + " a " +
                    " left join " + TNAME_PHOTODT + " b " +
                    " ON a.pid = b._id";
        } else {
            sqlQuery = " select a._id, a.title1, a.title2, a.title3, a.contents, a.weather, " +
                    "       a.companion, a.location, a.pid, a.tdt, a.wdt, a.edt, b.FullUrl as pFullUrl " +
                    " from " + TNAME_LISTMT + " a " +
                    " left join " + TNAME_PHOTODT + " b " +
                    " ON a.pid = b._id " +
                    " where a._id = " + sel_id;
        }
        Result_Log(sqlQuery);
        Cursor cur = db.rawQuery(sqlQuery, null);

        if (cur.getCount() == 0) {
            //Helper_TABLE_List.add("NONE_DATA", "NONE_DATA", "NONE_DATA", "NONE_DATA");
        } else {
            cur.moveToFirst();
            while (!cur.isAfterLast()) {
                infoClass_LISTMT = new Info_LISTMT(
                        cur.getInt(cur.getColumnIndex("_id")),
                        cur.getString(cur.getColumnIndex("title1")),
                        cur.getString(cur.getColumnIndex("title2")),
                        cur.getString(cur.getColumnIndex("title3")),
                        cur.getString(cur.getColumnIndex("contents")),
                        cur.getString(cur.getColumnIndex("weather")),
                        cur.getString(cur.getColumnIndex("companion")),
                        cur.getString(cur.getColumnIndex("location")),
                        cur.getInt(cur.getColumnIndex("pid")),
                        cur.getString(cur.getColumnIndex("tdt")),
                        cur.getString(cur.getColumnIndex("wdt")),
                        cur.getString(cur.getColumnIndex("edt")),
                        cur.getString(cur.getColumnIndex("pFullUrl"))
                );
                ArrayList_LISTMT.add(infoClass_LISTMT);
                cur.moveToNext();
            }
        }
        cur.close();
        Result_Log("LISTMT_selectColumn_All() while == " + ArrayList_LISTMT);
        return ArrayList_LISTMT;
    }
    //==============================================================
    // Table Control TT_LISTMT Method End ==========================
    //==============================================================

    //==============================================================
    // Table Control TT_PHOTODT Method Start =======================
    //==============================================================
    // TT_PHOTODT : Insert Data
    public long PHOTODT_insertColumn(int mid, String fullurl, String wdt){
        Result_Log("PHOTODT_insertColumn()" + mid + fullurl + wdt);
        ContentValues values = new ContentValues();
        values.put("mid", mid);
        values.put("FullUrl", fullurl);
        values.put("wdt", wdt);
        long addResult = db.insert(TNAME_PHOTODT, null, values);
        return addResult;
    }

    public long PHOTODT_insertColumn(int mid, String fullurl){
        Result_Log("PHOTODT_insertColumn()" + mid + fullurl);
        ContentValues values = new ContentValues();
        values.put("mid", mid);
        values.put("FullUrl", fullurl);
        long addResult = db.insert(TNAME_PHOTODT, null, values);
        return addResult;
    }

    public long PHOTODT_insertColumn(Info_PHOTODT data){
        return this.PHOTODT_insertColumn(data.mid, data.fullUrl);
    }

    // TT_PHOTODT : Delete Data
    public int PHOTODT_deleteColumn(int id){
        Result_Log("PHOTODT_deleteColumn() : _id = " + id);
        int delCount = db.delete(TNAME_PHOTODT, "_id=" + id, null);
        return delCount;
    }

    // TT_PHOTODT : Update Data
    public int PHOTODT_updateColumn(int id, int mid, String fullurl, String wdt) {
        Result_Log("PHOTODT_deleteColumn() : _id = " + id + ", mid=" + mid);
        ContentValues values = new ContentValues();
        values.put("mid", mid);
        values.put("FullUrl", fullurl);
        values.put("wdt", wdt);
        int upCount = db.update(TNAME_PHOTODT, values, "_id="+id, null);
        return upCount;
    }

    // TT_PHOTODT : Select All Data
    public ArrayList<Info_PHOTODT> PHOTODT_selectColumn_All(int sel_id) {
        Result_Log("PHOTODT_selectColumn_All() : " + TNAME_PHOTODT);
        ArrayList_PHOTODT = new ArrayList<>();

        if(sel_id == 0) {
            sqlQuery = "select _id, mid, FullUrl, wdt from " + TNAME_PHOTODT;
        } else {
            sqlQuery = "select _id, mid, FullUrl, wdt from " + TNAME_PHOTODT + " where _id=" + sel_id;
        }
        Cursor cur = db.rawQuery(sqlQuery, null);

        if (cur.getCount() == 0) {
            //Helper_TABLE_List.add("NONE_DATA", "NONE_DATA", "NONE_DATA", "NONE_DATA");
        } else {
            cur.moveToFirst();
            while (!cur.isAfterLast()) {
                infoClass_PHOTODT = new Info_PHOTODT(
                        cur.getInt(cur.getColumnIndex("_id")),
                        cur.getInt(cur.getColumnIndex("mid")),
                        cur.getString(cur.getColumnIndex("FullUrl")),
                        cur.getString(cur.getColumnIndex("wdt"))
                );
                ArrayList_PHOTODT.add(infoClass_PHOTODT);
                Result_Log("PHOTODT_selectColumn_All() while == " + infoClass_PHOTODT);
                cur.moveToNext();
            }
        }
        cur.close();
        return ArrayList_PHOTODT;
    }
    //==============================================================
    // Table Control TT_PHOTODT Method End =========================
    //==============================================================

    // 흐름 확인용 로그 출력 메소드
    private void Result_Log(String msg) {
        Log.d("로그 : ", msg);
    }
    //=================================================
    // SQLiteOpenHelper Class End =====================
    //=================================================

    // 시스템 시간 리턴 메소드
    public String SystemTime_Now() {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
        String time = dateFormat.format(new Date(System.currentTimeMillis()));
        return time;
    }

    // =================================================
    // SQLiteOpenHelper Class Start ===================
    // =================================================
    public class DB_Helper extends SQLiteOpenHelper {

        public DB_Helper(Context context) {
            super(context, DATABASE_NAME, null, DATABASE_VERSION);
        }

        @Override
        public void onCreate(SQLiteDatabase db) {
            Result_Log("DB_Helper --> onCreate()");
            try {
                db.execSQL(TCREATE_CODEMT);
                db.execSQL(TCREATE_LISTMT);
                db.execSQL(TCREATE_PHOTODT);
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }

        @Override
        public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
            Result_Log("DB_Helper --> onUpgrade()");
            db.execSQL("DROP TABLE IF EXISTS " + TNAME_CODEMT);
            db.execSQL("DROP TABLE IF EXISTS " + TNAME_LISTMT);
            db.execSQL("DROP TABLE IF EXISTS " + TNAME_PHOTODT);
            onCreate(db);
            // 버젼 변경은 단일 DB만 사용할때 할것.
        }
    }

}


text:
% Morgan Burrows
% CSCI 1320
% 2/5/2015
% Assignment 4
% Question 1

% set convertVel equal to the variable "convertedV"
function[convertedV] = convertVel(x) ;
% let convertedV be assigned to the equation (x*0.44704)
convertedV = x*0.44704 ;

redpajama_set_name: RedPajamaGithub


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.scvmm.generated;

import com.azure.core.util.Context;

/** Samples for VirtualMachineTemplates List. */
public final class VirtualMachineTemplatesListSamples {
    /*
     * x-ms-original-file: specification/scvmm/resource-manager/Microsoft.ScVmm/preview/2020-06-05-preview/examples/ListVirtualMachineTemplatesBySubscription.json
     */
    /**
     * Sample code: ListVirtualMachineTemplatesBySubscription.
     *
     * @param manager Entry point to ScvmmManager.
     */
    public static void listVirtualMachineTemplatesBySubscription(com.azure.resourcemanager.scvmm.ScvmmManager manager) {
        manager.virtualMachineTemplates().list(Context.NONE);
    }
}


text:
<?php

namespace Sisaf\SisafBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class UsuarioType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('username')
            ->add('apellidoma')
            ->add('apellidopa')
            ->add('username')
            ->add('password', 'password')
            ->add('email', 'email')
            #->add('userpic', 'file')

            ->add('colonia')
            ->add('calle')
            ->add('numero')
            ->add('edificio')
            ->add('piso')
            ->add('departamento')
            //->add('telefono', 'integer', array('max_length'=>15))
            ->add('telefono')
            ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Sisaf\SisafBundle\Entity\Usuario'
        ));
    }

    public function getName()
    {
        return 'sisaf_sisafbundle_usuariotype';
    }
}


text:
/* eslint-env es6 */
"use strict";

const fs = require('fs');
const compactStringify = require('json-stringify-pretty-compact');

const comparePath = './test/__compare__';
const compareCommand = 'open http://localhost:8000/?compare';
const diffSaveCommand = 'npm run test-save';
const diffCommand = 'code -n -d test/__compare__/examples-build.json test/__compare__/examples-dev.json';
const equalityThreshold = 0.99999;
const colors = { Red: 31, Green: 32, Yellow: 33, White: 37, BrightWhite: 90, BrightCyan: 36 };

const comparisonReport = (capturesDev, capturesBuild, devSize, buildSize, buildVersion, save) => {
    const performanceDev = capturePerformanceTotals(capturesDev);
    const performanceBuild = capturePerformanceTotals(capturesBuild);

    const perfChange = noiseThreshold(1 - (performanceDev.duration / performanceBuild.duration), 0.01);
    const memoryChange = noiseThreshold((performanceDev.memory / performanceBuild.memory) - 1, 0.01);
    const overlapChange = (performanceDev.overlap / (performanceBuild.overlap || 1)) - 1;
    const filesizeChange = (devSize / buildSize) - 1;

    const behaviourSimilaritys = extrinsicSimilarity(capturesDev, capturesBuild, 'behaviourExtrinsic');
    const behaviourSimilarityAverage = extrinsicSimilarityAverage(behaviourSimilaritys);
    const behaviourSimilarityEntries = Object.entries(behaviourSimilaritys);
    behaviourSimilarityEntries.sort((a, b) => a[1] - b[1]);

    const similaritys = extrinsicSimilarity(capturesDev, capturesBuild, 'similarityExtrinsic');
    const similarityAverage = extrinsicSimilarityAverage(similaritys);

    const devIntrinsicsChanged = {};
    const buildIntrinsicsChanged = {};
    let intrinsicChangeCount = 0;

    const captureSummary = Object.entries(capturesDev)
        .map(([name]) => {
            const changedIntrinsics = !equals(capturesDev[name].intrinsic, capturesBuild[name].intrinsic);

            if (changedIntrinsics) {
                capturesDev[name].changedIntrinsics = true;
                if (intrinsicChangeCount < 1) {
                    devIntrinsicsChanged[name] = capturesDev[name].state;
                    buildIntrinsicsChanged[name] = capturesBuild[name].state;
                    intrinsicChangeCount += 1;
                }
            }

            return { name };
        })
        .sort((a, b) => a.name.localeCompare(b.name));

    const report = (breakEvery, format) => [
        [`Output comparison of ${behaviourSimilarityEntries.length}`,
         `examples against previous release ${format('matter-js@' + buildVersion, colors.Yellow)}`
        ].join(' '),

        `\n\n${format('Behaviour  ', colors.White)}`,
        `${format(formatPercent(behaviourSimilarityAverage), behaviourSimilarityAverage === 1 ? colors.Green : colors.Yellow)}%`,

        ` ${format('Similarity', colors.White)}`,
        `${format(formatPercent(similarityAverage), similarityAverage === 1 ? colors.Green : colors.Yellow)}%`,

        ` ${format('Overlap', colors.White)}`,
        ` ${format((overlapChange >= 0 ? '+' : '-') + formatPercent(overlapChange, true), overlapChange <= 0 ? colors.Green : colors.Yellow)}%`,

        `\n${format('Performance', colors.White)}`,
        `${format((perfChange >= 0 ? '+' : '-') + formatPercent(perfChange, true), perfChange >= 0 ? colors.Green : colors.Yellow)}%`,

        ` ${format('Memory', colors.White)}`,
        `    ${format((memoryChange >= 0 ? '+' : '-') + formatPercent(memoryChange, true), memoryChange <= 0 ? colors.Green : colors.Yellow)}%`,

        ` ${format('Filesize', colors.White)}`,
        `${format((filesizeChange >= 0 ? '+' : '-') + formatPercent(filesizeChange, true), filesizeChange <= 0 ? colors.Green : colors.Yellow)}%`,
        `${format(`${(devSize / 1024).toPrecision(4)} KB`, colors.White)}`,

        captureSummary.reduce((output, p, i) => {
            output += `${p.name} `;
            output += `${similarityRatings(behaviourSimilaritys[p.name])} `;
            output += `${changeRatings(capturesDev[p.name].changedIntrinsics)} `;
            if (i > 0 && i < captureSummary.length && breakEvery > 0 && i % breakEvery === 0) {
                output += '\n';
            }
            return output;
        }, '\n\n'),

        `\n\nwhere  · no change  ● extrinsics changed  ◆ intrinsics changed\n`,

        behaviourSimilarityAverage < 1 ? `\n${format('▶', colors.White)} ${format(compareCommand + '=' + 150 + '#' + behaviourSimilarityEntries[0][0], colors.BrightCyan)}` : '',
        intrinsicChangeCount > 0 ? `\n${format('▶', colors.White)} ${format((save ? diffCommand : diffSaveCommand), colors.BrightCyan)}` : ''
    ].join('  ');

    if (save) {
        writeResult('examples-dev', devIntrinsicsChanged);
        writeResult('examples-build', buildIntrinsicsChanged);
        writeResult('examples-report', report(5, s => s));
    }

    return report(5, color);
};

const similarity = (a, b) => {
    const distance = Math.sqrt(a.reduce(
        (sum, _val, i) => sum + Math.pow((a[i] || 0) - (b[i] || 0), 2), 0)
    );
    return 1 / (1 + (distance / a.length));
};

const similarityRatings = similarity => similarity < equalityThreshold ? color('●', colors.Yellow) : '·';
const changeRatings = isChanged => isChanged ? color('◆', colors.White) : '·';
const color = (text, number) => number ? `\x1b[${number}m${text}\x1b[0m` : text;
const formatPercent = (val, abs) => (100 * (abs ? Math.abs(val) : val)).toFixed(2);

const noiseThreshold = (val, threshold) => {
    const sign = val < 0 ? -1 : 1;
    const magnitude = Math.abs(val);
    return sign * Math.max(0, magnitude - threshold) / (1 - threshold);
};

const equals = (a, b) => {
    try {
        expect(a).toEqual(b);
    } catch (e) {
        return false;
    }
    return true;
};

const capturePerformanceTotals = (captures) => {
    const totals = {
        duration: 0,
        overlap: 0,
        memory: 0
    };

    for (const [ name ] of Object.entries(captures)) {
        totals.duration += captures[name].duration;
        totals.overlap += captures[name].overlap;
        totals.memory += captures[name].memory;
    };

    return totals;
};

const extrinsicSimilarity = (currentCaptures, referenceCaptures, key) => {
    const result = {};

    Object.entries(currentCaptures).forEach(([name, current]) => {
        const reference = referenceCaptures[name];
        const worldVector = [];
        const worldVectorRef = [];
        const currentExtrinsic = current[key];
        const referenceExtrinsic = reference[key];

        Object.keys(currentExtrinsic).forEach(objectType => {
            Object.keys(currentExtrinsic[objectType]).forEach(objectId => {
                worldVector.push(...currentExtrinsic[objectType][objectId]);
                worldVectorRef.push(...referenceExtrinsic[objectType][objectId]);
            });
        });

        result[name] = similarity(worldVector, worldVectorRef);
    });

    return result;
};

const extrinsicSimilarityAverage = (similaritys) => {
    const entries = Object.entries(similaritys);
    let average = 0;

    entries.forEach(([_, similarity]) => average += similarity);

    return average /= entries.length;
};

const serialize = (obj, exclude=()=>false, precision=4, path='$', visited=[], paths=[]) => {
    if (typeof obj === 'number') {
        return parseFloat(obj.toPrecision(precision));
    } else if (typeof obj === 'string' || typeof obj === 'boolean') {
        return obj;
    } else if (obj === null) {
        return 'null';
    } else if (typeof obj === 'undefined') {
        return 'undefined';
    } else if (obj === Infinity) {
        return 'Infinity';
    } else if (obj === -Infinity) {
        return '-Infinity';
    } else if (typeof obj === 'function') {
        return 'function';
    } else if (Array.isArray(obj)) {
        return obj.map(
            (item, index) => serialize(item, exclude, precision, path + '.' + index, visited, paths)
        );
    }

    const visitedIndex = visited.indexOf(obj);

    if (visitedIndex !== -1) {
      return paths[visitedIndex];
    }

    visited.push(obj);
    paths.push(path);

    const result = {};

    for (const key of Object.keys(obj).sort()) {
      if (!exclude(key, obj[key], path + '.' + key)) {
        result[key] = serialize(obj[key], exclude, precision, path + '.' + key, visited, paths);
      }
    }

    return result;
};

const writeResult = (name, obj) => {
    try {
        fs.mkdirSync(comparePath, { recursive: true });
    } catch (err) {
        if (err.code !== 'EEXIST') throw err;
    }

    if (typeof obj === 'string') {
        fs.writeFileSync(`${comparePath}/${name}.md`, obj, 'utf8');
    } else {
        fs.writeFileSync(`${comparePath}/${name}.json`, compactStringify(obj, { maxLength: 100 }), 'utf8');
    }
};

const logReport = (captures, version) => {
    let report = '';

    for (const capture of Object.values(captures)) {
        if (!capture.logs.length) {
            continue;
        }

        report += `  ${capture.name}\n`;

        for (const log of capture.logs) {
            report += `    ${log}\n`;
        }
    }

    return `Output logs from ${color(version, colors.Yellow)} build on last run\n\n`
        + (report ? report : '  None\n');
};

const requireUncached = path => {
    delete require.cache[require.resolve(path)];
    const module = require(path);
    delete require.cache[require.resolve(path)];
    return module;
};

const toMatchExtrinsics = {
    toMatchExtrinsics(received, value) {
        const similaritys = extrinsicSimilarity(received, value, 'extrinsic');
        const pass = Object.values(similaritys).every(similarity => similarity >= equalityThreshold);

        return {
            message: () => 'Expected positions and velocities to match between builds.',
            pass
        };
    }
};

const toMatchIntrinsics = {
    toMatchIntrinsics(currentCaptures, referenceCaptures) {
        const entries = Object.entries(currentCaptures);
        let changed = false;

        entries.forEach(([name, current]) => {
            const reference = referenceCaptures[name];
            if (!this.equals(current.intrinsic, reference.intrinsic)) {
                changed = true;
            }
        });

        return {
            message: () => 'Expected intrinsic properties to match between builds.',
            pass: !changed
        };
    }
};

module.exports = {
    requireUncached, comparisonReport, logReport,
    serialize, toMatchExtrinsics, toMatchIntrinsics
};


text:
jsmime
======

A simple mimetype detector based on file extension.
---------------------------------------------------

jsmime is a quick mimetype detector that works off the same mime file as the
Apache webserver on Debian based systems, but it comes neatly wrapped up in a
single .js file.

Examples
--------

Get a list of mimes by extension.

	jsmime.getMimesByExt("exe") --> ["application/x-msdos-program"]

Get a list of mimes by path.

	jsmime.getMimesByPath("C:\Some\Path\File.exe") --> ["application/x-msdos-program"]

Check to see if a path (or extension) is of the type given.

	jsmime.pathIsMime("C:\Some\Path\File.exe", "application/x-msdos-program") --> true

The default returned for unknown extensions is:

	["application/octet-stream", "text/plain"]

Future Improvements
-------------------

Future improvements to this library would be support for the `file` utility's
detections, these are immensely useful in characterizing streams of data using
magic numbers. (These could be used with HTML5s new ability to handle client-side
data, or in numerous HTML based apps.)


text:
package org.apache.stratos.autoscaler.applications.payload;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

public abstract class PayloadData implements Serializable {

    private BasicPayloadData basicPayloadData;
    private Map<String, String> completePayloadMap;

    public PayloadData(BasicPayloadData basicPayloadData) {

        this.setBasicPayloadData(basicPayloadData);
        completePayloadMap = new HashMap<String, String>();
    }

    public void add(String payloadDataName, String payloadDataValue) {
        completePayloadMap.put(payloadDataName, payloadDataValue);
    }

    public StringBuilder getCompletePayloadData() {

        //return completePayloadMap;
        StringBuilder completePayload = new StringBuilder();
        completePayload.append(basicPayloadData.getPayloadData());
        Iterator<String> iter = completePayloadMap.keySet().iterator();
        while (iter.hasNext()) {
            String key = iter.next();
            String val = completePayloadMap.get(key);
            if (completePayload.length() > 0) {
                completePayload.append(",");
            }
            completePayload.append(key + "=" + val);
        }
        return completePayload;
    }

    public BasicPayloadData getBasicPayloadData() {
        return basicPayloadData;
    }

    public void setBasicPayloadData(BasicPayloadData basicPayloadData) {
        this.basicPayloadData = basicPayloadData;
    }

    public String toString() {
        return getCompletePayloadData().toString();
    }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Main</title>
<meta name="date" content="2014-09-14">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

epsylon

Class Main

java.lang.Object

epsylon.Main

public class Main
extends java.lang.Object

The Main class of Epsylon.

Version:

1.0

Author:

Alessio Moiso

Constructor Summary

Constructors

Constructor and Description

Main()

Method Summary

All Methods Static Methods Concrete Methods

Modifier and Type
Method and Description

static Value
evaluate(Node tree)

Instantiates a new Evaluator and calls its evaluate method
 on a specified tree.

static void
main(java.lang.String[] args)

Configures the application to behave in the way
 specified through the arguments.

static Node
parse(java.lang.String input)

Instantiates a new Parser and calls its parse method
 on a specified input string.

static Type
typecheck(Node tree)

Instantiates a new Typechecker and calls its typecheck method
 on a specified tree.

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Main

public Main()

Method Detail

main

public static void main(java.lang.String[] args)

Configures the application to behave in the way
 specified through the arguments.

 If the guiOption is found, any other argument is
 skipped and a new instance of MainWindow is displayed.

 Otherwise, if the outputFileOption is contained in args,
 the application will wait for a path (any validation check
 will be performed later, so we accept any kind of string
 not starting with a "-").

 At last, if other arguments are found, having said that none
 of them is allowed to start with a "-", they're treated as a
 list of paths from which the application should read. Nevertheless,
 considering that Epsylon currently support only one input file,
 only the last typed path is considered.

Parameters:

args - The list of arguments passed to the application.

parse

public static Node parse(java.lang.String input)
                  throws ParseException

Instantiates a new Parser and calls its parse method
 on a specified input string.

Parameters:

input - The input string on which the Parser should work.

Returns:

A valid Node, if the parsing is successful.

Throws:

ParseException - If the input cannot be parsed.

typecheck

public static Type typecheck(Node tree)
                      throws TypecheckException

Instantiates a new Typechecker and calls its typecheck method
 on a specified tree.

Parameters:

tree - A tree built by an instance of Parser.

Returns:

The resulting Type of the expression, if the typechecking is successful.

Throws:

TypecheckException - If the tree contains a typecheck error.

evaluate

public static Value evaluate(Node tree)
                      throws EvaluationException

Instantiates a new Evaluator and calls its evaluate method
 on a specified tree.

 The evaluation can work even though the tree has not been typechecked.

Parameters:

tree - A tree built by an instance of Parser.

Returns:

The resulting Value of the expression, if the evaluation is successful.

Throws:

EvaluationException - If the tree cannot be evaluated.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
<?php namespace Larrytech\Auth;

use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;

class AuthServiceProvider extends ServiceProvider {

	/**
	 * Indicates if loading of the provider is deferred.
	 *
	 * @var bool
	 */
	protected $defer = false;

	/**
	 * Bootstrap the application events.
	 *
	 * @return void
	 */
	public function boot()
	{
		$this->package('larrytech/auth');
	}

	/**
	 * Register the service provider.
	 *
	 * @return void
	 */
	public function register()
	{
		include __DIR__.'/routes.php';
	}

	/**
	 * Get the services provided by the provider.
	 *
	 * @return array
	 */
	public function provides()
	{
		return array();
	}

}


text:
using System.Collections.Generic;
using System.Text.Json;
using Azure.Core;

namespace Azure.ResourceManager.Compute.Models
{
    public partial class RoleInstanceView
    {
        internal static RoleInstanceView DeserializeRoleInstanceView(JsonElement element)
        {
            Optional<int> platformUpdateDomain = default;
            Optional<int> platformFaultDomain = default;
            Optional<string> privateId = default;
            Optional<IReadOnlyList<ResourceInstanceViewStatus>> statuses = default;
            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("platformUpdateDomain"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    platformUpdateDomain = property.Value.GetInt32();
                    continue;
                }
                if (property.NameEquals("platformFaultDomain"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    platformFaultDomain = property.Value.GetInt32();
                    continue;
                }
                if (property.NameEquals("privateId"))
                {
                    privateId = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("statuses"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    List<ResourceInstanceViewStatus> array = new List<ResourceInstanceViewStatus>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(ResourceInstanceViewStatus.DeserializeResourceInstanceViewStatus(item));
                    }
                    statuses = array;
                    continue;
                }
            }
            return new RoleInstanceView(Optional.ToNullable(platformUpdateDomain), Optional.ToNullable(platformFaultDomain), privateId.Value, Optional.ToList(statuses));
        }
    }
}


text:
from django.conf import settings

FILTERS = getattr(settings, 'ASSETFILES_FILTERS', (
    'assetfiles.filters.sass.SassFilter',
    'assetfiles.filters.coffee.CoffeeScriptFilter'
))

SASS_DIRS = getattr(settings, 'ASSETFILES_SASS_DIRS', ('css',))

SASS_OPTIONS = getattr(settings, 'ASSETFILES_SASS_OPTIONS', {})

COFFEE_SCRIPT_OPTIONS = getattr(settings,
                                'ASSETFILES_COFFEE_SCRIPT_OPTIONS', {})


text:
package gavilan.irc.webmvc;

import gavilan.irc.Channels;
import static gavilan.irc.Channels.norm;
import gavilan.irc.ChatMessage;
import gavilan.irc.Commands;
import gavilan.irc.IrcMessager;
import gavilan.irc.PropertyManager;
import java.util.Collection;
import java.util.Map;
import static java.util.Objects.isNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ChannelsController {

private final Channels channels;
private final IrcMessager ircMessager;
private final PropertyManager propertyManager;
private final Commands commands;

@Autowired
public ChannelsController(PropertyManager propertyManager, Commands commands,
        Channels channels, IrcMessager ircMessager) {
  this.propertyManager = propertyManager;
  this.commands = commands;
  this.channels = channels;
  this.ircMessager = ircMessager;
}

@RequestMapping("/command/active")
public Collection<String> active(@RequestParam("channel") String channel) {
  channels.addActive(norm(channel));
  return channels.getActiveChannels();
}

@RequestMapping("/command/lurk")
public Collection<String> lurk(@RequestParam("channel") String channel) {
  channels.removeActive(norm(channel));
  return channels.getActiveChannels();
}

@RequestMapping("/command/joined")
public Collection<String> joined() {
  return channels.getChannels();
}

@RequestMapping("/command/join")
public Collection<String> join(@RequestParam("channel") String channel) {
  ircMessager.ircJoin(channel);
  return channels.getChannels();
}

@RequestMapping("/command/part")
public Collection<String> part(@RequestParam("channel") String channel) {
  ircMessager.ircPart(channel);
  return channels.getChannels();
}

@RequestMapping("/command/recent")
public Map<String, String> recent(@RequestParam("channel") String channel) {
  return channels.recentFollows(channel);
}

private String executeToWeb(ChatMessage chatMessage) {
  return commands.execCommand(chatMessage, c -> "OK");
}

private String localExecute(String message) {
  ChatMessage chatMessage = new ChatMessage(propertyManager.get("id"), propertyManager.get("id"), message);
  return "[\"" + executeToWeb(chatMessage) + "\"]";
}

@RequestMapping("/command/send-results")
public String sendResults(@RequestParam("channel") String channel,
        @RequestParam("message") String message) {
  if (isNull(channel) || channel.isEmpty()) {
    return localExecute(message);
  }
  else {
    ircMessager.forceExecute(channel, message);
    return "OK";
  }
}

}


text:
<TITLE>Exporteren</TITLE>
<link rel="stylesheet" href="html/dutch/xp/css/gui.css" type="text/css">

Bgcolor" onload="location.href='abook.php?func=export&abookview=$var['abookview']';">

Exporting addressbook ...

If the download does not start automatically, check the browser security settings or click here to manually download the addressbook CSV file


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace PhotoSharingApplication.Models
{
    public class Photo
    {
        public int PhotoId { get; set; }

        [Required]
        public string Title { get; set; }

        [DisplayName("Picture")]
        public byte[] PhotoFile { get; set; }

        public string ImageMimeType { get; set; }

        [DataType(DataType.MultilineText)]
        [MaxLength(500)]
        public string Description { get; set; }

        [DataType(DataType.DateTime)]
        [DisplayFormat(DataFormatString = "{0:MM/dd/yy}")]
        public DateTime CreateDate { get; set; }

        public string UserName { get; set; }

        public ICollection<Comment> Comments { get; set; }
    }
}


text:
package brooklyn.management.ha;

import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;

import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

import brooklyn.BrooklynVersion;
import brooklyn.entity.basic.Entities;
import brooklyn.entity.rebind.persister.BrooklynMementoPersisterInMemory;
import brooklyn.entity.rebind.plane.dto.BasicManagementNodeSyncRecord;
import brooklyn.management.ha.HighAvailabilityManagerImpl.PromotionListener;
import brooklyn.management.internal.LocalManagementContext;
import brooklyn.management.internal.ManagementContextInternal;
import brooklyn.test.Asserts;
import brooklyn.util.time.Duration;

import com.google.common.base.Ticker;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Lists;

public class HighAvailabilityManagerTest {

    @SuppressWarnings("unused")
    private static final Logger log = LoggerFactory.getLogger(HighAvailabilityManagerTest.class);

    private ManagementPlaneSyncRecordPersisterInMemory persister;
    private ManagementContextInternal managementContext;
    private String ownNodeId;
    private HighAvailabilityManagerImpl manager;
    private Ticker ticker;
    private AtomicLong currentTime; // used to set the ticker's return value
    private RecordingPromotionListener promotionListener;
    private ClassLoader classLoader = getClass().getClassLoader();

    @BeforeMethod(alwaysRun=true)
    public void setUp() throws Exception {
        currentTime = new AtomicLong(System.nanoTime());
        ticker = new Ticker() {
            @Override public long read() {
                return currentTime.get();
            }
        };
        promotionListener = new RecordingPromotionListener();
        managementContext = new LocalManagementContext();
        managementContext.getRebindManager().setPersister(new BrooklynMementoPersisterInMemory(classLoader));
        ownNodeId = managementContext.getManagementNodeId();
        persister = new ManagementPlaneSyncRecordPersisterInMemory();
        manager = new HighAvailabilityManagerImpl(managementContext)
                .setPollPeriod(Duration.of(10, TimeUnit.MILLISECONDS))
                .setHeartbeatTimeout(Duration.THIRTY_SECONDS)
                .setPromotionListener(promotionListener)
                .setTicker(ticker)
                .setPersister(persister);
    }

    @AfterMethod(alwaysRun=true)
    public void tearDown() throws Exception {
        if (manager != null) manager.stop();
        if (managementContext != null) Entities.destroyAll(managementContext);
    }

    // Can get a log.error about our management node's heartbeat being out of date. Caused by
    // poller first writing a heartbeat record, and then the clock being incremented. But the
    // next poll fixes it.
    @Test
    public void testPromotes() throws Exception {
        persister.delta(ManagementPlaneSyncRecordDeltaImpl.builder()
                .node(newManagerMemento(ownNodeId, ManagementNodeState.STANDBY, currentTimeMillis()))
                .node(newManagerMemento("node1", ManagementNodeState.MASTER, currentTimeMillis()))
                .setMaster("node1")
                .build());

        manager.start(HighAvailabilityMode.AUTO);

        // Simulate passage of time; ticker used by this HA-manager so it will "correctly" publish
        // its own heartbeat with the new time; but node1's record is now out-of-date.
        incrementClock(31, TimeUnit.SECONDS);

        // Expect to be notified of our promotion, as the only other node
        promotionListener.assertCalledEventually();
    }

    @Test(groups="Integration") // because one second wait in succeedsContinually
    public void testDoesNotPromoteIfMasterTimeoutNotExpired() throws Exception {
        persister.delta(ManagementPlaneSyncRecordDeltaImpl.builder()
                .node(newManagerMemento(ownNodeId, ManagementNodeState.STANDBY, currentTimeMillis()))
                .node(newManagerMemento("node1", ManagementNodeState.MASTER, currentTimeMillis()))
                .setMaster("node1")
                .build());

        manager.start(HighAvailabilityMode.AUTO);

        incrementClock(29, TimeUnit.SECONDS);

        // Expect not to be notified, as 29s < 30s timeout (it's a fake clock so won't hit 30, even waiting 1s below)
        Asserts.succeedsContinually(new Runnable() {
            @Override public void run() {
                assertTrue(promotionListener.callTimestamps.isEmpty(), "calls="+promotionListener.callTimestamps);
            }});
    }

    @Test
    public void testGetManagementPlaneStatus() throws Exception {
        // with the name zzzzz this should never get chosen by the alphabetical strategy!
        persister.delta(ManagementPlaneSyncRecordDeltaImpl.builder()
                .node(newManagerMemento("zzzzzzz_node1", ManagementNodeState.STANDBY, currentTimeMillis()))
                .build());

        manager.start(HighAvailabilityMode.AUTO);
        ManagementPlaneSyncRecord memento = manager.getManagementPlaneSyncState();

        // Note can assert timestamp because not "real" time; it's using our own Ticker
        assertEquals(memento.getMasterNodeId(), ownNodeId);
        assertEquals(memento.getManagementNodes().keySet(), ImmutableSet.of(ownNodeId, "zzzzzzz_node1"));
        assertEquals(memento.getManagementNodes().get(ownNodeId).getNodeId(), ownNodeId);
        assertEquals(memento.getManagementNodes().get(ownNodeId).getStatus(), ManagementNodeState.MASTER);
        assertEquals(memento.getManagementNodes().get(ownNodeId).getTimestampUtc(), currentTimeMillis());
        assertEquals(memento.getManagementNodes().get("zzzzzzz_node1").getNodeId(), "zzzzzzz_node1");
        assertEquals(memento.getManagementNodes().get("zzzzzzz_node1").getStatus(), ManagementNodeState.STANDBY);
        assertEquals(memento.getManagementNodes().get("zzzzzzz_node1").getTimestampUtc(), currentTimeMillis());
    }

    @Test(groups="Integration", invocationCount=50) //because we have had non-deterministic failures
    public void testGetManagementPlaneStatusManyTimes() throws Exception {
        testGetManagementPlaneStatus();
    }

    private long currentTimeMillis() {
        return TimeUnit.NANOSECONDS.toMillis(ticker.read());
    }

    private long incrementClock(long increment, TimeUnit unit) {
        currentTime.addAndGet(unit.toNanos(increment));
        return currentTimeMillis();
    }

    private ManagementNodeSyncRecord newManagerMemento(String nodeId, ManagementNodeState status, long timestamp) {
        return BasicManagementNodeSyncRecord.builder().brooklynVersion(BrooklynVersion.get()).nodeId(nodeId).status(status).timestampUtc(timestamp).build();
    }

    public static class RecordingPromotionListener implements PromotionListener {
        public final List<Long> callTimestamps = Lists.newCopyOnWriteArrayList();

        @Override
        public void promotingToMaster() {
            callTimestamps.add(System.currentTimeMillis());
        }

        public void assertNotCalled() {
            assertTrue(callTimestamps.isEmpty(), "calls="+callTimestamps);
        }

        public void assertCalled() {
            assertFalse(callTimestamps.isEmpty(), "calls="+callTimestamps);
        }

        public void assertCalledEventually() {
            Asserts.succeedsEventually(new Runnable() {
                @Override public void run() {
                    assertCalled();
                }});
        }
    };
}


text:
using System;
using System.Web;
using System.Web.Mvc;
using MultiTenancy.Web.Context;

namespace MultiTenancy.Web.Infrastructure
{
    public class MultiTenantControllerFactory : DefaultControllerFactory
    {
        public override IController CreateController(System.Web.Routing.RequestContext requestContext, string controllerName)
        {
            controllerName = controllerName.ToLowerInvariant();
            var context = TenantContext.Current;
            if (context.Container.Kernel.HasComponent(controllerName)==false)
                throw new HttpException(404, "Could not find appropriate controller");

            return (IController) context.Container.Resolve(controllerName);
        }

        public override void ReleaseController(IController controller)
        {
            TenantContext.Current.Container.Release(controller);
        }
    }
}


text:
/**
 * Unit tests for the bucket related rest endpoints.
 */
package org.apache.hadoop.ozone.s3;


text:
import paramiko

from posixpath import dirname
from six.moves.urllib.parse import urlparse, unquote_plus
from scrapy.extensions.feedexport import BlockingFeedStorage

def sftp_makedirs(sftp, path):
    """Creates the `path` directory and its parent directories if they do not
    exist. The `sftp` parameter must be an already connected and logged in
    paramiko.SFTPClient object.
    """
    path = path.rstrip("/")
    cwd = sftp.getcwd()  # Remember the current working dir
    try:
        sftp.chdir(path)
    except IOError:
        # Directory `path` does not exist yet.
        sftp_makedirs(sftp, dirname(path))  # Make parent directories
        sftp.mkdir(path)  # Make directory
    sftp.chdir(cwd)  # Restore the original working directory.

class SFTPFeedStorage(BlockingFeedStorage):
    def __init__(self, uri):
        u = urlparse(uri)
        self.host = u.hostname
        self.port = int(u.port or "22")
        self.username = unquote_plus(u.username)
        self.password = unquote_plus(u.password)
        self.path = u.path

    def _store_in_thread(self, file):
        file.seek(0)
        transport = paramiko.Transport((self.host, self.port))
        transport.connect(username=self.username, password=self.password)
        sftp = paramiko.SFTPClient.from_transport(transport)
        sftp_makedirs(sftp, dirname(self.path))
        chunk_size = 1024 ** 2
        with sftp.file(self.path, "w") as f:
            while True:
                data = file.read(chunk_size)
                if not data:
                    break
                f.write(data)
        sftp.close()
        transport.close()


text:
#pragma once

#include <stdexcept>
#include <string>

#include <spdlog/spdlog.h>

namespace rj_utils {
const static bool kThrowDebugExceptions = true;

/**
 * @brief Sets the default spdlog logger to use Ros2Sink.
 */
void set_spdlog_default_ros2(const std::string& logger_name);

/**
 * @brief Convenience function for spdlog::critical, then throwing a std::runtime_error;
 */
template <typename... Args>
inline void fatal_throw(spdlog::string_view_t fmt, const Args&... args) {
    spdlog::critical(fmt, args...);
    throw std::runtime_error(fmt::format(fmt, args...));
}

/**
 * @brief Macro for fatal errors, logs a critical error + throwing a std::runtime_error.
 */
#define FATAL_THROW(...)          \
    SPDLOG_CRITICAL(__VA_ARGS__); \
    throw std::runtime_error(fmt::format(__VA_ARGS__))

inline void debug_log(const std::string& e) { spdlog::debug(e); }

inline void debug_log(const std::exception& e) { spdlog::debug(e.what()); }

inline void debug_log_if(const std::string& e, bool condition) {
    if (condition) {
        debug_log(e);
    }
}

template <class T,
          typename std::enable_if<std::is_base_of<std::exception, T>::value, int>::type = 0>
inline void debug_throw(const T& e) {
    debug_log(e);
    if (kThrowDebugExceptions) {
        throw e;
    }
}

inline void debug_throw(const std::string& string) { debug_throw(std::runtime_error(string)); }

inline void debug_throw_if(const std::string& string, bool condition) {
    if (condition) {
        debug_throw(std::runtime_error(string));
    }
}

}  // namespace rj_utils


text:
'use strict';

const fs = require('fs');

const bigFileName = 'big-text-file.txt';
const outputFileName = 'big-text-file-copy.txt';

function copyFile(sourceFilename, destFilename) {
  let input = fs.createReadStream(sourceFilename);
  let output = fs.createWriteStream(destFilename);
  input.on('data', (chunk) => {
    output.write(chunk);
  });
  input.on('end', () => {
    output.close();
    input.close();
  });
}

copyFile(bigFileName, outputFileName);


text:
package mb.nabl2.spoofax.primitives;

import java.util.List;
import java.util.Optional;

import org.spoofax.interpreter.core.InterpreterException;

import mb.nabl2.solver.ISolution;
import mb.nabl2.terms.ITerm;
import mb.scopegraph.pepm16.terms.Occurrence;

public class SG_get_decl_property extends AnalysisPrimitive {

    public SG_get_decl_property() {
        super(SG_get_decl_property.class.getSimpleName(), 1);
    }

    @Override public Optional<? extends ITerm> call(ISolution solution, ITerm term, List<ITerm> terms)
            throws InterpreterException {
        ITerm key = terms.get(0);
        return Occurrence.matcher().match(term, solution.unifier()).<ITerm>flatMap(decl -> {
            return solution.declProperties().getValue(decl, key).map(solution.unifier()::findRecursive);
        });
    }

}


text:
/**
 * Module dependencies.
 */

var Node = require('./node');

/**
 * Initialize a new `Extend` with the given `selectors` array.
 *
 * @param {Array} selectors array of the selectors
 * @api public
 */

var Extend = module.exports = function Extend(selectors){
  Node.call(this);
  this.selectors = selectors;
};

/**
 * Inherit from `Node.prototype`.
 */

Extend.prototype.__proto__ = Node.prototype;

/**
 * Return a clone of this node.
 *
 * @return {Node}
 * @api public
 */

Extend.prototype.clone = function(){
  return new Extend(this.selectors);
};

/**
 * Return `@extend selectors`.
 *
 * @return {String}
 * @api public
 */

Extend.prototype.toString = function(){
  return '@extend ' + this.selectors.join(', ');
};


text:
// https://leetcode.com/problems/hamming-distance/?tab=Description

/**
 * @param {number} x
 * @param {number} y
 * @return {number}
 */
var hammingDistance = function (x, y) {
  if (x === y === 0) return 0;
  var xor = x ^ y;
  return xor.toString('2').replace(/0/g, '').length;
};

console.log(`Hamming distance for 1 and 4 is ${hammingDistance(1, 4)}`);


text:
package domainapp.fixture.dom.quick;

import org.apache.isis.applib.fixturescripts.FixtureScript;

import domainapp.dom.quick.QuickObject;
import domainapp.dom.quick.QuickObjectMenu;

public class QuickObjectCreate extends FixtureScript {

    //region > name (input)
    private String name;
    /**
     * Name of the object (required)
     */
    public String getName() {
        return name;
    }

    public QuickObjectCreate setName(final String name) {
        this.name = name;
        return this;
    }
    //endregion

    //region > simpleObject (output)
    private QuickObject quickObject;

    /**
     * The created simple object (output).
     * @return
     */
    public QuickObject getQuickObject() {
        return quickObject;
    }
    //endregion

    @Override
    protected void execute(final ExecutionContext ec) {

        String name = checkParam("name", ec, String.class);

        this.quickObject = wrap(quickObjectMenu).create(name);

        // also make available to UI
        ec.addResult(this, quickObject);
    }

    @javax.inject.Inject
    private QuickObjectMenu quickObjectMenu;

}


text:
package com.yahoo.squidb.test;

import com.yahoo.squidb.annotations.ViewModelSpec;
import com.yahoo.squidb.sql.Function;
import com.yahoo.squidb.sql.Property.LongProperty;
import com.yahoo.squidb.sql.Property.StringProperty;

@ViewModelSpec(className = "ViewlessViewModel", viewName = "viewlessViewModel")
public class ViewlessViewModelSpec {

    public static final LongProperty TEST_MODEL_ID = TestModel.ID;

    public static final LongProperty EMPLOYEE_MODEL_ID = Employee.ID;

    public static final StringProperty TEST_NAME = TestModel.FIRST_NAME;

    public static final StringProperty EMPLOYEE_NAME = Employee.NAME;

    public static final StringProperty UPPERCASE_NAME = StringProperty
            .fromFunction(Function.upper(EMPLOYEE_NAME), "uppercase_name");
}


text:
from typing import List

from treehopper.api import spi
from treehopper.api.pin import SpiChipSelectPin
from treehopper.api.spi import SpiMode, ChipSelectMode, SpiBurstMode
from treehopper.libraries import SpiDevice
from treehopper.libraries.flushable import Flushable

class ChainableShiftRegisterOutput(Flushable):
    def __init__(self,
                 spi: spi = None,
                 latch_pin: SpiChipSelectPin = None,
                 parent: 'ChainableShiftRegisterOutput' = None,
                 num_bytes=1,
                 speed_mhz=6,
                 spi_mode=SpiMode.Mode00,
                 chip_select_mode=ChipSelectMode.PulseHighAtEnd):
        super().__init__()
        self.num_bytes = num_bytes
        self.children = []
        self._current_value = []
        self._last_value = []
        self.parent = None  # type:ChainableShiftRegisterOutput
        self.dev = None  # type:SpiDevice

        if spi is not None:
            self.dev = SpiDevice(spi, latch_pin, chip_select_mode, speed_mhz, spi_mode)

        elif parent is not None:
            if parent.parent is None:
                self.parent = parent  # the parent is the most upstream node
            else:
                self.parent = parent.parent  # use the parent's parent

            self.parent.children.append(self)

    @property
    def current_value(self):
        return self._current_value

    @current_value.setter
    def current_value(self, value):
        self._current_value = value

        if self.auto_flush:
            self.flush()

    def flush(self, force=False):
        if self._current_value != self._last_value or force:
            if self.parent is not None:
                self.parent.flush()
            else:
                dev_list = list()
                if len(self.children) > 0:
                    dev_list += self.children[::-1]
                    dev_list.append(self)

                bytes = []
                for item in dev_list:
                    bytes += item.current_value[::-1]
                self.dev.send_receive(bytes, SpiBurstMode.BurstTx)


text:
package li.strolch.service;

import li.strolch.model.ModelGenerator;
import li.strolch.service.api.Service;
import li.strolch.service.api.ServiceResult;
import li.strolch.service.test.AbstractRealmServiceTest;
import org.junit.Test;

/**
 * @author Robert von Burg <eitch@eitchnet.ch>
 */
public class AddResourceServiceTest extends AbstractRealmServiceTest<StrolchRootElementArgument, ServiceResult> {

	@Test
	public void runTest() {

		runServiceInAllRealmTypes();
	}

	@Override
	protected Class<? extends Service<StrolchRootElementArgument, ServiceResult>> getSvcClass() {
		return AddResourceService.class;
	}

	@Override
	protected StrolchRootElementArgument getArgInstance() {

		StrolchRootElementArgument arg = new StrolchRootElementArgument();
		arg.rootElement = ModelGenerator.createResource("firstRes", "First Resource", "AdditionalResources");

		return arg;
	}
}


text:
/* global define */

define([
    'jquery',
    'marionette'
], function($, Marionette) {

    var CountItem = Marionette.ItemView.extend({
        tagName: 'tr',

        template: 'stats/count-item'
    });

    var CountList = Marionette.CompositeView.extend({
        template: 'stats/count-list',

        itemView: CountItem,

        itemViewContainer: 'tbody',

        ui: {
            'statsTable': 'table',
            'loader': '.loading-message'
        },

        events: {
            'click thead th': 'handleSort'
        },

        collectionEvents: {
            'sort': '_renderChildren',
            'request': 'showLoader',
            'reset': 'hideLoader'
        },

        hideLoader: function() {
            this.ui.loader.hide();
            this.ui.statsTable.show();
        },

        showLoader: function() {
            this.ui.loader.show();
            this.ui.statsTable.hide();
        },

        handleSort: function(event) {
            if (!this.collection.length) return;

            this.applySort($(event.target).data('sort'));
        },

        applySort: function(attr) {
            var dir = 'asc';

            // Already sorted by the attribute, cycle direction.
            if (this.collection._sortAttr === attr) {
                dir = this.collection._sortDir === 'asc' ? 'desc' : 'asc';
            }

            this.$('[data-sort=' + this.collection._sortAttr + ']')
                .removeClass(this.collection._sortDir);
            this.$('[data-sort=' + attr + ']').addClass(dir);

            // Reference for cycling.
            this.collection._sortAttr = attr;
            this.collection._sortDir = dir;

            // Parse function for handling the sort attributes.
            var parse = function(v) {
                return v;
            };

            this.collection.comparator = function(m1, m2) {
                var v1 = parse(m1.get(attr)),
                    v2 = parse(m2.get(attr));

                if (v1 < v2) return (dir === 'asc' ? -1 : 1);
                if (v1 > v2) return (dir === 'asc' ? 1 : -1);

                return 0;
            };

            this.collection.sort();
        }
    });

    return {
        CountList: CountList
    };

});


text:
<?xml version="1.0" ?>
<INPUT>

	<MEDALS>
		<MEDAL Id="1" MEDAL_THRESHOLD="52000" TYPE="Gold"/>
		<MEDAL Id="2" MEDAL_THRESHOLD="79000" TYPE="Silver"/>
		<MEDAL Id="3" MEDAL_THRESHOLD="102000" TYPE="Bronze"/>

	</MEDALS>

	<SpeedSettings Default="18" Max="150" Min="0"/>

	<PenaltySettings SpeedLost="0.1" TimeLost="15"/>

	<PROBLEM_SET>
		<PROBLEM_SUBSET>
			<TARGET TYPE="String">
				<ContentSettings string="1"/>
			</TARGET>
			<QUESTION INDEX="1">
				<Content TYPE="Fraction">
					<ContentSettings denominator="8" numerator="2"/>
				</Content>
				<Content TYPE="Fraction">
					<ContentSettings denominator="100" numerator="49"/>
				</Content>
				<Answer VALUE="2"/>
			</QUESTION>
			<QUESTION INDEX="2">
				<Content TYPE="Fraction">
					<ContentSettings denominator="100" numerator="20" whole="1"/>
				</Content>
				<Content TYPE="Fraction">
					<ContentSettings denominator="12" numerator="7" whole="1"/>
				</Content>
				<Answer VALUE="0"/>
			</QUESTION>
			<QUESTION INDEX="3">
				<Content TYPE="Fraction">
					<ContentSettings denominator="12" numerator="10"/>
				</Content>
				<Content TYPE="Fraction">
					<ContentSettings denominator="3" numerator="1" whole="1"/>
				</Content>
				<Answer VALUE="1"/>
			</QUESTION>
		</PROBLEM_SUBSET>
		<PROBLEM_SUBSET>
			<TARGET TYPE="String">
				<ContentSettings string="1.5"/>
			</TARGET>
			<QUESTION INDEX="4">
				<Content TYPE="Fraction">
					<ContentSettings denominator="3" numerator="1" whole="1"/>
				</Content>
				<Content TYPE="Fraction">
					<ContentSettings denominator="100" numerator="86" whole="1"/>
				</Content>
				<Answer VALUE="1"/>
			</QUESTION>
			<QUESTION INDEX="5">
				<Content TYPE="Fraction">
					<ContentSettings denominator="10" numerator="7"/>
				</Content>
				<Content TYPE="Fraction">
					<ContentSettings denominator="12" numerator="12"/>
				</Content>
				<Answer VALUE="2"/>
			</QUESTION>
			<QUESTION INDEX="6">
				<Content TYPE="Fraction">
					<ContentSettings denominator="8" numerator="7" whole="1"/>
				</Content>
				<Content TYPE="Fraction">
					<ContentSettings denominator="100" numerator="92" whole="1"/>
				</Content>
				<Answer VALUE="0"/>
			</QUESTION>
		</PROBLEM_SUBSET>
		<PROBLEM_SUBSET>
			<TARGET TYPE="String">
				<ContentSettings string="1.333"/>
			</TARGET>
			<QUESTION INDEX="7">
				<Content TYPE="Fraction">
					<ContentSettings denominator="3" numerator="3"/>
				</Content>
				<Content TYPE="Fraction">
					<ContentSettings denominator="2" numerator="1" whole="1"/>
				</Content>
				<Answer VALUE="1"/>
			</QUESTION>
			<QUESTION INDEX="8">
				<Content TYPE="Fraction">
					<ContentSettings denominator="5" numerator="4" whole="1"/>
				</Content>
				<Content TYPE="Fraction">
					<ContentSettings denominator="100" numerator="83" whole="1"/>
				</Content>
				<Answer VALUE="0"/>
			</QUESTION>
			<QUESTION INDEX="9">
				<Content TYPE="Fraction">
					<ContentSettings denominator="100" numerator="84" whole="1"/>
				</Content>
				<Content TYPE="Fraction">
					<ContentSettings denominator="1000" numerator="975" whole="1"/>
				</Content>
				<Answer VALUE="0"/>
			</QUESTION>
		</PROBLEM_SUBSET>
		<PROBLEM_SUBSET>
			<TARGET TYPE="String">
				<ContentSettings string="0.5"/>
			</TARGET>
			<QUESTION INDEX="10">
				<Content TYPE="Fraction">
					<ContentSettings denominator="2" numerator="0"/>
				</Content>
				<Content TYPE="Fraction">
					<ContentSettings denominator="4" numerator="1" whole="1"/>
				</Content>
				<Answer VALUE="1"/>
			</QUESTION>
			<QUESTION INDEX="11">
				<Content TYPE="Fraction">
					<ContentSettings denominator="100" numerator="17"/>
				</Content>
				<Content TYPE="Fraction">
					<ContentSettings denominator="12" numerator="5" whole="1"/>
				</Content>
				<Answer VALUE="1"/>
			</QUESTION>
			<QUESTION INDEX="12">
				<Content TYPE="Fraction">
					<ContentSettings denominator="2" numerator="0"/>
				</Content>
				<Content TYPE="Fraction">
					<ContentSettings denominator="1000" numerator="124"/>
				</Content>
				<Answer VALUE="2"/>
			</QUESTION>
		</PROBLEM_SUBSET>
		<PROBLEM_SUBSET>
			<TARGET TYPE="String">
				<ContentSettings string="1.4"/>
			</TARGET>
			<QUESTION INDEX="13">
				<Content TYPE="Fraction">
					<ContentSettings denominator="4" numerator="2"/>
				</Content>
				<Content TYPE="Fraction">
					<ContentSettings denominator="3" numerator="2"/>
				</Content>
				<Answer VALUE="2"/>
			</QUESTION>
			<QUESTION INDEX="14">
				<Content TYPE="Fraction">
					<ContentSettings denominator="10" numerator="7" whole="1"/>
				</Content>
				<Content TYPE="Fraction">
					<ContentSettings denominator="1000" numerator="898" whole="1"/>
				</Content>
				<Answer VALUE="0"/>
			</QUESTION>
			<QUESTION INDEX="15">
				<Content TYPE="Fraction">
					<ContentSettings denominator="1000" numerator="174" whole="1"/>
				</Content>
				<Content TYPE="Fraction">
					<ContentSettings denominator="4" numerator="2" whole="1"/>
				</Content>
				<Answer VALUE="1"/>
			</QUESTION>
		</PROBLEM_SUBSET>
		<PROBLEM_SUBSET>
			<TARGET TYPE="String">
				<ContentSettings string="1.4"/>
			</TARGET>
			<QUESTION INDEX="16">
				<Content TYPE="Fraction">
					<ContentSettings denominator="8" numerator="5" whole="1"/>
				</Content>
				<Content TYPE="Fraction">
					<ContentSettings denominator="12" numerator="11" whole="1"/>
				</Content>
				<Answer VALUE="0"/>
			</QUESTION>
			<QUESTION INDEX="17">
				<Content TYPE="Fraction">
					<ContentSettings denominator="5" numerator="4"/>
				</Content>
				<Content TYPE="Fraction">
					<ContentSettings denominator="8" numerator="6" whole="1"/>
				</Content>
				<Answer VALUE="1"/>
			</QUESTION>
			<QUESTION INDEX="18">
				<Content TYPE="Fraction">
					<ContentSettings denominator="8" numerator="4" whole="1"/>
				</Content>
				<Content TYPE="Fraction">
					<ContentSettings denominator="1000" numerator="953" whole="1"/>
				</Content>
				<Answer VALUE="0"/>
			</QUESTION>
		</PROBLEM_SUBSET>

	</PROBLEM_SET>

</INPUT>


text:
#pragma once
#include <aws/workmail/WorkMail_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/workmail/model/Member.h>
#include <utility>

namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;

namespace Utils
{
namespace Json
{
  class JsonValue;
} // namespace Json
} // namespace Utils
namespace WorkMail
{
namespace Model
{
  class AWS_WORKMAIL_API ListGroupMembersResult
  {
  public:
    ListGroupMembersResult();
    ListGroupMembersResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
    ListGroupMembersResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);

    /**
     *
The members associated to the group.

     */
    inline const Aws::Vector<Member>& GetMembers() const{ return m_members; }

    /**
     *
The members associated to the group.

     */
    inline void SetMembers(const Aws::Vector<Member>& value) { m_members = value; }

    /**
     *
The members associated to the group.

     */
    inline void SetMembers(Aws::Vector<Member>&& value) { m_members = std::move(value); }

    /**
     *
The members associated to the group.

     */
    inline ListGroupMembersResult& WithMembers(const Aws::Vector<Member>& value) { SetMembers(value); return *this;}

    /**
     *
The members associated to the group.

     */
    inline ListGroupMembersResult& WithMembers(Aws::Vector<Member>&& value) { SetMembers(std::move(value)); return *this;}

    /**
     *
The members associated to the group.

     */
    inline ListGroupMembersResult& AddMembers(const Member& value) { m_members.push_back(value); return *this; }

    /**
     *
The members associated to the group.

     */
    inline ListGroupMembersResult& AddMembers(Member&& value) { m_members.push_back(std::move(value)); return *this; }

    /**
     *
The token to use to retrieve the next page of results. The first call does
     * not contain any tokens.

     */
    inline const Aws::String& GetNextToken() const{ return m_nextToken; }

    /**
     *
The token to use to retrieve the next page of results. The first call does
     * not contain any tokens.

     */
    inline void SetNextToken(const Aws::String& value) { m_nextToken = value; }

    /**
     *
The token to use to retrieve the next page of results. The first call does
     * not contain any tokens.

     */
    inline void SetNextToken(Aws::String&& value) { m_nextToken = std::move(value); }

    /**
     *
The token to use to retrieve the next page of results. The first call does
     * not contain any tokens.

     */
    inline void SetNextToken(const char* value) { m_nextToken.assign(value); }

    /**
     *
The token to use to retrieve the next page of results. The first call does
     * not contain any tokens.

     */
    inline ListGroupMembersResult& WithNextToken(const Aws::String& value) { SetNextToken(value); return *this;}

    /**
     *
The token to use to retrieve the next page of results. The first call does
     * not contain any tokens.

     */
    inline ListGroupMembersResult& WithNextToken(Aws::String&& value) { SetNextToken(std::move(value)); return *this;}

    /**
     *
The token to use to retrieve the next page of results. The first call does
     * not contain any tokens.

     */
    inline ListGroupMembersResult& WithNextToken(const char* value) { SetNextToken(value); return *this;}

  private:

    Aws::Vector<Member> m_members;

    Aws::String m_nextToken;
  };

} // namespace Model
} // namespace WorkMail
} // namespace Aws