Posts

Showing posts from March, 2018

PHP Type Hinting using Netbeans

Approach 1: Return type declaration: <?php function getUser () : User { //... } $a = getUser(); $a -> // PRESS CTRL-SPACE TO AUTO COMPLETE Approach 2: Using annotation @var <?php function getUser () { //... } /* @var $a User */ $a = getUser(); $a -> // PRESS CTRL-SPACE TO AUTO COMPLETE Approach 3: Using annotation @return <?php /** * @return User */ function getUser () { //... } $a = getUser(); $a -> // PRESS CTRL-SPACE TO AUTO COMPLETE I preferred approach 2 and 3 For PHP 7.1 support, use nightly build of netbeans from here: http://bits.netbeans.org/download/trunk/nightly/latest/

High quality audio on linux

Reference: https://medium.com/@gamunu/enable-high-quality-audio-on-linux-6f16f3fe7e1f # vim ~/.config/pulse/daemon.conf default-sample-format = float32le default-sample-rate = 48000 alternate-sample-rate = 44100 default-sample-channels = 2 default-channel-map = front-left,front-right default-fragments = 2 default-fragment-size-msec = 125 resample-method = soxr-vhq enable-lfe-remixing = no high-priority = yes nice-level = -11 realtime-scheduling = yes realtime-priority = 9 rlimit-rtprio = 9 daemonize = no # pulseaudio -k # pulseaudio -D