码迷,mamicode.com
首页 >  
搜索关键字:code    ( 108667个结果
【查找数字x第k为上的数字】
#include #include // 求x用10进制表示时的数位长度 int len(int x){ if(x<10) return 1; return len(x/10)+1; } // 取x的第k位数字 int f(int x, int k){ if(len(x)-k==0) return ... ...
分类:其他好文   时间:2017-04-12 09:52:11    阅读次数:121
Js 跨域CORS报错 Response for preflight has invalid HTTP status code 405
调用接口遇到Response for preflight has invalid HTTP status code 405这样的错误,是使用PUT方式提交请求接口。Content-Type设置为application/json,JS代码如下: 尝试解决 项目使用的是WebApi,按照网上的比较通用的 ...
分类:Web程序   时间:2017-04-12 09:38:48    阅读次数:541
用php获取本周,上周,本月,上月,本季度日期的代码
转自:http://www.cnblogs.com/whlives/p/5795458.html ...
分类:Web程序   时间:2017-04-12 09:20:08    阅读次数:247
log4net
string filePath = HttpContext.Current.Server.MapPath("~/log4net.config"); FileInfo fileInfo = new FileInfo(filePath); XmlConfigurator.ConfigureAndWatc... ...
分类:Web程序   时间:2017-04-12 04:28:41    阅读次数:174
strlen实现
size_t my_strlen(const char* str) { const char* ptr = str; for (; ((int)ptr & 0x03) != 0; ++ptr) { if (*ptr == '\0') return ptr - str; } unsigned int*... ...
分类:其他好文   时间:2017-04-12 04:16:27    阅读次数:127
codevs 5962 [SDOI2017]数字表格
输入描述 Input Description [题解] 对于蓝色部分预处理前缀积。 然后在用除法分块搞一下。 O(Q*sqrt(min(n,m))*logn+nlogn) #include<cstdio> #include<iostream> using namespace std; typedef ...
分类:其他好文   时间:2017-04-12 03:52:58    阅读次数:231
20170411 debug窗口执行文件
[FUNCTION] Command=/H Title=Debugger Type=SystemCommand ...
分类:其他好文   时间:2017-04-12 03:52:39    阅读次数:147
判断成绩等级
/* * 给定一个百分制的分数,输出相应的等级。 90分以上 A级 80~89 B级 70~79 C级 60~69 D级 60分以下 E级 */ public class MarkDome { public static void ma... ...
分类:其他好文   时间:2017-04-12 03:48:43    阅读次数:224
python爬虫对于gb2312
对于刚刚接触python爬虫的人,常常会碰到一个比较烦的问题, 如果网页是GB2312编码格式,我们直接decode(’GB2312‘)一般python都会报错: GB2312不能编码该页面。 这就比较奇怪了 <meta http-equiv="Content-Type" content="text ...
分类:编程语言   时间:2017-04-12 03:47:21    阅读次数:212
Eclipse文件首部自动加 作者时间
Window -> Preferences -> Java -> Code Style -> Code templates -> (in right-hand pane) Comments -> double-click Types and make sure it has the followin ...
分类:系统相关   时间:2017-04-12 03:35:49    阅读次数:212
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!