条款06: 若不想使用编译器自动生成的函数,就该明确拒绝
Explicitly disallow the use of compiler-generated functions you do not want.
在某些情况下,希望保持对象的唯一性,不想让对象有其他副本.如下:
class HomeForSale { ... };
HomeForSale h1;
HomeFo...
分类:
编程语言 时间:
2015-08-27 15:26:33
阅读次数:
132
The ssh "timed out waiting for input: auto-logout" messages is generated by ssh upon reaching a auto-logout after an inactivity time specified by the ...
分类:
其他好文 时间:
2015-08-27 12:41:48
阅读次数:
303
1.使用java的sleep try { Thread.sleep(3000); } catch (InterruptedException e) { // TODO Auto-generated catch block ...
分类:
其他好文 时间:
2015-08-26 17:38:01
阅读次数:
119
[2015/08/25 20:50:13.254] {ThreadLauncher2[ThreadPool[system]]-1} Thread Dump generated Tue Aug 25 20:50:13 CST 2015 ...
分类:
其他好文 时间:
2015-08-26 13:52:54
阅读次数:
672
public?class?Main{
?/**
??*?@param?args
??*/
?public?static?void?main(String[]?args)?{
??//?TODO?Auto-generated?method?stub
??Scanner?scan?=?new?Scanner(System.in);
??i...
分类:
其他好文 时间:
2015-08-25 13:03:25
阅读次数:
225
import java.util.Arrays;
import java.util.Scanner;
public class GetKSmallNum {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scan = new Scanner(System.in)...
分类:
其他好文 时间:
2015-08-21 21:36:02
阅读次数:
154
以EditText为例:
username.setOnDragListener(new OnDragListener() {
@Override
public boolean onDrag(View v, DragEvent event) {
// TODO Auto-generated method stub
Log.i("touch", event.getX()+" "+...
分类:
移动开发 时间:
2015-08-20 10:45:20
阅读次数:
147
5.设置键盘监听【以EditText为例】
username.setOnKeyListener(new OnKeyListener() {
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
// TODO Auto-generated method stub
switch (keyC...
分类:
移动开发 时间:
2015-08-20 10:44:01
阅读次数:
122
@Override public void onBackPressed() { // TODO Auto-generated method stub super.onBackPressed(); }重写时应该去掉super.onBackPressed(); 否则会默认执行退出动作
分类:
移动开发 时间:
2015-08-20 10:28:11
阅读次数:
133
2.输入内容时按下回车键时监听
username.setOnEditorActionListener(new OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
// TODO Auto-generated...
分类:
移动开发 时间:
2015-08-20 09:09:34
阅读次数:
176