`
文章列表
软件环境: 1:下载android sdk 并且设置path 默认包含两个exe 1.1:AVD=>android virtue machine android虚拟机 2.1:SDK=>android sdk 管理 例如 android2.0 android3.0 android4.0 .... 2:下载eclipse android插件     2.1 Android ADT extendsion 3.5.0 2.2 Android Development Tools  For Eclipse 2.3 Android Configurator for M2E   ...

android

http://www.vogella.com/articles/Android/article.html#tutorialemulator_target http://stand.spree.de/wiki_details_maven_archetypes 框架选择 http://www.importnew.com/8577.html 使用RoboGuice库 http://www.importnew.com/8577.html anroid设计原则 http://adchs.github.io/get-started/principles.html Android开发者必知的5个开源库 ...
http://mwidlake.wordpress.com/2010/04/21/internal_function-impact/ 特例:我们在日期上加索引,数据库类型date,hibernate映射 timespan 导致发到数据库 date < to_timespan('') 这种SQL导致 数据库会在左边字段加上 internal_function(date) 导致索引失效

oracle

--查看表所在表空间 select * from user_segments where SEGMENT_NAME='****' --查看索引统计信息 SELECT * FROM user_ind_statistics WHERE index_name = '****'; --查看表统计信息 SELECT * FROM user_tab_statistics where table_name='*****' -- exec dbms_stats.gather_table_stats(ownname => 'scott',tabname => 'work_list',estimate_ ...
1找到SQLID: select sql_id from v$sql where sql_text='.......' 可以让你的SQL变得唯一 2:查看SQL计划 select * from table(dbms_xplan.display_cursor('。。。。。。'));
http://www.ibm.com/developerworks/cn/java/j-jtp10264/index.html

java

java同步工具类: CountDownLatch 等待某个事件,再执行。做到主线程同时释放工作线程,减少竞争 构造函数: new CountDownLatch(2) 方法:await 直到等待事件为0 方法:countDown() 减少等待事件 Semaphore用来控制访问某个资源的访问数量。例如数据库连接池,最多有10个。 构造函数: new Semaphore(10) 方法:acquire 当到达极限的时候 ,就无法获取 方法:release 释放一个计数,让别人可以获得 CyclicBarrier:等待所有工作线程 准备好 再执行。例如我们多线程计算求和, 最后求总合计,就很适 ...

java

/** * productor create the product,and does not care consumer */ class Productors extends Thread{ private final BlockingQueue<String> queue; public Productors( BlockingQueue<String> queue){this.queue = queue;} @Override public void run() { try { queue.put(Double.toStrin ...
$.ajaxSetup({      contentType : "application/x-www-form-urlencoded;charset=utf-8",     error : function(xhr, textStatus,errorThrown){         if (xhr.status == 911) {                window.location.replace(*******);//返回应用首页              return;          }     },     c ...
<!--[if lt IE 9]> <script type="text/javascript">        $(function(){     var el;        $("select")          .each(function() {            el = $(this);            el.data("origWidth", el.outerWidth()) // IE 8 can haz padding          })          .mouseente ...

java

class MutablePoint { private int x, y; public MutablePoint() { x = 0; y = 0; } public MutablePoint(MutablePoint copy) { this.x = copy.x; this.y = copy.y; } public int getX() { return x; } public void setX(int x) { this.x = x; } public int getY() { return y; } public v ...

java

class VolatileCase extends Thread{ //if some thread  crash,all the threads exit private volatile boolean crash = false; //when count is equals 100 exit private AtomicInteger count = new AtomicInteger(0); @Override public void run() { while(true){ if(crash){ System.out.println(Threa ...
class CasNumberRange{ //immutable class private static class IntPair{ final int lower; final int upper; public IntPair(final int l,final int u){ this.lower = l; this.upper = u; } } //atomic private final AtomicReference<IntPair> values = new AtomicReference<>(new ...

java

class Count{ private long count =0; public long getCount(){ return count; } //thread safe fix 1000 public  synchronized void service(){ ++count; System.out.println(Thread.currentThread().getName()); } //thread not safe[998 or 997 my test result] public  void service1(){ ++count; ...
public class Test{ //等待某个条件为真 执行 static void countDown() throws InterruptedException{ //主线程控制 所有子线程 执行 final CountDownLatch start = new CountDownLatch(1); //主线程等待 所有子线程 执行完毕 final CountDownLatch end = new CountDownLatch(10); for( int i=0;i<10;i++){ final int  index = i; Thread t = ...
Global site tag (gtag.js) - Google Analytics