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
| Rebol [ | |
| ] | |
| ind: [ | |
| [1 "Jones" "Tom"] | |
| [2 "Smith" "William"] | |
| [3 "Jones" "Stephen"] | |
| ] |
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
| rebol [ | |
| title: "editor" | |
| purpose: {Built in editor} | |
| author: "Based on the original Rebol2 editor, ported by Massimiliano Vessi" | |
| version: 2.5 | |
| date: 29-March-2014 | |
| ] | |
| if not value? 'to-text [ load-gui ] |
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
| REBOL [ | |
| title: "A tiny static HTTP server" | |
| author: 'abolka date: 2009-11-04 | |
| file: %gui-server.reb | |
| ] | |
| load-gui | |
| code-map: make map! [200 "OK" 400 "Forbidden" 404 "Not Found"] | |
| mime-map: make map! ["html" "text/html" "jpg" "image/jpeg" "r" "text/plain"] |
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
| REBOL [ | |
| title: "mci.reb" | |
| notes: { | |
| taken from http://rosettacode.org/wiki/Record_sound | |
| } | |
| ] | |
| mci: make library! %Winmm.dll |
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
| data: collect [ | |
| foreach [var val] reduce ["user[email]" user "user[password]" pass "user[remember_me]" "0"][ | |
| keep rejoin [var "=" url-encode val "&"] | |
| ] | |
| ] | |
| data: rejoin data | |
| take/last data |
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
| TranslatorToken.o: grab-access-token create-credentials "http://api.microsofttranslator.com" | |
| reb: load https://raw.githubusercontent.com/metaeducation/ren-c/master/src/boot/natives.r | |
| print [ "Length:" length? reb] | |
| translate-to-chinese: function [ text][ | |
| request-str: to-webform compose [ | |
| text: (text) | |
| from: "en" | |
| to: "zh-CHS" |
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
| ajoin: native ["减少了,加入一个新的字符串值的块。" | |
| block [block!] | |
| ] | |
| also: native ["返回第一个值,但是还可以计算第二个。" | |
| value1 [any-type!] | |
| value2 [any-type!] | |
| ] | |
| all: native ["快捷方式和评价,在第一的虚假或没有返回。" | |
| block [block!] "表达式块" | |
| ] |
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
| Rebol [ | |
| file: %base32.reb | |
| notes: { | |
| padding to 5 characters is not required in this method | |
| } | |
| ] | |
| to-base32: function [ st [string!] | |
| /hex {output base32hex} | |
| ][ |
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
| until [ | |
| either parse data [ | |
| copy chunk-size some hex-digits thru crlfbin mk1: to end | |
| ] [ | |
| chunk-size: to integer! to issue! to string! chunk-size | |
| either chunk-size = 0 [ | |
| if parse mk1 [ | |
| crlfbin (trailer: "") to end | copy trailer to crlf2bin to end | |
| ] [ | |
| trailer: construct trailer |
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
| \ tested on 8th 16.07 Windows 32 (3d80ecde) | |
| \ update with using nullndrop; words | |
| \ some variables to store the action and verb for the xhtml form | |
| null var, verb null var, action | |
| : nulldrop; \ x -- x|exit | |
| null? if drop ;;; then ; | |
| : null2drop; \ x y -- x y|exit |