首页 文章 精选 留言 我的

精选列表

搜索[Python支持],共10000篇文章
优秀的个人博客,低调大师

iOS11硬解VideoToolBox支持HEVC(H265)视频格式

iOS11系统增加了对HEVC视频格式,对于调用AVFoundation里的系统API实现视频播放编辑的应用不需要做任何适配,系统API已经很好的兼容了HEVC视频格式。但是如果使用了FFmpeg做跨平台开发,或是使用到VideoToolbox做视频硬解,就必须做适配了。 创建VideoToolBox VideoToolBox解码需要调用VTDecompressionSessionCreate方法创建session,创建session时需要CMVideoFormatDescriptionRef类型的视频格式描述。 对于解码H264视频,做法是调用CMVideoFormatDescriptionCreateFromH264ParameterSets方法,传入SPS,PPS完成创建。 对于解码HEVC视频,需要调用iOS11新提供的接口C

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

【云栖大会】AliOS Things宣布开源,支持物联网设备快速上云

2017杭州•云栖大会进入第三天,继阿里巴巴发布阿里云Link物联网平台后,AliOS家族旗下面向IoT领域的轻量级物联网嵌入式操作系统AliOS Things也正式亮相,具备极简开发、云端一体、丰富组件、安全防护等关键能力,可广泛应用在智慧城市、智能家电、智能家居、新出行等领域,实现物联网设备快速上云。 回顾嵌入式操作系统发展史,不难发现,已广泛应用于不同行业以及消费电子领域,但过去,嵌入式操作系统仅能实现一个迷你的操作系统内核,提供任务管理、时间管理、信号量、消息队列、内存管理等基本功能,面对多样性的物联网设备需求,显然不完全具备让设备上云和实现云上互联互通。 阿里巴巴集团资深副总裁、AliOS总裁胡晓明表示,“AliOS是驱动万物智能的开始,我们将定义一个不同于PC和移动时代的物联网操作系统。同时,他宣布,AliOS即将开源,并

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

android 支持分组和联系人展示的一个小样例

先看效果图: 要实现这个效果,activity必须实现ExpandableListActivity @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.main); mContactListView = getExpandableListView(); mContactListView.setBackgroundResource(R.drawable.default_bg); registerForContextMenu(mContactListView); mContactDataBase = ((ContactApplication) getApplication()) .getmContactDataBase(); getExpandableListView().setCacheColorHint(0);// 拖动时避免出现黑色 getExpandableListView().setDivider(null);// 去掉每项以下的黑线(切割线) // 自己定义下拉图标 getExpandableListView().setGroupIndicator( getResources().getDrawable(R.drawable.expander_ic_folder)); setAdatperForExpandableListView(); } /** * 设置ExpandableListView的adapter */ private void setAdatperForExpandableListView() { Cursor groupCursor = mContactDataBase.getAllGroups(); //这个是从数据库里查询出全部的组 Util.d(TAG, "groupCursor=" + groupCursor); // curosr的生命周期将和activity有关 startManagingCursor(groupCursor); // set my adapter <strong>ContactTreeAdapter </strong>contactTreeAdapter = new ContactTreeAdapter( groupCursor, this, true, mContactDataBase); setListAdapter(contactTreeAdapter); } 主要实现 ContactTreeAdapter这个adapter public class ContactTreeAdapter extends CursorTreeAdapter { /** log tag. */ private static final String TAG = "ContactTreeAdapter"; /** context */ public Context mContext = null; private Cursor mCursor = null; private ContactDataBase mContactDataBase; // contact表字段索引 private static final int INDEX_NAME = 1; private static final int INDEX_PHONENUMBER = 2; // group表字段索引 private static final int INDEX_GROUPNAME = 1; public ContactTreeAdapter(Cursor cursor, Context context, boolean autoRequery, ContactDataBase contactDataBase) { super(cursor, context, autoRequery); mContext = context; this.mContactDataBase = contactDataBase; // TODO Auto-generated constructor stub } @Override protected Cursor getChildrenCursor(Cursor groupCursor) { // TODO Auto-generated method stub String groupName = groupCursor.getString(INDEX_GROUPNAME);// 得到当前的组名 Cursor childCursor = mContactDataBase.getContactsByGroupName(groupName); return childCursor; } @Override protected View newGroupView(Context context, Cursor cursor, boolean isExpanded, ViewGroup parent) { // TODO Auto-generated method stub Util.d(TAG, "newGroupView"); LayoutInflater inflate = LayoutInflater.from(mContext); View view = inflate.inflate(R.layout.grouplayout, null); bindGroupView(view, context, cursor, isExpanded); return view; } @Override protected void bindGroupView(View view, Context context, Cursor cursor, boolean isExpanded) { // TODO Auto-generated method stub Util.d(TAG, "bindGroupView"); TextView groupName = (TextView) view.findViewById(R.id.groupName); String group = cursor.getString(INDEX_GROUPNAME); groupName.setText(group); TextView groupCount = (TextView) view.findViewById(R.id.groupCount); int count = mContactDataBase.getCountContactByGroupName(group); Util.d(TAG, "count=" + count + "group=" + group); groupCount.setText("[" + count + "]"); } @Override protected View newChildView(Context context, Cursor cursor, boolean isLastChild, ViewGroup parent) { // TODO Auto-generated method stub Util.d(TAG, "newChildView"); LayoutInflater inflate = LayoutInflater.from(mContext); View view = inflate.inflate(R.layout.childlayout, null); bindChildView(view, context, cursor, isLastChild); return view; } @Override protected void bindChildView(View view, Context context, Cursor cursor, boolean isLastChild) { // TODO Auto-generated method stub Util.d(TAG, "bindChildView cursor.getString(INDEX_PHONENUMBER)=" + cursor.getString(INDEX_PHONENUMBER)); TextView name = (TextView) view.findViewById(R.id.name); name.setText(cursor.getString(INDEX_NAME)); TextView description = (TextView) view.findViewById(R.id.description); description.setTextKeepState(cursor.getString(INDEX_PHONENUMBER)); } }<strong> </strong> 由于这个adapter的函数命名就能够看出是干什么的就不一一解释了 代码能够在http://download.csdn.net/detail/baidu_nod/7684649下载 本文转自mfrbuaa博客园博客,原文链接:http://www.cnblogs.com/mfrbuaa/p/5182353.html,如需转载请自行联系原作者

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Spring

Spring

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

Sublime Text

Sublime Text

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

用户登录
用户注册
修改密码
忘记密码