JavaPins - Stories tagged with Java
1
Pins

Java Memcached on Mac OS X - Java Code Geeks

posted by anishaanisha 286 days, 22 hours, 21 minutes ago
Friday, August 10, 2012 5:36:36 PM GMT
In this article I will explain how you can: Install and Configure Memcached on Mac OS XUse Memcached in your Java Application I won't go in too much detail about the benefits of using a distributed cache in your applications, but let's at least provide some use cases for applications that are running in the context of an enterprise portal, eXo Platform in my case - surprising isn't? And I will show this in another post. (more)
category: Java EE | clicked: 0 | comment | | source: www.javacodegeeks.com
tags: Java, Mac OS X, memcached
1
Pins

The Perfect Singleton - Java Code Geeks

posted by anishaanisha 287 days, 40 minutes ago
Friday, August 10, 2012 3:17:33 PM GMT
And I’m not talking about proper implementation in threaded environment. But using the most common implementation you can find over internet you can easily create as many singletons as you like. (more)
category: Java EE | clicked: 1 | comment | | source: www.javacodegeeks.com
tags: Java, Singleton
1
Pins

Java Naming Conventions - Java Code Geeks

posted by anishaanisha 287 days, 41 minutes ago
Friday, August 10, 2012 3:15:52 PM GMT
I wanted to write this short post to help certain people who are having a hard time memorizing the Java API classes and Method names. As you know Java is a case sensitive language and to build Java programs you need to use a lot of Built-in API classes and methods. And beginners find it really hard to memorize the method names and Class names exactly without changing the case. (more)
category: JAVA | clicked: 0 | comment | | source: www.javacodegeeks.com
tags: Java, naming convention
1
Pins

Java 7 - Project Coin Decompiled - Java Code Geeks

posted by anishaanisha 287 days, 46 minutes ago
Friday, August 10, 2012 3:11:22 PM GMT
Hi all, it's time to start writing in 2012. As you may have seen already in other blogs, there are a few changes that can make your developer life a lot easier when programming in Java: diamond operator, Strings in Switch, try with resources, multi catch, etc. (more)
category: Java EE | clicked: 0 | comment | | source: www.javacodegeeks.com
tags: Decompiler, Java, project coin
1
Pins

Java pitfalls: Field access in inner classes - Java Code Geeks

posted by anishaanisha 287 days, 48 minutes ago
Friday, August 10, 2012 3:09:00 PM GMT
This is not a “pitfall” per se, but an implementation detail worth knowing. Let’s say I have a inner class with a field. Such a field is visible to the enclosing class, but which one of the following ways is the fastest way to access it? (more)
category: JAVA | clicked: 1 | comment | | source: www.javacodegeeks.com
tags: field access, inner classes, Java, Pitfalls
1
Pins

Java Fork/Join for Parallel Programming - Java Code Geeks

posted by anishaanisha 287 days, 6 hours, 10 minutes ago
Friday, August 10, 2012 9:46:58 AM GMT
The last few years a paradigm shift is taking place in the field of computer processors. For years, processor makers consistently delivered increases in clock rates, so developers enjoyed the fact that their single-threaded software executed faster without any effort from their part. Now, processor makers favor multi-core chip designs, and software has to be written in a multi-threaded or multi-process manner to take full advantage of the hardware. Thus, the only way for software developers to catch up i... (more)
category: JAVA | clicked: 0 | comment | | source: www.javacodegeeks.com
tags: Fork, Java, Join, parallel programming
1
Pins

Secure Encryption in Java - Java Code Geeks

posted by anishaanisha 287 days, 6 hours, 41 minutes ago
Friday, August 10, 2012 9:16:44 AM GMT
Last time I wrote about cryptography, I outlined Apache Shiro crypto API and shown how to use its two symmetric ciphers. I also wrote that "You do not need more to encrypt and decrypt sensitive data in your applications." (more)
category: Java EE | clicked: 0 | comment | | source: www.javacodegeeks.com
tags: Encryption, Java
1
Pins

Introduction to Strong Cryptography - Java Code Geeks

posted by anishaanisha 287 days, 6 hours, 41 minutes ago
Friday, August 10, 2012 9:15:58 AM GMT
One thing that amazes me is that the most developers are not familiar with strong cryptography. In my career, I’ve seen all sort of mistakes that lead to leaked data, guessable passwords, unfortunate disclosures, and worse. The nice thing is, you don’t have to understand the ridiculously complex math behind the algorithms, you only have to know the rules for using them correctly. By the end of this series, my goal is to de-mystify the magic, so you can start using the primitives in your code right away! (more)
category: Java EE | clicked: 0 | comment | | source: www.javacodegeeks.com
tags: Cryptography, Java
1
Pins

Solving a Producer-Consumer Problem in Java - Java Code Geeks

posted by anishaanisha 287 days, 6 hours, 46 minutes ago
Friday, August 10, 2012 9:11:32 AM GMT
The producer-consumer problem is one of the most frequently encountered problems when we attempt multi threaded programming. While not as challenging as some of the other problems in multi-threaded programming, an incorrect implementation of this problem can create a mess of your application. Produced items will be left unconsumed, starting items will be skipped, consumption depends on whether the production began earlier or later than consumption attempts etc. To add to this you might notice the anomali... (more)
category: Java EE | clicked: 0 | comment | | source: www.javacodegeeks.com
tags: Java, producer consumer problem
1
Pins

Java Concurrency with ReadWriteLock - Java Code Geeks

posted by anishaanisha 287 days, 6 hours, 48 minutes ago
Friday, August 10, 2012 9:09:15 AM GMT
Writing multithreaded java applications is not a piece of cake. Extra care must be taken because bad synchronization can bring your application to its knees. The JVM heap is shared by all the threads. If multiple threads need to use the same objects or static class variables concurrently, thread access to shared data must be carefuly managed. Since version 1.5, utility classes commonly useful in concurrent programming is included in the JSDK. (more)
category: JAVA | clicked: 0 | comment | | source: www.javacodegeeks.com
tags: concurrency, Java, readwrite lock
1
Pins

Java Compression - Java Code Geeks

posted by anishaanisha 287 days, 6 hours, 50 minutes ago
Friday, August 10, 2012 9:07:21 AM GMT
In a recent project, we had to do something I had personally never really had to look at; Compression. We needed to take a couple files and images, zip them up and make them available for FTP, and yes somedays it does feel like we are back in the 90's. Besides the FTP trip into the past its was good opportunity to spend a little bit of time on the subject. (more)
category: JAVA | clicked: 0 | comment | | source: www.javacodegeeks.com
tags: compression, Java
1
Pins

Java Best Practices – Char to Byte and Byte to Char conversions - Java Code Geeks

posted by anishaanisha 287 days, 6 hours, 52 minutes ago
Friday, August 10, 2012 9:04:50 AM GMT
Continuing our series of articles concerning proposed practices while working with the Java programming language, we are going to talk about String performance tunning. Especially we will focus on how to handle character to byte and byte to character conversions efficiently when the default encoding is used. This article concludes with a performance comparison between two proposed custom approaches and two classic ones (the "String.getBytes()" and the NIOByteBuffer) for converting characters to bytes and... (more)
category: Java EE | clicked: 1 | comment | | source: www.javacodegeeks.com
tags: byte, Char, Conversion, Java
1
Pins

Automaton implementation in Java - Java Code Geeks

posted by anishaanisha 287 days, 6 hours, 54 minutes ago
Friday, August 10, 2012 9:03:39 AM GMT
This post will address the problem of implementing finite states machines into java. If you don’t know what FSM are or where can be used you may be keen on reading this, this and this. (more)
category: Java EE | clicked: 0 | comment | | source: www.javacodegeeks.com
tags: Automation, Implementation, Java
1
Pins

Functional style in Java with predicates - Part 2 - Java Code Geeks

posted by anishaanisha 287 days, 7 hours, 3 minutes ago
Friday, August 10, 2012 8:54:21 AM GMT
In the first part of this article we introduced predicates, which bring some of the benefits of functional programming to object-oriented languages such as Java, through a simple interface with one single method that returns true or false. In this second and last part, we’ll cover some more advanced notions to get the best out of your predicates. (more)
category: JAVA | clicked: 0 | comment | | source: www.javacodegeeks.com
tags: Functional Style, Java, Predicates
1
Pins

Functional style in Java with predicates - Part 1 - Java Code Geeks

posted by anishaanisha 287 days, 7 hours, 4 minutes ago
Friday, August 10, 2012 8:53:35 AM GMT
You keep hearing about functional programming that is going to take over the world, and you are still stuck to plain Java? Fear not, since you can already add a touch of functional style into your daily Java. In addition, it’s fun, saves you many lines of code and leads to fewer bugs. (more)
category: Java EE | clicked: 0 | comment | | source: www.javacodegeeks.com
tags: Functional Style, Java, Predicates
1
Pins

Java: Faking a closure with a factory to create a domain object - Java Code Geeks

posted by anishaanisha 287 days, 7 hours, 5 minutes ago
Friday, August 10, 2012 8:52:32 AM GMT
Recently we wanted to create a domain object which needed to have an external dependency in order to do a calculation and we wanted to be able to stub out that dependency in our tests. Originally we were just new’ing up the dependency inside the domain class but that makes it impossible to control it’s value in a test. (more)
category: Java EE | clicked: 0 | comment | | source: www.javacodegeeks.com
tags: domain object, Java
1
Pins

Functional programming with Map and Fold in Java - Java Code Geeks

posted by anishaanisha 287 days, 7 hours, 8 minutes ago
Friday, August 10, 2012 8:49:46 AM GMT
In functional programming, Map and Fold are two extremely useful operators, and they belong to every functional language. If the Map and Fold operators are so powerful and essential, how do you explain that we can do our job using Java even though the Java programming language is lacking these two operators? The truth is that you already do Map and Fold when you code in Java, except that you do them by hand each time, using loops. (more)
category: Java EE | clicked: 0 | comment | | source: www.javacodegeeks.com
tags: functional programming, Java, Map
1
Pins

NetBeans 7.1: Create a Custom Hint - Java Code Geeks

posted by anishaanisha 287 days, 7 hours, 9 minutes ago
Friday, August 10, 2012 8:48:06 AM GMT
I have talked about some of my favorite NetBeans hints in the posts Seven NetBeans Hints for Modernizing Java Code and Seven Indispensable NetBeans Java Hints. The fourteen hints covered in those two posts are a small fraction of the total number of hints that NetBeans supports "out of the box." However, even greater flexibility is available to the NetBeans user because NetBeans 7.1 makes it possible to write custom hints. I look at a simple example of this in this post. (more)
category: JAVA | clicked: 0 | comment | | source: www.javacodegeeks.com
tags: Java, NetBeans 7.7.1
1
Pins

Eclipse Code Formatting Tips - Java Code Geeks

posted by anishaanisha 287 days, 7 hours, 15 minutes ago
Friday, August 10, 2012 8:41:50 AM GMT
I have been assigned lately some code review/ quality code fix tasks, on a large enterprise Java project and I am trying to assist the existing software development team, while waiting to resume my old duties on another project. (more)
category: JAVA | clicked: 0 | comment | | source: www.javacodegeeks.com
tags: code formatting, Eclipse, Java
1
Pins

Five useful ways to sorting in java - Java Code Geeks

posted by anishaanisha 287 days, 7 hours, 23 minutes ago
Friday, August 10, 2012 8:34:38 AM GMT
A rapid overview of java sorting : (more)
category: JAVA | clicked: 0 | comment | | source: www.javacodegeeks.com
tags: Java, Sorting
Previous 1 2 ... 7 8 9 10 11 12 13 14 15 16 ... 41 42 Next