Data dodania Pytanie
2017-03-13 19:03 How do I find what other pages users who have liked my page have liked? [facebook] »
I am using restfb version 2.0.0-rc.1 as the java library and eclipse for this. I have as of now just managed to get the number of likes on my page us...
(1) odpowiedzi
2017-03-13 17:03 Algorithm translate a number to String »
I need to design an algorithm where each number is encoded to an alphabet, for example: 1=A, 2=B, 3=C...26=Z Given a set of numbers, I have to t...
(4) odpowiedzi
2017-03-13 14:03 How to disable flash in Chrome »
My issue is : I need to disable flash for testing case when user doesn't have an installed flash in Chrome browser. Before updaing it works fine wi...
(2) odpowiedzi
2017-03-13 10:03 Android Facebook Invite »
I'm trying to integrate invite friends functionality to my application. I successfully implemented Facebook SDK and Facebook login but when I try to u...
(1) odpowiedzi
2017-03-13 09:03 How to define a member interface in a static context in java? »
The member interface can only be defined inside a top-level class or interface or in a static context. Case A: Interface within a top-level cla...
(1) odpowiedzi
2017-03-13 02:03 QuickSort vs MergeSort on arrays of primitives in Java »
I know that Java's Arrays.sort method uses MergeSort for sorting arrays of objects (or collections of objects) since it is stable, and Java uses Quick...
(4) odpowiedzi
2017-03-12 21:03 Kotlin extension clash »
If I have a jar, on the classpath, where I've created an extension function on say the String class for argument's sake and I have another jar with th...
(2) odpowiedzi
2017-03-12 17:03 Spring-Boot, Mysql DB - can't connect to database »
I am trying to connect to mysql database, but it's not working. I took a course from udemy and followed all steps, but i am getting always the same er...
(2) odpowiedzi
2017-03-12 17:03 java program to monitor a directory »
hey guys i want to create a program that monitor a directory 24/7 and if a new file is added to it then it should sort it if the file is greater then ...
(1) odpowiedzi
2017-03-12 17:03 Using lambda expressions with non-functional interfaces in Java »
I have a bunch of animation listeners in my code where only one method in the interface used the majority of the time. So I created this wrapper: pu...
(3) odpowiedzi
2017-03-12 17:03 Concatenate Array in Java by Reference »
I would like to concatenate an array in Java by reference like so. int[] a = new int[] {1,2,3}; int[] b = new int[] {4,5,6}; int[] ab = concatArrayBy...
(3) odpowiedzi
2017-03-12 15:03 Transition effects with Android ImageView »
I have an ImageView and when it is clicked it has to change image using a transition (e.g. fading, scrolling, ...). How can I do this? I tried this c...
(1) odpowiedzi
2017-03-12 10:03 How to WAP in Java to print an input string from the User and then sort it in order of Dictionary? »
I came across a challenge that accepts an input string from the User and then sort the words in alphabetical order of Dictionary. Example: "Hi My Name...
(0) odpowiedzi
2017-03-12 00:03 How can I call Kotlin methods with reified generics from Java? »
I have the following method in Kotlin: inline fun <reified T> foo() { } If I try to call this from Java like this: myObject.foo(); OR lik...
(1) odpowiedzi
2017-03-11 23:03 How can I store reified type data in instance fields in Kotlin? »
I'm currently writing a DSL for a library and I'd like to supply type metadata using reified type parameters like this: val config = Config.creat...
(2) odpowiedzi
2017-03-11 11:03 Android studio error: An error occurred while trying to compute required packages »
I'm trying to install the latest Android Studio on a MacBook pro 2015 Unfortunately I get this error: An error occurred while trying to compute r...
(5) odpowiedzi
2017-03-11 10:03 Unexpected OutOfMemoryError when using ObjectInputStream#readUnshared() »
I am running into an OOM when reading a large number of objects from an ObjectInputStream with readUnshared. MAT points at its internal handle table a...
(1) odpowiedzi
2017-03-10 17:03 Java hexadecimal base double literal »
I am studying for java certification. And i'm curious about the java literals. I know it is possible to do something like this: int i = 0xAA; long l ...
(1) odpowiedzi
2017-03-10 16:03 How to combine two java8 stream operations - one terminal and one lazy - into a single operation? »
I'm doing some "algebra" of Java 8's streams, that is, I'm trying to code a simple operation Op that takes two streams as inputs and yields another st...
(4) odpowiedzi
2017-03-10 15:03 Performance of StringBuilder.append »
It's recommended (PMD rule AppendCharacterWithChar) to use StringBuilder.append(char) instead of StringBuilder.append(String). I agree with that. But...
(1) odpowiedzi
2017-03-10 14:03 Final field marked @NotNull is not initialized »
I have this code: public static class MyWebDriver extends RemoteWebDriver { @NotNull private final String nodeId; public MyRemoteWebDriv...
(4) odpowiedzi
2017-03-10 13:03 JSON error codename one Facebook api »
I am trying to fetch posts from Facebook using Graph api, but when I am passing response to JSONObject it throw an error. Below is my code: public vo...
(0) odpowiedzi
2017-03-10 12:03 SameSite cookie in JAVA app »
Is there any official JAVA Cookie implementation which allows to set a custom flag for cookie (like SameSite=strict)? ...
(0) odpowiedzi
2017-03-10 10:03 AssertEquals when list content is unordered »
How would you refactor the following if the products can be returned in any order? List<Product> products = get_products("test_produc"); assert...
(7) odpowiedzi
2017-03-10 09:03 Select all records whose specific field is not NULL »
I have a MySQL table named stars and one of its fields is id_num with default value NULL. I want to select all the records where id_num is not NULL th...
(4) odpowiedzi
2017-03-10 07:03 LinkedHashMap entrySet's order not being preserved in a stream (Android) »
I'm creating a very simple form validation utility for a sign up screen, and I'm running into some unexpected behavior concerning LinkedHashMap and a ...
(1) odpowiedzi
2017-03-09 17:03 How to create dynamic variables in Java? »
For example, in Haxe I can create strictly typed variables: var a:Float = 1.1; or var b:String = "hello" and also dynamic, if needed: var d:Dynamic =...
(3) odpowiedzi
2017-03-09 16:03 Java Stream: aggregate in list all not-Null collections received in map() »
I have collection idList that contains string IDs. Function getCollection returns for single ID a collection of items (type MyType). Also, it may retu...
(1) odpowiedzi
2017-03-09 11:03 Split a alphabetically sorted list into sublists based on alphabets in java »
I have a sorted list in java, i just want to split this list into sublists based on the first alphabet at each index of list. For example List contain...
(4) odpowiedzi
2017-03-09 05:03 How to get play and stop event callback from chromecast android »
I want to get callback event and perform some function when chromecast audio change there playback mode(play/stop) How can I get the play/stop event ...
(1) odpowiedzi
2017-03-09 00:03 Injecting JSON parameter in nativeQuery - Spring JPA »
This works when @Query(value = "SELECT * FROM person WHERE school = :schoolId AND details @> '{\"id\":\"1234\",\"name\":\"John\"}'", nativeQuery ...
(1) odpowiedzi
2017-03-08 22:03 Largest Java Short (32767) plus 1 not turning negative? »
recently I learned about the two's compliment method of representing both positive and negative integers in the base two system. I then tried to see t...
(5) odpowiedzi
2017-03-08 16:03 How can any single-threaded program is also a valid multithreaded program? »
I was reading the book "Java Concurrency In Practice". In second chapter, I read the statement any single-threaded program is also a valid multith...
(3) odpowiedzi
2017-03-08 14:03 One-to-many select in Jooq »
I am trying out JOOQ and trying to select from 3 tables (Author, Books and Articles) using a join statement. The ERD is as follows: Author ----< B...
(1) odpowiedzi
2017-03-08 14:03 How is a type argument inferred for a generic method invocation? »
Having a method like this? public <P, T extends List<P>> T getAwesomeList() { // ... } How come this compiles without any warnings...
(0) odpowiedzi