sudo apt install openjdk-8-jdk-headless
This file contains hidden or 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
package main | |
/** | |
Example hack to encrypt a file using a GPG encryption key. Works with GPG v2.x. | |
The encrypted file e.g. /tmp/data.txt.gpg can then be decrypted using the standard command | |
gpg /tmp/data.txt.gpg | |
Assumes you have **created** an encryption key and exported armored version. | |
You have to read the armored key directly as Go cannot read pubring.kbx (yet). |
This file contains hidden or 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
<?php | |
/** | |
* Comment form hidden fields | |
*/ | |
function comment_form_hidden_fields() | |
{ | |
comment_id_fields(); | |
if ( current_user_can( 'unfiltered_html' ) ) | |
{ |
This file contains hidden or 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
package people | |
import "fmt" | |
type Person struct { | |
FirstName string | |
LastName string | |
Age int | |
} |
This file contains hidden or 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
package main | |
func SumProductDiff(i, j int) (int, int, int) { | |
return i+j, i*j, i-j | |
} |
This file contains hidden or 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
package people | |
// Declares a variable of type 'Person'. The internal fields of the p variable | |
// are set to their zero value i.e. FirstName is an empty string and Age is 0 | |
var p Person | |
// Instantiate a struct by supplying the value of all the struct fields. | |
var p = Person{"Joe", "Sweeny", 36} | |
// Initialize a struct by supplying name: value pairs of all the struct fields. |
This file contains hidden or 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
package people | |
type Person struct { | |
FirstName string | |
FastName string | |
Age int | |
} |
This file contains hidden or 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
<?php | |
class Person | |
{ | |
/** | |
* @var string | |
*/ | |
public $firstName; | |
/** | |
* @var string |
This file contains hidden or 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
package errors | |
import ( | |
"fmt" | |
) | |
func printError(err bool, m string) string { | |
if err { | |
message = "You have encountered an error" | |
// Attempting to set 'message' to anything other than a string will result |
NewerOlder