`
fosa0989
  • 浏览: 108650 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
  1. Ubuntu下执行命令 "adb reboot bootloader“ 或者 "adb start-server"得到如下错误:   error: device not found 原因1 可能是没有加usb 规则: 创建文件/etc/udev/rules.d/51-android.rules 在文件中加入: #HTC phone SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666" #Google SUBSYSTEM ...
原文地址: http://randomizedsort.blogspot.com/2010/08/building-android-and-linux-kernel-for.html System Requirements Google's Android build system only supports Linux (Ubuntu) and Mac OS. Examples below all use Ubuntu. The two most important tools from the Android SDK are "adb" and &qu ...
用mysql workbench 更新一个表的时候报如下异常:   Error Code: 1175. To disable safe mode, toggle the option in Preferences -> SQL Editor -> Query Editor and reconnect. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column   使用安全更新模式的时候update语句必须使用一个关键字列 ...
我们从这张图开始说吧。从这张图我们可以很清楚的看到iOS开发的MVC结构。UIApplication,Application Delegate 和 View Controller都是控制器。UIWindow和各种其他的UIView都是视图。 1。 程序的启动函数UIApplicationMain  该函数主要创建一个UIApplication对象和一个UIApplicationDelegate对象,并且设置事件循环,然后开始处理事件。 int UIApplicationMain ( int argc, char *argv[], NSString *princi ...
更新Ubuntu后进入不了图形界面,用命令行登陆后执行startx, 提示: Fatal server error:Server is already active for display 0If server is no longer running , remove /tmp/.X0-lock and start again   解决方法是重新设置xserver sudo /etc/init.d/gdm stop sudo dpkg-reconfigure xserver-xorg sudo gdm start
在实验室的服务器上部署了wordpress,发现在外网访问正常,但是内网不能显示样式。 看了下页面源代码。发现是因为使用绝对地址的原因。 于是修改wp_options里面的siteurl和home两个选项为相对地址。 比如原先为http://codegreen.cs.wayne.edu/~huichen, 改为/~huichen即可。(在wordpress后台不能直接改。) 修改后访问正常了就。
以前写的Google App Engine上传程序,贴出来上传这部分代码给大家分享下。不知道现在Google还有没有限制,我以前测试的能上传10M左右。否则就会超时错误。 1. 上传的代码     public void uploadAction(HttpServletRequest req, Page p) throws IOException, ServletException { String path = getHomeUrl(req); boolean isMultipart = ServletFileUpload.isMultipartC ...
开发了一个估算进程级别能量消耗的软件,过几天就要发布了。除了做能量管理研究的,不知道做应用开发的人会不会感兴趣。   过几天发布了再写个详细点的介绍。
使用google app engine开发了一个文件分享网站,暂时设置只支持10M以内的文件上传。因为Google对每个Blob的大小有限制,我采用的方法是把文件分割存储到多个Blob里面。感兴趣的可以访问一下地址  http://avatar-share.appspot.com    .   我使用freemarker取代jsp,彻底解决了中文乱码问题。第一次用freemarker,感觉还是很容易使用的,参考freemarker的例子写了个BaseController 然后再用的时候就基本跟Struts类似了。
从Linux Kernel2.6.31版本开始,Linux内核开始提供一个叫__NR_perf_counter_open(最新的版本里叫__NR_perf_event_open)的系统调用。使用这个系统调用我们可以像使用文件一样打开一个Performance counter,通过设置不同的参数让这个Performance Counter统计不同的软件或硬件事件,然后就可以向读文件一样来读取这些事件的统计结果。比如我可以打开一个Performance Counter统计某一个进程的CPU Cache Miss次数。关于如何传递参数构造Performance Counter来统计不同的事件可以看这篇 ...
1 nginx 配置文件 user hchen; worker_processes 2; error_log /var/log/nginx/error.log; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] $req ...
From file sp/proc/array.c    line 455      seq_printf(m, "%d (%s) %c %d %d %d %d %d %u %lu \ %lu %lu %lu %lu %lu %ld %ld %ld %ld %d 0 %llu %lu %ld %lu %lu %lu %lu %lu \ %lu %lu %lu %lu %lu %lu %lu %lu %d %d %u %u %llu %lu %ld\n",         pid_nr_ns(pid, ns),         tcomm,         sta ...
实现思路是用postDate字段进行排序,使用一个时间点限制取出一页数据。 如果是向下翻页  用postDate < offset  按照postDate desc排序的方法取出下一页数据。 如果向上翻页 用postDate > offset 按照postDate asc 排序的方法取出上一页数据。 存在的问题是如果时间相同的两个记录可能会有一个读取不到。   1 Model @PersistenceCapable(identityType = IdentityType.APPLICATION) public class BlogItem { @PrimaryKey ...
Hi all! There's been a lot of good discussion here about doing paging efficiently, as opposed to just using offset. We've been discussing efficient paging internally too. We hope to eventually provide something built in, but in the short term we have other priorities. Still, we've come up with some i ...
最近看到很多人研究GAE,这周末我也花了两天时间用GAE + spring做了个小程序。 很多人写个Hello world (or anything else)的例子部署成功就开始欢呼雀跃,他们开始腾云了。其实真正令人抓狂的事才刚开始呢。由于GAE目前对java支持并不是很好,而且完整的例子并不是很多,所以会遇到很多令人头疼的莫名其妙的问题。以下是我的一点经验。 1 用尽量少的第三方包,如果你是GWT高手那你就用GWT。这是因为GAE对java支持不好,有很多问题。我用spring的form标签就碰到这个问题,在本地运行的很好结果部署上去运行带spring标签的页面报权限错误,搜索了一下也没 ...
Global site tag (gtag.js) - Google Analytics