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 Languages Topics

article thumbnail
How to Handle an InterruptedException
Checked InterruptedException in Java is a constant source of pain for many of us; here is my understanding of how it should be handled.
October 20, 2015
by Yegor Bugayenko
· 82,143 Views · 18 Likes
article thumbnail
Borders on Xamarin Forms User Interface Elements
Learn how to place borders around panel-like structures like a grid on your mobile devices with Xamarin forms.
October 19, 2015
by Joost van Schaik
· 29,622 Views · 4 Likes
article thumbnail
Java 8: Query Databases Using Streams
Speedment is an alternative to traditional ORMs, and older database classes requiring 100 lines of Java code may be replaced with a single line of Java 8
October 19, 2015
by Per-Åke Minborg
· 56,073 Views · 52 Likes
article thumbnail
Getting Current Date Time in Java
As a Java programmer, you will often need to work with date and time. In this post, we will learn how to get the current time of the day in Java applications.
October 16, 2015
by John Thompson
· 318,486 Views · 12 Likes
article thumbnail
What is Promotion Rate?
Learn all about promotion rate: what it is, how to measure it, and breaking down the impact.
October 16, 2015
by Nikita Salnikov-Tarnovski
· 6,759 Views · 5 Likes
article thumbnail
Easy RabbitMQ Messaging with EasyNetQ
EasyNetQ makes RabbitMQ messaging a cinch. Learn how to get started with EasyNetQ in this great tutorial.
October 16, 2015
by Moe Long
· 10,137 Views · 2 Likes
article thumbnail
Create a Desktop Application Using Angular, Bootstrap and C#
It's possible to create a desktop appliction using JavaScript, and this tutorial will show you how to do it, using Angular and Bootstrap for the presentation layer.
October 16, 2015
by Dave Bush
· 67,735 Views · 9 Likes
article thumbnail
Python GUI Programming: wxPython vs. tkinter
The author compares wxPython to tkinter for ease of use and performance differences while trying to overcome his own biases
October 15, 2015
by Tom Radcliffe
· 15,857 Views · 2 Likes
article thumbnail
Is Java Remote Procedure Call Dead in the REST Age?
JSON-RPC excels at simple tasks when mapping business concepts to resources via REST is too involved.
October 12, 2015
by Lieven Doclo
· 35,038 Views · 12 Likes
article thumbnail
Downsides of Mixed Identifiers When Porting Between Oracle and PostgreSQL Databases
Mixing identifier types increases the potential for negative consequences when porting between Oracle and PostgreSQL databases.
October 11, 2015
by Dustin Marx
· 4,820 Views · 5 Likes
article thumbnail
Object Oriented Programming
Object Oriented Programming is a programming style in which the program is made with components which match to real world objects.
October 9, 2015
by Mohit Kanwar
· 26,082 Views · 8 Likes
article thumbnail
Real-World Problems Being Solved by Java
Big Server, Big Data, Mobile, IoT what problems does it not solve?
October 8, 2015
by Tom Smith DZone Core CORE
· 33,130 Views · 6 Likes
article thumbnail
A Detailed Look at Controllers in Java EE 8 MVC
An MVC Controller is a JAX-RS resource method annotated with @Controller. If a class is annotated with @Controller, then all resource methods of this class are regarded as controllers.
October 7, 2015
by Michael Scharhag
· 19,242 Views · 6 Likes
article thumbnail
Deploying Keycloak In Tomcat
Detailed guide on how to install and configure Keycloak, an open-source identity and access management solution, on Apache Tomcat server
October 2, 2015
by Mohammad Nadeem
· 17,345 Views · 5 Likes
article thumbnail
Low Latency FIX Engine in Java
Chronicle FIX is a low latency FIX database for Java. Check out why it's so awesome and boosts performance.
September 22, 2015
by Peter Lawrey
· 8,370 Views · 1 Like
article thumbnail
MySQL: Server vs. Client-Side Prepared Statements in Java
Basically, there are two ways of preparing a statement: on the server-side or on the client-side.
September 22, 2015
by Vlad Mihalcea
· 10,317 Views · 3 Likes
article thumbnail
Applying Gaussian Blur to UIViews with Swift Protocol Extensions
Here's a fun little experiment showing the power of Swift's Protocol Extensions to apply a CIGaussianBlur Core Image filter to any UIView with no developer overhead. The code could be extended to apply any Core Image filter such as a half tone screen or colour adjustment. Blurable is a simple protocol that borrows some of the methods and variables from a UIView: var layer: CALayer { get } var subviews: [UIView] { get } var frame: CGRect { get } func addSubview(view: UIView) func bringSubviewToFront(view: UIView) ...and adds a few of its own: Obviously, just being a protocol, it doesn't do much on its own. However, by adding an extension, I can introduce default functionality. Furthermore, by extending UIView to implement Blurable, every component from a segmented control to a horizontal slider can be blurred: extension UIView: Blurable { } The Mechanics of Blurable Getting a blurred representation of a UIView is pretty simple: I need to begin an image context, use the view's layer's renderInContext method to render into the context and then get a UIImage from the context: UIGraphicsBeginImageContextWithOptions(CGSize(width: frame.width, height: frame.height), false, 1) layer.renderInContext(UIGraphicsGetCurrentContext()!) let image = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext(); Once I have the image populated, it's a fairly standard workflow to apply a Gaussian blur to it: guard let blur = CIFilter(name: "CIGaussianBlur") else { return } blur.setValue(CIImage(image: image), forKey: kCIInputImageKey) blur.setValue(blurRadius, forKey: kCIInputRadiusKey) let ciContext = CIContext(options: nil) let result = blur.valueForKey(kCIOutputImageKey) as! CIImage! let boundingRect = CGRect(x: -blurRadius * 4, y: -blurRadius * 4, width: frame.width + (blurRadius * 8), height: frame.height + (blurRadius * 8)) let cgImage = ciContext.createCGImage(result, fromRect: boundingRect) let filteredImage = UIImage(CGImage: cgImage) A blurred image will be larger than its input image, so I need to be explicit about the size I require in createCGImage. The next step is to add a UIImageView to my view and hide all the other views. I've subclassed UIImageView to BlurOverlay so that when it comes to removing it, I can be sure I'm not removing an existing UIImageView: let blurOverlay = BlurOverlay() blurOverlay.frame = boundingRect blurOverlay.image = filteredImage subviews.forEach{ $0.hidden = true } addSubview(blurOverlay) When it comes to de-blurring, I want to ensure the last subview is one of my BlurOverlay remove it and unhide the existing views: func unBlur() { if let blurOverlay = subviews.last as? BlurOverlay { blurOverlay.removeFromSuperview() subviews.forEach{ $0.hidden = false } } } Finally, to see if a UIView is currently blurred, I just need to see if its last subview is a BlurOverlay: var isBlurred: Bool { return subviews.last is BlurOverlay } Blurring a UIView To blur and de-blur, just invoke blur() and unBlur() on an UIView: segmentedControl.unBlur() segmentedControl.blur(blurRadius: 2) Source Code As always, the source code for this project is available at my GitHub repository here. Enjoy!
September 21, 2015
by Simon Gladman
· 14,746 Views · 2 Likes
article thumbnail
What is Allocation Rate?
This post will try to remove the magic from the phrases "unsustainable allocation rate" and "keeping your allocation rates low."
September 21, 2015
by Nikita Salnikov-Tarnovski
· 6,411 Views · 2 Likes
article thumbnail
Custom Operators for Collections in Java
Learn how to use operator overloading in Java, using it's existing conventions.
September 21, 2015
by Peter Lawrey
· 19,465 Views · 6 Likes
article thumbnail
Spring Security 4: JDBC Authentication and Authorization in MySQL
I am going to explain how to use Spring Security in a Spring MVC Application to authenticate and authorize users against user details stored in a MySQL Database.
September 18, 2015
by Priyadarshini Balachandran
· 192,697 Views · 10 Likes
  • Previous
  • ...
  • 396
  • 397
  • 398
  • 399
  • 400
  • 401
  • 402
  • 403
  • 404
  • 405
  • ...
  • 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
×