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
main(); | |
function main() { | |
var str = layerObjectCount(app.activeDocument); | |
writeFile(str); | |
} | |
function layerObjectCount(docObj) { | |
var mergeStrings = ""; | |
for (var i = 0, iLen = docObj.layers.length; i < iLen ; i++) { |
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
import UIKit | |
@objc protocol AlertControllerDelegate: class { | |
func alertController(_ alert: UIAlertController, tappedIndex: Int) -> Void | |
} | |
private var DelegateKey: UInt8 = 0 | |
private var TagKey: UInt8 = 0 | |
extension UIAlertController { |
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
import WatchKit | |
import Foundation | |
class InterfaceController: WKInterfaceController { | |
@IBOutlet var notEndlessLabel: WKInterfaceLabel! | |
@IBOutlet var endlessLabel: WKInterfaceLabel! | |
override func awake(withContext context: Any?) { | |
super.awake(withContext: context) |
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> | |
<appdef> | |
<appname>TERMINAL</appname> | |
<equal>com.apple.Terminal</equal> | |
</appdef> | |
<appdef> | |
<appname>ITERM2</appname> | |
<equal>com.googlecode.iterm2</equal> | |
</appdef> |
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
var palette = new Window('palette', 'colorChanger'); | |
var lists = [], buttons = []; | |
(function () { | |
var titles = ['塗り:', '線 :']; | |
var selectListItems = ['変更しない', 'シアン←→マゼンタ', 'シアン←→イエロー', 'マゼンタ←→イエロー']; | |
var buttonTitles = ['キャンセル', 'OK']; | |
palette.add('staticText', undefined, 'CMYK版を入れ替えるJavaScript'); | |
var listContainer = palette.add('group', undefined); | |
listContainer.alignChildren = ['fill', 'center']; |
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
// | |
// ViewController.swift | |
// Price | |
// | |
// Created by macneko on 2018/09/07. | |
// Copyright © 2018年 macneko. All rights reserved. | |
// | |
import UIKit |
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
// sample movie: https://user-images.githubusercontent.com/5406126/49324964-f631aa80-f57c-11e8-9199-0ab51231422c.gif | |
main(); | |
function main() { | |
// 関数定義 | |
function applyFontToStory(targetFont) { |
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
// Please, paste the code in playground and execute it. | |
import UIKit | |
extension UILabel{ | |
/// makeOutLine | |
/// | |
/// - Parameters: | |
/// - strokeWidth: 線の太さ。負数 |
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
// 参考:https://stackoverflow.com/questions/29006311/grouped-uitableview-remove-outer-separator-line | |
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) { | |
cell.subviews.forEach { subview in | |
if subview != cell.contentView, subview.frame.width == cell.frame.width, subview.frame.height == 0.5 { | |
// 特定のセクション、かつ特定のクラスだけ処理を変える場合 | |
if indexPath.section == 99, | |
let cell = cell as? SampleTableViewCell { | |
// TODO: なにかする | |
} else { | |
subview.isHidden = true |
OlderNewer