Getting started with play framework with IntelliJ IDEA on centos

If you dont have activator installed please see : http://mohiplanet.blogspot.com/2014/10/getting-started-with-playframework-with.html

After you have activator installed.Run:

  1. activator idea install

Run the following for installing intellij:
  1. cd /usr/local/
  2. #download intellij eap 14 ultimate
  3. wget http://download.jetbrains.com/idea/ideaIU-139.144.2.tar.gz
  4. tar xf ideaIU-139.144.2.tar.gz
  5. rm ideaIU-139.144.2.tar.gz
  6. #Make sure that root has permissions all the way through the unzipped directory
  7. chown -R root:root idea-IU-139.144.2/
  8. cd idea-IU-139.144.2/bin/
  9. #script to run start IDE conveniently
  10. echo "sh /usr/local/idea-IU-139.144.2/bin/idea.sh&" > /intellij.sh
  11. #lets run
  12. sh /intellij.sh


You will need IntelliJ Scala Plugin for using play framework.
See : https://confluence.jetbrains.com/display/SCA/Getting+Started+with+IntelliJ+IDEA+Scala+Plugin for installing sclala plugin on intellij.



References:
https://www.playframework.com/documentation/2.2.3/IDE

postgresql : sql to select all distinct characters from column data

select * from company:

 id | market | symbol | crawl_date
----+--------+---------+------------
  1 | ss         | dd       | 2014-10-21
  2 | ss         | ss        | 2014-10-21
  3 | ss1       | ds        | 2014-10-21
  4 | ss1       | sd1      | 2014-10-21
  5 | ss1       | dd1     | 2014-10-21
  6 | ss1       | ss1      | 2014-10-22
  7 | ss1       | d11     | 2014-10-22

Get all distinct characters in column company.symbol:



  1. select string_agg(c,'')
  2. from (
  3. select distinct regexp_split_to_table(symbol,'') as c
  4. from company
  5. ) t;

Output:

 string_agg 
------------
 1ds
(1 row)