text:
<?php

namespace Vend\Statsd;

/**
 * Metric interface
 */
interface MetricInterface
{
    /**
     * @param string $key
     * @param mixed  $value
     * @param string $type
     */
    public function __construct($key, $value, $type);

    /**
     * @param string $key
     * @return void
     */
    public function setKey($key);

    /**
     * @param mixed $value
     * @return void
     */
    public function setValue($value);

    /**
     * @param string $type
     * @return void
     */
    public function setType($type);

    /**
     * @param float $sampleRate
     * @return void
     */
    public function setSampleRate($sampleRate);

    /**
     * Returns the string to use when sending the metric over the wire
     *
     * @return string
     */
    public function getData();
}


text:
package org.duracloud.mill.ltp.storagestats;

import org.duracloud.mill.ltp.Morsel;

/**
 * @author Daniel Bernstein
 * Date: Feb 29, 2016
 */
public class StorageStatsMorsel extends Morsel {
    private String storeId;
    private String storageProviderType;

    public StorageStatsMorsel() {
        super();
    }

    /**
     * @param account
     * @param storeId
     * @param storageProviderType
     * @param spaceId
     */
    public StorageStatsMorsel(String account,
                              String storeId,
                              String storageProviderType,
                              String spaceId) {
        super(account, spaceId, null);
        setStoreId(storeId);
        setStorageProviderType(storageProviderType);
    }

    /**
     * @return the storageProviderType
     */
    public String getStorageProviderType() {
        return storageProviderType;
    }

    /**
     * @param storageProviderType the storageProviderType to set
     */
    public void setStorageProviderType(String storageProviderType) {
        this.storageProviderType = storageProviderType;
    }

    /**
     * @return the storeId
     */
    public String getStoreId() {
        return storeId;
    }

    /**
     * @param storeId the storeId to set
     */
    public void setStoreId(String storeId) {
        this.storeId = storeId;
    }
}

redpajama_set_name: RedPajamaGithub


text:
package mw

import (
	"database/sql"
	"errors"
	"fmt"
	"log"
	"net/http"
	"os"
	"sync"
	"testing"

	"github.com/julienschmidt/httprouter"
	"github.com/lateefj/mctest"
	_ "github.com/mattn/go-sqlite3" // sqlite3 rocks!
)

const (
	testDBUrlPath   = "/api/name/:year/:name"
	testMultiDBBase = "/tmp/testmyway"
	testMultiTable  = "test_multi_table"
)

func dbDir() string {
	path := os.Getenv("DB_DIR")
	if path == "" {
		return testMultiDBBase
	}
	return path
}

func dbFullPath(key string) string {
	return fmt.Sprintf("%s/%s.db", dbDir(), key)
}

var dbMap map[string]*sql.DB

func init() {
	dbMap = make(map[string]*sql.DB)
}

// Fun with locks
var dbMapLock sync.RWMutex

func FindDB(key string) (*sql.DB, error) {
	var err error
	dbMapLock.RLock()
	db, exists := dbMap[key]
	dbMapLock.RUnlock()
	if exists {
		log.Printf("Found databse in dbMap with key %s", key)
		return db, err
	}
	os.MkdirAll(dbDir(), 0777)
	path := dbFullPath(key)
	db, err = sql.Open("sqlite3", path)
	if err != nil {
		log.Printf("WTF on open path %s.... error: %s", path, err)
		return nil, err
	}
	log.Printf("Opened database file %s", path)
	db.SetMaxOpenConns(1) // SQLite is single threaded :(
	dbMapLock.Lock()
	dbMap[key] = db
	dbMapLock.Unlock()
	return db, err
}

type testDBConnect struct {
}

func (tdbc *testDBConnect) Open(w http.ResponseWriter, r *http.Request) (*sql.DB, error) {
	router := httprouter.New()
	router.GET(testDBUrlPath, func(w http.ResponseWriter, r *http.Request, params httprouter.Params) {
	})
	_, params, _ := router.Lookup("GET", r.URL.Path)
	year := params.ByName("year")
	log.Printf("Ok rout path is %s and year is %s", r.URL.Path, year)
	if year == "" {
		return nil, errors.New("Failed to find year in path")
	}
	db, err := FindDB(year)
	if err != nil {
		log.Printf("Failed to find database for year %s", year)
	}
	return db, err
}

var mytdbc DBConnect

func init() {
	os.MkdirAll(testMultiDBBase, 0777)

	mytdbc = &testDBConnect{}
	AssignDBConnect(mytdbc)
}

func yearTableSize(year, tName string) (int, error) {
	var size int
	db, err := FindDB(year)
	if err != nil {
		return -1, err
	}
	err = db.QueryRow(fmt.Sprintf("SELECT COUNT(*) FROM %s;", tName)).Scan(&size)
	if err != nil {
		log.Printf("Error query count %s", err)
		return -1, err
	}
	log.Printf("For year %s size is %d", year, size)
	return size, nil
}

func cleanUpYears(years []int) {
	for _, year := range years {
		os.RemoveAll(dbFullPath(fmt.Sprintf("%d", year)))
	}
}
func createTestDB(t *testing.T, year, createSQL, tName string) {
	db, err := FindDB(year)
	if err != nil {
		t.Fatal(err)
	}
	log.Printf("For database year %s running createSQL %s", year, createSQL)
	_, err = db.Exec(createSQL)
	if err != nil {
		t.Fatalf("%s\n Failed to create table %s", createSQL, err)
	}
	s, err := yearTableSize(year, tName)
	if err != nil {
		t.Fatal(err)
	}
	if s != 0 {
		t.Fatalf("Expected 0 rows in table but has %d", s)
	}
}

func TestFindDB(t *testing.T) {
	years := []int{2, 4, 8, 16}
	defer cleanUpYears(years)
	for _, year := range years {
		ys := fmt.Sprintf("%d", year)
		createTestDB(t, ys, "CREATE TABLE IF NOT EXISTS test_table(year INT, i INT);", "test_table")
		db, err := FindDB(ys)
		if err != nil {
			t.Error(err)
		}
		for i := 0; i < year; i++ {
			_, err = db.Exec(fmt.Sprintf("INSERT INTO test_table VALUES(%d, %d)", year, i))
			if err != nil {
				t.Error(err)
			}
		}
	}
	for _, year := range years {
		ys := fmt.Sprintf("%d", year)
		size, err := yearTableSize(ys, "test_table")
		if err != nil {
			t.Error(err)
		}
		if year != size {
			t.Errorf("Expected size of %d but it is %d", year, size)
		}
	}
}

func TestMultiTxHandler(t *testing.T) {
	y := 1970
	year := fmt.Sprintf("%d", y)
	createSQL := fmt.Sprintf("CREATE TABLE IF NOT EXISTS %s(year INT, x INT);", testMultiTable)
	createTestDB(t, year, createSQL, testMultiTable)
	//defer cleanUpYears([]int{y})
	req, _ := http.NewRequest("GET", fmt.Sprintf("/api/name/%s/Epic", year), nil)
	resp := mctest.NewMockTestResponse(t)
	MultiTxHandler(func(tx *sql.Tx, w http.ResponseWriter, r *http.Request) error {
		log.Printf("Calling insert now...")
		sql := fmt.Sprintf("INSERT INTO %s VALUES(%d, 1);", testMultiTable, y)
		_, err := tx.Exec(sql)
		if err != nil {
			t.Fatalf("Insert failure error: %s \n%s", err, sql)
		}
		return err
	})(resp, req)
	s, err := yearTableSize(year, testMultiTable)
	if err != nil {
		t.Fatal(err)
	}
	if s != 1 {
		t.Fatalf("Expected 1 row in table but has %d", s)
	}
	MultiTxHandler(func(tx *sql.Tx, w http.ResponseWriter, r *http.Request) error {
		_, err := tx.Exec(fmt.Sprintf("INSERT INTO %s VALUES(1, 1);", testMultiTable))
		if err != nil {
			t.Errorf("Failed to exec %s", err)
		}
		return errors.New("Failed expect automagic rollback please")
	})(resp, req)
	// Should be same number of rows
	s, err = yearTableSize(year, testMultiTable)
	if err != nil {
		t.Fatal(err)
	}
	if s != 1 {
		t.Fatalf("Expected 1 row in table but has %d", s)
	}
}


text:
using ForgedSoftware.Measurement.Entities;

namespace ForgedSoftware.Measurement.Comparers {

	public class PrefixComparer : EntityComparer<Prefix> {

		public static PrefixComparer Comparer { get; private set; }

		static PrefixComparer() {
			Comparer = new PrefixComparer();
		}

		internal override int CalculatePoints(Prefix val) {
			int points = 0;
			if (val.Type != PrefixType.SiUnofficial) {
				points += 1000;
			}
			if (!val.IsRare) {
				points += 100;
			}
			if (val.Type != PrefixType.SiBinary) {
				points += 10;
			}
			return points;
		}
	}
}


text:
<!DOCTYPE html>

{% load static%}

		<title>Rango</title>

		{% if user.is_authenticated %}

Rango says...hello {{ user.username }}

		{% else %}

Rango says...hello world!

		{% endif %}

		{% if categories %}

				{% for category in categories %}

{{ category.name }}

				{% endfor %}

		{% else %}
		No categories present.
		{% endif %}
		About Page

		Add a new category

{% if user.is_authenticated %}
	Restricted Page

	Logout

{% else %}
	Register Here

	Login
{% endif %}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
More Florida Lichens (New York), Incl. 10 Cent Tour Pyrenol. 67 (1995)

#### Original name
Verrucaria antecellens Nyl.

### Remarks
null


text:
#include "tensorflow/core/lib/io/table.h"

#include "tensorflow/core/lib/core/coding.h"
#include "tensorflow/core/lib/core/errors.h"
#include "tensorflow/core/lib/io/block.h"
#include "tensorflow/core/lib/io/cache.h"
#include "tensorflow/core/lib/io/format.h"
#include "tensorflow/core/lib/io/table_options.h"
#include "tensorflow/core/lib/io/two_level_iterator.h"
#include "tensorflow/core/platform/env.h"

namespace tensorflow {
namespace table {

struct Table::Rep {
  ~Rep() { delete index_block; }

  Options options;
  Status status;
  RandomAccessFile* file;
  uint64 cache_id;

  BlockHandle metaindex_handle;  // Handle to metaindex_block: saved from footer
  Block* index_block;
};

Status Table::Open(const Options& options, RandomAccessFile* file, uint64 size,
                   Table** table) {
  *table = nullptr;
  if (size < Footer::kEncodedLength) {
    return errors::DataLoss("file is too short to be an sstable");
  }

  char footer_space[Footer::kEncodedLength];
  StringPiece footer_input;
  Status s = file->Read(size - Footer::kEncodedLength, Footer::kEncodedLength,
                        &footer_input, footer_space);
  if (!s.ok()) return s;

  Footer footer;
  s = footer.DecodeFrom(&footer_input);
  if (!s.ok()) return s;

  // Read the index block
  BlockContents contents;
  Block* index_block = nullptr;
  if (s.ok()) {
    s = ReadBlock(file, footer.index_handle(), &contents);
  }

  if (s.ok()) {
    // We've successfully read the footer and the index block: we're
    // ready to serve requests.
    index_block = new Block(contents);
    Rep* rep = new Table::Rep;
    rep->options = options;
    rep->file = file;
    rep->metaindex_handle = footer.metaindex_handle();
    rep->index_block = index_block;
    rep->cache_id = (options.block_cache ? options.block_cache->NewId() : 0);
    *table = new Table(rep);
  } else {
    if (index_block) delete index_block;
  }

  return s;
}

Table::~Table() { delete rep_; }

static void DeleteBlock(void* arg, void* ignored) {
  delete reinterpret_cast<Block*>(arg);
}

static void DeleteCachedBlock(const absl::string_view&, void* value) {
  Block* block = reinterpret_cast<Block*>(value);
  delete block;
}

static void ReleaseBlock(void* arg, void* h) {
  Cache* cache = reinterpret_cast<Cache*>(arg);
  Cache::Handle* handle = reinterpret_cast<Cache::Handle*>(h);
  cache->Release(handle);
}

// Convert an index iterator value (i.e., an encoded BlockHandle)
// into an iterator over the contents of the corresponding block.
Iterator* Table::BlockReader(void* arg, const StringPiece& index_value) {
  Table* table = reinterpret_cast<Table*>(arg);
  Cache* block_cache = table->rep_->options.block_cache;
  Block* block = nullptr;
  Cache::Handle* cache_handle = nullptr;

  BlockHandle handle;
  StringPiece input = index_value;
  Status s = handle.DecodeFrom(&input);
  // We intentionally allow extra stuff in index_value so that we
  // can add more features in the future.

  if (s.ok()) {
    BlockContents contents;
    if (block_cache != nullptr) {
      char cache_key_buffer[16];
      core::EncodeFixed64(cache_key_buffer, table->rep_->cache_id);
      core::EncodeFixed64(cache_key_buffer + 8, handle.offset());
      absl::string_view key(cache_key_buffer, sizeof(cache_key_buffer));
      cache_handle = block_cache->Lookup(key);
      if (cache_handle != nullptr) {
        block = reinterpret_cast<Block*>(block_cache->Value(cache_handle));
      } else {
        s = ReadBlock(table->rep_->file, handle, &contents);
        if (s.ok()) {
          block = new Block(contents);
          cache_handle = block_cache->Insert(key, block, block->size(),
                                             &DeleteCachedBlock);
        }
      }
    } else {
      s = ReadBlock(table->rep_->file, handle, &contents);
      if (s.ok()) {
        block = new Block(contents);
      }
    }
  }

  Iterator* iter;
  if (block != nullptr) {
    iter = block->NewIterator();
    if (cache_handle == nullptr) {
      iter->RegisterCleanup(&DeleteBlock, block, nullptr);
    } else {
      iter->RegisterCleanup(&ReleaseBlock, block_cache, cache_handle);
    }
  } else {
    iter = NewErrorIterator(s);
  }
  return iter;
}

Iterator* Table::NewIterator() const {
  return NewTwoLevelIterator(rep_->index_block->NewIterator(),
                             &Table::BlockReader, const_cast<Table*>(this));
}

Status Table::InternalGet(const StringPiece& k, void* arg,
                          void (*saver)(void*, const StringPiece&,
                                        const StringPiece&)) {
  Status s;
  Iterator* iiter = rep_->index_block->NewIterator();
  iiter->Seek(k);
  if (iiter->Valid()) {
    Iterator* block_iter = BlockReader(this, iiter->value());
    block_iter->Seek(k);
    if (block_iter->Valid()) {
      (*saver)(arg, block_iter->key(), block_iter->value());
    }
    s = block_iter->status();
    delete block_iter;
  }
  if (s.ok()) {
    s = iiter->status();
  }
  delete iiter;
  return s;
}

uint64 Table::ApproximateOffsetOf(const StringPiece& key) const {
  Iterator* index_iter = rep_->index_block->NewIterator();
  index_iter->Seek(key);
  uint64 result;
  if (index_iter->Valid()) {
    BlockHandle handle;
    StringPiece input = index_iter->value();
    Status s = handle.DecodeFrom(&input);
    if (s.ok()) {
      result = handle.offset();
    } else {
      // Strange: we can't decode the block handle in the index block.
      // We'll just return the offset of the metaindex block, which is
      // close to the whole file size for this case.
      result = rep_->metaindex_handle.offset();
    }
  } else {
    // key is past the last key in the file.  Approximate the offset
    // by returning the offset of the metaindex block (which is
    // right near the end of the file).
    result = rep_->metaindex_handle.offset();
  }
  delete index_iter;
  return result;
}

}  // namespace table
}  // namespace tensorflow


text:
/**
**  @file Nav.h
*/
/*
**  Copyright (c) 2014, GCBLUE PROJECT
**  All rights reserved.
**
**  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
**
**  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
**
**  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the
**     documentation and/or other materials provided with the distribution.
**
**  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from
**     this software without specific prior written permission.
**
**  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
**  NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
**  COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
**  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
**  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
**  IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef _NAV_H_
#define _NAV_H_

#if _MSC_VER > 1000
#pragma once
#endif

#include "ai/Task.h"
#include "ai/Route.h"

#include <map>
#include <string>
#include <vector>
#include "simmath.h"

class tcPlatformObject;
class GeoPoint;

class tcStream;
class tcCommandStream;
class tcCreateStream;
class tcUpdateStream;
class tcGameStream;

namespace ai
{

/**
* Basic navigation with waypoints
*/
class Nav : public Task, public Route
{
public:
    void AddWaypoint(double lon_rad, double lat_rad, float alt_m, float speed_kts);
    void ClearWaypoints();
    void DeleteWaypoint(size_t idx);
	void EditWaypoint(size_t idx, double lon_rad, double lat_rad, float alt_m, float speed_kts);
    void EditWaypointReference(size_t idx, unsigned char referenceMode, long referencePlatform);
    void InsertWaypoint(size_t idx, double lon_rad, double lat_rad, float alt_m, float speed_kts);

    void SetRoute(const Route* route); ///< set to match another route

    void AddTasksForCurrentWaypoint();

    void Update(double t);

    virtual tcCommandStream& operator<<(tcCommandStream& stream);
    virtual tcCommandStream& operator>>(tcCommandStream& stream);

    virtual tcGameStream& operator<<(tcGameStream& stream);
	virtual tcGameStream& operator>>(tcGameStream& stream);

    Nav(tcPlatformObject* platform_, Blackboard* bb,
        long id_, double priority_, int attributes_, const std::string& taskName_);
    ~Nav();

private:

};

}

#endif


text:
<?php

namespace humhub\modules\content\components;

use humhub\libs\ProfileBannerImage;
use humhub\libs\ProfileImage;
use humhub\modules\user\models\User;
use humhub\components\ActiveRecord;
use humhub\modules\content\models\ContentContainer;
use humhub\modules\content\models\Wall;

/**
 * ContentContainerActiveRecord for ContentContainer Models e.g. Space or User.
 *
 * Required Attributes:
 *      - wall_id
 *      - guid
 *
 * Required Methods:
 *      - getProfileImage()
 *      - getUrl()
 *
 * @since 1.0
 * @author Luke
 */
class ContentContainerActiveRecord extends ActiveRecord
{

    /**
     * @var ContentContainerPermissionManager
     */
    protected $permissionManager = null;

    /**
     * Returns the Profile Image Object for this Content Base
     *
     * @return ProfileImage
     */
    public function getProfileImage()
    {
        if ($this instanceof \humhub\modules\space\models\Space) {
            return new ProfileImage($this->guid, 'default_space');
        }
        return new ProfileImage($this->guid);
    }

    /**
     * Returns the Profile Banner Image Object for this Content Base
     *
     * @return ProfileBannerImage
     */
    public function getProfileBannerImage()
    {
        return new ProfileBannerImage($this->guid);
    }

    /**
     * Should be overwritten by implementation
     */
    public function getUrl()
    {
        return $this->createUrl();
    }

    /**
     * Creates url in content container scope.
     * E.g. add uguid or sguid parameter to parameters.
     *
     * @param string $route
     * @param array $params
     * @param boolean|string $scheme
     */
    public function createUrl($route = null, $params = array(), $scheme = false)
    {
        return "";
    }

    /**
     * Returns the display name of content container
     *
     * @since 0.11.0
     * @return string
     */
    public function getDisplayName()
    {
        return "Container: " . get_class($this) . " - " . $this->getPrimaryKey();
    }

    /**
     * Checks if the user is allowed to access private content in this container
     *
     * @param User $user
     * @return boolean can access private content
     */
    public function canAccessPrivateContent(User $user = null)
    {
        return false;
    }

    /**
     * Returns the wall output for this content container.
     * This is e.g. used in search results.
     *
     * @return string
     */
    public function getWallOut()
    {
        return "Default Wall Output for Class " . get_class($this);
    }

    public static function findByGuid($token)
    {
        return static::findOne(['guid' => $token]);
    }

    /**
     * @inheritdoc
     */
    public function afterSave($insert, $changedAttributes)
    {
        if ($insert) {

            $wall = new Wall();
            $wall->object_model = $this->className();
            $wall->object_id = $this->id;
            $wall->save();
            $this->wall_id = $wall->id;
            $this->update(false, ['wall_id']);

            $contentContainer = new ContentContainer;
            $contentContainer->guid = $this->guid;
            $contentContainer->class = $this->className();
            $contentContainer->pk = $this->getPrimaryKey();
            $contentContainer->wall_id = $this->wall_id;
            if ($this instanceof User) {
                $contentContainer->owner_user_id = $this->id;
            } elseif ($this->hasAttribute('created_by')) {
                $contentContainer->owner_user_id = $this->created_by;
            }

            $contentContainer->save();

            $this->contentcontainer_id = $contentContainer->id;
            $this->update(false, ['contentcontainer_id']);
        }

        parent::afterSave($insert, $changedAttributes);
    }

    /**
     * @inheritdoc
     */
    public function afterDelete()
    {
        ContentContainer::deleteAll([
            'pk' => $this->getPrimaryKey(),
            'class' => $this->className()
        ]);

        parent::afterDelete();
    }

    /**
     * Returns the related ContentContainer model (e.g. Space or User)
     *
     * @see ContentContainer
     * @return \yii\db\ActiveQuery
     */
    public function getContentContainerRecord()
    {
        return $this->hasOne(ContentContainer::className(), ['pk' => 'id'])
                        ->andOnCondition(['class' => self::className()]);
    }

    /**
     * Returns the permissionManager of this container
     *
     * @return ContentContainerPermissionManager
     */
    public function getPermissionManager()
    {
        if ($this->permissionManager !== null) {
            return $this->permissionManager;
        }

        $this->permissionManager = new ContentContainerPermissionManager;
        $this->permissionManager->contentContainer = $this;
        return $this->permissionManager;
    }

    /**
     * Returns current users group
     *
     * @return string
     */
    public function getUserGroup()
    {
        return "";
    }

    /**
     * Returns user groups
     */
    public function getUserGroups()
    {
        return [];
    }

}


text:
@interface postViewVC ()<UIImagePickerControllerDelegate,UINavigationControllerDelegate>
{

    UIImagePickerController *imagePicker;
    NSMutableArray* toBeSavedImages;
    UIImage *photoImg;
    NSInteger btnPressedTag;
}

@end

@implementation postViewVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)myPhotoImgLeft:(UIButton*)sender {

//    if ([sender isEqual:self.leftCamera]) {
//        [sender setTag:1];
//        [self userChoosePhotoType];
//    }
    if (sender.tag == LEFT_BTN_TAG) {
        [self userChoosePhotoType];
        btnPressedTag = LEFT_BTN_TAG + BTN_PRESSED_TAG;
        sender.tag = btnPressedTag;

    }else if (sender.tag == RIGHT_BTN_TAG){
        [self userChoosePhotoType];
        btnPressedTag = RIGHT_BTN_TAG + BTN_PRESSED_TAG;
        sender.tag = btnPressedTag;
    }
}

- (void)userChoosePhotoType{
    UIAlertController *alertController = [UIAlertController new];
    imagePicker = [UIImagePickerController new];

    //使用相機選項
    UIAlertAction *pickCamera=[UIAlertAction actionWithTitle:@"使用相機" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
        //判斷是否有支援相機功能
        if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]){
            //使用相機拍照
            imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
            imagePicker.allowsEditing=true;
            imagePicker.delegate = self;
            [self presentViewController:imagePicker animated:YES completion:nil];
        }

    }];
    //使用相簿裡的照片
    UIAlertAction *pickPhoto=[UIAlertAction actionWithTitle:@"從相簿選擇" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
        //開啟相簿
        imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
        imagePicker.mediaTypes = @[(NSString*)kUTTypeImage];
        //只開啟照片
        imagePicker.allowsEditing=true;
        //選擇完可以做編輯
        imagePicker.delegate=self;
        [self presentViewController:imagePicker animated:true completion:nil];

    }];

    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
        //
        UIButton *pressedBtn = (UIButton*)[self.view viewWithTag:btnPressedTag];
        pressedBtn.tag = btnPressedTag - BTN_PRESSED_TAG;
    }];

    [alertController addAction:pickCamera];
    [alertController addAction:pickPhoto];
    [alertController addAction:cancelAction];

    [self presentViewController:alertController animated:YES completion:nil];

}

-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
    UIImage* editedImage=info[UIImagePickerControllerEditedImage];

    //取得照片

    //呈現剛剛在相簿中編輯過後的照片

    UIButton *pressedBtn = (UIButton*)[self.view viewWithTag:btnPressedTag];
    photoImg = editedImage;
    [pressedBtn setBackgroundImage:photoImg forState:UIControlStateNormal];
    pressedBtn.layer.cornerRadius = 10;
    pressedBtn.layer.masksToBounds = true;

    [[NSNotificationCenter defaultCenter]postNotificationName:USER_POST_PHOTO_NOTIFICATION object:photoImg];

    toBeSavedImages=[NSMutableArray arrayWithObjects:editedImage,nil];
    [self processSaveImage];
    pressedBtn.tag = btnPressedTag - BTN_PRESSED_TAG;

    [picker dismissViewControllerAnimated:true completion:nil];

}
-(void)processSaveImage{
    if (toBeSavedImages.count ==0) {
        return;
    }
    UIImage*targetImage=toBeSavedImages[0];
    //取出toBeSavedImages裏頭第一個資料
    [toBeSavedImages removeObjectAtIndex:0];
    //刪除第一個資料

    //儲存到手機的資料庫中
    NSString *documents=NSSearchPathForDirectoriesInDomains(NSDocumentationDirectory,
                                                            NSUserDomainMask, true)[0];

    NSString *fileName=[NSString stringWithFormat:@"%ld.png",(unsigned long)targetImage.hash];
    //儲存到資料庫的檔名
    //為了不讓檔名重複,利用hash, 他會依照 targetImage 的內容算出一個數字
    NSString *fileNamePath=[documents stringByAppendingPathComponent:fileName];;
    NSData *datas=UIImagePNGRepresentation(targetImage);
    [datas writeToFile:fileNamePath atomically:false];

    ALAssetsLibrary *library=[ALAssetsLibrary new];
    [library writeImageToSavedPhotosAlbum:targetImage.CGImage
                              orientation:(ALAssetOrientation)targetImage.imageOrientation
                          completionBlock:^(NSURL *assetURL, NSError *error)
     //照片儲存需要時間,所以利用^ ,等存檔後再進行之後的動作
     //orientation 存的照片的方向(直的橫的)
     {
         if (toBeSavedImages.count>0) {
             [self processSaveImage];
             return ;
         }
         NSLog(@"已存檔");
     }];

}

@end


text:
using NUnit.Framework;
using System.Threading.Tasks;

namespace SFA.DAS.CommitmentsV2.UnitTests.Services.EditValidation
{
    public class NoChangeMadeValidationTest
    {
        [Test]
        public async Task When_No_Change_IsMade()
        {
            var fixture = new EditApprenticeshipValidationServiceTestsFixture();
            fixture.SetupMockContextApprenticeship();
            var request = fixture.CreateValidationRequest();

            var result = await fixture.Validate(request);

            Assert.NotNull(result.Errors);
            Assert.AreEqual(1, result.Errors.Count);
            Assert.AreEqual("No change made: you need to amend details or cancel", result.Errors[0].ErrorMessage);
            Assert.AreEqual("ApprenticeshipId", result.Errors[0].PropertyName);
        }
    }
}


text:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
	"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
	"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
	<class name="com.bjsxt.hibernate.Student" table="t_student">
		<id name="id">
			<generator class="native"/>
		</id>
		<property name="name"/>
		<property name="createTime"/>
		<many-to-one name="classes" column="classesid"/>
		<filter name="filtertest" condition="id < :myid"/>
	</class>

	<query name="searchStudents">
		<![CDATA[
			SELECT s FROM Student s where s.id<?
		]]>
	</query>

	<filter-def name="filtertest">
		<filter-param name="myid" type="integer"/>
	</filter-def>
</hibernate-mapping>


text:
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TupleSections #-}

module Y2018.Day17 (answer1, answer2) where

import           Data.Void
import           Data.Array                     ( (!) )
import qualified Data.Array                    as A
import           Data.List
import qualified Data.Set                      as S
import           Data.Maybe
import Control.Monad

import           Text.Megaparsec
import           Text.Megaparsec.Char
import           Text.Megaparsec.Char.Lexer
import           Utils.Parser                  as U

import qualified Data.Text                     as Tx
import qualified Data.Text.IO                  as Tx.IO

type Parser = Parsec Void Tx.Text

answer1, answer2 :: IO ()
answer1 = print "wip1"
answer2 = print "wip2"

type Point = (Int, Int)
type Grid = A.Array Point Bool

flowStep :: Grid -> (S.Set Point, [Point]) -> (S.Set Point, [Point])
flowStep _ (flooded, []) = (flooded, [])
flowStep grid (flooded, s:ss)
  = case flowDown grid flooded (s .+. (0,1)) of
      [] -> (flooded, ss')
      xs@(x:_) ->
        let flooded1 = insertMany flooded xs
            (sides, sources) = flowSides grid flooded1 x
            flooded2 = insertMany flooded1 sides
         in if null sources
               then (flooded2, (x .+. (0,-1)) : ss')
               else (flooded2, ss <> sources)

  where ss' = nub ss

flowDown :: Grid -> S.Set Point -> Point -> [Point]
flowDown = go []
  where
    go acc grid flooded p
      | p `S.member` flooded = [p]
      | get grid p == Just False = go (p:acc) grid flooded (p .+. (0,1))
      | otherwise = acc

flowSides :: Grid -> S.Set Point -> Point -> ([Point], [Point])
flowSides grid flooded p =
  let (l, mbSl) = flowSide grid flooded (-1,0) p
      (r, mbSr) = flowSide grid flooded ( 1,0) p
      newFlooded = l <> r
      newSources = catMaybes [mbSl, mbSr]
   in (newFlooded, newSources)

-- | return (newly flooded points, and maybe a new 'source'
flowSide :: Grid -> S.Set Point -> Point -> Point -> ([Point], Maybe Point)
flowSide = go []
  where
    go acc grid flooded dir p =
      let x = get grid p
          r | x == Just True || isNothing x = (acc, Nothing)
            | get grid (p .+. (0,1)) == Just False
            && (p .+. (0,1)) `S.notMember` flooded = (p:acc, Just p)
            | otherwise = go (p:acc) grid flooded dir (p .+. dir)
       in r

infixr 5 .+.
(.+.) :: Point -> Point -> Point
(a, b) .+. (c, d) = (a+c, b+d)

get :: Grid -> Point -> Maybe Bool
get g (x, y) =
  let ((x0, y0), (x1, y1)) = A.bounds g
   in if (x0 <= x) && (x <= x1) && (y0 <= y) && (y <= y1)
         then Just (g ! (x,y))
         else Nothing

insertMany :: S.Set Point -> [Point] -> S.Set Point
insertMany = foldl' (flip S.insert)

prettyGrid :: Grid -> S.Set Point -> Tx.Text
prettyGrid g flooded =
  let ((minX, minY), (maxX, maxY)) = A.bounds g
      makeRow y = Tx.pack [prettyChar (x,y) | x <- [minX..maxX]]
      prettyChar p
        | p == (499,0) = '+'
        | p `S.member` flooded = '~'
        | g ! p = '#'
        | otherwise = '.'
      res = Tx.unlines [makeRow y | y <- [minY..maxY]]
  in res

getData :: IO Grid
getData = do
  raw <- Tx.IO.readFile "data/2018/day17_test.txt"
  case parse gridParser "day17" raw of
    Left err -> error $ show err
    Right x -> pure x

gridParser :: Parser Grid
gridParser = do
  points <- concat <$> U.parseLines lineParser
  let minX = minimum (fmap fst points) - 1
  let minY = 0
  let maxX = maximum (fmap fst points) + 1
  let maxY = maximum (fmap snd points)
  let b = ((minX, minY), (maxX, maxY))
  pure $ A.accumArray (\_ _ -> True) False b (fmap (,True) points)

lineParser :: Parser [Point]
lineParser = do
  a <- char 'x' <|> char 'y'
  char '='
  n <- decimal
  string ", "
  b <- char 'x' <|> char 'y'
  char '='
  i <- decimal
  string ".."
  j <- decimal
  if a == 'x'
    then pure [(n, y) | y <- [i..j]]
    else pure [(x, n) | x <- [i..j]]

test :: IO ()
test = do
  grid <- getData
  let source = (499,0)
  let allSteps = iterate (flowStep grid) (mempty, [source])

  forM_ (take 4 allSteps) $ \(flooded, sources) -> do
    Tx.IO.putStrLn $ prettyGrid grid flooded

  -- Tx.IO.putStrLn $ prettyGrid grid (S.fromList $ flowDown grid mempty (494,5))

  print "done"


text:
package compiler

import scala.collection.mutable.ListBuffer

/**
  * Created by MarioDiniz on 10/11/16.
  */
object Proof {
  def isTheorem(premises: List[String], theorem: String, callback: ((String, String, String)) => Unit): Boolean = {
    var clauses = premises.flatMap(identifyClauses)
    clauses = clauses ++ identifyClauses(Converter.toCNF(s"~($theorem)"))
    proof(clauses.sorted, callback)
  }

  private def identifyClauses(premise: String): ListBuffer[String] = {
    val clauses = ListBuffer[String]()
    for (clause <- premise.split('^')) {
      val literals = clause.replace("(", "").replace(")", "").split("v")
      clauses += literals.mkString("v")
    }
    clauses
  }

  private def proof(clauses: List[String], callback: ((String, String, String)) => Unit): Boolean = {
    var foundSolution = 0
    var negatedDescendingLiteral: String = null
    var listOfClauses = clauses.toSet

    while (foundSolution == 0) {
      var resolventClauses = ListBuffer[String]()
      val descendingIterator = listOfClauses.iterator.toList.reverseIterator
      var counterDescending = listOfClauses.size
      while (descendingIterator.hasNext && foundSolution == 0) {
        counterDescending -= 1
        val descendingClause = descendingIterator.next
        val descendingLiteralsList = descendingClause.split("v").map((s) => s.trim).toList
        val ascendingIterator = listOfClauses.iterator
        var counterAscending = -1
        while (ascendingIterator.hasNext && foundSolution == 0) {
          counterAscending += 1
          val ascendingClause = ascendingIterator.next
          if (counterDescending > counterAscending) {
            if (!descendingClause.equals(ascendingClause)) {
              val ascendingLiteralsList = ascendingClause.split("v").map((s) => s.trim).toList
              for (descendingLiteral <- descendingLiteralsList) {
                if (descendingLiteral.startsWith("~")) {
                  negatedDescendingLiteral = descendingLiteral.substring(1)
                } else {
                  negatedDescendingLiteral = s"~$descendingLiteral"
                }
                if (ascendingLiteralsList.contains(negatedDescendingLiteral)) {
                  var setResolventLiterals = Set[String]()
                  for (ascendingLiteral <- ascendingLiteralsList) {
                    if (!ascendingLiteral.equals(negatedDescendingLiteral)) {
                      setResolventLiterals += ascendingLiteral
                    }
                  }
                  for (descendingLiteralB <- descendingLiteralsList) {
                    if (!descendingLiteralB.equals(descendingLiteral)) {
                      setResolventLiterals += descendingLiteralB
                    }
                  }
                  var isFirst = true
                  var resolvent = ""

                  for (literalResolvent <- setResolventLiterals) {
                    if (!isFirst) {
                      resolvent += "v"
                    } else {
                      isFirst = false
                    }
                    resolvent += literalResolvent
                  }

                  resolventClauses += resolvent

                  if (resolvent.length == 0) {
                    foundSolution = 1

                  }
                  callback((getExpression(ascendingLiteralsList),
                    getExpression(descendingLiteralsList),
                    s"${
                      resolvent match {
                        case "" => "NULL CLAUSE"
                        case _ => s"(${resolvent.replaceAll("v", ", ")})"
                      }
                    }"))
                }
              }
            }
          }
        }
      }
      if (contains(resolventClauses.toSet, listOfClauses) && foundSolution != 1) {
        foundSolution = -1
      } else {
        listOfClauses ++= resolventClauses
      }
    }

    foundSolution match {
      case 1 => true
      case _ => false
    }
  }

  private def contains(a: Set[String], b: Set[String]) : Boolean = {
    a.map((x) => b.contains(x)).fold(true)({(x, y) => x && y })
  }

  private def getExpression(list: List[String]): String = {
    var aux = "("
    var first = true
    for (literal <- list) {
      if (!first) {
        aux += ", "
      } else {
        first = false
      }
      aux += literal
    }
    aux += ")"
    aux
  }
}


text:
package com.oath.cyclops.react.collectors.lazy;

import java.util.LinkedList;
import java.util.List;
import java.util.Optional;
import java.util.Queue;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Consumer;
import java.util.function.Predicate;

import cyclops.reactive.collections.immutable.LinkedListX;
import cyclops.reactive.collections.mutable.ListX;
import com.oath.cyclops.react.Status;
import com.oath.cyclops.util.SimpleTimer;
import com.oath.cyclops.util.ThrowsSoftened;

import lombok.AllArgsConstructor;

@AllArgsConstructor
public class Blocker<U> {

    @SuppressWarnings("rawtypes")
    private final List<CompletableFuture<?>> lastActive;
    private final Optional<Consumer<Throwable>> errorHandler;
    private final CompletableFuture<List<U>> promise = new CompletableFuture<>();

    private final SimpleTimer timer = new SimpleTimer();
    private final AtomicInteger completed = new AtomicInteger();
    private final AtomicInteger errors = new AtomicInteger();

    private final Queue<U> currentResults = new ConcurrentLinkedQueue<U>();

    @SuppressWarnings("unchecked")
    @ThrowsSoftened({ InterruptedException.class, ExecutionException.class })
    public ListX<U> block(final Predicate<Status<U>> breakout) {

        return nonBlocking(breakout).join();

    }
    public CompletableFuture<ListX<U>> nonBlocking(final Predicate<Status<U>> breakout) {

        if (lastActive.size() == 0)
            return CompletableFuture.completedFuture(ListX.empty());
        lastActive.forEach(f -> f.whenComplete((result, ex) -> {
            testBreakoutConditionsBeforeUnblockingCurrentThread(breakout, result, (Throwable) ex);
        }));

        return promise.thenApply(ListX::fromIterable);

    }

    private Status buildStatus(final Throwable ex) {
        if (ex != null) {
            errors.incrementAndGet();

        } else {
            completed.incrementAndGet();
        }

        return new Status(
                          completed.get(), errors.get(), lastActive.size(), timer.getElapsedNanoseconds(), LinkedListX.fromIterable(currentResults));

    }

    private void testBreakoutConditionsBeforeUnblockingCurrentThread(final Predicate<Status<U>> breakout, final Object result, final Throwable ex) {

        if (result != null)
            currentResults.add((U) result);

        final Status status = buildStatus(ex); //new results may be added after status object is created
        if (ex != null) {
            errorHandler.ifPresent((handler) -> handler.accept(((Exception) ex).getCause()));
        }

        if (breakoutConditionsMet(breakout, status) || allResultsReturned(status.getCompleted() + status.getErrors())) {
            promise.complete(new LinkedList<U>(
                                               currentResults));
        }
    }

    private boolean allResultsReturned(final int localComplete) {
        return localComplete == lastActive.size();
    }

    private boolean breakoutConditionsMet(final Predicate<Status<U>> breakout, final Status status) {
        return breakout.test(status);
    }

}


text:
@interface TYMEditSlideViewController : UIViewController

@end


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b52-fcs
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2013.12.20 at 12:48:21 PM GMT
//

package weka.core.pmml.jaxbbindings;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlElementRefs;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for AssociationModel element declaration.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <element name="AssociationModel">
 *   <complexType>
 *     <complexContent>
 *       <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *         <sequence>
 *           <element ref="{http://www.dmg.org/PMML-4_1}Extension" maxOccurs="unbounded" minOccurs="0"/>
 *           <element ref="{http://www.dmg.org/PMML-4_1}MiningSchema"/>
 *           <element ref="{http://www.dmg.org/PMML-4_1}Output" minOccurs="0"/>
 *           <element ref="{http://www.dmg.org/PMML-4_1}ModelStats" minOccurs="0"/>
 *           <element ref="{http://www.dmg.org/PMML-4_1}LocalTransformations" minOccurs="0"/>
 *           <element ref="{http://www.dmg.org/PMML-4_1}Item" maxOccurs="unbounded" minOccurs="0"/>
 *           <element ref="{http://www.dmg.org/PMML-4_1}Itemset" maxOccurs="unbounded" minOccurs="0"/>
 *           <element ref="{http://www.dmg.org/PMML-4_1}AssociationRule" maxOccurs="unbounded" minOccurs="0"/>
 *           <element ref="{http://www.dmg.org/PMML-4_1}ModelVerification" minOccurs="0"/>
 *           <element ref="{http://www.dmg.org/PMML-4_1}Extension" maxOccurs="unbounded" minOccurs="0"/>
 *         </sequence>
 *         <attribute name="algorithmName" type="{http://www.w3.org/2001/XMLSchema}string" />
 *         <attribute name="avgNumberOfItemsPerTA" type="{http://www.dmg.org/PMML-4_1}REAL-NUMBER" />
 *         <attribute name="functionName" use="required" type="{http://www.dmg.org/PMML-4_1}MINING-FUNCTION" />
 *         <attribute name="isScorable" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
 *         <attribute name="lengthLimit" type="{http://www.dmg.org/PMML-4_1}INT-NUMBER" />
 *         <attribute name="maxNumberOfItemsPerTA" type="{http://www.dmg.org/PMML-4_1}INT-NUMBER" />
 *         <attribute name="minimumConfidence" use="required" type="{http://www.dmg.org/PMML-4_1}PROB-NUMBER" />
 *         <attribute name="minimumSupport" use="required" type="{http://www.dmg.org/PMML-4_1}PROB-NUMBER" />
 *         <attribute name="modelName" type="{http://www.w3.org/2001/XMLSchema}string" />
 *         <attribute name="numberOfItems" use="required" type="{http://www.dmg.org/PMML-4_1}INT-NUMBER" />
 *         <attribute name="numberOfItemsets" use="required" type="{http://www.dmg.org/PMML-4_1}INT-NUMBER" />
 *         <attribute name="numberOfRules" use="required" type="{http://www.dmg.org/PMML-4_1}INT-NUMBER" />
 *         <attribute name="numberOfTransactions" use="required" type="{http://www.dmg.org/PMML-4_1}INT-NUMBER" />
 *       </restriction>
 *     </complexContent>
 *   </complexType>
 * </element>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "content"
})
@XmlRootElement(name = "AssociationModel")
public class AssociationModel {

    @XmlElementRefs({
        @XmlElementRef(name = "ModelStats", namespace = "http://www.dmg.org/PMML-4_1", type = ModelStats.class),
        @XmlElementRef(name = "Output", namespace = "http://www.dmg.org/PMML-4_1", type = Output.class),
        @XmlElementRef(name = "AssociationRule", namespace = "http://www.dmg.org/PMML-4_1", type = AssociationRule.class),
        @XmlElementRef(name = "LocalTransformations", namespace = "http://www.dmg.org/PMML-4_1", type = LocalTransformations.class),
        @XmlElementRef(name = "MiningSchema", namespace = "http://www.dmg.org/PMML-4_1", type = MiningSchema.class),
        @XmlElementRef(name = "Itemset", namespace = "http://www.dmg.org/PMML-4_1", type = Itemset.class),
        @XmlElementRef(name = "ModelVerification", namespace = "http://www.dmg.org/PMML-4_1", type = ModelVerification.class),
        @XmlElementRef(name = "Item", namespace = "http://www.dmg.org/PMML-4_1", type = Item.class),
        @XmlElementRef(name = "Extension", namespace = "http://www.dmg.org/PMML-4_1", type = Extension.class)
    })
    protected List<Object> content;
    @XmlAttribute
    protected String algorithmName;
    @XmlAttribute
    protected Double avgNumberOfItemsPerTA;
    @XmlAttribute(required = true)
    protected MININGFUNCTION functionName;
    @XmlAttribute
    protected Boolean isScorable;
    @XmlAttribute
    protected BigInteger lengthLimit;
    @XmlAttribute
    protected BigInteger maxNumberOfItemsPerTA;
    @XmlAttribute(required = true)
    protected BigDecimal minimumConfidence;
    @XmlAttribute(required = true)
    protected BigDecimal minimumSupport;
    @XmlAttribute
    protected String modelName;
    @XmlAttribute(required = true)
    protected BigInteger numberOfItems;
    @XmlAttribute(required = true)
    protected BigInteger numberOfItemsets;
    @XmlAttribute(required = true)
    protected BigInteger numberOfRules;
    @XmlAttribute(required = true)
    protected BigInteger numberOfTransactions;

    /**
     * Gets the rest of the content model.
     *
     *

     * You are getting this "catch-all" property because of the following reason:
     * The field name "Extension" is used by two different parts of a schema. See:
     * line 703 of file:/home/david/workspace/weka/pmml-4-1.xsd
     * line 694 of file:/home/david/workspace/weka/pmml-4-1.xsd
     *

     * To get rid of this property, apply a property customization to one
     * of both of the following declarations to change their names:
     * Gets the value of the content property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the content property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getContent().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link ModelStats }
     * {@link Output }
     * {@link AssociationRule }
     * {@link LocalTransformations }
     * {@link Itemset }
     * {@link MiningSchema }
     * {@link ModelVerification }
     * {@link Extension }
     * {@link Item }
     *
     *
     */
    public List<Object> getContent() {
        if (content == null) {
            content = new ArrayList<Object>();
        }
        return this.content;
    }

    /**
     * Gets the value of the algorithmName property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getAlgorithmName() {
        return algorithmName;
    }

    /**
     * Sets the value of the algorithmName property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setAlgorithmName(String value) {
        this.algorithmName = value;
    }

    /**
     * Gets the value of the avgNumberOfItemsPerTA property.
     *
     * @return
     *     possible object is
     *     {@link Double }
     *
     */
    public Double getAvgNumberOfItemsPerTA() {
        return avgNumberOfItemsPerTA;
    }

    /**
     * Sets the value of the avgNumberOfItemsPerTA property.
     *
     * @param value
     *     allowed object is
     *     {@link Double }
     *
     */
    public void setAvgNumberOfItemsPerTA(Double value) {
        this.avgNumberOfItemsPerTA = value;
    }

    /**
     * Gets the value of the functionName property.
     *
     * @return
     *     possible object is
     *     {@link MININGFUNCTION }
     *
     */
    public MININGFUNCTION getFunctionName() {
        return functionName;
    }

    /**
     * Sets the value of the functionName property.
     *
     * @param value
     *     allowed object is
     *     {@link MININGFUNCTION }
     *
     */
    public void setFunctionName(MININGFUNCTION value) {
        this.functionName = value;
    }

    /**
     * Gets the value of the isScorable property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *
     */
    public boolean isIsScorable() {
        if (isScorable == null) {
            return true;
        } else {
            return isScorable;
        }
    }

    /**
     * Sets the value of the isScorable property.
     *
     * @param value
     *     allowed object is
     *     {@link Boolean }
     *
     */
    public void setIsScorable(Boolean value) {
        this.isScorable = value;
    }

    /**
     * Gets the value of the lengthLimit property.
     *
     * @return
     *     possible object is
     *     {@link BigInteger }
     *
     */
    public BigInteger getLengthLimit() {
        return lengthLimit;
    }

    /**
     * Sets the value of the lengthLimit property.
     *
     * @param value
     *     allowed object is
     *     {@link BigInteger }
     *
     */
    public void setLengthLimit(BigInteger value) {
        this.lengthLimit = value;
    }

    /**
     * Gets the value of the maxNumberOfItemsPerTA property.
     *
     * @return
     *     possible object is
     *     {@link BigInteger }
     *
     */
    public BigInteger getMaxNumberOfItemsPerTA() {
        return maxNumberOfItemsPerTA;
    }

    /**
     * Sets the value of the maxNumberOfItemsPerTA property.
     *
     * @param value
     *     allowed object is
     *     {@link BigInteger }
     *
     */
    public void setMaxNumberOfItemsPerTA(BigInteger value) {
        this.maxNumberOfItemsPerTA = value;
    }

    /**
     * Gets the value of the minimumConfidence property.
     *
     * @return
     *     possible object is
     *     {@link BigDecimal }
     *
     */
    public BigDecimal getMinimumConfidence() {
        return minimumConfidence;
    }

    /**
     * Sets the value of the minimumConfidence property.
     *
     * @param value
     *     allowed object is
     *     {@link BigDecimal }
     *
     */
    public void setMinimumConfidence(BigDecimal value) {
        this.minimumConfidence = value;
    }

    /**
     * Gets the value of the minimumSupport property.
     *
     * @return
     *     possible object is
     *     {@link BigDecimal }
     *
     */
    public BigDecimal getMinimumSupport() {
        return minimumSupport;
    }

    /**
     * Sets the value of the minimumSupport property.
     *
     * @param value
     *     allowed object is
     *     {@link BigDecimal }
     *
     */
    public void setMinimumSupport(BigDecimal value) {
        this.minimumSupport = value;
    }

    /**
     * Gets the value of the modelName property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getModelName() {
        return modelName;
    }

    /**
     * Sets the value of the modelName property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setModelName(String value) {
        this.modelName = value;
    }

    /**
     * Gets the value of the numberOfItems property.
     *
     * @return
     *     possible object is
     *     {@link BigInteger }
     *
     */
    public BigInteger getNumberOfItems() {
        return numberOfItems;
    }

    /**
     * Sets the value of the numberOfItems property.
     *
     * @param value
     *     allowed object is
     *     {@link BigInteger }
     *
     */
    public void setNumberOfItems(BigInteger value) {
        this.numberOfItems = value;
    }

    /**
     * Gets the value of the numberOfItemsets property.
     *
     * @return
     *     possible object is
     *     {@link BigInteger }
     *
     */
    public BigInteger getNumberOfItemsets() {
        return numberOfItemsets;
    }

    /**
     * Sets the value of the numberOfItemsets property.
     *
     * @param value
     *     allowed object is
     *     {@link BigInteger }
     *
     */
    public void setNumberOfItemsets(BigInteger value) {
        this.numberOfItemsets = value;
    }

    /**
     * Gets the value of the numberOfRules property.
     *
     * @return
     *     possible object is
     *     {@link BigInteger }
     *
     */
    public BigInteger getNumberOfRules() {
        return numberOfRules;
    }

    /**
     * Sets the value of the numberOfRules property.
     *
     * @param value
     *     allowed object is
     *     {@link BigInteger }
     *
     */
    public void setNumberOfRules(BigInteger value) {
        this.numberOfRules = value;
    }

    /**
     * Gets the value of the numberOfTransactions property.
     *
     * @return
     *     possible object is
     *     {@link BigInteger }
     *
     */
    public BigInteger getNumberOfTransactions() {
        return numberOfTransactions;
    }

    /**
     * Sets the value of the numberOfTransactions property.
     *
     * @param value
     *     allowed object is
     *     {@link BigInteger }
     *
     */
    public void setNumberOfTransactions(BigInteger value) {
        this.numberOfTransactions = value;
    }

}