Skip to content

Instantly share code, notes, and snippets.

View iArnold's full-sized avatar

iArnold iArnold

  • Freelance ICT Specialist
  • Netherlands
View GitHub Profile
join: func [
"Concatenates values."
value "Base value"
rest "Value or block of values"
][
value: either series? :value [copy value] [form :value]
repend value :rest
]
Red [ "Reduces and joins a block of values."
]
rejoin: func [
block [block!] "Values to reduce and join"
][
if empty? block: reduce block [return block]
append either series? first block [copy first block] [
form first block
] next block
Red [
filename: %guitest.red
author: "Arnold van Hofwegen"
date: "07-Mrt-2016"
Needs: 'View
]
system/view/debug?: no
live?: system/view/auto-sync?: no
Red [
Title: "Added title"
filename: %guitest.red
author: "Arnold van Hofwegen"
Icon: default
date: "30-Mar-2016"
Needs: 'View
]
system/view/debug?: no
Red [
title: "Red CGI test input from POST and/or GET using input from ansi.red"
]
#include %../../../fossil/C-library/ansi.red
standard-input: input
env-vars: get-env "REQUEST_METHOD"
print "Content-Type: text/html^/" ;-- Required Page Header
@iArnold
iArnold / tb.red
Last active February 24, 2016 08:06
Test board illustrating drag drop swap to top make images disappear
Red [
"Drag and Drop over other images test in simple GUI"
filename: %tb.red
author: "Arnold van Hofwegen"
version: 0.6.0
date: "18-Dec-2015"
Needs: 'View
]
system/view/debug?: no
Red [
Needs: 'view
]
; Declaring the window
win: make face! [
type: 'window text: "Red Splash screen By Arnold" offset: -500x0 size: 100x200
]
; -- Declare window pane
Windows none build none
[1 [0x8 0x7] 4 [0x5] 11 [0x7 2x7] 13 [0x7 2x7 3x7 4x7 5x7 6x7 1x6 1x5 1x4 1x3 1x
0 1x8] 21 [0x7 4x7] 24 [2x5] 31 [4x8] 41 [4x8] 44 [4x5] 51 [4x8] 61 [4x7 8x7] 64
[6x5] 71 [6x7 8x7] 73 [6x7 5x7 4x7 3x7 2x7 8x7 7x6 7x5 7x4 7x3 7x0 7x8] 81 [8x8
8x7] 2 [8x5]]
Before calculating piece-offset
white-king: make face! [
type: 'base offset:
pair 265x465 4x9 265 465
After calculating piece-offset
@iArnold
iArnold / qi2.red
Created October 30, 2015 13:29
transparency test
Red [
Needs: 'View
]
system/view/debug?: yes
live?: system/view/auto-sync?: no
workstation?: system/view/platform/product = 1
print [
comment {
Code By Rebolek
"It's a terrible version, that I use just for short strings, so it's certainly very unoptimalized, but here you go:"
Thank you for sharing!
}
rejoin: func [
"Crude REJOIN version, because I can't live without it"
block [block!]
/local