Taken from StackExchange
Thanks to LangLangC
For temperature and other improvements see https://gist.github.com/cdleon/d16e7743e6f056fedbebc329333d79df
Taken from StackExchange
Thanks to LangLangC
For temperature and other improvements see https://gist.github.com/cdleon/d16e7743e6f056fedbebc329333d79df
package com.kaishengit.ppt; | |
public class DeadLock { | |
private Object lockA = new Object(); | |
private Object lockB = new Object(); | |
public void deadLock() { | |
Thread threadA = new Thread(new Runnable() { | |
@Override |
package com.kaishengit.ppt; | |
public class Test { | |
public static void main(String[] args) throws InterruptedException { | |
User user = new User(); | |
Thread thread = new Thread(new Runnable() { | |
@Override | |
public void run() { | |
user.setName("Jcak"); |
package com.kaishengit.ppt; | |
import java.util.LinkedList; | |
import java.util.concurrent.atomic.AtomicInteger; | |
import java.util.concurrent.locks.Condition; | |
import java.util.concurrent.locks.Lock; | |
import java.util.concurrent.locks.ReentrantLock; | |
public class BlockList<T> { |
package com.kaishengit.ppt; | |
import java.util.LinkedList; | |
import java.util.concurrent.atomic.AtomicInteger; | |
public class BlockList<T> { | |
private LinkedList<T> linkedList = new LinkedList<>(); | |
private int minSize = 0; | |
private int maxSize; |
{ | |
"emojis": [ | |
{"emoji": "👩👩👧👧", "name": "family_mothers_two_girls", "shortname": "", "unicode": "", "html": "👩‍👩‍👧‍👧", "category": "p", "order": ""}, | |
{"emoji": "👩👩👧👦", "name": "family_mothers_children", "shortname": "", "unicode": "", "html": "👩‍👩‍👧‍👦", "category": "p", "order": ""}, | |
{"emoji": "👩👩👦👦", "name": "family_mothers_two_boys", "shortname": "", "unicode": "", "html": "👩‍👩‍👦‍👦", "category": "p", "order": ""}, | |
{"emoji": "👨👩👧👧", "name": "family_two_girls", "shortname": "", "unicode": "", "html": "👨‍👩‍👧‍👧", "category": "p", "order": ""}, | |
{"emoji": "👨👩👧👦", "name": "family_children", "shortname": "", "unicode": "", "html": "👨‍👩‍👧‍👦", "category": "p", "order": ""}, | |
{"emoji": "👨👩👦👦", "name": "family_two_boys", "shortname": "", "unicode": "", "html": "👨&zw |
git branch | |
git checkout | |
git checkout -b | |
git merge |
package com.kaishengit.web.filter; | |
import java.io.IOException; | |
import java.util.Enumeration; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.Map.Entry; | |
import javax.servlet.Filter; | |
import javax.servlet.FilterChain; |
//分割 | |
public static void splitFile(String path,int count) { | |
try { | |
RandomAccessFile raf = new RandomAccessFile(path, "r"); | |
//文件总大小 | |
long length = raf.length(); | |
//每份文件大小 | |
long maxSize = length / count; | |
//最后一份文件大小 |