This file contains hidden or 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
| |----------------------------------------------------------------------------------------|--------------------| | |
| | Object Header (64 bits) | State | | |
| |-------------------------------------------------------|--------------------------------|--------------------| | |
| | Mark Word (32 bits) | Klass Word (32 bits) | | | |
| |-------------------------------------------------------|--------------------------------|--------------------| | |
| | identity_hashcode:25 | age:4 | biased_lock:1 | lock:2 | OOP to metadata object | Normal | | |
| |-------------------------------------------------------|--------------------------------|--------------------| | |
| | thread:23 | epoch:2 | age:4 | biased_lock:1 | lock:2 | OOP to metadata object | Biased | | |
| |-------------------------------------------------------|--------------------------------|--------------------| | |
| | |
This file contains hidden or 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
| <settings> | |
| ... ... | |
| <activeProfiles> | |
| <!--make the profile active all the time --> | |
| <activeProfile>securecentral</activeProfile> | |
| </activeProfiles> | |
| <profiles> | |
| <profile> | |
| <id>securecentral</id> | |
| <!--Override the repository (and pluginRepository) "central" from the |
This file contains hidden or 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
| package com.ljm.sorts; | |
| /** | |
| * Created by pkpk1234 on 2017/5/16. | |
| */ | |
| public class HeapSort { | |
| public static void heapSort(int[] array) { | |
| int length = array.length; | |
| int endIdx = length - 1; | |
| for (int i = 0; i < endIdx; i++) { |
This file contains hidden or 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 com.zaxxer.hikari.HikariConfig; | |
| import com.zaxxer.hikari.HikariDataSource; | |
| import org.apache.commons.dbutils.DbUtils; | |
| import org.apache.commons.io.IOUtils; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import javax.sql.DataSource; | |
| import java.io.*; | |
| import java.sql.Connection; |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>com.ljm</groupId> | |
| <artifactId>XXXX</artifactId> | |
| <version>1.0-SNAPSHOT</version> |
This file contains hidden or 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 ClhSpinLock { | |
| private final ThreadLocal<Node> pred; | |
| private final ThreadLocal<Node> node; | |
| private final AtomicReference<Node> tail = new AtomicReference<Node>(new Node()); | |
| public ClhSpinLock() { | |
| this.node = new ThreadLocal<Node>() { | |
| protected Node initialValue() { | |
| return new Node(); | |
| } |
This file contains hidden or 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
| #include <stdio.h> | |
| int main(void) { | |
| char words[10]; | |
| printf("Enter a string\n"); | |
| while(fgets(words,10,stdin) != NULL && words[0] != '\n') { | |
| fputs(words,stdout); | |
| } | |
| puts("Done."); | |
| return 0; |