This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Apache License | |
Version 2.0, January 2004 | |
http://www.apache.org/licenses/ | |
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | |
1. Definitions. | |
"License" shall mean the terms and conditions for use, reproduction, | |
and distribution as defined by Sections 1 through 9 of this document. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//2、序列化/反序列化 | |
//可以借助commons-lang3工具包里面的类实现对象的序列化及反序列化,你没有必要自己写。 | |
import org.apache.commons.lang3.SerializationUtils; | |
public class Test { | |
public static void main(String[] args) { | |
User user = new User(); | |
user.setUsername("Java"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ExpandableTextView extends AppCompatTextView | |
implements View.OnClickListener { | |
private final int COLLAPSED_MAX_LINES = 3; | |
private final static String POSTFIX = "...see more "; | |
private ValueAnimator mAnimator; | |
private boolean isCollapsing; | |
private CharSequence mOriginalText; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.imageio.IIOException; | |
import javax.swing.*; | |
import java.io.*; | |
public class HyperSkill { | |
public static void main(String[] args) { | |
Person simon = new Person("simon", 21, new Address("stillwater", "uk")); | |
String fileName = "C:\\users\\si_au\\desktop\\simon.data"; | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import de.leonhard.storage.Json; | |
import org.bukkit.Bukkit; | |
import org.bukkit.Material; | |
import org.bukkit.inventory.Inventory; | |
import org.bukkit.inventory.ItemStack; | |
import org.bukkit.util.io.BukkitObjectInputStream; | |
import org.bukkit.util.io.BukkitObjectOutputStream; | |
import org.jetbrains.annotations.Nullable; | |
import java.io.ByteArrayInputStream; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
createSvgRectWithBorderRadius('.wrapper', '#09f', 0, 0, 400, 300, 40, 70, 20, 110); | |
/** | |
* Create a rounded rectangle (different radius for each corner) | |
* @author aPinix <https://twitter.com/aPinix> | |
* @version 1.0 | |
* @see {@link https://codepen.io/aPinix/pen/dyRvjQq} | |
* @link https://codepen.io/aPinix/pen/dyRvjQq | |
* @param {string} elemSelector The selector for the element to append the svg | |
* @param {string} color The color of the rectangle |
OlderNewer