现在位置: 首页 > fireproof发表的所有文章
  • 11月
  • 12日
综合 ⁄ 共 1938字 评论关闭
在OpenGL中,裁剪用到glScissor: [cpp] view plaincopy void glScissor(     GLint x,     GLint y,     GLsizei width,     GLsizei height   );   [cpp] view plaincopy Parameters   x, y   The lower-left corner of the scissor box. Initially (0,0).   width, height   The width and height of the scissor box. When an OpenGL context is first attached to a window, width and height are set to the dimensions of that window.   Remarks   The glScissor function defines a rectangle, called the sc......
阅读全文
  • 08月
  • 09日
综合 ⁄ 共 806字 评论关闭
保留意见:过分争执无益自己且又有失涵养。通常,应不急于表明自己的态度或发表意见,让人们捉摸不定。谨慎的沉默就是精明的回避。   认识自己:促进自己最突出的天赋,并培养其它方面。只要了解自己的优势,并把握住它,则所有的人都会在某事显赫。   决不夸张:夸张有损真实,并容易使人对你的看法产生怀疑。精明者克制自己,表现出小心谨慎的态度,说话简明扼要,决不夸张抬高自己。过高地估计自己是说谎的一种形式。它能损坏你的声誉,对你的人际关系产生十分不好的影响。有损你的风雅和才智。   适应环境:适者生存,不......
阅读全文
  • 04月
  • 26日
综合 ⁄ 共 819字 评论关闭
一般情况下都不会出现EditText编辑框设置不可修改,顾名思义EditText就应该可以修改嘛。哈哈。 但是有些从手机或者SIM卡读取配置信息出来会显示在EditText中,设计者并不希望用户去修改这些数据而造成一些功能的问题。 首先点拨最简单的设置方式,那就是 mEditText.setFocusable(false); 哈哈,是不是很奸诈,不让用户获得焦点,自然无法更改了,也无法出现点击组件时应该出现的输入法框。 第二种就会显得比较有技术含量了,我也是网上找的高手写的方法,我也只能去理解他这样做的原因,我想不出来 -。- mEditText.setFilters(new ......
阅读全文
  • 09月
  • 17日
移动开发 ⁄ 共 2205字 评论关闭
在Android群里,经常会有人问我,Android Log是怎么用的,今天我就把从网上以及SDK里东拼西凑过来,让大家先一睹为快,希望对大家入门Android Log有一定的帮助. android.util.Log常用的方法有以下5个:Log.v() Log.d() Log.i() Log.w() 以及 Log.e() 。根据首字母对应VERBOSE,DEBUG,INFO, WARN,ERROR。 1、Log.v 的调试颜色为黑色的,任何消息都会输出,这里的v代表verbose啰嗦的意思,平时使用就是Log.v("",""); 2、Log.d的输出颜色是蓝色的,仅输出debug调试的意思,但他会输出上层的信息,过滤起来可以通过DDMS的Logcat......
阅读全文
  • 08月
  • 02日
综合 ⁄ 共 82字 评论关闭
git reset --hard xxx(版本号) git reset --hard d35bea4344982d75623acc8205fdfff2e12469ee
阅读全文
  • 05月
  • 25日
综合 ⁄ 共 4040字 评论关闭
今天看的一块布局是这样的: <!-- The frame layout is here since we will be showing either the empty view or the list view. --> <FrameLayout android:layout_width="match_parent" android:layout_height="0dip" android:layout_weight="1" > <!-- Here is the list. Since we are using a ListActivity, we have to call it "@android:id/list" so ListActivity will find it --> <ListV......
阅读全文
  • 05月
  • 16日
综合 ⁄ 共 3029字 评论关闭
一 . 得到这个对象的实例Connection con ;con = DriverManager.getConnection(url,userName,password);DatabaseMetaData dbmd = con.getMetaData();二. 方法getTables的用法原型:ResultSet DatabaseMetaData.getTables(String catalog,String schema,String tableName,String []type) 此方法可返回结果集合ResultSet ,结果集中有5列, 超出会报越界异常 功能描述:得到指定参数的表信息参数说明:参数:catalog:目录名称,一般都为空.参数:schema:数据库名,对于oracle来说就用户名参数:tablename:表名称参数:type :表的类型(T......
阅读全文
  • 05月
  • 04日
综合 ⁄ 共 20字 评论关闭
cube20 CFOP之F2L 最少步数研究
阅读全文
  • 05月
  • 01日
综合 ⁄ 共 1911字 评论关闭
题意:求加入一条边后剩余的桥。 题解:加入的边形成的环里的桥都不存在了。 #pragma comment(linker, "/STACK:10240000000000,10240000000000") #include <iostream> #include <vector> #include <stack> #include <cstdio> #include <cstring> using namespace std; const int maxn=110009; const int M=210005; int low[maxn]; int dfn[maxn]; int n,m; vector<int>p[maxn]; stack<int>s; int aa,bb; int qu; int vis[maxn]; int fa[maxn]; int b[maxn]; int tmp=1; int ecnt; stru......
阅读全文
  • 04月
  • 29日
综合 ⁄ 共 1730字 评论关闭
我们讨论过对int arr[20]所有元素求和的最高执行效率代码,那就是: int sum = arr[0] +arr[1] +arr[2] +arr[3] +arr[4] +arr[5] +arr[6] +arr[7] +arr[8] +arr[9] +arr[10] +arr[11] +arr[12] +arr[13] +arr[14] +arr[15] +arr[16] +arr[17] +arr[18] +arr[19]; 但是这样写代码实在是太累了,为了效率,也不能这样写代码不是,要是我的数组是int arr[100]岂不是要写到无比长去!那么这次我们就通过元编程完成一次代码自动生成! template <int Dim,typename T......
阅读全文
  • 02月
  • 10日
综合 ⁄ 共 739字 评论关闭
public class TestFilter { public static void main(String[] args) { find("d:\\java\\"); } public static void find(String strPath) { MyFilenameFilter filter=new MyFilenameFilter(".txt"); File dir = new File(strPath); File[] files = dir.listFiles(filter); if (files == null) return; for (int i = 0; i < files.length; i++) { ......
阅读全文
  • 02月
  • 05日
综合 ⁄ 共 2243字 评论关闭
问题描述见:http://www.iteye.com/problems/87448 Struts2里面的Action对象的result的String Print出来的结果没有问题 {"id":"4028efd439422d260139422d2a530000","name":"department"} 在Struts.xml里面配置的 <package name="jsons" namespace="/" extends="json-default"> <action name="jsoninfo" class="personAction"> <result name="department" type="json"> <param name="root">result</param>   </result> </action> </package> 然后再浏览器中输入对应的地址调用 返......
阅读全文