// Create a byte array
byte[] bytes = new byte[10];
// Wrap a byte array into a buffer
ByteBuffer buf = ByteBuffer.wrap(bytes);
// Retrieve bytes between the position and limit
// (see Pu...
                            
                            
                                分类:
编程语言   时间:
2015-04-14 18:08:02   
                                阅读次数:
203
                             
                    
                        
                            
                            
                                给你一个小例子,如果你有点基础,应该能触类旁通。12345678910111213141516171819202122232425262728usingSystem.Messaging;//建一个类publicclassPerson{publicstringFirstName{get;set;}pu...
                            
                            
                         
                    
                        
                            
                            
                                1、如在MainActivity.java中的按钮点击时设置://发送数据方法1--简单型 i.putExtra("txt", "没错,我就是刚传来的信息!"); //发送数据方法2--复杂型 Bundle data = new Bundle(); data.pu...
                            
                            
                                分类:
移动开发   时间:
2015-04-10 13:06:14   
                                阅读次数:
140
                             
                    
                        
                            
                            
                                二话不说,上代码/** * * @author LiuYeFeng * @date 2015年4月8日 下午10:41:13 * @CopyRight 2015 TopView Inc * @version V1.0 */public class MethodHandleTest { pu...
                            
                            
                                分类:
其他好文   时间:
2015-04-09 00:56:47   
                                阅读次数:
150
                             
                    
                        
                            
                            
                                BlockingQueue接口定义了包括两个附加功能的队列。这两个功能是:如果从空队列中取元素或者向满队列中增加元素,则进入等待状态。BlockinQueue接口中的方法pu(e)t和take()可以使其进入无限阻塞状态,可以用这两个方法实现生产者和消费者问题,比较简单。代码如下:package ....
                            
                            
                                分类:
其他好文   时间:
2015-04-07 18:59:38   
                                阅读次数:
86
                             
                    
                        
                            
                            
                                class Girl{	public void showAppearance()	{ System.out.println("the girl: face without make up");	}	}class TakeFlower extends Girl{	Girl girl=null;	pu....
                            
                            
                                分类:
编程语言   时间:
2015-04-02 22:08:11   
                                阅读次数:
173
                             
                    
                        
                            
                            
                                1.创建一个转场动画 CATransition *animation = [CATransition animation];2.动画时间 animation.duration = 0.8;3.动画类型 animation.type = @"rippleEffect";/* fademoveIn pu...
                            
                            
                                分类:
其他好文   时间:
2015-04-02 20:45:30   
                                阅读次数:
137
                             
                    
                        
                            
                            
                                data _null_;x=15.63;y=15.13;xx=ceil(x);yy=ceil(y);put xx= yy=;xx=floor(x);yy=floor(y);put xx= yy=;xx=int(x);yy=int(y);put xx= yy=;xx=round(x,0.1);yy=round(y,0.1);put xx= yy=;z=trunc(1/3,3);*按3个字节存储;pu...
                            
                            
                                分类:
其他好文   时间:
2015-04-01 15:23:37   
                                阅读次数:
105
                             
                    
                        
                            
                            
                                结论: 从面相对象编程的角度考虑,拷贝构造函数调用重载赋值操作符,重载赋值操作符调用拷贝构造函数的写法都是没有意义的。应该避免。Don't try to implement one of the copying functions in terms of the other. Instead, pu...
                            
                            
                                分类:
编程语言   时间:
2015-04-01 15:14:08   
                                阅读次数:
141
                             
                    
                        
                            
                            
                                类似这样的后缀表达式:叫做逆波兰表达式["2", "1", "+", "3", "*"] -> ((2 + 1) * 3) -> 9["4", "13", "5", "/", "+"] -> (4 + (5 / 13)) -> 4编译器比较喜欢从栈(stack)里面pop两个对象出来计算然后继续pu...
                            
                            
                                分类:
其他好文   时间:
2015-03-30 13:02:30   
                                阅读次数:
144