![Advanced Java generics: retreiving generic type arguments](https://cdn-ak-scissors.b.st-hatena.com/image/square/af18170079aff36ca4f30aa93a030be33cd928a6/height=288;version=1;width=512/https%3A%2F%2Fwww.javacodegeeks.com%2Fwp-content%2Fuploads%2F2012%2F10%2Fjava-logo.jpg)
Keyhole SoftwareSeptember 24th, 2014Last Updated: September 24th, 2014 In my previous article covering Java Annotations, I outlined a recent use case and provided you with some examples of custom annotations and how they might be used. In this article, I’m going to take that a step further and give you a few examples of custom annotations and how you would process these custom annotations using th
Dustin MarxDecember 6th, 2013Last Updated: December 6th, 2013 In the post Common Red Flags in Java Development I looked at some practices that are not necessarily wrong or incorrect in and of themselves, but can be indicative of potentially greater problems. These “red flags” are similar to the concept of “code smells” and some of the particular “red flags” I cite in this post have been called “co
Iris ShoorDecember 6th, 2013Last Updated: December 6th, 2013 Java debugging is a complex space. There are many types of debuggers, and numerous tools to choose from. In this page, we’ll cover the differences between 7 types of debuggers, and review the major tools in each category to help you choose the right tool for the right job. Here are the types of debuggers we cover: CLI debuggersIDE debugg
Baskaran ChinnusamyDecember 8th, 2013Last Updated: December 6th, 2013 Mostly nested transaction was implemented using EJB , now we try to implement the nested transaction on POJO. Here we have used the feature of ThreadLocal. Understanding Nested TransactionTransactions can be nested one inside another. So the inner transaction or outer transaction can be rollback or commit without affecting the
Attila Mihaly BalazsDecember 14th, 2013Last Updated: December 14th, 2013 A decompiler, simply put, attempts to reverse the transformation of source code to object code. But there are many interesting complexities—Java source code is structured; bytecode certainly isn’t. Moreover, the transformation isn’t one-to-one: two different Java programs may yield identical bytecode. We need to apply heurist
Peter LawreySeptember 22nd, 2014Last Updated: September 22nd, 2014 OverviewJava 8 has added features such as lambdas and type inference. This makes the language less verbose and cleaner, however it comes with more side effects as you don’t have to be as explicit in what you are doing. The return type of a lambda mattersJava 8 infers the type of a closure. One way it does this is to look at the ret
Alex ZhitnitskySeptember 23rd, 2014Last Updated: September 30th, 2014 Raygun, Stack Hunter, Sentry, Takipi and Airbrake: Modern developer tools to help you crush bugs before bugs crush your app! With the Java ecosystem going forward, web applications serving growing numbers of requests and users’ demand for high performance – comes a new breed of modern development tools. A fast paced environment
Nikita Salnikov TarnovskiSeptember 23rd, 2014Last Updated: September 23rd, 2014 The inspiration for this post came after stumbling upon “Pig in the Python” definition in the memory management glossary. Apparently, this term is used to explain the situation where GC repeatedly promotes large objects from generation to generation. The effect of doing so is supposedly similar to that of a python swal
Aldo ZiflajSeptember 26th, 2014Last Updated: September 22nd, 2014 In this example we will discuss about Inet4Address and its usage. Inet4Address represents an Internet Protocol version 4 (IPv4) address. Inet4Address is a subclass of InetAddress class, which represents either a 32-bit or 128-bit unsigned number used as an IP, the lower-level protocol on which protocols like UDP and TCP are built. T
In this article we will discuss about the Locale class from java.util package. The Locale is used to make the system relevant and usable for the users from different cultures. In other words, it is used to customize the system for different people of different region, culture and language. A Locale object represents a specific geographical, political, or cultural region. Let’s discuss about the Lo
EDITORIAL NOTE: In this post, we feature a comprehensive Java 8 Features Tutorial. It’s been a while since Java 8 is out in the public and everything points to the fact that this is a really major release. We have provided an abundance of tutorials here at Java Code Geeks, like Playing with Java 8 – Lambdas and Concurrency, Java 8 Date Time API Tutorial : LocalDateTime and Abstract Class Versus I
環境変数に仕込まれたコードを実行してしまうBASHの脆弱性が CGIスクリプトに影響を与えるか試してみたら結果は悲惨な感じに Tweet 2014年9月25日 嶋田大貴 この記事は2014年のものです 朝から Bash specially-crafted environment variables code injection attack なるもので騒ぎになっていたので、さっそく手元の Apacheで試してみました。 /hoge.cgiというURIで実行されるように、一行のメッセージを出力するだけの CGIスクリプトを設置します。いっけん、なんの入力もクライアント側から受け付けていないため危険のありようもなく見えます。 #!/bin/sh echo "Content-type: text/plain" echo echo "Hi! I'm an ordinary CGI script w
In this article, we will discuss about the logging functionality in Java. Logging in simple words refers to the recording of an application activity. Logging is used to store exceptions, information, and warnings as messages that occur during the execution of a program. Logging helps a programmer in the debugging process of a program. Java provides logging facility in the java.util.logging package
In this example, we will show the range of functionality provided by the java.net.URL class. This class represents a Uniform Resource Locator, a pointer to a “resource” on the World Wide Web. An URL is a text string that identifies a resource, tells where to find it, and specifies a method for communicating with it or retrieving it from its source. URLs can have many forms. The most common form ha
英語を好きな人でも、リーディングが苦手という人も多いはず。 リーディング力は、英文を闇雲に読んで上がるものではない。勉強のコツや目的をしっかり知っておくことが大切である。 本記事では、一見難しそうなリーディングの勉強法について紹介していこう。 英語の「リーディング力」を上げるコツ 英語のリーディング力を上げるには、一体何に気をつければいいのだろうか。 以下に3つのリーディングのコツを紹介しよう。 【英語リーディングのコツ①】日本語で考えない リーディングの勉強法として「英文を全て日本語に訳す」というものがあるが、この勉強法はおすすめしない。 何故ならいちいち英文を日本語で訳していては、時間がかかり、疲れてしまうからだ。 日本語として理解するために英文を文末から読んだりせずに、英語脳に切り替えて「文頭から読むこと」を心がけてほしい。 英語を英語で理解することができれば、リーディング力は格段に
C++11の標準ライブラリ<thread>を使った並列化 大量のデータを分割し、複数のスレッドに分担させて処理時間を稼ぐことを考えます。スレッドに関わるAPIは、WindowsならCreateThreadやWaitForNltipleObjectなど、Linuxならpthread_xxxxと、OSによって異なるのですが、C++11では標準ライブラリ<thread>がOSごとの差異を吸収してくれているのが嬉しいところ。大量のデータを詰め込んだvectorを2つのスレッドでソートしてみます。 #include <iostream> // cout, endl #include <thread> // thread #include <algorithm> // inplace_merge, etc. #include <chrono> // clock, time_point, duratio
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く