News Aggregator


Spring Batch and Caching

Aggregated on: Tue Jun 09 2020 17:10:03 GMT+0000 (Coordinated Universal Time)

Today, in this tutorial we'll learn how to implement the Caching in the Spring Batch. There are numerous scenarios where we always need to get the data from a database based on some conditions either at Spring Batch Processor, Tasklet, or Writer for each record and calling database to get that data could be performance-centric and could often increase the load on the database.   

View more...

JUnit Parameterized Test For Selenium Automation With Examples

Aggregated on: Tue Jun 09 2020 17:10:03 GMT+0000 (Coordinated Universal Time)

As an automation tester, you might often come across Selenium test automation scenarios, where you need to execute the same tests, again and again, but with different inputs and environments, making the task exhausting and redundant.  To deal with this redundancy, you can opt for the Parameterized test. With Parameterized Test, you can run the same automated test scripts again but with different values. Parameterized tests help to save time spent on writing the same tests repetitively, by utilizing test methods to collect data.

View more...

Combining CoreUI + React With Python + Flask to Create a Simple Website (Part 1)

Aggregated on: Tue Jun 09 2020 17:10:02 GMT+0000 (Coordinated Universal Time)

Dring this weekend my 6th grader son asked me if I could teach him creating a website from scratch using open-source content. He knows a little Python, JavaScript, and HTML. So I decided to create a YouTube series showing him how he can learn by himself and many other young aspirants worldwide. The whole series is divided into multiple steps and source code is shared from my GitHub. Step 1: Creating Front End using CoreUI and React Cloning CoreUI repo for React Installing and updating Packages Building to code Testing/Running the code Adding Environment setting Changing its running port Cleaning the code by removing extra template code Updating the navigation menu and new pages Here is the detailed step by step video to explain the above steps:

View more...

Basic Guide for Debian Packaging (NodeJS)

Aggregated on: Tue Jun 09 2020 17:10:02 GMT+0000 (Coordinated Universal Time)

What Is Debian? Debian is a universal Linux based operating system. Debian systems currently use the Linux kernel or the FreeBSD kernel. The need for people is application software: programs to help them get what they want to do done, from editing documents to running a business to playing games to writing more software. Debian comes with over 51,000 packages (precompiled software that is bundled up in a nice format for easy installation on your machine), a package manager (APT), and other utilities that make it possible to manage thousands of packages on thousands of computers as easily as installing a single application. All of it is free.

View more...

The Backend Revolution and Why io_uring Is So Important

Aggregated on: Tue Jun 09 2020 16:00:03 GMT+0000 (Coordinated Universal Time)

Not so many backend (and application in general) developers are watching the development of Linux kernel. But those who do notice the appearance and rapid development of io_uring. For those who are not aware of what it is, I'll provide a brief introduction below. But the main topic of this post is not the io_uring itself. Instead, I want to show you that we are watching the beginning of the real revolution in backend development. I/O Anatomy of the Backend As I've explained in the article dedicated to Data Dependency Graph, each backend application at a very high level has only three parts - set of inputs, set of outputs, and set of transformations from inputs to outputs.

View more...

From a Computation Machine to a Coordination Machine

Aggregated on: Mon Jun 08 2020 22:40:03 GMT+0000 (Coordinated Universal Time)

Today there is a huge amount of technology for dealing with different aspects of cloud computing. In particular, containerization and microservices lead us to think of software applications as distributed applications whose components can be easily deployed and moved in the cloud. In my opinion, what we are facing today is a revolution that is not only a matter of technologies, it is something so profound that it can alter the way we conceive software and software infrastructures. My idea is that we need new abstractions and concepts for dealing with such a revolution. In science, we are always looking for the best model which captures the essence of reality. We are doing this because on top of that model we can build the right technologies for satisfying our human needs. The same happened in computer science from the beginning when researchers started to automatize the ability of the mind: calculation. From that moment, the calculation machine has been always used as the basic reference for dealing with automatic calculation, and on top of this model, different technologies have been developed.In this article, I start to reason about the usage of a new reference idea for dealing with computational resources which best fit with the reality of cloud computing, instead of the traditional computing machine model: the communication machine.

View more...

Service Mesh: The Next Step to Kubernetes in the Era of Microservices

Aggregated on: Mon Jun 08 2020 22:40:03 GMT+0000 (Coordinated Universal Time)

Often designed as a group of distributed microservices running in containers, cloud-native applications are better known as containerized applications. Increasingly, the containerized applications are Kubernetes-based, Kubernetes being the de-facto standard for container orchestration. But the exponential growth in microservices makes it quite challenging to find out how to enforce and standardize routing between multiple services, encryption, authentication and authorization, as well as load balancing within a Kubernetes cluster. Building on service mesh helps to tackle these challenges. Like containers abstract away the operating system from the application, a service mesh abstracts away how inter-process communications are tackled. What Is a Service Mesh? A service mesh refers to a dedicated infrastructure layer for tackling service-to-service communication. It enables reliable delivery of requests through the complex topology of services constituting a modern, cloud native application. Practically, the service mesh implements as an array of lightweight network proxies deployed alongside application code. In other words, it is made up of sidecar proxies attached to all the pods in an application. The concept of the service mesh in terms of a distinct layer is connected to the growth of the cloud native application. Remember service-to-service communication is not only complex, but a fundamental aspect of runtime behavior and ubiquitous. Managing it is crucial to assure end-to-end performance and reliability.

View more...

Change Data Captures CDC from MySQL Database to Kafka with Kafka Connect and Debezium

Aggregated on: Mon Jun 08 2020 22:40:02 GMT+0000 (Coordinated Universal Time)

Introduction Debezium is an open-source project developed by Red Hat which aims to simplify this process by allowing you to extract changes from various database systems (e.g. MySQL, PostgreSQL, MongoDB) and push them to Kafka Debezium Connectors Debezium has a library of connectors that capture changes from a variety of databases and produce events with very similar structures, making it easier for the applications to consume and respond to the events regardless of where the changes originated. Debezium currently have the following connectors

View more...

Exit The Test Maintenance Road to Nowhere Through Visual AI

Aggregated on: Mon Jun 08 2020 22:40:02 GMT+0000 (Coordinated Universal Time)

On the Test Maintenance Road to Nowhere? Your Visual AI Exit Is Just Ahead. Congrats! You just spent hours authoring new tests. They all passed 100% of the time. Now you can start the real work of managing quality. That is until the application under test starts to change. Now, the potential for instability in code-based assertions surfaces, and your maintenance nightmare ensues.

View more...

Best Linux Distros for Developers

Aggregated on: Mon Jun 08 2020 22:40:02 GMT+0000 (Coordinated Universal Time)

Linux is an awesome ecosystem for a variety of uses. For instance, Linux is the de facto server environment, powering over 96% of the top 1 million servers. And for programming, Linux is arguably better than Windows. Check out the best Linux distros for programmers and developers! Why Is Linux Better for Devs and Programmers? My Linux journey began back in the day when I inherited an ancient Shuttle XPC desktop sans an operating system (OS). Rather than purchasing a copy of Windows, I decided to install the Ubuntu derivative Lubuntu, and since then I've been a convert. Likewise, one of the reasons many motivations for programmers to use a Linux OS is that it's free and open-source.

View more...

APIs in Less Than 5 Minutes With Strapi - InfraCloud Technologies

Aggregated on: Mon Jun 08 2020 20:40:03 GMT+0000 (Coordinated Universal Time)

This blog is originally published on InfraCloud blog.  The evolution of CDN (Content Delivery Networks) and business need to scale multi-channel ways of interacting with the customer have made the traditional CMS obsolete. Organizations are using JAMstack to build responsive websites & CDN to deliver them where the customer is. With the evolution of the 5G and data-intensive applications such as AR, VR, drones, etc. new technologies will emerge that will deliver services closest to where the customer resides.

View more...

Security Is Everybody's Job — Part 5 — The First Way

Aggregated on: Mon Jun 08 2020 20:40:02 GMT+0000 (Coordinated Universal Time)

The first "Way" of DevOps is emphasizing the efficiency of the entire system. Many of us tend to focus only on our part of a giant system and get bogged down improving only our own contributions to the larger process. It's rare that we stand back, look at the entire thing, and realize that if we helped another team or if changed something small within our part, that it could improve other areas for the better. The first way of DevOps is about looking at the entire system and making sure the entire thing is as efficient as possible.  #speed When we worked in Waterfall development environments security often acted as a gate. You had to jump through their hoops, then you were let through, and you could push your code to prod. Awesome, right? Not really. It was slow. Security activities took FOREVER. And things got missed. It was rigid and unpleasant and didn't result in reliably secure software.

View more...

RPA and Data: How Robotics Is Facilitating Innovation By Automating Data Science

Aggregated on: Mon Jun 08 2020 20:40:02 GMT+0000 (Coordinated Universal Time)

What are the things that go into making a business succeed? While customer service, marketing, adept employees, and cutting edge technology are all required to take businesses to the next level, something that companies need even more than any of those today is data. Data helps companies make decisions, identify trends, and enable better customer service.

View more...

How IT Pros Can Make the Most of Twitter

Aggregated on: Mon Jun 08 2020 19:30:03 GMT+0000 (Coordinated Universal Time)

Navigating the Twitter landscape can be a difficult task. It's become a veritable treasure trove of information with loads of potential for both sharing and finding content. But, are you doing it right? For IT professionals, making the most out of Twitter is different than for pros in other spaces. It can be a helpful resource, but also a career-building tool. Check out the best ways IT professionals can get the most out of Twitter. Re-think Your Approach Rather than thinking of Twitter as a social media platform, consider it micro-blogging. Kent C. Dodds, a JavaScript engineer, and open-source advocate suggests focusing entirely on sharing quality content. "It's mostly just producing great content that people want more of, and the way that they get more is through Twitter." The content itself can vary from podcasts to blog posts or even just a standard 140-character Tweet.

View more...

Jenkins Log Monitoring With ELK

Aggregated on: Mon Jun 08 2020 19:30:03 GMT+0000 (Coordinated Universal Time)

Purpose A build log of a Jenkins Job contains a full set of records for a job, including the build name, number, execution time, the result (success or fail), and other things. In this article, we have demonstrated Jenkins log and Job builds log monitoring using Filebeat and ELK Stack greater visibility, tracking, and monitoring.

View more...

How SaaS Products Can Enhance Your Business

Aggregated on: Mon Jun 08 2020 19:30:03 GMT+0000 (Coordinated Universal Time)

Digitization has become less of a luxury and more of a necessity for businesses these days. It is not just about keeping up with the trends of the world and the demands of your customers. It is equally about staying ahead of the game in a fast-paced world. But, digitization is not something that you can just snap your fingers and get done. It requires time, patience, and, more importantly, acceptance. Everyone knows all too well about management and administration that are highly reluctant about and resistant to change. Especially when talking about exporting the business operations that funnel to a system which, to many of these people, is difficult and esoteric-- the change can experience friction. Some businesses prefer to keep their digital systems in their own hands as much as possible. However, others-- especially those looking to reduce expenses, infrastructure, and hassle-- will go for SaaS. Businesses normally keep their presentations and pitches using PowerPoint templates and Keynotes, which now have moved to SaaS-Based Products like Canva, Crello Etc, which is an excellent example for SaaS Models. Why SaaS Is the Choice of the Future The focus of every single system nowadays is to reduce load. In light of the present circumstances, this is even more important. People want a business that they can access from anywhere, take with them wherever they go, and not lose continuity. They want to outsource digital operations to third parties, so they can focus on their business. In fact, it is the businesses running on SaaS products right now that are thriving the most, even amid a global crisis. There has hardly been a dent in their profits. This goes on to show how much more of a right choice SaaS is not just now but even in the future. And we will show you why.

View more...

Externalize your i18n in your Alexa Skill

Aggregated on: Mon Jun 08 2020 19:30:02 GMT+0000 (Coordinated Universal Time)

In computing, internationalization is the process of designing software so that it can be adapted to different languages and regions without the need of re-engineering or making changes in code. In the case of software, it means to translate into several languages, using different currencies or using different date formats.

View more...

Tips for Helping Your Teams Self-Organize

Aggregated on: Mon Jun 08 2020 19:30:02 GMT+0000 (Coordinated Universal Time)

If you work in any sort of management position or a team environment, you have likely heard the term "self-organizing" team. This is something that has become a key ingredient in high performing and motivated teams and when I first learned about it, the idea made total sense. However, it is such a high-level concept that I had no idea how to go about coaching and encouraging teams to effectively self-organize. After a great deal of research, experimentation, and failure, here is a list of tips that I wish I would have had when I was first getting started.  Why Self-Organizing Teams? "It doesn't make sense to hire smart people and tell them what to do; we hire smart people so they can tell us what to do." - Steve Jobs To me, this quote helped clarify the idea behind self-organizing teams. I have worked in organizations where teams wait for their orders to come from above and then grumble when they don't like the orders. They are often afraid to push back for fear of stepping on anyone's toes or because they feel that they will not be listened to. With the amount of time and money it takes to hire good people, this is very wasteful.  

View more...

Does Remote Software Quality Assurance (QA) Really Work?

Aggregated on: Mon Jun 08 2020 17:10:03 GMT+0000 (Coordinated Universal Time)

Businesses in any industry, from manufacturing and construction to financial services and retail, have become increasingly dependent on technology, not just to succeed but to survive. As a result, businesses cannot afford the potential losses of productivity and security breaches due to ineffective software testing. No enterprises have the luxury to ignore unexpected downtime from software failures. By not prioritizing quality assurance for business-critical applications, enterprises are essentially setting up their business-critical processes to fail.

View more...

Mutation Testing: Covering Your Code With the Right Test Cases (Part 2)

Aggregated on: Mon Jun 08 2020 17:10:03 GMT+0000 (Coordinated Universal Time)

In part one, we achieved 100 percent coverage. In this installment, we mutate our code and check how good our tests are. There are several mutation testing frameworks. In this case, we will use PITEST.

View more...

An Introduction to Reactive Programming With Spring

Aggregated on: Mon Jun 08 2020 13:40:03 GMT+0000 (Coordinated Universal Time)

Introduction This is part one of a series of articles that will serve as an introduction on how to build reactive web applications using Spring Boot, Project Reactor and WebFlux. It will be a beginners guide to the reactive world, but the reader is assumed to have previous knowledge on Java and Spring Boot. Why Reactive Programming? Reactive programming has been around for some time but gained much higher interest during the last couple of years. The reason for this relates to the fact that traditional imperative programming has some limitations when it comes to coping with the demands of today, where applications need to have high availability and provide low response times also during high load.

View more...

Deploying Docker Containers in Cloud Foundry Using a Private Registry

Aggregated on: Mon Jun 08 2020 13:40:02 GMT+0000 (Coordinated Universal Time)

In my previous blog, I explained how to create a simple NodeJS application, Dockerize it, and deploy it on IBM Cloud using the public DockerHub as a registry. This works fine if security is not an issue, but there are some additional advantages of using a private registry, such as the one in IBM Cloud. Not only does it protect your images, it also scans the images for security vulnerabilities.

View more...

React Native Made Easy – Native Bridge (Feat. Scan Kit) Part 1

Aggregated on: Mon Jun 08 2020 13:40:02 GMT+0000 (Coordinated Universal Time)

Introduction  React Native is a convenient tool for cross platform development, and though it has become more and more powerful through the updates, there are limits to it, for example its capability to interact with and using the native components. Bridging native code with Javascript is one of the most popular and effective ways to solve the problem. Best of both worlds!  Currently not all HMS Kits has official RN support yet, this article will walk you through how to create android native bridge to connect your RN app with HMS Kits, and Scan Kit will be used as an example here. 

View more...

Producer Consumer With Kafka and Kotlin

Aggregated on: Mon Jun 08 2020 12:30:03 GMT+0000 (Coordinated Universal Time)

Introduction In this article, we will develop a simple Spring Boot application using Kafka and Kotlin.  Let's get started. Visit https://start.spring.io and add the following dependencies:

View more...

Ameba, TPS, Scrum, and XP

Aggregated on: Mon Jun 08 2020 12:30:02 GMT+0000 (Coordinated Universal Time)

Recently, I've joined the Amoeba Study Tour to Japan and learned about the Amoeba of Kyocera and the TPS of Toyota. Back when I start to learn Agile development, I'd heard that that Agile development was influenced a lot by Toyota management. Taking this study tour has provided me with more direct and intuitive experience of Amoeba management, and I made a comparison of Amoeba management, TPS, Scrum, Extreme Programming.  Let's look at some background information first.

View more...

Cloud-native development - On remote containers

Aggregated on: Mon Jun 08 2020 11:25:06 GMT+0000 (Coordinated Universal Time)

The previous articles were introducing the foundations of a blueprint for cloud-native development, exploring a logical diagram, and diving into the first use case with cloud-native development on local containers. In this article we're continuing on to example use cases within the architectural blueprint. Descriptions are provided to guide you with aligning the landscape your organization works with every day.

View more...

How to Pass Parameters to ActionListener in ADF

Aggregated on:

In some cases, it is required to pass a value to ActionListener of ADF Button. The method that can be invoked by actionListeners has only one parameter of type ActionEvent. So I will explain how to pass parameter to that bean method however it contains only one paramater ActionEvent in method signature. I added button to my page as belowThe default signature of ActionLister is The workaround I used is adding an attribute tag from the JSF.Core inside the ADF Button So the code in the jsp page looks like thisNote "MyAttrName" is the name of paramater and "MyAttrValue" is the value of paramater.You can bind  "MyAttrValue" to get any value from page definition.Now I will write the followign code to get paramatervalue from bean The variable "attrValue" holds the value of paramaters which is "MyAttrValue" in this example. ThanksMahmoud Elsayed

View more...

OAF :Formatting DateTime Fields

Aggregated on:

Use the following code to format DateTime feilds in OAFOAWebBean departureDateBean = webBean.findChildRecursive("DepartureDate");OANLSServices nls = pageContext.getOANLSServices();oracle.cabo.ui.validate.Formatter formatter =     new OADateValidater(nls.getUserJavaDateFormat() + " HH:mm",                         nls.getUserRRRRJavaDateFormat() + " HH:mm");                        departureDateBean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, formatter); Thanks

View more...

OAF : Bundled Exceptions

Aggregated on:

Bundled exceptions let you accumulate "peer" exceptions while proceeding with validation, and then display them as a set when you are done. These peer exceptions are grouped in a container exception called a bundled exception.To creat a bundled exception, you first must create a list to which you add exceptions as you encounter them:ArryList peerExceptions = new ArrayList();peerExceptions.add(new OAException(....));peerExceptions.add(new OAException(....));//Raise ExceptionsOAException.raiseBundledOAException(peerExceptions );Thanks

View more...

OAF : Programmatically Add a Parameterized Pop-up

Aggregated on:

To programmatically add a parameterized pop-up to a component , add the following code in processRequest methodStep 1: Create an OAPopupBean   OAPopupBean popupBean1=(OAPopupBean)createWebBean(pageContext,POPUP_BEAN,null,"myPopup1");popupBean1.setID("myPopup1");popupBean1.setUINodeName("myPopup1");popupBean1.setRegion("/oracle/apps/per/xyz/webui/PopupRN");popupBean1.setHeight("130");popupBean1.setWidth("320");popupBean1.setTitle("Popup Title");popupBean1.setParameters("personId={@PersonId}");popupBean1.setType(PARAMETERIZED_POPUP);Step 1: Add popup to item which you want to enable the pop-up, for example "EmpDtlBtn" buttonOAButtonBean empDtlBtnBean = (OAButtonBean)webBean.findChildRecursive("EmpDtlBtn");empDtlBtnBean.setPopupEnabled(true);empDtlBtnBean.setPopupRenderEvent("onClick");empDtlBtnBean.setPopupID("myPopup1");webBean.addIndexedChild(popupBean1);Thanks

View more...

Casting Data Type in Oracle Database

Aggregated on:

CAST function The CAST function converts a value from one data type to another data type.SyntaxCAST ( [ Expression | NULL | ? ] AS Datatype)Note : CAST conversions among SQL-92 data types.The flowing are SQL-92 data typesBOOLEANSMALLINTINTEGERBIGINTDECIMALREALDOUBLEFLOATCHARVARCHARLONG VARCHARCHAR VARCHARLONG VARCHARCLOBBLOBDATETIMETIMESTAMPXMLExamplesSELECT CAST (SYSDATE AS VARCHAR2 (12)) DATE_TO_VARCHAR FROM DUAL;SELECT CAST ('12' AS INTEGER)  STRING_TO_NUMBERIC FROM DUAL;SELECT CAST (NULL AS VARCHAR2 (2)) NULL_TO_STRING FROM DUAL;As CAST only convert among SQL-92 data types, we can not use for example RAW data type.But there are some packages casts to RAW like utl_raw.cast_to_rawSELECT UTL_RAW.CAST_TO_RAW('Mahmoud') FROM DUAL;output is : "4D61686D6F7564"

View more...

OAF : Number Format

Aggregated on:

In OAF, There is not format expression in BC4J like ADF, So you do formatting using controller classes.There are 2 ways to format numbers in OAF  1- Format NumbersWrite this code  in processRequest methodimport oracle.cabo.ui.validate.Formatter;        Formatter formatter =             new OADecimalValidater("###,###,##0.00", "###,###,##0.00");        OAWebBean numericBean = webBean.findChildRecursive("<>");        if (numericBean != null)            numericBean.setAttributeValue(ON_SUBMIT_VALIDATER_ATTR, formatter);2- Format Number using currency format Write this code  in processRequest method        OAWebBean currencyBean = webBean.findChildRecursive("<>");        if (currencyBean != null)            currencyBean .setAttributeValue(CURRENCY_CODE, "USD"); Thanks

View more...

Display Calender in SQL and PLSQL

Aggregated on:

Today I will present how to display calendar specific month from oracle SQL or PLSQL like below imageSo I will present the solution to do thisFirst I will create Object type to handle week days( Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday) CREATE OR REPLACE TYPE WEEK_DAY AS OBJECT (SUN NUMBER (2), MON NUMBER (2), TUE NUMBER (2), WED NUMBER (2), THU NUMBER (2), FRI NUMBER (2), SAT NUMBER (2)); I will create collection to handle table of type WEEK_DAY because calendar view is table of week days. CREATE OR REPLACE TYPE WEEK_DAYS AS TABLE OF WEEK_DAY; I created GET_CLAENDAR function which takes two parameters (Month and year) and it reruns collection of WEEK_DAYS then you can use it to display calendar in SQL or PLSQL. create or replace FUNCTION GET_CLAENDAR (IN_MONTH INTEGER, IN_YEAR INTEGER) RETURN WEEK_DAYSIS LD$MONTH DATE; LN$INDEX PLS_INTEGER := 1; LT$WEEK_DAYS WEEK_DAYS; CURSOR LCUR$DAYS (IN_DATE DATE) IS SELECT SUN, MON, TUE, WED, THU, FRI, SAT FROM ( SELECT TO_CHAR (DT + 1, 'iw') WEEK, MAX ( DECODE (TO_CHAR (DT, 'd'), '1', TO_CHAR (DT, 'fmdd'))) SUN, MAX ( DECODE (TO_CHAR (DT, 'd'), '2', TO_CHAR (DT, 'fmdd'))) MON, MAX ( DECODE (TO_CHAR (DT, 'd'), '3', TO_CHAR (DT, 'fmdd'))) TUE, MAX ( DECODE (TO_CHAR (DT, 'd'), '4', TO_CHAR (DT, 'fmdd'))) WED, MAX ( DECODE (TO_CHAR (DT, 'd'), '5', TO_CHAR (DT, 'fmdd'))) THU, MAX ( DECODE (TO_CHAR (DT, 'd'), '6', TO_CHAR (DT, 'fmdd'))) FRI, MAX ( DECODE (TO_CHAR (DT, 'd'), '7', TO_CHAR (DT, 'fmdd'))) SAT FROM ( SELECT IN_DATE - 1 + ROWNUM DT FROM DUAL CONNECT BY LEVEL <= LAST_DAY (IN_DATE) - IN_DATE + 1) GROUP BY TO_CHAR (DT + 1, 'iw')) ORDER BY TO_NUMBER (WEEK);BEGIN LT$WEEK_DAYS := WEEK_DAYS (); LD$MONTH := TO_DATE (IN_MONTH || '-' || IN_YEAR, 'MM-RRRR'); FOR LREC$DAYS IN LCUR$DAYS (LD$MONTH) LOOP LT$WEEK_DAYS.EXTEND; LT$WEEK_DAYS (LN$INDEX) := WEEK_DAY(LREC$DAYS.SUN, LREC$DAYS.MON, LREC$DAYS.TUE, LREC$DAYS.WED, LREC$DAYS.THU, LREC$DAYS.FRI, LREC$DAYS.SAT); LN$INDEX := LN$INDEX + 1; END LOOP; RETURN LT$WEEK_DAYS;END GET_CLAENDAR;Now after finishing creating needed objects let's test the function and see output.Test in Oracle SQLI will display calendar of June 2012 SELECT * FROM TABLE (GET_CLAENDAR (6, 2012)); Test in Oracle PLSQL DECLARE LT$WEEK_DAYS WEEK_DAYS; BEGIN LT$WEEK_DAYS := GET_CLAENDAR (6, 2012); DBMS_OUTPUT. PUT_LINE ( 'Sun' || CHR (9) || 'Mon' || CHR (9) || 'Tue' || CHR (9) || 'Wed' || CHR (9) || 'Thu' || CHR (9) || 'Fri' || CHR (9) || 'Sat'); FOR I IN LT$WEEK_DAYS.FIRST .. LT$WEEK_DAYS.LAST LOOP DBMS_OUTPUT. PUT_LINE ( RPAD (LT$WEEK_DAYS (I).SUN, 3, ' ') || CHR (9) || RPAD (LT$WEEK_DAYS (I).MON, 3, ' ') || CHR (9) || RPAD (LT$WEEK_DAYS (I).TUE, 3, ' ') || CHR (9) || RPAD (LT$WEEK_DAYS (I).WED, 3, ' ') || CHR (9) || RPAD (LT$WEEK_DAYS (I).THU, 3, ' ') || CHR (9) || RPAD (LT$WEEK_DAYS (I).FRI, 3, ' ') || CHR (9) || RPAD (LT$WEEK_DAYS (I).SAT, 3, ' ')); END LOOP; END; The output in DBMS Output ConsoleThanks

View more...

ADF ::: Creating View Criteria Programmatically

Aggregated on:

We can add view criteria programmatically at run-time to ViewObject. So that we not only depend on Design View Criteria.The following is an example used to create View Criteria in Application Module Impl ViewObject empVO= this.findViewObject("EmpVO");ViewCriteria vc = empVO.createViewCriteria();ViewCriteriaRow vcRow = vc.createViewCriteriaRow();// ViewCriteriaRow attribute name is case-sensitive.// ViewCriteriaRow attribute value requires operator and value.// Note also single-quotes around string value.ViewCriteriaItem enameItem= vcRow.ensureCriteriaItem("Ename");enameItem.setOperator("=");enameItem.getValues().get(0).setValue("Mahmoud Elsayed");vc.add(vcRow);empVO.applyViewCriteria(vc); Thanks

View more...

ADF ::: Handle af:query search Button Programatically

Aggregated on:

The following code snippets is to execute search button in ADF Query search button programmatically without interact from User    public void onQueryListener(QueryEvent queryEvent) {        // Add event code here...        try{        FacesContext fcsCtx = FacesContext.getCurrentInstance();        ELContext elCtx = fcsCtx.getELContext();        ExpressionFactory expFactory = fcsCtx.getApplication().getExpressionFactory();        MethodExpression mthdExp =            expFactory.createMethodExpression(elCtx, "#{bindings.EmpVOCriteriaQuery.processQuery}", null,                                              new Class[] { queryEvent.getClass() });        mthdExp.invoke(elCtx, new Object[] { queryEvent });        }        catch(Exception e){            e.printStackTrace();        }    }Thanks

View more...

OAF : NewRowState of New Rows

Aggregated on:

By default, entity objects are created with the row state of STATUS_NEW, and BC4J adds them to its validation.  In this case, any event that triggers a validation or database post sequence includes these entity objects.As per OAF Model Coding Standards, always circumvent this behavior by explicitly calling the setNewRowState(STATUS_INITIALIZED) method on its containing ViewRowImpl immediately after you insert the newly created row. This sets the state of any associated entity objects to STATUS_INITIALIZED.When you do this, BC4J removes the corresponding entity objects from the transaction and validation listener lists, so they will not be validated or posted to the database. As soon as the user makes a change (an attribute "setter" is called), the entity object's state changes to STATUS_NEW, and BC4J returns it to the validation/post lists. You can also call setNewRowState(STATUS_NEW) on the ViewRowImpl to change the state manually at any time. Let's trace some scenarios  Scenario 1: Row has been modified in the UI before submit. Row State could be anything. The RowState becomes New. ValidateEntity will get called before processFormRequest().Scenario 2: Called row.setNewRowState(Row.STATUS_NEW) after inserting a new row. Row has not been modified from UI.  ValidateEntity will not get called before processFormRequest() but will get called on commit and postChanges. Scenario 3: Called row.setNewRowState(Row.STATUS_INITIALIZED) after inserting a new row. Row has not been modified from UI. ValidateEntity will not get called before processFormRequest() or on commit or postChanges.The Row will be ignored by the Framework and removed from the Cache.Even the mandatory fields in the Entity Object are not checked.Please make sure setting the row state (Row.setNewRowState) should be done after adding the row to VO as recommended in the OAF Standard.Thanks

View more...

OAF: Parameters

Aggregated on:

Oracle Application Framework (OAF) can pass parameters between pages and there are three types of parameters1- RequestThe scope of request parameters is finalized after  HTTP request.Examples of Request ParametersURL ParametersInput Bean values (Message Text Input, Choice , Check etc) and Hidden Field Values (form values) in case of postEvent triggering bean and the action in case of post.Request values are accessed using OAPageContext.getParameter() method.2- TransactionTransaction has wider scope than Request which finalize with ending of database transaction.You can create transaction parameter using OAPageContext.putTransactionValue() , ((OADBTransactionImpl)getTransaction()).putValue() .Get transaction parameter values using OAPageContext.getTransactionValue() , ((OADBTransactionImpl)getTransaction()).getValue()3- SessionSession has wider scope than Transaction which his life time is until user log out from application.You can create Session parameter using OAPageContext.putSessionValue() ,  OAPageContext.putSessionValueDirect() . Get transaction Session values using OAPageContext.getSessionValue(); URL Parameters Encryption and EncodingWe can encrypt parameters when  passing in URL in the following formats1- {@Attr}  encodes. Changes Mahmoud Elsayed to Mahmoud %Elsayed 2- {!Attr} encrypts parameter value, Get parameter value in Controller using OAPageContext.getDecryptedParameter() 3- {$Attr} plain token substitution (no encoding or encryption), Get parameter value in Controller using OAPageContext.getParameter()  Global parameters in URL1- {@@RETURN_TO_MENU}  Used for E-Business Suite Personal Home Page. Same as OAWebBeanConstants.RETURN_TO_MENU_URL.2- {@@RETURN_TO_PORTAL} - Return the user to a launching Portal page. Same as OAWebBeanConstants.RETURN_TO_PORTAL_URL.Thanks

View more...

ADF & OAF ::: Missing IN or OUT parameter

Aggregated on:

If the bind variable required property wrongly defined into View Object, then it will cause following exception"java.sql.SQLException: Missing IN or OUT parameter at index:: 1 "To avoid this exception, you have to keep in mind when you are creating bind variable. 1- If you are directly passing the bind variable in view object main query then in this case bind variable require property should be selected. 2- If you are using bind variable in view criteria only  then in this case the bind variable require property should not be selected. Thanks

View more...

Unlocking Business Insights By Analyzing API Payloads

Aggregated on:

APIs are now the de facto way businesses can break down corporate silos by enabling data sharing across both internal departments and external customers and partners. According to Cloud Elements, over 50% of B2B collaboration now happens over APIs and is continuing to grow. Your business can deploy APIs to deliver additional value to partners and customers by enabling them to connect your services programmatically to enable automation and data sharing. At the same time, your business can build new products and services by piecing together a collection of APIs from other companies. APIs are becoming the de facto digital supply chain for modern enterprises connecting vendors to customers. Because of this, the data flowing through your APIs is a good representation of the health of your business. Yet, there is a lack of tooling around leveraging this data.

View more...

Automated Acceptance Testing With Robot Framework

Aggregated on:

Robot Framework is an open source test automation framework. It is keyword driven and therefore very suitable to describe and automate acceptance tests. In this post, we will introduce Robot Framework and dive into the basic concepts. 1. Introduction Robot Framework knows its origin at Nokia Networks, but has been open sourced since 2008. It is a framework for creating automated acceptance tests. Test scripts written with Robot Framework are keyword driven, making them very readable and understandable for everyone (assuming best practices are being used). Whether you are creating Test Cases based on Test Designs or based on User Story acceptance criteria, a Robot Framework test script will be your Test Case documentation and automated test script in one. Besides that, it is written in plain text and therefore very suitable for adding them to your version control system (like Subversion or Git). Get rid of all those tests described in Excel Workbooks! After running your test script, a test report is automatically generated, which gives you your test evidence.

View more...

Deploy Ambassador Edge Stack on Kubernetes with Platform9

Aggregated on:

Ambassador Edge Stack is an open-source tool designed to function as a Swiss army knife of sorts for traffic between your Kubernetes clusters and the rest of the world. Ambassador offers Envoy-based ingress control, an API gateway, load balancing, and more through a single tool, allowing teams to reduce the number of individual components they need to install and support, in order to manage application traffic. Ambassador also offers the advantage of being truly Kubernetes-native: It is configured using Kubernetes annotations and declarative configurations. It supports advanced API-management features like rate-limiting and circuit-breaking, as well.

View more...

Using JdbcTemplate With Spring Boot and Thymeleaf | Spring Boot Tutorial

Aggregated on:

In the video below, we take a closer look at Using JdbcTemplate with Spring Boot and Thymeleaf. Let's get started!

View more...

Agile Movers and Shakers (6): Christiaan Verwijs and Barry Overeem

Aggregated on:

Today we welcome Christiaan Verwijs and Barry Overeem. Christiaan and Barry are both Professional Scrum Trainers (PST) with Scrum.org, dedicated early adopters of Liberating Structures, and co-authors of the upcoming Zombie Scrum Survival Guide. Christiaan Verwijs

View more...

Configure DataSource Using JNDI Using Tomcat 9 Server: Spring Boot Tutorial

Aggregated on:

In the video below, we take a closer look at SpringBoot Configure DataSource Using JNDI with Example using Tomcat 9 Server. Let's get started!

View more...

10 Node.js Security Practices

Aggregated on:

Web application security is rapidly becoming a major concern for companies as security breaches are becoming expensive by the day. The Open Web Application Security Project (OWASP) is a non-profit organization dedicated to web security. OWASP has put together a regularly updated list of the top ten web application security risks. In the course of this article, we will examine the ten secure practices in Node.js which are in line with the OWASP top 10 web application security risks.

View more...

AMQ Streams With Kafka Connect on Openshift

Aggregated on:

Have you ever heard about AMQ Streams? It is a Kafka Platform based on Apache Kafka and powered by Red Hat. A big advantage of AMQ Streams is that as all Red Hat tools, it is open source.  This article's about a common feature of Apache Kafka, called Kafka Connect. I'll explain how it works with OpenShift.

View more...

Corvid by Wix: Event Handling of a Repeater Item

Aggregated on:

At first sight, adding event handling for repeated items looks easy. You just handling events of repeated items inside Repeater loop methods there you have all needed data and scope with selector $item(). JavaScript x 12   1 $w("#repeater").onItemReady(($item, itemData, index) => { 2   // it look easy 3   $item("#repeatedButton").onClick((event) => { 4     // we have all we need 5     console.log( 6       $item("#repeatedContainer"), 7       itemData, 8       index, 9     ); 10   }); 11 }); 12 What's wrong with this approach?

View more...

Angular: Advanced Tips and Best Practices for Experts and Beginners

Aggregated on:

I wrote this article and included some best practices, pitfalls, info, and ' what to look out for' when building an Angular application. A lot of these had been personal experiences and lessons learned the hard way. Also, it was really difficult to create this list, keep it short and simple since I wanted to add stuff for beginners and experts.  Try to follow what Angular recommends: don't do things your way Since you're using Angular, you should follow what the creator suggests and not do things your way. This goes for most opinionated frameworks, not just Angular. 

View more...

CDI (Part 1): Factory With @Produces

Aggregated on:

Hello! This is the Part 1 of the CDI Series in Java that contains:

View more...

3 Ways to Continue Using ASK CLI 1.x With the New ASK CLI 2.x

Aggregated on:

At the time of this writing, the ASK CLI 2.6.0 has just been released. Along with it comes a fair bit of breaking changes the extend of which can be seen in this migration guide.  This has caused a fair bit of challenge in the community especially for developers who have multiple skills prior to ASK CLI 2.x being introduced. A lot of automation tools would also have to be rewritten and some even have no viable workarounds when using 2.x. The VSCode extension functionality that allows convenient ASK CLI support is also broken. 

View more...