Articles

Affichage des articles du août, 2016

odules:ty:compileJavaWARNING

modules:ty:compileJava WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by worker.org.gradle.internal.reflect.JavaMethod (file:/Users/---/.gradle/caches/3.0/workerMain/gradle-worker.jar) to method java.lang.ClassLoader.getPackages() WARNING: Please consider reporting this to the maintainers of worker.org.gradle.internal.reflect.JavaMethod WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

gralloc_module_unmap: find buffer in dequeued status ID=134794

Android monitor errors repeat this Message : ( gralloc_module_unmap: find buffer in dequeued status ID=134794 ) 09-03 15:55:25.142 18681-18695/system_process E/IMGSRV: :0: gralloc_module_unmap: find buffer in dequeued status ID=43427 09-03 15:55:25.142 18681-18695/system_process E/IMGSRV: :0: gralloc_module_unmap: find buffer in dequeued status ID=43427 09-03 15:55:25.162 18681-18695/system_process E/IMGSRV: :0: gralloc_module_unmap: find buffer in dequeued status ID=43425 09-03 15:55:25.162 18681-18695/system_process E/IMGSRV: :0: gralloc_module_unmap: find buffer in dequeued status ID=43425 09-03 15:55:25.182 18681-18695/system_process E/IMGSRV: :0: gralloc_module_unmap: find buffer in dequeued status ID=43426 09-03 15:55:25.182 18681-18695/system_process E/IMGSRV: :0: gralloc_module_unmap: find buffer in dequeued status ID=43426 09-03 15:55:25.192 18681-18695/system_process E/IMGSRV: :0: gralloc_module_unmap: find buffer in dequeued status ID=43427 09-03 15:55:25.192 18

addBatch

Multiple queries executed in java in single statement ? You can use Batch update but queries must be action(i.e. insert,update and delete) queries Statement s = c . createStatement (); String s1 = "update emp set name='abc' where salary=984" ; String s2 = "insert into emp values ('Osama',1420)" ; s . addBatch ( s1 ); s . addBatch ( s2 ); s . executeBatch ();

Snapchat Interview Question :

Consider a scenario where a frog wants cross a river. The river is represented by a 1D array of 0s and 1s where a 0 represents water and a 1 represents a rock. This frog cannot swim but it can jump from stone to stone. In addition there are other constraints on how the frog moves: Frog can jump the same distance as his previous jump Frog can jump one more than his previous jump Frog can jump one less than his previous jump Now, given a river (1d array), can a frog cross the river without drowning? The frog cannot move a negative distance (ie it cannot go from right to left).

java.lang.NullPointerException

java.lang.NullPointerException : This  Exception  occurs when you declare a variable but did not create an object. If you attempt to dereference variable  BEFORE creating the object you get a  NullPointerException . 

setPluginState

 setPluginState(android.webkit.WebSettings.PluginState)' is deprecated less... (Ctrl+F1) This inspection reports where deprecated code is used in the specified inspection scope.    

JAVA 9

 A lightweight JSON API for consuming and generating JSON documents and data streams. A HTTP 2 Client that will bring HTTP 2.0 and web sockets, while replacing the legacy HttpURLConnection. Process API Updates to improve controlling and managing operating-system process (developers were often forced to use native code with the current API). Along with several other smaller features, as well as dozens of proposals already being tracked by the JEP Index, Oracle has also promised another trio of performance features : Improve contended locking, which aims at improving performance when threads compete over access to objects.  Segmented code cache with better performance, shorter sweep times, less fragmentation and further extensions to come. The Smart Java compiler, or sjavac , will be improved to allow default use in the JDK build and general use for building larger projects.

Arbitrary Number of Arguments

To use varargs, you follow the type of the last parameter by an ellipsis (three dots, ...), then a space, and the parameter name. The method can then be called with any number of that parameter, including none. private String prisonIn (String .... welcome) { welcome[0]="Is your fault !" welcome[1]="not Ok !" welcome[2]="job or prison is the same !" welcome[3]=" your fault !" ... welcome[20]="Is your fault !" return  welcome[20]; }

WebStart applications

Warning: Unsigned and self-signed WebStart applications and Applets are deprecated from JDK7u21 onwards due to security reasons.          To ensure future correct functionality please sign WebStart applications and Applets using trusted certificate.