#------  short explanation -------
# this code simplifies unnecessarily complicated edits and removes redundant edits
# The process consists of four steps:
# Step 1: Feasibility of the constraints. Are there any contradictionary constraints?
# Step 2: Fixed variables: find variables that can attain only value. These variables are eliminated from the edits
# Step 3: Simplify conditional (IF-THEN) edits. Find out whether one or more unconditionale edits can be replaced by unconditional edits.
# Step 4: Identify and remove redundant edits. For example: the edit x<5 is redundant if there is also an edit x < 6.
# The function "CleanEdits" is the main function.

#----Inititalisation

setwd("G:/onderhanden_werk/gaafmaakonderzoek2013/")
path <- paste(getwd(),"/", sep="")
.libPaths("//dmkv1f/dmk1/kennR/R/R2.15")
library(editrules)
library(deducorrect)
library(lpSolveAPI)

#----General helpfunctions ----------------------------------------------------------------------------------------#

# isCatVar is an indicator for categorical variables in editmatrix E.
isCatVar <- function(E){
  CatVar <-  grepl(".",getVars(E), fixed=TRUE)   #Categorical variables are variables with a point in its name.
  return(CatVar)}

# isNumEdits is an indicator for numerical edits in editmatrix E
isNumEdit <- function (E) {
  numericals <- grepl("num",rownames(E), fixed=TRUE)  #Numerical edits are edits with "num" in its name
  return(numericals)}

# isCatEdit is an indicator for categorical edits in editmatrix E
isCatEdit <- function(E){
  catEdits <- !isNumEdit(E)
  return(catEdits)}

# ContainsCatVar is an indicator for the presence of categorical variables in the edits of an editmatrix E
ContainsCatVar <- function(E){
  EditCatVar <- FALSE
  if (sum(isCatVar(E)) > 0 ) {
    EditCatVar <-rowSums(contains(E,var=getVars(E)[isCatVar(E),drop=F]))>0
  }
  return(EditCatVar)}

#DeleteEdit removes edit i from an editmatrix E.
DeleteEdit <- function (E, i){
  return(E[c(1:nrow(E))!=i])
}

# isVarinEdit is an indicator for the presence of variables "var"  in the edits of editmatrix E.
# A conditional edit is represented by a number of edits, of which only one is numerical.
# if a variable appears in one of the edits belonging to a conditional constraint, the indicator value will also be one for all other edits that belong to the same conditional edit.
isVarinEdit <- function(E, var){
  isVarinEdit <- as.matrix(rowSums(contains(E,var=var, drop=FALSE)) > 0) # indicator that shows whether an edit contains at least one of the variables in var
  isVarinCatEdit <- isVarinEdit & isCatEdit(E)
  if (sum(isVarinCatEdit)>0){    #if variables in var appear in a categorical edit belonging to conditional constraint, the numerical edits belonging to the same unconditional edits are also selected.
    NamesofCatEditswithVars <- rownames(E) [ isVarinCatEdit  , drop=F]
    isCondNumEditwithVar <-   isNumEdit(E) & ContainsCatVar(E) &  as.matrix (rowSums(contains(E, var=  NamesofCatEditswithVars) > 0 ))
    isVarinEdit <- isVarinEdit | isCondNumEditwithVar
  }
  isCondNumEditwithVar <- isNumEdit(E) & ContainsCatVar(E) & isVarinEdit
  CatVarsinCondEdit <- names(which (colSums(contains(E[isCondNumEditwithVar,,drop=FALSE], var=  getVars(E)[isCatVar(E)])) > 0 )) # all categorical edits are selected that belong to the same conditional edit
  if (length(CatVarsinCondEdit)>0){isVarinEdit <- isVarinEdit | (rownames(E) %in% CatVarsinCondEdit)  }
  return(isVarinEdit)
}

#--------------Functions for the  LP solver
# AdaptToMip changes the operators of the edits in an editmatrix E
# the operator '==' is replaced by '='
# the operator '<' is replaced by '<= rhs - epsilon'
# the function is needed because the LP-solver can only deal with "<= and "="edits; not with "<" type of edits.
AdaptToMip    <- function(E, epsilon=as.mip(E)$epsilon)  {
  E <- normalize(E)
  A <- getA(E)
  ops  <- getOps(E)  	  # possible operators: 	"==" "'<",  "<=" , as edits are in normalform)
  rhs <- getb(E)                  # right hand side of the edits
  rhs[ops== "<"] <-  rhs[ops== "<"] - epsilon
  ops[ops== "<"] <-  "<="
  ops[ops== "=="] <- "="
  E <- as.editmatrix(A=A,ops=ops,b=rhs)
  return(E)
}

# FillMip creates a new lpSolve linear programming object p from an editmatrix E
FillMip <- function(E, objfunc=rep(0,ncol(E)-1))  {
  A <- getA(E)
  b <- getb(E)
  ops <-getOps(E)
  iscat <- isCatVar(E)
  nvar <- ncol(A)    # number of variables
  ncon <- nrow(A)             #  number of constraints
  p   <- make.lp(ncon, nvar)   #  a new lp object is created with nvar variables and ncon constraints
  for (j in 1: nvar)  {set.column(p, j, A[,j])}  # fill the constraintsmatrix column-wise
  set.constr.type(p,ops)
  set.rhs(p,b)
  set.objfn(p,objfunc)   # define objective function - the coefficients of the variables in the objective function are given in objfunc
  set.bounds(p,lower= rep(-Inf,nvar))		# lower bound of each variable is -infinity
  set.bounds(p,upper= rep(Inf,nvar))		# upper bound of each variabele is +infinity
  set.type(p,which(iscat),"binary")     # define binary variables
  return(p)
}

# IsFeasible is an indicator for the feasiblity of an optimization problem p.
isFeasible <- function (p) {
  lp.control(p, break.at.first = TRUE, epsint= 1.0e-15, epspivot=1.0e-15) #we only need to know whether or not one feasible solution exists. Therefore, we can stop if a solution is found. Break.at.first=TRUE
  result <-solve(p)  # solve optimization problem
  feas <- (result !=2)   # result = 2 means infeasibile.
  return(feas)
}

#-------------------General functions for finding the negate of an edit

#NegateSingelEdit replaces the i-th edit of an editmatrix E by the negate of that edit.
NegateSingleEdit <- function (E, i, epsilon =as.mip(E)$epsilon) {
  A <- getA(E)
  ops_in <-getOps(E)
  ops_out <-ops_in
  b <- getb(E)
  ops_out[i][ops_in[i]=="<="] <- ">="   # the negate of an "<=" edit is an ">" edit. But, because the solver cannot deal with ">" constraints, this type of constraints is converted into ">=".
  b[i][ops_in[i]=="<="] <- b[i] + epsilon
  ops_out[i][ops_in[i]==">="] <- "<="
  b[i][ops_in[i]==">="] <- b[i] - epsilon
  E <- as.editmatrix(A=A, ops=ops_out, b=b)
  return(E)
}

#NegateSingelEdit replaces the i-th edit of an editmatrix E by the negate of that edit.
# edit i is assumed to be a composed edit, i.e. an ifthen edit, with categorical variables
# Explanation: A composed edit is modelled as: C1 OR C2 or C3 or....
# the negate of such an edit is given by: NOT C1 AND NOT C2 AND NOT C3 AND..
#
NegateConditionalEdit <- function (E, i, epsilon =as.mip(E)$epsilon) {
  A <- getA(E)
  ops <-getOps(E)
  b <- getb(E)
  iscat<-isCatVar(E)
  CatVarsinEditi <- names(which(A[i,]*iscat!=0))   # the names of the categorical variables in edit i
  CatEdits<- CatVarsinEditi             # For each categorical variable an categorical edit exists.
  A[, CatVarsinEditi]<-0  # each of the categorical variabeles in edit i will get the value 0. By doing is a conditional edit is replaced by a number of unconditional edits.
  ops[CatEdits] <- ">="   # replace each categorical edit, in Catedits by the negate of that edit.
  b[CatEdits] <- b[CatEdits] + epsilon # the negate of a <= edit is a > edit. We use >= type of edits. There we need to add epsilon to the right hand side
  E <- as.editmatrix(A=A, ops=ops, b=b)
  return(E)
}

#------------------------------------------------------------------------------------------------------------------
# functions for the transformation of the in- and output.

# PrepareEdits creates an editmatrix E from an editset E and expresses the editmatrix in normalform.
PrepareEdits<-function (E, epsilon=as.mip(E)$epsilon) {
  E   <- as.mip(E, epsilon )$E
  E   <- normalize(E)
  return(E)
}

# EditMatrixToEditSet coerces an editmatrix E to an editlist.
# function will be used to write logfiles
EditMatrixToEditSet <- function (E){
  Es <- ""
  if (nrow(E)>0) {
    isNumEditNoCatVar <- isNumEdit(E)& !ContainsCatVar(E)
    isNumEditWithCatVar <- isNumEdit(E)& ContainsCatVar(E)
    NNumEditWithCatVar <- sum(isNumEditWithCatVar)
    NNumEditNoCatVar <- sum(isNumEditNoCatVar)
    EsNumEditsNoCatVar <- as.matrix(as.data.frame(as.editset(E[isNumEditNoCatVar,,drop=F])))  # Numerical edits without categorical variables in matrixformat
    EsNumEditsWithCatVar <- as.matrix(as.data.frame(as.editset(E[isNumEditWithCatVar,,drop=F])))  # numerical edits with categorical variables in matrixformat
    if (NNumEditWithCatVar >0){               # additional operations are needed for numerical edits with categorical varibiables. These are transformed into conditional `If THEN´ edits
      for (i in 1 : NNumEditWithCatVar)  {
         IndexEdit <- which(isNumEditWithCatVar)[i]
         CatVarsinEdit <- getVars(E)[isCatVar(E)][contains(E[IndexEdit,isCatVar(E)])]
         for (j in 1: (length(CatVarsinEdit))) {
           CatVar <- CatVarsinEdit[j]
           CatEdit <- substValue(E[CatVar,,drop=F],CatVar,0, reduce=F, removeredundant=F)  # the categorical edit that has been defined for a categorical variable. In this edit the categorical variable is eliminated
           if (j==1) {
             CatEdit <- NegateSingleEdit(CatEdit,1)   # the first part will become the `if´ part. for this part the edit needs to be negated, i.e.  C1 or C2 is expressed as IF NOT C1 then C2
             dfEdit <- as.data.frame(CatEdit)$edit
             dfEdit <- paste(" if (", dfEdit, ")", sep=" ")
           }
           if (j>1){
             dfEditNewPart <- as.data.frame(CatEdit)$edit
             dfEdit <- paste (dfEdit, dfEditNewPart , sep =" " )
             if (j < length(CatVarsinEdit)) { dfEdit <- paste(dfEdit, "|", sep=" ") }
           }
         }
         EsNumEditsWithCatVar[i,2]<-dfEdit
      }
    }
    if ((NNumEditWithCatVar>0) & (NNumEditNoCatVar >0)) {Es <- rbind(EsNumEditsNoCatVar,EsNumEditsWithCatVar)}
    if ((NNumEditWithCatVar>0) & (NNumEditNoCatVar ==0)) {Es <-EsNumEditsWithCatVar}
    if ((NNumEditWithCatVar==0) & (NNumEditNoCatVar >0)) {Es <-EsNumEditsNoCatVar}
  }
  return(Es)
}

#------Specific functions for step 1----feasibilitity of the constraints

# isEditsFeasible in an indicator for the feasibility of the edits in editmatrix E
isEditsFeasible<-function(E, epsilon=as.mip(E)$epsilon) {
  E <- AdaptToMip(E)
  p <-   FillMip(E) # lpsolve object is made
  feasible <- isFeasible(p)    # test for feasilbility
  return(feasible)
}

#------Specific functions for Step 2---determine fixed variables, i.e. variables that can only attain one value.

#MinimumValue gives the minimum value for variable i in editmatrix E
MinimumValue <-function(E ,i){
  minval <- -9999
  objective <- rep(0, (ncol(E)-1))   # coefficients of objective function
  objective[i] <- 1
  p <-   FillMip(E, objfunc=objective)
  result <-solve(p)
  if (result ==0) {minval <- get.objective(p)} # result=0 means that a minimum value was found.
  if (result > 0) {minval <- -9999}   # if no minimum value is found, the result of the function is -9999
  return(minval)
}

#MaximumValue gives the maximum value for variable i in Editmatrix E
MaximumValue <-function(E ,i){
  maxval <- 9999
  objective <- rep(0, (ncol(E)-1))
  objective[i] <- 1  #coefficients of objective function
  p <-   FillMip(E, objfunc=objective)
  lp.control(p, sense="max")
  result <-solve(p)
  if (result ==0) {maxval <- get.objective(p)}  # result=0 means that a maximum value was found.
  if (result > 0) {maxval <- 9999} # if no maximum value is found, the result of the function is +9999
  return(maxval)
}

# MinimizeEachVariable gives the minimum value for each numerical variable in Editmatrix E
MinimizeEachVariable <- function (E){
  smallest <- rep(-9999, (ncol(E)-1)) # initialisation
  for (i in 1: (ncol(E)-1))  {
    if (!isCatVar(E)[i]) {    smallest[i] <- MinimumValue(E, i)}
  }
  return(smallest)}

# MaximizeEachVariable gives the maximum value for each numerical variable in Editmatrix E
MaximizeEachVariable <- function (E){
  largest <- rep(9999, (ncol(E)-1)) # initialisation
  for (i in 1: (ncol(E)-1))  {
    if (!isCatVar(E)[i]) {largest[i] <- MaximumValue(E, i)}
  }
  return(largest)}

# FixedValues gives the names of the fixed variables in editmatrix E, together with their values
FixedValues <- function (E){
  E <- AdaptToMip(E)
  minima <- MinimizeEachVariable (E) # a vector with minimum values
  maxima <- MaximizeEachVariable (E) # a vector with maximum values
  return(list("variables"=getVars(E)[minima==maxima],"values"=minima[minima==maxima]))  # as output are given: the names of the variables and their values
}

# Adds a constraint in editmatrix E for each fixed value. For example if the value of x has to be 10, the constraint x =10 is added.
AddFixedValuesAsConstraints<-function(E, fixvars, fixvalues){
  nfixed <- length(fixvars)
  An <- matrix(0,nrow=nfixed, ncol=(ncol(E)-1))
  rownames(An)<- rep("num",nrow(An))
  colnames(An)<-colnames(getA(E))
  for (i in 1:(nrow(An))) {An[i,colnames(An)==fixvars[i]]<-1}
  opsn <- rep("==", nfixed)
  bn<-fixvalues
  An <- rbind(getA(E), An)
  opsn <- c(getOps(E),opsn)
  bn <- c(getb(E),bn)
  En <- as.editmatrix(A=An,ops=opsn,b=bn)
  return("E"=En)
}

# Mainfunction Step 2
# Creates a new editmatrix. The fixed values are represented by a single constraint (e.g x=10) In all other constraints the fixed variable are substituted (e.g.  the value 10 is filled in for x)
SubstituteFixedValues<-function(E){
  fixedvars <- ""   # initialise
  fixedvals <- ""   # initialise
  LogOriginalEditswithFixedVars <- ""  #initialise
  LogAdjustedEditswithFixedVars <- ""
  fixed <- FixedValues(E)
  nedits <- nrow(E)
  if (length (fixed$variables) > 0 ) {
    fixedvars <-fixed$variables
    fixedvals <-fixed$values
    isEditsWithFixedvars <- isVarinEdit(E,fixedvars)
    LogOriginalEditswithFixedVars<-EditMatrixToEditSet(E[isEditsWithFixedvars,,drop=F])
    E<-substValue(E,fixedvars,fixedvals,reduce=FALSE, removeredundant=FALSE)
    E <- AddFixedValuesAsConstraints(E,fixedvars,fixedvals)
    LogAdjustedEditswithFixedVars<-EditMatrixToEditSet(E[isEditsWithFixedvars,,drop=F])
  }
  return(list("E"=E,"variables"=fixedvars,"values"=fixedvals, "OldEditsWithFixedVars"=LogOriginalEditswithFixedVars, "NewEditsWithFixedVars"= LogAdjustedEditswithFixedVars ))
}

#------functions for Step 3---simplify conditional edits
# Conditional edits are written in the form C1 or C2 or ....where Ci is a statement that corresponds to a categorical edit i

# isPartofConditionalEditAlwaysTrue  is an indicator for categorical edits that belong to a statement Ci that is always satisfied.
isPartofConditionalEditAlwaysTrue<-function (E, i,  epsilon=as.mip(E)$epsilon){
  A <-getA(E)
  AlwaysSatisfied <- FALSE
  iscat <- isCatVar(E)
  if (isCatEdit(E)[i]==T) {    # THE COMPonents of a composed edits are expressed as categorical variables.
    nedits <- nrow(E)
    CatHelpVariableInEdit <- names(which(A[i,]*iscat!=0))   # name of the categorical variable in edit i
    E <- as.editmatrix(A=rbind(getA(E),getA(E)[i,,drop=F]), ops=c(getOps(E),getOps(E[i])), b=c(getb(E),getb(E)[i]))  # replicates edit i
    E[(nedits+1),]<-substValue(E[(nedits+1),,drop=F], CatHelpVariableInEdit , 0,   reduce = FALSE, removeredundant = FALSE) # by substitution of the categorical variable the conditional edit is replaced by an unconditional edit
    E <- AdaptToMip(E)
    E <- NegateSingleEdit (E, (nedits+1))  #the statement is always satisfied means that it is redundant. IN order to check for redundancy we replace the edit by the negate of that edit.
    p <-   FillMip(E)
    AlwaysSatisfied <- !isFeasible(p) # if there is no solution than the statement of edit i is redundant (or in other words: always satisfied)
  }
  return(AlwaysSatisfied)}

  # isPartofConditionalEditAlwaysViolated is an indicator for categorical edits that belong to a statement Ci that is always violated.
isPartofConditionalEditAlwaysViolated<-function (E, i, epsilon=as.mip(E)$epsilon){
    A <-getA(E)
    AlwaysViolated <- FALSE
    iscat <- isCatVar(E)
    if (isCatEdit(E)[i]==T) {# THE COMPonents of a composed edits are expressed as categorical variables.
      nedits <- nrow(E)
      CatVarInEdit <- names(which(A[i,]*iscat!=0))   # name of the categorical variable in edit i
      E <- as.editmatrix(A=rbind(getA(E),getA(E)[i,,drop=F]), ops=c(getOps(E),getOps(E[i])), b=c(getb(E),getb(E)[i]))  # replicates edit i
      E[(nedits+1),]<-substValue(E[(nedits+1),,drop=F], CatVarInEdit , 0,   reduce = FALSE, removeredundant = FALSE) # by substitution of the categorical variable the conditional edit is replaced by an unconditional edit
      E <- AdaptToMip(E, epsilon)
      p <-   FillMip(E)
      AlwaysViolated <- !isFeasible(p)   # if there is no solution, then the statement of edit i is always violated. Implicitly, it is assumed that the initial edits are noncontradictory.
    }
    return(AlwaysViolated)}

# LogRedundantParts creates an editset from an editmatrix E, containing the edits that belong to Catvar. (remember that each cat. variable belongs to a statement / an edit)
LogCatVarEdit<-function(E, CatVar){
   CatVarEdits <- E[rownames(E) %in% CatVar,,drop=F] #selection of edits with catvar in the name
   CatVarEdits   <- substValue( CatVarEdits    ,CatVar ,rep(0,length( CatVar)),reduce=TRUE, removeredundant=TRUE) # by this substitution a conditional edit is transfered into an unconditional edit.
   rownames(CatVarEdits)<-gsub(".l", "num", rownames(CatVarEdits) )    # after substitution of the categorical variable, the edit becomes numeric
   CatVarEdits <- EditMatrixToEditSet(CatVarEdits)      # creating the editset
  return(CatVarEdits)
}

#Transform_CategoricalEdit_into_NumericEdit replaces a conditional, categorical edits by a numeric, unconditional edit, if possible.
# After simplification of a conditional edit an unconditional edit may be obtained.
# for example: the original edit may be C1 or C2 or C3. However, if it turns out that c2 and C3 cannot occur; the edit will be simplified. It will be expressed as C1. This function transforms such an edit into a numerical, unconditional one.
Transform_CategoricalEdit_into_NumericEdit<- function(E){
  A <-getA(E)
  b <-getb(E)
  iscat <-  isCatVar(E)
  NumEdits <- isNumEdit(E)
  NewUnconditionalEdits <- NumEdits & ((rowSums(A[, iscat, drop=FALSE])>0)  & (b[, drop=FALSE]==0))
  if (sum(NewUnconditionalEdits )>0)  {
    CatVarUnconditionalEdit <- getVars(E)[colSums(contains(E[ NewUnconditionalEdits,,drop=F]))>0, drop=F]
    if (length( CatVarUnconditionalEdit)>0){
      E <-  substValue(E,CatVarUnconditionalEdit,rep(0, length(CatVarUnconditionalEdit)),reduce=TRUE, removeredundant=TRUE)  # by substitution of the categorical variable a conditional edit becomes an unconditional edit
      rownames(E)[rownames(E)%in% CatVarUnconditionalEdit]<-paste ("num", gsub(".", "",   rownames(E)[rownames(E)%in% CatVarUnconditionalEdit], fixed=TRUE ), sep= "")  # the name of the edit is changed. The new name shows that the edit is numerical now.
    }
  }
  return(E)
}

#SimplifyCOnditionalEdits removes parts of conditional edits in editmatrix E that are always violated"
SimplifyConditionalEdits <- function (E, epsilon=as.mip(E)$epsilon){
  iscat <-  isCatVar(E)
  isEditAlwaysViolated <- rep(FALSE,nrow(E))    #initialise
  AlwaysViolatedEdits <- ""          #initialise
  RedundantPartsinConditionalEdits <- ""   #initialise
  ESimplified <- E  #initialise
  LogSimplifiedEdits <- ""
  LogRedundantPartsinConditionalEdits<-""
  if (nrow(E)>0)  {
    for (i in 1:nrow(E)){
      if  (isCatEdit(E)[i]== TRUE) {isEditAlwaysViolated[i]<-isPartofConditionalEditAlwaysViolated(E, i, epsilon)}   #for every categorical variable it is evaluated whether or it not it belongs to a statement (a part of a conditional edit) that is always violated.
    }
    AlwaysViolatedEdits <-  rownames(E)[isEditAlwaysViolated,drop=F]  #names of categorical edits that are always violated
    CatVarAlwaysViolated <-  AlwaysViolatedEdits     #names of categorical variables. The names of the categorical variables are the same as the names of the edits.
    ESimplified <- E[isEditAlwaysViolated==FALSE,,drop=F]
    if (length(AlwaysViolatedEdits ) >0) {
      ESimplified  <- substValue(ESimplified , CatVarAlwaysViolated ,rep(1,length( CatVarAlwaysViolated )),reduce=TRUE, removeredundant=TRUE) # by this substitution, redundant parts of a conditional edit are removed from that edit
      ESimplified <-Transform_CategoricalEdit_into_NumericEdit(ESimplified ) # conditional edits are replaced by unconditional edits, if possible (i.e. if there is only one component)
      LogSimplifiedEdits   <- EditMatrixToEditSet (E[isVarinEdit(E,CatVarAlwaysViolated),,drop=F])  # make a log file of the simplified edits
      LogRedundantPartsinConditionalEdits <- LogCatVarEdit(E, CatVarAlwaysViolated)
    }
  }
  return(list("E"= ESimplified,"Simplifiededits"= LogSimplifiedEdits,"SimplifiededitsRedundant" = LogRedundantPartsinConditionalEdits) )
}

# ReplaceConditionalbyUnconditional replaces a redundant conditional edit by a numeric, nonconditional edit.
# Conditional edits are stated as: C1 or C2 or....
# if C1 is always true, then the conditional edit C1 or C2 or....is redundant and can be replaced by the unconditional edit C1.
ReplaceConditionalbyUnconditional <- function  (E, epsilon=as.mip(E)$epsilon){
  iscat <-  isCatVar(E)
  NumEdit <- isNumEdit(E)
  LogSimplifiedEdits  <- ""  #initialise
  LogNewUnconditional  <- ""     #initialise
  isEditSimplified <- rep(FALSE,nrow(E))    #initialise
  ESimplified <-E  #initialisatie
  if (nrow(E)>0 ){
    for (i in 1:nrow(E)){
      if  (NumEdit[i]== FALSE) {isEditSimplified[i]<-isPartofConditionalEditAlwaysTrue(E, i,  epsilon)}  #for every statement in a categorical edit it is checked whether it is always true
    }
    CatVarNewUnconditional  <-  rownames(E[isEditSimplified,,drop=F]) #names of the categorical edits/variables belonging to conditions that are always true.
    if (length(CatVarNewUnconditional ) > 0) {
      isNumEditRedundant<- NumEdit & rowSums( contains(E[,,drop=F], var=CatVarNewUnconditional))>0  # indicator for redundant conditional edits; conditional edits that are always true.
      ESimplified <- E[!isNumEditRedundant,,drop=FALSE]
      ESimplified  <- substValue(ESimplified,CatVarNewUnconditional ,rep(0,length(CatVarNewUnconditional )),reduce=TRUE, removeredundant=TRUE)     # the imputation transforms a conditional edit into an unconditional edit
      rownames(ESimplified)[rownames(ESimplified)%in% CatVarNewUnconditional]<-paste ("num", gsub(".", "",   rownames(ESimplified)[rownames(ESimplified)%in% CatVarNewUnconditional], fixed=TRUE ), sep= "")  # it is shown in the editname that the edit is numerical.
      RedundantCatVar <- names(which(colSums(ESimplified [isNumEdit(ESimplified),isCatVar(ESimplified)])==0)) #categorical variables that do not appear (anymore) in numerical edits can be removed.
      ESimplified <- ESimplified[!(rownames(ESimplified) %in% RedundantCatVar),, drop=F]  # removing  redundant categorical edits
      LogSimplifiedEdits   <- EditMatrixToEditSet (E[isVarinEdit(E,CatVarNewUnconditional),,drop=F])  # Create logfile containing all edits that include a categorical variable belonging to a statement that is always true
      LogNewUnconditional <- LogCatVarEdit(E,CatVarNewUnconditional )             # create log of the parts of conditional edits that are always satisfied.
    }
    }
  return(list("E"= ESimplified ,"ReplacedConditional"=LogSimplifiedEdits,  "NewUnconditional"= LogNewUnconditional ))
}

# Main function for step 3
SimplifyCondEdits<- function(E, epsilon=as.mip(E)$epsilon){
  Simplify<-SimplifyConditionalEdits(E, epsilon=as.mip(E)$epsilon)
  Replace<-ReplaceConditionalbyUnconditional(E=Simplify$E, epsilon=as.mip(E)$epsilon)
  return(list("E"=Replace$E,"Simplified"=Simplify$Simplifiededits, "RedundantParts"=Simplify$SimplifiededitsRedundant, "ReplacedConditional"=Replace$ReplacedConditional,  "NewUnconditional" = Replace$NewUnconditional))
}

#------functions for step 4----- remove redundant edits.

# isUnconditionalEditRedundant is an indicator for redundancy of an edit i in editmatrix E, where edit i is a numeric, unconditional edit
# An edit is redundant if the problem that is obtained by replacing an edit by its negate edit leads to a contradictory set of edits.
# Equality constraints are repaced by two edits: a "<=" edit and a ">=" edit. An equality edit is infeasible if the corresponding "<="  and ">=" edits are infeasible.
isUnconditionalEditRedundant <- function (E, i, epsilon=as.mip(E)$epsilon ){
  OpsIn <- getOps(E)
  OpsOut1 <- OpsIn
  OpsOut1[OpsIn=="="]<-"<="
  E1 <- as.editmatrix(A=getA(E),b=getb(E), ops=OpsOut1)
  En <- NegateSingleEdit(E1,i)
  p <-   FillMip (En)
  redundant <- !isFeasible(p)
  if (OpsIn[i] == "=" & redundant==TRUE) {
    OpsOut2 <- OpsIn
    OpsOut2[OpsIn=="="]<-">="
    E2 <- as.editmatrix(A=getA(E),b=getb(E), ops=OpsOut2)
    En <- NegateSingleEdit(E2,i)
    p <-   FillMip(En, epsilon=as.mip(E)$epsilon)
    redundant <- !isFeasible(p)
  }
  return(redundant)
}

# isConditionalEditRedundant is an indicator for redundancy of an edit i in editmatrix E, where edit i is a numeric, conditional edit
isConditionalEditRedundant <- function (E, i,epsilon=as.mip(E)$epsilon ){
  E2 <- NegateConditionalEdit(E,i)
  p <-   FillMip(E2)
  redundant <- !isFeasible(p)
  return(redundant)
}

# isEditRedundant is an indicator for redundancy of a numerical edit i in editmatrix E, where i is a numerical edit
isEditRedundant<-function(E, i, epsilon=as.mip(E)$epsilon) {
  redundant<-FALSE   #initialise
  E <- AdaptToMip(E)
  NumEditwithCatVars <- isNumEdit(E) & ContainsCatVar(E)
  if  (isNumEdit(E)[i]==TRUE) {
    if (NumEditwithCatVars[i]==FALSE) {
      redundant<-isUnconditionalEditRedundant(E, i,epsilon )
    }     else {
      redundant<-  isConditionalEditRedundant(E, i, epsilon )
    }
  }
  return(redundant)
}

# isRedundant is an indicator for redundancy for all edits in editmatrix E
isRedundant<-function(E, epsilon=as.mip(E)$epsilon) {
  redundant<-rep(FALSE,nrow(E))   #initialiseer op FALSE
  for (i in 1:nrow(E)){    redundant[i] <- isEditRedundant(E,i, epsilon)}
  return(redundant)
}

# RemoveRedundantEdits deletes all redundant edits from an editmatrix E
RemoveRedundantEdits<-function(E,epsilon=as.mip(E)$epsilon){
  Estart <- E
  isRedundant<-rep(FALSE,nrow(E))   #initialise
  LogRedundant <- ""  #initialise
  NumberRedundant<-0  #initialise
  if (nrow(E)>0) {
    nedits <- nrow(E)
    for (i in nedits:1){
      if( isEditRedundant(E,i, epsilon)){
        NumberRedundant <-NumberRedundant +1
        E <- DeleteEdit(E,i)
        isRedundant[i]<-TRUE
        RedundantCatVar <- names(which(colSums(E [isNumEdit(E),isCatVar(E)])==0)) #categorical variables that do not appear in numerical edits (anymore) can be left out.
        E <- E[!(rownames(E) %in% RedundantCatVar),, drop=F]
      }
    }
  }
  if (NumberRedundant >0) {
    CatVarinRedundantEdits <- names(colSums(Estart[isRedundant,isCatVar(Estart)]))
    isRedundantext <- isRedundant | (rownames(Estart) %in%  CatVarinRedundantEdits)  # isRedundant is extended with all categorical edits that belong to the same conditional edits as the edits in inRedundant
    LogRedundant <- EditMatrixToEditSet(Estart[isRedundantext,,drop=FALSE])
  }
  return(list("E"=E, "redundant"=LogRedundant))
}

#------Main FUNCTION---------------------------------------------------------------------------------------------------

CleanEdits <- function(E, epsilon= as.mip(E)$epsilon){
  E<-PrepareEdits(E)
  if (isEditsFeasible(E,epsilon)) {
    SubstFixed <- SubstituteFixedValues(E)
    SimpleConditional <- SimplifyCondEdits(SubstFixed$E,epsilon)
    RemoveRedundant <- RemoveRedundantEdits(SimpleConditional$E, epsilon)
    E <- EditMatrixToEditSet (RemoveRedundant$E)
  }  else {
    E <- "NOT FEASIBLE"
    fixvars <- "NOT FEASIBLE"
    fixvalues<- "NOT FEASIBLE"
    redundant <- "NOT FEASIBLE"
    Edits_Simplified_BecauseOfFixedVars<- "NOT FEASIBLE"
    NewEdits_after_imputation_fixedvars <- "NOT FEASIBLE"
    SimplifiedConditional<- "NOT FEASIBLE"
    ReplacedConditional <- "NOT FEASIBLE"
    NewUnconditional<- "NOT FEASIBLE"
    redundant<- "NOT FEASIBLE"
    RedundantParts <- "NOT FEASIBLE"
  }
  return(list("CleanedEdits" =E,"Fixedvariables"=SubstFixed$variables, "Fixedvalues"=SubstFixed$values, "Edits_Simplified_BecauseOfFixedVars"=SubstFixed$OldEditsWithFixedVars,"NewEdits_after_imputation_fixedvars"=SubstFixed$NewEditsWithFixedVars, "SimplifiedConditionalEdits"=  SimpleConditional$Simplified,"SimplifiedConditionalEditsRedundantParts"=SimpleConditional$RedundantParts, "NewUnconditional"=SimpleConditional$NewUnconditional, "ConditionalReplacedbyUnconditional"=SimpleConditional$ReplacedConditional ,"RemovedEdits_BecauseofRedundancy"=RemoveRedundant$redundant )  )}

#----------------------------------------------------------VOORBEELDEN van een aanroep van CleanEdits-----------------------------

E <- editfile("set2.txt")
H<- CleanEdits(E)
HC<- H$CleanedEdits
HCE <- editset(HC[,2])

filename<-paste(path,"Set2Cleaned.txt")
write.csv2(HCE,file=filename, row.names=FALSE, sep=" ", quote=FALSE)

---------# under construction----------------------------------------------------------------------------------------------------------

# new functions for step 1 for the identification of contradictory edits.

  #ReplaceEqualitiesbyTwoInequlities replaces all equality constraints by two "<=" inequality constraints. For example x = 6 is replaced by x <=6 and -x<=-6
  ReplaceEqualitiesbyTwoInequalities<-function(E){
    E <- AdaptToMip(E)
    A  <-  getA(E)
    ops <- getOps(E)
    b   <- getb(E)
    neq <- sum(ops=="=")
    if (neq >0){
      A <- rbind(A, -1*A[ops=="=", ,drop=F])
      b <- c(b,-1*b[ops=="="])
      ops <-c(ops,ops[ops=="="])
      ops[ops=="="] <- "<="
    }
    E <- as.editmatrix(A=A,b=b,ops=ops)
    return(E)
  }

#FindInconsistentEdits creates an editmatrix with edits that need to be deleted from editset E in order to obtain a consistent editset.

FindInconsistentEdits<-function(E, epsilon=as.mip(E)$epsilon, ForceInconsistent=rep(FALSE, sum(isNumEdit(E))), ForceNotInconsistent=rep(FALSE, sum(isNumEdit(E)))) {
  EInitial <-E
  nedit <- nrow(E)
  IsInconsistentEdit <- rep(NA, sum(isNumEdit(E)))
  E<- AdaptToMip(E)
  ForceInconsistent <- c(ForceInconsistent,ForceInconsistent[getOps(E)%in% c("=","==")])
  ForceNotInconsistent <- c(ForceNotInconsistent,ForceNotInconsistent[getOps(E)%in% c("=","==")])
  E<-  ReplaceEqualitiesbyTwoInequalities(E)
  isnumEdit<-isNumEdit(E)
  NnumEdit <- sum(isnumEdit)
  iscat <- isCatVar(E)
  nvar <- length(iscat)
  A  <-  getA(E)
  A[abs(A)==as.mip(E)$M]<- A[abs(A)==as.mip(E)$M]/1000 # the big M values of the initial MIP problem need to be reduced to prevent numerical problems. Later big M's will be added that need to be larger than the big M's in the current matrix.
  colnamesA <-c(colnames(A),paste(".l",seq(from=(nvar+1), to=(nvar+NnumEdit)), sep="")) # new colnames for new categorical variables.
  A <- cbind(A, matrix(0,nrow=nrow(A),ncol=NnumEdit))  #extending the coefficientsmatrix
  colnames(A)<- colnamesA
  coef <- -as.mip(E)$M/1 #!!!!# new big M values are introduced that need to be larger than the existing values.
  A[isnumEdit,(nvar+1):(ncol(A))]<-diag(coef,NnumEdit)
  E <- as.editmatrix(A=A,ops=getOps(E), b=getb(E))
  if (sum(ForceInconsistent)>0) {
    subvar <- getVars(E)[(nvar+1):(ncol(E)-1)][ForceInconsistent==TRUE]
    E<- substValue(E,var=subvar, value= rep(1,length(subvar)),reduce=FALSE,removeredundant=FALSE)
    rhs <- getb(E)
    rhs[isNumEdit(E)][ForceInconsistent]<-rhs[isNumEdit(E)][ForceInconsistent]/100  #needed to prevent computational problems
    E <- as.editmatrix(A=getA(E),b=rhs,ops=getOps(E))
  }
  if (sum(ForceNotInconsistent)>0) {
    subvar <- getVars(E)[(nvar+1):(ncol(E)-1)][ForceNotInconsistent==TRUE]
    E<- substValue(E,var=subvar, value= rep(0,length(subvar)),reduce=FALSE,removeredundant=FALSE)}
  IndexOriginalNumEdits<- c(seq(1,sum(isNumEdit(EInitial))),which(getOps(EInitial) %in% c("=","==") ))  # each equality edit is represented by two inequality edits. IndexOriginalNumEdits shows which of the numericaledits corrspond to the initial numerical edits
  ObjFuncCoef <- rep(1,(ncol(E)-1))
  ObjFuncCoef[1:(ncol(EInitial)-1)] <-0
  p <-   FillMip(E,ObjFuncCoef)
  q<-solve(p)
  if (q==0) {
    q <- get.variables(p)[(ncol(EInitial)+1-1):(ncol(E)-1)]  # THE RANge (ncol(EInitial)+1-1):(ncol(E)-1) is for the added categorical variables
    if (sum(q)>0) {
      IndexInconsistentNumEdit <- unique(IndexOriginalNumEdits[q==1])
      InconsistentNumEdit <- rownames(EInitial[isNumEdit(EInitial),,drop=F][IndexInconsistentNumEdit])
      IsInconsistentNumEdit  <- rownames(EInitial) %in%  InconsistentNumEdit
      CatVarinInconsistentEdits <-names(which(colSums(contains(EInitial[InconsistentNumEdit,,drop=F]))>0 & isCatVar(EInitial)==TRUE) )      # if a numerical edit contains categorical variables, the edits corresponding to these categorical variables are also selected
      IsInconsistentEdit <-  IsInconsistentNumEdit | (rownames(EInitial) %in%  CatVarinInconsistentEdits)
      EInconsistent <- EInitial[IsInconsistentEdit,,drop=F ]
    }
  }
  return(IsInconsistentEdit)
}

FindCycleofInconsistentEdits<-function(E){
  indexEdits <- NA
  isInconsistentEdit <- FindInconsistentEdits(E)
  isInconsistentNumEdit <-isInconsistentEdit & isNumEdit(E)
  if (sum(isInconsistentNumEdit)>0 ) {
    isInconsistentEdit_i <-isInconsistentEdit
    FirstInconsistent <- which(isInconsistentEdit)[1]
    ForceInconsistent <- isInconsistentEdit[isNumEdit(E)]
    ForceNotInconsistent <- rep(FALSE,sum(isNumEdit(E)))
    ForceInconsistent[FirstInconsistent]<- FALSE
    ForceNotInconsistent[FirstInconsistent]<- TRUE
    while   (is.na(isInconsistentEdit_i[1])!=TRUE) {
      isInconsistentEdit_i <- FindInconsistentEdits(E, ForceInconsistent=ForceInconsistent,ForceNotInconsistent=ForceNotInconsistent )[isNumEdit(E)==TRUE]
      if (is.na(isInconsistentEdit_i[1]  )!=TRUE) {  ForceNotInconsistent <- ForceNotInconsistent | (isInconsistentEdit_i==TRUE & ForceInconsistent==FALSE)}
    }
    insetInconsistent <- ForceInconsistent | ForceNotInconsistent
    indexInconsistent <- which(insetInconsistent)
    ForceNotInconsistent <- rep(FALSE,sum(isNumEdit(E)))
    ForceInconsistent <- insetInconsistent
    for (i in 1:sum(insetInconsistent)){
      ForceInconsistent[indexInconsistent[i]]<-FALSE
      isInconsistentEdit_i <- FindInconsistentEdits(E, ForceInconsistent=ForceInconsistent,ForceNotInconsistent=ForceNotInconsistent )[isNumEdit(E)==TRUE]
      if (is.na(isInconsistentEdit_i[1])==TRUE) {ForceInconsistent[indexInconsistent[i]]<-TRUE}
    }
    indexEdits<- rep(FALSE, nrow(E))
    indexEdits[isNumEdit(E)]<-ForceInconsistent
    CatVarinInconsistentEdits <-names(which(colSums(contains(E[indexEdits,,drop=F]))>0 & isCatVar(E)==TRUE) )      # if a numerical edit contains categorical variables, the edits corresponding to these categorical variables are also selected
    indexEdits <- indexEdits | (rownames(E) %in%  CatVarinInconsistentEdits)
  }
  return (indexEdits)
}


Lets use correct terminology from now on. The terms "inheritance" and "method" are limited to objects and classes, not modules. So your initial comment was ambiguous if not misleading. BTW: It also feel like you are condescending which I don't appreciate.

The module extension technique in the SO post you are referring to would require modifying the import sites of ssl which obviously I can't do. I *do* intend to monkey patch the ssl module globally like this until the underlying issue is resolved or worked around in boto.

Secondly, this technique does *not* reduce the security of certificate checking. The hack is only active for a very limited set of hostnames (see the regex). Provide a concrete way to exploit this or create a pull request with improvements. Keep in mind that until recently, certificate checking was completely disabled by default in the ssl module which is why the "dots in bucket names" hasn't shown up earlier.


You just need to fork it first(press a button that said "Fork" on top right of a page of project you want to edit) then you will get a clone of this project to edit it on you own; when you edit and commit(it's the same as save file) Github will ask you want to pull a request(if you miss it, don't worry you can't create a pull request from pull request page).

Anyway I will do this commit for you. ;)


Then this is exactly what I intend to do. I don't want to override the default or configured calling format.


@bharatpallod - apps that are using this SDK won't break. If you don't care about any new features or enhancements, then you'll be safe continuing to use this SDK. Just keep in mind that there won't be any additional bug fixes or support.


Could you clean up javadoc for this and similar methods to update dangling references to `hashTable`, `cntTuple `, and any other names that don't appear outside doc comments?


Good call


Whoops, misspelled.


Done!


The problem here is that


`data, ok` would be sufficient


also I need to figure out where were gonna stay..


What if the bytes are empty?


Is that an error or "no config"


Code is now working. It does a simple parallel task.


dockercfg := DockerConfig{}, then pass by reference to unmarshal, then you don't need to dereference in the append.


Added


Sweet thanks! In going to try it again soon!
On May 18, 2015 3:19 PM, "Niklas Schnettler" <notifications@github.com>
wrote:

> How it looks:
> [image: alti2 0_2]
> <https://cloud.githubusercontent.com/assets/10466533/7688236/6bcf6a50-fda3-11e4-9a36-1759be36d8f7.png>
> [image: alti2 0_3]
> <https://cloud.githubusercontent.com/assets/10466533/7688235/6bcf5786-fda3-11e4-9c5a-8c7655aa0ea6.png>
> [image: alti2 0]
> <https://cloud.githubusercontent.com/assets/10466533/7688237/6bd0475e-fda3-11e4-9b45-ea6e845aecd3.png>
>
> I will update the tutorial about how to change the theme as soon as
> possible.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Sh4dowSoul/AdvancedLayersThemeInstaller/commit/1d6650b70fe4c01325a2158c443efcd44bbc60cc#commitcomment-11247742>
> .
>


May as well correct the spelling of this file while you're at it.


Thanks Nick,

I'm having a friend review my translation https://github.com/hotosm/learnosm/blob/gh-pages/_posts/sw/0100-01-01-index.md before I pull a request. Will be done by tomorrow.


As a solution, I'll add a limit-check after the pull-off motion. If it's still enabled, I'll notify the user that the limit is still engaged and abort the homing cycle. They will need to increase the pull-off distance manually to avoid this problem.. Although I may get a ton of questions later about why homing isn't working.


TBH, Commons Lang is one of the first components we have migrated to git, so we don't have a clear guideline for modifying/rebasing/squashing PRs yet. Until now I've just merged them without squashing or anything.


Is this correct? Until which commit other OSes are supported?


This has completely broken us


I don't think it adds anything.


Do we fetch other secrets for the pod before this (or after this) such that we don't need to fetch them a second time?


http://forum.kodi.tv/showthread.php?tid=227283&pid=2007276#pid2007276
http://xbmclogs.com/phlftxnof


Let's mark this as temporary working hack for D3DFMT_R8G8B8, that should be implemented using llvmpipe.


@iamchairs Can you please elaborate?


We are sorting items that aren't in an `ng-repeat` though..


where was the PR?


Hi @vsingleton Juan is correct. I think you perhaps accidentally included java.sun.com as a workaround for https://issues.liferay.com/browse/FACES-2246


Sounds good


Je suis pas d'accord pour "erreur de langue". En effet, la faute pourrait très bien être une erreur dans un code source ou sur une image.


so disrespectful


It would be great if you could split this into two commits: one for trivial formatting changes, and one for the actual changes.

r- from me since it's an annoying-to-read commit, FWIW


Unused import?


Are we sure that URL shorteners are permanent? I believe TinyURL only provides 62 (uppercase+lowercase+numbers)^5 ~ 10^9 links in total.


Agreed. I'll change this.


Removed this line and moved it to `31` $scope injects into Controller, not Directive


great, thanks


It was not showing up correctly, it was glowing white. The same thing was happening with the large block, that one was fixed in the previous commit.
I am not sure if this is exactly what you wanted but at least it builds correctly.


Bienvenue à bord @OlivierLD #FrenchTeam ;-)


93653272-SizingTable (JasonGlazer) - i386-Windows-7-VisualStudio-12: OK (1656 of 1656 tests passed)

![Build Badge](http://img.shields.io/badge/build%20status-passing-green.svg) ![Test Badge](http://img.shields.io/badge/tests%20passed-100.0%25-green.svg)


Okay, here's what I have to say on DBCategoriesStatistics (I'm just going to review the whole class, regardless of the commits' content) (and I'll do it in a totally random order :p) :
- l.48 : orphans ArrayList is never used (even though it certainly does not slow the algorithm considering its size)
- l.49 : this for loop might be merged with the first one ; since you add children in the first loop and only need parents in the second one, I feel like both loops are independent with each other (and THIS should speed the algorithm up a bit)
- l.62+73 : indicating "new Runnable" inside "new Thread" is useless (I didn't try it but I'm pretty sure you can just write "new Thread() { public void run() {} });" :p)
- l.97 : couldn't this loop be merged with the first one l.35 too ? :p
- l.133 : what's the point of this loop (which is, needless to say, another very long for loop :p) ? isn't this.depth already computed l.120 ?
- l.105 : this one is hard ; I was going to say "does this even work ?" before realizing the point of the outer while loop. The algorithm here itself looks ok, as far as I thought about it (God knows I'm bad at algorithms, but to give you an idea I still drew an example on paper to check it x)), but here's the first bottleneck. :p But considering your debug line, I guess you already know this. Still, I have no idea whatsoever to improve this. :p
- l.141 = what-the-fuck-I'm-not-going-to-understand-this-tonight function.

That's all, g'night !


Why was the build-time proxy support (added at fdd5813) removed? I have the same problem as @petracvv. Specifically, I am behind a corporate firewall and 'kitchen create' fails because yum cannot fetch anything without the proxy settings.


Three reasons why they need to be uploaded:
* The mwm files are normally rebuilt whenever MwmBuilder is updated.
* Someone may want to make changes to the block in the future (perhaps Keen will add some functionality)
* Autopilot is open source.


FYI, we made another change to this controls that adds the loading indicator and disabling of button, but also works in IE: https://github.com/SparkDevNetwork/Rock/commit/fa30e3a6cdbf90e02cf37ebe185aa390a38a76d8


Also adds the _content partial variations in the includes.


one or another you'll start forking !


You're right. I'm going to leave it for now since the Sprint PR will be merged shortly but I'll keep that in mind next time. One day I'll get this exactly right.


Je me tâte. "publié" à un sens dans le contexte, puisque justement, c'est le formulaire qui sert à publié. J'ai donc peur que les auteurs se disent "on me demande de choisir ou ça sera publié" ? Donc je garderait le "originale" (ou un meilleur mot si tu as).


We added a test for FoamMesh. Test for FoamFiles is not required in internal wrapper.


Wait, where is HRTimeStamp defined?


Looks like this code is almost verbatim from `WorkerSubQuery.ResourceUsageReporter.runInner()`. Can we refactor so the same code can be called from both places?


Perhaps you're right, I was thinking along the lines of it always having a sequence


all tests pass:
success: https://travis-ci.org/stellar/stellar-core/builds/63063974


Hi @vsingleton I think that this removes too many attributes. For example: binding, converter, and converterMessage, id, immediate, lang, rendered, required, requiredMessage, role, style, styleClass, tabindex, title, validator, validatorMessage, and valueChangeListener are probably still valid.


Yeah, I agree it's confusing. I didn't come up with these semantics, though, and I think a bunch of tests rely on them.


showin up in here like u l8 to church.. who does u think u is?!


À vérifier dans le premier contenu qui te tombe sous la main: est ce que les messages de commit en général terminent par un point ? (Si tu trouves que c'est nécessaire partout, il va te falloir visiter un peu plus de fichiers ;) ).


What is this?


How would that help?


Ran into an issue after upgrading to latest.  The following no longer works:

`args := []interface{}{1}
assert.Equal(t, args, []interface{}{1})
assert.EqualValues(t, args, []interface{}{1})`

Output:
`Error:		Not equal: []interface {}{1} (expected)
			        != []interface {}{1} (actual)

Error:		Not equal: []interface {}{1} (expected)
			        != []interface {}{1} (actual)`


L'avertissement me semble nécéssaire quand même (mais je peux me tromper).


Ça me rappelle quelque chose ce "Oh non!". C'est pas ça qu'on a quand un onglet de chrome plante ? ^^


Ah non, je ne pense pas. J'avais juste pas vu que c'était un message de commit. Bien joué.


Not sure I agree with this removal. This won't work for non-ASCII names


TeamCity Engage Survey :: CI [Build 23](http://teamcity.engagesoftware.com/viewLog.html?buildId=261&buildTypeId=EngageSurvey_Ci) is now running


C'est possible, mais je ne suis pas sous Chrome. Par contre, GNOME m'a fait "Oh no !" je crois. :P


gtest NOT works


TeamCity Engage Survey :: CI [Build 23](http://teamcity.engagesoftware.com/viewLog.html?buildId=261&buildTypeId=EngageSurvey_Ci) outcome was **SUCCESS**
Summary: Running Build time: 0:0:26


Pas de soucis ;)


fast-forwarding master to auto = 5fb3a992


:+1:  Great job Nick! Face to face working time is invaluable! :smile:


I was wondering that too. I briefly considered removing it. I guess it may as well go.


Personnellement, je trouve "originale" pas du tout clair. Plutôt "en ligne" ?


TeamCity Engage Survey :: CI [Build 24](http://teamcity.engagesoftware.com/viewLog.html?buildId=262&buildTypeId=EngageSurvey_Ci) is now running


TeamCity Engage Survey :: CI [Build 24](http://teamcity.engagesoftware.com/viewLog.html?buildId=262&buildTypeId=EngageSurvey_Ci) outcome was **SUCCESS**
Summary: Running Build time: 0:0:14


Ça doit être ça, alors (chrome, c'est "aw, snap" :p)


Exact.


Would a ConstIterator work here?


This commit has the corrections proposed by K. Hiltunen. Title of commit was wrong.


Je pense que les modos savent ce qu'ils font, non ? Un rappel d'accord, une consigne c'est exagéré. Mais bon, je ne suis pas modo, donc je m'en fiche. =P


Looks like the check for `pollLeft` is superfluous, since it must always be set or unset if the corresponding `*_EOS` condition is true. Also, `&&` and `||` have the same precedence, so please disambiguate with parentheses.


@trntv  Hello, I think Yii::getAlias('@storageUrl/source') could be better here, because if I change the domain, all the avatars imagen gets broken


Nope, not used anywhere. I could remove them, but I was trying to make as few unnecessary changes as possible.


mmmh, je suis toujours pas convaincu. Et *quid* de changer totalement la phrase, genre "URL de la version hébergée ailleurs, si applicable" (ou un truc plus français)


J'ai l'argument qui tue: on doit garder un comportement identique ou proche à celui des forums ;)


broken indent


Ou : "URL de la version actuellement en ligne, s'il y en a une" ?


this guy lol


I'd like to know the background of this optimization: why was just iterating over the `TupleBatch`es and summing their counts deemed too expensive? This is adding redundant state and consequently more potential for bugs.


`HRTimeStamp` is a type synonym for `Double`, defined in `Haste.Performance`. The performance module has just enough stuff to check the high resolution timer and figure out what *real* time it represents by comparing it to its reference point (whenever the page started loading), but it's still lacking all the other reference points from the `PerformanceTiming` interface.


OK, perfect, thanks for the lesson  .... next time  I'll do it the change..

On Mon, May 18, 2015, 2:24 PM Richter03 <notifications@github.com> wrote:

> You just need to fork it first(press a button that said "Fork" on top
> right of a page of project you want to edit) then you will get a clone of
> this project to edit it on you own; when you edit and commit(it's the same
> as save file) Github will ask you want to pull a request(if you miss it,
> don't worry you can't create a pull request from pull request page).
>
> Anyway I will do this commit for you. ;)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/IgnaceMaes/MaterialSkin/commit/b48660d449447d6bbd57a8bd80aea65d2ab31f2f#commitcomment-11247832>
> .
>


Don't let @jorgehjr84 red ink this. Looking forward to the final draft. :+1:


LGTM...Merging with master.


Voilà, c'est ça qui me chipote; si t'insiste pas sur "ailleurs", les auteurs vont remettre l'URL de la version déjà publiée sur ZdS quand il y en a une, alors que c'est pas le but du champ (le but, c'est d'éviter de perdre du SEO parce que le tuto existe déjà sur un autre site, genre feu SdZ).


Fix to `~> 2.3.0` to allow only minor upgrade (`2.3.x`)


Correct issue: #11.


> Is that an error or "no config"

I think that an inability to unmarshal secret data that was validated going in, should be an error.


Du coup je remets comme avant ?


Man with a plan. I'm a fan. Keep rhymin' :+1:


S'il te plait bien :)


Ah, OK, I didn't realise it was already defined elsewhere.


Thanks for handling this!


> **highest amount of sponsored teams to date**, but also the most
-> **highest amount of sponsored teams to date**, and also the most


> data, ok would be sufficient

I did keep the names relatively short, but since more action is happening here than a single check and return, I'm inclined to leave them slightly more descriptive.


Achso. War mir nicht bewusst, und bei Family.Guy hat er direkt alle Releases gefunden, mit dem Punkt. Das muss ich genauer beobachten. Danke!


cool!


The secret volume plugin is going to re-fetch the secrets.  Can we constrain the query for `getPullSecretsForPod` so that only dockercfg secret types are pulled?


I meant, the volume plugin will re-fetch a secret reference in a volume.


Well, I only just added it a few minutes earlier, so some confusion about where it's coming from is understandable. :)


Ah d'accord, j'avais pas du tout compris ça ! Je croyais que c'était pour que les validateurs puissent comparer la version en ligne et la version mise en validation.

Alors, un truc comme ça : "Pour un tutoriel importé d'un autre site, adresse de la source" ?


It is the full one (33 MB), it is enough with the small one without the test models (7 MB). Your server seems a bit busy at the moment, took 7 minutes to download the file.

E.g. here is a direct link: http://download2.polytechnic.edu.na/pub4/sourceforge/a/as/assimp/assimp-3.1/


@rodrigoalvesvieira e @KaoozFreitas, verifiquem se está tudo correto.


@willdent @particlebanana see https://github.com/balderdashy/sails/issues/2813#issuecomment-103192401


Generally if you're only using it in one scope the smaller names are more understandable (there's science to back that up [citation needed])


Is len(bytes) considered valid?


Voilà, ça, c'est nickel, avec "contenu" à la place de "tutoriel" (je sais, il faut le temps de se faire au fait que la ZEP-12 fait les deux, moi-même je fais l'erreur ^^)


@alivesay @sgress454 cool!  Looks like we still need to update these guys: https://github.com/balderdashy/sails-generate-backend/tree/master/templates/api/responses


Why Scala?


> Generally if you're only using it in one scope the smaller names are more understandable (there's science to back that up [citation needed])

Someday I'm going to submit a pull with variables `l` and `I`...


93653272-SizingTable (JasonGlazer) - Win64-Windows-7-VisualStudio-12: OK (1656 of 1656 tests passed)

![Build Badge](http://img.shields.io/badge/build%20status-passing-green.svg) ![Test Badge](http://img.shields.io/badge/tests%20passed-100.0%25-green.svg)


Go prevents you from having `1` - don't try to trick Rob Pike


lets see if it pulls correctly


oh how did your dates go?!


Test finish


Canola is spelled correctly


I made some changes last night and believe what I have here is now correct.  Can you try this against 0.1.0?


begin you life of github


Oh, also it's now the default: https://github.com/jasonmit/ember-myth/blob/master/index.js#L63-L66


Local to session


@daffl This should be feature tested once and not every time.


I think we should modify this method to always return an integer, perhaps `0` or `1`?


Thanks for your kindness. it would be much help to me :+1:


Dem girls are in New York, I'll let you know when I get back and meet 'em ;P

On Sunday, May 17, 2015, jxcache <notifications@github.com> wrote:

> oh how did your dates go?!
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/botbotbotbot/spaceII/commit/0528bc4121f24ba70a39acefe1774735f0e4a01f#commitcomment-11232838>
> .
>

--
latest Vidcode:
*Vidcode in Intel
<http://iq.intel.com/inside-programming-tool-designed-get-girls-coding/>*
*Vidcode in Fast Company
<http://www.fastcompany.com/3036097/strong-female-lead/a-learn-to-code-startup-for-instagram-loving-teenage-girls>*

*Leandra Tejedor, *Designer and Front-end Developer

*vidcode.io <http://www.vidcode.io/> / @vidcode
<https://twitter.com/vidcode>* / *Insta*
<https://instagram.com/vidcode>* /** FB
<https://www.facebook.com/myvidcode>*


stop


我又添加了一行


@d-led nice! You can delete the coordination var as well.


Si no sale los reportes puede que sea por la imagen en png o por el archivo bulid-impl.


Oh. nice. Thanks for clarifying.


Doesn't it make sense to have exported errors?

I can't see us ever using these errors but it still seems to make sense to export them by default?


Hm, I guess that's a good point. Will your PR to track applied patches change this? I'm guessing that it will, since the lockfile will change.


Hi Arthur,

On Wed, May 13, 2015 at 10:40 AM, Arthur Lambert <notifications@github.com>
wrote:

> Hi Fabio,
>
> I am currently using nfs on the warpboard for my rootfs. To be able to use
> usb port for nfs, I have to put this modification in dts file:
>
> --- linux-patches-4.0.old/arch/arm/boot/dts/imx6sl-warp.dts 2015-04-07
> 18:00:16.656819047 +0200
> +++ linux-patches-4.0/arch/arm/boot/dts/imx6sl-warp.dts 2015-04-07
> 18:00:36.828818182 +0200
> @@ -122,7 +122,7 @@
>
> &usbotg1 {
> vbus-supply = <&reg_usb_otg1_vbus>;
>
>    - dr_mode = "host";
>    - dr_mode = "otg"; disable-over-current; status = "okay"; };
>
> Can I use nfs with peripheral mode ? I am not very familiar with dr_mode
> stuff.
>

It seems that github messes with the format of the patch you posted in your
message, so I am not able to read it correctly.

Maybe you could post it to the wandboard mailig list?

Regards,

Fabio Estevam


this line need to be deleted, too?


Parece que no sé escribir canola


Nice idea, I will update the name accordingly.


:+1: Looks good. The local variables may even give slightly quicker performance and will minify well.


<sea-light


(list)


@dscherba:
Currently we have 4 types of connection:
- XMPP without TLS
- XMPP with TLS
- HTTP (without TLS)
- HTTPS (with TLS)
In this case, we have know that this is HTTP/HTTPS then we can determine based on TLS flags ok. But in other case i'm not sure about this.


Noted, I will use a constant string instead.


Noted, I will update the name.


First, sorry for the late response. Second, sorry for being nit-picking, I would request the following to be renamed to `NodeToCodeUndoHelper` (it is strictly speaking no a recorder). Some updates to the comments also:

```csharp
/// <summary>
/// An undo helper class that is used in node-to-code conversion. It helps to
/// avoid recording redundant user actions (e.g. deletion right after creation
/// will not be recorded). This typically happens when there are multiple code
/// block nodes being created as part of node-to-code conversion, during which
/// some connectors will be created and later on deleted all within the same
/// conversion process.
/// </summary>
public class NodeToCodeUndoHelper
{
}
```


Won't this fail if `self.order_by` is a string: `TypeError: can only concatenate tuple (not "str") to tuple`


Was imagining an extension API for `IEnumerable` that does this, but it's not like that will make anything simpler, so no worries :)


@dscherba: As I mentioned above. currently we have 4 types of connection:

- XMPP without TLS
- XMPP with TLS
- HTTP (without TLS)
- HTTPS (with TLS)

In case of XMPP we will use the ContentWrapper. In case of HTTP/HTTPS we will use the BoshContentWrapper. In this case I think the port number is good to use. But I will use a constant instead of hard code like this.


个人感觉这种修复方式过于暴力。
1. turbolinks.js 属于基础库，直接修改，不便于维护。
2. 虽然这样修改可以解决全屏橘黄的问题，但是引入新的样式问题。

是否考虑根据 weixin&android 的 user agent 写一段用于覆盖的样式代码来解决此问题呢？


Be sure to rename this to `undoHelper` if you rename the class itself.


Yeah, that method is just an internal helper since mapping is a two-step process. It could be private, but I always assume eventually somebody is going to need to subclass.


I thought you'd wait an `IEnumerable` ;)


rax retry tests


:+1:

só cuida para não repetir o seletor $('#rosqueNaVeia') dentro do foreach. Isso pode se tornar drasticamente lento:

http://jsperf.com/jquery-simple-cache-selector#runner


:joy: :joy:


已作相应更改，忽略了.o和.a文件。


mesma questão do cache de seletor que comentei no commit anterior. Extrai esse selector para uma variável, aí ele não será executado para cada iteração no array.


These stuff are not dev dependencies. they are real ones we need for the web.


MUITO BOM! :+1:


This sounds fantastic. I've recently joined a new company that is already quite in love with Bluebird for their promises, but would love to get most into their stack for some FRP goodness, so as soon as the "byo promises" is a reality I'll be looking at doing this :)


cria um array embaixo da linha 2 e adiciona cada título de album nesse array. aí coloca um if para verificar se o array contém o título que está chegando no forEach.


tira esse style na veia!


So... thanks for u, fucking shit GFW!


duas coisas:

1. Não se usa mais `escape`. Leia [aqui](https://developer.mozilla.org/pt-BR/docs/Web/JavaScript/Reference/Global_Objects/escape)
2. Não é preciso fazer isso,  jQuery já faz pra nós.


bem legível! :+1:


cuidar com estilo na veia!


mesma questão do escape no comentário do commit anterior!


These have been saved as ArcMap 10.0 format, so that they're not locked out of versions prior to 10.3.  Sorry about that,   I would not have thought that the formats would have been so incompatible.


Why does it need to look for google bits?


@blueyed
Thank you for pointing out to me.

```
$nul_args ¥
'*::args:_gnu_generic'
```
It is better following code.
```
$nul_args && ret=0
```


Naa


Corrections on exceptions, modifications still need made to permCheck


Haven't heard of that practice yet. I checked the last semver commits, and they didn't include such a tag. If such a tag is prefered, please add it to [COLLABORATOR_GUIDE.md](https://github.com/nodejs/io.js/blob/master/COLLABORATOR_GUIDE.md) ;)


3 coisas:

1. Utiliza `toLowerCase()` para garantir que Justin Bieber e justin bieber são a mesma chave busca (eu sei que o exercício não pedia isso, mas fica mais cômodo pra testar).
2. Este terneiro pode ser mais limpo:
```javascript
var buscaArtista = ($('#pesquisa').val() === "Justin Bieber" && numero >= 20) ? 'douchebag' : idArtista;
url = 'https://api.spotify.com/v1/artists/'+buscaArtista+'/albums?limit=50';
```
3. Se você realizar o cálculo da probabilidade lá em cima não é preciso nem fazer o primeira ajax (economizamos uma requisição por busca desta forma).


Instead of having ```key=None, special_key1=None, special_key2=None``` you could just use ```*keys``` to support N number of special keys. It may be that that many special keys aren't supported, this is just me thinking out loud.


Yes. As long as it's in the table definition in Hive.


você usou `$('#pesquisa').val()` duas vezes no código.. o que devemos fazer neste caso?


:joy:


Check


Se usar cache desse seletor fica mais otimizado, pois aí não força o jQuery a consultar a DOM para cada elemento do array. Atribui isso à uma variável fora do each.


@prudhomm I'll check the output to see the problems. Is it still working in Ensight, but not in ParaView ?


marlon.jpg :joy: :joy


Why is this value so high? Can't you give a rough estimate for each package type?


`$('#artista').val()` é utilizado duas vezes nesta function. O que devemos fazer para melhorar isto?


:+1: the `.jshintrc` and `.editorconfig` do a much btter job of this than codeclimate imo


@153957 This was the commit I was talking about. The local_action line should probably be fixed in the publicdb handlers.yml.


Isn't the Alloy language already defined in GitHub linguist?


The same problem with this commit, it looks like Configuration bug...


I agree with this, but it's going to break people's apps...


Congrats 2.4!


Validated with on 5/18/2015


This commit should not be used in production


See line 78. We are sorting items that aren't in an ng-repeat. All indexes come up `-1`.


Great!
You know if I blame this commit, I can see starting from scratch was probably a more time-saving idea. Which is funny because you picked existing code to save time. :eyes:


I think so.  I think they'll just extend to 6 digits when that is needed.  However, not sure.  DOI is better, but not every data set will have one.


Ah. Alas, `TypeError: unhashable type: 'list'`. This could be fixed by making sure messages always use tuples rather than lists, though.


@SamTebbs33 Yeah it is, it's the MIT once -- we're just pretending the files with the extension `aly` are MIT Alloy files.


Yes.


What `$` means ? or is it a copy and paste of a PHP code :wink: ?


s


e


doesn't apply to 2.6?


Haha, been a while since i've seen a commit here


awesome!


Validated 5/18/2015


Still work to do, but maybe some useful developments here, @willettk?


This breaks `getTransient()` with all NPE's. Should be `this.transientCache = transientCache`. See #332


This password is now compromised.


Better to populate models in service layer with entities


I would get rid of this "if" check and assert the expected value of button.length. The test should be specific to the HTML you are giving it.


May want to consider making this a private repo too :grin:


I would use List<Student> because the same student may be found several times


You can put the common part of the beforeEach (all except the last line) up a level, around line 7, in a shared beforeEach declaration.


I prefer to store full immutable path to file. In this case you can change your current @storageUrl for new files, but leave it as is for old.


@felixangell @MovingtoMars I was a bit surprised, your syntax isn't very similar to MIT Alloy's! :D


Shall I add the Blender file as well?


Validated 5/18/15


I would track also last update 'date' and update by username. If more than one user would work on this project


I would suggest removing the describe "constructor" grouping-- it's just adding another level of nesting, but I don't think it adds any value.


Permite asignar estilos a la tabla que encierra a la tabla generada por rs2html.


use max_range for targetting


@Crotalus In that case don't add this change, since it's not really fixing anything, rather just restricting players even more. Because there is easy way how to assist without canceling upgrade. This change would just piss off all the people that are using this (including me :) )

What about checking codingsquirel's Notify mod. Its allowing player to put acu on upgrade and qeue up commands while upgrading. Maybe it has the answer for this problem ^^


use the distance to the surface, not the center of the body


`generator-lanetix-notifications`


`lanetix-notifications`


I guess since fbx files cannot be opened in blender, that would make sense.


:-)  Yeah.. not super useful


Make sure to cover all the keyCodes that your switch covers (navigating up and down, for instance).


This can be moved outside the loop.


@iamchairs any chance you can provide a forked codepen example?


Aren't these additions to the namespace redundant? Only CMSG's are usually here because they're used as parameters in the functions further in this file. But there aren't any SMSG's as far as I know (due to them usually being used within the CMSG functions instead of as a function themself).


Of course, the risk remains that if TinyURL closes its service, we have a database filled with useless URLs... is there anything we could do about that?


This also can be moved outside the loop and assign to another variable instead of instantiate each time.


Leveled snow is a MUST HAVE. Why did we get rid of it? It's very useful!!!


with the `flat=True` argument it will return a list of makes i.e. `Cars.objects.all().values_list("make", flat=True)` will return `["Dodge", "Ford", "Jeep", "Chevrolet", "Chrysler"]`


Return by value as const?


\param not \return


second `\param` missing


@SamTebbs33 Haha, they are very different :) We still need a new name though, but that's honestly the hardest part about making this compiler so far... :-1:


Validated 5/18/15


El titulo de este Commit es Autorización no Autenticación


@ercanozkaya Setting the type 'application/octet-stream' if the type doesn't exist is not needed. The stream handles this out of the box. See : https://github.com/nooku/nooku-framework/blob/master/code/libraries/koowa/libraries/dispatcher/response/transport/stream.php#L244


Ok now it fits in bootloader with some more optimizations. But the READ is not always good, something strange. Seems better at 200kHz / square clock.


There's a `private:` up there (which makes me think, I should clean that up one day): https://github.com/Geod24/vibe.d/blob/9dc32cbca62c33282543cd29a4b559015fa0c044/source/vibe/web/rest.d#L887

And braces placement is off in 90% of the module, but that's on me. We should check with dfmt if it can gives us a huge style fix for free.


This changes from a return by value to a const reference.


FYI @kvas-damian and @garthwebb


Please note that this one's already in upstream..


See inline comments - I realise now I've done this wrong :( Sorry.


How come you added 2 fields that seem to be convey the same information?


@eregon thanks!

Looks like there are just two more new failing MRI tests. I'm not sure what the causes of these errors are either. Please take a look if you can. `jt test ruby/test_integer.rb`
```
  1) Error:
TestInteger#test_odd_p_even_p:
NameError: method `odd?' not defined in Fixnum
    /Users/brandonfish/Documents/jruby/test/mri/ruby/test_integer.rb:111:in `remove_method': method `odd?' not defined in Fixnum (NameError)
    	from /Users/brandonfish/Documents/jruby/test/mri/ruby/test_integer.rb:111:in `block in test_odd_p_even_p'
    	from /Users/brandonfish/Documents/jruby/test/mri/ruby/test_integer.rb:108:in `test_odd_p_even_p'
    	from /Users/brandonfish/Documents/jruby/test/mri/lib/test/unit.rb:888:in `run_test'

  2) Error:
TestInteger#test_succ:
NameError: method `succ' not defined in Fixnum
    /Users/brandonfish/Documents/jruby/test/mri/ruby/test_integer.rb:132:in `remove_method': method `succ' not defined in Fixnum (NameError)
    	from /Users/brandonfish/Documents/jruby/test/mri/ruby/test_integer.rb:132:in `block in test_succ'
    	from /Users/brandonfish/Documents/jruby/test/mri/ruby/test_integer.rb:130:in `test_succ'
    	from /Users/brandonfish/Documents/jruby/test/mri/lib/test/unit.rb:888:in `run_test'
```


thanx


Just a note: this logic needs to be refactored later. Ideally, for specific dialect, it should incorporate the proper keyword tokenizing and parsing with dialect-specific keyword definitions. This should be way we approach when we add the support for Postgres later.


V tomto komitu aby se prase vyznalo!


Addressees conreset in #25


Error as of 5/18/15


ide autoimported the thing I guess


This can be moved outside the loop.


I am not using any gitignore. I don't need you to add the .project file, but this isn't something you need to ignore.

e.g. if you decide to clone the repository again, you can import the project into Eclipse straight away.


Hi friend @deadmanevil, I hope you be well.


Commit comments like "fix memmove_nodrain_monvt" do not give much information on why this change is being made.  Yes, I would hope this is a fix for something, but what?

And if this fix is correct, why doesn't it also apply to the pmem_flush() call at line 761?

I think it is really vital we get functions like this correct, so when a bug like this is found, please add or modify a unit test so that it exposes the bug, then the fix will demonstrate that the bug is fixed (and then we have a regression test in place as well).  In this case, perhaps one of our existing memmove unit tests could be run at log level ten and the calls to pmem_flush() could be confirmed to exactly cover the destination range.


This looks suspect no 2. This should be

do j = 0, ratio_to_coarser(1)-1


Please, let's keep `Nullable` for types that can't be `null`. This template should really be a no-op for reference type, and only works for value types. Right now it has the meaning of an `Optional` template.
This isn't really a special case, it's just here because if an `out` parameter is not assigned to, it will be `null`, and in those case you don't want empty fields to be returned. And if you want, there is empty string.


This looks suspect no 1. This should be

do j = 0, ratio_to_coarser(1)-1


93653272-SizingTable (JasonGlazer) - x86_64-Linux-Ubuntu-14.04-gcc-4.8-IntegrationCoverage-Debug: OK (1145 of 1145 tests passed)

![Build Badge](http://img.shields.io/badge/build%20status-passing-green.svg) ![Test Badge](http://img.shields.io/badge/tests%20passed-100.0%25-green.svg) ![Coverage Badge](http://img.shields.io/badge/coverage%20status-69.8%25-green.svg)


Failed on 5/18/15


this didn't actually push what i intended... the changes i wanted were lost and i had to rewrite them. I blame vim


Wrong name, again.


Good to use builder pattern:
public class School{
  private Integer id;
  private String name;

  protected School(Builder builder){
    this.id = builder.getId();
    this.name = builder.getName();
  }

  // get & set
  public static class Builder(){
     private Integer id;
     private String name;
    // get & set
  }

  public Builder(School school){
     this.id = school.getId();
     this.name = school.getName();
  }

  public Builder id(final Integer id){
      this.id = id;
  }

  public Builder name(final String name){
    this.name = name;
  }

  public static School build(){
     return new School(this);
  }
}

public class Test{

public static void main(String[] args)}{
    School school = new School.Builder().id(1).name('Something').buiId();

   School update = new School.Builder(school).build();

}

}


This should be filed as an issue against https://github.com/angular/angular.js.


Looks good to me. Do they have tests or do all the existing tests pass?


@alfredooo if you know how to fix


I always wanted to ask this.. Why do you have this extra `"--"`? From `man ag` there is no mention of just `--`.


> On May 18, 2015, at 4:27 PM, Amneet Bhalla <notifications@github.com> wrote:
>
> This looks suspect no 1. This should be
>
> do j = 0, ratio_to_coarser(1)-1
>
Yep.


> On May 18, 2015, at 4:27 PM, Amneet Bhalla <notifications@github.com> wrote:
>
> This looks suspect no 2. This should be
>
> do j = 0, ratio_to_coarser(1)-1
>
Yep.


id `#feedback` duplicado com o acima?


@aeslaughter why these lines are added?!


It does. The problem with static `foreach` is that they expand to nested block. The mangling doesn't take nested block into account (read: it just ignore it), so a function defined inside 2 differents blocks of the same function will mangle to the same symbol.
And since templates are in COMDAT, it gets collected without warning, unless they have a different size. But for simple "delegate" template as we use in this module, it doesn't happen.

This on the other side is just calling code, not defining anything, so it can suffer from this bug.


Why these lines are added?


Yes. test passed.


:D


Great question, I am not sure. I will fix that.


TeamCity OsmSharp :: GitHub - OsmSharp [Build 1004](http://build.osmsharp.com:8080/viewLog.html?buildId=4758&buildTypeId=bt16) is now running


Service model required


@kalashnikovisme анрил какой то.
" у тега a может быть иное поведение, нежели переход на другую страницу." - например?

я могу принять это с точки зрения, что тебе так удобнее верстать - не нужно думать, что вдруг может поехать(ибо у <a> display: inline-block по-моему по умолчанию, в отличие от обычного block у <div>).
если так, то лучше ещё сделай $(document).on('click', '.link', function() { /*то что у тебя внутри */ });, иначе при вставке элемента с таким классом из js'a можешь обнаружить, что почему то по ссылке не переходится.

Но вообще, лучше юзать <a>, потому что у стороннего человека это вызовет на один WTF меньше при чтении кода


Thanks for spotting issue. Not sure it is the right fix, but it's good to know if you see the right behavior with this change.

Additionally we need unit tests so we don't have this come back.


Should we `defer proc.Kill()` here?


Thank you for your tests.
I removed this line from the source code.


Might want to rename `gems/redcloth/` to `gems/RedCloth` to match the gem name.


why not just use attributeReporter()?


Our `remove_method` used to walk the hierarchy, while it should not.
So these failures mean we do not implement the method on the right class and if it was passing it was removing a method which was not the one intended!
I'll fix tomorrow, thanks again for noticing it :)


I think you mixed up `date:` with `cve:`?


@felixangell If I come up with any names, I'll be sure to add them to the opened issue!


Hmmm.. I haven't looked at cordova for a while, but it should work if you installed it via the command line correctly. It sets all the permissions on install.

Do you wait on device ready before creating it? And are you sure you are listening correctly on the receiving device?


You are right. This should have been depth > 1.


lets see if this pulls correctly again


We discussed this in the past. As inefficient as it is, having these extra loops lowers the barrier for the less Python-savvy students.


These classes from `java.nio.file` package seem to available only in Java 7+. We still need to be compatible with Java 6. @manstis can you please take a look?


It works only in your current local machine!


Remove instead of comment out?


These are probably left over from my other branch, I will check.


should you raise an exception of there are more than one paths?


sds


I'll start a sample


Will do <sigh> ;)


Hi @vlachoudis I had a mistake. I've played with config file units and that modification seems to satisfy the request of @Scott216 in #45. But I was not considering also G20/G21.
About issue #45 it seems like is not a issue. The number are in the correct units.
Could be useful append the measurement unit anyway?


We omit the `CVE-` prefix.


kickstarter


Well, it would make it more readable, instead of going through the if/elif in the body of this `test_messages` method, don't you think?


sorry, I think I get it now, `pathWithoutAlias` is a single path, split into its individual components. Right?


second try


Ah spoke too soon :)


It seems like we ought to use that compass mixin. I also just found that we have a custom mixin for coloring the placeholders already:
https://github.com/concord-consortium/lara/blob/staging/app/assets/stylesheets/partials/_mixins.scss#L210
But it seems it is already out of date or incomplete because it doesn't contain the IE properties or the newer firefox property. So that seems to be a good reason to use compass instead.


Seems like we could reuse the `Address` struct here too.


Cool, but can we make it fail if Java 7 can't be found? I see two cases coming: 1. Java 7 is already the default one, so even this if condition is false we're still good, 2. Java 7 is not the default one, and we couldn't find it either, so just make the build fail.
Also, maybe making "1.7" as a constant in the beginning of this script is more clean.


I had both to pass tests that, utilized an external postprocessor to compute the eigenvalue. I will check that I still need this.


This doesn't make any sense. What is the purpose of this line? it is a conditional without any context. If it's intended to be an assignment then it would always evaluate to true. cc @longbill


Thanks! BitHub has sent payment of  $9.49USD for this commit.


It crashed the server if you tried to do it anyway.  https://github.com/balderdashy/sails/issues/2175


Not a real test!


niiice


@ercanozkaya An entity should know it's attachable using a isAttachable() check. This require to have a database or model bevavior which is not provided in your implementation.


Nit: Use Swift trailing-closure syntax.


Thanks for this review!
You're write about a lot of things but I am stuck with RAM trouble so I
have to do more computation to avoid out of memory exception. Anyway, I
will look at it again!


./centreon_plugins.pl --plugin=hardware::server::dell::idrac::snmp::plugin --mode=global-status --hostname=<idrac6_server>
OK: Overall global status is 'ok' |
./centreon_plugins.pl --plugin=hardware::server::dell::idrac::snmp::plugin --mode=global-status --hostname=<idrac7_server>
OK: Overall global status is 'ok' |

drsGlobalSystemStatus exist always in idrac7, globalSystemStat not exist in idrac6

bugfix :

# iDrac 6
if (!defined($result->{$oid_globalSystemStatus})) {

./centreon_plugins.pl --plugin=hardware::server::dell::idrac::snmp::plugin --mode=global-status --hostname=<idrac6_server>
OK: Overall global status is 'ok' |

./centreon_plugins.pl --plugin=hardware::server::dell::idrac::snmp::plugin --mode=global-status --hostname=<idrac7_server>
OK: Overall global status is 'ok' - Overall storage status is 'ok' |

not idrac8 at work, coming soon :)


Whoop whoop!


@ercanozkaya  Do we have a Koowa'ish wrapper for content.prepare ?


So it's all sorted alphabetically but 3 fields? Is that an OCD honeypot? It hurts!


Validated 5/18/15


`if let result = result {`


TeamCity OsmSharp :: GitHub - OsmSharp [Build 4.3.0.1004](http://build.osmsharp.com:8080/viewLog.html?buildId=4758&buildTypeId=bt16) outcome was **SUCCESS**
Summary: Tests passed: 519 Build time: 0:0:0


On Mon, May 18, 2015 at 01:41:09PM -0700, Mathieu Agopian wrote:
>Well, it would make it more readable, instead of going through the if/elif in the body of this `test_messages` method, don't you think?

I don't think so. For one thing, it would mean doing it once for
each call. I could see adding `if expected is None: pass` to
the top, rather than in the last `elif`, though...


This commit adds `.DS_store`. Could you remove it?


`if let result = result`


Hmm, I do not observe a warning when running mocha test.
Suk: either I have written bad JavaShit or I need to understand the mocha

Of to drink some mocca


As far as I can tell, there are still uses for the userland proxy (and `--userland-proxy` is still `true` by default). I wouldn't rename it just yet: its use might be discouraged, but it's not deprecated.


TODO: Apply this same fix to 2.x


Is it possible for you to rename this commit to "Add myself to AUTHORS"? We like that commits have meaningful names that reflect their contents. You can reword commit messages by doing an [interactive rebase](https://help.github.com/articles/about-git-rebase/)


Nit: Use swift trailing closure syntax.


And the code looks terrible for the test


Indeed, but then the UX could tell it's a blob made originating from...
Yes, it could share data in many ways, but in this particular case there would be a prompt before it would try to write it to a tag or device. Not sure how real is the threat anyway. Do you suggest dropping it?


@ercanozkaya The attachment modal code is (probably) something that can be moved into com:files and be made more dynamic. That way a developer only need to include the template into his own to have the functionality he requires.


Nja, lite mer IO som kom i det jag precis pushade.


`if let error = error`


83811490-Fault_DirtyAirFilter (rongpengzhang) - x86_64-Linux-Ubuntu-14.04-cppcheck-1.61: OK (0 of 0 tests passed)

![Build Badge](http://img.shields.io/badge/build%20status-passing-green.svg)


//Do we really need to change the collation of our tables - which is probably correct (Latin1_General_CP1_CI_AS).
//I suspect the old system is incorrect. At some point we will turn off the old system, there is no point bring
//issues over.

//see http://www.ashishblog.com/how-to-resolve-the-collation-conflict-and-how-to-check-collate-in-sql-server/


Validated 5/18/15


Shouldn't this comment now be

    rule initCell => .CellBag
    -or-
    rule initCell(Init) => <cell> Context[$var] </cell>


Fixed here: http://github.com/droolsjbpm/guvnor/commit/fde7a91b1


Yes. I tried to cover all the bases for possible interpretations of default, first entry, plus the default role etc. are all ACEScg, I then have ACES and ACEScc, etc as transforms from ACEScg, I'm using ACEScc as the log role, plus matte painting.

I've been experimenting with various sampling options for the ACEScc conversion as 1D luts, trying to minimise the conversion drift from round tripping to ACEScc from ACEScg too but that's for a different discussion :-)

Kevin


Really it seems like the phases are a relation but idk how we'd model the phases at this time.


Typo: BLUEGEN instead of BLUEGENE.
Possibly simplify logic with the following, replacing likes 42-49?
    CYME_TECH_MATCH(altivec ${CPUINFO})
    if(CYME_TRUE)
        if(BLUEGENE)
            CYME_TECH_TRUE(QPX)
            MESSAGE(STATUS "Could not find hardware support for VMX on this machine.")
        else(BLUEGENE)
              CYME_TECH_TRUE(VMX)
        endif(BLUEGENE)
    endif(CYME_TRUE)


I didn't actually put that there, but I think it means "don't ignore".
So it ignores all the files underneath `/log/*` except for `/log/.keep`.


Did anybody get a chance to test the effect of this commit? We also reference mx_barrier_border_control or mx_highway_speed_camera, so why would only mx_barrier_toll_booth require a fix here?


This comment should now list both forms. Following your other comments, that's probably

    syntax Cell ::= initCell(Map) [initializer, function]
    -or-
    syntax Cell ::= initCell() [initializer, function]


That was just from a search and replace in the editor, but there were a huge number of const problems in the file once I took a closer look (and fixed many of them).


test scope


Since this is example code, yes.


[discussion] Have you considered creating an `UnaliasedPath` that would let you iterate over the list of elements but also host the methods `isSimpleProperty` and co. I guess it would break the `PropertyHelper` hierarchy and overriding possibility.


Thanks for the feedback and the test.


Oh dear god, what have you done.
Please, delete this. Delete this now.


There are two checks here, the log message should tell which one fails if one of them does.


Nobody likes Lambas


Let's move this logic in to libzfs_load_module() with the following changes.

* When ZFS_MODULE_LOADING is not defined simply return (0).
* When !libzfs_module_loaded() trigger `libzfs_run_process("/sbin/modprobe", argv, 0))`
* Add a loop like this which blocks waiting for the `/dev/zfs` device to be created.  Although I think it would be simpler to structure it as a simple for loop and call usleep(1000) to poll.


>all the break;
>break; everywhere
DO NOT USE FUCKING SWITCH FOR THREE CONDITIONALS. WHAT ARE YOU DOING.
Bruno, you are better than this.


Even more Lambas


on_removeButton_clicked still doesn't work.


90210372-ChillerElectricEIR-still-delivering-chilled-water-#4453 (lgu1234) - x86_64-MacOS-10.9-clang: Tests Failed

![Build Badge](http://img.shields.io/badge/build%20status-passing-green.svg) ![Test Badge](http://img.shields.io/badge/tests%20passed-69.45%25-red.svg)


Those poor little bastards


Oh, oops, I copypasted that from another project to get the layout, I thought I'd removed that


Why do you need this, if you run your tests on a local executor instance?


Same thing here.


It would be better to use standard JUnit asserts.


Ack!


Failed


While we're here please remove the fprintf() here and above.  This is a library call and it should never be logging anything to stderr or stdout.  That's a long standing mistake.  These error message should be moved to the zfs/zpool commands.


I see, "cumulative" didn't come to my mind :) It's good to use `cum` then.


Oh, you sneaky little goofball. You thought I wouldn't see what you did to my indents? Think again, kenneth.


You shouldn't need this: the task should be synchronously rejected so you can directly check for `isCancelled`.


@peti I'm fine with it. Given that GHCJS hasn't reached a stable state yet, I don't think this could do any real harm.


Thanks @jwpeterson .  I didn't realise there were incidents of race conditions.  Next time i'll know...

a


dude you are scaring me


Thanks guys. I added a note in the original post with thank yous. Thank you all!

New source:
https://justin.abrah.ms/dotfiles/zsh.html#sec-2-7


having this with hibernate-annotations-3.5.6 is a big problem


${spring.version} here too


While we know that vmx won't be in the techno_ variable unless running on an altivec machine, and consequently out of the supported environments it will be a Linux one, this check is operating system specific. It will be less fragile to collect the CPUINFO once as a cache variable, or once at the beginning of the tests/CMakeLists.cmake script, in the operating system appropriate way, and then test the variable here instead. There do exist PowerPC-based Darwin systems, for example.


It's a matter of UX preference, but I would probably add a flag that modifies the 'gc' subcommand (--force or similar) instead of introducing a new subcommand.


Validated 5/18/15


drop the empty line


these can be final


This needs to be disabled in IE 8: #2325


@soffes
The reason we keep pods in version control is so that designers can easily pull the repo and build without needing to `pod install`


It could be safer to check for `RunnableScheduledFuture`.


Please update the man page, too. :) The man page source file is git-change.rst.


A fuck, now I see it :scream:


this piece is not concurrently safe


Dlatego mam oryginalną implementację w testach zostawioną by mi to pokazała ;)


space before the bracket


Opa :smile:


All the revisions will have the same comment, since the model maker (`revision`) doesn't modify that. You should make sure that r6 has a unique comment.


Fixed.


Done.


Instead of doing all of this, changing the daemons net namepsace, why don't you use the reexec pkg and start a new process and have it join the network namespace and just block until killed?

This way you just have a synchronous workflow, no changing of the daemons namespace, and now `while true; sleep`


83811490-Fault_DirtyAirFilter (rongpengzhang) - x86_64-Linux-Ubuntu-14.04-gcc-4.8: OK (1657 of 1658 tests passed)

![Build Badge](http://img.shields.io/badge/build%20status-passing-green.svg) ![Test Badge](http://img.shields.io/badge/tests%20passed-99.94%25-yellow.svg)


I thought it was better to use `<<` instead of `+=` with this kind of thing. You would know better than me so I'm more curious than anything.


Oops, sorry, you already do that. Nevermind.


I see, but seems it only fails at expression compiling time, since the interfaces of `FlatteningApply` can take arbitrary expressions. Anyway it will be solved once we merge it with `GenericEvaluator`.


why don't you redirect to home directly?


Failed 5/18/15


all tests are limited to a single level of embedded. is that because that's the only thing we support?


yes, that is fine


drop the empty line, annotation should be just above


Won't the "--account=proj16" flag cause problems on non-BBP systems? Better to set the account in the SLURM_ACCOUNT environment variable outside of cmake (e.g. for us, in the Jenkins script) for portability.


drop


oh I guess even ORM doesnot support coll of embedded of coll of embedded


I did wrote that, but also wrote an other commit after to remove that line. It's not present in the actual source.
My bad.


Static import


have to leave early, _from_ the schedules...


I think you're right. I'll update it.


Add the connector ID in here


you can just specify method params as int and it will parse stuff for you


1640-AddHVACPart1-tertiaryLoops (kbenne) - x86_64-MacOS-10.9-clang: Tests Failed

![Build Badge](http://img.shields.io/badge/build%20status-warnings-yellow.svg) ![Test Badge](http://img.shields.io/badge/tests%20passed-0.0%25-red.svg)


Hi! We are using Ember CLI v1.11.3, and we did need to register our custom authenticator with the container. Is this a bug in the documentation, or in the software, so we send a PR? Thanks for your great project.
cc @mattmsumner


one of the prospective uses of the "user agency" feature in this modular programming type of paradigm is to kick in a number of query terms to another hosted app such as the skillconglomerate on this webpage, integrating a human resources search engine on available networks


You cannot kill without a wait or you are just going to make zombies.

![zombie](http://img2.wikia.nocookie.net/__cb20130404133136/plantsvszombies/images/archive/a/a6/20140317233556!ZombieHD.png)


This is missing the thread ID format


discuss Junto Studio's...

Quitar el _about_


because the rejected execution handler hook looks at if StorageProxy.instance.isInShutdownHook() is true.


looks like it is not used :\


done!


Hmm, does this patch imply that we disable HA for the VM on the source for the duration of the memory image migrate? That's a bit dangerous if xapi is restarted during then, right?


Yeah, Just doing it anyway assuming the caller is optimistic it will run


Seems like this will need to be restored too?


Esto da syntax error, estas abriendo un array pero no lo cierras, falta el ]


This could probably be written as a list comprehension. That would make it clearer what is the same and what is different:

```python
d = self.document
revs = [revision(document=d, is_approved=False, comment="test-{0}".format(i), save=True)
        for i in range(7)]
```


And maybe this? Not sure.


while is excessive here. why don't just `String serverEmail = properties.getProperty("email", "")` etc


operatin->operating


This comment describes the order of the comments, but you don't actually test that in the code below. It is a bit confusing. You should either remove the comments about ordering, or make the code test the order of the comments.


This comes from copy pasting. Removed.


Simplified as suggested.


really, isn't this PR the actual implementation of this?


CFPB front-end projects have standardized on using Browserify so if we're going to roll out React components for every CF component, I vote we leave out this CommonJS check and just `module.exports` at the end of the file.


This try/except block doesn't do anything.


Thanks !!


You do a lot more in this commit than just "Adding test". You should write better commit message.


always remove code and don't comment things out.  we can always go back in git history to find out what we need.


Right :(


This is awesome and wonderfully detailed. I think it will only work for a local cluster though, right?

The more generic solution is to create a token that is known by the apiserver, and have the kubeconfig file load that token and point at https://<<MASTER IP/NAME>>:443.

I was looking forward to this generic solution becoming simpler with the addition of service accounts, but I haven't completely caught up with the progress that's been made there.


I'd do these two on one line like

```python
unreviewed_revisions = unreviewed_revisions.exclude(id=rev.id)[:5]
```


Для начала сгодится utest, но в целом, есть для akka-http есть http://doc.akka.io/docs/akka-stream-and-http-experimental/current/scala/http/index-testkit.html
Правда, они пока не добавили доки, ибо пока всё в RC2 состоянии


I'm seeing some similar issues where `createdAt` isn't being set for some queries. Think it could be related?

Error:
`[error: null value in column "createdAt" violates not-null constraint]`

```
[error: null value in column "createdAt" violates not-null constraint]
     name: 'error',
     length: 290,
     severity: 'ERROR',
     code: '23502',
     detail: 'Failing row contains (2, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null).',
     hint: undefined,
     position: undefined,
     internalPosition: undefined,
     internalQuery: undefined,
     where: undefined,
     file: 'execMain.c',
     line: '1611',
     routine: 'ExecConstraints',
     sql: 'INSERT INTO "Users" ("id") VALUES (DEFAULT) RETURNING *;'
```

Query:
`Executing (default): INSERT INTO "Users" ("id") VALUES (DEFAULT) RETURNING *;`

Query Code
```
        database.User.create({

        }).then(function( employee ) {
            api.success( req, res, { employee: employee } );
        }, function( error ) {
            console.log( error );

            api.error( req, res, 'database' );
        });
```

Schema Code:

```
module.exports = function( sequelize, type ) {
    var User = sequelize.define('User', {
        id: { type: type.INTEGER, primaryKey: true, autoIncrement: true, unique: true },

        email: { type: type.STRING, unique: true },
        password: { type: type.STRING },
        firstname: { type: type.STRING },
        lastname: { type: type.STRING },
        avatar: { type: type.STRING },

        addressStreet1: { type: type.STRING },
        addressStreet2: { type: type.STRING },
        addressCity: { type: type.STRING },
        addressState: { type: type.STRING },
        addressPostal: { type: type.STRING },
        addressCountry: { type: type.STRING },
        emailPersonal: { type: type.STRING, unique: true },

        companyRole: { type: type.STRING },

        signupKey: { type: type.STRING },
        pwresetKey: { type: type.STRING },
        status: { type: type.STRING, default: 'pending' }
    }, {
        classMethods: {
            associate: function( models ) {
                User.belongsTo( models.Company, { as: 'Company' });
            }
        }
    });

    return User;
};
```


если код шарится между бекендом и фронтєндом, то лучше не совать в подпапку бекенда


Maybe put some comments about that?


i am new to the travelport api, i am using the c# application you have upload to gain understanding of how the api works but so for i am getting error after error with limited support to the api.

please screenshot with error below.

![error2](https://cloud.githubusercontent.com/assets/12459177/7690242/9edfb544-fdb2-11e4-8e1a-b6e212f4960c.png)


LGTM for me, you can make PR on this commit


Só uma pequena sugestão. Que tal manter os kwargs dentro do próprio `kwargs` e checar o `transparent` com `kwargs.get('transparent', False)` ?
```python
def checkout(self, **kwargs):
    if kwargs.get('transparent', False):
        ...
    else:
       ...
```

@rochacbruno , o que acha?


`if error == nil`


Use Swift trailing closure syntax.


hnng


I would encapsulate each of the %s


Hmm... I think this is no longer valid. (should have question marks instead of exclamation marks.


complete.


Hi dbongs,

Could you please let me know if we could have a webex call and I can reslove the issues over there. Please let me know your availability and timezone and I will setup the webex. Thanks.

Thanks & Regards
Vivekjyoti Pramanik


It should be  sizeof( skybox_ext )/sizeof( skybox_ext[0] ) to get the number of elements.


I think just `.Inactive` will work. My bad if it doesn't :stuck_out_tongue_winking_eye:


actually… no need anymore. just update babel!


all copyright to willox


Fixed, thanks.


Nice, this is definitely the kind of thing which should be part of the style checker.  Once we get things running cleanly `shellcheck` could certainly be added to the builders.

I can see people wanting to run these checks independently, how about splitting this in to two build targets.  The existing `checkstyle` target could then depend on those targets.  For example.

```
cstyle:
<the current check>

shellcheck:
<the new shell checker>

checkstyle: cstyle shellcheck
```


I'd refactor this out as a separate method, `deleteCookie`


looks good.


Nevermind: got removed in the 3rd commit.


This adds to an undocumented magic introduced by 1d9e4ac2e2bedfd40ee2d91a4a6098150af9b5df by which a ruleset that does not exist is transformed into the first available ruleset. In the best case scenario it works. But it also is going to be wrong a number of times and create confusion for the operator.

I propose you kill the
<pre>
     crush_ruleset = find_first_ruleset(pg_pool_t::TYPE_REPLICATED);
</pre>
and just test for the existense of crush_ruleset. There should be no need to change anything else although it is actually a non backward compatible change, because the previous behavior is quite impossible to predict anyway.


please put empty line here and everywhere before an annotation so it will be clearly visible which vars are annotated. now it's cluttered


The issue here is `* binvm1` replacing `/ bm1` in `convop` (the change was actually made two commits ago, but this is the most recent that will compile).


please add a comment on why do you need this?


empty line before the block of annotations needed


same here


same stuff


random commnet


wouldn't it be simpler to just return on error if the default ruleset does not exist ?


Another comment


@cioan this really shouldn't be needed.  The framework will exclude voided encounters out the the box.  If there are non-voided encounters attached to voided patients, it's a data error.  Although the additional code you add here will double guard against data for voided patients, it also will add a performance hit that should be unnecessary


Nice! Can you try to get that merged upstream ? I still think we need a cleanup that would kill the droplets regularly (e.g. every 2 hours, kill the droplets that have an uptime > 50 min) just to make sure we don't spend money stupidly.


It's a copypaste from updateToken method. refactor that out into a shared method e.g. `user.generateToken` or as a tokengenerationStrategy class


drop empty line