This file contains 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: "Rudimentary implementation of Logo Turtle" | |
date: 2015-02-16 | |
author: "Martin Ceronio" | |
] | |
{ Load the turtle image; you can find the original at https://edu.kde.org/images/icons/kturtle_32.png Thanks, KTurtle! } | |
turtle-img: do to-string debase | |
{bWFrZSBpbWFnZSEgWzMyeDMyICN7CjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAowMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAKMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwCjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAowMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAxMDAwNjdBMDcwNjdBMDcwNjdBMDcwNjdBMDcKMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwCjAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAowMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAxMDAwNjdBMDcwNjdBMDcKMDY3QTA3MDY3QTA3MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMD |
This file contains 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
class Trie < Hash | |
def initialize | |
super | |
end | |
def build(string) | |
string << '.' #Terminator indicating end of a complete word | |
string.chars.inject(self) do |h, char| | |
h[char] ||= { } | |
end |
This file contains 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
*--------------------------------------------------------------------* | |
* Example program to extract data to Elasticsearch | |
*--------------------------------------------------------------------* | |
* Be sure to read the accompanying article: | |
* http://ceronio.net/2015/02/sap-business-intelligence-with-elasticseach-and-kibana/ | |
*&---------------------------------------------------------------------* | |
*& WARNING!: This program is just a proof of concept. For a proper | |
*& production-quality extraction program, you would: | |
*& 1. Use a database cursor for selection | |
*& 2. Do bulk updates to Elasticsearch for better performance |
This file contains 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
Red [needs: view] | |
turtle: #() | |
win: layout [ panel [ | |
tfield: base 500x500 white draw [] | |
origin tfield/offset tlayer: base 500x500 255.255.255.255 draw [] ] | |
panel [ | |
text "History" return history: text-list 200x350 data [] return | |
panel [ button "Save" [save request-file history/data] |
This file contains 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
#!/usr/bin/ruby | |
require 'nwrfc' | |
require 'logger' | |
include NWRFC | |
# This is an example of a Ruby script using the nwrfc gem to post Accounting documents to | |
# an SAP ECC system using BAPI_ACC_DOCUMENT_POST. You can obviously easily adapt it to | |
# your needs |
This file contains 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
*&---------------------------------------------------------------------* | |
*& Include ZLIBREGISTRY | |
*&---------------------------------------------------------------------* | |
* Implementation of a registry for storing arbitrary values (similar | |
* to the MS Windows registry) | |
* Author: Martin Ceronio (2015), http://ceronio.net | |
* Released under MIT License: http://opensource.org/licenses/MIT | |
class lcx_registry_err definition inheriting from cx_dynamic_check. | |
endclass. "lcx_registry_err DEFINITION |
This file contains 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
*&---------------------------------------------------------------------* | |
*& Include ZTEMPJSON_INCL | |
*&---------------------------------------------------------------------* | |
* A clean, reliable and compliant JSON parser and mapper to ABAP data; | |
* the kind your mother would have encouraged you to hang out with. | |
*----------------------------------------------------------------------* | |
* CLASS json_error DEFINITION | |
*----------------------------------------------------------------------* | |
class json_error definition inheriting from cx_static_check. | |
public section. |
This file contains 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
* Rather use https://gist.github.com/mydoghasworms/4888a832e28491c3fe47 | |
* The alternative is a better parser although it is not an emmitter) | |
*----------------------------------------------------------------------* | |
* CLASS json_util DEFINITION | |
*----------------------------------------------------------------------* | |
class json_util definition. | |
public section. | |
class-methods: | |
data_to_json importing data type any | |
returning value(json) type string, |
OlderNewer