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 java.io.IOException; | |
import java.util.Enumeration; | |
import java.util.jar.JarEntry; | |
import java.util.jar.JarFile; | |
public class Main { | |
public static void main(String[] args) throws IOException { | |
// 项目中jar包所在物理路径 | |
String jarName = "/Users/admin/src/test.jar"; |
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
View.OnTouchListener touchListener = new View.OnTouchListener() { | |
private int lastX = 0; | |
private int lastY = 0; | |
@Override | |
public boolean onTouch(View v, MotionEvent event) { | |
switch (event.getAction()) { | |
case MotionEvent.ACTION_DOWN: { | |
lastX = (int) event.getRawX(); | |
lastY = (int) event.getRawY(); | |
break; |
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
<!DOCTYPE html> | |
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Check if the user has a carema and a microphone.</title> | |
<script> | |
window.onload = function () { | |
navigator.getMedia = ( navigator.getUserMedia || // use the proper vendor prefix | |
navigator.webkitGetUserMedia || | |
navigator.mozGetUserMedia || |