Saturday, 25 December 2010

Java: Code coverage for Eclipse

Code coverage describes the degree to which the source code of a program has been tested.

Java: JDBC basics

JDBC is an API for the Java programming language that defines how a client may access a database. It provides methods for querying and updating data in a database.

Tuesday, 21 December 2010

Java: Parameterized unit tests with JUnit

JUnit is a unit testing framework for the Java programming language.In this article I will explain how to create test with predefined values.This feature works in JUnit 4.

Wednesday, 15 December 2010

Sunday, 12 December 2010

JavaEE : Hibernate tutorial


Hibernate is an object-relational mapping (ORM) library for the Java language, providing a framework for mapping an object-oriented domain model to a traditional relational database.

Friday, 3 December 2010

PHP: Working with XML

In this article I'll implement base functions to interact with XML like: loading, showing, saving, adding, deleting, editing.

Thursday, 18 November 2010

PHP: DOMDocument and encoding

If you want to save document with not typical encoding, for example utf-8 (russian letters)

Photoshop Keyboard shortcuts

Recently I found cool list with photoshop shortcuts

Sunday, 31 October 2010

Android: Menu button click event

If you want to do smth after hardware MENU button clicks, not default menu creation but something slightly different.The easiest way is to capture the onKeyDown event for the menu button click

Sunday, 17 October 2010

Android: Center position of the button (fill_parent, wrap_content)

<Button android:id="@+id/btClick" android:gravity="center_vertical|center_horizontal"
android:layout_gravity="center_vertical|center_horizontal|center" 
android:layout_height="wrap_content" 
android:layout_width="100px" 
android:text=""/>


android:layout_width="fill_parent" - object have width like parent
android:layout_height="wrap_content" - parent height wants to be just big enough to enclose its content

Monday, 4 October 2010

Android: Native icons how to use

 In your android phone are many beautiful icons.Here is the list:http://developer.android.com/reference/android/R.drawable.html and here is more http://developer.android.com/design/downloads/index.html


To use: 
  • in recourses  android:icon="@android:drawable/<name of your element>"
  • in java code android.R.drawable.<name of your element>
But be aware:

Warning: Because these resources can change between platform versions, you should not reference these icons using the Android platform resource IDs (i.e. menu icons under android.R.drawable).

Rather, you are adviced to make a local copy

Android: Unparsed aapt error

This error appears when you change smth in xml and it changes in recourses not correctly( may be it's bug)
Solution: go in Eclipse to Project>clean it will load last successful build, Good Luck!)

Thursday, 30 September 2010

Android:The easiest way to load image from URL

The easiest way to download image from URL is to use method Drawable.createFromStream:

main.xml:
<linearlayout android:id="@+id/LinearLayout01" 
android:layout_height="fill_parent" 
android:layout_width="fill_parent" 
xmlns:android="http://schemas.android.com/apk/res/android">
<imageview android:id="@+id/ImageView1" 
android:layout_height="wrap_content" 
android:layout_width="wrap_content">
</imageview></linearlayout>

Android: Download progress



How to create progress of file downloading

Wednesday, 29 September 2010

Android: Beginning


Here are a few steps to begin develop for Android:
  1. Install JDK 
  2. Install Eclipse IDE 
  3. Install Android SDK 
  4. Instal  Eclipse Android plugin
References:
How to do all steps more detailed here (Russian lang)
Good resource

UPDATE: use this link http://developer.android.com/sdk/index.html