text:
When beginning a project development plan engineers will need to translate the designs to a structure for developing, testing and maintaining the software.  Theses designs provide engineers with the information required to develop a baseline template that facilitates data for the project.  We can use the Express command-line tool to accomplish this quickly and apply the current best practices.

## Generating An Express Application
To do this you need to make sure you have installed Express4 globally, you can refer to earlier tutorials about this.  This requires the use of a command-line console.  Open your console and navigate to the the project workspace folder where you will be saving your project.  Run the following command:

	[command-line]

## Defining Structure to Facilitate Data
In creating maintainable software there is a concept called the fundamentals of formatting.  Key components to this concept are structure and readability.  Structure in terms of code development can mean indentation, object and component separation.  Readability can be obtained by using meaningful naming conventions.  Another concept that needs to be accounted for is testing because it consumes a large part of the project budget.
Because this system is specifically designed as a CRM we want to define the user data model that we can use in our database and code.  This will be a simple object with a users:
  * User Identification
  * First Name
  * Last Name
  * Email
  * Password

## SSL and Simple Session Management
To secure system data from things like wiretapping and man-in-the-middle attacks the system needs to initiate use of the Secure Socket Layer (SSL).  By adding the SSL component to our Hypertext Transfer Protocol (HTTP) we create what is know as HTTPS connection.  SSL establishes a encrypted link between the user and the system in addition to verifying the systems authenticity though 3rd party services over HTTP.

### HTTPS for Development and Testing
When developing and testing an application it is to much trouble and expense to use a registered SSL certificate so we use a generalized replication that resembles the requirements of security goals.  To generate a self signed certificate for development and testing you will need to have OpenSSL installed.  Begin by generating a key and cert file:

	[command-line]

When done we simply load the key and certificate files into our node application and set out HTTPS communication options.

### HTTPS for Implementation
Once done with an projects development and testing we need to purchase or register our SSL certificates so our user base isn't driven away by their browsers security warning.  There are several ways to go about obtaining a SSL certificates and some are free to the open source community.  Here is a quick list of whats available:

  [list of ssl options]

### Session Management
In order to take advantage of the SSL connection for user authentication we need to begin using session management.  	In this guide we only review the basic implementation of session management but there are further steps that can be taken to gain more information and control of a user sessions.


text:
<?php

namespace Rareloop\Router;

use Rareloop\Router\ControllerMiddlewareOptions;

trait ProvidesControllerMiddlewareTrait
{
    /**
     * List of ControllerMiddleware
     *
     * @var array
     */
    protected $middleware = [];

    /**
     * Add Middleware
     *
     * @param  Psr\Http\Server\MiddlewareInterface|array $middleware
     * @return Rareloop\Router\ControllerMiddlewareOptions
     */
    public function middleware($middleware) : ControllerMiddlewareOptions
    {
        if (!is_array($middleware)) {
            $middleware = [$middleware];
        }

        $options = new ControllerMiddlewareOptions;

        foreach ($middleware as $m) {
            $this->middleware[] = new ControllerMiddleware($m, $options);
        }

        return $options;
    }

    /**
     * Get the array of ControllerMiddleware
     *
     * @return array
     */
    public function getControllerMiddleware(): array
    {
        return $this->middleware;
    }
}

redpajama_set_name: RedPajamaGithub


text:
START_ATF_NAMESPACE
    typedef int HALF_PTR;
END_ATF_NAMESPACE


text:
{-# LANGUAGE GADTs, EmptyDataDecls, KindSignatures, ExistentialQuantification, ScopedTypeVariables, DeriveDataTypeable, DeriveFunctor, NoMonomorphismRestriction, ViewPatterns, RankNTypes #-}

module Intuitionistic where

-- only propositional, sorry

import Prelude hiding (catch)
import Data.Typeable
import Data.Functor.Identity
import Data.Data hiding (Prefix,Infix)
import Control.Applicative hiding ((<|>),many)
import Control.Exception hiding (try)

import Text.Parsec
import Text.Parsec.Expr
import qualified Text.Parsec.Token as P
import Text.Parsec.Language (emptyDef)

import Common

errorModule :: String -> a
errorModule s = error ("Intuitionistic." ++ s)

-- Sequent

data S = S { hyps :: [L], goal :: L }
    deriving (Show, Eq, Data, Typeable)

data L = Prop String
       | Conj L L
       | Disj L L
       | Imp L L
       | Iff L L
       | Not L
       | Top
       | Bot
    deriving (Show, Eq, Data, Typeable)

-- Parsing

userParseError :: Either e a -> IO a
userParseError = either (\_ -> throwIO ParseFailure) return

parseSequent :: String -> IO S
parseSequent g = userParseError $ parse (whiteSpace >> sequent <* eof) "goal" g

intuitionisticStyle, intuitionisticStyleUpper, intuitionisticStyleLower :: P.LanguageDef st
intuitionisticStyle = emptyDef
                { P.commentStart    = "(*"
                , P.commentEnd      = "*)"
                , P.nestedComments  = True
                , P.identStart      = letter <|> oneOf "_"
                , P.identLetter     = alphaNum <|> oneOf "_'"
                -- Ops are sloppy, but should work OK for our use case.
                , P.opStart         = P.opLetter intuitionisticStyle
                , P.opLetter        = oneOf ":!#$%&*+./<=>?@\\^|-~,"
                , P.reservedOpNames =
                    ["(",")",".",",",";",
                    "->", "→",
                    "<->", "↔", "<=>",
                    "/\\","∧",
                    "\\/","∨",
                    "|-","⊢",
                    "~","¬"]
                , P.reservedNames   =
                    [
                    "True","False","⊤","⊥",
                    "and", "or", "ex", "iff", "not"
                    ]
                , P.caseSensitive   = True
                }
intuitionisticStyleUpper = intuitionisticStyle {P.identStart = upper}
intuitionisticStyleLower = intuitionisticStyle {P.identStart = lower}

lexer, lexerUpper, lexerLower :: P.GenTokenParser String u Identity
lexer = P.makeTokenParser intuitionisticStyle
lexerUpper = P.makeTokenParser intuitionisticStyleUpper
lexerLower = P.makeTokenParser intuitionisticStyleLower

type Parser a = forall u. ParsecT String u Identity a
reserved :: String -> Parser ()
reserved   = P.reserved lexer
upperIdentifier :: Parser String
upperIdentifier = P.identifier lexerUpper
lowerIdentifier :: Parser String
lowerIdentifier = P.identifier lexerLower
reservedOp :: String -> Parser ()
reservedOp = P.reservedOp lexer
integer :: Parser Integer
integer    = P.integer lexer
whiteSpace :: Parser ()
whiteSpace = P.whiteSpace lexer
parens :: ParsecT String u Identity a -> ParsecT String u Identity a
parens     = P.parens lexer
comma :: Parser String
comma      = P.comma lexer
commaSep :: ParsecT String u Identity a -> ParsecT String u Identity [a]
commaSep   = P.commaSep lexer
commaSep1 :: ParsecT String u Identity a -> ParsecT String u Identity [a]
commaSep1  = P.commaSep1 lexer
lexeme :: ParsecT String u Identity a -> ParsecT String u Identity a
lexeme     = P.lexeme lexer

-- term ::= term /\ term
--          term \/ term
--          ~ term
--          True
--          False
--          identifier (universe , ... universe)
--
-- also Unicode supported, so that copypasta works

sequent :: Parser S
sequent =  try (S <$> commaSep expr <* choice [reservedOp "|-", reservedOp "⊢" ] <*> expr)
       <|> try (S [] <$> expr)
       <?> "sequent"

table :: [[Operator String u Identity L]]
table   = [ [prefix "~" Not, prefix "¬" Not ]
          , [binary "/\\" Conj AssocLeft, binary "∧" Conj AssocLeft ]
          , [binary "\\/" Disj AssocLeft, binary "∨" Disj AssocLeft ]
          , [binary "->" Imp AssocRight, binary "→" Imp AssocRight, binary "<->" Iff AssocRight, binary "↔" Iff AssocRight, binary "<=>" Iff AssocRight ]
          ]

binary :: String -> (a -> a -> a) -> Assoc -> Operator String u Identity a
binary  name fun assoc = Infix (do{ reservedOp name; return fun }) assoc
prefix, postfix :: String -> (a -> a) -> Operator String u Identity a
prefix  name fun       = Prefix (do{ reservedOp name; return fun })
postfix name fun       = Postfix (do{ reservedOp name; return fun })

expr :: Parser L
expr    = buildExpressionParser table term
       <?> "expression"

term :: Parser L
term    =  try (parens expr)
       <|> try (Top <$ choice [reserved "True", reserved "⊤"])
       <|> try (Bot <$ choice [reserved "False", reserved "⊥"])
       <|> try (Prop <$> upperIdentifier)
       <?> "simple expression"


text:
<?php
/**
 * Created by -
 * User: yassinehaddioui
 * Date: 12/30/16
 * Time: 1:26 PM
 */

namespace IspMonitor\Services;

use MongoDB\BSON\Serializable;

class SpeedTestRecordingService extends RecordingService
{
    const DB_NAME = 'speedtest';
    const COLLECTION_NAME = 'logs';

    /**
     * @param Serializable $serializable
     * @return \MongoDB\InsertOneResult
     */
    public function insertSpeedTest(Serializable $serializable)
    {
        $collection = $this->getClient()->selectCollection(static::DB_NAME, static::COLLECTION_NAME);
        return $collection->insertOne($serializable);
    }

    /**
     * Returns a SpeedTest collection
     * @return \MongoDB\Collection
     */
    protected function getLogsCollection()
    {
        return $this->client->selectCollection(static::DB_NAME, static::COLLECTION_NAME);

    }

    /**
     * Returns a populated SpeedTest collection in an array format, ready to be JSON encoded.
     * @param array $filters
     * @param array $options
     * @return array
     */
    public function getLogs($filters = [], $options = [])
    {
        $collection = $this->getLogsCollection();
        /* Init `projection` if not set */
        $options['projection'] = !empty($options['projection']) ? $options['projection'] : [];
        /* Set or override `_id` to 0 */
        $options['projection']['_id'] = 0;
        $data = $collection->find($filters, $options)->toArray() ?: [];
        return $data;
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/phpcr-odm/phpcr-mapping"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://doctrine-project.org/schemas/phpcr-odm/phpcr-mapping
                  https://github.com/doctrine/phpcr-odm/raw/master/doctrine-phpcr-odm-mapping.xsd">
    <mapped-superclass
        name="Doctrine\Tests\ODM\PHPCR\Mapping\Model\MappedSuperclassMappingObject"
        translator="children"
        versionable="SIMPLE"
        node-type="phpcr:test"
        repository-class="Doctrine\Tests\ODM\PHPCR\Mapping\Model\DocumentRepository"
        referenceable="true"
    >
        <mixins>
            <mixin type="mix:one" />
            <mixin type="mix:two" />
        </mixins>
        <id name="id" />
    </mapped-superclass>
</doctrine-mapping>


text:
namespace Grabacr07.KanColleViewer.Plugins.Models.Raw
{
    /// <summary>
    ///     連合艦隊-水上部隊
    /// </summary>
    public class combined_battle_battle_water
    {
        public int api_deck_id { get; set; }
        public int[] api_ship_ke { get; set; }
        public int[] api_ship_lv { get; set; }
        public int[] api_nowhps { get; set; }
        public int[] api_maxhps { get; set; }
        public int[] api_nowhps_combined { get; set; }
        public int[] api_maxhps_combined { get; set; }
        public int api_midnight_flag { get; set; }
        public int[][] api_eSlot { get; set; }
        public int[][] api_eKyouka { get; set; }
        public int[][] api_fParam { get; set; }
        public int[][] api_eParam { get; set; }
        public int[][] api_fParam_combined { get; set; }
        public int[] api_search { get; set; }
        public int[] api_formation { get; set; }
        public int[] api_stage_flag { get; set; }
        public Api_Kouku api_kouku { get; set; }
        public int api_support_flag { get; set; }
        public Api_Support_Info api_support_info { get; set; }
        public int api_opening_flag { get; set; }
        public Raigeki api_opening_atack { get; set; }
        public int[] api_hourai_flag { get; set; }
        public Hougeki api_hougeki1 { get; set; }
        public Hougeki api_hougeki2 { get; set; }
        public Hougeki api_hougeki3 { get; set; }
        public Raigeki api_raigeki { get; set; }
    }
}


text:
using System;
using System.Runtime.Serialization;

namespace MusicBeePlugin.Ampache
{
    [Serializable]
    internal class AmpacheException : Exception
    {
        public AmpacheException()
        {
        }

        public AmpacheException(string message) : base(message)
        {
        }

        public AmpacheException(string message, Exception innerException) : base(message, innerException)
        {
        }

        protected AmpacheException(SerializationInfo info, StreamingContext context) : base(info, context)
        {
        }
    }
}


text:
package com.armadialogcreator.gui.main.stringtable;

import com.armadialogcreator.ArmaDialogCreator;
import com.armadialogcreator.core.stringtable.StringTableKey;
import com.armadialogcreator.gui.SimpleResponseDialog;
import com.armadialogcreator.lang.Lang;
import org.jetbrains.annotations.NotNull;

/**
 @author Kayler
 @since 12/26/2016 */
public class KeyAlreadyExistsDialog extends SimpleResponseDialog {
	public KeyAlreadyExistsDialog(@NotNull StringTableKey key) {
		super(
				ArmaDialogCreator.getPrimaryStage(),
				Lang.ApplicationBundle().getString("StringTable.key_exists"),
				String.format(Lang.ApplicationBundle().getString("StringTable.key_exists_f"), key.getId()),
				false, true, false
		);
		setStageSize(320, 180);
		getFooter().getBtnOk().requestFocus();
	}
}


text:
//Problem 4. Multiplication Sign

//Write a program that shows the sign (+, - or 0) of the product of three real numbers, without calculating it.
//Use a sequence of if operators.

using System;

class ProductSign
{
    static void Main()
    {
        Console.WriteLine("Please enter a number:");
        double a = double.Parse(Console.ReadLine());
        Console.WriteLine("Please enter another number:");
        double b = double.Parse(Console.ReadLine());
        Console.WriteLine("Please enter a third number:");
        double c = double.Parse(Console.ReadLine());

        if (a==0 || b==0 || c==0)
        {
            Console.WriteLine("The product of your numbers is: 0");
        }

        else if ((a < 0 && b < 0 && c < 0) || (a < 0 && b > 0 && c > 0) || (a > 0 && b < 0 && c > 0) || (a > 0 && b > 0 && c < 0))
        {
            Console.WriteLine("The product of your numbers is: -  (negative)");
        }
        else
        {
            Console.WriteLine("The product of your numbers is: +  (positive)");
        }

    }
}