text:
<mods xmlns="http://www.loc.gov/mods/v3" xmlns:exslt="http://exslt.org/common" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-3.xsd" version="3.3" ID="P0b002ee185595e4f">
<name type="corporate">
 <namePart>United States Government Printing Office</namePart>
 <role>
  <roleTerm type="text" authority="marcrelator">printer</roleTerm>
  <roleTerm type="code" authority="marcrelator">prt</roleTerm>
</role>
 <role>
  <roleTerm type="text" authority="marcrelator">distributor</roleTerm>
  <roleTerm type="code" authority="marcrelator">dst</roleTerm>
</role>
</name>
<name type="corporate">
 <namePart>United States</namePart>
 <namePart>United States District Court Eastern District of California</namePart>
 <role>
  <roleTerm type="text" authority="marcrelator">author</roleTerm>
  <roleTerm type="code" authority="marcrelator">aut</roleTerm>
</role>
 <description>Government Organization</description>
</name>
<typeOfResource>text</typeOfResource>
<genre authority="marcgt">government publication</genre>
<language>
 <languageTerm authority="iso639-2b" type="code">eng</languageTerm>
</language>
<extension>
 <collectionCode>USCOURTS</collectionCode>
 <category>Judicial Publications</category>
 <branch>judicial</branch>
 <dateIngested>2013-07-11</dateIngested>
</extension>
<originInfo>
 <publisher>Administrative Office of the United States Courts</publisher>
 <dateIssued encoding="w3cdtf">2013-07-10</dateIssued>
 <issuance>monographic</issuance>
</originInfo>
<physicalDescription>
 <note type="source content type">deposited</note>
 <digitalOrigin>born digital</digitalOrigin>
</physicalDescription>
<classification authority="sudocs">JU 4.15</classification>
<identifier type="uri">http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-2_12-cr-00302</identifier>
<identifier type="local">P0b002ee185595e4f</identifier>
<recordInfo>
 <recordContentSource authority="marcorg">DGPO</recordContentSource>
 <recordCreationDate encoding="w3cdtf">2013-07-11</recordCreationDate>
 <recordChangeDate encoding="w3cdtf">2013-07-11</recordChangeDate>
 <recordIdentifier source="DGPO">USCOURTS-caed-2_12-cr-00302</recordIdentifier>
 <recordOrigin>machine generated</recordOrigin>
 <languageOfCataloging>
  <languageTerm authority="iso639-2b" type="code">eng</languageTerm>
</languageOfCataloging>
</recordInfo>
<accessCondition type="GPO scope determination">fdlp</accessCondition>
<extension>
 <docClass>USCOURTS</docClass>
 <accessId>USCOURTS-caed-2_12-cr-00302</accessId>
 <courtType>District</courtType>
 <courtCode>caed</courtCode>
 <courtCircuit>9th</courtCircuit>
 <courtState>California</courtState>
 <courtSortOrder>2061</courtSortOrder>
 <caseNumber>2:12-cr-00302</caseNumber>
 <caseOffice>Sacramento</caseOffice>
 <caseType>criminal</caseType>
 <party firstName="Benito" fullName="Benito Nicolas Hernandez-Luis" lastName="Hernandez-Luis" middleName="Nicolas" role="Defendant"></party>
 <party fullName="USA" lastName="USA" role="Plaintiff"></party>
</extension>
<titleInfo>
 <title>USA v. Hernandez-Luis</title>
 <partNumber>2:12-cr-00302</partNumber>
</titleInfo>
<location>
 <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-2_12-cr-00302/content-detail.html</url>
</location>
<classification authority="sudocs">JU 4.15</classification>
<identifier type="preferred citation">2:12-cr-00302;12-302</identifier>
<name type="corporate">
 <namePart>United States District Court Eastern District of California</namePart>
 <namePart>9th Circuit</namePart>
 <namePart>Sacramento</namePart>
 <affiliation>U.S. Courts</affiliation>
 <role>
  <roleTerm authority="marcrelator" type="text">author</roleTerm>
  <roleTerm authority="marcrelator" type="code">aut</roleTerm>
</role>
</name>
<name type="personal">
 <displayForm>Benito Nicolas Hernandez-Luis</displayForm>
 <namePart type="family">Hernandez-Luis</namePart>
 <namePart type="given">Benito</namePart>
 <namePart type="termsOfAddress"></namePart>
 <description>Defendant</description>
</name>
<name type="personal">
 <displayForm>USA</displayForm>
 <namePart type="family">USA</namePart>
 <namePart type="given"></namePart>
 <namePart type="termsOfAddress"></namePart>
 <description>Plaintiff</description>
</name>
<extension>
 <docClass>USCOURTS</docClass>
 <accessId>USCOURTS-caed-2_12-cr-00302</accessId>
 <courtType>District</courtType>
 <courtCode>caed</courtCode>
 <courtCircuit>9th</courtCircuit>
 <courtState>California</courtState>
 <courtSortOrder>2061</courtSortOrder>
 <caseNumber>2:12-cr-00302</caseNumber>
 <caseOffice>Sacramento</caseOffice>
 <caseType>criminal</caseType>
 <party firstName="Benito" fullName="Benito Nicolas Hernandez-Luis" lastName="Hernandez-Luis" middleName="Nicolas" role="Defendant"></party>
 <party fullName="USA" lastName="USA" role="Plaintiff"></party>
 <state>California</state>
</extension>
<relatedItem type="constituent" ID="id-USCOURTS-caed-2_12-cr-00302-0" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_12-cr-00302/USCOURTS-caed-2_12-cr-00302-0/mods.xml">
 <titleInfo>
  <title>USA v. Hernandez-Luis</title>
  <subTitle>DETENTION ORDER as to Benito Nicolas Hernandez-Luis signed by Magistrate Judge Gregory G. Hollows on 8/11/12. (Mena-Sanchez, L)[2:12-mj-00213-GGH]</subTitle>
  <partNumber>0</partNumber>
</titleInfo>
 <originInfo>
  <dateIssued>2012-08-17</dateIssued>
</originInfo>
 <relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-caed-2_12-cr-00302-0.pdf" type="otherFormat">
  <identifier type="FDsys Unique ID">D09002ee1855a88d8</identifier>
</relatedItem>
 <identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_12-cr-00302/USCOURTS-caed-2_12-cr-00302-0</identifier>
 <identifier type="former granule identifier">caed-2_12-cr-00302_0.pdf</identifier>
 <location>
  <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_12-cr-00302/USCOURTS-caed-2_12-cr-00302-0/content-detail.html</url>
  <url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-2_12-cr-00302/pdf/USCOURTS-caed-2_12-cr-00302-0.pdf</url>
</location>
 <extension>
  <searchTitle>USCOURTS 2:12-cr-00302; USA v. Hernandez-Luis; </searchTitle>
  <courtName>United States District Court Eastern District of California</courtName>
  <state>California</state>
  <accessId>USCOURTS-caed-2_12-cr-00302-0</accessId>
  <sequenceNumber>0</sequenceNumber>
  <dateIssued>2012-08-17</dateIssued>
  <docketText>DETENTION ORDER as to Benito Nicolas Hernandez-Luis signed by Magistrate Judge Gregory G. Hollows on 8/11/12. (Mena-Sanchez, L)[2:12-mj-00213-GGH]</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-caed-2_12-cr-00302-1" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_12-cr-00302/USCOURTS-caed-2_12-cr-00302-1/mods.xml">
 <titleInfo>
  <title>USA v. Hernandez-Luis</title>
  <subTitle>STIPULATION and ORDER signed by Judge Morrison C. England, Jr on 10/12/12ORDERING the Status Conference reset for 10/18/12 at 09:00 AM in Courtroom 7 (MCE) before Judge Morrison C. England Jr. Excludable started as to Benito Hernandez-Luis: T4 Start: 10/11/12 Stop: 10/18/12. (Becknal, R)</subTitle>
  <partNumber>1</partNumber>
</titleInfo>
 <originInfo>
  <dateIssued>2012-10-12</dateIssued>
</originInfo>
 <relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-caed-2_12-cr-00302-1.pdf" type="otherFormat">
  <identifier type="FDsys Unique ID">D09002ee1855a88db</identifier>
</relatedItem>
 <identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_12-cr-00302/USCOURTS-caed-2_12-cr-00302-1</identifier>
 <identifier type="former granule identifier">caed-2_12-cr-00302_1.pdf</identifier>
 <location>
  <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_12-cr-00302/USCOURTS-caed-2_12-cr-00302-1/content-detail.html</url>
  <url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-2_12-cr-00302/pdf/USCOURTS-caed-2_12-cr-00302-1.pdf</url>
</location>
 <extension>
  <searchTitle>USCOURTS 2:12-cr-00302; USA v. Hernandez-Luis; </searchTitle>
  <courtName>United States District Court Eastern District of California</courtName>
  <state>California</state>
  <accessId>USCOURTS-caed-2_12-cr-00302-1</accessId>
  <sequenceNumber>1</sequenceNumber>
  <dateIssued>2012-10-12</dateIssued>
  <docketText>STIPULATION and ORDER signed by Judge Morrison C. England, Jr on 10/12/12ORDERING the Status Conference reset for 10/18/12 at 09:00 AM in Courtroom 7 (MCE) before Judge Morrison C. England Jr. Excludable started as to Benito Hernandez-Luis: T4 Start: 10/11/12 Stop: 10/18/12. (Becknal, R)</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-caed-2_12-cr-00302-2" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_12-cr-00302/USCOURTS-caed-2_12-cr-00302-2/mods.xml">
 <titleInfo>
  <title>USA v. Hernandez-Luis</title>
  <subTitle>STIPULATION and ORDER signed by Chief Judge Morrison C. England, Jr on 11/15/2012 ORDERING the Status Conference CONTINUED TO 1/3/2013 at 09:00 AM in Courtroom 7 (MCE) before Chief Judge Morrison C. England Jr. Excludable started as to Benito Nicolas Hernandez-Luis: T4 Start: 11/16/2012 Stop: 1/3/2013. (Donati, J)</subTitle>
  <partNumber>2</partNumber>
</titleInfo>
 <originInfo>
  <dateIssued>2012-11-15</dateIssued>
</originInfo>
 <relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-caed-2_12-cr-00302-2.pdf" type="otherFormat">
  <identifier type="FDsys Unique ID">D09002ee1855a88d9</identifier>
</relatedItem>
 <identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_12-cr-00302/USCOURTS-caed-2_12-cr-00302-2</identifier>
 <identifier type="former granule identifier">caed-2_12-cr-00302_2.pdf</identifier>
 <location>
  <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_12-cr-00302/USCOURTS-caed-2_12-cr-00302-2/content-detail.html</url>
  <url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-2_12-cr-00302/pdf/USCOURTS-caed-2_12-cr-00302-2.pdf</url>
</location>
 <extension>
  <searchTitle>USCOURTS 2:12-cr-00302; USA v. Hernandez-Luis; </searchTitle>
  <courtName>United States District Court Eastern District of California</courtName>
  <state>California</state>
  <accessId>USCOURTS-caed-2_12-cr-00302-2</accessId>
  <sequenceNumber>2</sequenceNumber>
  <dateIssued>2012-11-15</dateIssued>
  <docketText>STIPULATION and ORDER signed by Chief Judge Morrison C. England, Jr on 11/15/2012 ORDERING the Status Conference CONTINUED TO 1/3/2013 at 09:00 AM in Courtroom 7 (MCE) before Chief Judge Morrison C. England Jr. Excludable started as to Benito Nicolas Hernandez-Luis: T4 Start: 11/16/2012 Stop: 1/3/2013. (Donati, J)</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-caed-2_12-cr-00302-3" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_12-cr-00302/USCOURTS-caed-2_12-cr-00302-3/mods.xml">
 <titleInfo>
  <title>USA v. Hernandez-Luis</title>
  <subTitle>AMENDED STIPULATION and ORDER 17 signed by Chief Judge Morrison C. England, Jr on 1/2/2013 ORDERING Status Conference CONTINUED to 3/14/2013 at 9:00 AM in Courtroom 7 (MCE) before Chief Judge Morrison C. England Jr. Excludable started as to Benito Nicolas Hernandez-Luis: T4 Start: 1/3/2013 - Stop: 3/14/2013. (Krueger, M)</subTitle>
  <partNumber>3</partNumber>
</titleInfo>
 <originInfo>
  <dateIssued>2013-01-03</dateIssued>
</originInfo>
 <relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-caed-2_12-cr-00302-3.pdf" type="otherFormat">
  <identifier type="FDsys Unique ID">D09002ee1855a8865</identifier>
</relatedItem>
 <identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_12-cr-00302/USCOURTS-caed-2_12-cr-00302-3</identifier>
 <identifier type="former granule identifier">caed-2_12-cr-00302_3.pdf</identifier>
 <location>
  <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_12-cr-00302/USCOURTS-caed-2_12-cr-00302-3/content-detail.html</url>
  <url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-2_12-cr-00302/pdf/USCOURTS-caed-2_12-cr-00302-3.pdf</url>
</location>
 <extension>
  <searchTitle>USCOURTS 2:12-cr-00302; USA v. Hernandez-Luis; </searchTitle>
  <courtName>United States District Court Eastern District of California</courtName>
  <state>California</state>
  <accessId>USCOURTS-caed-2_12-cr-00302-3</accessId>
  <sequenceNumber>3</sequenceNumber>
  <dateIssued>2013-01-03</dateIssued>
  <docketText>AMENDED STIPULATION and ORDER 17 signed by Chief Judge Morrison C. England, Jr on 1/2/2013 ORDERING Status Conference CONTINUED to 3/14/2013 at 9:00 AM in Courtroom 7 (MCE) before Chief Judge Morrison C. England Jr. Excludable started as to Benito Nicolas Hernandez-Luis: T4 Start: 1/3/2013 - Stop: 3/14/2013. (Krueger, M)</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-caed-2_12-cr-00302-4" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_12-cr-00302/USCOURTS-caed-2_12-cr-00302-4/mods.xml">
 <titleInfo>
  <title>USA v. Hernandez-Luis</title>
  <subTitle>STIPULATION and ORDER signed by Chief Judge Morrison C. England, Jr on 3/13/13: Status Conference RESET for 4/11/2013 at 09:00 AM in Courtroom 7 (MCE) before Chief Judge Morrison C. England Jr.. Excludable started as to Benito Nicolas Hernandez-Luis: T-4 Start: 3/14/13 Stop: 4/11/13. (Kaminski, H)</subTitle>
  <partNumber>4</partNumber>
</titleInfo>
 <originInfo>
  <dateIssued>2013-03-14</dateIssued>
</originInfo>
 <relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-caed-2_12-cr-00302-4.pdf" type="otherFormat">
  <identifier type="FDsys Unique ID">D09002ee1855a88da</identifier>
</relatedItem>
 <identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_12-cr-00302/USCOURTS-caed-2_12-cr-00302-4</identifier>
 <identifier type="former granule identifier">caed-2_12-cr-00302_4.pdf</identifier>
 <location>
  <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_12-cr-00302/USCOURTS-caed-2_12-cr-00302-4/content-detail.html</url>
  <url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-2_12-cr-00302/pdf/USCOURTS-caed-2_12-cr-00302-4.pdf</url>
</location>
 <extension>
  <searchTitle>USCOURTS 2:12-cr-00302; USA v. Hernandez-Luis; </searchTitle>
  <courtName>United States District Court Eastern District of California</courtName>
  <state>California</state>
  <accessId>USCOURTS-caed-2_12-cr-00302-4</accessId>
  <sequenceNumber>4</sequenceNumber>
  <dateIssued>2013-03-14</dateIssued>
  <docketText>STIPULATION and ORDER signed by Chief Judge Morrison C. England, Jr on 3/13/13: Status Conference RESET for 4/11/2013 at 09:00 AM in Courtroom 7 (MCE) before Chief Judge Morrison C. England Jr.. Excludable started as to Benito Nicolas Hernandez-Luis: T-4 Start: 3/14/13 Stop: 4/11/13. (Kaminski, H)</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-caed-2_12-cr-00302-5" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_12-cr-00302/USCOURTS-caed-2_12-cr-00302-5/mods.xml">
 <titleInfo>
  <title>USA v. Hernandez-Luis</title>
  <subTitle>JUDGMENT and COMMITMENT as to Benito Nicolas Hernandez-Luis. Signed by Chief Judge Morrison C. England, Jr. on 7/10/2013. (Deutsch, S)</subTitle>
  <partNumber>5</partNumber>
</titleInfo>
 <originInfo>
  <dateIssued>2013-07-10</dateIssued>
</originInfo>
 <relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-caed-2_12-cr-00302-5.pdf" type="otherFormat">
  <identifier type="FDsys Unique ID">D09002ee1855a8864</identifier>
</relatedItem>
 <identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_12-cr-00302/USCOURTS-caed-2_12-cr-00302-5</identifier>
 <identifier type="former granule identifier">caed-2_12-cr-00302_5.pdf</identifier>
 <location>
  <url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-caed-2_12-cr-00302/USCOURTS-caed-2_12-cr-00302-5/content-detail.html</url>
  <url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-caed-2_12-cr-00302/pdf/USCOURTS-caed-2_12-cr-00302-5.pdf</url>
</location>
 <extension>
  <searchTitle>USCOURTS 2:12-cr-00302; USA v. Hernandez-Luis; </searchTitle>
  <courtName>United States District Court Eastern District of California</courtName>
  <state>California</state>
  <accessId>USCOURTS-caed-2_12-cr-00302-5</accessId>
  <sequenceNumber>5</sequenceNumber>
  <dateIssued>2013-07-10</dateIssued>
  <docketText>JUDGMENT and COMMITMENT as to Benito Nicolas Hernandez-Luis. Signed by Chief Judge Morrison C. England, Jr. on 7/10/2013. (Deutsch, S)</docketText>
</extension>
</relatedItem>
</mods>


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Created by Jose Fuentes on 9/12/17 17:31
  ~ Copyright (C) 2017
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License"),
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~        http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  android:id="@+id/recycler"
  app:layout_behavior="@string/appbar_scrolling_view_behavior"
  android:layout_width="match_parent"
  android:layout_height="match_parent">

</androidx.recyclerview.widget.RecyclerView>

redpajama_set_name: RedPajamaGithub


text:
require 'sinatra'
require 'haml'

require 'henry/site'

class Henry < Sinatra::Base

	set :static, true                             # set up static file routing
  set :public_dir, File.expand_path('../public', __FILE__) # set up the static dir (with images/js/css inside)

  set :views,  File.expand_path('../views', __FILE__) # set up the views dir
  set :haml, { :format => :html5 }                    # if you use haml

  # Your "actions" go here…
  #
  get '/' do

  	site = Site.new
    @posts = site.posts

    haml :index
  end

  get '/edit/:published/*' do

    @body_class = 'edit'

  	published = params[:published] == 'posts'

  	site = Site.new
  	@post = site.post(published, params[:splat].first)

  	haml :edit
  end

end


text:
package cn.nowdo.cloud.base.wx.message.entity;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.dom4j.Element;

public class WxRequestEventMessage extends WxMessage {

	public static final String EVENT_TYPE_SUBSCRIBE = "subscribe";
	public static final String EVENT_TYPE_UNSUBSCRIBE = "unsubscribe";
	public static final String EVENT_TYPE_CLICK = "CLICK";
	public static final String EVENT_TYPE_SCAN = "SCAN";
	private String event;
	private String eventKey;
	private String ticket;

	public WxRequestEventMessage() {
	}

	public WxRequestEventMessage(WxMessageHeader header, Element root) {
		super(header);
		if (root == null) {
			return;
		}
		setEvent(root.elementText("Event"));
		setEventKey(root.elementText("EventKey"));
		setTicket(root.elementText("Ticket"));
	}

	public String getMessageXMLString() {
		return null;
	}

	public String getEvent() {
		return this.event;
	}

	public void setEvent(String event) {
		this.event = event;
	}

	public String getEventKey() {
		return this.eventKey;
	}

	public void setEventKey(String eventKey) {
		this.eventKey = eventKey;
	}

	public String getTicket() {
		return this.ticket;
	}

	public void setTicket(String ticket) {
		this.ticket = ticket;
	}

	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}


text:
typedef std::vector <UIntVect> Clusters;

class Closure
{
    enum STAGE { INIT, FILL, COLLECT };
    MemWrapper <unsigned> closure_;
    unsigned sz_;
    unsigned clno_;
    unsigned singlet_no_;
    STAGE stage_;
public:
    Closure ();
    Closure (unsigned sz);
    void init (unsigned sz);
    void add (unsigned idx1, unsigned idx2);
    void finalize ();
    void fillClusters (Clusters& dest, bool include_singletons = false);
    Clusters* collect (bool include_singletons = false);
    unsigned clusters_number () const
    {
        return clno_;
    }
    unsigned size () const
    {
        return sz_;
    }
    unsigned singletons_number () const
    {
        return singlet_no_;
    }
    unsigned non_trivial_number () const
    {
        return sz_ - singlet_no_;
    }
    const unsigned* result ();
};

#endif


text:
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">

    <PreferenceCategory
        android:title="Sorting"
        android:key="geofence_sorting_category">

        <ListPreference
            android:key="@string/geofence_sorting_keyword"
            android:title="Sort by"
            android:summary="Choose a field by which geofences will be sorted"
            android:entries="@array/geofence_sorting_fields"
            android:entryValues="@array/geofence_sorting_fields_values"
            android:defaultValue=""/>

        <CheckBoxPreference
            android:key="@string/geofence_sorting_order"
            android:title="Descending order"
            android:summary="To sort  geofences in a descending order"
            android:defaultValue="false"/>

    </PreferenceCategory>

</PreferenceScreen>


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

namespace Tibialyzer {
    public class SimpleNotification : Form {
        SafeTimer moveTimer = null;
        public int targetPositionX = 0, targetPositionY = 0;
        public double targetOpacity;
        private bool animations = true;

        public SimpleNotification() {
            this.ShowInTaskbar = false;
            targetOpacity = 1.0;
        }

        protected void InitializeSimpleNotification(bool movement = true, bool destroy = true, double extraTime = 0) {
            this.Click += c_Click;
            foreach (Control c in this.Controls) {
                c.Click += c_Click;
            }

            this.animations = SettingsManager.getSettingBool("EnableSimpleNotificationAnimation");

            if (movement) {
                moveTimer = new SafeTimer(1, MoveTimer_Elapsed);
                moveTimer.Start();
            }
            if (destroy) {
                System.Threading.Tasks.Task.Delay((int)((Math.Max(SettingsManager.getSettingInt("PopupDuration"), 1) + extraTime) * 1000)).ContinueWith(x => CloseNotification());
            }
        }

        private void MoveTimer_Elapsed() {
            int desktopX = this.DesktopLocation.X;
            int desktopY = this.DesktopLocation.Y;
            if (this.Visible && (desktopX != targetPositionX || desktopY != targetPositionY || targetOpacity != Opacity)) {
                int updatedX, updatedY;
                double updatedOpacity;
                if (animations) {
                    updatedX = Math.Abs(desktopX - targetPositionX) < 3 ? targetPositionX : (int)(desktopX + (targetPositionX - desktopX) / 5.0);
                    updatedY = Math.Abs(desktopY - targetPositionY) < 3 ? targetPositionY : (int)(desktopY + (targetPositionY - desktopY) / 5.0);
                    updatedOpacity = Math.Abs(targetOpacity - Opacity) < 0.1 ? targetOpacity : Opacity + (targetOpacity - Opacity) / 10.0;
                } else {
                    updatedX = targetPositionX;
                    updatedY = targetPositionY;
                    updatedOpacity = targetOpacity;
                }
                try {
                    this.Invoke((MethodInvoker)delegate {
                        if (!this.IsDisposed) {
                            this.SetDesktopLocation(updatedX, updatedY);
                            this.Opacity = updatedOpacity;
                            if (updatedOpacity <= 0 || (targetOpacity == 0 && !animations)) {
                                moveTimer.Dispose();
                                close();
                            }
                        }
                    });
                } catch {
                }
                moveTimer.Interval = 1;
            } else {
                moveTimer.Interval = 100;
            }
        }

        private void CloseNotification() {
            if (this.animations) {
                targetOpacity = 0;
            } else {
                try {
                    this.Invoke((MethodInvoker)delegate {
                        close();
                    });
                } catch {

                }
            }
        }

        public void ClearTimers() {
            if (moveTimer != null) {
                moveTimer.Dispose();
                moveTimer = null;
            }
        }

        protected override bool ShowWithoutActivation {
            get { return true; }
        }

        static int WS_EX_NOACTIVATE = 0x08000000;
        static int WS_EX_TOOLWINDOW = 0x00000080;

        protected override CreateParams CreateParams {
            get {
                CreateParams baseParams = base.CreateParams;

                baseParams.ExStyle |= (int)(
                  WS_EX_NOACTIVATE | WS_EX_TOOLWINDOW);

                return baseParams;
            }
        }

        public void close() {
            try {
                this.Close();
            } catch {

            }
        }

        private void InitializeComponent() {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SimpleNotification));
            this.SuspendLayout();
            //
            // SimpleNotification
            //
            this.ClientSize = new System.Drawing.Size(284, 261);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.Name = "SimpleNotification";
            this.ResumeLayout(false);

        }

        protected void c_Click(object sender, EventArgs e) {
            close();
        }
    }
}


text:
@interface PodsDummy_Merhaba_iOS : NSObject
@end
@implementation PodsDummy_Merhaba_iOS
@end


text: """Mock module used to test loading of OpenSearch resources."""


text:
package com.google.appengine.datanucleus.test.jdo;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.NullValue;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable
public class HasNotNullConstraintsJDO {
  @PrimaryKey
  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  private Long id;

  @Persistent(nullValue = NullValue.EXCEPTION)
  private Boolean bool;

  @Persistent(nullValue = NullValue.EXCEPTION)
  private Character c;

  @Persistent(nullValue = NullValue.EXCEPTION)
  private Byte b;

  @Persistent(nullValue = NullValue.EXCEPTION)
  private Short s;

  @Persistent(nullValue = NullValue.EXCEPTION)
  private Integer i;

  @Persistent(nullValue = NullValue.EXCEPTION)
  private Long l;

  @Persistent(nullValue = NullValue.EXCEPTION)
  private Float f;

  @Persistent(nullValue = NullValue.EXCEPTION)
  private Double d;

  @Persistent(nullValue = NullValue.EXCEPTION)
  private String str;

  public Boolean getBool() {
    return bool;
  }

  public void setBool(Boolean bool) {
    this.bool = bool;
  }

  public Character getC() {
    return c;
  }

  public void setC(Character c) {
    this.c = c;
  }

  public Byte getB() {
    return b;
  }

  public void setB(Byte b) {
    this.b = b;
  }

  public Short getS() {
    return s;
  }

  public void setS(Short s) {
    this.s = s;
  }

  public Integer getI() {
    return i;
  }

  public void setI(Integer i) {
    this.i = i;
  }

  public Long getL() {
    return l;
  }

  public void setL(Long l) {
    this.l = l;
  }

  public Float getF() {
    return f;
  }

  public void setF(Float f) {
    this.f = f;
  }

  public Double getD() {
    return d;
  }

  public void setD(Double d) {
    this.d = d;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public Long getId() {
    return id;
  }

  public String getStr() {
    return str;
  }

  public void setStr(String str) {
    this.str = str;
  }

}


text:
<?php
$string="1,2,3,4,5";
$array=array_map('intval', explode(',', $string));
var_dump($array);
$array = implode("','",$array);
var_dump($array);
return ;
?>
<form method="post">
    <textarea name="data_list"></textarea>
    <input type="submit" name="submit">
</form>
<?php
if($_POST){
    echo $_POST['data_list'];
    $data = explode("\r\n", $_POST['data_list']);
    var_dump($data);
}
//var_dump($_SERVER);
////Generate a random string.
//$token = openssl_random_pseudo_bytes(16);
//
////Convert the binary data into hexadecimal representation.
//$token = bin2hex($token);
//
////Print it out for example purposes.
//echo $token;


text:
package utils.BinaryUtils.ClonotypeBinaryUtils.ClonotypeFilters;

import utils.BinaryUtils.ClonotypeBinaryUtils.ClonotypeBinary;

public abstract class BinaryClonotypeFilter {
    protected BinaryClonotypeFilter() {};

    protected abstract boolean checkPass(ClonotypeBinary clonotype);
}


text:
#pragma once
// blockdecimal.hpp: parameterized blocked decimal number system representing a fixed-sized decimal integer number
//
// Copyright (C) 2022-2022 Stillwater Supercomputing, Inc.
//
// This file is part of the universal numbers project, which is released under an MIT Open Source license.
#include <iostream>
#include <string>
#include <sstream>

// should be defined by calling environment, just catching it here just in case it is not
#ifndef LONG_DOUBLE_SUPPORT
#pragma message("LONG_DOUBLE_SUPPORT is not defined")
#define LONG_DOUBLE_SUPPORT 0
#endif
#include <universal/number/shared/specific_value_encoding.hpp>

namespace sw { namespace universal {

/*
NOTES

for block arithmetic, we need to manage a carry bit.
This disqualifies using uint64_t as a block type as we can't catch the overflow condition
in the same way as the other native types, uint8_t, uint16_t, uint32_t.

We could use a sint64_t and then convert to uint64_t and observe the MSB. Very different
logic though.
*/

template<unsigned _ndigits>
class blockdecimal {
	static constexpr unsigned ndigits = _ndigits;
public:

};

#ifdef LATER
// a block-based decimal number configurable to be signed or unsigned. When signed it uses 2's complement encoding
template<unsigned _ndigits>
class blockdecimal {
public:
	static constexpr unsigned ndigits = _ndigits;
	typedef bt std::uint8_t;

	static constexpr unsigned bitsInByte = 8;
	static constexpr unsigned bitsInBlock = sizeof(bt) * bitsInByte;
	static constexpr unsigned nrBlocks = (0 == nbits ? 1 : (1ull + ((nbits - 1ull) / bitsInBlock)));
	static constexpr uint64_t storageMask = (0xFFFFFFFFFFFFFFFFull >> (64 - bitsInBlock));
	static constexpr bt       maxBlockValue = bt(-1);

	static constexpr unsigned MSU = nrBlocks - 1; // MSU == Most Significant Unit
	static constexpr bt       ALL_ONES = bt(~0);
	static constexpr unsigned maxShift = (0 == nbits ? 0 : (nrBlocks* bitsInBlock - nbits)); // protect the shift that is >= sizeof(bt)
	static constexpr bt       MSU_MASK = (0 == nbits ? bt(0) : (ALL_ONES >> maxShift));      // the other side of this protection
	static constexpr bt       SIGN_BIT_MASK = (0 == nbits ? bt(0) : (bt(bt(1) << ((nbits - 1ull) % bitsInBlock))));

	static constexpr bool     uniblock64 = (bitsInBlock == 64) && (nrBlocks == 1);

	/// trivial constructor
	blockdecimal() = default;

	/// construct a blockdecimal from another: bt must be the same
	template<unsigned nnbits>
	blockdecimal(const blockdecimal<nnbits, BlockType, NumberType>& rhs) { this->assign(rhs); }

	// specific value constructor
	constexpr blockdecimal(const SpecificValue code) : _block{} {
		switch (code) {
		case SpecificValue::infpos:
		case SpecificValue::maxpos:
//			maxpos();
			break;
		case SpecificValue::minpos:
//			minpos();
			break;
		case SpecificValue::qnan:
		case SpecificValue::snan:
		case SpecificValue::nar:
		case SpecificValue::zero:
		default:
			zero();
			break;
		case SpecificValue::minneg:
//			minneg();
			break;
		case SpecificValue::infneg:
		case SpecificValue::maxneg:
//			maxneg();
			break;
		}
	}

	// initializer for long long
	constexpr blockdecimal(long long initial_value) noexcept : _block{} { *this = initial_value; }

	constexpr blockdecimal& operator=(long long rhs) noexcept {
		if constexpr (1 < nrBlocks) {
			for (unsigned i = 0; i < nrBlocks; ++i) {
				_block[i] = rhs & storageMask;
				rhs >>= bitsInBlock;
			}
			// enforce precondition for fast comparison by properly nulling bits that are outside of nbits
			_block[MSU] &= MSU_MASK;
		}
		else if constexpr (1 == nrBlocks) {
			_block[0] = rhs & storageMask;
			// enforce precondition for fast comparison by properly nulling bits that are outside of nbits
			_block[MSU] &= MSU_MASK;
		}
		return *this;
	}

	// conversion operators
	explicit operator int() const                { return int(to_long_long()); }
	explicit operator long() const               { return long(to_long_long()); }
	explicit operator long long() const          { return to_long_long(); }
	explicit operator unsigned int() const       { return unsigned(to_ull()); }
	explicit operator unsigned long() const      { return (unsigned long)to_ull(); }
	explicit operator unsigned long long() const { return to_ull(); }
	// TODO: these need proper implementations that can convert very large integers to the proper scale afforded by the floating-point formats
	explicit operator float() const              { return float(to_long_long()); }
	explicit operator double() const             { return double(to_long_long()); }

#if LONG_DOUBLE_SUPPORT
	explicit operator long double() const        { return (long double)to_long_long(); }
#endif

	// limb access operators
	constexpr BlockType& operator[](unsigned index) { return _block[index]; }
	constexpr BlockType operator[](unsigned index) const { return _block[index]; }

	// prefix operators
	blockdecimal operator-() const {
		blockdecimal negated(*this);
		blockdecimal plusOne(1);
		negated.flip();
		negated += plusOne;
		return negated;
	}
	// one's complement
	blockdecimal operator~() const {
		blockdecimal complement(*this);
		complement.flip();
		return complement;
	}
	// increment/decrement
	blockdecimal operator++(int) {
		blockdecimal tmp(*this);
		operator++();
		return tmp;
	}
	blockdecimal& operator++() {
		blockdecimal increment;
		increment.setbits(0x1);
		*this += increment;
		return *this;
	}
	blockdecimal operator--(int) {
		blockdecimal tmp(*this);
		operator--();
		return tmp;
	}
	blockdecimal& operator--() {
		blockdecimal decrement;
		decrement.setbits(0x1);
		return *this -= decrement;
	}
	// logic operators
	blockdecimal  operator~() {
		blockdecimal<nbits, bt> complement(*this);
		complement.flip();
		return complement;
	}
	// arithmetic operators
	blockdecimal& operator+=(const blockdecimal& rhs) {
		if constexpr (nrBlocks == 1) {
			_block[0] = static_cast<bt>(_block[0] + rhs.block(0));
			// null any leading bits that fall outside of nbits
			_block[MSU] = static_cast<bt>(MSU_MASK & _block[MSU]);
		}
		else {
			blockdecimal sum;
			BlockType* pA = _block;
			BlockType const* pB = rhs._block;
			BlockType* pC = sum._block;
			BlockType* pEnd = pC + nrBlocks;
			std::uint64_t carry = 0;
			while (pC != pEnd) {
				carry += static_cast<std::uint64_t>(*pA) + static_cast<std::uint64_t>(*pB);
				*pC = static_cast<bt>(carry);
				carry >>= bitsInBlock;
				++pA; ++pB; ++pC;
			}
			// enforce precondition for fast comparison by properly nulling bits that are outside of nbits
			BlockType* pLast = pEnd - 1;
			*pLast = static_cast<bt>(MSU_MASK & *pLast);
			*this = sum;
		}
		return *this;
	}
	blockdecimal& operator-=(const blockdecimal& rhs) {
		return operator+=(sw::universal::twosComplement(rhs));
	}
#define BLOCKBINARY_FAST_MUL
#ifdef BLOCKBINARY_FAST_MUL
	blockdecimal& operator*=(const blockdecimal& rhs) {
		if constexpr (NumberType == BinaryNumberType::Signed) {
			if constexpr (nrBlocks == 1) {
				_block[0] = static_cast<bt>(_block[0] * rhs.block(0));
			}
			else {
				// is there a better way than upconverting to deal with maxneg in a 2's complement encoding?
				blockdecimal<nbits + 1, BlockType, NumberType> base(*this);
				blockdecimal<nbits + 1, BlockType, NumberType> multiplicant(rhs);
				bool resultIsNeg = (base.isneg() ^ multiplicant.isneg());
				if (base.isneg()) {
					base.twosComplement();
				}
				if (multiplicant.isneg()) {
					multiplicant.twosComplement();
				}
				clear();
				for (unsigned i = 0; i < static_cast<unsigned>(nrBlocks); ++i) {
					std::uint64_t segment(0);
					for (unsigned j = 0; j < static_cast<unsigned>(nrBlocks); ++j) {
						segment += static_cast<std::uint64_t>(base.block(i)) * static_cast<std::uint64_t>(multiplicant.block(j));

						if (i + j < static_cast<unsigned>(nrBlocks)) {
							segment += _block[i + j];
							_block[i + j] = static_cast<bt>(segment);
							segment >>= bitsInBlock;
						}
					}
				}
				if (resultIsNeg) twosComplement();
			}
		}
		else {  // unsigned
			if constexpr (nrBlocks == 1) {
				_block[0] = static_cast<bt>(_block[0] * rhs.block(0));
			}
			else {
				blockdecimal base(*this);
				blockdecimal multiplicant(rhs);
				clear();
				for (unsigned i = 0; i < static_cast<unsigned>(nrBlocks); ++i) {
					std::uint64_t segment(0);
					for (unsigned j = 0; j < static_cast<unsigned>(nrBlocks); ++j) {
						segment += static_cast<std::uint64_t>(base.block(i)) * static_cast<std::uint64_t>(multiplicant.block(j));

						if (i + j < static_cast<unsigned>(nrBlocks)) {
							segment += _block[i + j];
							_block[i + j] = static_cast<bt>(segment);
							segment >>= bitsInBlock;
						}
					}
				}
			}
		}
		// null any leading bits that fall outside of nbits
		_block[MSU] = static_cast<bt>(MSU_MASK & _block[MSU]);
		return *this;
	}
#else
	blockdecimal& operator*=(const blockdecimal& rhs) { // modulo in-place
		blockdecimal base(*this);
		blockdecimal multiplicant(rhs);
		clear();
		for (unsigned i = 0; i < nbits; ++i) {
			if (base.at(i)) {
				operator+=(multiplicant);
			}
			multiplicant <<= 1;
		}
		// since we used operator+=, which enforces the nulling of leading bits
		// we don't need to null here
		return *this;
	}
#endif
	blockdecimal& operator/=(const blockdecimal& rhs) {
		if constexpr (nbits == (sizeof(BlockType) * 8)) {
			if (rhs.iszero()) {
				*this = 0;
				return *this;
			}
			if constexpr (sizeof(BlockType) == 1) {
				_block[0] = static_cast<bt>(std::int8_t(_block[0]) / std::int8_t(rhs._block[0]));
			}
			else if constexpr (sizeof(BlockType) == 2) {
				_block[0] = static_cast<bt>(std::int16_t(_block[0]) / std::int16_t(rhs._block[0]));
			}
			else if constexpr (sizeof(BlockType) == 4) {
				_block[0] = static_cast<bt>(std::int32_t(_block[0]) / std::int32_t(rhs._block[0]));
			}
			else if constexpr (sizeof(BlockType) == 8) {
				_block[0] = static_cast<bt>(std::int64_t(_block[0]) / std::int64_t(rhs._block[0]));
			}
			_block[0] = static_cast<bt>(MSU_MASK & _block[0]);
		}
		else {
			quorem<nbits, BlockType, NumberType> result = longdivision(*this, rhs);
			*this = result.quo;
		}
		return *this;
	}
	blockdecimal& operator%=(const blockdecimal& rhs) {
		if constexpr (nbits == (sizeof(BlockType) * 8)) {
			if (rhs.iszero()) {
				*this = 0;
				return *this;
			}
			if constexpr (sizeof(BlockType) == 1) {
				_block[0] = static_cast<bt>(std::int8_t(_block[0]) % std::int8_t(rhs._block[0]));
			}
			else if constexpr (sizeof(BlockType) == 2) {
				_block[0] = static_cast<bt>(std::int16_t(_block[0]) % std::int16_t(rhs._block[0]));
			}
			else if constexpr (sizeof(BlockType) == 4) {
				_block[0] = static_cast<bt>(std::int32_t(_block[0]) % std::int32_t(rhs._block[0]));
			}
			else if constexpr (sizeof(BlockType) == 8) {
				_block[0] = static_cast<bt>(std::int64_t(_block[0]) % std::int64_t(rhs._block[0]));
			}
			_block[0] = static_cast<bt>(MSU_MASK & _block[0]);
		}
		else {
			quorem<nbits, BlockType, NumberType> result = longdivision(*this, rhs);
			*this = result.rem;
		}
		return *this;
	}

	///////////////////////////////////////////////////////////////////
	///              logic operators

	blockdecimal& operator|=(const blockdecimal& rhs) noexcept {
		for (unsigned i = 0; i < nrBlocks; ++i) {
			_block[i] |= rhs._block[i];
		}
		_block[MSU] &= MSU_MASK; // assert precondition of properly nulled leading non-bits
		return *this;
	}
	blockdecimal& operator&=(const blockdecimal& rhs) noexcept {
		for (unsigned i = 0; i < nrBlocks; ++i) {
			_block[i] &= rhs._block[i];
		}
		_block[MSU] &= MSU_MASK; // assert precondition of properly nulled leading non-bits
		return *this;
	}
	blockdecimal& operator^=(const blockdecimal& rhs) noexcept {
		for (unsigned i = 0; i < nrBlocks; ++i) {
			_block[i] ^= rhs._block[i];
		}
		_block[MSU] &= MSU_MASK; // assert precondition of properly nulled leading non-bits
		return *this;
	}

	// shift left operator
	blockdecimal& operator<<=(int bitsToShift) {
		if (bitsToShift == 0) return *this;
		if (bitsToShift < 0) return operator>>=(-bitsToShift);
		if (bitsToShift > static_cast<int>(nbits)) {
			setzero();
			return *this;
		}
		if (bitsToShift >= static_cast<int>(bitsInBlock)) {
			int blockShift = bitsToShift / static_cast<int>(bitsInBlock);
			for (int i = static_cast<int>(MSU); i >= blockShift; --i) {
				_block[i] = _block[i - blockShift];
			}
			for (int i = blockShift - 1; i >= 0; --i) {
				_block[i] = bt(0);
			}
			// adjust the shift
			bitsToShift -= static_cast<int>(blockShift * bitsInBlock);
			if (bitsToShift == 0) return *this;
		}
		if constexpr (MSU > 0) {
			// construct the mask for the upper bits in the block that needs to move to the higher word
			bt mask = 0xFFFFFFFFFFFFFFFF << (bitsInBlock - bitsToShift);
			for (unsigned i = MSU; i > 0; --i) {
				_block[i] <<= bitsToShift;
				// mix in the bits from the right
				bt bits = bt(mask & _block[i - 1]);
				_block[i] |= (bits >> (bitsInBlock - bitsToShift));
			}
		}
		_block[0] <<= bitsToShift;
		return *this;
	}
	// arithmetic shift right operator
	blockdecimal& operator>>=(int bitsToShift) {
		if (bitsToShift == 0) return *this;
		if (bitsToShift < 0) return operator<<=(-bitsToShift);
		if (bitsToShift >= static_cast<int>(nbits)) {
			setzero();
			return *this;
		}
		bool signext = sign();
		unsigned blockShift = 0;
		if (bitsToShift >= static_cast<int>(bitsInBlock)) {
			blockShift = bitsToShift / bitsInBlock;
			if (MSU >= blockShift) {
				// shift by blocks
				for (unsigned i = 0; i <= MSU - blockShift; ++i) {
					_block[i] = _block[i + blockShift];
				}
			}
			// adjust the shift
			bitsToShift -= static_cast<int>(blockShift * bitsInBlock);
			if (bitsToShift == 0) {
				// fix up the leading zeros if we have a negative number
				if (signext) {
					// bitsToShift is guaranteed to be less than nbits
					bitsToShift += static_cast<int>(blockShift * bitsInBlock);
					for (unsigned i = nbits - bitsToShift; i < nbits; ++i) {
						this->setbit(i);
					}
				}
				else {
					// clean up the blocks we have shifted clean
					bitsToShift += static_cast<int>(blockShift * bitsInBlock);
					for (unsigned i = nbits - bitsToShift; i < nbits; ++i) {
						this->setbit(i, false);
					}
				}
				return *this;
			}
		}
		if constexpr (MSU > 0) {
			bt mask = ALL_ONES;
			mask >>= (bitsInBlock - bitsToShift); // this is a mask for the lower bits in the block that need to move to the lower word
			for (unsigned i = 0; i < MSU; ++i) {  // TODO: can this be improved? we should not have to work on the upper blocks in case we block shifted
				_block[i] >>= bitsToShift;
				// mix in the bits from the left
				bt bits = bt(mask & _block[i + 1]);
				_block[i] |= (bits << (bitsInBlock - bitsToShift));
			}
		}
		_block[MSU] >>= bitsToShift;

		// fix up the leading zeros if we have a negative number
		if (signext) {
			// bitsToShift is guaranteed to be less than nbits
			bitsToShift += static_cast<int>(blockShift * bitsInBlock);
			for (unsigned i = nbits - bitsToShift; i < nbits; ++i) {
				this->setbit(i);
			}
		}
		else {
			// clean up the blocks we have shifted clean
			bitsToShift += static_cast<int>(blockShift * bitsInBlock);
			for (unsigned i = nbits - bitsToShift; i < nbits; ++i) {
				this->setbit(i, false);
			}
		}

		// enforce precondition for fast comparison by properly nulling bits that are outside of nbits
		_block[MSU] &= MSU_MASK;
		return *this;
	}

	///////////////////////////////////////////////////////////////////
	///                  modifiers

	constexpr void clear() noexcept {
		for (unsigned i = 0; i < nrBlocks; ++i) {
			_block[i] = bt(0ull);
		}
	}
	constexpr void setzero() noexcept { clear(); }
	constexpr void set() noexcept { // set all bits to 1
		if constexpr (nrBlocks > 1) {
			for (unsigned i = 0; i < nrBlocks - 1; ++i) {
				_block[i] = ALL_ONES;
			}
		}
		_block[MSU] = ALL_ONES & MSU_MASK;
	}
	constexpr void reset() noexcept { clear(); } // set all bits to 0
	constexpr void set(unsigned i) noexcept {	setbit(i, true); }
	constexpr void reset(unsigned i) noexcept { setbit(i, false); }
	constexpr void setbit(unsigned i, bool v = true) noexcept {
		unsigned blockIndex = i / bitsInBlock;
		if (blockIndex < nrBlocks) {
			bt block = _block[blockIndex];
			bt null = ~(1ull << (i % bitsInBlock));
			bt bit = bt(v ? 1 : 0);
			bt mask = bt(bit << (i % bitsInBlock));
			_block[blockIndex] = bt((block & null) | mask);
		}
		// nop if blockIndex is out of range
	}
	constexpr void setbits(uint64_t value) noexcept {
		if constexpr (1 == nrBlocks) {
			_block[0] = value & storageMask;
		}
		else if constexpr (1 < nrBlocks) {
			for (unsigned i = 0; i < nrBlocks; ++i) {
				_block[i] = value & storageMask;
				value >>= bitsInBlock;
			}
		}
		_block[MSU] &= MSU_MASK; // enforce precondition for fast comparison by properly nulling bits that are outside of nbits
	}
	constexpr void setblock(unsigned b, const bt& block) noexcept {
		if (b < nrBlocks) _block[b] = block; // nop if b is out of range
	}
	constexpr blockdecimal& flip() noexcept { // in-place one's complement
		for (unsigned i = 0; i < nrBlocks; ++i) {
			_block[i] = bt(~_block[i]);
		}
		_block[MSU] &= MSU_MASK; // assert precondition of properly nulled leading non-bits
		return *this;
	}
	constexpr blockdecimal& twosComplement() noexcept { // in-place 2's complement
		blockdecimal plusOne(1);
		if constexpr (NumberType == BinaryNumberType::Signed) {
			flip();
		}
		else {
			static_assert(NumberType == BinaryNumberType::Signed, "calling in-place 2's complement on an unsigned blockdecimal"); // should this be allowed?
		}
		return *this += plusOne;
	}

	// minimum positive value of the blockdecimal configuration
	constexpr blockdecimal& minpos() noexcept {
		// minpos = 0000....00001
		clear();
		setbit(0, true);
		return *this;
	}
	// maximum positive value of the blockdecimal configuration
	constexpr blockdecimal& maxpos() noexcept {
		if constexpr (NumberType == BinaryNumberType::Signed) {
			// maxpos = 01111....1111
			clear();
			flip();
			setbit(nbits - 1, false);
		}
		else {
			// maxpos = 11111....1111
			clear();
			flip();
		}
		return *this;
	}
	// zero
	constexpr blockdecimal& zero() noexcept {
		clear();
		return *this;
	}
	// minimum negative value of the blockdecimal configuration
	constexpr blockdecimal& minneg() noexcept {
		if constexpr (NumberType == BinaryNumberType::Signed) {
			// minneg = 11111....11111
			clear();
			flip();
		}
		else {
			// minneg = 00000....00000
			clear();
		}
		return *this;
	}
	// maximum negative value of the blockdecimal configuration
	constexpr blockdecimal& maxneg() noexcept {
		if constexpr (NumberType == BinaryNumberType::Signed) {
			// maxneg = 10000....0000
			clear();
			setbit(nbits - 1);
		}
		else {
			// maxneg = 00000....00000
			clear();
		}

		return *this;
	}

	// selectors
	constexpr bool sign() const noexcept { return _block[MSU] & SIGN_BIT_MASK; }
	constexpr bool ispos() const noexcept { return !sign(); }
	constexpr bool isneg() const noexcept { return sign(); }
	constexpr bool iszero() const noexcept {
		for (unsigned i = 0; i < nrBlocks; ++i) if (_block[i] != 0) return false;
		return true;
	}
	constexpr bool isodd() const noexcept { return _block[0] & 0x1;	}
	constexpr bool iseven() const noexcept { return !isodd(); }

	constexpr bool all() const noexcept {
		if constexpr (nrBlocks > 1) for (unsigned i = 0; i < nrBlocks - 1; ++i) if (_block[i] != ALL_ONES) return false;
		if (_block[MSU] != MSU_MASK) return false;
		return true;
	}
	constexpr bool any() const noexcept {
		if constexpr (nrBlocks > 1) for (unsigned i = 0; i < nrBlocks - 1; ++i) if (_block[i] || ALL_ONES) return true;
		if (_block[MSU] || MSU_MASK) return true;
		return false;
	}
	constexpr bool anyAfter(unsigned bitIndex) const noexcept {  // TODO: optimize for limbs
		if (bitIndex < nbits) {
			for (unsigned i = 0; i < bitIndex; ++i) if (test(i)) return true;
		}
		return false;
	}

	constexpr bool none() const noexcept {
		if constexpr (nrBlocks > 1) for (unsigned i = 0; i < nrBlocks - 1; ++i) if (_block[i] != 0) return false;
		if (_block[MSU] & MSU_MASK) return false;
		return true;
	}
	constexpr unsigned count() const noexcept { // TODO: optimize for limbs
		unsigned nrOnes = 0;
		for (unsigned i = 0; i < nbits; ++i) {
			if (test(i)) ++nrOnes;
		}
		return nrOnes;
	}
	constexpr bool test(unsigned bitIndex) const noexcept { return at(bitIndex); }
	constexpr bool at(unsigned bitIndex) const noexcept {
		if (bitIndex >= nbits) return false; // fail silently as no-op
		unsigned blockIndex = bitIndex / bitsInBlock;
		bt limb = _block[blockIndex];
		bt mask = bt(1ull << (bitIndex % bitsInBlock));
		return (limb & mask);
	}
	constexpr uint8_t nibble(unsigned n) const noexcept {
		uint8_t retval{ 0 };
		if (n < (1 + ((nbits - 1) >> 2))) {
			bt word = _block[(n * 4) / bitsInBlock];
			unsigned nibbleIndexInWord = n % (bitsInBlock >> 2);
			bt mask = static_cast<bt>(0x0Fu << (nibbleIndexInWord*4));
			bt nibblebits = static_cast<bt>(mask & word);
			retval = static_cast<uint8_t>(nibblebits >> static_cast<bt>(nibbleIndexInWord*4));
		}
		else { // nop when nibble index out of bounds
			retval = 0;
		}
		return retval;
	}
	constexpr bt block(unsigned b) const noexcept {
		if (b < nrBlocks) return _block[b];
		return bt(0); // return 0 when block index out of bounds
	}

	// copy a value over from one blockdecimal to this blockdecimal
	// blockdecimal is a 2's complement encoding, so we sign-extend by default
	template<unsigned srcbits>
	blockdecimal<nbits, bt>& assign(const blockdecimal<srcbits, bt>& rhs) {
		clear();
		// since bt is the same, we can simply copy the blocks in
		unsigned minNrBlocks = (this->nrBlocks < rhs.nrBlocks) ? this->nrBlocks : rhs.nrBlocks;
		for (unsigned i = 0; i < minNrBlocks; ++i) {
			_block[i] = rhs.block(i);
		}
		if constexpr (nbits > srcbits) { // check if we need to sign extend
			if (rhs.sign()) {
				for (unsigned i = srcbits; i < nbits; ++i) { // TODO: replace bit-oriented sequence with block
					setbit(i);
				}
			}
		}
		// enforce precondition for fast comparison by properly nulling bits that are outside of nbits
		_block[MSU] &= MSU_MASK;
		return *this;
	}

	// copy a value over from one blockdecimal to this without sign-extending the value
	// blockdecimal is a 2's complement encoding, so we sign-extend by default
	// for fraction/significent encodings, we need to turn off sign-extending.
	template<unsigned srcbits>
	blockdecimal<nbits, bt>& assignWithoutSignExtend(const blockdecimal<srcbits, bt>& rhs) {
		clear();
		// since bt is the same, we can simply copy the blocks in
		unsigned minNrBlocks = (this->nrBlocks < rhs.nrBlocks) ? this->nrBlocks : rhs.nrBlocks;
		for (unsigned i = 0; i < minNrBlocks; ++i) {
			_block[i] = rhs.block(i);
		}
		// enforce precondition for fast comparison by properly nulling bits that are outside of nbits
		_block[MSU] &= MSU_MASK;
		return *this;
	}

	// return the position of the most significant bit, -1 if v == 0
	int msb() const noexcept {
		for (int i = int(MSU); i >= 0; --i) {
			if (_block[i] != 0) {
				bt mask = (bt(1u) << (bitsInBlock-1));
				for (int j = bitsInBlock - 1; j >= 0; --j) {
					if (_block[i] & mask) {
						return i * static_cast<int>(bitsInBlock) + j;
					}
					mask >>= 1;
				}
			}
		}
		return -1; // no significant bit found, all bits are zero
	}
	// conversion to native types
	int64_t to_long_long() const {
		constexpr unsigned sizeoflonglong = 8 * sizeof(long long);
		int64_t ll{ 0 };
		int64_t mask{ 1 };
		unsigned upper = (nbits < sizeoflonglong ? nbits : sizeoflonglong);
		for (unsigned i = 0; i < upper; ++i) {
			ll |= at(i) ? mask : 0;
			mask <<= 1;
		}
		if (sign() && upper < sizeoflonglong) { // sign extend
			for (unsigned i = upper; i < sizeoflonglong; ++i) {
				ll |= mask;
				mask <<= 1;
			}
		}
		return ll;
	}
	uint64_t to_ull() const {
		uint64_t ull{ 0 };
		uint64_t mask{ 1 };
		uint32_t msb = nbits < 64 ? nbits : 64;
		for (uint32_t i = 0; i < msb; ++i) {
			ull |= at(i) ? mask : 0;
			mask <<= 1;
		}
		return ull;
	}

	// determine the rounding mode: result needs to be rounded up if true
	bool roundingMode(unsigned targetLsb) const {
		bool lsb = at(targetLsb);
		bool guard = (targetLsb == 0 ? false : at(targetLsb - 1));
		bool round = (targetLsb > 1 ? at(targetLsb - 2) : false);
		bool sticky =(targetLsb < 3 ? false : any(targetLsb - 3));
		bool tie = guard && !round && !sticky;
		return (lsb && tie) || (guard && !tie);
	}
	bool any(unsigned msb) const {
		msb = (msb > nbits - 1 ? nbits - 1 : msb);
		unsigned topBlock = msb / bitsInBlock;
		bt mask = bt(ALL_ONES >> (bitsInBlock - 1 - (msb % bitsInBlock)));
		for (unsigned i = 0; i < topBlock; ++i) {
			if (_block[i] > 0) return true;
		}
		// process the partial block
		if (_block[topBlock] & mask) return true;
		return false;
	}

protected:
	// HELPER methods
	// none

private:
	bt _block[nrBlocks];

	//////////////////////////////////////////////////////////////////////////////
	// friend functions

	// integer - integer logic comparisons
	template<unsigned N, typename B, BinaryNumberType T>
	friend bool operator==(const blockdecimal<N, B, T>& lhs, const blockdecimal<N, B, T>& rhs);
	template<unsigned N, typename B, BinaryNumberType T>
	friend bool operator!=(const blockdecimal<N, B, T>& lhs, const blockdecimal<N, B, T>& rhs);
	// the other logic operators are defined in terms of arithmetic terms

	template<unsigned N, typename B, BinaryNumberType T>
	friend std::ostream& operator<<(std::ostream& ostr, const blockdecimal<N, B, T>& v);
};

// Generate a type tag for blockdecimal
template<unsigned N, typename B, BinaryNumberType T>
std::string type_tag(const blockdecimal<N, B, T>& = {}) {
	std::stringstream str;
	str << "blockdecimal<"
		<< std::setw(4) << N << ", "
		<< typeid(B).name() << ", "
		<< typeid(T).name() << '>';
	return str.str();
}

//////////////////////////////////////////////////////////////////////////////////
// logic operators

template<unsigned N, typename B, BinaryNumberType T>
inline bool operator==(const blockdecimal<N, B, T>& lhs, const blockdecimal<N, B, T>& rhs) {
	for (unsigned i = 0; i < lhs.nrBlocks; ++i) {
		if (lhs._block[i] != rhs._block[i]) {
			return false;
		}
	}
	return true;
}
template<unsigned N, typename B, BinaryNumberType T>
inline bool operator!=(const blockdecimal<N, B, T>& lhs, const blockdecimal<N, B, T>& rhs) {
	return !operator==(lhs, rhs);
}
template<unsigned N, typename B, BinaryNumberType T>
inline bool operator<(const blockdecimal<N, B, T>& lhs, const blockdecimal<N, B, T>& rhs) {
	if (lhs.ispos() && rhs.isneg()) return false; // need to filter out possible overflow conditions
	if (lhs.isneg() && rhs.ispos()) return true;  // need to filter out possible underflow conditions
	if (lhs == rhs) return false; // so the maxneg logic works
	blockdecimal<N, B, T> mneg; maxneg<N, B>(mneg);
	if (rhs == mneg) return false; // special case: nothing is smaller than maximum negative
	blockdecimal<N, B, T> diff = lhs - rhs;
	return diff.isneg();
}
template<unsigned N, typename B, BinaryNumberType T>
inline bool operator<=(const blockdecimal<N, B, T>& lhs, const blockdecimal<N, B, T>& rhs) {
	return (lhs < rhs || lhs == rhs);
}
template<unsigned N, typename B, BinaryNumberType T>
inline bool operator>(const blockdecimal<N, B, T>& lhs, const blockdecimal<N, B, T>& rhs) {
	return !(lhs <= rhs);
}
template<unsigned N, typename B, BinaryNumberType T>
inline bool operator>=(const blockdecimal<N, B, T>& lhs, const blockdecimal<N, B, T>& rhs) {
	return !(lhs < rhs);
}
///////////////////////////////////////////////////////////////////////////////
// binary operators

template<unsigned N, typename B, BinaryNumberType T>
inline blockdecimal<N, B, T> operator+(const blockdecimal<N, B, T>& a, const blockdecimal<N, B, T>& b) {
	blockdecimal<N, B, T> c(a);
	return c += b;
}
template<unsigned N, typename B, BinaryNumberType T >
inline blockdecimal<N, B, T> operator-(const blockdecimal<N, B, T>& a, const blockdecimal<N, B, T>& b) {
	blockdecimal<N, B, T> c(a);
	return c -= b;
}
template<unsigned N, typename B, BinaryNumberType T>
inline blockdecimal<N, B, T> operator*(const blockdecimal<N, B, T>& a, const blockdecimal<N, B, T>& b) {
	blockdecimal<N, B, T> c(a);
	return c *= b;
}
template<unsigned N, typename B, BinaryNumberType T>
inline blockdecimal<N, B, T> operator/(const blockdecimal<N, B, T>& a, const blockdecimal<N, B, T>& b) {
	blockdecimal<N, B, T> c(a);
	return c /= b;
}
template<unsigned N, typename B, BinaryNumberType T>
inline blockdecimal<N, B, T> operator%(const blockdecimal<N, B, T>& a, const blockdecimal<N, B, T>& b) {
	blockdecimal<N, B, T> c(a);
	return c %= b;
}

template<unsigned N, typename B, BinaryNumberType T>
inline blockdecimal<N, B, T> operator<<(const blockdecimal<N, B, T>& a, const long b) {
	blockdecimal<N, B, T> c(a);
	return c <<= b;
}
template<unsigned N, typename B, BinaryNumberType T>
inline blockdecimal<N, B, T> operator>>(const blockdecimal<N, B, T>& a, const long b) {
	blockdecimal<N, B, T> c(a);
	return c >>= b;
}

// divide a by b and return both quotient and remainder
template<unsigned N, typename B, BinaryNumberType T>
quorem<N, B, T> longdivision(const blockdecimal<N, B, T>& _a, const blockdecimal<N, B, T>& _b) {
	using BlockBinary = blockdecimal<N + 1, B, T>;
	quorem<N, B, T> result = { 0, 0, 0 };
	if (_b.iszero()) {
		result.exceptionId = 1; // division by zero
		return result;
	}
	// generate the absolute values to do long division
	// 2's complement special case -max requires an signed int that is 1 bit bigger to represent abs()
	bool a_sign = _a.sign();
	bool b_sign = _b.sign();
	bool result_negative = (a_sign ^ b_sign);
	// normalize both arguments to positive, which requires expansion by 1-bit to deal with maxneg
	BlockBinary a(_a);
	BlockBinary b(_b);
	if (a_sign) a.twosComplement();
	if (b_sign) b.twosComplement();

	if (a < b) { // optimization for integer numbers
		result.rem = _a; // a % b = a when a / b = 0
		return result;   // a / b = 0 when b > a
	}
	// initialize the long division
	BlockBinary accumulator = a;
	// prepare the subtractand
	BlockBinary subtractand = b;
	int msb_b = b.msb();
	int msb_a = a.msb();
	int shift = msb_a - msb_b;
	subtractand <<= shift;
	// long division
	for (int i = shift; i >= 0; --i) {
		if (subtractand <= accumulator) {
			accumulator -= subtractand;
			result.quo.setbit(static_cast<unsigned>(i));
		}
		else {
			result.quo.setbit(static_cast<unsigned>(i), false);
		}
		subtractand >>= 1;
	}
	if (result_negative) {  // take 2's complement
		result.quo.flip();
		result.quo += 1;
	}
	if (_a.isneg()) {
		result.rem = -accumulator;
	}
	else {
		result.rem = accumulator;
	}
	return result;
}

///////////////////////////////////////////////////////////////////////////////
// specialty binary operators

// unrounded addition, returns a blockdecimal that is of size nbits+1
template<unsigned N, typename B, BinaryNumberType T>
inline blockdecimal<N + 1, B, T> uradd(const blockdecimal<N, B, T>& a, const blockdecimal<N, B, T>& b) {
	blockdecimal<N + 1, B, T> result(a);
	return result += blockdecimal<N + 1, B, T>(b);
}

// unrounded subtraction, returns a blockdecimal that is of size nbits+1
template<unsigned N, typename B, BinaryNumberType T>
inline blockdecimal<N + 1, B, T> ursub(const blockdecimal<N, B, T>& a, const blockdecimal<N, B, T>& b) {
	blockdecimal<N + 1, B, T> result(a);
	return result -= blockdecimal<N + 1, B, T>(b);
}

#define TRACE_URMUL 0
// unrounded multiplication, returns a blockdecimal that is of size 2*nbits
// using brute-force sign-extending of operands to yield correct sign-extended result for 2*nbits 2's complement.
template<unsigned N, typename B, BinaryNumberType T>
inline blockdecimal<2*N, B, T> urmul(const blockdecimal<N, B, T>& a, const blockdecimal<N, B, T>& b) {
	using BlockBinary = blockdecimal<2 * N, B, T>;
	BlockBinary result(0);
	if (a.iszero() || b.iszero()) return result;

	// compute the result
	BlockBinary signextended_a(a);
	BlockBinary multiplicant(b);
#if TRACE_URMUL
	std::cout << "    " << to_binary(a) << " * " << to_binary(b) << std::endl;
	std::cout << std::setw(3) << 0 << ' ' << to_binary(multiplicant) << ' ' << to_binary(result) << std::endl;
#endif
	for (unsigned i = 0; i < 2*N; ++i) {
		if (signextended_a.at(i)) {
			result += multiplicant;
		}
		multiplicant <<= 1;
#if TRACE_URMUL
		std::cout << std::setw(3) << i << ' ' << to_binary(multiplicant) << ' ' << to_binary(result) << std::endl;
#endif

	}
#if TRACE_URMUL
	std::cout << "fnl " << to_binary(result) << std::endl;
#endif
	//blockdecimal<2 * nbits, bt> clipped(result);
	// since we used operator+=, which enforces the nulling of leading bits
	// we don't need to null here
	return result;
}

// unrounded multiplication, returns a blockdecimal that is of size 2*nbits
// using nbits modulo arithmetic with final sign
template<unsigned N, typename B, BinaryNumberType T>
inline blockdecimal<2 * N, B, T> urmul2(const blockdecimal<N, B, T>& a, const blockdecimal<N, B, T>& b) {
	blockdecimal<2 * N, B, T> result(0);
	if (a.iszero() || b.iszero()) return result;

	// compute the result
	bool result_sign = a.sign() ^ b.sign();
	// normalize both arguments to positive in new size
	blockdecimal<N + 1, B, T> a_new(a); // TODO optimize: now create a, create _a.bb, copy, destroy _a.bb_copy
	blockdecimal<N + 1, B, T> b_new(b);
	if (a.sign()) a_new.twosComplement();
	if (b.sign()) b_new.twosComplement();
	blockdecimal<2*N, B, T> multiplicant(b_new);

#if TRACE_URMUL
	std::cout << "    " << a_new << " * " << b_new << std::endl;
	std::cout << std::setw(3) << 0 << ' ' << multiplicant << ' ' << result << std::endl;
#endif
	for (unsigned i = 0; i < (N+1); ++i) {
		if (a_new.at(i)) {
			result += multiplicant;  // if multiplicant is not the same size as result, the assignment will get sign-extended if the MSB is true, this is not correct because we are assuming unsigned binaries in this loop
		}
		multiplicant <<= 1;
#if TRACE_URMUL
		std::cout << std::setw(3) << i << ' ' << multiplicant << ' ' << result << std::endl;
#endif
	}
	if (result_sign) result.twosComplement();
#if TRACE_URMUL
	std::cout << "fnl " << result << std::endl;
#endif
	return result;
}

#define TRACE_DIV 0
// unrounded division, returns a blockdecimal that is of size 2*nbits
template<unsigned nbits, unsigned roundingBits, typename B, BinaryNumberType T>
inline blockdecimal<2 * nbits + roundingBits, B, T> urdiv(const blockdecimal<nbits, B, T>& a, const blockdecimal<nbits, B, T>& b) {
	if (b.iszero()) {
		// division by zero
		throw "urdiv divide by zero";
	}
	// generate the absolute values to do long division
	// 2's complement special case -max requires an signed int that is 1 bit bigger to represent abs()
	bool a_sign = a.sign();
	bool b_sign = b.sign();
	bool result_negative = (a_sign ^ b_sign);

	// normalize both arguments to positive, which requires expansion by 1-bit to deal with maxneg
	blockdecimal<nbits + 1, B, T> a_new(a); // TODO optimize: now create a, create _a.bb, copy, destroy _a.bb_copy
	blockdecimal<nbits + 1, B, T> b_new(b);
#if TRACE_DIV
	std::cout << "a " << to_binary(a_new) << '\n';
	std::cout << "b " << to_binary(b_new) << '\n';
#endif
	if (a_sign) a_new.twosComplement();
	if (b_sign) b_new.twosComplement();
#if TRACE_DIV
	std::cout << "a " << to_binary(a_new) << '\n';
	std::cout << "b " << to_binary(b_new) << '\n';
#endif

	// initialize the long division
	blockdecimal<2 * nbits + roundingBits + 1, B, T> decimator(a_new);
	blockdecimal<2 * nbits + roundingBits + 1, B, T> subtractand(b_new); // prepare the subtractand
	blockdecimal<2 * nbits + roundingBits + 1, B, T> result;

	constexpr unsigned msp = nbits + roundingBits; // msp = most significant position
	decimator <<= msp; // scale the decimator to the largest possible positive value

	int msb_b = subtractand.msb();
	int msb_a = decimator.msb();
	int shift = msb_a - msb_b;
	subtractand <<= shift;
	int offset = msb_a - static_cast<int>(msp);  // msb of the result
	int scale  = shift - static_cast<int>(msp);  // scale of the result quotient

#if TRACE_DIV
	std::cout << "  " << to_binary(decimator, true)   << " msp  : " << msp << '\n';
	std::cout << "- " << to_binary(subtractand, true) << " shift: " << shift << '\n';
#endif
	// long division
	for (int i = msb_a; i >= 0; --i) {

		if (subtractand <= decimator) {
			decimator -= subtractand;
			result.setbit(static_cast<unsigned>(i));
		}
		else {
			result.setbit(static_cast<unsigned>(i), false);
		}
		subtractand >>= 1;

#if TRACE_DIV
		std::cout << "  " << to_binary(decimator, true) << "  current quotient: " << to_binary(result, true) << '\n';
		std::cout << "- " << to_binary(subtractand, true) << '\n';
#endif
	}
	result <<= (scale - offset);
#if TRACE_DIV
	std::cout << "  " << "scaled result: " << to_binary(result, true) << " scale : " << scale << " offset : " << offset << '\n';
#endif
	if (result_negative) result.twosComplement();
	return result;
}

//////////////////////////////////////////////////////////////////////////////
// conversions to string representations

// create a binary representation of the storage
template<unsigned nbits, typename BlockType, BinaryNumberType NumberType>
std::string to_binary(const blockdecimal<nbits, BlockType, NumberType>& number, bool nibbleMarker = false) {
	std::stringstream s;
	s << "0b";
	for (unsigned i = 0; i < nbits; ++i) {
		unsigned bitIndex = nbits - 1ull - i;
		s << (number.at(bitIndex) ? '1' : '0');
		if (bitIndex > 0 && (bitIndex % 4) == 0 && nibbleMarker) s << '\'';
	}
	return s.str();
}

// local helper to display the contents of a byte array
template<unsigned nbits, typename BlockType, BinaryNumberType NumberType>
std::string to_hex(const blockdecimal<nbits, BlockType, NumberType>& number, bool wordMarker = true) {
	static constexpr unsigned bitsInByte = 8;
	static constexpr unsigned bitsInBlock = sizeof(BlockType) * bitsInByte;
	char hexChar[16] = {
		'0', '1', '2', '3', '4', '5', '6', '7',
		'8', '9', 'A', 'B', 'C', 'D', 'E', 'F',
	};
	std::stringstream ss;
	ss << "0x" << std::hex;
	int nrNibbles = int(1 + ((nbits - 1) >> 2));
	for (int n = nrNibbles - 1; n >= 0; --n) {
		uint8_t nibble = number.nibble(static_cast<unsigned>(n));
		ss << hexChar[nibble];
		if (wordMarker && n > 0 && ((n * 4ll) % bitsInBlock) == 0) ss << '\'';
	}
	return ss.str();
}

// ostream operator
template<unsigned nbits, typename BlockType, BinaryNumberType NumberType>
std::ostream& operator<<(std::ostream& ostr, const blockdecimal<nbits, BlockType, NumberType>& number) {
	return ostr << number.to_long_long(); // TODO: add an decimal converter
}
#endif

}} // namespace sw::universal


text:
using System.Reflection;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("Magine.ProgramInformationSample.Core.Tests")]
[assembly: AssemblyDescription("Tests for the core logic of the program information sample.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Magine.ProgramInformationSample.Core.Tests")]
[assembly: AssemblyCopyright("Copyright ©  2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("23ab1086-ac59-465a-9c49-48a883ffd7ad")]

[assembly: AssemblyVersion("0.1.0.0")]
[assembly: AssemblyFileVersion("0.1.0.0")]


text:
namespace RapidCore.Locking
{
    public enum DistributedAppLockExceptionReason
    {
        /// <summary>
        /// Status to use when the lock is acquired by someone else
        /// </summary>
        LockAlreadyAcquired,

        /// <summary>
        /// Timeout acquiring the lock, i.e someone else has acquired it
        /// </summary>
        Timeout,

        /// <summary>
        /// Something horrible happened - check the inner exception for details
        /// </summary>
        SeeInnerException
    }
}


text:
import org.jetbrains.annotations.*;

class Test {

  @Contract("!null -> null")
  static String test(String s) {
    if(s != null) {
      return <warning descr="Contract clause '!null -> null' is violated">getValue(s)</warning>;
    }
    return getDefaultValue();
  }

  @NotNull
  static String getValue(String s) {
    return s.trim();
  }

  static String getDefaultValue() {
    return "foo";
  }
}


text:
MAKE="$1"
shift

OUT_DIR="$1"
shift

TARGETS="$1"
shift

commit_hash=`git show -s --format=%H HEAD`
author_name=`git show -s --format=%an HEAD`
author_email=`git show -s --format=%ae HEAD`
required_signed_off_by_line="JerryScript-DCO-1.0-Signed-off-by: $author_name $author_email"
actual_signed_off_by_line=`git show -s --format=%B HEAD | sed '/^$/d' | tail -n 1`

if [ "$actual_signed_off_by_line" != "$required_signed_off_by_line" ]
then
 echo -e "\e[1;33m Signed-off-by message is incorrect. The following line should be at the end of the $commit_hash commit's message: '$required_signed_off_by_line'. \e[0m\n"

 exit 1
fi

VERA_DIRECTORIES_EXCLUDE_LIST="-path ./third-party -o -path tests -o -path ./targets"
VERA_CONFIGURATION_PATH="./tools/vera++"

SOURCES_AND_HEADERS_LIST=`find . -type d \( $VERA_DIRECTORIES_EXCLUDE_LIST \) -prune -or -name "*.c" -or -name "*.cpp" -or -name "*.h"`
./tools/vera++/vera.sh -r $VERA_CONFIGURATION_PATH -p jerry $SOURCES_AND_HEADERS_LIST -e --no-duplicate
STATUS_CODE=$?

if [ $STATUS_CODE -ne 0 ]
then
 echo -e "\e[1;33m vera++ static checks failed. See output above for details. \e[0m\n"

 exit $STATUS_CODE
fi

echo -e "\nBuilding...\n\n"
$MAKE STATIC_CHECK=ON build || exit 1
echo -e "\n================ Build completed successfully. Running precommit tests ================\n"
echo -e "All targets were built successfully. Starting unit tests' run.\n"
$MAKE unittests_run || exit 1
echo -e "\nUnit tests completed successfully. Starting full testing.\n"

./tools/precommit-full-testing.sh "${OUT_DIR}" "${TARGETS}" || exit 1


text:
const args = () => ({
  skipDownload: process.argv.includes('--skip-download'),
  skipUnzip: process.argv.includes('--skip-unzip'),
  skipMin: process.argv.includes('--skip-min'),
});

module.exports = args;


text:
<form
  ng-controller="kubernetesSecurityGroupBackendController as backendController"
  class="container-fluid form-horizontal"
  name="backend"
>

      Load Balancer
      <help-field key="kubernetes.ingress.backend.service"></help-field>

      <ui-select
        ng-if="loadBalancers.length"
        ng-model="securityGroup.ingress.serviceName"
        class="form-control input-sm"
      >
        <ui-select-match>{{securityGroup.ingress.serviceName}}</ui-select-match>
        <ui-select-choices repeat="loadBalancer in loadBalancers | filter: $select.search">

        </ui-select-choices>
      </ui-select>

      Port
      <help-field key="kubernetes.ingress.backend.port"></help-field>

      <input
        type="number"
        class="form-control input-sm"
        name="details"
        ng-model="securityGroup.ingress.port"
        min="1"
        max="{{backendController.maxPort}}"
      />

</form>


text:
package org.apache.ivy.util.cli;

import java.util.HashMap;
import java.util.Map;

public class CommandLine {
    private Map/*<String, String[]>*/ optionValues = new HashMap();
    private String[] leftOverArgs;

    void addOptionValues(String option, String[] values) {
        optionValues.put(option, values);
    }

    void setLeftOverArgs(String[] args) {
        leftOverArgs = args;
    }

    public boolean hasOption(String option) {
        return optionValues.containsKey(option);
    }

    public String getOptionValue(String option) {
        String[] values = getOptionValues(option);
        return values == null || values.length == 0 ? null : values[0];
    }

    public String getOptionValue(String option, String defaultValue) {
        String value = getOptionValue(option);
        return value == null ? defaultValue : value;
    }

    public String[] getOptionValues(String option) {
        return (String[]) optionValues.get(option);
    }

    public String[] getLeftOverArgs() {
        return leftOverArgs;
    }

}


text:
¿cuanto sabes de jack?

	<form action="server" method="GET">

			¿En que mes nació?
			<input type="month" id="month_birth" name="q_birth"
			title="meses del año en el que nacio Jack Nicholson" min="1900-01" max=""/>

			Premio oscar al mejor actor
			<select id="select_oscar" name="q_oscar" size="1">
				<optgroup label="peliculas">
					<option>El honor de los Prizzi</option>
					<option>Alguien voló sobre el nido del cuco</option>
					<option>Chinatown</option>
				</optgroup>
			</select>

		<fieldset>
			<legend>Curiosidades</legend>

<input name="q_anecdota" id="check_anecdota" type="checkbox" >Sus familiares murieron en el Holocausto

<input name="q_anecdota" id="check_anecdota" type="checkbox" >Rompio voluntariamente la Puerta en la escena del resplendor

<input name="q_anecdota" id="check_anecdota" type="checkbox" >Empezó tomando clases de teatro

		</fieldset>

		<fieldset>
			<legend>Pelicula</legend>

<input name="q_peli" id="check_peli" type="radio" >Easy Rider

<input name="q_peli" id="check_peli" type="radio" checked="checked">El último deber

<input name="q_peli" id="check_peli" type="radio" >Batman

		</fieldset>
	</form>


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
Hermes - Material IRC Client
Copyright 2015 Numix Project Ltd.
-->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    style="@style/HermesDialog"
    android:minWidth="350dp"
    android:padding="8dp">
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textSize="21sp"
        android:padding="8dp"
        android:textColor="#111111"
        android:paddingBottom="16dp"
        android:text="Join a room"/>
    <android.support.design.widget.TextInputLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:paddingBottom="32dp">
        <EditText
            android:id="@+id/channel"
            android:singleLine="true"
            android:inputType="textCapSentences"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:textSize="@dimen/abc_text_size_body_2_material"
            android:text="#" />
    </android.support.design.widget.TextInputLayout>
    <Button
        android:id="@+id/join"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:padding="8dp"
        style="?android:attr/borderlessButtonStyle"
        android:background="@null"
        android:textColor="@color/colorAccent"
        android:layout_gravity="right"
        android:text="@string/join" />
</LinearLayout>


text:
const passport = require('passport');
const Strategy = require('passport-http-bearer').Strategy;

const User = require('./models/model_user');
const config = require('./config');

module.exports = function(passport) {
    passport.use(new Strategy(
        function(token, done) {
            User.findOne({
                token: token
            }, function(err, user) {
                if (err) {
                    return done(err);
                }
                if (!user) {
                    return done(null, false);
                }
                return done(null, user);
            });
        }
    ));
};


text:
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Copyright (c) 2013 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

package org.xwalk.core.xwview.test;

import android.graphics.Bitmap;
import android.test.suitebuilder.annotation.MediumTest;
import android.util.Log;
import android.test.TouchUtils;
import android.test.InstrumentationTestCase;

import java.util.concurrent.TimeUnit;

import org.chromium.content.browser.test.util.CallbackHelper;
import org.chromium.base.test.util.DisabledTest;
import org.chromium.base.test.util.Feature;
import org.chromium.content.browser.ContentView;
import org.chromium.content.browser.ContentViewCore;

import org.xwalk.core.XWalkClient;
import org.xwalk.core.XWalkContent;
import org.xwalk.core.XWalkView;

/**
 * Renderer responsiveness tests:
 *
 * Internally, a hang monitor timer will start for each renderer when there is
 * an input event sent to the renderer. If the ACK for handling the input event
 * is not received in 30 seconds, the renderer is deemed to be unresponsive to
 * user interaction.
 */
public class RendererResponsivenessTest extends XWalkViewTestBase {
    private OnRendererResponsivenessHelper responsiveHelper = new OnRendererResponsivenessHelper();
    private OnRendererResponsivenessHelper unresponsiveHelper = new OnRendererResponsivenessHelper();

    @Override
    public void setUp() throws Exception {
        super.setUp();
    }

    //@Feature({"RendererResponsivenessTest"})
    //@MediumTest
    @DisabledTest
    public void testRendererUnresponsive() throws Throwable {
        getXWalkView().setXWalkClient(new ResponsivenessTestClient() {
            @Override
            public void onRendererUnresponsive(XWalkView view) {
                unresponsiveHelper.notifyCalled(view);
            }
        });

        loadAssetFile("renderHung.html");

        int currentCallCount = unresponsiveHelper.getCallCount();

        XWalkContent content = getXWalkView().getXWalkViewContentForTest();
        content.getContentViewCoreForTest().evaluateJavaScript("deadLoopForever();", null);

        /**
         * Send an input event to xwalk view. Internally, if no ACK message is received
         * for handling this input event in 30 seconds, onRendererUnresponsive callback
         * would be called.
         */
        TouchUtils.clickView(this, getXWalkView());

        /**
         * The timeout for responsiveness checking is 30 seconds, so here the timeout
         * for callback is set to 40 seconds to ensure the onRendererResponsive
         * to be called.
         */
        unresponsiveHelper.waitForCallback(currentCallCount, 1, 40, TimeUnit.SECONDS);
        assertEquals(getXWalkView(), unresponsiveHelper.getXWalkView());
    }

    //@Feature({"RendererResponsivenessTest"})
    //@MediumTest
    @DisabledTest
    public void testRendererResponsiveAgain() throws Throwable {
        getXWalkView().setXWalkClient(new ResponsivenessTestClient() {
            /**
             * Called once the renderer become responsive again.
             */
            @Override
            public void onRendererResponsive(XWalkView view) {
                responsiveHelper.notifyCalled(view);
            }
        });

        loadAssetFile("renderHung.html");

        int currentCallCount = responsiveHelper.getCallCount();
        XWalkContent content = getXWalkView().getXWalkViewContentForTest();
        content.getContentViewCoreForTest().evaluateJavaScript("deadLoopFor40secs();", null);

        /**
         * Send an input event to start the hung monitor.
         */
        TouchUtils.clickView(this, getXWalkView());

        /**
         * Wait for onRendererResponsive to called. The dead loop is designed to run
         * 40 seconds, and here we wait for 50 seconds to ensure it has enough time to
         * call onRendererResponsive callback.
         */
        responsiveHelper.waitForCallback(currentCallCount, 1, 50, TimeUnit.SECONDS);
        assertEquals(getXWalkView(), responsiveHelper.getXWalkView());
    }

    private final class OnRendererResponsivenessHelper extends CallbackHelper {
        private XWalkView mView;

        public void notifyCalled(XWalkView view) {
            mView = view;
            notifyCalled();
        }
        public XWalkView getXWalkView() {
            assert getCallCount() > 0;
            return mView;
        }
    }

    private class ResponsivenessTestClient extends XWalkClient {
        @Override
        public void onPageStarted(XWalkView view, String url, Bitmap favicon) {
            mTestContentsClient.onPageStarted(url);
        }

        @Override
        public void onPageFinished(XWalkView view, String url) {
            mTestContentsClient.didFinishLoad(url);
        }
    };
}


text:
package com.sinotrans.transport.gbs.dto;

import com.sinotrans.transport.gbs.dto.vo.TruckingActIssuedResponseVo;

import java.util.List;

/**
 * Created by jason on 2016/6/6.
 */
public class TruckingActIssuedResponse extends RestResponse {

    private List<TruckingActIssuedResponseVo> taskVoList;

    public TruckingActIssuedResponse(List<TruckingActIssuedResponseVo> taskVoList) {
        this();
        this.taskVoList = taskVoList;
    }

    public TruckingActIssuedResponse(int errorCode, String errorMsg) {
        super(errorCode, errorMsg);
    }

    public TruckingActIssuedResponse() {
        super();
    }

    public List<TruckingActIssuedResponseVo> getTaskVoList() {
        return taskVoList;
    }

    public void setTaskVoList(List<TruckingActIssuedResponseVo> taskVoList) {
        this.taskVoList = taskVoList;
    }
}


text:
layout: default
title: Home
---

{% for post in paginator.posts %}

{{ post.title }}

{% endfor %}

  {% if paginator.next_page %}
    ⟵
  {% else %}
    ⟵
  {% endif %}

  {% if paginator.previous_page %}
    ⟶
    {% else %}
      ⟶
  {% endif %}


text:
function glomerateMe() {
  var threads    = GmailApp.getInboxThreads();
  var glomerates = [];

  // Go through each thread in our inbox
  for (var i = 0; i < threads.length; i++) {
    var thread = threads[i];
    var emails = thread.getMessages();

    // Go through each email in the thread
    for (var j = 0; j < emails.length; j++) {
      var email = emails[j];
      var to    = email.getTo();

      var plus      = (to.indexOf("+") == -1) ? 0 : (to.indexOf("+") + 1);
      var recipient = to.substr(plus, (to.indexOf("@") - plus)); // Get just the Group ID from the 'to' field

      if (glomerates[recipient] == undefined) {
        // Create an array for that glomerate
        glomerates[recipient] = [];
      }

      // Get a dictionary with the sender's email address, subject, body
      var temp = {from: email.getFrom(), subject: email.getSubject(), body: email.getBody()};
      glomerates[recipient].push(temp);
    }

    // Move the thread to trash since we don't need it anymore
    thread.markRead();
    thread.moveToTrash();
  }

  // Now we go through each of the threads we found
  for (id in glomerates) {
    var subject = "Glomerate.Me - " + id;
    var body    = "";
    var emails  = [];

    // Build the HTML body of the email we're going to send out
    for (var i = 0; i < glomerates[id].length; i++) {
      var thread = glomerates[id][i];

      body += "

" + thread['subject'] + "
" + thread['body'] + "

";
      emails.push(thread['from']);
    }

    // Send out the emails!
    for (var i = 0; i < emails.length; i++) {
      if (!emails[i].equalsIgnoreCase("glomerateme@gmail.com")) {
        GmailApp.sendEmail(emails[i], subject, body, {htmlBody: body, noReply: true});
      }
    }
  }
}


text:
<resources>
    <string name="app_name">Views</string>
</resources>


text:
BEGIN_EVENT_TABLE(DlgStateXML, wxDialog)
EVT_BUTTON(DLG_BTN_SAVELOG, OnSaveInfo)
EVT_BUTTON(DLG_BTN_LOADXML, OnLoadXML)
END_EVENT_TABLE()

wxWindow *DlgStateXML::m_Parent = NULL;
DlgStateXML *DlgStateXML::m_Inst = NULL;

void
DlgStateXML::SetParent(wxWindow *p) {

	m_Parent = p;
}

DlgStateXML*
DlgStateXML::Instance () {

	if (m_Inst == NULL)
		m_Inst = new DlgStateXML();

	return m_Inst;
}

DlgStateXML::DlgStateXML(): wxDialog(DlgStateXML::m_Parent, -1, wxT("Nau - State Information"),wxDefaultPosition,
						   wxDefaultSize,wxRESIZE_BORDER|wxDEFAULT_DIALOG_STYLE)
{
	this->SetSizeHints( wxDefaultSize, wxDefaultSize);

	wxBoxSizer *bSizer1;
	bSizer1 = new wxBoxSizer( wxVERTICAL);

	wxStaticBoxSizer * sbSizer1;
	sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxEmptyString ), wxVERTICAL );

	m_log = new wxPropertyGridManager(this, DLG_MI_LOG,
		wxDefaultPosition, wxDefaultSize,
		wxPG_BOLD_MODIFIED | wxPG_SPLITTER_AUTO_CENTER |
		wxPGMAN_DEFAULT_STYLE
		);
	m_log->AddPage(wxT("States"));

	sbSizer1->Add(m_log, 1, wxALL|wxEXPAND, 5);

	bSizer1->Add(sbSizer1, 1, wxEXPAND, 5);

	wxBoxSizer* bSizer2;
	bSizer2 = new wxBoxSizer( wxHORIZONTAL );

	m_bLoad = new wxButton(this, DLG_BTN_LOADXML, wxT("Load XML"));
	bSizer2->Add(m_bLoad, 0, wxALL, 5);

	m_bSave = new wxButton(this,DLG_BTN_SAVELOG,wxT("Save"));
	bSizer2->Add(m_bSave, 0, wxALL, 5);

	bSizer1->Add(bSizer2, 0, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND|wxSHAPED, 5);

	this ->SetSizer(bSizer1);
	this->Layout();
	this->Centre(wxBOTH);
}

void
DlgStateXML::updateDlg()
{
	std::vector<std::string> enumNames = NAU->getStateEnumNames();
	std::string value;
	wxPGProperty *enumProperty;
	wxPGProperty *root = m_log->GetCurrentPage()->GetRoot();
	for (std::string enumName : enumNames){
		value = NAU->getState(enumName);
		enumProperty = root->GetPropertyByName(enumName);
		if (!enumProperty){
			enumProperty = m_log->Append(new wxStringProperty(enumName, wxPG_LABEL, value));
			enumProperty->Enable(false);
		}
		else{
			enumProperty->SetValue(wxVariant(value));
		}
	}
}

std::string &
DlgStateXML::getName ()
{
	name = "DlgStateXML";
	return(name);
}

void
DlgStateXML::eventReceived(const std::string &sender, const std::string &eventType, nau::event_::IEventData *evt)
{
}

void DlgStateXML::append(std::string s) {

}

void DlgStateXML::OnSaveInfo(wxCommandEvent& event) {
	wxFileDialog dialog(this,
		wxT("State info save file dialog"),
		wxEmptyString,
		wxT("stateinfo.txt"),
		wxT("Text files (*.txt)|*.txt"),
		wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
	if (wxID_OK == dialog.ShowModal()) {

		wxString path = dialog.GetPath();

		fstream s;
		s.open(path.mb_str(), fstream::out);
		OnSavePropertyGridAux(s, m_log->GetCurrentPage());
		s.close();
	}
}

void DlgStateXML::OnSavePropertyGridAux(std::fstream &s, wxPropertyGridPage *page){
	wxPGProperty *bufferPG, *levelAux;
	wxPropertyGridIterator iterator = page->GetIterator();
	int level;
	while (!iterator.AtEnd()){
		bufferPG = iterator.GetProperty();
		level = 0;
		levelAux = bufferPG;
		while (levelAux->GetParent() != levelAux->GetMainParent()){
			levelAux = levelAux->GetParent();
			level++;
		}

		if (level == 0){
			s << bufferPG->GetBaseName().ToStdString() << ":\t" << bufferPG->GetValue().GetString().ToStdString() << "\n";
		}
		else{
			for (int i = 0; i < level; i++){
				s << "\t";
			}
			s << bufferPG->GetBaseName().ToStdString() << ":\t" << bufferPG->GetValue().GetString().ToStdString() << "\n";
		}
		iterator.Next();
	}
}

void DlgStateXML::OnLoadXML(wxCommandEvent& event) {
	static const wxChar *fileTypes = _T("XML files|*.xml|All files|*.*");

	wxFileDialog *openFileDlg = new wxFileDialog(this, _("Open File"), _(""), _(""), fileTypes, wxFD_OPEN, wxDefaultPosition);

	if (wxID_OK == openFileDlg->ShowModal()) {
		wxString path = openFileDlg->GetPath();

		try {
			NAU->loadStateXMLFile(path.ToStdString());
			updateDlg();
		}
		catch (nau::ProjectLoaderError &e) {
			wxMessageBox(wxString(e.getException()));
		}
		catch (std::string s) {
			wxMessageBox(wxString(s.c_str()));
		}

	}
}