Twitter card には、いくつかの種類があるが、dev.twitter.complayer というのが実はかなり高機能で、 自分の好きな html を iframe で twitter に埋め込むことが出来る仕組みになっています。だが、使用するには card validater を使い、審査をしてもらう必…
無視され、描画される順番が狂います。Inspector を Debug に変更し、Custom Render Quere を -1 に指定すると正しく動きます。
mod-wsgi は、python と1:1で紐付いているため、apacheに1つまでしか追加できない。 pyenv を入れる 公式に書いてあるとおり。 yyuu/pyenv · GitHub $ git clone https://github.com/yyuu/pyenv.git ~/.pyenv ・・・ python3 を入れる このときに、オプショ…
C++で new し、C#側で一旦コピー、さらにC++で削除 hoge.h #pragma once #define DLL_UNITY extern "C" __declspec(dllexport) typedef unsigned char byte ; DLL_UNITY void loadData (byte** data, int* dataSize); DLL_UNITY void freeData (byte** data)…
FragmentPagerAdapter で 返すデータ数が、実際に3つあっても、 タブで1番目に切り替えを行うまで、FragmentManager の中には、2つしかFragmentが入っていないような動きになっていた。 List<Fragment> datas = getSupportFragmentManager().getFragments(); // 2つだ</fragment>…
ubuntu でknife-solo を実行した時に以下のエラーが出た。 ERROR: undefined method `cheffish' for nil:NilClass chef のバージョンが関係しているようだったので、 $ knife solo prepare sample-host -v $ 12.4.1新しいものをインストールした。ところ、問…
ケースの作成 左メニューの制限ボタンを押し、 制限緩和のリクエスト を更に押します。CCには、自分のメールアドレスを忘れない。 制限タイプは、スポットインスタンスの項目が無いですが、「EC2インスタンス」を選び、 新しい制限値「200」申請理由の説明に…
Too many open files nginx (/etc/nginx/nginx.conf) # CPU と同じ数 worker_processes 8; # worker_connections の 4倍程度 # failed (24: Too many open files) に対処できる。 worker_rlimit_nofile 40960; events { # とりあえずこの値 worker_connectio…
消すことは出来ません。 RSS自体のURLを変更し、サイト内のlinkタグを修正すれば、新しいRSSがキャッシュし直されます。
ActiveAdmin のバグです。 ActiveAdmin.register Hoge do controller do before_filter :disable_xss_protection def disable_xss_protection response.headers['X-XSS-Protection'] = "0" end end end こうします。
$ bundle exec whenever --update-crontab appname --set environment=productionこのように処理を実行した時、schedule.rb の中では、ENV['RAILS_ENV'] で取得できない。$ config/schedule.rb require File.expand_path(File.dirname(__FILE__) + "/environ…
class Status VALUES = { publish: PUBLISH = 0, pending: PENDING = 1, draft: DRAFT = 2, trash: TRASH = 3, } end このようにアクセスできる Status::PUBLISH Status::VALUES
$ config/deploy.rb # config valid only for current version of Capistrano lock '3.4.0' set :application, 'hoge' set :repo_url, 'git@bitbucket.org:hoge/hoge.git' # Default value for :scm is :git set :scm, :git # set :rbenv_ruby, '2.2.1' # De…
アップロード先 mysqlのサーバー起動 $ gem install taps $ gem install mysql $ taps server mysql://root@localhost/releasenote_stg?encoding=utf8 <basic認証名前> <basic認証パスワード> 5000 番ポートでサーバーが立ち上がります。 サーバーIP アドレスを確認しておく。 コピー元のheroku </basic認証パスワード></basic認証名前>…
自分では使っていないが、やりたい人もいるのでメモ。 VirtualBox 起動、接続まで mac$ brew install caskroom/cask/brew-cask mac$ brew cask install virtualbox mac$ brew cask install vagrant mac$ vagrant box add centos7 https://f0fff3908f081cb646…
例えば、wav ファイルを 保存したときに、別バージョンとして mp3 も保存するような場合。 version :mp3 do process :convert_mp3 # この名前が、最終的なファイル名になる。 # デフォルトで、 mp3_****.wav になっているので、リネーム def full_filename f…
module.exports.models.migrate に、safe, alter, drop いずれかを指定しないと、処理がバックグラウンドで止まり、起動できない。
把握するのに時間がかかったのでメモ。 ./config/* の中身が設定としてロードされる。記載されているルールとしては、例えば log.coffee (log.js) の場合は、 module.exports.log = { hoge: "aaaaa" } module.exports.log までをドットでアクセスして、ファ…
GridView は、横幅が自動計算されるため、比率を合わせるには、設定時に計算する必要がある。FrameLayout を入れていた場合は、以下のように onMeasure を オーバーライドし、height を再計算する。 xml の 属性に、layout_height_ratio="0.8" のように指定…
void checkSize (View view) { final Point size = getWindowSize(); // window のサイズを 通知する view.measure (size.x, size.y); // サイズ取得! final int w = view.getMeasuredWidth(); final int h = view.getMeasuredHeight(); } Point getWindowS…
class Api::FilesController < Api::ApplicationController def create # file = params[:data] data_str = params[:data_str] file = File.new # file.data = data file.data_str = data_str end end class File < ActiveRecord::Base mount_uploader :data…
composer で S3 の ライブラリを取得する $ curl -sS https://getcomposer.org/installer | php $ vi composer.json { "require": { "aws/aws-sdk-php": "*" } }$ php composer.phar install 利用する $ vi hoge.php
Storyboard や、 xib ファイルから viewController を取得し、view を取り出したものを指定すると、表示が崩れる。コード上でUIView や UIButton を生成し、inputAccessoryView に渡す必要がある。
Failed to mount folders in Linux guest. This is usually because the "vboxsf" file system is not available. Please verify that the guest additions are properly installed in the guest and can work properly. The command attempted was: mount -…
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'An instance 0x17001f8c0 of class AVPlayerItem was deallocated while key value observers were still registered with it. Current observation info: ( Conte…
scaffold と言っても、rails の scaffold とは何も関係がありません。 Google社製の、簡易フレームワーク(設定ガイドライン)です。google/gae-secure-scaffold-pythonセキュリティの設定や、URLのディスパッチ、フォルダの構成、デプロイスクリプトなどが…
Xamarin Studio 5.3 の不具合で、以下のコードが必ずエラーになる。 UIRemoteNotificationType notificationTypes = UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge | UIRemoteNotificationType.Sound; UIApplication.SharedApplication.…
WebUtility.UrlEncode ("あい うえお"); こちらを使う System.Uri.EscapeUriString ("あい うえお");
void Sample () { Hoge hoge = new Hoge (); hoge.OnSuccess += (sender, e) => { Console.WriteLine ("end"); }; } async Task Sample () { var taskCompletionSource = new TaskCompletionSource<string>(); Hoge hoge = new Hoge (); hoge.OnSuccess += (sender, </string>…
審査期間は、今は1週間かからない程度です。 アプリが動く状態になっていなければなりません。 シェア文言にデフォルト文言を入れるのが目的の場合 iOS OS の機能を使ってシェアしてください。 規約違反ですが、問題なくデフォルト文言と画像が設定できます…