text:
namespace swift {
  class BraceStmt;
  class Decl;
  class IfStmt;
  class GuardStmt;
  class SourceFile;
  class Stmt;
  class Expr;
  class StmtConditionElement;

/// Represents a lexical context in which types are refined. For now,
/// types are refined solely for API availability checking, based on
/// the operating system versions that the refined context may execute
/// upon.
///
/// These refinement contexts form a lexical tree parallel to the AST but much
/// more sparse: we only introduce refinement contexts when there is something
/// to refine.
class TypeRefinementContext {

public:
  /// Describes the reason a type refinement context was introduced.
  enum class Reason {
    /// The root refinement context.
    Root,

    /// The context was introduced by a declaration (e.g., the body of a
    /// function declaration or the contents of a class declaration).
    Decl,

    /// The context was introduced for the Then branch of an IfStmt.
    IfStmtThenBranch,

    /// The context was introduced for the Else branch of an IfStmt.
    IfStmtElseBranch,

    /// The context was introduced for the remaining StmtConditionElements
    /// following an #available(...) query in a StmtCondition.
    /// For example, in the IfStmt below, the optional binding let x = expr()
    /// would be contained in this kind of context:
    ///
    /// if #available(...),
    ///    let x = expr() {
    ///  }
    ConditionFollowingAvailabilityQuery,

    /// The context was introduced for the fallthrough flow of a guard
    /// statement.
    GuardStmtFallthrough,

    /// The context was introduced for the else flow of a guard
    /// statement.
    GuardStmtElseBranch,

    // The context was introduced for the body of a while statement.
    WhileStmtBody
  };

private:

  /// Represents the AST node that introduced a refinement context.
  class IntroNode {
    Reason IntroReason;
    union {
      SourceFile *SF;
      Decl *D;
      IfStmt *IS;
      PoundAvailableInfo *PAI;
      GuardStmt *GS;
      WhileStmt *WS;
    };

  public:
    IntroNode(SourceFile *SF) : IntroReason(Reason::Root), SF(SF) {}
    IntroNode(Decl *D) : IntroReason(Reason::Decl), D(D) {}
    IntroNode(IfStmt *IS, bool IsThen) :
    IntroReason(IsThen ? Reason::IfStmtThenBranch : Reason::IfStmtElseBranch),
                IS(IS) {}
    IntroNode(PoundAvailableInfo *PAI)
        : IntroReason(Reason::ConditionFollowingAvailabilityQuery), PAI(PAI) {}
    IntroNode(GuardStmt *GS, bool IsFallthrough)
        : IntroReason(IsFallthrough ? Reason::GuardStmtFallthrough
                                    : Reason::GuardStmtElseBranch),
          GS(GS) {}
    IntroNode(WhileStmt *WS) : IntroReason(Reason::WhileStmtBody), WS(WS) {}

    Reason getReason() const { return IntroReason; }

    SourceFile *getAsSourceFile() const {
      assert(IntroReason == Reason::Root);
      return SF;
    }

    Decl *getAsDecl() const {
      assert(IntroReason == Reason::Decl);
      return D;
    }

    IfStmt *getAsIfStmt() const {
      assert(IntroReason == Reason::IfStmtThenBranch ||
             IntroReason == Reason::IfStmtElseBranch);
      return IS;
    }

    PoundAvailableInfo *getAsPoundAvailableInfo() const {
      assert(IntroReason == Reason::ConditionFollowingAvailabilityQuery);
      return PAI;
    }

    GuardStmt *getAsGuardStmt() const {
      assert(IntroReason == Reason::GuardStmtFallthrough ||
             IntroReason == Reason::GuardStmtElseBranch);
      return GS;
    }

    WhileStmt *getAsWhileStmt() const {
      assert(IntroReason == Reason::WhileStmtBody);
      return WS;
    }
  };

  /// The AST node that introduced this context.
  IntroNode Node;

  SourceRange SrcRange;

  AvailabilityContext AvailabilityInfo;

  std::vector<TypeRefinementContext *> Children;

  TypeRefinementContext(ASTContext &Ctx, IntroNode Node,
                        TypeRefinementContext *Parent, SourceRange SrcRange,
                        const AvailabilityContext &Info);

public:

  /// Create the root refinement context for the given SourceFile.
  static TypeRefinementContext *createRoot(SourceFile *SF,
                                           const AvailabilityContext &Info);

  /// Create a refinement context for the given declaration.
  static TypeRefinementContext *createForDecl(ASTContext &Ctx, Decl *D,
                                              TypeRefinementContext *Parent,
                                              const AvailabilityContext &Info,
                                              SourceRange SrcRange);

  /// Create a refinement context for the Then branch of the given IfStmt.
  static TypeRefinementContext *
  createForIfStmtThen(ASTContext &Ctx, IfStmt *S, TypeRefinementContext *Parent,
                      const AvailabilityContext &Info);

  /// Create a refinement context for the Else branch of the given IfStmt.
  static TypeRefinementContext *
  createForIfStmtElse(ASTContext &Ctx, IfStmt *S, TypeRefinementContext *Parent,
                      const AvailabilityContext &Info);

  /// Create a refinement context for the true-branch control flow to
  /// further StmtConditionElements following a #available() query in
  /// a StmtCondition.
  static TypeRefinementContext *
  createForConditionFollowingQuery(ASTContext &Ctx, PoundAvailableInfo *PAI,
                                   const StmtConditionElement &LastElement,
                                   TypeRefinementContext *Parent,
                                   const AvailabilityContext &Info);

  /// Create a refinement context for the fallthrough of a GuardStmt.
  static TypeRefinementContext *
  createForGuardStmtFallthrough(ASTContext &Ctx, GuardStmt *RS,
                                  BraceStmt *ContainingBraceStmt,
                                  TypeRefinementContext *Parent,
                                  const AvailabilityContext &Info);

  /// Create a refinement context for the else branch of a GuardStmt.
  static TypeRefinementContext *
  createForGuardStmtElse(ASTContext &Ctx, GuardStmt *RS,
                         TypeRefinementContext *Parent,
                         const AvailabilityContext &Info);

  /// Create a refinement context for the body of a WhileStmt.
  static TypeRefinementContext *
  createForWhileStmtBody(ASTContext &Ctx, WhileStmt *WS,
                         TypeRefinementContext *Parent,
                         const AvailabilityContext &Info);

  /// Returns the reason this context was introduced.
  Reason getReason() const;

  /// Returns the AST node that introduced this refinement context. Note that
  /// this node may be different than the refined range. For example, a
  /// refinement context covering an IfStmt Then branch will have the
  /// IfStmt as the introduction node (and its reason as IfStmtThenBranch)
  /// but its source range will cover the Then branch.
  IntroNode getIntroductionNode() const { return Node; }

  /// Returns the location of the node that introduced this refinement context
  /// or an invalid location if the context reflects the minimum deployment
  // target.
  SourceLoc getIntroductionLoc() const;

  /// Returns the source range covering a _single_ decl-attribute or statement
  /// condition that introduced the refinement context for a given platform
  /// version; if zero or multiple such responsible attributes or statements
  /// exist, returns an invalid SourceRange.
  SourceRange
  getAvailabilityConditionVersionSourceRange(
      PlatformKind Platform,
      const llvm::VersionTuple &Version) const;

  /// Returns the source range on which this context refines types.
  SourceRange getSourceRange() const { return SrcRange; }

  /// Returns the information on what can be assumed present at run time when
  /// running code contained in this context.
  const AvailabilityContext &getAvailabilityInfo() const {
    return AvailabilityInfo;
  }

  /// Adds a child refinement context.
  void addChild(TypeRefinementContext *Child) {
    assert(Child->getSourceRange().isValid());
    Children.push_back(Child);
  }

  /// Returns the inner-most TypeRefinementContext descendant of this context
  /// for the given source location.
  TypeRefinementContext *findMostRefinedSubContext(SourceLoc Loc,
                                                   SourceManager &SM);

  LLVM_ATTRIBUTE_DEPRECATED(
      void dump(SourceManager &SrcMgr) const LLVM_ATTRIBUTE_USED,
      "only for use within the debugger");
  void dump(raw_ostream &OS, SourceManager &SrcMgr) const;
  void print(raw_ostream &OS, SourceManager &SrcMgr, unsigned Indent = 0) const;

  static StringRef getReasonName(Reason R);

  // Only allow allocation of TypeRefinementContext using the allocator in
  // ASTContext.
  void *operator new(size_t Bytes, ASTContext &C,
                     unsigned Alignment = alignof(TypeRefinementContext));
};

} // end namespace swift

#endif


text:
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 18, 2015 at 09:18 AM
-- Server version: 5.6.17
-- PHP Version: 5.5.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `fdr_manager`
--

-- --------------------------------------------------------

--
-- Table structure for table `boncarburanthuile`
--

CREATE TABLE IF NOT EXISTS `boncarburanthuile` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `lieu` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `date` datetime NOT NULL,
  `quantite` double NOT NULL,
  `montant` double NOT NULL,
  `compteur` bigint(20) NOT NULL,
  `champSup1` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champSup2` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `feuilleDeRoute_id` int(11) NOT NULL,
  `typeConsommation_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_4ABB48D0F8F947DA` (`feuilleDeRoute_id`),
  KEY `IDX_4ABB48D0C3782501` (`typeConsommation_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `chauffeur`
--

CREATE TABLE IF NOT EXISTS `chauffeur` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `prenom` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `tel` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cin` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `adresse` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `dateembauche` date NOT NULL,
  `disponibilite` tinyint(1) DEFAULT NULL,
  `typeconvention` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `champssupp1` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `etatContrat` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_5CA777B8ABE530DA` (`cin`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;

--
-- Dumping data for table `chauffeur`
--

INSERT INTO `chauffeur` (`id`, `nom`, `prenom`, `tel`, `cin`, `adresse`, `dateembauche`, `disponibilite`, `typeconvention`, `champssupp1`, `etatContrat`) VALUES
(1, 'chSaid', 'chSaid', NULL, 'Q285285', NULL, '2010-01-01', 1, 'cdd', NULL, 'ouvert'),
(2, 'chMouad', 'chMouad', NULL, 'Q285293', NULL, '2010-01-01', 1, 'cdd', NULL, 'ouvert');

-- --------------------------------------------------------

--
-- Table structure for table `client`
--

CREATE TABLE IF NOT EXISTS `client` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `prenom` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `nom` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `tel` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `adresse` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cin` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `email` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `fax` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `nomentreprise` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `encompte` tinyint(1) DEFAULT NULL,
  `clientaffret` tinyint(1) DEFAULT NULL,
  `clientramass` tinyint(1) DEFAULT NULL,
  `numcompte` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champssupp1` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champssupp2` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_C7440455ABE530DA` (`cin`),
  UNIQUE KEY `UNIQ_C7440455E7927C74` (`email`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ;

--
-- Dumping data for table `client`
--

INSERT INTO `client` (`id`, `prenom`, `nom`, `tel`, `adresse`, `cin`, `email`, `fax`, `nomentreprise`, `encompte`, `clientaffret`, `clientramass`, `numcompte`, `champssupp1`, `champssupp2`) VALUES
(1, 'peige', 'Peugeot', NULL, NULL, NULL, NULL, NULL, NULL, 1, 1, 0, NULL, NULL, NULL),
(2, 'peige', 'Sigma', NULL, NULL, NULL, NULL, NULL, NULL, 1, 1, 0, NULL, NULL, NULL),
(3, 'peige', 'TeleComi', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `clientfdrf`
--

CREATE TABLE IF NOT EXISTS `clientfdrf` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) NOT NULL,
  `secteur` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `champSup1` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `champSup2` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `feuilleDeRoute_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_77C1CD5E19EB6921` (`client_id`),
  KEY `IDX_77C1CD5EF8F947DA` (`feuilleDeRoute_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `clientfdrv`
--

CREATE TABLE IF NOT EXISTS `clientfdrv` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) NOT NULL,
  `secteur` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `champSup1` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `champSup2` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `feuilleDeRoute_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_6A76DD3A19EB6921` (`client_id`),
  KEY `IDX_6A76DD3AF8F947DA` (`feuilleDeRoute_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `client_secteur`
--

CREATE TABLE IF NOT EXISTS `client_secteur` (
  `client_id` int(11) NOT NULL,
  `secteur_id` int(11) NOT NULL,
  PRIMARY KEY (`client_id`,`secteur_id`),
  KEY `IDX_D278616219EB6921` (`client_id`),
  KEY `IDX_D27861629F7E4405` (`secteur_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `client_secteur`
--

INSERT INTO `client_secteur` (`client_id`, `secteur_id`) VALUES
(1, 3),
(2, 3);

-- --------------------------------------------------------

--
-- Table structure for table `depot`
--

CREATE TABLE IF NOT EXISTS `depot` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `filiale_id` int(11) NOT NULL,
  `libelle` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `ville` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `adresse` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champ1` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champ2` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_47948BBCA4D60759` (`libelle`),
  KEY `IDX_47948BBC5C4BCADC` (`filiale_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `feuillederoute`
--

CREATE TABLE IF NOT EXISTS `feuillederoute` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vehicule_id` int(11) NOT NULL,
  `secteur_id` int(11) DEFAULT NULL,
  `filiale_id` int(11) NOT NULL,
  `dateGeneree` datetime NOT NULL,
  `dateDebutMission` datetime NOT NULL,
  `dateFinMission` datetime NOT NULL,
  `nombreManutention` int(11) DEFAULT NULL,
  `nombreManutentionChauf1` int(11) DEFAULT NULL,
  `nombreManutentionChauf2` int(11) DEFAULT NULL,
  `nomManExterne1` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `nomManExterne2` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `compteurReel` bigint(20) NOT NULL,
  `compteurFinal` bigint(20) DEFAULT NULL,
  `cloture` tinyint(1) DEFAULT NULL,
  `calcDiffKm` int(11) DEFAULT NULL,
  `calcKmParcourus` int(11) DEFAULT NULL,
  `calcNbRepas` int(11) DEFAULT NULL,
  `calcNbPetitDej` int(11) DEFAULT NULL,
  `calcNbDecoucher` int(11) DEFAULT NULL,
  `calcQuantite` double DEFAULT NULL,
  `calcMontantCarburant` double DEFAULT NULL,
  `calcMontantPeage` double DEFAULT NULL,
  `calcNbJours` double DEFAULT NULL,
  `primeRemorque` tinyint(1) DEFAULT NULL,
  `remarques` longtext COLLATE utf8_unicode_ci,
  `agentSaisie` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `operationnel` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `surveillant` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champSup1` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champSup2` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champSup3` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champSup4` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `missionAffretement_id` int(11) DEFAULT NULL,
  `typePrestation_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_2BA993A6578BA7B0` (`missionAffretement_id`),
  KEY `IDX_2BA993A64A4A3511` (`vehicule_id`),
  KEY `IDX_2BA993A6F023560D` (`typePrestation_id`),
  KEY `IDX_2BA993A69F7E4405` (`secteur_id`),
  KEY `IDX_2BA993A65C4BCADC` (`filiale_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ;

--
-- Dumping data for table `feuillederoute`
--

INSERT INTO `feuillederoute` (`id`, `vehicule_id`, `secteur_id`, `filiale_id`, `dateGeneree`, `dateDebutMission`, `dateFinMission`, `nombreManutention`, `nombreManutentionChauf1`, `nombreManutentionChauf2`, `nomManExterne1`, `nomManExterne2`, `compteurReel`, `compteurFinal`, `cloture`, `calcDiffKm`, `calcKmParcourus`, `calcNbRepas`, `calcNbPetitDej`, `calcNbDecoucher`, `calcQuantite`, `calcMontantCarburant`, `calcMontantPeage`, `calcNbJours`, `primeRemorque`, `remarques`, `agentSaisie`, `operationnel`, `surveillant`, `champSup1`, `champSup2`, `champSup3`, `champSup4`, `missionAffretement_id`, `typePrestation_id`) VALUES
(1, 1, 4, 1, '2015-03-17 17:13:24', '2015-03-17 17:12:00', '2015-03-17 17:13:24', 4, 2, 2, NULL, NULL, 10000, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1);

-- --------------------------------------------------------

--
-- Table structure for table `feuillederoute_chauffeur`
--

CREATE TABLE IF NOT EXISTS `feuillederoute_chauffeur` (
  `feuillederoute_id` int(11) NOT NULL,
  `chauffeur_id` int(11) NOT NULL,
  PRIMARY KEY (`feuillederoute_id`,`chauffeur_id`),
  KEY `IDX_3EDD43094ED2265C` (`feuillederoute_id`),
  KEY `IDX_3EDD430985C0B3BE` (`chauffeur_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `feuillederoute_chauffeur`
--

INSERT INTO `feuillederoute_chauffeur` (`feuillederoute_id`, `chauffeur_id`) VALUES
(1, 1),
(1, 2);

-- --------------------------------------------------------

--
-- Table structure for table `feuillederoute_manutentionnaire`
--

CREATE TABLE IF NOT EXISTS `feuillederoute_manutentionnaire` (
  `feuillederoute_id` int(11) NOT NULL,
  `manutentionnaire_id` int(11) NOT NULL,
  PRIMARY KEY (`feuillederoute_id`,`manutentionnaire_id`),
  KEY `IDX_DA0921EC4ED2265C` (`feuillederoute_id`),
  KEY `IDX_DA0921ECAAE024` (`manutentionnaire_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `feuillederoute_manutentionnaire`
--

INSERT INTO `feuillederoute_manutentionnaire` (`feuillederoute_id`, `manutentionnaire_id`) VALUES
(1, 1),
(1, 2);

-- --------------------------------------------------------

--
-- Table structure for table `feuillederoute_utilisateur`
--

CREATE TABLE IF NOT EXISTS `feuillederoute_utilisateur` (
  `feuillederoute_id` int(11) NOT NULL,
  `utilisateur_id` int(11) NOT NULL,
  PRIMARY KEY (`feuillederoute_id`,`utilisateur_id`),
  KEY `IDX_C1766A854ED2265C` (`feuillederoute_id`),
  KEY `IDX_C1766A85FB88E14F` (`utilisateur_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

--
-- Table structure for table `filiale`
--

CREATE TABLE IF NOT EXISTS `filiale` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `libelle` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `adresse` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champSup1` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champSup2` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_FD98CA9DA4D60759` (`libelle`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;

--
-- Dumping data for table `filiale`
--

INSERT INTO `filiale` (`id`, `libelle`, `adresse`, `champSup1`, `champSup2`) VALUES
(1, 'CTM.ME', NULL, NULL, NULL),
(2, 'CTM.ME2', NULL, NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `indisponibilite`
--

CREATE TABLE IF NOT EXISTS `indisponibilite` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `chauffeur_id` int(11) NOT NULL,
  `motif` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `datedebut` datetime NOT NULL,
  `datefin` datetime NOT NULL,
  `champssupp1` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champssupp2` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_8717036F85C0B3BE` (`chauffeur_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `manutentionnaire`
--

CREATE TABLE IF NOT EXISTS `manutentionnaire` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `prenom` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `matricule` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `type` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `cin` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `tel` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `adresse` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champssupp1` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champssupp2` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_E1ADE7A5ABE530DA` (`cin`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ;

--
-- Dumping data for table `manutentionnaire`
--

INSERT INTO `manutentionnaire` (`id`, `nom`, `prenom`, `matricule`, `type`, `cin`, `tel`, `adresse`, `champssupp1`, `champssupp2`) VALUES
(1, 'manHamid', 'manHamid', NULL, 'ctm', 'q78q88', NULL, NULL, NULL, NULL),
(2, 'manHRachid', 'manHamid', NULL, 'ctm', 'q78q00', NULL, NULL, NULL, NULL),
(3, 'manSaid', 'manHamid', NULL, 'ctm', 'q78q99', NULL, NULL, NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `missionaffretement`
--

CREATE TABLE IF NOT EXISTS `missionaffretement` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `client_id` int(11) DEFAULT NULL,
  `ecc` tinyint(1) DEFAULT NULL,
  `ect` tinyint(1) DEFAULT NULL,
  `ebl` tinyint(1) DEFAULT NULL,
  `espece` tinyint(1) DEFAULT NULL,
  `autredoc` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `valdeclassurance` double DEFAULT NULL,
  `bonlivraison` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `numexpedition` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `dateramassage` datetime NOT NULL,
  `lieuramassage` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `nomresponsable` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `telresponsable` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `nbrecolis` int(11) DEFAULT NULL,
  `naturemarchandise` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `datelivraison` datetime NOT NULL,
  `lieulivraison` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `montantfacture` double NOT NULL,
  `remise` int(11) DEFAULT NULL,
  `motifremise` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `montantregle` tinyint(1) DEFAULT NULL,
  `nombnq` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `numcheque` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `remarques` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `confRecDocClient` tinyint(1) DEFAULT NULL,
  `confRecDocCtm` tinyint(1) DEFAULT NULL,
  `champssupp2` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champssupp3` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champssupp4` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_F5CA3EB219EB6921` (`client_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `modification`
--

CREATE TABLE IF NOT EXISTS `modification` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `utilisateur_id` int(11) NOT NULL,
  `motif` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `dateMaj` datetime NOT NULL,
  `remarque` longtext COLLATE utf8_unicode_ci NOT NULL,
  `champSup1` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champSup2` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `feuilleDeRoute_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_EF6425D2FB88E14F` (`utilisateur_id`),
  KEY `IDX_EF6425D2F8F947DA` (`feuilleDeRoute_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `peage`
--

CREATE TABLE IF NOT EXISTS `peage` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `numCarte` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `DatePassage` datetime NOT NULL,
  `montant` double NOT NULL,
  `champSup1` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champSup2` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `feuilleDeRoute_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_6D79D943F8F947DA` (`feuilleDeRoute_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `role`
--

CREATE TABLE IF NOT EXISTS `role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nomRole` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `CRUDFDR` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `CRUDFDRPanne` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `CRUDFDRAgence` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `CRUDClientCompeFDL` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `CRUDClientNonCompteFDL` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `affectationVehiculeAffr` tinyint(1) DEFAULT NULL,
  `cloturerFDR` tinyint(1) DEFAULT NULL,
  `cloturerFDRAffr` tinyint(1) DEFAULT NULL,
  `confRecDocCtm` tinyint(1) DEFAULT NULL,
  `confRecDocClient` tinyint(1) DEFAULT NULL,
  `editCompteur` tinyint(1) DEFAULT NULL,
  `pourcentageAssurance` tinyint(1) DEFAULT NULL,
  `CRUDClient` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `CRUDVehicule` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `CRUDChauffeur` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `CRUDUtilisateur` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `CRUDDepot` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `CRUDFiliale` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `CRUDManutentionnaire` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `CRUDIndisponibilite` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `CRUDItineraire` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `CRUDPrestation` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `CRUDTypePrestation` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `CRUDSecteur` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `CRUDTypeConsommation` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `administrer` tinyint(1) DEFAULT NULL,
  `champSup2` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champSup3` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champSup4` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `secteur`
--

CREATE TABLE IF NOT EXISTS `secteur` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `libelle` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `depart` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `arrivee` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `remarques` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `villeappartenance` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champssupp1` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champssupp2` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_8045251FA4D60759` (`libelle`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=6 ;

--
-- Dumping data for table `secteur`
--

INSERT INTO `secteur` (`id`, `libelle`, `depart`, `arrivee`, `remarques`, `villeappartenance`, `champssupp1`, `champssupp2`) VALUES
(1, 'Casa-Tit mellil', NULL, NULL, NULL, 'casablanca', NULL, NULL),
(2, 'Rabat-Casa', NULL, NULL, NULL, 'rabat', NULL, NULL),
(3, 'Maarif', NULL, NULL, NULL, 'casablanca', NULL, NULL),
(4, 'L9amra', NULL, NULL, NULL, 'rabat', NULL, NULL),
(5, 'Marrif1-2', NULL, NULL, NULL, 'casablanca', NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `secteur_typeprestation`
--

CREATE TABLE IF NOT EXISTS `secteur_typeprestation` (
  `secteur_id` int(11) NOT NULL,
  `typeprestation_id` int(11) NOT NULL,
  PRIMARY KEY (`secteur_id`,`typeprestation_id`),
  KEY `IDX_EDA335109F7E4405` (`secteur_id`),
  KEY `IDX_EDA33510435D1DF8` (`typeprestation_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `secteur_typeprestation`
--

INSERT INTO `secteur_typeprestation` (`secteur_id`, `typeprestation_id`) VALUES
(1, 1),
(2, 1),
(3, 1),
(4, 2),
(5, 1),
(5, 2);

-- --------------------------------------------------------

--
-- Table structure for table `typeconsommation`
--

CREATE TABLE IF NOT EXISTS `typeconsommation` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `agence` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `produit` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `prixUnitaire` double NOT NULL,
  `champSup1` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champSup2` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `typeprestation`
--

CREATE TABLE IF NOT EXISTS `typeprestation` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `libelle` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `champssupp1` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champssupp2` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_A8926FA0A4D60759` (`libelle`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=5 ;

--
-- Dumping data for table `typeprestation`
--

INSERT INTO `typeprestation` (`id`, `libelle`, `champssupp1`, `champssupp2`) VALUES
(1, 'LAD', NULL, NULL),
(2, 'RAM', NULL, NULL),
(3, 'Ligne', NULL, NULL),
(4, 'Transfert', NULL, NULL);

-- --------------------------------------------------------

--
-- Table structure for table `utilisateur`
--

CREATE TABLE IF NOT EXISTS `utilisateur` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `role_id` int(11) DEFAULT NULL,
  `depot_id` int(11) NOT NULL,
  `nom` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `prenom` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `login` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `motDePasse` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `matricule` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `cin` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `email` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `tel` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `adresse` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champSup1` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champSup2` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_1D1C63B3AA08CB10` (`login`),
  UNIQUE KEY `UNIQ_1D1C63B3ABE530DA` (`cin`),
  UNIQUE KEY `UNIQ_1D1C63B3F037AB0F` (`tel`),
  KEY `IDX_1D1C63B3D60322AC` (`role_id`),
  KEY `IDX_1D1C63B38510D4DE` (`depot_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `vehicule`
--

CREATE TABLE IF NOT EXISTS `vehicule` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tonnage` double NOT NULL,
  `type` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `remorque` tinyint(1) DEFAULT NULL,
  `disponibilite` tinyint(1) DEFAULT NULL,
  `vidange` bigint(20) DEFAULT NULL,
  `compteur` bigint(20) NOT NULL,
  `matricule` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `champssupp1` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `champssupp2` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQ_292FFF1D12B2DC9C` (`matricule`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;

--
-- Dumping data for table `vehicule`
--

INSERT INTO `vehicule` (`id`, `tonnage`, `type`, `remorque`, `disponibilite`, `vidange`, `compteur`, `matricule`, `champssupp1`, `champssupp2`) VALUES
(1, 10, 'ctm', 0, 1, NULL, 245154, 'mat2014', NULL, NULL),
(2, 20, 'ctm', 0, 1, NULL, 245154, 'mat2015', NULL, NULL);

--
-- Constraints for dumped tables
--

--
-- Constraints for table `boncarburanthuile`
--
ALTER TABLE `boncarburanthuile`
  ADD CONSTRAINT `FK_4ABB48D0C3782501` FOREIGN KEY (`typeConsommation_id`) REFERENCES `typeconsommation` (`id`),
  ADD CONSTRAINT `FK_4ABB48D0F8F947DA` FOREIGN KEY (`feuilleDeRoute_id`) REFERENCES `feuillederoute` (`id`);

--
-- Constraints for table `clientfdrf`
--
ALTER TABLE `clientfdrf`
  ADD CONSTRAINT `FK_77C1CD5E19EB6921` FOREIGN KEY (`client_id`) REFERENCES `client` (`id`),
  ADD CONSTRAINT `FK_77C1CD5EF8F947DA` FOREIGN KEY (`feuilleDeRoute_id`) REFERENCES `feuillederoute` (`id`);

--
-- Constraints for table `clientfdrv`
--
ALTER TABLE `clientfdrv`
  ADD CONSTRAINT `FK_6A76DD3A19EB6921` FOREIGN KEY (`client_id`) REFERENCES `client` (`id`),
  ADD CONSTRAINT `FK_6A76DD3AF8F947DA` FOREIGN KEY (`feuilleDeRoute_id`) REFERENCES `feuillederoute` (`id`);

--
-- Constraints for table `client_secteur`
--
ALTER TABLE `client_secteur`
  ADD CONSTRAINT `FK_D278616219EB6921` FOREIGN KEY (`client_id`) REFERENCES `client` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `FK_D27861629F7E4405` FOREIGN KEY (`secteur_id`) REFERENCES `secteur` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `depot`
--
ALTER TABLE `depot`
  ADD CONSTRAINT `FK_47948BBC5C4BCADC` FOREIGN KEY (`filiale_id`) REFERENCES `filiale` (`id`);

--
-- Constraints for table `feuillederoute`
--
ALTER TABLE `feuillederoute`
  ADD CONSTRAINT `FK_2BA993A64A4A3511` FOREIGN KEY (`vehicule_id`) REFERENCES `vehicule` (`id`),
  ADD CONSTRAINT `FK_2BA993A6578BA7B0` FOREIGN KEY (`missionAffretement_id`) REFERENCES `missionaffretement` (`id`),
  ADD CONSTRAINT `FK_2BA993A65C4BCADC` FOREIGN KEY (`filiale_id`) REFERENCES `filiale` (`id`),
  ADD CONSTRAINT `FK_2BA993A69F7E4405` FOREIGN KEY (`secteur_id`) REFERENCES `secteur` (`id`),
  ADD CONSTRAINT `FK_2BA993A6F023560D` FOREIGN KEY (`typePrestation_id`) REFERENCES `typeprestation` (`id`);

--
-- Constraints for table `feuillederoute_chauffeur`
--
ALTER TABLE `feuillederoute_chauffeur`
  ADD CONSTRAINT `FK_3EDD43094ED2265C` FOREIGN KEY (`feuillederoute_id`) REFERENCES `feuillederoute` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `FK_3EDD430985C0B3BE` FOREIGN KEY (`chauffeur_id`) REFERENCES `chauffeur` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `feuillederoute_manutentionnaire`
--
ALTER TABLE `feuillederoute_manutentionnaire`
  ADD CONSTRAINT `FK_DA0921EC4ED2265C` FOREIGN KEY (`feuillederoute_id`) REFERENCES `feuillederoute` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `FK_DA0921ECAAE024` FOREIGN KEY (`manutentionnaire_id`) REFERENCES `manutentionnaire` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `feuillederoute_utilisateur`
--
ALTER TABLE `feuillederoute_utilisateur`
  ADD CONSTRAINT `FK_C1766A854ED2265C` FOREIGN KEY (`feuillederoute_id`) REFERENCES `feuillederoute` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `FK_C1766A85FB88E14F` FOREIGN KEY (`utilisateur_id`) REFERENCES `utilisateur` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `indisponibilite`
--
ALTER TABLE `indisponibilite`
  ADD CONSTRAINT `FK_8717036F85C0B3BE` FOREIGN KEY (`chauffeur_id`) REFERENCES `chauffeur` (`id`);

--
-- Constraints for table `missionaffretement`
--
ALTER TABLE `missionaffretement`
  ADD CONSTRAINT `FK_F5CA3EB219EB6921` FOREIGN KEY (`client_id`) REFERENCES `client` (`id`);

--
-- Constraints for table `modification`
--
ALTER TABLE `modification`
  ADD CONSTRAINT `FK_EF6425D2F8F947DA` FOREIGN KEY (`feuilleDeRoute_id`) REFERENCES `feuillederoute` (`id`),
  ADD CONSTRAINT `FK_EF6425D2FB88E14F` FOREIGN KEY (`utilisateur_id`) REFERENCES `utilisateur` (`id`);

--
-- Constraints for table `peage`
--
ALTER TABLE `peage`
  ADD CONSTRAINT `FK_6D79D943F8F947DA` FOREIGN KEY (`feuilleDeRoute_id`) REFERENCES `feuillederoute` (`id`);

--
-- Constraints for table `secteur_typeprestation`
--
ALTER TABLE `secteur_typeprestation`
  ADD CONSTRAINT `FK_EDA33510435D1DF8` FOREIGN KEY (`typeprestation_id`) REFERENCES `typeprestation` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `FK_EDA335109F7E4405` FOREIGN KEY (`secteur_id`) REFERENCES `secteur` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `utilisateur`
--
ALTER TABLE `utilisateur`
  ADD CONSTRAINT `FK_1D1C63B38510D4DE` FOREIGN KEY (`depot_id`) REFERENCES `depot` (`id`),
  ADD CONSTRAINT `FK_1D1C63B3D60322AC` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`);

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

redpajama_set_name: RedPajamaGithub


text:
// --- BEGIN LICENSE BLOCK ---

// --- END LICENSE BLOCK ---

package org.jblas;

import junit.framework.TestCase;

public class TestSolve extends TestCase {
    public void testFaultySolveSymmetric() {
        DoubleMatrix A = new DoubleMatrix(3, 3, 2d, 1d, 0d, 2d, 1d, 2d, 0d, 1d, 2d);
        DoubleMatrix x = new DoubleMatrix(1, 3, 1d, 2d, 3d);

        try {
            Solve.solveSymmetric(A, x);
            assertTrue(false);
        } catch (IllegalArgumentException ex) {
            assertEquals("XERBLA: Error on argument 8 (LDB) in DSYSV", ex.getMessage());
        }
    }
}


text:
package com.martiansoftware.jsap.stringparsers;

import com.martiansoftware.jsap.StringParser;
import com.martiansoftware.jsap.ParseException;

/**
 * A {@link com.martiansoftware.jsap.StringParser} for parsing Shorts.  The parse() method delegates the actual
 * parsing to Short.decode(String).  If Short.decode()
 * throws a
 * NumberFormatException, it is encapsulated in a ParseException and re-thrown.
 * @author Marty Lamb
 * @see com.martiansoftware.jsap.StringParser
 * @see java.math.BigDecimal
 */
public class ShortStringParser extends StringParser {

	private static final ShortStringParser INSTANCE = new ShortStringParser();

	/** Returns a {@link ShortStringParser}.
	 *
	 *
Convenient access to the only instance returned by
	 * this method is available through
	 * {@link com.martiansoftware.jsap.JSAP#SHORT_PARSER}.
	 *
	 * @return a {@link ShortStringParser}.
	 */

    public static ShortStringParser getParser() {
		return INSTANCE;
	}

	/**
     * Creates a new ShortStringParser.
     * @deprecated Use {@link #getParser()} or, even better, {@link com.martiansoftware.jsap.JSAP#SHORT_PARSER}.
     */
    public ShortStringParser() {
        super();
    }

    /**
     * Parses the specified argument into a Short.  This method delegates the
     * parsing to Short.decode(String).  If
     * Short.decode() throws a
     * NumberFormatException, it is encapsulated in a ParseException and
     * re-thrown.
     *
     * @param arg the argument to parse
     * @return a Short object with the value contained in the specified
     * argument.
     * @throws ParseException if Short.decode(arg) throws a
     * NumberFormatException.
     * @see java.lang.Short
     * @see com.martiansoftware.jsap.StringParser#parse(String)
     */
    public Object parse(String arg) throws ParseException {
        Short result = null;
        try {
            result = Short.decode(arg);
        } catch (NumberFormatException e) {
            throw (
                new ParseException(
                    "Unable to convert '" + arg + "' to a Short.",
                    e));
        }
        return (result);
    }
}


text:
<?php
    define('DB_NAME', 'simplecms450');
    define('DB_USER', 'simplecmsuser450');
    define('DB_PASSWORD', 'pnaXARH0R_5-');
    define('DB_HOST', 'localhost');

    define('DEFAULT_ADMIN_USERNAME', 'admin');
    define('DEFAULT_ADMIN_PASSWORD', '123456789');
?>


text:
layout: post
title: The day has been interesting.
date: 2013-03-18 16:11 +0530
---

In the night I got an insight on 'Jack's Smirking Revenge' and it is turning  out to be confusing. Need to start rewriting some of the parts to make it less withering.


text:
///<reference path="../../android/widget/AbsSeekBar.ts"/>
///<reference path="../../android/widget/ProgressBar.ts"/>

module android.widget {
import AbsSeekBar = android.widget.AbsSeekBar;
import ProgressBar = android.widget.ProgressBar;
/**
 * A SeekBar is an extension of ProgressBar that adds a draggable thumb. The user can touch
 * the thumb and drag left or right to set the current progress level or use the arrow keys.
 * Placing focusable widgets to the left or right of a SeekBar is discouraged.
 * <p>
 * Clients of the SeekBar can attach a {@link SeekBar.OnSeekBarChangeListener} to
 * be notified of the user's actions.
 *
 * @attr ref android.R.styleable#SeekBar_thumb
 */
export class SeekBar extends AbsSeekBar {

    private mOnSeekBarChangeListener:SeekBar.OnSeekBarChangeListener;

    constructor(context:android.content.Context, bindElement?:HTMLElement, defStyle=android.R.attr.seekBarStyle){
        super(context, bindElement, defStyle);
    }

    onProgressRefresh(scale:number, fromUser:boolean):void  {
        super.onProgressRefresh(scale, fromUser);
        if (this.mOnSeekBarChangeListener != null) {
            this.mOnSeekBarChangeListener.onProgressChanged(this, this.getProgress(), fromUser);
        }
    }

    /**
     * Sets a listener to receive notifications of changes to the SeekBar's progress level. Also
     * provides notifications of when the user starts and stops a touch gesture within the SeekBar.
     *
     * @param l The seek bar notification listener
     *
     * @see SeekBar.OnSeekBarChangeListener
     */
    setOnSeekBarChangeListener(l:SeekBar.OnSeekBarChangeListener):void  {
        this.mOnSeekBarChangeListener = l;
    }

    onStartTrackingTouch():void  {
        super.onStartTrackingTouch();
        if (this.mOnSeekBarChangeListener != null) {
            this.mOnSeekBarChangeListener.onStartTrackingTouch(this);
        }
    }

    onStopTrackingTouch():void  {
        super.onStopTrackingTouch();
        if (this.mOnSeekBarChangeListener != null) {
            this.mOnSeekBarChangeListener.onStopTrackingTouch(this);
        }
    }
}

export module SeekBar{
/**
     * A callback that notifies clients when the progress level has been
     * changed. This includes changes that were initiated by the user through a
     * touch gesture or arrow key/trackball as well as changes that were initiated
     * programmatically.
     */
export interface OnSeekBarChangeListener {

    /**
         * Notification that the progress level has changed. Clients can use the fromUser parameter
         * to distinguish user-initiated changes from those that occurred programmatically.
         *
         * @param seekBar The SeekBar whose progress has changed
         * @param progress The current progress level. This will be in the range 0..max where max
         *        was set by {@link ProgressBar#setMax(int)}. (The default value for max is 100.)
         * @param fromUser True if the progress change was initiated by the user.
         */
    onProgressChanged(seekBar:SeekBar, progress:number, fromUser:boolean):void ;

    /**
         * Notification that the user has started a touch gesture. Clients may want to use this
         * to disable advancing the seekbar.
         * @param seekBar The SeekBar in which the touch gesture began
         */
    onStartTrackingTouch(seekBar:SeekBar):void ;

    /**
         * Notification that the user has finished a touch gesture. Clients may want to use this
         * to re-enable advancing the seekbar.
         * @param seekBar The SeekBar in which the touch gesture began
         */
    onStopTrackingTouch(seekBar:SeekBar):void ;
}
}

}


text:
package shim

import (
	"os"
	"testing"
	"time"

	"github.com/stretchr/testify/require"

	"github.com/influxdata/telegraf"
	tgConfig "github.com/influxdata/telegraf/config"
	"github.com/influxdata/telegraf/plugins/inputs"
	"github.com/influxdata/telegraf/plugins/processors"
)

func TestLoadConfig(t *testing.T) {
	err := os.Setenv("SECRET_TOKEN", "xxxxxxxxxx")
	require.NoError(t, err)
	err = os.Setenv("SECRET_VALUE", `test"\test`)
	require.NoError(t, err)

	inputs.Add("test", func() telegraf.Input {
		return &serviceInput{}
	})

	c := "./testdata/plugin.conf"
	conf, err := LoadConfig(&c)
	require.NoError(t, err)

	inp := conf.Input.(*serviceInput)

	require.Equal(t, "awesome name", inp.ServiceName)
	require.Equal(t, "xxxxxxxxxx", inp.SecretToken)
	require.Equal(t, `test"\test`, inp.SecretValue)
}

func TestLoadingSpecialTypes(t *testing.T) {
	inputs.Add("test", func() telegraf.Input {
		return &testDurationInput{}
	})

	c := "./testdata/special.conf"
	conf, err := LoadConfig(&c)
	require.NoError(t, err)

	inp := conf.Input.(*testDurationInput)

	require.EqualValues(t, 3*time.Second, inp.Duration)
	require.EqualValues(t, 3*1000*1000, inp.Size)
	require.EqualValues(t, 52, inp.Hex)
}

func TestLoadingProcessorWithConfig(t *testing.T) {
	proc := &testConfigProcessor{}
	processors.Add("test_config_load", func() telegraf.Processor {
		return proc
	})

	c := "./testdata/processor.conf"
	_, err := LoadConfig(&c)
	require.NoError(t, err)

	require.EqualValues(t, "yep", proc.Loaded)
}

type testDurationInput struct {
	Duration tgConfig.Duration `toml:"duration"`
	Size     tgConfig.Size     `toml:"size"`
	Hex      int64             `toml:"hex"`
}

func (i *testDurationInput) SampleConfig() string {
	return ""
}

func (i *testDurationInput) Description() string {
	return ""
}
func (i *testDurationInput) Gather(_ telegraf.Accumulator) error {
	return nil
}

type testConfigProcessor struct {
	Loaded string `toml:"loaded"`
}

func (p *testConfigProcessor) SampleConfig() string {
	return ""
}

func (p *testConfigProcessor) Description() string {
	return ""
}
func (p *testConfigProcessor) Apply(metrics ...telegraf.Metric) []telegraf.Metric {
	return metrics
}


text:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
      "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
          "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>

	<class name="cn.jxust.khpj.model.DeptQuota" table="base_department_quota">

		<id name="deptQuotaId" type="java.lang.String" column="department_quota_id">
			<generator class="uuid.hex" />
		</id>

		<property name="deptType" type="java.lang.String"
			column="department_type" length="2">
		</property>

		<property name="inused" type="java.lang.Integer"
			column="in_used" length="2">
		</property>

		<many-to-one name="quota" column="quota_id"
			class="cn.jxust.khpj.model.Quota" cascade="delete" not-null="true" />
	</class>
</hibernate-mapping>


text:
import path from 'path'
import ts from 'typescript'
import { VirtualTypeScriptEnvironment } from '@typescript/vfs'
import { BaseService, fetchWithCredentials } from './base'
import stdLibs from './node-libs.json'
import { without, uniq } from 'lodash-es'
import { HintRequest } from '../types'

function getFullLibName(name: string) {
  return `/node_modules/@types/${name}/index.d.ts`
}

// FIXME: Very slow when click type `string`
// TODO: Go to definition for third party libs
export class TsService extends BaseService {
  constructor(public system: ts.System, public env: VirtualTypeScriptEnvironment) {
    super()
  }

  async addFile(req: HintRequest) {
    if (this.system.fileExists(req.file)) return

    this.env.createFile(req.file, req.code)

    // get third party deps
    let deps: string[] = []

    for (const reg of [/[import|export].*?from\s*?['"](.*?)['"]/g, /require\(['"](.*?)['"]\)/g]) {
      // TODO: Exclude comment
      const matches = req.code.match(reg) || []
      // console.log(reg, matches)
      // Exclude node standard libs
      deps = [
        ...deps,
        ...without(
          matches
            .map((str) => str.replace(reg, '$1'))
            .map((str) => str.split('/')[0]) // Extract correct lib of `lodash/throttle`
            .filter((item) => item[0] !== '.'), // Exclude relative path, like `./xxx`
          ...stdLibs
        ),
      ]
    }

    deps = uniq(deps)
    console.log('deps:', deps)

    // try to get type definitions
    await Promise.all(
      deps.map(async (name) => {
        const fullname = getFullLibName(name)
        if (this.system.fileExists(fullname)) return

        const prefix = 'https://cdn.jsdelivr.net/npm'
        try {
          // Find typings file path
          const packageJson = await fetch(`${prefix}/${name}/package.json`).then<Record<string, unknown>>((res) =>
            res.json()
          )

          const typeFile = packageJson.types ?? packageJson.typings

          // if types not specified, try DefinitelyTyped
          const url = typeFile
            ? path.join(`${prefix}/${name}`, typeFile as string)
            : `${prefix}/@types/${name}/index.d.ts`

          this.env.createFile(getFullLibName(name), await fetchWithCredentials(url))
        } catch (err) {
          console.error(err)
        }
      })
    )
  }

  getOccurrences(req: HintRequest) {
    const s = this.env.getSourceFile(req.file)
    if (s) {
      let position: number
      try {
        position = s.getPositionOfLineAndCharacter(req.line, req.character)
      } catch (err) {
        console.error(err)
        return
      }
      const references = this.env.languageService.getReferencesAtPosition(req.file, position)
      if (references) {
        return references
          .filter(({ fileName }) => fileName === req.file)
          .map((reference) => ({
            isWriteAccess: reference.isWriteAccess,
            range: s.getLineAndCharacterOfPosition(reference.textSpan.start),
            width: reference.textSpan.length,
          }))
      }
    }
  }

  getDefinition(req: HintRequest) {
    const s = this.env.getSourceFile(req.file)
    if (s) {
      let position: number
      try {
        position = s.getPositionOfLineAndCharacter(req.line, req.character)
      } catch (err) {
        console.error(err)
        return
      }
      const definitions = this.env.languageService.getDefinitionAtPosition(req.file, position)
      if (definitions) {
        const infosOfCurrentFile = definitions.filter((d) => d.fileName === req.file)
        if (infosOfCurrentFile.length) {
          return s.getLineAndCharacterOfPosition(infosOfCurrentFile[0].textSpan.start)
        }
      }
    }
  }

  getQuickInfo(req: HintRequest) {
    const s = this.env.getSourceFile(req.file)
    if (s) {
      let position: number
      try {
        position = s.getPositionOfLineAndCharacter(req.line, req.character)
      } catch (err) {
        console.error(err)
        return
      }
      const quickInfo = this.env.languageService.getQuickInfoAtPosition(req.file, position)
      if (quickInfo?.displayParts) {
        // TODO: Colorize display parts
        return {
          info: quickInfo.displayParts,
          range: s.getLineAndCharacterOfPosition(quickInfo.textSpan.start),
          width: quickInfo.textSpan.length,
        }
      }
    }
  }
}


text:
<?php
namespace Aws\MigrationHubConfig\Exception;

use Aws\Exception\AwsException;

/**
 * Represents an error interacting with the **AWS Migration Hub Config** service.
 */
class MigrationHubConfigException extends AwsException {}


text:
package mock_room

import (
	room "github.com/dnp1/conversa/server/data/room"
	errors "github.com/dnp1/conversa/server/errors"
	gomock "github.com/golang/mock/gomock"
)

// Mock of Model interface
type MockModel struct {
	ctrl     *gomock.Controller
	recorder *_MockModelRecorder
}

// Recorder for MockModel (not exported)
type _MockModelRecorder struct {
	mock *MockModel
}

func NewMockModel(ctrl *gomock.Controller) *MockModel {
	mock := &MockModel{ctrl: ctrl}
	mock.recorder = &_MockModelRecorder{mock}
	return mock
}

func (_m *MockModel) EXPECT() *_MockModelRecorder {
	return _m.recorder
}

func (_m *MockModel) All() ([]room.Data, errors.Error) {
	ret := _m.ctrl.Call(_m, "All")
	ret0, _ := ret[0].([]room.Data)
	ret1, _ := ret[1].(errors.Error)
	return ret0, ret1
}

func (_mr *_MockModelRecorder) All() *gomock.Call {
	return _mr.mock.ctrl.RecordCall(_mr.mock, "All")
}

func (_m *MockModel) Create(_param0 string, _param1 string) errors.Error {
	ret := _m.ctrl.Call(_m, "Create", _param0, _param1)
	ret0, _ := ret[0].(errors.Error)
	return ret0
}

func (_mr *_MockModelRecorder) Create(arg0, arg1 interface{}) *gomock.Call {
	return _mr.mock.ctrl.RecordCall(_mr.mock, "Create", arg0, arg1)
}

func (_m *MockModel) Delete(_param0 string, _param1 string) errors.Error {
	ret := _m.ctrl.Call(_m, "Delete", _param0, _param1)
	ret0, _ := ret[0].(errors.Error)
	return ret0
}

func (_mr *_MockModelRecorder) Delete(arg0, arg1 interface{}) *gomock.Call {
	return _mr.mock.ctrl.RecordCall(_mr.mock, "Delete", arg0, arg1)
}

func (_m *MockModel) Rename(_param0 string, _param1 string, _param2 string) errors.Error {
	ret := _m.ctrl.Call(_m, "Rename", _param0, _param1, _param2)
	ret0, _ := ret[0].(errors.Error)
	return ret0
}

func (_mr *_MockModelRecorder) Rename(arg0, arg1, arg2 interface{}) *gomock.Call {
	return _mr.mock.ctrl.RecordCall(_mr.mock, "Rename", arg0, arg1, arg2)
}


text:
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE TupleSections #-}

--------------------------------------------------------------------------------
-- | Solve a system of horn-clause constraints ---------------------------------
--------------------------------------------------------------------------------

module Language.Fixpoint.Solver.Solve (solve, interpolation) where

-- import           Control.Concurrent (threadDelay)
import           Control.Monad (filterM)
import           Control.Monad.State.Strict (lift)
import qualified Data.HashMap.Strict  as M
-- import           Language.Fixpoint.Utils.Progress
import           Language.Fixpoint.Misc
import qualified Language.Fixpoint.Types as F
import           Language.Fixpoint.Types.PrettyPrint
import           Language.Fixpoint.Types.Config hiding (stats)
import qualified Language.Fixpoint.Solver.Solution as S
import qualified Language.Fixpoint.Solver.Worklist as W
import           Language.Fixpoint.Solver.Monad
import           Language.Fixpoint.Solver.Validate (sanitize)

-- DEBUG
import           Text.Printf
import           System.Console.CmdArgs.Verbosity (whenLoud)
import           Control.DeepSeq

--------------------------------------------------------------------------------
solve :: (NFData a, F.Fixpoint a) => Config -> S.Solution -> F.SInfo a -> IO (F.Result a)
--------------------------------------------------------------------------------
solve cfg s0 fi = do
    -- donePhase Loud "Worklist Initialize"
    (res, stat) <- runSolverM cfg fi n act
    whenLoud $ printStats fi wkl stat
    -- print (numIter stat)
    return res
  where
    wkl  = W.init fi
    n    = fromIntegral $ W.wRanks wkl
    act  = solve_ fi s0 wkl

printStats :: F.SInfo a ->  W.Worklist a -> Stats -> IO ()
printStats fi w s = putStrLn "\n" >> ppTs [ ptable fi, ptable s, ptable w ]
  where
    ppTs          = putStrLn . showpp . mconcat

--------------------------------------------------------------------------------
solve_ :: (NFData a, F.Fixpoint a)
       => F.SInfo a -> S.Solution -> W.Worklist a
       -> SolveM (F.Result a, Stats)
--------------------------------------------------------------------------------
solve_ fi s0 wkl = do
  let s0'  = mappend s0 $ {-# SCC "sol-init" #-} S.init fi
  s       <- {-# SCC "sol-refine" #-} refine s0' wkl
  st      <- stats
  res     <- {-# SCC "sol-result" #-} result wkl s
  let res' = {-# SCC "sol-tidy"   #-} tidyResult res
  return $!! (res', st)

-- | tidyResult ensures we replace the temporary kVarArg names
--   introduced to ensure uniqueness with the original names
--   appearing in the supplied WF constraints.

tidyResult :: F.Result a -> F.Result a
tidyResult r = r { F.resSolution = tidySolution (F.resSolution r) }

tidySolution :: F.FixSolution -> F.FixSolution
tidySolution = fmap tidyPred

tidyPred :: F.Expr -> F.Expr
tidyPred = F.substf (F.eVar . F.tidySymbol)

--------------------------------------------------------------------------------
refine :: S.Solution -> W.Worklist a -> SolveM S.Solution
--------------------------------------------------------------------------------
refine s w
  | Just (c, w', newScc, rnk) <- W.pop w = do
     i       <- tickIter newScc
     (b, s') <- refineC i s c
     lift $ writeLoud $ refineMsg i c b rnk
     let w'' = if b then W.push c w' else w'
     refine s' w''
  | otherwise = return s

-- DEBUG
refineMsg i c b rnk = printf "\niter=%d id=%d change=%s rank=%d\n"
                        i (F.subcId c) (show b) rnk

---------------------------------------------------------------------------
-- | Single Step Refinement -----------------------------------------------
---------------------------------------------------------------------------
refineC :: Int -> S.Solution -> F.SimpC a -> SolveM (Bool, S.Solution)
---------------------------------------------------------------------------
refineC _i s c
  | null rhs  = return (False, s)
  | otherwise = do lhs   <- lhsPred  s c <$> getBinds
                   kqs   <- filterValid lhs rhs
                   return $ S.update s ks {- tracepp (msg ks rhs kqs) -} kqs
  where
    (ks, rhs) = rhsCands s c
    -- msg ks xs ys = printf "refineC: iter = %d, ks = %s, rhs = %d, rhs' = %d \n" _i (showpp ks) (length xs) (length ys)

lhsPred :: S.Solution -> F.SimpC a -> F.BindEnv -> F.Expr
lhsPred s c be = F.pAnd pBinds
  where
    pBinds     = S.apply s <$> xts
    xts        = F.envCs be $  F.senv c

rhsCands :: S.Solution -> F.SimpC a -> ([F.KVar], S.Cand (F.KVar, S.EQual))
rhsCands s c   = (fst <$> ks, kqs)
  where
    kqs        = [ cnd k su q | (k, su) <- ks, q <- S.lookup s k]
    ks         = predKs . F.crhs $ c
    cnd k su q = (F.subst su (S.eqPred q), (k, q))

predKs :: F.Expr -> [(F.KVar, F.Subst)]
predKs (F.PAnd ps)    = concatMap predKs ps
predKs (F.PKVar k su) = [(k, su)]
predKs _              = []

---------------------------------------------------------------------------
-- | Convert Solution into Result -----------------------------------------
---------------------------------------------------------------------------
result :: (F.Fixpoint a) => W.Worklist a -> S.Solution -> SolveM (F.Result a)
---------------------------------------------------------------------------
result wkl s = do
  let sol  = M.map (F.pAnd . fmap S.eqPred) s
  stat    <- result_ wkl s
  return   $ F.Result (F.sinfo <$> stat) sol

result_ :: W.Worklist a -> S.Solution -> SolveM (F.FixResult (F.SimpC a))
result_  w s   = res <$> filterM (isUnsat s) cs
  where
    cs         = W.unsatCandidates w
    res []     = F.Safe
    res cs'    = F.Unsafe cs'
    -- isUnsat' c = lift progressTick >> isUnsat s c

---------------------------------------------------------------------------
isUnsat :: S.Solution -> F.SimpC a -> SolveM Bool
---------------------------------------------------------------------------
isUnsat s c = do
  lp    <- lhsPred s c <$> getBinds
  let rp = rhsPred s c
  not   <$> isValid lp rp

isValid :: F.Expr -> F.Expr -> SolveM Bool
isValid p q = (not . null) <$> filterValid p [(q, ())]

rhsPred :: S.Solution -> F.SimpC a -> F.Expr
rhsPred s c = S.apply s $ F.crhs c

---------------------------------------------------------------------------
interpolation :: Config -> F.SInfo a -> F.Expr -> IO F.Expr
---------------------------------------------------------------------------
interpolation cfg fi p = runSolverM cfg fi' 0 $ interpolationSolver fi' p
  where Right fi' = sanitize fi

{-
donePhase' :: String -> SolveM ()
---------------------------------------------------------------------------
donePhase' msg = lift $ do
  threadDelay 25000
  putBlankLn
  donePhase Loud msg
-}


text:
namespace ETL
{
namespace Threading
{
	Mutex::Mutex() : m_WriteLock(SRWLOCK_INIT)
	{
		m_ReadCount.store(0);
		m_bIsWriteLocked.store(false);
	}

	void Mutex::LockRead()
	{
		AcquireSRWLockExclusive(&m_WriteLock);
		++m_ReadCount;
		ReleaseSRWLockExclusive(&m_WriteLock);
	}

	void Mutex::LockWrite()
	{
		AcquireSRWLockExclusive(&m_WriteLock);
		m_WaitLock.Wait([this]() { return m_ReadCount > 0; });
		m_bIsWriteLocked.store(true);
	}

	void Mutex::UnlockRead()
	{
		m_WaitLock.WakeAll([this]() {
			--m_ReadCount;
			return m_ReadCount == 0;
		});
	}

	void Mutex::UnlockWrite()
	{
		m_bIsWriteLocked.store(false);
		ReleaseSRWLockExclusive(&m_WriteLock);
	}
}
}

#endif


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright 2015 Vincent Brison.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~    http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<resources>
    <string name="share_title">My rank on Pi computing bench</string>
    <string name="app_name">vb-android-app-quality</string>
    <string name="desc_pi">Enter the number of digits of Pi to compute : </string>
    <string name="compute">Compute</string>
    <string name="rank">Rank this result online</string>
    <string name="share">Share the result</string>
    <string name="computing">Pi is computing</string>
    <string name="network_issue">Network issue</string>
</resources>


text:
export function Viewport(el) {
    var size;
    this.el = el;

    var calculateSize = () => {
        return size = {
            top: calcYPos(el),
            height: el.clientHeight || el.innerHeight
        };
    };

    this.size = function () {
        return size || calculateSize();
    };

    this.getScrollTop = function () {
        var scrollTop = el.scrollTop;

        if (typeof scrollTop === 'undefined') {
            scrollTop = el.scrollY || el.pageYOffset;
        }

        return scrollTop;
    };

    this.reset = function () {
        size = null;
    };
}

export function ContentBox(el, items, itemHeight) {
    var size;
    this.el = el;

    var calculateSize = () => {
        return size = {
            top: calcYPos(this.el),
            height: items.length * itemHeight
        };
    };

    this.size = function () {
        return size || calculateSize();
    };

    this.reset = function () {
        size = null;
    };
}

function calcYPos(el) {
    if (el === window) return 0;
    var y = 0;

    while (!!el) {
        y += el.offsetTop;
        el = el.offsetParent;
    }

    return y;
}


text:
namespace views {

class NativeComboboxGtk : public NativeControlGtk,
                          public NativeComboboxWrapper {
 public:
  explicit NativeComboboxGtk(Combobox* combobox);
  virtual ~NativeComboboxGtk();

  // Overridden from NativeComboboxWrapper:
  virtual void UpdateFromModel();
  virtual void UpdateSelectedItem();
  virtual void UpdateEnabled();
  virtual int GetSelectedItem() const;
  virtual bool IsDropdownOpen() const;
  virtual gfx::Size GetPreferredSize() const;
  virtual View* GetView();
  virtual void SetFocus();
  virtual gfx::NativeView GetTestingHandle() const;

 protected:
  // Overridden from NativeControlGtk:
  virtual void CreateNativeControl();
  virtual void NativeControlCreated(GtkWidget* widget);

 private:
  // The combobox we are bound to.
  Combobox* combobox_;

  DISALLOW_COPY_AND_ASSIGN(NativeComboboxGtk);
};

}  // namespace views

#endif  // VIEWS_CONTROLS_COMBOBOX_NATIVE_COMBOBOX_GTK_H_


text:
@implementation AppDelegate

- (void)applicationDidFinishLaunching:(__unused NSNotification *)aNotification
{
    // Insert code here to initialize your application
}

@end


text:
package com.bm.classify.sampling.filter.impl;

import com.bm.classify.sampling.filter.IPkIdFilter;

import java.util.Set;

/**
 * Diese Klasse holt die ausgewaehlten indexe heraus.
 *
 * @param <T> -
 *            der typ (untertyp vom sampleable)
 * @author Daniel Wiese
 * @since 18.08.2006
 */
public final class SelectedIdsFilter<T> implements IPkIdFilter<T> {

	private final Set<Long> selectedIds;

	/**
	 * Constructor.
	 *
	 * @param selectedIds -
	 *                    ein set mit den indexen den beispielen, die ausgewahlt werden
	 *                    sollen
	 */
	public SelectedIdsFilter(Set<Long> selectedIds) {
		this.selectedIds = selectedIds;
	}

	/**
	 * Prufet ob ein flat file objekt valide ist.
	 *
	 * @param object -
	 *               des objekt was auf die validitaet geprueft werden soll.
	 * @param index  -
	 *               der aktuell gelesene index, 0 basierend
	 * @return - true wenn valid
	 * @author Daniel Wiese
	 * @see com.bm.classify.sampling.Filter#isValid(java.lang.Object)
	 * @since 18.08.2006
	 */
	public boolean isValid(T object, int index) {
		return true;
	}

	/**
	 * Wenn loadOnlySelsectedIds() false liefert dann wird diese methode
	 * aufgerufem die bestimmt welche id's im Flat file ueberhaubt geladen werden.
	 *
	 * @return die indexe die geladen werden sollen
	 * @author Daniel Wiese
	 * @see com.bm.classify.sampling.filter.IPkIdFilter#getIdsToLoad()
	 * @since 22.08.2006
	 */
	public Set<Long> getIdsToLoad() {
		return this.selectedIds;
	}

	/**
	 * Wenn loadOnlySelsectedIds() false liefert dann wird diese methode
	 * aufgerufem die bestimmt welche id�s im Flat file ueberhaubt geladen werden.
	 *
	 * @return die indexe die geladen werden sollen
	 * @author Daniel Wiese
	 * @see com.bm.classify.sampling.filter.IPkIdFilter#loadOnlySelsectedIds()
	 * @since 22.08.2006
	 */
	public boolean loadOnlySelsectedIds() {
		return true;
	}

}


text:
/*
 * The very first increment of Droppables&Draggables demo. The code is going to
 * be more concise (remove unnecessary code repetitions etc.). And imho the
 * photo management is a good candidate for demonstration of more jQuery UI
 * components (sortables, selectables...). More to come...
 *
 */

$(window).bind('load', function() {
	// make images in the gallery draggable
	$('ul.gallery img').addClass('img_content').draggable({
		helper: 'clone'
	});

	// make the trash box droppable, accepting images from the content section only
	$('#trash div').droppable({
		accept: '.img_content',
		activeClass: 'active',
		drop: function(ev, ui) {
			var $that = $(this);
			ui.draggable.parent().fadeOut('slow', function() {
				ui.draggable
					.hide()
					.appendTo($that)
					.fadeIn('slow')
					.animate({
						width: '72px',
						height: '54px'
					})
					.removeClass('img_content')
					.addClass('img_trash');
				$(this).remove();
			});
		}
	});

	// make the shredder box droppable, accepting images from both content and trash sections
	$('#shred div').droppable({
		accept: '.img_content, .img_trash',
		activeClass: 'active',
		drop: function(ev, ui) {
			var $that = $(this);
			// images from the content
			if (ui.draggable.hasClass('img_content')) {
				ui.draggable.parent().fadeOut('slow', function() {
					ui.draggable
						.appendTo($that)
						.animate({
							width: '0',
							height: '0'
						}, 'slow', function(){
							$(this).remove();
						});
					$(this).remove();
				});
			}
			// images from the trash
			else if (ui.draggable.hasClass('img_trash')) {
				ui.draggable
					.appendTo($that)
					.animate({
						width: '0',
						height: '0'
					}, 'slow', function(){
						$(this).remove();
					});
			}
		}
	});

	// make the gallery droppable as well, accepting images from the trash only
	$('ul.gallery').droppable({
		accept: '.img_trash',
		activeClass: 'active',
		drop: function(ev, ui) {
			var $that = $(this);
			ui.draggable.fadeOut('slow', function() {
				var $item = createGalleryItem(this).appendTo($that);
				$(this)
					.removeClass('img_trash')
					.addClass('img_content')
					.css({ width: '144px', height: '108px' })
					.show();
				$item.fadeIn('slow');
			});
		}
	});

	// handle the trash icon behavior
	$('a.tb_trash').livequery('click', function() {
		var $this = $(this);
		var $img = $this.parent().siblings('img');
		var $item = $this.parents('li');

		$item.fadeOut('slow', function() {
			$img
				.hide()
				.appendTo('#trash div')
				.fadeIn('slow')
				.animate({
					width: '72px',
					height: '54px'
				})
				.removeClass('img_content')
				.addClass('img_trash');
			$(this).remove();
		});

		return false;
	});

	// handle the magnify button
	$('a.tb_supersize').livequery('click', function() {
		$('')
			.attr('src', $(this).attr('href'))
			.appendTo('#body_wrap')
			.displayBox();
		return false;
	});
});

function createGalleryItem(img) {
	var title = img.getAttribute('alt');
	var href = img.getAttribute('src').replace(/thumbs\//, '');

	var $item = $('

'+title+'

Trash meSee me supersized

').hide();
	$item.prepend($(img));

	return $item;
}


text:
package com.danielasfregola.twitter4s.entities

import com.danielasfregola.twitter4s.helpers.FixturesSupport
import org.json4s.native.Serialization
import org.specs2.mutable.Specification

class ProfileImageSpec extends Specification with FixturesSupport {

  "ProfileImage" should {

    "generate 4 type of image sizes from the original picture url string" in {
      val profile = ProfileImage("test_size.ext")

      profile.default === "test.ext"
      profile.mini === "test_mini.ext"
      profile.normal === "test_normal.ext"
      profile.bigger === "test_bigger.ext"
    }

    "deserialized as None if empty profile image url is provided" in {
      val originalJson = load("/twitter/rest/users/empty-user-profile-url.json")

      val user = Serialization.read[User](originalJson)

      user.profile_image_url_https must beEmpty
      user.profile_image_url_https must beEmpty
    }
  }

}


text:
#ifndef _INTERRUPT_DXE_H__
#define _INTERRUPT_DXE_H__

#include "Tiano.h"
#include "EfiDriverLib.h"

//
// Produced protocols
//
#include EFI_PROTOCOL_PRODUCER (Mips32Interrupt)

//
// Interrupt definitions
//

//
// Protocol Function Prototypes
//
EFI_STATUS
EFIAPI
Mips32InterruptGetMask (
  IN EFI_MIPS32_INTRRUPT_PROTOCOL        * This,
  OUT UINT32                             *IntrMask OPTIONAL
  )
/*++

  Routine Description:
    Get the MIPS32 CP0 internal interrupt mask.

  Arguments:
    This               - Protocol instance pointer.
    IntrMask         - Bit 0 is Intr0 - Bit 7 is Intr7

  Returns:
    EFI_SUCCESS

--*/
;

EFI_STATUS
EFIAPI
Mips32InterruptSetMask (
  IN EFI_MIPS32_INTRRUPT_PROTOCOL        * This,
  OUT UINT32                             *IntrMask OPTIONAL
  )
/*++

  Routine Description:
    Set the MIPS32 CP0 internal interrupt mask.

  Arguments:
    This               - Protocol instance pointer.
    IntrMask         - Bit 0 is Intr0 - Bit 7 is Intr7

  Returns:
    EFI_SUCCESS
    EFI_INVALID_PARAMETER - Mask not valid

--*/
;

EFI_STATUS
EFIAPI
Mips32InterruptGetVector (
  IN EFI_MIPS32_INTRRUPT_PROTOCOL          * This,
  IN  EFI_MIPS32_INTR                      Intr,
  OUT UINT32                               *Vector
  )
/*++

  Routine Description:
    Convert from INTR number to processor interrupt vector number.

  Arguments:
    This    - Protocol instance pointer.
    Intr    - MIPS32 CP0 status interrupt 0 -7
    Vector  - Processor vector number

  Returns:
    EFI_SUCCESS
    EFI_INVALID_PARAMETER - Intr not valid

--*/
;

EFI_STATUS
EFIAPI
Mips32InterruptEnableIntr (
  IN EFI_MIPS32_INTRRUPT_PROTOCOL           * This,
  IN  EFI_MIPS32_INTR                       Intr
  )
/*++

  Routine Description:
    Enable Intr by unmasking interrupt in cp0 status

  Arguments:
    This           - Protocol instance pointer.
    Intr           - MIPS32 CP0 status interrupt 0 -7

  Returns:
    EFI_SUCCESS           - Intr enabled in status
    EFI_INVALID_PARAMETER - Intr not valid

--*/
;

EFI_STATUS
EFIAPI
Mips32InterruptDisableIntr (
  IN EFI_MIPS32_INTRRUPT_PROTOCOL           * This,
  IN  EFI_MIPS32_INTR                      Intr
  )
/*++

  Routine Description:
    Disable Intr by masking interrupt in cp0 status
    if Intr is EfiMips32CauseIntrMax then disable all Intr.

  Arguments:
    This           - Protocol instance pointer.
    Intr           - MIPS32 CP0 status interrupt 0 -7

  Returns:
    EFI_SUCCESS           - Intr enabled in status
    EFI_INVALID_PARAMETER - Intr not valid

--*/
;

EFI_STATUS
EFIAPI
Mips32InterruptClearPendingIntr (
  IN EFI_MIPS32_INTRRUPT_PROTOCOL          * This,
  IN  EFI_MIPS32_INTR                      Intr
  )
/*++

  Routine Description:
    Clear Intr pending in cp0 cause.
    if Intr is EfiMips32CauseIntrMax then clear all pending status.

  Arguments:
    This           - Protocol instance pointer.
    Intr           - MIPS32 CP0 status interrupt 0 -7

  Returns:
    EFI_SUCCESS           - Clear success
    EFI_INVALID_PARAMETER - Intr not valid

--*/
;

#endif


text:
#pragma once

#include "Shader.h"
#include "Texture.h"
#include "TextFont.h"
#include "Vertex.h"
#include "VertexFormat.h"

#include <glm/fwd.hpp>
#include <mutex>
#include <string>
#include <unordered_map>
#include <vector>

class Renderer
{
private:
	std::mutex		m_mtx;

public:

	static Renderer *iRenderer;

	static Shader *default_shader;
	static Texture *blocks_texture;
	static Texture *items_texture;
	static TextFont *font_texture;

	Renderer( std::string version );
	~Renderer();

	static void *	getWindow( std::string name );
	static void		addWindow( std::string name, void *window );

	// -- Information
	static const char * getDriverVendor();
	static const char * getShaderVersion();

	// -- Lighting
	void initLights();
	uint32_t  addPointLight( );
	uint32_t  addDirectionalLight( );
	uint32_t  addSpotLight( );
	void setDirectionalLight( uint32_t light_index, glm::vec3 position, glm::vec4 diffuse, glm::vec4 ambient, float specular_strength );
	void setPointLight( uint32_t light_index, glm::vec3 position, glm::vec4 diffuse, glm::vec4 ambient, float specular_strength );
	void setSpotLight( uint32_t light_index, glm::vec3 position, glm::vec3 at_angle, float cone_angle, glm::vec4 diffuse, glm::vec4 ambient, float specular_strength );

	/** @fn updateLights();
	 ** @brief Update all the lights in the scene to the GPU.
	 ** This method will update all of the scene lights, processing any renderer controlled aspects before
	 ** uploading them to the current shader. For each shader used in a scene, the lights should be updated.
	 **/
	void updateLights();

	std::mutex & getMutex() { return this->m_mtx; }
};


text:
{- |
module: $Header$
description: OpenTheory QuickCheck interface
license: MIT

maintainer: Joe Leslie-Hurd <joe@gilith.com>
stability: provisional
portability: portable
-}
module OpenTheory.Primitive.Test
  ( assert,
    check )
where

import qualified Test.QuickCheck as QuickCheck

assert :: String -> Bool -> IO ()
assert desc prop =
    do putStr desc
       if prop
         then putStrLn "+++ OK"
         else
           do putStr "**"
              putStrLn "* Failed!"
              error "Assertion failed"

check :: QuickCheck.Testable prop => String -> prop -> IO ()
check desc prop =
    do putStr desc
       res <- QuickCheck.quickCheckWithResult args prop
       case res of
         QuickCheck.Failure {} -> error "Proposition failed"
         _ -> return ()
  where
    args = QuickCheck.stdArgs {QuickCheck.maxSuccess = 100}


text:
<resources>
    <string name="app_name">RNMK Demo</string>
</resources>


text:
/*
 * 一个拥有数字下标(numeric indexes)和键值(key)的集合类
 * 参考ExtJs实现,Ext.util.MixedCollection 去掉了部分功能
 */
(function (hf, undefined) {
  'use strict';
  /**
   * javascript 集合类
   *
   * @returns {HopeFuture.Collection}
   */
  function collection(keyFn) {
    /*jshint -W040 */
    this.items = [];
    this.map = {};
    this.keys = [];
    this.length = 0;
    if (keyFn) {
      this.getKey = keyFn;
    }
  }

  jQuery.extend(collection.prototype, {
    /**
     * default return object id
     */
    getKey: function (o) {
      return o.id;
    },

    getItems: function(){
     return this.items;
    },

    /**
     * add to a item
     */
    add: function (key, o) {
      if (arguments.length === 1) {
        o = arguments[0];
        key = this.getKey(o);
      }
      if (typeof key !== 'undefined' && key !== null) {
        var old = this.map[key];
        if (typeof old !== 'undefined') {
          return this.replace(key, o);
        }
        this.map[key] = o;
      }
      this.length++;
      this.items.push(o);
      this.keys.push(key);
      return o;
    },
    replace: function (key, o) {
      if (arguments.length === 1) {
        o = arguments[0];
        key = this.getKey(o);
      }
      var old = this.map[key];
      if (typeof key === 'undefined' || key === null || typeof old === 'undefined') {
        return this.add(key, o);
      }
      var index = this.indexOfKey(key);
      this.items[index] = o;
      this.map[key] = o;
      return o;
    },
    addAll: function (objs) {
      if (arguments.length > 1 || Object.prototype.toString.apply(objs) === '[object Array]') {
        var args = arguments.length > 1 ? arguments : objs;
        for (var i = 0, len = args.length; i < len; i++) {
          this.add(args[i]);
        }
      } else {
        //忽略 forin 的校验
        /*jshint -W089 */
        for (var key in objs) {
          this.add(key, objs[key]);
        }
      }
    },
    insert: function (index, key, o) {
      if (arguments.length === 2) {
        o = arguments[1];
        key = this.getKey(o);
      }
      if (this.containsKey(key)) {
        this.removeKey(key);
      }
      if (index >= this.length) {
        return this.add(key, o);
      }
      this.length++;
      this.items.splice(index, 0, o);
      if (typeof key !== 'undefined' && key !== null) {
        this.map[key] = o;
      }
      this.keys.splice(index, 0, key);
      return o;
    },
    key: function (key) {
      return this.map[key];
    },
    item: function (key) {
      var mk = this.map[key];
      return mk !== undefined ? mk : (typeof key === 'number') ? this.items[key] : undefined;
    },
    itemAt: function (index) {
      return this.items[index];
    },
    removeAt: function (index) {
      if (index < this.length && index >= 0) {
        this.length--;
        var o = this.items[index];
        this.items.splice(index, 1);
        var key = this.keys[index];
        if (typeof key !== 'undefined') {
          delete this.map[key];
        }
        this.keys.splice(index, 1);
        return o;
      }
      return false;
    },
    /**
     * Removed an item associated with the passed key fom the collection.
     * @param {String} key The key of the item to remove.
     * @return {Object} The item removed or false if no item was removed.
     */
    removeByKey: function (key) {
      return this.removeAt(this.indexOfKey(key));
    },
    removeAll: function () {
      this.length = 0;
      this.items = [];
      this.keys = [];
      this.map = {};
    },
    getCount: function () {
      return this.length;
    },
    contains: function (o) {
      return this.indexOf(o) !== -1;
    },
    containsKey: function (key) {
      return typeof this.map[key] !== 'undefined';
    },
    indexOfKey: function (key) {
      return this.keys.indexOf(key);
    },
    indexOf: function (o) {
      return this.items.indexOf(o);
    },
    each: function (fn, scope) {
      var items = [].concat(this.items); // each safe for removal to
      // clone array
      for (var i = 0, len = items.length; i < len; i++) {
        if (fn.call(scope || items[i], items[i], i, len) === false) {
          break;
        }
      }
    },
    /**
     * Returns the first item in the collection which elicits a true return value from the
     * passed selection function.
     * @param {Function} fn The selection function to execute for each item.
     * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to the browser window.
     * @return {Object} The first item in the collection which returned true from the selection function.
     */
    find: function (fn, scope) {
      for (var i = 0, len = this.items.length; i < len; i++) {
        if (fn.call(scope || window, this.items[i], this.keys[i])) {
          return this.items[i];
        }
      }
      return null;
    },
    clone: function () {
      var r = new $.everbridge.platform.Collection();
      var k = this.keys, it = this.items;
      for (var i = 0, len = it.length; i < len; i++) {
        r.add(k[i], it[i]);
      }
      r.getKey = this.getKey;
      return r;
    }
  });

  hf.Collection = collection;

})(HopeFuture);/*jshint -W117 */


text:
namespace policy {

// File based policy provider that coordinates watching and reloading policy
// information from the configuration path. Actual logic for loading policy
// information is handled by a delegate passed at construction time.
class FileBasedPolicyProvider : public AsynchronousPolicyProvider {
 public:

  // Delegate interface for actual policy loading from the system.
  class ProviderDelegate : public AsynchronousPolicyProvider::Delegate {
   public:
    explicit ProviderDelegate(const FilePath& config_file_path);
    virtual ~ProviderDelegate();

    // AsynchronousPolicyProvider::Delegate implementation:
    virtual PolicyMap* Load() = 0;

    // Gets the last modification timestamp for the policy information from the
    // filesystem. Returns base::Time() if the information is not present, in
    // which case Load() should return an empty dictionary.
    virtual base::Time GetLastModification() = 0;

    const FilePath& config_file_path() { return config_file_path_; }

   private:
    const FilePath config_file_path_;

    DISALLOW_COPY_AND_ASSIGN(ProviderDelegate);
  };

  // Assumes ownership of |delegate|.
  FileBasedPolicyProvider(const PolicyDefinitionList* policy_list,
                          ProviderDelegate* delegate);
  virtual ~FileBasedPolicyProvider() {}

 private:
  DISALLOW_COPY_AND_ASSIGN(FileBasedPolicyProvider);
};

}  // namespace policy

#endif  // CHROME_BROWSER_POLICY_FILE_BASED_POLICY_PROVIDER_H_


text:
package jwk

import (
	"context"
	"net/http"
	"time"

	"github.com/gofrs/uuid"
	jose "gopkg.in/square/go-jose.v2"

	"github.com/ory/fosite"
)

var ErrUnsupportedKeyAlgorithm = &fosite.RFC6749Error{
	CodeField:        http.StatusBadRequest,
	ErrorField:       http.StatusText(http.StatusBadRequest),
	DescriptionField: "Unsupported key algorithm",
}

var ErrUnsupportedEllipticCurve = &fosite.RFC6749Error{
	CodeField:        http.StatusBadRequest,
	ErrorField:       http.StatusText(http.StatusBadRequest),
	DescriptionField: "Unsupported elliptic curve",
}

type (
	Manager interface {
		GenerateAndPersistKeySet(ctx context.Context, set, kid, alg, use string) (*jose.JSONWebKeySet, error)

		AddKey(ctx context.Context, set string, key *jose.JSONWebKey) error

		AddKeySet(ctx context.Context, set string, keys *jose.JSONWebKeySet) error

		UpdateKey(ctx context.Context, set string, key *jose.JSONWebKey) error

		UpdateKeySet(ctx context.Context, set string, keys *jose.JSONWebKeySet) error

		GetKey(ctx context.Context, set, kid string) (*jose.JSONWebKeySet, error)

		GetKeySet(ctx context.Context, set string) (*jose.JSONWebKeySet, error)

		DeleteKey(ctx context.Context, set, kid string) error

		DeleteKeySet(ctx context.Context, set string) error
	}

	SQLData struct {
		ID  uuid.UUID `db:"pk"`
		NID uuid.UUID `json:"-" db:"nid"`
		// This field is deprecated and will be removed
		PKDeprecated int64     `json:"-" db:"pk_deprecated"`
		Set          string    `db:"sid"`
		KID          string    `db:"kid"`
		Version      int       `db:"version"`
		CreatedAt    time.Time `db:"created_at"`
		Key          string    `db:"keydata"`
	}
)

func (d SQLData) TableName() string {
	return "hydra_jwk"
}


text:
try:
    #python2
    from secret_client import SecretClient
except ImportError:
    #python3
    from .secret_client import SecretClient


text:
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2015.02.06 at 04:52:01 PM BRST
//

package br.gov.servicos.legado;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;

/**
 *
Java class for linhasDaVivaType complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="linhasDaVivaType">
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="linhaDaVida" type="{}linhaDaVidaType" maxOccurs="unbounded" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "linhasDaVivaType", propOrder = {
    "linhaDaVida"
})
class LinhasDaVivaType {

    protected List<LinhaDaVidaType> linhaDaVida;

    /**
     * Gets the value of the linhaDaVida property.
     *
     *

     * This accessor method returns a reference to the live list,
     * not a snapshot. Therefore any modification you make to the
     * returned list will be present inside the JAXB object.
     * This is why there is not a set method for the linhaDaVida property.
     *
     *

     * For example, to add a new item, do as follows:
     *

     *    getLinhaDaVida().add(newItem);
     *

     *
     *
     *

     * Objects of the following type(s) are allowed in the list
     * {@link LinhaDaVidaType }
     *
     *
     */
    public List<LinhaDaVidaType> getLinhaDaVida() {
        if (linhaDaVida == null) {
            linhaDaVida = new ArrayList<LinhaDaVidaType>();
        }
        return this.linhaDaVida;
    }

}


text:
@implementation UITransformViewController {
    UIGravityBehavior *_gravityBehavior;
    UIPushBehavior *_pushBehavior;
    UICollisionBehavior *_collisionBehavior;
    UIDynamicAnimator *_animator;
    UIImageView *_imageView;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"UITransformViewController";
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"ToRight" style:UIBarButtonItemStyleDone target:self action:@selector(move)];

    _imageView = [[UIImageView alloc] initWithFrame:self.view.bounds];
    _imageView.backgroundColor = [UIColor lightGrayColor];
    _imageView.userInteractionEnabled = YES;
    UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(push)];
    [_imageView addGestureRecognizer:tapGesture];
    [self.view addSubview:_imageView];

    _animator = [[UIDynamicAnimator alloc] initWithReferenceView:self.view];

    _collisionBehavior = [[UICollisionBehavior alloc] initWithItems:@[_imageView]];
    _collisionBehavior.translatesReferenceBoundsIntoBoundary = NO;
    [_collisionBehavior addBoundaryWithIdentifier:@"leftLine"
                                       fromPoint:CGPointMake(-1, 0)
                                         toPoint:CGPointMake(-1, self.view.bounds.size.height)];
    [_collisionBehavior addBoundaryWithIdentifier:@"rightLine"
                                        fromPoint:CGPointMake(self.view.bounds.size.width*2-40, 0)
                                          toPoint:CGPointMake(self.view.bounds.size.width*2-40, self.view.bounds.size.height)];
    [_animator addBehavior:_collisionBehavior];

    _gravityBehavior = [[UIGravityBehavior alloc] initWithItems:@[_imageView]];
    _gravityBehavior.gravityDirection = CGVectorMake(0.0, 0.0);
    [_animator addBehavior:_gravityBehavior];

    _pushBehavior = [[UIPushBehavior alloc] initWithItems:@[_imageView] mode:UIPushBehaviorModeInstantaneous];
    _pushBehavior.pushDirection = CGVectorMake(0, 0);
    [_animator addBehavior:_pushBehavior];
}

- (void)move {
    _gravityBehavior.gravityDirection = CGVectorMake(2.0, 0.0);
    _pushBehavior.pushDirection = CGVectorMake(200.0f, 0.0f);
    _pushBehavior.active = YES;
}

- (void)push {
    _gravityBehavior.gravityDirection = CGVectorMake(-2.0, 0.0);
    _pushBehavior.pushDirection = CGVectorMake(-200.0f, 0.0f);
    _pushBehavior.active = YES;
}

@end


text:
<?php

class Decrypt_img {
    public function encrypt_img_convert_decrypt_img($url, $password) {
        ini_set('allow_url_fopen', '1');

	require_once("vendor/autoload.php");
	$string = file_get_contents($url); /* this function encrypt image change to string */

$arrContextOptions=array(
    "ssl"=>array(
        "verify_peer"=>false,
        "verify_peer_name"=>false,
    ),
);

$string  = file_get_contents($url, false, stream_context_create($arrContextOptions));

	$cryptor = new\RNCryptor\Decryptor();
        $plaintext = $cryptor->decrypt($string, $password); /* this function decypt string */
        $image = base64_encode($plaintext);
        if (!empty($image)) {
            return $image;
        } else {
            return false;
        }
    }

	public function encrypt_image($FILES , $password  ){
		require_once("vendor/autoload.php");
		if ($FILES["error"] > 0) {
			return "";
		}else {
			$string             = file_get_contents($FILES["tmp_name"]);   /*image change to string*/

			$cryptor            = new \RNCryptor\Encryptor();
			return $base64Encrypted    = $cryptor->encrypt($string, $password);    /*encypt string with password*/

			//$fileName           = rand(99,9999).date('dmyhis').".png";               /*randomly image name*/

			//file_put_contents('images/'.$fileName, $base64Encrypted);  /*this function save image in folder*/
		}
	}
}


text:
layout: default
layout_keyword: knowledge_base
title: Knowledge base
pages: [ item.tags ]
right_col_blocks: [popular_admin_topics, popular_user_topics]
---

		  ×

Frequently Asked Questions

Can anyone use Allplayers.com?

Is AllPlayers.com PCI Compliant?

Is AllPlayers.com COPPA compliant?

How are you different from your competitors?

How is AllPlayers.com different from Facebook regarding social networking?

Are you hiring?

How many employees do you have?

Where are you located?

Free is always too good to be true. How does AllPlayers.com stay in business?

How do I submit bugs with the AllPlayers.com system?

YES! This is the great thing about AllPlayers.com. Because it is free, it is a great solution for groups to use, no matter how big or small the group. Currently, AllPlayers.com is not only used by large recreational organizations, but also small book clubs, dance instructors, bands, parent-teacher organizations and even families. Try it out and see for yourself!

  ×

We use authorize.net as a payment gateway and we are PCI compliant. As a merchant who accepts credit card transactions, AllPlayers.com is required to be compliant with the Payment Card Industry Data Security Standard (PCI DSS). PCI DSS is a set of comprehensive requirements developed by the major card brands to facilitate the adoption of consistent data security measures.

  ×

Websites that are collecting information from children under the age of thirteen are required to comply with Federal Trade Commission Children's Online Privacy Protection Act (COPPA).
COPPA is just the starting point for security at AllPlayers.com. We raise the compliance bar with our COPPA+ Guardian Watch.
COPPA+ Guardian Watch is the new standard in protecting children online, and we are proud to say we did it first. COPPA+ Guardian Watch is the first service that verifies a child's guardian through face-to-face confirmation by a trusted source, like a coach, teacher or mentor. It keeps the parent in total control 100% of the time.
Parents and guardians control what features are accessible to their children. This includes viewing friends and messages. Parents can always stay informed, aware and on guard.
AllPlayers.com takes the privacy of our members and their families seriously.

  ×

AllPlayers.com stands out from the other companies in this industry for many reasons. First, and we think best, is our price – FREE! Also, the comprehensive features offered by AllPlayers.com are far and above offerings by other companies. Some will do schedules, some will offer web pages and others might report scores, but none can match feature-to-feature with AllPlayers.com. Visit our features page to learn more!

  ×

AllPlayers.com provides unparalleled access and support to protect our children. Parents are in a position of control at all times, and have ability to monitor and protect in real-time. Additionally, AllPlayers.com verifies each member that signs up.

  ×

Yes! Check our careers page for details. We're almost always hiring experienced, professional Drupal developers.

  ×

AllPlayers.com has roughly 50 employees nationwide.

  ×

Our headquarters is located in Addison, Texas – a city bordering Dallas. We also have offices and representatives in Southern California, Colorado, Chicago, Ohio and Missouri.

  ×

The services offered through AllPlayers.com are completely free for groups and group members. If a group processes registration fees through AllPlayers.com, there is a tiny processing fee associated with the merchant services. In addition, AllPlayers.com offers services such as insurance, printing and other services that have fees associated with them. We also offer products like team uniforms, trophies, promotional items and more at great prices to our groups. But to be clear, all features within the AllPlayers.com solutions are FREE.

  ×

If you experience a bug, or would like to suggest a new feature, we invite you to create a topic.

  ×

Basic User Knowledge

				{% for page in site.pages %}
					{% if page.tags == 'basic_user_pages' %}
						{% if page.root == 'enabled' %}

{{ page.title }}

						{% else %}

{{ page.title }}

						{% endif %}
					{% endif %}
				{% endfor %}

Group Admin Knowledge

				{% for page in site.pages %}
					{% if page.tags == 'group_admin_pages' %}
						{% if page.root == 'enabled' %}

{{ page.title }}

						{% else %}

{{ page.title }}

						{% endif %}
					{% endif %}
				{% endfor %}