This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function (output = stdout(), envir = parent.frame()) | |
| { | |
| sunk <- FALSE | |
| if (!missing(output)) { | |
| sunk <- TRUE | |
| sink(output) | |
| } | |
| text <- get("text") | |
| brew.cat <- function(from, to) cat(text[from:to], sep = "", | |
| collapse = "") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; ######################################## | |
| ; #### NetLogo A* Algorithm ###### | |
| ; #### Author : Robin Cura ###### | |
| ; #### Contact : robin.cura@gmail.com #### | |
| ; #### Date : 09/07/2013 ###### | |
| ; #### Licence : GPL v2 ###### | |
| ; ######################################## | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package rcfx | |
| import scalafx.Includes._ | |
| import scalafx.application.JFXApp | |
| import scalafx.scene.Scene | |
| import scalafx.scene.paint.Color | |
| import scalafx.scene.shape.Rectangle | |
| import scalafx.stage.Stage | |
| object World extends JFXApp { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| myFolder <- "/home/robin/imagesR" | |
| test <- runif(n=10) | |
| for(i in 1:10){ | |
| png(filename=paste(myFolder, "/test_", i, ".png",sep=""), | |
| units="in", | |
| width=5, | |
| height=4, | |
| pointsize=12, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| from osgeo import ogr | |
| roadShpPath = "D:\\DonneesM2\\UMZ_2000_Cut.shp" | |
| fieldToUse = 'Type' | |
| driver = ogr.GetDriverByName("ESRI Shapefile") | |
| datasource = driver.Open(roadShpPath) | |
| layer = datasource.GetLayer() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package fr.geocite.simprocess.hook.xylinecharts | |
| import org.openmole.core.model.data._ | |
| import fr.geocite.simprocess.javafx.ui.{ filter, IVariableData } | |
| import org.openmole.misc.exception.UserBadDataError | |
| import filter.FilterLine | |
| import scala.collection.JavaConversions._ | |
| import spray.json._ | |
| import scala.Array | |
| import javafx.collections.FXCollections |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def createColumnNamesList(): List[String] = | |
| { | |
| val columnsToAdd = new ListBuffer[String] | |
| val tmpXCol = mappedVar.get("X") match { | |
| case Some(x: String) ⇒ x | |
| case _ ⇒ "" | |
| } | |
| if (tmpXCol != "") { | |
| columnsToAdd += tmpXCol | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| val abc = scala.collection.mutable.ListBuffer[Double] | |
| abc += 45 | |
| abc += 87 | |
| def f(l: List[_]) = l | |
| f(abc) | |
| implicit def arrayToList[T](a:scala.collection.mutable.ListBuffer[T]): List[T] = a.toList |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // We create a list of columns, that will contain all the variables to be filtred. | |
| val buffer = new scala.collection.mutable.ListBuffer[Array[_]] | |
| buffer += valueVariableX | |
| buffer += valueVariableY | |
| listFiltre.foreach { v ⇒ v | |
| val columnName = v.name.toString | |
| val columnVariable = getVariableFromColumn(columnName) | |
| val columnValue = get[Array[Double]](columnVariable) match { | |
| case Some(i: Array[Double]) ⇒ i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import fr.geocite.simprocess.javafx.ui.tableview.JFXTableView | |
| import javafx.scene.layout._ | |
| import javafx.geometry.{ Orientation, HPos, Insets } | |
| import javafx.scene.control._ | |
| import javafx.collections.{ ObservableList, FXCollections } | |
| import fr.geocite.simprocess.javafx.ui.doubleslider.DoubleSlider | |
| import fr.geocite.simprocess.javafx.ui.textfield.DoubleTextField | |
| import javafx.beans.value.{ ObservableValue, ChangeListener } | |
| import javafx.event.{ ActionEvent, EventHandler } | |
| import javafx.scene.{ Node, Scene, input } |