Feel Java

a blog about Java programming

03 December
0Comments

Twidledo

Twidle.do tweet an advice every time you complete one of the tasks of you Toodledo account

 

What it does

It send a tweet to your Twitter account every time you change the state of one of the tasks you insert into Toodledo.
This way, your users get informed of your progresses by simply following your twitter account.

How it works

You have to register an account to use Twidledo. Once you’ve registered, go to ‘My Twidledo’ page
and specify details of your Twitter and Toodledo account. You can then tweet your tasks status changes.
In this first phase, we ask you to go to the ‘Try Now!’ page everytime you want to check your account.
In a near future, we setup a timer which automatically check your task once every some minutes.

03 December
0Comments

Banner Printer

Banner Printer consente di stampare un file pdf un numero prefissato di volte impostando una pausa in secondi fra ogni passata

 

Cosa fa

Il programma funziona in due diverse modalità: “Stampa Banner”, che consente di stampare un file pdf un numero prefissato di volte impostando una pausa in secondi fra ogni passata, e “Mail Merge”, che consente di alternare la stampa di uno o più file fissi e di un set di file personalizzati, in modo che risultino fascicolati nel modo corretto alla fine del processo.
La modalità di funzionamento può essere variata scegliendo uno dei valori della tendina nel campo “Modalità”,in alto a sinistra:

Finestra principale

 

Come stampare

In modalità “Stampa Banner” alcuni campi sono disabilitati, perchè necessari solo in modalità “Mail Merge”.
Per avviare la stampa del banner è necessario:

  1. Scegliere il file pdf da stampare cliccando su aggiungi. Il file scelto apparirà nell’elenco
  2. Selezionare la stampante sulla quale si desidera stampare, scegliendone una dall’elenco “Stampante allegati”
  3. Nel campo immediatamente a destra, scegliere il numero di secondi da attendere fra l’invio di una stampa e l’invio della successiva
  4. Selezionare il numero di copie del file da stampare (Campo “Numero banner”)

A questo punto per avviare la stampa, cliccare su “Print”. Apparirà una finestra di attesa che comunica il progresso della stampa.

03 December
0Comments

Editable JqGrid

Editable JqGrid is a plugin for web2py that make it easy to use JqGrid in your application.

 

 

 

What is Editable JqGrid

Editable JqGrid is a plugin for web2py that make it easy to use JqGrid in your application. It’s just a matter of install the plugin in the application and then call a single function from your controller. See example of use here. Editable JqGrid is still in Beta stage, so use at your own risk!

What is web2py

Web2py is a Free and open source full-stack enterprise framework for agile development of fast, scalable, secure and portable database-driven web-based applications. Written and programmable in Python .

What are web2py plugins

web2py plugins are self contained pieces of an application that can be added to any existing application. They usually define components, i.e. objects that can be embedded in a page and talk to the server via ajax. Often they include corresponding jQuery plugins and the serverside funcitonality to make them work. Here you can find some examples. The web2py admin interface provides a web interface to upload and manage the plugins. The plugin themsselves are .w2p files (as for web2py apps). There are just tar gzipped files containing the source code. You do not need to unzip them. The admin interface will unzip them on upload in web2py. Once a plugin becomes part of your app, you can customize it without affecting other apps. Look and feel can be customized via CSS.

Features

  • Inline editing of rows using web2py standard widgets
  • Ajax updates,insertion,deletes of data
  • Multiple grid in same page allowed
  • Multiple database allowed
  • Fully customizable by simple inheritance of a class (TODO)
  • SQLTable similar syntax to easing the replace of your html table in existing application (TODO)
  • Licensed under LGPL. You can use it in your commercial or open source application

Download

Download version 0.2.0 from here

 

Simple example

First and obviously, you have to have a web2py application. For this example, we have defined following model:

This is standard w2p code… just an explanation on the function set_description_column. This is a function that let you define a default column to compute the description for a row of a table. The plugin use this information to show column values for reference column. Just pass the function the table you want to use as a reference and the name of the descriptive column.
Now to use Editable JqGrid, Just put following line in your controller:

And in your view:

Just that! And note that you must specify grid_name only if you want to use more than one grid in the same page, and db_name only if it differ from ‘db’.

To just use one simple grid, just use

return dict(customers=jqGrid(db.customer)

 

 

07 September
2Comments

Organize your ufront view with @wrap and @include

Some days ago I started to learn Haxe and ufront. Haxe is a statically typed, object oriented programming language with some pretty awesome features.

What I’ve found really attractive of it is that it could be compiled targeting many kind of platform: javascript, java, neko, php, c++ (maybe I don’t remember some others). Ufront is a MVC web framework for Haxe.

It’s really powerful and complete, but I think it suffer a bit for a lack of documentation, so I offer its author Franco Ponticelli to give some help with docs. I first publish this article as a wiki page on the project on github. I rewrote here just to spread the words…

Read more…

21 July
1Comment

On Kotlin enthusiasm

Despite the fact I’ve called this blog “Feel Java”, from about a month I’m becoming a more and more Kotlin language enthusiast. In this article I’ll explain what I’m starting to do with it.

 

Read more…

26 May
0Comments

A new application for Android: JUnadvisable

[section_title title=A new application for Android: JUnadvisable]

JUnadvisable is an application for Android that facilitates numbers composition without looking at the screen smart phone. In this article I explain how did the idea behind the application born and how the application.

Read more…

Pages: 1 2
26 May
0Comments

Una nuova applicazione per Android: JUnadvisable

[section_title title=Cos'è JUnadvisable?]

JUnadvisable è un’applicazione per Android che facilita la composizione dei numeri telefonici senza osservare lo schermo dello smart phone. In questo articolo racconto come è nata l’idea alla base dell’applicazione e come funziona.

Read more…

Pages: 1 2
06 May
0Comments

How to keep track of non empty field in Joda date buffer

[section_title title=Introduction]

Introduction

I’m writing a set of objects that alters fields in a Joda Time MutableDateTime instance.

There is an engine to organize the set of objects.It act on them sequentially calling a method that alter the MutableDateTime buffer, and when all objects finish, the engine build a complete valid ReadableDateTime from the MutableDateTime.

I show how to develop a class to keep track of the fields the fields altered. Read more…

Pages: 1 2 3 4 5
04 May
0Comments

Is Android API 2.2.1 too obsolete to use?

[section_title title=Introduction]

Introduction

What Android API version would you choose to begin developing a new Java application?

Recently I got a used smart phone running Android 2.2.1. Since I never experimented with mobile development, I decided to use it as an occasion to try to develop a new app for Android.

Read more…

Pages: 1 2 3 4
03 May
0Comments

Printing the type of an object to console

In this article I explain how to print to console the  an object or primitive value type name.

Read more…