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
fn main() { | |
let mut s1 = String::from("Hello"); | |
let len = calculate_length(&s1); | |
println!("The length of '{}' is {}.", s1, len); | |
change(&mut s1); | |
println!("The length of '{}' is {}.", s1, len); | |
references_example_1(); |
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
fn main() { | |
let mut s1 = String::from("Hello"); | |
let len = calculate_length(&s1); | |
println!("The length of '{}' is {}.", s1, len); | |
change(&mut s1); | |
println!("The length of '{}' is {}.", s1, len); | |
references_example_1(); |
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
fn main() { | |
vector_1(); | |
vector_2(); | |
vector_3(); | |
vector_4(); | |
vector_5(); | |
vector_6(); | |
} | |
fn vector_1() { |
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
all_hosts = [ | |
{ | |
vagrant_hostname: "master", | |
full_hostname: "amachine.virtual.machine", | |
vmbox: "fedora/31-cloud-base", | |
vmbox_version: "31.20191023.0", | |
ip: "10.0.0.10", | |
memory: 2048, | |
cpus: 1 | |
}, |
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
#! /bin/bash | |
CERTS_DIR=/tmp/myCerts | |
rm -rf $CERTS_DIR | |
mkdir -p $CERTS_DIR | |
CN_NAME="192.168.0.20" | |
CA_DOMAIN="${CN_NAME}" | |
ALT_IP="${CN_NAME}" |
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
#! /usr/bin/env python | |
# This programm will create paths from root nodes to leafnodes along with values from any json file or structure. | |
import json | |
import pprint | |
json_data = open('sample_json_file.json', 'r').read() | |
json_dict = json.loads(json_data) |
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
class A | |
def methoda_public | |
puts "Hello from methoda_public self=#{self}" | |
end | |
def methoda_private | |
puts "Hello from methoda_private self=#{self}" | |
end | |
def methoda_protected |
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
class OuterClass { | |
private String outerClassPrivateInstanceVar = "outerClassPrivateInstanceVar"; | |
public static String outerClassPublicStaticVar = "outerClassPublicStaticVar"; | |
public String outerClassPublicInstanceVar = "outerClassPublicInstanceVar"; | |
void outerClassInstanceMethod() { | |
System.out.println("Inside outerClassInstanceMethod."); | |
} | |
static void outerClassStaticMethod() { |
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
heat_template_version: 2015-10-15 | |
description: Apache Web server installation template. | |
parameters: | |
flavor_name: | |
type: string | |
description: Instance type for server | |
default: m1.small |
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 | |
import ( | |
"crypto/rand" | |
"flag" | |
"fmt" | |
"github.com/rackspace/gophercloud" | |
"github.com/rackspace/gophercloud/openstack" | |
"github.com/rackspace/gophercloud/openstack/compute/v2/flavors" | |
"github.com/rackspace/gophercloud/openstack/compute/v2/images" |
NewerOlder