Data dodania Pytanie
2017-12-09 22:12 Find max nested list count »
I have this class object called Person public class Person { .... private List<Person> people; .... public List<Person> g...
(4) odpowiedzi
2017-12-09 22:12 Creating BSS files from CSS in JavaFX 9 »
I'm in the progress of upgrading my project to Java 9 due to Eclipse upgrade breaking APT in Java < 9 when working with Dagger 2. I used to gener...
(0) odpowiedzi
2017-12-09 20:12 findViewById() not finding custom view but it exists in layout »
Somehow my acitivity_main.xml has the view BottomSelectElement (custom view) but I cannot find it in the activity, but I can find anything else. acti...
(1) odpowiedzi
2017-12-09 17:12 Separating software by utils, data classes and "controllers" »
My company creates software that transforms data, for example csv to xml. I noticed that mostly all classes (we use Java) can be assigned to one of th...
(0) odpowiedzi
2017-12-09 16:12 rxJava debounce operator not working with Observable.range() »
AFAIK, the debounce() operator of rxJava is used for delaying emission of events. When I apply it with the search box it work normally: RxTextView.te...
(1) odpowiedzi
2017-12-09 14:12 Hackerearth NZEC »
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.*; import java.util.Scanner; public class TestClass { public st...
(0) odpowiedzi
2017-12-09 08:12 How to converted dataTable from request Spring Boot »
i'm learning programming and want use DataTables and i have a problem. I don't know how to converted records... I have code in spring boot @Request...
(2) odpowiedzi
2017-12-09 01:12 Listing all the Games »
Following a question here OP is interested in listing all unique 2x2 games. Games here are game theory games in which there with two players and two s...
(1) odpowiedzi
2017-12-09 01:12 Adding values to HashMap without casting »
I have an interface called InterA which has a method call operate() that has its return value as Result. public interface InterA<T> { Res...
(3) odpowiedzi
2017-12-08 22:12 Getting Cognito Credentials on Android »
I need to authenticate a user using AWS's Cognito in Android and get a token to use on my future requests. Some information is provided to me by the b...
(1) odpowiedzi
2017-12-08 20:12 Java's FilterOutputStream adds a performance penalty »
I have a piece of code that's splitting an output stream to two destinations. They're both going to a file, but the second destination will go throu...
(1) odpowiedzi
2017-12-08 17:12 How can java.lang package contain java.security.Permission »
I am not sure about the java.lang Hierarchy. How can it contain java.security.Permission class? Follow the link and search for java.security.Permissio...
(1) odpowiedzi
2017-12-08 16:12 Converting code in Java 8 streams »
Is there any easy way to convert this code into java 8 using streams and forEach. List<List<IStitchable>> listOfEnvelopes = new ArrayList...
(1) odpowiedzi
2017-12-08 15:12 Using Java, take in a Json message, find a subset of fields, check said fields, then map to new Code values and export as Json »
Okay, I'm new to using Json in Java and heres what I'm looking to do. Using Java I'm taking in a Json message, something like: { "toy": [ ...
(1) odpowiedzi
2017-12-08 13:12 Testing Speed of Various Sorting Algorithms »
I've just started learning about various algorithms, and I'm attempting to write a program that tests the speed between the algorithms and outputs the...
(0) odpowiedzi
2017-12-08 12:12 How to bulk delete records using temporary tables in Hibernate? »
I have a question. Where did these methods go? Dialect.supportsTemporaryTables(); Dialect.generateTemporaryTableName(); Dialect.dropTemporaryTableAft...
(1) odpowiedzi
2017-12-08 10:12 Access java classes inside .jar in Jruby »
I am currently developing my Jruby application which is contained inside a .jar file. Within the jar, my file structure looks like this: lib/launch....
(1) odpowiedzi
2017-12-08 09:12 Reading xlsx file using Java and sjxlsx api. Unable to get the original decimal data from xlxs »
I'm reading xlsx file using SimpleXLSXWorkbook class, below is the code. public static void testLoadALL( ) { SimpleXLSXWorkbook workbook =new S...
(0) odpowiedzi
2017-12-08 05:12 How to automatically generate model class from Json in Android »
I will share a way to generate class from Json in Android. Generate Java and Kotlin POJO files from JSON: GSON, AutoValue, Logan Square, FastJSON,...
(0) odpowiedzi
2017-12-07 19:12 obj == null vs null == obj »
I have always used to check for null like if(null==obj) When I compiled my code and looked into .class file after decompiling, I could see that my ...
(2) odpowiedzi
2017-12-07 18:12 Change WiFi hotspot's SSID and password in Android Oreo 8.x »
In my Android application I'm using the following code snippet: @RequiresApi(api = Build.VERSION_CODES.O) private void turnOnHotspot(){ WifiManag...
(1) odpowiedzi
2017-12-07 12:12 Converting List<Map<String, List<String>>> to String[][] »
I have a use case where I scrape some data, and for some records some keys have multiple values. The final output I want is CSV, which I have a librar...
(2) odpowiedzi
2017-12-07 09:12 Java streams: Add to map but avoid mutation »
I often find myself in a situation where I need to create a Map of objects from a Set or List. The key is usually some String or Enum or the like, and...
(3) odpowiedzi
2017-12-07 08:12 import class file in Jruby »
I have several scripts written in Jruby that I would like to obfuscate by converting them to .class files. But I am running into an error when I tried...
(1) odpowiedzi
2017-12-07 05:12 multithreading in Ruby vs JRuby vs Java »
I am new to Ruby and the JRuby and I was trying to implement multithreaded code in Ruby and came to know that GIL doesn't allow my code to run in para...
(1) odpowiedzi
2017-12-06 21:12 Why bother using lambda expressions in logging APIs if the compiler can possibly inline the logging call »
Many logging frameworks (e.g., log4j) allow you to pass lambda expressions instead of Strings to the logging API. The argument is that if the string i...
(3) odpowiedzi
2017-12-06 14:12 How do I avoid NullPointerExceptions in lambda comparators? »
I want to compare two given objects which might be null at runtime. In my example: @Test public void shouldCompareAgents() { Agent a1 = new Agen...
(3) odpowiedzi
2017-12-06 10:12 Dagger 2 ContributesAndroidInjector provide activity to module »
I'm trying to figure out a less-boilerplate-y way to implement an ActivityModule that is used in all of my app activities. This is my current setup: ...
(1) odpowiedzi
2017-12-05 16:12 Hibernate two ManyToOne relations on one Table, the first gets Eager and the second LAZY loaded »
I have got the following Entities, an item which can has up to two categories, a primary and a secondary. Both categories are mapped ManyToOne to the ...
(1) odpowiedzi
2017-12-05 12:12 Why does changing the type lead to different usage of members? »
So I was testing with some code snippets to wrap my head around the concept of inheritance, when I came across this - for me - strange phenomenon. So...
(2) odpowiedzi
2017-12-05 10:12 Declare array of lambdas in Java »
I'd like to create an array of lambda. The problem is that the lambda could be different from each other. Example: private interface I0 { int int...
(4) odpowiedzi
2017-12-05 09:12 Is there a Scala equivalent to JaxRS »
If I am coding in Java I can use JaxRS for my REST APIs with easy RPC setup when its server-to-server communication. I can (roughly) do the following...
(0) odpowiedzi
2017-12-05 04:12 JAX WS Server implementation performance issue for Linux JVM? »
I've faced with a very weird problem. The built-in JAX WS server implementation works 100 times slower on linux machines then on Mac OS X or Windows. ...
(1) odpowiedzi
2017-12-05 03:12 Why does this date parsing fail? »
I'm trying to convert a string into a LocalDateTime object. @Test public void testDateFormat() { String date = "20171205014657111"; DateTimeFor...
(1) odpowiedzi
2017-12-04 15:12 Is there a way to compare multiple (non-boolean) things at once using | or & in Java, similar to how you can catch multiple exceptions using |? »
Normally, I would have to type something like if(a == x || b == x) {...} But I saw that when using try/catch blocks, you can do stuff like this: ...
(1) odpowiedzi