`
天天向上1989
  • 浏览: 412564 次
  • 性别: Icon_minigender_2
  • 来自: 南京
社区版块
存档分类
最新评论
文章列表
题目:   Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that position. Your goal is to reach the last index in the minimum number of jumps. For example: Given array A = [2,3,1, ...
打开 Eclipse  -> Window -> Perferences -> Java -> Editor -> Content Assist,在右边最下面一栏找到 auto-Activation ,下面有三个选项,找到第二个“Auto activation triggers for Java:”选项 在其后的文本框中会看到一个“.”存在。这表示:只有输入“.”之后才会有代码提示和自动补全,我们要修改的地方就是这里。把该文本框中的“.”换掉,换成“abcdefghijklmnopqrstuvwxyz.”,这样,你在Eclipse里面写Java代码就可以做到按“a ...

降低gnu 版本

sudo apt-get install gcc-4.5sudo apt-get install g++-4.5 cd /usr/binsudo rm g++sudo ln -s g++-4.5 g++ sudo rm gccsudo ln -s gcc-4.5 gcc
可以参考 http://www.cnblogs.com/phinecos/archive/2008/12/12/1353816.html   摘要: 本文章主要描述 Native Client(一个运行跨平台、不可信x86平台代码的沙盒环境)的设计思想、实现原理以及相应评价。Native Client的目的,是让基于浏览器的APP,在不用牺牲安全性的前提下,有着与native app相同的性能。Native Client利用软件故障隔离技术和一个secure runtime来隔离直接的系统调用,所带来的副作用就是必须通过Native Client提供的接口来进行调用。Native Cl ...

VIM 常用的命令

    博客分类:
  • C++
1) 复制 yy2) 粘贴 p3) 剪切 dd4) cw → 替换从光标所在位置后到一个单词结尾的字符 5) 跳至N行  NG【G大写】6) 0 → 数字零,到行头 7) $ → 到本行行尾 8) w → 到下一个单词的开头  【go to the start of the following [w]ord】9) b → 到上一个单词的开头  【go to the [b]eginning of this word】
今天读c++ primer 里面提到:   #include <cassert>将cassert 的内容被读入到我们的文本文件中但是由于所有的C++库名字是在名字空间std 中被定义的因而在我们的程序文本文件中它们是不可见的除非用下面的using 指示符显式地使其可见using namespace std; 使用C 头文件的#include 指示符#include <assert.h>就可以直接在程序文本文件中使用名字assert() 而无需使用using 指示   很奇怪,明明写的 #include<cassert> 没加using namesp ...

解析dbus参数

    博客分类:
  • C++
截取自 http://www.netmite.com/android/mydroid/external/dbus/tools/dbus-print-message.c   static void print_iter (DBusMessageIter *iter, dbus_bool_t literal, int depth) { do { int type = dbus_message_iter_get_arg_type (iter); if (type == DBUS_TYPE_INVALID) break; ...
 NDK编译 开始一直还天真的以为在桌面下编好的/usr/local/libhpdf.so可以直接用,后来才意识到要用NDK重新编~.~   步骤: 项目路径/jni下有两个文件夹: libharu 和 lpng163 其中包含了 所有对应的src 和 include文件 还有haru 自带的例子 font_demo.cpp   针对: lpng163   include $(CLEAR_VARS) sources := png.c \ pngerror.c \ pngget.c \ pngmem.c \ pngpread.c \ ...
JNI 调用时,一直报 No implementation found for native   有一个可能是,如果调用的是C++的代码,必须加extern "C"   【转】 jni 调用c和c++的区别.   1、JNIEnv *env参数的使用 所有JNI接口的第一个参数是JNIEnv *env, 在C中,使用方法是 (*env)->NewStringUTF(env, "Hello from JNI!"); 但在C++中,其调用方法是 env->NewStringUTF("Hello from JNI!& ...
转自 http://www.cnblogs.com/tc310/archive/2012/12/21/2828450.html   解决方法: 修改hosts文件 【C:\Windows\System32\drivers\etc\hosts】 【/etc/hosts】 尾部添加:   #更新的内容从以下地址下载 203.208.46.146 dl.google.com 74.125.237.1 dl-ssl.google.com  
 转自: http://blog.chinaunix.net/uid-26212859-id-3256667.html   里面提到: 2) 如果共享库文件安装到了/usr/local/lib(很多开源的共享库都会安装到该目录下)或其它"非/lib或/usr/lib"目录下, 那么在执行ldconfig命令前, 还要把新共享库目录加入到共享库配置文件/etc/ld.so.conf中, 如下: # cat /etc/ld.so.conf include ld.so.conf.d/*.conf # echo "/usr/local/lib" >& ...
1. sudo gedit /usr/share/applications/eclipse.desktop   2. 贴入下面内容   [Desktop Entry] Categories=Development; Comment[zh_CN]= Comment= Exec=/home/owen/Software/eclipse/eclipse GenericName[zh_CN]=IDE GenericName=IDE Icon=/home/owen/Software/eclipse/icon.xpm MimeType= Name[zh_CN]=eclipse ...

错误总结

    博客分类:
  • C++
错误提示:terminate called after throwing an instance of 'std::logic_error' what():  basic_string::_S_construct NULL not valid 问题: 将NULL赋值给std::string变量

c++ 学习总结

    博客分类:
  • C++
1) 8.0是默认为double型的,所以template会报错:template parameter '' is ambiguous   2)"cannot convert from 'const int *__w64 ' to 'int *' " :对const 修饰的变量取地址,要强制转化下
转载自:IT驿站 [http://www.blogchen.com ] 本文链接: http://www.blogchen.com/archives/584.html   也许会有人遇到,在这里说下解决方法。方便以后有人纠结这个问题。 开发中经验会遇到滑动里面嵌入滑动的问题,但是这种情况下触摸事件就会发生冲突。导致滑动非常卡,甚至出现程序停止响应。这种情况下我们一般需要重写view。下面给出重新scrollview的方法:   public class CustomScrollView extends ScrollView { private Gesture ...
Global site tag (gtag.js) - Google Analytics