1、设置窗口格式为半透明
getWindow().setFormat(PixelFormat.TRANSLUCENT);
2、Android中在非UI线程里更新View的不同方法:
* Activity.runOnUiThread( Runnable )
* View.post( Runnable )
* View.postDelayed( Runnable, long )
* Han
转载
精选
2012-05-03 17:13:40
547阅读
1、设置窗口格式为半透明getWindow().setFormat(PixelFormat.TRANSLUCENT);2、Android中在非UI线程里更新View的不同方法:* Activity.runOnUiThread( Runnable )* View.post( Runnable )* View.postDelayed( Runnable, long )* Hanlder3、全屏显示窗口requestWindowFeature(Window.FEATURE_NO_TITLE);getWindow().setFlags(WindowManager.LayoutParams.FLAG_F
转载
2012-02-02 17:46:00
68阅读
2评论
[python] view plaincopy1.生成随机数 import random #这个是注释,引入模块 &nbs
转载
精选
2015-04-24 16:51:17
767阅读
``` / @desc 判断两个数组是否相等 @param {Array} arr1 @param {Array} arr2 @return {Boolean} / function arrayEqual(arr1, arr2) { // 首先要判断是否是数组,传进来的非数组,返回false if(
转载
2019-01-03 12:09:00
208阅读
2评论
1)判断一个元素是否存在使用jQuery判断元素是否存在,非常的简单。对于一个jQuery对象,我们只需要用length属性即可判断元素是否存在,如果存在肯定是大于0,示例代码:判断这个图片是否存在,如果存在在把这个图片替换<
原创
2021-08-05 17:39:42
166阅读
检测IE浏览器$(document).ready(function() { if (navigator.userAgent.match(/msie/i) ){ alert('I am an old fas
转载
2023-03-05 16:49:17
119阅读
# 文件的当前目录 puts __FILE__ # string.rb # 文件的当前行 puts __LINE__ # 6 #文件的当前目录 puts __dir__ #/media/haima/34E401CC64DD0E28/site/ruby/RubyStudy/Lesson02 puts
原创
2021-08-06 17:12:16
435阅读
字符串截取函数:length、left、right、substring、mid、substr、locate、position、substring_index、concat、concat_ws
原创
2022-10-30 09:50:20
119阅读
1、图片旋转:
Bitmap bitmapOrg = BitmapFactory.decodeResource(this.getContext().getResources(), R.drawable.moon);
Matrix matrix = new Matrix();
matrix.postRotate(-90);//旋转的角度
Bitmap resizedBitma
转载
2013-01-06 11:37:46
225阅读
作者:WEBINGsegmentfault.com/a/1190000014700549一、预加载图像如果你的网页中需要使用大量初始不可见的(例如,悬停的)图像,那么可以预加载这些图像。二、检查图像是否加载有时为了继续脚本,你可能需要检查图像是否全部加载完毕。你也可以使用 ID 或 CLASS 替换<img> 标签来检查某个特定的图像是否被加载。三、自动修复破坏的图像逐个替换已经破坏的...
转载
2018-06-27 10:27:28
60阅读
值得收藏,慢慢看。
转载
2022-11-08 15:56:34
73阅读
Struct to JsonString golang type BaseRequest struct { httpMethod string domain string path string params map[string]string formParams map[string]strin
原创
2021-08-07 14:43:18
361阅读
$.ajax({ type: "POST", url: "http://127.0.0.1:9999/api/demo/CURD", data: JSON.stringify({ token: "sgToken", jsonPath: "user", username: "测试账号", passwor
原创
2022-02-09 23:24:29
181阅读
一、预加载图像如果你的网页中需要使用大量初始不可见的(例如,悬停的)图像,那么可以预加载这些图像。二、检查图像是否加载有时为了继续脚本,你可能需要检查图像是否全部加载完毕。你也可以使用 ID 或 CLASS 替换 <img>标签来检查某个特定的图像是否被加载。三、自动修复破坏的图像逐个替换已经破坏的图像链接是非常痛苦的。不过,下面这段简单的代码可以帮助你。四、悬停切换当用户鼠标悬停在可...
转载
2021-07-16 10:01:24
150阅读
<iframe id="SGframe" src="外部文件名.html" frameborder="no" scrolling="no" style="display:block"></iframe><!--全屏iframe
原创
2022-02-03 06:04:35
114阅读
1. 获取文件后缀名 使用场景:上传文件判断后缀名 /** * 获取文件后缀名 * @param {String} filename */ export function getExt(filename) { if (typeof filename == 'string') { return fil ...
转载
2021-09-10 14:25:00
200阅读
2评论
1.tab(由于本人对css功底浅薄,没有办法把 JQuery 中tab的样式改为自己所需要的样式,并使其在所有浏览器下都兼容,后来发现它本身的样式在Opera 中也是有问题的,于是干脆自己写。。。突然想起以前使用的时候 tab 和 tab body 必须放在一个div下,然
转载
2009-08-28 10:28:00
222阅读
2评论
PickIf you need to construct a new type based on some properties of an interface you always can get the Pick utility type.`interface MyInterface { id: number; name: string; properties: string[]; }type
原创
2021-04-17 22:36:40
195阅读
PickIf you need to construct a new type based on some properties of an interface yo
原创
2022-03-30 14:10:33
162阅读
C#常用代码片段备忘 来源 https://www.cnblogs.com/sanghg/p/8257024.html 参考: https://docs.microsoft.com/zh-cn/visualstudio/ide/visual-csharp-code-snippets?view=vs-
转载
2019-03-09 14:14:00
238阅读