1. push原理iOS push 工作机制可以用下图简要概括Provider:应用自己的服务器;APNS:Apple Push Notification Service的简称,苹果的PUSH服务器;push的主要工作流程是:iOS设备连接网络后,会自动与APNS保持类似TCP的长链接,等待APNS...
分类:
移动开发 时间:
2014-07-29 16:50:22
阅读次数:
432
端口扫描: package?main
import?(
"fmt"
"net"
"strconv"
)
func?main()?{
service?:=?"localhost:"
//从1号端口扫描到1000号
for?port?:=?1;?port?<?1000;?port++?{
_,?err?:=?net...
分类:
其他好文 时间:
2014-07-29 16:24:10
阅读次数:
195
如果你不需要cephfs,MDS就成了多余的。为了提高性能,可以把MDS卸载掉。 首先停止所有的MDS daemon: $ sudo service ceph stop mds
=== mds.0 ===
Stopping Ceph mds.0 on server-3...kill 1190...done 然后在c...
分类:
其他好文 时间:
2014-07-29 16:16:20
阅读次数:
401
[1]InstallHttpdforCentos7-media#yum--enablerepo=centos7-media-yinstallhttpd
Installed:
httpd.x86_640:2.4.6-18.el7.centos[2]starthttpd,开机启动#systemctlstarthttpd.service
#systemctlenablehttpd.service
ln-s‘/usr/lib/systemd/system/httpd.service‘‘/etc/systemd..
分类:
其他好文 时间:
2014-07-29 15:58:49
阅读次数:
367
先介绍一下CentOS7下系统的服务启动关闭的变化service服务名start/stop/status==systemctlstart/stop/status服务名chkconfig--list==systemctllist-units-typechkconfig服务名on/off==systemctlenable/disable服务名(具体的级别看配置文件)2.要将某个服务添加为系统服务(以ngin..
分类:
其他好文 时间:
2014-07-29 15:48:29
阅读次数:
182
Alarm和Timer不同的是Alarm是在应用程序之外操作的。即使应用程序关闭,它们也仍然能够用来激活应用程序事件或操作。
public void createAlarm(){
//获取一个Alarm Manager的引用
AlarmManager alarmManager = (AlarmManager)getSystemService(Context.ALARM_SERVICE);...
分类:
移动开发 时间:
2014-07-29 15:09:38
阅读次数:
254
A.ZOJ3726 Alice's Print Service
题解 here
这道题在HDU上要用I64d 在ZOJ上要用lld
C.ZOJ3728 Collision
几何题,分几种情况:和大圆相离、和大圆相交和小圆相离、和大圆相交小圆也相交。
还有一种情况需要考虑,它飞的方向远离圆则永远不相交。
借用土豪的神模板
#include
#include
#inclu...
分类:
其他好文 时间:
2014-07-29 14:24:28
阅读次数:
236
service端
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define MYPORT 8887
#define QUEUE 20
#define BUFFER_SIZE 1024
int main()
{
///定...
分类:
系统相关 时间:
2014-07-29 14:21:40
阅读次数:
285
方法一:从客户端入手方法二:从服务端入手修改/etc/ssh/sshd_config配置文件 ClientAliveInterval 300(默认为0)这个参数的是意思是每5分钟,服务器向客户端发一个消息,用于保持连接service sshd reload 生效
分类:
系统相关 时间:
2014-07-29 14:14:58
阅读次数:
263