首页 文章 精选 留言 我的

精选列表

搜索[文件查看],共10048篇文章
优秀的个人博客,低调大师

[ Android Memory] MAT查看图片资源

参考:http://stackoverflow.com/questions/12709603/mat-eclipse-memory-analyzer-how-to-view-bitmaps-from-memory-dump/12709604#12709604 以下是测试通过的,至于GIMP方式,我没有实验成功。 1: 打开mat的inspector视图,比较重要的是mBuffer, mWidth, mHeight 2: InMATfor relatedBitmapobject right clickmBufferfield and select "Copy" -> "Save Value To File", name the file with an.rgbaextension. You need to note bitmap width and height frommWidthandmHeightfields, which you can see in Bitmap object. HavingImageMagickcommand line tools installed (for Ubuntuapt-get install imagemagick), you issueconvertcommand with the following parameters. convert -size 'width'x'height' -depth 8 filename.rgba filename.png For example convert -size 680x1209 -depth 8 phone_decor.rgba phone_decor.png 分类: Android Memory 本文转自demoblog博客园博客,原文链接http://www.cnblogs.com/0616--ataozhijia/p/4013035.html如需转载请自行联系原作者 demoblog

优秀的个人博客,低调大师

如何查看域名解析是否生效?

注意,请先到阿里云官网 领取幸运券,除了价格上有很多优惠外,还可以参与抽奖。详见:https://promotion.aliyun.com/ntms/act/ambassador/sharetouser.html?userCode=2a7uv47d&utm_source=2a7uv47d 您可访问第三方IP查询网站:http://www.ip138.com/ ,输入您的域名,例如:www.abc.com 然后点后面的查询,在查询结果页面中 如果看到域名后面对应的IP地址x.x.x.x,则说明解析已生效。如果还不能访问,请找你的空间服务商处理。 如果您通过http://www.ip138.com/可以查到域名对应的IP,但在您本地PING不到IP,则说明是您本地的DNS没有更新,您可找您本地的网络服务商更新一下DNS,如果您是通过路由器上网,可以重启路由器试一下。 测试别名解析生效的方法:您可进入DOS状态PING您的域名,方法如下:从桌面上的开始——程序——附件——C:、命令提示符,然后输入:nslookup www.abc.com ,然后按回车。(请将www.abc.com换成您的域名),测试结果中如能看到你别名指向的网址,则说明已生效。

优秀的个人博客,低调大师

仿Boss直聘-查看头像

发现Boss直聘app做的还是,比较不错的吧。。先看效果,致谢 Image-Zoomer GIF.gif 怎么用? <pre> @Override public void onClick(View v) { super.onClick(v); if (R.id.tv == v.getId()) { startActivity(ZoomActivity.class); } else if (R.id.iv == v.getId()) { new BossZoomHelper(this, imageView, 400); } } </pre> 原理很简单, <pre> package org.alex.bosszoomanim; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.app.Activity; import android.graphics.Bitmap; import android.graphics.Point; import android.graphics.Rect; import android.support.v7.widget.ContentFrameLayout; import android.view.View; import android.view.animation.DecelerateInterpolator; import android.widget.FrameLayout; import android.widget.ImageView; import org.alex.util.LogUtil; /** * 作者:Alex * 时间:2016/10/8 12:48 * 简述: */ public class BossZoomHelper { private Animator animator; private ImageView copyImageView; public BossZoomHelper(final Activity activity, final View originalView) { this(activity, originalView, 400); } public BossZoomHelper(final Activity activity, final View originalView, final long duration) { if (animator != null) { animator.cancel(); } final ContentFrameLayout container = (ContentFrameLayout) activity.findViewById(android.R.id.content); copyImageView = new ImageView(activity); int matchParent = FrameLayout.LayoutParams.MATCH_PARENT; FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(matchParent, matchParent); copyImageView.setLayoutParams(params); if (originalView instanceof ImageView) { copyImageView.setImageDrawable(((ImageView) originalView).getDrawable()); } else { Bitmap bm = view2Bitmap(originalView); if (bm != null) { copyImageView.setImageBitmap(bm); } } copyImageView.setVisibility(View.GONE); container.addView(copyImageView); final Rect startRect = new Rect(); final Rect endRect = new Rect(); Point offsetPoint = new Point(); originalView.getGlobalVisibleRect(startRect); /\*\* \* r 是 绝对(global)坐标参数,包含状态栏、ActionBar、底部虚拟键 \* globalOffset 用于将global坐标转换成local坐标,这里的local坐标,是相对于内容区的坐标,也就是除了状态栏和action bar和虚拟按键的区域。 \* \*/ container.getGlobalVisibleRect(endRect, offsetPoint); startRect.offset(-offsetPoint.x, -offsetPoint.y); endRect.offset(-offsetPoint.x, -offsetPoint.y); final float startScale; float scaleSize; float startScaleFinal; LogUtil.e("-offsetPoint.x = " + (-offsetPoint.x) + " -offsetPoint.y = " + (-offsetPoint.y)); LogUtil.e("startRect.width() = " + startRect.width() + " startRect.height() = " + startRect.height()); LogUtil.e("endRect.width() = " + endRect.width() + " endRect.height() = " + endRect.height()); if ((float) endRect.width() / (float) endRect.height() > (float) startRect.width() / (float) startRect.height()) { startScale = (float) startRect.height() / (float) endRect.height(); scaleSize = startScale \* (float) endRect.width(); startScaleFinal = (scaleSize - (float) startRect.width()) / 2.0F; startRect.left = (int) ((float) startRect.left - startScaleFinal); startRect.right = (int) ((float) startRect.right + startScaleFinal); } else { startScale = (float) startRect.width() / (float) endRect.width(); scaleSize = startScale \* (float) endRect.height(); startScaleFinal = (scaleSize - (float) startRect.height()) / 2.0F; startRect.top = (int) ((float) startRect.top - startScaleFinal); startRect.bottom = (int) ((float) startRect.bottom + startScaleFinal); } copyImageView.setPivotX(0.0F); copyImageView.setPivotY(0.0F); AnimatorSet showAnimatorSet = new AnimatorSet(); showAnimatorSet.setDuration(duration); showAnimatorSet.play(ObjectAnimator.ofFloat(copyImageView, View.X, new float[]{(float) startRect.left, (float) endRect.left})) .with(ObjectAnimator.ofFloat(copyImageView, View.Y, new float[]{(float) startRect.top, (float) endRect.top})) .with(ObjectAnimator.ofFloat(copyImageView, View.SCALE_X, new float[]{startScale, 1.0F})) .with(ObjectAnimator.ofFloat(copyImageView, View.SCALE_Y, new float[]{startScale, 1.0F})); showAnimatorSet.setInterpolator(new DecelerateInterpolator()); showAnimatorSet.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { copyImageView.setVisibility(View.VISIBLE); } public void onAnimationEnd(Animator animation) { animator = null; } public void onAnimationCancel(Animator animation) { destroy(originalView, container); } }); showAnimatorSet.start(); animator = showAnimatorSet; copyImageView.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { if (animator != null) { animator.cancel(); } copyImageView.setBackgroundColor(0); AnimatorSet hiddenAnimatorSet = new AnimatorSet(); hiddenAnimatorSet.play(ObjectAnimator.ofFloat(copyImageView, View.X, new float[]{(float) startRect.left})) .with(ObjectAnimator.ofFloat(copyImageView, View.Y, new float[]{(float) startRect.top})) .with(ObjectAnimator.ofFloat(copyImageView, View.SCALE_X, new float[]{startScale})) .with(ObjectAnimator.ofFloat(copyImageView, View.SCALE_Y, new float[]{startScale})); hiddenAnimatorSet.setInterpolator(new DecelerateInterpolator()); hiddenAnimatorSet.setDuration(duration); hiddenAnimatorSet.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationStart(Animator animation) { super.onAnimationStart(animation); } public void onAnimationEnd(Animator animation) { if (animator != null) { animator.cancel(); } destroy(originalView, container); } public void onAnimationCancel(Animator animation) { destroy(originalView, container); } }); hiddenAnimatorSet.start(); animator = hiddenAnimatorSet; } }); } private void destroy(View originalView, ContentFrameLayout container) { originalView.setAlpha(1.0F); copyImageView.setVisibility(View.GONE); container.removeView(copyImageView); animator = null; } private Bitmap view2Bitmap(View view) { view.setDrawingCacheEnabled(true); view.buildDrawingCache(); Bitmap bmp = view.getDrawingCache(); if (bmp == null) { return null; } Bitmap bp; bp = Bitmap.createBitmap(bmp, 0, 0, bmp.getWidth(), bmp.getHeight()); view.destroyDrawingCache(); return bp; } } </pre> https://github.com/Alex-Cin/BossAnim

优秀的个人博客,低调大师

Docker中查看mysql各环境参数

欢迎关注大数据和人工智能技术文章发布的微信公众号:清研学堂,在这里你可以学到夜白(作者笔名)精心整理的笔记,让我们每天进步一点点,让优秀成为一种习惯! 通过官方的文档可以看到运行MySQL容器的命令是: docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=mypwd -d mysql:tag 如:docker run --name mysqldb -e MYSQL_ROOT_PASSWORD=123456 -p 3336:3306 -d mysql:5.7 说明: docker run:运行容器 --name:指定容器名称,这里指定的名称为mysqldb -e:指定环境参数,e是environment的缩写,在运行MySQL容器时可以指定的环境参数有: MYSQL_ROOT_PASSWORD : root用户的密码,这里设置的初始化密码为`123456`; MYSQL_DATABASE : 运行时需要创建的数据库名称; MYSQL_USER : 运行时需要创建用户名,与MYSQL_PASSWORD一起使用; MYSQL_PASSWORD : 运行时需要创建的用户名对应的密码,与MYSQL_USER一起使用; MYSQL_ALLOW_EMPTY_PASSWORD : 是否允许root用户的密码为空,该参数对应的值为:yes; MYSQL_RANDOM_ROOT_PASSWORD:为root用户生成随机密码; MYSQL_ONETIME_PASSWORD : 设置root用户的密码必须在第一次登陆时修改(只对5.6以上的版本支持)。 MYSQL_ROOT_PASSWORD 和 MYSQL_RANDOM_ROOT_PASSWORD 两者必须有且只有一个。 -p 3336:3306:对外映射容器内的端口号,这里将容器里的3306映射到外部可访问的3336端口 -d:后台运行 mysql:5.7:运行5.7这个版本的mysql 在这篇文章中讲述了如何在hub.docker.com中查找镜像,也简单介绍了一些docker的命令,在下一节中主要讲解docker的一些常用命令。 本文章来自【知识林】

资源下载

更多资源
腾讯云软件源

腾讯云软件源

为解决软件依赖安装时官方源访问速度慢的问题,腾讯云为一些软件搭建了缓存服务。您可以通过使用腾讯云软件源站来提升依赖包的安装速度。为了方便用户自由搭建服务架构,目前腾讯云软件源站支持公网访问和内网访问。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册