码迷,mamicode.com
首页 >  
搜索关键字:mod    ( 18094个结果
ubuntu启用apache的mod_headers和mod_expires
ubuntu启用apache的mod_headers和mod_expiresubuntu部署某些webAPP的时候,发现有几个警告,请启用mod_expires和mod_headers.等等模块都可以按照以下命令,启用apache的缓存root@vr:~#a2enmodheaders Enablingmoduleheaders. Toactivatethenewconfiguration,youneedtorun: service..
分类:Web程序   时间:2015-06-02 18:11:39    阅读次数:235
apache 安装/mod_dir.so: undefined symbol: apr_array_clear
apache安装好后启动出错:httpd:Syntaxerroronline143of/usr/local/apache2/conf/httpd.conf:Cannotload/usr/local/apache2/modules/mod_dir.sointoserver:/usr/local/apa...
分类:Web程序   时间:2015-06-02 16:45:32    阅读次数:171
LightOJ - 1132 Summing up Powers 矩阵快速幂
题目大意:求(1^K + 2^K + 3K + … + N^K) % 2^32解题思路: 借用别人的图 可以先打表,求出Cnm,用杨辉三角可以快速得到#include typedef unsigned long long ll; const int N = 55; const ll mod = (1LL << 32); struct Matrix{ ll mat[N][N...
分类:其他好文   时间:2015-06-02 15:20:40    阅读次数:124
UVA - 12470 Tribonacci 矩阵快速幂
题目大意:fibonacci的升级版,规则是f(n) = f(n-1) + f(n-2) + f(n-3)解题思路:水题#include typedef long long ll; const int N = 3; const ll mod = 1e9 + 9;struct Matrix{ ll mat[N][N]; }A, B, tmp; ll n;void init(){...
分类:其他好文   时间:2015-06-02 09:31:17    阅读次数:127
Divide Two Integers
Divide two integers without using multiplication, division and mod operator.比有趣在于1 提速过程 2怎么判断符号正负public class Solution { public int divide(int divi...
分类:其他好文   时间:2015-06-02 06:47:51    阅读次数:91
uva 12470(矩阵快速幂)
题意:公式f(n) = f(n - 1) + f(n - 2) + f(n - 3),给出n,f(1) = 0,f(2) = 1, f(3) = 2,要求得出f(n)。 题解:普通的矩阵快速幂模板题。#include #include const int MOD = 1000000009; struct Mat { long long g[3][3...
分类:其他好文   时间:2015-06-01 22:40:05    阅读次数:145
CentOS上安装Bugzilla 4.5.2
前提安装好mysql数据库以及centos系统自带的Apache服务器1.准备所需的依赖包sudoyuminstallhttpdmod_sslmysql-servermysqlphp-mysqlgccperl*mod_perl-devel2.下载并配置Bugzillawgethttp://ftp.mozilla.org/pub/mozilla.org/webtools/bugzilla-4.5.2.tar.gz下载后解压进入到解..
分类:其他好文   时间:2015-06-01 20:53:08    阅读次数:174
杭电ACM1395——2^x mod n = 1~~水题
题目的意思很清楚。求最小的x使2^x mod n = 1。n是输入的。 直接暴力过,用快速幂运算。一开始忘记了n = 1的情况,导致TLE。 下面的是AC的代码: #include using namespace std; int main() { int n, x, i; while(cin >> n) { if(n % 2 == 0 || n == 1) ...
分类:其他好文   时间:2015-06-01 09:48:43    阅读次数:119
PHP网站实现地址URL重定向
网站建设中,通常会用到网站地址URL的重定向,这样的好处是有利于你网站的SEO优化,也就是让你的网站实现伪静态,下面简单介绍一下实现的两种方法:1、在Apache配置文件中设置重定向首先找到Apache配置文件httpd.conf,在配置文件中找到下面代码LoadModule rewrite_mod...
分类:Web程序   时间:2015-05-31 23:03:39    阅读次数:174
hdu 1576 (A/B)
这个题的关键是求逆元,根据扩展欧几里德算法: 代码如下:#include #include using namespace std; typedef long long LL; const int mod=9973; void exgcd(LL a,LL b,LL &x,LL &y) { if(b==0) { x=1;...
分类:其他好文   时间:2015-05-30 18:20:44    阅读次数:141
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!