text:
from .array import Array
from .obj import Object

class FileReader:

    _WHITESPACE = b'\t\n\r '
    _READBUF_CHUNK_SIZE = 1024*1024

    def __init__(self, file, encoding="utf-8"):
        self.file = file
        # TODO: Support encodings where basic shortest characters are longer than one byte (e.g. UTF-16 and UTF-32)!
        self.encoding = encoding

        # This buffer is for reading and peeking
        self.readbuf = b''
        self.readbuf_read = 0
        self.readbuf_pos = 0

    def read(self, read_all=False, to_python=False):
        # "to_python" cannot be set without "read_all"
        assert read_all or not to_python

        self._skip_whitespace()

        # None
        if self._skip_if_next('null'):
            return None

        # False
        if self._skip_if_next('false'):
            return False

        # True
        if self._skip_if_next('true'):
            return True

        # Number
        if self._peek() in b'-0123456789':
            num = self._get()
            # Check sign
            if num == b'-':
                num += self._get()
            # Read integer part
            if num[-1] != b'0':
                while self._peek() in b'0123456789':
                    num += self._get()
            # Read possible decimal part and convert to float
            if self._peek() == b'.':
                self._get()
                num += b'.' + self._get()
                if num[-1] not in b'01234567890':
                    raise Exception(u'Expected digit after dot! Position {}'.format(self.readbuf_read))
                while self._peek() in b'0123456789':
                    num += self._get()
                num = float(num)
            else:
                num = int(num)
            # Read possible exponent
            if self._peek() in b'eE':
                self._get()
                exp = self._get()
                exp_neg = False
                if exp == b'-':
                    exp_neg = True
                    exp = self._get()
                elif exp == b'+':
                    exp = self._get()
                while self._peek() in b'0123456789':
                    exp += self._get()
                exp = int(exp)
                exp = 10 ** exp
                if exp_neg:
                    num = float(num) / exp
                else:
                    num *= exp
            return num

        # String
        if self._skip_if_next('"'):
            string = b''

            while True:
                c = self._get()

                if c == b'"':
                    break

                if c == b'\\':
                    c = self._get()
                    if c == b'"':
                        string += b'"'
                    elif c == b'\\':
                        string += b'\\'
                    elif c == b'/':
                        string += b'/'
                    elif c == b'b':
                        string += b'\b'
                    elif c == b'f':
                        string += b'\f'
                    elif c == b'n':
                        string += b'\n'
                    elif c == b'r':
                        string += b'\r'
                    elif c == b't':
                        string += b'\t'
                    elif c == b'u':
                        # These unicode characters are difficult, as they might
                        # consist of multiple characters following each others.
                        u_string = b'\\u'
                        while True:
                            # Read four hex decimals
                            for i in range(4):
                                c = self._get()
                                if c not in b'0123456789abcdefABCDEF':
                                    raise Exception('Expected a hex character, but got {}!'.format(c))
                                u_string += c
                            # Is the hex string continuing?
                            if not self._skip_if_next(b'\\u'):
                                break
                            u_string += b'\\u'
                        string += u_string.decode('unicode_escape').encode('utf-16', 'surrogatepass').decode('utf-16').encode('utf-8')
                    else:
                        raise Exception(u'Unexpected \\{} in backslash encoding! Position {}'.format(c.decode('utf-8'), self.readbuf_read - 1))

                else:
                    string += c

            return string.decode('utf-8')

        # Array
        if self._peek() == b'[':
            if to_python:
                array = Array(self, False)
                return array.to_python()
            else:
                return Array(self, read_all)

        # Object
        if self._peek() == b'{':
            if to_python:
                obj = Object(self, False)
                return obj.to_python()
            else:
                return Object(self, read_all)

        c = self._peek()

        raise Exception(u'Unexpected bytes! Value \'{}\' Position {}'.format(c.decode('utf-8'), self.readbuf_read))

    def _skip_whitespace(self):
        while True:
            next_char = self._peek()
            if next_char is None:
                break

            if next_char not in FileReader._WHITESPACE:
                break

            self._get()

    def _get(self):
        self._ensure_readbuf_left(1)
        if len(self.readbuf) - self.readbuf_read < 1:
            raise Exception(u'Unexpected end of file when getting next byte!')
        result = self.readbuf[self.readbuf_read:self.readbuf_read + 1]
        self.readbuf_read += 1
        return result

    def _read(self, amount):
        self._ensure_readbuf_left(amount)
        if len(self.readbuf) - self.readbuf_read < amount:
            raise Exception(u'Unexpected end of file reading a chunk!')
        result = self.readbuf[self.readbuf_read:self.readbuf_read + amount]
        self.readbuf_read += amount
        return result

    def _peek(self):
        self._ensure_readbuf_left(1)
        if len(self.readbuf) - self.readbuf_read < 1:
            return None
        return self.readbuf[self.readbuf_read:self.readbuf_read + 1]

    def _is_next(self, s):
        if not isinstance(s, bytes):
            s = s.encode(self.encoding)
        s_len = len(s)
        self._ensure_readbuf_left(s_len)
        if len(self.readbuf) - self.readbuf_read < s_len:
            return False
        return self.readbuf[self.readbuf_read:self.readbuf_read + s_len] == s

    def _skip_if_next(self, s):
        """ If next bytes are same as in 's', then skip them and return True.
        """
        if not isinstance(s, bytes):
            s = s.encode(self.encoding)
        if self._is_next(s):
            self.readbuf_read += len(s)
            return True
        return False

    def _ensure_readbuf_left(self, minimum_left):
        if len(self.readbuf) - self.readbuf_read >= minimum_left:
            return
        read_amount = max(minimum_left, FileReader._READBUF_CHUNK_SIZE) - (len(self.readbuf) - self.readbuf_read)
        self.readbuf_pos += self.readbuf_read
        old_pos = self.file.tell()
        read_in = self.file.read(read_amount)
        if not isinstance(read_in, bytes):
            read_in = read_in.encode(self.encoding)
        self.readbuf = self.readbuf[self.readbuf_read:] + read_in
        self.readbuf_read = 0

    def _tell_read_pos(self):
        return self.readbuf_pos + self.readbuf_read

    def _seek(self, pos):
        # If position is at the area of
        # readbuffer, then just rewind it.
        if pos >= self.readbuf_pos and pos < self.readbuf_pos + len(self.readbuf):
            self.readbuf_read = pos - self.readbuf_pos
        # If position is outside the readbuffer,
        # then read buffer from scratch
        else:
            self.readbuf = b''
            self.readbuf_read = 0
            self.readbuf_pos = pos
            self.file.seek(pos)


text:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
<fragment
        android:name="BlazorWebView.Android.BlazorWebView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:minWidth="25px"
        android:minHeight="25px"
        android:id="@+id/blazorWebView" />
</RelativeLayout>

redpajama_set_name: RedPajamaGithub


text:
ACCEPTED

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

#### Published in
Edwards's Bot. Reg. 19: t. 1606. 1833

#### Original name
null

### Remarks
null


text:
scriptloop="y"
while [ "$scriptloop" = "y" ]; do
echo -e  ""
echo -e  ""
echo -e  "SELinux Setup:"
echo -e  ""
echo -e  "1 - Download and install"
echo -e  "2 - Set config"
echo -e  "3 - Start SELinux"
echo -e  "4 - Get SE Linux status"
echo -e  "5 - Manage Sites"
echo -e  ""
echo -e  "q - Exit SELinux Setup"
echo -e  ""
echo -e  "Please enter NUMBER of choice (example: 3):"
read choice
case $choice in

1)
sudo yum -y install policycoreutils setroubleshoot
sudo sed -i 's/SELINUX=disabled/SELINUX=permissive/g' /etc/selinux/config
sudo reboot
;;

2)
sudo restorecon -Rv -n /home
sudo restorecon -Rv -n /
sudo touch /.autorelabel
sudo reboot
;;

3)
sudo sed -i 's/SELINUX=permissive/SELINUX=enforcing/g' /etc/selinux/config
sudo egrep -i 'selinux=0|enforcing=0' /boot/grub/grub.conf
sudo semanage port -a -t ssh_port_t -p tcp 880
sudo reboot
;;

4)
sudo sestatus
;;

5)
./slushhost/managesites.sh
scriptloop="n"
;;

q)
scriptloop="n"
;;

*)
echo - "Unknown choice! Exiting..."
;;

esac
done


text:
namespace FilmWebAPI.Models
{
    public class Person
    {
        public long Id { get; internal set; }

        public string Name { get; internal set; }

        public string KnownAs { get; internal set; }
    }
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
    <title>GroundworkCSS Layouts: Ecommerce</title>

    <link type="text/css" rel="stylesheet" href="../css/groundwork.css">

    <link type="text/css" rel="stylesheet" href="../css/demo/jquery.snippet.css">

GroundworkCSS 2

Github Project - Version 2.5.0
Created & Maintained by Gary Hepting

 Home

              <button>Example Layouts</button>

Web Page

Image Gallery

Ecommerce Page

Contact Page

              <button>Documentation</button>

Grid

Helpers

Typography

                  <button title="Navigation, buttons, boxes, message boxes, tables, tabs, and forms">UI Elements</button>

Navigation

Buttons

Boxes

Message Boxes

Tables

Tabs

Form Elements

Icons

Responsive Text

Placeholder Text

Animations

Ecommerce Example Layout

Demonstrates Responsive Text, Truncated Lines, Icons, Vertical (To Menu) Navigation, Grid Breakpoint Modifiers and Adapters

Example Layout 3 of 4

Back Next: Contact Page

My Account View Cart Sign Out

Nav item #1

Nav item #2

Nav item #3

Nav item #4

Nav item #5

Product 1

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

$8.00 USD

Product 2

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

$8.00 USD

Product 3

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

$8.00 USD

Product 4

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

$8.00 USD

Product 5

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

$8.00 USD

Product 6

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

$8.00 USD

Product 7

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

$8.00 USD

Product 8

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

$8.00 USD

Product 9

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

$8.00 USD

Product 10

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

$8.00 USD

Product 11

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

$8.00 USD

Product 12

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

$8.00 USD

Example Layouts

Web Page

Image Gallery

Ecommerce Page

Contact Page

Documentation

Grid

Helpers

Typography

Navigation

Buttons

Boxes

Message Boxes

Tables

Tabs

Form Elements

Icons

Responsive Text

Placeholder Text

Animations

GroundworkCSS is 100% free and open source. Give a shout out if you have any feedback.

Find a bug? Help squash it by filing an issue on Github.


text:
$(function(){
//公用
//最后一个li
$('ul.last_list').each(function() {
$(this).children('li:last').addClass('last');
});
//经过效果
$('ul.hover_list li').hover(function(){
$(this).addClass('hover').siblings().removeClass('hover');
});
//表格的最后一个th
$('table.last_table tr').each(function() {
$(this).children('th:last').addClass('last');
});
//开始标签,需点击才有变化的
var $tab_dd = $("div.tab_c_nav dl dd")
$tab_dd.click(function(){
$(this).addClass("tab_light").siblings().removeClass("tab_light");
var index = $tab_dd.index(this);
$("div.tab_c_box > div").eq(index).show().siblings().hide();
}).hover(function(){
$(this).addClass("tab_hover");
},function(){
$(this).removeClass("tab_hover");
});

	$('ul.online li').hover(function(){
	  $(this).children(".ts").show();
	},function(){
	  $(this).children(".ts").hide();
	});

	$('ul.online li .o_3t ,ul.online li .o_3').click(function(){
	  $('.yd-feedback-suggestion').show();
	});

	$('.fb-close').click(function(){
	  $('.yd-feedback-suggestion').hide();
	});

});

$(document).ready(function () {
	$('.mains').height((document.documentElement.clientHeight)-($('.header').height())-($('.header_c').height())-($('.footer_d').height())-40);

	if( ($(window).width()-1000)/2 > 70 )
		$('div.online').css({'left':($(window).width()-1000)/2+1004});
	else{
		$('div.online').css({'left':'auto'});
	}
});

$(window).resize(function () {
	$('.mains').height((document.documentElement.clientHeight)-($('.header').height())-($('.header_c').height())-($('.footer_d').height())-40);

	if( ($(window).width()-1000)/2 > 70 )
		$('div.online').css({'left':($(window).width()-1000)/2+1004});
	else{
		$('div.online').css({'left':'auto'});
	}
}).resize();

$(document).ready(function(){
$(window).scroll(function(){
if ($(window).scrollTop()>256){
$(".tab_top").css({position: "fixed", top: 0, left:50+"%",marginLeft:-500+"px"});
$(".tab_con").css({paddingTop: 195+"px"});
} else {
$(".tab_top").css({position: "relative"});
$(".tab_con").css({paddingTop: 0});
}});
});


text:
package services.testdata.candidate.onlinetests

import com.google.inject.name.Named
import javax.inject.{ Inject, Singleton }
import model.ProgressStatuses.{ PHASE1_TESTS_EXPIRED, PHASE2_TESTS_EXPIRED, PHASE3_TESTS_EXPIRED, ProgressStatus }
import model.testdata.candidate.CreateCandidateData.CreateCandidateData
import play.api.mvc.RequestHeader
import services.onlinetesting.OnlineTestService
import services.testdata.candidate.ConstructiveGenerator
import services.testdata.candidate.onlinetests.phase1.Phase1TestsInvitedStatusGenerator
import services.testdata.candidate.onlinetests.phase2.Phase2TestsInvitedStatusGenerator
import services.testdata.candidate.onlinetests.phase3.Phase3TestsInvitedStatusGenerator
import uk.gov.hmrc.http.HeaderCarrier

import scala.concurrent.ExecutionContext.Implicits.global

trait TestsExpiredFromInvitedStatusGenerator extends ConstructiveGenerator {
  val otService: OnlineTestService
  val expiredStatus: ProgressStatus

  def generate(generationId: Int, generatorConfig: CreateCandidateData)(implicit hc: HeaderCarrier, rh: RequestHeader) = {
    for {
      candidateInPreviousStatus <- previousStatusGenerator.generate(generationId, generatorConfig)
      _ <- otService.commitProgressStatus(candidateInPreviousStatus.applicationId.get, expiredStatus)
    } yield {
      candidateInPreviousStatus
    }
  }
}

@Singleton
class Phase1TestsExpiredFromInvitedStatusGenerator @Inject() (val previousStatusGenerator: Phase1TestsInvitedStatusGenerator,
                                                              @Named("Phase1OnlineTestService") val otService: OnlineTestService
                                                             ) extends TestsExpiredFromInvitedStatusGenerator {
  override val expiredStatus = PHASE1_TESTS_EXPIRED
}

@Singleton
class Phase2TestsExpiredFromInvitedStatusGenerator @Inject() (val previousStatusGenerator: Phase2TestsInvitedStatusGenerator,
                                                              @Named("Phase2OnlineTestService") val otService: OnlineTestService
                                                             ) extends TestsExpiredFromInvitedStatusGenerator {
  override val expiredStatus = PHASE2_TESTS_EXPIRED
}

@Singleton
class Phase3TestsExpiredFromInvitedStatusGenerator @Inject() (val previousStatusGenerator: Phase3TestsInvitedStatusGenerator,
                                                              @Named("Phase3OnlineTestService") val otService: OnlineTestService
                                                             ) extends TestsExpiredFromInvitedStatusGenerator {
  override val expiredStatus = PHASE3_TESTS_EXPIRED
}


text:
<?php

namespace Tests\Magium\Magento\Admin\Configuration\PaymentMethods;

use Magium\Magento\AbstractMagentoTestCase;
use Magium\Magento\Actions\Admin\Configuration\AbstractSettingGroup;
use Magium\Magento\Actions\Admin\Configuration\PaymentMethods\AbstractPaymentMethod;
use Magium\Magento\Actions\Admin\Configuration\SettingModifier;
use Magium\Magento\Actions\Admin\Login\Login;
use Magium\Magento\Navigators\Admin\AdminMenu;
use Magium\Magento\Navigators\Admin\SystemConfiguration;
use Magium\WebDriver\FastSelectElement;

abstract class AbstractPaymentMethodTest extends AbstractMagentoTestCase
{
    protected function enablePaymentMethod($action, $id)
    {
        $this->getAction(Login::ACTION)->login();
        $this->getNavigator(AdminMenu::NAVIGATOR)->navigateTo('System/Configuration');

        $paymentMethod = $this->getAction($action);
        /* @var $paymentMethod \Magium\Magento\Actions\Admin\Configuration\PaymentMethods\CashOnDelivery */
        $paymentMethod->setEnabled(SettingModifier::SETTING_OPTION_YES);
        $paymentMethod->execute();
        $this->getNavigator(SystemConfiguration::NAVIGATOR)->navigateTo('General/Merchant Location');

        $this->getNavigator(SystemConfiguration::NAVIGATOR)->navigateTo('Payment Methods/' . $paymentMethod::NAME);
        $select = new FastSelectElement($this->webdriver, sprintf('//select[@id="%s"]', $id));
        $options = $select->getSelectedOptions();
        self::assertCount(1, $options);
        self::assertEquals(1, $options[0]['value']);
    }

    protected function changeTitle($action, $id, $originalTitle)
    {
        $this->getAction(Login::ACTION)->login();
        $this->getNavigator(AdminMenu::NAVIGATOR)->navigateTo('System/Configuration');

        $paymentMethod = $this->getAction($action);
        /* @var $paymentMethod \Magium\Magento\Actions\Admin\Configuration\PaymentMethods\CashOnDelivery */
        $paymentMethod->setEnabled(SettingModifier::SETTING_OPTION_YES);
        $paymentMethod->setTitle('This is a title');
        $paymentMethod->execute();
        $this->getNavigator(SystemConfiguration::NAVIGATOR)->navigateTo('General/Merchant Location');

        $this->getNavigator(SystemConfiguration::NAVIGATOR)->navigateTo('Payment Methods/' . $paymentMethod::NAME);
        $title = $this->byId($id)->getAttribute('value');

        self::assertEquals('This is a title', $title);
        $paymentMethod->setTitle($originalTitle);
        $paymentMethod->execute();
    }
}


text:
from __future__ import division, print_function, absolute_import

import tflearn
from tflearn.layers.merge_ops import merge
from tflearn.layers.core import input_data, dropout, fully_connected
from tflearn.layers.conv import conv_2d, max_pool_2d
from tflearn.layers.estimator import regression
from tflearn.data_utils import to_categorical

from tflearn.helpers.trainer import Trainer
from import_data import *

# Acquiring the data

folder = 'Digit Recognizer'
file_name = 'train.csv'
specific_dataset_source = folder + '/' + file_name
output_columns = ['label']

data = import_csv(specific_dataset_source, shuffle = True)
x_data, y_data = get_xy_mutual(data, output_columns, type = 'numpy')

x_data = standalization_divide(x_data, 255)
get_info(x_data, 'input')

num_samples = x_data.shape[0]
input_features = x_data.shape[1]

number_of_labels = labels_info(y_data)
y_data_as_numbers = labels_as_numbers(y_data)

split_percentage = 80
x_train, x_val = cross_validation(x_data, split_percentage)

y_train = np.array(y_data_as_numbers[0:(int(x_data.shape[0]/(100/split_percentage)))])
y_val = np.array(y_data_as_numbers[(int(x_data.shape[0]/(100/split_percentage))):x_data.shape[0]])

# Shaping data to the correct shape.
x_train = x_train.reshape([-1, 28, 28, 1])
x_val = x_val.reshape([-1, 28, 28, 1])
y_train = to_categorical(y_train, nb_classes = 10)
y_val = to_categorical(y_val, nb_classes = 10)

print('Size of the intput '+ str(x_data.shape))
print('Size of the output '+ str(y_data.shape))
print('First five examples of one-hot encoded output:')
print(y_train[:5, :])

# --------------------------------------------------------------------------------------------------------

# Building convolutional network
network = input_data(shape=[None, 28, 28, 1], name='input')

#
branch1 = conv_2d(network, 32, [2, 2], activation = 'relu')
branch1 = dropout(branch1, 0.5)

branch2 = conv_2d(network, 16, [3, 3], activation = 'relu')
branch2 = dropout(branch2, 0.5)
branch2 = conv_2d(branch2, 32, [2, 2], activation = 'relu')
branch2 = dropout(branch2, 0.5)

branch3 = conv_2d(network, 8, [5, 5], activation = 'relu')
branch3 = dropout(branch3, 0.5)
branch3 = conv_2d(branch3, 16, [3, 3], activation = 'relu')
branch3 = dropout(branch3, 0.5)
branch3 = conv_2d(branch3, 32, [2, 2], activation = 'relu')
branch3 = dropout(branch3, 0.5)

branch4 = conv_2d(network, 4, [7, 7], activation = 'relu')
branch4 = dropout(branch4, 0.5)
branch4 = conv_2d(branch4, 8, [5, 5], activation = 'relu')
branch4 = dropout(branch4, 0.5)
branch4 = conv_2d(branch4, 16, [3, 3], activation = 'relu')
branch4 = dropout(branch4, 0.5)
branch4 = conv_2d(branch4, 32, [2, 2], activation = 'relu')
branch4 = dropout(branch4, 0.5)

# Hidden layer 3
merged_layers = merge((branch1, branch2, branch3, branch4), mode = 'elemwise_sum', name = 'Merge')

# Hidden layer 4
merged_layersk = fully_connected(merged_layers, 10, activation='relu')
merged_layers = dropout(merged_layers, 0.5)

merged_layers = fully_connected(merged_layers, 10, activation = 'softmax')
network = regression(merged_layers, optimizer = 'adam', learning_rate = 0.005,
                     loss = 'categorical_crossentropy', name ='target')

# ---------------------------------------------------------------------------------------
# Training
# model = tflearn.DNN(network, tensorboard_verbose = 3, tensorboard_dir='./logs')

model = tflearn.DNN(network, tensorboard_verbose = 3, tensorboard_dir = './logs', best_checkpoint_path = './checkpoints/best/best_val', max_checkpoints = 1)
# checkpoint_path ='./checkpoints/checkpoint',

preTrained = True

if preTrained == False:
	model.fit(x_train, y_train, n_epoch = 1, validation_set = (x_val, y_val),
	show_metric = True, batch_size = 200, shuffle = True, #snapshot_step = 100,
          snapshot_epoch = True, run_id = 'WojNet')
else:
	# Loading the best accuracy checkpoint (accuracy over the validation data)
	model.load('./checkpoints/best/best_val9721')

	print('*' * 70)
	print('Model is successfully loaded for the best performance!')

print(model.evaluate(x_train, y_train))
print(model.evaluate(x_val, y_val))

import time
start = time.time()

prediction = model.predict_label(x_data[0:2000].reshape([-1,28,28,1]))

print ('It took', '{0:.9f}'.format(time.time()-start), 'seconds.')

file_name = 'test.csv'
specific_dataset_source_test = folder + '/' + file_name
data = pd.read_csv(specific_dataset_source_test)
test_input = data.loc[:, :]
test_input_numpy = test_input.as_matrix()

print(test_input_numpy.shape)
test_data = test_input_numpy[0:2000]
prediction_prob = model.predict(test_data.reshape([-1,28,28,1]))
prediction_label = model.predict_label(test_data.reshape([-1,28,28,1]))
#print(prediction_prob)
print('Predicted labels (from least probable to the correct label):')
print(prediction_label)

'''
model.predict_label(x_data.reshape([1,28,28,1])))
	predicted_as_prob = np.array(model.predict(x_data[index].reshape([1,28,28,1])))
	print('*' * 70)

	print(predicted_as_prob)
	print(predicted_as_label)
	print(predicted_as_label[0, -1])
	print(predicted_as_prob.max())
'''

'''
for index in range(11,15):
    predicted_as_prob = np.array(model.predict(x_data[index].reshape([1,28,28,1])))
    print('*' * 70)
    print(type(predicted_as_prob))
    print(predicted_as_prob.shape)
    #print(predicted_as_prob)
    #print(predicted_as_prob.max())
    print(np.amax(predicted_as_prob))

'''

#tensorboard --logdir=logs/


text:
To quickstart with Showdown, install it as a package (for server-side) or include it to your browser (client-side) via CDN:

## Installation

### Server-side

=== "npm"

    ```
    npm install showdown
    ```

=== "bower"

    ```
    bower install showdown
    ```

=== "NuGet"

    ```
    PM> Install-Package showdownjs
    ```

    More information about the package you can find on the [NuGet website](https://www.nuget.org/packages/showdownjs/).

### Client-side

=== "jsDelivr"

    ```
    https://cdn.jsdelivr.net/npm/showdown@<version>/dist/showdown.min.js
    ```

    [Showndown page on jsDelivr](https://www.jsdelivr.com/package/npm/showdown)

=== "cdnjs"

    ```
    https://cdnjs.cloudflare.com/ajax/libs/showdown/<version>/showdown.min.js
    ```

    [Showndown page on cdnjs](https://cdnjs.com/libraries/showdown)

=== "unpkg"

    ```
    https://unpkg.com/showdown/dist/showdown.min.js
    ```

    [Showndown page on unpkg](https://unpkg.com/browse/showdown@latest/)

!!! note ""
    Replace `<version>` with an actual full length version you're interested in. For example, `2.0.3`.

## Usage

Once installed, you can use Showndown according to the chosen method:

### Server-side

!!! example "Node.js"

    === "code"

        ```js
        var showdown  = require('showdown'),
            converter = new showdown.Converter(),
            text      = '# hello, markdown!',
            html      = converter.makeHtml(text);
        ```

    === "output"

        ```html
        <h1 id="hellomarkdown">hello, markdown!</h1>
        ```

### Client-side

!!! example "Browser"

    === "code"

        ```js
        var converter = new showdown.Converter(),
            text      = '# hello, markdown!',
            html      = converter.makeHtml(text);
        ```

    === "output"

        ```html
        <h1 id="hellomarkdown">hello, markdown!</h1>
        ```

!!! warning "Potential XSS vulnerabilities"
    Showdown doesn't sanitize the input since Markdown relies on it to parse certain features correctly into HTML. As a result, this may lead to potential XSS injection vulnerabilities.

    Please refer to the [Markdown's XSS vulnerability](xss.md) page for more information.

## Other installation methods

### Tarball

You can download the latest tarball directly from [releases][releases].

## Previous versions

If you're looking for Showdown prior to version 1.0.0, you can find them in the [legacy branch][legacy-branch].

## Changelog

The full changelog is available [here][changelog].

[legacy-branch]: https://github.com/showdownjs/showdown/tree/legacy
[releases]: https://github.com/showdownjs/showdown/releases
[changelog]: https://github.com/showdownjs/showdown/blob/master/CHANGELOG.md


text:
<?php

declare(strict_types=1);

namespace Sylius\Bundle\ResourceBundle\Grid\Parser;

use Symfony\Component\HttpFoundation\Request;

interface OptionsParserInterface
{
    public function parseOptions(array $parameters, Request $request, $data = null): array;
}


text:
namespace ContactManager.Api.Models
{
    public class Contact
    {
        public int Id { get; set; }
        public string Name { get; set; }
        public string Email { get; set; }
    }
}


text:
//
//  BaseButton.m
//  SLTumblr
//
//  Created by SL🐰鱼子酱 on 15/10/24.
//  Copyright © 2015年 SL🐰鱼子酱. All rights reserved.
//

#import "BaseButton.h"

@implementation BaseButton

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end


text:
package com.yngvark.gridwalls.netcom.connection;

import com.yngvark.gridwalls.microservices.zombie.Config;
import com.yngvark.gridwalls.netcom.TestConnectionWrapper;
import com.yngvark.gridwalls.netcom.connection.connect_status.Connected;
import com.yngvark.gridwalls.netcom.connection.connect_status.ConnectionStatus;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Matchers.any;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

@SuppressWarnings("unchecked")
public class BrokerConnecterHolderTest {
    @Test
    public void should_connect_if_not_connected() {
        // Given
        BrokerConnecter brokerConnecter = mock(BrokerConnecter.class);
        when(brokerConnecter.connect(eq("someHost"), any(Integer.class))).thenReturn(connected());

        BrokerConnecterHolder brokerConnecterHolder = new BrokerConnecterHolder(
                Config.builder().brokerHostname("someHost").build(),
                brokerConnecter
                );

        // When
        ConnectionStatus<TestConnectionWrapper> connectionStatus = brokerConnecterHolder.connectIfNotConnected();

        // Then
        assertTrue(connectionStatus.connected());
        verify(brokerConnecter).connect(eq("someHost"), any(Integer.class));

        // And given
        Mockito.reset(brokerConnecter);
        when(brokerConnecter.connect(eq("someHost"), any(Integer.class))).thenReturn(connected());

        // When
        connectionStatus = brokerConnecterHolder.connectIfNotConnected();

        // Then
        verify(brokerConnecter, times(0)).connect(any(String.class), any(Integer.class));

        assertTrue(connectionStatus.connected());
    }

    private ConnectionStatus connected() {
        ConnectionWrapper connectionWrapperToReturn = new TestConnectionWrapper();
        return new Connected(connectionWrapperToReturn);
    }

    @Test
    public void should_not_reconnect_if_reconnect_disabled() {
        // Given
        BrokerConnecter brokerConnecter = mock(BrokerConnecter.class);

        BrokerConnecterHolder brokerConnecterHolder = new BrokerConnecterHolder(
                Config.builder().brokerHostname("someHost").build(),
                brokerConnecter
        );

        brokerConnecterHolder.disconnectAndDisableReconnect();

        // When
        ConnectionStatus<TestConnectionWrapper> connectionStatus = brokerConnecterHolder.connectIfNotConnected();

        // Then
        verify(brokerConnecter, times(0)).connect(any(String.class), any(Integer.class));
        assertTrue(connectionStatus.disconnected());
        assertEquals("(Re)Connect disabled, won't connect.", connectionStatus.getConnectFailedDetails());
    }

}


text:
@implementation NSString (UUID)
+ (NSString *)UUID
{
    CFUUIDRef uuidRef = CFUUIDCreate(NULL);
    CFStringRef uuid = CFUUIDCreateString(NULL, uuidRef);

    CFRelease(uuidRef);

    return (__bridge_transfer NSString *)uuid;
}

@end


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#ffffff"
    android:orientation="vertical" >

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:background="@color/deepskyblue" >
        <Button
            android:id="@+id/rback"
            android:background="@drawable/rbak"
            android:layout_marginTop="5dp"
            android:layout_marginBottom="5dp"
            android:layout_width="40dp"
            android:layout_height="40dp"
            android:layout_centerVertical="true"
            />
        <TextView
            android:id="@+id/snT"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:text="巡检"
            android:textColor="#ffffff"
            android:textSize="20sp" />

        <TextView
            android:id="@+id/activity_selectimg_send"
            android:layout_width="wrap_content"
            android:layout_height="40dp"
            android:layout_alignParentRight="true"
            android:layout_centerVertical="true"
            android:layout_marginRight="8dp"
            android:gravity="center"
            android:text="发送"
            android:textColor="#ffffff"
            android:textSize="20sp" />
    </RelativeLayout>

    <EditText
        android:id="@+id/xunInfo"
        android:layout_width="fill_parent"
        android:layout_height="100dp"
        android:layout_margin="8dp"
        android:gravity="left|top"
        android:hint="填写巡检信息..."
        android:background="@null" >
    </EditText>

    <GridView
        android:id="@+id/noScrollgridview"
        android:layout_width="290dp"
        android:layout_height="350dp"
        android:layout_marginLeft="5dp"
        android:horizontalSpacing="3dp"
        android:numColumns="4"
        android:scrollbars="none"
        android:verticalSpacing="5dp" >
    </GridView>

</LinearLayout>


text:
<?php

namespace app\modules\user\models;

use Yii;
use yii\behaviors\TimestampBehavior;
use yii\web\IdentityInterface;

/**
 * This is the model class for table "{{%user}}".
 *
 * @property integer $id
 * @property integer $created_at
 * @property integer $updated_at
 * @property string $username
 * @property string $auth_key
 * @property string $email_confirm_token
 * @property string $password_hash
 * @property string $password_reset_token
 * @property string $email
 * @property integer $status
 */
class User extends \yii\db\ActiveRecord implements IdentityInterface
{
    const STATUS_BLOCKED = 0;
    const STATUS_ACTIVE = 1;
    const STATUS_WAIT = 2;

    public static function findIdentity($id)
    {
        return static::findOne(['id' => $id, 'status' => self::STATUS_ACTIVE]);
    }

    public static function findIdentityByAccessToken($token, $type = null)
    {
        throw new NotSupportedException('findIdentityByAccessToken is not implemented.');
    }

    public function getId()
    {
        return $this->getPrimaryKey();
    }

    public function getAuthKey()
    {
        return $this->auth_key;
    }

    public function validateAuthKey($authKey)
    {
        return $this->getAuthKey() === $authKey;
    }

    public function getStatusName()
    {
        return ArrayHelper::getValue(self::getStatusesArray(), $this->status);
    }

    public static function getStatusesArray()
    {
        return [
            self::STATUS_BLOCKED => 'Заблокирован',
            self::STATUS_ACTIVE => 'Активен',
            self::STATUS_WAIT => 'Ожидает подтверждения',
        ];
    }

    /**
     * Finds user by username
     *
     * @param string $username
     * @return static|null
     */
    public static function findByUsername($username)
    {
        return static::findOne(['username' => $username]);
    }

    /**
     * Validates password
     *
     * @param string $password password to validate
     * @return boolean if password provided is valid for current user
     */
    public function validatePassword($password)
    {
        return Yii::$app->security->validatePassword($password, $this->password_hash);
    }

    /**
     * @param string $password
     */
    public function setPassword($password)
    {
        $this->password_hash = Yii::$app->security->generatePasswordHash($password);
    }

    /**
     * Generates "remember me" authentication key
     */
    public function generateAuthKey()
    {
        $this->auth_key = Yii::$app->security->generateRandomString();
    }

    public function beforeSave($insert)
    {
        if (parent::beforeSave($insert)) {
            if ($insert) {
                $this->generateAuthKey();
            }
            return true;
        }
        return false;
    }

/**
* Finds user by password reset token
*
* @param string $token password reset token
* @return static|null
*/
    public static function findByPasswordResetToken($token)
    {
        if (!static::isPasswordResetTokenValid($token)) {
            return null;
        }
        return static::findOne([
            'password_reset_token' => $token,
            'status' => self::STATUS_ACTIVE,
        ]);
    }

    /**
     * Finds out if password reset token is valid
     *
     * @param string $token password reset token
     * @return boolean
     */
    public static function isPasswordResetTokenValid($token)
    {
        if (empty($token)) {
            return false;
        }
        $expire = Yii::$app->params['user.passwordResetTokenExpire'];
        $parts = explode('_', $token);
        $timestamp = (int) end($parts);
        return $timestamp + $expire >= time();
    }

    /**
     * Generates new password reset token
     */
    public function generatePasswordResetToken()
    {
        $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time();
    }

    /**
     * Removes password reset token
     */
    public function removePasswordResetToken()
    {
        $this->password_reset_token = null;
    }

    /**
     * @param string $email_confirm_token
     * @return static|null
     */
    public static function findByEmailConfirmToken($email_confirm_token)
    {
        return static::findOne(['email_confirm_token' => $email_confirm_token, 'status' => self::STATUS_WAIT]);
    }

    /**
     * Generates email confirmation token
     */
    public function generateEmailConfirmToken()
    {
        $this->email_confirm_token = Yii::$app->security->generateRandomString();
    }

    /**
     * Removes email confirmation token
     */
    public function removeEmailConfirmToken()
    {
        $this->email_confirm_token = null;
    }

    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%user}}';
    }

    public function rules()
    {
        return [
            ['username', 'required'],
            ['username', 'match', 'pattern' => '#^[\w_-]+$#i'],
            ['username', 'unique', 'targetClass' => self::className(), 'message' => 'This username has already been taken.'],
            ['username', 'string', 'min' => 2, 'max' => 255],

            ['email', 'required'],
            ['email', 'email'],
            ['email', 'unique', 'targetClass' => self::className(), 'message' => 'This email address has already been taken.'],
            ['email', 'string', 'max' => 255],

            ['status', 'integer'],
            ['status', 'default', 'value' => self::STATUS_ACTIVE],
            ['status', 'in', 'range' => array_keys(self::getStatusesArray())],
        ];
    }

    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'created_at' => 'Создан',
            'updated_at' => 'Обновлён',
            'username' => 'Имя пользователя',
            'email' => 'Email',
            'status' => 'Статус',
        ];
    }

    public function behaviors()
    {
        return [
            TimestampBehavior::className(),
        ];
    }
}


text:
package io.crnk.operations;

import io.crnk.core.engine.document.Resource;
import nl.jqno.equalsverifier.EqualsVerifier;
import nl.jqno.equalsverifier.Warning;
import org.junit.Assert;
import org.junit.Test;

public class OperationTest {

	@Test
	public void testEquals() {
		EqualsVerifier.forClass(Operation.class).usingGetClass().suppress(Warning.NONFINAL_FIELDS).verify();

	}

	@Test
	public void testHashCode() {
		Operation op1 = new Operation("a", "b", new Resource());
		Operation op2 = new Operation("a", "b", new Resource());
		Operation op3 = new Operation("x", "b", new Resource());
		Assert.assertEquals(op1, op2);
		Assert.assertNotEquals(op3.hashCode(), op2.hashCode());
	}

}


text:
/**
 * ScrollView.h
 * Somantics
 *
 * Created by Marek Bereza on 11/05/2011.
 *
 */
#include "constants.h"
#include "SimpleButton.h"
class ScrollView: public InteractiveObject {
public:
	SimpleButtonListener *listener;
	bool scrollingEnabled;
	void setup(float x, float y, float width, float height, int itemsPerCol = 3) {

		scrollingEnabled = true;
		listener = NULL;
		scrollOffset = 0;

		deltaX = 0;
		touchX = 0;
		touching = false;

		PADDING = 12*WIDTH_SCALE;

		this->itemsPerCol = itemsPerCol;
		this->x = x;
		this->y = y;
		this->width = width;
		this->height = height;

	}

	void setListener(SimpleButtonListener *listener) {
		this->listener = listener;
	}

	void add(InteractiveObject *item) {
		items.push_back(item);

		totalWidth = ((items.size()+1)/2)*(items[0]->width+PADDING);
	}

	// this is a list of all the things that can be interacted with
	vector<InteractiveObject*> items;

	void draw() {
		//printf("%f %f %f %f\n", x, y, width, height);
		arrange();

		if(!touching) {

			// pulling the top
			if(scrollOffset>0) {
				deltaX = -scrollOffset*0.1;

				// pulling the bottom
				//
			} else if(totalWidth + scrollOffset < width) {

				deltaX = (width - (totalWidth + scrollOffset))*0.1;

			} else {
				// normal momentum
				deltaX *= 0.9;

			}
			if(ABS(deltaX)<1) deltaX = 0;
			scrollOffset += deltaX;
		}

		for(int i = 0; i < items.size(); i++) {
			items[i]->draw();
		}
	}
	int PADDING;
	void arrange() {

		int rowHeight = items[0]->height+PADDING;
		int colWidth = items[0]->width+PADDING;

		for(int i = 0; i < items.size(); i++) {
			int row = 0;
			if(i>4) row = 2;
			else if(i>2) row = 1;

			int col = i;
			if(i>4) col = i - 5;
			else if(i>2) col = i - 3;

			items[i]->x = colWidth*col + scrollOffset + PADDING + x;
			items[i]->y = rowHeight*row + y + PADDING;

		}
	}

	bool touchDown(float x, float y, int touchId) {
		if(scrollingEnabled && inside(x, y)) {
			touchX = x;
			touching = true;
		}
		for(int i = 0; i < items.size(); i++) {
			if(items[i]->touchDown(x, y, touchId)) {
				return true;
			}
		}
		return false;
	}

	bool touchMoved(float x, float y, int touchId) {
		if(scrollingEnabled) {

			if(!inside(x, y)) {
				touching = false;
				return false;
			}
			deltaX = x - touchX;
			scrollOffset += deltaX;
			touchX = x;
		}
		for(int i = 0; i < items.size(); i++) {
			if(items[i]->touchMoved(x, y, touchId)) {
				return true;
			}
		}
		return false;
	}

	bool touchUp(float x, float y, int touchId) {
		if(scrollingEnabled) {
			touching = false;
		}
		for(int i = 0; i < items.size(); i++) {
			if(items[i]->touchUp(x, y, touchId)) {
				return true;
			}
		}
		return false;
	}

	// how much we're scrolled away from zero
	float scrollOffset;

	// scrolling touch stuff
	bool touching;
	float touchX;
	float deltaX;
	float totalWidth;
	int itemsPerCol;
};


text:
/** @ignore */
const Command = require('./../Command');

class UptimeCommand extends Command {

    /**
     * Sets up the command by providing the prefix, command trigger, any
     * aliases the command might have and additional options that
     * might be usfull for the abstract command class.
     */
    constructor() {
        super('uptime', [], {
            middleware: [
                'throttle.user:1,2'
            ]
        });
    }

    /**
     * Executes the given command.
     *
     * @param  {IUser}     sender   The Discordie user object that ran the command.
     * @param  {IMessage}  message  The Discordie message object that triggered the command.
     * @param  {Array}     args     The arguments that was parsed to the command.
     * @return {mixed}
     */
    onCommand(sender, message, args) {
        return app.envoyer.sendInfo(message, 'I have been up for ' + app.process.getUptime(false));
    }
}

module.exports = UptimeCommand;


text:
var webpack = require('webpack');

module.exports = {
  devtool: 'source-map',
  entry: [
    'webpack-dev-server/client?http://localhost:3000',
    'webpack/hot/only-dev-server',
    './scripts/index.js'
  ],
  output: {
    path: __dirname + '/scripts/',
    filename: 'bundle.js',
    publicPath: '/scripts/'
  },
  plugins: [
    new webpack.HotModuleReplacementPlugin(),
    new webpack.NoErrorsPlugin()
  ],
  resolve: {
    extensions: ['', '.js', '.jsx']
  },
  module: {
    loaders: [
      { test: /\.jsx?$/, loaders: ['react-hot', 'babel-loader'], exclude: /node_modules/ }
    ]
  }
};


text:
<?php

/**
 * Customer date field form xml renderer
 *
 * @category    Mage
 * @package     Mage_XmlConnect
 * @author      Magento Core Team <core@magentocommerce.com>
 */
class Mage_XmlConnect_Block_Customer_Form_Renderer_Date extends Enterprise_Customer_Block_Form_Renderer_Date
{
    /**
     * Field type
     *
     * @var string
     */
    protected $_filedType = 'date';

    /**
     * Prepare values for renderer
     *
     * @return array
     */
    protected function _prepareValues()
    {
        return array('day' => array(
                'id' => $this->getHtmlId('day'),
                'title' => $this->__('Day'),
                'label' => $this->__('DD'),
                'value' => $this->getDay()
            ), 'month' => array(
                'id' => $this->getHtmlId('month'),
                'title' => $this->__('Month'),
                'label' => $this->__('MM'),
                'value' => $this->getMonth()
            ), 'year' => array(
                'id' => $this->getHtmlId('year'),
                'title' => $this->__('Year'),
                'label' => $this->__('YYYY'),
                'value' => $this->getYear()
        ));
    }

    /**
     * Add date field to fieldset xml object
     *
     * @param Mage_XmlConnect_Model_Simplexml_Form_Element_Fieldset $fieldsetXmlObj
     * @return Mage_XmlConnect_Block_Customer_Form_Renderer_Date
     */
    public function addFieldToXmlObj(Mage_XmlConnect_Model_Simplexml_Form_Element_Fieldset $fieldsetXmlObj)
    {
        $attributes = array(
            'label' => $this->getLabel(),
            'name'  => $this->getFieldName(),
            'format'=> $this->getDateFormat(),
            'value' => $this->_prepareValues()
        );

        $attributes += Mage::helper('xmlconnect/customer_form_renderer')
            ->addTitleAndRequiredAttr($fieldsetXmlObj, $this);

        $fieldXmlObj = $fieldsetXmlObj->addField($this->getHtmlId('full'), $this->_filedType, $attributes);

        $validateRules = $this->getAttributeObject()->getValidateRules();

        if (!empty($validateRules)) {
            $validatorXmlObj = $fieldXmlObj->addValidator();
            if (!empty($validateRules['input_validation'])) {
                $validatorXmlObj->addRule(array('type' => $validateRules['input_validation']));
            }
        }

        return $this;
    }
}


text:
class SuperPacksController < ApplicationController

  def index
    @projects = DirectoriesController::PROJECTS
  end

  def create
    project = DirectoriesController::PROJECTS[params[:project]]
    lock_file_path = "#{DirectoriesController::PROJECTS_ROOT}/#{project[:path]}/super_pack.lock"

    return render json: {msg: 'error', error: "#{project[:label]}打包被锁定,请稍等!"}, status: 400 if File.exist?(lock_file_path)

    #FIXME:创建者id修改
    lock_content = {
        flavor: params[:flavor],
        creator_id: current_user[:user_id]
    }
    code = File.open(lock_file_path, 'w+') do |file|
      file.write(lock_content.to_json)
    end
    if code
      render json: {msg: 'ok'}
    else
      render json: {msg: 'error'}, status: 400
    end
  end

  #获取某个应用下所有的flavor
  def flavors
    project = DirectoriesController::PROJECTS[params[:project]]
    @flavors = Directory.children("#{DirectoriesController::PROJECTS_ROOT}/#{project[:path]}").select { |f| !f.file? }
    # respond_to do |format|
    #   format.json { render json: @flavors }
    #   format.html
    # end
    render layout: nil
  end
end


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using FluentAssertions;
using Manatee.Trello.Tests.Common;
using NUnit.Framework;
using DateTime = System.DateTime;

namespace Manatee.Trello.IntegrationTests
{
	[TestFixture]
	public class CustomFieldTests
	{
		[Test]
		public Task NumberFieldsHaveNames()
		{
			return TestEnvironment.RunClean(async () =>
				{
					await TestEnvironment.Current.Board.EnsurePowerUp(new CustomFieldsPowerUp());

					var card = await TestEnvironment.Current.BuildCard();
					var fieldDef = await TestEnvironment.Current.Board.CustomFields.Add($"{nameof(NumberFieldsHaveNames)}TooYouKnow", CustomFieldType.Number);

					var field = await fieldDef.SetValueForCard(card, 9.54);

					Assert.AreEqual($"{nameof(NumberFieldsHaveNames)}TooYouKnow", field.Definition.Name);
					Assert.AreEqual(9.54, field.Value);
				});
		}
		[Test]
		public Task TextFieldsHaveNames()
		{
			return TestEnvironment.RunClean(async () =>
				{
					await TestEnvironment.Current.Board.EnsurePowerUp(new CustomFieldsPowerUp());

					var card = await TestEnvironment.Current.BuildCard();
					var fieldDef = await TestEnvironment.Current.Board.CustomFields.Add($"{nameof(TextFieldsHaveNames)}TooYouKnow", CustomFieldType.Text);

					var field = await fieldDef.SetValueForCard(card, "test");

					Assert.AreEqual($"{nameof(TextFieldsHaveNames)}TooYouKnow", field.Definition.Name);
					Assert.AreEqual("test", field.Value);
				});
		}
		[Test]
		public Task DateTimeFieldsHaveNames()
		{
			return TestEnvironment.RunClean(async () =>
				{
					await TestEnvironment.Current.Board.EnsurePowerUp(new CustomFieldsPowerUp());

					var card = await TestEnvironment.Current.BuildCard();
					var fieldDef = await TestEnvironment.Current.Board.CustomFields.Add($"{nameof(DateTimeFieldsHaveNames)}TooYouKnow", CustomFieldType.DateTime);

					var field = await fieldDef.SetValueForCard(card, DateTime.Today);

					Assert.AreEqual($"{nameof(DateTimeFieldsHaveNames)}TooYouKnow", field.Definition.Name);
					Assert.AreEqual(DateTime.Today, field.Value);
				});
		}
		[Test]
		public Task CheckboxFieldsHaveNames()
		{
			return TestEnvironment.RunClean(async () =>
				{
					await TestEnvironment.Current.Board.EnsurePowerUp(new CustomFieldsPowerUp());

					var card = await TestEnvironment.Current.BuildCard();
					var fieldDef = await TestEnvironment.Current.Board.CustomFields.Add($"{nameof(CheckboxFieldsHaveNames)}TooYouKnow", CustomFieldType.CheckBox);

					var field = await fieldDef.SetValueForCard(card, true);

					Assert.AreEqual($"{nameof(CheckboxFieldsHaveNames)}TooYouKnow", field.Definition.Name);
					Assert.AreEqual(true, field.Value);
				});
		}
		[Test]
		public Task DropDownFieldsHaveNames()
		{
			return TestEnvironment.RunClean(async () =>
				{
					await TestEnvironment.Current.Board.EnsurePowerUp(new CustomFieldsPowerUp());

					var card = await TestEnvironment.Current.BuildCard();
					var selection = DropDownOption.Create("test1");
					var fieldDef = await TestEnvironment.Current.Board.CustomFields.Add($"{nameof(DropDownFieldsHaveNames)}TooYouKnow", CustomFieldType.DropDown,
					                                                                    CancellationToken.None, selection, DropDownOption.Create("test2"));
					selection = fieldDef.Options.FirstOrDefault(o => o.Text == selection.Text);
					var field = await fieldDef.SetValueForCard(card, selection);

					Assert.AreEqual($"{nameof(DropDownFieldsHaveNames)}TooYouKnow", field.Definition.Name);
					Assert.AreEqual(selection.Text, field.Value.Text);
				});
		}

		[Test]
		public async Task BoardRefreshWithCardsGetsCustomTextFieldDefinitionName()
		{
			await TestEnvironment.Current.Board.EnsurePowerUp(new CustomFieldsPowerUp());
			var card = await TestEnvironment.Current.BuildCard();
			var fieldDef = await TestEnvironment.Current.Board.CustomFields.Add(nameof(BoardRefreshWithCardsGetsCustomTextFieldDefinitionName), CustomFieldType.Text);
			var field = await fieldDef.SetValueForCard(card, "test");
			field.Definition.Name.Should().Be(nameof(BoardRefreshWithCardsGetsCustomTextFieldDefinitionName));

			await card.Refresh();
			card.CustomFields[0].Definition.Name.Should().Be(nameof(BoardRefreshWithCardsGetsCustomTextFieldDefinitionName));

			await TestEnvironment.RunClean(async () =>
				{
					try
					{
						Board.DownloadedFields |= Board.Fields.Cards;
						var board = TestEnvironment.Current.Factory.Board(TestEnvironment.Current.Board.Id);
						await board.Refresh();

						board.Cards[card.Id].CustomFields[0].Definition.Name.Should().Be(nameof(BoardRefreshWithCardsGetsCustomTextFieldDefinitionName));
					}
					finally
					{
						Board.DownloadedFields &= ~Board.Fields.Cards;
					}
				});
		}

		[Test]
		public async Task BoardRefreshWithCardsGetsCustomNumberFieldDefinitionName()
		{
			await TestEnvironment.Current.Board.EnsurePowerUp(new CustomFieldsPowerUp());
			var card = await TestEnvironment.Current.BuildCard();
			var fieldDef = await TestEnvironment.Current.Board.CustomFields.Add(nameof(BoardRefreshWithCardsGetsCustomNumberFieldDefinitionName), CustomFieldType.Number);
			var field = await fieldDef.SetValueForCard(card, 4.5);
			field.Definition.Name.Should().Be(nameof(BoardRefreshWithCardsGetsCustomNumberFieldDefinitionName));

			await card.Refresh();
			card.CustomFields[0].Definition.Name.Should().Be(nameof(BoardRefreshWithCardsGetsCustomNumberFieldDefinitionName));

			await TestEnvironment.RunClean(async () =>
				{
					try
					{
						Board.DownloadedFields |= Board.Fields.Cards;
						var board = TestEnvironment.Current.Factory.Board(TestEnvironment.Current.Board.Id);
						await board.Refresh();

						board.Cards[card.Id].CustomFields[0].Definition.Name.Should().Be(nameof(BoardRefreshWithCardsGetsCustomNumberFieldDefinitionName));
					}
					finally
					{
						Board.DownloadedFields &= ~Board.Fields.Cards;
					}
				});
		}

	}
}


text:
<?php

?>
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <META Http-Equiv="Cache-Control" Content="no-cache">
    <META Http-Equiv="Pragma" Content="no-cache">
    <META Http-Equiv="Expires" Content="0">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title><?php echo $core_settings->company;?></title>

    <link href="<?php echo base_url()?>assets/blueline/css/bootstrap.min.css" rel="stylesheet">
    <link href="<?php echo base_url()?>assets/blueline/css/blueline.css" rel="stylesheet">
    <link href="<?php echo base_url()?>assets/blueline/css/user.css" rel="stylesheet" />

     <link rel="SHORTCUT ICON" href="<?php echo base_url()?>assets/blueline/img/favicon.ico"/>

        <?php echo $yield?>

    <?php if($this->session->flashdata('message')) { $exp = explode(':', $this->session->flashdata('message'))?>
        <div class="notify <?php echo $exp[0]?>"><?php echo $exp[1]?>

    <?php } ?>