Data dodania Pytanie
2018-02-05 02:02 calculate maximum sum if same number is picked from continuous segment »
calculate maximum sum if same number is picked from continuous segment [1,2,3,4] => answer 6 if 1 is picked from continuous segment [1,1,1,1] the...
(2) odpowiedzi
2018-02-04 15:02 Java API Streams collecting stream in Map where value is a TreeSet »
There is a Student class which has name, surname, age fields and getters for them. Given a stream of Student objects. How to invoke a collect metho...
(2) odpowiedzi
2018-02-04 15:02 org.openqa.selenium.WebDriverException: unknown error: call function result missing 'value' »
Sendkeys not working. Please help me to resolve this.. WebElement username = driver.findElement(By.xpath("//*[@id='username']")); username.send...
(1) odpowiedzi
2018-02-04 14:02 Run benchmark on method using completable future »
I'm trying to measure the performance of a particular method. I run the benchmarks just fine when calling the method directly, but when the method use...
(1) odpowiedzi
2018-02-04 02:02 Latest Open JDK 8 JAXB library fails to unmarshal objects with properties that contain new line characters »
I am using Java on Ubuntu 16.04. Recently I upgraded to Open JDK java version "1.8.0_161" installed using the oracle-java8-installer package (package ...
(0) odpowiedzi
2018-02-04 01:02 Create a nested parent child list in Java 8 »
I am new to Java 8 and need a solution to the below problem. I have two classes as below: class Person { String name; int age; List<A...
(4) odpowiedzi
2018-02-04 00:02 Tomcat/Confluence: very long TLS handshake at start »
I'm running Confluence on a Ubuntu 16.04. It runs fine through HTTP:8090 and HTTPS:8443. Certs are from Let's Encrypt. Connections from a browser as w...
(3) odpowiedzi
2018-02-03 19:02 jOOQ - build UPDATE FROM psql query »
How to build the following PSQL query to update multiple records using jOOQ 3.10.x? UPDATE users SET name = s.name, city = s.city FROM users_stagin...
(1) odpowiedzi
2018-02-03 18:02 java, how to do something until callback »
here's the interface: public interface BitmapCallBackInterface { void onCallBack(Bitmap bitmap); } and here's the method and calling it: public ...
(1) odpowiedzi
2018-02-03 18:02 Intent URL to open the Facebook app to a groups page »
I am trying to open the Facebook app from inside my app using an intent. I am using codename one to create my app and I am trying to link to a faceboo...
(0) odpowiedzi
2018-02-03 12:02 group match toUpperCase() »
Let's consider the following example: String s = str.replaceAll("regexp", "$1"); Some languages allow us to specify \U$1 in place of $1 which conve...
(2) odpowiedzi
2018-02-03 12:02 Catching a generic exception »
Problem I am writing a Result type in Java, and I have found a need for it to have a method that performs an operation which may fail, and then encap...
(3) odpowiedzi
2018-02-03 10:02 Variable (dialogView) is accessed from within inner class, needs to be declared final »
I am trying to create an alert dialog with a layout Yes or No. I want to dismiss the dialog by clicking the 'No' button but dialogView.dismiss(); has ...
(2) odpowiedzi
2018-02-03 08:02 Out of the java.util.stream.Stream interfaces's two collect methods, is one of them poorly constructed? »
In java.util.stream.Stream interface, <R> R collect(Supplier<R> supplier, BiConsumer<R, ? super T> accumulator, ...
(3) odpowiedzi
2018-02-03 00:02 Java 8/9: Can a character in a String be mapped to its indices (using streams)? »
Given a String s and a char c, I'm curious if there exists some method of producing a List<Integer> list from s (where the elements within list ...
(4) odpowiedzi
2018-02-02 19:02 Converting Pair of Double into a double array »
I got the following structure public class Point { private final double x; private final double y; // imagine required args constructor and getter fo...
(4) odpowiedzi
2018-02-02 18:02 Execution of `mappingFunction` in ConcurrentHashMap.computeIfAbsent and ConcurrentHashMap.computeIfPresent »
I am trying to see actual Java documentation describing the behavior of how many times mappingFunction can be called when passed to ConcurrentHashMap...
(1) odpowiedzi
2018-02-02 18:02 Java FileUtils.writeByteArrayToFile using in coldfusion »
I'm converting some java code to ColdFusion. I've figured out most of it except for this section: String passKey = "D:\\tmp\\passbook\\key\\pass.p12"...
(1) odpowiedzi
2018-02-02 16:02 Getting all results from ResultSet »
I am getting a ResultSet of type ArrayList<MyClass> and all is working well, except it's not getting the first item from the list. It seems thi...
(3) odpowiedzi
2018-02-02 15:02 Java: replace switch with lambdas. Worth it? »
Using blocks of code with switch or if is a common thing when checking for events. It can be clean code when made simple, but still seems to have more...
(4) odpowiedzi
2018-02-02 13:02 condition statement without if and switch »
I have this code : public static void main(String[] args){ boolean greeting = true; //or false if(greeting) hello(); } public...
(8) odpowiedzi
2018-02-02 11:02 Both vacuum_count and analyze_count are zero after VACUUM ANALYZE »
I've written a unit test which modifies a table (INSERT's and DELETE's), then manually VACUUM's and ANALYZE's it, and then I query pg_stat_user_tables...
(0) odpowiedzi
2018-02-01 22:02 Updating sunspot gem from 2.0.0 to 2.2.7 leads to StandardDescriptorProcessor NO JSP Support for /solr »
This has been a pain in my neck for most of the day. I'm upgrading a Rails application from 4.0.3. I've currently got it successfully upgraded to 4.1....
(0) odpowiedzi
2018-02-01 17:02 Work-stealing parallel job doesn't seem to steal much work »
The idea is to run a parallel job on a 96-cores machine, with a work stealing ForkJoinPool. Below is the code I'm using so far: import scala.collect...
(1) odpowiedzi
2018-02-01 15:02 Web app security architecture »
I have a Java Spring driven REST API server connecting with PostgreSQL database and a Spring Web Server in Java that is serving content from the REST ...
(2) odpowiedzi
2018-02-01 14:02 Add to List value on HashMap »
I'm populating a hashmap to have my Objects grouped by one of their attributes. I find it 'ugly' to check if the list (the value) exists before adding...
(4) odpowiedzi
2018-02-01 14:02 Java 8 : Get files from folder / subfolder »
I have this folders inside the resources folder of a SpringBoot app. resources/files/a.txt resources/files/b/b1.txt resources/files/b/b2.txt resource...
(2) odpowiedzi
2018-02-01 09:02 How do I prove programatically that StringBuilder is not threadsafe? »
How do I prove programmatically that StringBuilder is not threadsafe? I tried this, but it is not working: public class Threadsafe { public stat...
(3) odpowiedzi
2018-01-31 22:01 How do I get the raw script output instead of the query result from an Oracle SQL select in Java »
I need to backup some data as INSERT statements through a Java application. The most straight-forward approach I could find in SQL Developer was runni...
(1) odpowiedzi
2018-01-31 20:01 Java boolean-algorithm to check wheter number of digits is even »
I´m trying to write a recursive method that returns true, if the count of digits of n displayed as a binary number is even and false if it is odd. I ...
(4) odpowiedzi
2018-01-31 18:01 Java: Is it possible to exclude taking something from a super class »
I'm working on an assignment dealing with class inheritance and have everything done and working properly except for a string format method. The outpu...
(3) odpowiedzi
2018-01-31 17:01 Tomcat 8.5 anti-CSRF nonce not being generated »
I have a web application that runs on Tomcat 8.5. I would like to update the application to rely on Tomcats native anti-CSRF tokens to protect key POS...
(1) odpowiedzi
2018-01-31 06:01 Java String replaceAll Recursive behavior »
Yesterday I was working on customized letters and memos. And I have made mapping keywords, like: [Dateofbirth], [Email], [Employee], [Salary] etc, whi...
(7) odpowiedzi
2018-01-30 22:01 How can I force CFHTTP not to encode a query parameter? »
I have been using ColdFusion 10 with JVM 1.6 to communicate with an AS400 API to fetch data for a client's web site. I send a URL query parameter that...
(0) odpowiedzi
2018-01-30 13:01 Comparing performance of Collectors.summingLong and Collectors.counting »
Benchmarks are run under intel core i5, Ubuntu java version "1.8.0_144" Java(TM) SE Runtime Environment (build 1.8.0_144-b01) Java HotSpot(TM) 64-Bit...
(1) odpowiedzi