Skip to content

Instantly share code, notes, and snippets.

View qtxie's full-sized avatar
🏠
Working from home

Qingtian qtxie

🏠
Working from home
  • FullStack Technologies
View GitHub Profile
@mmozeiko
mmozeiko / webcam_capture.c
Created August 28, 2019 20:25
Capture webcam device with Media Foundation API
#define COBJMACROS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <mfapi.h>
#include <mfidl.h>
#include <mfreadwrite.h>
#include <stdio.h>
#include <intrin.h>
Red [
Title: "Conway's Game of Life"
Needs: 'View
]
system/view/auto-sync?: no
grid: collect [repeat i 50 [keep/only collect [repeat j 50 [keep random true]]]]
scratchgrid: collect [repeat i 50 [keep/only collect [repeat j 50 [keep false]]]]
a: copy grid/1
b: copy grid/50
@greggirwin
greggirwin / trig-lab.red
Last active October 23, 2017 19:53
Interactive trig function laboratory
Red [
Title: "trig-lab.red"
Author: "Gregg Irwin"
File: %trig-lab.red
Needs: 'View
Purpose: {
See %math-lab comments for details. This script focuses
on trigonometric functions.
}
]
@greggirwin
greggirwin / bubbles-fast.red
Last active June 20, 2016 23:37
Fast bubbles in Red (move mouse over to make it go faster)
Red [
Title: "Bubbles"
Author: [REBOL version "Gabriele Santilli" Red port "Gregg Irwin"]
File: %bubbles.red
Tabs: 4
Needs: View
]
system/view/auto-sync?: no
@greggirwin
greggirwin / resize-image-2.red
Last active June 19, 2016 22:59
Red enhanced and annotated image resizing demo
Red [
Title: "Draw Image Resizing Test"
Author: [REBOL version "Carl Sassenrath" Red port "Gregg Irwin"]
Version: 0.0.1
Needs: View
]
;ii Red is very flexible, allowing you to structure your code in
;ii many different ways. While it's almost never a good idea to
;ii write "clever" code, it can be very powerful to write code
@greggirwin
greggirwin / calculator.red
Created June 19, 2016 00:04
Red Calculator
Red [
Title: "Calculator"
File: %calculator.r
Version: 0.0.1
;Date: 18-Jun-2016
Author: [
REBOL version ["Jeff Kreis" "Allen Kamp" "Carl Sassenrath"]
Red port "Gregg Irwin"
]
Purpose: "Simple numeric calculator."
@greggirwin
greggirwin / paint.red
Last active February 8, 2018 18:28
Red Paint (World's smallest paint program)
Red [
title: "Paint"
Author: [REBOL version "Frank Sievertsen" Red port "Gregg Irwin"]
File: %paint.red
Tabs: 4
Needs: View
version: 0.0.2
]
draw-blk: copy []
@greggirwin
greggirwin / bubbles.red
Last active June 17, 2016 23:23
Animated bubbles
Red [
Title: "Bubbles"
Author: [REBOL version "Gabriele Santilli" Red port "Gregg Irwin"]
File: %bubbles.red
Tabs: 4
Needs: View
]
system/view/auto-sync?: no
@greggirwin
greggirwin / analog-clock-2.red
Last active June 17, 2016 23:24
Analog clock, refined, with informational comments
Red [
Title: "Red O'clock"
Author: "Gregg Irwin"
File: %analog-clock.red
Tabs: 4
Needs: View
Purpose: {
- Introduce some basic Red concepts, like functions and datatypes
- Show how the DRAW block and timer events work in the View system
}