-
MyQTTS
对科大讯飞语音合成服务Java接口的二次封装,可由程序的线程锁来控制几个线程同时f访问TTS。(For speech synthesis iFLYTEK service Java interface of the second package, the program can be thread-locking to control access to several threads simultaneously f TTS.)
- 2020-10-17 17:07:28下载
- 积分:1
-
android 操作 wifi 教程以及项目源码下载
在Android中对Wifi操作,android本身提供了一些有用的包,在android.net.wifi包下面。简单介绍一下:大致可以分为四个主要的类ScanResult,wifiConfiguration,WifiInfo,WifiManager(1)ScanResult,主要是通过wifi 硬件的扫描来获取一些周边的wifi 热点的信息。(2)wifiConfiguration 在我们连通一个wifi 接入点的时候,需要获取到的一些信息。大家可以跟我们有线的设备进行对比一下。(3)WifiInfo 在我们的wifi 已经连通了以后,可以通过这个类获得一些已经连通的wifi 连接的信息获取当前链接的信息,这里信息就比较简单了,这里简单介绍一下这里的方法: getBSSID() 获取BSSID getDetailedStateOf() 获取客户端的连通性 getHiddenSSID() 获得SSID 是否被隐藏 getIpAddress() 获取IP 地址 getLinkSpeed() 获得连接的速度 getMacAddress() 获得Mac 地址 getRssi() 获得802.11n 网络的信号 getSSID() 获得SSID getSupplicanState() 返回具体客户端状态的信息(4)wifiManager 这个不用说,就是用来管理我们的wifi 连接,这里已经定义好了一些类,可以供我们使用。这里来说相对复杂,里面的内容比较多,但是通过字面意思,我们还是可以获得很多相关的信息。这个类里面预先定义了许多常量,我们可以直接使用,不用再次创建。介绍完了,开始写一个Demo吧。程序已启动效果图如下:看代码,其中有注释,我就不多说了。布局文件代码:= mWifiConfiguration.size()) { return; } // 连接配置好的指定ID的网络 mWifiManager.enableNetwork(mWifiConfiguration.get(index).networkId, true); } // 得到MAC地址 public String getMacAddress() { return (mWifiInfo == null) ? "NULL" : mWifiInfo.getMacAddress(); } // 得到接入点的BSSID public String getBSSID() { return (mWifiInfo == null) ? "NULL" : mWifiInfo.getBSSID(); } // 得到WifiInfo的所有信息包 public String getWifiInfo() { return (mWifiInfo == null) ? "NULL" : mWifiInfo.toString(); } // 添加一个网络并连接 public int addNetwork(WifiConfiguration wcg) { int wcgID = mWifiManager.addNetwork(mWifiConfiguration.get(3)); mWifiManager.enableNetwork(wcgID, true); return wcgID; }}复制代码AndroidManifest.xml:(注意需要添加的权限) 复制代码布局文件就不贴了,我想看界面你都可以自己写出来,如果有需要,这里可以下载源代码:
- 2013-09-10下载
- 积分:1
-
chap1
看看吧 这是一个原文件 看了会对你有帮助的 不过还是要懂些才能看懂的(This is a look at it read the original document will be helpful but you still have to understand in order to understand some of the)
- 2008-06-23 12:23:15下载
- 积分:1
-
在网页上显示当前时间
在网页上显示当前时间-on the website that shows the current time
- 2022-08-18 22:43:01下载
- 积分:1
-
ConvencionesCodigoJava
Convenciones de Codigo Java
- 2013-01-28 23:12:24下载
- 积分:1
-
APO缓存接口数据
//设置缓存
private void setCache(Long timeOut, TimeUnit timeUnit, String key, Object result) throws Exception {
if (timeOut.equals(0L)) {
stringRedisTemplate.opsForValue().set(key, JsonUtils.toJson(result));
} else {
stringRedisTemplate.opsForValue().set(key, JsonUtils.toJson(result), timeOut, timeUnit);
}
}
//查询缓存
private Object queryCache(long start, String methodName, String key) throws Exception {
//缓存的接口返回结果必须是RSResponse
Object result = JsonUtils.toBean(RSResponse.class, stringRedisTemplate.opsForValue().get(key));
long time = System.currentTimeMillis() - start;
logger.info("REST API Method【Cache】:" + methodName + ",Time:" + time + "ms");
return result;
}
- 2023-01-10 17:45:03下载
- 积分:1
-
一个简单的servlet实现增删改查功能的程序
通过学习servlet课程,做了一个小的练习,实现了学生信息的增删改查,不过其中不包含数据库,愿与大家一起学习
- 2022-02-09 15:15:23下载
- 积分:1
-
JSON
JSON包,标准标签库,Java中最常用的标准标签库。
JSON packages, standard tag libraries, and most commonly used standard tag libraries in Java.(JSON packages, standard tag libraries, and most commonly used standard tag libraries in Java.)
- 2017-09-08 08:49:22下载
- 积分:1
-
同样是一款留言本。能够实现留言,管理员编辑,管理员删除。管理员恢复。等功能。代码简洁。...
同样是一款留言本。能够实现留言,管理员编辑,管理员删除。管理员恢复。等功能。代码简洁。-Is also a guestbook. Able to achieve a message, administrators edit, delete administrators. Administrator to restore. And other functions. Code is simple.
- 2022-04-15 04:21:59下载
- 积分:1
-
gps定为
很厉害的gps定位,安卓系统的机遇GPS定位的DEMO,能通过GPS获得当前的精度,纬度,方向等信息
- 2022-06-15 18:27:12下载
- 积分:1