puts "hello, world"
- Ruby ใช้เป็น code block ไม่ได้ใช้ {} ครอบ block นั้น
defmodule FileServer do | |
@doc """ | |
starting FileServer process. | |
""" | |
def start(dir \\ ".") do | |
spawn(FileServer, :loop, [dir]) | |
end | |
def loop(dir) do | |
receive do |
$ ./configure --enable-rust-debug | |
checking for xcrun... xcrun | |
checking for make... yes | |
checking for GNU Make... make | |
checking build system type... x86_64-apple-darwin19.2.0 | |
checking host system type... x86_64-apple-darwin19.2.0 | |
checking for gcc... gcc | |
checking whether the C compiler works... yes | |
checking for C compiler default output file name... a.out | |
checking for suffix of executables... |
proc sum { a b } { | |
return [expr $a + $b] | |
} |
package main | |
import ( | |
"bufio" | |
"fmt" | |
"math/rand" | |
"os" | |
"strconv" | |
"strings" | |
"time" |
async function cacheDo() { | |
return await cache.do(key, async () => { | |
return await db.findOne(); | |
}); | |
} | |
(async () => { | |
let missyou = await cacheDo(); | |
})() |
importClass(Packages.org.springframework.web.context.ContextLoader); | |
importClass(Packages.org.alfresco.service.cmr.repository.TransformationOptions); | |
var context = ContextLoader.getCurrentWebApplicationContext(); | |
var alfThumbnailService = context.getBean("thumbnailService"); | |
alfThumbnailService.updateThumbnail(document.getThumbnail("webpreview").nodeRef, new TransformationOptions()); |
importClass(Packages.org.springframework.web.context.ContextLoader); | |
importClass(Packages.org.alfresco.service.cmr.repository.StoreRef); | |
var ctx = ContextLoader.getCurrentWebApplicationContext(); | |
var archiveService = ctx.getBean("nodeArchiveService"); | |
archiveService.purgeAllArchivedNodes(new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore")); |
defmodule Hangman do | |
def hangman(secret_word, inputs) do | |
MapSet.subset?(MapSet.new(String.graphemes(secret_word)), MapSet.new(inputs)) | |
end | |
end |
package hangman | |
import "strings" | |
func Hangman(word string, inputs []string) bool { | |
for _, input := range inputs { | |
if word = strings.Replace(word, input, "", -1); word == "" { | |
return true | |
} | |
} |