摘要:
在开发过程中。我们常常会须要定义一些static类型的变量或者函数。我们接下来来详细聊一下static; 1、修饰变量 当static来修饰一个变量时,就注定了这个变量的可见范围和生命周期; (1)当修饰全局变量时 static int flag1 = 0; int flag2 = 0; 这两个变量 阅读全文
posted @ 2017-06-08 21:08
cxchanpin
阅读(1541)
评论(0)
推荐(0)
摘要:
构造过程是为了使用某个类、结构体或枚举类型的实例而进行的准备过程。在构造过程中,对每一个属性进行了初始值预设和其它必要的准备和初始化工作。 与OC相比,swift的构造函数。不须要返回值。同一时候,在类和结构体的构造过程中,必须对全部的存储类型属性,包括继承自父类的属性。赋予合适的初始值。存储类型值 阅读全文
posted @ 2017-06-08 19:49
cxchanpin
阅读(183)
评论(0)
推荐(0)
摘要:
发现非常多APP的界面都能够滑动,QQ。微信等等,自己琢磨了下。效果例如以下: 代码:ScrollView package com.wsj.wsjdemo; import android.content.Context; import android.graphics.Rect; import an 阅读全文
posted @ 2017-06-08 18:24
cxchanpin
阅读(190)
评论(0)
推荐(0)
摘要:
Unity 3D本地公布WebPlayer版时遇到提示:"Failed to download data file"(如上图),遇到这个问题就是指Webserver并没有支持这样的*.unity3d文件类型。须要做的是在Webserver中加入MIME类型: 1.IIS 7 及以上版本号: 在功能视 阅读全文
posted @ 2017-06-08 17:43
cxchanpin
阅读(571)
评论(0)
推荐(0)
摘要:
win7休眠的开启与关闭方法 从開始菜单中找到“附件→命令提示符”,手工输入例如以下命令:powercfg -a。从这里能够清楚的看到,计算机是支持休眠的。显示“尚未启用休眠"。仍然在命令提示符下进行操作, 開始休眠方法:手工键入例如以下命令: powercfg -hibernate on(关闭则为 阅读全文
posted @ 2017-06-08 16:15
cxchanpin
阅读(1438)
评论(0)
推荐(0)
摘要:
Matplotlib能够用来创建非常美丽精确的数学图形:可是有时候在进行想法交流的时候,不想那么严谨正式。想使用那种轻松的、涂鸦风格的图形:MATLAB XKCDify项目能够用来生成上述的涂鸦作品:https://github.com/slayton/matlab-xkcdify只是本文将介绍使用 阅读全文
posted @ 2017-06-08 16:14
cxchanpin
阅读(186)
评论(0)
推荐(0)
摘要:
android获取自己定义控件位置坐标,屏幕尺寸,标题栏,状态栏高度 1.获取自己定义控件height 在本Activity中获取当前Activity中控件的height: Button button = (Button)findViewById(R.id.button); int buttonHe 阅读全文
posted @ 2017-06-08 14:44
cxchanpin
阅读(1083)
评论(0)
推荐(0)
摘要:
This code recipe gives you an idea of how to use Flask-Admin with postgresql database. from flask import Flask from flask.ext.admin import Admin from 阅读全文
posted @ 2017-06-08 13:32
cxchanpin
阅读(731)
评论(0)
推荐(0)
摘要:
题目: Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transac 阅读全文
posted @ 2017-06-08 12:53
cxchanpin
阅读(191)
评论(0)
推荐(0)
摘要:
多态:一个对象相应着不同类型 多态在代码中的体现:父类或接口的引用指向其子类对象。 多态的优点: 提高了代码的扩展性,前期定义的代码能够使用后期的内容。 多态的弊端: 前期定义的内容不能使用后期子类中定义的特有内容。 多态的前提: 1,必须有关系,(继承。实现)。 2,要有覆盖。 Animal a 阅读全文
posted @ 2017-06-08 11:39
cxchanpin
阅读(364)
评论(0)
推荐(0)