Skip to content

Instantly share code, notes, and snippets.

@KentarouKanno
KentarouKanno / UITextField.md
Last active April 19, 2021 02:48
UITextField

UITextField

★ UITextFieldの生成

var textField = UITextField()

var textField: UITextField = UITextField()

// 位置、サイズを指定して生成
@nownabe
nownabe / .commit_template
Created July 5, 2016 06:54
Emojiで楽しく綺麗なコミットを手に入れる
# ==== Emojis ====
# 🐛 :bug: バグ修正
# 👍 :+1: 機能改善
# ✨ :sparkles: 部分的な機能追加
# 🎉 :tada: 盛大に祝うべき大きな機能追加
# ♻️ :recycle: リファクタリング
# 🚿 :shower: 不要な機能・使われなくなった機能の削除
# 💚 :green_heart: テストやCIの修正・改善
@hotwatermorning
hotwatermorning / level_meter_impl.md
Last active July 16, 2025 20:42
DAWごとのレベルメーターの実装比較

Bitwig Studio

レベルメーターの特徴

  • ピーク値とRMS値が表示できる。
  • ピークホールド時間の設定や、RMS値を集計する区間の長さの設定、メーター値の減少速度を設定する仕組みはない。
  • 2種類の表示モードがあるが、どちらも信号のピーク値とRMS値(二乗平均平方根。区間の平均エネルギーを表す。ピーク値と異なり、実際の音量感に近い値になる。)の両方が表示される。
  • トラックのボリュームコントロールのところに表示されている通常のレベルメーターの他に、大きく見やすいBit Meterと呼ばれるレベルメーターが用意されている。  - 表示される内容はどちらも同じ
@averagesecurityguy
averagesecurityguy / pdf_flatedecode.py
Last active August 23, 2025 01:26
Decompress FlateDecode Objects in PDF
#!/usr/bin/env python3
# This script is designed to do one thing and one thing only. It will find each
# of the FlateDecode streams in a PDF document using a regular expression,
# unzip them, and print out the unzipped data. You can do the same in any
# programming language you choose.
#
# This is NOT a generic PDF decoder, if you need a generic PDF decoder, please
# take a look at pdf-parser by Didier Stevens, which is included in Kali linux.
# https://tools.kali.org/forensics/pdf-parser.
#
extension ViewController: UITextDragDelegate {
func textDraggableView(_ textDraggableView: UIView & UITextDraggable, dragPreviewForLiftingItem item: UIDragItem, session: UIDragSession) -> UITargetedDragPreview? {
let dragView = textDraggableView
let selectionRange = textDraggableView.selectedTextRange
let selectionRects = textDraggableView.selectionRects(for: selectionRange!) as! [UITextSelectionRect]
var array: [CGRect] = []