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
Copyright (c) 2013 Helium End All rights reserved. | |
Developed by: Robbie Bykowski | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers. | |
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution. |
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
# | |
# | |
# Nim's Runtime Library | |
# (c) Copyright 2016 Dominik Picheta, Andreas Rumpf | |
# | |
# See the file "copying.txt", included in this | |
# distribution, for details about the copyright. | |
# | |
## This module implements a simple HTTP client that can be used to retrieve |
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
import 'dart:math'; | |
void main() { | |
final v = tan(pi * 0.5); | |
final u = tan(-pi * 0.5); | |
print("tan(π/2) = $v"); | |
print("tant(-π/2) = $v"); | |
} |
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
void main() { | |
final sunrise = Duration.fromTime( | |
hours:8, | |
seconds:39, | |
); | |
final dayLength = Duration.fromTime( | |
hours: 7, | |
minutes: 51, | |
seconds: 45 |
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
struct Context { | |
foo: Option<String>, | |
bar: Option<String> | |
} | |
impl Context { | |
fn new() -> Self { | |
Context { | |
foo: None, | |
bar: None |
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
struct Context { | |
foo: String, | |
bar: String | |
} | |
struct ContextBuilder { | |
foo: Option<String>, | |
bar: Option<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
use std::collections::HashSet; | |
#[derive(Debug)] | |
enum Check { | |
Known(String), | |
Duplicate(String), | |
Missing(String), | |
Unknown(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
use std::collections::HashSet; | |
use std::rc::Rc; | |
#[derive(Debug)] | |
enum Check { | |
Known(Rc<String>), | |
Duplicate(Rc<String>), | |
Missing(Rc<String>), | |
Unknown(Rc<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
use std::collections::HashSet; | |
#[derive(Debug)] | |
enum Check<'a> { | |
Known(&'a str), | |
Duplicate(&'a str), | |
Missing(&'a str), | |
Unknown(&'a str) | |
} |
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
use std::collections::HashSet; | |
fn main() { | |
// move strings into HashSet | |
let known_values: HashSet<&str> = ["a", "b", "c"] | |
.iter().cloned().collect(); | |
// provided an Vec<String> | |
let provided_values: Vec<String> = vec![ |
OlderNewer