Socket doesn’t throw exception in Android

Several threads from STACK OVERFLOW: We have a simple client server architecture between our mobile device and our server both written in Java. An extremely simple ServerSocket and Socket implementation. However one problem is that when the client terminates abruptly (without closing the socket properly) the server does not know that it is disconnected. Furthermore, the server can continue to write to this socket
Read more →

算法:红黑树删除操作的实现

算法:红黑树删除操作的实现
最近重新拾起 Sedgewick 的《算法(第4版)》,对之前学的不扎实的算法和数据结构做个回顾。红黑树的实现和删除比较复杂,这里对书中一些描述不够
Read more →

Valine: 独立博客评论系统

Valine: 独立博客评论系统
Star Issue Follow @DesertsP @云淡风轻 开发了Valine一款极简的评论系统 。我冒昧做了二次修改给自己的博客用上;强迫症使然,这两天又熬夜写了个后台管
Read more →

使用LeanCloud做评论系统

使用LeanCloud做评论系统
多说离开也不是一天两天的事情了。怀念 WordPress 自带的评论系统。我一开始就用 Disqus 社会化评论?,现在也彻底富强民主文明了。从 Hexo 换回了 Ghost ,数据库
Read more →

Android 入门笔记(三):Loader

Android 入门笔记(三):Loader
AsyncTaskLoader is a better choice for Activity-bound thread management, because it handles lifecycle changes correctly, delivering the result to the current active activity, preventing duplication of background threads, and helping to eliminate duplication of zombie activities. Leveraging Loaders Steps: Create a Loader ID Fill-in Loader Callbacks Init Loader with LoaderManager Detail: 1. Create a constant int to uniquely identify the loader; Implement tne LoaderManager.LoaderCallbacks<>
Read more →

Android 入门笔记(二): Activity

Android 入门笔记(二): Activity
Activity and Intent An activity is a single, focused thing that the user can do. Almost all activities interact with the user, so the Activity class takes care of creating a window for you in which you can place your UI with setContentView(View). While activities are often presented to the user as full-screen windows, they can also be used in other ways: as floating
Read more →

Android 入门笔记(一): RecyclerView

Android 入门笔记(一): RecyclerView
暑期生产实习选了 Android 开发项目,从未接触过Android开发,对Java也只是略知一二。花了大概一个星期学习 Android 基础知识,完成了Uda
Read more →

第一个C语言“作品”

第一个C语言“作品”
经过两个下午的边学边抄边写,第三人称终于写完了第一个C语言“作品”,称之为作业总觉得别扭,因为自上学以来没有如此认真对待过一门作
Read more →