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
fn main() { | |
let x = 5; | |
//if(x == 5) { //←こうも書けるが、コンパイル時に警告が出る | |
if x == 5 { | |
println!("x is 5"); | |
} else { | |
println!("x isn't 5"); | |
} | |
//ifは式だからこんなこともできる。(三項演算子はない) |
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
from flask import Flask | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
name = "This is the route." | |
return name | |
@app.route('/hello') | |
def hello(): |
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 jp.example; | |
import java.io.File; | |
import org.jodconverter.core.DocumentConverter; | |
import org.jodconverter.core.office.OfficeException; | |
import org.jodconverter.core.office.OfficeManager; | |
import org.jodconverter.local.LocalConverter; | |
import org.jodconverter.local.office.LocalOfficeManager; |
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
//クレートとしてconrodを読み込む | |
#[macro_use] extern crate conrod; | |
fn main() { | |
//featureモジュールのmain関数呼び出し | |
feature::main(); | |
} | |
//モジュール | |
mod feature { | |
//conrodで利用するものを宣言 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>{{ title }}</title> | |
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script> | |
<script src="../static/libs/pdf.js"></script> | |
</head> | |
<body> |
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 fn main() { | |
let mut s = String::new(); | |
std::io::stdin().read_line(&mut s).ok(); | |
println!("{}", public_function(s.trim().parse().ok().unwrap())); | |
} | |
/// これはパブリックな関数 | |
/// 渡された文字列の後ろにビックリマークをつけて返す |
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 fn main() { | |
let mut s = String::new(); | |
std::io::stdin().read_line(&mut s).ok(); | |
println!("{}", public_function(s.trim().parse().ok().unwrap())); | |
} | |
/// これはパブリックな関数 | |
/// 渡された文字列の後ろにビックリマークをつけて返す |
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 fn main() { | |
let mut s = String::new(); | |
std::io::stdin().read_line(&mut s).ok(); | |
println!("{}",public_function(s.trim().parse().ok().unwrap())); | |
} | |
/// これはパブリックな関数 | |
/// 渡された文字列の後ろにビックリマークをつけて返す |
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 fn main() { | |
let mut s = String::new(); | |
std::io::stdin().read_line(&mut s).ok(); | |
println!("{}",public_function(s.trim().parse().ok().unwrap())); | |
} | |
/// これはパブリックな関数 | |
/// 渡された文字列の後ろにビックリマークをつけて返す |
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
//クレートとしてconrodを読み込む | |
#[macro_use] extern crate conrod; | |
fn main() { | |
//featureモジュールのmain関数呼び出し | |
feature::main(); | |
} | |
/// モジュール | |
mod feature { | |
use conrod::backend::glium::glium::{self, Surface}; |
NewerOlder