This file contains 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
object rio2ter extends App { | |
var lResultMySQL = List("PA0001", "PA0002", "PA0003", "PA0004", "PA005") | |
var lTypeZone = List("zsp", "csp", "ddsp") | |
var wsRio = new scala.util.Random; | |
def mysql2lcodedialog(typeZone:String) = { | |
def query(typeZone:String) = "SELECT idRio from ".concat(typeZone) | |
println("Faire la requette : " + query(typeZone) + " puis en retourner la liste de code dialog.") | |
lResultMySQL.foreach(r => r.concat(typeZone)) |
This file contains 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 Text.ParserCombinators.Parsec | |
import Control.Applicative | |
import System.Environment | |
import Data.Function | |
import Data.List | |
data LogLine = LogLine { | |
getIP :: String | |
, getIdent :: String | |
, getUser :: String |
This file contains 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 HSlippyMap | |
main = do | |
mapM (\(x,y) -> mapM (\y'-> print $ "http://openstreetmap.asi.mi/" ++ show z ++ "/" ++ show x ++ "/" ++ show y' ++ ".png") y) [(x,\ | |
[(minimum [tymin, tymax])..(maximum [tymin,tymax])]) | x <- [(minimum [txmin, txmax])..(maximum [txmin, txmax])]] | |
where | |
min = tileFromLatLong 49.13 3.05 8 | |
max = tileFromLatLong 48.57 1.66 8 | |
txmin = tx min | |
txmax = tx max |
This file contains 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
{-- | |
Bessans : | |
min = tileFromLatLong 45.32 6.98 19 | |
max = tileFromLatLong 45.31 7.01 19 | |
--} | |
import HSlippyMap | |
import Network.Curl | |
lbbox = [[(49.13, 3.05),(48.57,1.66)]] |
This file contains 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
#!/usr/local/bin/runhaskell | |
import HSlippyMap | |
listLevel mi ma z = | |
mapM_ (\(x,y) -> mapM (\y'-> | |
print $ "http://127.0.0.1:20008/tile/openstreetmap-carto/" ++ show z ++ "/" ++ show x ++ "/" ++ show y' ++ ".png") y) | |
[(x,[(minimum [tymin, tymax])..(maximum [tymin,tymax])]) | x <- [(minimum [txmin, txmax])..(maximum [txmin, txmax])]] | |
where | |
min = tileFromLatLong (fst mi) (snd mi) z |
This file contains 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 Network.Curl | |
import System.IO | |
import Data.List | |
main = do | |
h <- openBinaryFile "lrues.txt" ReadMode | |
c <- hGetContents h | |
mapM (\x -> do | |
resp <- (curlGetResponse_ ("http://10.192.45.36/JDONREFv3JSON/Normalise?application=2&services=1&operation=1&donnees=&donnees=appartement%200%20entr%C3%A9e%20B&donnees=&donnees=24-26%20ter%20rue%20d" ++ x) [] :: IO CurlResponse) | |
r <- (respGetInfo resp TotalTime) |
This file contains 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
(mapM (\l -> putStr ("Point for " ++ show l ++ " ? : ") >> getLine >>= (\p -> return (read p::Int))) "mot") >>= return . foldr (+) 0 >>= (\x->do r<-(putStr "Bonus coef ? : " >> getLine >>= (\b -> return (read b::Int))); print $ r*x) |
This file contains 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
-- | URL Doc : http://hackage.haskell.org/package/url-2.1.3/docs/Network-URL.html | |
module Page where | |
import Network.URL | |
import Network.Curl | |
import Text.XML.HXT.Core | |
import Text.HandsomeSoup | |
data Page = Page { | |
title :: String, |
This file contains 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
// Server | |
var http = require('http'); | |
var fs = require('fs'); | |
var redis = require('redis').createClient(6379, "10.73.0.1"); | |
// Chargement du fichier index.html affiché au client | |
var server = http.createServer(function(req, res) { | |
fs.readFile('./index.html', 'utf-8', function(error, content) { | |
res.writeHead(200, {"Content-Type": "text/html"}); |
This file contains 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 main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"net/url" | |
"os" |
OlderNewer