text:
package com.squareup.okhttp.benchmarks;

enum Client {
  OkHttp {
    @Override HttpClient create() {
      return new OkHttp();
    }
  },

  OkHttpAsync {
    @Override HttpClient create() {
      return new OkHttpAsync();
    }
  },

  Apache {
    @Override HttpClient create() {
      return new ApacheHttpClient();
    }
  },

  UrlConnection {
    @Override HttpClient create() {
      return new UrlConnection();
    }
  },

  Netty {
    @Override HttpClient create() {
      return new NettyHttpClient();
    }
  };

  abstract HttpClient create();
}

redpajama_set_name: RedPajamaGithub


text:
{-# LANGUAGE CPP #-}
import Prelude hiding (read)
import Network.HTTP
import Network.Browser hiding (err)
import Network.URI
import qualified Data.ByteString.Lazy as BS
import Data.Version
import Data.Maybe (fromJust)
import Codec.Compression.BZip
import Codec.Archive.Tar
import System.Environment (getArgs)
import System.Exit
import Control.Monad
import Haste.Environment
import Haste.Version
import Control.Shell
import Data.Char (isDigit)
import Control.Monad.IO.Class (liftIO)
import Haste.Args
import System.Console.GetOpt
import GHC.Paths (libdir)
import System.Info (os)
import System.Directory (copyPermissions)
import System.FilePath (takeDirectory)

#if __GLASGOW_HASKELL__ >= 710
ghcMajor = "7.10"
libDir = "ghc-7.10"
primVersion = "0.4.0.0"
#else
ghcMajor = "7.8"
libDir = "ghc-7.8"
primVersion = "0.3.0.0"
#endif

downloadFile :: String -> Shell BS.ByteString
downloadFile f = do
  (_, rsp) <- liftIO $ Network.Browser.browse $ do
    setAllowRedirects True
    request $ Request {
        rqURI = fromJust $ parseURI f,
        rqMethod = GET,
        rqHeaders = [],
        rqBody = BS.empty
      }
  case rspCode rsp of
    (2, _, _) -> return $ rspBody rsp
    _         -> fail $ "Failed to download " ++ f ++ ": " ++ rspReason rsp

data Cfg = Cfg {
    getLibs               :: Bool,
    getClosure            :: Bool,
    useLocalLibs          :: Bool,
    tracePrimops          :: Bool,
    forceBoot             :: Bool,
    initialPortableBoot   :: Bool,
    getHasteCabal         :: Bool,
    verbose               :: Bool
  }

defCfg :: Cfg
#ifdef PORTABLE
defCfg = Cfg {
    getLibs               = False,
    getClosure            = False,
    useLocalLibs          = False,
    tracePrimops          = False,
    forceBoot             = False,
    initialPortableBoot   = False,
    getHasteCabal         = True,
    verbose               = False
  }
#else
defCfg = Cfg {
    getLibs               = True,
    getClosure            = True,
    useLocalLibs          = False,
    tracePrimops          = False,
    forceBoot             = False,
    initialPortableBoot   = False,
    getHasteCabal         = True,
    verbose               = False
  }
#endif

devBoot :: Cfg -> Cfg
devBoot cfg = cfg {
    useLocalLibs          = True,
    forceBoot             = True,
    getClosure            = False,
    getHasteCabal         = False
  }

setInitialPortableBoot :: Cfg -> Cfg
setInitialPortableBoot cfg = cfg {
    getLibs             = True,
    useLocalLibs        = True,
    forceBoot           = True,
    getClosure          = True,
    initialPortableBoot = True,
    getHasteCabal       = True
  }

specs :: [OptDescr (Cfg -> Cfg)]
specs = [
#ifndef PORTABLE
      Option "" ["dev"]
           (NoArg devBoot) $
           "Boot Haste for development. Implies --force " ++
           "--local --no-closure --no-haste-cabal"
    , Option "" ["force"]
#else
      Option "" ["force"]
#endif
           (NoArg $ \cfg -> cfg {forceBoot = True}) $
           "Re-boot Haste even if already properly booted."
    , Option "" ["initial"]
           (NoArg setInitialPortableBoot) $
           "Prepare boot files for binary distribution. Should only ever " ++
           "be called by the release build scripts, never by users.\n" ++
           "Implies --local --force."
#ifndef PORTABLE
    , Option "" ["local"]
           (NoArg $ \cfg -> cfg {useLocalLibs = True}) $
           "Use libraries from source repository rather than " ++
           "downloading a matching set from the Internet. " ++
           "This is nearly always necessary when installing " ++
           "Haste from Git rather than from Hackage. " ++
           "When using --local, your current working directory " ++
           "must be the root of the Haste source tree."
    , Option "" ["no-closure"]
           (NoArg $ \cfg -> cfg {getClosure = False}) $
           "Don't download Closure compiler. You won't be able " ++
           "to use --opt-minify, unless you manually " ++
           "give hastec the path to compiler.jar."
    , Option "" ["no-haste-cabal"]
           (NoArg $ \cfg -> cfg {getHasteCabal = False}) $
           "Don't install haste-cabal. This is probably not " ++
           "what you want."
    , Option "" ["no-libs"]
           (NoArg $ \cfg -> cfg {getLibs = False}) $
           "Don't install any libraries. This is probably not " ++
           "what you want."
    , Option "" ["trace-primops"]
           (NoArg $ \cfg -> cfg {tracePrimops = True}) $
           "Build standard libs for tracing of primitive " ++
           "operations. Only use if you're debugging the code " ++
           "generator."
    , Option "v" ["verbose"]
           (NoArg $ \cfg -> cfg {verbose = True}) $
           "Print absolutely everything."
#endif
  ]

hdr :: String
hdr = "Fetch, build and install all libraries necessary to use Haste.\n"

data CabalOp = Configure | Build | Install | Clean

main :: IO ()
main = do
  args <- getArgs
  case parseArgs specs hdr args of
    Right (mkConfig, _) -> do
      let cfg = mkConfig defCfg
      when (hasteNeedsReboot || forceBoot cfg) $ do
        res <- shell $ if useLocalLibs cfg
                         then bootHaste cfg "."
                         else withTempDirectory "haste" $ bootHaste cfg
        case res of
          Right _  -> return ()
          Left err -> putStrLn err >> exitFailure
    Left halp -> do
      putStrLn halp

bootHaste :: Cfg -> FilePath -> Shell ()
bootHaste cfg tmpdir =
  withEnv "nodosfilewarning" (const "1") . inDirectory tmpdir $ do
    removeBootFile <- isFile bootFile
    when removeBootFile $ rm bootFile
    when (getLibs cfg) $ do
      -- Don't clear dir when it contains binaries; portable should only be built
      -- by scripts anyway, so this dir ought to be clean.
      when (not portableHaste) $ do
        mapM_ clearDir [pkgUserLibDir, jsmodUserDir, pkgUserDir,
                        pkgSysLibDir, jsmodSysDir, pkgSysDir]

      when (getHasteCabal cfg) $ do
        installHasteCabal portableHaste tmpdir

      when (not $ useLocalLibs cfg) $ do
        fetchLibs tmpdir

      when (not portableHaste || initialPortableBoot cfg) $ do
        mkdir True hasteSysDir
        copyGhcSettings hasteSysDir
        void $ run hastePkgBinary ["init", pkgSysDir] ""
        buildLibs cfg

      when (initialPortableBoot cfg) $ do
        mapM_ relocate ["array", "bytestring", "containers", "base",
                        "deepseq", "dlist", "haste-prim", "time", "haste-lib",
                        "monads-tf", "old-locale", "transformers", "integer-gmp"]

    when (getClosure cfg) $ do
      installClosure
    file bootFile (showBootVersion bootVersion)

clearDir :: FilePath -> Shell ()
clearDir dir = do
  exists <- isDirectory dir
  when exists $ rmdir dir

installHasteCabal :: Bool -> FilePath -> Shell ()
installHasteCabal portable tmpdir = do
    echo "Downloading haste-cabal from GitHub"
    f <- decompress `fmap` downloadFile hasteCabalUrl
    if os == "linux"
      then do
        mkdir True hasteCabalRootDir
        liftIO . unpack hasteCabalRootDir $ read f
        liftIO $ copyPermissions
                    hasteBinary
                    (hasteCabalRootDir </> "haste-cabal/haste-cabal.bin")
        file (hasteBinDir </> hasteCabalFile) launcher
      else do
        liftIO $ BS.writeFile (hasteBinDir </> hasteCabalFile) f
    liftIO $ copyPermissions hasteBinary (hasteBinDir </> hasteCabalFile)
  where
    baseUrl = "http://valderman.github.io/haste-libs/"
    hasteCabalUrl
      | os == "linux" = baseUrl ++ "haste-cabal.linux.tar.bz2"
      | otherwise     = baseUrl ++ "haste-cabal" <.> os <.> "bz2"
    hasteCabalFile = "haste-cabal" ++ if os == "mingw32" then ".exe" else ""

    hasteCabalRootDir
      | portable  = hasteBinDir </> ".."
      | otherwise = hasteSysDir

    -- We need to determine the haste-cabal libdir at runtime if we're
    -- portable
    launcher
      | portable = unlines [
            "#!/bin/bash",
            "HASTEC=\"$(dirname $0)/hastec\"",
            "DIR=\"$($HASTEC --print-libdir)/../haste-cabal\"",
            "export LD_LIBRARY_PATH=$DIR",
            "exec $DIR/haste-cabal.bin $@"
          ]
      | otherwise = unlines [
            "#!/bin/bash",
            "DIR=\"" ++ hasteCabalRootDir </> "haste-cabal" ++ "\"",
            "export LD_LIBRARY_PATH=$DIR",
            "exec $DIR/haste-cabal.bin $@"
          ]

-- | Fetch the Haste base libs.
fetchLibs :: FilePath -> Shell ()
fetchLibs tmpdir = do
    echo "Downloading base libs from GitHub"
    file <- downloadFile $ mkUrl hasteVersion
    liftIO . unpack tmpdir . read . decompress $ file
  where
    mkUrl v =
      "http://valderman.github.io/haste-libs/haste-libs-" ++ showVersion v ++ ".tar.bz2"

-- | Fetch and install the Closure compiler.
installClosure :: Shell ()
installClosure = do
    echo "Downloading Google Closure compiler..."
    downloadClosure `orElse` do
      echo "Couldn't install Closure compiler; continuing without."
  where
    downloadClosure = do
      downloadFile closureURI >>= (liftIO . BS.writeFile closureCompiler)
    closureURI =
      "http://valderman.github.io/haste-libs/compiler.jar"

-- | Build haste's base libs.
buildLibs :: Cfg -> Shell ()
buildLibs cfg = do
    -- Set up dirs and copy includes
    mkdir True $ pkgSysLibDir
    cpDir "include" hasteSysDir

    inDirectory ("utils" </> "unlit") $ do
      let out    = if os == "mingw32" then "unlit.exe" else "unlit"
          static = if os == "darwin" then [] else ["-static"]
          dash_s = if os == "darwin" then [] else ["-s"]
      run_ "gcc" (["-o" ++ out, "-O2", "unlit.c"]++static) ""
      run_ "strip" (dash_s ++ [out]) ""
      cp out (hasteSysDir </> out)

    run_ hastePkgBinary ["update", "--global", "libraries" </> "rts.pkg"] ""

    inDirectory "libraries" $ do
      inDirectory libDir $ do
        -- Install ghc-prim
        inDirectory "ghc-prim" $ do
          hasteCabal Install ["--solver", "topdown"]

          -- To get the GHC.Prim module in spite of pretending to have
          -- build-type: Simple
          let osxprim = if os == "darwin" then "-osx" else ""
          run_ hastePkgBinary ["unregister", "--global","ghc-prim"] ""
          run_ hastePkgBinary ["update", "--global",
                               "ghc-prim-"++primVersion++osxprim++".conf"] ""

        -- Install integer-gmp; double install shouldn't be needed anymore.
        inDirectory "integer-gmp" $ do
          hasteCabal Install ["--solver", "topdown"]

        -- Install base
        inDirectory "base" $ do
          hasteCabal Clean []
          hasteCabal Install ["--solver", "topdown", "-finteger-gmp"]

        -- Install array
        inDirectory "array" $ hasteCabal Clean []
        inDirectory "array" $ hasteCabal Install []

      -- Install haste-prim
      inDirectory "haste-prim" $ hasteCabal Install []

      -- Install time
      inDirectory "time" $ hasteCabal Install []

      -- Install haste-lib
      inDirectory "haste-lib" $ hasteCabal Install []

      -- Export monads-tf; it seems to be hidden by default
      run_ hastePkgBinary ["expose", "monads-tf"] ""
  where
    ghcOpts = concat [
        if tracePrimops cfg then ["--hastec-option=-debug"] else [],
        if verbose cfg then ["--verbose"] else []]
    configOpts = [ "--with-hastec=" ++ hasteBinary
                 , "--with-haste-pkg=" ++ hastePkgBinary
                 , "--libdir=" ++ if os == "darwin"
                                    then pkgSysLibDir
                                    else takeDirectory pkgSysLibDir
                 , "--package-db=clear"
                 , "--package-db=global"
#if __GLASGOW_HASKELL__ < 709
                 , "--hastec-option=-DHASTE_HOST_WORD_SIZE_IN_BITS=" ++
                    show hostWordSize
#endif
                 ]
    hasteCabal Configure args =
      withEnv "HASTE_BOOTING" (const "1") $ run_ hasteCabalBinary as ""
      where as = "configure" : args ++ ghcOpts ++ configOpts
    hasteCabal Install args =
      withEnv "HASTE_BOOTING" (const "1") $ run_ hasteCabalBinary as ""
      where as = "install" : args ++ ghcOpts ++ configOpts
    hasteCabal Build args =
      withEnv "HASTE_BOOTING" (const "1") $ run_ hasteCabalBinary as ""
      where as = "build" : args ++ ghcOpts
    hasteCabal Clean args =
      withEnv "HASTE_BOOTING" (const "1") $ run_ hasteCabalBinary as ""
      where as = "clean" : args

    vanillaCabal args = run_ "cabal" args ""

-- | Copy GHC settings and utils into the given directory.
copyGhcSettings :: FilePath -> Shell ()
copyGhcSettings dest = do
  cp (libdir </> "platformConstants") (dest </> "platformConstants")
#ifdef mingw32_HOST_OS
  cp ("settings-ghc-" ++ ghcMajor ++ ".windows") (dest </> "settings")
  cp (libdir </> "touchy.exe") (dest </> "touchy.exe")
#else
  cp (libdir </> "settings") (dest </> "settings")
#endif

relocate :: String -> Shell ()
relocate pkg = run_ hastePkgBinary ["relocate", pkg] ""


text:
{{define "title"}}Upload magnet{{end}}
{{define "content"}}

  {{with .Upload}}

  <form enctype="multipart/form-data" role="upload" method="POST">
    {{ range (index $.FormErrors "errors")}}

× {{ . }}

    {{end}}

      {{call $.T "name"}}
          <input type="text" name="name" id="name" class="form-control" placeholder="{{call $.T "file_name"}}" value="{{.Name}}" autofocus required>

          {{call $.T "torrent_file"}}
          <input type="file" name="torrent" id="torrent" accept=".torrent">

{{call $.T "uploading_file_prefills_fields"}}

          {{call $.T "magnet_link"}}
          <input  type="text" name="magnet" id="magnet" class="form-control"
          style="width:60rem" placeholder="{{call $.T "magnet_link"}}" value="{{.Magnet}}">

          {{call $.T "category"}}
          <select name="c" id="c" class="form-control input-sm" required>
              <option value="">{{call $.T "select_a_torrent_category"}}</option>
              {{ if Sukebei }}
              <option value="1_1" {{if eq .Category "1_1"}}selected{{end}}>{{call $.T "art_anime"}}</option>
              <option value="1_2" {{if eq .Category "1_2"}}selected{{end}}>{{call $.T "art_doujinshi"}}</option>
              <option value="1_3" {{if eq .Category "1_3"}}selected{{end}}>{{call $.T "art_games"}}</option>
              <option value="1_4" {{if eq .Category "1_4"}}selected{{end}}>{{call $.T "art_manga"}}</option>
              <option value="1_5" {{if eq .Category "1_5"}}selected{{end}}>{{call $.T "art_pictures"}}</option>
              <option value="2_1" {{if eq .Category "2_1"}}selected{{end}}>{{call $.T "real_life_photobooks_and_Pictures"}}</option>
              <option value="2_2" {{if eq .Category "2_2"}}selected{{end}}>{{call $.T "real_life_videos"}}</option>
              {{ else }}
              <option value="3_12" {{if eq .Category "3_12"}}selected{{end}}>{{call $.T "anime_amv"}}</option>
              <option value="3_5" {{if eq .Category "3_5"}}selected{{end}}>{{call $.T "anime_english_translated"}}</option>
              <option value="3_13" {{if eq .Category "3_13"}}selected{{end}}>{{call $.T "anime_non_english_translated"}}</option>
              <option value="3_6" {{if eq .Category "3_6"}}selected{{end}}>{{call $.T "anime_raw"}}</option>
              <option value="2_3" {{if eq .Category "2_3"}}selected{{end}}>{{call $.T "audio_lossless"}}</option>
              <option value="2_4" {{if eq .Category "2_4"}}selected{{end}}>{{call $.T "audio_lossy"}}</option>
              <option value="4_7" {{if eq .Category "4_7"}}selected{{end}}>{{call $.T "literature_english_translated"}}</option>
              <option value="4_8" {{if eq .Category "4_8"}}selected{{end}}>{{call $.T "literature_raw"}}</option>
              <option value="4_14" {{if eq .Category "4_14"}}selected{{end}}>{{call $.T "literature_non_english_translated"}}</option>
              <option value="5_9" {{if eq .Category "5_9"}}selected{{end}}>{{call $.T "live_action_english_translated"}}</option>
              <option value="5_10" {{if eq .Category "5_10"}}selected{{end}}>{{call $.T "live_action_idol_pv"}}</option>
              <option value="5_18" {{if eq .Category "5_18"}}selected{{end}}>{{call $.T "live_action_non_english_translated"}}</option>
              <option value="5_11" {{if eq .Category "5_11"}}selected{{end}}>{{call $.T "live_action_raw"}}</option>
              <option value="6_15" {{if eq .Category "6_15"}}selected{{end}}>{{call $.T "pictures_graphics"}}</option>
              <option value="6_16" {{if eq .Category "6_16"}}selected{{end}}>{{call $.T "pictures_photos"}}</option>
              <option value="1_1" {{if eq .Category "1_1"}}selected{{end}}>{{call $.T "software_applications"}}</option>
              <option value="1_2" {{if eq .Category "1_2"}}selected{{end}}>{{call $.T "software_games"}}</option>
              {{ end }}
          </select>

{{ call $.T "please_include_our_tracker" }}

      	  <input type="checkbox" name="remake" id="remake" >
          {{call $.T "mark_as_remake"}}

        {{call $.T "website_link"}}
        <input name="website_link" id="website_link" class="form-control" type="text" value="{{.WebsiteLink}}">

          {{call $.T "torrent_description"}}

{{call $.T "description_markdown_notice"}}

          <textarea name="desc" id="desc" class="form-control torrent-desc" rows="15">{{.Description}}</textarea>

	  {{block "captcha" (makeCaptchaData .CaptchaID $.T)}}{{end}}

      <button type="submit" class="btn btn-success">{{call $.T "upload"}}</button>

  </form>
  {{end}}

{{end}}
{{define "js_footer"}}

{{end}}


text:
<?php

declare(strict_types=1);

namespace Doctrine\Migrations\Configuration\Exception;

use LogicException;
use function sprintf;
use function var_export;

final class UnknownConfigurationValue extends LogicException implements ConfigurationException
{
    /**
     * @param mixed $value
     */
    public static function new(string $key, $value) : self
    {
        return new self(
            sprintf(
                'Unknown %s for configuration "%s".',
                var_export($value, true),
                $key
            ),
            10
        );
    }
}


text:
package org.docksidestage.install.dbflute.bsentity;

import java.util.List;
import java.util.ArrayList;

import org.dbflute.Entity;
import org.dbflute.dbmeta.DBMeta;
import org.dbflute.dbmeta.AbstractEntity;
import org.dbflute.dbmeta.accessory.DomainEntity;
import org.dbflute.optional.OptionalEntity;
import org.docksidestage.install.dbflute.allcommon.DBMetaInstanceHandler;
import org.docksidestage.install.dbflute.exentity.*;

/**
 * The entity of MEMBER as TABLE.

 *

 * [primary-key]
 *     MEMBER_ID
 *
 * [column]
 *     MEMBER_ID, MEMBER_NAME, MEMBER_ACCOUNT, MEMBER_STATUS_CODE, FORMALIZED_DATETIME, BIRTHDATE, REGISTER_DATETIME, REGISTER_USER, UPDATE_DATETIME, UPDATE_USER, VERSION_NO
 *
 * [sequence]
 *
 *
 * [identity]
 *     MEMBER_ID
 *
 * [version-no]
 *     VERSION_NO
 *
 * [foreign table]
 *     MEMBER_STATUS, MEMBER_SECURITY(AsOne), MEMBER_SERVICE(AsOne), MEMBER_WITHDRAWAL(AsOne)
 *
 * [referrer table]
 *     MEMBER_ADDRESS, MEMBER_FOLLOWING, MEMBER_LOGIN, PURCHASE, MEMBER_SECURITY, MEMBER_SERVICE, MEMBER_WITHDRAWAL
 *
 * [foreign property]
 *     memberStatus, memberSecurityAsOne, memberServiceAsOne, memberWithdrawalAsOne
 *
 * [referrer property]
 *     memberAddressList, memberFollowingByMyMemberIdList, memberFollowingByYourMemberIdList, memberLoginList, purchaseList
 *
 * [get/set template]
 * /= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
 * Integer memberId = entity.getMemberId();
 * String memberName = entity.getMemberName();
 * String memberAccount = entity.getMemberAccount();
 * String memberStatusCode = entity.getMemberStatusCode();
 * java.time.LocalDateTime formalizedDatetime = entity.getFormalizedDatetime();
 * java.time.LocalDate birthdate = entity.getBirthdate();
 * java.time.LocalDateTime registerDatetime = entity.getRegisterDatetime();
 * String registerUser = entity.getRegisterUser();
 * java.time.LocalDateTime updateDatetime = entity.getUpdateDatetime();
 * String updateUser = entity.getUpdateUser();
 * Long versionNo = entity.getVersionNo();
 * entity.setMemberId(memberId);
 * entity.setMemberName(memberName);
 * entity.setMemberAccount(memberAccount);
 * entity.setMemberStatusCode(memberStatusCode);
 * entity.setFormalizedDatetime(formalizedDatetime);
 * entity.setBirthdate(birthdate);
 * entity.setRegisterDatetime(registerDatetime);
 * entity.setRegisterUser(registerUser);
 * entity.setUpdateDatetime(updateDatetime);
 * entity.setUpdateUser(updateUser);
 * entity.setVersionNo(versionNo);
 * = = = = = = = = = =/
 *

 * @author DBFlute(AutoGenerator)
 */
public abstract class BsMember extends AbstractEntity implements DomainEntity {

    // ===================================================================================
    //                                                                          Definition
    //                                                                          ==========
    /** The serial version UID for object serialization. (Default) */
    private static final long serialVersionUID = 1L;

    // ===================================================================================
    //                                                                           Attribute
    //                                                                           =========
    /** MEMBER_ID: {PK, ID, NotNull, INTEGER(10)} */
    protected Integer _memberId;

    /** MEMBER_NAME: {IX, NotNull, VARCHAR(200)} */
    protected String _memberName;

    /** MEMBER_ACCOUNT: {UQ, NotNull, VARCHAR(50)} */
    protected String _memberAccount;

    /** MEMBER_STATUS_CODE: {IX, NotNull, CHAR(3), FK to MEMBER_STATUS} */
    protected String _memberStatusCode;

    /** FORMALIZED_DATETIME: {IX, TIMESTAMP(23, 10)} */
    protected java.time.LocalDateTime _formalizedDatetime;

    /** BIRTHDATE: {DATE(8)} */
    protected java.time.LocalDate _birthdate;

    /** REGISTER_DATETIME: {NotNull, TIMESTAMP(23, 10)} */
    protected java.time.LocalDateTime _registerDatetime;

    /** REGISTER_USER: {NotNull, VARCHAR(200)} */
    protected String _registerUser;

    /** UPDATE_DATETIME: {NotNull, TIMESTAMP(23, 10)} */
    protected java.time.LocalDateTime _updateDatetime;

    /** UPDATE_USER: {NotNull, VARCHAR(200)} */
    protected String _updateUser;

    /** VERSION_NO: {NotNull, BIGINT(19)} */
    protected Long _versionNo;

    // ===================================================================================
    //                                                                             DB Meta
    //                                                                             =======
    /** {@inheritDoc} */
    public DBMeta asDBMeta() {
        return DBMetaInstanceHandler.findDBMeta(asTableDbName());
    }

    /** {@inheritDoc} */
    public String asTableDbName() {
        return "MEMBER";
    }

    // ===================================================================================
    //                                                                         Primary Key
    //                                                                         ===========
    /** {@inheritDoc} */
    public boolean hasPrimaryKeyValue() {
        if (_memberId == null) { return false; }
        return true;
    }

    /**
     * To be unique by the unique column.

     * You can update the entity by the key when entity update (NOT batch update).
     * @param memberAccount : UQ, NotNull, VARCHAR(50). (NotNull)
     */
    public void uniqueBy(String memberAccount) {
        __uniqueDrivenProperties.clear();
        __uniqueDrivenProperties.addPropertyName("memberAccount");
        setMemberAccount(memberAccount);
    }

    // ===================================================================================
    //                                                                    Foreign Property
    //                                                                    ================
    /** MEMBER_STATUS by my MEMBER_STATUS_CODE, named 'memberStatus'. */
    protected OptionalEntity<MemberStatus> _memberStatus;

    /**
     * [get] MEMBER_STATUS by my MEMBER_STATUS_CODE, named 'memberStatus'.

     * Optional: alwaysPresent(), ifPresent().orElse(), get(), ...
     * @return The entity of foreign property 'memberStatus'. (NotNull, EmptyAllowed: when e.g. null FK column, no setupSelect)
     */
    public OptionalEntity<MemberStatus> getMemberStatus() {
        if (_memberStatus == null) { _memberStatus = OptionalEntity.relationEmpty(this, "memberStatus"); }
        return _memberStatus;
    }

    /**
     * [set] MEMBER_STATUS by my MEMBER_STATUS_CODE, named 'memberStatus'.
     * @param memberStatus The entity of foreign property 'memberStatus'. (NullAllowed)
     */
    public void setMemberStatus(OptionalEntity<MemberStatus> memberStatus) {
        _memberStatus = memberStatus;
    }

    /** MEMBER_SECURITY by MEMBER_ID, named 'memberSecurityAsOne'. */
    protected OptionalEntity<MemberSecurity> _memberSecurityAsOne;

    /**
     * [get] MEMBER_SECURITY by MEMBER_ID, named 'memberSecurityAsOne'.
     * Optional: alwaysPresent(), ifPresent().orElse(), get(), ...
     * @return the entity of foreign property(referrer-as-one) 'memberSecurityAsOne'. (NotNull, EmptyAllowed: when e.g. no data, no setupSelect)
     */
    public OptionalEntity<MemberSecurity> getMemberSecurityAsOne() {
        if (_memberSecurityAsOne == null) { _memberSecurityAsOne = OptionalEntity.relationEmpty(this, "memberSecurityAsOne"); }
        return _memberSecurityAsOne;
    }

    /**
     * [set] MEMBER_SECURITY by MEMBER_ID, named 'memberSecurityAsOne'.
     * @param memberSecurityAsOne The entity of foreign property(referrer-as-one) 'memberSecurityAsOne'. (NullAllowed)
     */
    public void setMemberSecurityAsOne(OptionalEntity<MemberSecurity> memberSecurityAsOne) {
        _memberSecurityAsOne = memberSecurityAsOne;
    }

    /** MEMBER_SERVICE by MEMBER_ID, named 'memberServiceAsOne'. */
    protected OptionalEntity<MemberService> _memberServiceAsOne;

    /**
     * [get] MEMBER_SERVICE by MEMBER_ID, named 'memberServiceAsOne'.
     * Optional: alwaysPresent(), ifPresent().orElse(), get(), ...
     * @return the entity of foreign property(referrer-as-one) 'memberServiceAsOne'. (NotNull, EmptyAllowed: when e.g. no data, no setupSelect)
     */
    public OptionalEntity<MemberService> getMemberServiceAsOne() {
        if (_memberServiceAsOne == null) { _memberServiceAsOne = OptionalEntity.relationEmpty(this, "memberServiceAsOne"); }
        return _memberServiceAsOne;
    }

    /**
     * [set] MEMBER_SERVICE by MEMBER_ID, named 'memberServiceAsOne'.
     * @param memberServiceAsOne The entity of foreign property(referrer-as-one) 'memberServiceAsOne'. (NullAllowed)
     */
    public void setMemberServiceAsOne(OptionalEntity<MemberService> memberServiceAsOne) {
        _memberServiceAsOne = memberServiceAsOne;
    }

    /** MEMBER_WITHDRAWAL by MEMBER_ID, named 'memberWithdrawalAsOne'. */
    protected OptionalEntity<MemberWithdrawal> _memberWithdrawalAsOne;

    /**
     * [get] MEMBER_WITHDRAWAL by MEMBER_ID, named 'memberWithdrawalAsOne'.
     * Optional: alwaysPresent(), ifPresent().orElse(), get(), ...
     * @return the entity of foreign property(referrer-as-one) 'memberWithdrawalAsOne'. (NotNull, EmptyAllowed: when e.g. no data, no setupSelect)
     */
    public OptionalEntity<MemberWithdrawal> getMemberWithdrawalAsOne() {
        if (_memberWithdrawalAsOne == null) { _memberWithdrawalAsOne = OptionalEntity.relationEmpty(this, "memberWithdrawalAsOne"); }
        return _memberWithdrawalAsOne;
    }

    /**
     * [set] MEMBER_WITHDRAWAL by MEMBER_ID, named 'memberWithdrawalAsOne'.
     * @param memberWithdrawalAsOne The entity of foreign property(referrer-as-one) 'memberWithdrawalAsOne'. (NullAllowed)
     */
    public void setMemberWithdrawalAsOne(OptionalEntity<MemberWithdrawal> memberWithdrawalAsOne) {
        _memberWithdrawalAsOne = memberWithdrawalAsOne;
    }

    // ===================================================================================
    //                                                                   Referrer Property
    //                                                                   =================
    /** MEMBER_ADDRESS by MEMBER_ID, named 'memberAddressList'. */
    protected List<MemberAddress> _memberAddressList;

    /**
     * [get] MEMBER_ADDRESS by MEMBER_ID, named 'memberAddressList'.
     * @return The entity list of referrer property 'memberAddressList'. (NotNull: even if no loading, returns empty list)
     */
    public List<MemberAddress> getMemberAddressList() {
        if (_memberAddressList == null) { _memberAddressList = newReferrerList(); }
        return _memberAddressList;
    }

    /**
     * [set] MEMBER_ADDRESS by MEMBER_ID, named 'memberAddressList'.
     * @param memberAddressList The entity list of referrer property 'memberAddressList'. (NullAllowed)
     */
    public void setMemberAddressList(List<MemberAddress> memberAddressList) {
        _memberAddressList = memberAddressList;
    }

    /** MEMBER_FOLLOWING by MY_MEMBER_ID, named 'memberFollowingByMyMemberIdList'. */
    protected List<MemberFollowing> _memberFollowingByMyMemberIdList;

    /**
     * [get] MEMBER_FOLLOWING by MY_MEMBER_ID, named 'memberFollowingByMyMemberIdList'.
     * @return The entity list of referrer property 'memberFollowingByMyMemberIdList'. (NotNull: even if no loading, returns empty list)
     */
    public List<MemberFollowing> getMemberFollowingByMyMemberIdList() {
        if (_memberFollowingByMyMemberIdList == null) { _memberFollowingByMyMemberIdList = newReferrerList(); }
        return _memberFollowingByMyMemberIdList;
    }

    /**
     * [set] MEMBER_FOLLOWING by MY_MEMBER_ID, named 'memberFollowingByMyMemberIdList'.
     * @param memberFollowingByMyMemberIdList The entity list of referrer property 'memberFollowingByMyMemberIdList'. (NullAllowed)
     */
    public void setMemberFollowingByMyMemberIdList(List<MemberFollowing> memberFollowingByMyMemberIdList) {
        _memberFollowingByMyMemberIdList = memberFollowingByMyMemberIdList;
    }

    /** MEMBER_FOLLOWING by YOUR_MEMBER_ID, named 'memberFollowingByYourMemberIdList'. */
    protected List<MemberFollowing> _memberFollowingByYourMemberIdList;

    /**
     * [get] MEMBER_FOLLOWING by YOUR_MEMBER_ID, named 'memberFollowingByYourMemberIdList'.
     * @return The entity list of referrer property 'memberFollowingByYourMemberIdList'. (NotNull: even if no loading, returns empty list)
     */
    public List<MemberFollowing> getMemberFollowingByYourMemberIdList() {
        if (_memberFollowingByYourMemberIdList == null) { _memberFollowingByYourMemberIdList = newReferrerList(); }
        return _memberFollowingByYourMemberIdList;
    }

    /**
     * [set] MEMBER_FOLLOWING by YOUR_MEMBER_ID, named 'memberFollowingByYourMemberIdList'.
     * @param memberFollowingByYourMemberIdList The entity list of referrer property 'memberFollowingByYourMemberIdList'. (NullAllowed)
     */
    public void setMemberFollowingByYourMemberIdList(List<MemberFollowing> memberFollowingByYourMemberIdList) {
        _memberFollowingByYourMemberIdList = memberFollowingByYourMemberIdList;
    }

    /** MEMBER_LOGIN by MEMBER_ID, named 'memberLoginList'. */
    protected List<MemberLogin> _memberLoginList;

    /**
     * [get] MEMBER_LOGIN by MEMBER_ID, named 'memberLoginList'.
     * @return The entity list of referrer property 'memberLoginList'. (NotNull: even if no loading, returns empty list)
     */
    public List<MemberLogin> getMemberLoginList() {
        if (_memberLoginList == null) { _memberLoginList = newReferrerList(); }
        return _memberLoginList;
    }

    /**
     * [set] MEMBER_LOGIN by MEMBER_ID, named 'memberLoginList'.
     * @param memberLoginList The entity list of referrer property 'memberLoginList'. (NullAllowed)
     */
    public void setMemberLoginList(List<MemberLogin> memberLoginList) {
        _memberLoginList = memberLoginList;
    }

    /** PURCHASE by MEMBER_ID, named 'purchaseList'. */
    protected List<Purchase> _purchaseList;

    /**
     * [get] PURCHASE by MEMBER_ID, named 'purchaseList'.
     * @return The entity list of referrer property 'purchaseList'. (NotNull: even if no loading, returns empty list)
     */
    public List<Purchase> getPurchaseList() {
        if (_purchaseList == null) { _purchaseList = newReferrerList(); }
        return _purchaseList;
    }

    /**
     * [set] PURCHASE by MEMBER_ID, named 'purchaseList'.
     * @param purchaseList The entity list of referrer property 'purchaseList'. (NullAllowed)
     */
    public void setPurchaseList(List<Purchase> purchaseList) {
        _purchaseList = purchaseList;
    }

    protected <ELEMENT> List<ELEMENT> newReferrerList() {
        return new ArrayList<ELEMENT>();
    }

    // ===================================================================================
    //                                                                      Basic Override
    //                                                                      ==============
    @Override
    protected boolean doEquals(Object obj) {
        if (obj instanceof BsMember) {
            BsMember other = (BsMember)obj;
            if (!xSV(_memberId, other._memberId)) { return false; }
            return true;
        } else {
            return false;
        }
    }

    @Override
    protected int doHashCode(int initial) {
        int hs = initial;
        hs = xCH(hs, asTableDbName());
        hs = xCH(hs, _memberId);
        return hs;
    }

    @Override
    protected String doBuildStringWithRelation(String li) {
        StringBuilder sb = new StringBuilder();
        if (_memberStatus != null && _memberStatus.isPresent())
        { sb.append(li).append(xbRDS(_memberStatus, "memberStatus")); }
        if (_memberSecurityAsOne != null && _memberSecurityAsOne.isPresent())
        { sb.append(li).append(xbRDS(_memberSecurityAsOne, "memberSecurityAsOne")); }
        if (_memberServiceAsOne != null && _memberServiceAsOne.isPresent())
        { sb.append(li).append(xbRDS(_memberServiceAsOne, "memberServiceAsOne")); }
        if (_memberWithdrawalAsOne != null && _memberWithdrawalAsOne.isPresent())
        { sb.append(li).append(xbRDS(_memberWithdrawalAsOne, "memberWithdrawalAsOne")); }
        if (_memberAddressList != null) { for (MemberAddress et : _memberAddressList)
        { if (et != null) { sb.append(li).append(xbRDS(et, "memberAddressList")); } } }
        if (_memberFollowingByMyMemberIdList != null) { for (MemberFollowing et : _memberFollowingByMyMemberIdList)
        { if (et != null) { sb.append(li).append(xbRDS(et, "memberFollowingByMyMemberIdList")); } } }
        if (_memberFollowingByYourMemberIdList != null) { for (MemberFollowing et : _memberFollowingByYourMemberIdList)
        { if (et != null) { sb.append(li).append(xbRDS(et, "memberFollowingByYourMemberIdList")); } } }
        if (_memberLoginList != null) { for (MemberLogin et : _memberLoginList)
        { if (et != null) { sb.append(li).append(xbRDS(et, "memberLoginList")); } } }
        if (_purchaseList != null) { for (Purchase et : _purchaseList)
        { if (et != null) { sb.append(li).append(xbRDS(et, "purchaseList")); } } }
        return sb.toString();
    }
    protected <ET extends Entity> String xbRDS(org.dbflute.optional.OptionalEntity<ET> et, String name) { // buildRelationDisplayString()
        return et.get().buildDisplayString(name, true, true);
    }

    @Override
    protected String doBuildColumnString(String dm) {
        StringBuilder sb = new StringBuilder();
        sb.append(dm).append(xfND(_memberId));
        sb.append(dm).append(xfND(_memberName));
        sb.append(dm).append(xfND(_memberAccount));
        sb.append(dm).append(xfND(_memberStatusCode));
        sb.append(dm).append(xfND(_formalizedDatetime));
        sb.append(dm).append(xfND(_birthdate));
        sb.append(dm).append(xfND(_registerDatetime));
        sb.append(dm).append(xfND(_registerUser));
        sb.append(dm).append(xfND(_updateDatetime));
        sb.append(dm).append(xfND(_updateUser));
        sb.append(dm).append(xfND(_versionNo));
        if (sb.length() > dm.length()) {
            sb.delete(0, dm.length());
        }
        sb.insert(0, "{").append("}");
        return sb.toString();
    }

    @Override
    protected String doBuildRelationString(String dm) {
        StringBuilder sb = new StringBuilder();
        if (_memberStatus != null && _memberStatus.isPresent())
        { sb.append(dm).append("memberStatus"); }
        if (_memberSecurityAsOne != null && _memberSecurityAsOne.isPresent())
        { sb.append(dm).append("memberSecurityAsOne"); }
        if (_memberServiceAsOne != null && _memberServiceAsOne.isPresent())
        { sb.append(dm).append("memberServiceAsOne"); }
        if (_memberWithdrawalAsOne != null && _memberWithdrawalAsOne.isPresent())
        { sb.append(dm).append("memberWithdrawalAsOne"); }
        if (_memberAddressList != null && !_memberAddressList.isEmpty())
        { sb.append(dm).append("memberAddressList"); }
        if (_memberFollowingByMyMemberIdList != null && !_memberFollowingByMyMemberIdList.isEmpty())
        { sb.append(dm).append("memberFollowingByMyMemberIdList"); }
        if (_memberFollowingByYourMemberIdList != null && !_memberFollowingByYourMemberIdList.isEmpty())
        { sb.append(dm).append("memberFollowingByYourMemberIdList"); }
        if (_memberLoginList != null && !_memberLoginList.isEmpty())
        { sb.append(dm).append("memberLoginList"); }
        if (_purchaseList != null && !_purchaseList.isEmpty())
        { sb.append(dm).append("purchaseList"); }
        if (sb.length() > dm.length()) {
            sb.delete(0, dm.length()).insert(0, "(").append(")");
        }
        return sb.toString();
    }

    @Override
    public Member clone() {
        return (Member)super.clone();
    }

    // ===================================================================================
    //                                                                            Accessor
    //                                                                            ========
    /**
     * [get] MEMBER_ID: {PK, ID, NotNull, INTEGER(10)}

     * @return The value of the column 'MEMBER_ID'. (basically NotNull if selected: for the constraint)
     */
    public Integer getMemberId() {
        checkSpecifiedProperty("memberId");
        return _memberId;
    }

    /**
     * [set] MEMBER_ID: {PK, ID, NotNull, INTEGER(10)}

     * @param memberId The value of the column 'MEMBER_ID'. (basically NotNull if update: for the constraint)
     */
    public void setMemberId(Integer memberId) {
        registerModifiedProperty("memberId");
        _memberId = memberId;
    }

    /**
     * [get] MEMBER_NAME: {IX, NotNull, VARCHAR(200)}

     * @return The value of the column 'MEMBER_NAME'. (basically NotNull if selected: for the constraint)
     */
    public String getMemberName() {
        checkSpecifiedProperty("memberName");
        return _memberName;
    }

    /**
     * [set] MEMBER_NAME: {IX, NotNull, VARCHAR(200)}

     * @param memberName The value of the column 'MEMBER_NAME'. (basically NotNull if update: for the constraint)
     */
    public void setMemberName(String memberName) {
        registerModifiedProperty("memberName");
        _memberName = memberName;
    }

    /**
     * [get] MEMBER_ACCOUNT: {UQ, NotNull, VARCHAR(50)}

     * @return The value of the column 'MEMBER_ACCOUNT'. (basically NotNull if selected: for the constraint)
     */
    public String getMemberAccount() {
        checkSpecifiedProperty("memberAccount");
        return _memberAccount;
    }

    /**
     * [set] MEMBER_ACCOUNT: {UQ, NotNull, VARCHAR(50)}

     * @param memberAccount The value of the column 'MEMBER_ACCOUNT'. (basically NotNull if update: for the constraint)
     */
    public void setMemberAccount(String memberAccount) {
        registerModifiedProperty("memberAccount");
        _memberAccount = memberAccount;
    }

    /**
     * [get] MEMBER_STATUS_CODE: {IX, NotNull, CHAR(3), FK to MEMBER_STATUS}

     * @return The value of the column 'MEMBER_STATUS_CODE'. (basically NotNull if selected: for the constraint)
     */
    public String getMemberStatusCode() {
        checkSpecifiedProperty("memberStatusCode");
        return _memberStatusCode;
    }

    /**
     * [set] MEMBER_STATUS_CODE: {IX, NotNull, CHAR(3), FK to MEMBER_STATUS}

     * @param memberStatusCode The value of the column 'MEMBER_STATUS_CODE'. (basically NotNull if update: for the constraint)
     */
    public void setMemberStatusCode(String memberStatusCode) {
        registerModifiedProperty("memberStatusCode");
        _memberStatusCode = memberStatusCode;
    }

    /**
     * [get] FORMALIZED_DATETIME: {IX, TIMESTAMP(23, 10)}

     * @return The value of the column 'FORMALIZED_DATETIME'. (NullAllowed even if selected: for no constraint)
     */
    public java.time.LocalDateTime getFormalizedDatetime() {
        checkSpecifiedProperty("formalizedDatetime");
        return _formalizedDatetime;
    }

    /**
     * [set] FORMALIZED_DATETIME: {IX, TIMESTAMP(23, 10)}

     * @param formalizedDatetime The value of the column 'FORMALIZED_DATETIME'. (NullAllowed: null update allowed for no constraint)
     */
    public void setFormalizedDatetime(java.time.LocalDateTime formalizedDatetime) {
        registerModifiedProperty("formalizedDatetime");
        _formalizedDatetime = formalizedDatetime;
    }

    /**
     * [get] BIRTHDATE: {DATE(8)}

     * @return The value of the column 'BIRTHDATE'. (NullAllowed even if selected: for no constraint)
     */
    public java.time.LocalDate getBirthdate() {
        checkSpecifiedProperty("birthdate");
        return _birthdate;
    }

    /**
     * [set] BIRTHDATE: {DATE(8)}

     * @param birthdate The value of the column 'BIRTHDATE'. (NullAllowed: null update allowed for no constraint)
     */
    public void setBirthdate(java.time.LocalDate birthdate) {
        registerModifiedProperty("birthdate");
        _birthdate = birthdate;
    }

    /**
     * [get] REGISTER_DATETIME: {NotNull, TIMESTAMP(23, 10)}

     * @return The value of the column 'REGISTER_DATETIME'. (basically NotNull if selected: for the constraint)
     */
    public java.time.LocalDateTime getRegisterDatetime() {
        checkSpecifiedProperty("registerDatetime");
        return _registerDatetime;
    }

    /**
     * [set] REGISTER_DATETIME: {NotNull, TIMESTAMP(23, 10)}

     * @param registerDatetime The value of the column 'REGISTER_DATETIME'. (basically NotNull if update: for the constraint)
     */
    public void setRegisterDatetime(java.time.LocalDateTime registerDatetime) {
        registerModifiedProperty("registerDatetime");
        _registerDatetime = registerDatetime;
    }

    /**
     * [get] REGISTER_USER: {NotNull, VARCHAR(200)}

     * @return The value of the column 'REGISTER_USER'. (basically NotNull if selected: for the constraint)
     */
    public String getRegisterUser() {
        checkSpecifiedProperty("registerUser");
        return _registerUser;
    }

    /**
     * [set] REGISTER_USER: {NotNull, VARCHAR(200)}

     * @param registerUser The value of the column 'REGISTER_USER'. (basically NotNull if update: for the constraint)
     */
    public void setRegisterUser(String registerUser) {
        registerModifiedProperty("registerUser");
        _registerUser = registerUser;
    }

    /**
     * [get] UPDATE_DATETIME: {NotNull, TIMESTAMP(23, 10)}

     * @return The value of the column 'UPDATE_DATETIME'. (basically NotNull if selected: for the constraint)
     */
    public java.time.LocalDateTime getUpdateDatetime() {
        checkSpecifiedProperty("updateDatetime");
        return _updateDatetime;
    }

    /**
     * [set] UPDATE_DATETIME: {NotNull, TIMESTAMP(23, 10)}

     * @param updateDatetime The value of the column 'UPDATE_DATETIME'. (basically NotNull if update: for the constraint)
     */
    public void setUpdateDatetime(java.time.LocalDateTime updateDatetime) {
        registerModifiedProperty("updateDatetime");
        _updateDatetime = updateDatetime;
    }

    /**
     * [get] UPDATE_USER: {NotNull, VARCHAR(200)}

     * @return The value of the column 'UPDATE_USER'. (basically NotNull if selected: for the constraint)
     */
    public String getUpdateUser() {
        checkSpecifiedProperty("updateUser");
        return _updateUser;
    }

    /**
     * [set] UPDATE_USER: {NotNull, VARCHAR(200)}

     * @param updateUser The value of the column 'UPDATE_USER'. (basically NotNull if update: for the constraint)
     */
    public void setUpdateUser(String updateUser) {
        registerModifiedProperty("updateUser");
        _updateUser = updateUser;
    }

    /**
     * [get] VERSION_NO: {NotNull, BIGINT(19)}

     * @return The value of the column 'VERSION_NO'. (basically NotNull if selected: for the constraint)
     */
    public Long getVersionNo() {
        checkSpecifiedProperty("versionNo");
        return _versionNo;
    }

    /**
     * [set] VERSION_NO: {NotNull, BIGINT(19)}

     * @param versionNo The value of the column 'VERSION_NO'. (basically NotNull if update: for the constraint)
     */
    public void setVersionNo(Long versionNo) {
        registerModifiedProperty("versionNo");
        _versionNo = versionNo;
    }
}


text:
<?php

namespace DDiff\Database\Schema;

use DDiff\Exception\DatabaseException;
use DDiff\Exception\NotFountException;

/**
 * Interface TableCollectionInterface
 * @package DDiff\Database\Schema
 */
interface TableCollectionInterface extends \IteratorAggregate
{
    /**
     * @param string $name
     * @return bool
     */
    public function hasTable(string $name) : bool;

    /**
     * @param string $name
     * @throws NotFountException
     * @throws DatabaseException
     * @return TableInterface
     */
    public function getTable(string $name) : TableInterface;

    /**
     * @return TableInterface[]
     */
    public function getTables() : array;
}


text:
layout: icon
title: Circle stroked
categories: shapes
icon-24: circle-stroked-24.png
icon-18: circle-stroked-18.png
icon-12: circle-stroked-12.png
tags:
  - circle
  - disc
  - shape
  - shapes
  - geometric
  - stroke
  - round
---


text:
<?xml version="1.0" encoding="UTF-8"?>
<CustomFieldTranslation xmlns="http://soap.sforce.com/2006/04/metadata">
    <help><!-- The letter grade the student earned for this course. For example, "A+" or any other text value. --></help>
    <label><!-- Letter Grade --></label>
    <name>Letter_Grade__c</name>
</CustomFieldTranslation>


text:
<?php

namespace Permiso\GestionBundle\Entity;

use Symfony\Component\Security\Core\User\UserInterface;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;

/**
 * Example taken from the manual.
 * @ORM\Entity(repositoryClass="Permiso\GestionBundle\Repositorios\EmpleadoRepository")
 * Define Class Table Inheritance as the mapping strategy for this whole hierarchy:
 * @ORM\InheritanceType("JOINED")
 * Define the discriminator column:
 * @ORM\DiscriminatorColumn(name="discriminador", type="string")
 * Define a map of keys and values (class names):
 * @ORM\DiscriminatorMap({"empleado" = "Empleado", "gestor" = "Gestor"})
 */
class Empleado implements UserInterface
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @ORM\Column(name="username", type="string")
     * @Assert\NotBlank(message = "Necesita introducir un nombre de usuario")
     *
     */
    protected $username;

    /**
     * @ORM\Column(name="password", type="string")
     * @Assert\NotBlank(message = "Necesita introducir una contraseña")
     */
    protected $password;

    /**
     * @ORM\Column(name="salt", type="string", nullable=TRUE)
     */
    protected $salt;

    /**
     * @ORM\Column(name="email", type="string")
     */
    protected $email;

    /**
     * @ORM\ManyToOne(targetEntity="Categoria")
     * @ORM\JoinColumn(name="categoria_id", referencedColumnName="id")
     * @return integer
     */
    protected $categoria;

    /**
     * @ORM\ManyToOne(targetEntity="Gestor")
     * @ORM\JoinColumn(name="gestor_id", referencedColumnName="id", nullable=TRUE)
     * @return integer
     */
    protected $gestor;

    /**
     * Get id
     *
     * @return integer
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set username
     *
     * @param string $username
     * @return Empleado
     */
    public function setUsername($username)
    {
        $this->username = $username;

        return $this;
    }

    /**
     * Get username
     *
     * @return string
     */
    public function getUsername()
    {
        return $this->username;
    }

    /**
     * Set password
     *
     * @param string $password
     * @return Empleado
     */
    public function setPassword($password)
    {
        $this->password = $password;

        return $this;
    }

    /**
     * Get password
     *
     * @return string
     */
    public function getPassword()
    {
        return $this->password;
    }

    /**
     * Set salt
     *
     * @param string $salt
     * @return Empleado
     */
    public function setSalt($salt)
    {
        $this->salt = $salt;

        return $this;
    }

    /**
     * Get salt
     *
     * @return string
     */
    public function getSalt()
    {
        return $this->salt;
    }

    /**
     * Set email
     *
     * @param string $email
     * @return Empleado
     */
    public function setEmail($email)
    {
        $this->email = $email;

        return $this;
    }

    /**
     * Get email
     *
     * @return string
     */
    public function getEmail()
    {
        return $this->email;
    }

    /**
     * Set categoria
     *
     * @param Permiso\GestionBundle\Entity\Categoria $categoria
     * @return Empleado
     */
    public function setCategoria(\Permiso\GestionBundle\Entity\Categoria $categoria = null)
    {
        $this->categoria = $categoria;

        return $this;
    }

    /**
     * Get categoria
     *
     * @return Permiso\GestionBundle\Entity\Categoria
     */
    public function getCategoria()
    {
        return $this->categoria;
    }

    /**
     * Set gestor
     *
     * @param Permiso\GestionBundle\Entity\Gestor $gestor
     * @return Empleado
     */
    public function setGestor(\Permiso\GestionBundle\Entity\Gestor $gestor = null)
    {
        $this->gestor = $gestor;

        return $this;
    }

    /**
     * Get gestor
     *
     * @return Permiso\GestionBundle\Entity\Gestor
     */
    public function getGestor()
    {
        return $this->gestor;
    }

    public function getRoles()
    {
        $variable = $this->getCategoria()->getRole();
        /*$roles = array();
        foreach ($variable as $role) {
        $roles[] = $role->getRole();
        }*/
        $roles[] = $variable;
        return $roles;
        //return $this->getCategoria()->getRole()->toArray();
    }

    public function eraseCredentials()
    {

    }
}


text:
package ee.cone.c4vdom_impl

import ee.cone.c4vdom.{MutableJsonBuilder, Resolvable, ResolvingVDomValue}

case class MapVDomValueImpl(pairs: List[VPair]) extends MapVDomValue with ResolvingVDomValue {
  def appendJson(builder: MutableJsonBuilder) = {
    builder.startObject()
    pairs.foreach{ p =>
      builder.just.append(p.jsonKey)
      p.value.appendJson(builder)
    }
    builder.end()
  }
  def resolve(name: String): Option[Resolvable] =
    pairs.find(_.jsonKey == name).map(_.value)
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
Uses of Class soot.jimple.parser.node.PBoolExpr (Soot API)
</TITLE>

<META NAME="date" CONTENT="2012-01-22">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Uses of Class
soot.jimple.parser.node.PBoolExpr

Packages that use PBoolExpr

soot.jimple.parser.node

Uses of PBoolExpr in soot.jimple.parser.node

Subclasses of PBoolExpr in soot.jimple.parser.node

 class
ABinopBoolExpr

 class
AUnopBoolExpr

Methods in soot.jimple.parser.node that return PBoolExpr

 PBoolExpr
AIfStatement.getBoolExpr()

Methods in soot.jimple.parser.node with parameters of type PBoolExpr

 void
AIfStatement.setBoolExpr(PBoolExpr node)

Constructors in soot.jimple.parser.node with parameters of type PBoolExpr

AIfStatement(TIf _if_,
             PBoolExpr _boolExpr_,
             PGotoStmt _gotoStmt_)

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes


text:
package com.elgassia.bridge.view.tui.commands.team.lobby;

import com.elgassia.bridge.adapter.LobbyAdapter;
import com.elgassia.bridge.exception.BridgeLogicException;
import com.elgassia.bridge.view.tui.Command;

public class SetName extends Command {

    private final LobbyAdapter lobbyAdapter;

    public SetName(LobbyAdapter lobbyAdapter) {
        this.lobbyAdapter = lobbyAdapter;
    }

    @Override
    public void execute() {
        if (args.length != 2) {
            System.out.println("usage: <new name>");
            return;
        }
        try {
            lobbyAdapter.setName(args[1]);
        } catch (BridgeLogicException e) {
            System.out.println(e.getMessage());
        }
    }
}


text:
$LOAD_PATH << File.join(File.dirname(__FILE__), "..", "lib")

require "dm_noisy_failures"

class Person
  include DataMapper::Resource
  has n, :memberships
  has n, :friends, "Person", :through => Resource

  property :id,    Serial
  property :name,  String, :required => true
end

class Membership
  include DataMapper::Resource
  belongs_to :person
  property :id,        Serial
  property :person_id, Integer
  property :type,      String, :required => true
end

class Address
  include DataMapper::Resource
  property :id, Serial
  property :street_address, String,  :required => true
  property :city,           String,  :required => true
  property :state,          String,  :required => true
  property :zipcode,        Integer, :required => true
end

DataMapper.setup(:default, "sqlite3://" + File.join(File.dirname(__FILE__), "test.db"))
DataMapper.finalize
DataMapper.auto_migrate!


text:
#import "CCMetalSupport_Private.h"
#if __CC_METAL_SUPPORTED_AND_ENABLED

#import "CCMetalView.h"
#import "CCTexture_Private.h"
#import "CCShader_Private.h"

@implementation CCMetalContext {
	id<MTLTexture> _destinationTexture;
}

-(instancetype)init
{
	if((self = [super init])){
		_device = MTLCreateSystemDefaultDevice();

		// Cannot use default.metallib to avoid clashing with Xcode build magic.
		// This is part of a workaround due to the iOS simulator not supporting Metal and may go away in the future.
		NSURL *url = [[NSBundle mainBundle] URLForResource:@"CCShaders.metallib" withExtension:nil];

		NSError *error = nil;
		_library = [_device newLibraryWithFile:[url path] error:&error];
		NSAssert(!error, @"Cannot load default CCShaders.metallib: %@", error);

		_commandQueue = [_device newCommandQueue];
		_currentCommandBuffer = [_commandQueue commandBuffer];
	}

	return self;
}

static NSString *CURRENT_CONTEXT_KEY = @"CURRENT_CONTEXT_KEY";

+(instancetype)currentContext
{
	return [NSThread currentThread].threadDictionary[CURRENT_CONTEXT_KEY];
}

+(void)setCurrentContext:(CCMetalContext *)context
{
	if(context){
		[NSThread currentThread].threadDictionary[CURRENT_CONTEXT_KEY] = context;
	} else {
		[[NSThread currentThread].threadDictionary removeObjectForKey:CURRENT_CONTEXT_KEY];
	}
}

-(void)endRenderPass
{
	[_currentRenderCommandEncoder endEncoding];
	_currentRenderCommandEncoder = nil;
}

-(void)beginRenderPass:(id<MTLTexture>)destinationTexture clearMask:(GLbitfield)mask color:(GLKVector4)color4 depth:(GLclampf)depth stencil:(GLint)stencil;
{
	// End the previous render pass.
	[self endRenderPass];

	MTLRenderPassColorAttachmentDescriptor *colorAttachment = [MTLRenderPassColorAttachmentDescriptor new];
	colorAttachment.texture = destinationTexture;
	if(mask & GL_COLOR_BUFFER_BIT){
		colorAttachment.loadAction = MTLLoadActionClear;
		colorAttachment.clearColor = MTLClearColorMake(color4.r, color4.g, color4.b, color4.a);
		colorAttachment.storeAction = MTLStoreActionStore;
	} else {
		colorAttachment.loadAction = MTLLoadActionDontCare;
		colorAttachment.storeAction = MTLStoreActionStore;
	}

	// TODO depth and stencil.

	MTLRenderPassDescriptor *renderPassDescriptor = [MTLRenderPassDescriptor renderPassDescriptor];
	renderPassDescriptor.colorAttachments[0] = colorAttachment;

	_currentRenderCommandEncoder = [_currentCommandBuffer renderCommandEncoderWithDescriptor:renderPassDescriptor];
	_destinationTexture = destinationTexture;
}

-(void)flushCommandBuffer
{
	[self endRenderPass];
	[_currentCommandBuffer commit];

	_currentCommandBuffer = [_commandQueue commandBuffer];
	_currentCommandBuffer.label = @"Main Cocos2D Command Buffer";
}

@end

@implementation CCGraphicsBufferMetal

-(instancetype)initWithCapacity:(NSUInteger)capacity elementSize:(size_t)elementSize type:(CCGraphicsBufferType)type;
{
	if((self = [super initWithCapacity:capacity elementSize:elementSize type:type])){
		// Use write combining? Buffers are already write only for the GL renderer.
		_buffer = [[CCMetalContext currentContext].device newBufferWithLength:capacity*elementSize options:MTLResourceOptionCPUCacheModeDefault];

		_ptr = _buffer.contents;
	}

	return self;
}

-(void)destroy {}

-(void)resize:(size_t)newCapacity;
{
	id<MTLBuffer> newBuffer = [[CCMetalContext currentContext].device newBufferWithLength:newCapacity*_elementSize options:MTLResourceOptionCPUCacheModeDefault];
	memcpy(newBuffer.contents, _ptr, _capacity*_elementSize);

	_capacity = newCapacity;
	_buffer = newBuffer;
	_ptr = _buffer.contents;
}

-(void)prepare;
{
	_count = 0;
}

-(void)commit; {}

@end

@implementation CCGraphicsBufferBindingsMetal

-(instancetype)init
{
	if((self = [super init])){
		CCRenderDispatch(NO, ^{
			_context = [CCMetalContext currentContext];

			const NSUInteger CCRENDERER_INITIAL_VERTEX_CAPACITY = 16*1024;
			_vertexBuffer = [[CCGraphicsBufferMetal alloc] initWithCapacity:CCRENDERER_INITIAL_VERTEX_CAPACITY elementSize:sizeof(CCVertex) type:CCGraphicsBufferTypeVertex];
			[_vertexBuffer prepare];

			_indexBuffer = [[CCGraphicsBufferMetal alloc] initWithCapacity:CCRENDERER_INITIAL_VERTEX_CAPACITY*1.5 elementSize:sizeof(uint16_t) type:CCGraphicsBufferTypeIndex];
			[_indexBuffer prepare];

			// Default to half a megabyte of initial uniform storage.
			NSUInteger uniformCapacity = 500*1024;
			_uniformBuffer = [[CCGraphicsBufferClass alloc] initWithCapacity:uniformCapacity elementSize:1 type:CCGraphicsBufferTypeUniform];
		});
	}

	return self;
}

@end

@implementation CCFrameBufferObjectMetal

-(instancetype)initWithTexture:(CCTexture *)texture depthStencilFormat:(GLuint)depthStencilFormat
{
	if((self = [super initWithTexture:texture depthStencilFormat:depthStencilFormat])){
		self.sizeInPixels = texture.contentSizeInPixels;
		self.contentScale = texture.contentScale;
		_frameBufferTexture = texture.metalTexture;
	}

	return self;
}

-(void)bindWithClear:(GLbitfield)mask color:(GLKVector4)color4 depth:(GLclampf)depth stencil:(GLint)stencil
{
	[[CCMetalContext currentContext] beginRenderPass:_frameBufferTexture clearMask:mask color:color4 depth:depth stencil:stencil];
}

-(void)syncWithView:(CC_VIEW<CCDirectorView> *)view;
{
	[super syncWithView:view];
	_frameBufferTexture = [(CCMetalView *)view destinationTexture];
}

@end

#endif


text:
package edu.gemini.spModel.io.impl

import edu.gemini.pot.sp.SPNodeKey
import java.nio.charset.Charset
import javax.crypto.Cipher.{DECRYPT_MODE, ENCRYPT_MODE}
import javax.crypto.{SecretKeyFactory, Cipher, SecretKey}
import javax.crypto.spec.{PBEKeySpec, PBEParameterSpec}

// SW: Simple encryption support.  This may well be stupid since I haven't
// taken the time to study cryptography but it seems good enough to defeat
// casual observers of the exported XML.  The PBE "salt" is based on the node
// key so that the DES encryption produces quite different results for otherwise
// identical input.  Again this may be stupid, sorry.

object Encryption {
  val ParamName = "encryption"
  val UTF8 = Charset.forName("UTF-8")

  private val key: SecretKey = {
    val pass = "D41D8CD98F00B204E9800998ECF8427E"
    val kSpec = new PBEKeySpec(pass.toCharArray)
    val fac   = SecretKeyFactory.getInstance("PBEWithSHA1AndDESede")
    fac.generateSecret(kSpec)
  }

  private def cipher(k: SPNodeKey, mode: Int, in: Array[Byte]): Array[Byte] = {
    val pSpec = new PBEParameterSpec(k.uuid.toString.getBytes(UTF8), 1)
    val c = Cipher.getInstance("PBEWithSHA1AndDESede")
    c.init(mode, key, pSpec)
    c.doFinal(in, 0, in.length)
  }

  def encrypt(k: SPNodeKey, s: String): String = {
    val encrypted = cipher(k, ENCRYPT_MODE, s.getBytes(UTF8))
    javax.xml.bind.DatatypeConverter.printHexBinary(encrypted)
  }

  def decrypt(k: SPNodeKey, s: String): String = {
    val encrypted = javax.xml.bind.DatatypeConverter.parseHexBinary(s)
    new String(cipher(k, DECRYPT_MODE, encrypted), "UTF-8")
  }
}


text:
;(function($) {
	$.fn.isdAnalyticsTracker = function(options) {
		if (typeof(_gaq) === 'undefined')
			return this;

		var settings = $.extend({
			'trackCrossDomain': false,
			'domains': '',
			'trackAlternatePropertyIDs': false,
			'alternatePropertyIDs': ['isd2'],
			'trackFiles': true,
			'trackFilesAsEvent': false,
			'appendFiles': true,
			'defaultFiles': [
				'.csv',
				'.doc',
				'.pdf',
				'.ppt',
				'.rar',
				'.rtf',
				'.txt',
				'.xls',
				'.zip'
			],
			'files': '',
			'eventCategory': 'External',
			'delay': 200
		}, options);

		var host = window.location.host,
			domains = settings.domains,
			domains = [].concat(domains),
			altIDs = settings.alternatePropertyIDs.toString().replace(/\s/g, ''),
			altIDs = altIDs.split(','),
			files = settings.appendFiles ? settings.defaultFiles.concat(settings.files) : settings.files,
			trackFiles = false,
			trackFilesAsEvent = settings.trackFilesAsEvent,
			delay = parseInt(settings.delay),
			start = '[href*="',
			end = '"]',
			hostSelector = start + host + end,
			regex,
			$domainLinks,
			$externalLinks,
			$internalLinks,
			href = 'href',
			category = settings.eventCategory.toString().length > 0 ? settings.eventCategory.toString() : 'External',
			clk = 'Click',
			tgt = 'target',
			trackEvent = '_trackEvent',
			trackPageview = '_trackPageview';

		var convertToSelector = function(array) {
			var str = array
						.toString()
						.replace(/\s*/g, '')
						.replace(/^(.{1})/, start + '$1')
						.replace(/,/g, end + ',' + start)
						.replace(/(.{1})$/, '$1' + end);
			return str;
		}

		if (!'WebkitAppearance' in document.documentElement.style)
			delay = 0;

		if (settings.trackCrossDomain && domains.length > 0) {
			for (var i = 0; i < domains.length; i++) {
				regex = new RegExp(domains[i], 'g');
				if (regex.test(host))
					break;
			}

			domains.splice(i, 1);
			domains = convertToSelector(domains);

			$domainLinks =
				this
				.filter(domains)
				.not(hostSelector)
				.each(function() {
					$(this).click(function() {
						_gaq.push(['_link', this.href]);
						return false;
					});
				});
		}

		if (settings.trackFiles && files.length > 0) {
			files = convertToSelector(files);
			trackFiles = true;
		}

		$externalLinks =
			this
			.filter('[href^="http"]')
			.not(hostSelector)
			.not($domainLinks);

		if (trackFiles && trackFilesAsEvent) {
			$externalLinks =
				$externalLinks
				.add(files)
				.filter(this);
		}

		$externalLinks.each(function() {
			$(this).on('click', function() {
				var thisHref = this.href;

				_gaq.push([trackEvent, category, clk, thisHref]);

				if (settings.trackAlternatePropertyIDs && altIDs.length > 0) {
					for (var i = 0; i < altIDs.length; i++) {
						_gaq.push(['' + altIDs[i] + '.' + trackEvent, category, clk, thisHref]);
					}
				}

				if (delay > 0) {
					var $this = $(this);
					if (!$this.attr(tgt) || $this.attr(tgt).toLowerCase() != '_blank') {
						setTimeout(function() {
							window.location.href = thisHref;
						}, delay);
						return false;
					}
				}
			});
		});

		var $internalLinks =
				this
				.not($domainLinks)
				.not($externalLinks)
				.not(hostSelector)
				.not('[href^="/"]')
				.not('[href^="../"]');

		if (trackFiles && !trackFilesAsEvent) {
			$internalLinks =
				$internalLinks
				.add(files)
				.filter(this);
		}

		$internalLinks.each(function() {
			$(this).on('click', function() {
				var thisHref = this.href;

				_gaq.push([trackPageview, thisHref]);

				if (settings.trackAlternatePropertyIDs && altIDs.length > 0) {
					for (var i = 0; i < altIDs.length; i++) {
						_gaq.push(['' + altIDs[i] + '.' + trackPageview, thisHref]);
					}
				}

				if (delay > 0) {
					setTimeout(function() {
						window.location.href = thisHref;
					}, delay);
					return false;
				}
			});
		});

		return this;
	};
})(jQuery);


text:
Curve edit control. Directive that is created for AngularJS 1.

check Demo [here](https://ho4040.github.io/ng-curve/demo/index.html).

![ss](https://i.imgur.com/xS2Qgx0.png)

### Control Commands
* `click` : add point
*  `drag` : move point
*  `ctrl + click` or `drag-out` : remove point

# Installation

```bash
bower install ng-curve --save
```

Then include the CSS file and javascript file

```html
<link rel="stylesheet" href="bower_components/ng-curve/dist/ng-curve.css" />
<script src="bower_components/ng-curve/dist/ng-curve.min.js"></script>
```

# Dependency

* [cardinal-spline-js](https://github.com/epistemex/cardinal-spline-js)

# Usage

Include `ngCurve` in your app's dependencies:

```javascript
angular.module('app', ['ngCurve'])
```

And the directive to your page like this :

```html
<curve-editor dot-data="input.dots"></curve-editor>
```

Change editor size with `curve-control` class

```html
<style>
  .curve-control
  {
    width:320px;
    height:240px;
  }
</style>
```

# Todo
* options for spline mode
* options for changing design
* options for grid color setting
* options for maintain aspect ratio of grid or not


text:
/* $Id: sysfs.h $ */
/** @file
 * IPRT - Linux sysfs access.
 */

/*
 * Copyright (C) 2008-2015 Oracle Corporation
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
 * available from http://www.virtualbox.org. This file is free software;
 * you can redistribute it and/or modify it under the terms of the GNU
 * General Public License (GPL) as published by the Free Software
 * Foundation, in version 2 as it comes in the "COPYING" file of the
 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
 *
 * The contents of this file may alternatively be used under the terms
 * of the Common Development and Distribution License Version 1.0
 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
 * VirtualBox OSE distribution, in which case the provisions of the
 * CDDL are applicable instead of those of the GPL.
 *
 * You may elect to license modified versions of this file under the
 * terms and conditions of either the GPL or the CDDL or both.
 */

#ifndef ___iprt_linux_sysfs_h
#define ___iprt_linux_sysfs_h

#include <iprt/cdefs.h>
#include <iprt/types.h>
#include <iprt/stdarg.h>

#include <sys/types.h> /* for dev_t */

RT_C_DECLS_BEGIN

/** @defgroup grp_rt_linux_sysfs    RTLinuxSysfs - Linux sysfs
 * @ingroup grp_rt
 * @{
 */

/**
 * Checks if a sysfs file (or directory, device, symlink, whatever) exists.
 *
 * @returns true / false, errno is preserved.
 * @param   pszFormat   The name format, either absolute or relative to "/sys/".
 * @param   va          The format args.
 */
RTDECL(bool) RTLinuxSysFsExistsV(const char *pszFormat, va_list va);

/**
 * Checks if a sysfs file (or directory, device, symlink, whatever) exists.
 *
 * @returns true / false, errno is preserved.
 * @param   pszFormat   The name format, either absolute or relative to "/sys/".
 * @param   ...         The format args.
 */
RTDECL(bool) RTLinuxSysFsExists(const char *pszFormat, ...);

/**
 * Opens a sysfs file.
 *
 * @returns The file descriptor. -1 and errno on failure.
 * @param   pszFormat   The name format, either absolute or relative to "/sys/".
 * @param   va          The format args.
 */
RTDECL(int) RTLinuxSysFsOpenV(const char *pszFormat, va_list va);

/**
 * Opens a sysfs file.
 *
 * @returns The file descriptor. -1 and errno on failure.
 * @param   pszFormat   The name format, either absolute or relative to "/sys/".
 * @param   ...         The format args.
 */
RTDECL(int) RTLinuxSysFsOpen(const char *pszFormat, ...);

/**
 * Closes a file opened with RTLinuxSysFsOpen or RTLinuxSysFsOpenV.
 *
 * @param   fd          File descriptor returned by RTLinuxSysFsOpen or
 *                      RTLinuxSysFsOpenV.
 */
RTDECL(void) RTLinuxSysFsClose(int fd);

/**
 * Reads a string from a file opened with RTLinuxSysFsOpen or RTLinuxSysFsOpenV.
 *
 * @returns The number of bytes read. -1 and errno on failure.
 * @param   fd          The file descriptor returned by RTLinuxSysFsOpen or RTLinuxSysFsOpenV.
 * @param   pszBuf      Where to store the string.
 * @param   cchBuf      The size of the buffer. Must be at least 2 bytes.
 */
RTDECL(ssize_t) RTLinuxSysFsReadStr(int fd, char *pszBuf, size_t cchBuf);

/**
 * Reads the remainder of a file opened with RTLinuxSysFsOpen or
 * RTLinuxSysFsOpenV.
 *
 * @returns IPRT status code.
 * @param   fd          The file descriptor returned by RTLinuxSysFsOpen or RTLinuxSysFsOpenV.
 * @param   pvBuf       Where to store the bits from the file.
 * @param   cbBuf       The size of the buffer.
 * @param   pcbRead     Where to return the number of bytes read.  Optional.
 */
RTDECL(int) RTLinuxSysFsReadFile(int fd, void *pvBuf, size_t cbBuf, size_t *pcbRead);

/**
 * Reads a number from a sysfs file.
 *
 * @returns 64-bit signed value on success, -1 and errno on failure.
 * @param   uBase       The number base, 0 for autodetect.
 * @param   pszFormat   The filename format, either absolute or relative to "/sys/".
 * @param   va          Format args.
 */
RTDECL(int64_t) RTLinuxSysFsReadIntFileV(unsigned uBase, const char *pszFormat, va_list va);

/**
 * Reads a number from a sysfs file.
 *
 * @returns 64-bit signed value on success, -1 and errno on failure.
 * @param   uBase       The number base, 0 for autodetect.
 * @param   pszFormat   The filename format, either absolute or relative to "/sys/".
 * @param   ...         Format args.
 */
RTDECL(int64_t) RTLinuxSysFsReadIntFile(unsigned uBase, const char *pszFormat, ...);

/**
 * Reads a device number from a sysfs file.
 *
 * @returns device number on success, 0 and errno on failure.
 * @param   pszFormat   The filename format, either absolute or relative to "/sys/".
 * @param   va          Format args.
 */
RTDECL(dev_t) RTLinuxSysFsReadDevNumFileV(const char *pszFormat, va_list va);

/**
 * Reads a device number from a sysfs file.
 *
 * @returns device number on success, 0 and errno on failure.
 * @param   pszFormat   The filename format, either absolute or relative to "/sys/".
 * @param   ...         Format args.
 */
RTDECL(dev_t) RTLinuxSysFsReadDevNumFile(const char *pszFormat, ...);

/**
 * Reads a string from a sysfs file.  If the file contains a newline, we only
 * return the text up until there.
 *
 * @returns number of characters read on success, -1 and errno on failure.
 * @param   pszBuf      Where to store the path element.  Must be at least two
 *                      characters, but a longer buffer would be advisable.
 * @param   cchBuf      The size of the buffer pointed to by @a pszBuf.
 * @param   pszFormat   The filename format, either absolute or relative to "/sys/".
 * @param   va          Format args.
 */
RTDECL(ssize_t) RTLinuxSysFsReadStrFileV(char *pszBuf, size_t cchBuf, const char *pszFormat, va_list va);

/**
 * Reads a string from a sysfs file.  If the file contains a newline, we only
 * return the text up until there.
 *
 * @returns number of characters read on success, -1 and errno on failure.
 * @param   pszBuf      Where to store the path element.  Must be at least two
 *                      characters, but a longer buffer would be advisable.
 * @param   cchBuf      The size of the buffer pointed to by @a pszBuf.
 * @param   pszFormat   The filename format, either absolute or relative to "/sys/".
 * @param   ...         Format args.
 */
RTDECL(ssize_t) RTLinuxSysFsReadStrFile(char *pszBuf, size_t cchBuf, const char *pszFormat, ...);

/**
 * Reads the last element of the path of the file pointed to by the symbolic
 * link specified.
 *
 * This is needed at least to get the name of the driver associated with a
 * device, where pszFormat should be the "driver" link in the devices sysfs
 * directory.
 *
 * @returns The length of the returned string on success, -1 and errno on
 *          failure.
 * @param   pszBuf      Where to store the path element.  Must be at least two
 *                      characters, but a longer buffer would be advisable.
 * @param   cchBuf      The size of the buffer pointed to by @a pszBuf.
 * @param   pszFormat   The filename format, either absolute or relative to "/sys/".
 * @param   va           Format args.
 */
RTDECL(ssize_t) RTLinuxSysFsGetLinkDestV(char *pszBuf, size_t cchBuf, const char *pszFormat, va_list va);

/**
 * Reads the last element of the path of the file pointed to by the symbolic
 * link specified.
 *
 * This is needed at least to get the name of the driver associated with a
 * device, where pszFormat should be the "driver" link in the devices sysfs
 * directory.
 *
 * @returns The length of the returned string on success, -1 and errno on
 *          failure.
 * @param   pszBuf      Where to store the path element.  Must be at least two
 *                      characters, but a longer buffer would be advisable.
 * @param   cchBuf      The size of the buffer pointed to by @a pszBuf.
 * @param   pszFormat   The filename format, either absolute or relative to "/sys/".
 * @param   ...         Format args.
 */
RTDECL(ssize_t) RTLinuxSysFsGetLinkDest(char *pszBuf, size_t cchBuf, const char *pszFormat, ...);

/**
 * Check the path of a device node under /dev, given the device number and a
 * pattern and store the path into @a pszBuf.
 *
 * @returns The length of the returned string on success, -1 and errno on
 *          failure.
 * @returns -1 and ENOENT if no matching device node could be found.
 * @param   DevNum         The device number to search for.
 * @param   fMode          The type of device - only RTFS_TYPE_DEV_CHAR and
 *                         RTFS_TYPE_DEV_BLOCK are valid values.
 * @param   pszBuf         Where to store the path.
 * @param   cchBuf         The size of the buffer.
 * @param   pszPattern     The expected path format of the device node, either
 *                         absolute or relative to "/dev".
 * @param   va             Format args.
 */
RTDECL(ssize_t) RTLinuxCheckDevicePathV(dev_t DevNum, RTFMODE fMode,
                                        char *pszBuf, size_t cchBuf,
                                        const char *pszPattern, va_list va);

/**
 * Check the path of a device node under /dev, given the device number and a
 * pattern and store the path into @a pszBuf.
 *
 * @returns The length of the returned string on success, -1 and errno on
 *          failure.
 * @returns -1 and ENOENT if no matching device node could be found.
 * @param   DevNum          The device number to search for
 * @param   fMode           The type of device - only RTFS_TYPE_DEV_CHAR and
 *                          RTFS_TYPE_DEV_BLOCK are valid values
 * @param   pszBuf          Where to store the path.
 * @param   cchBuf          The size of the buffer.
 * @param   pszPattern      The expected path format of the device node, either
 *                          absolute or relative to "/dev".
 * @param   ...             Format args.
 */
RTDECL(ssize_t) RTLinuxCheckDevicePath(dev_t DevNum, RTFMODE fMode,
                                       char *pszBuf, size_t cchBuf,
                                       const char *pszPattern, ...);

/** @} */

RT_C_DECLS_END

#endif


text:
#ifndef __WIN_DEBUGWIN__
#define __WIN_DEBUGWIN__

//============================================================
//  GLOBAL VARIABLES
//============================================================

// windows

//============================================================
//  PROTOTYPES
//============================================================

void debugwin_init_windows(running_machine &machine);
void debugwin_destroy_windows(void);
void debugwin_show(int type);
void debugwin_update_during_game(running_machine &machine);

#endif


text:
import Vue from 'vue';
import Router from 'vue-router';
import Home from './views/Home.vue';
import InboxForm from './views/InboxForm.vue';
import Inbox from './views/Inbox.vue';

Vue.use (Router);

export default new Router ({
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () =>
        import (/* webpackChunkName: "about" */ './views/About.vue'),
    },
    {
      path: '/inbox',
      component: () =>
        import (/* webpackChunkName:"inbox" */ './views/InboxLayout.vue'),
      children: [
        {
          path: '/',
          name: 'Inbox',
          // component: Inbox,
          component: () =>
            import (/* webpackChunkName: "inbox" */ './views/Inbox.vue'),
        },
        {
          path: 'new',
          name: 'InboxForm',
          // component: InboxForm,
          component: () =>
            import (/* webpackChunkName: "inbox" */ './views/InboxForm.vue'),
        },
      ],
    },
  ],
});


text:
<?php

define("DATABASE_HOST", "host");
define("DATABASE_USER", "user");
define("DATABASE_PASSWORD", "password");
define("DATABASE_DATABASE", "database");


text:
    type InputData struct {
        Key         string;
        Nameinput   string;
        Typeinput   string;
        Title       string;
        Val         string;
        Placeholder string;
    }

    type TextareaData struct {
        Key         string;
        Name        string;
        Typeinput   string;
        Title       string;
        Val       string;
        Placeholder string;
    }

    type CheckboxData struct {
        Name        string;
        Key         string;
        Typeinput   string;
        Val         string;
        Title       string;
        Idx         int;
        Checked     string;
        Events      string;
        DataJson    string;
    }

    type DataHtml struct{
        Checkboxs   []CheckboxData;
        Inputs      []InputData;
        Textareas   []TextareaData;
    }
//%}

           package templates

         var DataState_new_user__onboarding_ = DataHtml{
    Checkboxs: []CheckboxData{
          CheckboxData{ Key: "u4608_input", Typeinput: "checkbox", Val: "checkbox", Name: "",},
          CheckboxData{ Key: "u4610_input", Typeinput: "checkbox", Val: "checkbox", Name: "",},
          CheckboxData{ Key: "u4612_input", Typeinput: "checkbox", Val: "checkbox", Name: "",},
          CheckboxData{ Key: "u4614_input", Typeinput: "checkbox", Val: "checkbox", Name: "",},
          CheckboxData{ Key: "u4616_input", Typeinput: "checkbox", Val: "checkbox", Name: "",},
          CheckboxData{ Key: "u4618_input", Typeinput: "checkbox", Val: "checkbox", Name: "",},
          CheckboxData{ Key: "u4620_input", Typeinput: "checkbox", Val: "checkbox", Name: "",},
          CheckboxData{ Key: "u4622_input", Typeinput: "checkbox", Val: "checkbox", Name: "",},
    },
    Inputs: []InputData{
          InputData{ Key: "u5098_input", Typeinput: "text", Val: " краткое название объекта для экстранета", Nameinput: "", Title: "", Placeholder: "",},
          InputData{ Key: "u5099_input", Typeinput: "submit", Val: "Отмена", Nameinput: "", Title: "", Placeholder: "",},
          InputData{ Key: "u5100_input", Typeinput: "submit", Val: "Добавить", Nameinput: "", Title: "", Placeholder: "",},
    },
}


text:
module RailsDialog
  VERSION = "0.0.2"
end


text:
using EFSM.Designer.Interfaces;
using System;
using System.Windows;
using System.Windows.Controls;
using Xceed.Wpf.Toolkit.PropertyGrid;

namespace EFSM.Designer.View
{
    /// <summary>
    /// Interaction logic for PropertyGridView.xaml
    /// </summary>
    public partial class PropertyGridView : UserControl
    {
        private bool _hasPropertyChanged;

        public static readonly DependencyProperty SelectionServiceProperty = DependencyProperty.Register(
            "SelectionService",
            typeof(ISelectionService),
            typeof(PropertyGridView),
            new PropertyMetadata(null, SelectionServiceChanged));

        public static readonly DependencyProperty UndoProviderProperty = DependencyProperty.Register(
            "UndoProvider",
            typeof(IUndoProvider),
            typeof(PropertyGridView));

        public PropertyGridView()
        {
            InitializeComponent();
        }

        public ISelectionService SelectionService
        {
            get { return (ISelectionService)GetValue(SelectionServiceProperty); }
            set { SetValue(SelectionServiceProperty, value); }
        }

        public IUndoProvider UndoProvider
        {
            get { return (IUndoProvider)GetValue(UndoProviderProperty); }
            set { SetValue(UndoProviderProperty, value); }
        }

        private void OnSelectionChanged(object sender, EventArgs args)
        {
            var selectionService = SelectionService;

            IPropertyGridSource source = null;

            if (selectionService == null)
                return;

            var selectedItems = selectionService.GetSelected();

            if (selectedItems.Length == 1)
            {
                source = selectedItems[0] as IPropertyGridSource;
            }

            MainPropertyGrid.SelectedObject = source?.PropertyGridData;
        }

        private static void SelectionServiceChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            var propertyGridView = d as PropertyGridView;

            if (propertyGridView == null)
            {
                throw new InvalidOperationException("Invalid dependency object.");
            }

            var newValue = e.NewValue as ISelectionService;
            var oldValue = e.OldValue as ISelectionService;

            if (oldValue != null)
            {
                oldValue.SelectionChanged -= propertyGridView.OnSelectionChanged;
            }

            if (newValue != null)
            {
                newValue.SelectionChanged += propertyGridView.OnSelectionChanged;
            }

            //Update the selection
            propertyGridView.OnSelectionChanged(null, EventArgs.Empty);
        }
        private void SaveUndoStateIfChanged()
        {
            if (_hasPropertyChanged)
            {
                _hasPropertyChanged = false;

                UndoProvider?.SaveUndoState();
            }
        }

        private void PropertyGrid_GotFocus(object sender, RoutedEventArgs e)
        {
            _hasPropertyChanged = false;
        }

        private void PropertyGrid_LostFocus(object sender, RoutedEventArgs e)
        {
            SaveUndoStateIfChanged();
        }

        private void PropertyGrid_PropertyValueChanged(object sender, PropertyValueChangedEventArgs e)
        {
            _hasPropertyChanged = true;
        }

        private void PropertyGrid_SelectedObjectChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
        {
            SaveUndoStateIfChanged();
        }

    }
}


text:
type UnixTime = number

export interface HistogramDatum {
  key: string
  time: UnixTime
  value: number
  group: string
}

export type HistogramData = HistogramDatum[]

export type TooltipAnchor = 'left' | 'right'

export interface Margins {
  top: number
  right: number
  bottom: number
  left: number
}

export interface TimePeriod {
  start: UnixTime
  end: UnixTime
}

export interface HoverData {
  data: HistogramData
  x: number
  y: number
  anchor: TooltipAnchor
}

export type ColorScale = (color: string, group: string) => string

export interface HistogramColor {
  group: string
  color: string
}

export type SortFn = (a: HistogramDatum, b: HistogramDatum) => number


text:
const redis = require('redis');
const log = require('../log')(module);

const DEFAULT_TTL = 10;

let client;

module.exports = {
  store: store,
  fetch: fetch,
  init: init
};

function store(key, value, ttl) {
  return new Promise((resolve, reject) => {
    if(!ttl || typeof ttl !== 'number') ttl = DEFAULT_TTL;
    client.set(key, JSON.stringify(value), 'EX', ttl, (err, data) => {
      if(err) reject(err);
      else resolve();
    });
  });
}

function fetch(key) {
  return new Promise((resolve, reject) => {
    client.get(key, (err, value) => {
      resolve(convToJson(value));
    })
  });
}

function init(options) {
  client = redis.createClient(options);
  client.on("error", function (err) {
    console.log("Error " + err);
  });
  log.info(`Connected to ${options.url}`);
}

function convToJson(value) {
  if(typeof value === 'string') {
    return JSON.parse(value);
  }
  else {
    return null;
  }
}


text:
import { MatchSide, SinglesMatchSide, DoublesMatchSide } from './';

export abstract class Match {
	id: number;
	distance: MatchDistance;
	abstract side1: MatchSide;
	abstract side2: MatchSide;
	abstract type: MatchType;
}

export class SinglesMatch extends Match {
	side1: SinglesMatchSide;
	side2: SinglesMatchSide;

	get type() {
		return MatchType.Singles;
	}
}

export class DoublesMatch extends Match {
	side1: DoublesMatchSide;
	side2: DoublesMatchSide;

	get type() {
		return MatchType.Doubles;
	}
}

export enum MatchType {
	Singles = 1,
	Doubles = 2
}

export enum MatchDistance {
	BestOf5  = 1,
	BestOf7  = 2,
	BestOf9	 = 3,
	BestOf11 = 4
}


text:
require File.dirname(__FILE__) + '/../spec_helper'

describe IOStub do
  before :each do
    @out = IOStub.new
    @sep = $\
  end

  after :each do
    $\ = @sep
  end

  it "provides a write method" do
    @out.write "this"
    @out.should == "this"
  end

  it "concatenates the arguments sent to write" do
    @out.write "flim ", "flam"
    @out.should == "flim flam"
  end

  it "provides a print method that appends the default separator" do
    $\ = " [newline] "
    @out.print "hello"
    @out.print "world"
    @out.should == "hello [newline] world [newline] "
  end

  it "provides a puts method that appends the default separator" do
    @out.puts "hello", 1, 2, 3
    @out.should == "hello\n1\n2\n3\n"
  end
end