首页 > 其他
nginx优化
一、一般来说nginx 配置文件中对优化比较有作用的为以下几项:1. worker_processes 8;nginx 进程数,建议按照cpu 数目来指定,一般为它的倍数 (如,2个四核的cpu计为8)。2. worker_cpu_affinity 00000001 00000010 0000010...
分类:其他   时间:2015-12-08 18:00:59    收藏:0  评论:0  赞:0  阅读:257
$(document).ready(); $().ready(); $()
$(document).ready(function(){}); $().ready(function(){}); $(function(){}), 三者效果是一样的,在文档加载完成之后执行()中的代码。 最完整的写法是:$(document).ready() ready() 函数仅能用于...
分类:其他   时间:2015-12-08 18:00:49    收藏:0  评论:0  赞:0  阅读:147
【Objective_C学习笔记】alloc-init 与new的区别
在一些源码中看到有人用[classname new]创建和初始化对象,但是我们大多数都用[[classname alloc] init],所以就很好奇两者之间的区别,通过查看一些资料http://stackoverflow.com/questions/11256228/what-is-the-d.....
分类:其他   时间:2015-12-08 18:00:39    收藏:0  评论:0  赞:0  阅读:164
HashedWheelTimer
HashedWheelTimer 是根据Hashed and Hierarchical Timing Wheels: Data Structuresfor the Efficient Implementation of a Timer Facility这篇论文做出来的.HashedWheelTime...
分类:其他   时间:2015-12-08 17:59:59    收藏:0  评论:0  赞:0  阅读:234
BestCoder Round #65 B C D || HDU 5591 5592 5593
B 题意:ZYB在远足中,和同学们玩了一个“数字炸弹”游戏:由主持人心里想一个在[1,N][1,N]中的数字XX,然后玩家们轮流猜一个数字,如果一个玩家恰好猜中XX则算负,否则主持人将告诉全场的人当前的数和XX比是偏大还是偏小,然后猜测的范围就会相应减小,一开始的范围是[1,N][1,N].每个玩家...
分类:其他   时间:2015-12-08 17:59:40    收藏:0  评论:0  赞:0  阅读:306
Binary Tree Paths
https://leetcode.com/problems/binary-tree-paths//** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * ...
分类:其他   时间:2015-12-08 17:58:59    收藏:0  评论:0  赞:0  阅读:267
关于nginx做负载均衡时backend server取real ip
首先:做为loadblance的nginx要添加下面的配置:proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add...
分类:其他   时间:2015-12-08 17:58:49    收藏:0  评论:0  赞:0  阅读:155
juniper常用命令(二)
Juniper防火墙基本命令常用查看命令 Get int查看接口配置信息Get int ethx/x查看指定接口配置信息Get mip查看映射ip关系 Get route查看路由表 Get policy id x查看指定策略 Get nsrp查看nsrp信息,后可接参数查看具体vsd组、端口监控设置...
分类:其他   时间:2015-12-08 17:58:29    收藏:0  评论:0  赞:0  阅读:225
国际化
一、应用内容的国际化1、new file->Resource->strings file->必须用Localizable.strings2、去project->Info->Localizations里添加相关语言3、如图设置4、如图填写内容二、应用名称国际化如上面一样新建一个InfoPlist.st...
分类:其他   时间:2015-12-08 17:57:19    收藏:0  评论:0  赞:0  阅读:88
self dismissModalViewControllerAnimated:YES 无效(dismissviewcontrolleranimated无效)
作为一个viewController(VC),想要消失的时候可以从parent VC里面调用dismissModalViewControllerAnimated来消去改VC,也可以在该VC里面手动调用self dismissModalViewControllerAnimated:YES来消去自己。 ...
分类:其他   时间:2015-12-08 17:56:29    收藏:0  评论:0  赞:0  阅读:219
CodeForces - 508D Tanya and Password(欧拉通路)
DescriptionWhile dad was at work, a little girl Tanya decided to play with dad's password to his secret database. Dad's password is a string consistin...
分类:其他   时间:2015-12-08 17:56:19    收藏:0  评论:0  赞:0  阅读:102
关于宏定义
VC中的宏,#是转义为字符串。如 #define M1(a) char * lpc = #a 。 M1(kkk) 展开后 char * lpc = “kkk”;##为连接转义符号如 #define M2(b) int ab##b = 32; M2(kkk) 展开后 int abkkk=32;
分类:其他   时间:2015-12-08 17:56:10    收藏:0  评论:0  赞:0  阅读:276
scanf *的用法
scanf *的用法chara[LEN]="12:13:14";chari,j,k,h,l,m;sscanf(a,"%*c%*c:%c%c",&i,&j);这样的操作时的i,j的值为1,3 。%*type的格式*号使得%type这样的匹配值被扫描但是不被保存。
分类:其他   时间:2015-12-08 17:55:59    收藏:0  评论:0  赞:0  阅读:72
HDU 5584 LCM Walk 数学
LCM WalkTime Limit: 20 SecMemory Limit: 256 MB题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5584DescriptionA frog has just learned some number theory,...
分类:其他   时间:2015-12-08 17:55:29    收藏:0  评论:0  赞:0  阅读:214
Objective C运行时(runtime)
#import void setBeingRemoved(id __self, SEL _cmd){ NSLog(@"------------UNSELECT BY INVOKE.");}// Then these two lines: Class __class = NS...
分类:其他   时间:2015-12-08 17:55:11    收藏:0  评论:0  赞:0  阅读:239
Struts按住alt+/没有提示
解决办法是在新建xml文件的时候要在文件头加上
分类:其他   时间:2015-12-08 17:54:59    收藏:0  评论:0  赞:0  阅读:205
05:填空:类型转换2
总时间限制:1000ms内存限制:65536kB描述有两个变量a和b,在执行了如下代码后:a = 1.000000001;b = a;printf("%.9f %.9f\n", a, b);输出两个数:1.000000001 1.000000000请问a和b分别是以下哪种类型?A. bool B. ...
分类:其他   时间:2015-12-08 17:54:29    收藏:0  评论:0  赞:0  阅读:437
React中,map出来的元素添加事件无法使用
在使用react中,经常用到react的map函数,用法和jquery里中的map一样,但是,如果你在每个map出来的元素中添加,你会发觉添加的事件无法关联,比如,我们很多的评论,我需要在每个评论下面加一个回复的input,input期初是隐藏的,当我点击每天评论下面的回复时,input输入框显示这...
分类:其他   时间:2015-12-08 17:53:49    收藏:0  评论:0  赞:0  阅读:378
Play Framework 项目遇到问题
1.Debug调试出错,提示:Error occurred during initialization of VMagent library failed to init: jdwpERROR: Cannot load this JVM TI agent twice, check your java...
分类:其他   时间:2015-12-08 17:53:19    收藏:0  评论:0  赞:0  阅读:198
点击页面其它地方隐藏该div的方法
思路一 第一种思路分两步 第一步:对document的click事件绑定事件处理程序,使其隐藏该div 第二步:对div的click事件绑定事件处理程序,阻止事件冒泡,防止其冒泡到document,而调用document的onclick方法隐藏了该div。 这样当点击页面非div区域的时候,直接或层...
分类:其他   时间:2015-12-08 17:52:59    收藏:0  评论:0  赞:0  阅读:259
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!