onsen code monkey

個人的な日記とプログラミング備忘録です

FlickSamuai Privacy Policy

Privacy Policy

This privacy policy applies to the FlickSamurai app (hereby referred to as "Application") for mobile devices that was created by Hitoshi Kakisako (hereby referred to as "Service Provider") as an Ad Supported service. This service is intended for use "AS IS".

Information Collection and Use

The Application collects information when you download and use it. This information may include information such as

  • Your device's Internet Protocol address (e.g. IP address)
  • The pages of the Application that you visit, the time and date of your visit, the time spent on those pages
  • The time spent on the Application
  • The operating system you use on your mobile device

The Application does not gather precise information about the location of your mobile device.

The Application collects your device's location, which helps the Service Provider determine your approximate geographical location and make use of in below ways:

  • Geolocation Services: The Service Provider utilizes location data to provide features such as personalized content, relevant recommendations, and location-based services.
  • Analytics and Improvements: Aggregated and anonymized location data helps the Service Provider to analyze user behavior, identify trends, and improve the overall performance and functionality of the Application.
  • Third-Party Services: Periodically, the Service Provider may transmit anonymized location data to external services. These services assist them in enhancing the Application and optimizing their offerings.

The Service Provider may use the information you provided to contact you from time to time to provide you with important information, required notices and marketing promotions.

For a better experience, while using the Application, the Service Provider may require you to provide us with certain personally identifiable information. The information that the Service Provider request will be retained by them and used as described in this privacy policy.

Third Party Access

Only aggregated, anonymized data is periodically transmitted to external services to aid the Service Provider in improving the Application and their service. The Service Provider may share your information with third parties in the ways that are described in this privacy statement.

Please note that the Application utilizes third-party services that have their own Privacy Policy about handling data. Below are the links to the Privacy Policy of the third-party service providers used by the Application:

The Service Provider may disclose User Provided and Automatically Collected Information:

  • as required by law, such as to comply with a subpoena, or similar legal process;
  • when they believe in good faith that disclosure is necessary to protect their rights, protect your safety or the safety of others, investigate fraud, or respond to a government request;
  • with their trusted services providers who work on their behalf, do not have an independent use of the information we disclose to them, and have agreed to adhere to the rules set forth in this privacy statement.

Opt-Out Rights

You can stop all collection of information by the Application easily by uninstalling it. You may use the standard uninstall processes as may be available as part of your mobile device or via the mobile application marketplace or network.

Data Retention Policy

The Service Provider will retain User Provided data for as long as you use the Application and for a reasonable time thereafter. If you'd like them to delete User Provided Data that you have provided via the Application, please contact them at nogami_athena@yahoo.co.jp and they will respond in a reasonable time.

Children

The Service Provider does not use the Application to knowingly solicit data from or market to children under the age of 13.

The Application does not address anyone under the age of 13. The Service Provider does not knowingly collect personally identifiable information from children under 13 years of age. In the case the Service Provider discover that a child under 13 has provided personal information, the Service Provider will immediately delete this from their servers. If you are a parent or guardian and you are aware that your child has provided us with personal information, please contact the Service Provider (nogami_athena@yahoo.co.jp) so that they will be able to take the necessary actions.

Security

The Service Provider is concerned about safeguarding the confidentiality of your information. The Service Provider provides physical, electronic, and procedural safeguards to protect information the Service Provider processes and maintains.

Changes

This Privacy Policy may be updated from time to time for any reason. The Service Provider will notify you of any changes to the Privacy Policy by updating this page with the new Privacy Policy. You are advised to consult this Privacy Policy regularly for any changes, as continued use is deemed approval of all changes.

This privacy policy is effective as of 2025-03-21

Your Consent

By using the Application, you are consenting to the processing of your information as set forth in this Privacy Policy now and as amended by us.

Contact Us

If you have any questions regarding privacy while using the Application, or have questions about the practices, please contact the Service Provider via email at nogami_athena@yahoo.co.jp.


This privacy policy page was generated by App Privacy Policy Generator

【Unity】UnityAds.h' file not found の解消方法【Xcode】

事象

UnityAdsを実装後、XcodeでビルドするとUnityAds.h' file not foundエラーが発生

解消方法

1. UnityEditorのAssets内にPluginsフォルダを作成し
2. Pluginsフォルダ内にiOSフォルダを作成
3. 下記サイトからUnityAds.zipをダウンロードして解凍
github.com
4. UnityAds.FrameworkをiOSフォルダに入れてリビルド

↓参考サイト様
edunity.hatenablog.com

Block breaking rabbit Privacy Policy

Privacy Policy**

This privacy policy applies to the Block breaking rabbit app (ブロック崩しウサギ) for mobile devices that was created by Hitohi Kakisako (hereby referred to as "Service Provider") as a Free service. This service is intended for use "AS IS".

Information Collection and Use**

The Application collects information when you download and use it. This information may include information such as

Your device's Internet Protocol address (e.g. IP address)

The pages of the Application that you visit, the time and date of your visit, the time spent on those pages

The time spent on the Application

The operating system you use on your mobile device

The Application does not gather precise information about the location of your mobile device.

The Application collects your device's location, which helps the Service Provider determine your approximate geographical location and make use of in below ways:

Geolocation Services: The Service Provider utilizes location data to provide features such as personalized content, relevant recommendations, and location-based services.

Third-Party Services: Periodically, the Service Provider may transmit anonymized location data to external services. These services assist them in enhancing the Application and optimizing their offerings.

The Service Provider may use the information you provided to contact you from time to time to provide you with important information, required notices and marketing promotions.

For a better experience, while using the Application, the Service Provider may require you to provide us with certain personally identifiable information, including but not limited to X account : @hitoto_28\. The information that the Service Provider request will be retained by them and used as described in this privacy policy.

Third Party Access**

Only aggregated, anonymized data is periodically transmitted to external services to aid the Service Provider in improving the Application and their service. The Service Provider may share your information with third parties in the ways that are described in this privacy statement.

Please note that the Application utilizes third-party services that have their own Privacy Policy about handling data. Below are the links to the Privacy Policy of the third-party service providers used by the Application:

[Unity](https://unity3d.com/legal/privacy-policy)

The Service Provider may disclose User Provided and Automatically Collected Information:

when they believe in good faith that disclosure is necessary to protect their rights, protect your safety or the safety of others, investigate fraud, or respond to a government request;

with their trusted services providers who work on their behalf, do not have an independent use of the information we disclose to them, and have agreed to adhere to the rules set forth in this privacy statement.

Opt-Out Rights**

You can stop all collection of information by the Application easily by uninstalling it. You may use the standard uninstall processes as may be available as part of your mobile device or via the mobile application marketplace or network.

Data Retention Policy**

The Service Provider will retain User Provided data for as long as you use the Application and for a reasonable time thereafter. If you'd like them to delete User Provided Data that you have provided via the Application, please contact them at nogami_athena@yahoo.co.jp and they will respond in a reasonable time.

Children**

The Service Provider does not use the Application to knowingly solicit data from or market to children under the age of 13.

The Application does not address anyone under the age of 13. The Service Provider does not knowingly collect personally identifiable information from children under 13 years of age. In the case the Service Provider discover that a child under 13 has provided personal information, the Service Provider will immediately delete this from their servers. If you are a parent or guardian and you are aware that your child has provided us with personal information, please contact the Service Provider (nogami_athena@yahoo.co.jp) so that they will be able to take the necessary actions.

Security**

The Service Provider is concerned about safeguarding the confidentiality of your information. The Service Provider provides physical, electronic, and procedural safeguards to protect information the Service Provider processes and maintains.

Changes**

This Privacy Policy may be updated from time to time for any reason. The Service Provider will notify you of any changes to the Privacy Policy by updating this page with the new Privacy Policy. You are advised to consult this Privacy Policy regularly for any changes, as continued use is deemed approval of all changes.

This privacy policy is effective as of 2024-10-02

By using the Application, you are consenting to the processing of your information as set forth in this Privacy Policy now and as amended by us.

Contact Us**

If you have any questions regarding privacy while using the Application, or have questions about the practices, please contact the Service Provider via email at nogami_athena@yahoo.co.jp.

* *

This privacy policy page was generated by [App Privacy Policy Generator](https://app-privacy-policy-generator.nisrulz.com/)

【Unity】iOSアプリからApplication.OpenURLのリンクに飛べない

以前から非推奨ではあったものの一応使えていたOpenURLですが、どうやらiOS18から完全に機能しなくなった模様。

現時点ではUnityを旧バージョンにすることで対応可能とのこと。
下記サイトでは2022.3.47で動作確認できたようですが私は試してません。

参考
https://discussions.unity.com/t/can-t-use-application-openurl-on-ios-18-solved/1524320

【JavaScript】なるべくシンプルに数秒間待機させる処理

他言語で言うところの wait とか sleep とかをJSでやりたい

すごくよく使うので改めてメモ

ES2017以降なら↓

const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));

// 2秒待機
await sleep(2000);


それより古いバージョンなら↓

function sleep(waitMsec) {
  var startMsec = new Date();    
  // 指定ミリ秒間だけループさせる(CPUは常にビジー状態)
  while (new Date() - startMsec < waitMsec);
}

// 2秒待機
sleep(2000);


丸パクリですみません。
以下、参考サイト様

javascriptでsleep的に処理をwaitさせる方法(コピペでOK) | Hirooooo’s Labo

【JavaScript入門】処理を一時停止するsleep機能の実現方法まとめ | 侍エンジニアブログ

gcc: error: unrecognized command line option を解決する

rails で bcrypt をインストールしようとすると以下のようなエラーが出た

Installing bcrypt 3.1.19 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

current directory: /home/vagrant/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bcrypt-3.1.19/ext/mri
/home/vagrant/.rbenv/versions/3.2.2/bin/ruby extconf.rb
creating Makefile

current directory: /home/vagrant/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bcrypt-3.1.19/ext/mri
make DESTDIR\= sitearchdir\=./.gem.20231014-3779-vcohcj sitelibdir\=./.gem.20231014-3779-vcohcj clean

current directory: /home/vagrant/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/bcrypt-3.1.19/ext/mri
make DESTDIR\= sitearchdir\=./.gem.20231014-3779-vcohcj sitelibdir\=./.gem.20231014-3779-vcohcj
compiling bcrypt_ext.c
gcc: error: unrecognized command line option ‘-Wduplicated-cond’
gcc: error: unrecognized command line option ‘-Wmisleading-indentation’
gcc: error: unrecognized command line option ‘-Wimplicit-fallthrough=0’
make: *** [bcrypt_ext.o] Error 1

make failed, exit code 2

~ 中略

An error occurred while installing bcrypt (3.1.19), and Bundler cannot continue.

In Gemfile:
bcrypt

どうやら gcc のバージョンが古いせいでコンパイラコマンドラインオプションを認識できないため bcrypt のインストールに失敗している模様

gcc のバージョンを確認してみる

$ gcc -v

結果

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)

version 4.8.5 とのこと。2015年のバージョンらしいのでたしかにかなり古そう。
以下、アップデート手順(CentOS/Red Hat用のコマンドのため他を使用している場合は読み替えてください)

gcc アップデートコマンド

$ sudo yum update gcc

これでアップデートできればそれで良し。
僕の場合はさらに以下のエラーメッセージが出ました。

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.jaist.ac.jp
* centos-sclo-rh: ftp.jaist.ac.jp
* centos-sclo-sclo: ftp.jaist.ac.jp
* extras: ftp.jaist.ac.jp
* updates: mirrors.163.com
No packages marked for update

よくわからないがとにかくダメそうなので別の方法を調べてみると、どうやら Developer Toolset の新しいバージョンをインストールすれば良いとのことで Developer Toolset 9 をインストールする

$ sudo yum install centos-release-scl
$ sudo yum install devtoolset-9

Developer Toolset 9 を使用するように設定

$ source scl_source enable devtoolset-9

改めて gcc のバージョンを確認

$ gcc -v

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/opt/rh/devtoolset-9/root/usr --mandir=/opt/rh/devtoolset-9/root/usr/share/man --infodir=/opt/rh/devtoolset-9/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --with-default-libstdcxx-abi=gcc4-compatible --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-9.3.1-20200408/obj-x86_64-redhat-linux/isl-install --disable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 9.3.1 20200408 (Red Hat 9.3.1-2) (GCC)

9.3.1 にアップデートできたので、あとは bundle install で bcrypt をインストールすれば無事成功

【Ruby on Rails】ruby-profでコードの処理速度を測定する

■やりたいこと

コードの実行中にどの部分が時間を消費しているかを特定したい

■使用ツール

ruby-prof

※プロファイリングツールは ruby-prof の他に stackprof も有力らしい

■手順

1. gemfile に ruby-prof を追加

gem 'ruby-prof'

2. インストール実行

bundle install

3. controller を編集

# ruby-prof をロード
require 'ruby-prof'

class TestController
  def test
    result = RubyProf.profile do
      # 測定したい処理をここに記述する
    end

    # 測定結果を出力する
    output_path = './rubyprof.out'
    File.open(output_path , 'w') { | f |
      RubyProf::FlatPrinter.new(result).print(f)
    }
  end
end

4. 測定したい処理を実行後、出力結果を確認する
上記の例では rubyprof.out というファイルが出力されているはずなので確認する。
結果を見やすくしてくれるツール等もあるが面倒くさい場合はテキストエディタでそのまま開いて良し。

出力結果サンプル

Measure Mode: wall_time
Thread ID: 70325959779980
Fiber ID: 93369140
Total: 0.198714
Sort by: self_time

%self total self wait child calls name location
13.07 0.042 0.026 0.016 0.000 53 Mysql2::Client#_query
4.54 0.009 0.009 0.000 0.000 122 IO#write
4.29 0.009 0.009 0.000 0.000 61 Kernel#caller
3.65 0.007 0.007 0.000 0.000 8336 String#sub
3.61 0.117 0.007 0.002 0.108 932 *Array#each
1.40 0.136 0.003 0.000 0.133 743 *#handle_interrupt
1.18 0.009 0.002 0.003 0.003 2169 *Class#new
0.96 0.002 0.002 0.000 0.000 254 Regexp#===
0.69 0.003 0.001 0.000 0.002 284 Array#map
0.65 0.001 0.001 0.000 0.000 2417 Regexp#match?

%self - The percentage of time spent in this method, derived from self_time/total_time.
total - The time spent in this method and its children.
self - The time spent in this method.
wait - The amount of time this method waited for other threads.
child - The time spent in this method's children.
calls - The number of times this method was called.
name - The name of the method.
location - The location of the method.

総処理時間0.198714秒のうちクエリの実行で0.042秒(13.07%)使ってるなとか、53回呼び出されてるな等読み取れる