Saturday, April 25, 2015

Install Tomcat on Ubuntu

sudo apt-get update
sudo apt-get install tomcat7

https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-7-on-ubuntu-14-04-via-apt-get

If Tomcat had been installed correctly you should be able to see the info below by url: http://localhost:8080

It works !

If you're seeing this page via a web browser, it means you've setup Tomcat successfully. Congratulations!
This is the default Tomcat home page. It can be found on the local filesystem at: /var/lib/tomcat7/webapps/ROOT/index.html
Tomcat7 veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat7 and CATALINA_BASE in /var/lib/tomcat7, following the rules from /usr/share/doc/tomcat7-common/RUNNING.txt.gz.
You might consider installing the following packages, if you haven't already done so:
tomcat7-docs: This package installs a web application that allows to browse the Tomcat 7 documentation locally. Once installed, you can access it by clicking here.
tomcat7-examples: This package installs a web application that allows to access the Tomcat 7 Servlet and JSP examples. Once installed, you can access it by clicking here.
tomcat7-admin: This package installs two web applications that can help managing this Tomcat instance. Once installed, you can access the manager webapp and the host-manager webapp.

NOTE: For security reasons, using the manager webapp is restricted to users with role "manager-gui". The host-manager webapp is restricted to users with role "admin-gui". Users are defined in /etc/tomcat7/tomcat-users.xml.

Good source of pictures / images for desktop (link)

Friday, April 24, 2015

How to use TextResource in GWT ClientBundle (link)

interface Resources extends ClientBundle {
  Resources INSTANCE = GWT.create(Resources.class);

  @Source("a.txt")
  TextResource synchronous();

  @Source("b.txt")
  ExternalTextResource asynchronous();
}

// Using a TextResource
myTextArea.setInnerText(Resources.INSTANCE.synchronous().getText());

// Using an ExternalTextResource
Resources.INSTANCE.asynchronous().getText(new ResourceCallback<TextResource>() {
  public void onError(ResourceException e) { ... }
  public void onSuccess(TextResource r) {
    myTextArea.setInnerText(r.getText());
  }
});
 
http://www.gwtproject.org/doc/latest/DevGuideClientBundle.html#TextResource

Wednesday, April 22, 2015

Encoding configs of Maven pom.xml in GWT project

<properties>
        <java.version>1.7</java.version>
        <resources.encoding>UTF-8</resources.encoding>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        ...

Tuesday, April 21, 2015

SQL - good workbook in Russian, part 5

PART 1 - http://habrahabr.ru/post/255361/
PART 2 - http://habrahabr.ru/post/255523/
PART 3 - habrahabr.ru/post/255825
PART 4 - habrahabr.ru/post/256045

Часть пятая — habrahabr.ru/post/256169

В данной части мы рассмотрим


Здесь мы в общих чертах рассмотрим работу с операторами модификации данных:
  • INSERT – вставка новых данных
  • UPDATE – обновление данных
  • DELETE – удаление данных
  • SELECT … INTO … – сохранить результат запроса в новой таблице
  • MERGE – слияние данных
  • TRUNCATE TABLE – DDL-операция для быстрой очистки таблицы

SQL - good workbook in Russian - parts 3, 4


PART 1 - http://habrahabr.ru/post/255361/
PART 2 - http://habrahabr.ru/post/255523/
PART 3 - habrahabr.ru/post/255825
PART 4 - habrahabr.ru/post/256045
PART 5 - habrahabr.ru/post/256169
ЧАСТЬ ТРЕТЬЯ

О чем будет рассказано в этой части


В этой части мы познакомимся:
  1. с выражением CASE, которое позволяет включить условные выражения в запрос;
  2. с агрегатными функциями, которые позволяют получить разного рода итоги (агрегированные значения) рассчитанные на основании детальных данных, полученных оператором «SELECT … WHERE …»;
  3. с предложением GROUP BY, которое в скупе с агрегатными функциями позволяет получить итоги по детальным данным в разрезе групп;
  4. с предложением HAVING, которое позволяет произвести фильтрацию по сгруппированным данным.

Saturday, April 18, 2015

GWTBootstrap3 sample project structure

git clone https://github.com/gwtbootstrap3/gwtbootstrap3-sample-app.git 

Wednesday, April 15, 2015

Enable Maven to get dependency from custom repository by adding settings.xml file into .m2 directory

In order to enable Maven to get dependency from custom repository add settings.xml file into .m2 directory of current user.

GIT clone - how to deal with connection errors of https urls

Open for edit .gitconfig:
Add this property:

[http]
     sslVerify = false

Get horizontal scroll and enable maximazing of window of Command Prompt (cmd) on Windows 7

  1. Open a Command Prompt (cmd.exe) by typing cmd in Start menu e.g.
  2. From inside the Command Prompt window, run wmic
  3. Right-Click the title bar of the Command Prompt window and select Properties
  4. Check QuickEdit Mode
  5. Exit the Command Prompt
All subsequent launches of the command prompt will have a horizontal scroll bar and support maximizing the window.