需求:

把unity打成aar并上传到maven库

其实就是把前两个博客整合了一下

unity打aar包工具

aar上传maven库工具

这里先说eclipse版的

package com.jinkejoy.build_aar;

import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile; import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JTextField; public class EcAarBuildUpload {
private static final String BUILD_PROJECT_PATH = "./aar-build";
private static final String UPLOAD_PROJECT_PATH = "./aar-upload"; private JFrame jFrame; private JTextField sourceText;
private JButton sourceButton;
private File sourceFile; private JTextField sdkText;
private JButton sdkButton;
private File sdkFile; private JTextField ndkText;
private JButton ndkButton;
private File ndkFile; private JTextField groupIdText;
private JTextField aarNameText;
private JTextField versionText; private JButton buildButton;
private JButton uploadButton; public static void main(String[] args) {
new EcAarBuildUpload();
} public EcAarBuildUpload() {
openFileWindow();
} private void openFileWindow() {
jFrame = new JFrame();
jFrame.setTitle("将android工程打成aar并上传到maven库");
jFrame.setBounds(500, 500, 700, 250);
jFrame.setVisible(true);
FlowLayout layout = new FlowLayout();
layout.setAlignment(FlowLayout.LEFT);
//选择文件
JLabel sourceLabel = new JLabel("工程路径:");
sourceText = new JTextField(50);
sourceButton = new JButton("浏览");
//输出路径
JLabel sdkLabel = new JLabel("本地sdk路径:");
sdkText = new JTextField(48);
sdkButton = new JButton("浏览");
//sdk
JLabel ndkLabel = new JLabel("本地ndk路径:");
ndkText = new JTextField(48);
ndkButton = new JButton("浏览");
//上传aar
JLabel groupIdLabel = new JLabel("aar前缀包名:");
groupIdText = new JTextField(54);
JLabel aarNameLabel = new JLabel("aar名称:");
aarNameText = new JTextField(56);
JLabel versionLabel = new JLabel("aar版本号:");
versionText = new JTextField(55);
buildButton = new JButton("构建aar");
uploadButton = new JButton("上传aar"); jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jFrame.setLayout(layout);
jFrame.setResizable(false);
jFrame.add(sourceLabel);
jFrame.add(sourceText);
jFrame.add(sourceButton);
jFrame.add(sdkLabel);
jFrame.add(sdkText);
jFrame.add(sdkButton);
jFrame.add(ndkLabel);
jFrame.add(ndkText);
jFrame.add(ndkButton);
jFrame.add(groupIdLabel);
jFrame.add(groupIdText);
jFrame.add(aarNameLabel);
jFrame.add(aarNameText);
jFrame.add(versionLabel);
jFrame.add(versionText);
jFrame.add(buildButton);
jFrame.add(uploadButton); chooseSourceFile();
chooseSdkFile();
chooseNdkFile(); buildAarButton();
uploadAarButton(); getCacheInput();
} private void getCacheInput() {
sourceText.setText(CacheUtils.getCacheInput("sourcePath"));
sdkText.setText(CacheUtils.getCacheInput("sdkPath"));
ndkText.setText(CacheUtils.getCacheInput("ndkPath"));
groupIdText.setText(CacheUtils.getCacheInput("groupId"));
aarNameText.setText(CacheUtils.getCacheInput("aarName"));
versionText.setText(CacheUtils.getCacheInput("version"));
} private void buildAar() {
if (checkInput()) return;
CacheUtils.cacheInput(sourceText, sdkText, ndkText, groupIdText, aarNameText, versionText);
createAsFile();
findUpdateFile(BUILD_PROJECT_PATH);
gradleBuildAar();
} private void gradleBuildAar() {
String command = "cmd /c start gradle clean assembleDebug";
File cmdPath = new File(BUILD_PROJECT_PATH);
Runtime runtime = Runtime.getRuntime();
try {
Process process = runtime.exec(command, null, cmdPath);
} catch (IOException e) {
e.printStackTrace();
}
} private void findUpdateFile(String filePath) {
File file = new File(filePath);
if (!file.exists()) {
return;
}
File[] files = file.listFiles();
for (File updateFile : files) {
if (updateFile.isDirectory()) {
findUpdateFile(updateFile.getAbsolutePath());
} else {
switch (updateFile.getName().toString()) {
case "build.gradle":
updateBuildGradle(updateFile.getAbsolutePath());
break;
case "AndroidManifest.xml":
updateManifestFile(updateFile.getAbsolutePath());
break;
case "local.properties":
updateSdkFile(updateFile.getAbsolutePath());
break;
case "UnityPlayerActivity.java":
case "UnityPlayerNativeActivity.java":
case "UnityPlayerProxyActivity.java":
updateFile.delete();
break;
}
}
}
} private void updateSdkFile(String filePath) {
try {
RandomAccessFile sdkFile = new RandomAccessFile(filePath, "rw");
String line;
long lastPoint = 0;
while ((line = sdkFile.readLine()) != null) {
final long point = sdkFile.getFilePointer();
if (line.contains("sdk.dir")) {
String s = line.substring(0);
String sdkStr = sdkText.getText().toString();
String sdkPan = sdkStr.substring(0, 1);
sdkStr = sdkStr.substring(1).replace("\\", "\\\\");
String ndkStr = sdkText.getText().toString();
String ndkPan = ndkStr.substring(0, 1);
ndkStr = ndkStr.substring(1).replace("\\", "\\\\");
String replaceStr = "sdk.dir=" + sdkPan + "\\" + sdkStr + "\n" + "ndk.dir=" + ndkPan + "\\" + ndkStr + "\n ";
String str = line.replace(s, replaceStr);
sdkFile.seek(lastPoint);
sdkFile.writeBytes(str);
}
lastPoint = point;
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
} private void updateManifestFile(String filePath) {
try {
RandomAccessFile manifestFile = new RandomAccessFile(filePath, "rw");
String line;
long lastPoint = 0;
while ((line = manifestFile.readLine()) != null) {
final long ponit = manifestFile.getFilePointer();
if (line.contains("<activity") && line.contains("UnityPlayerActivity") && !line.contains("<!--<activity")) {
String str = line.replace("<activity", "<!--<activity");
manifestFile.seek(lastPoint);
manifestFile.writeBytes(str);
}
if (line.contains("</activity>") && !line.contains("</activity>-->")) {
String str = line.replace("</activity>", "</activity>-->\n");
manifestFile.seek(lastPoint);
manifestFile.writeBytes(str);
}
lastPoint = ponit;
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
} private void updateBuildGradle(String filePath) {
try {
RandomAccessFile buildGradleFile = new RandomAccessFile(filePath, "rw");
String line;
long lastPoint = 0;
while ((line = buildGradleFile.readLine()) != null) {
final long ponit = buildGradleFile.getFilePointer();
if (line.contains("classpath 'com.android.tools.build:gradle")) {
String s = line.substring(line.indexOf("classpath"));
String str = line.replace(s, "classpath 'com.android.tools.build:gradle:2.3.0' \n");
buildGradleFile.seek(lastPoint);
buildGradleFile.writeBytes(str);
}
if (line.contains("com.android.application")) {
String str = line.replace("'com.android.application'", "'com.android.library' \n");
buildGradleFile.seek(lastPoint);
buildGradleFile.writeBytes(str);
}
if (line.contains("compileSdkVersion") && !line.contains("compileSdkVersion 25")) {
String s = line.substring(line.indexOf("compileSdkVersion")).toString();
String str = line.replace(s, "compileSdkVersion 25\n");
buildGradleFile.seek(lastPoint);
buildGradleFile.writeBytes(str);
}
if (line.contains("buildToolsVersion") && !line.contains("buildToolsVersion '25.0.2'")) {
String s = line.substring(line.indexOf("buildToolsVersion")).toString();
String str = line.replace(s, "buildToolsVersion '25.0.2'\n");
buildGradleFile.seek(lastPoint);
buildGradleFile.writeBytes(str);
}
if (line.contains("targetSdkVersion") && !line.contains("targetSdkVersion 25")) {
String s = line.substring(line.indexOf("targetSdkVersion")).toString();
String str = line.replace(s, "targetSdkVersion 25\n");
buildGradleFile.seek(lastPoint);
buildGradleFile.writeBytes(str);
}
if (line.contains("applicationId") && !line.contains("//applicationId")) {
String s = line.substring(line.indexOf("applicationId")).toString();
String str = line.replace(s, "//" + s + "\n");
buildGradleFile.seek(lastPoint);
buildGradleFile.writeBytes(str);
}
lastPoint = ponit;
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
} private void createAsFile() {
String sourcePath = sourceText.getText().toString();
File buildFile = new File(BUILD_PROJECT_PATH);
String buildProject = buildFile.getAbsolutePath();
//delete history
String deletePath = buildProject + "\\app\\src\\main";
FileUtils.delAllFile(deletePath);
String buildPath1 = buildProject + "\\build";
FileUtils.delFolder(buildPath1);
String buildPath2 = buildProject + "\\app\\build";
FileUtils.delFolder(buildPath2);
//assets
String assets = sourcePath + "\\assets";
String newAssets = buildProject + "\\app\\src\\main\\assets";
FileUtils.copyFolder(assets, newAssets);
//unity-classes.jar
String unity = sourcePath + "\\libs\\unity-classes.jar";
String newUnity = buildProject + "\\app\\libs\\unity-classes.jar";
FileUtils.copyFile(new File(unity), new File(newUnity));
//libs
String libs = sourcePath + "\\libs";
String jniLibs = buildProject + "\\app\\src\\main\\jniLibs";
FileUtils.copyFolder(libs, jniLibs);
File jni_unity = new File(jniLibs + "\\unity-classes.jar");
jni_unity.delete();
//res
String res = sourcePath + "\\res";
String newRes = buildProject + "\\app\\src\\main\\res";
FileUtils.copyFolder(res, newRes);
//src
String src = sourcePath + "\\src";
String java = buildProject + "\\app\\src\\main\\java";
FileUtils.copyFolder(src, java);
//AndroidManifest.xml
String manifest = sourcePath + "\\AndroidManifest.xml";
String newManifest = buildProject + "\\app\\src\\main\\AndroidManifest.xml";
FileUtils.copyFile(new File(manifest), new File(newManifest));
} private void uploadAar() {
findAarFile(BUILD_PROJECT_PATH);
gradleUpload();
} private void gradleUpload() {
String command = "cmd /c start gradlew clean uploadArchives";
File cmdPath = new File(UPLOAD_PROJECT_PATH);
Runtime runtime = Runtime.getRuntime();
try {
Process process = runtime.exec(command, null, cmdPath);
} catch (IOException e) {
e.printStackTrace();
}
} private void findAarFile(String filePath) {
File file = new File(filePath);
if (!file.exists()) {
return;
}
File[] files = file.listFiles();
for (File outputFile : files) {
if (outputFile.isDirectory()) {
findAarFile(outputFile.getAbsolutePath());
} else {
String fileName = outputFile.getName().toString();
if (fileName.endsWith(".aar")) {
File aarFile = new File("./" + fileName);
FileUtils.copyFile(outputFile, aarFile);
CacheUtils.cacheAar(aarFile.getAbsolutePath());
}
}
}
} private boolean checkInput() {
if ("".equals(sourceText.getText().toString())) {
JOptionPane.showMessageDialog(jFrame, "请输入源工程文件路径");
return true;
}
if ("".equals(sdkText.getText().toString())) {
JOptionPane.showMessageDialog(jFrame, "请输入本地sdk路径");
return true;
}
if ("".equals(ndkText.getText().toString())) {
JOptionPane.showMessageDialog(jFrame, "请输入本地ndk路径");
return true;
}
if ("".equals(groupIdText.getText().toString())) {
JOptionPane.showMessageDialog(jFrame, "请输入aar前缀包名");
return true;
}
if ("".equals(aarNameText.getText().toString())) {
JOptionPane.showMessageDialog(jFrame, "请输入aar名称");
return true;
}
if ("".equals(versionText.getText().toString())) {
JOptionPane.showMessageDialog(jFrame, "请输入aar版本号");
return true;
}
return false;
} private void buildAarButton() {
buildButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent actionEvent) {
buildAar();
}
});
} private void uploadAarButton() {
uploadButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent actionEvent) {
uploadAar();
}
});
} private void chooseSourceFile() {
sourceButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent actionEvent) {
JFileChooser chooser = new JFileChooser();
chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
chooser.showDialog(new JLabel(), "选择");
sourceFile = chooser.getSelectedFile();
sourceText.setText(sourceFile.getAbsolutePath().toString());
}
});
} private void chooseSdkFile() {
sdkButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent actionEvent) {
JFileChooser chooser = new JFileChooser();
chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
chooser.showDialog(new JLabel(), "选择");
sdkFile = chooser.getSelectedFile();
sdkText.setText(sdkFile.getAbsolutePath().toString());
}
});
} private void chooseNdkFile() {
ndkButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent actionEvent) {
JFileChooser chooser = new JFileChooser();
chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
chooser.showDialog(new JLabel(), "选择");
ndkFile = chooser.getSelectedFile();
ndkText.setText(ndkFile.getAbsolutePath().toString());
}
});
}
}
package com.jinkejoy.build_aar;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties; import javax.swing.JTextField; public class CacheUtils {
private static final String CACHE_PATH = "./cache-input.properties";
private static final String AAR_PATH = "./aar-path.properties"; public static void cacheInput(JTextField sourceText, JTextField sdkText, JTextField ndkText,
JTextField groupIdText, JTextField aarNameText, JTextField versionText) {
String cache = "sourcePath=" + sourceText.getText().toString().replace("\\", "\\\\") + "\n" +
"sdkPath=" + sdkText.getText().toString().replace("\\", "\\\\") + "\n" +
"ndkPath=" + ndkText.getText().toString().replace("\\", "\\\\") + "\n" +
"groupId=" + groupIdText.getText().toString().replace("\\", "\\\\") + "\n" +
"aarName=" + aarNameText.getText().toString().replace("\\", "\\\\") + "\n" +
"version=" + versionText.getText().toString().replace("\\", "\\\\");
File cacheFile = new File(CACHE_PATH);
if (!cacheFile.exists()) {
try {
cacheFile.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
}
try {
FileOutputStream fop = new FileOutputStream(cacheFile);
fop.write(cache.getBytes());
fop.flush();
fop.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
} public static void cacheAar(String aarPath) {
String cache = "aarPath=" + aarPath.replace("\\", "\\\\");
File cacheFile = new File(AAR_PATH);
if (!cacheFile.exists()) {
try {
cacheFile.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
}
try {
FileOutputStream fop = new FileOutputStream(cacheFile);
fop.write(cache.getBytes());
fop.flush();
fop.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
} public static String getCacheInput(String key) {
File cacheFile = new File(CACHE_PATH);
if (cacheFile.exists()) {
try {
FileInputStream fip = new FileInputStream(cacheFile);
Properties properties = new Properties();
properties.load(fip);
Iterator<Map.Entry<Object, Object>> iterator = properties.entrySet().iterator();
while (iterator.hasNext()) {
Map.Entry<Object, Object> entry = iterator.next();
if (key.equals(entry.getKey().toString())) {
return entry.getValue().toString();
}
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
return "";
}
}
package com.jinkejoy.build_aar;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.channels.FileChannel; public class FileUtils {
public static boolean delAllFile(String path) {
boolean flag = false;
File file = new File(path);
if (!file.exists()) {
return flag;
}
if (!file.isDirectory()) {
return flag;
}
String[] tempList = file.list();
File temp = null;
for (int i = 0; i < tempList.length; i++) {
if (path.endsWith(File.separator)) {
temp = new File(path + tempList[i]);
} else {
temp = new File(path + File.separator + tempList[i]);
}
if (temp.isFile()) {
temp.delete();
}
if (temp.isDirectory()) {
delAllFile(path + "/" + tempList[i]);//先删除文件夹里面的文件
delFolder(path + "/" + tempList[i]);//再删除空文件夹
flag = true;
}
}
return flag;
} public static void delFolder(String folderPath) {
try {
delAllFile(folderPath); //删除完里面所有内容
String filePath = folderPath;
filePath = filePath.toString();
java.io.File myFilePath = new java.io.File(filePath);
myFilePath.delete(); //删除空文件夹
} catch (Exception e) {
e.printStackTrace();
}
} public static void copyFile(File source, File dest) {
FileChannel inputChannel = null;
FileChannel outputChannel = null;
try {
inputChannel = new FileInputStream(source).getChannel();
outputChannel = new FileOutputStream(dest).getChannel();
outputChannel.transferFrom(inputChannel, 0, inputChannel.size());
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
inputChannel.close();
} catch (IOException e) {
e.printStackTrace();
}
try {
outputChannel.close();
} catch (IOException e) {
e.printStackTrace();
}
}
} public static void copyFolder(String oldPath, String newPath) {
try {
// 如果文件夹不存在,则建立新文件夹
(new File(newPath)).mkdirs();
// 读取整个文件夹的内容到file字符串数组,下面设置一个游标i,不停地向下移开始读这个数组
File filelist = new File(oldPath);
String[] file = filelist.list();
// 要注意,这个temp仅仅是一个临时文件指针
// 整个程序并没有创建临时文件
File temp = null;
for (int i = 0; i < file.length; i++) {
// 如果oldPath以路径分隔符/或者\结尾,那么则oldPath/文件名就可以了
// 否则要自己oldPath后面补个路径分隔符再加文件名
// 谁知道你传递过来的参数是f:/a还是f:/a/啊?
if (oldPath.endsWith(File.separator)) {
temp = new File(oldPath + file[i]);
} else {
temp = new File(oldPath + File.separator + file[i]);
} // 如果游标遇到文件
if (temp.isFile()) {
FileInputStream input = new FileInputStream(temp);
// 复制并且改名
FileOutputStream output = new FileOutputStream(newPath
+ "/" + (temp.getName()).toString());
byte[] bufferarray = new byte[1024 * 64];
int prereadlength;
while ((prereadlength = input.read(bufferarray)) != -1) {
output.write(bufferarray, 0, prereadlength);
}
output.flush();
output.close();
input.close();
}
// 如果游标遇到文件夹
if (temp.isDirectory()) {
copyFolder(oldPath + "/" + file[i], newPath + "/" + file[i]);
}
}
} catch (Exception e) {
System.out.println("复制整个文件夹内容操作出错");
}
}
}

效果图

备注:有时候会出现渲染加载不出来的问题,可以修改下布局的创建顺序,改为创建一个控件就马上加载

unity打成aar上传到maven库的工具的更多相关文章

  1. aar上传maven库工具

    需求:本地aar文件上传到maven库 参考我之前的博客gradle上传本地文件到远程maven库(nexus服务器) 下面是java图形化工具代码 package com.jinkejoy.buil ...

  2. 用eclipse怎样将本地的项目打成jar包上传到maven仓库

    使用maven的项目中,有时需要把本地的项目打成jar包上传到mevan仓库. 操作如下: 前提:pom文件中配置好远程库的地址,否则会报错 1.将maven 中的settings文件配置好用户名和密 ...

  3. Maven系列(二) -- 将开源库上传到maven仓库私服

    前言 之前简单说了下Maven的搭建,现在跟大家说一下如何将自己的aar传到我们新搭建的maven仓库里面,接下来我们就从最基本的新建一个library开始讲述整个流程,话不多说,让我们把愉快的开始吧 ...

  4. Github开源Java项目(Disconf)上传到Maven Central Repository方法详细介绍

    最近我做了一个开源项目 Disconf:Distributed Configuration Management Platform(分布式配置管理平台) ,简单来说,就是为所有业务平台系统管理配置文件 ...

  5. 多个module实体类集合打一个jar包并上传至远程库

    本章内容主要分享多个module中的实体类集合生成到一个jar包中,并且发布到远程库:这里采用maven-assembly-plugin插件的功能来操作打包,内容不长却贴近实战切值得拥有,主要节点内容 ...

  6. DropzoneJS 可以拖拽上传的js库

    介绍 可以拖拽上传的 js库 网址 http://www.dropzonejs.com/ 同类类库 1.jquery.fileupload   http://blueimp.github.io/jQu ...

  7. Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):1、JIRA账号注册

    文章目录: Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):1.JIRA账号注册 Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):2.PGP ...

  8. Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):2、PGP下载安装与密钥生成发布

    文章目录: Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):1.JIRA账号注册 Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):2.PGP ...

  9. Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):3、Maven独立插件安装与settings.xml配置

    文章目录: Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):1.JIRA账号注册 Taurus.MVC-Java 版本打包上传到Maven中央仓库(详细过程):2.PGP ...

随机推荐

  1. 一个完整Java Web项目背后的密码

    前言 最近自己做了几个Java Web项目,有公司的商业项目,也有个人做着玩的小项目,写篇文章记录总结一下收获,列举出在做项目的整个过程中,所需要用到的技能和知识点,带给还没有真正接触过完整Java ...

  2. linq2db.EntityFrameworkCore 介绍

    linq2db.EntityFrameworkCore 是一个ef core的插件,对linq语法的扩展 对复杂的sql都有很好的支持,他是基于linq2db (provided by LINQ To ...

  3. x学生管理系统(用中间件)-------基于FORM组件

    目的:实现学生,老师,课程的增删改查 models.py from django.db import models # Create your models here. class UserInfo( ...

  4. 第四周学习总结-HTML

    2018年8月5日 这是暑假第四周,这一周我在菜鸟教程网学到了许多HTML的知识.HTML编写网页不像C语言.Java语言那必须有主方法.主函数什么的,它基本上都是标签(元素),但是它可以与CSS(层 ...

  5. mysql入门练习

    2.详细解释列mysql执行语句的每个参数与参数值的含义 ​ mysql -hlocalhost -P3306 -uroot -proot 连接数据库,端口号为3306, 用户名root, 密码roo ...

  6. ajax之全局函数

    1.全局函数:$.each(array,function(){1,value}),通过$/jQuery直接调用 对象函数:$("#name").val(); jQuery UI:$ ...

  7. Jmeter-JDBC Request参数化

    一.参数化 1.选择Query Type(查询类型)为Prepared Select Statement 2.写好sql 3.在Parameter Values中输入参数,多个参数用‘,’隔开 4.P ...

  8. C++ Primer 笔记——拷贝控制

    1.如果构造函数的第一个参数是自身类类型的引用,且任何额外参数都有默认值,则此构造函数是拷贝构造函数.拷贝构造函数的第一个参数必须是引用类型(否则会无限循环的调用拷贝构造函数). 2.如果没有为一个类 ...

  9. 论文阅读笔记二十八:You Only Look Once: Unified,Real-Time Object Detection(YOLO v1 CVPR2015)

    论文源址:https://arxiv.org/abs/1506.02640 tensorflow代码:https://github.com/nilboy/tensorflow-yolo 摘要 该文提出 ...

  10. cnetos 7 mariadb 集群报错分析解答

    1.故障1:通过查看/var/log/message 发现报错 2017-04-14 14:44:10 139845276428544 [ERROR] WSREP: It may not be saf ...