text:
{-# LANGUAGE QuasiQuotes, LambdaCase, RecordWildCards #-}
module ExampleSpec where
import Wrecker
import qualified Wrecker.Statistics as Stats
import Test.Hspec
import qualified Server as Server
import qualified Client as Client
import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as H
import Control.Concurrent
import Network.Wai.Handler.Warp (Port)
import Data.Maybe (fromJust)
import Control.Concurrent.NextRef (NextRef)
import qualified Control.Concurrent.NextRef as NextRef
import Control.Applicative

{-
  This file tests how well `wrecker` can detect a "signal".
  Essentially we increase the time of server and see how close `wrecker`
  gets to detecting the increase.

  The precision of `threadDelay` is not great at least for small values. So we
  record the actual times on the server and compare against the measured values.

  The model we use

       client observed time(delay) = travel time + server overhead + request time(delay)

  We call `travel time + server overhead` `overhead` and compute it by measuring

       overhead = client observed time(~ 0) - request time(~ 0)

  We assume that `overhead` is the same regardless of the delays injected to
  slow down `request time`. (this appears to be false unfortunately).

  Then we compare

      client observed time(10 milliseconds) - overhead ~ recorded from the server(10 millisecond delay)

  Telling the server to sleep 10 milliseconds actually slows it down around 12 FWIW.

  `wrecker` is consistently overestimating the times. I don't know if this an issue with wrecker or
  something about the interplay between delaying the request and the travel time or the server overhead.

  There are many issues with this "test". The the number of iterations should
  be based on some statistically stopping conditioning.

  Additionally the `Approx` equality should really be something like a statistical test.

  The gc is an issue for getting good data. Running with -I0 helps, -qg might?
-}

sleepAmount :: Int  -- microseconds
sleepAmount = 10000 -- 10 milliseconds

data Gaussian = Gaussian
                { mean     :: Double
                , variance :: Double
                } deriving (Show, Eq)

subtractGaussian :: Gaussian -> Gaussian -> Gaussian
subtractGaussian x y
  = Gaussian (mean     x - mean     y)
             (variance x - variance y)

urlStatsToDist :: HashMap String ResultStatistics
               -> Server.Root Gaussian
urlStatsToDist stats =
  let gaussians =  map (\(key, value) -> ( Stats.urlToPathPieceKey key
                                        , toDist value
                                        )
                      )
                $ H.toList stats
      Just root            = lookup "/root"          gaussians
      Just products        = lookup "/products"      gaussians
      Just login           = lookup "/login"         gaussians
      Just usersIndex      = lookup "/users/0"       gaussians
      Just cartsIndex      = lookup "/carts/0"       gaussians
      Just cartsIndexItems = lookup "/carts/0/items" gaussians
      Just checkout        = lookup "/checkout"      gaussians

  in Server.Root {..}

substractDist :: Server.Root Gaussian
              -> Server.Root Gaussian
              -> Server.Root Gaussian
substractDist x y = Server.Root
  { Server.root            = subtractGaussian (Server.root            x) (Server.root            y)
  , Server.products        = subtractGaussian (Server.products        x) (Server.products        y)
  , Server.login           = subtractGaussian (Server.login           x) (Server.login           y)
  , Server.usersIndex      = subtractGaussian (Server.usersIndex      x) (Server.usersIndex      y)
  , Server.cartsIndex      = subtractGaussian (Server.cartsIndex      x) (Server.cartsIndex      y)
  , Server.cartsIndexItems = subtractGaussian (Server.cartsIndexItems x) (Server.cartsIndexItems y)
  , Server.checkout        = subtractGaussian (Server.checkout        x) (Server.checkout        y)
  }

-- Create a distribution for sleeping
rootDistribution :: Server.RootInt
rootDistribution = pure sleepAmount

main :: IO ()
main = hspec spec

toDist :: ResultStatistics -> Gaussian
toDist x
  = let stats = rs2xx x
  in Gaussian (Stats.mean stats) (Stats.variance stats)

class Approx a where
  approx :: a -> a -> Bool

instance Approx Double where
  approx x y = abs (x - y) < 0.001

instance Approx Gaussian where
  approx x y = approx (mean     x) (mean     y)
            && approx (variance x) (variance y)

instance Approx a => Approx (Server.Root a) where
  approx x y = approx (Server.root            x) (Server.root            y)
            && approx (Server.products        x) (Server.products        y)
            && approx (Server.cartsIndex      x) (Server.cartsIndex      y)
            && approx (Server.cartsIndexItems x) (Server.cartsIndexItems y)
            && approx (Server.usersIndex      x) (Server.usersIndex      y)
            && approx (Server.checkout        x) (Server.checkout        y)
            && approx (Server.login           x) (Server.login           y)

runWrecker :: Int -> IO AllStats
runWrecker port = do
  let key = "key"
  fromJust . H.lookup key <$> Wrecker.run (defaultOptions
                                             { runStyle    = RunCount 200
                                             , concurrency = 1
                                             , displayMode = Interactive
                                             }
                                          )
                                          [ (key, Client.testScript port)
                                          ]

calculateOverhead :: IO (Server.Root Gaussian)
calculateOverhead = do
  (port, _, threadId, ref) <- Server.run $ pure 1

  allStats    <- runWrecker port

  -- This how long a 'null' request takes
  serverStats <- NextRef.readLast ref
  putStrLn $ Stats.pprStats Nothing Path serverStats
  killThread threadId

  return $ substractDist (urlStatsToDist $ aPerUrl allStats   )
                         (urlStatsToDist $ aPerUrl serverStats)

start :: IO (Port, ThreadId, Server.Root Gaussian, NextRef AllStats)
start = do
  overhead <- calculateOverhead
  (port, _, threadId, ref) <- Server.run rootDistribution

  return (port, threadId, overhead, ref)

stop :: (Port, ThreadId, Server.Root Gaussian, NextRef AllStats) -> IO ()
stop (_, threadId, _, _) = killThread threadId

shouldBeApprox :: (Show a, Approx a) => a -> a -> IO ()
shouldBeApprox x y = shouldSatisfy (x, y) (uncurry approx)

spec :: Spec
spec = beforeAll start
     $ afterAll  stop
     $ describe "Wrecker"
     $ it "measure requests somewhat accurately" $ \(port, _, overhead, ref) -> do
         allStats     <- urlStatsToDist . aPerUrl <$> runWrecker port
         expectedDist <- urlStatsToDist . aPerUrl <$> NextRef.readLast ref

         let adjustedDist = substractDist allStats overhead

         adjustedDist `shouldBeApprox` expectedDist


text:
package org.statmantis.mport.retro.event;

import java.sql.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

import org.statmantis.model.Game;
import org.statmantis.model.Roster;

/**
 * Information from an event ZIP file
 *
 * @author Chad Retz
 */
public class EventInformation {
    private final Map<String, Roster> rosters = new HashMap<String, Roster>(40);
    private final Map<Date, List<Game>> games = new HashMap<Date, List<Game>>(200);

    EventInformation() {
    }

    public Map<String, Roster> getRosters() {
        return rosters;
    }

    public Map<Date, List<Game>> getGames() {
        return games;
    }

    public void merge(EventInformation info) {
        if (info == null) {
            return;
        }
        rosters.putAll(info.rosters);
        for (Entry<Date, List<Game>> game : info.games.entrySet()) {
            List<Game> presentGames = games.get(game.getKey());
            if (presentGames == null) {
                games.put(game.getKey(), game.getValue());
            } else {
                presentGames.addAll(game.getValue());
            }
        }
    }

}

redpajama_set_name: RedPajamaGithub


text:
<?xml version='1.0'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->

<configuration xmlns="urn:activemq"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="urn:activemq /schema/artemis-configuration.xsd">

   <core xmlns="urn:activemq:core">

      <name>0.0.0.0</name>

      <configuration-file-refresh-period>100</configuration-file-refresh-period>

      <persistence-enabled>true</persistence-enabled>

      <security-enabled>false</security-enabled>

      <journal-type>NIO</journal-type>

      <paging-directory>./target/data/paging</paging-directory>

      <bindings-directory>./target/data/bindings</bindings-directory>

      <journal-directory>./target/data/journal</journal-directory>

      <large-messages-directory>./target/data/large-messages</large-messages-directory>

      <acceptors>
         <acceptor name="artemis">tcp://0.0.0.0:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576</acceptor>
      </acceptors>

      <security-settings>
         <security-setting match="foo">
            <permission type="createNonDurableQueue" roles="a"/>
            <permission type="deleteNonDurableQueue" roles="a"/>
            <permission type="createDurableQueue" roles="a"/>
            <permission type="deleteDurableQueue" roles="a"/>
            <permission type="browse" roles="a"/>
            <permission type="send" roles="a"/>
            <!-- we need this otherwise ./artemis data imp wouldn't work -->
            <permission type="manage" roles="a"/>
         </security-setting>
      </security-settings>
   </core>
</configuration>


text:
struct pdu_adv *lll_adv_pdu_latest_get(struct lll_adv_pdu *pdu,
				       uint8_t *is_modified);

#if defined(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
struct pdu_adv *lll_adv_pdu_and_extra_data_latest_get(struct lll_adv_pdu *pdu,
						      void **extra_data,
						      uint8_t *is_modified);

#endif /* CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY */

static inline struct pdu_adv *lll_adv_data_latest_get(struct lll_adv *lll,
						      uint8_t *is_modified)
{
	return lll_adv_pdu_latest_get(&lll->adv_data, is_modified);
}

static inline struct pdu_adv *lll_adv_scan_rsp_latest_get(struct lll_adv *lll,
							  uint8_t *is_modified)
{
	return lll_adv_pdu_latest_get(&lll->scan_rsp, is_modified);
}

static inline struct pdu_adv *lll_adv_scan_rsp_curr_get(struct lll_adv *lll)
{
	return (void *)lll->scan_rsp.pdu[lll->scan_rsp.first];
}

#if defined(CONFIG_BT_CTLR_ADV_EXT)
static inline struct pdu_adv *
lll_adv_aux_data_latest_get(struct lll_adv_aux *lll, uint8_t *is_modified)
{
	return lll_adv_pdu_latest_get(&lll->data, is_modified);
}

#if defined(CONFIG_BT_CTLR_ADV_PERIODIC)
static inline struct pdu_adv *
lll_adv_sync_data_latest_get(struct lll_adv_sync *lll, void **extra_data,
			     uint8_t *is_modified)
{
#if defined(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
	return lll_adv_pdu_and_extra_data_latest_get(&lll->data, extra_data,
						     is_modified);
#else
	return lll_adv_pdu_latest_get(&lll->data, is_modified);
#endif /* CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY */
}

static inline struct pdu_adv *
lll_adv_sync_data_curr_get(struct lll_adv_sync *lll, void **extra_data)
{
	uint8_t first = lll->data.first;
#if defined(CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY)
	if (extra_data) {
		*extra_data = lll->data.extra_data[first];
	}
#endif /* CONFIG_BT_CTLR_ADV_EXT_PDU_EXTRA_DATA_MEMORY */
	return (void *)lll->data.pdu[first];
}
#endif /* CONFIG_BT_CTLR_ADV_PERIODIC */
#endif /* CONFIG_BT_CTLR_ADV_EXT */

bool lll_adv_scan_req_check(struct lll_adv *lll, struct pdu_adv *sr,
			    uint8_t tx_addr, uint8_t *addr,
			    uint8_t devmatch_ok, uint8_t *rl_idx);

#if defined(CONFIG_BT_CTLR_SCAN_REQ_NOTIFY)
int lll_adv_scan_req_report(struct lll_adv *lll, struct pdu_adv *pdu_adv_rx,
			    uint8_t rl_idx, uint8_t rssi_ready);
#endif

bool lll_adv_connect_ind_check(struct lll_adv *lll, struct pdu_adv *ci,
			       uint8_t tx_addr, uint8_t *addr,
			       uint8_t rx_addr, uint8_t *tgt_addr,
			       uint8_t devmatch_ok, uint8_t *rl_idx);


text:
FactoryGirl.define do

  factory :tournament do
    association :account, strategy: :create
    title {|n| "#{n} Tournament"}
    type Android::NetrunnerTournament.name
    tournament_start { 1.hour.ago }
  end

end


text:
<?php

use Illuminate\Routing\Controller;

class AdminController extends Controller {

    private $model_config_path;

    protected $modelName;
    protected $viewsPath;
    protected $uriSegment;
    protected $resourceId;
    protected $orderBy;

    public function __construct()
    {
        $this->beforeFilter(function()
        {
            if(Route::input('alias') != 'orders' && Entrust::hasRole('Operator'))
                Redirect::to('admin/orders');
        });

        $this->model_config_path = app('path') . '/config/readmin';

        if(Route::input('alias') !== null)
        {
            $this->uriSegment = Route::input('alias');
            $this->viewsPath = File::exists(app_path('views/admin/'.$this->uriSegment)) ? $this->uriSegment : 'defaults';
            $this->modelName = $this->uriSegment == 'news' ? 'News' : studly_case(str_singular(Route::input('alias')));
            if(Route::input('id') !== null)
            {
                $this->resourceId = Route::input('id');
            }
            else
            {
                $this->resourceId = null;
            }
            View::share('config', require($this->model_config_path.'/'.$this->modelName.'.php'));

            // custome behavior
            switch ($this->uriSegment) {
                case 'products':
                    $this->orderBy = ['sorting', 'asc'];
                    View::composer(array('admin.'.$this->viewsPath.'.index'), function($view)
                    {
                        $view->with('categories', Category::with('children')->where('parent_id', 0)->get());
                        $view->with('sidebar', 1 );
                    });
                    break;

                case 'orders':
                    $this->orderBy = ['created_at', 'desc'];
                    if($this->resourceId){
                        $obj = Order::find($this->resourceId);
                        $obj->is_new = 0;
                        $obj->save();
                    }
                    break;

                case 'reviews':
                    $this->orderBy = ['created_at', 'desc'];
                    break;

                case 'settings':
                    View::composer(array('admin.'.$this->viewsPath.'.index'), function($view)
                    {
                        $view->with('settings', Setting::find(1));
                        $view->with('addresses', Address::all() );
                    });
                    break;

                default:
                    # code...
                    break;
            }
        }
        else
        {
            $this->modelName = null;
            $this->viewsPath = null;
            $this->uriSegment = null;
            $this->resourceId = null;
        }
        View::share('view', $this->uriSegment);
        View::share('model', $this->modelName);

    }

    /**
     * Display a listing of admins
     *
     * @return Response
     */
    public function index()
    {
        if($this->modelName)
        {
            if(Input::has('sorting'))
            {
                $row = call_user_func($this->modelName.'::findOrFail', (int)Input::get('id'));
                $row->fill(array('sorting' => (int)Input::get('sorting')));
                method_exists($row, 'updateUniques') ? $row->updateUniques() : $row->save();
                return Response::make('OK', 200);
            }

            if($filter = Input::get('filter'))
            {
                if(isset($filter['category.title']))
                    $rows = call_user_func($this->modelName.'::getByCategory', Category::where('alias', $filter['category.title'])->firstOrFail());
            }
            else
            {
                if(isset($this->orderBy))
                {
                    $obj = new $this->modelName();
                    $rows = $obj::orderBy($this->orderBy[0], $this->orderBy[1])->paginate(20);
                }
                else
                    $rows = call_user_func($this->modelName.'::paginate', 20);
            }

            return View::make('admin.'.$this->viewsPath.'.index')
                ->with('rows',  $rows);
        }
        else
        {
            return View::make('admin.dashboard');
        }
    }

    /**
     * Show the form for creating a new admin
     *
     * @return Response
     */
    public function create()
    {
        return View::make('admin.'.$this->viewsPath.'.create');
    }

    /**
     * Store a newly created admin in storage.
     *
     * @return Response
     */
    public function store()
    {
        $new = new $this->modelName();
        $new->fill( array_filter(Input::all(), function($v){ return $v !== null;}) );

        if ($new->save()) {
            return Redirect::to('admin/'.$this->uriSegment)
            ->with('info', $this->modelName.' '.$new->title.' successfully stored!');
        } else {
            return Redirect::to('admin/'.$this->uriSegment.'/create')->withErrors($new->errors())->withInput();
        }
    }

    /**
     * Display the specified admin.
     *
     * @param  int  $id
     * @return Response
     */
    public function show($id)
    {
        $row = call_user_func($this->modelName.'::findOrFail', $this->resourceId);

        return View::make('admin.'.$this->viewsPath.'.show')
            ->with('row', $row);
    }

    /**
     * Show the form for editing the specified admin.
     *
     * @param  int  $id
     * @return Response
     */
    public function edit($id)
    {
        $row = call_user_func($this->modelName.'::find', $this->resourceId);

        return View::make('admin.'.$this->viewsPath.'.edit')
            ->with('row', $row);
    }

    /**
     * Update the specified admin in storage.
     *
     * @param  int  $id
     * @return Response
     */
    public function update($id)
    {
        $obj = call_user_func($this->modelName.'::findOrFail', $this->resourceId);
        $obj->fill( array_filter(Input::all(), function($v){ return $v !== null;}) );

        if($this->uriSegment == 'orders')
        {
            $contents = Input::has('contents') ? Input::get('contents') : array();
            $obj->syncContents($contents);
        }

        // Note that all models we must extend from Ardent!
        if (method_exists($obj, 'updateUniques') ? $obj->updateUniques() : $obj->save()) {
            return Redirect::to('admin/'.$this->uriSegment)
            ->with('info', $this->modelName.' '.$obj->title.' successfully updated!');
        } else {
            return Redirect::to('admin/'.$this->uriSegment.'/'.$this->resourceId.'/edit')->withErrors($obj->errors());
        }
    }

    /**
     * Remove the specified admin from storage.
     *
     * @param  int  $id
     * @return Response
     */
    public function destroy($id)
    {
        call_user_func($this->modelName.'::destroy', $this->resourceId);

        return Redirect::to('admin/'.$this->uriSegment)
           ->with('info', $this->modelName.' #'.$this->resourceId.' successfully deleted!');
    }

    /**
     * upload images.
     * /upload
     *
     * @return true|false
     */
    public function upload()
    {
        $vars = get_class_vars($this->modelName);
        $options = array();
        if(isset($vars['photo_dimensions']))
        {
            $options = array(
                'image_versions' => array(
                    'thumbnail' => array(
                        //'upload_dir' => dirname($this->get_server_var('SCRIPT_FILENAME')).'/thumb/',
                        //'upload_url' => $this->get_full_url().'/thumb/',
                        // Uncomment the following to force the max
                        // dimensions and e.g. create square thumbnails:
                        'crop' => true,
                        'max_width' => $vars['photo_dimensions'][0],
                        'max_height' => $vars['photo_dimensions'][1]
                    )
                )
            );
        }

        $upload_handler = new UploadHandler($options);
    }
}


text:
Abstr_UI_Hitbox::Abstr_UI_Hitbox():
widthActionArea {0}, heightActionArea{ 0 }
{
	centerCoordActionArea.x = -50;
	centerCoordActionArea.y = -50;

	activateFunctionCallback = UI_CallbackFunctions::testCallback;
	ID_ModelObject = -1;
}

Abstr_UI_Hitbox::Abstr_UI_Hitbox(float Xcenter, float Ycenter, float width, float height):
	widthActionArea{width}, heightActionArea{ height }
{
	centerCoordActionArea.x = Xcenter;
	centerCoordActionArea.y = Ycenter;

	activateFunctionCallback = UI_CallbackFunctions::testCallback;
	ID_ModelObject = -1;

}

std::function<void(int, int, std::shared_ptr<Model>, std::shared_ptr<UI>)> blabla();

Abstr_UI_Hitbox::Abstr_UI_Hitbox(float Xcenter, float Ycenter, float width, float height, std::function<void(int, int, std::shared_ptr<Model>, std::shared_ptr<UI>)> callback, int ID_Model):
	widthActionArea{ width }, heightActionArea{ height }, ID_ModelObject{ID_Model}
{
	centerCoordActionArea.x = Xcenter;
	centerCoordActionArea.y = Ycenter;
	activateFunctionCallback = callback;
}

Abstr_UI_Hitbox::~Abstr_UI_Hitbox()
{

}

//check whether the given coordinate is within the action area of the ui object
bool Abstr_UI_Hitbox::checkCoordInside(D2D1_POINT_2F coord)
{
	if (coord.x < centerCoordActionArea.x + widthActionArea / 2 &&
		coord.x > centerCoordActionArea.x - widthActionArea / 2 &&
		coord.y < centerCoordActionArea.y + heightActionArea / 2 &&
		coord.y > centerCoordActionArea.y - heightActionArea / 2)
	{
		return true;
	}

	return false;
}

bool Abstr_UI_Hitbox::checkInputJointType(JointType type)
{
	for (int i = 0; i < inputJoints.size(); ++i)
	{
		if (inputJoints[i] == type)
		{
			return true;
		}
	}
	return false;
}

//used by the attemptInteraction function
void Abstr_UI_Hitbox::setHover(const bool &  a, const JointType & joint, const HandState & hand, const D2D1_POINT_2F & jointPoint)
{

	//if one joint is already hovering or still active outside the object
	//then if the calling joint is not the current joint this method returns
	//if nothing is hover or still active outside
	//then current joint becomes the hover joint
	if (hover || activeHandOutside)
	{
		if (HoverJoint != joint)
		{
			return;
		}
	}
	else
	{
		HoverJoint = joint;
	}

	if (a)//is the joint now hovering over hitbox?
	{

		if (hand == Activehandstate) //is the hand in the state that activates the hitbox
		{
			if(!hover)				//if hand is not hovering over the hitbox
			{
				activeHandBeforeHover = true;
			}
			else if (!activeHand)	//is the hitbox not already handactivated
			{
				action(ActionTrigger::HoverOn, jointPoint);
			}

			if(!activeHandBeforeHover) //if the hand is already active before hovering over the button it is not activated
			{
				if (!activeHand) //is the hitbox not already handactivated
				{
					InertiaCounter = 0;
					action(ActionTrigger::ActiveHandOn, jointPoint);
					activeHand = true;

				}
				else
				{
					action(ActionTrigger::ActiveHandHold, jointPoint);
					InertiaCounter = 0;
				}
			}
		}
		else
		{
			activeHandBeforeHover = false;

			if (activeHand) //is the hitbox handactive already
			{
				if (InertiaCounter > InertiaLimit)
				{
					action(ActionTrigger::ActiveHandOff, jointPoint);
					activeHand = false;
				}
				InertiaCounter++;
			}
			else if (hover) //is there already a valid joint hover over the hitbox?
			{
				action(ActionTrigger::HoverHold, jointPoint);
			}
			else
			{
				action(ActionTrigger::HoverOn, jointPoint);
			}

		}

	}
	else //if there is no joint hover over the hitbox at the moment
	{
		activeHandBeforeHover = false;
		try
		{
			if (activeHand == true) //was there a joint in handactive state before leaving the hitbox
			{
				action(ActionTrigger::ActiveHandOutsideOn, jointPoint);
				activeHandOutside = true;
				InertiaCounter = 0;

				activeHand = false;
			}

			if(hover) //was there a joint in handactive state before leaving the hitbox
			{
				action(ActionTrigger::HoverOff, jointPoint);
			}

			if (activeHandOutside) //is the joint that was previously inside the hitbox still in handActiveState outside of the hitbox?
			{
				if (hand == Activehandstate)
				{
					InertiaCounter = 0;
					action(ActionTrigger::ActiveHandOutsideHold, jointPoint);
				}
				else
				{
					if (InertiaCounter > InertiaLimit)
					{
						action(ActionTrigger::ActiveHandOutsideOff, jointPoint);
						activeHandOutside = false;
					}
					InertiaCounter++;
				}
			}

		}
		catch (const std::out_of_range& oor)
		{
			printf("there is no UI_object linked to this UI_hitbox");
		}
	}

	if (keepHoverState)			//if you don't want to change the hover state
		keepHoverState = false;
	else
		hover = a;
}

void Abstr_UI_Hitbox::setHover(bool a)
{
	hover = a;

}

bool Abstr_UI_Hitbox::getHover()
{
	return hover;
}

void Abstr_UI_Hitbox::setKeepHoverState(bool a)
{
	keepHoverState = a;
}

bool Abstr_UI_Hitbox::getKeepHoverState()
{
	return keepHoverState;
}

void Abstr_UI_Hitbox::setActiveHand(const bool & hand)
{
	activeHand = hand;
}

bool Abstr_UI_Hitbox::getActiveHand()
{
	return activeHand;
}

void Abstr_UI_Hitbox::setActiveHandBeforeHover(bool a)
{
	activeHandBeforeHover = a;
}

bool Abstr_UI_Hitbox::getActiveHandBeforeHover()
{
	return activeHandBeforeHover;
}

void Abstr_UI_Hitbox::setActiveHandOutside(const bool & hand)
{
	activeHandOutside = hand;
}

bool Abstr_UI_Hitbox::getActiveHandOutside()
{
	return activeHandOutside;
}

void Abstr_UI_Hitbox::setHoverJoint(JointType joint)
{
	HoverJoint = joint;
}

JointType Abstr_UI_Hitbox::getHoverJoint()
{
	return HoverJoint;
}

void Abstr_UI_Hitbox::HoverOnAction()
{
	UI_objects[0]->changeColor(D2D1::ColorF::Red); //TO DO make callback
}

void Abstr_UI_Hitbox::HoverOffAction()
{
	UI_objects[0]->changeColor(D2D1::ColorF::White);
}

void Abstr_UI_Hitbox::HoverHoldAction()
{
}

void Abstr_UI_Hitbox::ActiveHandOnAction()
{
	UI_objects[0]->changeColor(D2D1::ColorF::Blue); //TO DO make callback
}

void Abstr_UI_Hitbox::ActiveHandOffAction()
{
	HoverOnAction();
}

void Abstr_UI_Hitbox::ActiveHandHoldAction()
{
}

bool Abstr_UI_Hitbox::isRightHandActive()
{
	if ((handLock || activeHand || activeHandOutside) && HoverJoint == JointType_HandRight)
	{
		return true;
	}

	return false;
}

bool Abstr_UI_Hitbox::isLeftHandActive()
{
	if ((handLock || activeHand || activeHandOutside) && HoverJoint == JointType_HandLeft)
	{
		return true;
	}

	return false;
}

void Abstr_UI_Hitbox::setCenterCoordActionArea(D2D1_POINT_2F center)
{
	centerCoordActionArea = center;
}

D2D1_POINT_2F Abstr_UI_Hitbox::getCenterCoordActionArea()
{
	return centerCoordActionArea;
}

void Abstr_UI_Hitbox::setWidth(float width)
{
	widthActionArea = width;
}

float Abstr_UI_Hitbox::getWidth()
{
	return widthActionArea;
}

void Abstr_UI_Hitbox::setHeigth(float height)
{
	heightActionArea = height;
}

float Abstr_UI_Hitbox::getHeight()
{
	return heightActionArea;
}

void Abstr_UI_Hitbox::setOriginalPos(D2D1_POINT_2F pos)
{
	originalPos = pos;
}

D2D1_POINT_2F Abstr_UI_Hitbox::getOriginalPos()
{
	return originalPos;
}

void Abstr_UI_Hitbox::activateFunction()
{

}

void Abstr_UI_Hitbox::deactivateFunction()
{
	functionActive = false;
}

void Abstr_UI_Hitbox::setUpdateFunction(std::function<void(Abstr_UI_Hitbox*)> funct)
{
	updateFunctionCallback = funct;
}

std::function<void(Abstr_UI_Hitbox*)> Abstr_UI_Hitbox::getupdateFunction()
{
	return updateFunctionCallback;
}

void Abstr_UI_Hitbox::set_ID_ModelObject(int ID)
{
	ID_ModelObject = ID;
}

int Abstr_UI_Hitbox::get_ID_ModelObject()
{
	return ID_ModelObject;
}

void Abstr_UI_Hitbox::setFunctionActivation(bool function)
{
	functionActive = function;
}

bool Abstr_UI_Hitbox::getFunctionActivation()
{
	return functionActive;
}

void Abstr_UI_Hitbox::setHandLock(bool hand)
{
	handLock = hand;
}

bool Abstr_UI_Hitbox::getHandLock()
{
	return handLock;
}

void Abstr_UI_Hitbox::setTotalLock(bool hand)
{
	totalLock = hand;
}

bool Abstr_UI_Hitbox::getTotalLock()
{
	return totalLock;
}

void Abstr_UI_Hitbox::setVisible(bool visual)
{
	visible = visual;
}

bool Abstr_UI_Hitbox::getVisible()
{
	return visible;
}

void Abstr_UI_Hitbox::setFading(bool fade)
{
	fading = fade;
}

bool Abstr_UI_Hitbox::getFading()
{
	return fading;
}

float Abstr_UI_Hitbox::getFadeProgress()
{
	return static_cast<float>(fadeCounter) / static_cast<float>(fadeLimit);
}

void Abstr_UI_Hitbox::add_UI_Element(std::shared_ptr<Abstr_UI_Hitbox> hitbox)
{
}

void Abstr_UI_Hitbox::clear_UI_elements()
{
}

std::shared_ptr<UI_Object> Abstr_UI_Hitbox::getActionIndicator()
{
	return nullptr;
}

void Abstr_UI_Hitbox::moveY(float move)
{
	centerCoordActionArea.y = centerCoordActionArea.y + move;
}

void Abstr_UI_Hitbox::moveYoriginalPos(float move)
{
	originalPos.y = originalPos.y + move;
}

void Abstr_UI_Hitbox::moveAbsY(float pos)
{
	centerCoordActionArea.y = pos;
}

void Abstr_UI_Hitbox::moveAbsYoriginalPos(float pos)
{
	originalPos.y = pos;
}

void Abstr_UI_Hitbox::setXoffset(float offset)
{
}

float Abstr_UI_Hitbox::getXoffset()
{
	return 0.0f;
}

void Abstr_UI_Hitbox::draw()
{
	//if the fading is activated each frame the fade counter is increased and the alpha of each UI_object within this hitbox is decreased accordingly
	float fade;
	if (fading)
	{
		if(fadeCounter != fadeLimit)
			fadeCounter++;

		fade = 1- (static_cast<float>(fadeCounter) / static_cast<float>(fadeLimit))*0.7;
		if (fadeCounter >= fadeLimit)
		{
			activateFunction();
		}
	}
	else
	{
		fade = 1.0f;
		fadeCounter = 0;
	}

	for (int i = 0; i < UI_objects.size(); ++i)
	{
		if (UI_objects[i]->getVisibele())
		{
			//UI_ptr->drawRectangle(UI_objects[i]->getCenter(), UI_objects[i]->getWidth(), UI_objects[i]->getHeight(), UI_objects[i]->getColor());
			UI_objects[i]->setAlpha(fade);
			UI_objects[i]->draw();
		}
	}

}

void Abstr_UI_Hitbox::attemptInteraction(D2D1_POINT_2F jointPoint, JointType type, HandState leftHand, HandState rightHand)
{
	if (checkInputJointType(type) && !totalLock) //check if the jointtype is able to interact with the hitbox and if total lock is not on
	{
		if (checkCoordInside(jointPoint))		//check if the coordinate of the joint is inside of the hitbox
		{

			//NOW only works for right and left hand !
			//is the joint of type righthand or lefthand? is that hand not already busy interacting with another hitbox?
			if (type == JointType_HandRight && !(UI_ptr->getRightHandBusy()))
			{
				setHover(true, type, rightHand, jointPoint);
				UI_ptr->setRightHandBusy(isRightHandActive());

			}
			else if (type == JointType_HandLeft && !(UI_ptr->getLeftHandBusy()))
			{
				setHover(true, type, leftHand, jointPoint);
				UI_ptr->setLeftHandBusy(isLeftHandActive());
			}

		}
		else
		{

			if (type == JointType_HandRight)
			{
				setHover(false, type, rightHand, jointPoint);
				UI_ptr->setRightHandBusy(isRightHandActive());

			}
			else
			{
				setHover(false, type, leftHand, jointPoint);
				UI_ptr->setLeftHandBusy(isLeftHandActive());
			}

		}

	}

}

void Abstr_UI_Hitbox::updateData()
{
	updateFunctionCallback(this);
}

void Abstr_UI_Hitbox::setModel(std::shared_ptr<Model> m)
{
	model = m;
}

std::shared_ptr<Model> Abstr_UI_Hitbox::getModel()
{
	return model;
}

void Abstr_UI_Hitbox::setUI(std::shared_ptr<UI> m)
{
	UI_ptr = m;
}

std::shared_ptr<UI> Abstr_UI_Hitbox::getUI()
{
	return UI_ptr;
}

void Abstr_UI_Hitbox::add_UI_Object(std::shared_ptr<UI_Object> object)
{
	UI_objects.push_back(object);
}

//not used
void Abstr_UI_Hitbox::remove_UI_Object(std::shared_ptr<UI_Object> object)
{
	//TO DO define this function
}

std::vector<std::shared_ptr<UI_Object>> & Abstr_UI_Hitbox::get_UI_Objects()
{
	return UI_objects;
}

void Abstr_UI_Hitbox::addInputJoint(JointType joint)
{
	inputJoints.push_back(joint);
}

std::vector<JointType> Abstr_UI_Hitbox::getInputJoints()
{
	return inputJoints;
}


text:
package com.github.satoshun.truth.android.api.content.res;

import android.annotation.TargetApi;
import android.content.res.Configuration;

import com.github.satoshun.truth.android.api.BaseSubject;
import com.google.common.truth.FailureStrategy;
import com.google.common.truth.SubjectFactory;

import static android.content.res.Configuration.MNC_ZERO;
import static android.os.Build.VERSION_CODES.JELLY_BEAN_MR1;
import static android.os.Build.VERSION_CODES.KITKAT;

public class ConfigurationSubject extends BaseSubject<ConfigurationSubject, Configuration> {

  public static final ConfigurationSubjectFactory FACTORY = new ConfigurationSubjectFactory();

  public ConfigurationSubject(FailureStrategy failureStrategy, Configuration actual) {
    super(failureStrategy, actual);
  }

  @TargetApi(JELLY_BEAN_MR1)
  public ConfigurationSubject isLayoutDirection(int layoutDirection) {
    isNotNull();
    check().withFailureMessage("is layout direction")
        .that(actual().getLayoutDirection())
        .isEqualTo(layoutDirection);
    return this;
  }

  @TargetApi(KITKAT)
  public ConfigurationSubject isMnc(int mnc) {
    isNotNull();
    check().withFailureMessage("is mnc")
        .that(actual().mnc)
        .isEqualTo(mnc);
    return this;
  }

  @TargetApi(KITKAT)
  public ConfigurationSubject isMncZero() {
    isNotNull();
    check().withFailureMessage("is mnc zero")
        .that(actual().mnc)
        .isEqualTo(MNC_ZERO);
    return this;
  }

  private static class ConfigurationSubjectFactory extends SubjectFactory<ConfigurationSubject, Configuration> {
    @Override
    public ConfigurationSubject getSubject(FailureStrategy fs, Configuration that) {
      return new ConfigurationSubject(fs, that);
    }
  }
}


text:
module Utils {
    export class StorageItem {
        public key:string;
        public value:any;
        public expiresAt:number;
    }
}


text:
<?php

namespace RcmLogin\Exception;

class MissingConfigException extends \RuntimeException
{

}


text:
package org.omg.CORBA;

import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.Streamable;

/**
* A holder for the object {@link Current}.
*
* @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
*/
public final class CurrentHolder
  implements Streamable
{
  /**
   * The stored Current value.
   */
  public Current value;

  /**
   * Create the uninitialised instance, leaving the value field
   * with default null value.
   */
  public CurrentHolder()
  {
  }

  /**
   * Create the initialised instance.
   * @param initialValue the value that will be assigned to
   * the value field.
   */
  public CurrentHolder(Current initialValue)
  {
    value = initialValue;
  }

  /**
   * Fill in the {@link #value} by data from the CDR stream.
   *
   * @param input the org.omg.CORBA.portable stream to read.
   */
  public void _read(InputStream input)
  {
    value = CurrentHelper.read(input);
  }

  /**
   * Write the stored value into the CDR stream.
   *
   * @param output the org.omg.CORBA.portable stream to write.
   */
  public void _write(OutputStream output)
  {
    CurrentHelper.write(output, value);
  }

  /**
   * Get the typecode of the Current.
   */
  public org.omg.CORBA.TypeCode _type()
  {
    return CurrentHelper.type();
  }
}


text:
package org.droidparts.persist;

import static android.content.Context.MODE_PRIVATE;
import static org.droidparts.util.Strings.isEmpty;

import org.droidparts.Injector;

import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;

public abstract class AbstractPrefsManager {

	private static final String VERSION = "__prefs_version__";

	private final Context ctx;
	private final SharedPreferences prefs;

	public AbstractPrefsManager(Context ctx, int version) {
		this(ctx, null, version);
	}

	public AbstractPrefsManager(Context ctx, String prefsName, int version) {
		Injector.inject(ctx, this);
		this.ctx = ctx.getApplicationContext();
		if (isEmpty(prefsName)) {
			prefs = PreferenceManager.getDefaultSharedPreferences(ctx);
		} else {
			prefs = ctx.getSharedPreferences(prefsName, MODE_PRIVATE);
		}
		init(version);
	}

	protected Context getContext() {
		return ctx;
	}

	protected SharedPreferences getPreferences() {
		return prefs;
	}

	private void init(int newVersion) {
		int oldVersion = prefs.getInt(VERSION, -1);
		if (oldVersion != newVersion) {
			onUpgrade(prefs, oldVersion, newVersion);
			saveInt(VERSION, newVersion);
		}
	}

	protected void onUpgrade(SharedPreferences prefs, int oldVersion,
			int newVersion) {
		prefs.edit().clear().commit();
	}

	// shortcuts

	protected boolean readBoolean(int keyResId, int defValueResId) {
		return prefs.getBoolean(ctx.getString(keyResId), getContext()
				.getResources().getBoolean(defValueResId));
	}

	protected int readInt(int keyResId, int defValueResId) {
		return prefs.getInt(ctx.getString(keyResId), getContext()
				.getResources().getInteger(defValueResId));
	}

	protected String readString(int keyResId, int defValueResId) {
		return prefs.getString(ctx.getString(keyResId),
				ctx.getString(defValueResId));
	}

	protected boolean saveBoolean(String key, boolean val) {
		return prefs.edit().putBoolean(key, val).commit();
	}

	protected boolean saveInt(String key, int val) {
		return prefs.edit().putInt(key, val).commit();
	}

	protected boolean saveLong(String key, long val) {
		return prefs.edit().putLong(key, val).commit();
	}

	protected boolean saveString(String key, String val) {
		return prefs.edit().putString(key, val).commit();
	}

}


text:
apt-get -y autoremove
apt-get -y clean


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

    Copyright 2017 StreamSets Inc.

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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>
  <parent>
    <groupId>com.streamsets</groupId>
    <artifactId>streamsets-datacollector-root-lib</artifactId>
    <version>3.8.0-SNAPSHOT</version>
    <relativePath>../root-lib</relativePath>
  </parent>
  <artifactId>streamsets-datacollector-commonlib</artifactId>
  <version>3.8.0-SNAPSHOT</version>
  <description>StreamSets Data Collector CommonLib</description>
  <name>StreamSets Data Collector CommonLib</name>
  <packaging>jar</packaging>

  <properties>
    <commons-codec.version>1.9</commons-codec.version>
    <commons-csv.version>1.5</commons-csv.version>
    <commons-io.version>2.4</commons-io.version>
    <xz.version>1.5</xz.version>
    <snappy.version>0.4</snappy.version>
    <joda.version>2.8</joda.version>
    <commons-pool2.version>2.4.2</commons-pool2.version>
    <xerces.version>2.11.0</xerces.version>
    <poi.version>3.17</poi.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.streamsets</groupId>
      <artifactId>streamsets-datacollector-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.streamsets</groupId>
      <artifactId>streamsets-datacollector-stagesupport</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.streamsets</groupId>
      <artifactId>streamsets-datacollector-guavasupport</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.streamsets</groupId>
      <artifactId>streamsets-datacollector-common</artifactId>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <groupId>commons-io</groupId>
          <artifactId>commons-io</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>com.streamsets</groupId>
      <artifactId>streamsets-datacollector-net-commonlib</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.streamsets</groupId>
      <artifactId>streamsets-datacollector-net-commonlib</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-csv</artifactId>
      <version>${commons-csv.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
      <version>${commons-codec.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>${commons-io.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
      <version>${joda.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.avro</groupId>
      <artifactId>avro</artifactId>
      <version>${avro.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.avro</groupId>
      <artifactId>avro-mapred</artifactId>
      <version>${avro.version}</version>
      <scope>compile</scope>
      <classifier>hadoop2</classifier>
      <exclusions>
        <exclusion>
          <groupId>io.netty</groupId>
          <artifactId>netty</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>servlet-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-compress</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.tukaani</groupId>
      <artifactId>xz</artifactId>
      <version>${xz.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.google.protobuf</groupId>
      <artifactId>protobuf-java</artifactId>
      <version>${protobuf.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.iq80.snappy</groupId>
      <artifactId>snappy</artifactId>
      <version>${snappy.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>io.confluent</groupId>
      <artifactId>kafka-schema-registry-client</artifactId>
      <!-- Exclude the Confluent Schema Registry Client's Jackson library -->
      <exclusions>
        <exclusion>
          <groupId>com.fasterxml.jackson.core</groupId>
          <artifactId>jackson-databind</artifactId>
        </exclusion>
      </exclusions>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-transport-native-epoll</artifactId>
      <classifier>linux-x86_64</classifier>
      <version>${netty.version}</version>
    </dependency>

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-pool2</artifactId>
      <version>${commons-pool2.version}</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>${xerces.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.poi</groupId>
      <artifactId>poi</artifactId>
      <version>${poi.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.poi</groupId>
      <artifactId>poi-ooxml</artifactId>
      <version>${poi.version}</version>
      <scope>compile</scope>
    </dependency>

    <!-- Test Dependencies -->
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>${jackson.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.streamsets</groupId>
      <artifactId>streamsets-datacollector-stagesupport</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.streamsets</groupId>
      <artifactId>streamsets-datacollector-guavasupport</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.streamsets</groupId>
      <artifactId>streamsets-datacollector-sdk</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-core</artifactId>
      <version>${hamcrest.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-library</artifactId>
      <version>${hamcrest.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mock-server</groupId>
      <artifactId>mockserver-netty</artifactId>
      <version>${mockserver.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.8.2</version>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <artifactSet>
                <includes>
                  <include>com.google.protobuf:protobuf-java</include>
                </includes>
              </artifactSet>
              <relocations>
                <!-- Protobuf -->
                <relocation>
                  <pattern>com.google.protobuf</pattern>
                  <shadedPattern>_ss_com.google.protobuf</shadedPattern>
                </relocation>
              </relocations>
              <dependencyReducedPomLocation>${project.build.directory}/shaded-pom.xml</dependencyReducedPomLocation>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>


text:
python2 "${HYPERDEX_SRCDIR}"/test/runner.py --space="space kv key k attributes map(int, float) v" --daemons=1 -- \
    python2 "${HYPERDEX_SRCDIR}"/test/python/DataTypeMapIntFloat.py {HOST} {PORT}


text:
import boto3
import json
import base64
import os

kms = boto3.client('kms')
bad_request = {
    'statusCode': 400,
    'headers': {
        'Content-Type': 'application/json'
    },
    'body': json.dumps({'error': 'Invalid argument'})
}

def encrypt(key, message):
    '''encrypt leverages KMS encrypt and base64-encode encrypted blob

        More info on KMS encrypt API:
        https://docs.aws.amazon.com/kms/latest/APIReference/API_encrypt.html
    '''
    try:
        ret = kms.encrypt(KeyId=key, Plaintext=message)
        encrypted_data = base64.encodestring(ret.get('CiphertextBlob'))
    except Exception as e:
        # returns http 500 back to user and log error details in Cloudwatch Logs
        raise Exception("Unable to encrypt data: ", e)

    return encrypted_data

def post(event, context):

    try:
        key_id = os.environ['keyId']
        message = event['body']
        if message is None:
            raise ValueError
    except KeyError:
        raise Exception("KMS Key ID not found.")
    except ValueError:
        return bad_request

    encrypted_message = encrypt(key_id, message)
    response = {'data': encrypted_message}

    return {
        'statusCode': 200,
        'headers': {
            'Content-Type': 'application/json'
        },
        'body': json.dumps(response)
    }


text: from mysql_commando import MysqlCommando


text:
<?php

declare(strict_types=1);

namespace JMS\Serializer\Tests\Fixtures\MaxDepth;

use JMS\Serializer\Annotation as Serializer;

class Gh1382Baz
{
    /**
     * @Serializer\MaxDepth(1)
     */
    #[Serializer\MaxDepth(depth: 1)]
    public $a;

    public function __construct()
    {
        $this->a = new Gh1382Bar();
        $this->a->c = new Gh1382Bar();
    }
}


text:
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'rspec'
require 'resque'
require 'resque-director'

# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}

#
# make sure we can run redis
#
if !system("which redis-server")
  puts '', "** can't find `redis-server` in your path"
  puts "** add redis-server to your PATH and try again"
  abort ''
end

dir = File.dirname(__FILE__)
#
# start our own redis when the tests start,
# kill it when they end
#

at_exit do
  pid = `ps -e -o pid,command | grep [r]edis-test`.split(" ")[0]
  puts "Killing test redis server [#{pid}]..."
  `rm -f #{dir}/dump.rdb`
  Process.kill("KILL", pid.to_i)
end

puts "Starting redis for testing at localhost:9736..."
`redis-server #{dir}/redis-test.conf`
Resque.redis = 'localhost:9736'
ENV['VERBOSE'] = 'true'

RSpec.configure do |config|
  config.before(:each) do
    Resque::Plugins::Director::Config.reset!
    Resque::Plugins::Director::Scaler.stub!(:system)
    Process.stub!(:kill)
    Resque.redis.flushall
  end
end


text:
<?php
/**
 * Plugin Name: Youtube SpeedLoad
 * Plugin URI: http://serebniti.ru
 * Description: Friendly to WordPress.  Just click install and forget! Supports playlists and picks max thumbs from the server! Youtube SL replace standard wordpress embed code to thumbs from video what load youtube oembed code by click. Does not generate dependencies yourself. You can disable this plugin any time of use. You can do responsive embeds.
 * Version: 0.6.3
 * Text Domain: ytsl-textdomain
 * Domain Path: /lang
 * Author: Alexufo
 * Author URI: http://habrahabr.ru/users/alexufo/
 * License: GPL2
 */

add_action( 'plugins_loaded', 'ytsl_load_textdomain' );

function ytsl_load_textdomain() {
  load_plugin_textdomain( 'ytsl-textdomain', false, dirname( plugin_basename( __FILE__ ) ) . '/lang'  );
}

add_action( 'wp_enqueue_scripts', 'ytsl_plugin_styles_sripts' );
function ytsl_plugin_styles_sripts() {
	wp_enqueue_style( 'ytsl-textdomain', plugins_url('style.css', __FILE__) );
	wp_enqueue_script('ytsl-textdomain', plugins_url( 'script.js' , __FILE__ ), null, '', true);
}

if ( !is_admin() ) {
	add_filter('embed_oembed_html', 'ytsl_oembed_html', 1, 3);
};

function ytsl_oembed_html ($cache, $url, $attr) {
	//_log($cache);
	// check signage data-ytsl
	if (strpos($cache, 'data-ytsl')) {
		preg_match( '/(?<=data-ytsl=")(.+?)(?=")/', $cache, $match_cache);
		$MATCH_CACHE = $match_cache[0];
	};

	//* we need create cache if ytsl  is empty for youtube videos and playlists
	if (empty($MATCH_CACHE)) {

		// ignor not youtube cache. I dont use other services. Sorry
		if (!strpos($cache, 'youtube')) {
			return $cache;
		}

		// check curl exist
		if (!function_exists('curl_version')) {
			return $cache;
		}

		// remove old data attr older v0.3
		$cache = preg_replace('/data-picprefix=\\"(.+?)\\"/s', "", $cache);
		// if playlist get id.
		if( preg_match_all( '/videoseries|list=/i', $cache, $m )){
			// extract playlist id
			preg_match( '/(?<=list=)(.+?)(?=")/', $cache, $list );
			//get video_id
			$json = json_decode(file_get_contents('https://www.youtube.com/oembed?url=http://www.youtube.com/playlist?list='.$list[1]), true);
			// $video_id extract
			preg_match( '/(?<=vi\/)(.+?)(?=\/)/', $json['thumbnail_url'], $video_id );
		} else {
			preg_match( '/(?<=embed\/)(.+?)(?=\?)/', $cache, $video_id );
		}
		//_log($video_id[0]);
		// if  video_id still empty may be youtube offline :-)))

		if (!$video_id[0]) {
			return $cache;
		}

		$ch = curl_init();
		$headers = array(
			'Accept-language: en',
			'User-Agent: Mozilla/5.0 (iPad; CPU OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11B554a Safari',
		);
		curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
		curl_setopt($ch, CURLOPT_HEADER, 0);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
		curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
		curl_setopt($ch, CURLOPT_URL, "https://www.youtube.com/oembed?url=http://www.youtube.com/watch?v=" . $video_id[0] . "&format=json");

		$data = curl_exec($ch);

		$info = curl_getinfo($ch);
		curl_close($ch);

		if ($info['http_code'] != 200){
			return $cache;
		}

		// if youtube change json
		if (empty($data)) {
			return $cache;
		}

		// \U0001f534 breakes json_decode with big U
		$data = str_replace("\\U",'\\u', $data);
		$json =  json_decode($data,JSON_UNESCAPED_SLASHES);

		//_log($data);
		//_log($json);
		// if json not valid
		if (empty($json)) {
			return $cache;
		}
		//print_r($json);

		$ytsl_cache  = [];
		$ytsl_cache['title'] = htmlentities( $json['title'], ENT_QUOTES, 'UTF-8' );
		$ytsl_cache['video_id'] = $video_id[0];

		$ytsl_cache = base64_encode(json_encode($ytsl_cache));

		//wp core with first parsing inject unknow attr discover. Owerwise md5 is not valid
		if($attr['discover'] == 1){
			unset($attr['discover']);
		}

		$cachekey   = '_oembed_' . md5( $url . serialize( $attr ) );
		// update $cache varable
		$cache      = str_replace('src', ' data-ytsl="'.$ytsl_cache.'" src', $cache);
		//_log($ytsl_cache );
		// save new cache
		update_post_meta( get_the_ID(), $cachekey, $cache );

		$MATCH_CACHE = $ytsl_cache;
	}

	preg_match( '/(?<=height=")(.+?)(?=")/', $cache, $video_height );
	preg_match( '/(?<=width=")(.+?)(?=")/' , $cache, $video_width  );

	$json   = json_decode(base64_decode($MATCH_CACHE), true);
	//_log($json);
	$ytsl   = preg_replace("/data-ytsl=\"(.+?)\"/", "", $cache);
	$ytsl   = htmlentities(str_replace( '=oembed','=oembed&autoplay=1', $ytsl ));

	/**
	 * title
	 * video_id
	 * fixed - responsive or not
	 **/

	$thumb_url  = "https://i.ytimg.com/vi/{$json['video_id']}/hqdefault.jpg";

	$fixed      = "height:{$video_height[1]}px;width:{$video_width[1]}px;";
	$wrap_start;
	$wrap_end;

	if(get_option('ytsl-responive') == 'on') {
		$fixed      = '';
		$wrap_start = '
';
		$wrap_end   = '
';
	}

	$html = $wrap_start . "

{$json['title']}

" . $wrap_end;

	return $html;

};

require  'ytsl-admin-options.php';


text:
package com.xsing.basedemo.fragment;

public class Fragment1 extends BaseFragment {
    @Override
    public String initContent() {
        return "11111111111111";
    }
}


text:
scikit-demo
===========

a demo app for scikit-node.


text:
<?php

namespace Multiservices\InventarioBundle\EventListener;

use Doctrine\Common\Persistence\Event\LifecycleEventArgs;
use Doctrine\ORM\Event\PreFlushEventArgs;
use Doctrine\ORM\Event\PreUpdateEventArgs;

use Multiservices\InventarioBundle\Entity\Facturasp;

class FacturaspListener
{
    /** @PrePersist */
    public function prePersistHandler(Facturasp $facturap, LifecycleEventArgs $event) {

        }
    /** @PostPersist */
    public function postPersistHandler(Facturasp $facturap, LifecycleEventArgs $event) {

    }

    /** @PreUpdate */
    public function preUpdateHandler(Facturasp $facturap, PreUpdateEventArgs $event) { }

    /** @PostUpdate */
    public function postUpdateHandler(Facturasp $facturap, LifecycleEventArgs $event) {}

    /** @PostRemove */
    public function postRemoveHandler(Facturasp $facturap, LifecycleEventArgs $event) { }

    /** @PreRemove */
    public function preRemoveHandler(Facturasp $facturap, LifecycleEventArgs $event) {}

    /** @PreFlush */
    public function preFlushHandler(Facturasp $facturap, PreFlushEventArgs $event) {
        $articulos=$facturap->getCompraArticulos();
       foreach ($articulos as $compraarticulo) {
           $compraarticulo->setCodfactura($facturap);
           $compraarticulo->setCodproveedor($facturap->getCodproveedor());

        }
    }

    /** @PostLoad */
    public function postLoadHandler(Facturasp $facturasp, LifecycleEventArgs $event) {}
}


text:
'use strict';

const fs = require('fs');
const path = require('path');
const webpack = require('webpack');
const resolve = require('resolve');
const PnpWebpackPlugin = require('pnp-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin');
const TerserPlugin = require('terser-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const safePostCssParser = require('postcss-safe-parser');
const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
const ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
const getCSSModuleLocalIdent = require('react-dev-utils/getCSSModuleLocalIdent');
const paths = require('./paths');
const modules = require('./modules');
const getClientEnvironment = require('./env');
const ModuleNotFoundPlugin = require('react-dev-utils/ModuleNotFoundPlugin');
const ForkTsCheckerWebpackPlugin = require('react-dev-utils/ForkTsCheckerWebpackPlugin');
const typescriptFormatter = require('react-dev-utils/typescriptFormatter');

const postcssNormalize = require('postcss-normalize');

const appPackageJson = require(paths.appPackageJson);

// Source maps are resource heavy and can cause out of memory issue for large source files.
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';
// Some apps do not need the benefits of saving a web request, so not inlining the chunk
// makes for a smoother build process.
const shouldInlineRuntimeChunk = process.env.INLINE_RUNTIME_CHUNK !== 'false';

const isExtendingEslintConfig = process.env.EXTEND_ESLINT === 'true';

const imageInlineSizeLimit = parseInt(
  process.env.IMAGE_INLINE_SIZE_LIMIT || '10000'
);

// Check if TypeScript is setup
const useTypeScript = fs.existsSync(paths.appTsConfig);

// style files regexes
const cssRegex = /\.css$/;
const cssModuleRegex = /\.module\.css$/;
const sassRegex = /\.(scss|sass)$/;
const sassModuleRegex = /\.module\.(scss|sass)$/;

// This is the production and development configuration.
// It is focused on developer experience, fast rebuilds, and a minimal bundle.
module.exports = function(webpackEnv) {
  const isEnvDevelopment = webpackEnv === 'development';
  const isEnvProduction = webpackEnv === 'production';

  // Variable used for enabling profiling in Production
  // passed into alias object. Uses a flag if passed into the build command
  const isEnvProductionProfile =
    isEnvProduction && process.argv.includes('--profile');

  // We will provide `paths.publicUrlOrPath` to our app
  // as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
  // Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.
  // Get environment variables to inject into our app.
  const env = getClientEnvironment(paths.publicUrlOrPath.slice(0, -1));

  // common function to get style loaders
  const getStyleLoaders = (cssOptions, preProcessor) => {
    const loaders = [
      isEnvDevelopment && require.resolve('style-loader'),
      isEnvProduction && {
        loader: MiniCssExtractPlugin.loader,
        // css is located in `static/css`, use '../../' to locate index.html folder
        // in production `paths.publicUrlOrPath` can be a relative path
        options: paths.publicUrlOrPath.startsWith('.')
          ? { publicPath: '../../' }
          : {},
      },
      {
        loader: require.resolve('css-loader'),
        options: cssOptions,
      },
      {
        // Options for PostCSS as we reference these options twice
        // Adds vendor prefixing based on your specified browser support in
        // package.json
        loader: require.resolve('postcss-loader'),
        options: {
          // Necessary for external CSS imports to work
          // https://github.com/facebook/create-react-app/issues/2677
          ident: 'postcss',
          plugins: () => [
            require('postcss-flexbugs-fixes'),
            require('postcss-preset-env')({
              autoprefixer: {
                flexbox: 'no-2009',
              },
              stage: 3,
            }),
            // Adds PostCSS Normalize as the reset css with default options,
            // so that it honors browserslist config in package.json
            // which in turn let's users customize the target behavior as per their needs.
            postcssNormalize(),
          ],
          sourceMap: isEnvProduction && shouldUseSourceMap,
        },
      },
    ].filter(Boolean);
    if (preProcessor) {
      loaders.push(
        {
          loader: require.resolve('resolve-url-loader'),
          options: {
            sourceMap: isEnvProduction && shouldUseSourceMap,
          },
        },
        {
          loader: require.resolve(preProcessor),
          options: {
            sourceMap: true,
          },
        }
      );
    }
    return loaders;
  };

  return {
    mode: isEnvProduction ? 'production' : isEnvDevelopment && 'development',
    // Stop compilation early in production
    bail: isEnvProduction,
    devtool: isEnvProduction
      ? shouldUseSourceMap
        ? 'source-map'
        : false
      : isEnvDevelopment && 'cheap-module-source-map',
    // These are the "entry points" to our application.
    // This means they will be the "root" imports that are included in JS bundle.
    externals: {
      react: 'React'
    },
    entry: [
      paths.csrExtensionJs
    ].filter(Boolean),
    output: {
      // The build folder.
      path: paths.appDist,
      // Add /* filename */ comments to generated require()s in the output.
      pathinfo: isEnvDevelopment,
      // There will be one main bundle, and one file per asynchronous chunk.
      // In development, it does not produce real files.
      filename: 'customized-csr-bundle.min.js',
      publicPath: paths.publicUrlOrPath,
      // Point sourcemap entries to original disk location (format as URL on Windows)
      devtoolModuleFilenameTemplate: isEnvProduction
        ? info =>
            path
              .relative(paths.appSrc, info.absoluteResourcePath)
              .replace(/\\/g, '/')
        : isEnvDevelopment &&
          (info => path.resolve(info.absoluteResourcePath).replace(/\\/g, '/')),
      // Prevents conflicts when multiple webpack runtimes (from different apps)
      // are used on the same page.
      jsonpFunction: `webpackJsonp${appPackageJson.name}`,
      // this defaults to 'window', but by setting it to 'this' then
      // module chunks which are built will work in web workers as well.
      globalObject: 'this',
    },
    optimization: {
      minimize: isEnvProduction,
      minimizer: [
        // This is only used in production mode
        new TerserPlugin({
          terserOptions: {
            parse: {
              ecma: 8,
            },
            compress: {
              ecma: 5,
              warnings: false,
              comparisons: false,
              inline: 2,
            },
            mangle: {
              safari10: true,
            },
            // Added for profiling in devtools
            keep_classnames: isEnvProductionProfile,
            keep_fnames: isEnvProductionProfile,
            output: {
              ecma: 5,
              comments: false,
              ascii_only: true,
            },
          },
          sourceMap: shouldUseSourceMap,
        }),
        // This is only used in production mode
        new OptimizeCSSAssetsPlugin({
          cssProcessorOptions: {
            parser: safePostCssParser,
            map: shouldUseSourceMap
              ? {
                  inline: false,
                  annotation: true,
                }
              : false,
          },
          cssProcessorPluginOptions: {
            preset: ['default', { minifyFontValues: { removeQuotes: false } }],
          },
        }),
      ],
    },
    resolve: {
      modules: ['node_modules', paths.appNodeModules].concat(
        modules.additionalModulePaths || []
      ),

      extensions: paths.moduleFileExtensions
        .map(ext => `.${ext}`)
        .filter(ext => useTypeScript || !ext.includes('ts')),
      alias: {
        'react-native': 'react-native-web',
        ...(isEnvProductionProfile && {
          'react-dom$': 'react-dom/profiling',
          'scheduler/tracing': 'scheduler/tracing-profiling',
        }),
        ...(modules.webpackAliases || {}),
      },
      plugins: [
        PnpWebpackPlugin,
        new ModuleScopePlugin(paths.appSrc, [paths.appPackageJson]),
      ],
    },
    resolveLoader: {
      plugins: [
        // Also related to Plug'n'Play, but this time it tells webpack to load its loaders
        // from the current package.
        PnpWebpackPlugin.moduleLoader(module),
      ],
    },
    module: {
      strictExportPresence: true,
      rules: [
        // Disable require.ensure as it's not a standard language feature.
        { parser: { requireEnsure: false } },

        // First, run the linter.
        // It's important to do this before Babel processes the JS.
        {
          test: /\.(js|mjs|jsx|ts|tsx)$/,
          enforce: 'pre',
          use: [
            {
              options: {
                cache: true,
                formatter: require.resolve('react-dev-utils/eslintFormatter'),
                eslintPath: require.resolve('eslint'),
                resolvePluginsRelativeTo: __dirname,

              },
              loader: require.resolve('eslint-loader'),
            },
          ],
          include: paths.appSrc,
        },
        {
          // "oneOf" will traverse all following loaders until one will
          // match the requirements. When no loader matches it will fall
          // back to the "file" loader at the end of the loader list.
          oneOf: [
            // "url" loader works like "file" loader except that it embeds assets
            // smaller than specified limit in bytes as data URLs to avoid requests.
            // A missing `test` is equivalent to a match.
            {
              test: [/\.bmp$/, /\.gif$/, /\.jpe?g$/, /\.png$/],
              loader: require.resolve('url-loader'),
              options: {
                limit: imageInlineSizeLimit,
                name: 'static/media/[name].[hash:8].[ext]',
              },
            },
            // Process application JS with Babel.
            // The preset includes JSX, Flow, TypeScript, and some ESnext features.
            {
              test: /\.(js|mjs|jsx|ts|tsx)$/,
              include: paths.appSrc,
              loader: require.resolve('babel-loader'),
              options: {
                customize: require.resolve(
                  'babel-preset-react-app/webpack-overrides'
                ),

                plugins: [
                  [
                    require.resolve('babel-plugin-named-asset-import'),
                    {
                      loaderMap: {
                        svg: {
                          ReactComponent:
                            '@svgr/webpack?-svgo,+titleProp,+ref![path]',
                        },
                      },
                    },
                  ],
                ],
                // This is a feature of `babel-loader` for webpack (not Babel itself).
                // It enables caching results in ./node_modules/.cache/babel-loader/
                // directory for faster rebuilds.
                cacheDirectory: true,
                // See #6846 for context on why cacheCompression is disabled
                cacheCompression: false,
                compact: isEnvProduction,
              },
            },
            // Process any JS outside of the app with Babel.
            // Unlike the application JS, we only compile the standard ES features.
            {
              test: /\.(js|mjs)$/,
              exclude: /@babel(?:\/|\\{1,2})runtime/,
              loader: require.resolve('babel-loader'),
              options: {
                babelrc: false,
                configFile: false,
                compact: false,
                presets: [
                  [
                    require.resolve('babel-preset-react-app/dependencies'),
                    { helpers: true },
                  ],
                ],
                cacheDirectory: true,
                // See #6846 for context on why cacheCompression is disabled
                cacheCompression: false,

                // Babel sourcemaps are needed for debugging into node_modules
                // code.  Without the options below, debuggers like VSCode
                // show incorrect code and set breakpoints on the wrong lines.
                sourceMaps: shouldUseSourceMap,
                inputSourceMap: shouldUseSourceMap,
              },
            },
            // "postcss" loader applies autoprefixer to our CSS.
            // "css" loader resolves paths in CSS and adds assets as dependencies.
            // "style" loader turns CSS into JS modules that inject <style> tags.
            // In production, we use MiniCSSExtractPlugin to extract that CSS
            // to a file, but in development "style" loader enables hot editing
            // of CSS.
            // By default we support CSS Modules with the extension .module.css
            {
              test: cssRegex,
              exclude: cssModuleRegex,
              use: getStyleLoaders({
                importLoaders: 1,
                sourceMap: isEnvProduction && shouldUseSourceMap,
              }),
              // Don't consider CSS imports dead code even if the
              // containing package claims to have no side effects.
              // Remove this when webpack adds a warning or an error for this.
              // See https://github.com/webpack/webpack/issues/6571
              sideEffects: true,
            },
            // Adds support for CSS Modules (https://github.com/css-modules/css-modules)
            // using the extension .module.css
            {
              test: cssModuleRegex,
              use: getStyleLoaders({
                importLoaders: 1,
                sourceMap: isEnvProduction && shouldUseSourceMap,
                modules: {
                  getLocalIdent: getCSSModuleLocalIdent,
                },
              }),
            },
            // Opt-in support for SASS (using .scss or .sass extensions).
            // By default we support SASS Modules with the
            // extensions .module.scss or .module.sass
            {
              test: sassRegex,
              exclude: sassModuleRegex,
              use: getStyleLoaders(
                {
                  importLoaders: 3,
                  sourceMap: isEnvProduction && shouldUseSourceMap,
                },
                'sass-loader'
              ),
              // Don't consider CSS imports dead code even if the
              // containing package claims to have no side effects.
              // Remove this when webpack adds a warning or an error for this.
              // See https://github.com/webpack/webpack/issues/6571
              sideEffects: true,
            },
            // Adds support for CSS Modules, but using SASS
            // using the extension .module.scss or .module.sass
            {
              test: sassModuleRegex,
              use: getStyleLoaders(
                {
                  importLoaders: 3,
                  sourceMap: isEnvProduction && shouldUseSourceMap,
                  modules: {
                    getLocalIdent: getCSSModuleLocalIdent,
                  },
                },
                'sass-loader'
              ),
            },
            // "file" loader makes sure those assets get served by WebpackDevServer.
            // When you `import` an asset, you get its (virtual) filename.
            // In production, they would get copied to the `build` folder.
            // This loader doesn't use a "test" so it will catch all modules
            // that fall through the other loaders.
            {
              loader: require.resolve('file-loader'),
              // Exclude `js` files to keep "css" loader working as it injects
              // its runtime that would otherwise be processed through "file" loader.
              // Also exclude `html` and `json` extensions so they get processed
              // by webpacks internal loaders.
              exclude: [/\.(js|mjs|jsx|ts|tsx)$/, /\.html$/, /\.json$/],
              options: {
                name: 'static/media/[name].[hash:8].[ext]',
              },
            },
            // ** STOP ** Are you adding a new loader?
            // Make sure to add the new loader(s) before the "file" loader.
          ],
        },
      ],
    },
    plugins: [
      // Generates an `index.html` file with the <script> injected.
      new HtmlWebpackPlugin(
        Object.assign(
          {},
          {
            inject: true,
            template: paths.appHtml,
          },
          isEnvProduction
            ? {
                minify: {
                  removeComments: true,
                  collapseWhitespace: true,
                  removeRedundantAttributes: true,
                  useShortDoctype: true,
                  removeEmptyAttributes: true,
                  removeStyleLinkTypeAttributes: true,
                  keepClosingSlash: true,
                  minifyJS: true,
                  minifyCSS: true,
                  minifyURLs: true,
                },
              }
            : undefined
        )
      ),

      isEnvProduction &&
        shouldInlineRuntimeChunk &&
        new InlineChunkHtmlPlugin(HtmlWebpackPlugin, [/runtime-.+[.]js/]),

      new InterpolateHtmlPlugin(HtmlWebpackPlugin, env.raw),

      new ModuleNotFoundPlugin(paths.appPath),

      new webpack.DefinePlugin(env.stringified),
      isEnvDevelopment && new webpack.HotModuleReplacementPlugin(),
      isEnvDevelopment && new CaseSensitivePathsPlugin(),
      isEnvDevelopment &&
        new WatchMissingNodeModulesPlugin(paths.appNodeModules),
      isEnvProduction &&
        new MiniCssExtractPlugin({
          filename: 'customized-csr-bundle.css',
        }),

      new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
      useTypeScript &&
        new ForkTsCheckerWebpackPlugin({
          typescript: resolve.sync('typescript', {
            basedir: paths.appNodeModules,
          }),
          async: isEnvDevelopment,
          useTypescriptIncrementalApi: true,
          checkSyntacticErrors: true,
          resolveModuleNameModule: process.versions.pnp
            ? `${__dirname}/pnpTs.js`
            : undefined,
          resolveTypeReferenceDirectiveModule: process.versions.pnp
            ? `${__dirname}/pnpTs.js`
            : undefined,
          tsconfig: paths.appTsConfig,
          reportFiles: [
            '**',
            '!**/__tests__/**',
            '!**/?(*.)(spec|test).*',
            '!**/src/setupProxy.*',
            '!**/src/setupTests.*',
          ],
          silent: true,
          // The formatter is invoked directly in WebpackDevServerUtils during development
          formatter: isEnvProduction ? typescriptFormatter : undefined,
        }),
    ].filter(Boolean),
    // Some libraries import Node modules but don't use them in the browser.
    // Tell webpack to provide empty mocks for them so importing them works.
    node: {
      module: 'empty',
      dgram: 'empty',
      dns: 'mock',
      fs: 'empty',
      http2: 'empty',
      net: 'empty',
      tls: 'empty',
      child_process: 'empty',
    },
    // Turn off performance processing because we utilize
    // our own hints via the FileSizeReporter
    performance: false,
  };
};


text:
<?php
/**
 * Qwerly API
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://github.com/canddi/Zend_Qwerly/blob/master/LICENSE.txt
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to hello@canddi.com so we can send you a copy immediately.
 *
 */

/**
 * Qwerly's batch response object.
 */
class Qwerly_API_Response_Batch
{

    private $_found = array();
    private $_notFound = array();
    private $_tryAgainLater = array();

    /**
     * Creates a new batch response.
     *
     * @param array $data The batch response data.
     */
    public function __construct(array $data)
    {
        // Don't even bother looking at this.
        // Will sort out users later.
        unset($data['status']);

        foreach ($data as $identifier => $item) {

            switch ($item['status']) {
                case Qwerly_API::NOT_FOUND_CODE:
                    $this->_notFound[] = $identifier;
                    break;

                case Qwerly_API::TRY_AGAIN_LATER_CODE:
                    $this->_tryAgainLater[] = $identifier;
                    break;
                default:
                    // The user was found!
                    $this->_found[] = new Qwerly_API_Response_User($item);
            }

        }
    }

    /**
     * Retrieves the list of found users in the batch lookup.
     *
     * @return array
     */
    public function getFoundUsers()
    {
        return $this->_found;
    }

    /**
     * Retrieves the list of not found users in the batch lookup.
     *
     * @return array
     */
    public function getNotFoundUsers()
    {
        return $this->_notFound;
    }

    /**
     * Retrieves the list of users that should be looked up later.
     *
     * @return array
     */
    public function getTryAgainLaterUsers()
    {
        return $this->_tryAgainLater;
    }

}


text:
package org.dynmap.modsupport;

public interface SignTextureFile extends TextureFile {

}


text:
module DebugCookie
  extend ActiveSupport::Concern

  SECRET = '0515fc548e828f73847ecc0c6247b1e38e7fedcc'.freeze

  included do
    helper_method :debug_enabled?
  end

  def debug_enabled?
    cookies[:debug] == SECRET
  end

  def enable_debug!
    cookies[:debug] = SECRET
  end

  def disable_debug!
    cookies.delete(:debug)
  end

end


text:
<?php

namespace App\Http\Controllers;

use App\Paypal;
use App\ShoppingCart;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Session;
use App\Order;

class PaymentsController extends Controller
{
    public function __construct()
    {
        $this->middleware("shoppingcart");
    }

    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        //
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function create()
    {
        //
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    public function store(Request $request)
    {
        $shopping_cart = $request->shopping_cart;

        $paypal = new Paypal($shopping_cart);
        $response = $paypal->execute($request->paymentId, $request->PayerID);

        if($response->state == "approved"){
            Session::remove("shopping_cart_id");
            $order = Order::createFromPayPalResponse($response, $shopping_cart);
            $shopping_cart->approve();
        }

        return view("shopping_carts.completed", ["shopping_cart" => $shopping_cart, "order" => $order]);
//        dd($order);
    }

    /**
     * Display the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function show($id)
    {
        //
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function edit($id)
    {
        //
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function update(Request $request, $id)
    {
        //
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function destroy($id)
    {
        //
    }
}


text:
[![Build Status](https://travis-ci.org/mljar/mljar-api-python.svg?branch=master)](https://travis-ci.org/mljar/mljar-api-python)
[![PyPI version](https://badge.fury.io/py/mljar.svg)](https://badge.fury.io/py/mljar)
[![Coverage Status](https://coveralls.io/repos/github/mljar/mljar-api-python/badge.svg?branch=master)](https://coveralls.io/github/mljar/mljar-api-python?branch=master)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/mljar.svg)](https://pypi.python.org/pypi/mljar/)

# mljar-api-python

A simple python wrapper over mljar API. It allows MLJAR users to create Machine Learning models with few lines of code:

```python
from mljar import Mljar

model = Mljar(project='My awesome project', experiment='First experiment')
model.fit(X,y)

model.predict(X)
```

That's all folks! Yeah, I know, this makes Machine Learning super easy! You can use this code for following Machine Learning tasks:
 * Binary classification (your target has only two unique values)
 * Regression (your target value is continuous)
 * More is coming soon!

## How to install

You can install mljar with **pip**:

    pip install -U mljar

or from source code:

    python setup.py install

## How to use it

 1. Create an account at mljar.com and login.
 2. Please go to your users settings (top, right corner).
 3. Get your token, for example 'exampleexampleexample'.
 4. Set environment variable `MLJAR_TOKEN` with your token value:
```
export MLJAR_TOKEN=exampleexampleexample
```
 5. That's all, you are ready to use MLJAR in your python code!

## What's going on?

 * This wrapper allows you to search through different Machine Learning algorithms and tune each of the algorithm.
 * By searching and tuning ML algorithm to your data you will get very accurate model.
 * By calling method `fit` from `Mljar class` you create new project and start experiment with models training.
 All your results will be accessible from your mljar.com account - this makes Machine Learning super easy and
 keeps all your models and results in beautiful order. So, you will never miss anything.
 * All computations are done in MLJAR Cloud, they are executed in parallel. So after calling `fit` method you can switch
 your computer off and MLJAR will do the job for you!
 * I think this is really amazing! What do you think? Please let us know at `contact@mljar.com`.

## Examples

The examples are [here!](https://github.com/mljar/mljar-examples).

## Testing

To run tests with command:

```
python -m tests.run
```


text:
package net.rlviana.pricegrabber.domain.search;

/**
 * Interface to implement by searchcriteria objects
 *
 * @author ramon
 */
public interface ISearchCriteria {

  /**
   * @return the maxResults
   */
  int getMaxResults();

  /**
   * @param maxResults the maxResults to set
   */
  void setMaxResults(int maxResults);

  /**
   * @return the firstResult
   */
  int getFirstResult();

  /**
   * @param firstResult the firstResult to set
   */
  void setFirstResult(int firstResult);

}


text:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Model_purchase extends CI_Model {

	public function get_all()
	{
		return $this->db->select('p.*, u.name, d.departement_name')
						->from('purchase as p')
						->join('user as u','p.id_user = u.id_user')
						->join('departement as d','u.id_departement = d.id_departement')
						->order_by('p.id_purchase','DESC')
						->get();
	}

	public function get_purchase_direktur()
	{
		$where = "p.status_purchase != 'Pending'";
		return $this->db->select('p.*, u.name, d.departement_name')
						->from('purchase as p')
						->join('user as u','p.id_user = u.id_user')
						->join('departement as d','u.id_departement = d.id_departement')
						->order_by('p.id_purchase','DESC')
						->where($where)
						->get();
	}

	public function get_purchase_setuju()
	{
		$where = "p.status_purchase = 'Setuju'"; //  && po.id_purchase IS NULL
		return $this->db->select('p.*, u.name, d.departement_name') // , po.*
						->from('purchase as p')
						// ->join('purchase_order as po','po.id_purchase = p.id_purchase','left')
						->join('user as u','p.id_user = u.id_user')
						->join('departement as d','u.id_departement = d.id_departement')
						->order_by('p.id_purchase','DESC')
						->where($where)
						->get();
	}

	public function get_purchase_user($id_user)
	{
		return $this->db->select('p.*')
						->from('purchase as p')
						->where('p.id_user', $id_user)
						->order_by('p.id_purchase','DESC')
						->get();
	}

	public function get_by_id($id_purchase)
	{
		return $this->db->select('p.*, u.name, d.departement_name')
						->from('purchase as p')
						->join('user as u','p.id_user = u.id_user')
						->join('departement as d','u.id_departement = d.id_departement')
						->limit(1)
						->where('p.id_purchase', $id_purchase)
						->get();
	}

	public function count_pending()
	{
		return $this->db->select('p.*')
						->from('purchase as p')
						->where('p.status_purchase', 'Pending')
						->order_by('p.id_purchase','DESC')
						->get();
	}

	public function count_proses()
	{
		return $this->db->select('p.*')
						->from('purchase as p')
						->where('p.status_purchase', 'Proses')
						->order_by('p.id_purchase','DESC')
						->get();
	}

	public function add($data)
	{
		$this->db->insert('purchase', $data);
	}

	public function update($id_purchase, $data)
	{
		$this->db->where('id_purchase', $id_purchase)->update('purchase', $data);
	}

	public function delete($id_purchase)
	{
		$this->db->where('id_purchase', $id_purchase)->delete('purchase');
	}

}

/* End of file Model_purchase.php */
/* Location: ./application/models/Model_purchase.php */


text:
{% if page.url == "/index.html"  %}

Mrkangi

Kang先生

    {% endif %}
    {% if page.isNavItem  %}

Mrkangi

{{page.title}}

    {% endif %}

                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">

                    </button>
                    {{ site.title }}

{{ site.description }}

                        {% if page.url == "/index.html" %}

{% else %}

{% endif %}
                          Blog

                        {% for p in site.pages %}{% if p.isNavItem %}
                        {% if p.url == page.url %}

{% else %}

{% endif %}
                              {{ p.title }}

                        {% endif %}
                        {% endfor %}