Welcome To Snipplr


Everyone's Recent Snippets Tagged java



Change the generic class to whatever class you wish. JSON arrays, types etc, are not handled, you should do that. Purpose of this snippet is to deserialize only needed JSON keys with respect to the class members of your class.
0 554 posted 8 years ago by mindinmotionmkd
Iterating through a Dropbox Folder
0 321 posted 8 years ago by RobinD
FIll a List<Character> with ASCII (0-127) characters with a given number of characters.
0 404 posted 8 years ago by borysn
Generic method for printing a list to the console based on the number of characters per line.
0 340 posted 8 years ago by borysn
A simple http server, from java JDK.
0 373 posted 8 years ago by alexedy
From Java Concurrency in practice
0 343 posted 8 years ago by fahrenx
Iterating through cursor
0 389 posted 8 years ago by noloman
Custom task using gradle java plugin for build runnable jar file with full dependencies set
0 461 posted 8 years ago by alces
don't forget to add jfxrt.jar to class path
0 379 posted 8 years ago by alexedy
How to convert a drawable to a bitmap
0 379 posted 8 years ago by noloman
A simple way of correcting tests with Java. In this piece of code I just defined two possible models or answers, they're all random, but the only thing needed is to update them with valid answers. The length of the test? I just did it for a 10-questi...
0 355 posted 8 years ago by eiger824
A basic database made in Java. It resembles a mobile phone contacts activity in which user is prompted to introduce some data of new contacts.
0 400 posted 8 years ago by eiger824
A simple Text Encoder.
1 391 posted 8 years ago by eiger824
Web aplikacija generira slučajne registracijske oznake za grad Zagreb u odabranom formatu. Ispisuje se i broj mogućih različitih registracijskih tablica za taj format.
0 293 posted 8 years ago by DSTG_Kwan
When Domino is used to create a webservice consumer, it does not provide an easy way to add SOAP headers to method calls. To do so, extend the STUB class it provides, copy any methods that need SOAP headers, and insert a line after the 'createCall'...
0 332 posted 8 years ago by lspellman
Some webservices require a SOAP header to be added to requests (typically with authentication information). For Domino webservice consumer code, this can be handled by extending the generated stub class and rewriting the service calls that are being...
0 359 posted 8 years ago by lspellman
Reverse a linked list using Java.
0 344 posted 8 years ago by djangofan
Para genera clases de RMI skel y stub en proceso distribuidos
0 365 posted 9 years ago by thescorpion
Just a simple code snippet that uses cmd to send an ExtendScript to an application like Photoshop® or InDesign®.
0 238 posted 9 years ago by layouterlimits
Obtener el cursor de oracle y recorrerlo para sacar los datos
0 974 posted 9 years ago by thescorpion
Procedimiento para retornar un Cursor y recorrerlo en Java
0 579 posted 9 years ago by thescorpion
This is a code snippet that retrieves the signatures from a pdf document and the reason for them. It does that in approximately 200ms for one signature.
0 455 posted 9 years ago by alexedy
A useful utility class to identify Throwables by creating a checksum (using a message digest, such as MD5 or SHA1) of its stack trace
0 220 posted 9 years ago by dwijnand
It's no fun implementing QuickSort unless you can force it out of its blister-fast, O(n log n) speed and humiliate it with its worst-case, O(n^2) runtime. So that's what I set out to do. My naive partition simply pivots around the low item, but...
0 354 posted 9 years ago by rtperson
Check duplicated classes in multiple jars
0 342 posted 9 years ago by kamilch
Projecto de LabP01 que consiste na criação de uma classe que permite efectuar operações sobre ficheiros de texto.
0 320 posted 9 years ago by N-genhocas
Classe Singleton
0 273 posted 9 years ago by kajinka13
Importare i metodi statici
0 263 posted 9 years ago by kajinka13
For impl of 'simpleLog', in eclipse, the default instructions did not work for me , providing LEVEL_ALL logs until i added one additional prop not mentioned in the link
0 307 posted 9 years ago by rowntreerob
Número aleatorio entre a y a + b, excluyendo a + b: a + Math.random() * b
0 308 posted 9 years ago by goo