楼主: Limdep
2849 5

Clojure Cookbook [推广有奖]

  • 0关注
  • 2粉丝

已卖:117份资源

本科生

98%

还不是VIP/贵宾

-

TA的文库  其他...

Java资源全汇

Data Science NewOccidental

Database NewOccidental

威望
0
论坛币
4718 个
通用积分
4.2550
学术水平
8 点
热心指数
3 点
信用等级
3 点
经验
1089 点
帖子
133
精华
0
在线时间
20 小时
注册时间
2006-5-15
最后登录
2017-10-27

楼主
Limdep 发表于 2015-2-10 08:56:19 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

Clojure Cookbook


Recipes for Functional Programming


Book DescriptionWith more than 150 detailed recipes, this cookbook shows experiencedClojure developers how to solve a variety of programming tasks with this JVM language. The solutions cover everything from building dynamic websites and working with databases to networkcommunication, cloud computing, and advanced testing strategies. And more than 60 of the world's best Clojurians contributed recipes.

Each recipe includes code that you can use right away, along with a discussion on how and why the solution works, so you can adapt these patterns, approaches, and techniques to situations not specifically covered in this cookbook.
Book Details
Publisher:        O'Reilly Media
By:        Luke VanderHart, Ryan Neufeld
ISBN:        978-1-44936-617-9
Year:        2014
Pages:        476
Language:        English
File size:        10.2 MB
File format:        PDF
Download:        
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Cookbook Clojure Book Cook jure everything computing databases includes building

本帖被以下文库推荐

沙发
Limdep 发表于 2015-2-10 09:10:58

本帖隐藏的内容

Clojure Cookbook.rar (7.91 MB, 需要: 20 个论坛币) 本附件包括:
  • Clojure Cookbook.pdf



藤椅
Nicolle 学生认证  发表于 2015-2-10 10:26:04
提示: 作者被禁止或删除 内容自动屏蔽

板凳
meng山楂树 发表于 2015-2-10 10:29:46
  1. Cleaning Up Whitespace in a String
  2. by Ryan Neufeld
  3. Problem
  4. You need to clean up the whitespace in a string.
  5. Solution
  6. Use the clojure.string/trim function to remove all of the whitespace at the beginning and end of a string:
  7. (clojure.string/trim " \tBacon ipsum dolor sit.\n")
  8. ;; -> "Bacon ipsum dolor sit."
  9. To manage whitespace inside a string, you need to get more creative. Use clojure.string/replace to fix whitespace inside a string:
  10. ;; Collapse whitespace into a single space
  11. (clojure.string/replace "Who\t\nput  all this\fwhitespace here?" #"\s+" " ")
  12. ;; -> "Who put all this whitespace here?"

  13. ;; Replace Windows-style line endings with Unix-style newlines
  14. (clojure.string/replace "Line 1\r\nLine 2" "\r\n" "\n")
  15. ;; -> "Line 1\nLine 2"
复制代码

已有 1 人评分论坛币 收起 理由
Nicolle + 20 鼓励积极发帖讨论

总评分: 论坛币 + 20   查看全部评分

报纸
gyqznufe 发表于 2015-2-10 19:58:41
  1. Building a String from Parts
  2. by Ryan Neufeld
  3. Problem
  4. You have multiple strings, values, or collections that you need to combine into one string.
  5. Solution
  6. Use the str function to concatenate strings and/or values:
  7. (str "John" " " "Doe")
  8. ;; -> "John Doe"

  9. ;; str also works with vars, or any other values
  10. (def first-name "John")
  11. (def last-name "Doe")
  12. (def age 42)

  13. (str last-name ", " first-name " - age: " age)
  14. ;; -> "Doe, John - age: 42"
  15. Use apply with str to concatenate a collection of values into a single string:
  16. ;; To collapse a sequence of characters back into a string
  17. (apply str "ROT13: " [\W \h \y \v \h \f \  \P \n \r \f \n \e])
  18. ;; -> "ROT13: Whyvhf Pnrfne"

  19. ;; Or, to reconstitute a file from lines (if they already have newlines...)
  20. (def lines ["#! /bin/bash\n", "du -a ./ | sort -n -r\n"])
  21. (apply str lines)
  22. ;; -> "#! /bin/bash\ndu -a ./ | sort -n -r\n"
复制代码

已有 1 人评分论坛币 收起 理由
Nicolle + 20 鼓励积极发帖讨论

总评分: 论坛币 + 20   查看全部评分

地板
Nicolle 学生认证  发表于 2015-9-9 08:35:34
提示: 作者被禁止或删除 内容自动屏蔽

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-29 08:00