Skip to content

Instantly share code, notes, and snippets.

Do Until t_emptyCase.Count = 0
'Strategie pour choisir la prochaine case
index = choisiIndex(t_emptyCase.Count)
'renvoie un objet XY
Set myXY = t_emptyCase.Item(index + 1)
t_nextDirection = randomizeArray(t_direction)
tempAffichage = ""
Private t_world() As Integer
Const cEmpty As Integer = 0
Const cWall As Integer = -1
Const cN As Integer = 1
Const cS As Integer = 2
Const cE As Integer = 4
Const cW As Integer = 8
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package fr.iscpif.mgo.ga.algorithm
import java.util.Random
import fr.iscpif.mgo.ga._
import fr.iscpif.mgo.ga.operators.crossover.SBXBoundedCrossover
package fr.iscpif.mgo.ga.algorithm
import annotation.tailrec
import fr.iscpif.mgo.ga.selection.{Ranking, Distance}
import fr.iscpif.mgo.ga.termination.AbstractTermination
import fr.iscpif.mgo.ga.{GAGenomeFactory, GAGenome, GAFitness}
import fr.iscpif.mgo.{Selection, CrossOver, Mutation, Individual}
import java.util.Random
/*
i 0 > rang 0 / diversity Infinity
i 1 > rang 0 / diversity 1.0069934341367814
i 2 > rang 0 / diversity 0.016694703759535336
i 3 > rang 0 / diversity 0.01736866222815328
i 4 > rang 0 / diversity 0.017201643956916014
i 5 > rang 0 / diversity 0.16666691879872658
i 6 > rang 0 / diversity 0.01669051975223417
i 7 > rang 0 / diversity 4.764292880199799E-5
i 8 > rang 0 / diversity 0.10000055755536028
i 9 > rang 0 / diversity 0.016705964294758704
object CSVTask {
def apply(name: String, file: File)(implicit plugins: PluginSet) =
new TaskBuilder { builder ⇒
private var _columns = new ListBuffer[(String, Prototype[_])]
def columns = _columns.toList
def addColumn(proto: Prototype[_]): this.type = this.addColumn(proto.name, proto)
@reyman
reyman / gist:4686167
Last active December 12, 2015 00:48
Help method used in OpenMole software (openmole.org) to compare native primitive and Scala primitive
/*
* Copyright (C) 2011 Romain Reuillon
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
/*
* Copyright (C) 2011 srey
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
package org.openmole.web
import _root_.akka.actor.{ Props, ActorSystem }
import org.scalatra._
import org.scalatra.servlet._
import scalate.ScalateSupport
import servlet._
import java.io._
import java.security.MessageDigest
import concurrent.{ Await, ExecutionContext, Future }
class MyRepoServlet(val system: ActorSystem) extends ScalatraServlet with ScalateSupport with FileUploadSupport with FutureSupport with SlickSupport {
configureMultipartHandling(MultipartConfig(maxFileSize = Some(3 * 1024 * 1024), fileSizeThreshold = Some(1024 * 1024 * 1024)))
protected implicit def executor: ExecutionContext = system.dispatcher
def processFile(upload: FileItem) = {
val filePath: String = "/tmp/"
println(">> " + upload.getName)