Skip to content

Instantly share code, notes, and snippets.

View mkarczewski85's full-sized avatar

Maciej mkarczewski85

View GitHub Profile
@andrewmeissner
andrewmeissner / powerset.go
Last active February 16, 2021 20:32
Golang powerset implementation
// BROKEN - 18 MARCH 2020 - 1,2,3,4,5 PRODUCES INCORRECT RESULTS
package main
import "fmt"
func main() {
powerset := powerSet([]string{"1", "2", "3", "4"})
fmt.Println(powerset)
}
@kamontat
kamontat / array_sum.asm
Created November 15, 2017 06:28
summation array on MIPS assembly
.data # data section
array_a: .word 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
array_b: .word 0x7fffffff, 0x7ffffffe, 0x7ffffffd, 0x7ffffffc, 0x7ffffffb, 0x7ffffffa, 0x7ffffff9, 0x7ffffff8, 0x7ffffff7, 0x7ffffff6
output_a: .asciiz "Sum a = "
output_b: .asciiz "Sum b = "
new_line: .asciiz "\n"
.text # text section
// Require nodes http module
var http = require('http');
// Require a third party mysql module (use "npm install mysql" to install it)
var mysql = require('mysql');
// Create a connection pool
var pool = mysql.createPool({
host: 'localhost',
user: 'username',
@willpatera
willpatera / Google-Sheet-Form-Post.md
Last active November 20, 2023 06:53
Post to google spreadsheet from html form

Overview

This collection of files serves as a simple static demonstration of how to post to a google spreadsheet from an external html <form> following the example by Martin Hawksey

Depreciation Warning: This code is not maintained, and should be seen as reference implementation only. If you're looking to add features or update, fork the code and update as needed.

Run example

You should be able to just open index.html in your browser and test locally.

@js1972
js1972 / odata_service.abap
Created July 21, 2014 04:48
Sample OData service for a basic User model. Shows how to provide filtering and sorting and also a Function Import. This uses the ODC (OData Channel) method for implementing an OData service which is the recommended approach by SAP. This sample shows two method redefinition's to get the entity by key value and to get an entity set by searching.
class zcl_zusers_dpc_ext definition
public
inheriting from zcl_zusers_dpc
create public .
public section.
methods /iwbep/if_mgw_appl_srv_runtime~execute_action redefinition.
protected section.
methods userset_get_entity redefinition.