lunes, 5 de junio de 2023

Certificación 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/

Vulkan Graphics System

Vulkan is an API (Application Programming Interface) for graphics and compute hardware. The API consists of many commands that allow a programmer to specify shader programs, compute kernels, objects, and operations involved in producing high-quality graphical images, specifically color images of three-dimensional objects.

Vulkan is a low-overhead, cross-platform 3D graphics and compute API. Vulkan targets high-performance realtime 3D graphics applications such as video games and interactive media across all platforms. Compared with OpenGL and Direct3D 11 and like Direct3D 12 and Mantle, Vulkan can offer higher performance and more balanced CPU/GPU usage. Other major differences from Direct3D (prior to version 12) and OpenGL are Vulkan being a considerably lower level API and offering parallel tasking. Vulkan also has the ability to render 2D graphics applications,[11] however it is generally suited for 3D. In addition to its lower CPU usage, Vulkan is also able to better distribute work amongst multiple CPU cores. (https://en.wikipedia.org/wiki/Vulkan_%28API%29)

https://arstechnica.com/gadgets/2015/03/khronos-unveils-vulkan-opengl-built-for-modern-systems/

https://www.khronos.org/

http://www.glfw.org/

LunarG® Vulkan™ SDK

As the first comprehensive Vulkan SDK for Windows® and Linux operating systems, the LunarG® Vulkan® SDK includes everything you need to get started in the Vulkan API development environment.

https://www.lunarg.com/vulkan-sdk/

jueves, 18 de mayo de 2017

C++: Multiparadigma: orientado a objetos, imperativo, programación genérica

C++ es un lenguaje de programación diseñado a mediados de los años 1980 por Bjarne Stroustrup. La intención de su creación fue el extender al lenguaje de programación C mecanismos que permiten la manipulación de objetos. En ese sentido, desde el punto de vista de los lenguajes orientados a objetos, el C++ es un lenguaje híbrido.

Posteriormente se añadieron facilidades de programación genérica, que se sumaron a los paradigmas de programación estructurada y programación orientada a objetos. Por esto se suele decir que el C++ es un lenguaje de programación multiparadigma.

Actualmente existe un estándar, denominado ISO C++, al que se han adherido la mayoría de los fabricantes de compiladores más modernos. Existen también algunos intérpretes, tales como ROOT.

Una particularidad del C++ es la posibilidad de redefinir los operadores, y de poder crear nuevos tipos que se comporten como tipos fundamentales.

El nombre "C++" fue propuesto por Rick Mascitti en el año 1983, cuando el lenguaje fue utilizado por primera vez fuera de un laboratorio científico. Antes se había usado el nombre "C con clases". En C++, la expresión "C++" significa "incremento de C" y se refiere a que C++ es una extensión de C.

Kotlin on Android. Now official

Posted on  by Maxim Shafirov


Today, at the Google I/O keynote, the Android team announced first-class support for Kotlin. We believe this is a great step for Kotlin, and fantastic news for Android developers as well as the rest of our community. We’re thrilled with the opportunities this opens up.

For Android developers, Kotlin support is a chance to use a modern and powerful language, helping solve common headaches such as runtime exceptions and source code verbosity. Kotlin is easy to get started with and can be gradually introduced into existing projects, which means that your existing skills and technology investments are preserved.

https://blog.jetbrains.com/kotlin/2017/05/kotlin-on-android-now-official/

Kotlin: 100% interoperable with Java™ and Android™

Statically typed programming language for modern multiplatform applications.

100% interoperable with Java™ and Android™

Kotlin es un lenguaje de programación de tipado estático que corre sobre la Máquina Virtual de Java y que también puede ser compilado a código fuente de Javascript. Su desarrollo primario es de un equipo de programadores de JetBrains con base en San Petersburgo, Rusia (el nombre proviene de la Isla de Kotlin, cerca de San Petersburgo).3 Kotlin fue nombrado Lenguaje del Mes en la edición de enero de 2012 de la revista Dr. Dobb.4 Aunque no tiene una sintaxis compatible con Java, Kotlin está diseñado para interoperar con código Java y es dependiente de código Java de la Biblioteca de Clases Java existente, tal como el Collections Framework.

https://kotlinlang.org

Android: The world’s most popular mobile OS

From phones and watches to cars and TVs, customize your digital life with Android.

Android es un sistema operativo basado en el núcleo Linux. Fue diseñado principalmente para dispositivos móviles con pantalla táctil, como teléfonos inteligentes, tablets y también para relojes inteligentes, televisores y automóviles. Inicialmente fue desarrollado por Android Inc., empresa que Google respaldó económicamente y más tarde, en 2005, compró.8 Android fue presentado en 2007 junto la fundación del Open Handset Alliance (un consorcio de compañías de hardware, software y telecomunicaciones) para avanzar en los estándares abiertos de los dispositivos móviles.9 El primer móvil con el sistema operativo Android fue el HTC Dream y se vendió en octubre de 2008.10 Los dispositivos de Android venden más que las ventas combinadas de Windows Phone e IOS.

https://www.android.com



Java is the world's #1 programming language

Java es un lenguaje de programación de propósito general, concurrente, orientado a objetos que fue diseñado específicamente para tener tan pocas dependencias de implementación como fuera posible. Su intención es permitir que los desarrolladores de aplicaciones escriban el programa una vez y lo ejecuten en cualquier dispositivo (conocido en inglés como WORA, o "write once, run anywhere"), lo que quiere decir que el código que es ejecutado en una plataforma no tiene que ser recompilado para correr en otra. Java es, a partir de 2012, uno de los lenguajes de programación más populares en uso, particularmente para aplicaciones de cliente-servidor de web, con unos 10 millones de usuarios reportados.
El lenguaje de programación Java fue originalmente desarrollado por James Gosling de Sun Microsystems (la cual fue adquirida por la compañía Oracle) y publicado en 1995 como un componente fundamental de la plataforma Java de Sun Microsystems. Su sintaxis deriva en gran medida de C y C++, pero tiene menos utilidades de bajo nivel que cualquiera de ellos. Las aplicaciones de Java son generalmente compiladas a bytecode (clase Java) que puede ejecutarse en cualquier máquina virtual Java (JVM) sin importar la arquitectura de la computadora subyacente.
La compañía Sun desarrolló la implementación de referencia original para los compiladores de Java, máquinas virtuales, y librerías de clases en 1991 y las publicó por primera vez en 1995. A partir de mayo de 2007, en cumplimiento con las especificaciones del Proceso de la Comunidad Java, Sun volvió a licenciar la mayoría de sus tecnologías de Java bajo la Licencia Pública General de GNU. Otros también han desarrollado implementaciones alternas a estas tecnologías de Sun, tales como el Compilador de Java de GNU y el GNU Classpath.

https://www.oracle.com/java/index.html

Proyecto Fenix

Proyecto Fenix 

Fenix es el nombre de un proyecto GNU destinado a crear un compilador gratuito para un lenguaje derivado del que en su día Hammer Technologies creó para el desarrollo de videojuegos con su entorno DIV.

Su desarrollo ha sufrido muchos contratiempos y discontinuidades, dando fruto a diversas versiones que pese a haber sido originadas por la misma filosofía han dado como fruto versiones incompatibles entre sí y con una gama de prestaciones muy distinta.

El objetivo de esta web es reanudar el trabajo en una versión que pueda ser considerada oficial, partiendo de la actual revisión 0.71 Beta (que puede encontrarse en http://fenix.sourceforge.net) corrigiendo el máximo de errores tanto de código como de funcionamiento.

Una vez conseguida una versión 1.0 estable el proyecto tomará un nuevo enfoque, ampliar y mejorar Fenix para conseguir una herramienta realmente sencilla y potente para el desarrollo de videojuegos. 


https://es.wikipedia.org/wiki/Proyecto_Fenix

El sitio oficial del proyecto es (ya no está activo):
http://fenix.divsite.net

Bennu Game Development: The game programming language

Bennu is a high level open source game development suite which focuses on modularity and portability, making it a perfect choice for cross-platform game development.
Although officialy it is only supported on Windows, Linux and GP2X Wiz (on the right), Bennu can run on multiple other platforms, including *BSD, MacOSX and other consoles such as the Wii, Dingoo A320, GP2X, or the classic Xbox.
This makes it really fun to code in Bennu: the game can be played on you computer AND your console!

Bennu -which was born as a Fenix fork- is actively mantained and makes it easy for both beginners and experienced users to create their own games.

The latest will find it particularly interesting that Bennu allows the use of third-party extensions that extend Bennu to allow such things as: networking, advanced output graphics manipulations, mpeg playback, complex text rendering, XML parsing...

In fact, most of the Bennu code runs as extensions to the main interpreter, allowing you to use only those you need (thus optimizing resource usage) or to completely replace them.


http://www.bennugd.org