SELECT GoodID,sum(if(Level = 1, 1, 0)) as Better,sum(if(Level = 0, 1, 0)) as Nomal,sum(if(Level = -1, 1, 0)) as Bad from evaluates GROUP BY GoodID;
分类:
数据库 时间:
2015-08-13 11:38:33
阅读次数:
194
DescriptionThe aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because th...
分类:
其他好文 时间:
2015-08-12 21:30:56
阅读次数:
123
面试题之一。
写一个装饰器wraps,它接收一个参数t,如果函数执行时间超过1秒,输出“bad”,否则输出“goods”。...
分类:
编程语言 时间:
2015-08-12 01:29:37
阅读次数:
206
DescriptionThe aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because th...
分类:
其他好文 时间:
2015-08-11 18:10:04
阅读次数:
144
The ssh with RHEL 4 is a lot more anal about security checking. In my case, it was the fact that $HOME/.ssh/config was group-writable which was causin...
分类:
其他好文 时间:
2015-08-10 21:56:24
阅读次数:
128
题意:
一排母牛站成一排,给出牛的身高,每只牛都只能往右看,对于每只母牛有一个c[i]
c[i]代表i能看见多少只牛,矮的牛看不见高的牛,问所有c[i]的和是多少。
思路:
我们转换一下,其实就是求对于每只母牛能被看见多少次,显然是对于它往左单调递增的牛都能看见它
那么我们维护一个这样的单调栈,每次都将小于等于它的出栈,那么栈中的元素的个数就是能看见它的个数
这样再把该元素插入栈就...
分类:
其他好文 时间:
2015-08-10 16:13:24
阅读次数:
95
B - Ignatius and the Princess IV
Time Limit:1000MS Memory Limit:32767KB 64bit IO Format:%I64d
& %I64u
Submit Status
Description
"OK, you are not too bad, em... But you can neve...
分类:
其他好文 时间:
2015-08-08 18:17:41
阅读次数:
120
写日志之前先copy一段nginx502的原因,从某网看到如下,然而这并不是重点,最重要还是看博主手敲的东西。 一、NGINX 502错误排查NGINX 502 Bad Gateway错误是FastCGI有问题,造成NGINX502错误的可能性比较多。将网上找到的一些和502 BadGateway错...
分类:
其他好文 时间:
2015-08-04 18:35:26
阅读次数:
151
我们做iOS程序开发时经常用遇到EXC_BAD_ACCESS错误导致Crash,出现这种错误时一般Xcode不会给我们太多的信息来定位错误来源,只是在应用Delegate上留下像Thread 1: Program received signal:"EXC_BAD_ACCESS",让问题无从找起。比如...
分类:
数据库 时间:
2015-08-03 12:47:03
阅读次数:
200
import lxml.etree as et xml=""" apple pear strawberry blueberry starfruit mango peach """ tree=et.fromstring(xml) for bad in tree.xpath("//fruit[@stat...
分类:
其他好文 时间:
2015-07-29 15:27:44
阅读次数:
159