现在位置: 首页 > shrug发表的所有文章
  • 11月
  • 17日
综合 ⁄ 共 821字 评论关闭
splite 将一个字符串分割为子字符串,然后将结果作为字符串数组 返回。 stringObj .split( [separator [, limit ]]) 参数 stringObj 必选项。要被分解的 String 对象或文字。该对象不会被 split 方法修改。 separator 可选项。字符串或正则表达式 对象,它标识了分隔字符串时使用的是一个还是多个字符。如果忽略该选项,返回包含整个字符串的单一元素数组。 limit 可选项。该值用来限制返回数组中的元素个数。 function SplitDemo(){ var s, ss; var s = "The rain in Spain falls mainly in the plain."......
阅读全文
本文主要解决adb connection error的问题——reset adb.   环境为真机测试,偶尔会报如下错误 [2012-04-24 20:41:34 - DeviceMonitor]Adb connection Error:远程主机强迫关闭了一个现有的连接。 [2012-04-24 20:41:36 - DeviceMonitor]Connection attempts: 1 [2012-04-24 20:41:38 - DeviceMonitor]Connection attempts: 2 [2012-04-24 20:41:40 - DeviceMonitor]Connection attempts: 3 [2012-04-24 20:41:42 - DeviceMonitor]Connection attempts: 4 [2012-04-24 20:41:44 - DeviceMonitor]Connection attempts: 5 [2012-04-2......
阅读全文
  • 08月
  • 14日
综合 ⁄ 共 208字 评论关闭
      在Linux下设置环境变量其实也是蛮简单的, 首先要找到存放环境变量的文件位置。如果是以root身份登陆的话,需要找到这个文件/root/.bash_profile,然后可以使用文本编辑器将其打开,然后就一目了然了。       在PATH处添加$/root/jdk1.6.0_3/bin,注意以:作为分隔符和前面进行连接,然后保存,注销从新进入,打开终端,输入java -version,是不是一切都OK了。  
阅读全文
  • 05月
  • 26日
综合 ⁄ 共 8162字 评论关闭
package { import com.ui.Block; import com.ui.Shape;  import flash.display.Sprite; import flash.events.KeyboardEvent; import flash.events.TimerEvent; import flash.utils.Timer; [SWF(backgroundColor = "0xfffffff", frameRate = "24")]  /**  * 俄罗斯方块应用程序  * 主程序入口  *   * **/    public class FangKuai extends Sprite{   private const BLOCKWH:uint=15;   //每个矩形的边长 private const KEY_LEFT:uint=37;   //响应键盘  的值       左 private const KEY_UP:uint =38;   //上 private const KEY_RI......
阅读全文
  • 05月
  • 22日
综合 ⁄ 共 61字 评论关闭
http://blog.csdn.net/zhaoyh82/archive/2009/06/18/4278896.aspx
阅读全文
  • 05月
  • 18日
综合 ⁄ 共 977字 评论关闭
自己写的C++ STL Algorithm中qsort的实现如下: void swap(void *a, void *b, int size) { unsigned char *bytesOfA = reinterpret_cast<unsigned char*>(a); unsigned char *bytesOfB = reinterpret_cast<unsigned char*>(b); char tmp = 0; for(int i = 0; i < size; ++i) { tmp = *(bytesOfA+i); *(bytesOfA+i) = *(bytesOfB+i); *(bytesOfB+i) = tmp; } } int partition(void *base, int num, int size, int (*comparator)(const void *, const void *)) { ......
阅读全文
  • 05月
  • 16日
综合 ⁄ 共 767字 评论关闭
If you are installing MySQL ODBC Driver and encounter the following error: Error 1918. Error installing ODBC driver MySQL ODBC 5.1 Driver, ODBC error 13: The setup routines for the MySQL ODBC 5.1 Driver could not be loaded due to system error code 126: The specified module could not be found. ...\myodbc5S.dll).. Verify... Then you will need to install the Microsoft Visual C++ 2010 Redistributable Package (select the appropriate one for your OS architecture below): 64-bit version: htt......
阅读全文
  • 05月
  • 09日
综合 ⁄ 共 3566字 评论关闭
1. Spring的AOP简介 面向切面编程(AOP) 提供另外一种角度来思考程序结构,通过这种方式弥补了面向对象编程(OOP)的不足。 除了类(classes)以外,AOP提供了切面。切面对关注点进行模块化,例如横切多个类型和对象的事务管理。 Spring的一个关键的组件就是 AOP框架 。 尽管如此,Spring IoC容器并不依赖于AOP,这意味着你可以自由选择是否使用AOP,AOP提供强大的中间件解决方案,这使得Spring IoC容器更加完善。 Spring 2.0 AOP Spring 2.0 引入了一种更加简单并且更强大的方式来自定义切面,用户可以选择使用基于模式(......
阅读全文
  • 05月
  • 01日
综合 ⁄ 共 314字 评论关闭
* daemon not running. starting it now *  ADB server didn't ACK  * failed to start daemon *  该问题解决办法: 1、Android 的adb.exe使用的端口是5037 2、开始--运行--CMD 到命令提示符,输入 netstat -aon|findstr "5037"  查看端口被谁占用了。 3、我们从上面根本就看不出5037端口被谁占用,我们需要根据后面的PID(17216)来查找占用该端口的应用程序,输入 tasklist|findstr "17216"  4、结束该进程,输入taskkill /f /t /im 你的进程名,例如  taskkill /f /t /im kadb.exe 5、问题解决
阅读全文
  • 04月
  • 15日
综合 ⁄ 共 3785字 评论关闭
from: http://blog.sina.com.cn/s/blog_502c8cc4010115m5.html 最近在看一个开源代码bind过程中,该代码是由纯C语言编写的,函数间调用关系特别的复杂。想对整体代码有一个大概的了解,这样就需要了解代码中主要的相关函数间调用关系,发现一个开源的小工具calltree,在linux下能够将代码中函数调用关系生成调用树,并可以选择生成dot语言文件,通过dot工具生成调用关系图。下面介绍一下calltree工具: calltree基本命令:calltree -gb -np –m *.c calltree所有的命令可以通过 calltree –help查看,如下图: [root@localho......
阅读全文
  • 04月
  • 14日
综合 ⁄ 共 1034字 评论关闭
文章目录 1 产品 2 设计 3 开发 4 质量 5 支持 1 产品 2 设计 3 开发 4 质量 5 支持 导读:这是关于平台运维、运营系统职能划归、部门设置的说明,基于产品生命周期。这里 的产品指代WEB APP。以技术支持工程师属性进行角色划分。 目录 1 产品 产品策划、产品运营(DOC) 2 设计 用户研究(UX)、UI交互、策划制作(RP),网页美术(PSD),页面构建(HTML) 3 开发 前端开发、后端开发、运营开发 4 质量 质量(功能、性能)测试、安全测试、代码审查 5 支持 配置管理、运......
阅读全文
  • 04月
  • 12日
综合 ⁄ 共 1296字 评论关闭
有一个链表,然后请对它进行排序; 这里先写了一个归并排序; #include<iostream> #include<vector> #include<algorithm> #include<ctime> using namespace std; struct ListNode { int val; ListNode* next; }; int getLength(ListNode* head); void mergeSort(ListNode*& head, ListNode*& first,ListNode*& tail,int n ); void merge(ListNode* lH,ListNode* rH,ListNode*& first,ListNode*& tail); ListNode* sortLinkList(ListNode *head) { if ( !head ) return head; ......
阅读全文