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
using UnityEngine; | |
using System.Collections; | |
public class Level { | |
public Mesh mesh; | |
private bool drawDebugMesh; | |
private Path path; | |
private Face[] faces; |
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
package com.netflix.experiments.rx; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import rx.Observable; | |
import rx.Observable.OnSubscribe; |
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
# delete the dotnet folder under /usr/local/share/dotnet | |
1. cd /usr/local/share/dotnet && ls | |
2. sudo rm -rf dotnet | |
# delete the dotnet reference file at /etc/paths.d/dotnet | |
1. cd /etc/paths.d && ls | |
2. sudo rm dotnet |
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
public static void Main(string[] args) | |
{ | |
var app = new Microsoft.Extensions.CommandLineUtils.CommandLineApplication(); | |
var catapult = app.Command("catapult", config => { | |
config.OnExecute(()=>{ | |
config.ShowHelp(); //show help for catapult | |
return 1; //return error since we didn't do anything | |
}); | |
config.HelpOption("-? | -h | --help"); //show help on --help | |
}); |
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
using System; | |
namespace Example | |
{ | |
public abstract class ExecutionResult | |
{ | |
protected ExecutionResult(Guid aggregateId, Guid commandId, DateTime executedOn) | |
{ | |
AggregateId = aggregateId; | |
CommandId = commandId; |
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
#[derive(Debug)] | |
struct Person { | |
name: String, | |
never_change_this: i32, | |
} | |
impl Person { | |
fn new(name: String, never_change_this: i32) -> Person { | |
Person { | |
name: name, | |
never_change_this: never_change_this, |
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
pub struct TextEditor { | |
text: String //Private member variable | |
} | |
impl TextEditor { | |
pub fn new() -> TextEditor { | |
TextEditor{text: String::new()} | |
} | |
pub fn add_char(&mut self, ch : char) { |
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
use std::collections::HashMap; | |
fn main() { | |
struct User<'a> { | |
name: &'a str, | |
} | |
impl<'a> User<'a> { | |
fn new(uname: &'a str, pwd: &'a str) -> User<'a> { | |
User { name: uname } |
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
public class Car { | |
public int Id { get; set; } | |
[Required] | |
[StringLength(20)] | |
public string Make { get; set; } | |
[Required] | |
[StringLength(20)] |
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
using UnityEngine; | |
public class Grid : MonoBehaviour | |
{ | |
[SerializeField] | |
private float size = 1f; | |
public Vector3 GetNearestPointOnGrid(Vector3 position) | |
{ | |
position -= transform.position; |
OlderNewer