OS: Libreelec 10.02
Enable lirc
in Kodi
// rsa-pkcs [-hash sha1] [-key id_rsa] -sign "foobar" | |
// rsa-pkcs [-hash sha1] [-pub id_rsa.pub] -verify "sign_data" "foobar" | |
package main | |
import ( | |
_ "code.google.com/p/go.crypto/md4" | |
_ "code.google.com/p/go.crypto/ripemd160" | |
"crypto" | |
_ "crypto/md5" |
package main | |
import ( | |
"fmt" | |
"net/http" | |
) | |
type CustomResponseWriter struct { | |
body []byte | |
statusCode int |
// Implement Geometry interface | |
func (r Rectangle) area() float32 { | |
return r.length * r.breadth | |
} | |
// Implement Geometry interface | |
func (r Rectangle) parameter() float32 { | |
return 2 * (r.length + r.breadth) | |
} |
// Rectangle struct implements Geometry and Color interface | |
type Rectangle struct { | |
length float32 | |
breadth float32 | |
color string | |
} |
// Geometry interface | |
type Geometry interface { | |
area() float32 | |
parameter() float32 | |
numOfSides() int | |
} | |
// Color interface | |
type Color interface { | |
getColor() string |
// | |
// Author: github.com/prakashpandey | |
// | |
// How interfaces works in golang using? | |
// | |
// In this sample program, our type 'Rectangle' will implement two interfaces | |
// - Type 'Rectangle' implements two interfaces: | |
// 1. Geometry | |
// 2. Color | |
// - To implement interfaces in golang, we don't have to do anything special, |
/** | |
* Created by : fb.com/realprakashpandey on 24/8/16. | |
* About Program : Java implimentation of merge sort. | |
/ | |
public class MergeSorts | |
{ | |
/* @ int [] array : sample input for sorting, you can provide any list of number here */ | |
static int[] array= {3, 35 ,4 ,85}; |