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
# frozen_string_literal: true | |
# | |
# Uncomment this and change the path if necessary to include your own | |
# components. | |
# See https://github.com/heartcombo/simple_form#custom-components to know | |
# more about custom components. | |
# Dir[Rails.root.join('lib/components/**/*.rb')].each { |f| require f } | |
# | |
# Use this setup block to configure all options available in SimpleForm. | |
SimpleForm.setup do |config| |
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
post されるかな? |
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
<html> | |
<!-- https://jp.vuejs.org/v2/guide/ --> | |
<head> | |
<script src="https://unpkg.com/vue"></script> | |
</head> | |
<body> | |
<h2>普通のバインド</h2> | |
<div id="app"> | |
{{ message }} |
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
<html> | |
<meta charset="UTF-8"> | |
<head> | |
<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script> | |
<script> | |
$(function(){ | |
// Toggle menu | |
var toggleMenu = function(status){ | |
if(status === 1){ | |
$("#sub-menu1").show(); |
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
<?xml version="1.0"?> | |
<root> | |
<list> | |
<item> | |
<name>Sticky Shift</name> | |
<appendix>Use semicolon to Sticky Shift_L</appendix> | |
<identifier>private.semicolon_to_sticky_shift_l</identifier> | |
<inputmode_only>JAPANESE</inputmode_only> | |
<autogen>--KeyToKey-- KeyCode::SEMICOLON, KeyCode::VK_STICKY_SHIFT_L</autogen> | |
</item> |
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
require 'apns' | |
# sandbox | |
APNS.pem = "/your/pem/file" | |
token = "your device token" | |
APNS.send_notification(token,"message") |
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
/* | |
*= require fontawesome | |
*= require_tree . | |
*= require_self | |
*/ |
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
let content = storyboard?.instantiateViewControllerWithIdentifier("Storyboard ID") | |
if let content0 = content! as? HogeViewController{ | |
let v = content0.view // v は使用しない。もっとスマートなやり方がある気がするけど。 | |
content0.descriptionLabel.text = "hello world" // descriptionLabel が IBOutlet のビュー | |
} |
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
view.opaque = false // 不透明を false | |
view.backgroundColor = UIColor.init(colorLiteralRed: 0, green: 0, blue: 0, alpha: 0) // alpha 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
func transientToViewController(newMainVC : UIViewController ){ | |
let currentVC = self.currentVC // この例ではインスタンス変数で保持しています。もしくは引数で渡したりしてください。 | |
currentVC.willMoveToParentViewController(nil) | |
self.addChildViewController(newMainVC) | |
self.view.addSubview(newMainVC.view) | |
// アニメーション開始前の初期位置を設定 ここでは上部からスライドするように設定 | |
let width = currentVC.view.bounds.size.width | |
let height = currentVC.view.bounds.size.height | |
newMainVC.view.frame = CGRectMake(0 , -height ,width,height) |
NewerOlder