BLUETOOTH APPLICATION PROGRAMMING WITH THE JAVATM APIs ESSENTIALS EDITION


image

Bluetooth wireless technology is a short-range radio standard that
provides new opportunities for wireless devices. Originally, Bluetooth
wireless technology was designed as a way of eliminating the cables
attached to nearly all consumer electronic devices. However, the goals
for Bluetooth wireless technology grew as its designers recognized that it
enables a new kind of wireless network between electronic devices.
Since 2001, Java developers have had the opportunity to develop
applications for a variety of wireless devices and cell phones. In 2000, the
Java community recognized the importance of creating a standard
extension to the Java programming language for use with Bluetooth
devices. A standard application programming interface (API) for Blue-
tooth was needed because each Bluetooth software protocol stack had its
own API for application programmers. These proprietary APIs meant
that a Bluetooth application had to be ported to different Bluetooth
stacks to run on different devices. Apart from the work involved in
writing the code, interoperability testing on the various devices costs
time and money for the involved companies. A standard API would help
alleviate all these problems.

DOWNLOAD

http://www.ziddu.com/download/9406117/icationProgrammingwiththeJavaAPIsEssentialsEdition.pdf.html

Advertisements

wxPython in Action


1932394621

Product Details

  • Paperback: 620 pages
  • Publisher: Manning Publications (March 23, 2006)
  • Language: English
  • ISBN-10: 1932394621
  • ISBN-13: 978-1932394627

Because they are often large and complex, GUI programming tool kits can be hard to use. wxPython is a combination of the Python programming language and the wxWidgets toolkit, which allows programmers to create programs with a robust, highly functional graphical user interface, simply and easily. wxPython combines the power of an exceptionally complete user interface toolkit with an exceptionally flexible programming language. The result is a toolkit that is unique in the ease with which complex applications can be built and maintained.

wxPython in Action is a complete guide to the wxPython toolkit, containing a tutorial for getting started, a guide to best practices, and a reference to wxPython’s extensive widget set. After an easy introduction to wxPython concepts and programming practices, the book takes an in-depth tour of when and how to use the bountiful collection of widgets offered by wxPython. All features are illustrated with useful code examples and reference tables are included for handy lookup of an object’s properties, methods, and events. The book enables developers to learn wxPython quickly and remains a valuable resource for futurework.

DOWNLOAD

http://www.ziddu.com/download/9403365/Manning.Publications.wxPython.in.Action.Mar.2006.pdf.html

Headfirst Java


headfirst java

Product Details

  • Paperback: 720 pages
  • Publisher: O’Reilly Media, Inc.; 2 edition (February 9, 2005)
  • Language: English
  • ISBN-10: 0596009208
  • ISBN-13: 978-0596009205

It has taken four years, but with Head First Java the introductory Java book category has finally come of age. This is an excellent book, far more capable than any of the scores of Java-for-novices books that have come before it. Kathy Sierra and Bert Bates deserve rich kudos–and big sales–for developing this book’s new way of teaching the Java programming language, because any reader with even a little bit of discipline will come away with true understanding of how the language works. Perhaps best of all, this is no protracted “Hello, World” introductory guide. Readers get substantial exposure to object-oriented design and implementation, serialization, neatwork programming, threads, and Remote Method Invocation (RMI).

Key to the authors’ teaching style are carefully designed graphics. Rather than explain class inheritance (to cite one example) primarily with text, the authors use a series of tree diagrams that clarify the mechanism far more succinctly. The diagrams are carefully annotated with arrows and notes. Also characteristic of the unique teaching strategy is heavy reliance on exercises, in which the reader is asked to complete partial classes, write whole new code segments and do design work. Though there’s little discussion of why the exercises’ correct answers are what they are, it’s clear that the practice work was carefully designed to reinforce the lesson at hand. If you’ve waited this long to give Java a try, this book is a great choice. –David Wall

Topics covered: The Java programming language for people with no Java experience, and even people with no programming experience at all. Key concepts read like a list of Java features: Object oriented design, variable type and scope, object properties and methods, inheritance and polymorphism, exceptions, graphical user interfaces (GUIs), network connectivity, Java archives (JAR files), and Remote Method Invocation (RMI). –This text refers to an out of print or unavailable edition of this title.

DOWNLOAD HERE

http://www.ziddu.com/download/9403169/HeadFirstJava2ndedition.pdf.html

Professional Java Server Programming


519KHN0MPDL__SL500_AA240_

Product Details

  • Paperback: 1168 pages
  • Publisher: Peer Information Inc.; 1 edition (August 1999)
  • Language: English
  • ISBN-10: 1861002777
  • ISBN-13: 978-1861002778

Amazon.com Review
Wrox specializes in books written by programmers, for programmers. Professional Java Server Programming, a volume on developing Java-based Web applications, is no different. All the 12 authors are developers and consultants–including some who’ve been part of Sun’s own Java team.

The Web is becoming more and more a way of delivering applications rather than just static Web pages. Java is becoming more and more popular as a tool for building Web applications, thanks to Java servlets and Java Server Pages. Professional Java Server Programming is a big book full of code samples and real-world experience.

Starting with a grounding in Web application development and technologies, the book introduces the various concepts of using Java to deliver Web content–as well as helping to give you the tools you need to work around the limitations of Web servers and Web browsers. You’ll also learn how to develop complex database-driven applications–and how to work faster. Since this is a book on the cutting edge of Java development, you’ll also find sections on using Java with XML documents and LAP directory servers, as well as Enterprise Java Beans. There’s even a good examination of the next generation of Java technologies–Jini and JavaSpaces–with a look at how these can be used in Web applications.

This is a superb and extremely practical book. If you’re building Java-based Web server applications, this is a book you need to have next to your terminal, if only for the 300 pages of reference material in the appendices! –Simon Bisson, amazon.co.uk

Product Description
An overview of the new server-side Java platform – Java 2 Enterprise Edition – as it relates to building n-tier web applications. It covers the building blocks (Servlets, JSP, EJB, JDBC, RMI, JNDI, CORBA) then goes into special design considerations for server side programming, (including resource pooling and component based design) before finally discussing future possibilities opened up by Jini and JavaSpaces technology.

In a world where, increasingly, corporate IT development is Web application development – ASP, PHP, CGI and ISAPI are all viable options.Now, so is the Java 2 Platform Enterprise Edition, and that’s good news because server-side Java is portable across Windows, Linux, UNIX and MacOS and compatible with a wide range of Web Servers (IIS, Apache, Netscape Enterprise Server) and Application Servers from Sun, IBM and others.

What does all this mean for you? Java provides technologies to allow for server side processing, dynamic page content generation and dynamic presentation. With these comprehensive, platform independent Java class libraries you can join together the disparate pieces of your business – data, applications and platforms – to form a coherent whole.

Java 2 Enterprise Edition – announced by Sun in June 1999 – makes Java an entire platform, not just another language and this is the first book that seriously covers it.

DOWNLOAD HERE!

http://www.ziddu.com/download/9398914/JavaServerProgramming_PL.rar.html

Java 3D Programing


1930110359_01_LZZZZZZZ

Product Details

  • Paperback: 400 pages
  • Publisher: Manning Publications; 1st edition (February 2002)
  • Language: English
  • ISBN-10: 1930110359
  • ISBN-13: 978-1930110359

Product Description

Guiding programmers through the important design and implementation phases of developing a successful Java 3D application, this reference provides guidance on whether to use Java 3D, user interface design, geometry creation, scene manipulation, or final optimizations. Distilling twelve months of using the Java 3D API for commercial projects, as well as discussions on the Java 3D e-mail list, experienced Java 3D developers will find helpful a resource containing the state-of-the-art in techniques and workarounds, while novice Java 3D developers will gain a insight into Java 3D development, and avoid the confusion and frustration of learning Java 3D techniques and terminology.

About the Author
Daniel Selman is the managing director of Tornado Labs Limited, a commercial software company completing projects using the Java 3D API. He has over five years experience in writing commercial Windows software. He lives in Boston, Massachusetts.

For more free books download visit this blog daily

For the Broken Links and Like this Book reply Here….

DOWNLOAD HERE

http://www.ziddu.com/download/9398751/Java_3D_Programming.pdf.html

Manning jQuery in Action Feb 2008


Giới thiệu về Threads


Định nghĩa threads

Thread là một đoạn mã nhỏ nhất mà có thể thực thi được, nó thực thi một nhiệm vụ cụ thể nào đó.

Một ứng dụng có thể chia làm nhiều nhiệm vụ, mỗi nhiệm vụ có thể gán cho một thread

Nhiều thread cùng thực hiện đồng thời, gọi là Multithreading.

Các thread có vẻ như thực hiện đồng thời, nhưng thực tế ko phải vậy…

Định nghĩa về multithreading

Multithreading có chi phí thấp hơn multitasking (về không gian, t/g)

Trong multitasking, các tiến trình chạy trên các địa chỉ riêng biệt

Các thread trong multithreading có thể chia sẻ cùng không gian bộ nhớ.

Các tiến trình trong multitasking gọi nhau phải chịu chi phí lơn hơn các thread trong multithreading.

Multithreading cho phép chúng ta thiết kế chương trình hiệu quả hơn mà sử dụng ít tài nguyên CPU

Multithreading còn cho phép chúng ta điều khiển cho các thread sleep một t/g trong khi các thread khác vẫn hoạt động mà ko làm cho hệ thống bị pause.

Lợi ích của multithreading

Vừa nghe nhạc, vừa xem ảnh đồng thời

Hiển thị cùng lúc nhiều ảnh trên màn hình

Tính toán 2 phép tính đồng thời

Tạo threads

Khi chương trình java thực hiện thì luôn có một thread chạy đó là thread main

Chương trình sẽ bị ngắt quãng khi thread main bị stop.

Main thread có thể được điều khiển thông qua đối tượng thread.

Tham chiếu đến main thread có thể nhận được bằng cách gọi method currentThread() của lớp Thread.

Đối tượng thread có thể được tạo theo 2 cách:

Định nghĩa một lớp là lớp con của lớp Thread được định nghĩa trong gói java.lang

class mythread extends Thread

Định nghĩa một lớp là implements của Runnable interface.

class mythread implements Runnable

Sau khi một thread mới được khởi tạo, chúng ta có thể gọi phương thức start()để start một thread, trái lại nó sẽ là một đối tượng thread rỗng, ko được cấp phát tài nguyên.

Mythread t = new Mythread();t.start();

Khi phương thức start() được gọi, thì tài nguyên hệ thống sẽ được cấp phát cho thread đó và nó sẽ được lập lịch để chạy.

Sau đó phải gọi phương thức run()

Ví dụ

Tạo một thread bằng cách kế thừa lớp Thread.

class MyThread extends Thread{    public static void main(String args[])    {        MyThread Objex = new MyThread();        Objex.create();        System.out.println("This is the main thread");     }

    public void create()     {           Thread Objth = new Thread(this);        Objth.start();   }public void run(){       while(true)      {             try        {                System.out.println("This is the child thread");            Thread.sleep(500);             }             catch(InterruptedException e)        { }    }

 

image

ví dụ 2:

Tạo thread từ việc implement Runnable interface

class MyThread2 implements Runnable{    public static void main(String args[])    {        MyThread2 Objx = new MyThread2();        Objx.create();        System.out.println("This is the main thread");    }

    public void create()     {        Thread Objth = new Thread(this);            Objth.start();      }public void run()  {       while(true)       {        try        {               System.out.println("This is the child thread");               Thread.sleep(500);              }              catch(InterruptedException e)        { }       } }}
image 
Thảo luận về trạng thái của Threads

Running: Thread ở trạng thái running khi phương thực start đã được gọi

Sleeping: thread đang hoạt động cũng có thể bị ngắt quãng bằng cách gọi phương thức sleep(). Thread sẽ chuyển sang trạng thái sleeping một khoảng thời gian.

Waiting: Thread sẽ ở trạng thái này khi phương thức wait() được gọi. Nó được sử dụng khi 2 hay nhiều thread chạy cùng nhau.

Blocked: thread rơi vào trạng thái này khi nó đợi dữ liệu như thao tác input/output.

Dead: thread rơi vào trạng thái này khi phương thức run() kết thúc hoặc phương thức stop() được gọi.

 

image

Một số method của lớp thread

final boolean isAlive(): trả về giá trị true nếu thread còn tồn tại

final String getName(): trả về tên của thread.

void start():

final void join() throws InterruptedException: đợi cho đến khi thread die.

static void yield(): thread hiện tại sẽ tạm ngừng để thread khác chạy.n

final void setName(String name):

final boolean isDaemon(): kiểm tra xem có phải là Daemon thread ko.

static int activeCount(): đếm số thread đang hoạt động

static void sleep():

Quản Lý threads

nThread có thể được xét mức ưu tiên khác nhau (là các hằng của lớp Thread)

NORM_PRIORITY – value is 5

MAX_PRIORITY – value is 10

MIN_PRIORITY – value is 1

Giá trị mặc định là: NORM_PRIORITY

2 phương thức để thiết lập priority:

final void setPriority(int newp): thay đổi mức ưu tiên hiện tại

final int getPriority(): trả về mức ưu tiên.

Tìm hiểu về daemon thread

2 loại thread trong java:

User threads: đc tạo bởi người dùng

Daemon threads: các thread làm việc dưới background và nó cung cấp dịch vụ cho các thread khác.

Ví dụ: – the garbage collector thread

Khi thread của người dùng thoát, JVM sẽ kiểm tra xem còn các thread nào đang chạy ko?

Nếu có thì nó sẽ lập lịch cho các thread đó

Nếu chỉ có Daemon thread hoạt động thì nó sẽ thoát.

Chúng ta cũng có thể thiết lập cho một thread là Daemon thread nếu muốn chương trình chính đợi cho đến khi thread kết thúc.

Thread có 2 phương thức để làm việc với Daemon thread:

public final void setDaemon(boolean value) : Gán một Thread thành Daemon thread

public final boolean isDaemon() : Kiểm tra xem 1 thread có phải là Daemon thread ko?

class TestDaemon implements Runnable{    Thread Objth1,Objth2;      public TestDaemon()      {        Objth1 = new Thread(this);        Objth1.start();Objth2 = new Thread(this);Objth2.setDaemon(true);      }      public void run()      {        System.out.println(Thread.activeCount());        System.out.println(Objth1.isDaemon());System.out.println(Objth2.isDaemon());      }    public static void main(String args[])    {        new TestDaemon();      }}
image