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

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,813 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,068 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,123 Views · 6 Likes
article thumbnail
Recipe: rsyslog + Kafka + Logstash
Here's a similar follow up to the previous rsyslog + Redis + Logstash recipe, this time with Kafka instead of Redis.
October 8, 2015
by Radu Gheorghe
· 15,527 Views · 8 Likes
article thumbnail
The Best DevOps Tools on OSX
A list of tools you can use with you OSX devices for DevOps and agile processes.
October 8, 2015
by Dustin Collins
· 18,260 Views · 9 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,235 Views · 6 Likes
article thumbnail
Microservices and Kerberos Authentication
How to use Kerberos authentication with microservice architectures and API gateways.
October 6, 2015
by Jethro Bakker
· 19,025 Views · 7 Likes
article thumbnail
Running a WildFly Docker Image on OpenShift Origin
This is a quick tip on how to get a vanilla Java Docker image running on the OpenShift Origin open source cloud platform, complete with the WildFly Java EE application server.
October 6, 2015
by Markus Eisele
· 7,557 Views · 6 Likes
article thumbnail
Gradle Goodness: Download Javadoc Files For Dependencies In IDE
By default, sources of a dependency are downloaded and added to a project, but not Javadoc sources. Gradle can use IntelliJ IDEA and Eclipse project files to download them.
October 3, 2015
by Mohammed Rahmatullah
· 20,407 Views · 5 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,329 Views · 5 Likes
article thumbnail
Picture That: How to Write Text on an Image Using ASP.NET & C#
You can write text on an image with ASP.NET and C#. Learn how.
September 26, 2015
by Rajeesh Menoth
· 26,712 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,687 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,114 Views · 3 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,042 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,367 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,315 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,734 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,389 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,257 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,461 Views · 6 Likes
  • Previous
  • ...
  • 778
  • 779
  • 780
  • 781
  • 782
  • 783
  • 784
  • 785
  • 786
  • 787
  • ...
  • 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
×