!SLIDE
!SLIDE
- ActionDispatch が dispatch する先
- MVC の まさに C(まさに)
#include <iostream> | |
using std::cout; | |
using std::endl; | |
class Solution { | |
public: | |
int islandPerimeter(vector<vector<int>>& grid) { | |
int ans=0; | |
for (int i=0;i<grid.size();i++) { | |
for (int j=0;j<grid[i].size();j++) { |
struct Nanika { | |
v: V, | |
} | |
struct V(u8); | |
impl V { | |
fn incr(&mut self) { | |
self.0 += 1 | |
} |
#![allow(unused)] | |
use std::fs::File; | |
use std::io::{self, Read, Write}; | |
const SIZE: usize = 8000; | |
fn main() { | |
let stack = std::env::var("RUST_MIN_STACK").unwrap_or("nothing".to_string()); | |
println!("RUST_MIN_STACK: {}", stack); | |
println!("allocate size: {}MB", SIZE * 1024 / 1024 / 1024); |
#![allow(unused)] | |
use std::fs::File; | |
use std::io::{self, Read, Write}; | |
const SIZE: usize = 8000; | |
fn main() { | |
let stack = std::env::var("RUST_MIN_STACK").unwrap_or("nothing".to_string()); | |
println!("RUST_MIN_STACK: {}", stack); | |
println!("allocate size: {}MB", SIZE * 1024 / 1024 / 1024); |
extern crate libc; | |
use std::env; | |
use std::fs::{self, File}; | |
use std::io::Read; | |
use std::mem; | |
use std::ops::{Index, IndexMut}; | |
#[derive(Debug)] | |
pub struct Inst { |
fn is_foo(s: &str) -> bool { | |
s == "foo" | |
} | |
fn is_bar<S: PartialEq<str> + AsRef<str>>(s: &&S) -> bool { | |
s.as_ref() == "bar" | |
} | |
fn main() { | |
let v: Vec<String> = vec!["foo".to_owned()]; |
#include <stdio.h> | |
#include <stdint.h> | |
#include <sys/mman.h> | |
#include <sys/stat.h> | |
#include "osfmk/mach/machine.h" | |
#include "EXTERNAL_HEADERS/mach-o/loader.h" | |
#include <string.h> | |
#include <assert.h> | |
int main() |
/rdsdbbin/mysql/bin/mysqld, Version: 5.6.27-log (MySQL Community Server (GPL)). started with: | |
Tcp port: 3306 Unix socket: /tmp/mysql.sock | |
Time Id Command Argument | |
# Time: 171108 20:00:00 | |
# User@Host: root[root] @ [10.105.162.162] Id: 75015897 | |
# Query_time: 0.138043 Lock_time: 0.000284 Rows_sent: 20 Rows_examined: 17457 | |
use luccy_production; | |
SET timestamp=1510171200; | |
SELECT `articles`.`id` AS t0_r0, `articles`.`article_type` AS t0_r1, `articles`.`status` AS t0_r2, `articles`.`author_id` AS t0_r3, `articles`.`category_id` AS t0_r4, `articles`.`title` AS t0_r5, `articles`.`main_image_element_id` AS t0_r6, `articles`.`description` AS t0_r7, `articles`.`redirect_article_id` AS t0_r8, `articles`.`main_photo_position` AS t0_r9, `articles`.`advertiser` AS t0_r10, `articles`.`original_url` AS t0_r11, `articles`.`published_at` AS t0_r12, `articles`.`deleted_at` AS t0_r13, `articles`.`created_at` AS t0_r14, `articles`.`updated_at` AS t0_r15, `users`.`id` AS t1_r0, `users`.`uuid` AS t1_r1, `users |
require "warden" | |
class App | |
def call(env) | |
env['warden'].authenticate! | |
[200, {'Content-Type' => 'text/plain'}, ['OK']] | |
end | |
end | |
Warden::Strategies.add(:password) do |