Monday, September 16, 2013

Shiny R with Ubuntu


The first hearing of an application is not shiny like it as a song lyric I have ever heard. Shiny introduced by a professor, he was a friend of mine who is an expert in the field of statistics in particular R.

Shiny makes it super simple for R users like you to turn analyses into interactive web applications that anyone can use. Let your users choose input parameters using friendly controls like sliders, drop-downs, and text fields.

Easily incorporate any number of outputs like plots, tables, and summaries. No HTML or JavaScript knowledge is necessary. If you have some experience with R, you’re just minutes away from combining the statistical power of R with the simplicity of a web page.

Next is complete list of instructions for installing Shiny Server and its prerequisites on Ubuntu
# Install Node.js
sudo apt-get update
sudo apt-get install software-properties-common python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

# Install R
sudo add-apt-repository 'deb http://cran.rstudio.com/bin/linux/ubuntu raring/'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo apt-get update
sudo apt-get install r-base r-base-dev


The same as above, except when installing R this line:
sudo add-apt-repository 'deb http://cran.rstudio.com/bin/linux/ubuntu raring/'
must be replaced with this line for Ubuntu 12.10:
sudo add-apt-repository 'deb http://cran.rstudio.com/bin/linux/ubuntu quantal/'
or with this line for Ubuntu 12.04:
sudo add-apt-repository 'deb http://cran.rstudio.com/bin/linux/ubuntu precise/'
# Install Shiny in system-wide library
sudo su - -c "R -e \"install.packages('shiny', repos='http://cran.rstudio.com/')\""
sudo npm install -g shiny-server
# Install Upstart script
sudo wget\ https://raw.github.com/rstudio/shiny-server/master/config/upstart/shiny-server.conf\ -O /etc/init/shiny-server.conf
# Create a system account to run Shiny apps
sudo useradd -r shiny

# Create a root directory for your website
sudo mkdir -p /var/shiny-server/www

# Create a directory for application logs
sudo mkdir -p /var/shiny-server/log
# Start Shiny
sudo start shiny-server

# Optional: Install examples to test
sudo cp -R /usr/local/lib/R/site-library/shiny/examples /var/shiny-server/www/
Now open a browser to http://localhost:3838/examples/ and see if they work.
Read More

Monday, September 2, 2013

QMMP like WinAmp for Ubuntu 12.04 / 12.10 / 13.04

We all must have been a familiar winamp-based windows, applications mp3 player, mp4 and some videos but most of us use to play mp3. how in linux especially ubuntu, after several times trying different mp3 player application choice fell on QMMP. Similar to winamp and of course we have been accustomed to using.

Display the currently playing music, equalizer and playlist songs are easy and simple are the hallmarks of QMMP.

  
Very easy way to install it: 

sudo add-apt-repository ppa:forkotov02/ppa 

sudo apt-get update sudo apt-get install qmmp 


sudo apt-get install qmmp-plugin-pack 


For skins can be downloaded at this link.
Then place it in the folder : /home/username/.qmmp/skins


  Read More

Wednesday, May 22, 2013

Shift Key Problem


Some time ago I had trouble in my notebook. Some keys do not work properly. Incidentally when I menngunakan windows 7 operating system, I thought this was definitely a virus. That could happen because for this notebook does not have any anti virus installed.

I have some anti virus download, especially free. Then started the experiment, anti virus installed complete with latest updates. After that do a scan with a very saturate. The result is very disappointing, fixed knob is not working as usual.

There's crazy ideas, one of which troubled push button button simultaneously while annotate. And the result: Press right shift key and the left shift key simultaneously for a few seconds, then work
Hopefully this can help you to share your experiences problems.
Read More

Wednesday, January 16, 2013

Asus X201E Ubuntu 12.04 ( Function Keys )

I recently bought asus notebook X201e some time ago. Since I am a fan of Ubuntu, I just installed Ubuntu LTS 12.04, I chose it because the support of the old and very easy to use. Once installed, there are several issues that arise are the function keys are not used. By doing the test a few pointers on google, finally I got the solution and it can work well.
The first step is to upgrade the kernel ubuntu 12.04 by defaul is 3.2 to 3.5 following is how: Add repositories of Ubuntu 12.10 by editing “/etc/apt/sources.list
sudo vim /etc/apt/sources.list
and add following lines:
deb http://security.ubuntu.com/ubuntu quantal-security main universe restricted multiverse deb-src http://security.ubuntu.com/ubuntu quantal-security main universe restricted multiverse deb http://archive.ubuntu.com/ubuntu/ quantal-updates main universe restricted multiverse deb-src http://archive.ubuntu.com/ubuntu/ quantal-updates main universe restricted multiverse deb http://archive.ubuntu.com/ubuntu/ quantal main universe restricted multiverse deb-src http://archive.ubuntu.com/ubuntu/ quantal main universe restricted multiverse
Then update and install the kernel:

sudo apt-get update sudo apt-get install linux
For PAE kernel (for intel i386 with more than 4GB RAM) :
sudo apt-get install linux-generic-pae
After that reboot: sudo reboot. Yessss !!!! ..., successfully. The volume setting can walk normally again, as well as wireless and others. But the Fn key for brightness is still not running. After dabbling again, This could be fixed by editing the /etc/default/grub file and changing the line "GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to "GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=". After running "sudo update-grub" in the terminal and rebooting, the keys were working again Good Luck
Read More

Tuesday, October 16, 2012

FreeTDS MYSQL MSSQL PHP

You certainly know a wide range of database engine in the world. one of which is MYSQL.
My post this time about the experience of using the connector from MYSQL ubuntu server to MSSQL the course of microsoft. The goal is to read data from MSSQL database using PHP commands in a project I was working on. The first one is the installation of freetds package ubuntu package, by typing the command:
sudo apt-get install freetds-common freetds-bin unixodbc php5-sybase 
Once the process is complete, do the changes in the file freetds.conf use the command:
sudo vim /etc/freetds/freetds.conf then add some few lines at the bottom of the file: 
[yourserver] host = your.server.name 
port = 1433 
tds version = 8.0 
Furthermore restart the apache server on the machine by typing the command:
sudo /etc/init.d/apache2 restart 
The final step, create additional php file that is created as follows:
<? php
$ link = mssql_connect ('yourserver', 'yourusername', 'yourpassword');
if (!$link) { die ('Unable to connect!'); }  
if (!mssql_select_db ('yourdatabasename', $ link))
{ die ('Unable to select database'); }
$result = mssql_query ('SELECT * FROM yourtable');  
while ($row=mssql_fetch_array ($ result)) { var_dump ($ row); }  
mssql_free_result ($ result);
?>
Mysql database result has been able to read the data on MSSQL database. Furthermore, good luck, good luck
Read More