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
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

The Latest Tools Topics

article thumbnail
AWS, Azure, and GCP: The Ultimate IAM Comparison
AWS vs Azure vs GCP - how do these cloud providers compare when it comes to IAM? Read on to find out.
July 25, 2022
by Diane Benjuya
· 4,019 Views · 1 Like
article thumbnail
Create a Minimal Web API With ASP.NET Core and Publish To Azure API Management With Visual Studio
Follow this tutorial to learn how to create a minimal Web API with .NET CLI and Visual Studio 2022 to publish it on Azure Web App and API management.
July 25, 2022
by Hamida Rebai
· 6,319 Views · 2 Likes
article thumbnail
Deploy ECR-Based AWS Lambda
Let's see how to deploy an ECR image-based Lambda onto the AWS Console.
July 25, 2022
by Tushar Mathur
· 5,788 Views · 2 Likes
article thumbnail
Comparison: JMS Message Queue vs. Apache Kafka
This article explores the differences, trade-offs, and architectures of JMS message brokers and Kafka deployments.
July 24, 2022
by Kai Wähner DZone Core CORE
· 4,816 Views · 6 Likes
article thumbnail
Understand the Root Cause of Regressions With Git Bisect
Your git fairy godmother will test and locate the bugs for you with a swish of her magic wand. All you need to know are the magic words: git bisect.
July 24, 2022
by Shai Almog DZone Core CORE
· 6,447 Views · 2 Likes
article thumbnail
Integrating With Jira APIs in Python
Connecting to Jira in Python.
July 24, 2022
by Dariusz Suchojad
· 4,528 Views · 1 Like
article thumbnail
How to Migrate MongoDB to Kubernetes
Percona Product Manager Sergey Pronin demonstrating how to migrate MongoDB to Kubernetes.
July 24, 2022
by Sylvain Kalache
· 6,719 Views · 2 Likes
article thumbnail
Set Conditional Breakpoints in IDEA
What I really wanted to do was set a breakpoint and examine the state of the objects at runtime.
Updated July 24, 2022
by Matt Stine
· 31,084 Views · 2 Likes
article thumbnail
NetBeans Platform Offshore
Netbeans Platform Offshore has received an increased amount of attention given the massive amount of attention placed on the supply chain crisis that has occurred all throughout the world in recent years. Modern ships rely on NetBeans Platform Offshore and similar technologies to help guide them where they need to go. Thus, the world's reliance on Netbeans Platform Offshore could not be more obvious at this time. Better Software Systems Onboard Ships Make Them More Reliable Cargo ships and other naval vessels are very delicate pieces of equipment that can be easily disrupted by a malfunctioning piece of software equipment. If something goes wrong with the Netbeans system onboard, then a ship can be routed in the completely wrong direction from where it was intended to go. Obviously, the world of global commerce simply cannot allow for this to happen, and companies are responding to the need. Software Can Help Maintain Crew Safety Netbeans is being relied upon more than ever for crew safety at this point. After a review of all known marine system models, the Netbeans system was built to incorporate all of the best parts from each system to help promote safe passage and crew safety while on board the ship. At the same time, developers had to ensure that the enhanced security features would not hinder the ship from going where it needed to go. After all, the world of commerce moves faster than ever before these days, and there is no way that slowing the ship too much would be permitted by the companies that own and operate these vessels. They care about their profits and bottom line, and they wouldn't want to give those up too much. Modern ships and rigs have advanced computer systems for dynamic positioning, power generation and distribution, and drilling operations. Software errors in these systems lead to delays and non-productive time, and compromise safety. Marine Cybernetics performs independent testing and verification of computer system software to detect and eliminate such errors and weaknesses using Hardware-In-the-Loop (HIL) testing technology. Centralized Control and Overrides Two important things about the Netbeans system is that it provides both centralized control over the vessel and also allows for human overrides as necessary. If there is ever a situation in which the software program is incorrect in its assumptions or makes an error, humans can jump in and make the necessary corrections to get things right. It is wonderful to see the two things working in tandem, and it provides strong evidence that this is the way forward. Based on our extensive library of marine system models, we build applications and user interfaces for our testers and customers, based on the NetBeans Platform. The modular nature of our simulators and the diversity of test programs and vessel configurations make the NetBeans Platform a natural choice. Coupled with Maven, Hudson and an agile approach to software development, the NetBeans Platform enables us to quickly roll out new applications and adapt to the changing offshore industry. The screenshot above is taken from a Power Plant HIL Simulator, but we also make HIL simulators for Dynamic Positioning, Steering, Propulsion, Thrusters, Drilling Systems, Cranes and other systems. Our database of test programs and procedures is also powered by a NetBeans Platform application. Independently Verified Finally, one more reason to rest easy with the Netbeans system on board is the fact that it has been independently tested and verified. A third-party has been brought in to help ensure that the system is working as designed. That is clearly a very big deal because not every company would be so willing to work with outside auditors to ensure that everything was working as designed, but the makers of Netbeans are perfectly fine with doing exactly that. They want to make sure their systems are the safest and most tested on the planet, and they are not afraid to let another party poke around those systems to discover if this is the case. Continue to check out what Netbeans comes up with next as they are sure to provide the world with very interesting and useful equipment. Could More Useful Onboard Technology Help Supply Chain Issues? Unless you have had your head under a rock for the last several years, you are well aware of the fact that there have been some major supply chain issues that have caused trouble for seaports all throughout the world. Instead of getting things to customers right when they require them, many shipping companies have been woefully behind on getting their shipments to customers as designed. Thus, people are starting to ask if it might be possible to use onboard technology to help get the cargo from ships to where it needs to go much more quickly. Indeed, it does feel like there is some hope that some of the technologies that Netbeans has produced could help prevent some of the hang-ups at ports. This is not to suggest that Netbeans can do it all by itself, but there are plenty of people working on the problem, and it feels like a little extra guidance technology may be exactly what is called for to get the job done. Yes, there are going to need to be even more people hired to keep freight moving where it needs to go, but we cannot forget the fact that there are a lot of people counting on crews to bring their supplies to them in a timely fashion. The best way to reach that goal is to use the most up-to-date technologies in the world to make it happen. Navigation is a must for all shipping concerns, and having the best technologies on board means that one can finally get ships where they need to go. Estimates suggest that literally billions of dollars have been wiped off of the economies of the world because of supply chain issues. The fact that some of this can be remedied by just getting ships where they need to go is a wonderful piece of news for all involved. Tracking Shipping Containers and More Expectations are such that Netbeans may have the ability to track shipping containers and provide other valuable insights into what is going on in the world of shipping. If so, the value that they provide will surely skyrocket. The entire world relies on shipments that are brought to them via the ocean, and any system that can help make that process a bit smoother is going to be lauded as the next great thing when it comes to economic growth and stability. Netbeans is here to help bring that next chapter forward, and we all owe them a debt of gratitude for the work that they are actively doing to help all mankind.
Updated July 24, 2022
by Kristian Aaslund
· 13,779 Views · 1 Like
article thumbnail
JDev Flies on NetBeans
You can put JDev files on NetBeans for brand-new creations.
July 24, 2022
by Jesper Wijngaardt
· 9,452 Views · 1 Like
article thumbnail
NetBeans Platform Control Application for Testing of Cellular Networks
I'm Stefano Chiappa and I'm from Milan (Italy). I work at Prisma Engineering (http://www.prisma-eng.com/) as Lead Software Engineer of the Simulator User Interface Team. AirMosaic is an application on the NetBeans Platform for controling Prisma's UeSIM, which is a multi mobile simulator. The UeSIM is basically a server with some antennas able to connect to a base station and simulate a population of mobiles doing some basic or complex Test Procedures. These procedures can be "real-world" applications such as HTTP, FTP, Mail, VOIP calls or protocol-dependent procedures such as attachment/detachment to the Core Network. Several mobile technologies are supported: LTE/UMTS/GSM. The images below are taken from LTE version. Why VoIP calls are more popular than ever The AirMosaic technology that is used within the Netbeans system is something that is generating a lot of buzz and helping companies get work done that they must surely have believed would take much longer than it has. One area that AirMosaic has come into play very rapidly is in the realm of VoIP calls. VoIP stands for "Voice over Internet Provider", and this refers to the way that many calls are received in the modern office environment these days. A few reasons why office managers prefer VoIP over other options is because: Prices are lower - Generally speaking, the cost of VoIP calls are lower in total. You don't have to pay some of the additional costs that come with international calls or other types of calls when using a VoIP system. Instead, you receive a lower overall cost because the cost is usually a standard and flat rate. VoIP meshes well with existing and emerging technology - VoIP works well with both existing technologies as well as those that are emerging on the scene at this time. Thus, office managers and anyone else who is involved in the phone purchasing process for an office will often find VoIP causes them the fewest headaches as far as combining it with what they already have or what is soon coming down the line. Excellent call quality - It is hard to beat the call quality that you receive with a VoIP system. The calls are crisper, clearer, and provide the consistency that every office is looking for. You really can't go wrong with a VoIP system like this. In the first step a population of mobiles is created. It is possible to edit a huge amount of parameters related to the mobile device hardware and the user subscription related to the SIM. The following image shows the editing of this mobile database, which is performed inside a NetBeans editor and properties window (click to enlarge the images): Once a Mobile population has been created, it is possible to create a scenario (navigator window) where is described what a single or group of mobiles will do. The available test procedures are collected and grouped inside a navigator window on the left bottom side, where you can see some of the available tests: When the scenario has been created, it is possible run it through the UeSIM hardware. This is displayed in the next image: On the upper left side of the image, AirMosaic displays, through some gears, the currently running test. We used a central editor window to display some counters of the running simulation. It is possible to choose the displayed counters by checking a node of the tree on the left side of the window. On the lower side of the application, there is an output window that displays the sequence of events happening during the simulation. Once a scenario has been completed, the scenario window, on the application's top left, shows a green circle to indicate that the test has been completed successfully, as you can see in the next image: Some plots can be drawn for each counter available. It is possible to put different counters on the same plot or on different plots. This is displayed in the next image: At the end of a test, it is possible to generate a report, save it as a PDF, or send it by mail automatically, as shown in image below: This is basically what the application does. Several features are still in development, of course! AirMosaic Runs Simulations For Phone Testing Purposes Did you know that it is important to test the phone systems within your office on a regular basis? You should do so not only because you need to make sure the phones are working so that customers can call in, but also to make sure there aren't any fraudsters trying to take advantage of a vulnerable phone system. Believe it or not, there are fraud cases in which the criminals will attack a phone system set up by a company for their own malicious purposes. Fraudulent calls can ring up huge expenses for companies that are difficult to repay. Obviously, this is not an ideal situation for anyone, and it is best to avoid such scenarios by testing the phones on a regular basis to make sure that there isn't anyone in the system who shouldn't be there. AirMosaic can run sweeping tests of phone systems to try to detect problems like this. What AirMosaic will do is run their sweeping tests to detect any anomalies within the system and alert you to what is going on. They will even let you know if there are phone calls within the system being placed by people who work for you that shouldn't be placed. It would be incredibly challenging to run all of these tests by yourself, and that is why so many are using AirMosaic instead. They see the value of adding a little extra security to their phone systems, and they realize that the only true way to do so is to run a program like this that can detect any problems. Data is Generated That Can be Scanned Finally, AirMosaic produces a list of data on the phones that it has scanned which you can view on your own time. Look over every piece of information that the system found in order to figure out what is going on with the phones that it has identified as perhaps having a problem. AirMosaic is very good at narrowing down the list for you so you don't waste your time trying to go through all of this information on your own. Instead, you rely on AirMosaic to help you out, and then you simply review the data that it discovered in order to get a better idea of what may be happening within your system. By isolating the phones that appear to have a problem, the AirMosaic system makes it easier for you to see which specific phones you will look at and why they may be having some issues. Users sincerely appreciate this because it means that they can finally receive the data that they require to send in their team of IT experts to fix the problem. It takes a little bit of time and effort, but it is worth the trouble when you identify the problem and get people involved who can help. Save your company from the risk of being vulnerable to attack over the phone system. Use AirMosaic to run some tests today.
Updated July 24, 2022
by Stefano Chiappa
· 10,511 Views · 1 Like
article thumbnail
Neo4j 1.8.M03 - Related Coffee
Released back in 2012, Neo4j 1.8.M03 introduced the RELATE clause, a two-step dance of MATCH or CREATE. Also, new Transaction support in the shell lets you call for a do-over in case you misstep. RELATE, a Subgraph Match-Maker A RELATE clause looks a lot like a MATCH clause — the ASCII-art of graph traversals — but behaves differently when there isn't a satisfying subgraph. When there is no match, RELATE will create the needed Relationships and even intervening Nodes. RELATE ensures that the subgraph exists. So, I just fetched myself a coffee. Let's say I want to keep track of how often I visit 3 Bees Coffee. I could carve notches on my desk, but I've already ruined one Ikea desk that way. Being graph-minded, I immediately realize that I'll be curious about deeper questions regarding all the places I visit. I will, of course, evolve a graph mini-app. Neo4j 1.8.M01 introduced the CREATE clause, so I'll create me and the coffee shop: CREATE me = {name:"Andreas"}, `3bees` = {name: "3 Bees Coffee"} (Note the back ticks around 3bees because the term starts with a number) To record that I have visited 3 Bees Coffee, I could add a relationship at the same time: CREATE me = {name:"Andreas"}, `3bees` = {name: "3 Bees Coffee"}, me-[:VISITS]->`3bees` Of course, I will be re-visiting coffee shops more often than going to newly opened shops. I already know about me, and will usually know about the coffee shop, so what I really want to do is just create the Relationship. START me=node(1), coffee=node(2) CREATE me-[:VISITS]-coffee Easy as pie. Mmm pie. Create a record for me, create a record for a shop, and whenever I visit a shop, create a Relationship. Because I want to keep track of the frequency of my visits, I suddenly have a problem: I don't want to create a Relationship every time, but get one if it exists and just update a property on it. Cypher is declarative. There is no spoon, I mean 'IF'. So we turn to our friendly match-making RELATE clause: START me=node(1), coffee=node(2) RELATE me-[v:VISITS]-coffee return v That'll match the VISITS if it exists, or create one if it doesn't. To update the visits, I can convert the RETURN into a WITH to tack on a SET clause like so: START me=node(1), coffee=node(2) RELATE me-[v:VISITS]-coffee WITH v SET v.visits=(v.visits +1) RETURN v OK, one last detail to adjust: the classic initial condition problem. If RELATE happened to create a new Relationship, it won't yet have a visits Property. We'll use COALESCE to ignore v.visits if it is null, then add 1: START me=node(1), coffee=node(3) RELATE me-[v:VISITS]-coffee WITH v SET v.visits=(coalesce(v.visits?,0)+1) return v Ah, now I have even more motivation to take coffee breaks. The RELATE clause is powerful fun. Get yourself a cup of coffee, then sit down to peruse the Neo4j Manual section on Cypher RELATE to learn more. And, check on my coffee consumption in the Neo4j Live console, where you can play around with RELATE. Transactional Shell Prior to this release, every query issued in the Neo4j shell (whether command-line or in Webadmin) created a transaction when needed. Now, you have control over transactions with some new shell commands: begin transaction, commit, and rollback. These let you practice your new Cypher dance moves without worrying about falling on your face and taking your database down with you. As usual, look to the Neo4j Manual for the details. Now that we’ve looked back in time, let’s see what Neo4j can do better than SQL. SQL is an impressive query language but there are things that Cypher handles so much better. Whereas SQL started as a single table query language, support was added later for geospatial data and for XML and JSON as well. XML is primarily used for displaying documents on web pages. It uses customized markup languages that are user-defined. JSON reads data from web servers in order to display it online. When dealing with relational databases which are built on tables, JOINs make the connections. So how does this relate to Neo4j? Well, Neo4j is designed to handle product recommendation engines as well as supply management and personalizing customer experience. And Cypher’s graph query language allows you to extract data from graphs. It’s essentially SQL for graphs. Cypher is easy to use and understand. It’s designed for graphs. It borrows from other languages such as Python and is a powerful, full-featured modern language perfect for data analysts and subject matter experts who need to extract meaningful data by reading and writing queries themselves if need be. You don’t need to be a developer to get the benefits from Cypher. A feature of graph databases is that their searches are schema-free. Or at least optional. By not having a fixed schema you can develop the relationships, add attribute types and develop your data as you go. This provides extreme levels of flexibility when developing applications. SQL Path Patterns Query Using path patterns which is an advanced feature, you can have a product that points to a list of categories. With a deep hierarchy, one which you don’t know the depth of yet, you can insert a “*” to find arbitrary linked relationships right to the root directory. But you can limit it to a set number of relationships as well as categories. This is all easily achieved in Cypher but requires linking together a chain of queries in SQL. Each level must be spelled out in the query to the limit that is needed. A cumbersome and time-intensive process, especially when you don’t necessarily know how many categories you’re going to end up with anyway. Find All Cycles in a Directed Graph If you wish to find loops, where a loop leads back to the same person or thing over again, path patterns will determine the outcome. Using MATCH path = (p:Person)-[*3..10]-(p), one can look for 5 hops ending with the person you started with. Not only is the data available in a table but it can be generated visually. And that in essence is what you get with Cypher; a powerful much more user-friendly tool that is purpose-built to provide graph queries in a format that the user can manipulate to show relationships without being bogged down in endless hours of programming and validation. Combine Reads and Writes If you’re familiar with SQL, you need to support Reads and Writes by using insert statements or insert from select. Unfortunately, that’s where it ends. Cypher does the heavy lifting and combines reads and writes in a single query. So, you can update the database while simultaneously fetching data. The benefits of Cypher over SQL don’t end there but I’m sure you get the point. Relate Yourself Neo4j 1.8.M03 is available for immediate download in the usual places. Get it now: Download from neo4j.org Bump the versions in your maven pom.xml Provision on heroku with: heroku addons:add neo4j --neo4j-version 1.8.M03 Want to practice Cypher with fellow Graphistas? Join us at a meetup somewhere in the world, or propose a new location and we'll look into visiting your area to buy you a cup of coffee. The content of this article was originally written by Andreas Kolleger over at the Neo4j blog.
Updated July 24, 2022
by Eric Genesky
· 9,644 Views · 1 Like
article thumbnail
My Experiences with Maven in IntelliJ IDEA and NetBeans IDE
With IntelliJ IDEA supporting a fully-functional integration with Maven, you can automate your entire building process. The result is that you can create a new Maven project as well as easily handle multi-module projects. Netbeans IDE on the other hand, simplifies the development of mobile applications as well as web and desktop applications using Java and HTML5. So imagine my surprise when some weeks ago, I saw a colleague fighting IntelliJ's Maven support. A dependency was not detected by IntelliJ's Maven support and to fix it, he had to remove the dependency from the POM, save it, add it back to the POM and save it again. Hmmm... somehow not quite optimal. This was the reason for me to take a look at IntelliJ's Maven support and compare some points with the support provided by NetBeans. Let’s look first at how IntelliJ IDEA can support an integration with Maven that is fully functional. This will assist you in automating the whole build. It doesn’t matter whether you wish to create a totally new Maven project, synchronize with an existing open project or add Maven support to existing IntelliJ IDEA projects. You can also manage projects that are multi-module. Creating New Maven Projects These are the steps I’d follow to create a new Maven Project. If you’re starting from scratch and there’s no project open currently in IntelliJ IDEA, go to the Welcome screen and click on New Project. Alternatively, you can select File and then create a new project for the main menu. Once you’ve created your new project, you must name it and if you require it, change its location. You’ll want to create the Git repository, so select the new project for placement under version control. Just be aware that you can do this at any time later in the build. Don’t forget to tick the box. Your project requires a language selection, so do that as well as add any other languages you may want via plugins. You do this by clicking “App>general add”. Under "build system", select Maven followed by specifying the project’s SDK. Or, you can go with the default or JDK. While it is not necessary, it’s a good idea to have a file with a basic sample code, so tick the “add sample code” box. Don’t neglect to specify Maven’s coordinates, which are included in the pom.xml file. You’ll find these in the advanced settings where a new project package is identified in the Groupid box and the project name is specified via the Artifactid box contents. Maven naming conventions follow Jav’s package name rules. This is in the format of a reversed domain name that you control e.g. org.apache.maven. While the naming conventions are not enforced, you’ll have a hard time getting names that don’t follow the rules in the Maven central repository, especially if it is a single word used for group IDs. When you’ve finished your selections, then click “create”. Handling Maven Projects If you open a Maven project in IntelliJ, IntelliJ still generates a default project folder (".idea") and file (".iml"). This means IntelliJ must always ensure that data in the POM is kept in sync with its proprietary structures. However, IntelliJ only handles one direction. Changes in the POM are recognized and the project settings are in sync most times. But if you change something in the project settings, these changes are not reflected in the POM. So, as my colleague experienced, you have to do it twice. Also, IntelliJ lists the "target" folder and ".idea" project settings folder in the logical project view, which is not useful most of the time. In IntelliJIDEA, the Maven project pom.xml file has a compiler included as well as the target Java version. There’s also a Maven tool window and any dependencies that are required to start work. Just bear in mind that the version of Java that is specified in the pom.xml file will, in all likelihood, override the "JDK for importer" option’s specification version. You can find this in the Maven settings. Configure Maven Settings To make things easier, configure your Maven settings before opening new projects. Configuring IntelliJ IDEA to display the Maven settings prior to opening an existing project that is being opened for the first time in IntelliJ IDEA is done at the application level. Once set, they’ll appear for any new project that you open. On the Welcome screen, “All settings” under the customize option. You can also access it from the main menu by selecting “file”, then “new project setup” followed by “preferences for new projects.” In the “preferences” dialog under settings, choose “build”, then “execution”. Under deployment, select Maven as your option under “build tools.” Now go to the Maven settings dialog and make the selection “Show settings dialog for new Maven projects”. You can then click OK and your changes will be saved for all future projects. What this does is, each time you open new projects, the Maven settings dialog is displayed by IntelliJ IDEA and you can then specify the local Maven repository’s location as well as a user settings file. In contrast, NetBeans uses the POM for pretty much everything. The Maven POM file defines the project, as shown below. If you change something in the project settings, it is directly stored in the POM. Only in rare cases, e.g., if you redefine actions, does NetBeans need to create a specific file. NetBeans only shows important information in the Projects window, as shown above. However, if you do want to see the Maven "target" folder, you can easily switch to the Files tab: Building Maven Projects When you build a Maven project in IntelliJ, with the default IDE commands, Maven is not used for the build process. The same goes for tests. If you are using different profiles for local development and your continuous integration server, you have to use Intellij's Maven integration tab to build and test your project with Maven. This is really ugly because you cannot use all the shortcuts that make life easier. NetBeans uses Maven for all that. You can simply press F11 or use the default toolbar button or menu item to build your applications with Maven. This same action works whether you are using Maven, a plain NetBeans Ant build script, or Gradle. It’s always the same consistent procedure. You can even change the Maven command that is used to build the project via F11. You are completely free to configure what you need: Executing Maven Goals Running Maven goals in IntelliJ displays a dialog with just two text fields and you have to type all the Maven parameters by hand. Hey man, it could be so much easier. Running a custom goal in NetBeans gives you a fantastic dialog with lots of possibilities. You can choose the profile, add properties, and even save everything to run it again later. This saves a lot of work. Conclusion There are many smaller issues that show that NetBeans has a smoother Maven integration than offered by IntelliJ. My impression is that IntelliJ's Maven support is just an extension to its default project management system since It still needs the default IntelliJ project folders and files. Meanwhile, NetBeans provides a much deeper and more complete integration. One more thing. I’m not an IntelliJ user so please forgive me if there is a mistake in my observations. I'm also not trying to start a new IDE war. What I want to do by means of this article is to get readers to think out of the box. If you are familiar with your IDE, that is great. If you are productive with your IDE, that is great. But if you think an IDE needs to be expensive in order to be a good product, you are totally wrong and should definitely give NetBeans a try. Thorsten Marx is a product manager and developer at e-Spirit AG in Germany.
July 24, 2022
by Thorsten Marx
· 17,287 Views · 2 Likes
article thumbnail
GitHub Announces Beta Testing of New Sponsorship Tool
Now you have even more ways to financially support your favorite open-source projects.
Updated July 24, 2022
by Sarah Sinning
· 4,712 Views · 5 Likes
article thumbnail
YAML and Its Usage in Kubernetes
If you've used Kubernetes before, chances are you have come into contact with YAML files. Find out more about what they do here.
Updated July 24, 2022
by Raghavendra Deshpande
· 5,932 Views · 3 Likes
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,705 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
· 16,825 Views · 2 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,604 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
· 7,997 Views · 3 Likes
article thumbnail
Building an HTTP Tunnel With WebSocket and Node.JS
Introduce about how I build a HTTP tunnel tool based on WebSocket.
July 23, 2022
by Embbnux Ji
· 4,289 Views · 1 Like
  • Previous
  • ...
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • ...
  • 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
×