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
| using UnityEngine; | |
| [ExecuteAlways] | |
| [RequireComponent(typeof(Camera))] | |
| public class CameraRectScaler : MonoBehaviour | |
| { | |
| [SerializeField] private float targetAspect = 16f / 9f; | |
| private int lastWidth = 0; | |
| private int lastHeight = 0; |
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
| #!/bin/bash | |
| # 引数チェック | |
| if [ $# -lt 2 ]; then | |
| echo "使用方法: $0 <対象ディレクトリ> <拡張子>" | |
| exit 1 | |
| fi | |
| # 圧縮対象のディレクトリ(引数で指定) | |
| TARGET_DIR="$1" |
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
| class MainActivity : AppCompatActivity() { | |
| private val binding: ActivityMainBinding by SetContentView(this, R.layout.activity_main) | |
| } |
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 android.content.Context | |
| import android.databinding.DataBindingUtil | |
| import android.databinding.ViewDataBinding | |
| import android.support.annotation.LayoutRes | |
| import android.support.v7.widget.RecyclerView | |
| import android.view.LayoutInflater | |
| import android.view.View | |
| import android.view.ViewGroup | |
| abstract class DataBindingAdapter<E, T : ViewDataBinding>(val context: Context, @LayoutRes private val layoutId: Int) : RecyclerView.Adapter<DataBindingAdapter.DataBindingViewHolder<T>>() { |
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
| data class ResponseBody<T>( | |
| var body: T?, | |
| var error: ResponseError? | |
| ) | |
| data class ResponseError( | |
| var statusCode: Int, | |
| var message: 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 strict'; | |
| var req = require("request"); | |
| var crypto = require("crypto"); | |
| exports.push = function(niftyAppKey, niftyClientKey, title, message) { | |
| const uri = "https://mb.api.cloud.nifty.com/2013-09-01/push"; | |
| const timestamp = new Date().toISOString(); | |
| const headers = { | |
| "X-NCMB-Application-Key": niftyAppKey, |