text:
'use strict';

var util    = require('util'),
    findit  = require('findit'),
    assert  = require('assert'),
    Emitter = require('events').EventEmitter;

util.inherits(DirSize, Emitter);

module.exports = function(from) {
    var emitter;

    assert(typeof from === 'string', 'from should be string!');

    emitter = new DirSize(from);

    return emitter;
};

function DirSize(from) {
    this._from          = from;
    this._size          = 0;
    this._findFiles(from);
}

DirSize.prototype.abort   = function() {
    this._abort = true;
};

DirSize.prototype._findFiles     = function(filename) {
    var all         = 0,
        self        = this,
        finder      = findit(filename),
        onFind      = function(name, stat) {
            var size = stat.size;

            all += size;
            self.emit('size', all, size, name);

            if (self._abort)
                finder.stop();
        };

    finder.on('file', onFind);
    finder.on('link', onFind);

    finder.on('error', function(error) {
        self.emit('error', error, error.path);
    });

    finder.on('end', function() {
        self.emit('end');
    });

    finder.on('stop', function() {
        self.emit('end');
    });
};


text:
package com.berchina.seo.server.provider.model;

import java.io.Serializable;

/**
 * @Package com.berchina.seo.server.provider.model
 * @Description: TODO ( 商品展示信息 )
 * @Author 任小斌  renxiaobin@berchin.com
 * @Date 16/8/30 下午9:34
 * @Version V1.0
 */
public class SeoGoods implements Serializable {

    private static final long serialVersionUID = -2122499546044965478L;

    /**
     * 热词名称
     */
    private String hotwords;

    /**
     * 商品价格
     */
    private String prices;

    /**
     * 商品图片
     */
    private String picture;

    /**
     * 商品销量
     */
    private String sales;

    /**
     * 评论
     */
    private String comment;

    /**
     * 店铺名称
     */
    private String shopName;

    /**
     * 商品来源
     */
    private String source;

    /**
     * 商品 ID
     */
    private String goodsId;

    /**
     * 活动标签
     */
    private String activityLabel;

    /**
     * 商品类型
     */
    private String type;

    /**
     * 积分支付标示
     */
    private int integralflag;

    public int getIntegralflag() {
        return integralflag;
    }

    public void setIntegralflag(int integralflag) {
        this.integralflag = integralflag;
    }

    public String getPrices() {
        return prices;
    }

    public void setPrices(String prices) {
        this.prices = prices;
    }

    public String getSales() {
        return sales;
    }

    public void setSales(String sales) {
        this.sales = sales;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public String getHotwords() {
        return hotwords;
    }

    public void setHotwords(String hotwords) {
        this.hotwords = hotwords;
    }

    public String getActivityLabel() {
        return activityLabel;
    }

    public void setActivityLabel(String activityLabel) {
        this.activityLabel = activityLabel;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "SeoGoods [hotwords=" + hotwords + ", prices=" + prices
                + ", picture=" + picture + ", sales=" + sales + ", comment="
                + comment + ", shopName=" + shopName + ", source=" + source
                + ", goodsId=" + goodsId + ", activityLabel=" + activityLabel + "]";
    }

}

redpajama_set_name: RedPajamaGithub


text:
gitbook.require(["gitbook", "jQuery"], function(gitbook, $) {

  var copyButton = '<button type="button" class="copy-to-clipboard-button" title="Copy to clipboard" aria-label="Copy to clipboard"><i class="fa fa-copy"></i></button>';
  var clipboard;

  gitbook.events.bind("page.change", function() {

    if (!ClipboardJS.isSupported()) return;

    // the page.change event is thrown twice: before and after the page changes
    if (clipboard) {
      // clipboard is already defined
      // we can deduct that we are before page changes
      clipboard.destroy(); // destroy the previous events listeners
      clipboard = undefined; // reset the clipboard object
      return;
    }

    $(copyButton).prependTo("div.sourceCode");

    clipboard = new ClipboardJS(".copy-to-clipboard-button", {
      text: function(trigger) {
        return trigger.parentNode.textContent;
      }
    });

  });

});


text:
<?php

namespace PHP_CodeSniffer\Reports;

use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Util;

class Diff implements Report
{

    /**
     * Generate a partial report for a single processed file.
     *
     * Function should return TRUE if it printed or stored data about the file
     * and FALSE if it ignored the file. Returning TRUE indicates that the file and
     * its data should be counted in the grand totals.
     *
     * @param array                 $report      Prepared report data.
     * @param \PHP_CodeSniffer\File $phpcsFile   The file being reported on.
     * @param bool                  $showSources Show sources?
     * @param int                   $width       Maximum allowed line width.
     *
     * @return bool
     */
    public function generateFileReport($report, File $phpcsFile, $showSources=false, $width=80)
    {
        $errors = $phpcsFile->getFixableCount();
        if ($errors === 0) {
            return false;
        }

        $phpcsFile->disableCaching();
        $tokens = $phpcsFile->getTokens();
        if (empty($tokens) === true) {
            if (PHP_CODESNIFFER_VERBOSITY === 1) {
                $startTime = microtime(true);
                echo 'DIFF report is parsing '.basename($report['filename']).' ';
            } else if (PHP_CODESNIFFER_VERBOSITY > 1) {
                echo 'DIFF report is forcing parse of '.$report['filename'].PHP_EOL;
            }

            $phpcsFile->parse();

            if (PHP_CODESNIFFER_VERBOSITY === 1) {
                $timeTaken = ((microtime(true) - $startTime) * 1000);
                if ($timeTaken < 1000) {
                    $timeTaken = round($timeTaken);
                    echo "DONE in {$timeTaken}ms";
                } else {
                    $timeTaken = round(($timeTaken / 1000), 2);
                    echo "DONE in $timeTaken secs";
                }

                echo PHP_EOL;
            }

            $phpcsFile->fixer->startFile($phpcsFile);
        }//end if

        if (PHP_CODESNIFFER_VERBOSITY > 1) {
            ob_end_clean();
            echo "\t*** START FILE FIXING ***".PHP_EOL;
        }

        $fixed = $phpcsFile->fixer->fixFile();

        if (PHP_CODESNIFFER_VERBOSITY > 1) {
            echo "\t*** END FILE FIXING ***".PHP_EOL;
            ob_start();
        }

        if ($fixed === false) {
            return false;
        }

        $diff = $phpcsFile->fixer->generateDiff();
        if ($diff === '') {
            // Nothing to print.
            return false;
        }

        echo $diff.PHP_EOL;
        return true;

    }//end generateFileReport()

    /**
     * Prints all errors and warnings for each file processed.
     *
     * @param string $cachedData    Any partial report data that was returned from
     *                              generateFileReport during the run.
     * @param int    $totalFiles    Total number of files processed during the run.
     * @param int    $totalErrors   Total number of errors found during the run.
     * @param int    $totalWarnings Total number of warnings found during the run.
     * @param int    $totalFixable  Total number of problems that can be fixed.
     * @param bool   $showSources   Show sources?
     * @param int    $width         Maximum allowed line width.
     * @param bool   $interactive   Are we running in interactive mode?
     * @param bool   $toScreen      Is the report being printed to screen?
     *
     * @return void
     */
    public function generate(
        $cachedData,
        $totalFiles,
        $totalErrors,
        $totalWarnings,
        $totalFixable,
        $showSources=false,
        $width=80,
        $interactive=false,
        $toScreen=true
    ) {
        echo $cachedData;
        if ($toScreen === true) {
            echo PHP_EOL;
        }

    }//end generate()

}//end class


text:
/**
 * @file rc_startup_routine.c
 *
 *
 * This startup routine is called by the robotcontrol systemd service and serves
 * to do some initial setup such as setting permissions on things that udev cant
 * handle such as pwm and gpio
 */

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <sys/stat.h> // for mkdir and chmod
#include <sys/types.h> // for mkdir and chmod

#include <rc/model.h>
#include <rc/time.h>
#include <rc/start_stop.h>

#define MAXBUF 128
#define TIMEOUT_S 30
#define START_LOG "/var/log/robotcontrol/startup_log.txt"

static int set_gpio_permissions();
static int check_timeout();
static int check_pwm();
static int check_eqep();
static int check_pru();

static uint64_t start_us;

int main()
{
	char buf[MAXBUF];
	double time;
	rc_model_t model;

	// ensure root privileges
	if(geteuid()!=0){
		fprintf(stderr,"ERROR: rc_startup_routine must be run as root\n");
		return -1;
	}

	// capture start time for check_timeout
	start_us = rc_nanos_since_boot()/1000;

	// log start time
	time = rc_nanos_since_boot()/1000000000.0;
	sprintf(buf, "echo 'start time (s): %6.2f' > %s",time,START_LOG);
	system(buf);

	// whitelist blue, black, and black wireless only when RC device tree is in use
	model = rc_model();
	if(model!=MODEL_BB_BLACK_RC && model!=MODEL_BB_BLACK_W_RC && model!=MODEL_BB_BLUE){
		if(system("grep -q robotcontrol /boot/uEnv.txt")!=0){
			fprintf(stderr,"robotcontrol service can only run on BB Blue, Black, and Black wireless when the robotcontrol device tree is in use.\n");
			return 0;
		}
	}

	// set permissions on gpio, not strictly necessary anymore with udev rules
	// but still here for older systems and since it also checks to make sure
	// gpio chips are loaded
	while(set_gpio_permissions()!=0){
		if(check_timeout()){
			system("echo 'timeout reached while waiting for gpio driver' >> " START_LOG);
			fprintf(stderr,"timeout reached while waiting for gpio driver\n");
			return 0;
		}
		rc_usleep(500000);
	}
	time = rc_nanos_since_boot()/1000000000.0;
	sprintf(buf, "echo 'time (s): %4.2f GPIO loaded' >> %s",time,START_LOG);
	system(buf);

	// set up pwm at desired frequnecy
	while(check_pwm()!=0){
		if(check_timeout()){
			system("echo 'timeout reached while waiting for pwm driver' >> " START_LOG);
			fprintf(stderr,"timeout reached while waiting for pwm driver\n");
			return 0;
		}
		rc_usleep(500000);
	}
	time = rc_nanos_since_boot()/1000000000.0;
	sprintf(buf, "echo 'time (s): %4.2f PWM loaded' >> %s",time,START_LOG);
	system(buf);

	// wait for eQEP to load
	while(check_eqep()!=0){
		if(check_timeout()){
			system("echo 'timeout reached while waiting for eQEP driver' >> " START_LOG);
			fprintf(stderr,"timeout reached while waiting for eQEP driver\n");
		 	return 0;
		}
		rc_usleep(500000);
	}
	time = rc_nanos_since_boot()/1000000000.0;
	sprintf(buf, "echo 'time (s): %4.2f eQEP loaded' >> %s",time,START_LOG);
	system(buf);

	// wait for PRU to load
	while(check_pru()!=0){
		if(check_timeout()){
			system("echo 'timeout reached while waiting for PRU remoteproc driver' >> " START_LOG);
			fprintf(stderr,"timeout reached while waiting for PRU remoteproc driver\n");
			return -1;
		}
		rc_usleep(500000);
	}
	time = rc_nanos_since_boot()/1000000000.0;
	sprintf(buf, "echo 'time (s): %4.2f PRU loaded' >> %s",time,START_LOG);
	system(buf);

	printf("robotcontrol startup routine complete\n");
	system("echo 'startup routine complete' >> " START_LOG);
	return 0;
}

int set_gpio_permissions(){
	int ret;
	// check all gpio devices are online
	if(access("/dev/gpiochip3",F_OK)!=0){
		// not there yet, wait a bit more
		return -1;
	}
	if(access("/dev/gpiochip2",F_OK)!=0){
		// not there yet, wait a bit more
		return -1;
	}
	if(access("/dev/gpiochip1",F_OK)!=0){
		// not there yet, wait a bit more
		return -1;
	}
	if(access("/dev/gpiochip0",F_OK)!=0){
		// not there yet, wait a bit more
		return -1;
	}
	ret=system("/bin/chown -R root:gpio /dev/gpiochip* ");
	if(ret){
		fprintf(stderr,"ERROR setting gpiochip owner, returned %d\n",ret);
	}
	ret=system("/bin/chmod -R ug+rw /dev/gpiochip* ");
	if(ret){
		fprintf(stderr,"ERROR setting gpiochip permission, returned %d\n",ret);
	}
	return 0;
}

/**
 * @brief      looks and the current time to decide if the timeout has been reached.
 *
 * @return      returns 1 if timeout has been reached, otherwise 0
 */
int check_timeout()
{
	uint64_t new_us = rc_nanos_since_boot()/1000;
	int seconds = (new_us-start_us)/1000000;
	if(seconds>TIMEOUT_S){
		printf("TIMEOUT REACHED\n");
		system("echo 'TIMEOUT_REACHED' >> " START_LOG);
		return 1;
	}
	return 0;
}

/**
 * @brief      udev rules is unable to set the permissions correctly for pwm
 *             since it creates a directory at runtime/ solution here is to
 *             create the directory early at boot and set permissions.
 *
 * @return     returns 0 on success or -1 on failure
 */
int check_pwm()
{
	// first make sure the driver is loaded, if so the export paths will appear
	if(access("/sys/devices/platform/ocp/48300000.epwmss/48300200.pwm/",F_OK)!=0){
		return -1;
	}
	if(access("/sys/devices/platform/ocp/48302000.epwmss/48302200.pwm/",F_OK)!=0){
		return -1;
	}
	if(access("/sys/devices/platform/ocp/48304000.epwmss/48304200.pwm/",F_OK)!=0){
		return -1;
	}

	return 0;
}

/**
 * @brief      just check if eqep driver is loaded
 *
 * @return     0 if loaded, otherwise -1
 */
int check_eqep()
{
	if(access("/sys/devices/platform/ocp/48300000.epwmss/48300180.eqep/enabled", F_OK)){
		fprintf(stderr,"missing eqep0\n");
		return -1;
	}
	if(access("/sys/devices/platform/ocp/48302000.epwmss/48302180.eqep/enabled", F_OK)){
		fprintf(stderr,"missing eqep0\n");
		return -1;
	}
	if(access("/sys/devices/platform/ocp/48304000.epwmss/48304180.eqep/enabled", F_OK)){
		fprintf(stderr,"missing eqep0\n");
		return -1;
	}
	return 0;
}

/**
 * @brief      just check if pru remoteproc is loaded
 *
 * @return     0 if loaded, otherwise -1
 */
int check_pru()
{
	if(access("/sys/class/remoteproc/remoteproc1/state", F_OK)){
		return -1;
	}
	return 0;
}


text:
package net.somethingdreadful.MAL.adapters;

import android.app.Fragment;
import android.app.FragmentManager;
import android.support.v13.app.FragmentPagerAdapter;

import net.somethingdreadful.MAL.IGF;
import net.somethingdreadful.MAL.ProfileActivity;
import net.somethingdreadful.MAL.R;
import net.somethingdreadful.MAL.account.AccountService;
import net.somethingdreadful.MAL.api.APIHelper;
import net.somethingdreadful.MAL.api.MALApi;
import net.somethingdreadful.MAL.profile.ProfileDetailsAL;
import net.somethingdreadful.MAL.profile.ProfileDetailsMAL;
import net.somethingdreadful.MAL.profile.ProfileFriends;
import net.somethingdreadful.MAL.profile.ProfileHistory;

public class ProfilePagerAdapter extends FragmentPagerAdapter {
    private final Fragments fragments;

    public ProfilePagerAdapter(FragmentManager fm, ProfileActivity activity) {
        super(fm);
        fragments = new Fragments(activity);

        if (AccountService.isMAL()) {
            fragments.add(new ProfileDetailsMAL(), R.string.tab_name_details);
            fragments.add(new ProfileFriends(), R.string.tab_name_friends);
            if (APIHelper.isNetworkAvailable(activity)) {
                fragments.add(new ProfileHistory(), R.string.tab_name_history);
                fragments.add(new IGF().setFriendList(MALApi.ListType.ANIME), String.valueOf(MALApi.ListType.ANIME));
                fragments.add(new IGF().setFriendList(MALApi.ListType.MANGA), String.valueOf(MALApi.ListType.MANGA));
            }
        } else {
            fragments.add(new ProfileDetailsAL(), R.string.tab_name_details);
            fragments.add(new ProfileFriends().setId(0), R.string.tab_name_following);
            if (APIHelper.isNetworkAvailable(activity)) {
                fragments.add(new ProfileFriends().setId(1), R.string.tab_name_followers);
                fragments.add(new ProfileHistory(), R.string.layout_card_title_activity);
                fragments.add(new IGF().setFriendList(MALApi.ListType.ANIME), String.valueOf(MALApi.ListType.ANIME));
                fragments.add(new IGF().setFriendList(MALApi.ListType.MANGA), String.valueOf(MALApi.ListType.MANGA));
            }
        }
    }

    @Override
    public Fragment getItem(int position) {
        return fragments.getFragment(position);
    }

    @Override
    public int getCount() {
        return fragments.getSize();
    }

    @Override
    public String getPageTitle(int position) {
        return fragments.getName(position);
    }
}


text:
package io.github.zaphodious.polishdefiance.combat.entity;

import aurelienribon.tweenengine.TweenManager;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.math.Vector3;
import io.github.zaphodious.polishdefiance.ZaphUtil;
import io.github.zaphodious.polishdefiance.combat.scene.Direction;
import io.github.zaphodious.polishdefiance.combat.scene.FightScene;
import io.github.zaphodious.polishdefiance.combat.scene.NumberPair;
import io.github.zaphodious.polishdefiance.combat.scene.TiledMapPropertyParser;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * Created by achyt_000 on 9/8/2015.
 */
public final class SceneObjectTracker {

    private FightScene fightScene;
    private TweenManager tweenManager;

    private Map<Class, List<SceneObject>> objectLists;
    private List<Texture> texturesToDisposeOf;

    public SceneObjectTracker(FightScene fightScene, TweenManager tweenManager) {
        this.fightScene = fightScene;
        List<CombatUnit> testList = ZaphUtil.newList();
        this.tweenManager = tweenManager;
        this.objectLists = ZaphUtil.newMap();

        this.texturesToDisposeOf = ZaphUtil.newList();
    }

    public void addNewObjectToScene(String name, Texture texture, SceneObjectType objectType, SnapType snapType, Vector2 startPosition) {
        try {
            addObjectToScene(objectType.newInstance(name, texture, startPosition, tweenManager, this, fightScene), objectType.getSceneObjectClass(), snapType);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public void addNewObjectToScene(String name, Texture texture, SceneObjectType objectType, SnapType snapType, Vector3 startPosition) {
        addNewObjectToScene(name, texture, objectType, snapType, new Vector2(startPosition.x, startPosition.y));
    }

    public void addNewObjectToScene(String name, Texture texture, SceneObjectType objectType, SnapType snapType, Rectangle startPosition) {
        addNewObjectToScene(name, texture, objectType, snapType, new Vector2(startPosition.x, startPosition.y));
    }

    public <K extends SceneObject> void addObjectToScene(SceneObject sceneObject, Class<K> paramaterClass, SnapType snapType) throws Exception {
        if (snapType != SnapType.FREE_FLOAT) {
            Rectangle boundingRect = sceneObject.getBoundingRectangle();
            sceneObject.setPosition(snapType.adjustPosition(new Vector2(boundingRect.x, boundingRect.y), fightScene));
        }

        if (paramaterClass == sceneObject.getClass()) {

            if (!objectLists.containsKey(paramaterClass)) {
                objectLists.put(paramaterClass, new ArrayList<SceneObject>());
            }

            //System.out.println("Class matched!");
            objectLists.get(paramaterClass).add(sceneObject);
        } else {
            throw new ClassCastException("You tried to pass in a " + sceneObject.getClass() + ", but your type parameter was a " + paramaterClass);
        }
    }

    public void drawObjects(SpriteBatch batch) {
        /*for (Projectile projectile : projectiles) {
            if (!projectile.isKill()) {
                projectile.draw(batch);
            }
        }

        for (CombatUnit combatUnit : combatUnits) {
            if (!combatUnit.isKill()) {
                combatUnit.draw(batch);
            }
        }*/

        for (List<SceneObject> list : objectLists.values()){
            for (SceneObject sceneObject : list) {
                sceneObject.draw(batch);
            }
        }
    }

    public void processInteractions() {

        for (Projectile projectile : getObjectsOfType(Projectile.class)) {
            for (CombatUnit unit : getObjectsOfType(CombatUnit.class)) {
                if (doesProjectileHitUnit(projectile, unit)) {
                    unit.damage(projectile.getPower());
                    projectile.thisIsKillNow();
                }
            }
        }

        removeDeadSceneObjects();

    }

    private boolean doesProjectileHitUnit(Projectile projectile, CombatUnit unit) {
        boolean toReturn = false;

        if (fightScene.doTheseOverlap(projectile, unit)) {
            if (!projectile.isKill() && !unit.isKill()) {
                if (projectile.getUnitFaction() != unit.getUnitFaction()) {
                    TiledMapPropertyParser.PropBundle propBundle = fightScene.getPropertyParser().getTranslatedProps(fightScene.getCellAt(unit.getBoundingRectangle()));

                    if (fightScene.getRandom().nextFloat() > propBundle.getBulletDodgeChance()) {
                        toReturn = true;
                    } else {
                    }

                }
            }
        }

        return toReturn;
    }

    public void removeDeadSceneObjects() {
        List<SceneObject> toRemove = ZaphUtil.newList();

        for (List<SceneObject> list : objectLists.values()) {
            for (SceneObject sceneObject : list) {
                if (sceneObject.isKill()) {
                    toRemove.add(sceneObject);
                    texturesToDisposeOf.add(sceneObject.getTexture());
                }
            }
            list.removeAll(toRemove);
            toRemove.clear();
        }
    }

    public <K extends SceneObject> List<K> getObjectsOfType(Class<K> thisClass) {
        List<K> toReturn = ZaphUtil.newList();

        if (objectLists.containsKey(thisClass)) {
            for (SceneObject sceneObject : objectLists.get(thisClass)) {
                K returnObject = (K) sceneObject;
                toReturn.add(returnObject);
            }
        }

        return toReturn;
    }

    public void advanceRound() {
        for (CombatUnit combatUnit : this.getObjectsOfType(CombatUnit.class)) {
            if (combatUnit.getUnitFaction() == Faction.NAZI) {
                if (fightScene.getRandom().nextBoolean() == true) {
                    combatUnit.command(Command.ATTACK, Direction.WEST);
                } else {
                    combatUnit.command(Command.MOVE, Direction.WEST);
                }
            }
            combatUnit.advanceRound();
        }

        for (int i = 0; i < fightScene.getRandom().nextInt(10); i++) {
            Vector2 startPosition = new Vector2(fightScene.getWorldSize().getX()-fightScene.getTileDimentions().getX(), fightScene.getRandom().nextInt((int) fightScene.getWorldSize().getY()));
            this.addNewObjectToScene("Nazi!", new Texture("imp-laugh.png"),SceneObjectType.COMBAT_UNIT,SnapType.SNAP_TO_GRID,startPosition);
        }
    }

    public FightScene getFightScene() {
        return fightScene;
    }

    public void dispose() {
        for (List<SceneObject> list : objectLists.values()) {
            for (SceneObject sceneObject : list) {
                sceneObject.dispose();
            }
        }

        for (Texture texture : texturesToDisposeOf) {
            texture.dispose();
        }

    }

    public void printListsOfObjects() {
        for (Projectile projectile : getObjectsOfType(Projectile.class)) {
            System.out.println("Projectile " + projectile.getName() + " at " + projectile.getBoundingRectangle() + "," + projectile.getBoundingRectangle().y + " and isKill status is " + projectile.isKill());
        }

        for (CombatUnit combatUnit : getObjectsOfType(CombatUnit.class)) {
            System.out.println("CombatUnit " + combatUnit.getName() + " at " + combatUnit.getBoundingRectangle().x + "," + combatUnit.getBoundingRectangle().y + " and isKill status is " + combatUnit.isKill());
        }
    }

    public enum SceneObjectType {
        COMBAT_UNIT(CombatUnit.class) {
            @Override
            public SceneObject newInstance(String name, Texture texture, Vector2 startPosition, TweenManager tweenManager, SceneObjectTracker tracker, FightScene fightScene) {
                NumberPair<Integer> tileDims = fightScene.getTileDimentions();
                CombatUnit toAdd = new CombatUnit(name, texture,startPosition,tweenManager,tracker).setMoveAmounts(new Vector2(tileDims.getX()*fightScene.getRandom().nextInt(4), tileDims.getY()*fightScene.getRandom().nextInt(4)));

                toAdd.setSize(tileDims.getX(), tileDims.getY());
                toAdd.command(Command.ATTACK, Direction.EAST);
                return toAdd;
            }
        },
        PROJECTILE(Projectile.class) {
            @Override
            public SceneObject newInstance(String name, Texture texture, Vector2 startPosition, TweenManager tweenManager, SceneObjectTracker tracker, FightScene fightScene) {
                NumberPair<Integer>  tileDims = fightScene.getTileDimentions();
                startPosition.x += tileDims.getX();
                Projectile toAdd = new Projectile(name,fightScene,texture,startPosition,tweenManager,tracker,Faction.NAZI);
                toAdd.setSize(tileDims.getX(), tileDims.getY());

                return toAdd;
            }
        };

        Class objectClass;

        SceneObjectType(Class objectClass) {
            this.objectClass = objectClass;
        }

        public Class getSceneObjectClass() {
            return this.objectClass;
        }
        abstract public SceneObject newInstance(String name, Texture texture, Vector2 startPosition, TweenManager tweenManager, SceneObjectTracker tracker, FightScene fightScene);

    }

    public enum SnapType {
        SNAP_TO_GRID {
            @Override
            public Vector2 adjustPosition(Vector2 initialPosition, FightScene fightScene) {
                return fightScene.getTileLocation(initialPosition);
            }
        },
        FREE_FLOAT {
            @Override
            public Vector2 adjustPosition(Vector2 initialPosition, FightScene fightScene) {
                return initialPosition;
            }
        };

        abstract public Vector2 adjustPosition(Vector2 initialPosition, FightScene fightScene);

    }

}


text:
![travis-ci](https://travis-ci.org/ConciergeAuctions/sequelize-classes.svg?branch=master) [![Stories in Ready](https://badge.waffle.io/ConciergeAuctions/sequelize-classes.svg?label=ready&title=Ready)](http://waffle.io/ConciergeAuctions/sequelize-classes)

## Overview

This package serves to assist in the creation of sequelize models via ES7 class syntax.

## Requirements

* Babel.js with --stage 0 flag OR using the stage 0 plugin for babel 6.0+
* Sequelize.js

## Extending from the Model Class

Lets start with an example of what a model could look like with Sequelize classes.

```
import {Model, hasMany} from 'sequelize-classes';
import {STRING} from 'sequelize';

@hasMany('Post', {as: 'posts', foreignKey: 'authorId'})
export default class User extends Model {
    username = {type: STRING, allowNull: false, unique: true};
    email = {type: STRING, allowNull: false, unique: true};
    firstName = {type: STRING};
    lastName = {type: STRING};

    get name() {
        return `${this.firstName} ${this.lastName}`;
    }
}
```

Note that this class is just a class, not a sequelize model at this point. The purpose of the Model class is to set up
your classes in such a way so that the Builder tool can create your sequelize model definitions properly.

## Using Builder to create your sequelize connection and define models

```
 import {Builder} from 'sequelize-classes';
 import {User} from './models/user';

 // Normal sequelize options.
 const options = {
   database: process.env.DB_NAME,
   username: process.env.DB_USER,
   pass: process.env.DB_PASS,
   config: {
     host: process.env.DB_HOST,
     port: process.env.DB_PORT,
     logging: false,
     dialect: 'postgres'
   }
 };

 // Pass sequelize connection options and an array of Classes extended from Model.
 const database = new Builder(options, [User]);

 // You can now access your sequelize instance via database.base and access all your models by name - database.User
```


text:
package com.spronghi.kiu.json;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by spronghi on 05/07/16.
 */
public abstract class JSONParser<T> {
    abstract public T parse(String jsonString);
    abstract public T parse(JSONObject json);
    abstract public JSONObject getJSONObj(T model);
    public boolean parseResult(String jsonString){
        try {
            JSONObject obj = new JSONObject(jsonString);
            return obj.getBoolean("result");
        } catch (JSONException e) {
            return false;
        }
    }
    public List<T> parseArray(String arrayString){
        try {
            List<T> list = new ArrayList<>();
            JSONArray jsonArray = new JSONArray(arrayString);
            for(int i=0; i<jsonArray.length(); i++) {
                list.add(parse(jsonArray.getJSONObject(i)));
            }
            return list;
        } catch (JSONException e) {
            return new ArrayList<>();
        }
    }
}


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

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>edu.umn.biomedicus.framework</title>
<meta name="date" content="2018-07-03">
<meta name="keywords" content="edu.umn.biomedicus.framework package">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

edu.umn.biomedicus.framework

Interfaces

DocumentBuilder

EagerLoadable

LifecycleManaged

NamedLabels

NamedSpans

SearchResult

Searcher

TagExMatch

Classes

Application

ArtifactSourceRunner

ArtifactTaskRunner

ArtifactsProcessorRunner

BiomedicusScopes

Bootstrapper

ComponentSettingImpl

DataLoader

DocumentTaskRunner

DocumentsProcessorRunner

LabelAliases

LifecycleManager

RunnerFactory

RunnersKt

SearchExpr

SearchExprFactory

SettingsTransformer

TagEx

TagExFactory

TagExKt


text:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RTS;

public class Construction : EntityAction
{

    //public members
    public GameTypes.BuildingType mType = GameTypes.BuildingType.Unknown;

    //private members
    private Dictionary<GameTypes.ItemType, int> mMaterialsMap = new Dictionary<GameTypes.ItemType, int>();
    private float mProgress = 0;

    //-------------------------------------------------------------------------------------------------
    // unity methods
    //-------------------------------------------------------------------------------------------------
    private void Start()
    {
        base.Start();
        //setup the type
        if (isInstantiated)
            setupType();
    }

    private void Update()
    {
        if (!isInstantiated)
            return;
        base.Update();
        //move items from inventory to materials map if the materials map is not empty
        if (mMaterialsMap.Count != 0)
            moveMaterials();
        //is the progress bar full?
        //Debug.Log("CHECKING PROGRESS BAR");
        if ( mProgress >= 100 )
        {
            makeBuilding();
        }
    }

    //-------------------------------------------------------------------------------------------------
    // public methods
    //-------------------------------------------------------------------------------------------------
    public float getProgress()
    {
        return mProgress;
    }

    public KeyValuePair<GameTypes.ItemType, int> neededResource()
    {
        if (mMaterialsMap.Count == 0)
            return new KeyValuePair<GameTypes.ItemType, int>();
        else
        {
            foreach (KeyValuePair<GameTypes.ItemType,int> pair in mMaterialsMap)
            {
                return pair;
            }
        }
        return new KeyValuePair<GameTypes.ItemType, int>();
    }

    public string printMaterialsMap()
    {
        //add entries for the items needed
        string rtext = "";
        foreach (KeyValuePair<GameTypes.ItemType, int> pair in mMaterialsMap)
        {
            rtext += string.Format("{0} Needed : {1}\n",pair.Key.ToString(),pair.Value);
        }
        return rtext;
    }

    public void setProgress(float p)
    {
        mProgress = p;
    }

    //-------------------------------------------------------------------------------------------------
    // private methods
    //-------------------------------------------------------------------------------------------------
    private void makeBuilding()
    {
        //make building
        if (mDead == true)
            return;
        //Debug.Log("The building is made here.");
		//if we are building a TownHall, we want to make a new Town
		Building b = null;
		if ( mType == GameTypes.BuildingType.TownHall )
		{
			//need to determine the region that this new town is in by asking the world manager
			WorldManager wm = this.transform.root.GetComponentInChildren<WorldManager>();
			Region reg = wm.getRegionFromPosition(new Vector3(transform.position.x, 0, transform.position.y) );
			if (!reg)
			{
				Debug.LogError("Unable to find the region corresponding to the new Town.");
			}
			//make a new town
			Town ntown = ObjectManager.initTown(reg);
			b = ObjectManager.initBuilding(gameObject.transform.position, mType, ntown);
		}
		else
		{
			b = ObjectManager.initBuilding(gameObject.transform.position, mType, mTown);
		}

        //now remove the construction site
        mDead = true;
    }

    private void moveMaterials()
    {
        //take items from the inventory and remove the amounts from the material map
        List<GameTypes.ItemType> rtypes = new List<GameTypes.ItemType>();
        foreach ( Item item in getInventory().mItems )
        {
			if ( mMaterialsMap.ContainsKey(item.getType()) )
            {
                //Debug.Log(string.Format("Item amount {0}", item.mAmount));
                //Debug.Log("Decreasing item and materials map amounts");
                //Debug.Log(string.Format("{0}", mMaterialsMap[item.mType]));
				mMaterialsMap[item.getType()] = mMaterialsMap[item.getType()] - item.getAmount();
				if ( mMaterialsMap[item.getType()] <= 0 )
                {
                    //Debug.Log("adding item to the list of items to remove.");
					rtypes.Add(item.getType());
                }
				item.setAmount(0);
                //Debug.Log(string.Format("{0}", mMaterialsMap[item.mType]));
            }
        }
        //delete the empty entries in material map
        foreach (GameTypes.ItemType type in rtypes)
        {
            if (mMaterialsMap.ContainsKey(type))
                mMaterialsMap.Remove(type);
        }
    }

    private void setupType()
    {
        //set the materials map based on the type
        switch (mType)
        {
            case GameTypes.BuildingType.Unknown:
                Debug.LogError("Unknown Building type");
                break;
			case GameTypes.BuildingType.TownHall:
                mMaterialsMap = Globals.TOWNHALL_CONSTRUCTION_MATERIALS;
                mName = "TownHall Construct";
                break;
			case GameTypes.BuildingType.House:
				mMaterialsMap = Globals.HOUSE_CONSTRUCTION_MATERIALS;
				mName = "House Construct";
				break;
            case GameTypes.BuildingType.Stockpile:
                mMaterialsMap = Globals.STOCKPILE_CONSTRUCTION_MATERIALS;
                mName = "Stockpile Construct";
                break;
            case GameTypes.BuildingType.Farm:
                mMaterialsMap = Globals.FARM_CONSTRUCTION_MATERIALS;
                mName = "Farm Construct";
                break;
			case GameTypes.BuildingType.SpearWorkshop:
				mMaterialsMap = Globals.SPEARWORKSHOP_CONSTRUCTION_MATERIALS;
				mName = "Spear Workshop Construct";
				break;
			case GameTypes.BuildingType.HandCartWorkshop:
				mMaterialsMap = Globals.HANDCARTWORKSHOP_CONSTRUCTION_MATERIALS;
				mName = "HandCart Workshop Construct";
				break;
            default:
                Debug.LogError("Construction(Building) type not recognised");
                break;

        }

    }

}


text:
package io.koosha.nettyfunctional.hook;

import io.koosha.nettyfunctional.matched.MatchedInboundHandler;
import io.koosha.nettyfunctional.nettyfunctions.Matcher;
import io.netty.channel.ChannelHandlerContext;
import io.netty.util.ReferenceCountUtil;

public abstract class RemovedIfInboundSink<I> extends MatchedInboundHandler<I> {

    protected RemovedIfInboundSink() {
        super();
    }

    protected RemovedIfInboundSink(final Class<?> type) {
        super(type);
    }

    protected RemovedIfInboundSink(final Matcher matcher) {
        super(matcher);
    }

    @Override
    protected final void unsupportedMsg(final ChannelHandlerContext ctx,
                                        final Object msg) {
        ctx.fireChannelRead(msg);
    }

    @Override
    protected final void read0(final ChannelHandlerContext ctx,
                               final I msg) throws Exception {
        final boolean result;

        try {
            result = this.read1(ctx, msg);
        }
        finally {
            ReferenceCountUtil.release(msg);
        }

        if (result)
            ctx.pipeline().remove(this);
    }

    protected abstract boolean read1(ChannelHandlerContext ctx, I msg)
            throws Exception;

}


text:
Use Cesium in the real angular way!

## Getting Started
`bower install angular-cesium`

## Usage
Using angular-cesium is easy as pie!
Just add it as a dependency:

angular.module('myModule', ['angularCesium']);

And start using the map components!
```html
<ac-map>
  <ac-web-map-service-layer ng-repeat="layer in layers" url="layer.url" layers="layer.layers"></ac-web-map-service-layer>
      <ac-billboards-layer>
        <ac-billboard ng-repeat="billboard in billboards"
          image="billboard.image"
          color="billboard.color"
          position="billboard.position"></ac-billboard>
      </ac-billboards-layer>
</ac-map>
```

## Example Project
https://github.com/netanelgilad/angular-cesium-example


text:
cmake_minimum_required(VERSION 2.8.12)

### build up utility functions
include(CheckCCompilerFlag)
include(CheckCXXCompilerFlag)

function(CheckCFlags outvar)
    foreach(flag ${ARGN})
        string(REGEX REPLACE "[^a-zA-Z0-9_]+" "_" cleanflag ${flag})
        check_cxx_compiler_flag(${flag} CHECK_C_FLAG_${cleanflag})
        if(CHECK_C_FLAG_${cleanflag})
            list(APPEND valid ${flag})
        endif()
    endforeach()
    set(${outvar} ${valid} PARENT_SCOPE)
endfunction()

function(CheckCXXFlags outvar)
    foreach(flag ${ARGN})
        string(REGEX REPLACE "[^a-zA-Z0-9_]+" "_" cleanflag ${flag})
        check_cxx_compiler_flag(${flag} CHECK_CXX_FLAG_${cleanflag})
        if(CHECK_CXX_FLAG_${cleanflag})
            list(APPEND valid ${flag})
        endif()
    endforeach()
    set(${outvar} ${valid} PARENT_SCOPE)
endfunction()

# Helper to ensures a scope has been set for certain target properties
macro(_SetDefaultScope var_name default_scope)
    list(GET ${var_name} 0 __setdefaultscope_temp)
    if(__setdefaultscope_temp STREQUAL "PRIVATE" OR __setdefaultscope_temp STREQUAL "PUBLIC" OR __setdefaultscope_temp STREQUAL "INTERFACE")
    else()
        list(INSERT ${var_name} 0 ${default_scope})
    endif()
    unset(__setdefaultscope_temp)
endmacro()

function(MakeCopyFileDepenency outvar file)
    if(IS_ABSOLUTE ${file})
        set(_input ${file})
    else()
        set(_input ${CMAKE_CURRENT_SOURCE_DIR}/${file})
    endif()
    if(ARGC GREATER "2")
        if(IS_ABSOLUTE ${ARGV2})
            set(_output ${ARGV2})
        else()
            set(_output ${CMAKE_CURRENT_BINARY_DIR}/${ARGV2})
        endif()
    else()
        get_filename_component(_outfile ${file} NAME)
        set(_output ${CMAKE_CURRENT_BINARY_DIR}/${_outfile})
    endif()

    add_custom_command(
        OUTPUT ${_output}
        COMMAND ${CMAKE_COMMAND} -E copy ${_input} ${_output}
        DEPENDS ${_input}
        COMMENT "Copying ${file}"
    )
    set(${outvar} ${_output} PARENT_SCOPE)
endfunction()

# magic function to handle the power functions below
function(_BuildDynamicTarget name type)
    set(_mode "files")
    foreach(dir ${ARGN})
        if(dir STREQUAL "EXCLUDE")
            set(_mode "excl")
        elseif(dir STREQUAL "DIRS")
            set(_mode "dirs")
        elseif(dir STREQUAL "FILES")
            set(_mode "files")
        elseif(dir STREQUAL "REFERENCE")
            set(_mode "reference")
        elseif(dir STREQUAL "INCLUDES")
            set(_mode "incl")
        elseif(dir STREQUAL "DEFINES")
            set(_mode "define")
        elseif(dir STREQUAL "PREFIX")
            set(_mode "prefix")
        elseif(dir STREQUAL "FLAGS")
            set(_mode "flags")
        elseif(dir STREQUAL "FEATURES")
            if(NOT COMMAND "target_compile_features")
                message(FATAL_ERROR "CMake 3.1+ is required to use this feature")
            endif()
            set(_mode ${dir})
        elseif(dir STREQUAL "LINK")
            set(_mode "link")
        elseif(dir STREQUAL "PROPERTIES")
            set(_mode "properties")
        elseif(dir STREQUAL "SHARED")
            set(type "shared")
        # Simple Copying files to build dir
        elseif(dir STREQUAL "COPY_FILES")
            set(_mode "copyfiles")
        # Emscripten handling
        elseif(dir STREQUAL "ASM_FLAG" OR dir STREQUAL "ASM_FLAGS")
            set(_mode "em_asmflag")
        elseif(dir STREQUAL "PRE_JS")
            set(_mode "em_prejs")
        elseif(dir STREQUAL "JS_LIBS")
            set(_mode "em_jslib")
        # The real work
        else()
            if(_mode STREQUAL "excl")
                if (dir MATCHES "\\/\\*\\*$")
                    string(LENGTH ${dir} dir_LENGTH)
                    math(EXPR dir_LENGTH "${dir_LENGTH} - 3")
                    string(SUBSTRING ${dir} 0 ${dir_LENGTH} dir)

                    file(GLOB_RECURSE _files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
                        ${dir}/*.*
                    )
                else()
                    file(GLOB _files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
                        ${dir}
                    )
                endif()
                if(_files)
                    list(REMOVE_ITEM _source_files
                        ${_files}
                    )
                endif()
                set(_files)
            elseif(_mode STREQUAL "files")
                if (dir MATCHES "\\*")
                    file(GLOB _files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
                        ${dir}
                    )
                else()
                    set(_files ${dir})
                endif()
                if(_files)
                    list(APPEND _source_files
                        ${_files}
                    )
                endif()
                set(_files)
            elseif(_mode STREQUAL "incl")
                list(APPEND _include_dirs
                    ${dir}
                )
            elseif(_mode STREQUAL "define")
                list(APPEND _definitions
                    ${dir}
                )
            elseif(_mode STREQUAL "flags")
                list(APPEND _flags
                    ${dir}
                )
            elseif(_mode STREQUAL "FEATURES")
                list(APPEND _features
                    ${dir}
                )
            elseif(_mode STREQUAL "link")
                list(APPEND _link_libs
                    ${dir}
                )
            elseif(_mode STREQUAL "properties")
                list(APPEND _properties
                    ${dir}
                )
            elseif(_mode STREQUAL "reference")
                if (dir MATCHES "\\*")
                    file(GLOB _files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
                        ${dir}
                    )
                else()
                    set(_files ${dir})
                endif()
                if(_files)
                    list(APPEND _reference
                        ${_files}
                    )
                endif()
                set(_files)
            elseif(_mode STREQUAL "prefix")
                if(IS_ABSOLUTE ${dir})
                    list(APPEND _flags
                        PRIVATE "-include ${dir}"
                    )
                elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${dir})
                    list(APPEND _flags
                        PRIVATE -include ${CMAKE_CURRENT_SOURCE_DIR}/${dir}
                    )
                else()
                    message(FATAL_ERROR "could not find refix header")
                endif()
            elseif(_mode STREQUAL "dirs")
                if (dir STREQUAL ".")
                    set(dir ${CMAKE_CURRENT_SOURCE_DIR})
                endif()
                if (dir MATCHES "\\/\\*\\*$")
                    string(LENGTH ${dir} dir_LENGTH)
                    math(EXPR dir_LENGTH "${dir_LENGTH} - 3")
                    string(SUBSTRING ${dir} 0 ${dir_LENGTH} dir)

                    file(GLOB_RECURSE _files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
                        ${dir}/*.c
                        ${dir}/*.cpp
                        ${dir}/*.cxx
                        ${dir}/*.cc
                        ${dir}/*.h
                        ${dir}/*.hpp
                        ${dir}/*.inl
                        ${dir}/*.m
                        ${dir}/*.mm
                    )
                else()
                    file(GLOB _files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
                        ${dir}/*.c
                        ${dir}/*.cpp
                        ${dir}/*.cxx
                        ${dir}/*.cc
                        ${dir}/*.h
                        ${dir}/*.hpp
                        ${dir}/*.inl
                        ${dir}/*.m
                        ${dir}/*.mm
                    )
                endif()
                if(_files)
                    list(APPEND _source_files
                        ${_files}
                    )
                endif()
            # simple copy files
            elseif(_mode STREQUAL "copyfiles")
                MakeCopyFileDepenency(_copyfile_target
                    ${dir}
                )
                list(APPEND _source_files
                    ${_copyfile_target}
                )
                unset(_copyfile_target)
            # emscripten handling
            elseif(_mode STREQUAL "em_asmflag")
                list(APPEND _em_asmflag
                    "-s ${dir}"
                )
            elseif(_mode STREQUAL "em_prejs")
                list(APPEND _em_prejs
                    ${dir}
                )
            elseif(_mode STREQUAL "em_jslib")
                if(IS_ABSOLUTE ${dir})
                    list(APPEND _em_jslib
                        ${dir}
                    )
                elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${dir})
                    list(APPEND _em_jslib
                        ${CMAKE_CURRENT_SOURCE_DIR}/${dir}
                    )
                else()
                    message(FATAL_ERROR "Could not find ${dir} in current source dir")
                endif()
            else()
                message(FATAL_ERROR "Unknown Mode ${_mode}")
            endif()
        endif()
    endforeach()
    if (NOT _source_files)
        message(FATAL_ERROR "Could not find any sources for ${name}")
    endif()
    if(_reference)
        list(APPEND _source_files ${_reference})
        set_source_files_properties(${_reference}
            PROPERTIES
                HEADER_FILE_ONLY TRUE
        )
    endif()
    if(type STREQUAL "lib")
        add_library(${name} STATIC EXCLUDE_FROM_ALL
            ${_source_files}
        )
    elseif(type STREQUAL "shared")
        add_library(${name} SHARED
            ${_source_files}
        )
        set_target_properties(${name} PROPERTIES
            MACOSX_RPATH ON
        )
    elseif(type STREQUAL "object")
        add_library(${name} OBJECT
            ${_source_files}
        )
    elseif(type STREQUAL "module")
        add_library(${name} MODULE
            ${_source_files}
        )
    elseif(type STREQUAL "tool")
        add_executable(${name}
            ${_source_files}
        )
        if(LINUX)
            get_property(is64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
            if(is64)
                set_target_properties(${name} PROPERTIES SUFFIX ".bin.x86_64")
            else()
                set_target_properties(${name} PROPERTIES SUFFIX ".bin.x86")
            endif()
            set_target_properties(${name} PROPERTIES
                LINK_FLAGS "-Wl,--allow-shlib-undefined" # Voodoo to ignore the libs that steam_api is linked to (will be resolved at runtime)
            )
        elseif(EMSCRIPTEN)
            set_target_properties(${name} PROPERTIES
                SUFFIX ".html"
            )
        endif()
    else()
        add_executable(${name} MACOSX_BUNDLE WIN32
            ${_source_files}
        )
        if(LINUX)
            get_property(is64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
            if(is64)
                set_target_properties(${name} PROPERTIES SUFFIX ".bin.x86_64")
            else()
                set_target_properties(${name} PROPERTIES SUFFIX ".bin.x86")
            endif()
            set_target_properties(${name} PROPERTIES
                LINK_FLAGS "-Wl,--allow-shlib-undefined" # Voodoo to ignore the libs that steam_api is linked to (will be resolved at runtime)
            )
        endif()
    endif()
    if(_include_dirs)
        _SetDefaultScope(_include_dirs PRIVATE)
        target_include_directories(${name} ${_include_dirs})
    endif()
    if(_definitions)
        _SetDefaultScope(_definitions PRIVATE)
        target_compile_definitions(${name} ${_definitions})
    endif()
    if(_features)
        _SetDefaultScope(_features PRIVATE)
        target_compile_features(${name} ${_features})
    endif()
    if(_link_libs)
        target_link_libraries(${name} ${_link_libs})
    endif()
    if(_flags)
        _SetDefaultScope(_flags PRIVATE)
        target_compile_options(${name} ${_flags})
    endif()
    if(_properties)
        set_target_properties(${name} PROPERTIES
            ${_properties}
        )
    endif()
    if(EMSCRIPTEN)
        if(_em_jslib)
            em_link_js_library(${name} ${_em_jslib})
        endif()
        if(_em_prejs)
            em_link_pre_js(${name} ${_em_prejs})
        endif()
        if(_em_asmflag)
            target_link_libraries(${name}
                ${_em_asmflag}
            )
        endif()
    endif()
endfunction()

## These two power functions build up library and program targets
##
## the parameters are simply the target name followed by a list of directories or other parameters
## parameters that can be specified
## FILES      followed by a list of explicit files/globs to add (or generated files).
## DIRS       followed by a list of directories ..  will glob in *.c, *.cpp, *.h, *.hpp, *.inl, *.m, *.mm
##                      If you end the string with ** it will pull in recursively.
## REFERENCE  followed by a list of explicit files/globs to add.
##                      These files will be available in the IDE, but will NOT be compiled. (ini files, txt files)
## EXCLUDE    followed by a list of files/globs to exclude
## INCLUDES   followed by a list of include directories.
##                      These use Generator expressions (see CMAKE documentation) default is PRIVATE scoped
## DEFINES    followed by a list of compiler defines.
##                      These use Generator expressions (see CMAKE documentation) default is PRIVATE scoped
## FLAGS      followed by a list of compiler flags.
##                      These use Generator expressions (see CMAKE documentation) default is PRIVATE scoped
## FEATURES   followed by a list of compiler features (cmake 3.1+).
##                      These use Generator expressions (see CMAKE documentation) default is PRIVATE scoped
## PREFIX     followed by a header. Basic prefix header support..  currently only GCC/Clang is supported.
## LINK       followed by a list of link targets.  Can use Generator expressions (see CMAKE documentation)
## PROPERTIES followed by a list of target properties.
## COPY_FILES followed by a list of files to copy to the build directory.
##                      If relative, assumes relative to source dir
##  Emscripten/asm.js ONLY flags
## ASM_FLAG   followed by a list of emscripten flags (without the -s.. e.g.  FULL_ES2=1)
## PRE_JS     followed by a list of js files to preinclude in the .js output
##                      If relative, assumes relative to source dir
## JS_LIBS    followed by a list of JS libs to include during emscripten link phase.
##                      If relative, assumes relative to source dir

function(CreateSharedLibrary name)
    _BuildDynamicTarget(${name} shared ${ARGN})
endfunction()

function(CreateObjectLibrary name)
    _BuildDynamicTarget(${name} object ${ARGN})
endfunction()

function(CreateModule name)
    _BuildDynamicTarget(${name} module ${ARGN})
endfunction()

function(CreateLibrary name)
    _BuildDynamicTarget(${name} lib ${ARGN})
endfunction()

function(CreateProgram name)
    _BuildDynamicTarget(${name} exe ${ARGN})
endfunction()

function(CreateTool name)
    _BuildDynamicTarget(${name} tool ${ARGN})
endfunction()

## Helper functions to copy libs
function(_CleanGeneratorExpressions var out_var debug_opt_var)
    set(debug_opt "")
    set(clean ${var})
    if (var MATCHES "\\$<")
        string(REGEX REPLACE "^\\$<(.+>|[^:]+):(.+)>$" "\\2" clean ${var})
        string(REGEX REPLACE "\\$<(.+>|[^:]+):(.+)>" "\\1" condition ${var})
        if (condition STREQUAL "$<CONFIG:DEBUG>")
            set(debug_opt "debug")
        elseif(condition STREQUAL "$<NOT:$<CONFIG:DEBUG>>")
            set(debug_opt "optimized")
        endif()
    endif()
    set(${debug_opt_var} ${debug_opt} PARENT_SCOPE)
    set(${out_var} ${clean} PARENT_SCOPE)
endfunction()

function(FindLinkedLibs target libs)
    get_target_property(lib_list ${target} INTERFACE_LINK_LIBRARIES)
    if(NOT lib_list)
        return()
    endif()

    #message(STATUS "Checking ${target} :: ${lib_list}")
    if (ARGV2 GREATER "0")
        set(_extra ON)
        math(EXPR level "${ARGV2} - 1")
    endif()

    foreach (lib ${lib_list})
        _CleanGeneratorExpressions(${lib} lib debug_opt)
        get_filename_component(ext ${lib} EXT)
        if(ext)
            string(SUBSTRING ${ext} 1 -1 ext2)
            get_filename_component(ext2 "${ext2}" EXT)
            if(ext2)
                set(ext ${ext2})
            endif()
        endif()
        if(TARGET ${lib})
            if(_extra)
                FindLinkedLibs(${lib} shared_libs ${level})
            endif()
        elseif(ext STREQUAL ".framework" OR ext STREQUAL CMAKE_SHARED_LIBRARY_SUFFIX OR ext STREQUAL CMAKE_IMPORT_LIBRARY_SUFFIX)
            if(debug_opt)
                list(APPEND shared_libs ${debug_opt})
            endif()
            list(APPEND shared_libs ${lib})
        else()
#            message(STATUS "Skipping ${lib} -- ${ext}")
        endif()
    endforeach()

#    message(STATUS "Target: ${target} Shared: ${shared_libs}")
    set(${libs} ${shared_libs} PARENT_SCOPE)
endfunction()

function(CopyAssets target)
    set(_script_file ${CMAKE_CURRENT_BINARY_DIR}/${target}_copyassets.cmake)
    file(WRITE ${_script_file}
        "set(assets \"${ARGN}\")\n"
        "\n"
        "get_filename_component(asset_dir \"\${APP_TARGET}\" DIRECTORY)\n"
        "if (APPLE) # an OS X Bundle\n"
        "  include(BundleUtilities)\n"
        "  get_bundle_and_executable(\"\${APP_TARGET}\" bundle executable valid)\n"
        "  if(valid)\n"
        "    set(asset_dir \"\${bundle}/Contents/Resources\")\n"
        "  endif()\n"
        "endif()\n"
        "file(MAKE_DIRECTORY \${asset_dir})\n"
        "foreach(_asset \${assets})\n"
        "  string(REGEX REPLACE \"^([^@]+)@?.*\" \"\\\\1\" _source \"\${_asset}\")\n"
        "  if (_asset MATCHES \"@\")\n"
        "    string(REGEX REPLACE \"^([^@]+)@(.*)$\" \"\\\\2\" _dest \"\${_asset}\")\n"
        "  else()\n"
        "    get_filename_component(_dest \"\${_asset}\" NAME)\n"
        "  endif()\n"
        "  configure_file(\"\${_source}\" \"\${asset_dir}/\${_dest}\" COPYONLY)\n"
        "endforeach()\n"
    )

    add_custom_command(TARGET ${target}
        POST_BUILD
        COMMAND ${CMAKE_COMMAND} -DAPP_TARGET="$<TARGET_FILE:${target}>" -P "${_script_file}"
        COMMENT "Copying Assets for ${target}"
    )
endfunction()

function(CopyDependentLibs target)
    if(EMSCRIPTEN)
        return()
    endif()
    set(_mode "lib")

    FindLinkedLibs(${target} __libs 2)
    list(APPEND _libs ${__libs})

    foreach(entry ${ARGN})
        if(entry STREQUAL "TARGETS")
            set(_mode "targets")
        elseif(entry STREQUAL "EXTRA_LIBS")
            set(_mode "extra")
        else()
            if(_mode STREQUAL "targets")
                FindLinkedLibs(${entry} __libs 2)
                list(APPEND _libs ${__libs})
                set(__libs)
            elseif(_mode STREQUAL "lib")
                list(APPEND _libs ${entry})
            elseif(_mode STREQUAL "extra")
                list(APPEND _extra_libs ${entry})
            else()
                message(FATAL_ERROR "Unknown mode ${_mode}")
            endif()
        endif()
    endforeach()

    # we don't sort extralibs as it may have debug;optimized entries in it

    # Fetch library rpath relative directory from global properties
    get_property(lib_rpath_dir GLOBAL PROPERTY LIBRARY_RPATH_DIRECTORY)
    if(NOT lib_rpath_dir)
        set(lib_rpath_dir "")
    endif()

    set(_SCRIPT_FILE "${CMAKE_CURRENT_BINARY_DIR}/${target}_copylibs.cmake")
    file(WRITE ${_SCRIPT_FILE}
        "# Generated Script file\n"
        "include(GetPrerequisites)\n"
        "set(source_libs \"${_libs}\")\n"
        "set(extra_libs \"${_extra_libs}\")\n"
        "\n"
        "if (APPLE) # an OS X Bundle\n"
        "  include(BundleUtilities)\n"
        "  get_bundle_and_executable(\"\${BUNDLE_APP}\" bundle executable valid)\n"
        "  if(valid)\n"
        "    set(dest \"\${bundle}/Contents/Frameworks\")\n"
        "    get_prerequisites(\${executable} lib_list 1 0 \"\" \"\")\n"
        "    foreach(lib \${lib_list})\n"
        "      get_filename_component(lib_file \"\${lib}\" NAME)\n"
        "      foreach(slib \${source_libs})\n"
        "         get_filename_component(slib_file \"\${slib}\" NAME)\n"
        "         if(lib_file STREQUAL slib_file)\n"
        "           file(COPY \"\${slib}\" DESTINATION \"\${dest}\")\n"
        "         endif()\n"
        "      endforeach()\n"
        "    endforeach()\n"
        "  else()\n"
        "    message(WARNING \"App Not found? \${BUNDLE_APP}\")\n"
        "  endif()\n"
        "else() # Not an OS X bundle\n"
        "  set(executable \"\${BUNDLE_APP}\")\n"
        "  get_filename_component(executable_dir \"\${executable}\" DIRECTORY)\n"
        "  get_prerequisites(\${executable} lib_list 1 0 \"\" \"\")\n"
        "  set(dest \${executable_dir}/\${LIB_RPATH_DIR})\n"
        "  file(MAKE_DIRECTORY \${dest})\n"
        "  set(_skipreq OFF)\n"
        "  foreach(lib \${lib_list} \${extra_libs})\n"
        "    if(_skipreq)\n"
        "      set(_skipreq OFF)\n"
        "    elseif( (lib STREQUAL \"debug\" AND NOT USE_DEBUG) OR (lib STREQUAL \"optimized\" AND USE_DEBUG) )\n"
        "      set(_skipreq ON)\n"
        "    elseif( (lib STREQUAL \"debug\" AND USE_DEBUG) OR (lib STREQUAL \"optimized\" AND NOT USE_DEBUG) )\n"
        "      # Splitting based on debug/optimized\n"
        "    else()\n"
        "      get_filename_component(lib_file \"\${lib}\" NAME)\n"
        "      set(_skip OFF)\n"
        "      foreach(slib \${source_libs} \${extra_libs})\n"
        "        if(_skip)\n"
        "          set(_skip OFF)\n"
        "        elseif( (slib STREQUAL \"debug\" AND NOT USE_DEBUG) OR (slib STREQUAL \"optimized\" AND USE_DEBUG) )\n"
        "          set(_skip ON)\n"
        "        elseif( (slib STREQUAL \"debug\" AND USE_DEBUG) OR (slib STREQUAL \"optimized\" AND NOT USE_DEBUG) )\n"
        "          # Splitting based on debug/optimized\n"
        "        else()\n"
        "          get_filename_component(slib_file \"\${slib}\" NAME)\n"
        "          if(lib_file STREQUAL slib_file)\n"
        "            message(STATUS \"Copying library: \${lib_file}\")\n"
        "            execute_process(COMMAND \${CMAKE_COMMAND} -E copy \"\${slib}\" \"\${dest}\")\n"
        "            break()\n"
        "          else()\n"
        "            get_filename_component(slib_dir \"\${slib}\" PATH)\n"
        "            set(slib_path \"\${slib_dir}/\${lib_file}\")\n"
        "            if(EXISTS \${slib_path})\n"
        "              message(STATUS \"Copying library: \${lib_file}\")\n"
        "              execute_process(COMMAND \${CMAKE_COMMAND} -E copy \"\${slib_path}\" \"\${dest}\")\n"
        "              break()\n"
        "            endif()\n"
        "          endif()\n"
        "        endif()\n" # _skip
        "      endforeach()\n" # source lib scan
        "    endif()\n" # _skipreq
        "  endforeach()\n" # required libs
        "endif()\n"
    )
    ADD_CUSTOM_COMMAND(TARGET ${target}
        POST_BUILD
        COMMAND ${CMAKE_COMMAND} -DBUNDLE_APP="$<TARGET_FILE:${target}>" -DLIB_RPATH_DIR="${lib_rpath_dir}" -DUSE_DEBUG=$<CONFIG:Debug> -P "${_SCRIPT_FILE}"
    )
endfunction()

if(EMSCRIPTEN)
    find_file(EM_FILE_PACKAGER
        file_packager.py
        HINTS ENV EMSCRIPTEN
        PATH_SUFFIXES tools
        NO_CMAKE_FIND_ROOT_PATH
    )
    find_program(EM_PYTHON
        NAMES python2 python
        NO_CMAKE_FIND_ROOT_PATH
    )
    function(EmscriptenCreatePackage output_file out_js_file)
        set(_data_file ${CMAKE_CURRENT_BINARY_DIR}/${output_file}.data)
        set(_preload_file ${CMAKE_CURRENT_BINARY_DIR}/${output_file}.data.js)

        set(_mode "none")
        foreach(entry ${ARGN})
            if(entry STREQUAL "PRELOAD")
                set(_mode "preload")
            elseif(entry STREQUAL "ARGS")
                set(_mode "args")
            else()
                if (_mode STREQUAL "preload")
                    list(APPEND preload_map ${entry})

                    string(REGEX REPLACE "^([^@]+)@?.*" "\\1" _path "${entry}")

                    if(NOT IS_ABSOLUTE ${_path})
                        set(_path ${CMAKE_CURRENT_BINARY_DIR}/${_path})
                    endif()

                    file(GLOB_RECURSE _files
                        ${_path}/*
                    )
                    list(APPEND _packaged_files ${_files})
                elseif(_mode STREQUAL "args")
                    list(APPEND extra_opts ${entry})
                else()
                    message(FATAL_ERROR "Specify a proper mode.  PRELOAD or ARGS")
                endif()
            endif()
        endforeach()

        if(NOT preload_map)
            message(FATAL_ERROR "Specify a preload map: ${preload_map}")
        endif()

        add_custom_command(
            OUTPUT
                ${_data_file}
                ${_preload_file}
            DEPENDS
                ${_packaged_files}
            WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
            COMMAND
                ${EM_PYTHON} ${EM_FILE_PACKAGER}
            ARGS
                ${output_file}.data
                --js-output=${output_file}.data.js
                --preload ${preload_map}
                ${extra_opts}
        )
        set_source_files_properties(${_data_file} ${_preload_file} PROPERTIES GENERATED TRUE)
        set(${out_js_file} ${_preload_file} PARENT_SCOPE)
    endfunction()
endif()


text:
package com.amazonaws.services.simpleworkflow.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class RegisterDomainRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     *

     * Name of the domain to register. The name must be unique in the region that the domain is registered in.
     *

     *

     * The specified string must not start or end with whitespace. It must not contain a : (colon),
     * / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f -
     * \u009f). Also, it must not contain the literal string quotarnquot.
     *

     */
    private String name;
    /**
     *

     * A text description of the domain.
     *

     */
    private String description;
    /**
     *

     * The duration (in days) that records and histories of workflow executions on the domain should be kept by the
     * service. After the retention period, the workflow execution is not available in the results of visibility calls.
     *

     *

     * If you pass the value NONE or 0 (zero), then the workflow execution history will not be
     * retained. As soon as the workflow execution completes, the execution record and its history are deleted.
     *

     *

     * The maximum workflow execution retention period is 90 days. For more information about Amazon SWF service limits,
     * see: Amazon SWF Service
     * Limits in the Amazon SWF Developer Guide.
     *

     */
    private String workflowExecutionRetentionPeriodInDays;

    /**
     *

     * Name of the domain to register. The name must be unique in the region that the domain is registered in.
     *

     *

     * The specified string must not start or end with whitespace. It must not contain a : (colon),
     * / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f -
     * \u009f). Also, it must not contain the literal string quotarnquot.
     *

     *
     * @param name
     *        Name of the domain to register. The name must be unique in the region that the domain is registered
     *        in.

     *

     *        The specified string must not start or end with whitespace. It must not contain a : (colon),
     *        / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f -
     *        \u009f). Also, it must not contain the literal string quotarnquot.
     */

    public void setName(String name) {
        this.name = name;
    }

    /**
     *

     * Name of the domain to register. The name must be unique in the region that the domain is registered in.
     *

     *

     * The specified string must not start or end with whitespace. It must not contain a : (colon),
     * / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f -
     * \u009f). Also, it must not contain the literal string quotarnquot.
     *

     *
     * @return Name of the domain to register. The name must be unique in the region that the domain is registered
     *         in.

     *

     *         The specified string must not start or end with whitespace. It must not contain a : (colon),
     *         / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f
     *         - \u009f). Also, it must not contain the literal string quotarnquot.
     */

    public String getName() {
        return this.name;
    }

    /**
     *

     * Name of the domain to register. The name must be unique in the region that the domain is registered in.
     *

     *

     * The specified string must not start or end with whitespace. It must not contain a : (colon),
     * / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f -
     * \u009f). Also, it must not contain the literal string quotarnquot.
     *

     *
     * @param name
     *        Name of the domain to register. The name must be unique in the region that the domain is registered
     *        in.

     *

     *        The specified string must not start or end with whitespace. It must not contain a : (colon),
     *        / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f -
     *        \u009f). Also, it must not contain the literal string quotarnquot.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public RegisterDomainRequest withName(String name) {
        setName(name);
        return this;
    }

    /**
     *

     * A text description of the domain.
     *

     *
     * @param description
     *        A text description of the domain.
     */

    public void setDescription(String description) {
        this.description = description;
    }

    /**
     *

     * A text description of the domain.
     *

     *
     * @return A text description of the domain.
     */

    public String getDescription() {
        return this.description;
    }

    /**
     *

     * A text description of the domain.
     *

     *
     * @param description
     *        A text description of the domain.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public RegisterDomainRequest withDescription(String description) {
        setDescription(description);
        return this;
    }

    /**
     *

     * The duration (in days) that records and histories of workflow executions on the domain should be kept by the
     * service. After the retention period, the workflow execution is not available in the results of visibility calls.
     *

     *

     * If you pass the value NONE or 0 (zero), then the workflow execution history will not be
     * retained. As soon as the workflow execution completes, the execution record and its history are deleted.
     *

     *

     * The maximum workflow execution retention period is 90 days. For more information about Amazon SWF service limits,
     * see: Amazon SWF Service
     * Limits in the Amazon SWF Developer Guide.
     *

     *
     * @param workflowExecutionRetentionPeriodInDays
     *        The duration (in days) that records and histories of workflow executions on the domain should be kept by
     *        the service. After the retention period, the workflow execution is not available in the results of
     *        visibility calls.

     *

     *        If you pass the value NONE or 0 (zero), then the workflow execution history will
     *        not be retained. As soon as the workflow execution completes, the execution record and its history are
     *        deleted.
     *

     *

     *        The maximum workflow execution retention period is 90 days. For more information about Amazon SWF service
     *        limits, see: Amazon SWF Service
     *        Limits in the Amazon SWF Developer Guide.
     */

    public void setWorkflowExecutionRetentionPeriodInDays(String workflowExecutionRetentionPeriodInDays) {
        this.workflowExecutionRetentionPeriodInDays = workflowExecutionRetentionPeriodInDays;
    }

    /**
     *

     * The duration (in days) that records and histories of workflow executions on the domain should be kept by the
     * service. After the retention period, the workflow execution is not available in the results of visibility calls.
     *

     *

     * If you pass the value NONE or 0 (zero), then the workflow execution history will not be
     * retained. As soon as the workflow execution completes, the execution record and its history are deleted.
     *

     *

     * The maximum workflow execution retention period is 90 days. For more information about Amazon SWF service limits,
     * see: Amazon SWF Service
     * Limits in the Amazon SWF Developer Guide.
     *

     *
     * @return The duration (in days) that records and histories of workflow executions on the domain should be kept by
     *         the service. After the retention period, the workflow execution is not available in the results of
     *         visibility calls.

     *

     *         If you pass the value NONE or 0 (zero), then the workflow execution history
     *         will not be retained. As soon as the workflow execution completes, the execution record and its history
     *         are deleted.
     *

     *

     *         The maximum workflow execution retention period is 90 days. For more information about Amazon SWF service
     *         limits, see: Amazon SWF Service
     *         Limits in the Amazon SWF Developer Guide.
     */

    public String getWorkflowExecutionRetentionPeriodInDays() {
        return this.workflowExecutionRetentionPeriodInDays;
    }

    /**
     *

     * The duration (in days) that records and histories of workflow executions on the domain should be kept by the
     * service. After the retention period, the workflow execution is not available in the results of visibility calls.
     *

     *

     * If you pass the value NONE or 0 (zero), then the workflow execution history will not be
     * retained. As soon as the workflow execution completes, the execution record and its history are deleted.
     *

     *

     * The maximum workflow execution retention period is 90 days. For more information about Amazon SWF service limits,
     * see: Amazon SWF Service
     * Limits in the Amazon SWF Developer Guide.
     *

     *
     * @param workflowExecutionRetentionPeriodInDays
     *        The duration (in days) that records and histories of workflow executions on the domain should be kept by
     *        the service. After the retention period, the workflow execution is not available in the results of
     *        visibility calls.

     *

     *        If you pass the value NONE or 0 (zero), then the workflow execution history will
     *        not be retained. As soon as the workflow execution completes, the execution record and its history are
     *        deleted.
     *

     *

     *        The maximum workflow execution retention period is 90 days. For more information about Amazon SWF service
     *        limits, see: Amazon SWF Service
     *        Limits in the Amazon SWF Developer Guide.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public RegisterDomainRequest withWorkflowExecutionRetentionPeriodInDays(String workflowExecutionRetentionPeriodInDays) {
        setWorkflowExecutionRetentionPeriodInDays(workflowExecutionRetentionPeriodInDays);
        return this;
    }

    /**
     * Returns a string representation of this object; useful for testing and debugging.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getName() != null)
            sb.append("Name: ").append(getName()).append(",");
        if (getDescription() != null)
            sb.append("Description: ").append(getDescription()).append(",");
        if (getWorkflowExecutionRetentionPeriodInDays() != null)
            sb.append("WorkflowExecutionRetentionPeriodInDays: ").append(getWorkflowExecutionRetentionPeriodInDays());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof RegisterDomainRequest == false)
            return false;
        RegisterDomainRequest other = (RegisterDomainRequest) obj;
        if (other.getName() == null ^ this.getName() == null)
            return false;
        if (other.getName() != null && other.getName().equals(this.getName()) == false)
            return false;
        if (other.getDescription() == null ^ this.getDescription() == null)
            return false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
            return false;
        if (other.getWorkflowExecutionRetentionPeriodInDays() == null ^ this.getWorkflowExecutionRetentionPeriodInDays() == null)
            return false;
        if (other.getWorkflowExecutionRetentionPeriodInDays() != null
                && other.getWorkflowExecutionRetentionPeriodInDays().equals(this.getWorkflowExecutionRetentionPeriodInDays()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
        hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
        hashCode = prime * hashCode + ((getWorkflowExecutionRetentionPeriodInDays() == null) ? 0 : getWorkflowExecutionRetentionPeriodInDays().hashCode());
        return hashCode;
    }

    @Override
    public RegisterDomainRequest clone() {
        return (RegisterDomainRequest) super.clone();
    }

}


text:
package google

import (
	"fmt"
	"log"

	"github.com/hashicorp/terraform/helper/schema"
	"google.golang.org/api/compute/v1"
	"google.golang.org/api/googleapi"
)

func resourceComputeDisk() *schema.Resource {
	return &schema.Resource{
		Create: resourceComputeDiskCreate,
		Read:   resourceComputeDiskRead,
		Delete: resourceComputeDiskDelete,

		Schema: map[string]*schema.Schema{
			"name": &schema.Schema{
				Type:     schema.TypeString,
				Required: true,
				ForceNew: true,
			},

			"zone": &schema.Schema{
				Type:     schema.TypeString,
				Required: true,
				ForceNew: true,
			},

			"disk_encryption_key_raw": &schema.Schema{
				Type:      schema.TypeString,
				Optional:  true,
				ForceNew:  true,
				Sensitive: true,
			},

			"disk_encryption_key_sha256": &schema.Schema{
				Type:     schema.TypeString,
				Computed: true,
			},

			"image": &schema.Schema{
				Type:     schema.TypeString,
				Optional: true,
				ForceNew: true,
			},

			"project": &schema.Schema{
				Type:     schema.TypeString,
				Optional: true,
				ForceNew: true,
			},

			"size": &schema.Schema{
				Type:     schema.TypeInt,
				Optional: true,
				ForceNew: true,
			},

			"self_link": &schema.Schema{
				Type:     schema.TypeString,
				Computed: true,
			},

			"snapshot": &schema.Schema{
				Type:     schema.TypeString,
				Optional: true,
				ForceNew: true,
			},

			"type": &schema.Schema{
				Type:     schema.TypeString,
				Optional: true,
				ForceNew: true,
			},
		},
	}
}

func resourceComputeDiskCreate(d *schema.ResourceData, meta interface{}) error {
	config := meta.(*Config)

	project, err := getProject(d, config)
	if err != nil {
		return err
	}

	// Get the zone
	log.Printf("[DEBUG] Loading zone: %s", d.Get("zone").(string))
	zone, err := config.clientCompute.Zones.Get(
		project, d.Get("zone").(string)).Do()
	if err != nil {
		return fmt.Errorf(
			"Error loading zone '%s': %s", d.Get("zone").(string), err)
	}

	// Build the disk parameter
	disk := &compute.Disk{
		Name:   d.Get("name").(string),
		SizeGb: int64(d.Get("size").(int)),
	}

	// If we were given a source image, load that.
	if v, ok := d.GetOk("image"); ok {
		log.Printf("[DEBUG] Resolving image name: %s", v.(string))
		imageUrl, err := resolveImage(config, v.(string))
		if err != nil {
			return fmt.Errorf(
				"Error resolving image name '%s': %s",
				v.(string), err)
		}

		disk.SourceImage = imageUrl
		log.Printf("[DEBUG] Image name resolved to: %s", imageUrl)
	}

	if v, ok := d.GetOk("type"); ok {
		log.Printf("[DEBUG] Loading disk type: %s", v.(string))
		diskType, err := readDiskType(config, zone, v.(string))
		if err != nil {
			return fmt.Errorf(
				"Error loading disk type '%s': %s",
				v.(string), err)
		}

		disk.Type = diskType.SelfLink
	}

	if v, ok := d.GetOk("snapshot"); ok {
		snapshotName := v.(string)
		log.Printf("[DEBUG] Loading snapshot: %s", snapshotName)
		snapshotData, err := config.clientCompute.Snapshots.Get(
			project, snapshotName).Do()

		if err != nil {
			return fmt.Errorf(
				"Error loading snapshot '%s': %s",
				snapshotName, err)
		}

		disk.SourceSnapshot = snapshotData.SelfLink
	}

	if v, ok := d.GetOk("disk_encryption_key_raw"); ok {
		disk.DiskEncryptionKey = &compute.CustomerEncryptionKey{}
		disk.DiskEncryptionKey.RawKey = v.(string)
	}

	op, err := config.clientCompute.Disks.Insert(
		project, d.Get("zone").(string), disk).Do()
	if err != nil {
		return fmt.Errorf("Error creating disk: %s", err)
	}

	// It probably maybe worked, so store the ID now
	d.SetId(disk.Name)

	err = computeOperationWaitZone(config, op, project, d.Get("zone").(string), "Creating Disk")
	if err != nil {
		return err
	}
	return resourceComputeDiskRead(d, meta)
}

func resourceComputeDiskRead(d *schema.ResourceData, meta interface{}) error {
	config := meta.(*Config)

	project, err := getProject(d, config)
	if err != nil {
		return err
	}

	disk, err := config.clientCompute.Disks.Get(
		project, d.Get("zone").(string), d.Id()).Do()
	if err != nil {
		if gerr, ok := err.(*googleapi.Error); ok && gerr.Code == 404 {
			log.Printf("[WARN] Removing Disk %q because it's gone", d.Get("name").(string))
			// The resource doesn't exist anymore
			d.SetId("")

			return nil
		}

		return fmt.Errorf("Error reading disk: %s", err)
	}

	d.Set("self_link", disk.SelfLink)
	if disk.DiskEncryptionKey != nil && disk.DiskEncryptionKey.Sha256 != "" {
		d.Set("disk_encryption_key_sha256", disk.DiskEncryptionKey.Sha256)
	}

	return nil
}

func resourceComputeDiskDelete(d *schema.ResourceData, meta interface{}) error {
	config := meta.(*Config)

	project, err := getProject(d, config)
	if err != nil {
		return err
	}

	// Delete the disk
	op, err := config.clientCompute.Disks.Delete(
		project, d.Get("zone").(string), d.Id()).Do()
	if err != nil {
		if gerr, ok := err.(*googleapi.Error); ok && gerr.Code == 404 {
			log.Printf("[WARN] Removing Disk %q because it's gone", d.Get("name").(string))
			// The resource doesn't exist anymore
			d.SetId("")
			return nil
		}
		return fmt.Errorf("Error deleting disk: %s", err)
	}

	zone := d.Get("zone").(string)
	err = computeOperationWaitZone(config, op, project, zone, "Deleting Disk")
	if err != nil {
		return err
	}

	d.SetId("")
	return nil
}


text:
/**
 * @name public.register
 * @param {object} Angular module with dependencies
 **/

(function() {

    angular
        .module('public')
        .controller('public.register.controller', RegisterController)
        .config(['$routeProvider',
            function($routeProvider) {
                $routeProvider
                    .when('/register', {
                        templateUrl: '/partials/public/auth/register.html',
                        controller: 'public.register.controller'
                    });
            }
        ]);

    /* @ngInject */
    function RegisterController($scope, apiService, $window, authService, $timeout, notificationService) {

        $scope.user = {};
        $scope.register = register;

        /**
         * Submits the register form data
         */
        function register(valid, user) {

            $scope.errors = null;

            if (valid) {
                apiService.post('register', null, user).then(function(data) {
                    if (data) {
                        authService.authenticate(data);
                        $window.location = '/portal#/';
                    } else {
                        notificationService.set('Incorrect username or password', 'error');
                    }

                }, function(err) {
                    notificationService.set('Incorrect username or password', 'error');
                });
            }

        }
    }

}());


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

<title>All Classes</title>
<meta name="date" content="2015-03-07">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

All Classes

And

ArcTangent

Ask

Backward

ClearScreen

ClearStamp

Cosine

Difference

DoTimes

Equal

For

Forward

GreaterThan

Heading

HideTurtle

Home

ID

If

IfElse

IsPenDown

IsShowing

Left

LessThan

MakeUserInstruction

MakeVariable

Minus

NaturalLog

Not

NotEqual

Or

PenColor

PenDown

PenUp

Pi

Power

Product

Quotient

Random

Remainder

Repeat

Right

SetBackground

SetHeading

SetPallet

SetPenColor

SetPenSize

SetPosition

SetShape

SetTowards

Shape

ShowTurtle

Sine

Stamp

Sum

Tangent

Tell

Turtles

XCoordinate

YCoordinate


text:
<!DOCTYPE html>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>patchwork-model-builder</title>

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

Model Builder

				<form id="properties">

								#

								Property Attributes

								Property Type

								Property Name

								JSON keypath

								DB Column Name

							1

							<input type="text" name='name[]'  placeholder='Name' class="form-control"/>

							<input type="text" name='mail0' placeholder='Mail' class="form-control"/>

							<input type="text" name='mobile0' placeholder='Mobile' class="form-control"/>

							<input type="text" name='mobile0' placeholder='Mobile' class="form-control"/>

							<input type="text" name='mobile0' placeholder='Mobile' class="form-control"/>

				</form>

		Add Row
		Build
		Delete Row


text:
import {Component} from 'angular2/core';

@Component({
    selector: 'home',
    templateUrl: './home/components/home.html',
    styleUrls: ['./home/components/home.css']
})
export class HomeCmp  {
    game: Phaser.Game;
    textValue: Phaser.Text;
    load: any;
    // titleScreenImage: any;
    img: Phaser.Image;
    constructor() {
        this.game = new Phaser.Game (500, 500, Phaser.AUTO, 'content', {
            create: this.create,
            preload: this.preload,
            update: this.update
        });
        // this.load.image('phaser-logo', '/phaser-logo.png');
        // var img = this.add.sprite(this.game.world.centerX, this.game.world.centerY, 'phaser-logo.png');
        // img.anchor.x = 0.5;
        // img.anchor.y = 0.5;
    }

    preload() {
        this.game.load.image('phaser-logo', 'phaser-logo.png');
    };
    create() {
        this.img = this.game.add.sprite(this.game.world.centerX, this.game.world.centerY, 'phaser-logo');
        this.img.anchor.x = 0.5;
        this.img.anchor.y = 0.5;
        this.img.angle = 45;
    };

    update() {
        this.img.angle += 0.1;
    }

}


text:
@interface ToggleTerritoryStatisticsCommand : CommandBase <AsynchronousCommand>
{
}

@end


text:
import {isPresent} from 'angular2/src/facade/lang';
import {List, ListWrapper} from 'angular2/src/facade/collection';
import {ChangeDetectorRef} from './change_detector_ref';
import {ChangeDetector} from './interfaces';
import {CHECK_ALWAYS, CHECK_ONCE, CHECKED, DETACHED, ON_PUSH} from './constants';

export class AbstractChangeDetector extends ChangeDetector {
  lightDomChildren: List<any> = [];
  shadowDomChildren: List<any> = [];
  parent: ChangeDetector;
  mode: string = null;
  ref: ChangeDetectorRef;

  constructor() {
    super();
    this.ref = new ChangeDetectorRef(this);
  }

  addChild(cd: ChangeDetector): void {
    ListWrapper.push(this.lightDomChildren, cd);
    cd.parent = this;
  }

  removeChild(cd: ChangeDetector): void { ListWrapper.remove(this.lightDomChildren, cd); }

  addShadowDomChild(cd: ChangeDetector): void {
    ListWrapper.push(this.shadowDomChildren, cd);
    cd.parent = this;
  }

  removeShadowDomChild(cd: ChangeDetector): void { ListWrapper.remove(this.shadowDomChildren, cd); }

  remove(): void { this.parent.removeChild(this); }

  detectChanges(): void { this._detectChanges(false); }

  checkNoChanges(): void { this._detectChanges(true); }

  _detectChanges(throwOnChange: boolean): void {
    if (this.mode === DETACHED || this.mode === CHECKED) return;

    this.detectChangesInRecords(throwOnChange);

    this._detectChangesInLightDomChildren(throwOnChange);

    if (throwOnChange === false) this.callOnAllChangesDone();

    this._detectChangesInShadowDomChildren(throwOnChange);

    if (this.mode === CHECK_ONCE) this.mode = CHECKED;
  }

  detectChangesInRecords(throwOnChange: boolean): void {}
  callOnAllChangesDone(): void {}

  _detectChangesInLightDomChildren(throwOnChange: boolean): void {
    var c = this.lightDomChildren;
    for (var i = 0; i < c.length; ++i) {
      c[i]._detectChanges(throwOnChange);
    }
  }

  _detectChangesInShadowDomChildren(throwOnChange: boolean): void {
    var c = this.shadowDomChildren;
    for (var i = 0; i < c.length; ++i) {
      c[i]._detectChanges(throwOnChange);
    }
  }

  markAsCheckOnce(): void { this.mode = CHECK_ONCE; }

  markPathToRootAsCheckOnce(): void {
    var c: ChangeDetector = this;
    while (isPresent(c) && c.mode != DETACHED) {
      if (c.mode === CHECKED) c.mode = CHECK_ONCE;
      c = c.parent;
    }
  }
}


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Mycol. Pap. 129: 14 (1972)

#### Original name
Diplococcium asperum Piroz., 1972

### Remarks
null