投稿

Alexandria (Book collection manager for GNOME) Dependency

The environment where operation was confirmed as of 2018 is Debian 7 wheezy and Fedora 26, 27, 28. 2018年の時点で動作が確認できた環境はDebian 7 wheezyとFedora 26、27、28です。 Debian 7 wheezy $ dpkg -l alexandria ii  alexandria  0.6.9-2  all  GNOME application for managing book collections $ apt-cache depends alexandria alexandria   依存: gconf2   依存: ruby1.8  |依存: ruby-gtk2   依存: libgtk2-ruby  |依存: ruby-gstreamer   依存: libgst-ruby  |依存: ruby-goocanvas   依存: libgoocanvas-ruby   依存: libgettext-ruby1.8  |依存: libhpricot-ruby   依存: libhpricot-ruby   依存: libhtmlentities-ruby     ruby-htmlentities   推奨: <libimage-size-ruby>     ruby-imagesize   推奨: libzoom-ruby     ruby-zoom   推奨: <libmarc-ruby> $ apt-cache show alexandria Package: alexandria Status: install ok installed Priority: extra Section: gnome Installed-Size: 4624 Maint...

Salesforce Trailheadチャレンジメモ(Apex の基礎とデータベース)

(チャレンジの回答がどうしてもわからないとき) Trailblazer CommunityやStack Overflowで、問題文のタイトルやエラーメッセージで調べてみると回答についての投稿が見つかることがあります。 Salesforce Trailblazer Community https://success.salesforce.com/successHome Stack Overflow - Where Developers Learn, Share, & Build Careers https://stackoverflow.com/ モジュール「Apex の基礎とデータベース」 Apex の使用開始 Create an Apex class that returns an array (or list) of strings. public class StringArrayTest {     public static String[] generateStringArray(Integer numbers) {         List<String> arraylist = new List<String> ();         for(Integer i=0; i<numbers; i++) {             arraylist.add('Test ' + i);             // System.debug(arraylist[i]);         }        return arraylist;     } } あるいは、整数部分を文字列(String)にしてもチャレンジに成功します。             arraylist.add('Test ' ...

Debian9 (stretch) に Node.js をインストールする

Debianのパッケージマネージャー(apt)でインストールする方法 インストールするバージョンは基本的に一つ 1.ドキュメント パッケージマネージャを利用した Node.js のインストール | Node.js https://nodejs.org/ja/download/package-manager/ 2.インストール手順 最新版 $ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - $ sudo apt-get install -y nodejs インストール後のNode.jsとnpmのバージョン(2018年6月2日) $ nodejs -v v10.3.0 $ npm -v 6.1.0 推奨版 $ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - $ sudo apt-get install -y nodejs NVMを使って複数バージョンのNode.jsをインストールする方法 複数のバージョンをインストールして切り替えることができます。 インストール時の推奨版、最新版でないバージョンを使いたい場合に便利です。 1.ドキュメント Installing node js using nvm http://blog.mobnia.com/installing-node-with-nvm-on-a-debian-server/ 2.インストール手順 インストール、インストール後のNVM動作チェック、NVMを使ってNode.jsをインストールする手順です。インストールされるNode.jsは、LTS(推奨版)ではなく最新版になります。 $ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash $ command -v nvm $ nvm install node バージョンを指定してインストール、有効化、アンインストールする手順 $ nvm install v 6.14.2 $ nv...

UbuntuでのSpotify利用手順

イメージ
Spotifyにサインアップ https://www.spotify.com/ にアクセスしサインアップします。 Linux用アプリの「Spotify for Linux」インストール後でも可能です。 ブラウザでの利用(Web Player を使う方法) ブラウザで下記のURLにアクセスしてください。 https://open.spotify.com/ 「お使いのブラウザーでWeb Playerを使うには設定が必要です」と表示される場合、Chromeの場合、保護されたコンテンツから、保護されたコンテンツの再生をサイトに許可するを有効にする、Firefoxの場合、DRMコンテンツから、DRMコンテンツを再生を有効にする。 Firefoxの場合は上記の通りで上手く再生できたが、Chromeの場合はWeb Playerが動作せず、再生ソフトウェアを使用した。 再生ソフトウェアのインストール Ubuntuに「Spotify for Linux」インストール $ snap install spotify spotify 1.0.77.338.g758ebd78-41 from 'spotify' installed インストールまたはダウンロード手順 Spotify for Linux https://www.spotify.com/jp/download/linux/ Spotify for Linuxを使う 1. Spotify for Linux起動し、LOG INをクリック 2. 登録したEmailアドレスととパスワードでログイン 3. ホーム画面が開きます。 アプリでSIGN UPする場合

GRUB起動メニューのタイムアウト時間、起動するOSの変更

Ubuntu、Debian、など 設定の流れ /etc/default/grub ↓ (update-grubコマンドで反映させる) /boot/grub/grub.cfg /etc/default/grub を編集する ※コメントの先頭は # にすること。// の場合、反映(update-grub)がエラーになります。 タイムアウト(待ち時間)を5秒から10秒に変更 $ sudo vi /etc/default/grub    GRUB_TIMEOUT=5 -> GRUB_TIMEOUT=10 起動するOSのデフォルトを一番上のメニューエントから3番目に変更(メニューで選択可能だが何も触らない場合のデフォルト) $ sudo vi /etc/default/grub    GRUB_DEFAULT=0 -> GRUB_DEFAULT=2 1番上が 0 なので、上から3番目は 2 となる。 Grubで前回の選択をデフォルトにする GRUB_DEFAULT="saved" GRUB_SAVEDEFAULT="true" 設定を反映させる 方法1:update-grub $ sudo update-grub Generating grub configuration file ... Found background image: /usr/share/images/desktop-base/desktop-grub.png Linux イメージを見つけました: /boot/vmlinuz-4.19.0-13-amd64 Found initrd image: /boot/initrd.img-4.19.0-13-amd64 Linux イメージを見つけました: /boot/vmlinuz-4.19.0-12-amd64 Found initrd image: /boot/initrd.img-4.19.0-12-amd64 Linux イメージを見つけました: /boot/vmlinuz-4.19.0-10-amd64 Found initrd image: /boot/initrd.img-4.19.0-10-amd64 Found Windows Boot Manager on /dev/s...

The Governor Limit and Savepoint (Salesforce Apex)

Savepoint you set counts against the governor limit for DML statements and rows. Also, rollback is also the same. Rows are the number of records. Savepoints and rollbacks were also counted in records. // // Execute Anonymous 1 // Insert 2 times, SavePoint, Rollback total 4 times. // Result, one record of X company is inserted. // Account a1 = new Account(Name = 'X Company '); insert a1; System.SavePoint sp = Database.setSavePoint(); Account a2 = new Account(Name = 'Y Company'); insert a2; Database.rollback(sp); // Debug log   Number of SOQL queries: 0 out of 100   Number of query rows: 0 out of 50000   Number of SOSL queries: 0 out of 20   Number of DML statements: 4 out of 150    <--- counts   Number of DML rows: 4 out of 10000    <--- same counts because inserted every record   Maximum CPU time: 0 out of 10000   Maximum heap size: 0 out of 6000000   Number of callouts: 0...

Ubuntu 17.10環境への追加パッケージ

パッケージ vim vimと一緒に.viminfo、カラースキーマが設定され、ubuntuのviはもともとvimの簡易版だそうですが、vimインストール後、viコマンドは /etc/alternatives/vi -> /usr/bin/vim.basic にリンクされ、カラフルになります。 Mousepad (Xface test editor) Diodon (GTK+ clipboard manager) vlc (media player) Audacios (audio, media palyer) 音楽ファイルの再生に便利です。 asunder-casept (graphical Audio CD ripper) CDからflacファイルを作成するのに便利です。 VMPK (Virtual MIDI Piano Keyboard) 音を出すための設定 sudo apt install timidity timidity -iA & vmpk & Edit -> Connections MIDI Setup -> Output MIDI Connection -> TiMidity:0 アドオン