原创 樹莓派安裝python3

新買的樹莓派4b,內存8G,可惜系統還是32位的。先這樣吧。 原生搭載的是python2.7.16.爲了面向未來編程,需要搞一個python3的環境。 這裏我選用的是pyenv.雖說坑多,但是哪個沒坑呢。 首先按照 文章 來安裝pyenv

原创 Haskell99題答案

1 Problem 1 (*) Find the last element of a list. (Note that the Lisp transcription of this problem is incorrect.) Exam

原创 Haskell函數式編程基礎習題(3)

import Data.Char --------------------------- --Exercise 5.26 --Exercise 5.25 --Exercise 5.24 --Exercise 5.23 duplicate

原创 Springboot更換Mybaits爲lift-mapper

MyBaits使用實在是煩惱,要建立DAO,還要寫XML.嗯也許大多數需求也用不上xml。遠不如scala下的各種ORM框架來的簡介明瞭。 先簡單列舉一下Scala下的ORM框架 slick:還不錯,整合較簡單 quill:整合略麻煩 s

原创 Haskell函數式編程基礎習題

-- Exercise 3.14 myMin :: Int -> Int -> Int myMin x y | x < y = x | otherwise = y myMinThree :: Int -> Int -> Int

原创 Haskell的yesod框架-1

參看https://www.fpcomplete.com/blog/2012/10/yesod-tutorial-1-my-first-web-site 1。安裝yesod cabal install yesod 就可以了。 2.在你的

原创 springcloud robbin踩坑

springboot+eureka+robbin @Service public class HelloService { @Autowired RestTemplate restTemplate;

原创 Haskell超簡單環境搭建

需求:搭建一個靈活且通用的編寫編譯Haskell代碼的方案。要求Windows,Linux,Mac三端通用,且遷移代碼代價最小 首先找到一個最方便的Haskell編寫IDE 選擇方案有如下。IDEA+Haskell插件,Ecelipse+

原创 IDEA下的scala開發Android應用

主要參考了http://fxthomas.github.io/android-plugin/tutorial/01-getting-started.html 首先clone https://github.com/fxthomas/andr

原创 一個跳舞題目的Haskell解答[未完成]

m個舞者和n和領舞者跳舞 規則1:舞者不能和同一個領舞者跳兩次以上 規則2:舞者不能跳同一個舞曲一次以上 求出所有組合 import Data.List {-領舞者-} type Leader = String {-舞蹈-} type

原创 Haskell函數式編程基礎習題(4)

--Exercise 6.35 --Exercise 6.34 --Exercise 6.33 --Exercise 6.32 printImage :: Image -> IO() printImage i = print i -

原创 SBT指定資源目錄

scalaSource in Compile := baseDirectory.value / "src" resourceDirectory in

原创 Haskell之Yesod開發–基礎環境

開發環境:WindowsXP 不要問我爲啥不用mac,ubuntu之類的東西。虛擬機裝個windows最容易。 安裝Haskell Platform 什麼,你不知道怎麼裝?請找度娘 命令行執行一下 cabal update 嗯

原创 Android之插件

參考此文 需要注意 在Linux和Mac上面,壓縮jar爲dex,要使用dex2jar-0.0.9.12中的d2j-jar2dex.sh ./d2j-jar2dex.sh -f -o /Users/xxx/Downloads/plug

原创 -第12章代碼走讀

247頁代碼 247頁 x<- left' i ==x<- writer(4-1,"move left\n1") y <- left' (writer(4-1,"move left\n1")) --> (Writer(x,v)