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

Latest Articles - DZone

article thumbnail
How to Enable Big Data Best Practices
Enabling Big Data best practices is an important role for both data scientists and data analysts to ensure the smooth running of any organization.
July 25, 2022
by John Ejiofor
· 5,453 Views · 1 Like
article thumbnail
Software Methodologies — Waterfall vs Agile vs DevOps
This article will help you understand the top software methodologies, their advantages, pitfalls, and the difference between them.
July 25, 2022
by Hiren Dhaduk
· 13,569 Views · 3 Likes
article thumbnail
Disciplined Agile Delivery Framework: A Beginner's Guide
This article hopefully gives you ample working knowledge on the concept of the DaD framework, history, lifecycles, principles, pros, cons, and more.
July 25, 2022
by Praise Iwuh
· 6,025 Views · 1 Like
article thumbnail
A Guide to Parsing: Algorithms and Technology
Get the definition of parsing, and learn about regular expressions in grammar, the structure of parsers, and what scannerless parsers are.
Updated July 25, 2022
by Gabriele Tomassetti
· 28,972 Views · 17 Likes
article thumbnail
3D Tetris With Three.js Tutorial
This simple tutorial walks you through how to create a Tetris game with Three.js.
July 25, 2022
by Sebastian Poręba
· 10,650 Views · 1 Like
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,838 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,967 Views · 6 Likes
article thumbnail
Secure Your Web Apps With an API Gateway
Keep on the lookout for sniffing, framing, and HTTPS Pinning by setting up a proper API gateway.
July 24, 2022
by Nicolas Fränkel
· 5,869 Views · 3 Likes
article thumbnail
Deploying MWAA Using AWS CDK
Learn how to use a Python AWS CDK application to configure and deploy your Apache Airflow environments using MWAA in a repeatable and consistent way.
July 24, 2022
by Ricardo Sueiras
· 11,037 Views · 2 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,481 Views · 2 Likes
article thumbnail
Integrating With Jira APIs in Python
Connecting to Jira in Python.
July 24, 2022
by Dariusz Suchojad
· 4,590 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,775 Views · 2 Likes
article thumbnail
Mobile App Development Trends
Check out the latest trends in mobile app development, including a Swift takeover, enterprise apps, and IoT advancements.
Updated July 24, 2022
by Alfred Beiley
· 16,226 Views · 5 Likes
article thumbnail
How Machine-Learning-as-a-Service Can Help the Internet of Things Reach its Potential
The Internet of Things (IoT) has changed the way the entire world operates.
Updated July 24, 2022
by Rick Delgado
· 13,623 Views · 1 Like
article thumbnail
Operating with image files in a Windows Phone 7 application
Images Add to the Experience Adding images to something that you are working on in the Windows 7 phone can be a great way to appeal to people in a more full way. This is to say that many users of your programs and services will expect to see images contained within. Humans are a visual species, and it is always nice when the tools that we use provide us with the images that we have come to expect from the services that we use. Any app developer for Windows 7 phones (or any other type of phone for that matter) understands that they need to use the tools at their disposal to put some images together in their apps. Not only are images nice to look at, but they can help convey certain messages that need to get across to people who are using the app as well. This is a big deal for many because they will understand that the images bring in more and more users. Images are one thing that is quite interesting to work within a Windows Phone 7 application. In fact, for some specific applications manipulating image files can be a necessity (for example, when the application saves and loads edited photos). As you probably already know, the files that are created by a Windows Phone 7 application are stored inside the isolated storage – a storage unit designated for the current application that no other application can access. Unlike regular text files that can be read as plain string units, images are handled in a different way. Even if you used Silverlight before, opening image files in a Windows Phone 7 application will require you to use a different approach, since you won’t be directly in control of the storage space. Basically, saving an image locally (for example, from a web site) is quite easy. If you’ve read my previous article on file handling , then I can say that the same principles are applied here. To show an example, I am going to use a WebClient to download an image and store it locally. WebClient client = new WebClient(); client.OpenReadCompleted += new OpenReadCompletedEventHandler(client_OpenReadCompleted); I am referencing the OpenReadCompleted event handler that will be triggered when the data from the specified resource will be completely cached. Therefore, all I will have to do is store it for permanent access. Here is how the actual event handler looks like: void client_OpenReadCompleted(object sender, OpenReadCompletedEventArgs e) { var resInfo = new StreamResourceInfo(e.Result, null); var reader = new StreamReader(resInfo.Stream); byte[] contents; using (BinaryReader bReader = new BinaryReader(reader.BaseStream)) { contents = bReader.ReadBytes((int)reader.BaseStream.Length); } IsolatedStorageFileStream stream = file.CreateFile("file.jpg"); stream.Write(contents, 0, contents.Length); stream.Close(); } This way, I am converting the downloaded stream to a byte array and I am storing it in the root folder as a JPEG image. The actual image download is triggered via OpenReadAsync: client.OpenReadAsync(new Uri("http://www.google.com/images/srpr/nav_logo14.png")); Here I am passing a sample image URL (feel free to change it to whatever image you want). So it is downloaded and stored. Now it’s time to read the contents. To test this, I inserted an Image control on the page that will display the stored image. To retrieve the image, an instance of IsolatedStorageFileStream is used: IsolatedStorageFileStream stream = new IsolatedStorageFileStream("filet.jpg", FileMode.Open, file); var image = new BitmapImage(); image.SetSource(stream); image1.Source = image; Although the first thing that comes to mind would be using a relative URI for the image source, it will not work on a Windows Phone 7 application because the user has no direct control over the storage unit. Making Sure Your Images Work Properly Here is another thing that you don't always necessarily learn until you have some coding experience under your belt. It is that not all images are properly formatted when you are first starting out. You need to make sure you get the formatting down pat just right so your images will appear on screen as you desire for them to do. In other words, don't take a chance with getting a blurry image or an image that won't load on any project that you are working on. Sadly, this kind of thing happens to people sometimes, and the results can be less than desirable. To avoid the problem of potentially getting your images out of line, make sure you carefully look at how you format your images and ensure that the code is all set up properly. You don't want to put something out there with images that are off-kilter. If you do so, you may get backlash from your users right away. They will make it clear that you should not have done something like that, and they will ultimately revolt against what you have created for them. Don't take a chance like that when you don't have to. Only Use Images That You are Permitted to Use Most images on the Internet have some kind of copyright or attribution to them. You can't simply take them and use them for your own creations. If you do so, you are stealing someone else's work, and it is a very big deal. Instead, make sure you only look to resources that you are legally allowed to use in order to get the images that you require. There is nothing wrong with turning towards resources that are free and available for anyone to use. People use royalty-free images in their work all the time. In fact, it is a great way to ensure that your work remains safe and legally permitted. The other option that you have is to pay for the copyright usage of the image that you want to work with. There are many photographers who will agree to license their image for you to use if you pay a certain fee to them for doing so. In most cases, the fee is just a few dollars to use their image. It may be significantly more for particularly popular images, so this is something that you must think about as well. Regardless, you may still decide that this is worthwhile to you if you come to find that the images that they have taken are images that you simply cannot live without. Update Your Images Regularly Images can become less relevant over time. One way to avoid having images that are of no use to you is to make sure you are constantly updating your images so they don't go stale on you. When you are an Internet user and you see a website that has clearly not updated its images in a long time, then you ultimately may determine that this is not the kind of website that you want to spend much time with at all. It is understandable that you may come to this conclusion, and that is why developers need to update their images regularly to keep everything fresh and interesting for their users. If you do this, you will avoid the risk of losing traffic because people are less than impressed by the images that you use for the work that you do. Make this a top priority for your creations today.
July 24, 2022
by Denzel D.
· 28,211 Views · 1 Like
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,181 Views · 2 Likes
article thumbnail
RESTEasy 1.0 GA Released
This article was originally published on January 1, 2009. Java Just Got a Little Better Have you been struggling to use the Java system as it exists today? If so, don't worry, you are not alone. There are plenty of people going through the same troubles, and no one is pleased with the fact that they have to struggle as hard as they do just to get some simple code put out into the world. Unfortunately, that is the position that many find themselves in today. Java is finally starting to make some much-needed improvements, and people are clamoring to learn more about this service as they view it as a way to get their code out. The newest thing to come to Java that can add a lot of value for developers is RESTEasy 1.0. Easier to Transfer Creations to Apps There have been many complaints thrown at Java about how the data that is created within their system is not exactly easy to get transferred over to the apps that developers tend to want to put that data in. You can probably imagine how this could end up becoming a serious problem. Users are expecting the things that developers create to come out in app form these days, and if they are not provided with this accessibility, then they may be less than satisfied with the ultimate results that they get. Many people feel challenged to get their information and data over to apps so that customers will be pleased with the creations that they have come up with, and that is all fine and good, but it is not always easy to pull off in the Java platform. This is exactly why so many are excited to hear that RESTEasy 1.0 is on the way. RESTEasy 1.0 is literally living up to its name by giving users the chance to rest easily so that they will be able to get their data moved over to apps or anywhere else that they need it to go. There is no more waiting around wishing that you could get this done, it is now much more seamless than ever before. Integrates With Other Coding Tools We all know that some coding tools are built in such a way that they are separate from the other tools on the market. The creators of such tools sometimes think that it is a good idea to try to protect their intellectual property in this way. That may sound fine on paper, but the problem is that it makes their tools less valuable to users. They aren't able to use those same tools with the other coding tools that they are already using, and this can become a big issue for many developers. Needless to say, most people are not that into the idea of using coding tools that won't bring them the value that they have come to expect. As such, it makes sense that coders are now looking at what they can do to get their coding tools to better integrate with the other tools that they are already using. RESTEasy 1.0 is a great system because it doesn't try to shelter itself off in a corner somewhere. Instead, users are able to enjoy the full slate of benefits that this program can provide right from the start. You have many options when it comes to the tools that you use to code your various projects, and you don't want to limit yourself simply because some tools are not as responsive to your needs as others. You should always be able to work with the tools that you have at your disposal to get things done properly and right from the start. I am pleased to announce the first GA release of JBoss RESTEasy. All documentation and download links are available at RESTEasy's JBoss.org project page. JBoss RESTEasy is a framework that allows you to write RESTFul Web Services in Java. It is a fully certified and portable implementation of JAX-RS specification. JAX-RS is a new JCP specification that provides a Java API for RESTful Web Services over the HTTP protocol. RESTEasy can run in any Servlet container, but tighter integration with the JBoss Application Server is also available to make the user experience nicer in that environment. While JAX-RS is only a server-side specification, RESTEasy has innovated to bring JAX-RS to the client through the RESTEasy JAX-RS Client Framework. This client-side framework allows you to map outgoing HTTP requests to remote servers using JAX-RS annotations and interface proxies. Features Fully certified JAX-RS implementation Portable to any app-server/Tomcat that runs on JDK 5 or higher Embeddable server implementation for junit testing Rich set of providers for: XML, JSON, YAML, Fastinfoset, Atom, etc. JAXB marshalling into XML, JSON, Fastinfoset, and Atom as well as wrappers for arrays, lists, and sets of JAXB Objects. Asynchronous HTTP (Comet) abstractions for JBoss Web, Tomcat 6, and Servlet 3.0 EJB, Spring, and Spring MVC integration Client framework that leverages JAX-RS annotations so that you can write HTTP clients easily (JAX-RS only defines server bindings) Special thanks goes to all our independent contributors, specifically: Solomon Duskis, Ryan McDonough, Olivier Brand, Martin Algesten, Michael Brackx, and Justin Edelson. See also: Introduction to REST Putting Java to REST Enter The JBoss Matrix Constant Updates Another thing that needs to be celebrated about the release of RESTEasy 1.0 is the fact that it will be constantly updated and maintained behind the scenes. There are entire armies of engineers working to make sure this program stays up and running properly for its users at all times. This should give users confidence that they will be able to get everything they need out of it right when they need it. No more waiting around just hoping that your program will be updated. You know for sure that RESTEasy 1.0 has people working on it all the time. There are plenty of things that you can do to put yourself in a better position as far as the way you are coding and getting things taken care of. If you would like to, you can start working with the RESTEasy 1.0 system today to make sure you never again find yourself in a situation where you are dealing with potentially faulty coding software. This stuff is the best. Create Your Masterpiece One final note on RESTEasy 1.0 is the fact that you can get to work creating your masterpiece right away. You don't need to wait for anyone to give you permission to start getting work done. Instead, this user-friendly program is great for creating your next masterpiece in the coding world, and you should make sure you are taking full advantage of the opportunities that are presented to you in this way. Create a one-of-a-kind masterpiece that is top-notch and produces something that your users will never be able to forget. You can get started right now when you incorporate the RESTEasy 1.0 system into your next project. It is something that you need to get working for you right now. Make sure you take advantage of all that it can offer you today.
Updated July 24, 2022
by Bill Burke
· 23,011 Views · 2 Likes
article thumbnail
Groovy Database Resource Handling
Groovy Database Can Be a Powerful Tool There are coders all around the world right now working on some of the most challenging coding problems that are out there. They are all likely relying on using Groovy database at least to some extent as this is a major player in the industry. People from all over the world recognize the true power of Groovy database and all that it can provide to them from a coding perspective, but the fact that it is such a powerful tool should not be ignored. If you want to advance very far with Groovy database at all, you will need to make sure you have a firm grasp on what it is and why it is so useful to coders all around the world. How it Compares to Java Most people are familiar with Java and have likely used it in their coding adventures at some point. It is a primary tool that has helped with the coding of numerous projects that you are likely familiar with already. Java is a great place to get started, but it doesn't necessarily compare so well to Groovy when they go head to head. It depends on what you are trying to get done, but the use of Groovy trumps Java for most developers. The reason is that most developers prefer to work with a system that has been specifically created for them. Groovy is that system. Everything that it offers is crafted with the developer in mind, and most agree that it is more user-friendly from a developer's point of view. This means that you don't have to waste your time trying to figure out how to work the very system that you are just trying to make some progress on in the first place. Java users are frequently frustrated by their inability to get as much done as they might like to because they are constantly running into brick walls when it comes to how they develop the systems that they need to develop. Most people significantly prefer it if they are able to cut away everything else and simply get to the root of the problem that they are working on. Then, and only then, can they truly begin to formulate a strategy that will allow them to create something that the world will gravitate towards. I am a big fan of using SQL in java and C# software. I typically dislike the usage of ORM frameworks like Hibernate. I feel that ORMs tend to hide a lot of issues. They also tend to have a higher learning curve. I am not sure that the ROI on deeply learning an ORM is sufficient enough to use. However, there are a lot of pitfalls that come with being so close to the SQL. The largest of which is proper resource handling. If database connections are not closed properly, the application will soon become starved of available connections. This post contains a simple example of using Groovy Categories to help manage the resource management of database connections. There are a lot more robust solutions (ie: GORM), but sometimes you only need a quick implementation. To accomplish our goal, we will be using a static closure defined below. The OpenDatabase class is merely a container for the closure. I think the final implementation of the code reads nicely because of the name. OpenDatabase.groovy import groovy.sql.Sql class OpenDatabase { def static with = { DbConnection conn, Closure closure -> Sql sql try { sql = conn.getConnection() if (closure) { closure(sql) } } finally { sql.close() } } } The DbConnection class is a simple interface for creating the groovy.sql.Sql object. DbConnection.groovy import groovy.sql.Sql; public interface DbConnection { Sql getConnection(); } Below is the sample usage of these two classes. OpenDatabase.with(dbConnector) { sql -> sql.execute("insert into BLAH...") } The database connection will be closed after closure exits. Simple, easy resource handling. The groovy way. The original article can be found at http://www.greenmoonsoftware.com/2014/04/groovy-database-resource-handling/ Applying Mass Data to Problems One of the upsides to Groovy database handling is that you don't always hear about is the fact that you can apply massive amounts of data to the issues that you are attempting to take care of today. The beauty of this is the fact that much of that data will prove very useful to you as you work on trying to figure out exactly what it is that people want from your projects. The more data you have, and the more data that you can apply, the better the outcome will be for yourself and others. Groovy allows you to input all of the data that you require all at once so you aren't constantly left struggling to try to figure out which steps you need to take next and how you will get things done. Simply use Groovy to get the results that you need, and you will be all set. A large amount of data is always preferable to use because it will help you figure out what is truly going on within the scope of what you are working on. Any single piece of data could be an outlier, but when you have a major data dump to go through, you know that you are getting the most relevant information right away. Endless Possibilities Groovy has made it so much easier for developers to work out what they will do to get their code set up just right that it has truly performed an amazing service that we should all be grateful for. This is why we need to note that the possibilities are virtually endless when working with Groovy and the tools that this service has provided. It is a very big deal when you get your code to sync up just perfectly, and that is what you get when you use the Groovy system. There are now so many people working within the system that it has grown much larger than some of its competitors. That is why we anticipate that many interesting developments are going to come out of it. When you have that many people working that hard all within the same system, you are generally going to get some pretty outstanding results to come out of this. You need to account for that fact and understand that there are numerous upsides to using a system that works just like that. A Great Place for Starters Those who are just taking on the coding world for the first time need to look at Groovy as the kind of place where they can start to hone their skills. It is not necessarily the first area that people necessarily think of when they are looking over different coding programs to get started with, but it is where they should begin. The controls are so much more refined for the kind of person who is just getting started, and that means that it is the ideal training ground for someone who is truly eager to learn the system and get to work within it. People who are just starting their coding journey should be excited to have the resources available to them to get started in this way. It can all prove extremely useful in the long run.
Updated July 24, 2022
by Robert Greathouse
· 16,032 Views · 1 Like
article thumbnail
Update on Closures Coming to Java 7
Java is changing the world around us in major ways. Here is how.
Updated July 24, 2022
by Mitch Pronschinske
· 34,630 Views · 2 Likes
article thumbnail
Another Way of Passing Values Between Windows Phone 7 Pages
A View of Different Pages If you are a Windows 7 phone owner, you may have noticed that your phone has different pages that you can engage with. This is intentional, of course, and allows for users of this phone to get access to exactly the information that they want at any time. Developers look at this as somewhat of a challenge. They need to figure out how they can keep certain bits of information from page to page while transferring other bits, and it is all about what they think their users will need to see from page to page. We have to admit that nothing about this is easy. There are many people who simply won't have the bandwidth or ability to get it all done. That said, it can be very rewarding for some people as they pull off the seemingly impossible. There are a lot of ways to look at the work that creators on the Windows 7 phone do, but few can argue that there aren't some amazing things happening on the system. Another appropriate way for passing data from one page to another during the navigation is in setting up destination page properties (or variables) within the OnNavigatedFrom method of the source page. OnNavigatedFrom method is called just before a page is no longer the active page in a frame. For example this method is called if you invoke NavigationService.Navigate method from a source page. Due to the fact that OnNavigatedFrom method accepts NavigationEventArgs as input parameter you have access to the destination page stored in Content property. Sample I have created two pages: Page1.xaml and Page2.xaml. Inside Page2 I have added a string property named Parameter. Inside Page1 (codebehind) I have overridden method OnNavigatedFrom for setting up Page2′s Parameter property. protected override void OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e) { Page2 page2Instance = e.Content as Page2; if (page2Instance != null) { page2Instance.Parameter = "value"; } } Advantages Probably one of advantages is that you don’t have to store values in a static context, but simply pass them from one page to another. That approach is great for a wizard when you have several pages in a row and you need to store only the final result after the wizard is completed. Disadvantages This approach cannot be applied to applications that can lose sensitive information during the suspend mode (Tombstoning), because when the system restores your application from suspend mode there is no way to call OnNavigatedFrom method to set destination page properties. Changing the Default Home Page The default home page that one has set on their Windows phone can be changed as necessary. Some people simply leave up the page that is already pre-set as the default when they get the phone out of the box, but not everyone wants to leave it on that. If there is a page that you are more likely to jump to in the first place, then you need to consider getting that set up as your homepage instead of leaving it as-is. There are plenty of people who make the choice to switch it up like this, and there is nothing wrong with making that same choice for yourself as well. Just make sure you know which page you want to get set up when you do so. Allow For Magnifying of the Page Coders should be careful to make sure they allow users to work within the system to make alterations to the code that they have put out. This may mean allowing them to modify certain aspects of the page in order to make it more useful to them. For example, it might be necessary to magnify the page in order to better see the text that is present on the screen. It is a big deal for some users as they try to read everything that is typed out on the page. These are seemingly small things, but certain users will benefit greatly from the small modifications that they need to make in order to get everything just the way that they need it. Adding Some Shortcuts There are shortcuts that can help people get where they need to go without your app more easily. This will save them some time as they work through the ways that they are ultimately going to use your app. It makes a big difference, and it may save them mere seconds, but that is precious time on the Internet. You need to make sure the shortcuts that you program into your app are done in such a way that makes sense for how it is supposed to operate. The shortcuts should help people get to the most important information within the app. Those shortcuts simply make it easier for people to get to the most important aspects of the app more quickly. There isn't exactly a science to how you create your shortcuts. Rather, you should review the areas in your app that people seem to travel to the most. Those are the hotspots that you absolutely want to have shortcuts ready to go to. People appreciate when the app developers behind their favorite apps have clearly examined their behavior and determined what they are most likely going to want out of the experience. When they see the shortcuts pop up that are obviously useful to them, they know that the developers have done their job properly. Create Real Value Everything that you add into the code of your app should create real value for the users. What does this mean? It means that there shouldn't be any aspect of your app that doesn't add something interesting to what you are doing for the people. The more that you can add to the value that they get out of the app, the better. They are expecting you to really come through for them, and you need to show that you are listening. The information that you place into your app is meant to be used by people for various aspects of their day-to-day life. Are you actually coming through for them and creating something that will enhance their ability to get things done or not? If not, then you need to go back to the drawing board and make sure you are putting your efforts where they need to be put. You risk destroying the trust between yourself and the users of your app if you aren't going the extra mile to deliver something interesting to them. Keep Pages Simple Finally, you should try to keep pages as simple as possible. You don't want to have too many distractions on your page because it will only deter people from using your service. The simpler the pages, the better they are for users. It is a fact that they like to keep things simple because it means that they can just get at the information that matters the most to them. If you make things overly complicated or add in too many bells and whistles, many users are going to get lost in the page. Try to keep it simple and straightforward in order to make it the best possible experience for your users every time. That is all that there is to making an experience that works for everyone.
Updated July 24, 2022
by Jevgeni Tšaikin
· 10,716 Views · 1 Like
  • Previous
  • ...
  • 677
  • 678
  • 679
  • 680
  • 681
  • 682
  • 683
  • 684
  • 685
  • 686
  • ...
  • 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
×