Skip to content

Instantly share code, notes, and snippets.

View iArnold's full-sized avatar

iArnold iArnold

  • Freelance ICT Specialist
  • Netherlands
View GitHub Profile
@iArnold
iArnold / found?.red
Created May 20, 2015 08:42
Mezzanine FOUND? for Red programming language
found?: func [
"Returns true if value is not NONE."
value
][
not none? :value
]
@iArnold
iArnold / string-to-integer.red
Created June 17, 2015 19:10
string-to-integer convertion
string-to-integer: function [
input [string!]
return: [integer! none!]
/local
total [integer!]
in-char [char! string!]
cipher [integer!]
is-number [logic!]
][
is-number: false
Red [
Needs: 'View
]
system/view/debug?: yes
workstation?: system/view/platform/product = 1
print [
"Windows" switch system/view/platform/version [
@iArnold
iArnold / rs-mac-window.reds
Created October 1, 2015 17:43 — forked from qtxie/rs-mac-window.reds
Red/System Mac OSX Window
Red/System [
Title: "Red/System Mac OSX Window"
Author: "Qingtian Xie"
File: %rs-mac-window.reds
Type: 'library
Tabs: 4
Rights: "Copyright (C) 2014 Qingtian Xie. All rights reserved."
Compiling: "rebview.exe -qs red.r -t Darwin rs-mac-window.reds"
Reference: {
https://github.com/CodaFi/C-Macs
@iArnold
iArnold / qi-dyn.red
Created October 5, 2015 10:01
A try to see a line being drawn on the canvas
Red [
Needs: 'View
]
system/view/debug?: yes
workstation?: system/view/platform/product = 1
print [
"Windows" switch system/view/platform/version [
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
@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 [
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
Red [
Needs: 'view
]
; Declaring the window
win: make face! [
type: 'window text: "Red Splash screen By Arnold" offset: -500x0 size: 100x200
]
; -- Declare window pane
@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