比如说btn.performClick();其中btn是一个按钮的名字 就让代码自动点击了btn可以用于写代码测试 也可以解决一些需要特殊处理的代码 很方便的哦这个博客好短啊~~~~~
<?phpheader('content-type:text/html;charset=utf-8');/**/date_default_timezone_set('PRC');$filename="msg.txt";$msgs=[];//检测文件是string=file_get_contents($file...
答 有三种情况
第一种不在清单文件的activity中设置configChanges时
切屏幕的话会重新调用各个生命周期 切横屏时会执行一次,切竖屏时会执行两次
第二种情况
设置Activity的configChanges="orientation" 切换屏幕只会执行一次
第三种情况
configChanges="orientati
这不是广告首先得需要一个蓝牙控制器 然后再操作我在某宝发现了这样的 附地址https://item.taobao.com/item.htm?spm=a230r.1.14.45.YzSGuI&id=42767906785&ns=1&abbucket=1#detailbutterknife的使用在我别的博客上有 这个是布局图 因为要在真机测试 很麻烦 不过我这是完美运
模拟短信发送给自己 爱慕虚荣什么的 木问题啊用模拟器测试也是可以的 界面很丑,因为只是个小demo 功能才是最重要的权限 <?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="
配置环境变量然后cmd 输入 php -m查看是否有zip 选项 没有的话zip功能将无法使用function zip_file(string $filename){ if (!is_file($filename)) { return false; } $zip = new ZipArchive(); $zipName = basen...
//这种方法状态栏是空白,显示不了状态栏的信息 private void saveCurrentImage() { //获取当前屏幕的大小 int width = getWindow().getDecorView().getRootView().getWidth(); int height = getWindow().getDecorView().g
先说mysql<?phpheader('content-type:text/html;charset=utf-8');/** * Created by PhpStorm. * User: liuan * Date: 2018-11-16 0016 * Time: 10:55 */// 1,连接数据库$con = @mysql_connect('localhost','...
//主动判断是否HTTPSfunction isHTTPS(){ if (defined('HTTPS') && HTTPS) return true; if (!isset($_SERVER)) return FALSE; ifR['H...
微信代码try { //利用Intent打开微信 Uri uri = Uri.parse("weixin://"); Intent intent3 = new Intent(Intent.ACTION_VIEW, uri); startActivi
首先,在Manifest中添加基本的权限:<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <uses-p
Point point = Utils.computeImgSize(240, 135, itemView.getContext()); ViewGroup.LayoutParams layoutParams = ivPostimg.getLayoutParams(); layoutParams.width=point.x; lay
官方依赖 //第三方播放插件 compile 'fm.jiecao:jiecaovideoplayer:3.5'代码//先找到这个id 然后设置播放 //播放视频 videoplayer.setUp(url, title); //模拟点击 videoplayer.startButton.performClick
效果图布局<LinearLayout android:id="@+id/main_bottome_switcher_container" android:layout_width="match_parent" android:layout_height="50dp" android:orientation="horizontal">
<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>Title</title> <script src="https://cdn.bootcss.com/angular.js/1.4.6/angular.min.js"></sc
Error Code : 1064 You have an error in your SQL syntax; check the manual that corresponds to your My
我遇到的是 添加商品失败![1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's cultural heritage(上) │ │ │ ├─(1)Unit6
前段时间将Android Studio 升级到3.0后,原本一切正常的项目出现编译错误Error:Cannot choose between the following configurations of project :**: - debugApiElements - debugRuntimeElements - releaseApiElements&nbs
我更新 Android Studio2.3.3到3.0版本后,同时也更新了gradle到4.1后,就出现了这个问题。直接上解决办法:一、注释掉module的buid.gradle下 // 应用插件 //apply plugin: 'com.neenbedankt.android-apt'或者是这样子的//apply plugin: 'android-apt'二、修改dependencies模块(注
$search_list = array_filter(explode('|',$search));var_dump($search_list);array_filter函数可以做到~~~
Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor. Please add them to the annotationProcessor
mysql connect返回null 原因是用了mysqli_error($con)调试语句实际应该使用mysqli_connect_error() $con = mysqli_connect($host, $u
静态注册广播如图所示,新建一个Broadcast Receiver的Java文件,我命名为MyReceiver1.java 源码如下package com.boradcasst.liuan.myboradcast;import android.content.BroadcastReceiver;import android.content.Context;import andr
$act = isset($_REQUEST["act"]) ? $_REQUEST["act"] : "";
Intent intentOpen = new Intent(AreaInspectLivebroadcast.OPEN_VIDEO_BD);intentOpen.putExtra("type", AreaInspectLivebroadcast.OPEN_VIDEO_BD);intentOpen.putExtra("title", getString(R.string.web_bd));inte
众所周知,我们要查看安卓手机中文件系统前提条件是要root手机,然后去DDMS里面去看,但是现在很多手机都不好root,替代的方法是用电脑模拟器,不管怎么样,都挺麻烦的,最近更新Android studio 到3.0版本,无意间发现了一个方法,非常简单,还不用root手机。1、手机USB线连接手机,打开调试模式2、打开AS,找到窗口右下角的Device File Explorer,如下图:3、点击
发送header:我们定义了三个参数,token、language、region,放入header发送过去<?php$url = 'http://www.example.com';$header = array('token:JxRaZezavm3HXM3d9pWnYiqqQC1SJbsU','language:zh','region:GZ');$content = arra..
概述宗旨Markdown 的目标是实现「易读易写」。可读性,无论如何,都是最重要的。一份使用 Markdown 格式撰写的文件应该可以直接以纯文本发布,并且看起来不会像是由许多标签或是格式指令所构成。Markdown 语法受到一些既有 text-to-HTML 格式的影响,包括 Setext、atx、Textile、reStructuredText
#curlfunction curl_geturl($url){ $headerArray = array("Content-type:application/json;", "Accept:application/json"); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_seto...
SQL博大精深TO_DAYS函数 返回一个天数! 啊哈?什么天数? 从年份0开始的天数比如:mysql> SELECT TO_DAYS(‘1997-10-07′);结果 729669