library.stream() .map(book -> book.getAuthor()) .filter(author -> author.getAge() >= 50) .map(Author::getSurname) .map(String::toUpperCase) .distinct() .limit(15) .collect(toList())); Did you notice that as we read through the code we can describe what it’s doing line by...
In today’s world of multi-core processors, understanding multithreading is more important than ever. Our cheat sheet covers thread creation, synchronization mechanisms, thread communication methods, thread lifecycle states, and an introduction to the Executor Framework. 在当今多核处理器的世界中,了解多...
toString(wrapperEight, 2));//String Output: 1000 static toYyyyString methods. Yyyy can be Hex,Binary,Octal System.out.println(Integer .toHexString(wrapperEight));//String Output:8 System.out.println(Integer .toBinaryString(wrapperEight));//String Output:1000 System.out.println(Integer .toOctal...
Set String[] for Runtime.exec (patch ysoserial's payloads) Shell Commands Converter How it works: https://blog.srcclr.com/commons-collections-deserialization-vulnerability-research-findings/ http://gursevkalra.blogspot.ro/2016/01/ysoserial-commonscollections1-exploit.html JRE8u20_RCE_Gadget https...
Ever since Anton wrote a post about RxJava, I wanted to create an RxJava cheat sheet. With RxJava API, data processing functions, some lesser known tricks and utilities, we have the perfect mix for a great cheat sheet — and trust me, we've created a bunch of them. Here's a select...
String t = x.trim(); if (t.length() > 1) { print(t); } }This can be done in much more declarative way using map():1 2 3 4 opt. map(String::trim). filter(t -> t.length() > 1). ifPresent(this::print);This becomes tricky. Optional.map() applies given function on a...
While none of these mods require Fabric Loader 0.15+ except for OptiFabric Origins 2.0.1 for 1.14.x (and in that case you can just use the previous release of 1.0.1 for pre-0.15 support), they are all compatible with the update and most mod updates going forwards will start making 0.15...
OWASP: Query Parameterization Cheat Sheet 潜在的安卓sql注入 漏洞特征:SQL_INJECTION_ANDROID 输入进sql查询的数据应该通过严格的检查。在预编译中绑定参数可以更容易的缓解sql注入带来的危害。 有漏洞的代码: String query = "SELECT * FROM messages WHERE uid= '"+userInput+"'" ; ...
public class DeprecatedExample { @Deprecated public static void badMethod() { } } public class DeprecatedUser { public static void main(String[] args) { DeprecatedExample.badMethod(); } } The @Deprecated annotation looks a lot like the @deprecated tag except it appears outside a comment, ri...
Methods: public static ClassMember ClassMember.valueOf(java.lang.String) public static ClassMember[] ClassMember.values() public final int java.lang.Enum.hashCode() public final int java.lang.Enum.compareTo(E) public int java.lang.Enum.compareTo(java.lang.Object) public final java.lang.String...