DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

The Latest Software Design and Architecture Topics

article thumbnail
Mixing Swing and Native Components
Bringing Together Various Components There are situations in which it may be to the benefit of a programmer or other computer user to look at bringing together native components of a system with swing components. These are components that they have either created on their own accord or components that they have brought over from another service. Either way, combining the native components that already exist in a system with swing components is a great way to achieve some surprising results. You might want to think about giving this a try if you are thinking about how you can bring your talents up to date for use in the world as it is today. DJ Native Swing is a nice solution to embed native components (Web Browser, Flash Player, etc.). There was still a general issue that this library did not resolve though: the possibility to mix heavyweight and lightweight components with lightweight components on top, to change their Z-order or re-parent them. Fortunately, The release 0.9.3 offers interesting advances in this area. Using these features is as simple as changing some options before instantiating native components, in order to extend their behavior. You can try all the features (including the new options) with the Webstart Demo: http://djproject.sourceforge.net/ns/DJNativeSwingDemo.jnlp The Webstart demo is configured to work on Windows. It also works on Linux (GTK, x86/i386) where XULRunner is installed. Note that this demo is part of the release package. Run Tests on Every Component It is a good idea to run a demo of any components that you think you might want to put together. The reason for this is that you need to make sure those components will work for you as you anticipate that they will. This is far from a guarantee, and that is why you are called upon to pay careful attention to the things that you are running through these systems. It is entirely possible that you might find some errors that you made along the way when you are checking out the system to see where you went wrong. There is nothing bad about looking over something and realizing that you still have some room to grow and figure things out. As a matter of fact, this is a great way to grow as a person and as a programmer. You cannot begin to take steps in the right direction if you don't figure out where you can improve upon the decisions that you have made before. In my opinion, this gets us one step closer to proper native integration. What do you think? Have you got any comments or suggestions? Mixing Things Up for a New Creation Believe it or not, one of the best things that you can do to mix things up and keep your creations fresh is to look at how you can combine native components with the swing components that you bring into the system. It is a way for you to show the people who will ultimately use your creations that you are serious about making something that they stand to benefit from. If that is the kind of thing that you are into, then you need to give it a try right now. After all, there may be a tremendous number of people just waiting to see what you are all about and what you can offer to them. If you provide them with things to get excited about, then they will keep coming back for more. -Christopher
Updated July 24, 2022
by Christopher Deckers
· 20,907 Views · 2 Likes
article thumbnail
Hack OpenJDK with NetBeans IDE
You've come to the right spot if you are trying to hack OpenJDK with NetBeans IDE. This article explains what OpenJDK with NetBeans is and how you can use NetBeans to create OpenJDK. But before we dive in, first things first: What are Hack OpenJDK and NetBeans IDE? Open Java Development Kit (JDK) is an open-source implementation of the Java Platform or Standard Edition. That means anyone can access the source code and GNU General Public license of the OpenJDK. You may also ask, "then what is Netbeans?" NetBeans is also an open-source integrated development environment for developing with Java, PHP, C++, and other programming languages. All THE applications are developed modules in Java. The OpenJDK repository contains a NetBeans project for all C/C++ parts of the OpenJDK, including Hotspot. So, since NetBeans is an Apache project, it is pretty easy to download and hack the code. You can run it on operating systems like Windows, Linux, and macOS. Remember, to use NetBeans for Java programming; you first need to install Java Development Kit (JDK). Can I use NetBeans with OpenJDK? Yes, you can. The latest NetBeans version of NetBeans is at NetBeans IDE 6.0 Beta 1. But keep this in mind, to hack OpenJDK, you'll need only the Java SE version. Which JDK is compatible with NetBeans? The JDK is compatible with JDK 8 features. That includes annotations, compact profiles, lambda expressions, and repeatable. When you use any of those constructs in your code, they will automatically highlight errors and allow you to fix syntax. Review, Hacking, and Develop OpenJDK. You follow these simple: Get OpenJDK, as follows: #hg clone http://hg.openjdk.java.net/jdk8/build jdk_trunk #cd jdk_trunk #sh get_source.sh #mkdir build #cd build #sh ../configure. After you’ve "configured", the step is complete, remember the value assigned to "Boot JDK" and then:#export IDE_ALT_BOOTDIR=jdk_path_found_by_configure #netbeansStart NetBeans IDE (with C++ support) and open projects from "common/nb_native". Just make sure that the project already contains configurations for Solaris, Linux, and macOS. You can do this by switching to the appropriate configuration and enjoying hacking OpenJDK. Next up, navigate inside your NetBeans project directory. Once there, you will find a directory called incubator-Netbeans. This directory contains sufficient NetBeans modules. Is OpenJDK with NetBeans IDE secure? As the emphasis increases, so does the need for security. Hence, you can easily create the Secure Directories. You can do this by choosing File > New Project (Ctrl-Shift-N), selecting Web Application from the Java Web category, and clicking Next. Regression testing verifies that system changes do not interfere with existing features or code structure. They are part of almost every test suite in software development lifecycles. It is common for developers to change or add a code section and unintentionally disrupt something that is working just fine. Visual regression testing functions on the same logic but confines it to the visual aspects of the software. It works by comparing two images and automating complicated scenarios, like when we cannot identify the elements in the DOM tree. However, visual regression can be used on any website. How Does Visual Regression Testing Work? During the first run, the visual comparison tool captures the snapshot called the base image. The subsequent run compares the base image if there is no difference test is passed, and if there is a difference, the test is considered as failed. Visual regression is also called visual comparison testing. In this tutorial, we will discuss automated visual regression using Playwright. Prerequisites for Visual Regression with Playwright Download and install NodeJS Download and install Visual Studio Code (Recommended) Install Playwright NPM module Install @playwright/test module Note Throughout this tutorial, we are using Playwright with JavaScript. Playwright comes with the default visual comparison tool, so there is no need to install additional packages. Create Simple Visual Comparison Tests Using Playwright In your tests folder, create a new JavaScript file example demo.spec.jspage.screenshot() function takes the screenshot, and expect in the @playwright/test module provides the assertion for matching the images that are .toMatchSnapshot(). Inside the newly created JavaScript file, create a new test that performs the visual comparison like below. Visual Comparison in Playwright to Ignore Minor Differences The above comparison technique matches the screenshot pixel by pixel, which means each pixel should match exactly. This behavior can be modified by passing the argument maxDiffPixels = . Example JavaScript const { test, expect } = require('@playwright/test'); test('Visual Comparison Test Demo', async ({ page }) => { await page.goto('https://playwright.dev'); expect(await page.screenshot()).toMatchSnapshot({ maxDiffPixels: 200 }); }); In the above example, we have specified the maxDiffPixels value as 200, which means the maximum pixel difference can be 200. Image Comparison in Playwright With Threshold Option Playwright toMatchSnapshot() accepts threshold, threshold ranges from 0 to 1, default value is 0.2. The threshold is tolerance of image differences. Example Code JavaScript const { test, expect } = require('@playwright/test'); test('Visual Comparison Test Demo', async ({ page }) => { await page.goto('https://playwright.dev'); expect(await page.screenshot()).toMatchSnapshot({threshold:0.5}); }); In the above code, the threshold is mentioned as 0.5. Playwright Visual Comparison Tips and Tricks In Playwright, we can pass the image file name; instead of default comparison, Playwright compares with the specified filename. Example expect(await page.screenshot()).toMatchSnapshot('home.png'); Playwright also allows us to compare element snapshots; we can take a snapshot of DOM elements and compare. Example expect(await page.locator('xpath=//*[@id="__docusaurus']).screenshot()).toMatchSnapshot(); Visual Regression With Playwright Using Percy Percy is a web-based tool for visual testing with a free tier, and it provides both manual and automation capability for visual comparison. Percy supports Playwright integration. Percy is now a part of Browserstack. If you already have a BrowserStack account, you can sign in with BrowserStack or sign up and create one. Using Percy With Playwright Step 1 – Install Percy modules using the following command. npm install --save-dev @percy/cli @percy/playwright Step 2 – Create a new JavaScript Playwright test file like below. JavaScript //demo.spec.ts const { chromium } = require('playwright'); const percySnapshot = require('@percy/playwright'); (async () => { const browser = await chromium.launch(); const page = await browser.newPage(); await page.goto('https://www.browserstack.com/', { waitUntil: 'networkidle' }); await percySnapshot(page, 'Example Site'); await browser.close(); })(); In the above example, we are navigating to https://www.browserstack.com/, and we are taking a snapshot using the percySnapshot() function. Setting Up Percy Step 1 – Login to Percy. If you don’t have an account, create one. Step 2 – Create a new project. Step 3 – Copy Percy token. Step 4 – In your Visual Studio Code Terminal, set the PERCY_TOKEN environment variable using the below commands: Powershell / Visual Studio Code Terminal $env:PERCY_TOKEN = "your_token"
July 24, 2022
by Vladimir Voskresensky
· 17,019 Views · 2 Likes
article thumbnail
Silverlight Application Makes it Easier to Set Up Child Safety Controls and More
Child controls on Windows Smartphone 7 are a big deal to a lot of people. The amount of data, information, and even adult materials that a child could have access to if on an unsecured phone is beyond what most parents are willing to risk. The Silverlight application makes it easier to view a complete list of the various child controls that one may decide to add to their Windows phone to keep it safe. After all, you never know when your child may get their hands on your phone and see things that you don't want them to have access to. ListBox Allows Me to Display Child Controls Usually, I am using ListBox control in my Windows Phone 7 Silverlight applications to display a scrollable list of child controls. ListBox offers UI virtualization, which means that UI is loading ListBox items on demand to increase the performance and reduce memory allocation. One of the main keys to that is in using VirtualizingStackPanel as ItemsPanel Template for ListBox control. Lately in one of my Windows Phone 7 projects I had to replace ListBox with ItemsControl, but ItemsControl does not offer UI virtualization for child items by default, so I had to add the same VirtualizingStackPanel to ItemsPanelTemplate element. Also I have modified the Template element to be able to add and access ScrollViewer for ItemsControl. View Everything in One Space VirtualizingStackPanel makes it easier to see everything on one screen so you can rest assured that nothing is slipping through the cracks. You don't want to leave any open security holes on your phone that your child may figure out a way to exploit. Unfortunately, many children are quite good at getting around security features that you have set up for them, and that is why you need to use VirtualizingStackPanel to review everything on your phone and make sure it is locked down. Now, you need to understand that this feature is not only useful for creating child security locks on your phone, but for many other purposes as well. You might want to breeze through and review other settings on your phone to ensure that you have it all set up optimally. After all, you don't want to waste time dealing with a phone that is not set up in the best way possible. What Type of Child Controls Are Available Via ListBox for Windows 7 Phones? Concerned parents everywhere will ask themselves what kind of controls they can expect to have over their Windows 7 phone when setting it up for their children to use. On the one hand, they know that their children will want to use their phones, and they don’t want to deny them the ability to delight in the technology that so many of the rest of us also enjoy every day. On the other hand, they are concerned parents who worry about what kind of things their children could be exposed to. The Windows 7 phone has numerous options that allow a parent to filter out things that they don’t necessarily want their children to see. A few of the popular controls that parents often set up for their children include: A block on inappropriate/adult websites A block on online gaming websites A timer that limits how long the child may use the phone These are all key features of the Windows 7 parental controls that are worth paying attention to. The reason is that children may be exposed to more from the outside world than you ever intended. Not only could they see inappropriate content, but they could get hooked on some of the online games that exist today. Those games are meant to be highly addictive by nature so that people will continue playing. However, this also poses a risk to children who may get exposed to too many stimuli from these games too early in their life. If that happens, then it may not be easy to peel away from those games. You certainly don’t want to take a risk like that with your child, and that is why you need to put a limit on the amount of time that they are able to view your screen on your phone. They need to take some time away from those screens in order to develop as people, and it is a lot better to use a program that will automatically cut them off from the online games that just want them to keep playing. How Do You Get Around Child Locks for Yourself? The other thing to keep in mind when using the software programs that are available to you for creating child locks on your phone is that you will need to circumvent those locks for yourself. You will still want access to the websites that you want to go to when your child doesn’t have your phone. Thus, you should make sure you are well-versed in how the Silverlight application works before you go to install it on your phone. Many people jump the gun too fast and try to get a program like this on their phone because they are so worried about their children being on the Internet and what it could mean for their safety. It is noble that people want to keep their children safe, but it is also responsible to want to make sure your phone is protected from the possibility of not having access to the full Internet that you may require at some point. You can, and should, install a backup password that you can use to get around any and all child locks that you put in place. Doing so will put you in the best position to get around the child lock and temporarily disable it while you use your phone as you normally would. The only thing to keep in mind is that you will need to put the child locks back on your phone once you are done using it and before you give it to your child. Once the locks are disabled, they won’t go back up unless you instruct them to do so via your phone. Many people have used child locks to keep their children from being exposed to material that they don’t want them to see too early in life. You may feel the same way, and it may be time for you to take direct action to ensure that your children are subjected to material that you wholeheartedly disagree with them seeing.
July 24, 2022
by Jevgeni Tšaikin
· 10,810 Views · 1 Like
article thumbnail
Distributed Tracing for Microservices on Elastic (ELK Stack)
Let's explore distributed tracing for microservices on the ELK stack.
July 24, 2022
by Bharathwaj Jeganathan
· 14,584 Views · 4 Likes
article thumbnail
Kubernetes Requests and Limits Demystified
We will look at basic resource configuration options and ways to think about tradeoffs between the cost and performance of your containerized apps.
July 24, 2022
by Erwin Daria
· 3,710 Views · 1 Like
article thumbnail
The Database as Code Landscape
From benchmark schema migration tools to new products embracing the idea of "database as code," let's break down the current landscape and explore the trends.
July 24, 2022
by Tianzhou Chen
· 4,618 Views · 2 Likes
article thumbnail
Securing Your Cloud with Zero Trust and Least Privilege
Zero trust could be the solution for your modern security perils. Read on to discover what zero trust and least privilege are — and how to get started.
July 24, 2022
by Diane Benjuya
· 5,182 Views · 1 Like
article thumbnail
The Open Source Way to Rightsize Kubernetes With One Click
Overprovisioned Kubernetes workloads are a growing concern for developer teams, particularly as budget efficiency becomes more important. This article walks through an open source way to avoid overprovisioning Kubernetes workloads with a single click.
July 23, 2022
by Saiyam Pathak
· 8,297 Views · 3 Likes
article thumbnail
Publish/Subscribe Architecture Design Pattern With RabbitMQ Using Mule Application
In this article, we will demonstrate how to implement Mule applications with Pub/Sub design patterns using RabbitMQ as a message queuing broker.
July 23, 2022
by Penchala Ramesh Batta
· 7,248 Views · 2 Likes
article thumbnail
23 Docker Security Tools Compared
Discover and compare more than 20 Docker security tools, choose the best for your team, and learn how to implement them.
Updated July 22, 2022
by Mateo Burillo
· 15,634 Views · 3 Likes
article thumbnail
CI/CD Pipelines and Caching of Dependencies on Azure DevOps
Follow a brief explanation of CI/CD and how to implement caching of Maven dependencies in the pipelines while deploying your Mule application to CloudHub.
July 22, 2022
by Rahul kumar
· 12,895 Views · 6 Likes
article thumbnail
API Security Weekly: Issue 170
Discover benefits of a DevSecOps approach to API security, API vulnerabilities at F5, trends in API integration, bot attacks on APIs on the rise, and more.
July 21, 2022
by Colin Domoney
· 5,333 Views · 1 Like
article thumbnail
Conversion Rate Optimization Strategies
This article will discuss how to increase your website's overall conversion rate, as well as boost your email subscriptions or product purchases.
July 21, 2022
by ali Tariq
· 5,709 Views · 1 Like
article thumbnail
Spring Boot Performance Workshop With Vlad Mihalcea
Learn how to improve the performance of a Spring application and diagnose problems in production: lessons from our live workshop covering JPA.
July 21, 2022
by Shai Almog DZone Core CORE
· 5,689 Views · 4 Likes
article thumbnail
Learn How To Use DynamoDB Streams With AWS Lambda and Go
This blog post will help you get quickly started with DynamoDB Streams and AWS Lambda using Go. It will cover how to deploy the entire solution using AWS CDK.
July 21, 2022
by Abhishek Gupta DZone Core CORE
· 35,236 Views · 4 Likes
article thumbnail
Invoking an AWS Lambda Function During a CDK Deployment
Custom Resources in AWS CDK are powerful and give you much flexibility. You can leverage the Provider framework when you need more than a single API call.
Updated July 20, 2022
by Jeroen Reijn DZone Core CORE
· 3,944 Views · 2 Likes
article thumbnail
Developing a Multi-Cluster-Friendly Kubernetes Operator
Learn how to build a multi-cluster-friendly Kubernetes Operator. By taking the K8ssandra Operator – to run Cassandra on Kubernetes – as an example.
July 20, 2022
by Sylvain Kalache
· 5,549 Views · 1 Like
article thumbnail
How to Host a Static Website on AWS With S3, CloudFront, Route53 and Terraform
Deploy a website on AWS using S3, CloudFront and Route 53 as the main services and Terraform as the infrastructure as code deployment tool.
July 20, 2022
by Faizan Raza
· 4,159 Views · 4 Likes
article thumbnail
5 Options for Deploying Microservices
Microservice applications can run in many ways, with different tradeoffs and cost structures. Let’s go over the 5 main ways we can deploy microservices.
July 20, 2022
by Tomas Fernandez
· 9,726 Views · 6 Likes
article thumbnail
Should You Invest in a Digital Transformation Office?
With so much at stake when it comes to transforming an organization, Sabine Laute suggests that a dedicated transformation office could be a solution.
July 20, 2022
by David Brown DZone Core CORE
· 5,593 Views · 3 Likes
  • Previous
  • ...
  • 377
  • 378
  • 379
  • 380
  • 381
  • 382
  • 383
  • 384
  • 385
  • 386
  • ...
  • Next
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook
×