Skip to content

Instantly share code, notes, and snippets.

@Panmax
Panmax / xmind-zen
Last active January 18, 2020 08:11
let obj=JSON.parse($response.body)
obj["license"]["status"] = "Subscriptioned";
obj["license"]["expireTime"] = "1589634776";
$done({body:JSON.stringify(obj)})
let obj=JSON.parse($response.body)
obj["subscription"] = true;
obj["expired"] = false;
$done({body:JSON.stringify(obj)})
func move(from, to, fromParent, toParent) {
if (fromParent == null && toParent == null) { // 外层移动
var tmp = items[from]
items[from].delete()
items.insert(to, tmp)
} else if (fromParent != null && toParent == null) { // 从里边移出
var tmp = items[fromParent].children[from]
items[fromParent].children[from].delete()
items.insert(to, tmp)
} else if (fromParent == null && toParent != null) { // 从外边移到里边
func move(from, to, fromParent, toParent) {
if (fromParent == null && toParent == null) { // 外层移动
var tmp = items[from]
items[from].delete()
items.insert(to, tmp)
} else if (fromParent != null && toParent == null) { // 从里边移出
var tmp = items[fromParent].children[from]
items[fromParent].children[from].delete()
items.insert(to, tmp)
} else if (fromParent == null && toParent != null) { // 从外边移到里边
let obj=JSON.parse($response.body)
obj["expiredTime"] = 1747624048;
obj["remainTime"] = 189302400;
$done({body:JSON.stringify(obj)})
package com.netflix.discovery.util;
import java.lang.ref.WeakReference;
import java.util.Map;
import java.util.WeakHashMap;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
/**
* An alternative to {@link String#intern()} with no capacity constraints.
@Panmax
Panmax / d13_d1_Print.java
Created July 27, 2013 13:34
homework-d13
package d13.d1;
/**
* Created with IntelliJ IDEA.
* User: jiapan
* Date: 13-7-27
* Time: 下午4:43
* To change this template use File | Settings | File Templates.
*/
public class Print {