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::marker::PhantomData; | |
trait ConnT<T> { | |
type Res; | |
fn proc(T) -> Self::Res; | |
} | |
struct Conn1; | |
impl<T> ConnT<T> for Conn1 { | |
type Res = Result<T, ()>; |
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
Re: Need Help With Jekyll GitHub Project Page and Team Git Workflow | |
> The simplest solution to this trouble is to remove the leading slash | |
Hmm....no, that is not simple at all because pages in subdirectories would | |
require different treatment. | |
The actual simplest solution would be for GitHub to put the project name in | |
the domain name instead of the request target. For example, instead of: |
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
diff --git a/src/main.rs b/src/main.rs | |
index ac542de..e40605d 100644 | |
--- a/src/main.rs | |
+++ b/src/main.rs | |
@@ -16,12 +16,10 @@ use futures_timer::*; | |
use gio::prelude::*; | |
use gtk::prelude::*; | |
use librgs::ServerEntry; | |
-use static_resources::Resources; | |
use std::sync::{ |
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(PartialEq, PartialOrd, Debug, Clone, Copy)] | |
pub struct UniqueId(pub u64); | |
macro_rules! unique { | |
() => {{ | |
#[allow(missing_copy_implementations)] | |
#[allow(non_camel_case_types)] | |
#[allow(dead_code)] | |
struct __unique_id_tag {}; | |
use core::any::TypeId; |
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.? | |
import android.os.Build | |
import android.util.Log | |
import com.varvet.shipgaz.BuildConfig | |
import java.util.regex.Pattern | |
/** | |
* A logger to avoid logging in production. It will check if [BuildConfig.DEBUG] is true or not. | |
* If true then allow logging, otherwise don't. |
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
// | |
// Created by int3 on 14.02.18. | |
// | |
/* | |
Usage: | |
enum class Foo : int8_t { | |
a, b, c |
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
#!/bin/bash | |
set -e | |
CONTENTS=$(tesseract -c language_model_penalty_non_dict_word=0.8 --tessdata-dir /usr/local/share/tessdata/ "$1" stdout -l eng | xml esc) | |
hex=$((cat <<EOF | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> |
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
/* | |
* # C++17 Coding challenge in Rust | |
* How to deal with edge cases: | |
* * if the input file is empty, the program should write “input file missing” to the console. | |
* * if the input file does not contain the specified column, the program should write “column name doesn’t exists in the input file” to the console. | |
* | |
* The rest was not considered and mercilessly unwrapped. | |
*/ | |
use std::env; |
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::env; | |
use std::io; | |
use std::io::prelude::*; | |
use std::fs::File; | |
#[derive(Debug)] | |
enum Error { | |
Io(io::Error), | |
Program(&'static str), | |
} |
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
//[dependencies] | |
//time = "0.1" | |
//futures = "0.1.14" | |
//tokio-core = "0.1" | |
//tokio-periodic = "0.1" | |
#[macro_use] | |
extern crate tokio_core; | |
extern crate time; |