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

Latest Articles - DZone

article thumbnail
The 3 Biggest Pain Points in Mobile App Development
Understanding pain points during mobile development will allow larger adoption of your application.
September 25, 2015
by Shane O'Neill
· 5,947 Views · 4 Likes
article thumbnail
Problems Solved by IoT
We spoke with 20 executives across the IoT space about problems the Internet of Things are addressing.
September 24, 2015
by Tom Smith DZone Core CORE
· 37,552 Views · 5 Likes
article thumbnail
New Tools for Using Docker in Eclipse
The Eclipse ecosystem is catching up with the wave of Docker popularity with some bleeding edge tools. Try them out, and give some feedback!
September 24, 2015
by Arun Gupta
· 14,801 Views · 3 Likes
article thumbnail
Self-organizing, Self-directing, Self-managing, and Authority
The differences between self-organizing, self-directed, and self-managed team in an agile environment.
September 24, 2015
by Allan Kelly
· 8,376 Views · 1 Like
article thumbnail
The Compositional Approach to Model View ViewModel with the Observable Property
Refactor your code by using the ObservableProperty to create change events and compose with other properties.
September 24, 2015
by Toni Petrina
· 4,388 Views · 3 Likes
article thumbnail
Build and Release Scala/Java Gradle Project in GitLab Using Jenkins to Artifactory
Looking to learn about building a Scala/Java Gradle project in GitLab? Here's how to do so with Jenkins.
September 23, 2015
by Rado Buranský
· 14,191 Views · 3 Likes
article thumbnail
Multiplexing: TCP vs HTTP2
And now the question you've all been waiting for: can you use TCP AND HTTP2? Read on...
September 23, 2015
by Lori MacVittie
· 9,191 Views · 5 Likes
article thumbnail
How To Create a Bitmap Blur Effect In Android Using RenderScript
Learn how to achieve the popular blur effect on your Android apps
September 23, 2015
by Nilanchala Panigrahy
· 14,938 Views · 3 Likes
article thumbnail
Test APIs in FitNesse - Part 1
A tutorial on how to use the open source FitNesse testing tool to create a simple test API.
September 23, 2015
by Aniruddha Ranjekar
· 11,893 Views · 4 Likes
article thumbnail
2-Step Resource Versioning With Spring MVC
These two simple steps will allow you to configure versioned resource URLs in Spring MVC, allowing the browser to cache resources for an unlimited time and update version info on the URL when a resource is changed.
September 22, 2015
by Michael Scharhag
· 25,181 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,459 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,414 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,818 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,647 Views · 2 Likes
article thumbnail
Displaying Progress of Spring Application Startup in the Browser
When you restart your enterprise application, what do your clients see when they open the web browser?
September 21, 2015
by Tomasz Nurkiewicz
· 18,370 Views · 3 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,586 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,790 Views · 10 Likes
article thumbnail
Microservices Versus Microsegmentation
An exploration of the difference between the concepts of microservices and microsegmentation.
September 17, 2015
by Lori MacVittie
· 7,307 Views · 5 Likes
article thumbnail
Velocity Momentum: How to Make It Work for Project Planning and Management
Insights on how to make an average velocity concept a powerful tool for your Agile team.
September 17, 2015
by Darya Korsak
· 5,092 Views · 1 Like
article thumbnail
Optimizing a Hashing Strategy
Using two strategies in combination you can develop new hashing strategies to improve performance without having to use more memory or much more CPU.
September 16, 2015
by Peter Lawrey
· 14,169 Views · 1 Like
  • Previous
  • ...
  • 1464
  • 1465
  • 1466
  • 1467
  • 1468
  • 1469
  • 1470
  • 1471
  • 1472
  • 1473
  • ...
  • 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
×