lunes, 5 de junio de 2023

Preparándome para una certificación en Java SE Programmer (IZ0-808)


 

 Estos son los alcances de la prueba de certificación:

Java Basics 

  • Define the scope of variables 
  • Define the structure of a Java class
  • Create executable Java applications with a main method; run a Java program from the command line; produce console output
  • Import other Java packages to make them accessible in your code
  • Compare and contrast the features and components of Java such as: platform independence, object orientation, encapsulation, etc.

Working With Java Data Types 

  • Declare and initialize variables (including casting of primitive data types)
  • Differentiate between object reference variables and primitive variables
  • Know how to read or write to object fields
  • Explain an Object's Lifecycle (creation, "dereference by reassignment" and garbage collection)
  • Develop code that uses wrapper classes such as Boolean, Double, and Integer  

Using Operators and Decision Constructs 

  • Use Java operators; use parentheses to override operator precedence
  • Test equality between Strings and other objects using == and equals ()
  • Create if and if/else and ternary constructs 
  • Use a switch statement 

Creating and Using Arrays 

  • Declare, instantiate, initialize and use a one-dimensional array
  • Declare, instantiate, initialize and use multi-dimensional arrays

Using Loop Constructs 

  • Create and use while loops
  • Create and use for loops including the enhanced for loop
  • Create and use do/while loops
  • Compare loop constructs
  • Use break and continue  

Working with Methods and Encapsulation 

  • Create methods with arguments and return values; including overloaded methods
  • Apply the static keyword to methods and fields  
  • Create and overload constructors; differentiate between default and user defined constructors
  • Apply access modifiers
  • Apply encapsulation principles to a class
  • Determine the effect upon object references and primitive values when they are passed into methods that change the values

Working with Inheritance 

  • Describe inheritance and its benefits
  • Develop code that makes use of polymorphism; develop code that overrides methods; differentiate between the type of a reference and the type of an object
  • Determine when casting is necessary
  • Use super and this to access objects and constructors
  • Use abstract classes and interfaces

Handling Exceptions 

  • Differentiate among checked exceptions, unchecked exceptions, and Errors
  • Create a try-catch block and determine how exceptions alter normal program flow
  • Describe the advantages of Exception handling 
  • Create and invoke a method that throws an exception
  • Recognize common exception classes (such as NullPointerException, ArithmeticException, ArrayIndexOutOfBoundsException, ClassCastException)

Working with Selected classes from the Java API 

  • Manipulate data using the StringBuilder class and its methods
  • Create and manipulate Strings
  • Create and manipulate calendar data using classes from java.time.LocalDateTime, java.time.LocalDate, java.time.LocalTime, java.time.format.DateTimeFormatter, java.time.Period
  • Declare and use an ArrayList of a given type 
  • Write a simple Lambda expression that consumes a Lambda Predicate expression

Assume the following:

  • Missing package and import statements: If sample code do not include package or import statements, and the question does not explicitly refer to these missing statements, then assume that all sample code is in the same package, or import statements exist to support them.
  • No file or directory path names for classes: If a question does not state the file names or directory locations of classes, then assume one of the following, whichever will enable the code to compile and run:
  • All classes are in one file
  • Each class is contained in a separate file, and all files are in one directory
  •  
  • Unintended line breaks: Sample code might have unintended line breaks. If you see a line of code that looks like it has wrapped, and this creates a situation where the wrapping is significant (for example, a quoted String literal has wrapped), assume that the wrapping is an extension of the same line, and the line does not contain a hard carriage return that would cause a compilation failure.
  • Code fragments: A code fragment is a small section of source code that is presented without its context. Assume that all necessary supporting code exists and that the supporting environment fully supports the correct compilation and execution of the code shown and its omitted environment.
  • Descriptive comments: Take descriptive comments, such as "setter and getters go here," at face value. Assume that correct code exists, compiles, and runs successfully to create the described effect.

 

viernes, 8 de junio de 2018

Primer portlet en Liferay 6.2








Los siguientes son los pasos para crear un portlet básico en Liferay 6.2.
Antes de empezar, hay que tener instalado un entorno Java, Liferay 6.2 y Eclipse, al que agregaremos plugins para Liferay.
En Eclipse, se debe seleccionar New, Liferay Plugin Project:


Después de esto, darle el nombre: "Simple" en este ejemplo:


 En este ejemplo elegir, "Liferay MVC":


Se agrega el portlet creado en el servidor (botón derecho en servidor, en este caso Tomcat 7):






Revisamos en el portal y agregamos el portlet al portal Liferay:






sábado, 24 de junio de 2017

SDL multiplatform graphic library

Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. It is used by video playback software, emulators, and popular games including Valve's award winning catalog and many Humble Bundle games.
SDL officially supports Windows, Mac OS X, Linux, iOS, and Android. Support for other platforms may be found in the source code.
SDL is written in C, works natively with C++, and there are bindings available for several other languages, including C# and Python.
SDL 2.0 is distributed under the zlib license. This license allows you to use SDL freely in any software.

jueves, 22 de junio de 2017

SFML: Simple and Fast Multimedia Library

SFML is multi-media

SFML provides a simple interface to the various components of your PC, to ease the development of
games and multimedia applications. It is composed of five modules: system, window, graphics, audio and network.

Discover their features more in detail in the tutorials and the API documentation.



SFML is multi-platform
With SFML, your application can compile and run out of the box on the most common operating systems: Windows, Linux, Mac OS X and soon Android & iOS.

Pre-compiled SDKs for your favorite OS are available on the download page.


SFML is multi-language
SFML has official bindings for the C and .Net languages. And thanks to its active community, it is also available in many other languages such as Java, Ruby, Python, Go, and more.

Learn more about them on the bindings page.


https://www.sfml-dev.org

GLFW Open Source library

GLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan
development on the desktop. It provides a simple API for creating windows, contexts and surfaces, receiving input and events.

GLFW is written in C and has native support for Windows, macOS and many Unix-like systems using the X Window System, such as Linux and FreeBSD.

GLFW is licensed under the zlib/libpng license.


Gives you a window and OpenGL context with just two function calls


Support for OpenGL, OpenGL ES, Vulkan and related options, flags and extensions


Support for multiple windows, multiple monitors, high-DPI and gamma ramps


Support for keyboard, mouse, gamepad, time and window event input, via polling or callbacks


Comes with guides, a tutorial, reference documentation, examples and test programs


Open Source with an OSI-certified license allowing commercial use


Access to native objects and compile-time options for platform specific features


Community-maintained bindings for many different languages


http://www.glfw.org/







http://www.glfw.org/

Allegro 5: A game programming library

Allegro is the Italian for «quick, lively, bright». It is also a recursive acronym which stands for «Allegro Low LEvel Game ROutines». Allegro was started by Shawn Hargreaves in the mid-90's but has since received contributions from hundreds of people over the net.

 Allegro 5

Allegro 5 is the latest major revision of the library, designed to take advantage of modern hardware (e.g. hardware acceleration using 3D cards) and operating systems. Although it is not backwards compatible with earlier versions, it still occupies the same niche and retains a familiar style.
Allegro 5.0 supports the following platforms:

•Unix/Linux
•Windows (MSVC, MinGW)
•MacOS X
•iPhone
Allegro 5.1 also adds support for:
•Android

You can see the functionality Allegro provides by browsing the online reference manual.
Allegro only supports 2D graphics primitives natively, but it is perfectly reasonable to use Allegro alongside a 3D API (e.g. OpenGL, Direct3D, and higher level libraries), while Allegro handles the other tasks. Allegro is also designed to be modular; e.g. if you prefer, you can substitute another audio library.
http://liballeg.org/ 


Prex: An Open Source, Royalty-free, Real-time Operating System

What is Prex?

Prex is an open source, royalty-free, real-time operating system for embedded systems. It is designed and implemented for resource-constrained systems that require predictable timing behavior. The highly portable code of Prex is written in 100% ANSI C based on traditional microkernel architecture.
The Prex microkernel provides only fundamental features for task, thread, memory, IPC,
exception, and synchronization. The other basic OS functions - process, file system, application loading, and networking, are provided by the user mode servers. In addition, Prex provides a POSIX emulation layer in order to utilize existing *NIX applications. This design allows the system to perform both of the native real-time task and the generic POSIX process simultaneously without degrading real-time performance. It also helps platform designers to construct OS by choosing suitable system servers for their target requisition.

Project goals:

The project targets the following goals:
  • To provide a small, portable, real-time, secure, and robust operating system.
  • To provide simple and clean source codes for education and an experimental test-bed.
  • To conform to open standards as much as possible.
  • To enjoy our life with kernel hacking. ;-)

http://prex.sourceforge.net/