text:
package model;

import java.io.IOException;
import java.io.StringWriter;
import java.sql.SQLException;
import java.util.ArrayList;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import oracle.jdbc.OraclePreparedStatement;
import oracle.jdbc.OracleResultSet;
import oracle.jdbc.driver.OracleConnection;

import org.apache.commons.codec.digest.DigestUtils;
import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine;

import common.DBConnection;

@WebServlet("/Search")
public class Search extends HttpServlet {
	private static final long serialVersionUID = 1L;

    public Search() {
        super();
    }

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doPost(request,response);
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

		    VelocityEngine ve = common.VelocityEngineObject.getVelocityEngine();
			StringWriter writer = new StringWriter();
			Template template = null;
			VelocityContext context = new VelocityContext();

			String e = (String)request.getParameter("EAN");

			String p = (String)request.getParameter("Product");

			String b = (String)request.getParameter("Brand");

			String c = (String) request.getParameter("Category");

			OracleResultSet res = null;
			OracleConnection con = DBConnection.getConnection();

			OraclePreparedStatement st = null;
			try {
				if (e!=null) {
					st = (OraclePreparedStatement) con.prepareStatement("select id,name,description,image1,image2,image3 from item_ where id=?");
					st.setString(1, e);
				} else
				if (p!=null) {
					st = (OraclePreparedStatement) con.prepareStatement("select id,name,description,image1,image2,image3 from item_ where lower(name) like '%'||lower(?)||'%'");
				    st.setString(1, p);
				} else
				if (b!=null) {
					st = (OraclePreparedStatement) con.prepareStatement("select i.id,i.name,i.description,image1,image2,image3 from item_ i join brand_ b on i.brand_id=b.brand_id where lower(b.name) like '%'||lower(?)||'%'");
				    st.setString(1, b);
				} else
				if (c!=null) {
					st = (OraclePreparedStatement) con.prepareStatement("select i.id,i.name,i.description,image1,image2,image3 from item_ i join category_item_ c on i.id=c.item_id join category_ cc on c.category_id=cc.category_id where lower(cc.name) like '%'||lower(?)||'%' ");
				    st.setString(1, c);
				}
			} catch (SQLException e1) {
				// TODO Auto-generated catch block
				e1.printStackTrace();
			}

			ArrayList<common.Product> arr = new ArrayList<common.Product>();

			if (st!=null) {
				try {
					res=(OracleResultSet) st.executeQuery();
					while (res.next()) {
						arr.add(new common.Product(res.getString(1), res.getString(2), res.getString(3),res.getString(4)));
					}
					if (arr.size()>0) {
						context.put("exists_product", arr.size());

						if (arr.size()>5) {
							int sz = arr.size()/5;
							if (arr.size()%5>0) sz++;
							context.put("total",sz);
							String page = request.getParameter("page");
							if (page==null) page="1";
							int pg = Integer.parseInt(page);

							ArrayList<common.Product> array = new ArrayList<common.Product>();
							for (int i=5*(pg-1);i<5*pg && arr.size()>i;++i)
								array.add(arr.get(i));
							context.put("arr", array);
							context.put("startpage", pg);

						} else {
						       context.put("total", 0);
						       context.put("arr", arr);
						       context.put("startpage", 1);

							}
					} else {
						if (e!=null) {
					    	   System.out.println(e);
					    	   String asin = common.TestEAN.getResult(e);

					    	   if (asin!=null) {
					    		   context.put("asin", asin);
					    		   System.out.println(asin);
					    	   }
					       }
					}
				} catch (SQLException e1) {
					e1.printStackTrace();
				}

			}

			context.put("encrypt_search_page",DigestUtils.sha256Hex("6"));
			context.put("encrypt_starabiliti_master",DigestUtils.sha256Hex("8"));
			context.put("encrypt_bootstrap_social", DigestUtils.sha256Hex("3"));

			context.put("urlImage",(String) request.getSession().getAttribute("urlImage"));
			context.put("name", (String) request.getSession().getAttribute("name"));
			context.put("encrypt_js", DigestUtils.sha256Hex("5"));
			context.put("sageata_stanga",' ');
			context.put("sageata_dreapta",' ');
			template = ve.getTemplate("search_page.html");

			template.merge( context, writer );
			response.setCharacterEncoding("UTF-8");
	        response.getWriter().println(writer.toString());
	}
}


text:
#ifndef HTTP_H
#define HTTP_H

#include "http-parser/http_parser.h"
struct connection;

typedef enum {HTTP_DISCONNECT, HTTP_KEEP_CONNECTED, HTTP_WEBSOCKET_MONITOR} http_action;
typedef enum {ON_URL, ON_BODY} http_step;
typedef int (*write_function)(struct connection *cx, const char *data, size_t len);
typedef int (*start_function)(struct connection *cx);

/* Send an HTTP response */
int
http_response(struct connection *cx, int code, const char *status, const char *data, size_t len);

int
http_response_ct(struct connection *cx, int code, const char *status, const char *data, size_t len, const char *content_type);

/* Send an empty reply. */
void
send_empty_reply(struct connection *cx, int error);

/* Start streaming with chunked encoding */
void
http_streaming_start(struct connection *cx, int code, const char *status);
void
http_streaming_start_ct(struct connection *cx, int code, const char *status, const char *content_type);

/* Send data chunk */
int
http_streaming_chunk(struct connection *cx, const char *data, size_t len);

/* Stop streaming, close connection. */
void
http_streaming_end(struct connection *cx);

int
http_parser_onurl(http_parser *parser, const char *at, size_t len);
int
http_parser_onbody(http_parser *parser, const char *at, size_t len);

int
http_parser_onpath(http_parser *parser, const char *at, size_t len);

int
http_parser_on_header_field(http_parser *parser, const char *at, size_t len);

int
http_parser_on_header_value(http_parser *parser, const char *at, size_t len);

#endif

redpajama_set_name: RedPajamaGithub


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0-b52-fcs
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.09.06 at 09:23:00 오후 KST
//

package com.athena.chameleon.engine.entity.xml.ejbjar.weblogic.v9_0;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

/**
 *
 *
 * 	The method-nameType contains a name of an enterprise
 * 	bean method or the asterisk (*) character. The asterisk is
 * 	used when the element denotes all the methods of an
 * 	enterprise bean's client view interfaces.
 *
 *
 *
 *
Java class for method-nameType complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="method-nameType">
 *   <simpleContent>
 *     <restriction base="<http://java.sun.com/xml/ns/j2ee>string">
 *     </restriction>
 *   </simpleContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "method-nameType", namespace = "http://java.sun.com/xml/ns/j2ee")
public class MethodNameType
    extends String
{

}


text:
namespace gfx {
class ImageSkia;
}  // namespace gfx

namespace arc {

class AdaptiveIconDelegate {
 public:
  using AdaptiveIconDelegateCallback = base::OnceCallback<void(
      const std::vector<gfx::ImageSkia>& adaptive_icons)>;

  virtual ~AdaptiveIconDelegate() = default;

  // Generates adaptive icons from the |icons| and calls |callback|.
  virtual void GenerateAdaptiveIcons(
      const std::vector<internal::ActivityIconLoader::ActivityIconPtr>& icons,
      AdaptiveIconDelegateCallback callback) = 0;
};

}  // namespace arc

#endif  // COMPONENTS_ARC_COMMON_INTENT_HELPER_ADAPTIVE_ICON_DELEGATE_H_


text:
module Ow2mirror
  module Notifier

    class Notify

      def bootstrap(properties)
        ;
      end

      def notify(report)
        ;
      end

      #
      # Return a hash for notifier configuration
      #
      def configure
        ;
      end

    end
  end
end


text:
package main

import (
	"log"

	"encoding/json"
	"io/ioutil"
	"os"
	"strconv"
	"strings"

	"github.com/flosch/pongo2"
)

var STATIC_FILE_PATH = "../src/blincode/templates/"

func RenderTemplate(filepath string, content map[string]interface{}) string {
	template, err := pongo2.FromFile(STATIC_FILE_PATH + filepath)
	if err != nil {
		log.Println(err.Error())
		return Render404Page()
	}

	if content == nil {
		content = make(map[string]interface{})
	}

	content["static"] = "/static/"
	str, err := template.Execute(content)
	if err != nil {
		log.Println(err.Error())
		return Render404Page()
	}

	return str
}

func Render404Page() string {
	template, err := pongo2.FromFile(STATIC_FILE_PATH + "404.html")
	if err != nil {
		log.Println(err.Error())
		return ""
	}

	str, err := template.Execute(nil)
	if err != nil {
		log.Println(err.Error())
		return ""
	}

	return str
}

func ReadJsonFromFile(configObj interface{}, fileName string) error {
	file, err := os.Open(fileName)
	if err != nil {
		return err
	}

	content, _ := ioutil.ReadAll(file)
	err = json.Unmarshal(content, configObj)
	if err != nil {
		//log.Println("readConfigFile json.Unmarshal ", fileName, " error: ", err.Error())
		return err
	}

	return nil
}

func ReplaceSpecialWord(word string) string {
	word = strings.Replace(word, "+", "%2B", -1)

	return word
}

func ReadConfigFile(configObj interface{}, fileName string) error {
	file, err := os.Open(fileName)
	if err != nil {
		return err
	}

	content, _ := ioutil.ReadAll(file)
	err = json.Unmarshal(content, configObj)
	if err != nil {
		log.Println("readConfigFile json.Unmarshal ", fileName, " error: ", err.Error())
		return err
	}

	return nil
}

func StringToInt64(v string) (int64, error) {
	return strconv.ParseInt(v, 10, 64)
}


text: Free Comment Script


text:
/**
 * Imports
 */

import EmptyState from 'components/EmptyState'
import CardFeed from 'components/CardFeed'
import {component, element} from 'vdux'
import {Block} from 'vdux-ui'

/**
 * <Gallery/>
 */

export default component({
  render ({props}) {
  	const items = props.profile.showcase

    return (
  		items && Object.keys(items).length
  			? <CardFeed items={items} {...props} />
  			: <EmptyState icon='collections' title='No Gallery Items' description='There are currently no gallery items.  When this user shares some of their work, it will appear here!' />
    )
  }
})


text:
package wonging

import (
	"fmt"
)

// type DealerStrategies interface {
// 	standsOnAll17(d *Dealer) *Dealer
// 	hitOnSoft17(d *Dealer) *Dealer
// }
//
type DealerStrategy func(*Dealer) []string

func randomDealerStrategy() (DealerStrategy, string) {
	strategies := []DealerStrategy{standsOnAll17, hitOnSoft17}
	description := []string{"Stands On All 17", "Hit On Soft 17"}
	randomInt := randInt(0, len(strategies))
	return strategies[randomInt], description[randomInt]
}

//Dealer strategies
func standsOnAll17(d *Dealer) []string {
	fmt.Print("[strategy: standsOnAll17]: ")
	if value, _ := d.calculateHandValue(); value < 17 {
		return []string{"dealSelf"}
	}
	return []string{"stand"}
}
func hitOnSoft17(d *Dealer) []string {
	fmt.Print("[strategy: hitOnSoft17]: ")

	if value, soft := d.calculateHandValue(); (value >= 17 && soft) || value < 17 {
		return []string{"dealSelf"}
	}
	return []string{"stand"}
}


text:
import * as React from 'react';
import { IconBaseProps } from 'react-icon-base';
declare class FaChrome extends React.Component<IconBaseProps> { }
export = FaChrome;


text:
"""Support for WLED sensors."""
from datetime import timedelta
from typing import Any, Callable, Dict, List, Optional

from homeassistant.components.sensor import DEVICE_CLASS_CURRENT
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
    DATA_BYTES,
    DEVICE_CLASS_SIGNAL_STRENGTH,
    DEVICE_CLASS_TIMESTAMP,
    PERCENTAGE,
    SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
)
from homeassistant.helpers.entity import Entity
from homeassistant.helpers.typing import HomeAssistantType
from homeassistant.util.dt import utcnow

from . import WLEDDataUpdateCoordinator, WLEDDeviceEntity
from .const import ATTR_LED_COUNT, ATTR_MAX_POWER, CURRENT_MA, DOMAIN

async def async_setup_entry(
    hass: HomeAssistantType,
    entry: ConfigEntry,
    async_add_entities: Callable[[List[Entity], bool], None],
) -> None:
    """Set up WLED sensor based on a config entry."""
    coordinator: WLEDDataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id]

    sensors = [
        WLEDEstimatedCurrentSensor(entry.entry_id, coordinator),
        WLEDUptimeSensor(entry.entry_id, coordinator),
        WLEDFreeHeapSensor(entry.entry_id, coordinator),
        WLEDWifiBSSIDSensor(entry.entry_id, coordinator),
        WLEDWifiChannelSensor(entry.entry_id, coordinator),
        WLEDWifiRSSISensor(entry.entry_id, coordinator),
        WLEDWifiSignalSensor(entry.entry_id, coordinator),
    ]

    async_add_entities(sensors, True)

class WLEDSensor(WLEDDeviceEntity):
    """Defines a WLED sensor."""

    def __init__(
        self,
        *,
        coordinator: WLEDDataUpdateCoordinator,
        enabled_default: bool = True,
        entry_id: str,
        icon: str,
        key: str,
        name: str,
        unit_of_measurement: Optional[str] = None,
    ) -> None:
        """Initialize WLED sensor."""
        self._unit_of_measurement = unit_of_measurement
        self._key = key

        super().__init__(
            entry_id=entry_id,
            coordinator=coordinator,
            name=name,
            icon=icon,
            enabled_default=enabled_default,
        )

    @property
    def unique_id(self) -> str:
        """Return the unique ID for this sensor."""
        return f"{self.coordinator.data.info.mac_address}_{self._key}"

    @property
    def unit_of_measurement(self) -> str:
        """Return the unit this state is expressed in."""
        return self._unit_of_measurement

class WLEDEstimatedCurrentSensor(WLEDSensor):
    """Defines a WLED estimated current sensor."""

    def __init__(self, entry_id: str, coordinator: WLEDDataUpdateCoordinator) -> None:
        """Initialize WLED estimated current sensor."""
        super().__init__(
            coordinator=coordinator,
            entry_id=entry_id,
            icon="mdi:power",
            key="estimated_current",
            name=f"{coordinator.data.info.name} Estimated Current",
            unit_of_measurement=CURRENT_MA,
        )

    @property
    def device_state_attributes(self) -> Optional[Dict[str, Any]]:
        """Return the state attributes of the entity."""
        return {
            ATTR_LED_COUNT: self.coordinator.data.info.leds.count,
            ATTR_MAX_POWER: self.coordinator.data.info.leds.max_power,
        }

    @property
    def state(self) -> int:
        """Return the state of the sensor."""
        return self.coordinator.data.info.leds.power

    @property
    def device_class(self) -> Optional[str]:
        """Return the class of this sensor."""
        return DEVICE_CLASS_CURRENT

class WLEDUptimeSensor(WLEDSensor):
    """Defines a WLED uptime sensor."""

    def __init__(self, entry_id: str, coordinator: WLEDDataUpdateCoordinator) -> None:
        """Initialize WLED uptime sensor."""
        super().__init__(
            coordinator=coordinator,
            enabled_default=False,
            entry_id=entry_id,
            icon="mdi:clock-outline",
            key="uptime",
            name=f"{coordinator.data.info.name} Uptime",
        )

    @property
    def state(self) -> str:
        """Return the state of the sensor."""
        uptime = utcnow() - timedelta(seconds=self.coordinator.data.info.uptime)
        return uptime.replace(microsecond=0).isoformat()

    @property
    def device_class(self) -> Optional[str]:
        """Return the class of this sensor."""
        return DEVICE_CLASS_TIMESTAMP

class WLEDFreeHeapSensor(WLEDSensor):
    """Defines a WLED free heap sensor."""

    def __init__(self, entry_id: str, coordinator: WLEDDataUpdateCoordinator) -> None:
        """Initialize WLED free heap sensor."""
        super().__init__(
            coordinator=coordinator,
            enabled_default=False,
            entry_id=entry_id,
            icon="mdi:memory",
            key="free_heap",
            name=f"{coordinator.data.info.name} Free Memory",
            unit_of_measurement=DATA_BYTES,
        )

    @property
    def state(self) -> int:
        """Return the state of the sensor."""
        return self.coordinator.data.info.free_heap

class WLEDWifiSignalSensor(WLEDSensor):
    """Defines a WLED Wi-Fi signal sensor."""

    def __init__(self, entry_id: str, coordinator: WLEDDataUpdateCoordinator) -> None:
        """Initialize WLED Wi-Fi signal sensor."""
        super().__init__(
            coordinator=coordinator,
            enabled_default=False,
            entry_id=entry_id,
            icon="mdi:wifi",
            key="wifi_signal",
            name=f"{coordinator.data.info.name} Wi-Fi Signal",
            unit_of_measurement=PERCENTAGE,
        )

    @property
    def state(self) -> int:
        """Return the state of the sensor."""
        return self.coordinator.data.info.wifi.signal

class WLEDWifiRSSISensor(WLEDSensor):
    """Defines a WLED Wi-Fi RSSI sensor."""

    def __init__(self, entry_id: str, coordinator: WLEDDataUpdateCoordinator) -> None:
        """Initialize WLED Wi-Fi RSSI sensor."""
        super().__init__(
            coordinator=coordinator,
            enabled_default=False,
            entry_id=entry_id,
            icon="mdi:wifi",
            key="wifi_rssi",
            name=f"{coordinator.data.info.name} Wi-Fi RSSI",
            unit_of_measurement=SIGNAL_STRENGTH_DECIBELS_MILLIWATT,
        )

    @property
    def state(self) -> int:
        """Return the state of the sensor."""
        return self.coordinator.data.info.wifi.rssi

    @property
    def device_class(self) -> Optional[str]:
        """Return the class of this sensor."""
        return DEVICE_CLASS_SIGNAL_STRENGTH

class WLEDWifiChannelSensor(WLEDSensor):
    """Defines a WLED Wi-Fi Channel sensor."""

    def __init__(self, entry_id: str, coordinator: WLEDDataUpdateCoordinator) -> None:
        """Initialize WLED Wi-Fi Channel sensor."""
        super().__init__(
            coordinator=coordinator,
            enabled_default=False,
            entry_id=entry_id,
            icon="mdi:wifi",
            key="wifi_channel",
            name=f"{coordinator.data.info.name} Wi-Fi Channel",
        )

    @property
    def state(self) -> int:
        """Return the state of the sensor."""
        return self.coordinator.data.info.wifi.channel

class WLEDWifiBSSIDSensor(WLEDSensor):
    """Defines a WLED Wi-Fi BSSID sensor."""

    def __init__(self, entry_id: str, coordinator: WLEDDataUpdateCoordinator) -> None:
        """Initialize WLED Wi-Fi BSSID sensor."""
        super().__init__(
            coordinator=coordinator,
            enabled_default=False,
            entry_id=entry_id,
            icon="mdi:wifi",
            key="wifi_bssid",
            name=f"{coordinator.data.info.name} Wi-Fi BSSID",
        )

    @property
    def state(self) -> str:
        """Return the state of the sensor."""
        return self.coordinator.data.info.wifi.bssid


text:
package net.spy.memcached.collection;

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

import net.spy.memcached.KeyUtil;
import net.spy.memcached.MemcachedNode;
import net.spy.memcached.util.BTreeUtil;

public class BTreeSMGetWithLongTypeBkeyOld<T> implements BTreeSMGet<T> {

  private static final String command = "bop smget";

  protected MemcachedNode node;

  protected String str;

  protected List<String> keyList;
  private String keySeparator;
  private String spaceSeparatedKeys;

  protected int lenKeys;

  protected String range;
  protected int offset = -1;
  protected int count;
  protected Map<Integer, T> map;

  protected boolean reverse;

  private String key;
  private int flag;
  private Long subkey;
  private int dataLength;

  private byte[] eflag = null;

  private ElementFlagFilter eFlagFilter;

  public BTreeSMGetWithLongTypeBkeyOld(MemcachedNode node,
                                       List<String> keyList, long from, long to,
                                       ElementFlagFilter eFlagFilter,
                                       int offset, int count) {
    this.node = node;
    this.keyList = keyList;
    this.range = String.valueOf(from) + ".." + String.valueOf(to);
    this.eFlagFilter = eFlagFilter;
    this.offset = offset;
    this.count = count;
    this.reverse = (from > to);
  }

  public BTreeSMGetWithLongTypeBkeyOld(MemcachedNode node,
                                       List<String> keyList, long bkey,
                                       ElementFlagFilter eFlagFilter,
                                       int offset, int count) {
    this.node = node;
    this.keyList = keyList;
    this.range = String.valueOf(bkey);
    this.eFlagFilter = eFlagFilter;
    this.offset = offset;
    this.count = count;
    this.reverse = false;
  }

  public void setKeySeparator(String keySeparator) {
    this.keySeparator = keySeparator;
  }

  public String getSpaceSeparatedKeys() {
    if (spaceSeparatedKeys != null) {
      return spaceSeparatedKeys;
    }

    StringBuilder sb = new StringBuilder();
    int numkeys = keyList.size();
    for (int i = 0; i < numkeys; i++) {
      sb.append(keyList.get(i));
      if ((i + 1) < numkeys) {
        sb.append(keySeparator);
      }
    }
    spaceSeparatedKeys = sb.toString();
    return spaceSeparatedKeys;
  }

  public MemcachedNode getMemcachedNode() {
    return node;
  }

  public List<String> getKeyList() {
    return keyList;
  }

  public String stringify() {
    if (str != null) {
      return str;
    }

    StringBuilder b = new StringBuilder();

    b.append(KeyUtil.getKeyBytes(getSpaceSeparatedKeys()).length);
    b.append(" ").append(keyList.size());
    b.append(" ").append(range);

    if (eFlagFilter != null) {
      b.append(" ").append(eFlagFilter.toString());
    }

    if (offset > 0) {
      b.append(" ").append(offset);
    }

    b.append(" ").append(count);

    str = b.toString();
    return str;
  }

  public String getCommand() {
    return command;
  }

  public boolean headerReady(int spaceCount) {
    return headerCount == spaceCount;
  }

  public String getKey() {
    return key;
  }

  public int getFlag() {
    return flag;
  }

  public Long getSubkey() {
    return subkey;
  }

  public int getDataLength() {
    return dataLength;
  }

  public boolean isReverse() {
    return reverse;
  }

  public boolean hasEflag() {
    return eflag != null;
  }

  public void decodeItemHeader(String itemHeader) {
    String[] splited = itemHeader.split(" ");

    /*
    with flag
      VALUE 1
      SMGetTest31 0 1 0x45464C4147 6 VALUE1
      MISSED_KEYS 0
      END

    without flag
      VALUE 1
      SMGetTest31 0 1 6 VALUE1
      MISSED_KEYS 0
      END
     */
    this.key = splited[0];
    this.flag = Integer.parseInt(splited[1]);
    this.subkey = Long.parseLong(splited[2]);

    if (splited[3].startsWith("0x")) {
      this.eflag = BTreeUtil.hexStringToByteArrays(splited[3].substring(2));
      this.dataLength = Integer.parseInt(splited[4]);
    } else {
      this.eflag = null;
      this.dataLength = Integer.parseInt(splited[3]);
    }
  }
}


text:
package stack.patterns.state;

/**
 * @author Damjan Vantur
 *
 */
public class GameEndedState implements State {

	GameServer server;

	public GameEndedState(GameServer server) {
		this.server = server;
	}

	@Override
	public void openGameRequest() {
	}

	@Override
	public void generateGameId() {
	}

	@Override
	public void resumeGame() {
	}

	@Override
	public void placeABet() {
	}

	@Override
	public void settleBets() {
	}

}


text:
<?php
namespace Tests\Type\Numbers;

/**
 * ToFloatTest
 *
 * Created 3/29/16 4:52 PM
 * Tests for the Number::toFloat() method
 *
 * @author Nate Nolting <naten@paulbunyan.net>
 * @package Pbc\Bandolier\Type
 */

use Pbc\Bandolier\Type\Numbers;
use Tests\BandolierTestCase;

class ToFloatTest extends BandolierTestCase
{

    /**
     * @test
     */
    public function a_string_number_will_return_a_float()
    {
        $this->assertSame(1.25, Numbers::toFloat('1.25'));
        $this->assertSame(1.25, Numbers::toFloat('$1.25'));
        $this->assertSame(1000.25, Numbers::toFloat('$1,000.25'));
        $this->assertSame(1000000.25, Numbers::toFloat('$1,000,000.25'));
        $this->assertSame(100.25, Numbers::toFloat('abc100def.25xyz'));
    }

    /**
     * @test
     */
    public function a_integer_will_return_as_a_float()
    {
        $this->assertSame(125.0, Numbers::toFloat('125'));
    }
}


text:
package com.all.core.common.view.util;

import java.awt.Color;

public interface SelectedTextForeground {
	Color SELECTED_FOREGROUND_COLOR = new Color(220, 200, 225);

}


text:
Shibboleth
==========

.. contents:: :local:

Status: Experimental
--------------------

Shibboleth support in Dataverse should be considered **experimental** until the following issue is closed: https://github.com/IQSS/dataverse/issues/2117

In Dataverse 4.0, Shibboleth support requires fronting Glassfish with Apache as described below, but this configuration has not been heavily tested in a production environment and is not recommended until this issue is closed: https://github.com/IQSS/dataverse/issues/2180

System Requirements
-------------------

Only Red Hat Enterprise Linux (RHEL) 6 and derivatives such as CentOS have been tested and only on x86_64. RHEL 7 and Centos 7 **should** work but you'll need to adjust the yum repo config accordingly.

Debian and Ubuntu are not recommended until this issue is closed: https://github.com/IQSS/dataverse/issues/1059

Installation
------------

Install Apache
~~~~~~~~~~~~~~

We include ``mod_ssl`` for HTTPS support.

``yum install httpd mod_ssl``

Install Shibboleth
~~~~~~~~~~~~~~~~~~

Enable Shibboleth Yum Repo
^^^^^^^^^^^^^^^^^^^^^^^^^^

This yum repo is recommended at https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPLinuxRPMInstall

``cd /etc/yum.repos.d``

``wget http://download.opensuse.org/repositories/security:/shibboleth/CentOS_CentOS-6/security:shibboleth.repo``

Install Shibboleth Via Yum
^^^^^^^^^^^^^^^^^^^^^^^^^^

``yum install shibboleth shibboleth-embedded-ds``

Configuration
-------------

Configure Glassfish
~~~~~~~~~~~~~~~~~~~

Apply GRIZZLY-1787 Patch
^^^^^^^^^^^^^^^^^^^^^^^^

In order for the Dataverse "download as zip" feature to work well with large files without causing ``OutOfMemoryError`` problems on Glassfish 4.1, you should stop Glassfish, with ``asadmin stop-domain domain1``, make a backup of ``glassfish4/glassfish/modules/glassfish-grizzly-extra-all.jar``, replace it with a patched version of ``glassfish-grizzly-extra-all.jar`` downloaded from `here <../_static/installation/files/issues/2180/grizzly-patch/glassfish-grizzly-extra-all.jar>`_ (the md5 is in the `README <../_static/installation/files/issues/2180/grizzly-patch/readme.md>`_), and start Glassfish again with ``asadmin start-domain domain1``.

For more background on the patch, please see https://java.net/jira/browse/GRIZZLY-1787 and https://github.com/IQSS/dataverse/issues/2180 and https://github.com/payara/Payara/issues/350

This problem has been reported to Glassfish at https://java.net/projects/glassfish/lists/users/archive/2015-07/message/1 and when Glassfish 4.2 ships the Dataverse team plans to evaulate if the version of Grizzly included is new enough to include the bug fix, obviating the need for the patch.

Glassfish HTTP and HTTPS ports
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Ensure that the Glassfish HTTP service is listening on the default port (8080):

``asadmin set server-config.network-config.network-listeners.network-listener.http-listener-1.port=8080``

Ensure that the Glassfish HTTPS service is listening on the default port (8181):

``asadmin set server-config.network-config.network-listeners.network-listener.http-listener-2.port=8181``

AJP
^^^

A ``jk-connector`` network listener should have already been set up at installation time and you can verify this with ``asadmin list-network-listeners`` but for reference, here is the command that is used:

``asadmin create-network-listener --protocol http-listener-1 --listenerport 8009 --jkenabled true jk-connector``

This enables the `AJP protocol <http://en.wikipedia.org/wiki/Apache_JServ_Protocol>`_ used in Apache configuration files below.

SSLEngine Warning Workaround
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

When fronting Glassfish with Apache and using the jk-connector (AJP, mod_proxy_ajp), in your Glassfish server.log you can expect to see "WARNING ... org.glassfish.grizzly.http.server.util.RequestUtils ... jk-connector ... Unable to populate SSL attributes java.lang.IllegalStateException: SSLEngine is null".

To hide these warnings, run ``asadmin set-log-levels org.glassfish.grizzly.http.server.util.RequestUtils=SEVERE`` so that the WARNING level is hidden as recommended at https://java.net/jira/browse/GLASSFISH-20694 and https://github.com/IQSS/dataverse/issues/643#issuecomment-49654847

Configure Apache
~~~~~~~~~~~~~~~~

Enforce HTTPS
^^^^^^^^^^^^^

To prevent attacks such as `FireSheep <http://en.wikipedia.org/wiki/Firesheep>`_, HTTPS should be enforced. https://wiki.apache.org/httpd/RewriteHTTPToHTTPS provides a good method. Here is how it looks in a `sample file <../_static/installation/files/etc/httpd/conf.d/shibtest.dataverse.org.conf>`_ at ``/etc/httpd/conf.d/shibtest.dataverse.org.conf``:

.. literalinclude:: ../_static/installation/files/etc/httpd/conf.d/shibtest.dataverse.org.conf

Edit Apache Config Files
^^^^^^^^^^^^^^^^^^^^^^^^
``/etc/httpd/conf.d/ssl.conf`` should contain the FQDN of your hostname like this: ``ServerName shibtest.dataverse.org:443``

Near the bottom of ``/etc/httpd/conf.d/ssl.conf`` but before the closing ``</VirtualHost>`` directive add the following:

.. code-block:: text

    # don't pass paths used by rApache and TwoRavens to Glassfish
    ProxyPassMatch ^/RApacheInfo$ !
    ProxyPassMatch ^/custom !
    ProxyPassMatch ^/dataexplore !
    # don't pass paths used by Shibboleth to Glassfish
    ProxyPassMatch ^/Shibboleth.sso !
    ProxyPassMatch ^/shibboleth-ds !
    # pass everything else to Glassfish
    ProxyPass / ajp://localhost:8009/

    <Location /shib.xhtml>
      AuthType shibboleth
      ShibRequestSetting requireSession 1
      require valid-user
    </Location>

You can download a `sample ssl.conf file <../_static/installation/files/etc/httpd/conf.d/ssl.conf>`_.

Note that ``/etc/httpd/conf.d/shib.conf`` and ``/etc/httpd/conf.d/shibboleth-ds.conf`` are expected to be present from installing Shibboleth via yum.

Configure Shibboleth
~~~~~~~~~~~~~~~~~~~~

shibboleth2.xml
^^^^^^^^^^^^^^^

``/etc/shibboleth/shibboleth2.xml`` should look something like the `sample shibboleth2.xml file <../_static/installation/files/etc/shibboleth/shibboleth2.xml>`_ below, but you must substitute your hostname in the ``entityID`` value. If your starting point is a ``shibboleth2.xml`` file provided by someone else, you must ensure that ``attributePrefix="AJP_"`` is added under ``ApplicationDefaults`` per the `Shibboleth wiki <https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPJavaInstall>`_ . Without the ``AJP_`` configuration in place, the required :ref:`shibboleth-attributes` will be null and users will be unable to log in.

.. literalinclude:: ../_static/installation/files/etc/shibboleth/shibboleth2.xml
   :language: xml

attribute-map.xml
^^^^^^^^^^^^^^^^^

By default, some attributes ``/etc/shibboleth/attribute-map.xml`` are commented out. Edit the file to enable them.

You can download a `sample attribute-map.xml file <../_static/installation/files/etc/shibboleth/attribute-map.xml>`_.

dataverse-idp-metadata.xml
^^^^^^^^^^^^^^^^^^^^^^^^^^

The configuration above looks for the metadata for the Identity Providers (IdPs) in a file at ``/etc/shibboleth/dataverse-idp-metadata.xml``.  You can download a `sample dataverse-idp-metadata.xml file <../_static/installation/files/etc/shibboleth/dataverse-idp-metadata.xml>`_ and that includes the TestShib IdP from http://testshib.org .

Disable SELinux
~~~~~~~~~~~~~~~

You must set ``SELINUX=permisive`` in ``/etc/selinux/config`` and run ``setenforce permissive`` or otherwise disable SELinux for Shibboleth to work. "At the present time, we do not support the SP in conjunction with SELinux, and at minimum we know that communication between the mod_shib and shibd components will fail if it's enabled. Other problems may also occur." -- https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPSELinux

Restart Apache and Shibboleth
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

After configuration is complete:

``service shibd restart``

``service httpd restart``

As a sanity check, visit the following URLs for your hostname to make sure you see JSON and XML:

- https://shibtest.dataverse.org/Shibboleth.sso/DiscoFeed
- https://shibtest.dataverse.org/Shibboleth.sso/Metadata

The JSON in ``DiscoFeed`` comes from the list of IdPs in ``/etc/shibboleth/dataverse-idp-metadata.xml`` and will form a dropdown list on the Login Page.

Enable Shibboleth
~~~~~~~~~~~~~~~~~

``curl -X PUT -d true http://localhost:8080/api/admin/settings/:ShibEnabled``

After enabling Shibboleth, assuming the ``DiscoFeed`` is working per above, you should see a list of institutions to log into. You will not be able to log in via these institutions, however, until you have exchanged metadata with them.

.. _shibboleth-attributes:

Shibboleth Attributes
---------------------

The following attributes are required for a successful Shibboleth login:

- Shib-Identity-Provider
- eppn
- givenName
- sn
- email

See also https://www.incommon.org/federation/attributesummary.html and https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPAttributeAccess

For discussion of "eppn" vs. other attributes such as "eduPersonTargetedID" or "NameID", please see https://github.com/IQSS/dataverse/issues/1422

Testing
-------

http://testshib.org is a fantastic resource for testing Shibboleth configurations.

First, download your metadata like this (substituting your hostname in both places):

``curl https://shibtest.dataverse.org/Shibboleth.sso/Metadata > shibtest.dataverse.org``

Then upload it to http://testshib.org/register.html

Then try to log in.

Please note that when you try logging in via the TestShib IdP, it is expected that you'll see errors about the "mail" attribute being null. (TestShib is aware of this but it isn't a problem for testing.)

When you are done testing, you can delete the TestShib users you created like this:

``curl -X DELETE http://localhost:8080/api/admin/authenticatedUsers/myself``

Backups
-------

It's important to back up these files:

- ``/etc/shibboleth/sp-cert.pem``
- ``/etc/shibboleth/sp-key.pem``

Feedback
--------

Given that Shibboleth support is experimental and new, feedback is very welcome at support@dataverse.org or via http://community.dataverse.org/community-groups/auth.html .


text:
CRT.factory("NavbarService", function () {
    'use strict';

    var that = {};

    that.search = {
        term: ""
    };

    that.actions = {
        enabled: true
    };

    return that;
});


text:
from __future__ import absolute_import

import datetime

import dateutil
from dateutil.tz import tzutc
from libtaxii.constants import *

from taxii_services import models
from taxii_services.exceptions import StatusMessageException

class PollRequestProperties(object):
    """
    Holds a bunch of different items
    relating to fulfilling a PollRequest.

    It's similar to a tm11.PollRequest object,
    but holds some items specific to how
    django-taxii-services does things
    """

    def __init__(self):
        self.poll_request = None
        self.message_id = None
        self.collection = None
        self.subscription = None
        self.response_type = None
        self.content_bindings = None
        self.allow_asynch = None
        self.query = None
        self.supported_query = None
        self.exclusive_begin_timestamp_label = None
        self.inclusive_end_timestamp_label = None
        self.delivery_parameters = None

    def get_db_kwargs(self):
        kwargs = {}
        if self.collection.type == CT_DATA_FEED:
            if self.exclusive_begin_timestamp_label:
                kwargs['timestamp_label__gt'] = self.exclusive_begin_timestamp_label
            if self.inclusive_end_timestamp_label:
                kwargs['timestamp_label__lte'] = self.inclusive_end_timestamp_label
        if self.content_bindings:
            kwargs['content_binding__in'] = self.content_bindings
        return kwargs

    @staticmethod
    def from_poll_request_10(poll_service, poll_request):
        prp = PollRequestProperties()
        prp.poll_request = poll_request
        prp.message_id = poll_request.message_id
        prp.collection = poll_service.validate_collection_name(poll_request.feed_name, poll_request.message_id)

        if poll_request.subscription_id:
            try:
                s = models.Subscription.objects.get(subscription_id=poll_request.subscription_id)
                prp.subscription = s
            except models.Subscription.DoesNotExist:
                raise StatusMessageException(poll_request.message_id,
                                             ST_NOT_FOUND,
                                             status_detail={SD_ITEM: poll_request.subscription_id})
            prp.response_type = None
            prp.content_bindings = s.content_binding.all()
            prp.allow_asynch = None
            prp.delivery_parameters = s.delivery_parameters
        else:
            prp.response_type = None
            prp.content_bindings = prp.collection.get_binding_intersection_10(poll_request.content_bindings, prp.message_id)
            prp.delivery_parameters = None

        if prp.collection.type != CT_DATA_FEED:  # Only Data Feeds existed in TAXII 1.0
            raise StatusMessageException(poll_request.message_id,
                                         ST_NOT_FOUND,
                                         "The Named Data Collection is not a Data Feed, it is a Data Set. "
                                         "Only Data Feeds can be"
                                         "Polled in TAXII 1.0",
                                         {SD_ITEM: poll_request.feed_name})

        current_datetime = datetime.datetime.now(tzutc())
        # If the request specifies a timestamp label in an acceptable range, use it.
        # Otherwise, don't use a begin timestamp label
        if poll_request.exclusive_begin_timestamp_label:
            pr_ebtl = poll_request.exclusive_begin_timestamp_label
            if pr_ebtl < current_datetime:
                prp.exclusive_begin_timestamp_label = poll_request.exclusive_begin_timestamp_label

        # Use either the specified end timestamp label;
        # or the current time iff the specified end timestmap label is after the current time
        prp.inclusive_end_timestamp_label = current_datetime
        if poll_request.inclusive_end_timestamp_label:
            pr_ietl = poll_request.inclusive_end_timestamp_label
            if pr_ietl < current_datetime:
                prp.inclusive_end_timestamp_label = poll_request.inclusive_end_timestamp_label

        if ((prp.inclusive_end_timestamp_label is not None and prp.exclusive_begin_timestamp_label is not None) and
            prp.inclusive_end_timestamp_label < prp.exclusive_begin_timestamp_label):
            raise StatusMessageException(prp.message_id,
                                         ST_FAILURE,
                                         message="Invalid Timestamp Labels: End TS Label is earlier "
                                                 "than Begin TS Label")

        return prp

    @staticmethod
    def from_poll_request_11(poll_service, poll_request):
        prp = PollRequestProperties()
        prp.poll_request = poll_request
        prp.message_id = poll_request.message_id
        prp.collection = poll_service.validate_collection_name(poll_request.collection_name, poll_request.message_id)

        if poll_request.subscription_id:
            try:
                s = models.Subscription.objects.get(subscription_id=poll_request.subscription_id)
                prp.subscription = s
            except models.Subscription.DoesNotExist:
                raise StatusMessageException(poll_request.message_id,
                                             ST_NOT_FOUND,
                                             "The subscription was not found",
                                             {SD_ITEM: poll_request.subscription_id})
            prp.response_type = s.response_type
            prp.content_bindings = s.content_binding.all()
            prp.allow_asynch = False
            prp.query = s.query
            if prp.query:
                prp.supported_query = poll_service.get_supported_query(prp.query, prp.message_id)
            else:
                prp.supported_query = None
            prp.delivery_parameters = s.delivery_parameters
        else:
            pp = poll_request.poll_parameters
            prp.response_type = pp.response_type
            prp.content_bindings = prp.collection.get_binding_intersection_11(pp.content_bindings, prp.message_id)
            prp.allow_asynch = pp.allow_asynch
            prp.query = pp.query
            if prp.query:
                prp.supported_query = poll_service.get_supported_query(prp.query, prp.message_id)
            else:
                prp.supported_query = None
            prp.delivery_parameters = pp.delivery_parameters

        if prp.collection.type == CT_DATA_FEED:  # Only data feeds care about timestamp labels
            current_datetime = datetime.datetime.now(tzutc())

            # If the request specifies a timestamp label in an acceptable range, use it.
            # Otherwise, don't use a begin timestamp label
            if poll_request.exclusive_begin_timestamp_label:
                pr_ebtl = poll_request.exclusive_begin_timestamp_label
                if pr_ebtl < current_datetime:
                    prp.exclusive_begin_timestamp_label = poll_request.exclusive_begin_timestamp_label

            # Use either the specified end timestamp label;
            # or the current time iff the specified end timestmap label is after the current time
            prp.inclusive_end_timestamp_label = current_datetime
            if poll_request.inclusive_end_timestamp_label:
                pr_ietl = poll_request.inclusive_end_timestamp_label
                if pr_ietl < current_datetime:
                    prp.inclusive_end_timestamp_label = poll_request.inclusive_end_timestamp_label

            if ((prp.inclusive_end_timestamp_label is not None and prp.exclusive_begin_timestamp_label is not None) and
                prp.inclusive_end_timestamp_label < prp.exclusive_begin_timestamp_label):
                raise StatusMessageException(prp.message_id,
                                             ST_FAILURE,
                                             message="Invalid Timestamp Labels: End TS Label is earlier "
                                                     "than Begin TS Label")

        return prp


text:
// Karma configuration
// http://karma-runner.github.io/0.10/config/configuration-file.html
'use strict';

module.exports = function(config) {
    config.set({
        // base path, that will be used to resolve files and exclude
        basePath: '../',

        // testing framework to use (jasmine/mocha/qunit/...)
        frameworks: ['jasmine'],

        // list of files / patterns to load in the browser
        files: [
            'node_modules/d3/d3.js',
            'node_modules/jquery/dist/jquery.js',
            'node_modules/angular/angular.js',
            'node_modules/bmoor/dist/bmoor.js',
            'node_modules/bmoor-data/dist/bmoor-data.js',
            'dist/v-graph.js',
            //------------
            //'test/lib/**.js',
            //'test/mock/**/*.js',
            'test/*.js',
            'test/**/*.js'
        ],

        reporters: ['progress'],

        // list of files / patterns to exclude
        exclude: [],

        // web server port
        browserNoActivityTimeout: 100000,
        port: 9999,

        // level of logging
        // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
        logLevel: config.LOG_INFO,

        // enable / disable watching file and executing tests whenever any file changes
        autoWatch: false,

        // Start these browsers, currently available:
        // - Chrome
        // - ChromeCanary
        // - Firefox
        // - Opera
        // - Safari (only Mac)
        // - PhantomJS
        // - IE (only Windows)
        browsers: ['PhantomJS'],

        // Continuous Integration mode
        // if true, it capture browsers, run tests and exit
        singleRun: false
    });
};


text:
def do_something(input1, input2, input3)

end
# I worked on this challenge [by myself, with: ].

# Your Solution Below


text:
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.easeml</groupId>
    <artifactId>easeml</artifactId>
    <version>0.1.0</version>

    <packaging>jar</packaging>
    <name>easeml</name>
    <url>http://maven.apache.org</url>

    <properties>
        <scala.version>2.10.5</scala.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-compiler</artifactId>
            <version>${scala.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-reflect</artifactId>
            <version>${scala.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-core_2.10</artifactId>
            <version>2.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.12</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.12</version>
        </dependency>
        <dependency>
            <groupId>com.github.nscala-time</groupId>
            <artifactId>nscala-time_2.10</artifactId>
            <version>2.10.0</version>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.9.2</version>
        </dependency>
        <dependency>
            <groupId>com.github.scopt</groupId>
            <artifactId>scopt_2.11</artifactId>
            <version>3.5.0</version>
        </dependency>
        <dependency>
            <groupId>org.ansj</groupId>
            <artifactId>ansj_seg</artifactId>
            <version>5.0.1</version>
        </dependency>
        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_2.10</artifactId>
            <version>3.0.0</version>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>mvn-repo</id>
            <url>http://maven.nlpcn.org/</url>
        </repository>
    </repositories>
    <build>
        <plugins>
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <recompileMode>incremental</recompileMode>
                    <useZincServer>false</useZincServer>
                </configuration>
                <executions>
                    <execution>
                        <id>compile</id>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <finalName>easeml</finalName>
    </build>
</project>


text:
class AliFemtoEvent;
class AliFemtoTrack;
class AliFemtoV0;
class AliFemtoKink;
class AliFemtoPair; // Gael 12/04/02
class TH1D;
class TH2D;
class TList;
#include "AliFemtoString.h"
#include "AliFemtoParticleCollection.h"
#include "AliFemtoCutMonitor.h"

class AliFemtoCutMonitorParticlePtPDGV0 : public AliFemtoCutMonitor{

public:
  AliFemtoCutMonitorParticlePtPDGV0();
  AliFemtoCutMonitorParticlePtPDGV0(const char *aName, float aMass);
  AliFemtoCutMonitorParticlePtPDGV0(const AliFemtoCutMonitorParticlePtPDGV0 &aCut);
  virtual ~AliFemtoCutMonitorParticlePtPDGV0();

  AliFemtoCutMonitorParticlePtPDGV0& operator=(const AliFemtoCutMonitorParticlePtPDGV0& aCut);

  virtual AliFemtoString Report();
  virtual void Fill(const AliFemtoEvent* aEvent) {AliFemtoCutMonitor::Fill(aEvent);}
  virtual void Fill(const AliFemtoTrack* aTrack)  {AliFemtoCutMonitor::Fill(aTrack);};
  virtual void Fill(const AliFemtoV0* aV0);
  virtual void Fill(const AliFemtoKink* aKink) {AliFemtoCutMonitor::Fill(aKink);}
  virtual void Fill(const AliFemtoPair* aPair) {AliFemtoCutMonitor::Fill(aPair);}
  virtual void Fill(const AliFemtoParticleCollection* aCollection) {AliFemtoCutMonitor::Fill(aCollection);}
  virtual void Fill(const AliFemtoEvent* aEvent,const AliFemtoParticleCollection* aCollection)
  {AliFemtoCutMonitor::Fill(aEvent, aCollection);}
  virtual void Fill(const AliFemtoParticleCollection* aCollection1,const AliFemtoParticleCollection* aCollection2) {AliFemtoCutMonitor::Fill(aCollection1, aCollection2);}

  void Write();

  virtual TList *GetOutputList();

private:
  TH2D *fPtPDG;    // Rapidity vs. Pt monitor
  TH2D *ftpcHist;  // TPC histogram
  TH1D *fPtMostProbable; // V0s we have
  TH1D *fPtFakeLambdas; // Fake lambdas
  TH1D *fFakeProtonDaughters;  // Fake proton daughters
  TH1D *fFakeAntiProtonDaughters;  // Fake antiproton daughters
  TH1D *fFakePionPlusDaughters;  // Fake pion daughters
  TH1D *fFakePionMinusDaughters;  // Fake pion minus daughters

  TH1D *fPtV0;  // Pt spectra of real lambdas
  TH1D *fPtPosProton;// Pt spectra of proton positive daughters
  TH1D *fPtNegProton;// Pt spectra of proton negative daughters
  TH1D *fPtPosPion; //  Pt spectra of pion positive daughters
  TH1D *fPtNegPion;//  Pt spectra of pion negative daughters

  //TH2D *fYPhi;   // Rapidity cs. Phi monitor
  //TH2D *fPtPhi;  // Pt vs. Phi monitor
  //TH2D *fEtaPhi; // Pseudorapidity vs. Phi monitor
  //TH2D *fEtaPt;  // Pseudorapidity vs. Pt monitor
  float fMass;   // Mass hypothesis
};

#endif


text:
require "openseadragon/version"
require "openseadragon/engine"

module Openseadragon
end


text:
@interface CMBorrowDetailViewController : RootViewController

- (instancetype)initWithParams:(NSDictionary *)params;

@end


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Runtime.Serialization;
using System.Data;

namespace TransactionalNodeService.Common.Model
{
    [DataContract(Namespace = "http://sevensigma.com.au/TransactionalNodeService/OpObjects", Name = "RE")]
    public class Relationship : IMapElement, IMapElementLoader
    {
        protected Dictionary<Guid, Metadata> _metadata = new Dictionary<Guid, Metadata>();
        protected Dictionary<Guid, Metadata> _nodes = new Dictionary<Guid, Metadata>();

        public Relationship()
        {
            Nodes = new Dictionary<Guid, Guid>();
            Metadata = new Dictionary<MetadataContext, Metadata>();
        }

        [DataMember(Name = "R")]
        public Guid RelationshipUid
        {
            get;
            set;
        }

        [DataMember(Name = "O")]
        public string RelationshipOriginalId
        {
            get;
            set;
        }

        [DataMember(Name = "T")]
        public Guid RelationshipTypeUid
        {
            get;
            set;
        }

        [DataMember(Name = "D")]
        public Guid DomainUid
        {
            get;
            set;
        }

        [DataMember(Name = "RM")]
        public Guid? RootMapUid
        {
            get;
            set;
        }

        [DataMember(Name = "CR")]
        public DateTime? Created
        {
            get;
            set;
        }

        [DataMember(Name = "MO")]
        public DateTime? Modified
        {
            get;
            set;
        }

        [DataMember(Name = "CB")]
        public string CreatedBy
        {
            get;
            set;
        }

        [DataMember(Name = "MB")]
        public string ModifiedBy
        {
            get;
            set;
        }

        [DataMember(Name = "N")]
        public Dictionary<Guid, Guid> Nodes
        {
            get;
            set;
        }

        [DataMember(Name = "M")]
        public Dictionary<MetadataContext, Metadata> Metadata
        {
            get;
            set;
        }

        public void AddNode(Descriptor descriptor)
        {
            Nodes.Add(descriptor.DescriptorTypeUid, descriptor.NodeUid);
        }

        public void LoadElement(IDataRecord record)
        {
            RelationshipUid = (Guid)record["RelationshipUid"];

            if (record["RelationshipOriginalId"] != DBNull.Value)
            {
                RelationshipOriginalId = (string)record["RelationshipOriginalId"];
            }
            else
            {
                RelationshipOriginalId = null;
            }

            RelationshipTypeUid = (Guid)record["RelationshipTypeUid"];
            DomainUid = (Guid)record["DomainUid"];

            if (record["RootMapUid"] != DBNull.Value)
            {
                RootMapUid = (Guid)record["RootMapUid"];
            }
            else
            {
                RootMapUid = Guid.Empty;
            }

            if (record["Created"] != DBNull.Value)
            {
                Created = (DateTime?)record["Created"];
            }
            else
            {
                Created = null;
            }

            if (record["Modified"] != DBNull.Value)
            {
                Modified = (DateTime?)record["Modified"];
            }
            else
            {
                Modified = null;
            }

            if (record["CreatedBy"] != DBNull.Value)
            {
                CreatedBy = (string)record["CreatedBy"];
            }
            else
            {
                CreatedBy = null;
            }

            if (record["ModifiedBy"] != DBNull.Value)
            {
                ModifiedBy = (string)record["ModifiedBy"];
            }
            else
            {
                ModifiedBy = null;
            }
        }

        Guid IMapElement.Id
        {
            get
            {
                return RelationshipUid;
            }
            set
            {
                RelationshipUid = value;
            }
        }

        Guid IMapElement.TypeId
        {
            get
            {
                return RelationshipTypeUid;
            }
            set
            {
                RelationshipTypeUid = value;
            }
        }

        Guid IMapElement.DomainId
        {
            get
            {
                return DomainUid;
            }
            set
            {
                DomainUid = value;
            }
        }

        string IMapElement.OriginalId
        {
            get
            {
                return RelationshipOriginalId;
            }
            set
            {
                RelationshipOriginalId = value;
            }
        }

        Dictionary<MetadataContext, Metadata> IMapElement.Metadata
        {
            get
            {
                return Metadata;
            }
            set
            {
                Metadata = value;
            }
        }
    }
}


text:
<!DOCTYPE html>

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

    <meta charset="utf-8">

AWS::WAFRegional::SizeConstraintSet

The AWS::WAFRegional::SizeConstraintSet resource specifies a size constraint that AWS WAF uses to check the size of a web
                        request and which parts of the request to check. For more information, see CreateSizeConstraintSet in the AWS WAF Regional API Reference.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{
  "Type" : "AWS::WAFRegional::SizeConstraintSet",
  "Properties" : {
    "Name" : String,
    "SizeConstraints" : [ SizeConstraint, ... ]
  }
}

YAML

Type: "AWS::WAFRegional::SizeConstraintSet"
Properties:
  Name: String
  SizeConstraints:
    - SizeConstraint

Properties

Name

A friendly name or description for the SizeConstraintSet.

Required: Yes

Type: String

Update requires: Replacement

SizeConstraints

The size constraint and the part of the web request to check.

Required: Yes

Type: List of AWS WAF Regional SizeConstraintSet SizeConstraint

Update requires: No interruption

Return Value

Ref

When the logical ID of this resource is provided to the Ref intrinsic function, Ref returns the resource physical ID, such as 1234a1a-a1b1-12a1-abcd-a123b123456.

For more information about using the Ref function, see Ref.

Examples

The following examples show you how to define a size constraint, add it to a rule,
                        and add the rule to a web access control list (ACL).

Define a Size Constraint

The following example checks that the body of an HTTP request equals 4096 bytes.

JSON

"MySizeConstraint": {
  "Type": "AWS::WAFRegional::SizeConstraintSet",
  "Properties": {
    "Name": "SizeConstraints",
    "SizeConstraints": [
      {
        "ComparisonOperator": "EQ",
        "FieldToMatch": {
          "Type": "BODY"
        },
        "Size": "4096",
        "TextTransformation": "NONE"
      }
    ]
  }
}

YAML

  MySizeConstraint:
    Type: "AWS::WAFRegional::SizeConstraintSet"
    Properties:
      Name: "SizeConstraints"
      SizeConstraints:
        -
          ComparisonOperator: "EQ"
          FieldToMatch:
            Type: "BODY"
          Size: "4096"
          TextTransformation: "NONE"

Associate a SizeConstraintSet with a Web ACL Rule

The following example associates the MySizeConstraint object with a web ACL rule.

JSON

"SizeConstraintRule" : {
  "Type": "AWS::WAFRegional::Rule",
  "Properties": {
    "Name": "SizeConstraintRule",
    "MetricName" : "SizeConstraintRule",
    "Predicates": [
      {
        "DataId" : {  "Ref" : "MySizeConstraint" },
        "Negated" : false,
        "Type" : "SizeConstraint"
      }
    ]
  }
}

YAML

SizeConstraintRule:
  Type: "AWS::WAFRegional::Rule"
  Properties:
    Name: "SizeConstraintRule"
    MetricName: "SizeConstraintRule"
    Predicates:
      -
        DataId:
          Ref: "MySizeConstraint"
        Negated: false
        Type: "SizeConstraint"

Create a Web ACL

The following example associates the SizeConstraintRule rule with a web ACL. The web ACL blocks all requests except for requests with a body
                        size equal to 4096 bytes.

JSON

"MyWebACL": {
  "Type": "AWS::WAFRegional::WebACL",
  "Properties": {
    "Name": "Web ACL to allow requests with a specific size",
    "DefaultAction": {
      "Type": "BLOCK"
    },
    "MetricName" : "SizeConstraintWebACL",
    "Rules": [
      {
        "Action" : {
          "Type" : "ALLOW"
        },
        "Priority" : 1,
        "RuleId" : { "Ref" : "SizeConstraintRule" }
      }
    ]
  }
}

YAML

MyWebACL:
  Type: "AWS::WAFRegional::WebACL"
  Properties:
    Name: "Web ACL to allow requests with a specific size"
    DefaultAction:
      Type: "BLOCK"
    MetricName: "SizeConstraintWebACL"
    Rules:
      -
        Action:
          Type: "ALLOW"
        Priority: 1
        RuleId:
          Ref: "SizeConstraintRule"


text:
package org.efaps.esjp.sales.report;

import org.efaps.admin.program.esjp.EFapsApplication;
import org.efaps.admin.program.esjp.EFapsUUID;

/**
 * This class must be replaced for customization, therefore it is left empty.
 * Functional description can be found in the related "<code>_Base</code>"
 * class.
 *
 * @author The eFaps Team
 *
 */
@EFapsUUID("844f3bc7-cc1f-4cc4-a535-84701c592b69")
@EFapsApplication("eFapsApp-Sales")
public class RetentionBookReport
    extends RetentionBookReport_Base
{

}


text:
package lineprinter

import (
	"bytes"
	"io"
	"sync"
)

// Print is a type that can hold fmt.Print and other implementations
// which match that signature.  For example, you can use:
//
//   trimmer := &lineprinter.Trimmer{WrappedPrint: logrus.StandardLogger().Debug}
//   linePrinter := &linePrinter{Print: trimmer.Print}
//
// to connect the line printer to logrus at the debug level.
type Print func(args ...interface{})

// LinePrinter is an io.WriteCloser that buffers written bytes.
// During each Write, newline-terminated lines are removed from the
// buffer and passed to Print.  On Close, any content remaining in the
// buffer is also passed to Print.
//
// One use-case is connecting a subprocess's standard streams to a
// logger:
//
//   linePrinter := &linePrinter{
//     Print: &Trimmer{WrappedPrint: logrus.StandardLogger().Debug}.Print,
//   }
//   defer linePrinter.Close()
//   cmd := exec.Command(...)
//   cmd.Stdout = linePrinter
//
// LinePrinter buffers the subcommand's byte stream and splits it into
// lines for the logger.  Sometimes we might have a partial line
// written to the buffer.  We don't want to push that partial line into
// the logs if the next read attempt will pull in the remainder of the
// line.  But we do want to push that partial line into the logs if there
// will never be a next read.  So LinePrinter.Write pushes any
// complete lines to the wrapped printer, and LinePrinter.Close pushes
// any remaining partial line.
type LinePrinter struct {
	buf   bytes.Buffer
	Print Print

	sync.Mutex
}

// Write writes len(p) bytes from p to an internal buffer.  Then it
// retrieves any newline-terminated lines from the internal buffer and
// prints them with lp.Print.  Partial lines are left in the internal
// buffer.
func (lp *LinePrinter) Write(p []byte) (int, error) {
	lp.Lock()
	defer lp.Unlock()
	n, err := lp.buf.Write(p)
	if err != nil {
		return n, err
	}

	for {
		line, err := lp.buf.ReadString(byte('\n'))
		if err == io.EOF {
			_, err = lp.buf.Write([]byte(line))
			return n, err
		} else if err != nil {
			return n, err
		}

		lp.Print(line)
	}
}

// Close prints anything that remains in the buffer.
func (lp *LinePrinter) Close() error {
	lp.Lock()
	defer lp.Unlock()
	line := lp.buf.String()
	if len(line) > 0 {
		lp.Print(line)
	}
	return nil
}


text:
.viewport {
    -moz-user-select: none;
}
.magnet {
    cursor: crosshair;
}
.magnet:hover {
    fill: red;
    opacity: 0.7;
}
.element {
    cursor: move;
}
.element * {
    -moz-user-select: none;
}
.connection-wrap {
    cursor: move;
    fill: none;
    opacity: 0;
    stroke: black;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 15;
}
.connection-wrap:hover {
    opacity: 0.4;
    stroke-opacity: 0.4;
}
.connection {
    fill: none;
    stroke-linejoin: round;
}
.marker-source, .marker-target {
}
.marker-vertices {
    cursor: move;
    opacity: 0;
}
.marker-arrowheads {
    cursor: -moz-grab;
    opacity: 0;
}
.link-tools {
    cursor: pointer;
    opacity: 0;
}
.link-tools .tool-options {
    display: none;
}
.link-tools .tool-remove circle {
    fill: red;
}
.link-tools .tool-remove path {
    fill: white;
}
.link:hover .marker-vertices, .link:hover .marker-arrowheads, .link:hover .link-tools {
    opacity: 1;
}
.marker-vertex {
    fill: #1ABC9C;
}
.marker-vertex:hover {
    fill: #34495E;
    stroke: none;
}
.marker-arrowhead {
    fill: #1ABC9C;
}
.marker-arrowhead:hover {
    fill: #F39C12;
    stroke: none;
}
.marker-vertex-remove {
    cursor: pointer;
    fill: white;
    opacity: 0.1;
}
.marker-vertex-group:hover .marker-vertex-remove {
    opacity: 1;
}
.marker-vertex-remove-area {
    cursor: pointer;
    opacity: 0.1;
}
.marker-vertex-group:hover .marker-vertex-remove-area {
    opacity: 1;
}
text.highlighted {
    fill: #FF0000;
}
.highlighted {
    outline: 2px solid #FF0000;
}


text:
from .base_allocator import BaseAllocator
from .base_application import (
    APPLICATION_STATUSES,
    BaseApplication,
    COMPLETE_APP_STATUS,
    DELAYED_STATUS,
    ERROR_PAYMENT_STATUS,
    FAILED_STATUS,
    INCOMPLETE_APP_STATUS,
    INSTANT_STATUS,
    NOT_ELIGIBLE_STATUS,
    PAID_PAYMENT_STATUS,
    PAYMENT_STATUSES,
    REFUND_STATUSES,
    REQUIRED_STATUS,
    SUBMITTED_APP_STATUS,
    UNPAID_PAYMENT_STATUS,
)
from .base_application_answer import BaseApplicationAnswer
from .base_application_panel_assignment import BaseApplicationPanelAssignment
from .base_application_question import (
    BaseApplicationQuestion,
    TEXT_LIMIT_UNITS,
)
from .base_application_type import BaseApplicationType
from .base_base_profile import (
    BaseBaseProfile,
    ENTREPRENEUR_USER_TYPE,
    EXPERT_USER_TYPE,
    MEMBER_USER_TYPE,
    USER_TYPES,
)
from .base_bucket_state import (
    BUCKET_TYPES,
    BaseBucketState,
    FRESH_LEADS_GROUP,
    NEW_ENTREPRENEURS_BUCKET_TYPE,
    STALE_LEADS_GROUP,
    STALE_NOSTARTUP_BUCKET_TYPE,
    STALE_STARTUP_BUCKET_TYPE,
    SUBMITTED_BUCKET_TYPE,
    UNPAID_BUCKET_TYPE,
    UNSUBMITTED_BUCKET_TYPE,
)
from .base_category_header_page import BaseCategoryHeaderPage
from .base_clearance import (
    BaseClearance,
    CLEARANCE_LEVEL_EXEC_MD,
    CLEARANCE_LEVEL_GLOBAL_MANAGER,
    CLEARANCE_LEVEL_ORDER,
    CLEARANCE_LEVEL_POM,
    CLEARANCE_LEVEL_STAFF,
    CLEARANCE_LEVELS,
    CLEARANCE_LOGGER_FAILED_BAD_CLEARANCE_MSG,
    CLEARANCE_LOGGER_FAILED_INSUFFICIENT_CLEARANCE_MSG,
    CLEARANCE_LOGGER_SUCCESS_MSG,
    NO_CLEARANCE_ERROR_MSG,
)
from .base_core_profile import (
    BIO_MAX_LENGTH,
    BaseCoreProfile,
    PRIVACY_KEY_FINALISTS_AND_STAFF,
    PRIVACY_KEY_PUBLIC,
    PRIVACY_KEY_STAFF,
)
from .base_criterion import BaseCriterion
from .base_criterion_option_spec import BaseCriterionOptionSpec
from .base_currency import BaseCurrency
from .base_expert_category import (
    BaseExpertCategory,
    VALID_EXPERT_CATEGORIES,
)
from .base_expert_interest import BaseExpertInterest
from .base_expert_interest_type import BaseExpertInterestType
from .base_file_page import BaseFilePage
from .base_functional_expertise import BaseFunctionalExpertise
from .base_industry import BaseIndustry
from .base_interest_category import BaseInterestCategory
from .base_job_posting import (
    BaseJobPosting,
    JOB_TYPE_VALUES,
)
from .base_judge_application_feedback import (
    BaseJudgeApplicationFeedback,
    JUDGING_FEEDBACK_STATUS_COMPLETE,
    JUDGING_FEEDBACK_STATUS_CONFLICT,
    JUDGING_FEEDBACK_STATUS_ENUM,
    JUDGING_FEEDBACK_STATUS_INCOMPLETE,
    JUDGING_FEEDBACK_STATUS_OTHER,
    JUDGING_STATUS_CONFLICT,
    JUDGING_STATUS_ENUM,
    JUDGING_STATUS_NO_CONFLICT,
    JUDGING_STATUS_OTHER,
)
from .base_judge_availability import (
    BaseJudgeAvailability,
    JUDGE_AVAILABILITY_AVAILABLE,
    JUDGE_AVAILABILITY_NOT_AVAILABLE,
    JUDGE_AVAILABILITY_PREFERRED,
)
from .base_judge_feedback_component import (
    BaseJudgeFeedbackComponent,
    DEFINITELY_DONT_RECOMMEND,
    DEFINITELY_RECOMMEND,
    DONT_RECOMMEND,
    JUDGE_FEEDBACK_REVIEWER,
    JUDGE_FEEDBACK_SANITIZER,
    LINEAR_SCORES,
    RECOMMEND,
    STRONGLY_DONT_RECOMMEND,
    STRONGLY_RECOMMEND,
    WEIGHTED_SCORES,
)
from .base_judge_panel_assignment import (
    ASSIGNED_PANEL_ASSIGNMENT_STATUS,
    BaseJudgePanelAssignment,
    COMPLETE_PANEL_ASSIGNMENT_STATUS,
)
from .base_judge_round_commitment import BaseJudgeRoundCommitment
from .base_judging_form import BaseJudgingForm
from .base_judging_form_element import (
    BaseJudgingFormElement,
    FEEDBACK_ERROR,
    FEEDBACK_QUESTION,
    FORM_ELEM_COMPETITORS,
    FORM_ELEM_CUSTOMER_ACQUISITION,
    FORM_ELEM_CUSTOMER_PAIN_SOLUTION,
    FORM_ELEM_FEEDBACK_TO_MC,
    FORM_ELEM_FEEDBACK_TO_STARTUP,
    FORM_ELEM_FINANCIALS,
    FORM_ELEM_OVERALL_IMPACT,
    FORM_ELEM_OVERALL_RECOMMENDATION,
    FORM_ELEM_REGULATION_IP,
    FORM_ELEM_TEAM,
    JUDGE_FEEDBACK_FORM_ELEMENTS,
    RECOMMENDATION_ERROR,
    RECOMMENDATION_QUESTION,
)
from .base_judging_round import (
    BaseJudgingRound,
    CAPTURE_AVAILABILITY_DISABLED,
    CAPTURE_AVAILABILITY_TIME,
    DEFAULT_BUFFER_BEFORE_EVENT,
    FEEDBACK_DISPLAY_DISABLED,
    FEEDBACK_DISPLAY_DISABLED,
    FEEDBACK_DISPLAY_ENABLED,
    IN_PERSON_JUDGING_ROUND_TYPE,
    ONLINE_JUDGING_ROUND_TYPE,
    RECRUIT_ANYONE,
    RECRUIT_APPROVED_ONLY,
    RECRUIT_DISPLAY_ONLY,
    RECRUIT_NONE,
)
from .base_member_profile import BaseMemberProfile
from .base_mentor_program_office_hour import BaseMentorProgramOfficeHour
from .base_mentoring_specialties import BaseMentoringSpecialties
from .base_gender_choices import BaseGenderChoices
from .base_model_change import (
    BaseModelChange,
    MIGRATION_STATUS_DONE,
    MIGRATION_STATUS_ERROR,
    MIGRATION_STATUS_MIGRATING,
    MIGRATION_STATUS_OLD,
)
from .base_named_group import BaseNamedGroup
from .base_newsletter import BaseNewsletter
from .base_newsletter_receipt import BaseNewsletterReceipt
from .base_node_published_for import BaseNodePublishedFor
from .base_observer import BaseObserver
from .base_organization import (
    BaseOrganization,
    PARTNER_TYPE,
    STARTUP_TYPE,
    slug_from_instance,
)
from .base_panel import (
    ACTIVE_PANEL_STATUS,
    BasePanel,
    COMPLETED_PANEL_STATUS,
    DEFAULT_PANEL_STATUS,
    PANEL_STATUS_ENUM,
    PREVIEW_PANEL_STATUS,
)
from .base_panel_location import BasePanelLocation
from .base_panel_time import BasePanelTime
from .base_panel_type import BasePanelType
from .base_partner import BasePartner
from .base_partner_team_member import BasePartnerTeamMember
from .base_paypal_payment import BasePayPalPayment
from .base_paypal_refund import BasePayPalRefund
from .base_program import (
    ACTIVE_PROGRAM_STATUS,
    BaseProgram,
    CURRENT_STATUSES,
    ENDED_PROGRAM_STATUS,
    HIDDEN_PROGRAM_STATUS,
    UPCOMING_PROGRAM_STATUS,
)
from .base_program_cycle import BaseProgramCycle
from .base_program_family import BaseProgramFamily
from .base_program_override import BaseProgramOverride
from .base_program_partner import BaseProgramPartner
from .base_program_partner_type import (
    BaseProgramPartnerType,
    PARTNER_BADGE_DISPLAY_VALUES,
)
from .base_program_role import BaseProgramRole
from .base_program_role_grant import BaseProgramRoleGrant
from .base_program_startup_attribute import BaseProgramStartupAttribute
from .base_program_startup_status import (
    BaseProgramStartupStatus,
    STARTUP_BADGE_DISPLAY_VALUES,
)
from .base_question import (
    BaseQuestion,
    CHOICE_LAYOUTS,
    CHOICE_LAYOUT_DROPDOWN,
    CHOICE_LAYOUT_HORIZONTAL,
    CHOICE_LAYOUT_VERTICAL,
    QUESTION_TYPES,
    QUESTION_TYPE_MULTICHOICE,
    QUESTION_TYPE_MULTILINE,
    QUESTION_TYPE_NUMBER,
)
from .base_reference import BaseReference
from .base_refund_code import BaseRefundCode
from .base_refund_code_redemption import (
    BaseRefundCodeRedemption,
    CREDIT_CODE_NOT_AVAILABLE,
)
from .base_scenario import (
    BaseScenario,
    DEFAULT_PANEL_SIZE,
)
from .base_scenario_application import BaseScenarioApplication
from .base_scenario_judge import BaseScenarioJudge
from .base_scenario_preference import (
    ALL_JUDGES,
    APPLICATION_ENTITY,
    BaseScenarioPreference,
    ENTITY_TYPES,
    INDUSTRY_JUDGE_CATEGORIES,
    JUDGE_ALSO_KNOWS_INDUSTRY,
    JUDGE_CATEGORIES,
    JUDGE_ENTITY,
    JUDGE_GROUP_1,
    JUDGE_GROUP_2,
    JUDGE_GROUP_3,
    JUDGE_GROUP_4,
    JUDGE_GROUP_5,
    JUDGE_IN_INDUSTRY,
    JUDGE_IN_PROGRAM,
    JUDGE_IS_EXECUTIVE,
    JUDGE_IS_FEMALE,
    JUDGE_IS_INVESTOR,
    JUDGE_IS_LAWYER,
    JUDGE_IS_UNASSIGNED,
    JUDGE_KINDA_RELIABLE,
    JUDGE_MOST_RELIABLE,
    JUDGE_NOT_RELIABLE,
    JUDGE_OUTSIDE_PROGRAM,
    MAX_PREFERENCE,
    MIN_PREFERENCE,
    PREFERENCE_CONSTRAINT_TYPES,
    PROGRAM_JUDGE_CATEGORIES,
    SIMPLE_JUDGE_CATEGORIES,
    SPECIAL_JUDGE_CATEGORIES,
)
from .base_section import (
    BaseSection,
    INCLUDE_FOR_CHOICES,
)
from .base_site import BaseSite
from .base_site_program_authorization import BaseSiteProgramAuthorization
from .base_site_redirect_page import BaseSiteRedirectPage
from .base_startup import (
    BaseStartup,
    DEFAULT_PROFILE_BACKGROUND_COLOR,
    DEFAULT_PROFILE_TEXT_COLOR,
    STARTUP_COMMUNITIES,
)
from .base_startup_attribute import BaseStartupAttribute
from .base_startup_cycle_interest import BaseStartupCycleInterest
from .base_startup_label import BaseStartupLabel
from .base_startup_mentor_relationship import (
    BaseStartupMentorRelationship,
    CONFIRMED_RELATIONSHIP,
    DESIRED_RELATIONSHIP,
    DISCUSSING_RELATIONSHIP,
    RELATIONSHIP_CHOICES,
)
from .base_startup_mentor_tracking_record import (
    BaseStartupMentorTrackingRecord,
)
from .base_startup_override_grant import BaseStartupOverrideGrant
from .base_startup_program_interest import (
    BaseStartupProgramInterest,
    INTEREST_CHOICES,
    PROGRAM_INTEREST_BOTTOM,
    PROGRAM_INTEREST_DOWN,
    PROGRAM_INTEREST_TOP,
    PROGRAM_INTEREST_UP,
)
from .base_startup_role import BaseStartupRole
from .base_startup_status import BaseStartupStatus
from .base_startup_team_member import BaseStartupTeamMember
from .base_user_label import (
    BaseUserLabel,
    CONFIRMED_JUDGE_STATE,
    DESIRED_JUDGE_STATE,
    JUDGING_ROUND_FORMAT,
)
from .base_user_role import BaseUserRole
from .base_user_role_menu import BaseUserRoleMenu
from .base_legal_check import BaseLegalCheck
from .base_user_legal_check import BaseUserLegalCheck

from .base_nav_tree import BaseNavTree
from .base_nav_tree_item import BaseNavTreeItem

from .base_fluent_sub_nav_association import BaseNodeSubNavAssociation
from .base_ethno_racial_identity import BaseEthnoRacialIdentity
from .base_deferrable_modal import BaseDeferrableModal
from .base_user_deferrable_modal import BaseUserDeferrableModal
from .base_user_note import BaseUserNote
from .base_organization_note import BaseOrganizationNote
from .base_partner_application_interest import BasePartnerApplicationInterest
from .base_partner_judging_round_challenge import (
    BasePartnerJudgingRoundChallenge,
)
from .base_partner_label import BasePartnerLabel
from .base_partner_judging_instructions import BasePartnerJudgingInstructions
from .base_partner_judge_application_assignment import (
    BasePartnerJudgeApplicationAssignment,
)
from .base_business_proposition import (
    BaseBusinessProposition,
    EXCLUDED_FIELDS
)
from .base_startup_update import BaseStartupUpdate
from .base_community import BaseCommunity


text:
#include <vector>
#include <iostream>

#include <boost/phoenix/phoenix.hpp>

// add phoenix support in eUML
#define BOOST_MSM_EUML_PHOENIX_SUPPORT
#include <boost/msm/back/state_machine.hpp>
#include <boost/msm/front/euml/euml.hpp>

using namespace std;
using namespace boost::msm::front::euml;
namespace msm = boost::msm;
using namespace boost::phoenix;

// entry/exit/action/guard logging functors
#include "logging_functors.h"

namespace  // Concrete FSM implementation
{
    // events
    BOOST_MSM_EUML_EVENT(end_pause)
    BOOST_MSM_EUML_EVENT(stop)
    BOOST_MSM_EUML_EVENT(pause)
    BOOST_MSM_EUML_EVENT(open_close)
    struct play_event : boost::msm::front::euml::euml_event<play_event>
    {
    };
    play_event play;

    enum DiskTypeEnum
    {
        DISK_CD=0,
        DISK_DVD=1
    };
    // A "complicated" event type that carries some data.
    struct cd_detected_event : boost::msm::front::euml::euml_event<cd_detected_event>
    {
        cd_detected_event(){}
        cd_detected_event(std::string const& name,DiskTypeEnum disk):cd_name(name),cd_type(disk){}
        std::string cd_name;
        DiskTypeEnum cd_type;
    };
    // define an instance for a nicer transition table
    cd_detected_event cd_detected;

    // Concrete FSM implementation
    // The list of FSM states
    // state not needing any entry or exit
    BOOST_MSM_EUML_STATE((),Paused)

    // states with standard eUML actions
    BOOST_MSM_EUML_STATE(( Stopped_Entry,Stopped_Exit ),Stopped)
    BOOST_MSM_EUML_STATE(( Playing_Entry,Playing_Exit ),Playing)

    // a "standard" msm state
    struct Empty_impl : public msm::front::state<> , public euml_state<Empty_impl>
    {
        // this allows us to add some functions
        void foo() {std::cout << "Empty::foo " << std::endl;}
        // standard entry behavior
        template <class Event,class FSM>
        void on_entry(Event const& evt,FSM& fsm)
        {
            std::cout << "entering: Empty" << std::endl;
        }
        template <class Event,class FSM>
        void on_exit(Event const& evt,FSM& fsm)
        {
            std::cout << "leaving: Empty" << std::endl;
        }
    };
    //instance for use in the transition table
    Empty_impl const Empty;

    // entry and exit actions as phoenix functions
    struct open_entry_impl
    {
        typedef void result_type;
        void operator()()
        {
            cout << "entering: Open" << endl;
        }
    };
    boost::phoenix::function<open_entry_impl> open_entry;
    struct open_exit_impl
    {
        typedef void result_type;
        void operator()()
        {
            cout << "leaving: Open" << endl;
        }
    };
    boost::phoenix::function<open_exit_impl> open_exit;

    // a state using phoenix for entry/exit actions
    BOOST_MSM_EUML_STATE(( open_entry(),open_exit() ),Open)

    // actions and guards using boost::phoenix
    struct start_playback_impl
    {
        typedef void result_type;
        void operator()()
        {
            cout << "calling: start_playback" << endl;
        }
    };
    boost::phoenix::function<start_playback_impl> start_playback;

    // a guard taking the event as argument
    struct good_disk_format_impl
    {
        typedef bool result_type;

        template <class Event>
        bool operator()(Event const& evt)
        {
            // to test a guard condition, let's say we understand only CDs, not DVD
            if (evt.cd_type!=DISK_CD)
            {
                std::cout << "wrong disk, sorry" << std::endl;
                return false;
            }
            std::cout << "good disk" << std::endl;
            return true;
        }
    };
    boost::phoenix::function<good_disk_format_impl> good_disk_format;

    // a simple action
    struct store_cd_info_impl
    {
        typedef void result_type;
        void operator()()
        {
            cout << "calling: store_cd_info" << endl;
        }
    };
    boost::phoenix::function<store_cd_info_impl> store_cd_info;

    // an action taking the fsm as argument and sending it a new event
    struct process_play_impl
    {
        typedef void result_type;

        template <class Fsm>
        void operator()(Fsm& fsm)
        {
            cout << "queuing a play event" << endl;
            fsm.process_event(play);
        }
    };
    // it is also possible to use BOOST_PHOENIX_ADAPT_CALLABLE to avoid defining a global variable
    BOOST_PHOENIX_ADAPT_CALLABLE(process_play, process_play_impl, 1)

    // transition table. Actions and guards are written as phoenix functions
    BOOST_MSM_EUML_TRANSITION_TABLE((
          //an action without arguments
          Playing   == Stopped  + play        / start_playback()                            ,
          Playing   == Paused   + end_pause                                                 ,
          //  +------------------------------------------------------------------------------+
          Empty     == Open     + open_close                                                ,
          //  +------------------------------------------------------------------------------+
          Open      == Empty    + open_close                                                ,
          Open      == Paused   + open_close                                                ,
          Open      == Stopped  + open_close                                                ,
          Open      == Playing  + open_close                                                ,
          //  +------------------------------------------------------------------------------+
          Paused    == Playing  + pause                                                     ,
          //  +------------------------------------------------------------------------------+
          Stopped   == Playing  + stop                                                      ,
          Stopped   == Paused   + stop                                                      ,
          // a guard taking the event as argument
          // and an action made of a phoenix expression of 2 actions
          // _event is a placeholder for the current event
          // _fsm is a placeholder for the current state machine
          Stopped   == Empty    + cd_detected [good_disk_format(_event)]
                                              / (store_cd_info(),process_play(_fsm)),
          Stopped   == Stopped  + stop
          //  +------------------------------------------------------------------------------+
         ),transition_table)

    // create a state machine "on the fly"
    BOOST_MSM_EUML_DECLARE_STATE_MACHINE(( transition_table, //STT
                                        init_ << Empty, // Init State
                                        no_action, // Entry
                                        no_action, // Exit
                                        attributes_ << no_attributes_, // Attributes
                                        configure_ << no_configure_, // configuration
                                        Log_No_Transition // no_transition handler
                                        ),
                                      player_) //fsm name

    // or simply, if no no_transition handler needed:
    //BOOST_MSM_EUML_DECLARE_STATE_MACHINE(( transition_table, //STT
    //                                    Empty // Init State
    //                                 ),player_)

    // choice of back-end
    typedef msm::back::state_machine<player_> player;

    //
    // Testing utilities.
    //
    static char const* const state_names[] = { "Stopped", "Paused", "Open", "Empty", "Playing" };
    void pstate(player const& p)
    {
        std::cout << " -> " << state_names[p.current_state()[0]] << std::endl;
    }

    void test()
    {
        player p;
        // needed to start the highest-level SM. This will call on_entry and mark the start of the SM
        p.start();
        // go to Open, call on_exit on Empty, then action, then on_entry on Open
        p.process_event(open_close); pstate(p);
        p.process_event(open_close); pstate(p);
        // will be rejected, wrong disk type
        p.process_event(
            cd_detected_event("louie, louie",DISK_DVD)); pstate(p);
        p.process_event(
            cd_detected_event("louie, louie",DISK_CD)); pstate(p);
        // no need to call play as the previous event does it in its action method
        //p.process_event(play);

        // at this point, Play is active
        p.process_event(pause); pstate(p);
        // go back to Playing
        p.process_event(end_pause);  pstate(p);
        p.process_event(pause); pstate(p);
        p.process_event(stop);  pstate(p);
        // event leading to the same state
        // no action method called as none is defined in the transition table
        p.process_event(stop);  pstate(p);
        // test call to no_transition
        p.process_event(pause); pstate(p);
    }
}

int main()
{
    test();
    return 0;
}


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="io.Dataspin.AnalyticsSDK" android:versionName="1.0" android:versionCode="1" android:installLocation="preferExternal">
  <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
  <application android:theme="@android:style/Theme.NoTitleBar" android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="false" android:isGame="true" android:banner="@drawable/app_banner">
    <activity android:name="com.unity3d.player.UnityPlayerActivity" android:label="@string/app_name" android:screenOrientation="fullSensor" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale">
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
        <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
      </intent-filter>
      <meta-data android:name="unityplayer.UnityActivity" android:value="true" />
    </activity>
    <activity android:name="io.dataspin.unityhelpersdk.DataspinUnityHelper"/>
  </application>
  <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="21" />
  <uses-feature android:glEsVersion="0x00020000" />
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.READ_PHONE_STATE" />
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  <uses-permission android:name="android.permission.GET_ACCOUNTS" />
  <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
  <uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" />
  <uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false" />
</manifest>


text:
class TMonsterSkillElementInfo {

public:

    TMonsterSkillElementInfo() {
        // Reset Data
        this->Reset();
    }

    void Reset();

    void ResetDefense();

    void ResetAttack();

    void ResetAutoHP();

    void ResetAutoMP();

    void ResetAutoAG();

    void ResetImmune();

    void ResetResist();

    void ResetModifyStat();

    void ResetImmuneAll();//NEW
    int CheckDefenseTime();

    int CheckAttackTime();

    int CheckAutoHPTime();

    int CheckAutoMPTime();

    int CheckAutoAGTime();

    int CheckImmuneTime();

    int CheckResistTime();

    int CheckModifyStatTime();

    int CheckImmuneAllTime();//NEW
    int DecDefenseTime();

    int DecAttackTime();

    int DecAutoHPTime();

    int DecAutoMPTime();

    int DecAutoAGTime();

    int DecImmuneTime();

    int DecResistTime();

    int DecModifyStatTime();

    int DecImmuneAllTime();//NEW

    static void CheckSkillElementInfoProc(struct OBJECTSTRUCT *lpObj);

public:

    int m_iSkillElementDefense;    // 0
    int m_iSkillElementDefenseTime;    // 4
    int m_iSkillElementAttack;    // 8
    int m_iSkillElementAttackTime;    // C
    int m_iSkillElementAutoHP;    // 10
    int m_iSkillElementAutoHPCycle;    // 14
    int m_iSkillElementAutoHPTime;    // 18
    int m_iSkillElementAutoMP;    // 1C
    int m_iSkillElementAutoMPCycle;    // 20
    int m_iSkillElementAutoMPTime;    // 24
    int m_iSkillElementAutoAG;    // 28
    int m_iSkillElementAutoAGCycle;    // 2C
    int m_iSkillElementAutoAGTime;    // 30
    int m_iSkillElementImmuneNumber;    // 34
    int m_iSkillElementImmuneTime;    // 38
    int m_iSkillElementResistNumber;    // 3C
    int m_iSkillElementResistTime;    // 40
    int m_iSkillElementModifyStat;    // 44
    int m_iSkillElementModifyStatType;    // 48
    int m_iSkillElementModifyStatTime;    // 4C
    int m_iSkillElementImmuneAllTime; //50

};

#endif // !defined(AFX_TMONSTERSKILLELEMENTINFO_H__8EC5FD6E_2B9F_409A_B2AA_70024491BEE5__INCLUDED_)


text:
#ifndef OPENTISSUE_FEM_NODE_TRAITS_H
#define OPENTISSUE_FEM_NODE_TRAITS_H

#include <opentissue/configuration.h>

#include <unordered_map>

namespace opentissue {
    namespace fem {
        namespace detail {
            template<typename math_types> class NodeTraits {
            public:
                typedef typename math_types::real_type real_type;
                typedef typename math_types::vector_type vector_type;
                typedef typename math_types::matrix_type matrix_type;
                typedef typename math_types::index_type index_type;

                typedef typename std::unordered_map<index_type, matrix_type> matrix_container;
                typedef typename matrix_container::iterator matrix_iterator;

            public:
                bool m_fixed;

                real_type m_mass;

                vector_type m_f0;
                vector_type m_f_external;
                vector_type m_velocity;

                vector_type m_coord;
                vector_type m_world_coord;

                matrix_container m_K_row;

                matrix_container m_A_row;
                vector_type m_b;

                vector_type m_update;
                vector_type m_prev;
                vector_type m_residual;

                matrix_iterator Kbegin() { return m_K_row.begin(); }
                matrix_iterator Kend() { return m_K_row.end(); }
                matrix_iterator Abegin() { return m_A_row.begin(); }
                matrix_iterator Aend() { return m_A_row.end(); }

                matrix_type &K(unsigned int const &column_idx) { return m_K_row[column_idx]; }
                matrix_type &A(unsigned int const &column_idx) { return m_A_row[column_idx]; }

                NodeTraits() : m_fixed(false) {}
            };
        }
    }
}

#endif


text:
<?php
namespace backend\assets;

use yii\web\AssetBundle;

class AppAsset extends AssetBundle
{
    public $basePath = null;
    public $baseUrl = '@web/themes/layout4/dist';
    public $css = [
        'css/site.css',
        'css/simple-line-icons.min.css',
        'css/bootstrap.min.css',
        'css/components-rounded.css' ,
        'css/layout.css'  ,
        'css/light.css',
        'plugins/font-awesome/css/font-awesome.min.css',
        'plugins/jquery-file-upload/css/jquery.fileupload.css',
    ];
    public $js = [
        'plugins/jquery/jquery.min.js',
        'plugins/bootstrap/js/bootstrap.min.js',
        'plugins/jquery-ui-1.11.4.custom/jquery-ui.min.js',
        'js/jquery.plugins.js',
        //sss'plugins/jquery-file-upload/js/jquery.fileupload.js',
        'js/inputcue.js',
        'js/yii.js',
        'js/site.js',
        'js/charts/highcharts.js',
        'js/charts/exporting.js',
        'js/bootstrap-datetimepicker.js'
    ];
    public $depends = [
        'yii\web\YiiAsset',
        'yii\bootstrap\BootstrapAsset',

    ];
}