Εμφάνιση αναρτήσεων με ετικέτα Java. Εμφάνιση όλων των αναρτήσεων
Εμφάνιση αναρτήσεων με ετικέτα Java. Εμφάνιση όλων των αναρτήσεων

Τετάρτη 15 Απριλίου 2015

Programming Mobile Applications for Android Handheld

8-13 June at Found.ation with the co-operation of Pinnatta team

instructors: George Anagnostaros and Vassilis Pigadas



Σκοπός ειναι οι συμμετέχοντες να εξοικειωθούν με την ανάπτυξη εφαρμογών Android για κινητά, ταμπλέτες, ρολόγια, τηλεορασεις και αυτοκίνητα. Με το πέρας του σεμιναρίου, οι συμμετέχοντες θα έχουν όλες τις απαραίτητες γνώσεις ωστε να ασχοληθούν επαγγελματικά με την δημιουργία αξιόλογων εφαρμογών Android.



Απευθύνεται σε όσους θέλουν να μάθουν πως μπορούν να ανάπτυσουν εφαρμογές Android, που να ειναι συντηρισιμες σε έναν χώρο που συνεχώς μεταβάλλεται. Η γνώση Java είναι απαραίτητη, αλλά οι γνώστες C-like γλωσσών θα μπορέσουν να ακολουθήσουν με σχετική άνεση.


Πρόγραμμα:
Προαιρετικό πρόγραμμα:
  • Πεμπτη 4 Ιουνίου, 18:00-20:00 -Εισαγωγή στην Java
  • Παρασκευή 5 Ιουνίου, 18:00-20:00 - Εγκατασταση και γνωριμία με το Android Studio


Κανονικό πρόγραμμα:
Δευτέρα 8 Ιουνίου, 18:00-20:00 -
Βασικά στοιχεία μιας εφαρμογής Android (1)


Τρίτη 9 Ιουνίου, 18:00-20:00 -
Βασικά στοιχεία μιας εφαρμογής Android (2)
Δραστηριότητες και Προθέσεις (Activities and Intents)


Τετάρτη 10 Ιουνίου, 18:00-20:00 -
Δημιουργία διατάξεων (layouts)


Πέμπτη 11 Ιουνίου, 18:00-20:00 -
Βάσεις δεδομένων και πάροχοι περιεχομένου (SQLite & Content Providers)


Παρασκευή 12 Ιουνίου, 18:00-20:00 -
Υπηρεσίες και ασύγχρονες εργασίες (Services & AsyncTasks)


Σάββατο 13 Ιουνίου, 10:00-14:00 -
Επικοινωνία με το δίκτυο
Beta testing, debugging και δημοσίευση εφαρμογής στο Google Play


Τι θα χρειαστειτε:
  • Φορητό υπολογιστή με τουλάχιστον τα ακολουθα χαρακτηριστικά:
    • 4GB RAM
    • 10GB ελευθερου χώρου στον δισκο
    • Λειτουργικό σύστημα Linux, MAC OS, ή Windows
  • Προαιρετικά, θα ήταν καλό να εχετε και συσκευή με λειτουργικό σύστημα Android 4.0.3 και άνω ώστε να δοκιμασετε τα δημιουργήματα σας.


Σύνολο:
Προαιρετικό πρόγραμμα: 4 ώρες σε 2 μερες
Κανονικό πρόγραμμα: 14 ώρες σε 6 μέρες


Κόστος early bird (κανονικό πρόγραμμα): 95 ευρώ
Κόστος early bird (κανονικό πρόγραμμα + προαιρετικό πρόγραμμα): 110 ευρώ


Κόστος μετά την πάροδο των early bird (κανονικό πρόγραμμα): 110 ευρώ
Κόστος μετά την πάροδο των early bird (κανονικό πρόγραμμα + προαιρετικό πρόγραμμα): 125 ευρώ


Στο τέλος θα δοθούν πιστοποιητικά παρακολούθησης από το Found.ation.
ΒιογραφικάGeorge Anagnostaros
  • Head of Mobile Engineering in Pinnatta.
  • Co-founder & CTO of Apps4Mags
  • Working experience in software development of vast array of projects, since 2006.
  • Developing applications for mobiles since the era of J2ME, back to 2000, but he still learns new technologies (e.g. Swift, Lambda Expressions etc)
  • Education
    • Master of Science in the Management of Business Innovation and Technology
    • BsC, in Applied Informatics & Multimedia


Vassilis Pigadas

  • Android Engineer at Pinnatta
  • Working experience in Android development
  • Education
    • Master of Computer/Information Technology Administration and Management
    • BsC, in Computer Science & Biomedical Informatics

When ?

Monday, June 08, 2015 6:00 PM
-
Saturday, 13 June 2015

Where ?

Found.ation
Evristheos 2


118 54 Athina, Greece

Κυριακή 19 Αυγούστου 2012

How to find out whether a string is in latin!

I am currently developing an Sentiment Analysis software for my thesis. One of the several problems that I am facing was to find out whether a sentence was in english, or at least whether it is written in latin. Google offered me several solutions, like replacing using ugly regular expressions. The truth is that I do not like such solutions since I am not pretty sure about the computational complexity of the regular expressions especially in case of large text content, so I tried to find a more clean solution!
Finally I came up with the idea of checking whether the String can be encoding in a char set that uses only latin characters, like ISO-8859-1 or US-ASCII! So here is my code:

    static Charset latin = Charset.forName("US-ASCII"); // or "ISO-8859-1" for ISO Latin
    public static boolean isLatin(String content) {
        return latin.newEncoder().canEncode(content);
    }
Note: I haven't check whether the newEncoder() method creates a Thread safe instance of CharsetEncoder, so I preferred to call it each time that I need an encoder.

Σάββατο 26 Νοεμβρίου 2011

Java Code:Underline keyword in sentence

1:    public String markWord(String sentence, String word) {  
2: int lastFound = -1;
3: while ((lastFound = sentence.toLowerCase().indexOf(word, lastFound)) > -1) {
4: String prefix=sentence.substring(0, lastFound) + "<u><b>";
5: String _word= sentence.substring(lastFound,lastFound+ word.length());
6: String suffix="</b></u>"
7: + sentence.substring(lastFound + word.length(), sentence.length());
8: sentence = prefix+_word+suffix;
9: lastFound+="<u><b></b></u>".length();
10: }
11: return sentence;
12: }

Πέμπτη 29 Σεπτεμβρίου 2011

Spring Android

Questions and accepted answers

  1. Do you want to develop a native android application? YES
  2. Will your application contact some server using REST, JSON or XML? YES/NO/MAYBE
  3. Will your application be integrated with social networks? YES/NO/MAYBE
  4. Do you want to do it from scratch? NO
Results

In case that you gave the accepted answers to the questionnaire then you can try Spring Android. Spring Android is an extension of the well known Spring Framework that aims to simplify the development of native Android Applications. In general, it uses the tools that Android SDK provides. You keep developing Android native apps using Eclipse, but you do not have to code everything from scratch or search for individual libraries. In fact it is an integration of existing libraries[1] so that you will not need to spend your useful development time on how they will all work together.
The tricky part is how to install everything that is necessary to work with Spring Android. The answer is the included References, see "What to install in order to use Spring Android", but in addition I would like to add that in order to check your setup using spring-android-showcase client, you will need to:
  • Create an Android Virtual Device named "7" and using Android 7 (2.1_R1) or change in pom.xml the value of the /project/properties/android-emulator



  • Add YOUR_PATH_TO_THE_ANDROID_SDK_HOME element under the configuration/sdk of the plugin "maven-android-plugin"


Notes:

[1] Additional libraries that Spring Android includes: httpclient, httpcore, commons-codec, xmlParserAPIs, xpp3, jackson, gson, simple-xml


References:

  1. What to install in order to use Spring Android: http://blog.springsource.com/2011/02/09/spring-android-and-maven-part-2/
  2. Spring Android home page: http://www.springsource.org/spring-android
  3. Android Maven Plugin that is used to build native Android applications using maven: http://code.google.com/p/maven-android-plugin/
PS: If you would like to me to explain something in more detail simply ask me to do so!

Τρίτη 6 Σεπτεμβρίου 2011

Metawidget v1.30!

Last month I was starting a new private project for one of my clients. His most important request was that the structure of the business entities might change at any time! This request made me follow the model-driven development approach. In order to avoid re-inventing the wheel, I started evaluating the several open source frameworks that are available.

Finally I found a post that I had written on my own, one year ago! It was a post about Metawidget, a pretty simple to learn but very scalable Object Interface Mapping (OIM) technology[1]. Metawidget seems to be the best solution for my case, since it automatically generate the part of the GUI which binds to each domain class.

It should be noted that I preferred Metawidget because I had to develop the application was Swing based.

Notes:
[1] That how Metawidget is characterized by its own development team (reference: http://metawidget.sourceforge.net/doc/faq/core.php#oim).

Παρασκευή 27 Μαΐου 2011

String.hashCode()'s bug

Do you know that it is possible to get the same hashCode for two different strings, although they might not be that long?

Try the following piece of code:

int hashCodeER4="ER4".hashCode();
int hashCodeEQS="EQS".hashCode();
System.out.println("ER4's hashCode()="+hashCodeER4);
System.out.println("EQS's hashCode()="+hashCodeEQS);

What do you get?

ER4's hashCode()=68903
EQS's hashCode()=68903

What does it mean?

There are several pieces of code that "compare" Object's using their hashCode.

For instance,
HashMap uses the hashCode of the key in order to retrieve the corresponding value[1]

Why does it happen?

According to the javadoc:
"The hash code for a String object is computed as
 s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1] 
using int arithmetic, where s[i] is the ith character of the string, n is the length of the string, and ^ indicates exponentiation. (The hash value of the empty string is zero.)"

Which means that each character's value should be between 0 and 30 in order to avoid conflicts, but in fact even in case of ASCII we have a range from 0 up to 255, while in case of UTF-8 or even worse UT-16 the range is much larger.


TODO: Calculate manually the hashCode to check whether it is a problem of the formula or of the implementation of String.hashCode();

Notes:
[1] The following code is used in the HashMap in order to retrieve the value that is set for the requested key. As you can see we search using the hashCode, not the actual object itself.
public V get(Object key) {
if (key == null)
return getForNullKey();
int hash = hash(key.hashCode());
for (Entry e = table[indexFor(hash, table.length)];
e != null;
e = e.next) {
Object k;
if (e.hash == hash && ((k = e.key) == key || key.equals(k)))
return e.value;
}
return null;
}


Πέμπτη 12 Μαΐου 2011

Απίστευτη τρύπα...

Πόσο απλά μπορεί ένα προγραμμα να "κολήσει"; Εαν ειστε απλό χρήστης σιγουρα θα πείτε "πανεύκολα", εαν ειστε ομως προγραμματιστής τότε σίγουρα θα πιστεύετε ότι ο βασικός λόγος για να κολήσει κάποιο πρόγραμμα είναι το οποιοδήποτε ανθρώπινο λάθος που οδηγεί σε κάποια ατέρμονη ή υπερβολικά χρονοβόρα διαδικασία.

Ενα τέτοιο, πιθανώς ανθρώπινο, λάθος είναι και το ακόλουθο. Φαινομενικά είναι σωστός ο κωδικας, αλλά εαν πειραματιστείτε θα καταλαβετε οτι δεν ειναι και τοσο σωστος..

class runhang { public static void main(String[] args) {   System.out.println("Test:");   double d = Double.parseDouble("2.2250738585072012e-308");   System.out.println("Value: " + d);  } }

πηγή: Java Hangs When Converting 2.2250738585072012e-308

Κυριακή 8 Μαΐου 2011

Εισαγωγή στην Java

Στο Διαδικτυο θα βρειτε σίγουρα απειρο υλικο για να ξεκινησετε προγραμματισμο σε Java, αλλα σιγουρα ενα βιβλιο θα σας βοηθήσει καλύτερα. Σας προτεινω να κατεβάσετε και να διαβασετε καποια απο τα τρια πολύ βασικά βιβλια που βρισκονται στο http://www.readwriteweb.com/hack/2011/04/free-e-books-on-java-for-begin.php

Προσοχή: Αφορουν αρχαριους!

Βεβαια εαν θελετε κατι ακομα πιο απλο, κι ελληνικο, για αρχη τοτε κοιταξτε το http://nethellas.gr/Java.htm

Δευτέρα 28 Μαρτίου 2011

Τι ειναι αντικειμενοστραφής προγραμματισμός;

Βρήκα και σας παρουσιάζω ένα αρκετά ενδιαφέρον, εισαγωγικό, μάθημα στον αντικειμενοστραφή προγραμματισμό με χρήση Java. Πιστεύω ότι ειναι χρήσιμο για οποιον θέλει να αποκτήσει μια εικόνα για το τι ειναι αντικειμενοστραφής προγραμματισμός. Μην περιμένετε να γινετε ειδικοί, αλλά σίγουρα θα κατανοήσετε ή τουλάχιστον θα ακουσετε κάποιες απο τις ποιο βασικές έννοιες.


Στο συγκεκριμένο video θα παρακολουθήσετε μια σύντομη παρουσίαση όλως των βασικών εννοιών που υπάρχουν στον αντικειμενοστραφή (Object Oriented - OO) προγραμματισμό.


Δευτέρα 3 Ιανουαρίου 2011

How to check who calls your method!

If you want to lock some method so that it will be public but only some specific methods or classes or packages will be allowed to access, then you can modify the following method in order to verify whether the caller should be allowed to execute the method or you should rise an exception instead!


public static boolean isAllowedToCall(){
String callerClassName= new Throwable().getStackTrace()[2].getClassName();
return (callerClassName.startsWith("com.gorbas")||callerClassName.contains("binding"));
}

In my case I allow only packages starting with com.gorbas and classes that contain the word "binding" in their full name.

Τετάρτη 22 Δεκεμβρίου 2010

Possibly the most usefull library for an existing system!

I was always wondering how to intercept method calls. How to execute code before and after calling some method, for logging perposes or whatever! Today it became a real need so I searched and found that there is a solution name "Tie: Java Method Interception" and you can find it at http://sourceforge.net/projects/tie/

Notes:
1) You need to have an interface for each class that you want to intercept
2) You need to implement MethodInterceptor in order to handle method invocations
3) You need a single instance of your MethodInterceptor's implementation, MethodInterceptorStack and ProxyInjector

In my case I created a class named "LoggingManager" which watches several classes
import net.sf.tie.InterceptorStack;
import net.sf.tie.MethodInterceptorStack;
import net.sf.tie.ProxyInjector;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class LoggingManager implements MethodInterceptor {

public Object invoke(MethodInvocation invocation) throws Throwable {
System.out.println("Method to be called:" + invocation.getMethod().getName());
return invocation.proceed();
}
static ProxyInjector proxyInjector;

static{
LoggingManager log = new LoggingManager();
MethodInterceptorStack stack = InterceptorStack.singleton(log);
proxyInjector= new ProxyInjector(stack);
}

private LoggingManager() {
}

public static AgentIF watch(AgentIF agent) {
agent = proxyInjector.wrapObject(AgentIF.class, agent);
return agent;
}
}

If you need more information leave a comment and I will answer to you as soon as possible!

Παρασκευή 1 Οκτωβρίου 2010

Metawidget, a useful framework for easy UI development

I currently work on a project that requires a lot of forms to be implemented. For that reason I had either to design each form using a visual tool (e.g. Matisse[1]), or a domain driven design (e.g. Naked Objects pattern[2]). Due to the fact that requirements may change at any time and everything should similar, I preferred the solution of domain-driven design.
Developing a model that support everything that is required for the application and adding metadata that will be useful for the UI is a very good combination for easy and agile development of a user friendly application! While I was designing my solution I discovered that there is a new framework that could help me. It's named Metawidget[3]. Metawidget offers integration with several front end frameworks. The only framework that I have used is swing, and I would like to inform you that it works perfectly and it is easy to add your own code to extend the functionality. For instance if you need to use some additional attribute to specify how a member should be shown then you can do it easily[4]!
Try it, and if you need any help just ask me!


[1] Swing GUI Builder (formerly Project Matisse) (http://netbeans.org/features/java/swing.html)
[2] Naked Objects is an architectural pattern where User Interface (UI) is just reflection of the model. For more details see http://en.wikipedia.org/wiki/Naked_objects
[3] Metawidget is an open source project that helps you to easily generate graphical user interface for desktop, web and mobile applications. It is simply a bridge between back-end architecture (using annotations or xml files for metadata) and existing front-end frameworks (such as Swing,Java Server Faces, Struts, Android). For more informations visit the official web site http://www.metawidget.org/
[4] The only case that I can't find an efficient solution is the one that I need a JTable to represend and edit values of a java.util.Collection, but I hope that I will find the way to do it!

Πέμπτη 30 Σεπτεμβρίου 2010

Trace your code!

Today I found a very usefull open source tool that monitors user actions and generates sequence diagrams. It is named jTracert and it support java applications.

It has two parts, a javaagent that should start with the application and sends messages about the steps and a GUI that receives those messages and produces sequence diagrams.

So instead of running your application by calling something like
java -cp myApp.jar com.Main
you call
java -javaagent:jTracert.jar=7007 -cp myApp.jar com.Main

and then you also start up the GUI so that you can see the diagrams!

For more information go to the application's site.



Κυριακή 26 Σεπτεμβρίου 2010

How to retrieve the type of content used for a Collection

If you need to know what is defined for each generic type in your instance use the following piece of code

Code:
Method method = myClass.getMethod("getCalendars", null);
Type returnType = method.getGenericReturnType();
if (returnType instanceof ParameterizedType) {
ParameterizedType type = (ParameterizedType) returnType;
Type[] typeArguments = type.getActualTypeArguments();
for (Type typeArgument : typeArguments) {
Class typeArgClass = (Class) typeArgument;
System.out.println("typeArgClass = " + typeArgClass);
}
}

Comments:
1) myClass is the class that has a method named "getCalendars" which returns an instance of a class that uses generics.
2) You can try it by implementing a class that returns a "java.util.List"

Παρασκευή 17 Σεπτεμβρίου 2010

Εαν θέλετε να μάθετε Java..

Σήμερα εντόπισα ένα ενδιαφέρον site με παραδείγματα κώδικα Java. Το http://www.javadb.com/. Είναι ένας αρκετά ενδιαφέρον χώρος με αρκετά και καλά οργανομένα tutorials για Java. Απο μια πρώτη ματιά είδα ότι οι οδηγίες είναι για σχετικά αρχάριους, αλλά πάντα όλο και κάτι δεν ξέρεις ή δεν θυμάσαι. Οπότε είναι ένα καλό σημειο αναφοράς για οποιοδήποτε γράφει κώδικα σε Java.
Ενας άλλος εξίσου ενδιαφέρον ιστοχώρος ειναι και το http://www.java2s.com/ που επίσης περιλαμβάνει Java πηγαίο κώδικα αλλά και οδηγίες σε βοηθήματα για το πως να γράφεις κώδικα σε Java.

Σάββατο 5 Δεκεμβρίου 2009

Χρησιμοποιώντας Wicket..

Το τελευταίο καιρό έχω αρχίσει να ασχολούμαι με ένα ακόμα web framework, το wicket. Το wicket είναι ένα framework για Java που ανήκει στην μεγάλη οικογένεια του Apache Foundation. Το ιδιαίτερο χαρακτηριστικό που έχει, σε σχέση με άλλα παρόμοια, είναι ότι διαχωρίζει την εμφάνιση από την λογική. Αυτό επιτυγχάνεται με το να απαιτείται για κάθε τι που εμφανίζεται αφενός ένα στοιχείο HTML σε κάποια σελίδα και αφεταίρου αντίστοιχο Wicket Component's instance που να δημιουργείται στον Constructor κάποιας ομώνυμης με την σελίδα κλάσης. Επίσης διαθέτει δυνατότητα χρήσης Ajax αλλα παράλληλα και κλασικού submit/refresh.

Εαν θέλετε να μάθετε περισσότερα μπείτε στην επίσημη ιστοσελίδα του project: http://wicket.apache.org/
ή ζητήστε μου να γράψω περισσότερα.

Τρίτη 3 Νοεμβρίου 2009

Πάρτε το METRO για να φτάσετε γρηγορότερα στα Web Services

Η Sun σε συνδιάζοντας τις διάφορες έτοιμες βιβλιοθήκες που έχει για ανάπτυξη Web Services έχει δημιουργήσει ένα πακέτο που ονομάζεται "METRO". Το συγκεκριμένο πακέτο έχω αρχίσει να χρησιμοποιώ κι εγώ για την ανάπτυξη Web Services για λογαριασμό της εταιρειας όπου εργάζομαι. Το σημαντικό, που με κάνει να αναφέρομαι στο συγκεκριμένο πακέτο, είναι η ευκολία που σου δίνει στην ανάπτυξη. Το μειονέκτημα όμως είναι ότι τα περισσότερα tutorials περιγράφουν βήμα βήμα πως θα γίνει η υλοποίηση με χρήση του γραφικού περιβάλλοντος NetBeans, αλλά δυστυχώς χρησιμοποιούμαι Eclipse!
Συνοψίζοντας θα μπορούσα να πω ότι είναι πολύ ευκολο για τους εξής λόγους:
1) Χρήση annotations που κάνουν τον προγραμματιστεί να γράφει pure Java και το Metro να αναλαμβάνει την δημιουργία WSDL και XSD
2) Χρήση Handler Chain που λειτουργούν ως φίλτρα στα εισερχόμενα και τα εξερχόμενα μηνύματα, που μπορούν να χρησιμοποιηθούν για κοινές εργασίες. Για παράδειγμα ορισμός localization για το transaction.
3) Εναλλακτικοί τρόποι υλοποίηση ελέγχου πρόσβασης. Οπου μπορεί να γίνει και με ειδική κρυπτογράφηση του κλειδιου που ειναι διαφανής για τον προγραμματιστή!
4) Ελάχιστο configuration σε xml αρχεία! Σχεδόν όλα ρυθμίζονται με χρήση annotations
5) ΔΟΥΛΕΥΕΙ!

Εαν έχετε απορίες ή θέλετε να σας βοηθήσω σε κάποιο έργο είμαι στην διάθεση σας.
g.anagnostaros@gmail.com

Σάββατο 3 Μαΐου 2008

Πρόγραμμα υπενθύμισης περιόδου

Χθες μου δώθηκε μια πολύ καλή ιδέα για να φτιάξω ένα προγραμματάκι που υπενθυμίζει την περίοδο των γυναικών. Είναι αρκετά απλό προς το παρόν. Δηλαδή η γυναικα απλά επιλέγει την προηγούμενη ημερομηνία που είχε περιοδο και το προγραμμα προσθέτει 28 μερες για να βρει την επόμενη περίοδο της [θεωρητικά 28 διαβασα ότι ειναι!]. Επίσης στις 27 μέρες κι αν το πρόγραμμα εκτελεστει μετα τα ξημερώματα της 27ης μέρας μετα την τελευταία περιοδο, ανοιγει ένα παράθυρο υπενθύμισης. Εαν υπάρξει ενδιαφέρον και προτάσεις θα συνεχίσω την ανάπτυξη του συγκεκριμένου προγράμματος με στόχο την κάλυψη των διαφόρων αναγκών που μπορεί να υπάρχουν και λόγου φύλου δε γνωρίζω!
Σας το παραδίδω λοιπον κυρίες μου για να το δοκιμάσετε και να μου προτεινεται ιδεες.
Το πρόγραμμα θα το κατεβάσετε εδώ αλλά αν δεν έχετε ήδη εγκαταστήσει Java στον υπολογιστή σας, τοτε θα χρειαστει να κατεβάσετε και να εγκαταστήσετε και την Java από εδώ

ΥΓ[1]: Για οποιδήποτε σχολιο, απορία ή οτιδήποτε αφήστε σχόλιο και θα σας απαντήσω σύντομα ;-)
ΥΓ[2]:Την ιδέα την πήρα από ένα προγραμματάκι που υπάρχει για iPod Touch, το iWoman κι αν δω ότι υπάρχει ενδιαφέρον θα μπορούσα να το κάνω να του μοιάζει ακομα περισσότερο, το μονο που θέλω ειναι τα σχολια σας ;-)

Σάββατο 19 Απριλίου 2008

Προγραμμα για τους ναύτες του ΓΚ στο ΠΝ

Έχω δημιουργήσει ένα πολύ απλό προγραμματάκι, για λογαριασμό του αδερφού μου που υπηρετεί την θητεία του και λόγω των γνώσεων του περί υπολογιστών τον έχουν βάλει ΓΚ [Γραφείο Κυβερνήτη] και μεταξύ των άλλων αρμοδιοτήτων του έχει και το να βγάζει το ημερήσιο πρόγραμμα για τους ναύτες. Το προγραμμα αυτό, που του έχω φτιάξει, θεωρώ οτι θα μπορούσε να γίνει αφορμή για διάφορους να πάρουν τιμητικές άδειες καθώς θα επιταχύνεται έτσι το έργο του ναύτη που ειναι ΓΚ. Αν σας ενδιαφέρει μπορείται να μου στειλεται ένα email και θα επικοινωνίσω μαζί σας για τα περεταίρο! g.anagnostaros@gmail.com
Σας δείχνω και μερικά screenshots να πάρετε μια ιδέα:

Η εφαρμογή που έχω φτιάξει έχει αποκλειστικά και μόνο ένα παράθυρο όπου επιλέγει ο χρήστης τον αιωματικό φυλακής, την τοιχαρχία που θα  είναι ένδον καθώς και τους ναύτες που θα μοιραστούν στα διάφορα πόστα.
Όταν ο χρήστης ολοκληρώσει τις επιλογές του, απλά και μονο πατώντας το μοναδικό κουμπί που υπάρχει, δημιουργείται ένα αρχείο EXCEL που έχει συμπληρομένα όλα τα απαραίτητα στοιχεία και είναι έτοιμο να εκτυπωθεί!

Το αρχείο EXCEL που δημιουργείται έχει την μορφή του εικονιζόμενου, αλλά μπορεί πολύ εύκολα να προσαρμοστεί στα δικά σας μέτρα για να καλύπτει τις δικές σας ανάγκες. 






Το μόνο που έχει προαπαιτούμενο το πρόγραμμα είναι το να έχουν συμπληρωθεί τα στοιχεία αξιωματικών και ναυτών σε ένα αρχείο EXCEL ώστε το πρόγραμμα να γνωρίζει το τι θα εμφανίζει προς επιλογή!











ΥΓ: Αν θέλετε να αποκτήσεται μια καλύτερη άποψη για το συγκεκριμένο πρόγραμμα μπορείτε κατεβάσεται και να δείτε το manual του σε pdf μορφή πατώντας εδώ

Κυριακή 6 Απριλίου 2008

Java Concurrency In Practice [2]

Όπως έγραφα και στην προηγούμενη ανάρτηση ένα δεύτερο σημαντικό θέμα στην διαχείριση των Threads είναι η αποφυγή δημιουργίας απεριόριστων java.util.Timer, γιατι κάθε Timer εμπεριέχει κι απο ένα TimerThread. Οπότε αντιστοιχα έχουμε ένα Thread για κάθε Timer. Όμως υπάρχει επίσης αλλο ένα πρόβλημα με το java.util.Timer, καθε instance μπορεί να εκτελει "ταυτοχρονα" μονο ένα TimerTask. Οπότε αν του αναθέσουμε δυο TimerTask που πρέπει να ξεκινήσουνε μαζι, θα εκτελεστει το ένα και το αλλο θα θεωρηθεί εκπρόθεσμο.
Την λύση στο πρόβλημα του Timer το λύνει ένα ειδικού τύπου ThreadPoolExecutor, το ScheduledThreadPoolExecutor. Όπου το δημιουργούμε οριζοντας το πόσα Threads θα δημιουργηθούν στο Thread Pool, δηλαδη πόσες ταυτόχρονες εργασίες [Tasks] θέλουμε να γίνονται, ενώ αν ταυτοχρονα έχουν προγραμματιστει περισσότερες, αλλά δε υπάρχουν διαθέσιμα Threads τοτε απλά θα εκτελεστουν στη σειρα.
Παραδειγμα μπορείτε να βρειτε εδώ.

LinkWithin

Blog Widget by LinkWithin

Mobile edition