text:
<?xml version="1.0" encoding="UTF-8"?>
<billStatus>
  <bill>
    <latestAction>
      <text>Read twice and referred to the Committee on Health, Education, Labor, and Pensions. (text of measure as introduced: CR S2555)</text>
      <links />
      <actionDate>2017-04-26</actionDate>
    </latestAction>
    <titles>
      <item>
        <parentTitleType />
        <chamberCode />
        <titleType>(Extracted from GPO) Short Titles as Introduced</titleType>
        <title>New HOPE Act</title>
        <chamberName />
      </item>
      <item>
        <parentTitleType />
        <chamberCode />
        <titleType>(Extracted from GPO) Short Titles as Introduced</titleType>
        <title>New Hope and Opportunity through the Power of Employment Act</title>
        <chamberName />
      </item>
      <item>
        <parentTitleType />
        <chamberCode />
        <titleType>Short Titles as Introduced</titleType>
        <title>New HOPE Act</title>
        <chamberName />
      </item>
      <item>
        <parentTitleType />
        <chamberCode />
        <titleType>Short Titles as Introduced</titleType>
        <title>New Hope and Opportunity through the Power of Employment Act</title>
        <chamberName />
      </item>
      <item>
        <parentTitleType />
        <chamberCode />
        <titleType>Official Title as Introduced</titleType>
        <title>A bill to amend the Carl D. Perkins Career and Technical Education Act of 2006 to authorize funds to identify and eliminate excessive occupational licensure.</title>
        <chamberName />
      </item>
      <item>
        <parentTitleType />
        <chamberCode />
        <titleType>Display Title</titleType>
        <title>New HOPE Act</title>
        <chamberName />
      </item>
    </titles>
    <summaries>
      <billSummaries>
        <item>
          <actionDesc>Introduced in Senate</actionDesc>
          <text><![CDATA[
New Hope and Opportunity through the Power of Employment Act or the New HOPE Act

This bill amends the Carl D. Perkins Career and Technical Education Act of 2006 to require state leadership activities funded by the Act to include consulting and coordinating with other state agencies for the identification, consolidation, or elimination of licenses or certifications that pose an unnecessary barrier to entry for aspiring workers and provide limited consumer protection.
]]></text>
          <versionCode>00</versionCode>
          <updateDate>2017-04-26T04:00:00Z</updateDate>
          <name>Introduced in Senate</name>
          <actionDate>2017-04-26</actionDate>
          <lastSummaryUpdateDate>2017-09-26T17:18:59Z</lastSummaryUpdateDate>
        </item>
      </billSummaries>
    </summaries>
    <cboCostEstimates />
    <createDate>2017-04-27T00:41:42Z</createDate>
    <updateDate>2017-09-29T04:34:16Z</updateDate>
    <committeeReports />
    <laws />
    <policyArea>
      <name>Education</name>
    </policyArea>
    <introducedDate>2017-04-26</introducedDate>
    <cosponsors>
      <item>
        <identifiers>
          <lisID>1929</lisID>
          <gpoId>7994</gpoId>
          <bioguideId>P000595</bioguideId>
        </identifiers>
        <sponsorshipDate>2017-04-26</sponsorshipDate>
        <fullName>Sen. Peters, Gary C. [D-MI]</fullName>
        <lastName>Peters</lastName>
        <party>D</party>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <bioguideId>P000595</bioguideId>
        <middleName>C.</middleName>
        <state>MI</state>
        <firstName>Gary</firstName>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <lisID>2080</lisID>
          <gpoId>8303</gpoId>
          <bioguideId>L000577</bioguideId>
        </identifiers>
        <sponsorshipDate>2017-07-12</sponsorshipDate>
        <fullName>Sen. Lee, Mike [R-UT]</fullName>
        <lastName>Lee</lastName>
        <party>R</party>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <bioguideId>L000577</bioguideId>
        <middleName />
        <state>UT</state>
        <firstName>Mike</firstName>
        <sponsorshipWithdrawnDate />
      </item>
      <item>
        <identifiers>
          <lisID>2185</lisID>
          <gpoId />
          <bioguideId>K000383</bioguideId>
        </identifiers>
        <sponsorshipDate>2017-07-12</sponsorshipDate>
        <fullName>Sen. King, Angus S., Jr. [I-ME]</fullName>
        <lastName>King</lastName>
        <party>I</party>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <bioguideId>K000383</bioguideId>
        <middleName />
        <state>ME</state>
        <firstName>Angus</firstName>
        <sponsorshipWithdrawnDate />
      </item>
    </cosponsors>
    <calendarNumbers />
    <subjects>
      <billSubjects>
        <policyArea>
          <name>Education</name>
        </policyArea>
        <legislativeSubjects>
          <item>
            <name>Education programs funding</name>
          </item>
          <item>
            <name>Employment and training programs</name>
          </item>
          <item>
            <name>Licensing and registrations</name>
          </item>
          <item>
            <name>State and local government operations</name>
          </item>
          <item>
            <name>Vocational and technical education</name>
          </item>
        </legislativeSubjects>
      </billSubjects>
    </subjects>
    <billNumber>945</billNumber>
    <actions>
      <actionTypeCounts>
        <referredToCommittee>1</referredToCommittee>
        <introducedInSenate>1</introducedInSenate>
      </actionTypeCounts>
      <item>
        <actionDate>2017-04-26</actionDate>
        <committee>
          <name>Health, Education, Labor, and Pensions Committee</name>
          <systemCode>sshr00</systemCode>
        </committee>
        <links>
          <link>
            <url>https://www.congress.gov/congressional-record/volume-163/senate-section/page/S2555</url>
            <name>S2555</name>
          </link>
        </links>
        <sourceSystem>
          <name>Senate</name>
          0
        </sourceSystem>
        <text>Read twice and referred to the Committee on Health, Education, Labor, and Pensions. (text of measure as introduced: CR S2555)</text>
        <type>IntroReferral</type>
      </item>
      <item>
        <actionCode>10000</actionCode>
        <committee />
        <text>Introduced in Senate</text>
        <type>IntroReferral</type>
        <links />
        <sourceSystem>
          <name>Library of Congress</name>
          9
        </sourceSystem>
        <actionDate>2017-04-26</actionDate>
      </item>
      <actionByCounts>
        <senate>2</senate>
      </actionByCounts>
    </actions>
    <originChamber>Senate</originChamber>
    <version>1.0.0</version>
    <title>New HOPE Act</title>
    <billType>S</billType>
    <congress>115</congress>
    <recordedVotes />
    <sponsors>
      <item>
        <party>R</party>
        <byRequestType />
        <fullName>Sen. Cornyn, John [R-TX]</fullName>
        <middleName />
        <identifiers>
          <lisID>1692</lisID>
          <gpoId>8295</gpoId>
          <bioguideId>C001056</bioguideId>
        </identifiers>
        <firstName>John</firstName>
        <lastName>Cornyn</lastName>
        <state>TX</state>
        <bioguideId>C001056</bioguideId>
      </item>
    </sponsors>
    <committees>
      <billCommittees>
        <item>
          <systemCode>sshr00</systemCode>
          <activities>
            <item>
              <date>2017-04-26T15:28:59Z</date>
              <name>Referred to</name>
            </item>
          </activities>
          <name>Health, Education, Labor, and Pensions Committee</name>
          <type>Standing</type>
          <chamber>Senate</chamber>
          <subcommittees />
        </item>
      </billCommittees>
    </committees>
    <relatedBills>
      <item>
        <type>HR</type>
        <latestAction>
          <actionDate>2017-04-26</actionDate>
          <text>Referred to the House Committee on Education and the Workforce.</text>
        </latestAction>
        <congress>115</congress>
        <number>2155</number>
        <relationshipDetails>
          <item>
            <type>Identical bill</type>
            <identifiedBy>CRS</identifiedBy>
          </item>
        </relationshipDetails>
        <latestTitle>New HOPE Act</latestTitle>
      </item>
    </relatedBills>
    <amendments />
    <notes />
  </bill>
  <dublinCore xmlns:dc="http://purl.org/dc/elements/1.1/">
    <dc:format>text/xml</dc:format>
    <dc:language>EN</dc:language>
    <dc:rights>Pursuant to Title 17 Section 105 of the United States Code, this file is not subject to copyright protection and is in the public domain.</dc:rights>
    <dc:contributor>Congressional Research Service, Library of Congress</dc:contributor>
    <dc:description>This file contains bill summaries and statuses for federal legislation. A bill summary describes the most significant provisions of a piece of legislation and details the effects the legislative text may have on current law and federal programs. Bill summaries are authored by the Congressional Research Service (CRS) of the Library of Congress. As stated in Public Law 91-510 (2 USC 166 (d)(6)), one of the duties of CRS is "to prepare summaries and digests of bills and resolutions of a public general nature introduced in the Senate or House of Representatives". For more information, refer to the User Guide that accompanies this file.</dc:description>
  </dublinCore>
</billStatus>


text:
// Code generated by go-swagger; DO NOT EDIT.

package tag_definition

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"fmt"
	"io"

	"github.com/go-openapi/runtime"
	"github.com/killbill/kbcli/v2/kbcommon"

	strfmt "github.com/go-openapi/strfmt"

	kbmodel "github.com/killbill/kbcli/v2/kbmodel"
)

// GetTagDefinitionsReader is a Reader for the GetTagDefinitions structure.
type GetTagDefinitionsReader struct {
	formats strfmt.Registry
}

// ReadResponse reads a server response into the received o.
func (o *GetTagDefinitionsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {

	case 200:
		result := NewGetTagDefinitionsOK()
		result.HttpResponse = response
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil
	default:
		errorResult := kbcommon.NewKillbillError(response.Code())
		if err := consumer.Consume(response.Body(), &errorResult); err != nil && err != io.EOF {
			return nil, err
		}
		return nil, errorResult
	}
}

// NewGetTagDefinitionsOK creates a GetTagDefinitionsOK with default headers values
func NewGetTagDefinitionsOK() *GetTagDefinitionsOK {
	return &GetTagDefinitionsOK{}
}

/*GetTagDefinitionsOK handles this case with default header values.

successful operation
*/
type GetTagDefinitionsOK struct {
	Payload []*kbmodel.TagDefinition

	HttpResponse runtime.ClientResponse
}

func (o *GetTagDefinitionsOK) Error() string {
	return fmt.Sprintf("[GET /1.0/kb/tagDefinitions][%d] getTagDefinitionsOK  %+v", 200, o.Payload)
}

func (o *GetTagDefinitionsOK) GetPayload() []*kbmodel.TagDefinition {
	return o.Payload
}

func (o *GetTagDefinitionsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {

	// response payload
	if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
		return err
	}

	return nil
}

redpajama_set_name: RedPajamaGithub


text:
FactoryGirl.define do

  factory :store do
    name { Faker::Company.name }
    address { Faker::Address.street_address }
  end

end


text:
const fs = require("fs-extra");
const Config = require('../Modules/Config.js');

module.exports = {
  prefixes: {},

    setUp: function ()
    {
        // Read all the servers alises and compile into the object

        // Get all GUILDS
        var guilds = fs.readdirSync('./guilds');

        // Check if the item is a directory
        guilds.forEach( guild => {

            // Is it is not a directory
            if (!fs.lstatSync(`./guilds/${guild}`).isDirectory())
                return;

            // Check if it does not has a alias file
            if (!fs.existsSync(`./guilds/${guild}/prefixes.json`))
            {
                this.prefixes[guild] = Config.prefixes;
                return;
            };

            // Read alises into string
            var prefixesTEXT = fs.readFileSync(`./guilds/${guild}/prefixes.json`);

            // Parse aliases into object
            var prefixesObject = JSON.parse(prefixesTEXT);
            // Append it to the alises object

            if (prefixesObject.hasOwnProperty('prefixes')){
                var p = (prefixesObject.prefixes.length > 0) ? prefixesObject.prefixes : Config.prefixes;
                this.prefixes[guild] = prefixesObject.prefixes;
            }
        });
    },

    add: function (guild, prefix)
    {
        guild = guild.toLowerCase();

        // Guild not in prefixes object
        if (!this.prefixes.hasOwnProperty(guild))
            return;

        // Prefix already taken
        var index = this.prefixes[guild].indexOf(prefix);
        if (index != -1)
            return;

        // Add to prefixes object
        this.prefixes[guild].push(prefix[0]);

        // Update file
        this.updateFile(guild);
    },

    remove: function (guild, prefix)
    {
        guild = guild.toLowerCase();
        prefix = prefix.toLowerCase();

        // Guild is not in aliase object
        if (!this.prefixes.hasOwnProperty(guild))
            return;

        var index = this.prefixes[guild].indexOf(prefix);

        // Prefix is not in array
        if (index == -1)
            return;

        // Remove the prefix
        this.prefixes[guild].splice(index, 1);

        this.updateFile(guild);
    },

    updateFile(guild)
    {
        // Check if the guild does not have a json file
        /*if (!fs.existsSync(`./guilds/${guild.toLowerCase()}/prefixes.json`))
        {
            return;
        }*/

        // If there is no object in alises for guild
        if (!this.prefixes.hasOwnProperty(guild.toLowerCase()))
        {
            console.log("No alises for guild?");
            return;
        }

        // Write prefixes to file
        var data = this.prefixes[guild.toLowerCase()];
        var jData = {"prefixes":data};
        fs.writeFileSync(`./guilds/${guild.toLowerCase()}/prefixes.json`, JSON.stringify(jData));
    }
};


text:
<?php

class NearestPOIPageTest extends SapphireTest
{
    protected static $fixture_file = 'mappable-poi/tests/pointsofinterest.yml';

    public function testCMSFields()
    {
        $np = new NearestPOIPage();
        $fields = $np->getCMSFields();
        $tab = $fields->findOrMakeTab('Root.Layer');
        $fields = $tab->FieldList();
        $names = array();
        foreach ($fields as $field) {
            $names[] = $field->getName();
        }
        $expected = array('PointsOfInterestLayerID');
        $this->assertEquals($expected, $names);
    }
}


text:
@class CAEAGLLayer;

namespace sky {
namespace shell {

class IOSGLContext;

class PlatformViewIOS : public PlatformView {
 public:
  explicit PlatformViewIOS(CAEAGLLayer* layer);

  ~PlatformViewIOS() override;

  ftl::WeakPtr<sky::shell::PlatformView> GetWeakViewPtr() override;

  uint64_t DefaultFramebuffer() const override;

  bool ContextMakeCurrent() override;

  bool ResourceContextMakeCurrent() override;

  bool SwapBuffers() override;

 private:
  std::unique_ptr<IOSGLContext> context_;
  ftl::WeakPtrFactory<PlatformViewIOS> weak_factory_;

  FTL_DISALLOW_COPY_AND_ASSIGN(PlatformViewIOS);
};

}  // namespace shell
}  // namespace sky

#endif  // SKY_SHELL_PLATFORM_IOS_PLATFORM_VIEW_IOS_H_


text:
SUBDIR=		contrib doc font man src tmac

.include <bsd.subdir.mk>


text:
<?php

require_once 'PHPUnit/Autoload.php';

use SimpleMailReceiver\Receiver;
use SimpleMailReceiver\Commons\Collection;
use Symfony\Component\Yaml\Yaml;

class ReceiverTest extends \PHPUnit_Framework_TestCase
{

    /**
     * @var Receiver
     */
    private $receiver;

    /**
     * @var array
     */
    private $config;

    protected function setUp()
    {
        $yaml         = new Yaml();
        $config = $yaml->parse(file_get_contents('tests/SimpleMailReceiver/test_config.yml'));//tests/SimpleMailReceiver/test_config.yml
        $this->config = new Collection(array(
            'username' => $config['username'],
            'password' => $config['password'],
            'host' => $config['host'],
            'port' => $config['port'],
            'protocol' => $config['protocol'],
            'folder' => $config['folder'],
            'ssl' => $config['ssl']
        ));
        $this->receiver = new Receiver($this->config);
        $this->receiver->connect();
    }

    /**
     * @expectedException InvalidArgumentException
     * @expectedExceptionMessage Config must be an array or Collection
     */
    public function testSetConfig()
    {
        $arr = array(
            'username' => 'username',
            'password' => 'password',
            'host'     => 'host'
        );
        $this->receiver->setConfig($arr);
        $this->receiver->setConfig(5699);
    }

    public function testPing()
    {
        $this->assertTrue($this->receiver->ping());
        $this->receiver->close();
    }

    public function testGetMailById()
    {
        $mail = $this->receiver->getMail(1);
        $this->assertContains('prueba', $mail->getBody());
        $this->receiver->close();
    }

    public function testGetAllMails()
    {
        $mails = $this->receiver->getMails();
        $this->assertEquals(8, iterator_count($mails));
        $this->receiver->close();
    }

    public function testSizeMailBox()
    {
        $this->assertEquals(8, $this->receiver->countAllMails());
        $this->receiver->close();
    }

    public function testCountUnreadBox()
    {
        $this->assertEquals(0, $this->receiver->countUnreadMails());
        $this->receiver->close();
    }

    public function testSearchMails()
    {
        $this->assertEquals(array(5,6,7), $this->receiver->searchMails('FROM "jlcardosa@gmail.com"'));
        $this->receiver->close();
    }

    public function testDeleteMail()
    {
        $this->receiver->deleteMail(15);
        $this->receiver->close();
    }

}


text:
package org.personal.secondlib;

public class JavaThriftDemo {
    public static void main(String[] args) {
        org.first.kvpair.KeyValuePair kvp = new org.first.kvpair.KeyValuePair();
        org.second.specific.Payload payload = new org.second.specific.Payload();
        System.out.println("Created thrift based objects in Java.\n");
    }
}


text:
"""Tests for the misc checker."""

import unittest

from pylint.checkers import misc
from pylint.testutils import (
    CheckerTestCase, Message,
    set_config, create_file_backed_module,
)

class FixmeTest(CheckerTestCase):
    CHECKER_CLASS = misc.EncodingChecker

    def test_fixme(self):
        with create_file_backed_module(
            """a = 1
            # FIXME """) as module:
            with self.assertAddsMessages(
                Message(msg_id='fixme', line=2, args=u'FIXME')):
                self.checker.process_module(module)

    @set_config(notes=[])
    def test_empty_fixme_regex(self):
        with create_file_backed_module(
            """a = 1
            # fixme
            """) as module:
            with self.assertNoMessages():
                self.checker.process_module(module)

if __name__ == '__main__':
    unittest.main()


text:
import webob.exc

from glance.api import policy
from glance.common import exception
from glance.common import property_utils
import glance.context
from glance.tests.unit import base

CONFIG_SECTIONS = [
    '^x_owner_.*',
    'spl_create_prop',
    'spl_read_prop',
    'spl_read_only_prop',
    'spl_update_prop',
    'spl_update_only_prop',
    'spl_delete_prop',
    '.*'
]

def create_context(policy, roles=[]):
    return glance.context.RequestContext(roles=roles,
                                         policy_enforcer=policy)

class TestPropertyRulesWithRoles(base.IsolatedUnitTest):

    def setUp(self):
        super(TestPropertyRulesWithRoles, self).setUp()
        self.set_property_protections()
        self.policy = policy.Enforcer()

    def tearDown(self):
        super(TestPropertyRulesWithRoles, self).tearDown()

    def test_is_property_protections_enabled_true(self):
        self.config(property_protection_file="property-protections.conf")
        self.assertTrue(property_utils.is_property_protection_enabled())

    def test_is_property_protections_enabled_false(self):
        self.config(property_protection_file=None)
        self.assertFalse(property_utils.is_property_protection_enabled())

    def test_property_protection_file_doesnt_exist(self):
        self.config(property_protection_file='fake-file.conf')
        self.assertRaises(exception.InvalidPropertyProtectionConfiguration,
                          property_utils.PropertyRules)

    def test_property_protection_with_malformed_rule(self):
        malformed_rules = {'^[0-9)': {'create': ['fake-role'],
                                      'read': ['fake-role'],
                                      'update': ['fake-role'],
                                      'delete': ['fake-role']}}
        self.set_property_protection_rules(malformed_rules)
        self.assertRaises(exception.InvalidPropertyProtectionConfiguration,
                          property_utils.PropertyRules)

    def test_property_protection_with_missing_operation(self):
        rules_with_missing_operation = {'^[0-9]': {'create': ['fake-role'],
                                                   'update': ['fake-role'],
                                                   'delete': ['fake-role']}}
        self.set_property_protection_rules(rules_with_missing_operation)
        self.assertRaises(exception.InvalidPropertyProtectionConfiguration,
                          property_utils.PropertyRules)

    def test_property_protection_with_misspelt_operation(self):
        rules_with_misspelt_operation = {'^[0-9]': {'create': ['fake-role'],
                                                    'rade': ['fake-role'],
                                                    'update': ['fake-role'],
                                                    'delete': ['fake-role']}}
        self.set_property_protection_rules(rules_with_misspelt_operation)
        self.assertRaises(exception.InvalidPropertyProtectionConfiguration,
                          property_utils.PropertyRules)

    def test_property_protection_with_whitespace(self):
        rules_whitespace = {
            '^test_prop.*': {
                'create': ['member ,fake-role'],
                'read': ['fake-role, member'],
                'update': ['fake-role,  member'],
                'delete': ['fake-role,   member']
            }
        }
        self.set_property_protection_rules(rules_whitespace)
        self.rules_checker = property_utils.PropertyRules()
        self.assertTrue(self.rules_checker.check_property_rules('test_prop_1',
                        'read', create_context(self.policy, ['member'])))
        self.assertTrue(self.rules_checker.check_property_rules('test_prop_1',
                        'read', create_context(self.policy, ['fake-role'])))

    def test_check_property_rules_invalid_action(self):
        self.rules_checker = property_utils.PropertyRules(self.policy)
        self.assertFalse(self.rules_checker.check_property_rules('test_prop',
                         'hall', create_context(self.policy, ['admin'])))

    def test_check_property_rules_read_permitted_admin_role(self):
        self.rules_checker = property_utils.PropertyRules(self.policy)
        self.assertTrue(self.rules_checker.check_property_rules('test_prop',
                        'read', create_context(self.policy, ['admin'])))

    def test_check_property_rules_read_permitted_specific_role(self):
        self.rules_checker = property_utils.PropertyRules(self.policy)
        self.assertTrue(self.rules_checker.check_property_rules(
                        'x_owner_prop', 'read',
                        create_context(self.policy, ['member'])))

    def test_check_property_rules_read_unpermitted_role(self):
        self.rules_checker = property_utils.PropertyRules(self.policy)
        self.assertFalse(self.rules_checker.check_property_rules('test_prop',
                         'read', create_context(self.policy, ['member'])))

    def test_check_property_rules_create_permitted_admin_role(self):
        self.rules_checker = property_utils.PropertyRules(self.policy)
        self.assertTrue(self.rules_checker.check_property_rules('test_prop',
                        'create', create_context(self.policy, ['admin'])))

    def test_check_property_rules_create_permitted_specific_role(self):
        self.rules_checker = property_utils.PropertyRules(self.policy)
        self.assertTrue(self.rules_checker.check_property_rules(
                        'x_owner_prop', 'create',
                        create_context(self.policy, ['member'])))

    def test_check_property_rules_create_unpermitted_role(self):
        self.rules_checker = property_utils.PropertyRules(self.policy)
        self.assertFalse(self.rules_checker.check_property_rules('test_prop',
                         'create', create_context(self.policy, ['member'])))

    def test_check_property_rules_update_permitted_admin_role(self):
        self.rules_checker = property_utils.PropertyRules(self.policy)
        self.assertTrue(self.rules_checker.check_property_rules('test_prop',
                        'update', create_context(self.policy, ['admin'])))

    def test_check_property_rules_update_permitted_specific_role(self):
        self.rules_checker = property_utils.PropertyRules(self.policy)
        self.assertTrue(self.rules_checker.check_property_rules(
                        'x_owner_prop', 'update',
                        create_context(self.policy, ['member'])))

    def test_check_property_rules_update_unpermitted_role(self):
        self.rules_checker = property_utils.PropertyRules(self.policy)
        self.assertFalse(self.rules_checker.check_property_rules('test_prop',
                         'update', create_context(self.policy, ['member'])))

    def test_check_property_rules_delete_permitted_admin_role(self):
        self.rules_checker = property_utils.PropertyRules(self.policy)
        self.assertTrue(self.rules_checker.check_property_rules('test_prop',
                        'delete', create_context(self.policy, ['admin'])))

    def test_check_property_rules_delete_permitted_specific_role(self):
        self.rules_checker = property_utils.PropertyRules(self.policy)
        self.assertTrue(self.rules_checker.check_property_rules(
                        'x_owner_prop', 'delete',
                        create_context(self.policy, ['member'])))

    def test_check_property_rules_delete_unpermitted_role(self):
        self.rules_checker = property_utils.PropertyRules(self.policy)
        self.assertFalse(self.rules_checker.check_property_rules('test_prop',
                         'delete', create_context(self.policy, ['member'])))

    def test_property_config_loaded_in_order(self):
        """
        Verify the order of loaded config sections matches that from the
        configuration file
        """
        self.rules_checker = property_utils.PropertyRules(self.policy)
        self.assertEqual(property_utils.CONFIG.sections(), CONFIG_SECTIONS)

    def test_property_rules_loaded_in_order(self):
        """
        Verify rules are iterable in the same order as read from the config
        file
        """
        self.rules_checker = property_utils.PropertyRules(self.policy)
        for i in xrange(len(property_utils.CONFIG.sections())):
            self.assertEqual(property_utils.CONFIG.sections()[i],
                             self.rules_checker.rules[i][0].pattern)

class TestPropertyRulesWithPolicies(base.IsolatedUnitTest):

    def setUp(self):
        super(TestPropertyRulesWithPolicies, self).setUp()
        self.set_property_protections(use_policies=True)
        self.policy = policy.Enforcer()
        self.rules_checker = property_utils.PropertyRules(self.policy)

    def tearDown(self):
        super(TestPropertyRulesWithPolicies, self).tearDown()

    def test_check_property_rules_create_permitted_specific_policy(self):
        self.assertTrue(self.rules_checker.check_property_rules(
                        'spl_creator_policy', 'create',
                        create_context(self.policy, ['spl_role'])))

    def test_check_property_rules_create_unpermitted_policy(self):
        self.assertFalse(self.rules_checker.check_property_rules(
                         'spl_creator_policy', 'create',
                         create_context(self.policy, ['fake-role'])))

    def test_check_property_rules_read_permitted_specific_policy(self):
        self.assertTrue(self.rules_checker.check_property_rules(
                        'spl_creator_policy', 'read',
                        create_context(self.policy, ['spl_role'])))

    def test_check_property_rules_read_unpermitted_policy(self):
        self.assertFalse(self.rules_checker.check_property_rules(
                         'spl_creator_policy', 'read',
                         create_context(self.policy, ['fake-role'])))

    def test_check_property_rules_update_permitted_specific_policy(self):
        self.assertTrue(self.rules_checker.check_property_rules(
                        'spl_creator_policy', 'update',
                        create_context(self.policy, ['admin'])))

    def test_check_property_rules_update_unpermitted_policy(self):
        self.assertFalse(self.rules_checker.check_property_rules(
                         'spl_creator_policy', 'update',
                         create_context(self.policy, ['fake-role'])))

    def test_check_property_rules_delete_permitted_specific_policy(self):
        self.assertTrue(self.rules_checker.check_property_rules(
                        'spl_creator_policy', 'delete',
                        create_context(self.policy, ['admin'])))

    def test_check_property_rules_delete_unpermitted_policy(self):
        self.assertFalse(self.rules_checker.check_property_rules(
                         'spl_creator_policy', 'delete',
                         create_context(self.policy, ['fake-role'])))

    def test_property_protection_with_malformed_rule(self):
        malformed_rules = {'^[0-9)': {'create': ['fake-policy'],
                                      'read': ['fake-policy'],
                                      'update': ['fake-policy'],
                                      'delete': ['fake-policy']}}
        self.set_property_protection_rules(malformed_rules)
        self.assertRaises(exception.InvalidPropertyProtectionConfiguration,
                          property_utils.PropertyRules)

    def test_property_protection_with_multiple_policies(self):
        malformed_rules = {'^x_.*': {'create': ['fake-policy, another_pol'],
                                     'read': ['fake-policy'],
                                     'update': ['fake-policy'],
                                     'delete': ['fake-policy']}}
        self.set_property_protection_rules(malformed_rules)
        self.assertRaises(exception.InvalidPropertyProtectionConfiguration,
                          property_utils.PropertyRules)


text:
package com.mcoding.base.member.web.controller.member;

import java.util.Date;
import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.math.RandomUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import com.mcoding.base.core.CommonException;
import com.mcoding.base.core.JsonResult;
import com.mcoding.base.core.PageView;
import com.mcoding.base.member.bean.member.Member;
import com.mcoding.base.member.bean.member.MemberExample;
import com.mcoding.base.member.bean.member.MemberExample.Criteria;
import com.mcoding.base.member.service.member.MemberExtInfoService;
import com.mcoding.base.member.service.member.MemberService;
import com.mcoding.base.member.utils.MemberConstant;
import com.mcoding.base.ui.utils.common.Constant;
import com.mcoding.comp.sms.SmsManager;
import com.mcoding.comp.sms.SmsResponse;
import com.mcoding.comp.sms.utils.SmsConstanst;
import com.mcoding.comp.sms.utils.Supplier;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import springfox.documentation.annotations.ApiIgnore;

@Api("会员管理")
@Controller
@RequestMapping("member")
public class MemberController {

	@Resource
	protected MemberService memberService;

	@Resource
	protected MemberExtInfoService memberExtInfoService;

	/**
	 * 修改当前用户的资料
	 * @param member
	 * @return
	 * @throws Exception
	 */
	@ApiOperation(value="请求获取手机验证码", httpMethod="GET")
	@RequestMapping("front/sendVerifyCode")
	@ResponseBody
	public JsonResult<String> sendVerifyCode(String phoneNum, HttpSession session) throws Exception{
		if (StringUtils.isBlank(phoneNum) || !phoneNum.matches(MemberConstant.PHONE_NUM_REGEX)) {
			throw new CommonException("手机的格式不正确,请重新输入.");
		}

		Date verifyTime = (Date) session.getAttribute("verifyTimeForMember");
		Date now = new Date();

		if(verifyTime != null && (now.getTime() - verifyTime.getTime()) < 5000){
			throw new CommonException("验证码请求太频繁了,请稍候再请求");
		}
		session.setAttribute("verifyTimeForMember", now);

		String verifyCode = String.valueOf(RandomUtils.nextInt(8999) + 1000) ;
		String content = "正在修改个人资料,验证码["+verifyCode+"]";

		SmsResponse smsResponse = SmsManager.getInstance(Supplier.BAY_YUE).sendSingleMsgWithoutReport(phoneNum, content);
//		SmsResponse smsResponse = SmsManager.getInstance(Supplier.BAI_XI).sendSingleMsgWithoutReport(phoneNum, content);
//		SmsResponse smsResponse = SmsManager.getInstance(Supplier.MAI_CHE).sendSingleMsgWithoutReport(phoneNum, content);
		if (!SmsConstanst.SUCCESS_RESPONSE_CODE.equals(smsResponse.getRespstatus())) {
			throw new CommonException("获取验证码失败,因为:" +smsResponse.getRespMsg());
		}
		session.setAttribute("verifyCodeForMember", verifyCode);
		session.setAttribute("newPhoneNum", phoneNum);

		JsonResult<String> result = new JsonResult<>();
		result.setData(null);
		result.setMsg("ok");
		result.setStatus("00");
		return result;
	}

	/**
	 * 修改当前用户的资料
	 * @param member
	 * @return
	 */
	@ApiOperation(value="完善当前的会员信息", httpMethod="GET")
	@RequestMapping("front/editCurrentMember")
	@ResponseBody
	public JsonResult<String> editCurrentMember(@RequestBody Member member, String verifyCode, HttpSession session){
		Member memberInSession = (Member) session.getAttribute("member");
		if (memberInSession == null || (memberInSession.getId() == null || memberInSession.getId() == 0)) {
			throw new CommonException("获取用户信息失败,请重新进入公众号登陆。");
		}

//		Member origin = (Member) session.getAttribute("member");

		if(StringUtils.isBlank(memberInSession.getMobilephone())
				|| (StringUtils.isNotBlank(member.getMobilephone()) && !memberInSession.getMobilephone().equals(member.getMobilephone()))){
			String newPhone = (String) session.getAttribute("newPhoneNum");
			if (!newPhone.equals(member.getMobilephone()) ) {
				throw new CommonException("提交的电话号码,与验证的号码不一致,请重新输入");
			}
			this.checkVerifyCode(session, verifyCode);
		}

		Integer memberId = memberInSession.getId();
		member.setId(memberId);

		JsonResult<String> result = new JsonResult<>();
		this.memberService.modifyObj(member);
		member = this.memberService.queryObjById(memberId);
		session.setAttribute("member", member);
		result.setData(null);
		result.setMsg("ok");
		result.setStatus("00");
		return result;
	}

	private void checkVerifyCode(HttpSession session, String verifyCode){
		String verifyCodeForMember = (String) session.getAttribute("verifyCodeForMember");
		Date verifyTime = (Date) session.getAttribute("verifyTimeForMember");

		if (StringUtils.isBlank(verifyCodeForMember) || StringUtils.isBlank(verifyCode) || !verifyCodeForMember.equals(verifyCode)) {
			throw new CommonException("验证码不正确,请重试");
		}

		if(verifyTime != null ){
			Date now = new Date();
			long expiredTime = verifyTime.getTime() + 120 * 1000;
			if(now.getTime() > expiredTime){
				throw new CommonException("时间已超过2分钟,验证码已过期,请重新请求验证码");
			}
		}
	}

	/**
	 * 获取当前会员信息
	 */
	@ApiOperation(value="获取当前的会员信息", httpMethod="GET")
	@RequestMapping("front/findCurrentMember")
	@ResponseBody
	public JsonResult<Member> findCurrentMember(HttpServletRequest request) {
		JsonResult<Member> result = new JsonResult<>();

		// 获取session里面保存的对象
		Member memberInSession = (Member) request.getSession().getAttribute("member");
		if (memberInSession == null || (memberInSession.getId() == null || memberInSession.getId() == 0)) {
			throw new CommonException("获取用户信息失败,请重新进入公众号登陆。");
		}
		Integer id = memberInSession.getId();

		Member member = this.memberService.queryObjById(id);
		result.setData(member);
		result.setMsg("ok");
		result.setStatus("00");

		return result;
	}

	@ApiOperation(httpMethod="GET", value="根据openid登录")
	@RequestMapping("front/loginByOpenid")
	@ResponseBody
	public JsonResult<Member> loginByOpenId(String openid, HttpSession session){
		Member member = this.memberService.queryByOpenId(openid);
		if (member == null) {
			throw new CommonException("获取用户信息失败,请跳转授权url。");
		}

		session.setAttribute("member", member);

		JsonResult<Member> result = new JsonResult<>();
		result.setData(member);
		result.setMsg("ok");
		result.setStatus("00");

		return result;
	}

	/**
	 * 查询会员列表信息
	 * @param typeMember 会员分类
	 * @param industry 行业
	 * @param interest 兴趣
	 * @param province
	 * @param city
	 * @param district
	 * @param pageNo
	 * @param pageSize
	 * @param sSearch
	 * @return
	 */
	@ApiOperation(value="分页查看会员列表", httpMethod="GET")
	@RequestMapping("service/findByPage")
	@ResponseBody
	public PageView<Member> findByPage(
			@RequestParam(value = "type", required=false) List<Integer> typeMember,
			@RequestParam(value = "industry", required=false) List<Integer> industry,
			@RequestParam(value = "interest", required=false) List<Integer> interest,
			@RequestParam(defaultValue="0") String iDisplayStart,
			@RequestParam(defaultValue="10") String iDisplayLength,
			String province, String city, String district, String sSearch) {
		MemberExample exampleOne = new MemberExample();
		PageView<Member> pageView = new PageView<>(iDisplayStart, iDisplayLength);
		exampleOne.setPageView(pageView);

		if (StringUtils.isNotBlank(sSearch)) {
			Criteria cri1 = exampleOne.createCriteria();
			cri1.andNameLike(sSearch + "%");
			Criteria cri2 = exampleOne.or();
			cri2.andTrueNameLike(sSearch +"%");
			if (StringUtils.isNumeric(sSearch)) {
				exampleOne.or().andMobilephoneLike(sSearch + "%");
			}
		}

		exampleOne.setOrderByClause("create_time DESC");
		return this.memberService.queryObjByPage(exampleOne);

	}

	/**
	 * 添加会员
	 *
	 * @param member
	 * @return
	 */
	@ApiOperation(value="添加会员", httpMethod="POST")
	@RequestMapping("service/create")
	@ResponseBody
	public JsonResult<String> create(@ApiParam(value="会员信息") @RequestBody Member member) {
		JsonResult<String> result = new JsonResult<>();
		member.setIsEnable(1);
		this.memberService.addObj(member);
		result.setData(null);
		result.setMsg("ok");
		result.setStatus("00");
		return result;
	}

	/**
	 * 修改会员
	 *
	 * @param member
	 * @return
	 */
	@ApiOperation(value="修改会员", httpMethod="POST", notes="注意必须带有会员的ID")
	@RequestMapping(value={"service/edit"})
	@ResponseBody
	public JsonResult<String> edit(@RequestBody Member member) {
		JsonResult<String> result = new JsonResult<>();
		this.memberService.modifyObj(member);
		result.setData(null);
		result.setMsg("ok");
		result.setStatus("00");
		return result;
	}

	/**
	 * 查看会员详情
	 *
	 * @param memberId
	 * @return
	 */
	@ApiOperation(value="查看会员详情", httpMethod="GET")
	@RequestMapping("service/findByMemberId")
	@ResponseBody
	public JsonResult<Member> findByMemberId(int memberId) {
		JsonResult<Member> result = new JsonResult<>();
		Member member = this.memberService.queryObjById(memberId);
		result.setData(member);
		result.setMsg("ok");
		result.setStatus("00");
		return result;
	}

	@ApiOperation(value="禁用会员", httpMethod="GET")
	@RequestMapping("service/setIsEnableById")
	@ResponseBody
	public JsonResult<String> disableMember(int id, int isEnable) {
		JsonResult<String> result = new JsonResult<String>();
		Member member = this.memberService.queryObjById(id);
		if (member == null) {
			throw new CommonException("找不到该会员信息,请刷新重试");
		}
		Member m = new Member();
		if (Constant.YES_INT.equals(isEnable)) {
			m.setIsEnable(Constant.YES_INT);
		}else{
			m.setIsEnable(Constant.NO_INT);
		}
		m.setId(member.getId());
		this.memberService.modifyObj(m);
		result.setMsg("ok");
		result.setStatus("00");
		return result;
	}

	// 设置访问页面
	@ApiIgnore
	@RequestMapping("/service/toMainView")
	@ResponseBody
	public ModelAndView toNewMemberListForView() {
		ModelAndView mav = new ModelAndView();
		mav.setViewName("member/member/toMainView");
		return mav;
	}

	// 查看会员详情页面
	@ApiIgnore
	@RequestMapping("/service/toUpdateViewById")
	@ResponseBody
	public ModelAndView toUpdateViewById(int memberId) {
		ModelAndView mav = new ModelAndView();
		Member member = this.memberService.queryObjById(memberId);
		mav.addObject("member", member);
		mav.setViewName("member/member/toAddView");
		return mav;
	}

	// 添加会员页面
	@ApiOperation(value="添加会员页面", httpMethod="GET")
	@RequestMapping("/service/toAddView")
	@ResponseBody
	public ModelAndView toAddView() {
		ModelAndView mav = new ModelAndView();
		mav.setViewName("member/member/toAddView");
		return mav;
	}

}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ERMine.Core.Modeling
{
    public class Attribute : IEntityRelationship
    {
        public string Label { get; set; }
        public string DataType { get; set; }
        public Domain Domain { get; set; }
        public bool IsConstrainedDomain
        {
            get { return Domain != null; }
        }
        public bool IsNullable { get; set; }
        public bool IsSparse { get; set; }
        public bool IsImmutable { get; set; }
        public KeyType Key { get; set; }
        public bool IsPartOfPrimaryKey
        {
            get { return Key == KeyType.Primary; }
            set { Key = value ? KeyType.Primary : KeyType.None; }
        }
        public bool IsPartOfPartialKey
        {
            get { return Key == KeyType.Partial; }
            set { Key = value ? KeyType.Partial : KeyType.None; }
        }
        public bool IsMultiValued { get; set; }
        public bool IsDerived { get; set; }
        public string DerivedFormula { get; set; }
        public bool IsDefault { get; set; }
        public string DefaultFormula { get; set; }
    }
}


text:
Tutorial
========

Observing changes in directories
--------------------------------
.. literalinclude:: tutorial/001-observing-directories/spreadflow.conf
   :language: python

Using Duplicate and Filter
--------------------------
.. literalinclude:: tutorial/002-duplicate-and-filter/spreadflow.conf
   :language: python

Using Loadfile and SetComputedValue
-----------------------------------
.. literalinclude:: tutorial/003-loadfile-computed-value/spreadflow.conf
   :language: python

Using MapReduce
---------------
.. literalinclude:: tutorial/004-mapreduce/spreadflow.conf
   :language: python


text:
/*global less*/
define({
    load: function (name, req, load, config, map) {
        var url = (config.baseUrl || '') + name + (!/\.(?:css|less)$/.test(name) ? '.less' : ''),
            path = url.split('/'),
            linkElement = document.createElement('link'),
            headElement = document.getElementsByTagName('head')[0],
            parentModuleName = map && map.parentMap && map.parentMap.name,
            parentScriptElement;

        linkElement.setAttribute('href', url);
        linkElement.setAttribute('rel', 'stylesheet');

        if (parentModuleName) {
            for (var i = 0 ; i < headElement.childNodes.length ; i += 1) {
                var childNode = headElement.childNodes[i];
                if (childNode.nodeType === 1 && childNode.nodeName.toLowerCase() === 'script' && childNode.getAttribute('data-requiremodule') === parentModuleName) {
                    parentScriptElement = childNode;
                    break;
                }
            }
        }

        if (parentScriptElement) {
            headElement.insertBefore(linkElement, parentScriptElement);
        } else {
            headElement.appendChild(linkElement);
        }
        load();
    }
});


text:
function chk_show_tables(J)
  assert(type(J) == "table")
end


text:
(function($){
  // appui library is mandatory
  if ( !window.appui ){
    alert("There is no appui");
    return false;
  }

  appui.app.loading = function(id, url){
    // The notification widget DOM element
    var ele = $("#appui_loading"),
    // The notification widget
        widget = false,

        show = function(url){
          _init();
          widget.show({url: url}, "loading");
        },

        setID = function(id){
          if ( !id ){
            id = (new Date()).getTime();
          }
          widget.getNotifications().last().data("appui-id", id);
          return id;
        },

        getFromID = function(id){
          if ( widget ){
            return widget.getNotifications().filter(function(){
              //appui.fn.log("COMPARE", $(this).data("appui-id"), id);
              return $(this).data("appui-id") === id;
            }).first();
          }
          return [];
        },

        deleteFromID = function(id){
          var $ele = getFromID(id),
              $close = $ele.find(".appui-notification-close:visible");
          //appui.fn.log(id, $ele, close);
          if ( $close.length ){
            $close.click();
          }
          else{
            $ele.parent().fadeOut("fast", function(){
              $(this).remove();
            });
          }
        },

        deleteAll = function(){
          widget.hide();
        },

        _init = function(show){
          if ( !ele.length ){
            ele = $('

').appendTo(document.body);
            ele.kendoNotification({
              autoHideAfter: 0,
              hide: function(e){
                e.preventDefault();
                var $p = e.element.parent(),
                    h = $p.outerHeight(true) + 4;
                $p.nextAll(".k-animation-container").each(function(){
                  ele.animate({top: (parseFloat(ele.css('top')) + h) + 'px'});
                });
                setTimeout(function(){
                  $p.remove();
                }, 500);
              },
              position: {
                bottom: 5,
                right: 5
              },
              stacking: "up",
              hideOnClick: true,
              button: true,
              templates: [{
                // define a custom template for the built-in "loading" notification type
                type: "loading",
                template: function(d){
                  return '
' +
                    '
 ' +
                    appui.lng.loading +
                    ( d.url ? '

' + d.url : '' ) +
                    '

';
                }
              }]
            });
          }
          widget = ele.data("kendoNotification");
        };
    if ( id ){
      _init();
      if ( getFromID(id).length ){
        return deleteFromID(id);
      }
    }
    if ( id === false ){
      return deleteAll();
    }
    _init(true);
    show(url);
    return setID(id ? id : false);
  }
})(jQuery);


text:
Este es un bot para el juego de navegador online Travian. Está preparado para conectarse a un servidor predeterminado por
código, pero se puede cambiar fácilmente y que sirva para cualquier servidor.


text:
using System.Collections.Generic;

namespace Tup.Cobar4Net.Parser.Ast.Expression.Primary.Function.Info
{
    /// <author>
    ///     QIU Shuo
    /// </author>
    public class Coercibility : FunctionExpression
    {
        public Coercibility(IList<IExpression> arguments)
            : base("COERCIBILITY", arguments)
        {
        }

        public override FunctionExpression ConstructFunction(IList<IExpression> arguments)
        {
            return new Coercibility(arguments);
        }
    }
}


text:
layout: post
title: Polymer
tags: [polymer]
categories: [general bootstrap]
---
Polymer is a new technology built upon Web Components which makes building cool apps much simpler


text:
rake db:reset RAILS_ENV=production
rm log/*
if [ $# -eq 1 ]; then
  BENCHMARK_MODULES=$1 rails s -e production
else
  rails s -e production
fi


text:
this.chongdashu = this.chongdashu||{};

(function() {
    "use strict";

/**
 * EnemyComponent
 * @class EnemyComponent
 * @constructor
 **/
var EnemyComponent = function(entity) {
    // @param {Phaser.Keyboard} entity
    this.init(entity);
};
var p = chongdashu.Utils.extend(EnemyComponent, chongdashu.Component);

    // Type
    // ----
    EnemyComponent.TYPE = "component:EnemyComponent";

    EnemyComponent.ENEMY_FLYING = "EnemyComponent:flying";
    EnemyComponent.ENEMY_GROUND = "EnemyComponent:ground";

    p.enemyType = null;

    p.init = function(entity)
    {
        console.log("[EnemyComponent], init()");
        this.Component_init(entity, EnemyComponent.TYPE);

        // Init goes here
        // --------------
        this.enemyType = EnemyComponent.ENEMY_FLYING;
    };

    p.update = function() {
        this.Component_update();

        // Update goes here
        // ----------------
    };

    p.getEnemy = function() {
        return this.enemyGroup.length;
    };

// Link
// ----
chongdashu.EnemyComponent = chongdashu.Utils.promote(EnemyComponent, "Component");

}());


text:
<?php

/**
 * Writes data to a KeyCache using a stream.
 *
 * @author     Chris Corbyn
 */
class Swift_KeyCache_SimpleKeyCacheInputStream implements Swift_KeyCache_KeyCacheInputStream {

    /** The KeyCache being written to */
    private $_keyCache;

    /** The nsKey of the KeyCache being written to */
    private $_nsKey;

    /** The itemKey of the KeyCache being written to */
    private $_itemKey;

    /** A stream to write through on each write() */
    private $_writeThrough = null;

    /**
     * Set the KeyCache to wrap.
     *
     * @param Swift_KeyCache $keyCache
     */
    public function setKeyCache(Swift_KeyCache $keyCache) {
        $this->_keyCache = $keyCache;
    }

    /**
     * Specify a stream to write through for each write().
     *
     * @param Swift_InputByteStream $is
     */
    public function setWriteThroughStream(Swift_InputByteStream $is) {
        $this->_writeThrough = $is;
    }

    /**
     * Writes $bytes to the end of the stream.
     *
     * @param string                $bytes
     * @param Swift_InputByteStream $is    optional
     */
    public function write($bytes, Swift_InputByteStream $is = null) {
        $this->_keyCache->setString(
                $this->_nsKey, $this->_itemKey, $bytes, Swift_KeyCache::MODE_APPEND
        );
        if (isset($is)) {
            $is->write($bytes);
        }
        if (isset($this->_writeThrough)) {
            $this->_writeThrough->write($bytes);
        }
    }

    /**
     * Not used.
     */
    public function commit() {

    }

    /**
     * Not used.
     */
    public function bind(Swift_InputByteStream $is) {

    }

    /**
     * Not used.
     */
    public function unbind(Swift_InputByteStream $is) {

    }

    /**
     * Flush the contents of the stream (empty it) and set the internal pointer
     * to the beginning.
     */
    public function flushBuffers() {
        $this->_keyCache->clearKey($this->_nsKey, $this->_itemKey);
    }

    /**
     * Set the nsKey which will be written to.
     *
     * @param string $nsKey
     */
    public function setNsKey($nsKey) {
        $this->_nsKey = $nsKey;
    }

    /**
     * Set the itemKey which will be written to.
     *
     * @param string $itemKey
     */
    public function setItemKey($itemKey) {
        $this->_itemKey = $itemKey;
    }

    /**
     * Any implementation should be cloneable, allowing the clone to access a
     * separate $nsKey and $itemKey.
     */
    public function __clone() {
        $this->_writeThrough = null;
    }

}


text:
package com.google.gson;

import junit.framework.TestCase;

/**
 * Performs some unit testing for the {@link Escaper} class.
 *
 * @author Joel Leitch
 */
public class EscaperTest extends TestCase {

	private Escaper escapeHtmlChar;
	private Escaper noEscapeHtmlChar;

	@Override
	protected void setUp() throws Exception {
		super.setUp();
		escapeHtmlChar = new Escaper(true);
		noEscapeHtmlChar = new Escaper(false);
	}

	public void testNoSpecialCharacters() {
		String value = "Testing123";
		String escapedString = escapeHtmlChar.escapeJsonString(value);
		assertEquals(value, escapedString);
	}

	public void testNewlineEscaping() throws Exception {
		String containsNewline = "123\n456";
		String escapedString = escapeHtmlChar.escapeJsonString(containsNewline);
		assertEquals("123\\n456", escapedString);
	}

	public void testCarrageReturnEscaping() throws Exception {
		String containsCarrageReturn = "123\r456";
		String escapedString = escapeHtmlChar.escapeJsonString(containsCarrageReturn);
		assertEquals("123\\r456", escapedString);
	}

	public void testTabEscaping() throws Exception {
		String containsTab = "123\t456";
		String escapedString = escapeHtmlChar.escapeJsonString(containsTab);
		assertEquals("123\\t456", escapedString);
	}

	public void testDoubleQuoteEscaping() throws Exception {
		String containsQuote = "123\"456";
		String escapedString = escapeHtmlChar.escapeJsonString(containsQuote);
		assertEquals("123\\\"456", escapedString);
	}

	public void testSingleQuoteEscaping() throws Exception {
		String containsQuote = "123'456";
		String escapedString = escapeHtmlChar.escapeJsonString(containsQuote);
		assertEquals("123\\u0027456", escapedString);
	}

	public void testLineSeparatorEscaping() throws Exception {
		String src = "123\u2028 456";
		String escapedString = escapeHtmlChar.escapeJsonString(src);
		assertEquals("123\\u2028 456", escapedString);
	}

	public void testParagraphSeparatorEscaping() throws Exception {
		String src = "123\u2029 456";
		String escapedString = escapeHtmlChar.escapeJsonString(src);
		assertEquals("123\\u2029 456", escapedString);
	}

	public void testControlCharBlockEscaping() throws Exception {
		for (char c = '\u007f'; c <= '\u009f'; ++c) {
			String src = "123 " + c + " 456";
			String escapedString = escapeHtmlChar.escapeJsonString(src);
			assertFalse(src.equals(escapedString));
		}
	}

	public void testEqualsEscaping() throws Exception {
		String containsEquals = "123=456";
		int index = containsEquals.indexOf('=');
		String unicodeValue = convertToUnicodeString(Character.codePointAt(containsEquals, index));
		String escapedString = escapeHtmlChar.escapeJsonString(containsEquals);
		assertEquals("123" + unicodeValue + "456", escapedString);

		escapedString = noEscapeHtmlChar.escapeJsonString(containsEquals);
		assertEquals(containsEquals, escapedString);
	}

	public void testGreaterThanAndLessThanEscaping() throws Exception {
		String containsLtGt = "123>456<";
		int gtIndex = containsLtGt.indexOf('>');
		int ltIndex = containsLtGt.indexOf('<');
		String gtAsUnicode = convertToUnicodeString(Character.codePointAt(containsLtGt, gtIndex));
		String ltAsUnicode = convertToUnicodeString(Character.codePointAt(containsLtGt, ltIndex));

		String escapedString = escapeHtmlChar.escapeJsonString(containsLtGt);
		assertEquals("123" + gtAsUnicode + "456" + ltAsUnicode, escapedString);

		escapedString = noEscapeHtmlChar.escapeJsonString(containsLtGt);
		assertEquals(containsLtGt, escapedString);
	}

	public void testAmpersandEscaping() throws Exception {
		String containsAmp = "123&456";
		int ampIndex = containsAmp.indexOf('&');
		String ampAsUnicode = convertToUnicodeString(Character.codePointAt(containsAmp, ampIndex));

		String escapedString = escapeHtmlChar.escapeJsonString(containsAmp);
		assertEquals("123" + ampAsUnicode + "456", escapedString);

		escapedString = noEscapeHtmlChar.escapeJsonString(containsAmp);
		assertEquals(containsAmp, escapedString);

		char ampCharAsUnicode = '\u0026';
		String containsAmpUnicode = "123" + ampCharAsUnicode + "456";
		escapedString = escapeHtmlChar.escapeJsonString(containsAmpUnicode);
		assertEquals("123" + ampAsUnicode + "456", escapedString);

		escapedString = noEscapeHtmlChar.escapeJsonString(containsAmpUnicode);
		assertEquals(containsAmp, escapedString);
	}

	public void testSlashEscaping() throws Exception {
		String containsSlash = "123\\456";
		String escapedString = escapeHtmlChar.escapeJsonString(containsSlash);
		assertEquals("123\\\\456", escapedString);
	}

	public void testSingleQuoteNotEscaped() throws Exception {
		String containsSingleQuote = "123'456";
		String escapedString = noEscapeHtmlChar.escapeJsonString(containsSingleQuote);
		assertEquals(containsSingleQuote, escapedString);
	}

	public void testRequiredEscapingUnicodeCharacter() throws Exception {
		char unicodeChar = '\u2028';
		String unicodeString = "Testing" + unicodeChar;

		String escapedString = escapeHtmlChar.escapeJsonString(unicodeString);
		assertFalse(unicodeString.equals(escapedString));
		assertEquals("Testing\\u2028", escapedString);
	}

	public void testUnicodeCharacterStringNoEscaping() throws Exception {
		String unicodeString = "\u0065\u0066";

		String escapedString = escapeHtmlChar.escapeJsonString(unicodeString);
		assertEquals(unicodeString, escapedString);
	}

	/*
	public void testChineseCharacterEscaping() throws Exception {
	  String unicodeString = "\u597d\u597d\u597d";
	  String chineseString = "好好好";
	  assertEquals(unicodeString, chineseString);

	  String expectedEscapedString = "\\u597d\\u597d\\u597d";
	  String escapedString = Escaper.escapeJsonString(chineseString);
	  assertEquals(expectedEscapedString, escapedString);
	}
	 */

	private String convertToUnicodeString(int codepoint) {
		String hexValue = Integer.toHexString(codepoint);
		StringBuilder sb = new StringBuilder("\\u");
		for (int i = 0; i < 4 - hexValue.length(); i++) {
			sb.append(0);
		}
		sb.append(hexValue);

		return sb.toString().toLowerCase();
	}
}


text:
package org.jetbrains.plugins.scala.codeInspection.collections

import org.jetbrains.plugins.scala.lang.psi.api.expr._

import scala.annotation.tailrec
import scala.collection.mutable.ArrayBuffer

/**
 * @author Nikolay.Tropin
 */
class MethodRepr private (val itself: ScExpression,
                          val optionalBase: Option[ScExpression],
                          val optionalMethodRef: Option[ScReferenceExpression],
                          val args: Seq[ScExpression])

object MethodRepr {
  //method represented by optional base expression, optional method reference and arguments
  def unapply(expr: ScExpression): Option[(ScExpression, Option[ScExpression], Option[ScReferenceExpression], Seq[ScExpression])] = {
    expr match {
      case call: ScMethodCall =>
        val args = call.args match {
          case exprList: ScArgumentExprList => exprList.exprs.map(stripped)
          case _ => Nil
        }
        call.getEffectiveInvokedExpr match {
          case baseExpr: ScExpression if call.isApplyOrUpdateCall && !call.isUpdateCall =>
            Some(expr, Some(baseExpr), None, args)
          case ref: ScReferenceExpression => Some(expr, ref.qualifier, Some(ref), args)
          case genericCall: ScGenericCall =>
            genericCall.referencedExpr match {
              case ref: ScReferenceExpression => Some(expr, ref.qualifier, Some(ref), args)
              case _ => Some(expr, None, None, args)
            }
          case methCall: ScMethodCall => Some(expr, Some(methCall), None, args)
          case _ => Some(expr, None, None, args)
        }
      case ScInfixExpr.withAssoc(base, operation, argument) =>
        val args = argument match {
          case tuple: ScTuple => tuple.exprs
          case _ => Seq(argument)
        }
        Some(expr, Some(stripped(base)), Some(operation), args)
      case prefix: ScPrefixExpr => Some(expr, Some(stripped(prefix.getBaseExpr)), Some(prefix.operation), Seq())
      case postfix: ScPostfixExpr => Some(expr, Some(stripped(postfix.getBaseExpr)), Some(postfix.operation), Seq())
      case refExpr: ScReferenceExpression =>
        refExpr.getParent match {
          case _: ScGenericCall => None
          case mc: ScMethodCall if !mc.isApplyOrUpdateCall => None
          case ScInfixExpr(_, `refExpr`, _) => None
          case ScPostfixExpr(_, `refExpr`) => None
          case ScPrefixExpr(`refExpr`, _) => None
          case _ => Some(expr, refExpr.qualifier, Some(refExpr), Seq())
        }
      case genCall: ScGenericCall =>
        genCall.getParent match {
          case mc: ScMethodCall if !mc.isApplyOrUpdateCall => None
          case _ => genCall.referencedExpr match {
            case ref: ScReferenceExpression => Some(genCall, ref.qualifier, Some(ref), Seq.empty)
            case _ => Some(genCall, None, None, Seq.empty)
          }
        }
      case _ => None
    }
  }

  def apply(itself: ScExpression, optionalBase: Option[ScExpression], optionalMethodRef: Option[ScReferenceExpression], args: Seq[ScExpression]): MethodRepr = {
    new MethodRepr(itself, optionalBase, optionalMethodRef, args)
  }

}

object MethodSeq {
  def unapplySeq(expr: ScExpression): Option[Seq[MethodRepr]] = {
    val result = ArrayBuffer[MethodRepr]()
    @tailrec
    def extractMethods(expr: ScExpression) {
      expr match {
        case MethodRepr(_, optionalBase, optionalMethodRef, args) =>
          result += MethodRepr(expr, optionalBase, optionalMethodRef, args)
          optionalBase match {
            case Some(ScParenthesisedExpr(inner)) => extractMethods(stripped(inner))
            case Some(expression) => extractMethods(expression)
            case _ =>
          }
        case _ =>
      }
    }
    extractMethods(expr)
    if (result.nonEmpty) Some(result) else None
  }
}


text:
/**
 * The Form Builder Settings Modal Component
 *
 * @module aui-form-builder
 * @submodule aui-form-builder-settings-modal
 */

var CSS_BTN_PRIMARY = A.getClassName('btn', 'primary'),
    CSS_FIELD_SETTINGS = A.getClassName('form', 'builder', 'field', 'settings'),
    CSS_FIELD_SETTINGS_CANCEL =
        A.getClassName('form', 'builder', 'field', 'settings', 'cancel'),
    CSS_FIELD_SETTINGS_SAVE =
        A.getClassName('form', 'builder', 'field', 'settings', 'save'),
    CSS_MODAL_TITLE = A.getClassName('modal', 'title');

/**
 * Fired when the modal is hidden.
 *
 * @event hide
 */

/**
 * Fired when the modal is saved.
 *
 * @event save
 */

/**
 * A base class for `A.FormBuilderSettingsModal`. It's responsible for the modal that
 * is used by the form builder for editing a field's settings.
 *
 * @class A.FormBuilderSettingsModal
 * @extends A.Base
 * @param {Object} config Object literal specifying widget configuration
 *     properties.
 * @constructor
 */
A.FormBuilderSettingsModal = A.Base.create('form-builder-settings-modal', A.Base, [], {
    TPL_FIELD_SETTINGS_HEAD_CONTENT: '

',

    /**
     * Destructor lifecycle implementation for the `A.FormBuilderSettingsModal` class.
     * Lifecycle.
     *
     * @method destructor
     * @protected
     */
    destructor: function() {
        if (this._modal) {
            this._modal.destroy();
        }
    },

    /**
     * Hides the settings modal for the given field.
     *
     * @method hide
     */
    hide: function() {
        if (this._modal) {
            this._modal.hide();
        }

        if (this._eventToggleAdvancedContent) {
            this._eventToggleAdvancedContent.detach();
        }
    },

    /**
     * Shows the settings panel for the given field.
     *
     * @method show
     * @param {A.FormField} field
     * @param {String} typeName The name of the field type.
     */
    show: function(field, typeName) {
        var bodyNode,
            firstInput;

        if (!this._modal) {
            this._create();
        }

        bodyNode = this._modal.getStdModNode(A.WidgetStdMod.BODY);
        bodyNode.empty();
        field.renderSettingsPanel(bodyNode);

        this._modal.get('boundingBox').one('.' + CSS_MODAL_TITLE).set('text', typeName);

        this._modal.show();
        this._modal.align();

        firstInput = bodyNode.one('input[type="text"]');
        if (firstInput) {
            firstInput.focus();
        }

        this._eventToggleAdvancedContent = field.on('contentToggle', A.bind(this._updateModalOnContentToggle, this));

        this._fieldBeingEdited = field;
    },

    /**
     * Fired after the `visible` attribute from the modal instance changes.
     *
     * @method _afterModalVisibleChange
     * @param {EventFacade} event
     * @protected
     */
    _afterModalVisibleChange: function(event) {
        if (!event.newVal) {
            this.fire('hide');
        }
    },

    /**
     * Creates and renders the field settings modal for the first time.
     *
     * @method _create
     * @protected
     */
    _create: function() {
        this._modal = new A.Modal({
            centered: true,
            cssClass: CSS_FIELD_SETTINGS,
            draggable: false,
            modal: true,
            headerContent: this.TPL_FIELD_SETTINGS_HEAD_CONTENT,
            resizable: false,
            zIndex: 4
        }).render();

        this._modal.addToolbar(
            [
                {
                    cssClass: [CSS_BTN_PRIMARY, CSS_FIELD_SETTINGS_SAVE].join(' '),
                    label: 'Save',
                    on: {
                        click: A.bind(this._save, this)
                    },
                    render: true
                },
                {
                    cssClass: CSS_FIELD_SETTINGS_CANCEL,
                    label: 'Cancel',
                    on: {
                        click: A.bind(this.hide, this)
                    },
                    render: true
                }
            ],
            A.WidgetStdMod.FOOTER
        );

        this._modal.after('visibleChange', A.bind(this._afterModalVisibleChange, this));
    },

    /**
     * Saves the settings for the field currently being edited.
     *
     * @method _save
     * @protected
     */
    _save: function() {
        if (this._fieldBeingEdited.validateSettings()) {
            this._fieldBeingEdited.saveSettings();

            this.fire('save', {
                field: this._fieldBeingEdited
            });
            this.hide();
        }
    },

    /**
     * Toggle back and close button on small screen and update Modal height.
     *
     * @method _updateModalOnContentToggle
     * @protected
     */
    _updateModalOnContentToggle: function() {
        this._modal.align();
    }
});


text:
import React from 'react'
import styled from 'styled-components'
import Button from '@material-ui/core/Button';
import PlayArrowIcon from '@material-ui/icons/PlayArrow';

const Header = styled.div`
  background-color: #2196f3;
  padding: 10px;
`

export default ({onPresentClicked}) =>
  <Header>

  <Button variant="contained" size="small" onClick={() => onPresentClicked()}>
    <PlayArrowIcon style={{fontSize: '18px'}} /> Present
  </Button>

  </Header>


text:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<string name="low_memory_error">"Imeshindwa kukamilisha jukumu lililotangulia kwa sababu ya nafasi ndogo ya hifadhi"</string>
<string name="opening_file_error">"Imeshindwa kufungua faili iliyochaguliwa"</string>
<string name="color_picker_button_more">"Zaidi"</string>
<string name="color_picker_hue">"Rangi"</string>
<string name="color_picker_saturation">"Kukolea"</string>
<string name="color_picker_value">"Thamani"</string>
<string name="color_picker_button_set">"Weka"</string>
<string name="color_picker_button_cancel">"Ghairi"</string>
<string name="color_picker_dialog_title">"Chagua rangi"</string>
</resources>


text:
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:id="@+id/remove_friend"
        android:title="Remove Friend"
        android:icon="@mipmap/ic_launcher"
        />

</menu>


text:
require 'rfg_api_test'

class GlobalTest < RFGAPITest
  def test_1
    request = {
      favicon_generation: {
        api_key: "87d5cd739b05c00416c4a19cd14a8bb5632ea563",
        master_picture: {
          type: :inline,
          content: "#{to_base64('resources/master_1_120x120.png')}"
        },
        favicon_design: {
          windows: {
            picture_aspect: :white_silhouette,
            background_color: '#789abc',
            on_conflict: :override,
            assets: {
              windows_80_ie_10_tile: true,
              windows_10_ie_11_edge_tiles: {
                small: true, medium: true, big: true, rectangle: true
              }
            }
          },
          coast: {
            picture_aspect: :background_and_margin,
              background_color: '#97af12',
              margin: '30%'
          },
          open_graph: {
            picture_aspect: :background_and_margin,
            background_color: '#794613',
            margin: '20%',
            ratio: '1.91:1'
          }
        },
        settings: {
          compression: 2,
          scaling_algorithm: 'NearestNeighbor',
          error_on_image_too_small: false,
          # Wait, what is this undocumented parameter?
          # When set to true, it ask RFG to post back the request in the response.
          # In a non-interactive scenario, it doesn't make any sense
          # (although is is interesting in an interactive scenario)
          # Here it is usefull because it allows us to test the feature.
          get_api_request: true,
          readme_file: true,
			    html_code_file: false,
          use_path_as_is: false
        },
        versioning: {
          param_name: 'abc',
          param_value: '123'
        }
      }
    }

    response = RestClient.post("https://realfavicongenerator.net/api/favicon", request.to_json, content_type: :json)

    response = JSON.parse response.body

    assert_equal 'success', response['favicon_generation_result']['result']['status']

    # Returned request is not exactly identical to the original one
    request[:favicon_generation][:settings].delete :get_api_request

    assert_equal JSON.parse(request.to_json),
      JSON.parse(response['favicon_generation_result']['non_interactive_request'])
  end

  def test_2
    request = {
      favicon_generation: {
        api_key: "87d5cd739b05c00416c4a19cd14a8bb5632ea563",
        master_picture: {
          type: :inline,
          content: "#{to_base64('resources/master_1_120x120.png')}"
        },
        favicon_design: {
          windows: {
            picture_aspect: :white_silhouette,
            background_color: '#789abc',
            on_conflict: :override,
            assets: {
              windows_80_ie_10_tile: true,
              windows_10_ie_11_edge_tiles: {
                small: true, medium: true, big: true, rectangle: true
              }
            }
          },
          coast: {
            picture_aspect: :background_and_margin,
              background_color: '#97af12',
              margin: '30%'
          },
          open_graph: {
            picture_aspect: :background_and_margin,
            background_color: '#794613',
            margin: '20%',
            ratio: '1.91:1'
          }
        },
        settings: {
          compression: 2,
          scaling_algorithm: 'NearestNeighbor',
          error_on_image_too_small: false,
          # Wait, what is this undocumented parameter?
          # When set to true, it ask RFG to post back the request in the response.
          # In a non-interactive scenario, it doesn't make any sense
          # (although is is interesting in an interactive scenario)
          # Here it is usefull because it allows us to test the feature.
          get_api_request: true,
          readme_file: false,
          use_path_as_is: true
        },
        versioning: {
          param_name: 'abc',
          param_value: '123'
        }
      }
    }

    response = RestClient.post("https://realfavicongenerator.net/api/favicon", request.to_json, content_type: :json)

    response = JSON.parse response.body

    assert_equal 'success', response['favicon_generation_result']['result']['status']

    # Returned request is not exactly identical to the original one
    request[:favicon_generation][:settings].delete :get_api_request

    assert_equal JSON.parse(request.to_json),
      JSON.parse(response['favicon_generation_result']['non_interactive_request'])
  end

  def test_3
    request = {
      favicon_generation: {
        api_key: "87d5cd739b05c00416c4a19cd14a8bb5632ea563",
        master_picture: {
          type: :inline,
          content: "#{to_base64('resources/master_1_120x120.png')}"
        },
        favicon_design: {
          windows: {
            picture_aspect: :white_silhouette,
            background_color: '#789abc',
            on_conflict: :override,
            assets: {
              windows_80_ie_10_tile: true,
              windows_10_ie_11_edge_tiles: {
                small: true, medium: true, big: true, rectangle: true
              }
            }
          },
          coast: {
            picture_aspect: :background_and_margin,
              background_color: '#97af12',
              margin: '30%'
          },
          open_graph: {
            picture_aspect: :background_and_margin,
            background_color: '#794613',
            margin: '20%',
            ratio: '1.91:1'
          }
        },
        settings: {
          compression: 2,
          scaling_algorithm: 'NearestNeighbor',
          error_on_image_too_small: false,
          # Wait, what is this undocumented parameter?
          # When set to true, it ask RFG to post back the request in the response.
          # In a non-interactive scenario, it doesn't make any sense
          # (although is is interesting in an interactive scenario)
          # Here it is usefull because it allows us to test the feature.
          get_api_request: true,
          html_code_file: true
        },
        versioning: {
          param_name: 'abc',
          param_value: '123'
        }
      }
    }

    response = RestClient.post("https://realfavicongenerator.net/api/favicon", request.to_json, content_type: :json)

    response = JSON.parse response.body

    assert_equal 'success', response['favicon_generation_result']['result']['status']

    # Returned request is not exactly identical to the original one
    request[:favicon_generation][:settings].delete :get_api_request

    assert_equal JSON.parse(request.to_json),
      JSON.parse(response['favicon_generation_result']['non_interactive_request'])
  end
end


text:
package sqlite3

/*
#ifndef USE_LIBSQLITE3
#include <sqlite3-binding.h>
#else
#include <sqlite3.h>
#endif
*/
import "C"
import (
	"reflect"
	"time"
)

// ColumnTypeDatabaseTypeName implement RowsColumnTypeDatabaseTypeName.
func (rc *SQLiteRows) ColumnTypeDatabaseTypeName(i int) string {
	return C.GoString(C.sqlite3_column_decltype(rc.s.s, C.int(i)))
}

/*
func (rc *SQLiteRows) ColumnTypeLength(index int) (length int64, ok bool) {
	return 0, false
}

func (rc *SQLiteRows) ColumnTypePrecisionScale(index int) (precision, scale int64, ok bool) {
	return 0, 0, false
}
*/

// ColumnTypeNullable implement RowsColumnTypeNullable.
func (rc *SQLiteRows) ColumnTypeNullable(i int) (nullable, ok bool) {
	return true, true
}

// ColumnTypeScanType implement RowsColumnTypeScanType.
func (rc *SQLiteRows) ColumnTypeScanType(i int) reflect.Type {
	switch C.sqlite3_column_type(rc.s.s, C.int(i)) {
	case C.SQLITE_INTEGER:
		switch C.GoString(C.sqlite3_column_decltype(rc.s.s, C.int(i))) {
		case "timestamp", "datetime", "date":
			return reflect.TypeOf(time.Time{})
		case "boolean":
			return reflect.TypeOf(false)
		}
		return reflect.TypeOf(int64(0))
	case C.SQLITE_FLOAT:
		return reflect.TypeOf(float64(0))
	case C.SQLITE_BLOB:
		return reflect.SliceOf(reflect.TypeOf(byte(0)))
	case C.SQLITE_NULL:
		return reflect.TypeOf(nil)
	case C.SQLITE_TEXT:
		return reflect.TypeOf("")
	}
	return reflect.SliceOf(reflect.TypeOf(byte(0)))
}