text:
<?php

namespace AssetsBundleTest\Controller;

class JsCustomControllerTest extends \Zend\Test\PHPUnit\Controller\AbstractHttpControllerTestCase
{

    /**
     * @var array
     */
    private $configuration = array(
        'assets_bundle' => array(
            'production' => true,
            'assets' => array(
                'css' => array(
                    'css/test.css',
                    'css/css.php'
                ),
                'less' => array('less/test.less'),
                'js' => array('js/test.js'),
                'index' => array(
                    'test-media' => array(
                        'css' => array('css/test-media.css'),
                        'less' => array('less/test-media.less'),
                        'media' => array(
                            '@zfRootPath/AssetsBundleTest/_files/fonts',
                            '@zfRootPath/AssetsBundleTest/_files/images'
                        )
                    ),
                    'test-mixins' => array(
                        'less' => array(
                            'less/test-mixins.less',
                            'less/test-mixins-use.less'
                        ),
                    ),
                ),
            ),
        ),
    );

    /**
     * @see PHPUnit_Framework_TestCase::setUp()
     */
    public function setUp()
    {
        $this->setApplicationConfig(\AssetsBundleTest\Bootstrap::getConfig());
        parent::setUp();

        $oServiceLocator = $this->getApplicationServiceLocator();

        $aConfiguration = $oServiceLocator->get('Config');
        unset($aConfiguration['assets_bundle']['assets']);

        $this->configuration = \Zend\Stdlib\ArrayUtils::merge($aConfiguration, $this->configuration);
        $bAllowOverride = $oServiceLocator->getAllowOverride();
        if (!$bAllowOverride) {
            $oServiceLocator->setAllowOverride(true);
        }
        $oServiceLocator->setService('Config', $this->configuration)->setAllowOverride($bAllowOverride);

        // Empty cache and processed directories
        $oServiceLocator->get('AssetsBundleToolsService')->emptyCache(false);
    }

    public function testTestActionInProduction()
    {
        $this->dispatch('/test');
        $this->assertResponseStatusCode(200,$this->getResponse()->getContent());
        $this->assertModuleName('AssetsBundleTest');
        $this->assertControllerName('AssetsBundleTest\Controller\Test');
        $this->assertControllerClass('TestController');
        $this->assertMatchedRouteName('test');
        $this->assertEquals('/jscustom/AssetsBundleTest%5CController%5CTest/test', $this->getResponse()->getContent());
    }

    public function testTestActionInDevelopment()
    {
        $oServiceLocator = $this->getApplicationServiceLocator();

        $aConfiguration = $oServiceLocator->get('Config');
        unset($aConfiguration['assets_bundle']['assets']);

        $this->configuration = \Zend\Stdlib\ArrayUtils::merge($aConfiguration, $this->configuration);
        $this->configuration['assets_bundle']['production'] = false;
        $bAllowOverride = $oServiceLocator->getAllowOverride();
        if (!$bAllowOverride) {
            $oServiceLocator->setAllowOverride(true);
        }
        $oServiceLocator->setService('Config', $this->configuration)->setAllowOverride($bAllowOverride);

        //Retrieve assets bundle service
        $oAssetsBundleService = $this->getApplicationServiceLocator()->get('AssetsBundleService');
        $oAssetsBundleService->getOptions()->setProduction(false);
        $this->assertFalse($oAssetsBundleService->getOptions()->isProduction());

        $this->dispatch('/test');
        $this->assertResponseStatusCode(200, $this->getResponse()->getContent());
        $this->assertModuleName('AssetsBundleTest');
        $this->assertControllerName('AssetsBundleTest\Controller\Test');
        $this->assertControllerClass('TestController');
        $this->assertMatchedRouteName('test');

        $this->assertEquals(print_r(array(
            '/cache/_files/assets/js/jscustom.js',
            '/cache/_files/assets/js/jscustom.php'
                        ), true), preg_replace('/\?[0-9]*/', '', $this->getResponse()->getContent()));

        $this->assertFileExists($oAssetsBundleService->getOptions()->getCachePath() . DIRECTORY_SEPARATOR . '_files/assets/js/jscustom.js');
        $this->assertFileExists($oAssetsBundleService->getOptions()->getCachePath() . DIRECTORY_SEPARATOR . '_files/assets/js/jscustom.php');
    }

    public function testFileErrorActionInDevelopment()
    {
        $oServiceLocator = $this->getApplicationServiceLocator();

        $aConfiguration = $oServiceLocator->get('Config');
        unset($aConfiguration['assets_bundle']['assets']);

        $this->configuration = \Zend\Stdlib\ArrayUtils::merge($aConfiguration, $this->configuration);
        $this->configuration['assets_bundle']['production'] = false;
        $bAllowOverride = $oServiceLocator->getAllowOverride();
        if (!$bAllowOverride) {
            $oServiceLocator->setAllowOverride(true);
        }
        $oServiceLocator->setService('Config', $this->configuration)->setAllowOverride($bAllowOverride);

        $this->dispatch('/file-error');
        $this->assertResponseStatusCode(200);
        $this->assertModuleName('AssetsBundleTest');
        $this->assertControllerName('AssetsBundleTest\Controller\Test');
        $this->assertControllerClass('TestController');
        $this->assertMatchedRouteName('fileError');
    }

    public function testEmptyActionInDevelopment()
    {
        $oServiceLocator = $this->getApplicationServiceLocator();

        $aConfiguration = $oServiceLocator->get('Config');
        unset($aConfiguration['assets_bundle']['assets']);

        $this->configuration = \Zend\Stdlib\ArrayUtils::merge($aConfiguration, $this->configuration);
        $this->configuration['assets_bundle']['production'] = false;
        $bAllowOverride = $oServiceLocator->getAllowOverride();
        if (!$bAllowOverride) {
            $oServiceLocator->setAllowOverride(true);
        }
        $oServiceLocator->setService('Config', $this->configuration)->setAllowOverride($bAllowOverride);

        $this->dispatch('/empty');
        $this->assertResponseStatusCode(200);
        $this->assertModuleName('AssetsBundleTest');
        $this->assertControllerName('AssetsBundleTest\Controller\Test');
        $this->assertControllerClass('TestController');
        $this->assertMatchedRouteName('empty');
    }

    public function testJsCustomAction()
    {
        $this->dispatch('/jscustom/AssetsBundleTest%5CController%5CTest/test');
        $this->assertResponseStatusCode(200);
        $this->assertModuleName('AssetsBundleTest');
        $this->assertControllerName('AssetsBundleTest\Controller\Test');
        $this->assertControllerClass('TestController');
        $this->assertMatchedRouteName('jscustom/definition');

        $this->assertResponseHeaderContains('content-type', 'text/javascript');

        $sCacheExpectedPath = dirname(__DIR__) . '/../_files/expected/cache/prod';
        $this->assertStringEqualsFile($sCacheExpectedPath . '/jscustom.js', $this->getResponse()->getContent());
    }

    public function tearDown()
    {
        // Empty cache and processed directories
        \AssetsBundleTest\Bootstrap::getServiceManager()->get('AssetsBundleToolsService')->emptyCache(false);
        parent::tearDown();
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans.xsd">

    <bean id="processEngineConfiguration"
          class="org.flowable.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration">

        <!-- Database configurations -->
        <property name="databaseSchemaUpdate" value="true" />

        <!-- job executor configurations -->
        <property name="asyncExecutorActivate" value="true"/>

        <property name="jobProcessors">
            <list>
                <bean class="org.flowable.engine.test.jobexecutor.JobProcessorTest$TestJobProcessor"/>
            </list>
        </property>

    </bean>

</beans>

redpajama_set_name: RedPajamaGithub


text:
		{PAGE_NUMBER}

{L_JUMP_TO_PAGE}{L_COLON}

					<input type="number" name="page-number" min="1" max="999999" title="{L_JUMP_PAGE}" class="inputbox tiny" data-per-page="{PER_PAGE}" data-base-url="{BASE_URL|e('html_attr')}" data-start-name="{START_NAME}" />
					<input class="button2" value="{L_GO}" type="button" />

{L_PREVIOUS}

{pagination.PAGE_NUMBER}

{L_ELLIPSIS}

{L_NEXT}

{pagination.PAGE_NUMBER}


text:
Greeting card in AngularJS

# To use
1. `git clone https://github.com/janezomgzomg/zomg-greetings`
2. cd `zomg-greetings`
3. `npm install`
4. `npm start`


text:
package com.microsoft.ml.spark

class ValidateConfiguration extends TestBase {

  test("Basic BrainScript config E2E") {
    val relativeOutRoot = "out"
    val remappedInPath = "in.txt"
    val dataFormat = "text"

    val config = new BrainScriptBuilder()
      .setOutputRoot(relativeOutRoot)
      .setInputFile(
        remappedInPath,
        dataFormat,
        Map("features" -> InputShape(10000, "sparse"),
            "labels" -> InputShape(1, "dense")))

    val cb = new CNTKCommandBuilder(false)
      .appendOverrideConfig(config.toOverrideConfig)

    // TODO: add assertions to really validate instead
    println(cb.buildCommand)
  }

}


text:
package com.adaptris.core;

/**
 *

 * Create a TradingRelationship from an
 * AdaptrisMessage.
 *

 */
public interface TradingRelationshipCreator {

  /**
   *

   * Create a TradingRelationship from an
   * AdaptrisMessage.
   *

   * @param msg the AdaptrisMessage to process
   * @return a TradingRelationship
   * @throws CoreException wrapping any Exceptions which occur
   */
  TradingRelationship create(AdaptrisMessage msg) throws CoreException;
}


text:
enum WrfModelType{
    WRF_UNKNOWN_MODEL = 0x0,
    WRF_OBSERVATION,
    WRF_T639,
    WRF_EC_FINE,
    WRF_JAPAN_GSM,
    WRF_NCEP,
    WRF_ELEMENT_UNCERTAINTY
};

enum WrfElementType{
    WRF_UNKNOWN_ELEMENT = 0x0,
    WRF_RAIN_12_HOURS,
    WRF_RAIN_24_HOURS,
    WRF_TEMPRATURE_500HPA,
    WRF_TEMPERATURE_850HPA,
    WRF_HEIGHT_500HPA,
    WRF_HEIGHT_850HPA,
    WRF_RELATIVE_HUMIDITY_500HPA,
    WRF_RELATIVE_HUMIDITY_850HPA,
    WRF_UNCERTAINTY
};

class WRFCOMMON_EXPORT WrfTime
{
public:
    WrfTime(){
        year = 0;
        month = 0;
        day = 0;
        hour = 0;
    }
    WrfTime(int year_t, int month_t, int day_t, int hour_t){
        year = year_t;
        month = month_t;
        day = day_t;
        hour = hour_t;
    }
    WrfTime(const WrfTime& time){
        year = time.year;
        month = time.month;
        day = time.day;
        hour = time.hour;
    }
    ~WrfTime(){}

    const WrfTime& operator = (const WrfTime& time){
        year = time.year;
        month = time.month;
        day = time.day;
        hour = time.hour;

        return *this;
    }

    void AddHour(int hour_t){
        hour += hour_t;
        if ( hour > 24 ){
            day += hour / 24;
            hour %= 24;
        }
        if ( month == 2 && day > 28 ){
            if ( year % 4 == 0 && year % 100 != 0 || year % 400 == 0 ){
                if ( day > 29 ){
                    month += 1;
                    day -= 29;
                }
            } else {
                month += 1;
                day -= 28;
            }
        } else if ( day > 30 ){
            if ( month == 4 || month == 6 || month == 9 ){
                month += 1;
                day -= 30;
            } else if ( day > 31 ){
                month += 1;
                day -= 31;
            }
        }

        if ( month > 12 ){
            year += 1;
            month -= 12;
        }
    }

    int ToInt() const{
        return hour + day * 100 + month * 10000 + year % 100 * 1000000;
    }

    std::string ToString() const{
        char temp_str[9];
        sprintf_s(temp_str, 9, "%08d", ToInt());
        return std::string(temp_str);
    }

    std::string ToYMString() const{
        char temp_str[7];
        sprintf_s(temp_str, 7, "%06d", year * 100 + month);
        return std::string(temp_str);
    }

    friend inline bool operator < (const WrfTime& time1, const WrfTime& time2){
        return (time1.ToInt() < time2.ToInt());
    }

    friend inline bool operator > (const WrfTime& time1, const WrfTime& time2){
        return (time1.ToInt() > time2.ToInt());
    }

    friend inline bool operator <= (const WrfTime& time1, const WrfTime& time2){
        return (time1.ToInt() <= time2.ToInt());
    }

    friend inline bool operator >= (const WrfTime& time1, const WrfTime& time2){
        return (time1.ToInt() >= time2.ToInt());
    }

    friend inline bool operator == (const WrfTime& time1, const WrfTime& time2){
        return (time1.ToInt() == time2.ToInt());
    }

    friend class boost::serialization::access;
    template< class Archive >
    void serialize(Archive& ar, const unsigned int version){
        ar & year;
        ar & month;
        ar & day;
        ar & hour;
    }

    int year, month, day, hour;
};

class WRFCOMMON_EXPORT WrfValueMap
{
public:
    WrfValueMap() {
        model_type = WRF_UNKNOWN_MODEL;
        element_type = WRF_UNKNOWN_ELEMENT;

        map_time = WrfTime(0, 0, 0, 0);
        exposion_time = -1;
    }
    ~WrfValueMap() {}

    enum ValueMapType{
        UNKNOWN_VALUE_MAP = 0x0,
        DISCRETE_VALUE_MAP,
        GRID_VALUE_MAP
    };

    virtual ValueMapType type(){
        return UNKNOWN_VALUE_MAP;
    }

    friend class boost::serialization::access;
    template< class Archive >
    void serialize(Archive& ar, const unsigned int version){
        ar & model_type;
        ar & element_type;
        ar & header_info;

        ar & map_time;
        ar & exposion_time;
    }

    WrfModelType model_type;
    WrfElementType element_type;
    std::string header_info;

    WrfTime map_time;
    int exposion_time;
};

struct DiscreteDataRecord
{
    long site_id;
    float longitude, latitude, altitude;
    float value1, value2;

    friend class boost::serialization::access;
    template<class Archive>
    void serialize(Archive & ar, const unsigned int version){
        ar & site_id;
        ar & longitude;
        ar & latitude;
        ar & altitude;
        ar & value1;
        ar & value2;
    }
};

class WrfDiscreteValueMap : public WrfValueMap
{
public:
    WrfDiscreteValueMap() {
        min_longitude = 1e10;
        max_longitude = -1e10;
        min_latitude = 1e10;
        max_latitude = -1e10;
    }
    ~WrfDiscreteValueMap() {}

    std::vector< DiscreteDataRecord > values;
    float min_longitude, max_longitude, min_latitude, max_latitude;

    virtual WrfValueMap::ValueMapType type() {
        return WrfValueMap::DISCRETE_VALUE_MAP;
    }

    friend class boost::serialization::access;
    template<class Archive>
    void serialize(Archive & ar, const unsigned int version){
        ar & boost::serialization::base_object< WrfValueMap >(*this);
        ar & values;
    }
};

class WRF_DATA_EXPORT WrfGridValueMap : public WrfValueMap
{
public:
    WrfGridValueMap(){
        longitude_grid_space = 0.0f;
        latitude_grid_space = 0.0f;
        start_longitude =  -1.0f;
        end_longitude = -1.0f;
        start_latitude = -1.0f;
        end_latitude = -1.0f;
        latitude_grid_number = 0;
        longitude_grid_space = 0;
        max_value = -1.0f;
        min_value = -1.0f;
        values.clear();
    }

    WrfGridValueMap(const WrfGridValueMap& value_map){
        this->model_type = value_map.model_type;
        this->element_type = value_map.element_type;
        this->header_info = value_map.header_info;

        this->longitude_grid_number = value_map.longitude_grid_number;
        this->latitude_grid_number = value_map.latitude_grid_number;
        this->longitude_grid_space = value_map.longitude_grid_space;
        this->latitude_grid_space = value_map.latitude_grid_space;
        this->start_longitude = value_map.start_longitude;
        this->start_latitude = value_map.start_latitude;
        this->end_longitude = value_map.end_longitude;
        this->end_latitude = value_map.end_latitude;

        this->max_value = value_map.max_value;
        this->min_value = value_map.min_value;
        this->values.assign(value_map.values.begin(), value_map.values.end());

        this->map_time = value_map.map_time;
        this->exposion_time = value_map.exposion_time;
    }

    ~WrfGridValueMap(){

    }

    static WrfGridValueMap* ConvertDiscrete2Grid(WrfDiscreteValueMap* discrete_map, WrfGridValueMap* template_map);
    static float Interpolate(WrfGridValueMap* value_map, float longitude, float latitude, float radius);
    static float Distance(float x1, float y1, float x2, float y2);

    WrfGridValueMap* ConvertDiscrete2Grid(WrfDiscreteValueMap* discrete_map);

    float longitude_grid_space, latitude_grid_space;
    float start_longitude, end_longitude, start_latitude, end_latitude;
    int latitude_grid_number, longitude_grid_number;

    float max_value, min_value;
    std::vector< float > values;

    const WrfGridValueMap& operator = (WrfGridValueMap& value_map){
        this->model_type = value_map.model_type;
        this->element_type = value_map.element_type;
        this->header_info = value_map.header_info;

        this->longitude_grid_number = value_map.longitude_grid_number;
        this->latitude_grid_number = value_map.latitude_grid_number;
        this->longitude_grid_space = value_map.longitude_grid_space;
        this->latitude_grid_space = value_map.latitude_grid_space;
        this->start_longitude = value_map.start_longitude;
        this->start_latitude = value_map.start_latitude;
        this->end_longitude = value_map.end_longitude;
        this->end_latitude = value_map.end_latitude;

        this->max_value = value_map.max_value;
        this->min_value = value_map.min_value;
        this->values.assign(value_map.values.begin(), value_map.values.end());

        this->map_time = value_map.map_time;
        this->exposion_time = value_map.exposion_time;

        return *this;
    }

    virtual WrfValueMap::ValueMapType type() {
        return WrfValueMap::GRID_VALUE_MAP;
    }

    friend class boost::serialization::access;
    template< class Archive >
    void serialize(Archive& ar, const unsigned int version){
        ar & longitude_grid_space;
        ar & latitude_grid_space;
        ar & start_longitude;
        ar & start_latitude;
        ar & end_longitude;
        ar & end_latitude;
        ar & latitude_grid_number;
        ar & longitude_grid_number;
        ar & max_value;
        ar & min_value;
        ar & values;
    }
};

#endif


text:
<head>
  <meta name="google-site-verification" content="FW59WQQDH90oqnCkTZLJVIFXYZyEJvVf_xNJxubH5ME" />
  <meta name="description" conten="{% if page.description %}{{ page.description }} {% endif %}">
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
  <link href="http://gmpg.org/xfn/11" rel="profile">

  <title>
    {% if page.title %}{{ page.title }} · {% endif %}
    {{ site.tagline }}
  </title>
  <meta name="description" content"{% if page.description %}{{ page.description }} {% endif %}">
  <!-- CSS -->
  <link rel="stylesheet" href="/public/css/hyde.css">
  <link rel="stylesheet" href="/public/css/syntax.css">
  <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400italic,400,600,700|Abril+Fatface">

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

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


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package inventorysystem.DB;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DBUtil {
    private static final String USERNAME ="root";
    private static final String PASSWORD ="Kenneth";
    private static final String CONN ="jdbc:mysql://localhost:3306/inventory_db";

    public static Connection getConnection(DBType dbType) throws SQLException{
        switch(dbType){
            case MYSQL:
                return DriverManager.getConnection(CONN+"?user="+USERNAME+"&password="+PASSWORD);

            default:
                return null;
        }

    }

    public static void errorProcess(SQLException e){
        System.out.println("Eroor message : "+e.getMessage());
        System.out.println("Eroor code : "+e.getErrorCode());
        System.out.println("SQL state : "+e.getSQLState());
    }
}


text:
package md

const PageSize = uint(4096)

const LittleEndian = true
const BigEndian = false


text:
using System;
using System.Xml.Serialization;

namespace Hanoi.Serialization.Extensions.MultiUserChat {
    /// <summary>
    ///   XEP-0045: Multi-User Chat
    /// </summary>
    [Serializable]
    [XmlType(Namespace = "http://jabber.org/protocol/muc#admin")]
    [XmlRootAttribute("actor", Namespace = "http://jabber.org/protocol/muc#admin", IsNullable = false)]
    public class MucAdminActor {
        private string jid;
        private string value;

        /// <remarks />
        [XmlAttributeAttribute("jid")]
        public string Jid {
            get { return jid; }
            set { jid = value; }
        }

        /// <remarks />
        [XmlTextAttribute]
        public string Value {
            get { return value; }
            set {
                this.value = value;
                ;
            }
        }
    }
}


text:
package org.banyan.concurrent.lock;

/**
 * User:krisjin
 * Date:2019/4/26
 */
public class SimpleLock {

    private boolean isLocked = false;

    public synchronized void lock() throws InterruptedException {

        while (isLocked) {
            wait();
        }
        isLocked = true;

    }

    public synchronized void unlock() {
        isLocked = false;
        notify();
    }

}


text:
package org.kuali.mobility.push.service;

import net.sf.json.JSONException;
import net.sf.json.JSONObject;
import net.sf.json.JSONSerializer;
import org.apache.cxf.jaxrs.ext.MessageContext;
import org.kuali.mobility.push.entity.Device;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.*;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.Response;
import java.sql.Timestamp;
import java.util.Iterator;
import java.util.List;

/**
 * Implementation of the CXF Device Service
 *
 * @author Kuali Mobility Team (mobility.dev@kuali.org)
 * @since 3.0
 * @deprecated This class should be replaced and implemented by {@link org.kuali.mobility.push.service.rest.DeviceServiceRest}
 */
@Service
@Deprecated
public class CXFDeviceService {

	private static final String USERNAME = "username";

	private static final long ONE_MONTH = 2628000000L;
	private static final long THREE_MONTHS = 7884000000L;
	private static final long SIX_MONTHS = 15768000000L;
	private static final long ONE_YEAR = 31536000000L;

	/** A reference to a logger for this service */
	private static final Logger LOG = LoggerFactory.getLogger(CXFDeviceService.class);

	/**
	 * A reference to the Controllers DeviceService object.
	 */
	@Autowired
	private DeviceService deviceService;

	@GET
	@Path("/count")
    public String countDevices(@QueryParam(value="data") String data) {
    	LOG.info("-----Register----- " + data);
    	if(data == null){
    		return "{\"status\":\"NO_CONTENT\"}";
    	}

    	JSONObject queryParams;
    	try{
    		queryParams = (JSONObject) JSONSerializer.toJSON(data);
    		LOG.info(queryParams.toString());
    	}catch(JSONException je){
    		LOG.error("JSONException in :" + data + " : " + je.getMessage());
    		return "{\"status\":\"BAD_REQUEST\"}";
    	}
    	String type = queryParams.getString("type");
    	Long counted = 0l;
    	if("username".equals(type)){
    		String username = queryParams.getString("username");
    		counted = this.getDeviceService().countDevicesWithUsername(username);
    	}else if("1month".equals(type)){
    		counted = this.getDeviceService().countDevicesBefore(new Timestamp(System.currentTimeMillis() - ONE_MONTH));
    	}else if("3month".equals(type)){
    		counted = this.getDeviceService().countDevicesBefore(new Timestamp(System.currentTimeMillis() - THREE_MONTHS));
    	}else if("6month".equals(type)){
    		counted = this.getDeviceService().countDevicesBefore(new Timestamp(System.currentTimeMillis() - SIX_MONTHS));
    	}else if("1year".equals(type)){
    		counted = this.getDeviceService().countDevicesBefore(new Timestamp(System.currentTimeMillis() - ONE_YEAR));
    	}else if("allios".equals(type)){
    		counted = this.getDeviceService().countDevices(Device.TYPE_IOS);
    	}else if("allandroid".equals(type)){
    		counted = this.getDeviceService().countDevices(Device.TYPE_ANDROID);
    	}else if("allblackberry".equals(type)){
    		counted = this.getDeviceService().countDevices(Device.TYPE_BLACKBERRY);
    	}else if("allwindows".equals(type)){
    		counted = this.getDeviceService().countDevices(Device.TYPE_WINDOWS);
    	}else if("all".equals(type)){
    		counted = this.getDeviceService().countDevices();
    	}
    	return "{\"status\":\"OK\", \"count\":\"" + counted + "\"}";
	}

    @GET
    @Path("/delete")
    public String deleteDevice(@QueryParam(value="data") String data) {
    	LOG.info("-----Register----- " + data);
    	if(data == null){
    		return "{\"status\":\"NO_CONTENT\"}";
    	}

    	JSONObject queryParams;
    	try{
    		queryParams = (JSONObject) JSONSerializer.toJSON(data);
    		LOG.info(queryParams.toString());
    	}catch(JSONException je){
    		LOG.error("JSONException in :" + data + " : " + je.getMessage());
    		return "{\"status\":\"BAD_REQUEST\"}";
    	}
    	String type = queryParams.getString("type");
    	int deleted = 20;
    	if("username".equals(type)){
    		String username = queryParams.getString("username");
    		LOG.info("Will delete all devices for username :\"" + username + "\"");
    		deviceService.removeAllDevicesWithUsername(username);
    	}else if("1month".equals(type)){
    		LOG.info("Will Delete devices older than 1 month.");
    		this.getDeviceService().removeAllDevicesBefore(new Timestamp(System.currentTimeMillis() - ONE_MONTH));
    	}else if("3month".equals(type)){
    		LOG.info("Will Delete devices older than 3 months.");
    		this.getDeviceService().removeAllDevicesBefore(new Timestamp(System.currentTimeMillis() - THREE_MONTHS));
    	}else if("6month".equals(type)){
    		LOG.info("Will Delete devices older than 6 months.");
    		this.getDeviceService().removeAllDevicesBefore(new Timestamp(System.currentTimeMillis() - SIX_MONTHS));
    	}else if("1year".equals(type)){
    		LOG.info("Will Delete devices older than 1 year.");
    		this.getDeviceService().removeAllDevicesBefore(new Timestamp(System.currentTimeMillis() - ONE_YEAR));
    	}else if("allios".equals(type)){
    		LOG.info("Will Delete all iOS devices.");
    		this.getDeviceService().removeAllDevicesByType(Device.TYPE_IOS);
    	}else if("allandroid".equals(type)){
    		LOG.info("Will Delete all Android devices.");
    		this.getDeviceService().removeAllDevicesByType(Device.TYPE_ANDROID);
    	}else if("allblackberry".equals(type)){
    		LOG.info("Will Delete all Blackberry devices.");
    		this.getDeviceService().removeAllDevicesByType(Device.TYPE_BLACKBERRY);
    	}else if("allwindows".equals(type)){
    		LOG.info("Will Delete all Windows devices.");
    		this.getDeviceService().removeAllDevicesByType(Device.TYPE_WINDOWS);
    	}else if("all".equals(type)){
    		LOG.info("Will Delete all devices.");
    		deviceService.removeAllDevices();
    	}
		return "{\"status\":\"OK\", \"count\":\"" + deleted + "\"}";
    }

	@GET
	@Path("/counts")
	public String getDeviceCounts(){
		Long all = this.getDeviceService().countDevices();
		Long iOS = this.getDeviceService().countDevices(Device.TYPE_IOS);
		Long android = this.getDeviceService().countDevices(Device.TYPE_ANDROID);
		Long blackberry = this.getDeviceService().countDevices(Device.TYPE_IOS);
		Long windows = this.getDeviceService().countDevices(Device.TYPE_WINDOWS);
		Long unreg = this.getDeviceService().countDevicesWithoutUsername();

		return "{\"all\":\"" + all + "\",\"iOS\":\"" + iOS +"\",\"android\":\"" + android + "\",\"blackberry\":\""+blackberry+"\",\"windows\":\"" + windows + "\",\"unregistered\":\"" + unreg + "\" }";
	}

	/**
	 * CXF Service method for retrieving devices based on a keyword search.
	 * @param keyword
	 * @return
	 */
	@GET
    @Path("/keyword/{keyword}")
    public String devicesByKeyword(@PathParam("keyword") final String keyword) {
		List<Device> devices = getDeviceService().findDevicesByKeyword(keyword);
		LOG.info(devices.size() + " elements returned.");

		String json = "";
		if(devices.size() > 0){
			Iterator<Device> i = devices.iterator();
			if(devices.size() > 1){
				json = "{\"total\":\"" + devices.size() + " Devices Found.\" , \"devices\":[";
			}else{
				json = "{\"total\":\"" + devices.size() + " Device Found.\" , \"devices\":[";
			}
			while(i.hasNext()){
				json += ((Device)i.next()).toJson();
				json += ",";
			}
			json = json.substring(0, json.length()-1);
			json += "]}";
		}else{
			json = "{\"total\":\"No Devices Found\"}";
		}
		return json;
    }

	/**
	 * @return the deviceService
	 */
	public DeviceService getDeviceService() {
		return deviceService;
	}

	/**
	 * @param deviceService the deviceService to set
	 */
	public void setDeviceService(DeviceService deviceService) {
		this.deviceService = deviceService;
	}

//	/**
//	 * Get the controllers UserDao object.
//	 * @return
//	 */
//	public UserDao getUserDao() {
//		return userDao;
//	}
//
//	/**
//	 * A method for setting the UserDao of the controller.
//	 *
//	 * @param userDao
//	 */
//	public void setUserDao(UserDao userDao) {
//		this.userDao = userDao;
//	}

}


text:
"use strict";

const { merge } = require("lodash");

const { NotFoundError } = require("../../kerror/errors");
const Repository = require("../shared/repository");
const cacheDbEnum = require("../cache/cacheDbEnum");

class PluginRepository extends Repository {
  constructor(store, collection) {
    super({ cache: cacheDbEnum.NONE, store });

    this.collection = collection;
    this.ObjectConstructor = Object;
  }

  init(options) {
    if (options && typeof options === "object" && !Array.isArray(options)) {
      if (options.ObjectConstructor) {
        this.ObjectConstructor = options.ObjectConstructor;
      }
    }
  }

  /**
   * Serializes the object before being persisted to database.
   *
   * @param {object} data - The object to serialize
   * @returns {object}
   */
  serializeToDatabase(data) {
    // avoid the data var mutation
    const result = merge({}, data);

    delete result._id;

    return result;
  }

  /**
   * @param {object} object
   * @param {object} [options]
   * @returns {Promise}
   */
  create(object, options = {}) {
    const opts = Object.assign({ method: "create" }, options);

    return this.persistToDatabase(object, opts);
  }

  /**
   * @param {object} object
   * @param {object} [options]
   * @returns {Promise}
   */
  createOrReplace(object, options = {}) {
    const opts = Object.assign({ method: "createOrReplace" }, options);

    return this.persistToDatabase(object, opts);
  }

  /**
   * @param {object} object
   * @param {object} [options]
   * @returns {Promise}
   */
  replace(object, options = {}) {
    const opts = Object.assign({ method: "replace" }, options);

    return this.persistToDatabase(object, opts);
  }

  /**
   * @param {object} object
   * @param {object} [options]
   * @returns {Promise}
   */
  update(object, options = {}) {
    const opts = Object.assign({ method: "update" }, options);

    return this.persistToDatabase(object, opts);
  }

  /**
   * If we load a user that does not exists, we have to resolve the promise with null
   * instead of throwing NotFoundError
   *
   * @param {string} documentId
   * @returns {Promise}
   */
  load(documentId) {
    return super.load(documentId).catch((error) => {
      if (this.collection === "users" && error instanceof NotFoundError) {
        return Promise.resolve(null);
      }

      throw error;
    });
  }

  /**
   * @param {string} documentId
   * @param {object} [options]
   * @returns {Promise}
   */
  delete(documentId, options = {}) {
    return super.delete({ _id: documentId }, options);
  }
}

module.exports = PluginRepository;


text:
package info.naiv.lab.java.jmt.iteration;

import info.naiv.lab.java.jmt.fx.Function2;

/**
 *
 * @author enlo
 * @param <T>
 * @param <R>
 */
public interface LoopFunction<T, R> extends Function2<T, LoopCondition, R> {

}


text:
<?php
/**
 * Infinite Scroll Theme Assets
 *
 * Register support for Twenty Fifteen.
 */

/**
 * Add theme support for infinite scroll
 */
function twentyfifteen_infinite_scroll_init() {
	add_theme_support( 'infinite-scroll', array(
		'container' => 'main',
		'footer'    => 'page',
	) );
}
add_action( 'after_setup_theme', 'twentyfifteen_infinite_scroll_init' );

/**
 * Enqueue CSS stylesheet with theme styles for Infinite Scroll.
 */
function twentyfifteen_infinite_scroll_enqueue_styles() {
	if ( wp_script_is( 'the-neverending-homepage' ) ) {
		wp_enqueue_style( 'infinity-twentyfifteen', plugins_url( 'twentyfifteen.css', __FILE__ ), array( 'the-neverending-homepage' ), '20141022' );
		wp_style_add_data( 'infinity-twentyfifteen', 'rtl', 'replace' );
	}
}
add_action( 'wp_enqueue_scripts', 'twentyfifteen_infinite_scroll_enqueue_styles', 25 );


text:
CKEDITOR.lang['ro'] = {
    "editor": "Rich Text Editor",
    "editorPanel": "Rich Text Editor panel",
    "common": {
        "editorHelp": "Apasă ALT 0 pentru ajutor",
        "browseServer": "Răsfoieşte server",
        "url": "URL",
        "protocol": "Protocol",
        "upload": "Încarcă",
        "uploadSubmit": "Trimite la server",
        "image": "Imagine",
        "flash": "Flash",
        "form": "Formular (Form)",
        "checkbox": "Bifă (Checkbox)",
        "radio": "Buton radio (RadioButton)",
        "textField": "Câmp text (TextField)",
        "textarea": "Suprafaţă text (Textarea)",
        "hiddenField": "Câmp ascuns (HiddenField)",
        "button": "Buton",
        "select": "Câmp selecţie (SelectionField)",
        "imageButton": "Buton imagine (ImageButton)",
        "notSet": "<nesetat>",
        "id": "Id",
        "name": "Nume",
        "langDir": "Direcţia cuvintelor",
        "langDirLtr": "stânga-dreapta (LTR)",
        "langDirRtl": "dreapta-stânga (RTL)",
        "langCode": "Codul limbii",
        "longDescr": "Descrierea lungă URL",
        "cssClass": "Clasele cu stilul paginii (CSS)",
        "advisoryTitle": "Titlul consultativ",
        "cssStyle": "Stil",
        "ok": "OK",
        "cancel": "Anulare",
        "close": "Închide",
        "preview": "Previzualizare",
        "resize": "Trage pentru a redimensiona",
        "generalTab": "General",
        "advancedTab": "Avansat",
        "validateNumberFailed": "Această valoare nu este un număr.",
        "confirmNewPage": "Orice modificări nesalvate ale acestui conținut, vor fi pierdute. Sigur doriți încărcarea unei noi pagini?",
        "confirmCancel": "Câteva opțiuni au fost schimbate. Sigur doriți să închideți dialogul?",
        "options": "Opțiuni",
        "target": "Țintă",
        "targetNew": "Fereastră nouă (_blank)",
        "targetTop": "Topmost Window (_top)",
        "targetSelf": "În aceeași fereastră (_self)",
        "targetParent": "Parent Window (_parent)",
        "langDirLTR": "Stânga spre Dreapta (LTR)",
        "langDirRTL": "Dreapta spre Stânga (RTL)",
        "styles": "Stil",
        "cssClasses": "Stylesheet Classes",
        "width": "Lăţime",
        "height": "Înălţime",
        "align": "Aliniere",
        "alignLeft": "Mărește Bara",
        "alignRight": "Dreapta",
        "alignCenter": "Centru",
        "alignJustify": "Aliniere în bloc (Block Justify)",
        "alignTop": "Sus",
        "alignMiddle": "Mijloc",
        "alignBottom": "Jos",
        "alignNone": "None",
        "invalidValue": "Varloare invalida",
        "invalidHeight": "Înălțimea trebuie să fie un număr.",
        "invalidWidth": "Lățimea trebuie să fie un număr.",
        "invalidCssLength": "Value specified for the \"%1\" field must be a positive number with or without a valid CSS measurement unit (px, %, in, cm, mm, em, ex, pt, or pc).",
        "invalidHtmlLength": "Value specified for the \"%1\" field must be a positive number with or without a valid HTML measurement unit (px or %).",
        "invalidInlineStyle": "Value specified for the inline style must consist of one or more tuples with the format of \"name : value\", separated by semi-colons.",
        "cssLengthTooltip": "Enter a number for a value in pixels or a number with a valid CSS unit (px, %, in, cm, mm, em, ex, pt, or pc).",
        "unavailable": "%1, nu este disponibil"
    },
    "about": {
        "copy": "Copyright © $1. Toate drepturile rezervate.",
        "dlgTitle": "Despre CKEeditor",
        "help": "Citește  $1 pentru ajutor.",
        "moreInfo": "Pentru informații despre licență, vă rugăm vizitați web site-ul nostru:",
        "title": "Despre CKEditor",
        "userGuide": "CKEditor Ghid Utilizator"
    },
    "basicstyles": {
        "bold": "Îngroşat (bold)",
        "italic": "Înclinat (italic)",
        "strike": "Tăiat (strike through)",
        "subscript": "Indice (subscript)",
        "superscript": "Putere (superscript)",
        "underline": "Subliniat (underline)"
    },
    "clipboard": {
        "copy": "Copiază",
        "copyError": "Setările de securitate ale navigatorului (browser) pe care îl folosiţi nu permit editorului să execute automat operaţiunea de copiere. Vă rugăm folosiţi tastatura (Ctrl/Cmd+C).",
        "cut": "Taie",
        "cutError": "Setările de securitate ale navigatorului (browser) pe care îl folosiţi nu permit editorului să execute automat operaţiunea de tăiere. Vă rugăm folosiţi tastatura (Ctrl/Cmd+X).",
        "paste": "Adaugă",
        "pasteArea": "Suprafața de adăugare",
        "pasteMsg": "Vă rugăm adăugaţi în căsuţa următoare folosind tastatura (Ctrl/Cmd+V) şi apăsaţi OK",
        "securityMsg": "Din cauza setărilor de securitate ale programului dvs. cu care navigaţi pe internet (browser), editorul nu poate accesa direct datele din clipboard. Va trebui să adăugaţi din nou datele în această fereastră.",
        "title": "Adaugă"
    },
    "button": {"selectedLabel": "%1 (Selectat)"},
    "toolbar": {
        "toolbarCollapse": "Micșorează Bara",
        "toolbarExpand": "Mărește Bara",
        "toolbarGroups": {
            "document": "Document",
            "clipboard": "Clipboard/Undo",
            "editing": "Editing",
            "forms": "Forms",
            "basicstyles": "Basic Styles",
            "paragraph": "Paragraph",
            "links": "Links",
            "insert": "Insert",
            "styles": "Styles",
            "colors": "Colors",
            "tools": "Tools"
        },
        "toolbars": "Editează bara de unelte"
    },
    "indent": {"indent": "Creşte indentarea", "outdent": "Scade indentarea"},
    "fakeobjects": {
        "anchor": "Inserează/Editează ancoră",
        "flash": "Flash Animation",
        "hiddenfield": "Câmp ascuns (HiddenField)",
        "iframe": "IFrame",
        "unknown": "Unknown Object"
    },
    "link": {
        "acccessKey": "Tasta de acces",
        "advanced": "Avansat",
        "advisoryContentType": "Tipul consultativ al titlului",
        "advisoryTitle": "Titlul consultativ",
        "anchor": {
            "toolbar": "Inserează/Editează ancoră",
            "menu": "Proprietăţi ancoră",
            "title": "Proprietăţi ancoră",
            "name": "Numele ancorei",
            "errorName": "Vă rugăm scrieţi numele ancorei",
            "remove": "Elimină ancora"
        },
        "anchorId": "după Id-ul elementului",
        "anchorName": "după numele ancorei",
        "charset": "Setul de caractere al resursei legate",
        "cssClasses": "Clasele cu stilul paginii (CSS)",
        "emailAddress": "Adresă de e-mail",
        "emailBody": "Opțiuni Meniu Contextual",
        "emailSubject": "Subiectul mesajului",
        "id": "Id",
        "info": "Informaţii despre link (Legătură web)",
        "langCode": "Direcţia cuvintelor",
        "langDir": "Direcţia cuvintelor",
        "langDirLTR": "stânga-dreapta (LTR)",
        "langDirRTL": "dreapta-stânga (RTL)",
        "menu": "Editează Link",
        "name": "Nume",
        "noAnchors": "(Nicio ancoră disponibilă în document)",
        "noEmail": "Vă rugăm să scrieţi adresa de e-mail",
        "noUrl": "Vă rugăm să scrieţi URL-ul",
        "other": "<alt>",
        "popupDependent": "Dependent (Netscape)",
        "popupFeatures": "Proprietăţile ferestrei popup",
        "popupFullScreen": "Tot ecranul (Full Screen)(IE)",
        "popupLeft": "Poziţia la stânga",
        "popupLocationBar": "Bara de locaţie",
        "popupMenuBar": "Bara de meniu",
        "popupResizable": "Redimensionabil",
        "popupScrollBars": "Bare de derulare",
        "popupStatusBar": "Bara de status",
        "popupToolbar": "Bara de opţiuni",
        "popupTop": "Poziţia la dreapta",
        "rel": "Relație",
        "selectAnchor": "Selectaţi o ancoră",
        "styles": "Stil",
        "tabIndex": "Indexul tabului",
        "target": "Ţintă (Target)",
        "targetFrame": "<frame>",
        "targetFrameName": "Numele frameului ţintă",
        "targetPopup": "<fereastra popup>",
        "targetPopupName": "Numele ferestrei popup",
        "title": "Link (Legătură web)",
        "toAnchor": "Ancoră în această pagină",
        "toEmail": "E-Mail",
        "toUrl": "URL",
        "toolbar": "Inserează/Editează link (legătură web)",
        "type": "Tipul link-ului (al legăturii web)",
        "unlink": "Înlătură link (legătură web)",
        "upload": "Încarcă"
    },
    "list": {
        "bulletedlist": "Inserează / Elimină Listă cu puncte",
        "numberedlist": "Inserează / Elimină Listă numerotată"
    },
    "undo": {"redo": "Starea ulterioară (redo)", "undo": "Starea anterioară (undo)"}
};


text:
using Ninject.Modules;
using RedmineLog.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RedmineLog.Logic.Data
{
    public class Bindings : NinjectModule
    {
        public override void Load()
        {
            Bind<IDatabase>().To<Database>().InSingletonScope();
            Bind<IDbRedmine>().To<RedmineSetting>().InSingletonScope();
            Bind<IDbConfig>().To<AppConfig>().InSingletonScope();
            Bind<IDbIssue>().To<IssuesTable>().InSingletonScope();
            Bind<IDbCache>().To<CacheTable>().InSingletonScope();
            Bind<IDbLastIssue>().To<LastIssuesTable>().InSingletonScope();
            Bind<IDbComment>().To<CommentsTable>().InSingletonScope();
            Bind<IDbRedmineIssue>().To<RedmineIssuesTable>().InSingletonScope();
        }
    }
}


text:
package com.alibaba.dubbo.rpc.protocol.dubbo;

import java.io.IOException;

import com.alibaba.dubbo.common.Constants;
import com.alibaba.dubbo.remoting.Channel;
import com.alibaba.dubbo.remoting.Codec2;
import com.alibaba.dubbo.remoting.buffer.ChannelBuffer;
import com.alibaba.dubbo.remoting.exchange.Request;
import com.alibaba.dubbo.remoting.exchange.Response;
import com.alibaba.dubbo.remoting.exchange.support.MultiMessage;
import com.alibaba.dubbo.rpc.RpcInvocation;
import com.alibaba.dubbo.rpc.RpcResult;

/**
 * @author kimi
 */
public final class DubboCountCodec implements Codec2 {

    private DubboCodec codec = new DubboCodec();

    public void encode(Channel channel, ChannelBuffer buffer, Object msg) throws IOException {
        codec.encode(channel, buffer, msg);
    }

    public Object decode(Channel channel, ChannelBuffer buffer) throws IOException {
        int save = buffer.readerIndex();
        MultiMessage result = MultiMessage.create();
        //可能由于网络原因,一次接收到比较多的的数据包
        do {
            Object obj = codec.decode(channel, buffer);
            //如果结果表示为需要更多的数据的话,就将原本保持的readerIndex设置回去,因为在decode的时候可能改变了readerIndex
            if (Codec2.DecodeResult.NEED_MORE_INPUT == obj) {
                buffer.readerIndex(save);
                break;
            } else {
                result.addMessage(obj);
                //将解码后的结果大小记录到result中
                logMessageLength(obj, buffer.readerIndex() - save);
                save = buffer.readerIndex();
            }
        } while (true);
        if (result.isEmpty()) {
            return Codec2.DecodeResult.NEED_MORE_INPUT;
        }
        if (result.size() == 1) {
            return result.get(0);
        }
        return result;
    }

    private void logMessageLength(Object result, int bytes) {
        if (bytes <= 0) { return; }
        if (result instanceof Request) {
            try {
                ((RpcInvocation) ((Request) result).getData()).setAttachment(
                    Constants.INPUT_KEY, String.valueOf(bytes));
            } catch (Throwable e) {
                /* ignore */
            }
        } else if (result instanceof Response) {
            try {
                ((RpcResult) ((Response) result).getResult()).setAttachment(
                    Constants.OUTPUT_KEY, String.valueOf(bytes));
            } catch (Throwable e) {
                /* ignore */
            }
        }
    }

}


text:
<title>Erro 404 | Ral Oliver - Freelancer Web</title>
<meta name="description" content="404 | Ral Oliver - Desenvolvimento de sites em Joomla, PHP, Less, JavaScript e Zend Framework." />
<meta name="keywords" content="raloliver, ral, oliver, israel, joomtus, joomla, curitiba, parana, bahia, cms, sites" />

<?php setHeader();?>

Erro 404 - Página não encontrada!

Erro 404 | Desculpe, está página ainda não foi criada. Por favor, navegue por nosso menu.

                <img src="	<?php setHome();?>/tpl/images/404.jpg" alt="Erro 404" title="Erro 404 - Página não encontrada!"/>


text:
@interface SplashViewController : UIViewController<UIScrollViewDelegate,iCarouselDataSource,iCarouselDelegate>
{
    int currentIndex;
    IBOutlet iCarousel* list;
    IBOutlet UIPageControl* pageControl;
    IBOutlet UIButton* leftButton;
    IBOutlet UIButton* rightButton;
    IBOutlet UIButton* startButton;
    int pageIndex;
    NSMutableArray* items;
}
+(SplashViewController*)sharedInstance;
@end


text:
package ru.hh.oauth.subscribe.apis;

import ru.hh.oauth.subscribe.core.builder.api.DefaultApi10a;
import ru.hh.oauth.subscribe.core.model.Token;

public class TumblrApi extends DefaultApi10a {

    private static final String AUTHORIZE_URL = "https://www.tumblr.com/oauth/authorize?oauth_token=%s";
    private static final String REQUEST_TOKEN_RESOURCE = "http://www.tumblr.com/oauth/request_token";
    private static final String ACCESS_TOKEN_RESOURCE = "http://www.tumblr.com/oauth/access_token";

    @Override
    public String getAccessTokenEndpoint() {
        return ACCESS_TOKEN_RESOURCE;
    }

    @Override
    public String getRequestTokenEndpoint() {
        return REQUEST_TOKEN_RESOURCE;
    }

    @Override
    public String getAuthorizationUrl(Token requestToken) {
        return String.format(AUTHORIZE_URL, requestToken.getToken());
    }
}


text:
<tool id="gemini_@BINARY@" name="GEMINI @BINARY@" version="@VERSION@.0">
    <description>Retrieve genes with actionable somatic mutations via COSMIC and DGIdb</description>
    <macros>
        <import>gemini_macros.xml</import>
        <token name="@BINARY@">actionable_mutations</token>
    </macros>
    <expand macro="requirements" />
    <expand macro="stdio" />
    <expand macro="version_command" />
    <command>
<![CDATA[
        gemini @BINARY@
            "${ infile }" | tr -s ' ' '\t'
            > "${ outfile }"
]]>
    </command>
    <inputs>
        <expand macro="infile" />
    </inputs>
    <outputs>
        <data name="outfile" format="tabular" />
    </outputs>
    <tests>
        <test>
            <!-- Like in set_somatic this example is nonsensical because otherwise
                the testdata would be too big.-->
            <param name="infile" value="gemini_comphets_input.db" ftype="gemini.sqlite" />
            <output name="outfile" file="gemini_actionable_mutations_result.tabular" />
        </test>
    </tests>
    <help><![CDATA[
**What it does**

Retrieve genes with actionable somatic mutations via COSMIC and DGIdb. It checks for variants that have the somatic flag set (which can be done with GEMINI set_somatic) with high or medium impact severity. The results are then compared to entries in COSMIC and DGIdb

    ]]></help>
    <expand macro="citations"/>
</tool>


text: docker build -t bigtop/puppet:debian-8 .


text:
#pragma once

#include <map>
#include <string>
#include "appshell_extensions_platform.h"

// IDs of static menuitems
#define BRACKETS_MENUITEMTAG      0
#define WINDOW_MENUITEMTAG     4999

class NativeMenuItemModel
{
    public:
    NativeMenuItemModel() :
        checked(false),
        enabled(false),
        osItem(NULL)
    {
    }
    NativeMenuItemModel(const ExtensionString& commandId, const ExtensionString& parentId, bool enabled, bool checked) :
        checked(checked),
        enabled(enabled),
        osItem(NULL),
        commandId(commandId),
        parentId(parentId)
    {
    }
    bool checked;
    bool enabled;
    void *osItem;
    ExtensionString commandId;
    ExtensionString parentId;
};

//command name -> menutag
typedef std::map<ExtensionString, int> menuTag;

//menu tag to item model
typedef std::map<int, NativeMenuItemModel> menu;

//tag id for the first native menu item. This is incremented for each new item.
const int kInitialTagCount = 5001;

//value for tags that cannot be found
const int kTagNotFound = -1;

class NativeMenuModel {
private:
    menu menuItems;
    menuTag commandMap;
    int tagCount;
    NativeMenuModel(menu items) :
        menuItems(items),
        tagCount(kInitialTagCount)
    {
    }
public:
    //not at all threadsafe
    static void resetMenus(void* menuParent) { NativeMenuModel::getInstance(menuParent, true); };
    static NativeMenuModel& getInstance(void* menuParent, bool reset = false);

    bool isMenuItemEnabled(int tag);
    bool isMenuItemChecked(int tag);
    int setMenuItemState(ExtensionString command, bool enabled, bool checked);
    int getOrCreateTag(ExtensionString command, ExtensionString parent);
    int getTag(ExtensionString command);
    int setTag(ExtensionString command, ExtensionString parent, int tag);
    ExtensionString getCommandId(int tag);
    ExtensionString getParentId(int tag);
    void setOsItem (int tag, void* theItem);
    void* getOsItem (int tag);

    int removeMenuItem(const ExtensionString& command);
};


text:
using System.Runtime.Serialization;

namespace BitFlyer.Apis
{
    public enum CurrencyCode
    {
        [EnumMember(Value = "")]
        Unknown,

        [EnumMember(Value = "JPY")]
        Jpy,

        [EnumMember(Value = "BTC")]
        Btc,

        [EnumMember(Value = "ETH")]
        Eth,

        [EnumMember(Value = "ETC")]
        Etc,

        [EnumMember(Value = "LTC")]
        Ltc,

        [EnumMember(Value = "BCH")]
        Bch,

        [EnumMember(Value = "MONA")]
        Mona,

        [EnumMember(Value = "LSK")]
        Lsk,

        [EnumMember(Value = "BAT")]
        Bat,

        [EnumMember(Value = "XRP")]
        Xrp,

        [EnumMember(Value = "XYM")]
        Xym,

        [EnumMember(Value = "LINK")]
        Link,

        [EnumMember(Value = "DOT")]
        Dot,

        [EnumMember(Value = "XTZ")]
        Xtz,

        [EnumMember(Value = "XLM")]
        Xlm,

        [EnumMember(Value = "XEM")]
        Xem,

        [EnumMember(Value = "USD")]
        Usd,

        [EnumMember(Value = "EUR")]
        Eur
    }

    public enum Side
    {
        [EnumMember(Value = "")]
        Unknown,

        [EnumMember(Value = "BUY")]
        Buy,

        [EnumMember(Value = "SELL")]
        Sell,

        [EnumMember(Value = "BUYSELL")]
        BuySell
    }

    public enum BitflyerSystemHealth
    {
        [EnumMember(Value = "NORMAL")]
        Normal,

        [EnumMember(Value = "BUSY")]
        Busy,

        [EnumMember(Value = "VERY BUSY")]
        VeryBusy,

        [EnumMember(Value = "SUPER BUSY")]
        SuperBusy,

        [EnumMember(Value = "NO ORDER")]
        NoOrder,

        [EnumMember(Value = "STOP")]
        Stop
    }

    public enum BoardStates
    {
        [EnumMember(Value = "RUNNING")]
        Running,

        [EnumMember(Value = "CLOSED")]
        Closed,

        [EnumMember(Value = "STARTING")]
        Starting,

        [EnumMember(Value = "PREOPEN")]
        Preopen,

        [EnumMember(Value = "CIRCUIT BREAK")]
        CircuitBreak,

        [EnumMember(Value = "AWAITING SQ")]
        AWAITING_SQ,

        [EnumMember(Value = "MATURED")]
        MATURED,
    }

    public enum DepositStatus
    {
        [EnumMember(Value = "PENDING")]
        Pending,

        [EnumMember(Value = "COMPLETED")]
        Completed
    }

    public enum ChildOrderType
    {
        [EnumMember(Value = "LIMIT")]
        Limit,

        [EnumMember(Value = "MARKET")]
        Market
    }

    public enum TimeInForce
    {
        [EnumMember(Value = "GTC")]
        GoodTilCanceled,

        [EnumMember(Value = "IOC")]
        ImmediateOrCancel,

        [EnumMember(Value = "FOK")]
        FillOrKill
    }

    public enum OrderMethod
    {
        [EnumMember(Value = "SIMPLE")]
        Simple,

        [EnumMember(Value = "IFD")]
        IfDone,

        [EnumMember(Value = "OCO")]
        OneCancelsTheOther,

        [EnumMember(Value = "IFDOCO")]
        IfDoneOneCancelsTheOther
    }

    public enum ParentOrderType
    {
        [EnumMember(Value = "IFD")]
        IfDone,

        [EnumMember(Value = "OCO")]
        OneCancelsTheOther,

        [EnumMember(Value = "IFDOCO")]
        IfDoneOneCancelsTheOther,

        [EnumMember(Value = "STOP")]
        Stop,

        [EnumMember(Value = "STOP_LIMIT")]
        StopLimit,

        [EnumMember(Value = "TRAIL")]
        Trail,
    }

    public enum ConditionType
    {
        [EnumMember(Value = "LIMIT")]
        Limit,

        [EnumMember(Value = "MARKET")]
        Market,

        [EnumMember(Value = "STOP")]
        Stop,

        [EnumMember(Value = "STOP_LIMIT")]
        StopLimit,

        [EnumMember(Value = "TRAIL")]
        Trail
    }

    public enum AddresseType
    {
        [EnumMember(Value = "NORMAL")]
        Normal
    }

    public enum ChildOrderState
    {
        [EnumMember(Value = "ACTIVE")]
        Active,

        [EnumMember(Value = "COMPLETED")]
        Completed,

        [EnumMember(Value = "CANCELED")]
        Canceled,

        [EnumMember(Value = "EXPIRED")]
        Expired,

        [EnumMember(Value = "REJECTED")]
        Rejected
    }

    public enum ParentOrderState
    {
        [EnumMember(Value = "ACTIVE")]
        Active,

        [EnumMember(Value = "COMPLETED")]
        Completed,

        [EnumMember(Value = "CANCELED")]
        Canceled,

        [EnumMember(Value = "EXPIRED")]
        Expired,

        [EnumMember(Value = "REJECTED")]
        Rejected
    }

    public enum ProductAlias
    {
        [EnumMember(Value = "")]
        None,

        [EnumMember(Value = "BTCJPY_MAT1WK")]
        BtcJpyThisWeek,

        [EnumMember(Value = "BTCJPY_MAT2WK")]
        BtcJpyNextWeek,

        [EnumMember(Value = "BTCJPY_MAT3M")]
        BtcJpyWeekAfterNext,
    }

    public enum CollateralReasonCode
    {
        [EnumMember(Value = "CLEARING_COLL")]
        Clearing,

        [EnumMember(Value = "EXCHANGE_COLL")]
        Exchange,

        [EnumMember(Value = "POST_COLL")]
        Post,

        [EnumMember(Value = "CANCEL_COLL")]
        Cancel
    }

    public enum TradeType
    {
        [EnumMember(Value = "")]
        Unknown,

        [EnumMember(Value = "BUY")]
        Buy,

        [EnumMember(Value = "SELL")]
        Sell,

        [EnumMember(Value = "DEPOSIT")]
        Deposit,

        [EnumMember(Value = "WITHDRAW")]
        Withdraw,

        [EnumMember(Value = "FEE")]
        Fee,

        [EnumMember(Value = "POST_COLL")]
        Post,

        [EnumMember(Value = "CANCEL_COLL")]
        Cancel,

        [EnumMember(Value = "PAYMENT")]
        Payment,

        [EnumMember(Value = "TRANSFER")]
        Transfer
    }
}