last

thinkphp、laravel、CI、YII2 等Nginx配置

拟墨画扇 提交于 2019-12-02 08:04:22
1、thinkphp location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=/$1 last; break; } } 2、laravel location / { try_files $uri $uri/ /index.php?$query_string; } 3、CI location / { try_files $uri $uri/ /index.php; } 4、YII2 location / { # Redirect everything that isn't a real file to index.php try_files $uri $uri/ /index.php$is_args$args; } 5、typecho if (!-e $request_filename) { rewrite ^(.*)$ /index.php$1 last; } 6、typecho2 location /typecho/ { if (!-e $request_filename) { rewrite ^(.*)$ /typecho/index.php$1 last; } } 7、wordpress location / { try_files $uri $uri/ /index.php?$args; }

32-33 考试总结

只谈情不闲聊 提交于 2019-12-02 05:32:20
T1 AERODROM 题目大意 略。 分析 二分答案,然后 \(O(n)\) 遍历判断可行性。 代码 #include<cstdio> #include<cstdlib> #define Re register #define ll long long const int N = 100000 + 5; inline int read(){ int f = 1, x = 0; char ch; do { ch = getchar(); if (ch == '-') f = -1; } while (ch < '0' || ch > '9'); do {x = (x << 3) + (x << 1) + ch - '0'; ch = getchar(); } while (ch >= '0' && ch <= '9'); return f * x; } inline void hand_in() { freopen("aerodrom.in", "r", stdin); freopen("aerodrom.out", "w", stdout); } int n, m, t[N]; ll l = 0, r = 1e18, mid, ans; inline bool check(ll mid) { ll num = 0; for (Re int i = 1;i <= n; ++i) {

29-30 考试总结

蓝咒 提交于 2019-12-02 05:32:14
来源: \(COCI2011\) ~ \(2012\) \(test1\) - \(test2\) 部分题目。 T1 ples 题目大意 \(N\) 个男生和 \(N\) 个女生参加舞会,跳舞时只能是一个男生一个女生,我们知道每个人的身高,同时某个男生只想和比他高(或者矮)的女生跳( 有人跟你跳还挑三拣四的? ),女生也是一样的,身高一样的人都不想与对方跳。给出所有数据,输出满足人们希望的前提下组成的最多对数。 分析 开始拿到题看了看,哦?二分图最大匹配板子? 直到看到了浩瀚无边的数据范围。。。正当心中默念"哦豁"时,看到了很小的值域范围。。。 人生大起大落真刺激 恩,带权二分图最大匹配,因为值域很小,我们可以把每个值看做点,人数看做点权,按题目要求连边,男生女生分别连向源点和汇点,然后就是跑最大流了。 因为内存限制,所以要精确算开多少条边。 代码 #include<queue> #include<cstdio> #include<cstdlib> #include<cstring> const int BASE = 1500; const int INF = 0x3f3f3f3f; inline int read(){ int f = 1, x = 0; char ch; do { ch = getchar(); if (ch == '-') f = -1; } while

jquery 子元素筛选选择器

懵懂的女人 提交于 2019-12-02 05:24:18
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <title></title> <link rel="stylesheet" href="imooc.css" type="text/css"> <script src="https://www.imooc.com/static/lib/jquery/1.9.1/jquery.js"></script> </head> <body> <h2>子元素筛选选择器</h2> <h3>:first-child、:last-child、:only-child</h3> <div class="left first-div"> <div class="div"> <a>:first-child</a> <a>第二个元素</a> <a>:last-child</a> </div> <div class="div"> <a>:first-child</a> </div> <div class="div"> <a>:first-child</a> <a>第二个元素</a> <a>:last-child</a> </div> </div> <script type="text/javascript"> /

mapper文件简单格式

烈酒焚心 提交于 2019-12-02 04:00:22
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="包名"> <select id="接口方法名" resultType=model地址"> select id , title ,detail_desc , answer_count,last_modified from questions order by last_modified desc </select> 来源: https://www.cnblogs.com/mobies/p/11730011.html

cron 应用

拜拜、爱过 提交于 2019-12-02 03:17:17
1 CronSequenceGenerator generator = new CronSequenceGenerator(cronExpression); 2 return generator.next(StringUtils.isBlank(last_excute_time)?new Date():SDF_SECOND.parse(last_excute_time)); //传入cron表达式和上次执行时间,返回下次执行时间 来源: https://www.cnblogs.com/jiangwg/p/11728342.html

text-align:justify无效解决办法

放肆的年华 提交于 2019-12-02 02:39:23
text-align实现两端对齐文本效果,但是要 特别注意text-align不会处理被打断的行和最后一行 ! 如果你的文字只占了一行,同事它也是最后一行了,所以text-align设置为justify不会产生任何效果。 解决方法是使用text-align-last,并将其设置为justify。 不过不幸的是,text-align-last不是所有浏览器支持。 所以对于不支持text-align-last的,可以在最后一行人工生成两行文本,然后把第二行隐藏了,那么我们要现实的第一行自然就可以实现两端对齐了。 例: 我是一行字 .center{ text-align:justify; } span{ display:inline-block; width:100%; } 来源: CSDN 作者: 幻想山外小楼听雨 链接: https://blog.csdn.net/promiseCao/article/details/83302782

高级排序算法

左心房为你撑大大i 提交于 2019-12-02 02:30:06
1、希尔排序算法   希尔排序算法是根据它的发明者康纳德.希尔的名字命名的。此算法从根本上而言就是插入排序算法的一种改进。如同在插入排序中所做的那样,本算法的关键内容是对远距离而非相邻的数据项进行比较。当算法循环遍历数据集合的时候,每个数据项间的距离会缩短,直到算法对相邻数据项进行比较时次终止。   希尔排序算法采用升序方式对远距离的元素进行排序,序列必须从1开始,但是可以按照任意数量进行自增。一种好的可用的自增方法时基于下列代码段的: while(h<-numElements/3); h=h*3+1;   这里的numElements表示了数据集合内代拍元素的数量,例如一个数组。   例如,如果上述代码产生的序列数是4,那么就是对数据集合内每次第4个元素进行排序,接着采用下列代码来选择一个新的序列数: h=(h-1)/3;   然后,对后续的h个元素进行排序,一次类推。   数组类: public class CArray { private int[] arr; private int upper; private int numElements; public CArray(int size) { arr = new int[size]; upper = size - 1; numElements = 0; } public void Insert(int item) {

CF504E Misha and LCP on Tree

无人久伴 提交于 2019-12-02 00:07:19
咕咕咕,还没调呢~ code: #include <cstdio> #include <cstring> #include <vector> #include <queue> #include <algorithm> #include <stack> #define setIO(s) freopen(s".in","r",stdin) using namespace std; namespace sam { #define N 1200004 int last,tot; int ch[N][27],pre[N],mx[N]; inline int extend(int c) { if(ch[last][c]) { int p=last; int q=ch[p][c]; if(mx[q]==mx[p]+1) last=q; else { int nq=++tot; mx[nq]=mx[p]+1; memcpy(ch[nq],ch[q],sizeof(ch[q])); pre[nq]=pre[q],pre[q]=nq; for(;p&&ch[p][c]==q;p=pre[p]) ch[p][c]=nq; last=nq; } } else { int np=++tot,p=last; mx[np]=mx[p]+1,last=np; for(;p&&!ch[p][c];p=pre[p])

【模板】回文自动机

假如想象 提交于 2019-12-02 00:03:03
代码如下 #include <bits/stdc++.h> using namespace std; struct PAM { struct state { int len, sz, fail, cnt; // cnt -> 以该位置结尾的回文子串个数 unordered_map<char, int> go; state(int _len = 0, int _sz = 0, int _fail = 0) { len = _len, sz = _sz, fail = _fail, cnt = 0; } }; vector<state> t; int tot, last; PAM() { tot = 2, last = 0; t.emplace_back(0, 0, 1); // root of even t.emplace_back(-1, 0, 1); // root of odd } int extend(string &s, int i) { int x = last; if (i - t[x].len == 0) x = t[x].fail; // be careful while (s[i - 1 - t[x].len] != s[i]) { x = t[x].fail; } if (t[x].go[s[i]] == 0) { int z = t[x].fail;