text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
R.drawable
</TITLE>

<META NAME="date" CONTENT="2015-04-14">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

com.lows

Class R.drawable

java.lang.Object
  com.lows.R.drawable

Enclosing class:
R

public static final class R.drawable
extends java.lang.Object

Field Summary

static int
bed7

static int
beps

static int
compass29

static int
curved5

static int
directional2

static int
eye33

static int
four19

static int
geolocalization1

static int
ic_launcher

static int
location24

static int
location25

static int
no

static int
psa

static int
push19

static int
push20

static int
push21

static int
speech32

static int
spherical

static int
st

static int
wtns

static int
yes

Constructor Summary

R.drawable()

Method Summary

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

bed7

public static final int bed7

See Also:
Constant Field Values

beps

public static final int beps

See Also:
Constant Field Values

compass29

public static final int compass29

See Also:
Constant Field Values

curved5

public static final int curved5

See Also:
Constant Field Values

directional2

public static final int directional2

See Also:
Constant Field Values

eye33

public static final int eye33

See Also:
Constant Field Values

four19

public static final int four19

See Also:
Constant Field Values

geolocalization1

public static final int geolocalization1

See Also:
Constant Field Values

ic_launcher

public static final int ic_launcher

See Also:
Constant Field Values

location24

public static final int location24

See Also:
Constant Field Values

location25

public static final int location25

See Also:
Constant Field Values

no

public static final int no

See Also:
Constant Field Values

psa

public static final int psa

See Also:
Constant Field Values

push19

public static final int push19

See Also:
Constant Field Values

push20

public static final int push20

See Also:
Constant Field Values

push21

public static final int push21

See Also:
Constant Field Values

speech32

public static final int speech32

See Also:
Constant Field Values

spherical

public static final int spherical

See Also:
Constant Field Values

st

public static final int st

See Also:
Constant Field Values

wtns

public static final int wtns

See Also:
Constant Field Values

yes

public static final int yes

See Also:
Constant Field Values

Constructor Detail

R.drawable

public R.drawable()

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
RSpec.describe RuboCop::Cop::Naming::BinaryOperatorParameterName do
  subject(:cop) { described_class.new }

  it 'registers an offense for `#+` when argument is not named other' do
    expect_offense(<<-RUBY.strip_indent)
        def +(foo); end
              ^^^ When defining the `+` operator, name its argument `other`.
    RUBY
  end

  it 'registers an offense for `#eql?` when argument is not named other' do
    expect_offense(<<-RUBY.strip_indent)
        def eql?(foo); end
                 ^^^ When defining the `eql?` operator, name its argument `other`.
    RUBY
  end

  it 'registers an offense for `#equal?` when argument is not named other' do
    expect_offense(<<-RUBY.strip_indent)
        def equal?(foo); end
                   ^^^ When defining the `equal?` operator, name its argument `other`.
    RUBY
  end

  it 'works properly even if the argument not surrounded with braces' do
    expect_offense(<<-RUBY.strip_indent)
      def + another
            ^^^^^^^ When defining the `+` operator, name its argument `other`.
        another
      end
    RUBY
  end

  it 'does not register an offense for arg named other' do
    expect_no_offenses(<<-RUBY.strip_indent)
      def +(other)
        other
      end
    RUBY
  end

  it 'does not register an offense for arg named _other' do
    expect_no_offenses(<<-RUBY.strip_indent)
      def <=>(_other)
        0
      end
    RUBY
  end

  it 'does not register an offense for []' do
    expect_no_offenses(<<-RUBY.strip_indent)
      def [](index)
        other
      end
    RUBY
  end

  it 'does not register an offense for []=' do
    expect_no_offenses(<<-RUBY.strip_indent)
      def []=(index, value)
        other
      end
    RUBY
  end

  it 'does not register an offense for <<' do
    expect_no_offenses(<<-RUBY.strip_indent)
      def <<(cop)
        other
      end
    RUBY
  end

  it 'does not register an offense for non binary operators' do
    expect_no_offenses(<<-RUBY.strip_indent)
      def -@; end
                    # This + is not a unary operator. It can only be
                    # called with dot notation.
      def +; end
      def *(a, b); end # Quite strange, but legal ruby.
      def `(cmd); end
    RUBY
  end
end

redpajama_set_name: RedPajamaGithub


text:
package org.chpl.etl;

import java.net.URISyntaxException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * Hello world!
 *
 */
public class App
{

    private static final String csvRawFileName = "./src/main/resources/chpl-raw.csv";
    private static final String csvChecksummedFileName = "./src/main/resources/chpl-wChecksum.csv";
    private static final int minColumns = 271;

    public static void main( String[] args ) {
        String singleFile;
        String pluginsDir;
        if (args.length > 0) {
            singleFile = args[0];
            pluginsDir = args[1];
        } else {
            singleFile = "./src/main/resources/chpl-large.xlsx";
            pluginsDir = "./src/main/resources/plugins";
        }

        convertFile(singleFile);
        parseFile(singleFile, pluginsDir);
    }

    public static void convertFile(String filename) {
        ExcelConverter excelConverter = new ExcelConverter(filename, csvRawFileName, minColumns);
        excelConverter.convert();
        excelConverter.setCsvHash(csvChecksummedFileName);
        excelConverter.calculateHash();
    }

    public static void parseFile(String filename, String pluginsDir) {
        EtlGraph etlGraph = null;
        try {
            etlGraph = new EtlGraph(pluginsDir);
        } catch (URISyntaxException e) {
            Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, e);
        }

        etlGraph.setGraph("/graphs/openchpl_etl.grf");
        etlGraph.execute();

//        etlGraph.setGraph("/graphs/openchpl_checksum_analysis.grf");
//        etlGraph.execute();
//        etlGraph.setGraph("/graphs/openchpl_insert_vendor_and_product.grf");
//        etlGraph.execute();
//        etlGraph.setGraph("/graphs/openchpl_insert_certified_product.grf");
//        etlGraph.execute();
    }
}


text:
package org.sakaiproject.entitybroker.entityprovider.capabilities;

import org.sakaiproject.entitybroker.entityprovider.EntityProvider;

/**
 * A convenient interface to define that this entity type supports all CRUD operations

 * This is one of the capability extensions for the {@link EntityProvider} interface

 *
 * @author Aaron Zeckoski (aaron@caret.cam.ac.uk)
 */
public interface CRUDable extends EntityProvider, Saveable, Createable, Resolvable, Updateable, Deleteable {

   // this space intentionally left blank

}


text:
import "geom";
import "hull";
import "polygon";
import "voronoi";
import "delaunay";
import "quadtree";


text:
"""Defines common O3D test runner constants. This file determines paths to
other O3D components relatively, so it must be placed in the right location.

"""

import os
import sys

import util

join = os.path.join

# Make sure OS is supported.
if not util.IsWindows() and not util.IsMac() and not util.IsLinux():
  print 'Only Windows, Mac, and Linux are supported.'
  sys.exit(1)

# This path should be root/o3d/tests.
TEST_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# This path should be root/o3d.
O3D_PATH = os.path.dirname(TEST_PATH)
# This path should be root, i.e., the checkout location.
BASE_PATH = os.path.dirname(O3D_PATH)

HOME = os.path.expanduser('~')
if HOME == '~':
  print 'Cannot find user home directory.'
  sys.exit(1)

if util.IsWindows():
  PYTHON = r'C:\Python24\python.exe'
else:
  PYTHON = 'python'

# Note: this path may or may not exist.
RESULTS_PATH = join(TEST_PATH, 'results')

# Build directories.
if util.IsWindows():
  BUILD_PATH = join(O3D_PATH, 'build')
elif util.IsMac():
  BUILD_PATH = join(BASE_PATH, 'xcodebuild')
else:
  BUILD_PATH = join(BASE_PATH, 'sconsbuild')

# Product directory.
if os.path.exists(join(BUILD_PATH, 'Debug')):
  PRODUCT_DIR_PATH = join(BUILD_PATH, 'Debug')
elif os.path.exists(join(BUILD_PATH, 'Release')):
  PRODUCT_DIR_PATH = join(BUILD_PATH, 'Release')
else:
  print 'Cannot find Debug or Release folder in ' + BUILD_PATH
  sys.exit(1)

# Plugin locations.
INSTALL_PATHS = []
if util.IsWindows():
  INSTALL_PATHS += [join(HOME, 'Application Data', 'Mozilla',
                         'plugins', 'npo3dautoplugin.dll')]
  INSTALL_PATHS += [join(HOME, 'Application Data', 'Google', 'O3D',
                         'o3d_host.dll')]
elif util.IsMac():
  INSTALL_PATHS += ['/Library/Internet Plug-Ins/O3D.plugin']
else:
  INSTALL_PATHS += [join(HOME, '.mozilla', 'plugins',
                         'libnpo3dautoplugin.so')]


text:
/*
 * This file is part of FFmpeg.
 *
 * FFmpeg is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * FFmpeg is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with FFmpeg; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */

#ifndef FFMPEG_AVDEVICE_H
#define FFMPEG_AVDEVICE_H

#define LIBAVDEVICE_VERSION_MAJOR 52
#define LIBAVDEVICE_VERSION_MINOR  0
#define LIBAVDEVICE_VERSION_MICRO  0

#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
                                               LIBAVDEVICE_VERSION_MINOR, \
                                               LIBAVDEVICE_VERSION_MICRO)
#define LIBAVDEVICE_VERSION     AV_VERSION(LIBAVDEVICE_VERSION_MAJOR, \
                                           LIBAVDEVICE_VERSION_MINOR, \
                                           LIBAVDEVICE_VERSION_MICRO)
#define LIBAVDEVICE_BUILD       LIBAVDEVICE_VERSION_INT

/**
 * Initialize libavdevice and register all the input and output devices.
 * @warning This function is not thread safe.
 */
void avdevice_register_all(void);

#endif /* FFMPEG_AVDEVICE_H */


text:
// key: compiler.err.cant.apply.symbol.1
// key: compiler.misc.varargs.argument.mismatch

class VarargsArgumentMismatch {
    void m(String s, Integer... is) {}
    { this.m("1", "2", "3"); }
}


text: examples for node.js


text:
import json
from oslo_config import cfg
from common_func import request_info

redistribute_opts = []

redistribute_opts.append(cfg.StrOpt('redistribute_off', default=[],
                         help='redistribute'))
redistribute_opts.append(cfg.StrOpt('vrf_routeDist', default=[],
                         help='vrf_routeDist'))

CONF = cfg.CONF
CONF.register_cli_opts(redistribute_opts, 'Bgp')

##################
# set_redistribute
##################

def start_set_redistribute(dpid, redistribute, vrf_routeDist):
    operation = "set_redistribute"
    url_path = "/openflow/" + dpid + "/redistribute"
    method = "POST"
    request = '''
{
"bgp": {
"redistribute": "%s",
"vrf_routeDist": "%s"
}
}'''%(redistribute, vrf_routeDist)

    redistribute_result = request_info(operation, url_path, method, request)
    print "----------"
    print json.dumps(redistribute_result, sort_keys=False, indent=4)
    print ""

##############
# main
##############

def main():
    dpid = "0000000000000001"
    try:
        CONF(default_config_files=['OpenFlow.ini'])
        redistribute = CONF.Bgp.redistribute_off
        vrf_routeDist = CONF.Bgp.vrf_routeDist
    except cfg.ConfigFilesNotFoundError:
        print "Error: Not Found <OpenFlow.ini> "

    start_set_redistribute(dpid, redistribute, vrf_routeDist)

if __name__ == "__main__":
    main()


text:
package simcity.Bank;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Timer;
import java.util.concurrent.Semaphore;

import simcity.PersonAgent;
import simcity.Bank.BankManagerRole.MyCustomer.MyCustomerState;
import simcity.Bank.BankManagerRole.MyLoanOfficer.MyOfficerState;
import simcity.Bank.BankManagerRole.MyTeller.MyTellerState;
import simcity.Bank.gui.BankManagerGui;
import simcity.Bank.gui.BankTellerGui;
import simcity.gui.SimCityGui;
import simcity.gui.trace.AlertLog;
import simcity.gui.trace.AlertTag;
//import simcity.housing.LandlordRole;
import simcity.interfaces.BankCustomer;
import simcity.interfaces.BankLoanOfficer;
import simcity.interfaces.BankManager;
import simcity.interfaces.BankRobber;
import simcity.interfaces.BankTeller;
import simcity.interfaces.Landlord;
//import simcity.interfaces.Landlord;
import simcity.test.mock.EventLog;
import simcity.test.mock.LoggedEvent;
import agent.Role;

public class BankManagerRole extends Role implements BankManager {

	/*
	 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
	 * ALL LANDLORD STUFF COMMENTED OUT
	 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
	 * ALL LANDLORD STUFF COMMENTED OUT
	 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
	 * COMMENTED OUT HEREISRENT IN INTERFACE TOO
	 */

	//data
	public EventLog log = new EventLog();
	private List<MyTeller> tellers = Collections.synchronizedList(new ArrayList<MyTeller>());
	private List<MyLoanOfficer> officers = Collections.synchronizedList(new ArrayList<MyLoanOfficer>());
	private List<MyCustomer> customers = Collections.synchronizedList(new ArrayList<MyCustomer>());
	private List<MyCustomer> newJobs = Collections.synchronizedList(new ArrayList<MyCustomer>());
	public List<MyClient> clients = Collections.synchronizedList(new ArrayList<MyClient>());
	public Map<Integer, MyAccount> accounts = new HashMap<Integer, MyAccount>();
	int hour;
	int checkAccount;
	BankCustomerRole accountCheckCust;
	private boolean bankIsOpen;
	public enum BankState {open, closed, arriving, newDay};
	BankState bankState;
	private double employeePayPerHour=10;
	private double vault = 1000000000;

	//Robber
	BankRobber robber=null;

	//gui
	private Semaphore atDest = new Semaphore(0,true);
	public enum cornerState{ coming, leaving };
	public cornerState corner=cornerState.coming;
	private BankManagerGui bankmanagerGui;
	private SimCityGui gui;
	private Timer timer=new Timer();
	private int instance; //which bank to paint in

	public BankManagerRole(SimCityGui G, int num) {
		super();
		gui=G;
		instance=num;
		// TODO Auto-generated constructor stub
		//startHour=7;
		bankState=BankState.arriving;
		hour=0;
		officers.clear();
		tellers.clear();
		customers.clear();
		checkAccount=0;
	}

	//MESSAGES

	public void msgTimeUpdate(int hr) {
		hour=hr;
		Do("Time is "+hr);
		if(hr==1) bankState=BankState.arriving;
		stateChanged();
	}

	public void msgCheckBalance(BankCustomerRole c, int AN){
		checkAccount=AN;
		accountCheckCust=c;
		stateChanged();
	}

	public void msgIAmHere(Role person, String type) {
		//if(person.instanceof(BankTeller))
		if(type.equals("BankTeller")) {
			AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "BankTeller is here");
			Do("BankTeller is here");
			tellers.add(new MyTeller((BankTeller)person));
			stateChanged();
		}
		else if (type.equals("BankLoanOfficer")) {
			AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "BankLoanOfficer is here");
			Do("BankLoanOfficer is here");
			officers.add(new MyLoanOfficer((BankLoanOfficer)person));
			stateChanged();
		}
		else if(type.equals("loan")) {
			AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "Customer with a loan is here");
			Do("Customer with a loan is here");
			customers.add(new MyCustomer((BankCustomer)person, MyCustomer.MyCustomerState.loan));
			stateChanged();
		}
		else if(type.equals("transaction")) {
			AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "Customer with a transaction is here");
			Do("Customer with a transaction is here");
			customers.add(new MyCustomer((BankCustomer)person, MyCustomer.MyCustomerState.transaction));
			stateChanged();
		}
		else if(type.equals("robbery")) {
			AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "THERE IS A BANKROBBER!");
			Do("ROBBERY!!!!!!");
			robber=(BankRobber) person;
			stateChanged();
		}
		//Fire Loan Officer and Hire new Applicant
		else if(type.equals("job")) {
			AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "Hiring a new loan officer");
			Do("New Loan officer is here. Old Loan Officer is fired");
			if(person.myPerson.jobString.contains("Loan")){
				newJobs.add(new MyCustomer((BankCustomer)person, MyCustomer.MyCustomerState.loanjob));
			}
			stateChanged();
		}
		else{
			Do("*****************************INVALID STRING PASSED*****************************");
		}
	}

	public void msgAvailable(BankTeller t) {
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "BankTeller available");
		Do("BankTeller available");
		tellers.get(0).state=MyTeller.MyTellerState.available;
		stateChanged();
	}

	public void msgAvailable(BankLoanOfficer t) {
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "BankLoanOfficer available");
		Do("BankLoanOfficer available");
		officers.get(0).state=MyLoanOfficer.MyOfficerState.available;
		stateChanged();
	}

	public void iAmDead() {
		tellers.remove(0);
		Do("Teller was killed, no more teller");
	}

	public void msgCreateAccount(String type) {
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "Going to create an account");
		Do("Going to create account");
		if(type.equals("BankTeller")) {
			tellers.get(0).needsAccount=true;
			stateChanged();
		}
		if(type.equals("BankLoanOfficer")) {
			officers.get(0).needsAccount=true;
			stateChanged();
		}
	}
	public void msgProcessTransaction(int AN, double amount) {
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "Processing transaction");
		Do("Processing transaction");
		tellers.get(0).requested=amount;
		tellers.get(0).accountNum=AN;
		stateChanged();
	}

	public void msgNewLoan(int AN, double amount) {
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "New loan request");
		Do("New loan request");
		officers.get(0).requested=amount;
		officers.get(0).accountNum=AN;
//		System.err.println(officers.get(0).accountNum + " "+ officers.get(0).requested);
		stateChanged();
	}

	public void msgGaveALoan(double cash) {
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "Gave loan");
		Do("Gave loan");
		vault -= cash;
		stateChanged();
	}

	@Override
	public void msgAnimationFinishedGoToCorner() {
		if(corner==cornerState.coming){
//			bankManagerGui.goToTellerPos();
		}
		else if(corner==cornerState.leaving){
//			bankManagerGui.DoExitBank();
		}
		atDest.release();
	}

	@Override
	public void msgAnimationFinishedLeaveBank() {
		//this.isActive=false;
		atDest.release();
	}

	@Override
	public void msgAtTellerPos() {
		atDest.release();

	}

	@Override
	public void msgAtManagerPos() {
		// TODO Auto-generated method stub
		atDest.release();
	}

	@Override
	public void msgAtLoanPos() {
		// TODO Auto-generated method stub
		atDest.release();
	}

	public void msgDoneAnimation(){
		atDest.release();
	}

	public void msgHereIsYourRentBill(Landlord l, Integer account, double rentBill) {
		Do("Receiving rent bill");
		clients.add(new MyClient((Landlord) l, account, rentBill));
		stateChanged();
	}

	@Override
	public boolean pickAndExecuteAnAction() {
		// TODO Auto-generated method stub

//		if(!isActive) {
//			return false;
//		}

		if(officers.size()==1 && officers.get(0).state==MyOfficerState.justArrived) {
			AddLoanOfficer();
			return true;
		}

		if(tellers.size()==1 && tellers.get(0).state==MyTellerState.justArrived) {
			AddTeller();
			return true;
		}

		if(!newJobs.isEmpty()){
			if(newJobs.get(0).state==MyCustomerState.loanjob){
				hireNewLoanOfficer();
			}
		}

		if(accountCheckCust!=null){
			accountCheckCust.msgBalance(accounts.get(checkAccount).balance);
			accountCheckCust=null;
			checkAccount=0;
			return true;
		}

		if(bankState==BankState.arriving) {
			goToDesk();
			return true;
		}

		if(hour>=myPerson.directory.get(myPerson.jobLocation).openHour  && bankState==BankState.newDay && officers.size()>=1 && tellers.size()>=1) {
			OpenBank();
			return true;
		}

		if(hour>=myPerson.directory.get(myPerson.jobLocation).closeHour  && bankState==BankState.open) {
			CloseBank();
			return true;
		}

		if(tellers.size()>1) {
			SwapTellers();
			return true;
		}

		if(officers.size()>1) {
			SwapLoanOfficers();
			return true;
		}

		if(!tellers.isEmpty() && tellers.get(0).needsAccount) {
			NewAccountForTeller();
			return true;
		}

		if(!tellers.isEmpty() && tellers.get(0).requested!=0) {
			CompleteTransaction();
			return true;
		}

		if(!officers.isEmpty() && officers.get(0).needsAccount) {
			NewAccountForOfficer();
			return true;
		}

		if(!officers.isEmpty() && officers.get(0).requested!=0) {
			CompleteLoan();
			return true;
		}

		/*if(!clients.isEmpty()) {
			TransferMoneyToLandlord();
			return true;
		}*/

		if(customers.size()>0 && (tellers.isEmpty() || officers.isEmpty())) {
			BankIsClosed();
			return true;
		}

		if(robber!=null&&tellers.get(0).state==MyTellerState.available){
				SendRobberToTeller(robber);
		}

		if(!tellers.isEmpty() && tellers.get(0).state==MyTellerState.available) {
			synchronized(customers) {
				for(MyCustomer cust: customers) {
					if (cust.state==MyCustomerState.transaction) {
						SendCustomerToTeller(cust);
						return true;
					}
				}
			}
		}

		if( !officers.isEmpty() && officers.get(0).state==MyOfficerState.available) {
			synchronized(customers) {
				for(MyCustomer cust: customers) {
					if (cust.state==MyCustomerState.loan) {
						SendCustomerToLoanOfficer(cust);
						return true;
					}
				}
			}
		}

		return false;
	}

	//actions

	private void OpenBank() {
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "Opening bank");
		Do("Opening bank");
		bankState=BankState.open;
	}
	private void SwapTellers() {
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "Switching out tellers");
		Do("Switching out tellers");
		bankmanagerGui.goToTellerPos();
		finishTask();
		tellers.get(0).emp.msgGoHome((hour-tellers.get(0).startHr)*employeePayPerHour);
		tellers.get(1).emp.msgGoToTellerPosition();
		tellers.get(1).startHr=hour;
		tellers.get(1).state=MyTellerState.available;
		tellers.remove(tellers.get(0));
		bankmanagerGui.goToManagerPos();
		finishTask();
	}

	private void SwapLoanOfficers() {
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "Switching out loan officers");
		Do("Switching out loan officers");
//		bankManagerGui.goToLoanPos();
//		finishTask();
		officers.get(0).emp.msgGoHome((hour-officers.get(0).startHr)*employeePayPerHour);
		officers.get(1).emp.msgGoToLoanOfficerPosition();
		officers.get(1).startHr=hour;
		officers.get(1).state=MyOfficerState.available;
		officers.remove(officers.get(0));
//		bankManagerGui.goToManagerPos();
//		finishTask();
	}

	private void hireNewLoanOfficer(){
		officers.get(0).emp.msgGoHome(50.0);
		PersonAgent newOfficer=newJobs.get(0).customer.getPerson();
		PersonAgent oldOfficer=officers.get(0).emp.getPerson();
		newOfficer.SetJob((Role) officers.get(0).emp, newOfficer.jobLocation, "Bank Loan Officer");
		oldOfficer.myJob=null;
		officers.get(0).myPerson=newOfficer;
	}

	private void AddTeller() {
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "Adding teller");
		Do("Adding teller");
		tellers.get(0).emp.msgGoToTellerPosition();
		tellers.get(0).state=MyTellerState.available;
		tellers.get(0).startHr=hour;
	}

	private void AddLoanOfficer() {
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "Adding loan officer");
		Do("Adding loan officer");
		officers.get(0).emp.msgGoToLoanOfficerPosition();
		officers.get(0).state=MyOfficerState.available;
		officers.get(0).startHr=hour;
	}

	private void SendCustomerToTeller(MyCustomer c) {
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "Telling customer to go to teller");
		Do("Telling customer to go to teller");
		tellers.get(0).state=MyTellerState.occupied;
		c.customer.msgGoToTeller(tellers.get(0).emp);
		customers.remove(c);
	}

	private void SendRobberToTeller(BankRobber R) {
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "Telling customer to go to teller");
		Do("Telling customer to go to teller");
		tellers.get(0).state=MyTellerState.occupied;
		R.msgGoToTeller(tellers.get(0).emp);
		robber=null;
	}

	private void SendCustomerToLoanOfficer(MyCustomer c) {
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "Telling customer to go to loan officer");
		Do("Telling customer to go to loan officer");
		officers.get(0).state=MyOfficerState.occupied;
		c.customer.msgGoToLoanOfficer(officers.get(0).emp);
		customers.remove(c);
	}

	/*private void TransferMoneyToLandlord() {
		Do("Transferring money");
		if (accounts.get(clients.get(0).AN).balance >= clients.get(0).bill) {
			accounts.get(clients.get(0).AN).balance -= clients.get(0).bill;
			clients.get(0).client.msgHereIsARentPayment(clients.get(0).AN, clients.get(0).bill);
		}
		else {
			clients.get(0).client.msgCannotPayForRent(clients.get(0).AN);
		}
		clients.remove(0);
	}*/

	private void BankIsClosed() {
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "Telling customer bank is closed");
		Do("Telling customer bank is closed");
//		System.out.println("bankisclosed");
		synchronized(customers) {
			for(MyCustomer c: customers) {
				c.customer.msgLeaveBank();
			}
		}
		customers.clear();
	}

	private void CloseBank() {
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "Closing bank");
		Do("Closing bank");
		bankState=BankState.closed;
		bankmanagerGui.goToLoanPos();
		finishTask();
		officers.get(0).emp.msgGoHome((hour-officers.get(0).startHr)*employeePayPerHour);
		officers.clear();
		bankmanagerGui.goToTellerPos();
		finishTask();
		tellers.get(0).emp.msgGoHome((hour-tellers.get(0).startHr)*employeePayPerHour);
		tellers.clear();
		bankmanagerGui.goToManagerPos();
		finishTask();
		bankmanagerGui.goToCorner();
		finishTask();
		bankmanagerGui.DoExitBank();
		finishTask();
		BankIsClosed();
		this.isActive = false;
	}

	private void NewAccountForTeller() {
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "Making new account");
		Do("Making new account");
		accounts.put(accounts.size()+1, new MyAccount(0,0));
		tellers.get(0).needsAccount=false;
		tellers.get(0).emp.msgAccountCreated(accounts.size());
	}

	private void NewAccountForOfficer() {
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "Making new account");
		Do("Making new account");
		accounts.put(accounts.size()+1, new MyAccount(0,0));
		officers.get(0).needsAccount=false;
		officers.get(0).emp.msgAccountCreated(accounts.size());
	}

	private void CompleteTransaction() {
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "Doing and completing transaction");
		Do("Doing and completing transaction");
		if(accounts.get(tellers.get(0).accountNum)==null) { // customer doesn't exist
//			tellers.get(0).msgAccountInexistant();
			Do("NO CUSTOMER");
			return;
		}
		if(tellers.get(0).requested<-1*(accounts.get(tellers.get(0).accountNum)).balance) {
			tellers.get(0).requested=-1*(accounts.get(tellers.get(0).accountNum).balance);
		}
		MyAccount update = accounts.get(tellers.get(0).accountNum);
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager","Account=$"+update.balance);
		Do("Account=$"+update.balance);
		update.balance+=tellers.get(0).requested;
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager","Account=$"+update.balance);
		Do("Account=$"+update.balance);
		vault-=tellers.get(0).requested;
		accounts.put(tellers.get(0).accountNum, update);
		tellers.get(0).emp.msgTransactionProcessed(tellers.get(0).requested);
		tellers.get(0).requested=0.0;
		tellers.get(0).accountNum=0;

	}

	private void CompleteLoan() {
		AlertLog.getInstance().logMessage(AlertTag.Bank, "BankManager", "Doing and completing loan");
		Do("Doing and completing loan");
//		System.err.println(accounts.get(officers.get(0).accountNum));
		if(accounts.get(officers.get(0).accountNum)==null) { //means account doesn't exist
			officers.get(0).emp.msgLoanDenied();
			officers.get(0).requested=0; //reset val
			return;
		}
		if(accounts.get(officers.get(0).accountNum).loan!=0.0) { // fix based on drews answer
			officers.get(0).emp.msgLoanDenied();
			officers.get(0).requested=0; //reset val
			return;
		}
		else {
			MyAccount update = accounts.get(officers.get(0).accountNum);
			update.loan=officers.get(0).requested;
			accounts.put(officers.get(0).accountNum, update);
			officers.get(0).emp.msgLoanComplete();
			vault-=officers.get(0).requested;
			officers.get(0).requested=0;
		}
	}

	//accessors for testing
	public List<MyLoanOfficer> getOfficer() {
		return officers;
	}

	public List<MyTeller> getTeller() {
		return tellers;
	}

	public List<MyCustomer> getCustomers() {
		return customers;
	}

	public Map<Integer, MyAccount> getAccounts() {
		return accounts;
	}

	public int getHour() {
		return hour;
	}

	public double getVault() {
		return vault;
	}

	public BankState getBankStatus() {
		return bankState;
	}

	public void setGui(BankManagerGui Bgui){
		bankmanagerGui = Bgui;
	}

	private void goToDesk(){
		if(bankmanagerGui == null) {
			bankmanagerGui = new BankManagerGui(this);
			//System.err.println(gui);
			//System.err.println(gui.myPanels);
			//System.err.println(gui.myPanels.get("Bank 1").panel);
			gui.myPanels.get("Bank "+instance).panel.addGui(bankmanagerGui);
		}
		bankmanagerGui.setPresent(true);
		bankmanagerGui.goToCorner();
		finishTask();
		bankmanagerGui.goToManagerPos();
		finishTask();
		bankState=BankState.newDay;
	}

	private void finishTask(){			//Semaphore to make waiter finish task before running scheduler
		try {
			atDest.acquire();
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	//classes

	public static class MyTeller {
		BankTeller emp;
		boolean needsAccount=false;
		int startHr=0;
		int accountNum = 0;
		double requested=0.0;
		public enum MyTellerState {justArrived, available, occupied};
		public MyTellerState state;

		public MyTeller (BankTeller p) {
			emp = p;
			state= MyTellerState.justArrived;
		}

	}

	public static class MyLoanOfficer {
		public PersonAgent myPerson;
		public BankLoanOfficer emp;
		boolean needsAccount=false;
		int startHr=0;
		int accountNum = 0;
		double requested=0.0;
		public enum MyOfficerState {justArrived, available, occupied};
		public MyOfficerState state;
		enum EmployeeType {LoanOfficer, Teller};
		EmployeeType type;

		public MyLoanOfficer (BankLoanOfficer p) {
			emp = p;
			state= MyOfficerState.justArrived;
		}

	}

	public static class MyCustomer {
		BankCustomer customer;
		public enum MyCustomerState {transaction, loan, loanjob, tellerJob};
		MyCustomerState state;

		public MyCustomer(BankCustomer b, MyCustomerState st) {
			state=st;
			customer = b;
		}

	}

	class MyClient {
		public MyClient(Landlord l, Integer account, double rentBill) {
			client = l;
			AN = account;
			bill = rentBill;
		}

		Landlord client;
		Integer AN;
		double bill;

	}

	public class MyAccount{

		public double balance;
		double loan;

		public MyAccount (double bal, double lo){
			balance=bal;
			loan=lo;
		}

		public double getBalance() {
			return balance;
		}

		public double getLoan() {
			return loan;
		}

		public void setBalance(double val) {
			balance = val;
		}

		public void setLoan(double val) {
			loan = val;
		}
	}

}


text:
<?php

use yii\bootstrap\Alert;
use yii\helpers\Url;
use yii\helpers\Html;
use yii\widgets\ListView;
use yii\web\View;
use yii\widgets\ActiveForm;

/**
 * @var \yii\web\View $this
 * @var \dektrium\user\models\Profile $profile
 */
if ($profile !== null) :
$js = <<<EOT
$('.menu-profile-options a').each(function(index, value) {
    if ($(this).prop("href") === window.location.href) {
        $(this).parent().addClass('active');
    }
});
EOT;
$this->registerJs($js);
$this->registerJsFile('@web/js/gifs.js', ['depends' => [\yii\web\JqueryAsset::className()], 'position' => View::POS_END]);
$this->registerJsFile('@web/js/votar.js', ['depends' => [\yii\web\JqueryAsset::className()], 'position' => View::POS_END]);
$this->registerJsFile('@web/js/follow.js', ['depends' => [\yii\web\JqueryAsset::className()], 'position' => View::POS_END]);
$this->registerJsFile('@web/js/back-to-top.js', ['depends' => [\yii\web\JqueryAsset::className()], 'position' => View::POS_END]);
$this->title = empty($profile->name) ? Html::encode($profile->user->username) : Html::encode($profile->name);
?>

        <button type="button" class="close">×</button>
        Tu mensaje ha sido enviado correctamente.

        <button type="button" class="close">×</button>

        <?php if ($suPerfil) : ?>

            <?= Html::img($profile->avatar . '?t=' . date('d-m-Y-H:i:s'), [
                'class' => 'img-thumbnail img-responsive',
                'alt' => $profile->user->username,
            ]) ?>

                Cambiar avatar
                <?php $form = ActiveForm::begin([
                    'enableClientValidation' => false,
                    ]) ?>
                    <?= $form->field($model, 'imageFile')->fileInput(['style' => 'visibility: hidden', 'label' => 'none', 'class' => 'uploadAvatar'])->label(false) ?>
                <?php ActiveForm::end() ?>

        <?php else : ?>

            <?= Html::img($profile->avatar . '?t=' . date('d-m-Y-H:i:s'), [
                'class' => 'img-thumbnail',
                'alt' => $profile->user->username,
            ]) ?>

        <?php endif; ?>

<?= $this->title ?>
            <?php if (!empty($profile->gender)) : ?>
                <?php if ($profile->gender == 'M') : ?>

                <?php else : ?>

                <?php endif; ?>
            <?php endif; ?>

                <?php if (!empty($profile->location)) : ?>

                         <?= Html::encode($profile->location) ?>

                <?php endif; ?>

            <?php if (!empty($profile->bio)) : ?>

<?= Html::encode($profile->bio) ?>

            <?php endif; ?>

                    <a href="<?= Url::to('/u/' . $profile->user->username . '/siguiendo') ?>">

<?= $numeroSiguiendo ?>

Siguiendo

                    <a href="<?= Url::to('/u/' . $profile->user->username . '/seguidores') ?>">

<?= $numeroSeguidores ?>

Seguidores

                <?php if (!Yii::$app->user->isGuest && !$suPerfil) : ?>
                    <?php if ($esSeguidor) : ?>
                        <a href="" class="btn btn-info btn-siguiendo" data-follow-id="<?= $profile->user->id ?>">Siguiendo
                        <a href="" class="btn btn-success btn-seguir btn-hide" data-follow-id="<?= $profile->user->id ?>">Seguir
                        <?= $this->render('_message', ['model'=>$messageForm, 'username' => $this->title, 'receptor_id' => $profile->user->id]) ?>
                    <?php else : ?>
                        <a href="" class="btn btn-info btn-siguiendo btn-hide" data-follow-id="<?= $profile->user->id ?>">Siguiendo
                        <a href="" class="btn btn-success btn-seguir" data-follow-id="<?= $profile->user->id ?>">Seguir
                        <?= $this->render('_message', ['model'=>$messageForm, 'username' => $this->title, 'receptor_id' => $profile->user->id]) ?>
                    <?php endif; ?>
                <?php endif; ?>

<?= Html::a('PUBLICADOS', ['/u/' . $profile->user->username . '/posts']) ?>

<?= Html::a('VOTADOS', ['/u/' . $profile->user->username . '/votados']) ?>

<?= Html::a('COMENTADOS', ['/u/' . $profile->user->username . '/comentarios']) ?>

        <?= ListView::widget([
            'dataProvider' => $dataProvider,
            'itemOptions' => ['class' => 'item'],
            'itemView' => '../../posts/_view-comentarios.php',
            'layout' => "{items}\n{pager}",
            'viewParams' => [
                'profile' => $profile,
            ],
        ]) ?>

<?php else : ?>

    <?php
    if (Yii::$app->session->getFlash('nouser')) {
        $url = Url::to(['/'], true);

        echo Alert::widget([
            'options' => ['class' => 'alert-info'],
            'body' => Yii::$app->session->getFlash('nouser'),
        ]);

        \Yii::$app->view->registerMetaTag([
        'http-equiv' => 'refresh',
        'content' => "5;url={$url}"
    ]);
    } ?>

<?php endif; ?>


text:
class CreateUsers < ActiveRecord::Migration
  def change
    create_table :users do |t|
      t.string    :email,               null: false

      t.string    :crypted_password,    null: false
      t.string    :password_salt,       null: false
      t.string    :persistence_token,   null: false
      t.string    :perishable_token,    null: false

      # Magic columns, just like ActiveRecord's created_at and updated_at.
      # These are automatically maintained by Authlogic if they are present.
      t.integer   :login_count,         null: false, default: 0
      t.integer   :failed_login_count,  null: false, default: 0
      t.datetime  :last_request_at
      t.datetime  :current_login_at
      t.datetime  :last_login_at
      t.string    :current_login_ip
      t.string    :last_login_ip

      t.timestamps
    end
  end
end


text:
title: 'Flowers, Floats and Walks'
description: >-
  Flowers Floats and Walks was a 2018 project involving hundreds of people from
  Grantham and South Lincolnshire who created flower installations and took part
  in processions and walks,  as part of the Gravity Fields Festival 2018 and was
  supported by a National Lottery grant from the Big Lottery Fund.
project_date: 2018-06-01 00:00:00
project_to_date: 2018-09-30 00:00:00
list: true
highlight: false
past: false
main_image_path: /uploads/flower IMG_6451.JPG
video_embed:
images:
  - image_path: /uploads/flower IMG_6456.JPG
    description:
  - image_path: /uploads/blind-society-2-1.JPG
    description: >-
      Floral display created during a craft session with the Grantham Blind
      Society.
  - image_path: /uploads/img-6183.JPG
    description: >-
      Floral display showcasing one of the three trips by Sir Joseph Banks at
      Grantham museum during Gravity Fields Festival 2018.
  - image_path: /uploads/flower 069A4523.JPG
    description: One of the procession walks set on its way by TV presenter Dallas Campbell
  - image_path: /uploads/flower - IMG_6331.JPG
    description:
  - image_path: /uploads/img-6445-1.JPG
    description:
  - image_path: /uploads/flower 069A4518.JPG
    description:
  - image_path: /uploads/gravity-fields-94.jpg
    description:
  - image_path: /uploads/flower Gravity Fields-42.jpg
    description:
  - image_path: /uploads/flower 069A4518.JPG
    description:
  - image_path: /uploads/flower 069A4522.JPG
    description:
  - image_path: /uploads/flower IMG_6476.JPG
    description:
  - image_path: /uploads/iris IMG_6112.jpg
    description:
  - image_path: /uploads/wyndham _1190170996.jpg
    description:
  - image_path: /uploads/warehouse IMG_6330.jpg
    description:
  - image_path: /uploads/display IMG_6431.jpg
    description:
  - image_path: /uploads/CU white IMG_6452.jpg
    description:
  - image_path: /uploads/CU green IMG_6471.jpg
    description:
  - image_path: /uploads/big lottery blue-small.jpg
    description:
---

Flowers, Floats and Walks offered community participants, working with local and national artists, the opportunity to learn new skills based on craft work with artificial and real flowers and plants.  Through community sessions with adult community volunteers and college and school students, installations of flower were created. From June to September 2018 this project enabled over 500 members of the community in and around Grantham, Lincolnshire, to take part in a nature-themed creative and healthy activity.

![](/uploads/flower-20.jpg)

Many of the installations were on hand-pulled carts – 'floats' - with floral designs which took part in the large scale outdoor event. Community groups walked with their hand floats through Grantham town centre and displayed their floats as part of the outdoor event.

![](/uploads/flower IMG_6435.JPG)

Other static installations were created at the newly refurbished Wyndham Park boating pool working with a group of Wyndham Park volunteers.

![](/uploads/wyndham _1190170996.jpg)

Further volunteers created an indoor flower exhibition at Grantham Museum themed on the voyages of Sir Joseph Banks, the Lincolnshire botanist who sailed on the HMS Endeavour with Captain Cook.  Each arrangement featured a different landing stage of the voyage to Australia.

![](/uploads/flower IMG_6160.JPG)

Other walkers took part in walks as part of the wider festival activity.

![](/uploads/colsterworth-img-0124.jpg)

Craft sessions for adult volunteers were held at Grantham Guildhall Arts Centre  and at Wyndham Park, and numerous further sessions with schools and College groups, special sessions with the Grantham Blind Society, and flower arranging took place at Grantham Museum.  The volunteers, students and school children then walked with their flower installations across the town of Grantham as part of the Gravity Fields Festival outdoor events.  Museum volunteers were on hand with refreshments to reward schools and students who walked with their hand-drawn floats across the town centre.

Further walks took place as part of the wider festival activity in and around the National Trust's Woolsthorpe Manor and the neighbouring village of Colsterworth.

Flowers, Floats and Walks was supported by the National Lottery through a Big Lottery Fund grant.


text:
/**
@module ember
*/

import type { Registry } from '@ember/-internals/container';
import type { RegistryProxy } from '@ember/-internals/owner';
import type { AnyFn } from '@ember/-internals/utils/types';

import { assert } from '@ember/debug';
import Mixin from '@ember/object/mixin';

/**
  RegistryProxyMixin is used to provide public access to specific
  registry functionality.

  @class RegistryProxyMixin
  @extends RegistryProxy
  @private
*/
interface RegistryProxyMixin extends RegistryProxy {
  /** @internal */
  __registry__: Registry;
}
const RegistryProxyMixin = Mixin.create({
  __registry__: null,

  resolveRegistration(fullName: string) {
    assert('fullName must be a proper full name', this.__registry__.isValidFullName(fullName));
    return this.__registry__.resolve(fullName);
  },

  register: registryAlias('register'),
  unregister: registryAlias('unregister'),
  hasRegistration: registryAlias('has'),
  registeredOption: registryAlias('getOption'),
  registerOptions: registryAlias('options'),
  registeredOptions: registryAlias('getOptions'),
  registerOptionsForType: registryAlias('optionsForType'),
  registeredOptionsForType: registryAlias('getOptionsForType'),

  /**
    Define a dependency injection onto a specific factory or all factories
    of a type.

    When Ember instantiates a controller, view, or other framework component
    it can attach a dependency to that component. This is often used to
    provide services to a set of framework components.

    An example of providing a session object to all controllers:

    ```javascript
    import { alias } from '@ember/object/computed';
    import Application from '@ember/application';
    import Controller from '@ember/controller';
    import EmberObject from '@ember/object';

    let App = Application.create();
    let Session = EmberObject.extend({ isAuthenticated: false });

    // A factory must be registered before it can be injected
    App.register('session:main', Session);

    // Inject 'session:main' onto all factories of the type 'controller'
    // with the name 'session'
    App.inject('controller', 'session', 'session:main');

    App.IndexController = Controller.extend({
      isLoggedIn: alias('session.isAuthenticated')
    });
    ```

    Injections can also be performed on specific factories.

    ```javascript
    App.inject(<full_name or type>, <property name>, <full_name>)
    App.inject('route', 'source', 'source:main')
    App.inject('route:application', 'email', 'model:email')
    ```

    It is important to note that injections can only be performed on
    classes that are instantiated by Ember itself. Instantiating a class
    directly (via `create` or `new`) bypasses the dependency injection
    system.

    @public
    @method inject
    @param  factoryNameOrType {String}
    @param  property {String}
    @param  injectionName {String}
    @deprecated
  **/
  inject: registryAlias('injection'),
});

type AliasMethods =
  | 'register'
  | 'unregister'
  | 'has'
  | 'getOption'
  | 'options'
  | 'getOptions'
  | 'optionsForType'
  | 'getOptionsForType'
  | 'injection';

function registryAlias<N extends AliasMethods>(name: N) {
  return function (this: RegistryProxyMixin, ...args: Parameters<Registry[N]>) {
    // We need this cast because `Parameters` is deferred so that it is not
    // possible for TS to see it will always produce the right type. However,
    // since `AnyFn` has a rest type, it is allowed. See discussion on [this
    // issue](https://github.com/microsoft/TypeScript/issues/47615).
    return (this.__registry__[name] as AnyFn)(...args);
  };
}

export default RegistryProxyMixin;


text:
package com.ecommerce.tools.cryptography.impl;

import com.ecommerce.tools.cryptography.PasswordEncoderGenerator;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Component;

@Component
public class PasswordEncoderGeneratorImpl implements PasswordEncoderGenerator {

	private final BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder(8);

	public PasswordEncoderGeneratorImpl() {
		super();
	}

	public String encodePassword(String password) {
		String encodedPassword = password;
		int i = 0;
		while (i < 12) {
			encodedPassword = passwordEncoder.encode(password);
			++i;
		}

		return encodedPassword;
	}

	public boolean passwordMatches(CharSequence rawPassword, String encodedPassword) {

		return passwordEncoder.matches(rawPassword, encodedPassword);
	}

}


text:
"""Select starting configs for each US window"""

import argparse
import pdb
import sys
import random
import copy

from origamipy.op_process import read_ops_from_file
from origamipy.op_process import sort_by_ops
from origamipy.origami_io import *
from origamipy.us_process import create_win_filename
from origamipy.us_process import read_windows_file
from origamipy.us_process import select_config_by_op_in_win

def main():
    parser = argparse.ArgumentParser()
    parser.add_argument(
            'system_file',
            type=str,
            help='System file')
    parser.add_argument(
            'win_file',
            type=str,
            help='Windows file')
    parser.add_argument(
            'sim_filebase',
            type=str,
            help='Filebase of simulation to select configs from')
    parser.add_argument(
            'out_filebase',
            type=str,
            help='Filebase of starting config trj files')
    parser.add_argument(
            'ext',
            type=str,
            help='Starting config trj file extension')

    args = parser.parse_args()
    system_filename = args.system_file
    wins_filename = args.win_file
    sim_filebase = args.sim_filebase
    out_filebase = args.out_filebase
    ext = args.ext

    traj_file = PlainTextTrajFile(sim_filebase + '.trj', system_filename)
    tags, wins = read_windows_file(wins_filename)
    ops = read_ops_from_file(sim_filebase + '.ops', tags, 0)
    op_to_config = sort_by_ops(ops, tags)
    for i, win in enumerate(wins):
        config = select_config_by_op_in_win(i, win, ops, op_to_config)
        win_filename = create_win_filename(win, out_filebase, ext)
        config_file = PlainTextTrajOutFile(win_filename)
        config_file.write_config(traj_file.chains(config), 0)

if __name__ == '__main__':
    main()


text:
#include "arm_compute/core/Types.h"
#include "src/gpu/cl/kernels/ClCol2ImKernel.h"
#include "tests/CL/CLAccessor.h"
#include "tests/CL/Helper.h"
#include "tests/framework/Asserts.h"
#include "tests/framework/Macros.h"
#include "tests/framework/datasets/Datasets.h"
#include "tests/validation/Validation.h"
#include "tests/validation/fixtures/Col2ImFixture.h"

namespace arm_compute
{
namespace test
{
namespace validation
{
TEST_SUITE(CL)
TEST_SUITE(Col2Im)

using ClCol2Im = ClSynthetizeOperatorWithBorder<opencl::kernels::ClCol2ImKernel>;

/** Negative tests
 *
 * A series of validation tests on configurations which according to the API specification
 * the function should fail against.
 *
 * Checks performed in order:
 *     - Pass unsupported data type for input
 *     - Pass NHWC as output data layout
 *     - Pass an invalid output shape
 */
TEST_CASE(Negative, framework::DatasetMode::ALL)
{
    // Unsupported data type
    {
        const auto input     = TensorInfo(TensorShape(10U, 12U, 1U, 2U), 1, DataType::SIZET);
        const auto output    = TensorInfo(TensorShape(3U, 4U, 10U, 1U, 2U), 1, DataType::F32);
        const auto conv_size = Size2D(3, 4);
        const auto status    = opencl::kernels::ClCol2ImKernel::validate(&input, &output, conv_size);
        ARM_COMPUTE_EXPECT(bool(status) == false, framework::LogLevel::ERRORS);
    }

    // NHWC as output data layout
    {
        const auto input     = TensorInfo(TensorShape(10U, 12U, 1U, 2U), 1, DataType::F32);
        const auto output    = TensorInfo(TensorShape(3U, 4U, 10U, 1U, 2U), 1, DataType::F32, DataLayout::NHWC);
        const auto conv_size = Size2D(3, 4);
        const auto status    = opencl::kernels::ClCol2ImKernel::validate(&input, &output, conv_size);
        ARM_COMPUTE_EXPECT(bool(status) == false, framework::LogLevel::ERRORS);
    }

    // Invalid output size
    {
        const auto input     = TensorInfo(TensorShape(10U, 12U, 1U, 2U), 1, DataType::F32);
        const auto output    = TensorInfo(TensorShape(3U, 4U, 10U, 2U, 2U), 1, DataType::F32);
        const auto conv_size = Size2D(3, 4);
        const auto status    = opencl::kernels::ClCol2ImKernel::validate(&input, &output, conv_size);
        ARM_COMPUTE_EXPECT(bool(status) == false, framework::LogLevel::ERRORS);
    }
}

template <typename T>
using ClCol2ImFixture = Col2ImOpValidationFixture<CLTensor, CLAccessor, ClCol2Im, T, true>;

/** Test kernel for single-precision floating point
 *
 * @note 8 elements processed per iteration
 *
 * Three main tests will be run:
 *  - Channels are multiple of elements processed
 *  - Channels larger and non multiple of elements used
 *  - Channels smaller and not multiple of elements used
 *
 *  The above will be repeated with a different group size
 *
 *  Kernel tested col2im
 */
FIXTURE_DATA_TEST_CASE(FP32,
                       ClCol2ImFixture<float>,
                       framework::DatasetMode::ALL,
                       combine(combine(combine(combine(
                                                   framework::dataset::make("InputShape", { TensorShape(8U, 16U, 3U, 1U), TensorShape(17U, 16U, 3U, 1U), TensorShape(7U, 16U, 3U, 1U) }),
                                                   framework::dataset::make("ConvolvedWidth", 4)),
                                               framework::dataset::make("ConvolvedHeight", 4)),
                                       framework::dataset::make("Groups", { 1, 3 })),
                               framework::dataset::make("DataType", DataType::F32)))
{
    // Validate output
    validate(CLAccessor(_target), _reference);
}

/** Test kernel for half-precision floating point
 *
 * @note 8 elements processed per iteration
 *
 * One main tests will be run:
 *  - Channels larger and non multiple of elements used
 *
 *  We just need to test the difference in the data type size.
 *  Any other issues can be identified by the main FP32 tests
 *
 *  Kernel tested col2im
 */
FIXTURE_DATA_TEST_CASE(F16,
                       ClCol2ImFixture<half>,
                       framework::DatasetMode::ALL,
                       combine(combine(combine(combine(
                                                   framework::dataset::make("InputShape", TensorShape(17U, 16U, 3U, 1U)),
                                                   framework::dataset::make("ConvolvedWidth", 4)),
                                               framework::dataset::make("ConvolvedHeight", 4)),
                                       framework::dataset::make("Groups", 3)),
                               framework::dataset::make("DataType", DataType::F16)))
{
    // Validate output
    validate(CLAccessor(_target), _reference);
}

/** Test kernel for unsigned asymmetric quantized type
 *
 * @note 8 elements processed per iteration
 *
 * One main tests will be run:
 *  - Channels larger and non multiple of elements used
 *
 *  We just need to test the difference in the data type size.
 *  Any other issues can be identified by the main FP32 tests
 *
 *  Kernel tested col2im
 */
FIXTURE_DATA_TEST_CASE(QASYMM8,
                       ClCol2ImFixture<uint8_t>,
                       framework::DatasetMode::ALL,
                       combine(combine(combine(combine(
                                                   framework::dataset::make("InputShape", TensorShape(17U, 16U, 3U, 1U)),
                                                   framework::dataset::make("ConvolvedWidth", 4)),
                                               framework::dataset::make("ConvolvedHeight", 4)),
                                       framework::dataset::make("Groups", 3)),
                               framework::dataset::make("DataType", DataType::QASYMM8)))
{
    // Validate output
    validate(CLAccessor(_target), _reference);
}

TEST_SUITE_END() // CL
TEST_SUITE_END() // Col2Im
} // namespace validation
} // namespace test
} // namespace arm_compute


text:
package algorithm

//LRU Cache
//author:Xiong Chuan Liang
//date:2015-2-3
//"github.com/xcltapestry/xclpkg/algorithm"

import (
	"container/list"
	"errors"
)

type CacheNode struct {
	Key,Value interface{}
}

func (cnode *CacheNode)NewCacheNode(k,v interface{})*CacheNode{
	return &CacheNode{k,v}
}

type LRUCache struct {
	Capacity int
	dlist *list.List
	cacheMap map[interface{}]*list.Element
}

func NewLRUCache(cap int)(*LRUCache){
	return &LRUCache{
				Capacity:cap,
				dlist: list.New(),
				cacheMap: make(map[interface{}]*list.Element)}
}

func (lru *LRUCache)Size()(int){
	return lru.dlist.Len()
}

func (lru *LRUCache)Set(k,v interface{})(error){

	if lru.dlist == nil {
		return errors.New("LRUCache结构体未初始化.")
	}

	if pElement,ok := lru.cacheMap[k]; ok {
		lru.dlist.MoveToFront(pElement)
		pElement.Value.(*CacheNode).Value = v
		return nil
	}

	newElement := lru.dlist.PushFront( &CacheNode{k,v} )
	lru.cacheMap[k] = newElement

	if lru.dlist.Len() > lru.Capacity {
		//移掉最后一个
		lastElement := lru.dlist.Back()
		if lastElement == nil {
			return nil
		}
		cacheNode := lastElement.Value.(*CacheNode)
		delete(lru.cacheMap,cacheNode.Key)
		lru.dlist.Remove(lastElement)
	}
	return nil
}

func (lru *LRUCache)Get(k interface{})(v interface{},ret bool,err error){

	if lru.cacheMap == nil {
		return v,false,errors.New("LRUCache结构体未初始化.")
	}

	if pElement,ok := lru.cacheMap[k]; ok {
		lru.dlist.MoveToFront(pElement)
		return pElement.Value.(*CacheNode).Value,true,nil
	}
	return v,false,nil
}

func (lru *LRUCache)Remove(k interface{})(bool){

	if lru.cacheMap == nil {
		return false
	}

	if pElement,ok := lru.cacheMap[k]; ok {
		cacheNode := pElement.Value.(*CacheNode)
		delete(lru.cacheMap,cacheNode.Key)
		lru.dlist.Remove(pElement)
		return true
	}
	return false
}


text:
#ifndef	_LINK_H
# error "Never include <bits/link.h> directly; use <link.h> instead."
#endif

#define __need_int_reg_t
#include <arch/abi.h>

/* Registers for entry into PLT.  */
typedef struct La_tile_regs
{
  __uint_reg_t lr_reg[10];
} La_tile_regs;

/* Return values for calls from PLT.  */
typedef struct La_tile_retval
{
  /* Up to ten registers can be used for a return value (e.g. small struct). */
  __uint_reg_t lrv_reg[10];
} La_tile_retval;

__BEGIN_DECLS

extern ElfW(Addr) la_tile_gnu_pltenter (ElfW(Sym) *__sym, unsigned int __ndx,
                                        uintptr_t *__refcook,
                                        uintptr_t *__defcook,
                                        La_tile_regs *__regs,
                                        unsigned int *__flags,
                                        const char *__symname,
                                        long int *__framesizep);
extern unsigned int la_tile_gnu_pltexit (ElfW(Sym) *__sym, unsigned int __ndx,
                                         uintptr_t *__refcook,
                                         uintptr_t *__defcook,
                                         const La_tile_regs *__inregs,
                                         La_tile_retval *__outregs,
                                         const char *__symname);

__END_DECLS


text:
/*global QUnit*/
jQuery.sap.require("sap.ui.layout.changeHandler.AddSimpleFormGroup");
jQuery.sap.require("sap.ui.layout.form.SimpleForm");
jQuery.sap.require("sap.ui.layout.form.FormElement");
jQuery.sap.require("sap.ui.layout.form.FormContainer");
jQuery.sap.require("sap.ui.fl.Change");
jQuery.sap.require("sap.ui.fl.changeHandler.JsControlTreeModifier");
jQuery.sap.require("sap.ui.fl.changeHandler.XmlTreeModifier");

(function () {
	"use strict";

	QUnit.module("using sap.ui.layout.changeHandler.AddSimpleFormGroup on simpleform with title and having old index", {
		beforeEach: function () {

			this.oTitle0 = new sap.ui.core.Title({id: "Title0", text: "Title 0"});
			this.oLabel0 = new sap.m.Label({id: "Label0", text: "Label 0", visible: true});
			this.oLabel1 = new sap.m.Label({id: "Label1", text: "Label 1"});
			this.oInput0 = new sap.m.Input({id: "Input0", visible: true});
			this.oInput1 = new sap.m.Input({id: "Input1"});
			this.oSimpleForm = new sap.ui.layout.form.SimpleForm({
				id: "SimpleForm", title: "Simple Form",
				content: [this.oTitle0, this.oLabel0, this.oInput0, this.oLabel1, this.oInput1]
			});
			this.oSimpleForm.placeAt("content");
			sap.ui.getCore().applyChanges();

			var mCommonChangeData = {
				"selector": {
					"id": "SimpleForm"
				},
				"content": {
					"group": {

					}
				},
				"texts": {
					"groupLabel": {
						"value": "New Control"
					}
				},
				"changeType": "addSimpleFormGroup"
			};

			var oLegacyChange = jQuery.extend(true, {}, mCommonChangeData);
			oLegacyChange.content.group = {
				"id": "newId",
				"index": 5
			};
			this.oLegacyChangeWrapper = new sap.ui.fl.Change(oLegacyChange);

			var oChangeWithLocalIds = jQuery.extend(true, {}, mCommonChangeData);
			oChangeWithLocalIds.content.group = {
				"selector": {
					"id": "newId",
					"idIsLocal": true
				},
				"index": 5
			};
			this.oChangeWithLocalIdsWrapper = new sap.ui.fl.Change(oChangeWithLocalIds);

			var oChangeWithGlobalIds = jQuery.extend(true, {}, mCommonChangeData);
			oChangeWithGlobalIds.content.group = {
				"selector": {
					"id": "newId",
					"idIsLocal": false
				},
				"index": 5
			};
			this.oChangeWithGlobalIdsWrapper = new sap.ui.fl.Change(oChangeWithGlobalIds);

			this.oMockedComponent = {
				createId: function (sString) {
					return "component---" + sString;
				},
				getLocalId: function (sString) {
					return sString;
				}
			};

			this.mPropertyBag = {
				appComponent: this.oMockedComponent,
				modifier: sap.ui.fl.changeHandler.JsControlTreeModifier
			};

			this.oChangeHandler = sap.ui.layout.changeHandler.AddSimpleFormGroup;
			this.oXmlTreeModifier = sap.ui.fl.changeHandler.XmlTreeModifier;
		},

		afterEach: function () {
			this.oSimpleForm.destroy();
		}
	});

	function _testApplyChangeWithJsControlTreeModifier (oChange, sExpectedId, iIndex, assert){
		assert.ok(this.oChangeHandler.applyChange(oChange, this.oSimpleForm, this.mPropertyBag), "no errors occur");
		assert.equal(this.oSimpleForm.getContent()[iIndex].getId(), sExpectedId, "the FormContainer has the correct id");
		assert.equal(this.oSimpleForm.getContent()[iIndex].getText(), "New Control", "the FormContainer is added");
	}

	function _testApplyChangeWithXMLTreeModifier (oXmlString, oChange, sExpectedId, iIndex, assert){
		var oDOMParser = new DOMParser();
		this.oXmlDocument = oDOMParser.parseFromString(oXmlString, "application/xml");

		this.oXmlSimpleForm = this.oXmlDocument.childNodes[0].childNodes[0];

		assert.ok(this.oChangeHandler.applyChange(this.oLegacyChangeWrapper, this.oXmlSimpleForm, {
			modifier: this.oXmlTreeModifier,
			view: this.oXmlDocument
		}), "no errors occur");
		this.testControl = this.oXmlSimpleForm.childNodes[0].childNodes[iIndex];
		assert.equal(this.testControl.getAttribute("text"), "New Control", "the FormContainer is added");
	}

	QUnit.test("when calling applyChange with JsControlTreeModifier and a legacy change", function (assert) {
		_testApplyChangeWithJsControlTreeModifier.call(this, this.oLegacyChangeWrapper, "newId", 5, assert);
	});

	QUnit.test("when calling applyChange with JsControlTreeModifier with a change containing local ids", function (assert) {
		_testApplyChangeWithJsControlTreeModifier.call(this, this.oChangeWithLocalIdsWrapper, "component---newId", 5, assert);
	});

	QUnit.test("when calling applyChange with JsControlTreeModifier with a change containing global ids", function (assert) {
		_testApplyChangeWithJsControlTreeModifier.call(this, this.oChangeWithGlobalIdsWrapper, "newId", 5, assert);
	});

	QUnit.test("when calling applyChange with XmlTreeModifier", function (assert) {
		var oXmlString =
			"<mvc:View xmlns:mvc='sap.ui.core.mvc' xmlns:layout='sap.ui.layout' xmlns='sap.m'>" +
			"<layout:SimpleForm id='SimpleForm' editable='true' title='Simple Form' class='editableForm'>" +
			"<layout:content>" +
			"<Title id='Title0' text='Title 0' visible='true' />" +
			"<Label id='Label0' text='Label 0' visible='true' />" +
			"<Input id='Input0' visible='true' />" +
			"<Label id='Label1' text='Label 1' visible='true' />" +
			"<Input id='Input1' visible='true' />" +
			"</layout:content>" +
			"</layout:SimpleForm>" +
			"</mvc:View>";

		_testApplyChangeWithXMLTreeModifier.call(this, oXmlString, this.oLegacyChangeWrapper, "New Control", 5, assert);
	});

	QUnit.module("using sap.ui.layout.changeHandler.AddSimpleFormGroup on simpleform without title and having old index", {
		beforeEach: function () {

			this.oLabel0 = new sap.m.Label({id: "Label0", text: "Label 0", visible: true});
			this.oLabel1 = new sap.m.Label({id: "Label1", text: "Label 1"});
			this.oInput0 = new sap.m.Input({id: "Input0", visible: true});
			this.oInput1 = new sap.m.Input({id: "Input1"});
			this.oSimpleForm = new sap.ui.layout.form.SimpleForm({
				id: "SimpleForm", title: "Simple Form",
				content: [this.oLabel0, this.oInput0, this.oLabel1, this.oInput1]
			});
			this.oSimpleForm.placeAt("content");
			sap.ui.getCore().applyChanges();

			var mCommonChangeData = {
				"selector": {
					"id": "SimpleForm"
				},
				"content": {
					"group": {

					}
				},
				"texts": {
					"groupLabel": {
						"value": "New Control"
					}
				},
				"changeType": "addSimpleFormGroup"
			};

			var oLegacyChange = jQuery.extend(true, {}, mCommonChangeData);
			oLegacyChange.content.group = {
				"id": "newId",
				"index": 0
			};
			this.oLegacyChangeWrapper = new sap.ui.fl.Change(oLegacyChange);

			var oChangeWithLocalIds = jQuery.extend(true, {}, mCommonChangeData);
			oChangeWithLocalIds.content.group = {
				"selector": {
					"id": "newId",
					"idIsLocal": true
				},
				"index": 0
			};
			this.oChangeWithLocalIdsWrapper = new sap.ui.fl.Change(oChangeWithLocalIds);

			var oChangeWithGlobalIds = jQuery.extend(true, {}, mCommonChangeData);
			oChangeWithGlobalIds.content.group = {
				"selector": {
					"id": "newId",
					"idIsLocal": false
				},
				"index": 0
			};
			this.oChangeWithGlobalIdsWrapper = new sap.ui.fl.Change(oChangeWithGlobalIds);

			this.oMockedComponent = {
				createId: function (sString) {
					return "component---" + sString;
				},
				getLocalId: function (sString) {
					return sString;
				}
			};

			this.mPropertyBag = {
				appComponent: this.oMockedComponent,
				modifier: sap.ui.fl.changeHandler.JsControlTreeModifier
			};

			this.oChangeHandler = sap.ui.layout.changeHandler.AddSimpleFormGroup;
			this.oXmlTreeModifier = sap.ui.fl.changeHandler.XmlTreeModifier;
		},

		afterEach: function () {
			this.oSimpleForm.destroy();
		}
	});

	QUnit.test("when calling applyChange with JsControlTreeModifier and a legacy change", function (assert) {
		_testApplyChangeWithJsControlTreeModifier.call(this, this.oLegacyChangeWrapper, "newId", 0, assert);
	});

	QUnit.test("when calling applyChange with JsControlTreeModifier with a change containing local ids", function (assert) {
		_testApplyChangeWithJsControlTreeModifier.call(this, this.oChangeWithLocalIdsWrapper, "component---newId", 0, assert);
	});

	QUnit.test("when calling applyChange with JsControlTreeModifier with a change containing global ids", function (assert) {
		_testApplyChangeWithJsControlTreeModifier.call(this, this.oChangeWithGlobalIdsWrapper, "newId", 0, assert);
	});

	QUnit.test("when calling applyChange with XmlTreeModifier", function (assert) {
		var oXmlString =
			"<mvc:View xmlns:mvc='sap.ui.core.mvc' xmlns:layout='sap.ui.layout' xmlns='sap.m'>" +
			"<layout:SimpleForm id='SimpleForm' editable='true' title='Simple Form' class='editableForm'>" +
			"<layout:content>" +
			"<Label id='Label0' text='Label 0' visible='true' />" +
			"<Input id='Input0' visible='true' />" +
			"<Label id='Label1' text='Label 1' visible='true' />" +
			"<Input id='Input1' visible='true' />" +
			"</layout:content>" +
			"</layout:SimpleForm>" +
			"</mvc:View>";

		_testApplyChangeWithXMLTreeModifier.call(this, oXmlString, this.oLegacyChangeWrapper, "New Control", 0, assert);
	});

	QUnit.test("applyChange shall raise an exception if the control does not have the required methods", function (assert) {
		var exception, oControl;

		oControl = {};

		//Call CUT
		try {
			this.oChangeHandler.applyChange(this.oLegacyChangeWrapper, oControl, {modifier: this.JsControlTreeModifier});
		} catch (ex) {
			exception = ex;
		}
		assert.ok(exception, "Shall raise an exception");
	});

	QUnit.test('when calling completeChangeContent with relative index', function (assert) {
		var oChange = {
			"selector": {
				"id": "SimpleForm"
			},
			"changeType": "addSimpleFormGroup",
			"content": {}
		};
		var oChangeWrapper = new sap.ui.fl.Change(oChange);
		var oSpecificChangeInfo = {index: 5, newControlId: "newId", newLabel: "New Control"};

		this.oChangeHandler.completeChangeContent(oChangeWrapper, oSpecificChangeInfo, this.mPropertyBag);

		assert.equal(oChange.content.group.selector.id, "newId", "newControlId has been added to the change");
		assert.equal(oChange.content.group.relativeIndex, 5, "index has been added to the change");
		assert.equal(oChange.texts.groupLabel.value, "New Control", "groupLabel has been added to the change");
	});

	QUnit.test('when calling completeChangeContent with incomplete specificChangeInfo', function (assert) {
		var oChangeWrapper = new sap.ui.fl.Change({
			"selector": {
				"id": "SimpleForm"
			},
			"changeType": "addSimpleFormGroup",
			"content": {}
		});

		assert.throws(function () {
				this.oChangeHandler.completeChangeContent(oChangeWrapper, this.oSimpleForm, this.mPropertyBag);
			},
			new Error("oSpecificChangeInfo.newLabel attribute required"),
			"the undefined value raises an error message"
		);
	});

	QUnit.module("using sap.ui.layout.changeHandler.AddSimpleFormGroup on simpleform with title and having relative index", {
		beforeEach: function () {
			this.oTitle0 = new sap.ui.core.Title({id: "Title0", text: "Title 0"});
			this.oLabel0 = new sap.m.Label({id: "Label0", text: "Label 0", visible: true});
			this.oLabel1 = new sap.m.Label({id: "Label1", text: "Label 1"});
			this.oInput0 = new sap.m.Input({id: "Input0", visible: true});
			this.oInput1 = new sap.m.Input({id: "Input1"});
			this.oSimpleForm = new sap.ui.layout.form.SimpleForm({
				id: "SimpleForm", title: "Simple Form",
				content: [this.oTitle0, this.oLabel0, this.oInput0, this.oLabel1, this.oInput1]
			});
			this.oSimpleForm.placeAt("content");
			sap.ui.getCore().applyChanges();

			var mCommonChangeData = {
				"selector": {
					"id": "SimpleForm"
				},
				"content": {
					"group": {

					}
				},
				"texts": {
					"groupLabel": {
						"value": "New Control"
					}
				},
				"changeType": "addSimpleFormGroup"
			};

			var oLegacyChange = jQuery.extend(true, {}, mCommonChangeData);
			oLegacyChange.content.group = {
				"id": "newId",
				"relativeIndex": 1
			};
			this.oLegacyChangeWrapper = new sap.ui.fl.Change(oLegacyChange);

			var oChangeWithLocalIds = jQuery.extend(true, {}, mCommonChangeData);
			oChangeWithLocalIds.content.group = {
				"selector": {
					"id": "newId",
					"idIsLocal": true
				},
				"relativeIndex": 1
			};
			this.oChangeWithLocalIdsWrapper = new sap.ui.fl.Change(oChangeWithLocalIds);

			var oChangeWithGlobalIds = jQuery.extend(true, {}, mCommonChangeData);
			oChangeWithGlobalIds.content.group = {
				"selector": {
					"id": "newId",
					"idIsLocal": false
				},
				"relativeIndex": 1
			};
			this.oChangeWithGlobalIdsWrapper = new sap.ui.fl.Change(oChangeWithGlobalIds);

			this.oMockedComponent = {
				createId: function (sString) {
					return "component---" + sString;
				},
				getLocalId: function (sString) {
					return sString;
				}
			};

			this.mPropertyBag = {
				appComponent: this.oMockedComponent,
				modifier: sap.ui.fl.changeHandler.JsControlTreeModifier
			};

			this.oChangeHandler = sap.ui.layout.changeHandler.AddSimpleFormGroup;
			this.oXmlTreeModifier = sap.ui.fl.changeHandler.XmlTreeModifier;
		},

		afterEach: function () {
			this.oSimpleForm.destroy();
		}
	});

	QUnit.test("when calling applyChange with JsControlTreeModifier and a legacy change", function (assert) {
		_testApplyChangeWithJsControlTreeModifier.call(this, this.oLegacyChangeWrapper, "newId", 5, assert);
	});

	QUnit.test("when calling applyChange with JsControlTreeModifier with a change containing local ids", function (assert) {
		_testApplyChangeWithJsControlTreeModifier.call(this, this.oChangeWithLocalIdsWrapper, "component---newId", 5, assert);
	});

	QUnit.test("when calling applyChange with JsControlTreeModifier with a change containing global ids", function (assert) {
		_testApplyChangeWithJsControlTreeModifier.call(this, this.oChangeWithGlobalIdsWrapper, "newId", 5, assert);
	});

	QUnit.test("when calling applyChange with XmlTreeModifier", function (assert) {
		var oXmlString =
			"<mvc:View xmlns:mvc='sap.ui.core.mvc' xmlns:layout='sap.ui.layout' xmlns='sap.m'>" +
			"<layout:SimpleForm id='SimpleForm' editable='true' title='Simple Form' class='editableForm'>" +
			"<layout:content>" +
			"<Title id='Title0' text='Title 0' visible='true' />" +
			"<Label id='Label0' text='Label 0' visible='true' />" +
			"<Input id='Input0' visible='true' />" +
			"<Label id='Label1' text='Label 1' visible='true' />" +
			"<Input id='Input1' visible='true' />" +
			"</layout:content>" +
			"</layout:SimpleForm>" +
			"</mvc:View>";

		_testApplyChangeWithXMLTreeModifier.call(this, oXmlString, this.oLegacyChangeWrapper, "New Control", 5, assert);
	});

	QUnit.module("using sap.ui.layout.changeHandler.AddSimpleFormGroup on simpleform without title and having relative index", {
		beforeEach: function () {

			this.oLabel0 = new sap.m.Label({id: "Label0", text: "Label 0", visible: true});
			this.oLabel1 = new sap.m.Label({id: "Label1", text: "Label 1"});
			this.oInput0 = new sap.m.Input({id: "Input0", visible: true});
			this.oInput1 = new sap.m.Input({id: "Input1"});
			this.oSimpleForm = new sap.ui.layout.form.SimpleForm({
				id: "SimpleForm", title: "Simple Form",
				content: [this.oLabel0, this.oInput0, this.oLabel1, this.oInput1]
			});
			this.oSimpleForm.placeAt("content");
			sap.ui.getCore().applyChanges();

			var mCommonChangeData = {
				"selector": {
					"id": "SimpleForm"
				},
				"content": {
					"group": {

					}
				},
				"texts": {
					"groupLabel": {
						"value": "New Control"
					}
				},
				"changeType": "addSimpleFormGroup"
			};

			var oLegacyChange = jQuery.extend(true, {}, mCommonChangeData);
			oLegacyChange.content.group = {
				"id": "newId",
				"relativeIndex": 0
			};
			this.oLegacyChangeWrapper = new sap.ui.fl.Change(oLegacyChange);

			var oChangeWithLocalIds = jQuery.extend(true, {}, mCommonChangeData);
			oChangeWithLocalIds.content.group = {
				"selector": {
					"id": "newId",
					"idIsLocal": true
				},
				"relativeIndex": 0
			};
			this.oChangeWithLocalIdsWrapper = new sap.ui.fl.Change(oChangeWithLocalIds);

			var oChangeWithGlobalIds = jQuery.extend(true, {}, mCommonChangeData);
			oChangeWithGlobalIds.content.group = {
				"selector": {
					"id": "newId",
					"idIsLocal": false
				},
				"relativeIndex": 0
			};
			this.oChangeWithGlobalIdsWrapper = new sap.ui.fl.Change(oChangeWithGlobalIds);

			this.oMockedComponent = {
				createId: function (sString) {
					return "component---" + sString;
				},
				getLocalId: function (sString) {
					return sString;
				}
			};

			this.mPropertyBag = {
				appComponent: this.oMockedComponent,
				modifier: sap.ui.fl.changeHandler.JsControlTreeModifier
			};

			this.oChangeHandler = sap.ui.layout.changeHandler.AddSimpleFormGroup;
			this.oXmlTreeModifier = sap.ui.fl.changeHandler.XmlTreeModifier;
		},

		afterEach: function () {
			this.oSimpleForm.destroy();
		}
	});

	QUnit.test("when calling applyChange with JsControlTreeModifier and a legacy change", function (assert) {
		_testApplyChangeWithJsControlTreeModifier.call(this, this.oLegacyChangeWrapper, "newId", 0, assert);
	});

	QUnit.test("when calling applyChange with JsControlTreeModifier with a change containing local ids", function (assert) {
		_testApplyChangeWithJsControlTreeModifier.call(this, this.oChangeWithLocalIdsWrapper, "component---newId", 0, assert);
	});

	QUnit.test("when calling applyChange with JsControlTreeModifier with a change containing global ids", function (assert) {
		_testApplyChangeWithJsControlTreeModifier.call(this, this.oChangeWithGlobalIdsWrapper, "newId", 0, assert);
	});

	QUnit.test("when calling applyChange with XmlTreeModifier", function (assert) {
		var oXmlString =
			"<mvc:View xmlns:mvc='sap.ui.core.mvc' xmlns:layout='sap.ui.layout' xmlns='sap.m'>" +
			"<layout:SimpleForm id='SimpleForm' editable='true' title='Simple Form' class='editableForm'>" +
			"<layout:content>" +
			"<Label id='Label0' text='Label 0' visible='true' />" +
			"<Input id='Input0' visible='true' />" +
			"<Label id='Label1' text='Label 1' visible='true' />" +
			"<Input id='Input1' visible='true' />" +
			"</layout:content>" +
			"</layout:SimpleForm>" +
			"</mvc:View>";

		_testApplyChangeWithXMLTreeModifier.call(this, oXmlString, this.oLegacyChangeWrapper, "New Control", 0, assert);
	});

	QUnit.module("using sap.ui.layout.changeHandler.AddSimpleFormGroup on simpleform with two form containers having title and relative index", {
		beforeEach: function () {

			this.oTitle0 = new sap.ui.core.Title({id: "Title0", text: "Title 0"});
			this.oLabel0 = new sap.m.Label({id: "Label0", text: "Label 0", visible: true});
			this.oLabel1 = new sap.m.Label({id: "Label1", text: "Label 1"});
			this.oInput0 = new sap.m.Input({id: "Input0", visible: true});
			this.oInput1 = new sap.m.Input({id: "Input1"});

			this.oTitle1 = new sap.ui.core.Title({id: "Title1", text: "Title 1"});
			this.oLabel2 = new sap.m.Label({id: "Label2", text: "Label 2", visible: true});
			this.oLabel3 = new sap.m.Label({id: "Label3", text: "Label 3"});
			this.oInput2 = new sap.m.Input({id: "Input2", visible: true});
			this.oInput3 = new sap.m.Input({id: "Input3"});

			this.oSimpleForm = new sap.ui.layout.form.SimpleForm({
				id: "SimpleForm", title: "Simple Form",
				content: [this.oTitle0, this.oLabel0, this.oInput0, this.oLabel1, this.oInput1, this.oTitle1, this.oLabel2, this.oInput2, this.oLabel3, this.oInput3]
			});
			this.oSimpleForm.placeAt("content");
			sap.ui.getCore().applyChanges();

			var mCommonChangeData = {
				"selector": {
					"id": "SimpleForm"
				},
				"content": {
					"group": {

					}
				},
				"texts": {
					"groupLabel": {
						"value": "New Control"
					}
				},
				"changeType": "addSimpleFormGroup"
			};

			var oLegacyChange = jQuery.extend(true, {}, mCommonChangeData);
			oLegacyChange.content.group = {
				"id": "newId",
				"relativeIndex": 1
			};
			this.oLegacyChangeWrapper = new sap.ui.fl.Change(oLegacyChange);

			var oChangeWithLocalIds = jQuery.extend(true, {}, mCommonChangeData);
			oChangeWithLocalIds.content.group = {
				"selector": {
					"id": "newId",
					"idIsLocal": true
				},
				"relativeIndex": 1
			};
			this.oChangeWithLocalIdsWrapper = new sap.ui.fl.Change(oChangeWithLocalIds);

			var oChangeWithGlobalIds = jQuery.extend(true, {}, mCommonChangeData);
			oChangeWithGlobalIds.content.group = {
				"selector": {
					"id": "newId",
					"idIsLocal": false
				},
				"relativeIndex": 1
			};
			this.oChangeWithGlobalIdsWrapper = new sap.ui.fl.Change(oChangeWithGlobalIds);

			this.oMockedComponent = {
				createId: function (sString) {
					return "component---" + sString;
				},
				getLocalId: function (sString) {
					return sString;
				}
			};

			this.mPropertyBag = {
				appComponent: this.oMockedComponent,
				modifier: sap.ui.fl.changeHandler.JsControlTreeModifier
			};

			this.oChangeHandler = sap.ui.layout.changeHandler.AddSimpleFormGroup;
			this.oXmlTreeModifier = sap.ui.fl.changeHandler.XmlTreeModifier;
		},

		afterEach: function () {
			this.oSimpleForm.destroy();
		}
	});

	QUnit.test("when calling applyChange with JsControlTreeModifier and a legacy change", function (assert) {
		_testApplyChangeWithJsControlTreeModifier.call(this, this.oLegacyChangeWrapper, "newId", 5, assert);
	});

	QUnit.test("when calling applyChange with JsControlTreeModifier with a change containing local ids", function (assert) {
		_testApplyChangeWithJsControlTreeModifier.call(this, this.oChangeWithLocalIdsWrapper, "component---newId", 5, assert);
	});

	QUnit.test("when calling applyChange with JsControlTreeModifier with a change containing global ids", function (assert) {
		_testApplyChangeWithJsControlTreeModifier.call(this, this.oChangeWithGlobalIdsWrapper, "newId", 5, assert);
	});

	QUnit.test("when calling applyChange with XmlTreeModifier", function (assert) {
		var oXmlString =
			"<mvc:View xmlns:mvc='sap.ui.core.mvc' xmlns:layout='sap.ui.layout' xmlns='sap.m'>" +
			"<layout:SimpleForm id='SimpleForm' editable='true' title='Simple Form' class='editableForm'>" +
			"<layout:content>" +
			"<Title id='Title0' text='Title 0' visible='true' />" +
			"<Label id='Label0' text='Label 0' visible='true' />" +
			"<Input id='Input0' visible='true' />" +
			"<Label id='Label1' text='Label 1' visible='true' />" +
			"<Input id='Input1' visible='true' />" +
			"<Title id='Title1' text='Title 1' visible='true' />" +
			"<Label id='Label2' text='Label 2' visible='true' />" +
			"<Input id='Input2' visible='true' />" +
			"<Label id='Label3' text='Label 3' visible='true' />" +
			"<Input id='Input3' visible='true' />" +
			"</layout:content>" +
			"</layout:SimpleForm>" +
			"</mvc:View>";

		_testApplyChangeWithXMLTreeModifier.call(this, oXmlString, this.oLegacyChangeWrapper, "New Control", 5, assert);
	});

})();


text:
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Solution;

import java.util.LinkedList;

/**
 *
 * @author sharedload.com
 */
public class Solution {
     private LinkedList customers;
     private Charge charge;

    public LinkedList getCustomers() {
        return customers;
    }

    public void setCustomers(LinkedList customers) {
        this.customers = customers;
    }

    public Charge getCharge() {
        return charge;
    }

    public void setCharge(Charge charge) {
        this.charge = charge;
    }

}


text:
// Copyright 2016 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.rules.java;

import com.google.common.collect.ImmutableList;
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.analysis.PlatformOptions;
import com.google.devtools.build.lib.analysis.platform.ConstraintValueInfo;
import com.google.devtools.build.lib.analysis.platform.ToolchainInfo;
import com.google.devtools.build.lib.analysis.starlark.StarlarkActionFactory;
import com.google.devtools.build.lib.analysis.starlark.StarlarkRuleContext;
import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.collect.nestedset.Depset;
import com.google.devtools.build.lib.packages.Provider;
import com.google.devtools.build.lib.starlarkbuildapi.core.ProviderApi;
import com.google.devtools.build.lib.starlarkbuildapi.java.JavaCommonApi;
import com.google.devtools.build.lib.starlarkbuildapi.java.JavaToolchainStarlarkApiProviderApi;
import net.starlark.java.eval.EvalException;
import net.starlark.java.eval.Sequence;
import net.starlark.java.eval.Starlark;
import net.starlark.java.eval.StarlarkList;
import net.starlark.java.eval.StarlarkThread;

/** A module that contains Starlark utilities for Java support. */
public class JavaStarlarkCommon
    implements JavaCommonApi<
        Artifact,
        JavaInfo,
        JavaToolchainProvider,
        JavaRuntimeInfo,
        ConstraintValueInfo,
        StarlarkRuleContext,
        StarlarkActionFactory> {
  private final JavaSemantics javaSemantics;

  public JavaStarlarkCommon(JavaSemantics javaSemantics) {
    this.javaSemantics = javaSemantics;
  }

  @Override
  public Provider getJavaProvider() {
    return JavaInfo.PROVIDER;
  }

  @Override
  public JavaInfo createJavaCompileAction(
      StarlarkRuleContext starlarkRuleContext,
      Sequence<?> sourceJars, // <Artifact> expected
      Sequence<?> sourceFiles, // <Artifact> expected
      Artifact outputJar,
      Object outputSourceJar,
      Sequence<?> javacOpts, // <String> expected
      Sequence<?> deps, // <JavaInfo> expected
      Sequence<?> experimentalLocalCompileTimeDeps, // <JavaInfo> expected
      Sequence<?> exports, // <JavaInfo> expected
      Sequence<?> plugins, // <JavaInfo> expected
      Sequence<?> exportedPlugins, // <JavaInfo> expected
      Sequence<?> annotationProcessorAdditionalInputs, // <Artifact> expected
      Sequence<?> annotationProcessorAdditionalOutputs, // <Artifact> expected
      String strictDepsMode,
      JavaToolchainProvider javaToolchain,
      JavaRuntimeInfo hostJavabase,
      Sequence<?> sourcepathEntries, // <Artifact> expected
      Sequence<?> resources, // <Artifact> expected
      Boolean neverlink,
      StarlarkThread thread)
      throws EvalException, InterruptedException {

    return JavaInfoBuildHelper.getInstance()
        .createJavaCompileAction(
            starlarkRuleContext,
            Sequence.cast(sourceJars, Artifact.class, "source_jars"),
            Sequence.cast(sourceFiles, Artifact.class, "source_files"),
            outputJar,
            outputSourceJar == Starlark.NONE ? null : (Artifact) outputSourceJar,
            Sequence.cast(javacOpts, String.class, "javac_opts"),
            Sequence.cast(deps, JavaInfo.class, "deps"),
            Sequence.cast(
                experimentalLocalCompileTimeDeps,
                JavaInfo.class,
                "experimental_local_compile_time_deps"),
            Sequence.cast(exports, JavaInfo.class, "exports"),
            Sequence.cast(plugins, JavaInfo.class, "plugins"),
            Sequence.cast(exportedPlugins, JavaInfo.class, "exported_plugins"),
            Sequence.cast(
                annotationProcessorAdditionalInputs,
                Artifact.class,
                "annotation_processor_additional_inputs"),
            Sequence.cast(
                annotationProcessorAdditionalOutputs,
                Artifact.class,
                "annotation_processor_additional_outputs"),
            strictDepsMode,
            javaToolchain,
            hostJavabase,
            ImmutableList.copyOf(Sequence.cast(sourcepathEntries, Artifact.class, "sourcepath")),
            Sequence.cast(resources, Artifact.class, "resources"),
            neverlink,
            javaSemantics,
            thread);
  }

  @Override
  public Artifact runIjar(
      StarlarkActionFactory actions,
      Artifact jar,
      Object targetLabel,
      JavaToolchainProvider javaToolchain)
      throws EvalException {
    return JavaInfoBuildHelper.getInstance()
        .buildIjar(
            actions, jar, targetLabel != Starlark.NONE ? (Label) targetLabel : null, javaToolchain);
  }

  @Override
  public Artifact stampJar(
      StarlarkActionFactory actions,
      Artifact jar,
      Label targetLabel,
      JavaToolchainProvider javaToolchain)
      throws EvalException {
    return JavaInfoBuildHelper.getInstance().stampJar(actions, jar, targetLabel, javaToolchain);
  }

  @Override
  public Artifact packSources(
      StarlarkActionFactory actions,
      Object outputJar,
      Object outputSourceJar,
      Sequence<?> sourceFiles, // <Artifact> expected.
      Sequence<?> sourceJars, // <Artifact> expected.
      JavaToolchainProvider javaToolchain,
      JavaRuntimeInfo hostJavabase)
      throws EvalException {
    return JavaInfoBuildHelper.getInstance()
        .packSourceFiles(
            actions,
            outputJar instanceof Artifact ? (Artifact) outputJar : null,
            outputSourceJar instanceof Artifact ? (Artifact) outputSourceJar : null,
            Sequence.cast(sourceFiles, Artifact.class, "sources"),
            Sequence.cast(sourceJars, Artifact.class, "source_jars"),
            javaToolchain,
            hostJavabase);
  }

  @Override
  // TODO(b/78512644): migrate callers to passing explicit javacopts or using custom toolchains, and
  // delete
  public ImmutableList<String> getDefaultJavacOpts(JavaToolchainProvider javaToolchain)
      throws EvalException {
    // We don't have a rule context if the default_javac_opts.java_toolchain parameter is set
    return ((JavaToolchainProvider) javaToolchain).getJavacOptions(/* ruleContext= */ null);
  }

  @Override
  public JavaInfo mergeJavaProviders(Sequence<?> providers /* <JavaInfo> expected. */)
      throws EvalException {
    return JavaInfo.merge(Sequence.cast(providers, JavaInfo.class, "providers"));
  }

  // TODO(b/65113771): Remove this method because it's incorrect.
  @Override
  public JavaInfo makeNonStrict(JavaInfo javaInfo) {
    return JavaInfo.Builder.copyOf(javaInfo)
        // Overwrites the old provider.
        .addProvider(
            JavaCompilationArgsProvider.class,
            JavaCompilationArgsProvider.makeNonStrict(
                javaInfo.getProvider(JavaCompilationArgsProvider.class)))
        .build();
  }

  @Override
  public Provider getJavaToolchainProvider() {
    return ToolchainInfo.PROVIDER;
  }

  @Override
  public Provider getJavaRuntimeProvider() {
    return ToolchainInfo.PROVIDER;
  }

  @Override
  public boolean isJavaToolchainResolutionEnabled(StarlarkRuleContext ruleContext)
      throws EvalException {
    return ruleContext
        .getConfiguration()
        .getOptions()
        .get(PlatformOptions.class)
        .useToolchainResolutionForJavaRules;
  }

  @Override
  public ProviderApi getMessageBundleInfo() {
    // No implementation in Bazel. This method not callable in Starlark except through
    // (discouraged) use of --experimental_google_legacy_api.
    return null;
  }

  @Override
  public JavaInfo addConstraints(JavaInfo javaInfo, Sequence<?> constraints) throws EvalException {
    // No implementation in Bazel. This method not callable in Starlark except through
    // (discouraged) use of --experimental_google_legacy_api.
    return null;
  }

  @Override
  public Sequence<String> getConstraints(JavaInfo javaInfo) {
    // No implementation in Bazel. This method not callable in Starlark except through
    // (discouraged) use of --experimental_google_legacy_api.
    return StarlarkList.empty();
  }

  @Override
  public JavaInfo removeAnnotationProcessors(JavaInfo javaInfo) {
    // No implementation in Bazel. This method not callable in Starlark except through
    // (discouraged) use of --experimental_google_legacy_api.
    return null;
  }

  @Override
  public JavaInfo setAnnotationProcessing(
      JavaInfo javaInfo,
      boolean enabled,
      Sequence<?> processorClassnames,
      Object processorClasspath,
      Object classJar,
      Object sourceJar)
      throws EvalException {
    // No implementation in Bazel. This method not callable in Starlark except through
    // (discouraged) use of --experimental_google_legacy_api.
    return null;
  }

  @Override
  public Depset /*<Artifact>*/ getCompileTimeJavaDependencyArtifacts(JavaInfo javaInfo) {
    // No implementation in Bazel. This method not callable in Starlark except through
    // (discouraged) use of --experimental_google_legacy_api.
    return null;
  }

  @Override
  public JavaInfo addCompileTimeJavaDependencyArtifacts(
      JavaInfo javaInfo, Sequence<?> compileTimeJavaDependencyArtifacts) throws EvalException {
    // No implementation in Bazel. This method not callable in Starlark except through
    // (discouraged) use of --experimental_google_legacy_api.
    return null;
  }

  @Override
  public Label getJavaToolchainLabel(JavaToolchainStarlarkApiProviderApi toolchain)
      throws EvalException {
    // No implementation in Bazel. This method not callable in Starlark except through
    // (discouraged) use of --experimental_google_legacy_api.
    return null;
  }

  @Override
  public ProviderApi getBootClassPathInfo() {
    // No implementation in Bazel. This method not callable in Starlark except through
    // (discouraged) use of --experimental_google_legacy_api.
    return null;
  }
}


text:
module Query
  # Images attached to observations.
  class ImageWithObservations < Query::ImageBase
    include Query::Initializers::ContentFilters

    def parameter_declarations
      super.merge(
        old_by?: :string
      ).merge(content_filter_parameter_declarations(Observation))
    end

    def initialize_flavor
      add_join(:images_observations, :observations)
      initialize_content_filters(Observation)
      super
    end

    def default_order
      "name"
    end

    def coerce_into_observation_query
      Query.lookup(:Observation, :all, params_with_old_by_restored)
    end
  end
end


text:
<?php

define('BASEPATH', 'Staff');
require_once('../applications/wrapper.php');

if (!$IKO->perm->check('access_administration')) {
    redirect(SITE_URL);
}//Checks if user has permission to create a thread.
//require_once('template/top.php');
echo $ADMIN->template('top');
$notice = '';

/*
 * Additional notice.
 */
if ($PGET->g('notice')) {
    switch ($PGET->g('notice')) {
        case "create_success":
            $notice .= $ADMIN->alert(
                'Usergroup has been created!',
                'success'
            );
            break;
        case "edit_success":
            $notice .= $ADMIN->alert(
                'Usergroup has been successfully edited!',
                'success'
            );
            break;
    }
}

/*
 * Delete Usergroup.
 */
if ($PGET->g('delete_usergroup')) {
    $d_u = clean($PGET->g('delete_usergroup'));
    /*$MYSQL->where('id', $d_u);
    $query = $MYSQL->get('{prefix}usergroups');*/
    $MYSQL->bind('id', $d_u);
    $query = $MYSQL->query('SELECT * FROM {prefix}usergroups WHERE id = :id');

    if (!empty($query)) {

        //$MYSQL->where('id', $d_u);
        $MYSQL->bind('id', $d_u);
        try {
            //$MYSQL->delete('{prefix}usergroups');
            $MYSQL->query('DELETE FROM {prefix}usergroups WHERE id = :id');
            $notice .= $ADMIN->alert(
                'Usergroup ' . $query['0']['group_name'] . ' has been deleted!',
                'success'
            );
        } catch (mysqli_sql_exception $e) {
            $notice .= $ADMIN->alert(
                'Error deleting usergroup.',
                'danger'
            );
        }

    } else {
        $notice .= $ADMIN->alert(
            'Usergroup does not exist!',
            'danger'
        );
    }
}

$query = $MYSQL->query("SELECT * FROM {prefix}usergroups");

$token = NoCSRF::generate('csrf_token');
$groups = '';
foreach ($query as $g) {
    $groups .= '

                          ' . $g['group_name'] . '

                            <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                              Options
                            </button>

Edit Usergroup

Delete Usergroup

';
}

echo $ADMIN->box(
    'Usergroups
New Usergroup
',
    $notice .
    'You can manage the user groups here.',
    '

              Group
              Controls

           ' . $groups . '

',
    '12'
);

//require_once('template/bot.php');
echo $ADMIN->template('bot');
?>


text:
void Viktor::LoadSpecialSpells(SpellData* Data)
{
	if (Init)
		return;

	Init = true;
}

void Viktor::OnDetectorCreateSpell(IUnit* Sender, IUnit* Missile, SpellData* Data, SpellData** NewData, bool* ShouldProcess)
{
	if (Data->MenuName != "ViktorE")
		return;

	if (std::string(GMissileData->GetName(Missile)) != Data->MissileName)
		return;

	auto pSPell = Evade::OnProcessSpells["ViktorEExplosion"];

	if (pSPell != nullptr)
		SpellDetector->AddSpell(Sender, GMissileData->GetStartPosition(Missile), GMissileData->GetEndPosition(Missile), pSPell);
}


text:
package engine;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;

import util.Helper;

import models.AST;
import models.ASTID;
import models.EquivalenceClass;
import models.Program;
import models.Subtree;

/**
 * Class: Manual Factorization
 * ---------------------------
 * Factorize a set of student programs, but have a human make the final
 * decision as to what code analogies are correct.
 */
public class ManualFactorizer extends Factorizer {

	private Set<EquivalenceClass> ignoreList;

	public ManualFactorizer(Map<ASTID, Program> programs) {
		super(programs);
		ignoreList = new HashSet<EquivalenceClass>();
	}

	@Override
	protected void runFactorizationIteration(int factorIteration){

		List<Subtree> subtrees = getSubtreesFromPrograms(factorIteration);
		EquivalenceClass pair = getBestEquivalence(subtrees);

		String pairName = userValidates(pair);
		if(pairName == null) {
			addToIgnoreList(pair);
		} else {
			pair.setName(pairName);
			List<EquivalenceClass> equivalenceClasses = Collections.singletonList(pair);
			///saveEquivalenceClasses(equivalenceClasses, factorIteration);
			factorPrograms(equivalenceClasses);
			Helper.saveReducedPrograms(programs, astCounts, factorIteration);
		}
	}

	@Override
	/**
	 * Method: Get Best Equivalence
	 * --------------------------------
	 * Chooses the best equivalence pair of subtrees. The best pair is
	 * determined to be the two subtrees that have maximal overlapScore (they
	 * preserve program output in many different contexts and never change
	 * output).
	 */
	protected EquivalenceClass getBestEquivalence(List<Subtree> subtrees) {
		System.out.println("\n\nLooking for a new equivalence class...");
		EquivalenceSelector selector = new EquivalenceSelector(subtrees);
		EquivalenceClass theChosenOne = selector.chose(ignoreList);

		if(theChosenOne == null) {
			throw new RuntimeException("no pair found.");
		}

		return theChosenOne;
	}

	private void addToIgnoreList(EquivalenceClass pair) {
		System.out.println("add to ignore list");
		ignoreList.add(pair);

	}

	/**
	 * Method: User Validates
	 * ----------------------
	 * Has the user decide if a pair is correct. This method returns null
	 * if the user says the pair is not valid and a name for the pair if the
	 * user decides it is valid.
	 */
	private String userValidates(EquivalenceClass pair) {
		System.out.println("Potential match found:");
		Scanner in = new Scanner(System.in);
		pair.outputCode();
		pair.outputStats();
		System.out.print("Enter a name (or \"false\" to ignore): ");
		String s = in.nextLine();
		if(s.equals("false")) return null;
		System.out.println("Pair name: "+s);
		return s;
	}

}


text:
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <!-- The main content view -->

    <LinearLayout
        android:id="@+id/main_activity_fragment_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical">
    </LinearLayout>

    <fragment
        android:id="@+id/navigation_drawer"
        android:name="com.metech.firefly.drawer.NavigationDrawerFragment"
        android:layout_width="@dimen/navigation_drawer_width"
        android:layout_height="fill_parent"
        android:layout_gravity="left"
        tools:layout="@layout/fragment_navigation_drawer" />

</android.support.v4.widget.DrawerLayout>