text:
<?xml version="1.0" encoding="UTF-8"?>
<billStatus>
  <bill>
    <billType>HR</billType>
    <subjects>
      <billSubjects>
        <policyArea>
          <name>Government Operations and Politics</name>
        </policyArea>
        <legislativeSubjects>
          <item>
            <name>Congressional tributes</name>
          </item>
          <item>
            <name>Georgia</name>
          </item>
          <item>
            <name>Government buildings, facilities, and property</name>
          </item>
          <item>
            <name>Postal service</name>
          </item>
        </legislativeSubjects>
      </billSubjects>
    </subjects>
    <recordedVotes />
    <policyArea>
      <name>Government Operations and Politics</name>
    </policyArea>
    <constitutionalAuthorityStatementText><![CDATA[
From the Congressional Record Online through the Government Publishing Office [www.gpo.gov]By Mr. COLLINS of Georgia:H.R. 3821.Congress has the power to enact this legislation pursuantto the following:Under Article I, Section 8, Clause 7 of the United StatesConstitution, Congress is empowered ``To establish PostOffices and post roads''.[Page H7486]
]]></constitutionalAuthorityStatementText>
    <sponsors>
      <item>
        <party>R</party>
        <fullName>Rep. Collins, Doug [R-GA-9]</fullName>
        <lastName>Collins</lastName>
        <identifiers>
          <lisID>2121</lisID>
          <bioguideId>C001093</bioguideId>
          <gpoId />
        </identifiers>
        <middleName />
        <firstName>Doug</firstName>
        <bioguideId>C001093</bioguideId>
        <state>GA</state>
        <district>9</district>
        <byRequestType />
      </item>
    </sponsors>
    <actions>
      <actionByCounts>
        <houseOfRepresentatives>3</houseOfRepresentatives>
      </actionByCounts>
      <actionTypeCounts>
        <billReferrals>1</billReferrals>
        <introducedInHouse>1</introducedInHouse>
        <introducedInTheHouse>1</introducedInTheHouse>
      </actionTypeCounts>
      <item>
        <links />
        <type>IntroReferral</type>
        <actionCode>H11100</actionCode>
        <sourceSystem>
          2
          <name>House floor actions</name>
        </sourceSystem>
        <committee>
          <name>Oversight and Government Reform Committee</name>
          <systemCode>hsgo00</systemCode>
        </committee>
        <text>Referred to the House Committee on Oversight and Government Reform.</text>
        <actionDate>2017-09-25</actionDate>
      </item>
      <item>
        <links />
        <type>IntroReferral</type>
        <actionCode>Intro-H</actionCode>
        <sourceSystem>
          9
          <name>Library of Congress</name>
        </sourceSystem>
        <committee />
        <text>Introduced in House</text>
        <actionDate>2017-09-25</actionDate>
      </item>
      <item>
        <links />
        <type>IntroReferral</type>
        <actionCode>1000</actionCode>
        <sourceSystem>
          9
          <name>Library of Congress</name>
        </sourceSystem>
        <committee />
        <text>Introduced in House</text>
        <actionDate>2017-09-25</actionDate>
      </item>
    </actions>
    <summaries>
      <billSummaries>
        <item>
          <lastSummaryUpdateDate>2017-09-26T08:06:35Z</lastSummaryUpdateDate>
          <actionDate>2017-09-25</actionDate>
          <actionDesc>Introduced in House</actionDesc>
          <name>Introduced in House</name>
          <text><![CDATA[Designates the facility of the United States Postal Service located at 430 Main Street in Clermont, Georgia, as the "Zachary Addington Post Office."]]></text>
          <versionCode>00</versionCode>
          <updateDate>2017-09-25T04:00:00Z</updateDate>
        </item>
      </billSummaries>
    </summaries>
    <introducedDate>2017-09-25</introducedDate>
    <committees>
      <billCommittees>
        <item>
          <activities>
            <item>
              <date>2017-09-25T16:00:29Z</date>
              <name>Referred to</name>
            </item>
          </activities>
          <type>Standing</type>
          <chamber>House</chamber>
          <name>Oversight and Government Reform Committee</name>
          <subcommittees />
          <systemCode>hsgo00</systemCode>
        </item>
      </billCommittees>
    </committees>
    <title>To designate the facility of the United States Postal Service located at 430 Main Street in Clermont, Georgia, as the "Zachary Addington Post Office".</title>
    <congress>115</congress>
    <calendarNumbers />
    <relatedBills />
    <latestAction>
      <actionDate>2017-09-25</actionDate>
      <text>Referred to the House Committee on Oversight and Government Reform.</text>
      <links />
    </latestAction>
    <createDate>2017-09-26T03:11:21Z</createDate>
    <updateDate>2017-10-02T19:15:14Z</updateDate>
    <cboCostEstimates />
    <laws />
    <billNumber>3821</billNumber>
    <version>1.0.0</version>
    <titles>
      <item>
        <chamberCode />
        <chamberName />
        <parentTitleType />
        <titleType>Official Title as Introduced</titleType>
        <title>To designate the facility of the United States Postal Service located at 430 Main Street in Clermont, Georgia, as the "Zachary Addington Post Office".</title>
      </item>
      <item>
        <chamberCode />
        <chamberName />
        <parentTitleType />
        <titleType>Display Title</titleType>
        <title>To designate the facility of the United States Postal Service located at 430 Main Street in Clermont, Georgia, as the "Zachary Addington Post Office".</title>
      </item>
    </titles>
    <cosponsors>
      <item>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <district>2</district>
        <fullName>Rep. Bishop, Sanford D., Jr. [D-GA-2]</fullName>
        <lastName>BISHOP</lastName>
        <bioguideId>B000490</bioguideId>
        <sponsorshipWithdrawnDate />
        <firstName>SANFORD</firstName>
        <middleName>D.</middleName>
        <party>D</party>
        <identifiers>
          <bioguideId>B000490</bioguideId>
          <gpoId>7899</gpoId>
          <lisID>91</lisID>
        </identifiers>
        <state>GA</state>
        <sponsorshipDate>2017-09-25</sponsorshipDate>
      </item>
      <item>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <district>7</district>
        <fullName>Rep. Woodall, Rob [R-GA-7]</fullName>
        <lastName>Woodall</lastName>
        <bioguideId>W000810</bioguideId>
        <sponsorshipWithdrawnDate />
        <firstName>Rob</firstName>
        <middleName />
        <party>R</party>
        <identifiers>
          <bioguideId>W000810</bioguideId>
          <lisID>2008</lisID>
          <gpoId>7904</gpoId>
        </identifiers>
        <state>GA</state>
        <sponsorshipDate>2017-09-25</sponsorshipDate>
      </item>
      <item>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <district>10</district>
        <fullName>Rep. Hice, Jody B. [R-GA-10]</fullName>
        <lastName>Hice</lastName>
        <bioguideId>H001071</bioguideId>
        <sponsorshipWithdrawnDate />
        <firstName>Jody</firstName>
        <middleName>B.</middleName>
        <party>R</party>
        <identifiers>
          <lisID>2237</lisID>
          <gpoId />
          <bioguideId>H001071</bioguideId>
        </identifiers>
        <state>GA</state>
        <sponsorshipDate>2017-09-25</sponsorshipDate>
      </item>
      <item>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <district>14</district>
        <fullName>Rep. Graves, Tom [R-GA-14]</fullName>
        <lastName>Graves</lastName>
        <bioguideId>G000560</bioguideId>
        <sponsorshipWithdrawnDate />
        <firstName>Tom</firstName>
        <middleName />
        <party>R</party>
        <identifiers>
          <bioguideId>G000560</bioguideId>
          <lisID>1979</lisID>
          <gpoId>7906</gpoId>
        </identifiers>
        <state>GA</state>
        <sponsorshipDate>2017-09-25</sponsorshipDate>
      </item>
      <item>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <district>8</district>
        <fullName>Rep. Scott, Austin [R-GA-8]</fullName>
        <lastName>Scott</lastName>
        <bioguideId>S001189</bioguideId>
        <sponsorshipWithdrawnDate />
        <firstName>Austin</firstName>
        <middleName />
        <party>R</party>
        <identifiers>
          <gpoId>7905</gpoId>
          <lisID>2009</lisID>
          <bioguideId>S001189</bioguideId>
        </identifiers>
        <state>GA</state>
        <sponsorshipDate>2017-09-25</sponsorshipDate>
      </item>
      <item>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <district>12</district>
        <fullName>Rep. Allen, Rick W. [R-GA-12]</fullName>
        <lastName>Allen</lastName>
        <bioguideId>A000372</bioguideId>
        <sponsorshipWithdrawnDate />
        <firstName>Rick</firstName>
        <middleName>W.</middleName>
        <party>R</party>
        <identifiers>
          <gpoId />
          <lisID>2239</lisID>
          <bioguideId>A000372</bioguideId>
        </identifiers>
        <state>GA</state>
        <sponsorshipDate>2017-09-25</sponsorshipDate>
      </item>
      <item>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <district>11</district>
        <fullName>Rep. Loudermilk, Barry [R-GA-11]</fullName>
        <lastName>Loudermilk</lastName>
        <bioguideId>L000583</bioguideId>
        <sponsorshipWithdrawnDate />
        <firstName>Barry</firstName>
        <middleName />
        <party>R</party>
        <identifiers>
          <lisID>2238</lisID>
          <gpoId />
          <bioguideId>L000583</bioguideId>
        </identifiers>
        <state>GA</state>
        <sponsorshipDate>2017-09-25</sponsorshipDate>
      </item>
      <item>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <district>4</district>
        <fullName>Rep. Johnson, Henry C. "Hank," Jr. [D-GA-4]</fullName>
        <lastName>Johnson</lastName>
        <bioguideId>J000288</bioguideId>
        <sponsorshipWithdrawnDate />
        <firstName>Henry</firstName>
        <middleName>C. "Hank"</middleName>
        <party>D</party>
        <identifiers>
          <bioguideId>J000288</bioguideId>
          <gpoId>7901</gpoId>
          <lisID>1843</lisID>
        </identifiers>
        <state>GA</state>
        <sponsorshipDate>2017-09-25</sponsorshipDate>
      </item>
      <item>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <district>1</district>
        <fullName>Rep. Carter, Earl L. "Buddy" [R-GA-1]</fullName>
        <lastName>Carter</lastName>
        <bioguideId>C001103</bioguideId>
        <sponsorshipWithdrawnDate />
        <firstName>Earl</firstName>
        <middleName>L. "Buddy"</middleName>
        <party>R</party>
        <identifiers>
          <lisID>2236</lisID>
          <bioguideId>C001103</bioguideId>
          <gpoId />
        </identifiers>
        <state>GA</state>
        <sponsorshipDate>2017-09-25</sponsorshipDate>
      </item>
      <item>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <district>13</district>
        <fullName>Rep. Scott, David [D-GA-13]</fullName>
        <lastName>Scott</lastName>
        <bioguideId>S001157</bioguideId>
        <sponsorshipWithdrawnDate />
        <firstName>David</firstName>
        <middleName />
        <party>D</party>
        <identifiers>
          <lisID>1722</lisID>
          <bioguideId>S001157</bioguideId>
          <gpoId>7910</gpoId>
        </identifiers>
        <state>GA</state>
        <sponsorshipDate>2017-09-25</sponsorshipDate>
      </item>
      <item>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <district>3</district>
        <fullName>Rep. Ferguson, A. Drew, IV [R-GA-3]</fullName>
        <lastName>Ferguson</lastName>
        <bioguideId>F000465</bioguideId>
        <sponsorshipWithdrawnDate />
        <firstName>A.</firstName>
        <middleName>Drew</middleName>
        <party>R</party>
        <identifiers>
          <bioguideId>F000465</bioguideId>
          <lisID>2324</lisID>
          <gpoId />
        </identifiers>
        <state>GA</state>
        <sponsorshipDate>2017-09-25</sponsorshipDate>
      </item>
      <item>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <district>5</district>
        <fullName>Rep. Lewis, John [D-GA-5]</fullName>
        <lastName>LEWIS</lastName>
        <bioguideId>L000287</bioguideId>
        <sponsorshipWithdrawnDate />
        <firstName>JOHN</firstName>
        <middleName />
        <party>D</party>
        <identifiers>
          <lisID>688</lisID>
          <bioguideId>L000287</bioguideId>
          <gpoId>7902</gpoId>
        </identifiers>
        <state>GA</state>
        <sponsorshipDate>2017-09-25</sponsorshipDate>
      </item>
      <item>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <district>6</district>
        <fullName>Rep. Handel, Karen C. [R-GA-6]</fullName>
        <lastName>Handel</lastName>
        <bioguideId>H001078</bioguideId>
        <sponsorshipWithdrawnDate />
        <firstName>Karen</firstName>
        <middleName>C.</middleName>
        <party>R</party>
        <identifiers>
          <gpoId />
          <bioguideId>H001078</bioguideId>
          <lisID>2360</lisID>
        </identifiers>
        <state>GA</state>
        <sponsorshipDate>2017-09-25</sponsorshipDate>
      </item>
    </cosponsors>
    <notes />
    <amendments />
    <committeeReports />
    <originChamber>House</originChamber>
  </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:
// Copyright 2018 The Bazel Authors. All rights reserved.
//
// 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.

package com.google.devtools.build.lib.skylarkbuildapi.config;

import com.google.devtools.build.lib.skylarkbuildapi.StructApi;
import com.google.devtools.build.lib.skylarkinterface.Param;
import com.google.devtools.build.lib.skylarkinterface.SkylarkCallable;
import com.google.devtools.build.lib.skylarkinterface.SkylarkModule;

/**
 * An info object for config_feature_flag rules.
 */
@SkylarkModule(
  name = "FeatureFlagInfo",
  doc = "A provider used to access information about config_feature_flag rules."
)
public interface ConfigFeatureFlagProviderApi extends StructApi {

  @SkylarkCallable(
      name = "value",
      doc = "The current value of the flag in the flag's current configuration.",
      structField = true
  )
  public String getFlagValue();

  @SkylarkCallable(
    name = "is_valid_value",
    doc = "The value of the flag in the configuration used by the flag rule.",
    parameters = {
      @Param(
        name = "value",
        type = String.class,
        doc = "String, the value to check for validity for this flag."
      ),
    }
  )
  public boolean isValidValue(String value);
}

redpajama_set_name: RedPajamaGithub


text:
.class Lorg/apache/cordova/inappbrowser/InAppBrowser$6$3;
.super Ljava/lang/Object;
.source "InAppBrowser.java"

# interfaces
.implements Landroid/view/View$OnKeyListener;

# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lorg/apache/cordova/inappbrowser/InAppBrowser$6;->run()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

# instance fields
.field final synthetic this$1:Lorg/apache/cordova/inappbrowser/InAppBrowser$6;

# direct methods
.method constructor <init>(Lorg/apache/cordova/inappbrowser/InAppBrowser$6;)V
    .locals 0
    .param p1, "this$1"    # Lorg/apache/cordova/inappbrowser/InAppBrowser$6;

    .prologue
    .line 691
    iput-object p1, p0, Lorg/apache/cordova/inappbrowser/InAppBrowser$6$3;->this$1:Lorg/apache/cordova/inappbrowser/InAppBrowser$6;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

# virtual methods
.method public onKey(Landroid/view/View;ILandroid/view/KeyEvent;)Z
    .locals 2
    .param p1, "v"    # Landroid/view/View;
    .param p2, "keyCode"    # I
    .param p3, "event"    # Landroid/view/KeyEvent;

    .prologue
    .line 694
    invoke-virtual {p3}, Landroid/view/KeyEvent;->getAction()I

    move-result v0

    if-nez v0, :cond_0

    const/16 v0, 0x42

    if-ne p2, v0, :cond_0

    .line 695
    iget-object v0, p0, Lorg/apache/cordova/inappbrowser/InAppBrowser$6$3;->this$1:Lorg/apache/cordova/inappbrowser/InAppBrowser$6;

    iget-object v0, v0, Lorg/apache/cordova/inappbrowser/InAppBrowser$6;->this$0:Lorg/apache/cordova/inappbrowser/InAppBrowser;

    iget-object v1, p0, Lorg/apache/cordova/inappbrowser/InAppBrowser$6$3;->this$1:Lorg/apache/cordova/inappbrowser/InAppBrowser$6;

    iget-object v1, v1, Lorg/apache/cordova/inappbrowser/InAppBrowser$6;->this$0:Lorg/apache/cordova/inappbrowser/InAppBrowser;

    # getter for: Lorg/apache/cordova/inappbrowser/InAppBrowser;->edittext:Landroid/widget/EditText;
    invoke-static {v1}, Lorg/apache/cordova/inappbrowser/InAppBrowser;->access$500(Lorg/apache/cordova/inappbrowser/InAppBrowser;)Landroid/widget/EditText;

    move-result-object v1

    invoke-virtual {v1}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    # invokes: Lorg/apache/cordova/inappbrowser/InAppBrowser;->navigate(Ljava/lang/String;)V
    invoke-static {v0, v1}, Lorg/apache/cordova/inappbrowser/InAppBrowser;->access$600(Lorg/apache/cordova/inappbrowser/InAppBrowser;Ljava/lang/String;)V

    .line 696
    const/4 v0, 0x1

    .line 698
    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method


text:
package com.gotcreations.emojikeyboard.adapter;

import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import java.util.List;

import com.gotcreations.emojikeyboard.R;
import com.gotcreations.emojikeyboard.model.Message;
import com.gotcreations.emojikeyboard.util.TimestampUtil;
import com.gotcreations.emojilibrary.model.layout.EmojiTextView;

/**
 * This class binds and controls the events related to the elements from rsc_chat_canvas_xxx
 */
public class MessageAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {

    private static final int INCOME = 1;
    private static final int OUTGOING = 2;

    private List<Message> mDataset;

    // CONSTRUCTOR
    public MessageAdapter(List<Message> mDataset) {
        this.mDataset = mDataset;
    }

    // CALLBACKS

    /**
     * This method is used to specify which view inflate in onCreateViewHolder() method
     *
     * @param position
     * @return
     */
    @Override
    public int getItemViewType(int position) {
        switch (this.mDataset.get(position).getType()) {
            case INCOME:
                return INCOME;
            case OUTGOING:
                return OUTGOING;
        }
        return -1;
    }

    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        LayoutInflater inflater;
        View view = null;
        switch (viewType) {
            case INCOME:
                inflater = LayoutInflater.from(parent.getContext());
                view = inflater.inflate(R.layout.rsc_chat_canvas_msg_income, parent, false);
                break;
            case OUTGOING:
                inflater = LayoutInflater.from(parent.getContext());
                view = inflater.inflate(R.layout.rsc_chat_canvas_msg_outgoing, parent, false);
                break;
        }
        return new ViewHolder(view);
    }

    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
        ViewHolder viewHolder = (ViewHolder) holder;
        viewHolder.content.setText(this.mDataset.get(position).getContent());
        viewHolder.content.setUseSystemDefault(Boolean.FALSE);
        viewHolder.timestamp.setText(TimestampUtil.formatTimestamp(this.mDataset.get(position).getTimestamp(), "HH:mm"));
    }

    @Override
    public int getItemCount() {
        return this.mDataset.size();
    }

    // GETTERS AND SETTERS
    public List<Message> getDataset() {
        return mDataset;
    }

    public void setDataset(List<Message> mDataset) {
        this.mDataset = mDataset;
    }

    /**
     * Class responsible for binding the elements of rsc_chat_cavans_msg_xxx layout file
     */
    private class ViewHolder extends RecyclerView.ViewHolder {
        private EmojiTextView content;
        private TextView timestamp;

        public ViewHolder(View v) {
            super(v);
            this.content = (EmojiTextView) v.findViewById(R.id.content);
            this.timestamp = (TextView) v.findViewById(R.id.timestamp);
        }
    }
}


text:
import React, { Component, PropTypes } from 'react';
import hoistStatics from 'hoist-non-react-statics';
import * as utils from 'utils';

export function connect(ComposedComponent, decorators = {}) {
  class Connect extends Component {
    static propTypes = {
      services: PropTypes.object,
      store: PropTypes.object,
      router: PropTypes.object // eslint-disable-line react/no-unused-prop-types
    }

    static contextTypes = {
      services: PropTypes.object,
      store: PropTypes.object
    }

    constructor(props, context) {
      super(props, context);

      this.services = props.services || context.services;
      this.store = props.store || context.store;
      this.router = context.router;
    }

    render() {
      return React.createElement(utils.observer(ComposedComponent), {
        ...this.props,
        store: this.store,
        services: this.services,
        router: this.router
      });
    }
  }

  let WrappedComponent = hoistStatics(Connect, ComposedComponent);

  Object.keys(decorators).forEach(decoratorName => {
    const decoratorParams = decorators[decoratorName];
    const decorator = utils[decoratorName];

    if (typeof decorator === 'function') {
      WrappedComponent = decorator(decoratorParams)(WrappedComponent);
    }
  });

  return WrappedComponent;
}


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

namespace IBM.Data.DB2
{

	public class DB2Command : System.ComponentModel.Component, IDbCommand, ICloneable
	{
		#region Private data members

		private WeakReference refDataReader;
		private string commandText;
		private CommandType commandType = CommandType.Text;
		private DB2Connection db2Conn;
		private DB2Transaction db2Trans;
		private int commandTimeout = 30;
		private bool prepared = false;
		private bool binded = false;
		private IntPtr hwndStmt = IntPtr.Zero;  //Our statement handle
		private DB2ParameterCollection parameters = new DB2ParameterCollection();
		private bool disposed = false;
		private bool statementOpen;
		private CommandBehavior previousBehavior;
		private UpdateRowSource updatedRowSource = UpdateRowSource.Both;
		private IntPtr statementParametersMemory;
		private int statementParametersMemorySize;

		#endregion

		#region Constructors

		public DB2Command()
		{
			hwndStmt = IntPtr.Zero;
		}
		public DB2Command(string commandStr):this()
		{
			commandText = commandStr;

		}
		public DB2Command(string commandStr, DB2Connection con) : this()
		{
			db2Conn = con;
			commandText = commandStr;
			if(con != null)
			{
				con.AddCommand(this);
			}
		}
		public DB2Command (string commandStr, DB2Connection con, DB2Transaction trans)
		{
			commandText = commandStr;
			db2Conn = con;
			db2Trans = trans;
			if(con != null)
			{
				con.AddCommand(this);
			}
		}
		#endregion

		#region Dispose
		public new void  Dispose()
		{
			Dispose(true);
			GC.SuppressFinalize(this);
		}

		protected override void Dispose(bool disposing)
		{
			if(!disposed)
			{
				if(disposing)
				{
					ConnectionClosed();
					if(db2Conn != null)
					{
						db2Conn.RemoveCommand(this);
						db2Conn = null;
					}
				}
				if(statementParametersMemory != IntPtr.Zero)
				{
					Marshal.FreeHGlobal(statementParametersMemory);
					statementParametersMemory = IntPtr.Zero;
				}
			}
			base.Dispose(disposing);
			disposed = true;
		}

		~DB2Command()
		{
			Dispose(false);
		}

		internal void DataReaderClosed()
		{
			CloseStatementHandle(false);
			if((previousBehavior & CommandBehavior.CloseConnection) != 0)
				Connection.Close();
			refDataReader = null;
		}

		private void CloseStatementHandle(bool dispose)
		{
			if(hwndStmt != IntPtr.Zero)
			{
				if(statementOpen)
				{
					short sqlRet = DB2CLIWrapper.SQLFreeStmt(hwndStmt, DB2Constants.SQL_CLOSE);
				}
				if((!prepared && statementOpen) ||
					dispose)
				{
					short sqlRet = DB2CLIWrapper.SQLFreeHandle(DB2Constants.SQL_HANDLE_STMT, hwndStmt);

					hwndStmt = IntPtr.Zero;
					prepared = false;
				}
				statementOpen = false;
			}
		}

		internal void ConnectionClosed()
		{
			DB2DataReader reader = null;
			if((refDataReader != null) && refDataReader.IsAlive)
			{
				reader = (DB2DataReader)refDataReader.Target;
			}
			if((reader != null) && refDataReader.IsAlive)
			{
				reader.Dispose();
				refDataReader = null;
			}
			CloseStatementHandle(true);

			db2Trans = null;
		}

		#endregion

		#region SelfDescribe property
		///
		/// Property dictates whether or not any paramter markers will get their describe info
		/// from the database, or if the user will supply the information
		///
		bool selfDescribe = false;
		public bool SelfDescribe
		{
			get
			{
				return selfDescribe;
			}
			set
			{
				selfDescribe = value;
			}
		}
		#endregion

		#region CommandText property
		///
		///The query;  If it gets set, reset the prepared property
		///
		public string CommandText
		{
			get
			{
				return commandText;
			}
			set
			{
				prepared = false;
				commandText = value;
			}
		}
		#endregion

		#region CommandTimeout property
		///
		/// The Timeout property states how long we wait for results to return
		///
		public int CommandTimeout
		{
			get
			{
				return commandTimeout;
			}
			set
			{
				commandTimeout = value;
				if(hwndStmt != IntPtr.Zero)
					SetStatementTimeout();
			}
		}
		#endregion

		#region CommandType property

		public CommandType CommandType
		{
			get
			{
				return commandType;
			}
			set
			{
				commandType = value;
			}
		}
		#endregion

		#region Connection property
		///
		///  The connection we'll be executing on.
		///
		IDbConnection IDbCommand.Connection
		{
			get
			{
				return db2Conn;
			}
			set
			{
				db2Conn = (DB2Connection)value;
			}
		}

		public DB2Connection Connection
		{
			get
			{
				return db2Conn;
			}
			set
			{
				if(db2Conn != null)
				{
					db2Conn.RemoveCommand(this);
				}
				db2Conn = value;
				if(db2Conn != null)
				{
					db2Conn.AddCommand(this);
				}
			}
		}
		#endregion

		#region Parameters property
		///
		/// Parameter list, Not yet implemented
		///
		public DB2ParameterCollection Parameters
		{
			get
			{
				return parameters;
			}
		}
		IDataParameterCollection IDbCommand.Parameters
		{
			get
			{
				return parameters;
			}
		}
		#endregion

		#region Transaction property
			///
			/// The transaction this command is associated with
			///
		IDbTransaction IDbCommand.Transaction
		{
			get
			{
				return db2Trans;
			}
			set
			{
				db2Trans = (DB2Transaction)value;
			}
		}

		public DB2Transaction Transaction
		{
			get
			{
				return db2Trans;
			}
			set
			{
				db2Trans = value;
			}
		}
		#endregion

		#region UpdatedRowSource property

		public UpdateRowSource UpdatedRowSource
		{
			get { return updatedRowSource; }
			set { updatedRowSource = value; }
		}
		#endregion

		#region Statement Handle
		///
		/// returns the DB2Client statement handle
		///
		public IntPtr statementHandle
		{
			get
			{
				return hwndStmt;
			}
		}
		#endregion

		#region AllocateStatement function

		internal void AllocateStatement(string location)
		{
			if (db2Conn.DBHandle.ToInt32() == 0) return;
			short sqlRet;
			sqlRet = DB2CLIWrapper.SQLAllocHandle(DB2Constants.SQL_HANDLE_STMT, db2Conn.DBHandle, out hwndStmt);
			if ((sqlRet != DB2Constants.SQL_SUCCESS) && (sqlRet != DB2Constants.SQL_SUCCESS_WITH_INFO))
				throw new DB2Exception(DB2Constants.SQL_HANDLE_DBC, db2Conn.DBHandle, location +": Unable to allocate statement handle.");

			parameters.HwndStmt = hwndStmt;

			SetStatementTimeout();
		}

		private void SetStatementTimeout()
		{
			short sqlRet = DB2CLIWrapper.SQLSetStmtAttr(hwndStmt, DB2Constants.SQL_ATTR_QUERY_TIMEOUT, new IntPtr(commandTimeout), 0);
			DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "Set statement timeout.", db2Conn);
		}
		#endregion

		#region Cancel
		/// <summary>
		/// Attempt to cancel an executing command
		/// </summary>
		public void Cancel()
		{
			if(hwndStmt == IntPtr.Zero)
			{
				throw new InvalidOperationException("Nothing to Cancel.");
			}
			DB2CLIWrapper.SQLCancel(hwndStmt);
		}
		#endregion

		#region CreateParameter
		///
		///Returns a parameter
		///
		public IDbDataParameter CreateParameter()
		{
			return new DB2Parameter();
		}
		#endregion

		#region ExecuteNonQuery

		public int ExecuteNonQuery()
		{
			ExecuteNonQueryInternal(CommandBehavior.Default);

			int numRows;

			//How many rows affected.  numRows will be -1 if we aren't dealing with an Insert, Delete or Update, or if the statement did not execute successfully
			short sqlRet = DB2CLIWrapper.SQLRowCount(hwndStmt, out numRows);
			DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "SQLExecDirect error.", db2Conn);

			do
			{
				sqlRet = DB2CLIWrapper.SQLMoreResults(this.hwndStmt);
				DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "DB2ClientDataReader - SQLMoreResults", db2Conn);
			} while(sqlRet != DB2Constants.SQL_NO_DATA_FOUND);

			CloseStatementHandle(false);

			return numRows;
		}

		public void ExecuteNonQueryInternal(CommandBehavior behavior)
		{
			short sqlRet;

			if(prepared && binded)
			{
				sqlRet = DB2CLIWrapper.SQLExecute(hwndStmt);
				DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "SQLExecute error.", db2Conn);
				return;
			}

			if((db2Conn == null) || (db2Conn.State != ConnectionState.Open))
				throw new InvalidOperationException("Prepare needs an open connection");
			if((refDataReader != null) &&
				(refDataReader.IsAlive))
				throw new InvalidOperationException("There is already an open DataReader associated with this Connection which must be closed first.");
			DB2Transaction connectionTransaction = null;
			if(db2Conn.WeakRefTransaction != null)
				connectionTransaction = (DB2Transaction)db2Conn.WeakRefTransaction.Target;
			if(!Object.ReferenceEquals(connectionTransaction, Transaction))
			{
				if(Transaction == null)
					throw new InvalidOperationException("A transaction was started in the connection, but the command doesn't specify a transaction");
				throw new InvalidOperationException("The transaction specified at the connection doesn't belong to the connection");
			}

			if (hwndStmt == IntPtr.Zero)
			{
				AllocateStatement("InternalExecuteNonQuery");
				previousBehavior = 0;
			}
			if(previousBehavior != behavior)
			{
				if(((previousBehavior ^ behavior) & CommandBehavior.SchemaOnly) != 0)
				{
					sqlRet = DB2CLIWrapper.SQLSetStmtAttr(hwndStmt, DB2Constants.SQL_ATTR_DEFERRED_PREPARE,
						new IntPtr((behavior & CommandBehavior.SchemaOnly) != 0 ? 0 : 1), 0);
					// TODO: don't check. what if it is not supported???
					DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "Defered prepare.", db2Conn);

					previousBehavior = (previousBehavior & ~CommandBehavior.SchemaOnly) | (behavior & CommandBehavior.SchemaOnly);
				}
				if(((previousBehavior ^ behavior) & CommandBehavior.SingleRow) != 0)
				{
					sqlRet = DB2CLIWrapper.SQLSetStmtAttr(hwndStmt, DB2Constants.SQL_ATTR_MAX_ROWS,
						new IntPtr((behavior & CommandBehavior.SingleRow) == 0 ? 0 : 1), 0);
					// TODO: don't check. what if it is not supported???
					DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "Set max rows", db2Conn);

					previousBehavior = (previousBehavior & ~CommandBehavior.SingleRow) | (behavior & CommandBehavior.SingleRow);
				}
				previousBehavior = behavior;
			}
			if((Transaction == null) &&
				!db2Conn.openConnection.autoCommit)
			{
				sqlRet = DB2CLIWrapper.SQLSetConnectAttr(db2Conn.DBHandle, DB2Constants.SQL_ATTR_AUTOCOMMIT, new IntPtr(DB2Constants.SQL_AUTOCOMMIT_ON), 0);
				DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_DBC, db2Conn.DBHandle, "Error setting AUTOCOMMIT ON in transaction CTOR.", db2Conn);
				db2Conn.openConnection.autoCommit = true;

				sqlRet = DB2CLIWrapper.SQLSetConnectAttr(db2Conn.DBHandle, DB2Constants.SQL_ATTR_TXN_ISOLATION, new IntPtr(DB2Constants.SQL_TXN_READ_COMMITTED), 0);
				DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_DBC, db2Conn.DBHandle, "Error setting isolation level.", db2Conn);
			}

			if ((commandText == null) ||(commandText.Length == 0))
				throw new InvalidOperationException("Command string is empty");

			if(CommandType.StoredProcedure == commandType && !commandText.StartsWith("CALL "))
				commandText = "CALL " + commandText + " ()";

			if((behavior & CommandBehavior.SchemaOnly) != 0)
			{
				if(!prepared)
				{
					Prepare();
				}
			}
			else
			{
				if(statementParametersMemory != IntPtr.Zero)
				{
					Marshal.FreeHGlobal(statementParametersMemory);
					statementParametersMemory = IntPtr.Zero;
				}

				BindParams();

				if (prepared)
				{
					sqlRet = DB2CLIWrapper.SQLExecute(hwndStmt);
					DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "SQLExecute error.", db2Conn);
				}
				else
				{
					sqlRet = DB2CLIWrapper.SQLExecDirect(hwndStmt, commandText, commandText.Length);
					DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "SQLExecDirect error.", db2Conn);
				}
				statementOpen = true;

				parameters.GetOutValues();

				if(statementParametersMemory != IntPtr.Zero)
				{
					Marshal.FreeHGlobal(statementParametersMemory);
					statementParametersMemory = IntPtr.Zero;
				}
			}
		}
		#endregion

		#region ExecuteReader calls
		///
		///ExecuteReader
		///
		IDataReader IDbCommand.ExecuteReader()
		{
			return ExecuteReader(CommandBehavior.Default);
		}

		IDataReader IDbCommand.ExecuteReader(CommandBehavior behavior)
		{
			return ExecuteReader(behavior);
		}

		public DB2DataReader ExecuteReader()
		{
			return ExecuteReader(CommandBehavior.Default);
		}

		public DB2DataReader ExecuteReader(CommandBehavior behavior)
		{
			if((db2Conn == null) || (db2Conn.State != ConnectionState.Open))
				throw new InvalidOperationException("Prepare needs an open connection");

			DB2DataReader reader;

			ExecuteNonQueryInternal(behavior);
			reader = new DB2DataReader(db2Conn, this, behavior);

			refDataReader = new WeakReference(reader);

			return reader;
		}
		#endregion

		#region ExecuteScalar
		///
		/// ExecuteScalar
		///
		public object ExecuteScalar()
		{
			if((db2Conn == null) || (db2Conn.State != ConnectionState.Open))
				throw new InvalidOperationException("Prepare needs an open connection");

			using(DB2DataReader reader = ExecuteReader(CommandBehavior.SingleResult | CommandBehavior.SingleRow))
			{
				if(reader.Read() && (reader.FieldCount > 0))
				{
					return reader[0];
				}
			}
			return null;
		}
		#endregion

		#region Prepare ()

		public void Prepare ()
		{
			if((db2Conn == null) || (db2Conn.State != ConnectionState.Open))
				throw new InvalidOperationException("Prepare needs an open connection");

			CloseStatementHandle(false);
			if (hwndStmt == IntPtr.Zero)
			{
				AllocateStatement("InternalExecuteNonQuery");
			}

			short sqlRet = 0;

			IntPtr numParams = IntPtr.Zero;
			sqlRet = DB2CLIWrapper.SQLPrepare(hwndStmt, commandText, commandText.Length);
			DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "SQLPrepare error.", db2Conn);

			statementOpen = true;
			prepared=true;
		}
		#endregion

		private string AddCallParam( string _cmString)
		{
			if(_cmString.IndexOf("()") != -1)
			{
				return _cmString.Replace("()","(?)");
			}
			return _cmString.Replace(")", ",?)");
		}

		private void BindParams()
		{
			if(parameters.Count > 0)
			{
				statementParametersMemorySize = 0;
				int offset = 0;
				short sqlRet;
				for(int i = 0; i < parameters.Count; i++)
				{
					if(commandType == CommandType.StoredProcedure)
					{
						commandText = AddCallParam(commandText);
					}
					DB2Parameter param = parameters[i];
					param.CalculateRequiredmemory();
					statementParametersMemorySize += param.requiredMemory + 8;
					param.internalBuffer = Marshal.AllocHGlobal(param.requiredMemory);
					offset += param.requiredMemory;
					param.internalLengthBuffer = Marshal.AllocHGlobal(4);
					Marshal.WriteInt32(param.internalLengthBuffer, param.requiredMemory);
					sqlRet = param.Bind(this.hwndStmt, (short)(i + 1));
					DB2ClientUtils.DB2CheckReturn(sqlRet, DB2Constants.SQL_HANDLE_STMT, hwndStmt, "Error binding parameter in DB2Command: ", db2Conn);
				}
				binded = true;
			}
		}

		#region ICloneable Members

		object ICloneable.Clone()
		{
			DB2Command clone = new DB2Command();

			clone.Connection = Connection;
			clone.commandText = commandText;
			clone.commandType = commandType;
			clone.Transaction = db2Trans;
			clone.commandTimeout = commandTimeout;
			clone.updatedRowSource = updatedRowSource;
			clone.parameters = new DB2ParameterCollection();
			for(int i = 0; i < parameters.Count; i++)
				clone.Parameters.Add(((ICloneable)parameters[i]).Clone());

			return clone;
		}

		#endregion
	}
}


text:
require 'spec_helper'

describe Cesri::RecepcionComprobanteResponse do

  include Savon::SpecHelper

  let(:xml_response){ File.read(File.join('spec', 'fixtures', 'validar_comprobante_response.xml')) }
  let(:xml_response_error){ File.read(File.join('spec', 'fixtures', 'validar_comprobante_response_error.xml')) }
  let(:xml_raw){ '<xml />' }

  let(:request) do
    {
      soap_action: false,
      message: {
        xml: Base64.encode64(xml_raw)
      }
    }
  end

  before do
    load_default_config
    savon.mock!
    @service = Cesri::RecepcionComprobanteService.new
    @request = @service.validar_comprobante_request(xml_raw)

    # RECIBIDA
    savon.expects(:validar_comprobante).with(@request).returns(xml_response)
    @savon_response = @service.validar_comprobante(xml_raw)
    @service_response = Cesri::RecepcionComprobanteResponse.new(@savon_response)

    # DEVUELTA
    savon.expects(:validar_comprobante).with(@request).returns(xml_response_error)
    @savon_response_error = @service.validar_comprobante(xml_raw)
    @service_response_error = Cesri::RecepcionComprobanteResponse.new(@savon_response_error)
  end

  after do
    restore_default_config
    savon.unmock!
  end

  describe '#state' do
    context 'success' do
      it 'gets RECIBIDA' do
        expect(@service_response.state).to eq('RECIBIDA')
      end
    end

    context 'error' do
      it 'gets DEVUELTA' do
        expect(@service_response_error.state).to eq('DEVUELTA')
      end
    end
  end

  describe '#success?' do
    it "return true if the response was 'RECIBIDA'" do
      expect(@service_response.success?).to eq(true)
    end

    it "return false if the response wasn't 'RECIBIDA'" do
      expect(@service_response_error.success?).to eq(false)
    end
  end

  describe '#response' do
    it 'gets the full savon response if success' do
      expect(@service_response.response).to eq(@savon_response)
    end

    it 'gets the full savon response if error' do
      expect(@service_response_error.response).to eq(@savon_response_error)
    end
  end

  describe '#mensajes' do
    context 'success' do
      it 'is an array' do
        expect(@service_response.messages).to be_instance_of(Array)
      end

      it 'is an empty array' do
        expect(@service_response.messages.size).to eq(0)
      end
    end

    context 'errors' do
      it 'is and array ' do
        expect(@service_response_error.messages).to be_instance_of(Array)
      end

      it 'is not an empty array' do
        expect(@service_response_error.messages.size).to eq(2)
      end

      it 'is a ResponseMessage instance' do
        expect(@service_response_error.messages.first).to be_instance_of(Cesri::ResponseMessage)
      end
    end
  end

end


text:
set -eu

if [ $# -ne 5 ]; then
   echo Usage: $0 certificate-fingerprint appid provisioning-file keychain-group filename
   exit 1
fi

CERT=$1
APPID=$2
PP=$3
KCG=$4
FILENAME=$5
IFS=. read TEAMID BUNDLEID <<<"${APPID}"

mkdir -p $FILENAME.app/Contents/MacOS
cp "$3" $FILENAME.app/Contents/embedded.provisionprofile
cp $FILENAME $FILENAME.app/Contents/MacOS/$FILENAME

cat > $FILENAME.app/Contents/Info.plist <<ENDENDEND
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>en</string>
	<key>CFBundleExecutable</key>
	<string>$FILENAME</string>
	<key>CFBundleIdentifier</key>
	<string>$BUNDLEID</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>$FILENAME</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0</string>
	<key>CFBundleSupportedPlatforms</key>
	<array>
		<string>MacOSX</string>
	</array>
	<key>CFBundleVersion</key>
	<string>1</string>
</dict>
</plist>
ENDENDEND

TMPFILE=$(mktemp /tmp/signscript.XXXXXX)
trap "rm $TMPFILE" EXIT

cat > $TMPFILE <<ENDENDEND
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>com.apple.application-identifier</key>
	<string>$APPID</string>
	<key>com.apple.developer.team-identifier</key>
	<string>$TEAMID</string>
	<key>keychain-access-groups</key>
	<array>
		<string>$KCG</string>
	</array>
</dict>
</plist>
ENDENDEND

codesign --force --sign $CERT --timestamp=none --entitlements $TMPFILE $FILENAME.app


text:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

  <servlet>
    <servlet-name>rest-dispatcher</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>rest-dispatcher</servlet-name>
    <url-pattern>/</url-pattern>
  </servlet-mapping>

</web-app>


text:
package alien4cloud.component.dao.model.indexed;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

import org.elasticsearch.common.collect.Maps;
import org.junit.Test;

import alien4cloud.model.common.Tag;
import alien4cloud.model.components.AttributeDefinition;
import alien4cloud.model.components.IAttributeValue;
import alien4cloud.model.components.IndexedInheritableToscaElement;
import alien4cloud.model.components.IndexedModelUtils;
import alien4cloud.model.components.IndexedNodeType;
import alien4cloud.model.components.PropertyDefinition;
import alien4cloud.utils.MapUtil;

import com.google.common.collect.Lists;

public class IndexedModelTest {

    // root -- child1 -- grandChild1, granChild2
    // |
    // |
    // |------ child2
    // |
    // orphan
    // The sort should give me [root,orphan],[child1,child2],[grandChild1,grandChild2]
    static Map<String, IndexedInheritableToscaElement> elementsByIdMap = Maps.newHashMap();

    static IndexedInheritableToscaElement root, child1, child2, grandChild1, grandChild2;
    static List<Tag> rootTags, childTags;

    static IndexedNodeType parent, sonWith3Tags, sonWithoutTags;

    static {

        rootTags = Lists.newArrayList();
        rootTags.add(new Tag("alienicon", "/usr/local/root-icon.png"));
        rootTags.add(new Tag("prod", "deployment details from team A the 21th JAN 2014"));
        rootTags.add(new Tag("misc-details", "<pathed the 22th...>"));

        childTags = Lists.newArrayList();
        childTags.add(new Tag("alienicon", "/usr/child-icon.png"));
        childTags.add(new Tag("prodChild", "Bad deployment"));
        childTags.add(new Tag("another-tag", "<pathed the 22th...>"));

        parent = new IndexedNodeType();
        parent.setElementId("1");
        parent.setArchiveName("tosca.nodes.Root");
        parent.setArchiveVersion("1.0");
        parent.setDerivedFrom(null);
        parent.setDescription("Root description...");
        parent.setTags(rootTags);

        sonWith3Tags = new IndexedNodeType();
        sonWith3Tags.setElementId("2");
        sonWith3Tags.setArchiveName("tosca.nodes.Compute");
        sonWith3Tags.setArchiveVersion("1.0");
        sonWith3Tags.setDerivedFrom(Arrays.asList("tosca.nodes.Root"));
        sonWith3Tags.setDescription("Child description...");
        sonWith3Tags.setTags(childTags);

        sonWithoutTags = new IndexedNodeType();
        sonWithoutTags.setElementId("3");
        sonWithoutTags.setArchiveName("tosca.nodes.Network");
        sonWithoutTags.setArchiveVersion("1.2");
        sonWithoutTags.setDerivedFrom(Arrays.asList("tosca.nodes.Root"));
        sonWithoutTags.setDescription("Child 2 description...");
        sonWithoutTags.setTags(null);

        root = fabricElement(elementsByIdMap, "root", null, rootTags);
        child1 = fabricElement(elementsByIdMap, "child1", "root", childTags);
        child2 = fabricElement(elementsByIdMap, "child2", "root", null);
        grandChild1 = fabricElement(elementsByIdMap, "grandChild1", "child1", null);
        grandChild2 = fabricElement(elementsByIdMap, "grandChild2", "child1", null);

        fabricElement(elementsByIdMap, "orphan1", null, null);
        fabricElement(elementsByIdMap, "orphan2", "toto", null);
        fabricElement(elementsByIdMap, "orphan3", "tata", null);
        fabricElement(elementsByIdMap, "orphan4", "titi", null);

    }

    @Test
    public void testOrderInheritableElements() {
        List<IndexedInheritableToscaElement> sorted = IndexedModelUtils.orderByDerivedFromHierarchy(elementsByIdMap);

        for (IndexedInheritableToscaElement el : sorted) {
            System.out.println(el.getElementId() + " " + el.getDerivedFrom());
        }

        assertTrue(sorted.indexOf(root) < sorted.indexOf(child1));
        assertTrue(sorted.indexOf(root) < sorted.indexOf(child2));
        assertTrue(sorted.indexOf(child1) < sorted.indexOf(grandChild1));
        assertTrue(sorted.indexOf(child1) < sorted.indexOf(grandChild2));
    }

    @Test
    public void mergeInheritableIndexWithTags() {
        IndexedModelUtils.mergeInheritableIndex(parent, sonWith3Tags);

        // son should have 5 tags : 3 from himself 2 from his parent
        assertEquals(sonWith3Tags.getTags().size(), 5);

        // son should'nt have parent icon
        ;
        for (Tag tag : sonWith3Tags.getTags()) {
            if (tag.getName().equals("alienicon")) {
                assertNotEquals(tag.getValue(), "/usr/local/root-icon.png");
                assertEquals(tag.getValue(), "/usr/child-icon.png");
            }
        }

        // son has all parent's tags
        assertTrue(sonWith3Tags.getTags().containsAll(parent.getTags()));

        // Parent witht 3 tags merged with son without tags => son with 3 tags
        IndexedModelUtils.mergeInheritableIndex(parent, sonWithoutTags);

        assertEquals(sonWithoutTags.getTags().size(), parent.getTags().size());
        assertEquals(sonWithoutTags.getTags(), parent.getTags());
    }

    @Test
    public void mergeInheritableIndexMaps() {
        IndexedNodeType son = new IndexedNodeType();
        son.setElementId("son");
        son.setArchiveVersion("1");

        PropertyDefinition propDef = new PropertyDefinition();
        AttributeDefinition attrDef = new AttributeDefinition();

        propDef.setType("string");
        propDef.setDefault("default_parent");
        attrDef.setType("string");
        parent.setProperties(MapUtil.newHashMap(new String[] { "prop1" }, new PropertyDefinition[] { propDef }));
        parent.setAttributes(Maps.<String, IAttributeValue> newHashMap());
        parent.getAttributes().put("attr1", attrDef);

        propDef = new PropertyDefinition();
        propDef.setDefault("default_parent2");
        propDef.setType("string");
        attrDef = new AttributeDefinition();
        attrDef.setType("version");
        parent.getProperties().put("prop2", propDef);
        parent.setAttributes(Maps.<String, IAttributeValue> newHashMap());
        parent.getAttributes().put("attr2", attrDef);

        propDef = new PropertyDefinition();
        propDef.setDefault("default_son");
        propDef.setType("string");
        attrDef = new AttributeDefinition();
        attrDef.setType("integer");
        son.setProperties(MapUtil.newHashMap(new String[] { "prop1" }, new PropertyDefinition[] { propDef }));
        // son.setAttributes(MapUtil.newHashMap(new String[] { "attr1" }, new AttributeDefinition[] { attrDef }));
        son.setAttributes(Maps.<String, IAttributeValue> newHashMap());
        son.getAttributes().put("attr1", attrDef);

        propDef = new PropertyDefinition();
        propDef.setDefault("default_son2");
        propDef.setType("integer");
        attrDef = new AttributeDefinition();
        attrDef.setType("boolean");
        son.getProperties().put("prop3", propDef);
        son.getAttributes().put("attr3", attrDef);

        IndexedModelUtils.mergeInheritableIndex(parent, son);

        // son should have 3 : 1 from himself, 1 from his parent, and one that he overrides from the parent
        assertEquals(3, son.getProperties().size());
        assertEquals(3, son.getAttributes().size());

        // son should'nt have parent's one when both defined the same
        PropertyDefinition propDefSon = son.getProperties().get("prop1");
        assertNotNull(propDefSon);
        assertEquals("default_son", propDefSon.getDefault());
        AttributeDefinition attrDefSon = (AttributeDefinition) son.getAttributes().get("attr1");
        assertEquals("integer", attrDefSon.getType());

        // son has all parent's
        for (String key : parent.getProperties().keySet()) {
            assertTrue(son.getProperties().containsKey(key));
        }
        for (String key : parent.getAttributes().keySet()) {
            assertTrue(son.getAttributes().containsKey(key));
        }

    }

    private static IndexedInheritableToscaElement fabricElement(Map<String, IndexedInheritableToscaElement> map, String elementId, String derivedFrom,
            List<Tag> tags) {
        IndexedInheritableToscaElement element = new IndexedInheritableToscaElement();
        element.setElementId(elementId);
        element.setArchiveVersion("1.0");
        element.setDerivedFrom(Arrays.asList(derivedFrom));
        map.put(element.getElementId(), element);
        return element;
    }
}


text:
package org.example.action;

import org.primeframework.mvc.action.annotation.Action;
import org.primeframework.mvc.action.result.annotation.Redirect;

/**
 * @author Daniel DeGroff
 */
@Action("{path}")
@Redirect(uri = "${uri}")
public class ValidCharactersAction {
  public String path;

  public String q;

  public String uri;

  public String get() {
    uri = "/";

    if (path != null) {
      uri += path;
    }

    if (q != null) {
      uri += "q=" + q;
    }
    return "success";
  }
}


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

namespace DecoratorSample
{
	public class GreetingMessageDecorator : MessageProviderDecoratorBase
	{
		public GreetingMessageDecorator(IMessageProvider messageProvider) : base(messageProvider) { }

		public override string GetMessage()
		{
			return "Hello, your message is: " + base.GetMessage();
		}
	}
}


text:
<!DOCTYPE html>

	<meta charset="UTF-8" />
	<title>jQuery UI Effects - removeClass Demo</title>
	<link type="text/css" href="http://jquery-ui.googlecode.com/svn/trunk/themes/base/jquery.ui.all.css" rel="stylesheet" />

	<link type="text/css" href="http://jquery-ui.googlecode.com/svn/trunk/demos/demos.css" rel="stylesheet" />

			Etiam libero neque, luctus a, eleifend nec, semper at, lorem. Sed pede.

Run Effect

Click the button above to preview the effect.


text:
#import "NSValue.h"

@interface NSValue (IBNSValueAdditions)
+ (id)ib_valueWithSize:(struct CGSize)arg1;
+ (id)ib_valueWithRect:(struct CGRect)arg1;
+ (id)ib_valueWithPoint:(struct CGPoint)arg1;
@property(readonly) struct CGSize ib_sizeValue;
@property(readonly) struct CGRect ib_rectValue;
@property(readonly) struct CGPoint ib_pointValue;
@end


text:
module Azure::VMwareCloudSimple::Mgmt::V2019_04_01
  module Models
    #
    # Virtual NIC model
    #
    class VirtualNic

      include MsRestAzure

      # @return [Array<String>] NIC ip address
      attr_accessor :ip_addresses

      # @return [String] NIC MAC address
      attr_accessor :mac_address

      # @return [VirtualNetwork] Virtual Network
      attr_accessor :network

      # @return [NICType] NIC type. Possible values include: 'E1000', 'E1000E',
      # 'PCNET32', 'VMXNET', 'VMXNET2', 'VMXNET3'
      attr_accessor :nic_type

      # @return [Boolean] Is NIC powered on/off on boot
      attr_accessor :power_on_boot

      # @return [String] NIC id
      attr_accessor :virtual_nic_id

      # @return [String] NIC name
      attr_accessor :virtual_nic_name

      #
      # Mapper for VirtualNic class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'VirtualNic',
          type: {
            name: 'Composite',
            class_name: 'VirtualNic',
            model_properties: {
              ip_addresses: {
                client_side_validation: true,
                required: false,
                serialized_name: 'ipAddresses',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              mac_address: {
                client_side_validation: true,
                required: false,
                serialized_name: 'macAddress',
                type: {
                  name: 'String'
                }
              },
              network: {
                client_side_validation: true,
                required: true,
                serialized_name: 'network',
                type: {
                  name: 'Composite',
                  class_name: 'VirtualNetwork'
                }
              },
              nic_type: {
                client_side_validation: true,
                required: true,
                serialized_name: 'nicType',
                type: {
                  name: 'Enum',
                  module: 'NICType'
                }
              },
              power_on_boot: {
                client_side_validation: true,
                required: false,
                serialized_name: 'powerOnBoot',
                type: {
                  name: 'Boolean'
                }
              },
              virtual_nic_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'virtualNicId',
                type: {
                  name: 'String'
                }
              },
              virtual_nic_name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'virtualNicName',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end


text:
int qtc_QTcpServer_unSetHandler(void*,void*);
int qtc_QTcpServer_hasPendingConnections_h(void*);
int qtc_QTcpServer_setHandler1(void*,void*,void*,void*,void*);
void* qtc_QTcpServer_nextPendingConnection_h(void*);
int qtc_QTcpServer_setHandler2(void*,void*,void*,void*,void*);
int qtc_QTcpServer_event_h(void*,void*);
int qtc_QTcpServer_setHandler3(void*,void*,void*,void*,void*);
int qtc_QTcpServer_eventFilter_h(void*,void*,void*);
int qtc_QTcpServer_setHandler4(void*,void*,void*,void*,void*);


text:
"use strict";

Object.defineProperty(exports, "__esModule", {
    value: true
});
var instance;

function Observer() {

    if (instance) {
        return instance;
    }

    if (this && this.constructor === Observer) {
        instance = this;
    } else {
        return new Observer();
    }
}

Observer.prototype._listeners = {};

Observer.prototype.emit = function () {

    var args = [];
    for (var i = 0; i < arguments.length; i++) {
        args[i] = arguments[i];
    }

    var e = args.shift();

    if (!this._listeners[e]) {
        return false;
    }

    var ln = this._listeners[e].length;
    for (var _i = 0; _i < ln; _i++) {
        this._listeners[e][_i].apply(null, args);
    }
};

Observer.prototype.on = function (e, cb) {

    if (!this._listeners[e]) {
        this._listeners[e] = [];
    }
    this._listeners[e].push(cb);
};

var SCObserver = function () {

    return Observer;
}();

exports.default = SCObserver;


text:
<dom-module id="my-list">

  <template>
      <providers-ctrl id="get_dem_providers"></providers-ctrl>

      {{items}}
      <template is="dom-repeat" items="{{providers}}">

{{item.title}}

      </template>

  </template>

</dom-module>


text:
<?php

$LZLANG["client_ticket_header"] = "Leave a message";
$LZLANG["client_ticket_information"] = "Please leave a message and we will come back to you shortly.";
$LZLANG["client_request_chat_transcript"] = "Yes, send a transcript of this chat to my email account:";
$LZLANG["client_use_auto_translation_service"] = "Use Auto-Translation Service. My language is:";
$LZLANG["client_fill_mandatory_fields"] = "Please fill all mandatory fields.";
$LZLANG["client_your_question"] = "Vaše vprašanje";
$LZLANG["client_queue_message"] = "Ste <!--queue_position--> v čakalni vrsti. Predvidena čakalna doba je: <!--queue_waiting_time--> minut.";
$LZLANG["client_queue_next_operator"] = "Naslednji prost operater je rezerviran za vas.";
$LZLANG["client_chat_invitation"] = "Povabilo k pogovoru";
$LZLANG["client_system"] = "Sistem";
$LZLANG["client_required_field"] = "Obvezna polja";
$LZLANG["client_int_is_connected"] = "Kličem prostega operaterja, prosimo počakajte.";
$LZLANG["client_ints_are_busy"] = "Trenutno so vsi operaterji zasedeni, prosimo počakajte.";
$LZLANG["client_int_left"] = "Operater je zapustil pogovor. V kolikor imate dodatna vprašanja, prosimo pustite sporočilo:";
$LZLANG["client_int_declined"] = "Žal so vsi operaterji zasedeni. Vašega pogovora ni mogel nihče prevzeti. Prosimo, poizkusite kasneje, ali pa pustite sporočilo:";
$LZLANG["client_no_intern_users"] = "Trenutno ni noben operater prisoten za ta oddelek. Prosimo poizkusite kasneje, ali pa izberite drug oddelek. Prav tako lahko pustite sporočilo:";
$LZLANG["client_no_intern_users_short"] = "Trenutno ni noben operater prisoten za ta oddelek. Prosimo poizkusite kasneje, ali pa izberite drug oddelek.";
$LZLANG["client_thank_you"] = "Hvala lepa!";
$LZLANG["client_con_broken"] = "Napaka pri povezavi, ponovno poizkušam vzpostaviti povezavo, prosimo počakajte ...";
$LZLANG["client_guide_request"] = "Operater Vas želi preusmeriti na sledečo stran:";
$LZLANG["client_still_waiting_int"] = "Še vedno poizkušamo vzpostaviti povezavo, prosimo počakajte. Če ne želite več čakati, lahko pustite sporočilo:";
$LZLANG["client_request"] = "Zahtevek";
$LZLANG["client_loading"] = "Odpiram";
$LZLANG["client_forwarding"] = "Preusmerjam Vam k drugemu operaterju, prosimo počakajte.";
$LZLANG["client_vcard"] = "Vizitka";
$LZLANG["client_guest"] = "Gost";
$LZLANG["client_send_file"] = "Pošlji datoteko";
$LZLANG["client_representative_is_typing"] = "Operater tipka ...";
$LZLANG["client_save_visitcard"] = "Prenesi vizitko";
$LZLANG["client_please_enter_name_and_email"] = "Prosimo vnesite Vaše ime ter email:";
$LZLANG["client_start_system"] = "Sistem je pripravljen.";
$LZLANG["client_your_email"] = "E-pošta";
$LZLANG["client_your_company"] = "Podjetje";
$LZLANG["client_your_name"] = "Vaše Ime";
$LZLANG["client_your_message"] = "Vaše sporočilo";
$LZLANG["client_group"] = "Oddelek";
$LZLANG["client_send_message"] = "Pošlji sporočilo";
$LZLANG["client_error_groups"] = "Servis ni dosegljiv zaradi sledečega razloga: Noben oddelek nima dovoljenja za zunanje pogovore. Opravičujemo se za morebitne neprijetnosti.";
$LZLANG["client_error_deactivated"] = "Servis je trenutno izklopljen. Opravičujemo se za morebitne neprijetnosti.";
$LZLANG["client_error_unavailable"] = "Servis ni dosegljiv. Opravičujemo se za morebitne neprijetnosti.";
$LZLANG["client_leave_message_short"] = "Pustite sporočilo";
$LZLANG["client_select_valid_group"] = "Prosimo izberite veljaven oddelek.";
$LZLANG["client_important_hint"] = "Pomemebn predlog";
$LZLANG["client_print"] = "Natisni";
$LZLANG["client_close_window"] = "Zapri okno";
$LZLANG["client_rate_representative"] = "Oceni operaterja";
$LZLANG["client_bookmark"] = "Dodaj med priljubljene";
$LZLANG["client_insert_smiley"] = "Vstavi smeškota";
$LZLANG["client_goto_login"] = "Nazaj na prijavno okno";
$LZLANG["client_switch_sounds"] = "Vklopi/Izklopi zvok";
$LZLANG["client_intern_arrives"] = "<!--intern_name--> je prevzel Vaš pogovor.";
$LZLANG["client_start_chat"] = "Prični s pogovorom";
$LZLANG["client_new_messages"] = "Nova sporočila";
$LZLANG["client_message_too_long"] = "Sporočilo je predolgo. Če ga želite poslati, ga skrajšajte.";
$LZLANG["client_message_received"] = "Hvala lepa! Takoj, ko bo možno, Vas bomo kontaktirali.";
$LZLANG["client_message_flood"] = "Poslali ste preveč sporočil. Prosimo počakajte malo, ter poizkusite ponovno.";
$LZLANG["client_really_close"] = "Res želite zaključiti pogovor?";
$LZLANG["client_file_request_rejected"] = "Operater ni sprejel Vašega pogovora!";
$LZLANG["client_file_upload_oversized"] = "Strežnik ni sprejel Vaše datoteke - datoteka je prevelika!";
$LZLANG["client_file_upload_provided"] = "Vašo datoteko smo posredovali našemu operaterju!";
$LZLANG["client_file_upload_requesting"] = "Zahtevam dovoljenje za prenos ...";
$LZLANG["client_file_upload_send_file"] = "Kliknite SEND za prenos izbrane datoteke";
$LZLANG["client_file_upload_select_file"] = "Prosimo izberite datoteko za prenos.";
$LZLANG["client_wait_for_representative"] = "Prosimo počakajte na operaterja!";
$LZLANG["client_no_representative"] = "Operater je že zapustil pogovor.";
$LZLANG["client_transmitting_file"] = "Prenos Vaše datoteke ...";
$LZLANG["client_please_rate"] = "Prosimo izberite najprej oceno!";
$LZLANG["client_rate_reason"] = "Prosimo, napišite zakaj ste tako ocenili našo podporo";
$LZLANG["client_rate_qualification"] = "Znanje";
$LZLANG["client_rate_politeness"] = "Vljudnost";
$LZLANG["client_rate_success"] = "Hvala lepa, prejeli smo Vašo oceno. Vaša ocena bo pripomogla k izboljšanju našega servisa. Najlepša hvala.";
$LZLANG["client_rate_max"] = "Servis lahko ocenite le trikrat v enem dnevu.";
$LZLANG["client_file"] = "Datoteka";
$LZLANG["client_welcome"] = "Pozdravljeni";
$LZLANG["client_send"] = "Pošlji";
$LZLANG["client_abort"] = "Prekini";
$LZLANG["index_adding_server"] = "Dodaj ta Livezilla profil";
$LZLANG["index_adding_server_hint"] = "LiveZilla mora biti nameščena na Vašem sistemu";
$LZLANG["index_close"] = "Zapri";
$LZLANG["index_not_available"] = "Ni na voljo";
$LZLANG["index_addserver"] = "Dodaj strežnik";
$LZLANG["index_description_install"] = "LiveZilla Operator Client lahko namestite naravnost iz strežnika. Po prenosu ter instalaciji se lahko takoj priklopite na Livezilla strežnik. Podatke za prijavo lahko dobite v Livezilla administraciji.";
$LZLANG["index_description_profile"] = "Prenesi profil strežnika. LiveZilla Server Profile vsebuje vse potrebne podatke za prijavo na dotični strežnik.";
$LZLANG["index_description_demochat"] = "Prični demo pogovor in se pogovarjaj z internimi operaterji, ki so prijavljeni. To lahko uporabite za vsa testiranja.";
?>


text:
  Samognat est
       un village
       situé dans le département de l'Ain en Rhône-Alpes. Elle totalisait 627 habitants en 2008.

La commune compte quelques  équipements, elle dispose, entre autres, de un terrain de golf et une boucle de randonnée.

À Samognat, le prix moyen à la vente d'un appartement s'évalue à 858 € du m² en vente. la valorisation moyenne d'une maison à l'achat se situe à 1 845 € du m². À la location la valeur moyenne se situe à 6,27 € du m² par mois.

Si vous envisagez de venir habiter à Samognat, vous pourrez facilement trouver une maison à acheter.

À coté de Samognat sont positionnées géographiquement les villes de
Groissiat localisée à 4 km, 1 079 habitants,
Bellignat située à 4 km, 3 488 habitants,
Matafelon-Granges à 1 km, 641 habitants,
Coisia à 5 km, 121 habitants,
Géovreisset située à 3 km, 871 habitants,
Sonthonnax-la-Montagne localisée à 4 km, 315 habitants,
 entre autres. De plus, Samognat est située à seulement 27 km de Bourg-en-Bresse.

Le parc de logements, à Samognat, se décomposait en 2011 en huit appartements et 278 maisons soit
 un marché plutôt équilibré.


text:
<?php
require  $_SERVER['DOCUMENT_ROOT']. '/vendor/autoload.php';

$receiver_id = 43182;
$secret = '7b32f743f795ac77cd9e7b99c1ccece20d1921cb';

echo $api_version;
echo "<br>".$notification_token;
exit;

try {
    if ($api_version == '1.3') {
        $configuration = new Khipu\Configuration();
        $configuration->setSecret($secret);
        $configuration->setReceiverId($receiver_id);
        // $configuration->setDebug(true);

        $client = new Khipu\ApiClient($configuration);
        $payments = new Khipu\Client\PaymentsApi($client);

        $response = $payments->paymentsGet($notification_token);
        if ($response->getReceiverId() == $receiver_id) {
            if ($response->getStatus() == 'done') {

                $respuesta = json_decode($response);

                $idCobro = $respuesta->payment_id;

                //Se actualiza el pago como realizado en la BD
                        //agregar los datos a la BD
                $con = include $_SERVER['DOCUMENT_ROOT']."/admin/crearConexion.php";

                //Se agregan los datos:

                $sql = "UPDATE cobro SET pagado='Sí' WHERE idCobro='$idCobro'";

                $resultado = $con->query($sql);

                mysqli_close($con);
                exit;

                //redireccionar a cobros
                header("location:/admin/cobros");
            }
        } else {
            // receiver_id no coincide
        }
    } else {
        // Usar versión anterior de la API de notificación
    }
} catch (\Khipu\ApiException $exception) {
    print_r($exception->getResponseObject());
}

?>


text:
<?xml version="1.0" encoding="UTF-8"?>
<GeocodeResponse>
 <status>OK</status>
 <result>
  <type>establishment</type>
  <type>natural_feature</type>
  <formatted_address>Wirral, Wirral, Merseyside CH60, UK</formatted_address>
  <address_component>
   <long_name>Wirral</long_name>
   <short_name>Wirral</short_name>
   <type>establishment</type>
   <type>natural_feature</type>
  </address_component>
  <address_component>
   <long_name>Wirral</long_name>
   <short_name>Wirral</short_name>
   <type>postal_town</type>
  </address_component>
  <address_component>
   <long_name>Merseyside</long_name>
   <short_name>Merseyside</short_name>
   <type>administrative_area_level_2</type>
   <type>political</type>
  </address_component>
  <address_component>
   <long_name>United Kingdom</long_name>
   <short_name>GB</short_name>
   <type>country</type>
   <type>political</type>
  </address_component>
  <address_component>
   <long_name>CH60</long_name>
   <short_name>CH60</short_name>
   <type>postal_code</type>
   <type>postal_code_prefix</type>
  </address_component>
  <geometry>
   <location>
    <lat>53.3333333</lat>
    <lng>-3.0833333</lng>
   </location>
   <location_type>APPROXIMATE</location_type>
   <viewport>
    <southwest>
     <lat>53.3266697</lat>
     <lng>-3.0993407</lng>
    </southwest>
    <northeast>
     <lat>53.3399959</lat>
     <lng>-3.0673259</lng>
    </northeast>
   </viewport>
  </geometry>
  <place_id>ChIJc2SL5xnYekgRBlJNnWGvVVg</place_id>
 </result>
</GeocodeResponse>


text:
package org.apache.giraph.io.formats.multi;

import org.apache.hadoop.mapreduce.InputSplit;

import java.io.IOException;

/**
 * Helper InputSplit class which holds the information about input format
 * which owns this input split.
 *
 * Used only with input formats which wrap several input formats into one
 * ({@link MultiVertexInputFormat} and {@link MultiEdgeInputFormat})
 */
class InputSplitWithInputFormatIndex extends InputSplit {
  /** Wrapped input split */
  private InputSplit split;
  /** Index of input format which owns the input split */
  private int inputFormatIndex;

  /**
   * Constructor
   *
   * @param split            Input split
   * @param inputFormatIndex Index of input format which owns the input split
   */
  InputSplitWithInputFormatIndex(InputSplit split, int inputFormatIndex) {
    this.inputFormatIndex = inputFormatIndex;
    this.split = split;
  }

  @Override
  public long getLength() throws IOException, InterruptedException {
    return split.getLength();
  }

  @Override
  public String[] getLocations() throws IOException, InterruptedException {
    return split.getLocations();
  }

  int getInputFormatIndex() {
    return inputFormatIndex;
  }

  InputSplit getSplit() {
    return split;
  }
}


text:
from unittest.mock import patch, Mock

from autorelease import trigger

@patch("autorelease.trigger.trigger_kokoro_build_for_pull_request")
@patch("autorelease.github.GitHub.list_org_issues")
@patch("autorelease.kokoro.make_authorized_session")
def test_no_issues(
    make_authorized_session, list_org_issues, trigger_kokoro_build_for_pull_request
):
    list_org_issues.return_value = []

    trigger.main("github-token", "kokoro-credentials")
    make_authorized_session.assert_called_once()
    trigger_kokoro_build_for_pull_request.assert_not_called()

@patch("autorelease.trigger.trigger_kokoro_build_for_pull_request")
@patch("autorelease.github.GitHub.list_org_issues")
@patch("autorelease.kokoro.make_adc_session")
def test_adc(make_adc_session, list_org_issues, trigger_kokoro_build_for_pull_request):
    list_org_issues.return_value = []

    trigger.main("github-token", None)
    make_adc_session.assert_called_once()
    trigger_kokoro_build_for_pull_request.assert_not_called()

@patch("autorelease.trigger.trigger_kokoro_build_for_pull_request")
@patch("autorelease.github.GitHub.list_org_issues")
@patch("autorelease.kokoro.make_authorized_session")
def test_processes_issues(
    make_authorized_session, list_org_issues, trigger_kokoro_build_for_pull_request
):
    pr1 = {
        "base": {"ref": "abc123", "repo": {"full_name": "googleapis/java-asset"}},
        "pull_request": {"html_url": "https://github.com/googleapis/java-asset"},
        "title": "chore: release 1.2.3",
    }
    pr2 = {
        "base": {"ref": "def456", "repo": {"full_name": "googleapis/nodejs-container"}},
        "pull_request": {"html_url": "https://github.com/nodejs/java-container"},
        "title": "chore: release 1.0.0",
    }
    list_org_issues.side_effect = [[pr1, pr2]]
    trigger.main("github-token", "kokoro-credentials")
    list_org_issues.assert_any_call(
        org="googleapis",
        state="closed",
        labels="autorelease: tagged",
        created_after="2021-04-01",
    )
    list_org_issues.assert_any_call(
        org="GoogleCloudPlatform",
        state="closed",
        labels="autorelease: tagged",
        created_after="2021-04-01",
    )
    assert trigger_kokoro_build_for_pull_request.call_count == 2

@patch("autorelease.kokoro.trigger_build")
def test_trigger_kokoro_build_for_pull_request_skips_non_merged(trigger_build):
    github = Mock()
    github.update_pull_labels = Mock()
    github.get_url.return_value = {
        "merged_at": None,
        "base": {"repo": {"full_name": "googleapis/java-asset"}},
    }
    issue = {
        "pull_request": {"url": "https://api.github.com/googleapis/java-asset/pull/5"}
    }
    trigger.trigger_kokoro_build_for_pull_request(Mock(), github, issue, Mock())
    github.update_pull_labels.assert_called_once()
    trigger_build.assert_not_called()

@patch("autorelease.trigger.LANGUAGE_ALLOWLIST", ["java"])
@patch("autorelease.kokoro.trigger_build")
def test_trigger_kokoro_build_for_pull_request_triggers_kokoro(trigger_build):
    github = Mock()
    github.get_url.return_value = {
        "merged_at": "2021-01-01T09:00:00.000Z",
        "merge_commit_sha": "abcd1234",
        "base": {"repo": {"full_name": "googleapis/java-asset"}},
        "html_url": "https://github.com/googleapis/java-asset/pulls/5",
    }
    issue = {
        "pull_request": {"url": "https://api.github.com/googleapis/java-asset/pull/5"},
        "merged_at": "2021-01-01T09:00:00.000Z",
    }

    trigger.trigger_kokoro_build_for_pull_request(Mock(), github, issue, Mock())
    trigger_build.assert_called_once()
    github.update_pull_labels.assert_called_once()

@patch("autorelease.trigger.LANGUAGE_ALLOWLIST", [])
@patch("autorelease.kokoro.trigger_build")
def test_trigger_kokoro_build_for_pull_request_skips_kokoro_if_not_in_allowlist(
    trigger_build,
):
    github = Mock()
    github.get_url.return_value = {
        "merged_at": "2021-01-01T09:00:00.000Z",
        "merge_commit_sha": "abcd1234",
        "base": {"repo": {"full_name": "googleapis/java-asset"}},
        "html_url": "https://github.com/googleapis/java-asset/pulls/5",
    }
    issue = {
        "pull_request": {"url": "https://api.github.com/googleapis/java-asset/pull/5"},
        "merged_at": "2021-01-01T09:00:00.000Z",
    }
    trigger.trigger_kokoro_build_for_pull_request(Mock(), github, issue, Mock())
    trigger_build.assert_not_called()

@patch("autorelease.trigger.LANGUAGE_ALLOWLIST", ["php"])
@patch("autorelease.kokoro.trigger_build")
def test_trigger_kokoro_build_for_pull_request_skips_kokoro_if_no_job_name(
    trigger_build,
):
    github = Mock()
    github.get_url.return_value = {
        "merged_at": "2021-01-01T09:00:00.000Z",
        "base": {"repo": {"full_name": "googleapis/google-cloud-php-bigquery"}},
        "html_url": "https://github.com/googleapis/google-cloud-php-bigquery/pulls/5",
    }
    issue = {
        "pull_request": {
            "url": "https://api.github.com/googleapis/google-cloud-php-bigquery/pull/5"
        },
        "merged_at": "2021-01-01T09:00:00.000Z",
    }
    trigger.trigger_kokoro_build_for_pull_request(Mock(), github, issue, Mock())
    trigger_build.assert_not_called()

@patch("autorelease.trigger.LANGUAGE_ALLOWLIST", ["php"])
@patch("autorelease.kokoro.trigger_build")
def test_trigger_kokoro_build_for_pull_request_skips_kokoro_if_already_triggered(
    trigger_build,
):
    github = Mock()
    github.get_url.return_value = {
        "merged_at": "2021-01-01T09:00:00.000Z",
        "base": {"repo": {"full_name": "googleapis/google-cloud-php-bigquery"}},
        "html_url": "https://github.com/googleapis/google-cloud-php-bigquery/pulls/5",
        "labels": [{"id": 12345, "name": "autorelease: triggered"}],
    }
    issue = {
        "pull_request": {
            "url": "https://api.github.com/googleapis/google-cloud-php-bigquery/pull/5"
        },
        "merged_at": "2021-01-01T09:00:00.000Z",
    }
    trigger.trigger_kokoro_build_for_pull_request(Mock(), github, issue, Mock())
    trigger_build.assert_not_called()

@patch("autorelease.trigger.LANGUAGE_ALLOWLIST", ["java"])
@patch("autorelease.kokoro.make_authorized_session")
@patch("autorelease.github.GitHub.get_issue")
@patch("autorelease.github.GitHub.get_url")
@patch("autorelease.github.GitHub.update_pull_labels")
@patch("autorelease.kokoro.trigger_build")
def test_trigger_single(
    trigger_build, update_pull_labels, get_url, get_issue, make_authorized_session
):
    kokoro_session = Mock()
    make_authorized_session.return_value = kokoro_session
    get_issue.return_value = {
        "title": "chore: release 1.2.3",
        "pull_request": {
            "html_url": "https://github.com/googleapis/java-trace/pull/1234",
            "url": "https://api.github.com/repos/googleapis/java-trace/pulls/1234",
        },
    }
    get_url.return_value = {
        "merged_at": "2021-07-20T09:00:00.123Z",
        "base": {"repo": {"full_name": "googleapis/java-trace"}},
        "html_url": "https://github.com/googleapis/java-trace/pull/1234",
        "merge_commit_sha": "abcd1234",
        "labels": [{"id": 12345, "name": "autorelease: tagged"}],
    }

    pull_request_url = "https://github.com/googleapis/java-trace/pull/1234"
    reporter = trigger.trigger_single(
        "fake-github-token", "fake-kokoro-credentials", pull_request_url
    )

    assert len(reporter.results) == 1
    trigger_build.assert_called_with(
        kokoro_session,
        job_name="cloud-devrel/client-libraries/java/java-trace/release/stage",
        sha="abcd1234",
        env_vars={
            "AUTORELEASE_PR": "https://github.com/googleapis/java-trace/pull/1234"
        },
    )
    update_pull_labels.assert_not_called()

@patch("autorelease.trigger.LANGUAGE_ALLOWLIST", ["java"])
@patch("autorelease.kokoro.make_authorized_session")
@patch("autorelease.github.GitHub.get_issue")
@patch("autorelease.github.GitHub.get_url")
@patch("autorelease.github.GitHub.update_pull_labels")
@patch("autorelease.kokoro.trigger_build")
def test_trigger_package(
    trigger_build, update_pull_labels, get_url, get_issue, make_authorized_session
):
    github = Mock()
    kokoro_session = Mock()
    github.get_url.return_value = {
        "merged_at": "2021-01-01T09:00:00.000Z",
        "base": {"repo": {"full_name": "GoogleCloudPlatform/functions-framework-java"}},
        "html_url": "https://github.com/GoogleCloudPlatform/functions-framework-java/pull/111",
        "labels": [{"id": 111, "name": "autorelease: tagged"}],
        "merge_commit_sha": "abcd111",
        "title": "chore(master): release java-function-invoker 1.1.2",
    }
    issue = {
        "pull_request": {
            "url": "https://api.github.com/repos/GoogleCloudPlatform/functions-framework-java/pulls/111"
        },
        "merged_at": "2021-01-01T09:00:00.000Z",
    }

    trigger.trigger_kokoro_build_for_pull_request(kokoro_session, github, issue, Mock())
    trigger_build.assert_called_with(
        kokoro_session,
        job_name="functions-framework/java/java-function-invoker/release",
        sha="abcd111",
        env_vars={
            "AUTORELEASE_PR": "https://github.com/GoogleCloudPlatform/functions-framework-java/pull/111"
        },
    )

@patch("autorelease.kokoro.make_authorized_session")
@patch("autorelease.kokoro.trigger_build")
def test_trigger_single_bad_url(trigger_build, make_authorized_session):
    kokoro_session = Mock()
    make_authorized_session.return_value = kokoro_session

    pull_request_url = "https://github.com/googleapis/java-trace/issues/1234"
    reporter = trigger.trigger_single(
        "fake-github-token", "fake-kokoro-credentials", pull_request_url
    )

    assert len(reporter.results) == 1
    trigger_build.assert_not_called()

@patch("autorelease.kokoro.make_authorized_session")
@patch("autorelease.github.GitHub.get_issue")
@patch("autorelease.github.GitHub.get_url")
@patch("autorelease.github.GitHub.update_pull_labels")
@patch("autorelease.kokoro.trigger_build")
def test_trigger_single_skips_already_triggered(
    trigger_build, update_pull_labels, get_url, get_issue, make_authorized_session
):
    kokoro_session = Mock()
    make_authorized_session.return_value = kokoro_session
    get_issue.return_value = {
        "title": "chore: release 1.2.3",
        "pull_request": {
            "html_url": "https://github.com/googleapis/java-trace/pull/1234",
            "url": "https://api.github.com/repos/googleapis/java-trace/pulls/1234",
        },
    }
    get_url.return_value = {
        "merged_at": "2021-07-20T09:00:00.123Z",
        "base": {"repo": {"full_name": "googleapis/java-trace"}},
        "html_url": "https://github.com/googleapis/java-trace/pull/1234",
        "merge_commit_sha": "abcd1234",
        "labels": [
            {"id": 12345, "name": "autorelease: tagged"},
            {"id": 12346, "name": "autorelease: triggered"},
        ],
    }

    pull_request_url = "https://github.com/googleapis/java-trace/pull/1234"
    reporter = trigger.trigger_single(
        "fake-github-token", "fake-kokoro-credentials", pull_request_url
    )

    assert len(reporter.results) == 1
    trigger_build.assert_not_called()


text: export * from './getTests.component';


text:
How To
------

Here we will explore some examples using class-based emails.

Sending a Welcome Email
~~~~~~~~~~~~~~~~~~~~~~~

In the introduction to class-based emails, we demonstrated some very basic
patterns for sending a welcome email.  Here, we will expand on those patterns a
bit further to demonstrate a real use case example.

Our goal here will be to send a welcome email to newly registered users by
hooking into the ``post_save`` signal provided by Django.

Password Reset Email
~~~~~~~~~~~~~~~~~~~~

Sending a password reset email manually.  First lets take a look at how Django
does this in the built in :class:`PasswordResetForm` packaged with
``django.contrib.auth``.:

.. code-block:: python

    class PasswordResetForm(forms.Form):
        email = forms.EmailField(label=_("Email"), max_length=254)

        def save(self, domain_override=None,
                 subject_template_name='registration/password_reset_subject.txt',
                 email_template_name='registration/password_reset_email.html',
                 use_https=False, token_generator=default_token_generator,
                 from_email=None, request=None):
            """
            Generates a one-use only link for resetting password and sends to the
            user.
            """
            from django.core.mail import send_mail
            UserModel = get_user_model()
            email = self.cleaned_data["email"]
            users = UserModel._default_manager.filter(email__iexact=email)
            for user in users:
                # Make sure that no email is sent to a user that actually has
                # a password marked as unusable
                if user.password == UNUSABLE_PASSWORD:
                    continue
                if not domain_override:
                    current_site = get_current_site(request)
                    site_name = current_site.name
                    domain = current_site.domain
                else:
                    site_name = domain = domain_override
                c = {
                    'email': user.email,
                    'domain': domain,
                    'site_name': site_name,
                    'uid': int_to_base36(user.pk),
                    'user': user,
                    'token': token_generator.make_token(user),
                    'protocol': 'https' if use_https else 'http',
                }
                subject = loader.render_to_string(subject_template_name, c)
                # Email subject *must not* contain newlines
                subject = ''.join(subject.splitlines())
                email = loader.render_to_string(email_template_name, c)
                send_mail(subject, email, from_email, [user.email])

Given a valid email address, the password reset form does the following.

1.  Lookup all users with that email address, skipping users who have unusable passwords.
2.  Figure out the domain, site information, and other context data.
3.  Render the password reset template.
4.  Send the password reset email(s).

Our goal will be to reproduce this logic while leveraging the power of
class-based views.:

.. code-block:: python

    # accounts/emails.py
    class PasswordResetEmail(HTMLEmail):
        ...

    send_password_reset_email = PasswordResetEmail.as_callable()

And to use it from a view.

.. code-block:: python

    # accounts/views.py
    from accounts.emails import send_password_reset_email

    class PasswordResetView(FormView):
        ...
        def form_valid(self, form):
            # Send the password reset email.
            email = form.cleaned_data['email']
            users = UserModel._default_manager.filter(email__iexact=email)
            for user in users:
                password_reset_email(user)
            return super(PasswordResetView, self).form_valid(form)

Now that we know what our interface should look like, lets start writing our
email class.

Step 1: Writing the basic view
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

First, we need a way to find all of the users who's email matches our target
email.  Since we need to send a password reset email for every user with the
target email, this logic needs to live outside of our email class.  For this
example, i'll simply make a function to wrap around our email callable.

.. code-block:: python

    # accounts/emails.py
    from django.contrib.auth import get_user_model, UNUSABLE_PASSWORD
    from emailtools import HTMLEmail

    UserModel = get_user_model()

    class PasswordResetEmail(HTMLEmail):
        from_address = 'admin@example.com'
        subject = 'Password reset on example.com'
        template_name = 'registration/password_reset_email.html'

        def get_to(self):
            return [self.args[0].email]

    send_password_reset_email = PasswordResetEmail.as_callable()

Step 2: Domain and Site information.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Now lets get our site and domain information, along with the other context
information ready for template rendering.  For this, we'll want to hook into
the method call to :meth:`~emailtools.HTMLEmail.get_context_data`.:

.. code-block:: python

    # accounts/emails.py
    from django.contrib.auth.tokens import default_token_generator
    from django.utils.http import int_to_base36

    from emailtools import HTMLEmail

    class PasswordResetEmail(HTMLEmail):
        token_generator = default_token_generator
        ...
        def get_context_data(self, **kwargs):
            kwargs = super(PasswordResetEmail, self).get_context_data(**kwargs)
            current_site = Site.objects.get_current()
            kwargs.update({
                'site_name': current_site.name,
                'domain': current_site.domain,
                'uid': int_to_base36(user.pk),
                'email': self.args[0].email,
                'user': self.args[0],
                'token': self.token_generator.make_token(user),
            })
            return kwargs

While this will suffice for reproducing the behavior of
:meth:`~django.contrib.auth.forms.PasswordResetForm.save`, constructing urls in
templates via string concatenation has always seemed prone to human error.
Additionally, there are so many uses for email tokens so wouldn't it be nice to
have a reusable tool for sending such emails.

Step 3: Refactoring out the Re-usable components
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

First, lets write ``BuildAbsoluteURIMixin``, a mixin class for your email classes
which provides the url reversing that returns absolute urls.

.. code-block:: python

    # mixins.py
    from django.contrib.auth.tokens import default_token_generator
    from django.contrib.sites.models import Site
    from django.core.urlresolvers import reverse

    class BuildAbsoluteURIMixin(object):
        protocol = 'http'

        def get_domain(self):
            return Site.objects.get_current().domain

        def get_protocol(self):
            return self.protocol

        def reverse_absolute_uri(self, view_name, args=None, kwargs=None):
            location = reverse(view_name, args=args, kwargs=kwargs)
            return self.build_absolute_uri(location)

        def build_absolute_uri(self, location):
            return '{protocol}://{domain}{location}'.format(
                protocol=self.get_protocol(),
                domain=self.get_domain(),
                location=location,
            )

Now, lets write a ``UserTokenEmailMixin`` which will provide user based
token generation for our emails.

.. code-block:: python

    # mixins.py
    from django.utils.http import int_to_base36

    class UserTokenEmailMixin(BuildAbsoluteURIMixin):
        UID_KWARG = 'uidb36'
        TOKEN_KWARG = 'token'

        token_generator = default_token_generator

        def get_user(self):
            return self.args[0]

        def generate_token(self, user):
            return self.token_generator.make_token(user)

        def get_uid(self, user):
            return int_to_base36(user.pk)

        def reverse_token_url(self, view_name, args=None, kwargs={}):
            kwargs.setdefault(self.UID_KWARG, self.get_uid(self.get_user()))
            kwargs.setdefault(self.TOKEN_KWARG, self.generate_token(self.get_user()))
            return self.reverse_absolute_uri(view_name, args=args, kwargs=kwargs)

Step 4: Bringing it all together
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Now, lets rewrite ``PasswordResetEmail`` to make use of these new mixins.

.. code-block:: python

    # accounts/emails.py
    from django.contrib.auth.tokens import default_token_generator
    from django.utils.http import int_to_base36

    from emailtools import HTMLEmail

    from mixins import UserTokenEmailMixin

    class PasswordResetEmail(UserTokenEmailMixin, MarkdownEmail):
        from_email = 'admin@example.com'
        template_name = 'registration/password_reset_email.html'
        subject = "Password Reset"

        def get_to(self):
            return [self.get_user().email]

        def get_context_data(self, **kwargs):
            kwargs = super(PasswordResetEmail, self).get_context_data()
            user = self.get_user()
            kwargs.update({
                'user': user,
                'reset_url': self.reverse_token_url('password_reset_confirm'),
            })
            return kwargs

    send_password_reset_email = PasswordResetEmail.as_callable()

Step 5: Re-usability
^^^^^^^^^^^^^^^^^^^^

A simple pattern for requiring email verification is to remove the password
fields from the signup form and send an email verification link on account
creation.  This has the pleasant side effect of simplifying the signup process
while verifying your user's email addresses.

Class based emails really shine here.  Lets look at what it would take to use
our :class:`~PasswordResetEmail` class to send a welcome email.

.. code-block:: python

    # accounts/emails.py
    send_welcome_email = PasswordResetEmail.as_callable(
        subject='Welcome to example.com'
        template_name='registration/welcome_email.html',
    )

The two mixins found in this example are also available in email tools.


text:
package net.tridentsdk.event.player;

import net.tridentsdk.base.Block;
import net.tridentsdk.base.BlockOrientation;
import net.tridentsdk.entity.living.Player;
import net.tridentsdk.event.block.BlockBreakEvent;
import net.tridentsdk.window.inventory.Item;

/**
 * Called when a player fills a bucket
 *
 * @author The TridentSDK Team
 */
public class PlayerBucketFillEvent extends BlockBreakEvent {
    public PlayerBucketFillEvent(Player player, Block block, BlockOrientation blockFace, Item itemInHand) {
        super(player, block, blockFace, itemInHand);
    }
}


text:
/*
 *
 * ChallengeScreen reducer
 *
 */

import { fromJS } from 'immutable'
import {
  DEFAULT_ACTION
} from './constants'

const initialState = fromJS({})

function challengeScreenReducer (state = initialState, action) {
  switch (action.type) {
    case DEFAULT_ACTION:
      return state
    default:
      return state
  }
}

export default challengeScreenReducer


text:
<!DOCTYPE html>

  <link href="http://gmpg.org/xfn/11" rel="profile">
  <meta http-equiv="content-type" content="text/html; charset=utf-8">

  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">

  <title>

      Archive ·

  </title>

  <link rel="stylesheet" href="/public/css/poole.css">
  <link rel="stylesheet" href="/public/css/syntax.css">

  <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/public/apple-touch-icon-precomposed.png">
  <link rel="shortcut icon" href="/public/favicon.ico">

  <link rel="alternate" type="application/rss+xml" title="RSS" href="/atom.xml">

          George Berry
          social data blog

            About

            Archive

Archive

Blog Posts

19 Aug 2014 »  Finally, a sane blogging platform

          hopefully still relevant in 2014.


text:
"""
Event Response Constants
"""

EVENT_MEMBER = 200
EVENT_MEMBERLIST = 201
EVENT_MEMBERATTRIBUTECHANGE = 202
EVENT_ENTRY = 203
EVENT_ITEM = 204
EVENT_TOPIC = 205
EVENT_PARTITIONLOST = 206
EVENT_DISTRIBUTEDOBJECT = 207
EVENT_CACHEINVALIDATION = 208
EVENT_MAPPARTITIONLOST = 209
EVENT_CACHE = 210
EVENT_CACHEBATCHINVALIDATION = 211
# ENTERPRISE
EVENT_QUERYCACHESINGLE = 212
EVENT_QUERYCACHEBATCH = 213

EVENT_CACHEPARTITIONLOST = 214
EVENT_IMAPINVALIDATION = 215
EVENT_IMAPBATCHINVALIDATION = 216


text:
<?php

require_once(__DIR__ . "/database.php");
session_start();
//The code below regenerates a session with a new id and delete the old session
session_regenerate_id(true);

//Below is the code that stores the path to my project
$path = "/MakhlinDAwesomenauts/php/";

//Below is code that says everything on the right will be stored in the right
//variable which is my local host which is my main host
    $host = "localhost";
//    You need a username to connect to my server
    $username = "root";
//    You need a password to connect to my server
    $password = "root";
//This is the name of my database
    $database = "awesomenauts_db";
//Below my if statement is checking if the connection  is set if it is it will
//run the code inside it
    if(!isset($_SESSION["connection"])) {
    //Below is the code that allows me to accses my mysqli server and the code in my
    //datababse to be stored in the connection object
        $connection = new Database($host, $username, $password, $database);
        $_SESSION["connection"] = $connection;
    }


text:
package com.melodies.bandup.setup;

/**
 * An item class that the DoubleListAdapter uses.
 */
public class DoubleListItem {
    public final String name;
    public final int drawableId;
    public Boolean isSelected;
    public final String id;

    DoubleListItem (String id, int drawableId, String name) {
        this.id = id;
        this.name = name;
        this.drawableId = drawableId;
        this.isSelected = false;
    }
}