text:
package lz4

const (
	// Extension is the LZ4 frame file name extension
	Extension = ".lz4"
	// Version is the LZ4 frame format version
	Version = 1

	frameMagic     uint32 = 0x184D2204
	frameSkipMagic uint32 = 0x184D2A50

	// The following constants are used to setup the compression algorithm.
	minMatch            = 4  // the minimum size of the match sequence size (4 bytes)
	winSizeLog          = 16 // LZ4 64Kb window size limit
	winSize             = 1 << winSizeLog
	winMask             = winSize - 1 // 64Kb window of previous data for dependent blocks
	compressedBlockFlag = 1 << 31
	compressedBlockMask = compressedBlockFlag - 1

	// hashLog determines the size of the hash table used to quickly find a previous match position.
	// Its value influences the compression speed and memory usage, the lower the faster,
	// but at the expense of the compression ratio.
	// 16 seems to be the best compromise.
	hashLog       = 16
	hashTableSize = 1 << hashLog
	hashShift     = uint((minMatch * 8) - hashLog)

	mfLimit      = 8 + minMatch // The last match cannot start within the last 12 bytes.
	skipStrength = 6            // variable step for fast scan
)

// map the block max size id with its value in bytes: 64Kb, 256Kb, 1Mb and 4Mb.
var (
	bsMapID    = map[byte]int{4: 64 << 10, 5: 256 << 10, 6: 1 << 20, 7: 4 << 20}
	bsMapValue = make(map[int]byte, len(bsMapID))
)

// Reversed.
func init() {
	for i, v := range bsMapID {
		bsMapValue[v] = i
	}
}

// Header describes the various flags that can be set on a Writer or obtained from a Reader.
// The default values match those of the LZ4 frame format definition
// (http://fastcompression.blogspot.com/2013/04/lz4-streaming-format-final.html).
//
// NB. in a Reader, in case of concatenated frames, the Header values may change between Read() calls.
// It is the caller responsibility to check them if necessary.
type Header struct {
	BlockChecksum    bool   // Compressed blocks checksum flag.
	NoChecksum       bool   // Frame checksum flag.
	BlockMaxSize     int    // Size of the uncompressed data block (one of [64KB, 256KB, 1MB, 4MB]). Default=4MB.
	Size             uint64 // Frame total size. It is _not_ computed by the Writer.
	CompressionLevel int    // Compression level (higher is better, use 0 for fastest compression).
	done             bool   // Header processed flag (Read or Write and checked).
}


text:
const elixir = require('laravel-elixir');

elixir.config.publicPath = 'public_html/assets';

/*
 |--------------------------------------------------------------------------
 | Elixir Asset Management
 |--------------------------------------------------------------------------
 |
 | Elixir provides a clean, fluent API for defining some basic Gulp tasks
 | for your Laravel application. By default, we are compiling the Sass
 | file for our application, as well as publishing vendor resources.
 |
 */

elixir(mix => {
    mix.sass('app.scss')
       .webpack('app.js');
});

redpajama_set_name: RedPajamaGithub


text:
#pragma once
#include <aws/quicksight/QuickSight_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/DateTime.h>
#include <utility>

namespace Aws
{
namespace Utils
{
namespace Json
{
  class JsonValue;
  class JsonView;
} // namespace Json
} // namespace Utils
namespace QuickSight
{
namespace Model
{

  /**
   *
Dashboard summary.

See Also:
   AWS
   * API Reference

   */
  class AWS_QUICKSIGHT_API DashboardSummary
  {
  public:
    DashboardSummary();
    DashboardSummary(Aws::Utils::Json::JsonView jsonValue);
    DashboardSummary& operator=(Aws::Utils::Json::JsonView jsonValue);
    Aws::Utils::Json::JsonValue Jsonize() const;

    /**
     *
The Amazon Resource Name (ARN) of the resource.

     */
    inline const Aws::String& GetArn() const{ return m_arn; }

    /**
     *
The Amazon Resource Name (ARN) of the resource.

     */
    inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }

    /**
     *
The Amazon Resource Name (ARN) of the resource.

     */
    inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; }

    /**
     *
The Amazon Resource Name (ARN) of the resource.

     */
    inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); }

    /**
     *
The Amazon Resource Name (ARN) of the resource.

     */
    inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); }

    /**
     *
The Amazon Resource Name (ARN) of the resource.

     */
    inline DashboardSummary& WithArn(const Aws::String& value) { SetArn(value); return *this;}

    /**
     *
The Amazon Resource Name (ARN) of the resource.

     */
    inline DashboardSummary& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;}

    /**
     *
The Amazon Resource Name (ARN) of the resource.

     */
    inline DashboardSummary& WithArn(const char* value) { SetArn(value); return *this;}

    /**
     *
Dashboard ID.

     */
    inline const Aws::String& GetDashboardId() const{ return m_dashboardId; }

    /**
     *
Dashboard ID.

     */
    inline bool DashboardIdHasBeenSet() const { return m_dashboardIdHasBeenSet; }

    /**
     *
Dashboard ID.

     */
    inline void SetDashboardId(const Aws::String& value) { m_dashboardIdHasBeenSet = true; m_dashboardId = value; }

    /**
     *
Dashboard ID.

     */
    inline void SetDashboardId(Aws::String&& value) { m_dashboardIdHasBeenSet = true; m_dashboardId = std::move(value); }

    /**
     *
Dashboard ID.

     */
    inline void SetDashboardId(const char* value) { m_dashboardIdHasBeenSet = true; m_dashboardId.assign(value); }

    /**
     *
Dashboard ID.

     */
    inline DashboardSummary& WithDashboardId(const Aws::String& value) { SetDashboardId(value); return *this;}

    /**
     *
Dashboard ID.

     */
    inline DashboardSummary& WithDashboardId(Aws::String&& value) { SetDashboardId(std::move(value)); return *this;}

    /**
     *
Dashboard ID.

     */
    inline DashboardSummary& WithDashboardId(const char* value) { SetDashboardId(value); return *this;}

    /**
     *
A display name for the dashboard.

     */
    inline const Aws::String& GetName() const{ return m_name; }

    /**
     *
A display name for the dashboard.

     */
    inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }

    /**
     *
A display name for the dashboard.

     */
    inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }

    /**
     *
A display name for the dashboard.

     */
    inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }

    /**
     *
A display name for the dashboard.

     */
    inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }

    /**
     *
A display name for the dashboard.

     */
    inline DashboardSummary& WithName(const Aws::String& value) { SetName(value); return *this;}

    /**
     *
A display name for the dashboard.

     */
    inline DashboardSummary& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}

    /**
     *
A display name for the dashboard.

     */
    inline DashboardSummary& WithName(const char* value) { SetName(value); return *this;}

    /**
     *
The time that this dashboard was created.

     */
    inline const Aws::Utils::DateTime& GetCreatedTime() const{ return m_createdTime; }

    /**
     *
The time that this dashboard was created.

     */
    inline bool CreatedTimeHasBeenSet() const { return m_createdTimeHasBeenSet; }

    /**
     *
The time that this dashboard was created.

     */
    inline void SetCreatedTime(const Aws::Utils::DateTime& value) { m_createdTimeHasBeenSet = true; m_createdTime = value; }

    /**
     *
The time that this dashboard was created.

     */
    inline void SetCreatedTime(Aws::Utils::DateTime&& value) { m_createdTimeHasBeenSet = true; m_createdTime = std::move(value); }

    /**
     *
The time that this dashboard was created.

     */
    inline DashboardSummary& WithCreatedTime(const Aws::Utils::DateTime& value) { SetCreatedTime(value); return *this;}

    /**
     *
The time that this dashboard was created.

     */
    inline DashboardSummary& WithCreatedTime(Aws::Utils::DateTime&& value) { SetCreatedTime(std::move(value)); return *this;}

    /**
     *
The last time that this dashboard was updated.

     */
    inline const Aws::Utils::DateTime& GetLastUpdatedTime() const{ return m_lastUpdatedTime; }

    /**
     *
The last time that this dashboard was updated.

     */
    inline bool LastUpdatedTimeHasBeenSet() const { return m_lastUpdatedTimeHasBeenSet; }

    /**
     *
The last time that this dashboard was updated.

     */
    inline void SetLastUpdatedTime(const Aws::Utils::DateTime& value) { m_lastUpdatedTimeHasBeenSet = true; m_lastUpdatedTime = value; }

    /**
     *
The last time that this dashboard was updated.

     */
    inline void SetLastUpdatedTime(Aws::Utils::DateTime&& value) { m_lastUpdatedTimeHasBeenSet = true; m_lastUpdatedTime = std::move(value); }

    /**
     *
The last time that this dashboard was updated.

     */
    inline DashboardSummary& WithLastUpdatedTime(const Aws::Utils::DateTime& value) { SetLastUpdatedTime(value); return *this;}

    /**
     *
The last time that this dashboard was updated.

     */
    inline DashboardSummary& WithLastUpdatedTime(Aws::Utils::DateTime&& value) { SetLastUpdatedTime(std::move(value)); return *this;}

    /**
     *
Published version number.

     */
    inline long long GetPublishedVersionNumber() const{ return m_publishedVersionNumber; }

    /**
     *
Published version number.

     */
    inline bool PublishedVersionNumberHasBeenSet() const { return m_publishedVersionNumberHasBeenSet; }

    /**
     *
Published version number.

     */
    inline void SetPublishedVersionNumber(long long value) { m_publishedVersionNumberHasBeenSet = true; m_publishedVersionNumber = value; }

    /**
     *
Published version number.

     */
    inline DashboardSummary& WithPublishedVersionNumber(long long value) { SetPublishedVersionNumber(value); return *this;}

    /**
     *
The last time that this dashboard was published.

     */
    inline const Aws::Utils::DateTime& GetLastPublishedTime() const{ return m_lastPublishedTime; }

    /**
     *
The last time that this dashboard was published.

     */
    inline bool LastPublishedTimeHasBeenSet() const { return m_lastPublishedTimeHasBeenSet; }

    /**
     *
The last time that this dashboard was published.

     */
    inline void SetLastPublishedTime(const Aws::Utils::DateTime& value) { m_lastPublishedTimeHasBeenSet = true; m_lastPublishedTime = value; }

    /**
     *
The last time that this dashboard was published.

     */
    inline void SetLastPublishedTime(Aws::Utils::DateTime&& value) { m_lastPublishedTimeHasBeenSet = true; m_lastPublishedTime = std::move(value); }

    /**
     *
The last time that this dashboard was published.

     */
    inline DashboardSummary& WithLastPublishedTime(const Aws::Utils::DateTime& value) { SetLastPublishedTime(value); return *this;}

    /**
     *
The last time that this dashboard was published.

     */
    inline DashboardSummary& WithLastPublishedTime(Aws::Utils::DateTime&& value) { SetLastPublishedTime(std::move(value)); return *this;}

  private:

    Aws::String m_arn;
    bool m_arnHasBeenSet;

    Aws::String m_dashboardId;
    bool m_dashboardIdHasBeenSet;

    Aws::String m_name;
    bool m_nameHasBeenSet;

    Aws::Utils::DateTime m_createdTime;
    bool m_createdTimeHasBeenSet;

    Aws::Utils::DateTime m_lastUpdatedTime;
    bool m_lastUpdatedTimeHasBeenSet;

    long long m_publishedVersionNumber;
    bool m_publishedVersionNumberHasBeenSet;

    Aws::Utils::DateTime m_lastPublishedTime;
    bool m_lastPublishedTimeHasBeenSet;
  };

} // namespace Model
} // namespace QuickSight
} // namespace Aws


text:
setenv CQMSG_HANDLER_WARN_ASSERT 1

foreach file (*.tcl)
  set log = log/$file:r.log

  ./charts.sh -pedantic -auto_exit $file >&! $log
end


text:
using System.Collections.Generic;
using System.Linq;
using TUM.CMS.VplControl.Core;
using TUM.CMS.VplControl.IFC.Utilities;
using System.Windows.Media.Media3D;
using HelixToolkit.Wpf;
using TUM.CMS.VplControl.IFC.Controls;
using TUM.CMS.VplControl.Utilities;
using Xbim.Common.Geometry;
using Xbim.Ifc;
using Xbim.Ifc2x3.Extensions;
using Xbim.Ifc2x3.GeometricConstraintResource;
using Xbim.Ifc4.Interfaces;
using Xbim.Ifc4.UtilityResource;
using Xbim.ModelGeometry.Scene;
using Brushes = System.Windows.Media.Brushes;

namespace TUM.CMS.VplControl.IFC.Nodes
{
    public class IfcOperationalSpacesNode : Node
    {
        public IfcStore xModel;
        private Xbim3DModelContext context;

        private ModelController modelController;

        private IFCViewerControl control;

        public IfcOperationalSpacesNode(Core.VplControl hostCanvas) : base(hostCanvas)
        {
            IsResizeable = true;

            AddInputPortToNode("ModelInfo", typeof(object));

            modelController = ModelController.Instance;

            control = new IFCViewerControl();
            AddControlToNode(control);
        }

        public override void Calculate()
        {
            if (InputPorts[0].Data == null)
                return;

            var modelInfo = InputPorts[0].Data as ModelInfo;
            if (modelInfo == null)
                return;

            var model = modelController.GetModel(modelInfo.modelId) as IfcModel;
            if (model == null)
                return;

            // Get the model content
            xModel = model.GetModel();
            context = model.xModelContext;

            // CREATE THE OPERATIONAL SPACE FOR DOORS
            var doors = xModel.Instances.OfType<IIfcDoor>();
            var elementIds = new List<IfcGloballyUniqueId>();
            foreach (var item in doors)
            {
                elementIds.Add(item.GlobalId);
            }

            // control.InitViewPort();
            control.Visualize(control.CreateModelUiElementsDs(model, elementIds, false));

            foreach (var item in doors)
            {
                MeshBuilder meshBuilder = new MeshBuilder(false, false);

                // if (((IIfcDoorStyle)item.IsTypedBy.First().RelatingType).OperationType == IfcDoorStyleOperationEnum.DOUBLE_DOOR_SINGLE_SWING)
                // {

                var placement = ((IfcLocalPlacement)item.ObjectPlacement).PlacementRelTo.ReferencedByPlacements.First();
                var mat = placement.ToMatrix3D();

                // Set the origin
                var x = mat.OffsetX;
                var y = mat.OffsetY;
                var z = mat.OffsetZ;

                var locPoint = new Point3D(x, y, z);
                var allignVector = new Vector3D();
                var normalVector = new Vector3D();
                var heightVector = new Vector3D(0, 0, (double) item.OverallHeight);

                foreach (XbimShapeInstance instance in context.ShapeInstancesOf(item).Where(i =>i.RepresentationType == XbimGeometryRepresentationType.OpeningsAndAdditionsIncluded))
                {
                    allignVector = new Vector3D((double) (instance.Transformation.Left.X * item.OverallWidth), (double)(instance.Transformation.Left.Y * item.OverallWidth), (double)(instance.Transformation.Left.Z * item.OverallWidth));
                    normalVector = Vector3D.CrossProduct(allignVector, new Vector3D(0, 0, 1));
                }
                // allignVector.Negate();
                // Base Area
                // var listpoints = new List<Point>
                // {
                //     new Point(locPoint.X, locPoint.Y),
                //     new Point(locPoint.X + normalVector.X, locPoint.Y + normalVector.Y),
                //     new Point(locPoint.X + normalVector.X - allignVector.X, locPoint.Y + normalVector.Y - allignVector.Y),
                //     new Point(locPoint.X - allignVector.X, locPoint.Y - allignVector.Y)
                // };

                // var rec = new Rect3D(locPoint.X, locPoint.Y, locPoint.Z, Math.Abs(heightVector.X + allignVector.X + normalVector.X), Math.Abs(heightVector.Y + allignVector.Y + normalVector.Y), Math.Abs(heightVector.Z + allignVector.Z + normalVector.Z));
                //
                // meshBuilder.AddBox(rec);

                // var profile = new[] { new Point(0, 0.4), new Point(0.06, 0.36), new Point(0.1, 0.1), new Point(0.34, 0.1), new Point(0.4, 0.14), new Point(0.5, 0.5), new Point(0.7, 0.56), new Point(1, 0.46) };
                // meshBuilder.AddRevolvedGeometry(listpoints, null, locPoint, heightVector, 10);

                // meshBuilder.AddBox(new Rect3D(locPoint.X, locPoint.Y, locPoint.Z, Math.Abs(normalVector.X + allignVector.X), Math.Abs(normalVector.Y+ allignVector.Y), Math.Abs(normalVector.Z + allignVector.Z)));
                //meshBuilder.AddExtrudedGeometry(listpoints, new Vector3D(1,1,1), locPoint, Point3D.Add(locPoint, heightVector));
                // meshBuilder.AddExtrudedSegments(listpoints, new Vector3D(), locPoint, Point3D.Add(locPoint, heightVector));

                var listpoints3D = new List<Point3D>
                {
                    // 2D Rectangle
                    new Point3D(locPoint.X, locPoint.Y, locPoint.Z),
                    new Point3D(locPoint.X + normalVector.X , locPoint.Y + normalVector.Y, locPoint.Z),
                    new Point3D(locPoint.X + normalVector.X - allignVector.X, locPoint.Y + normalVector.Y - allignVector.Y, locPoint.Z),
                    new Point3D(locPoint.X - allignVector.X, locPoint.Y - allignVector.Y, locPoint.Z),

                    // 3D BOX
                    // new Point3D(locPoint.X, locPoint.Y, locPoint.Z),
                    // new Point3D(locPoint.X + normalVector.X , locPoint.Y + normalVector.Y, locPoint.Z),
                    // new Point3D(locPoint.X + normalVector.X - allignVector.X, locPoint.Y + normalVector.Y - allignVector.Y, locPoint.Z),
                    // new Point3D(locPoint.X - allignVector.X, locPoint.Y - allignVector.Y, locPoint.Z),
                    // new Point3D(locPoint.X, locPoint.Y, locPoint.Z),
                    // new Point3D(locPoint.X, locPoint.Y, locPoint.Z + heightVector.Z),
                    // new Point3D(locPoint.X + normalVector.X , locPoint.Y + normalVector.Y, locPoint.Z + heightVector.Z),
                    // new Point3D(locPoint.X + normalVector.X - allignVector.X, locPoint.Y + normalVector.Y - allignVector.Y, locPoint.Z + heightVector.Z),
                    // new Point3D(locPoint.X - allignVector.X, locPoint.Y - allignVector.Y, locPoint.Z + heightVector.Z),
                };

                meshBuilder.AddPolygon(listpoints3D);

                // meshBuilder.AddBox(new Point3D((locPoint.X + normalVector.X - allignVector.X) / 2 , (locPoint.Y + normalVector.Y - allignVector.Y) / 2, (locPoint.Z + normalVector.Z - allignVector.Z + heightVector.Z) / 2), normalVector.X - allignVector.X, normalVector.Y - allignVector.Y, heightVector.Z);

                //meshBuilder.AddPolygonByCuttingEars();

                //meshBuilder.AddLoftedGeometry(new List<IList<Point3D>> { listpoints3D}, new List<IList<Vector3D>> {new List<Vector3D> {heightVector}});
                // meshBuilder.AddBox();

                // Width Vector
                // meshBuilder.AddArrow(new Point3D(x, y, z), new Point3D((double) ((x + mat.Right.X) * item.OverallWidth), y + mat.Right.Y, z + mat.Right.Z), 0.01);
                // meshBuilder.AddArrow(new Point3D(x, y, z), new Point3D((double)((x + mat.Right.X) * item.OverallWidth), y + mat.Right.Y, z + mat.Right.Z), 0.01);

                // var vecHeight = new Vector3D(0, 0, (double) (z + item.OverallHeight) - z);
                // var vecFront = new Vector3D(mat.Forward.X, mat.Forward.Y, 0);
                // var vecWidth = Vector3D.CrossProduct(vecHeight, vecFront);

                var material = new DiffuseMaterial { Brush = Brushes.Aqua };
                var myGeometryModel = new GeometryModel3D
                {
                    Material = material,
                    BackMaterial = material,
                    Geometry = meshBuilder.ToMesh(true)
                };

                var element = new ModelUIElement3D { Model = myGeometryModel };

                control.Viewport3D.Children.Add(element);

                // }
            }

            // Create the floorplan
            // Create FloorPlan
            var walls = xModel.Instances.OfType<IIfcWall>();
            foreach (var wall in walls)
            {
                MeshBuilder meshBuilder = new MeshBuilder(false, false);

                //var points = GeometryHandler.DeriveGeometry2D(wall, context);
                var points = GeometryHandler.GetFootPrint(wall, context);

                meshBuilder.AddPolygon(points);

                var material = new DiffuseMaterial { Brush = Brushes.Red };
                var myGeometryModel = new GeometryModel3D
                {
                    Material = material,
                    BackMaterial = material,
                    Geometry = meshBuilder.ToMesh(true)
                };

                var element = new ModelUIElement3D { Model = myGeometryModel };

                control.Viewport3D.Children.Add(element);

            }

        }

        public override Node Clone()
        {
            return new IfcOperationalSpacesNode(HostCanvas)
            {
                Top = Top,
                Left = Left
            };
        }

    }
}


text:
<?php

namespace TMCms\Cache;

use TMCms\Cache\Interfaces\ICache;
use TMCms\Traits\singletonInstanceTrait;

/**
 * Class FakeCache
 * @package TMCms\Cache
 */
class FakeCache implements ICache
{
    use singletonInstanceTrait;

    /**
     * @return bool
     */
    public static function itWorks()
    {
        return true;
    }

    /**
     * @param string $key
     * @param mixed  $value
     * @param int    $ttl
     * @return mixed $value
     */
    public function set($key, $value, $ttl = 2592000)
    {
        return true;
    }

    /**
     * @param string $key
     * @return string
     */
    public function get($key)
    {
        return NULL;
    }

    /**
     * @param string $key
     * @return bool false
     */
    public function exists($key)
    {
        return false;
    }

    /**
     * @param string $key
     * @return bool true
     */
    public function delete($key)
    {
        return true;
    }

    /**
     * @return bool
     */
    public function deleteAll()
    {
        return true;
    }

    /**
     * @return bool
     */
    public function disconnect()
    {
        return true;
    }
}


text:
<?php
	// Include the connection and redirection file
	require_once("includes/auth.php");
	require_once("includes/common.php");

	// The basics

	$username = $_SESSION['username'];
	$query = "SELECT * FROM archive WHERE username = '$username'";
	$res = mysql_query($query);

	if(mysql_num_rows($res) == 0 || $res == false)
	{
		apologize("You don't have any transactions. Consider buying/selling stock and then checking this page out!");
	}

?>
<!DOCTYPE html>

		<title>
			<?php echo "{$_SESSION['displayname']}'s Archive of Transactions"; ?>
		</title>
		<link rel="stylesheet" type="text/css" href="styles.css"/>

		<?php require_once("templates/navbar.php"); ?>

				      	Symbol
				      	Shares
				      	Price
				      	Time
				      	Transaction

					<?php
						while($row = mysql_fetch_array($res))
						{
							echo "

							{$row["symbol"]}

							{$row["number_of_share"]}
							{$row["price"]}
							" . gmdate("H:i d-m-Y", $row["time"]) . "
							{$row["transaction"]}

";
						}
					?>


text:
@interface EndGamePresenter () {
  TicTacToeGameStateType gameState_;
}
@property(nonatomic, readonly) EndGameViewController *endGameViewController;

- (void)playAgainButtonPressed:(id)sender;
@end

@implementation EndGamePresenter

NSString *const kOWin = @"O wins";
NSString *const kXWin = @"X wins";
NSString *const kTie = @"Tie";

+ (UIViewController *)createViewControllerWithEndGameState:(TicTacToeGameStateType)gameState {
  return [[EndGameViewController alloc] initWithPresenter:
      [[EndGamePresenter alloc] initWithEndGameState:gameState]];
}

- (id)initWithEndGameState:(TicTacToeGameStateType)gameState {
  self = [super init];
  if (self) {
    gameState_ = gameState;
  }
  return self;
}

- (EndGameViewController *)endGameViewController {
  return (EndGameViewController *) [self viewController];
}

- (void)viewLoaded {
  EndGameViewController *vc = [self endGameViewController];

  NSString *text;
  switch (gameState_) {
    case TicTacToeGameStateOWin:
      text = kOWin;
      break;
    case TicTacToeGameStateXWin:
      text = kXWin;
      break;
    case TicTacToeGameStateBoardFull:
      text = kTie;
    default:
      break;
  }
  [vc setGameOverStateText:text];

  [[[vc endGameView] playAgainButton] addTarget:self
                                         action:@selector(playAgainButtonPressed:)
                               forControlEvents:UIControlEventTouchUpInside];
}

- (void)playAgainButtonPressed:(id)sender {
  UIViewController *homeViewController = [HomePresenter createViewController];
  UINavigationController *navController =
      [[UINavigationController alloc] initWithRootViewController:homeViewController];
  [[self viewController] presentViewController:navController animated:YES completion:nil];
}

@end


text:
<?php

declare(strict_types=1);

namespace Moon\Logger\Formatter;

use Exception;

class StandardFormatter implements FormatterInterface
{
    /**
     * The string to return is composed by some placeholders
     * {date} timestamp of the log
     * {name} logger name
     * {level} log level
     * {message} message to log (can contains placeholder too)
     * {context} un-replaced variables
     * {exception} exception trace.
     *
     * @var string
     */
    private $format = '[{date}] {name}.{level}: {message} [{context}] [{exception}]';

    /**
     * @var string dateFormat
     */
    private $dateFormat;

    public function __construct($dateFormat = 'Y-m-d H:i:s')
    {
        $this->dateFormat = $dateFormat;
    }

    public function interpolate(string $name, string $level, string $message, array $context = []): string
    {
        foreach ($context as $key => $value) {
            // If in the context array there's a key with an \Exception as value
            if ('exception' === $key && $value instanceof Exception) {
                // Get the full error trace as string
                $exceptionTrace = '';
                while ($previous ?? true) {
                    // Create the trace string
                    $exceptionTrace .= '( '.\get_class($value).": (code:  {$value->getCode()} ):  {$value->getMessage()}  at  {$value->getFile()} : {$value->getLine()}),";
                    // If there's no previous exception, stop the loop
                    if (!$value = $value->getPrevious()) {
                        $previous = false;
                    }
                }
                // Trim the last comma and remove all the break lines
                $exceptionTrace = \str_replace(PHP_EOL, ' ', \rtrim($exceptionTrace, ','));
                // Remove from the context and continue
                unset($context[$key]);
                continue;
            }

            // If the value isn't an array and is an object with a toString method
            if ((!\is_array($value) || (\is_object($value) && \method_exists($value, '__toString'))) && false !== \mb_strpos($message, '{'.$key.'}')) {
                // If in the message there's a placeholder (represented as {key}) replace it with the value,
                // remove from the context and continue
                $message = \str_replace('{'.$key.'}', "$value", $message);
                unset($context[$key]);
            }
        }

        // Handle the string to replace (empty if is not set)
        $context = \count($context) > 0 ? \json_encode($context) : '';
        $exceptionTrace = $exceptionTrace ?? '';

        // Replace and return the log line
        $data = \str_replace(
            ['{date}', '{name}', '{level}', '{context}', '{exception}', '{message}'],
            [$this->getTimestampFromImmutable(), $name, $level, $context, $exceptionTrace, $message],
            $this->format
        );

        return $data;
    }

    /**
     * Return a timestamp for logger
     * (Is a specific method for a better testability).
     */
    protected function getTimestampFromImmutable(): string
    {
        $date = new \DateTimeImmutable('now', new \DateTimeZone('utc'));

        return $date->format($this->dateFormat);
    }
}


text:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated from a template.
//
//     Manual changes to this file may cause unexpected behavior in your application.
//     Manual changes to this file will be overwritten if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace RetailApp.Database
{
    using System;
    using System.Data.Entity;
    using System.Data.Entity.Infrastructure;

    public partial class RetailAppEntities : DbContext
    {
        public RetailAppEntities()
            : base("name=RetailAppEntities")
        {
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            throw new UnintentionalCodeFirstException();
        }

        public virtual DbSet<ADMIN> ADMIN { get; set; }
        public virtual DbSet<OPCION> OPCION { get; set; }
        public virtual DbSet<PREGUNTA> PREGUNTA { get; set; }
        public virtual DbSet<RESPUESTA> RESPUESTA { get; set; }
        public virtual DbSet<STATUS> STATUS { get; set; }
        public virtual DbSet<sysdiagrams> sysdiagrams { get; set; }
        public virtual DbSet<USER> USER { get; set; }
        public virtual DbSet<PRICES> PRICES { get; set; }
    }
}


text:
layout: page
title: Fuller Llc. Award Ceremony
date: 2016-05-24
author: Scott Murphy
tags: weekly links, java
status: published
summary: In hac habitasse platea dictumst. Praesent viverra magna leo, ut.
banner: images/banner/meeting-01.jpg
booking:
  startDate: 12/25/2018
  endDate: 12/30/2018
  ctyhocn: LAWDCHX
  groupCode: FLAC
published: true
---
Nullam volutpat in nunc id consectetur. Curabitur viverra vehicula nisl, nec tincidunt nulla laoreet ut. Aliquam luctus malesuada libero, laoreet sagittis quam tincidunt ac. Sed elementum, elit sit amet volutpat pellentesque, libero mauris laoreet odio, porta mattis metus purus at metus. Vestibulum id pellentesque eros. Proin diam risus, fringilla ac dolor et, facilisis volutpat enim. Fusce dapibus quis eros eget bibendum. Integer auctor mauris ut semper viverra. Curabitur imperdiet a dolor ac maximus.

1 Quisque lacinia metus ut ligula cursus rutrum
1 Donec eu elit vestibulum, ultrices ante ac, vestibulum eros.

Proin ac luctus dui. Nunc viverra auctor urna, et molestie odio maximus et. Nam ex justo, facilisis ac tempor eu, mollis sed dolor. Sed maximus non est tincidunt gravida. Vestibulum nec turpis laoreet ante molestie hendrerit. Curabitur lacinia tincidunt nibh, a accumsan diam posuere quis. Fusce vel erat vestibulum, condimentum diam quis, gravida ex. Nam quis purus ultrices velit iaculis facilisis. Curabitur molestie nunc ex, ac commodo justo porttitor vitae. Integer porttitor tellus vitae varius bibendum. Phasellus eu ornare mauris. Nunc a imperdiet diam, at accumsan risus.
Fusce elementum venenatis sollicitudin. Maecenas sed sollicitudin mauris, non cursus tellus. Nulla id suscipit purus. Phasellus vel orci dui. Nulla facilisi. Donec convallis pellentesque purus nec sollicitudin. Aenean a metus id nulla hendrerit gravida lacinia ac mi. In tempor enim sed lectus facilisis viverra. Donec quis pharetra purus.


text:
package pl.mrwojtek.sensrec.app;

import android.annotation.TargetApi;
import android.app.Dialog;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothManager;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.DialogFragment;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.SwitchCompat;
import android.text.TextUtils;
import android.util.Log;
import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.SortedMap;

import pl.mrwojtek.sensrec.SensorsRecorder;
import pl.mrwojtek.sensrec.app.util.MaterialUtils;
import pl.mrwojtek.sensrec.ble.BleRecorder;

/**
 * Dialog for pairing Bluetooth heart rate sensors.
 */
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
public class HeartRateDialog extends DialogFragment implements DialogInterface.OnClickListener {

    public static final String DIALOG_TAG = "HeartRateDialog";
    public static final String TAG = "SensRec";

    public static final int BLUETOOTH_ENABLE_REQUEST_CODE = 100;

    private static final long SCAN_PERIOD = 10000;

    private BluetoothAdapter bluetoothAdapter;
    private Handler handler;
    private Runnable scanStopRunnable;
    private boolean scanning;

    private SharedPreferences prefs;
    private ProgressBar progress;
    private Button button;
    private ListView list;
    private DevicesAdapter adapter;

    private int textColorPrimary;
    private int textColorSecondary;
    private int textColorTertiary;

    private BluetoothAdapter.LeScanCallback leScanCallback = new BluetoothAdapter.LeScanCallback() {
        @Override
        public void onLeScan(final BluetoothDevice device, int rssi,
                             byte[] scanRecord) {
            getActivity().runOnUiThread(new Runnable() {
                @Override
                public void run() {
                    if (adapter.add(device)) {
                        adapter.notifyDataSetChanged();
                    }
                }
            });
        }
    };

    @NonNull
    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        ContextThemeWrapper context = new ContextThemeWrapper(getActivity(), R.style.DialogTheme);
        LayoutInflater inflater = getActivity().getLayoutInflater().cloneInContext(context);
        View view = inflater.inflate(R.layout.heart_rate_dialog, null);

        prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());

        progress = (ProgressBar) view.findViewById(R.id.progress);
        button = (Button) view.findViewById(R.id.button);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (bluetoothAdapter.isEnabled()) {
                    scanLeDevice(true);
                } else {
                    requestEnableBluetooth();
                }
            }
        });

        updateProgressAndButton();

        list = (ListView) view.findViewById(R.id.devices_list);
        list.setAdapter(adapter);

        textColorPrimary = ContextCompat.getColor(context, R.color.colorTextPrimary);
        textColorSecondary = ContextCompat.getColor(context, R.color.colorTextSecondary);
        textColorTertiary = ContextCompat.getColor(context, R.color.colorTextHint);

        AlertDialog.Builder builder = new AlertDialog.Builder(context, R.style.DialogTheme);
        builder.setTitle(R.string.ble_title);
        builder.setView(view);
        builder.setNegativeButton(R.string.action_cancel, null);
        builder.setPositiveButton(R.string.action_ok, this);
        return MaterialUtils.fixTitle(context, builder.create(), null);
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        handler = new Handler(getContext().getMainLooper());
        adapter = new DevicesAdapter();

        SensorsRecorder recorder = RecordingService.getRecorder(getActivity());
        SortedMap<Integer, BleRecorder> bleRecorders = recorder.getBleRecorders();
        for (Map.Entry<Integer, BleRecorder> r : bleRecorders.entrySet()) {
            adapter.add(r.getValue());
        }

        final BluetoothManager bluetoothManager =
                (BluetoothManager) getContext().getSystemService(Context.BLUETOOTH_SERVICE);
        bluetoothAdapter = bluetoothManager.getAdapter();
        if (!bluetoothAdapter.isEnabled()) {
            Log.w(TAG, "Bluetooth adapter not enabled");
            requestEnableBluetooth();
        } else {
            scanLeDevice(true);
        }
    }

    @Override
    public void onClick(DialogInterface dialog, int which) {
        if (which == DialogInterface.BUTTON_POSITIVE) {
            updateDevices();
        }
    }

    @Override
    public void onDestroy() {
        scanLeDevice(false);
        super.onDestroy();
    }

    private void requestEnableBluetooth() {
        Intent intent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
        startActivityForResult(intent, BLUETOOTH_ENABLE_REQUEST_CODE);
    }

    private void scanLeDevice(final boolean enable) {
        if (enable && !scanning) {
            scanStopRunnable = new Runnable() {
                @Override
                public void run() {
                    scanning = false;
                    updateProgressAndButton();
                    bluetoothAdapter.stopLeScan(leScanCallback);
                    scanStopRunnable = null;
                }
            };

            // Stops scanning after a pre-defined scan period.
            handler.postDelayed(scanStopRunnable, SCAN_PERIOD);

            scanning = true;
            bluetoothAdapter.startLeScan(leScanCallback);
        } else {
            scanning = false;
            bluetoothAdapter.stopLeScan(leScanCallback);
            if (scanStopRunnable != null) {
                handler.removeCallbacks(scanStopRunnable);
            }
        }

        updateProgressAndButton();
    }

    public void updateProgressAndButton() {
        if (progress != null) {
            progress.setVisibility(scanning ? View.VISIBLE : View.INVISIBLE);
        }

        if (button != null) {
            boolean enabled = bluetoothAdapter.isEnabled();
            button.setText(enabled ? R.string.ble_rescan : R.string.ble_enable);
            button.setVisibility(scanning ? View.INVISIBLE : View.VISIBLE);
        }
    }

    public void onBluetoothAdapterState(int state) {
        switch (state) {
            case BluetoothAdapter.STATE_OFF:
                scanLeDevice(false);
                break;
            case BluetoothAdapter.STATE_TURNING_OFF:
                // Ignore for now
                break;
            case BluetoothAdapter.STATE_ON:
                scanLeDevice(true);
                break;
            case BluetoothAdapter.STATE_TURNING_ON:
                // Ignore for now
                break;
        }
    }

    private void updateDevices() {
        List<Integer> previousIds = new ArrayList<>();
        Set<String> previous = prefs.getStringSet(SensorsRecorder.PREF_BLE_DEVICES, null);
        if (previous != null) {
            for (String address : previous) {
                previousIds.add(prefs.getInt(SensorsRecorder.PREF_BLE_ID_ + address, 0));
            }
        }

        SharedPreferences.Editor editor = prefs.edit();

        int lastId = -1;
        int lastIndex = 0;
        Set<String> devices = new HashSet<>();
        for (int i = 0; i < adapter.getCount(); ++i) {
            Device device = (Device) adapter.getItem(i);
            if (device.isEnabled()) {
                String address = device.getAddress();
                devices.add(address);
                if (previous == null || !previous.contains(address)) {
                    for (++lastId; lastIndex < previousIds.size(); ++lastIndex) {
                        if (previousIds.get(lastIndex) > lastId) {
                            break;
                        } else if (previousIds.get(lastIndex) == lastId) {
                            ++lastId;
                        }
                    }
                }
                editor.putInt(SensorsRecorder.PREF_BLE_ID_ + address, lastId);
                editor.putString(SensorsRecorder.PREF_BLE_NAME_ + address, device.getName());
            }
        }

        if (previous != null) {
            for (String address : previous) {
                if (!devices.contains(address)) {
                    editor.remove(SensorsRecorder.PREF_BLE_ID_ + address);
                    editor.remove(SensorsRecorder.PREF_BLE_NAME_ + address);
                }
            }
        }

        editor.putStringSet(SensorsRecorder.PREF_BLE_DEVICES, devices);
        editor.apply();
    }

    private class Device {
        String name;
        String address;
        boolean enabled;
        private boolean present;

        Device(BleRecorder recorder) {
            name = recorder.getName();
            address = recorder.getAddress();
            enabled = true;
            present = false;
        }

        Device(BluetoothDevice device) {
            name = device.getName();
            address = device.getAddress();
            enabled = false;
            present = true;
        }

        public String getName() {
            return name;
        }

        public String getAddress() {
            return address;
        }

        public boolean isEnabled() {
            return enabled;
        }

        public void setEnabled(boolean enabled) {
            this.enabled = enabled;
        }

        public boolean isPresent() {
            return present;
        }

        public boolean setPresent(boolean present) {
            if (this.present != present) {
                this.present = present;
                return true;
            }
            return false;
        }
    }

    private class DevicesAdapter extends BaseAdapter {

        private ArrayList<Device> devices;
        private Map<String, Long> deviceId;
        private Map<String, Device> deviceMap;
        private DeviceComparator deviceComparator;

        public DevicesAdapter() {
            devices = new ArrayList<>();
            deviceId = new HashMap<>();
            deviceMap = new HashMap<>();
            deviceComparator = new DeviceComparator();
        }

        public boolean add(BluetoothDevice device) {
            if (!deviceId.containsKey(device.getAddress())) {
                Device d = new Device(device);
                devices.add(d);
                deviceId.put(device.getAddress(), (long) devices.size());
                deviceMap.put(device.getAddress(), d);
                return true;
            } else {
                return deviceMap.get(device.getAddress()).setPresent(true);
            }
        }

        public boolean add(BleRecorder recorder) {
            if (!deviceId.containsKey(recorder.getAddress())) {
                Device d = new Device(recorder);
                devices.add(d);
                deviceId.put(recorder.getAddress(), (long) devices.size());
                deviceMap.put(recorder.getAddress(), d);
                return true;
            } else {
                return false;
            }
        }

        @Override
        public void notifyDataSetChanged() {
            Collections.sort(devices, deviceComparator);
            super.notifyDataSetChanged();
        }

        @Override
        public boolean hasStableIds() {
            return true;
        }

        @Override
        public int getCount() {
            return devices.size();
        }

        @Override
        public long getItemId(int position) {
            return deviceId.get(devices.get(position).getAddress());
        }

        @Override
        public Object getItem(int position) {
            return devices.get(position);
        }

        public Device getDevice(int position) {
            return devices.get(position);
        }

        @Override
        public View getView(int position, View view, ViewGroup parent) {
            DeviceViewHolder holder;

            if (view == null) {
                LayoutInflater inflater = getActivity().getLayoutInflater();
                view = inflater.inflate(R.layout.ble_device_layout, parent, false);
                holder = new DeviceViewHolder(view);
                view.setTag(holder);
            } else {
                holder = (DeviceViewHolder) view.getTag();
            }

            holder.setDevice(getDevice(position));

            return view;
        }
    }

    private class DeviceViewHolder implements CompoundButton.OnCheckedChangeListener {
        TextView nameText;
        TextView addressText;
        SwitchCompat enabledSwitch;

        Device device;

        DeviceViewHolder(View view) {
            nameText = (TextView) view.findViewById(R.id.name_text);
            addressText = (TextView) view.findViewById(R.id.address_text);
            enabledSwitch = (SwitchCompat) view.findViewById(R.id.enabled_switch);
            enabledSwitch.setOnCheckedChangeListener(this);
        }

        public void setDevice(Device device) {
            this.device = device;

            addressText.setText(device.getAddress());

            String name = device.getName();
            if (!TextUtils.isEmpty(name)) {
                nameText.setText(name);
            } else {
                nameText.setText(R.string.ble_unknown_device);
            }

            enabledSwitch.setChecked(device.isEnabled());

            if (device.isPresent()) {
                nameText.setTextColor(textColorPrimary);
                addressText.setTextColor(textColorSecondary);
            } else {
                addressText.setTextColor(textColorTertiary);
                nameText.setTextColor(textColorTertiary);
            }
        }

        @Override
        public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
            device.setEnabled(isChecked);
        }
    }

    private static class DeviceComparator implements Comparator<Device> {

        @Override
        public int compare(Device lhs, Device rhs) {
            int c = 0;

            boolean lhsEmpty = TextUtils.isEmpty(lhs.getName());
            boolean rhsEmpty = TextUtils.isEmpty(lhs.getName());
            if (lhsEmpty || rhsEmpty) {
                c = (rhsEmpty ? 1 : 0) - (lhsEmpty ? 1 : 0);
            }

            if (c == 0) {
                c = lhs.getAddress().compareTo(rhs.getAddress());
            }

            return c;
        }
    }
}


text:
import camelize from "./camelize";

const msPattern = /^-ms-/;

function camelizeStyle(string) {
	return camelize(string.replace(msPattern, "ms-"));
}

export default camelizeStyle;


text:
module MediaWiki.API.Action.Login.Import where

import MediaWiki.API.Types
import MediaWiki.API.Utils
import MediaWiki.API.Action.Login

import Text.XML.Light.Types

import Control.Monad

stringXml :: String -> Either (String,[{-Error msg-}String]) LoginResponse
stringXml s = parseDoc xml s

xml :: Element -> Maybe LoginResponse
xml e = do
  guard (elName e == nsName "api")
  let es1 = children e
  p <- pNode "login" es1
  let res = pAttr "result" p
  let uid = pAttr "lguserid" p
  let unm = pAttr "lgusername" p
  let tok = pAttr "lgtoken" p
  let coo = pAttr "cookieprefix" p
  let ses = pAttr "sessionid" p
  case res of
    Nothing -> fail "missing 'result' api attribute"
    Just "Success" ->
       return LoginResponse{ lgSuccess=True
                           , lgSession=UserSession
			                 { sessUserId    = fromMaybe "" uid
					 , sessUserName  = fromMaybe "" unm
					 , sessPassword  = Nothing
					 , sessCookiePrefix = coo
					 , sessSessionId = ses
					 , sessToken     =  fromMaybe "" tok
					 }}
    Just x -> do
       let det = pAttr "details" p
       let wai = pAttr "wait" p
       return LoginError
                { lgSuccess = False
		, lgeError  = x
		, lgeDetails = det
		, lgeWait   = fromMaybe "" wai
		}


text:
Bliss music library is a C library used to compute distance between songs in [leleleplayer](https://github.com/Polochon-street/leleleplayer).
It is can be useful for creating « intelligent » playlists, for instance.
See below for a technical description of the project.

## Usage
* Use `bl_cosine_similarity_file()` to compute the [cosine similarity](https://en.wikipedia.org/wiki/Cosine_similarity) of two songs:
![Graph from -1 to 1, 1 = close songs, -1 = opposite songs](https://cloud.githubusercontent.com/assets/9823290/11535215/31b59a18-9913-11e5-84c9-6d9ac22d4778.png)
* Use `bl_distance_file()` to compute the euclidian distance between two songs. If the distance is < 5, the songs are really similar; between 5 and 10, they are quite similar, between 10 and 15 means quite opposite, and > 15 « total opposites ».
* Combine both functions to obtain a better result - for example, a good condition to find similar songs would be « if cosine_distance >= 0.90 AND distance <= 5 then... » .
* Python bindings are also available. See [the wiki](https://github.com/Polochon-street/bliss/wiki/Python-Bindings) to use learn how to use them.

## Dependencies

* libavformat
* libavutil
* libavcodec
* libswresample (or libavresample, if libswresample isn't present)

If you are running Ubuntu (e.g. 14.04), you should `apt-get install libavutil-dev libavformat-dev libavcodec-dev libavresample-dev`.

If you are running Arch Linux, `pacman -S ffmpeg` should be enough.

For the Python bindings

* python-cffi
* python-setuptools

## Installation

### Linux users

* clone repository on github
```bash
$ git clone https://github.com/Polochon-street/bliss.git
```
* go to bliss root directory
```bash
$ cd bliss
```
* Create and enter the build directory
```bash
$ mkdir build && cd build
```
* Generate the Makefile
```bash
$ cmake .. -DCMAKE_BUILD_TYPE=Release
```
* Compile the library
```bash
$ make
```
* Install the library
```bash
(root) make install
```
* (optional) Install the python bindings
```bash
(root) cd python && python setup.py install
```

## Usage examples
* See examples/analyze.c and examples/distance.c
* Compile any project using bliss with
```bash
$ gcc -o example example.c -lbliss $(pkg-config --cflags libavutil libavformat libavcodec)
```
* Examples for python bindings are in python/test

## Unittests
This library comes with some unittests. To build them, just run
```
$ make test
```
in the `build/` folder. Unittests source files can be found in the `tests/` folder.

## How does the analysis process work?

For every song analyzed, libbliss returns a struct song which contains, among other things,
four floats, each rating an aspect of the song:

* The [tempo](https://en.wikipedia.org/wiki/Tempo "link to wikipedia") rating draws the envelope of the whole song, and then computes its DFT, obtaining peaks at the frequency of each dominant beat.
The period of each dominant beat can then be deduced from the frequencies, hinting at the song's tempo.

Warning: the tempo is not equal to the force of the song. As an example , a heavy metal track can have no steady beat at all, giving a very low tempo score while being very loud.

* The amplitude rating reprents the physical « force » of the song, that is, how much the speaker's membrane will move in order to create the sound.

It is obtained by applying a magic formula with magic coefficients to a histogram of the values of all the song's samples

* The frequency rating is a ratio between high and low frequencies: a song with a lot of high-pitched sounds tends to wake humans up far more easily.

This rating is obtained by performing a DFT over the sample array, and splitting the resulting array in 4 frequency bands: low, mid-low, mid, mid-high, and high.
Using the value in dB for each band, the final formula corresponds to freq\_result = high + mid-high + mid - (low + mid-low)

* The [attack](https://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope "link to wikipedia") rating computes the difference between each value in the envelope and the next (its derivative).

The final value is obtained by dividing the sum of the positive derivates by the number of samples, in order to avoid different results just because of the songs' length.

As you have already guessed, a song with a lot of attacks also tends to wake humans up very quickly.

## Python bindings

Please refer to the `README.md` file in `python/` folder.


text:
<?php
namespace Neos\Cache\Tests\Unit\Backend;

include_once(__DIR__ . '/../../BaseTestCase.php');

use Neos\Cache\Backend\TransientMemoryBackend;
use Neos\Cache\EnvironmentConfiguration;
use Neos\Cache\Exception;
use Neos\Cache\Frontend\StringFrontend;
use Neos\Cache\Tests\BaseTestCase;
use Neos\Cache\Frontend\FrontendInterface;

/**
 * Testcase for the Transient Memory Backend
 *
 */
class TransientMemoryBackendTest extends BaseTestCase
{
    /**
     * @test
     */
    public function setThrowsExceptionIfNoFrontEndHasBeenSet(): void
    {
        $this->expectException(Exception::class);
        $backend = new TransientMemoryBackend($this->getEnvironmentConfiguration());

        $data = 'Some data';
        $identifier = 'MyIdentifier';
        $backend->set($identifier, $data);
    }

    /**
     * @test
     */
    public function itIsPossibleToSetAndCheckExistenceInCache(): void
    {
        $cache = $this->createMock(FrontendInterface::class);
        $backend = new TransientMemoryBackend($this->getEnvironmentConfiguration());
        $backend->setCache($cache);

        $data = 'Some data';
        $identifier = 'MyIdentifier';
        $backend->set($identifier, $data);
        $inCache = $backend->has($identifier);
        self::assertTrue($inCache);
    }

    /**
     * @test
     */
    public function itIsPossibleToSetAndGetEntry(): void
    {
        $cache = $this->createMock(FrontendInterface::class);
        $backend = new TransientMemoryBackend($this->getEnvironmentConfiguration());
        $backend->setCache($cache);

        $data = 'Some data';
        $identifier = 'MyIdentifier';
        $backend->set($identifier, $data);
        $fetchedData = $backend->get($identifier);
        self::assertEquals($data, $fetchedData);
    }

    /**
     * @test
     */
    public function itIsPossibleToRemoveEntryFromCache(): void
    {
        $cache = $this->createMock(FrontendInterface::class);
        $backend = new TransientMemoryBackend($this->getEnvironmentConfiguration());
        $backend->setCache($cache);

        $data = 'Some data';
        $identifier = 'MyIdentifier';
        $backend->set($identifier, $data);
        $backend->remove($identifier);
        $inCache = $backend->has($identifier);
        self::assertFalse($inCache);
    }

    /**
     * @test
     */
    public function itIsPossibleToOverwriteAnEntryInTheCache(): void
    {
        $cache = $this->createMock(FrontendInterface::class);
        $backend = new TransientMemoryBackend($this->getEnvironmentConfiguration());
        $backend->setCache($cache);

        $data = 'Some data';
        $identifier = 'MyIdentifier';
        $backend->set($identifier, $data);
        $otherData = 'some other data';
        $backend->set($identifier, $otherData);
        $fetchedData = $backend->get($identifier);
        self::assertEquals($otherData, $fetchedData);
    }

    /**
     * @test
     */
    public function findIdentifiersByTagFindsCacheEntriesWithSpecifiedTag(): void
    {
        $cache = $this->createMock(FrontendInterface::class);
        $backend = new TransientMemoryBackend($this->getEnvironmentConfiguration());
        $backend->setCache($cache);

        $data = 'Some data';
        $entryIdentifier = 'MyIdentifier';
        $backend->set($entryIdentifier, $data, ['UnitTestTag%tag1', 'UnitTestTag%tag2']);

        $retrieved = $backend->findIdentifiersByTag('UnitTestTag%tag1');
        self::assertEquals($entryIdentifier, $retrieved[0]);

        $retrieved = $backend->findIdentifiersByTag('UnitTestTag%tag2');
        self::assertEquals($entryIdentifier, $retrieved[0]);
    }

    /**
     * @test
     * @throws Exception\NotSupportedByBackendException
     * @throws Exception
     */
    public function usingNumbersAsCacheIdentifiersWorksWhenUsingFindByTag(): void
    {
        $backend = new TransientMemoryBackend($this->getEnvironmentConfiguration());
        $cache = new StringFrontend('test', $backend);
        $backend->setCache($cache);

        $data = 'Some data';
        $entryIdentifier = '12345';
        $backend->set($entryIdentifier, $data, ['UnitTestTag%tag1']);

        $retrieved = $cache->getByTag('UnitTestTag%tag1');
        self::assertEquals($data, current($retrieved));
    }

    /**
     * @test
     * @throws Exception
     */
    public function usingNumbersAsCacheIdentifiersWorksWhenUsingFlushTag(): void
    {
        $backend = new TransientMemoryBackend($this->getEnvironmentConfiguration());
        $cache = new StringFrontend('test', $backend);
        $backend->setCache($cache);

        $data = 'Some data';
        $entryIdentifier = '12345';
        $backend->set($entryIdentifier, $data, ['UnitTestTag%tag1']);

        $cache->flushByTag('UnitTestTag%tag1');
        self::assertFalse($backend->has('12345'));
    }

    /**
     * @test
     */
    public function hasReturnsFalseIfTheEntryDoesntExist(): void
    {
        $cache = $this->createMock(FrontendInterface::class);
        $backend = new TransientMemoryBackend($this->getEnvironmentConfiguration());
        $backend->setCache($cache);

        $identifier = 'NonExistingIdentifier';
        $inCache = $backend->has($identifier);
        self::assertFalse($inCache);
    }

    /**
     * @test
     */
    public function removeReturnsFalseIfTheEntryDoesntExist(): void
    {
        $cache = $this->createMock(FrontendInterface::class);
        $backend = new TransientMemoryBackend($this->getEnvironmentConfiguration());
        $backend->setCache($cache);

        $identifier = 'NonExistingIdentifier';
        $inCache = $backend->remove($identifier);
        self::assertFalse($inCache);
    }

    /**
     * @test
     */
    public function flushByTagRemovesCacheEntriesWithSpecifiedTag(): void
    {
        $cache = $this->createMock(FrontendInterface::class);
        $backend = new TransientMemoryBackend($this->getEnvironmentConfiguration());
        $backend->setCache($cache);

        $data = 'some data' . microtime();
        $backend->set('TransientMemoryBackendTest1', $data, ['UnitTestTag%test', 'UnitTestTag%boring']);
        $backend->set('TransientMemoryBackendTest2', $data, ['UnitTestTag%test', 'UnitTestTag%special']);
        $backend->set('TransientMemoryBackendTest3', $data, ['UnitTestTag%test']);

        $backend->flushByTag('UnitTestTag%special');

        self::assertTrue($backend->has('TransientMemoryBackendTest1'), 'TransientMemoryBackendTest1');
        self::assertFalse($backend->has('TransientMemoryBackendTest2'), 'TransientMemoryBackendTest2');
        self::assertTrue($backend->has('TransientMemoryBackendTest3'), 'TransientMemoryBackendTest3');
    }

    /**
     * @test
     */
    public function flushRemovesAllCacheEntries(): void
    {
        $cache = $this->createMock(FrontendInterface::class);
        $backend = new TransientMemoryBackend($this->getEnvironmentConfiguration());
        $backend->setCache($cache);

        $data = 'some data' . microtime();
        $backend->set('TransientMemoryBackendTest1', $data);
        $backend->set('TransientMemoryBackendTest2', $data);
        $backend->set('TransientMemoryBackendTest3', $data);

        $backend->flush();

        self::assertFalse($backend->has('TransientMemoryBackendTest1'), 'TransientMemoryBackendTest1');
        self::assertFalse($backend->has('TransientMemoryBackendTest2'), 'TransientMemoryBackendTest2');
        self::assertFalse($backend->has('TransientMemoryBackendTest3'), 'TransientMemoryBackendTest3');
    }

    /**
     * @return EnvironmentConfiguration|\PHPUnit\Framework\MockObject\MockObject
     */
    public function getEnvironmentConfiguration()
    {
        return $this->getMockBuilder(EnvironmentConfiguration::class)->setConstructorArgs([
            __DIR__ . '~Testing',
            'vfs://Foo/',
            255
        ])->getMock();
    }
}


text:
$(document).ready(function() {

	//When page loads...
	$(".tab_content").hide(); //Hide all content
	$("ul.tabs li:first").addClass("active").show(); //Activate first tab
	$(".tab_content:first").show(); //Show first tab content

	//On Click Event
	$("ul.tabs li").click(function() {

		$("ul.tabs li").removeClass("active"); //Remove any "active" class
		$(this).addClass("active"); //Add "active" class to selected tab
		$(".tab_content").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the active tab + content
		$(activeTab).fadeIn(); //Fade in the active ID content
		return false;
	});

});


text:
FROM gcr.io/envoy-ci/envoy-build:b0ff77ae3f25b0bf595f9b8bba46b489723ab446

ARG USERNAME=vscode
ARG USER_UID=501
ARG USER_GID=$USER_UID

ENV BUILD_DIR=/build
ENV ENVOY_STDLIB=libstdc++

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update \
  && apt-get -y install --no-install-recommends libpython2.7 net-tools psmisc vim 2>&1 \
  # Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
  && groupadd --gid $USER_GID $USERNAME \
  && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME -G pcap -d /build \
  # [Optional] Add sudo support for non-root user
  && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
  && chmod 0440 /etc/sudoers.d/$USERNAME

ENV DEBIAN_FRONTEND=
ENV PATH=/opt/llvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

ENV CLANG_FORMAT=/opt/llvm/bin/clang-format


text:
using SR=MS.Internal.PresentationCore.SR;
using SRID=MS.Internal.PresentationCore.SRID;
#else
using SR=System.Windows.SR;
using SRID=System.Windows.SRID;
#endif

namespace System.Windows.Media.Effects
{
    internal static partial class ValidateEnums
    {
        /// <summary>
        ///     Returns whether or not an enumeration instance a valid value.
        ///     This method is designed to be used with ValidateValueCallback, and thus
        ///     matches it's prototype.
        /// </summary>
        /// <param name="valueObject">
        ///     Enumeration value to validate.
        /// </param>
        /// <returns> 'true' if the enumeration contains a valid value, 'false' otherwise. </returns>
        public static bool IsKernelTypeValid(object valueObject)
        {
            KernelType value = (KernelType) valueObject;

            return (value == KernelType.Gaussian) ||
                   (value == KernelType.Box);
        }
    }
}


text:
#pragma once
#include <aws/cloudfront/CloudFront_EXPORTS.h>
#include <aws/cloudfront/CloudFrontRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>

namespace Aws
{
namespace CloudFront
{
namespace Model
{

  /**
   *
The request to get an origin access identity's information.

See
   * Also:
   AWS
   * API Reference

   */
  class AWS_CLOUDFRONT_API GetCloudFrontOriginAccessIdentity2018_06_18Request : public CloudFrontRequest
  {
  public:
    GetCloudFrontOriginAccessIdentity2018_06_18Request();

    // Service request name is the Operation name which will send this request out,
    // each operation should has unique request name, so that we can get operation's name from this request.
    // Note: this is not true for response, multiple operations may have the same response name,
    // so we can not get operation's name from response.
    inline virtual const char* GetServiceRequestName() const override { return "GetCloudFrontOriginAccessIdentity"; }

    Aws::String SerializePayload() const override;

    /**
     *
The identity's ID.

     */
    inline const Aws::String& GetId() const{ return m_id; }

    /**
     *
The identity's ID.

     */
    inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; }

    /**
     *
The identity's ID.

     */
    inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); }

    /**
     *
The identity's ID.

     */
    inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); }

    /**
     *
The identity's ID.

     */
    inline GetCloudFrontOriginAccessIdentity2018_06_18Request& WithId(const Aws::String& value) { SetId(value); return *this;}

    /**
     *
The identity's ID.

     */
    inline GetCloudFrontOriginAccessIdentity2018_06_18Request& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;}

    /**
     *
The identity's ID.

     */
    inline GetCloudFrontOriginAccessIdentity2018_06_18Request& WithId(const char* value) { SetId(value); return *this;}

  private:

    Aws::String m_id;
    bool m_idHasBeenSet;
  };

} // namespace Model
} // namespace CloudFront
} // namespace Aws


text:
package ro.nextreports.server.security;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Required;
import org.springframework.dao.DataAccessException;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.TransactionStatus;
import org.springframework.transaction.support.TransactionCallback;
import org.springframework.transaction.support.TransactionTemplate;

import ro.nextreports.server.dao.SecurityDao;
import ro.nextreports.server.domain.User;
import ro.nextreports.server.exception.NotFoundException;

/**
 * @author Decebal Suiu
 */
public class NextServerUserDetailsService implements UserDetailsService, InitializingBean {

	private SecurityDao securityDao;
	private PlatformTransactionManager transactionManager;

	private TransactionTemplate transactionTemplate;

	@Required
	public void setSecurityDao(SecurityDao securityDao) {
		this.securityDao = securityDao;
	}

	@Required
	public void setTransactionManager(PlatformTransactionManager transactionManager) {
		this.transactionManager = transactionManager;
	}

	public User loadUserByUsername(final String username) throws UsernameNotFoundException, DataAccessException {
		User user = (User) transactionTemplate.execute(new TransactionCallback() {

			public Object doInTransaction(TransactionStatus transactionStatus) {
				try {
					return securityDao.getUserByName(username);
				} catch (NotFoundException e) {
					throw new UsernameNotFoundException("Username '" + username + "' not found");
				}
			}

		});

		if (user == null) {
			throw new UsernameNotFoundException("User '" + username + "' not found");
		}

		return user;
	}

	public void afterPropertiesSet() throws Exception {
		transactionTemplate = new TransactionTemplate(transactionManager);
		transactionTemplate.setReadOnly(true);
	}

}


text:
BUILD_DIR := build
FLOUT := ./build/src/flout
VALGRIND := valgrind --error-exitcode=1 --leak-check=full --show-reachable=yes
COMPILE := make --no-print-directory

.PHONY: all clean release debug run install test bench memcheck docs publish help

all: release

${BUILD_DIR}:
	mkdir -p ${BUILD_DIR}

clean:
	rm -rf ${BUILD_DIR}

release: ${BUILD_DIR}
	cd ${BUILD_DIR} && cmake -DCMAKE_BUILD_TYPE=RELEASE .. && ${COMPILE}

debug: ${BUILD_DIR}
	cd ${BUILD_DIR} && cmake -DCMAKE_BUILD_TYPE=DEBUG .. && ${COMPILE}

run:
	${FLOUT}

install:
	cd ${BUILD_DIR} && make install --no-print-directory

memcheck: debug
	${VALGRIND} ${FLOUT}


text:
#ifndef _PIMOTION_H_
#define _PIMOTION_H_

#include "../../MMDevice/MMDevice.h"
#include "../../MMDevice/DeviceBase.h"
#include "../../MMDevice/ImgBuffer.h"
#include <MMC410.H>
#include <string>
#include <map>

//////////////////////////////////////////////////////////////////////////////
// Error codes
//
#define ERR_UNKNOWN_MODE         102
#define ERR_UNKNOWN_POSITION     103

//////////////////////////////////////////////////////////////////////////////
// CNIMotionStage class
// Simulation of the single axis stage
//////////////////////////////////////////////////////////////////////////////

class CPIMotionStage : public CStageBase<CPIMotionStage>
{
public:
   CPIMotionStage();
   ~CPIMotionStage();

   bool Busy() {return busy_;}
   void GetName(char* pszName) const;

   int Initialize();
   int Shutdown();

   // Stage API
   virtual int SetPositionUm(double pos);// {pos_um_ = pos; return DEVICE_OK;}
   virtual int GetPositionUm(double& pos);// {pos = pos_um_; return DEVICE_OK;}
   virtual double GetStepSize() {return stepSize_um_;}
   virtual int SetPositionSteps(long steps);// {pos_um_ = steps * stepSize_um_; return DEVICE_OK;}
   virtual int GetPositionSteps(long& steps);// {steps = (long)(pos_um_ / stepSize_um_); return DEVICE_OK;}
   virtual int SetOrigin() {return DEVICE_OK;}
   virtual int GetLimits(double& lower, double& upper)
   {
      lower = lowerLimit_;
      upper = upperLimit_;
      return DEVICE_OK;
   }

   // action interface
   // ----------------
   int OnPosition(MM::PropertyBase* pProp, MM::ActionType eAct);
   int OnAxis(MM::PropertyBase* pProp, MM::ActionType eAct);
   int OnSetVelocity(MM::PropertyBase* pProp, MM::ActionType eAct);
   int OnSetStepSize(MM::PropertyBase* pProp, MM::ActionType eAct);
   int OnCOM(MM::PropertyBase* pProp, MM::ActionType eAct);
   int OnSetBaud(MM::PropertyBase* pProp, MM::ActionType eAct);
   int OnSetAcceleration(MM::PropertyBase* pProp, MM::ActionType eAct);
private:
   double stepSize_um_;
   double pos_um_;
   bool busy_;
   bool initialized_;
   double lowerLimit_;
   double upperLimit_;
   int DevAxis;
   int COMPort;
   int Baud;
};

#endif //_DEMOCAMERA_H_


text:
<!--- Provide a general summary of the issue in the Title above -->

## Context
<!--- Provide a more detailed introduction to the issue itself, and why you consider it to be a bug -->

## Expected Behavior
<!--- Tell us what should happen -->

## Actual Behavior
<!--- Tell us what happens instead -->

## Possible Fix
<!--- Not obligatory, but suggest a fix or reason for the bug -->

## Steps to Reproduce
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug include code to reproduce, if relevant -->
1.
2.
3.
4.

## Context
<!--- How has this bug affected you? What were you trying to accomplish? -->

## Your Environment
- [ ] Riak Java Client version
- [ ] Java version
- [ ] Riak version
- [ ] Operating System / Distribution & Version
- [ ] Riak's `error.log` file, if applicable
- [ ] What methods were being executed during the error
- [ ] What you *expected* to have happen
- [ ] Sample data, if applicable


text:
<?php

/**
 * sfTemplateHelperJavascripts is a helper that manages JavaScripts.
 *
 * Usage:
 *
 * <code>
 *   $this->javascripts->add('foo.css', array('media' => 'print'));
 *   echo $this->javascripts;
 * </code>
 *
 * @package    symfony
 * @subpackage templating
 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
 * @version    SVN: $Id: //depot/genesis_web/branches/falkland/bin/lib/vendor/symfony/lib/templating/sfTemplateHelperJavascripts.php#2 $
 */
class sfTemplateHelperJavascripts extends sfTemplateHelper
{
  protected
    $javascripts = array();

  /**
   * Adds a JavaScript file.
   *
   * @param string $javascript A JavaScript file path
   * @param array  $attributes An array of attributes
   */
  public function add($javascript, $attributes = array())
  {
    $this->javascripts[$this->helperSet->get('assets')->getUrl($javascript)] = $attributes;
  }

  /**
   * Returns all JavaScript files.
   *
   * @param array An array of JavaScript files to include
   */
  public function get()
  {
    return $this->javascripts;
  }

  /**
   * Returns a string representation of this helper as HTML.
   *
   * @return string The HTML representation of the JavaScripts
   */
  public function __toString()
  {
    $html = array();
    foreach ($this->javascripts as $path => $attributes)
    {
      $atts = array();
      foreach ($attributes as $key => $value)
      {
        $atts[] = sprintf('%s="%s"', $key, $this->helperSet->getEngine()->escape($value));
      }

      $html[] = sprintf('<script type="text/javascript" src="%s" %s></script>', $path, implode(' ', $atts));
    }

    return implode("\n", $html);
  }

  /**
   * Returns the canonical name of this helper.
   *
   * @return string The canonical name
   */
  public function getName()
  {
    return 'javascripts';
  }
}


text:
(function() {
  var app = angular.module('cascade');

  app.controller('ConfigureAnalyticsController', function($scope, $http, $state, AnalyticService) {
    var self = this;

    self.getCurrentConfig = function() {
        // crawls the current config of analytics {id: {mode: 'first-pass' | 'second-pass', selected: true|false}, ...}
        // and turns it into [ {analytic: id, mode: 'first-pass'}, ... ]
        var config = [];
        _.each(AnalyticService.analytics, function(analytic) {
            var analyticConfig = $scope.configuration[analytic._id];
            if (analyticConfig && analyticConfig.selected) {
                config.push({analytic: analytic._id, mode: analyticConfig.mode});
            }
        });
        return config;
    }

    self.update = function() {
        var configId = $scope.activeConfig._id;
        // server only implements a patch
        $http.put("api/configurations/analytics/" + configId, {analytics: self.getCurrentConfig()})
             .success(function(configId) {
                $(".modal").modal("hide");
                $http.get("api/configurations/analytics/" + configId).success(function(newConfig) {
                    $scope.configurations.push(newConfig);
                });
             });

      var newConfiguration = {name: $scope.configName, analytics: self.getCurrentConfig()};
    };

    self.removeConfig = function(configId) {
        $http.delete("api/configurations/analytics/" + configId).success(function() {
            // force the whole state to reload all configurations
            $scope.activeConfig = null;
            $state.reload();
        });
    }

    self.saveConfig = function() {
        $http.post("api/configurations/analytics", {name: $scope.configName, analytics: self.getCurrentConfig()})
             .success(function(configId) {
                $(".modal").modal("hide");
                $http.get("api/configurations/analytics/" + configId).success(function(newConfig) {
                    $scope.configurations.push(newConfig);
                    $scope.activeConfig = newConfig;
                });
        });
    };

  });
})();


text:
layout: post
title: "Five Four Club August 2016 Review + 50% Coupon!"
description: ""
headline: "Five Four Club August 2016 Review + 50% Coupon!"
categories:
      - Subscriptions
      - Reviews
tags: [Five Four Club, Subscriptions, Reviews, August 2016]
comments: true
mathjax: null
published: true
featured: false
type: photo
imagefeature: "FiveFourClubAugust2016Items.jpg"
date: 2016-08-22 13:21:39 -08:00
---

[![Five Four Club](http://whatsupmailbox.com/images/FiveFourClubAugust2016Package.jpg)](https://www.fivefourclub.com/getstarted?referrer=RE731318){:target="_blank"}

**Subscription:** [Five Four Club](http://fivefourclub.7eer.net/c/164125/122548/2570){:target="_blank"}

**Cost:** $60/month + Free Shipping.

**What you'll get:** Five Four Club is a monthly men's clothing subscription. Each month you'll receive an apparel package (2-3 items) valued at $120 or more that's selected according to your style profile and preferences.

**Coupon:** [Get 50% off your first two months](http://fivefourclub.7eer.net/c/164125/122548/2570){:target="_blank"} with coupon code [AUGUSTACTIVATE](http://fivefourclub.7eer.net/c/164125/122548/2570){:target="_blank"}!

[Five Four Club](http://fivefourclub.7eer.net/c/164125/122548/2570){:target="_blank"} is a great subscription for men who don't have time to shop or need the extra fashion help to bump up their style. I find their products to be of high quality and their style on trend. My husband loves them!

[![First look at unpacking](http://whatsupmailbox.com/images/FiveFourClubAugust2016OpenPackage.jpg)](https://www.fivefourclub.com/getstarted?referrer=RE731318){:target="_blank"}

First look at unpacking

[![Second look at unpacking](http://whatsupmailbox.com/images/FiveFourClubAugust2016OpenPackage02.jpg)](https://www.fivefourclub.com/getstarted?referrer=RE731318){:target="_blank"}

They also include a catalog for additional items available in their online shop.

When you subscribe to [Five Four Club](http://fivefourclub.7eer.net/c/164125/122548/2570){:target="_blank"}, you take a profile survey to input your size and style preferences. There are 4 options in style; Classic, Casual, Fashion Forward or a Mix of all. My husband selected "Fashion Forward" as his style with a preference in vibrant rich colors.

Based on my husband's "Fashion Forward" profile, here is what they sent:

[![Five Four Club August 2016 Items](http://whatsupmailbox.com/images/FiveFourClubAugust2016Items.jpg)](http://fivefourclub.7eer.net/c/164125/122548/2570){:target="_blank"}

Items in detail:

[![Five Four Club Boswell Navy Shirt](http://whatsupmailbox.com/images/FiveFourClubAugust2016BoswellNavyShirt.jpg)](http://fivefourclub.7eer.net/c/164125/122548/2570){:target="_blank"}

**Boswell Navy Shirt**

This is a nice and classic dress shirt that is just my husband's style. Plus it's made of 100% cotton!

[![Five Four Club Boswell Navy Shirt](http://whatsupmailbox.com/images/FiveFourClubAugust2016BoswellNavyShirt02.jpg)](http://fivefourclub.7eer.net/c/164125/122548/2570){:target="_blank"}

The small checkered pattern is perfect for just about any occasion. You can dress it up or dress it down, and the color is versatile too so it will go great as we transition to fall.

Here's how it looks on:

[![Five Four Club Boswell Navy Shirt](http://whatsupmailbox.com/images/FiveFourClubAugust2016BoswellNavyShirt03.jpg)](http://fivefourclub.7eer.net/c/164125/122548/2570){:target="_blank"}

My husband loves getting dress shirts in his [Five Four Club](http://fivefourclub.7eer.net/c/164125/122548/2570){:target="_blank"} packages, and he will surely use this for many years to come.

[![Five Four Club Giovane Khaki Twill Slim Pant](http://whatsupmailbox.com/images/FiveFourClubAugust2016GiovaneKhakiTwillSlimPant.jpg)](http://fivefourclub.7eer.net/c/164125/122548/2570){:target="_blank"}

**Giovane Khaki Twill Slim Pant**

Getting pants in this month's package definitely feels like hitting the jackpot! It's not often that they send them out hence it deserves a happy dance whenever it does occur.

[![Five Four Club Giovane Khaki Twill Slim Pant](http://whatsupmailbox.com/images/FiveFourClubAugust2016GiovaneKhakiTwillSlimPant02.jpg)](http://fivefourclub.7eer.net/c/164125/122548/2570){:target="_blank"}

It has two side front pockets and made of 97% cotton and 3% spandex for elasticity.

[![Five Four Club Giovane Khaki Twill Slim Pant](http://whatsupmailbox.com/images/FiveFourClubAugust2016GiovaneKhakiTwillSlimPant03.jpg)](http://fivefourclub.7eer.net/c/164125/122548/2570){:target="_blank"}

The branding is at the back side and it's ever so small which is perfect as my husband dislikes clothing with big apparent logos on them.

[![Five Four Club Giovane Khaki Twill Slim Pant](http://whatsupmailbox.com/images/FiveFourClubAugust2016GiovaneKhakiTwillSlimPant04.jpg)](http://fivefourclub.7eer.net/c/164125/122548/2570){:target="_blank"}

The back side also has two pockets that can be enclosed with buttons.

Here's how it looks on:

[![Five Four Club Giovane Khaki Twill Slim Pant](http://whatsupmailbox.com/images/FiveFourClubAugust2016Items02.jpg)](http://fivefourclub.7eer.net/c/164125/122548/2570){:target="_blank"}

As you can see, it matches the shirt and although it's a "slim" pant fit, it still had some room, so it wasn't too tight. My husband said that he definitely felt comfortable wearing it and loves the whole look.

[![Five Four Club Fairway Dad Navy Hat](http://whatsupmailbox.com/images/FiveFourClubAugust2016FairwayDadHatNavy.jpg)](http://fivefourclub.7eer.net/c/164125/122548/2570){:target="_blank"}

**Fairway Dad Navy Hat**

I think this is the first hat that they've ever sent us. My husband wears a lot of hats since we live in California were it's almost always sunny so this was happily received. Although it does have a pretty big branding on it, it's not too obnoxious so my husband is comfortable wearing it.

[![Five Four Club Fairway Dad Navy Hat](http://whatsupmailbox.com/images/FiveFourClubAugust2016FairwayDadHatNavy02.jpg)](http://fivefourclub.7eer.net/c/164125/122548/2570){:target="_blank"}

There is a "Five Four" stitching on the back side of the hat and you can see that it's also adjustable.

[![Five Four Club Fairway Dad Navy Hat](http://whatsupmailbox.com/images/FiveFourClubAugust2016FairwayDadHatNavy03.jpg)](http://fivefourclub.7eer.net/c/164125/122548/2570){:target="_blank"}

The inside has Five Four allover and you can also see that small holes are incorporated into the design so that it's breathable.

 My Thoughts: This month's items were a perfect transition as we move into fall. Although I might not really categorize them as "fashion forward", they were still items that matched my husband's style and he will surely wear it all. For the price I paid, it's still a great deal, especially since I received pants which is always a big plus. This subscription has truly helped my husband in keeping on trend and not having to go out shopping for clothes since that's probably the least favorite thing for him to do. So if that sounds like you too, I'd say try them out, especially since they have an amazing coupon going on right now.

[Subscribe here](http://fivefourclub.7eer.net/c/164125/122548/2570){:target="_blank"} with coupon code [AUGUSTACTIVATE](http://fivefourclub.7eer.net/c/164125/122548/2570){:target="_blank"} to get 50% off your first two months! That's $30 for your first two months! They rarely come out with this big of a deal, so if you've been wanting to try them out, now is definitely a good time!


text:
define(['exports', 'metal/src/metal', './Treeview.soy.js', 'metal-component/src/all/component', 'metal-keyboard-focus/src/KeyboardFocusManager', 'metal-soy/src/Soy', 'metal-jquery-adapter/src/JQueryAdapter'], function (exports, _metal, _TreeviewSoy, _component, _KeyboardFocusManager, _Soy, _JQueryAdapter) {
	'use strict';

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

	var _metal2 = _interopRequireDefault(_metal);

	var _TreeviewSoy2 = _interopRequireDefault(_TreeviewSoy);

	var _component2 = _interopRequireDefault(_component);

	var _KeyboardFocusManager2 = _interopRequireDefault(_KeyboardFocusManager);

	var _Soy2 = _interopRequireDefault(_Soy);

	var _JQueryAdapter2 = _interopRequireDefault(_JQueryAdapter);

	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : {
			default: obj
		};
	}

	function _classCallCheck(instance, Constructor) {
		if (!(instance instanceof Constructor)) {
			throw new TypeError("Cannot call a class as a function");
		}
	}

	var _createClass = function () {
		function defineProperties(target, props) {
			for (var i = 0; i < props.length; i++) {
				var descriptor = props[i];
				descriptor.enumerable = descriptor.enumerable || false;
				descriptor.configurable = true;
				if ("value" in descriptor) descriptor.writable = true;
				Object.defineProperty(target, descriptor.key, descriptor);
			}
		}

		return function (Constructor, protoProps, staticProps) {
			if (protoProps) defineProperties(Constructor.prototype, protoProps);
			if (staticProps) defineProperties(Constructor, staticProps);
			return Constructor;
		};
	}();

	function _possibleConstructorReturn(self, call) {
		if (!self) {
			throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
		}

		return call && (typeof call === "object" || typeof call === "function") ? call : self;
	}

	function _inherits(subClass, superClass) {
		if (typeof superClass !== "function" && superClass !== null) {
			throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
		}

		subClass.prototype = Object.create(superClass && superClass.prototype, {
			constructor: {
				value: subClass,
				enumerable: false,
				writable: true,
				configurable: true
			}
		});
		if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
	}

	var Treeview = function (_Component) {
		_inherits(Treeview, _Component);

		function Treeview() {
			_classCallCheck(this, Treeview);

			return _possibleConstructorReturn(this, (Treeview.__proto__ || Object.getPrototypeOf(Treeview)).apply(this, arguments));
		}

		_createClass(Treeview, [{
			key: 'attached',
			value: function attached() {
				this.keyboardFocusManager_ = new _KeyboardFocusManager2.default(this, 'li').setFocusHandler(this.handleNextFocus_.bind(this)).start();
				this.keyboardFocusManager_.on(_KeyboardFocusManager2.default.EVENT_FOCUSED, this.handleKeyboardFocused_.bind(this));
			}
		}, {
			key: 'disposed',
			value: function disposed() {
				this.keyboardFocusManager_.dispose();
				this.keyboardFocusManager_ = null;
			}
		}, {
			key: 'getNodeObj',
			value: function getNodeObj(path) {
				var obj = this.nodes[path[0]];
				for (var i = 1; i < path.length; i++) {
					obj = obj.children[path[i]];
				}
				return obj;
			}
		}, {
			key: 'getPath_',
			value: function getPath_(node) {
				return node.getAttribute('data-treeview-path').split('-');
			}
		}, {
			key: 'handleKeyboardFocused_',
			value: function handleKeyboardFocused_(data) {
				this.lastFocusedRef_ = data.ref;
			}
		}, {
			key: 'handleLeftArrow_',
			value: function handleLeftArrow_(path, obj) {
				if (obj.expanded) {
					obj.expanded = false;
					this.nodes = this.nodes;
				} else if (path.length > 1) {
					path.pop();
					return Treeview.NODE_REF_PREFIX + path.join('-');
				}
			}
		}, {
			key: 'handleNextFocus_',
			value: function handleNextFocus_(event) {
				event.stopPropagation();

				var path = this.getPath_(event.delegateTarget);
				var obj = this.getNodeObj(path);
				switch (event.keyCode) {
					case 37:
						return this.handleLeftArrow_(path, obj);
					case 39:
						return this.handleRightArrow_(path, obj);
					default:
						// Use default behavior for other keys (like up/down arrows).
						return true;
				}
			}
		}, {
			key: 'handleNodeClicked_',
			value: function handleNodeClicked_(event) {
				this.toggleExpandedState_(event.delegateTarget.parentNode.parentNode);
			}
		}, {
			key: 'handleNodeKeyUp_',
			value: function handleNodeKeyUp_(event) {
				if (event.keyCode === 13 || event.keyCode === 32) {
					this.toggleExpandedState_(event.delegateTarget);
					event.stopPropagation();
				}
			}
		}, {
			key: 'handleRightArrow_',
			value: function handleRightArrow_(path, obj) {
				if (obj.expanded) {
					path.push(0);
					return Treeview.NODE_REF_PREFIX + path.join('-');
				} else if (obj.children) {
					obj.expanded = true;
					this.nodes = this.nodes;
				}
			}
		}, {
			key: 'toggleExpandedState_',
			value: function toggleExpandedState_(node) {
				var nodeObj = this.getNodeObj(this.getPath_(node));
				nodeObj.expanded = !nodeObj.expanded;
				this.nodes = this.nodes;
			}
		}]);

		return Treeview;
	}(_component2.default);

	_Soy2.default.register(Treeview, _TreeviewSoy2.default);

	// The prefix used for tree item nodes' refs.
	Treeview.NODE_REF_PREFIX = 'node-';

	/**
  * Treeview state definition.
  * @type {!Object}
  * @static
  */
	Treeview.STATE = {
		/**
   * The ref of the last item that has been focused, so that we can retain only
   * that node in the tab order.
   * @type {string}
   */
		lastFocusedRef_: {
			internal: true,
			validator: _metal2.default.isString
		},

		/**
   * This tree view's nodes. Each node should have a name, and can optionally
   * have nested children nodes. It should also indicate if its children are
   * expanded or not.
   * @type {Array<!{children: Array, expanded: boolean?, name: string}>}
   * @default []
   */
		nodes: {
			validator: Array.isArray,
			valueFn: function valueFn() {
				return [];
			}
		}
	};

	exports.default = Treeview;
	_JQueryAdapter2.default.register('treeview', Treeview);
});
//# sourceMappingURL=Treeview.js.map


text:
/*
 * Argon2 source code package
 *
 * Written by Daniel Dinu and Dmitry Khovratovich, 2015
 *
 * This work is licensed under a Creative Commons CC0 1.0 License/Waiver.
 *
 * You should have received a copy of the CC0 Public Domain Dedication along
 * with
 * this software. If not, see
 * <http://creativecommons.org/publicdomain/zero/1.0/>.
 */

#ifndef ARGON2_OPT_H
#define ARGON2_OPT_H

#include "core.h"
#include <emmintrin.h>

/*
 * Function fills a new memory block. Differs from the
 * @param state Pointer to the just produced block. Content will be updated(!)
 * @param ref_block Pointer to the reference block
 * @param next_block Pointer to the block to be constructed
 * @pre all block pointers must be valid
 */
void fill_block(__m128i *state, const uint8_t *ref_block, uint8_t *next_block);

/*
 * Generate pseudo-random values to reference blocks in the segment and puts
 * them into the array
 * @param instance Pointer to the current instance
 * @param position Pointer to the current position
 * @param pseudo_rands Pointer to the array of 64-bit values
 * @pre pseudo_rands must point to @a instance->segment_length allocated values
 */
void generate_addresses(const argon2_instance_t *instance,
                        const argon2_position_t *position,
                        uint64_t *pseudo_rands);

#endif /* ARGON2_OPT_H */


text:
(function () {
var noneditable = (function () {
  'use strict';

  var PluginManager = tinymce.util.Tools.resolve('tinymce.PluginManager');

  var Tools = tinymce.util.Tools.resolve('tinymce.util.Tools');

  var getNonEditableClass = function (editor) {
    return editor.getParam('noneditable_noneditable_class', 'mceNonEditable');
  };
  var getEditableClass = function (editor) {
    return editor.getParam('noneditable_editable_class', 'mceEditable');
  };
  var getNonEditableRegExps = function (editor) {
    var nonEditableRegExps = editor.getParam('noneditable_regexp', []);
    if (nonEditableRegExps && nonEditableRegExps.constructor === RegExp) {
      return [nonEditableRegExps];
    } else {
      return nonEditableRegExps;
    }
  };
  var $_a19wfugujdud7b2o = {
    getNonEditableClass: getNonEditableClass,
    getEditableClass: getEditableClass,
    getNonEditableRegExps: getNonEditableRegExps
  };

  var hasClass = function (checkClassName) {
    return function (node) {
      return (' ' + node.attr('class') + ' ').indexOf(checkClassName) !== -1;
    };
  };
  var replaceMatchWithSpan = function (editor, content, cls) {
    return function (match) {
      var args = arguments, index = args[args.length - 2];
      var prevChar = index > 0 ? content.charAt(index - 1) : '';
      if (prevChar === '"') {
        return match;
      }
      if (prevChar === '>') {
        var findStartTagIndex = content.lastIndexOf('<', index);
        if (findStartTagIndex !== -1) {
          var tagHtml = content.substring(findStartTagIndex, index);
          if (tagHtml.indexOf('contenteditable="false"') !== -1) {
            return match;
          }
        }
      }
      return '' + editor.dom.encode(typeof args[1] === 'string' ? args[1] : args[0]) + '';
    };
  };
  var convertRegExpsToNonEditable = function (editor, nonEditableRegExps, e) {
    var i = nonEditableRegExps.length, content = e.content;
    if (e.format === 'raw') {
      return;
    }
    while (i--) {
      content = content.replace(nonEditableRegExps[i], replaceMatchWithSpan(editor, content, $_a19wfugujdud7b2o.getNonEditableClass(editor)));
    }
    e.content = content;
  };
  var setup = function (editor) {
    var editClass, nonEditClass;
    var contentEditableAttrName = 'contenteditable';
    editClass = ' ' + Tools.trim($_a19wfugujdud7b2o.getEditableClass(editor)) + ' ';
    nonEditClass = ' ' + Tools.trim($_a19wfugujdud7b2o.getNonEditableClass(editor)) + ' ';
    var hasEditClass = hasClass(editClass);
    var hasNonEditClass = hasClass(nonEditClass);
    var nonEditableRegExps = $_a19wfugujdud7b2o.getNonEditableRegExps(editor);
    editor.on('PreInit', function () {
      if (nonEditableRegExps.length > 0) {
        editor.on('BeforeSetContent', function (e) {
          convertRegExpsToNonEditable(editor, nonEditableRegExps, e);
        });
      }
      editor.parser.addAttributeFilter('class', function (nodes) {
        var i = nodes.length, node;
        while (i--) {
          node = nodes[i];
          if (hasEditClass(node)) {
            node.attr(contentEditableAttrName, 'true');
          } else if (hasNonEditClass(node)) {
            node.attr(contentEditableAttrName, 'false');
          }
        }
      });
      editor.serializer.addAttributeFilter(contentEditableAttrName, function (nodes) {
        var i = nodes.length, node;
        while (i--) {
          node = nodes[i];
          if (!hasEditClass(node) && !hasNonEditClass(node)) {
            continue;
          }
          if (nonEditableRegExps.length > 0 && node.attr('data-mce-content')) {
            node.name = '#text';
            node.type = 3;
            node.raw = true;
            node.value = node.attr('data-mce-content');
          } else {
            node.attr(contentEditableAttrName, null);
          }
        }
      });
    });
  };
  var $_9qhs2sgsjdud7b2k = { setup: setup };

  PluginManager.add('noneditable', function (editor) {
    $_9qhs2sgsjdud7b2k.setup(editor);
  });
  function Plugin () {
  }

  return Plugin;

}());
})();


text:
import { Component,OnInit } from '@angular/core';
import {GlobalService} from '../_globals/global.service';

@Component({
  selector: 'side-bar',
  templateUrl: './side-bar.component.html',

})
export class SideBarComponent implements OnInit {

  constructor(private globalService:GlobalService){}

 ngOnInit(){

 }
}


text:
import ownerDocument from "./ownerDocument";

export default function ownerWindow(node) {
	const doc = ownerDocument(node);
	return (doc && doc.defaultView) || doc.parentWindow;
}


text:
package com.ctrip.platform.dal.dao.unittests;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

@RunWith(Suite.class)
@SuiteClasses({
	DalDirectClientMySqlTest.class,
	DalDirectClientSqlServerTest.class,

	DalQueryDaoMySqlTest.class,
	DalQueryDaoSqlServerTest.class,

	DalTableDaoMySqlTest.class,
	DalTableDaoSqlServerTest.class,

	DatabaseSelectorTest.class,
	DalClientFactoryTest.class,
	DalClientFactoryLazeLoadTest.class,
	DalStatusManagerTest.class,
	StatementParametersTest.class,

	KeyHolderTest.class,
})
public class _AllTests {}