filemtime 獲取 最后修改時(shí)間這個(gè)是正常的. 只是一個(gè)是24小時(shí)制, 一個(gè)是12小時(shí)制.
filectime 獲取inode修改時(shí)間
fileatime 取得文件的上次訪問時(shí)間
<view class='tab'>
<view class='tab-menu'>
<view class='menu' wx:for="{{tabs}}" wx:key="{{index}}" data-tabidx="{{index}}" bindtap='switchTab'>
<text>{{item}}</text>
<view class='currentTab' wx:if="{{tabIdx === index}}"></view>
</view>
</view>
<swiper class='tab-content' current='{{tabIdx}}' bindchange='scrollTab'>
<swiper-item>
<view class='question-wrap'>
<view class='question-header'>
<text>[{{questions[current].type}}]</text>
<text class='total'><text class='current'>{{current+1}}</text>/{{questions.length}}</text>
</view>
<view class='title'>{{questions[current].title}}</view>
<view class='options'>
<view class='opt {{questions[current].right === index ? "right" : ""}}' wx:for="{{questions[current].options}}" wx:key="{{index}}">
<view class='tag'>
<image src='/icons/right.png' wx:if="{{questions[current].right === index}}"></image>
</view>
<view class='content'>{{item.content}}</view>
<text class='rate'>{{item.rate}}</text>
</view>
</view>
</view>
<view class='btns'>
<button disabled='{{current <= 0}}' bindtap="showPre">上一題</button>
<button disabled='{{current >= questions.length-1}}' bindtap="showNext">下一題</button>
</view>
</swiper-item>
<swiper-item>
<scroll-view scroll-y class='totalRank' lower-threshold="150" bindscrolltolower="getRank">
<view class='user' wx:for="{{ranks}}" wx:key="{{index}}">
<image src='{{item.img_url}}' class='avator'></image>
<view class='name'>{{item.name}}</view>
<view class='score'>{{item.score}}分</view>
<view class='order'>第{{item.no}}名</view>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
page {
display: flex;
flex-direction: column;
height: 100%;
background: #fff;
font-size: 30rpx;
}
.tab {
flex: 1;
display: flex;
flex-direction: column;
}
.tab-content {
flex: 1;
overflow-y: auto;
}
.tab-menu {
height: 104rpx;
display: flex;
}
.currentTab {
background: #42c541;
height: 2rpx;
width: 132rpx;
position: absolute;
bottom: 20rpx;
}
.tab-menu .menu {
flex: 1;
text-align: center;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
swiper-item {
overflow: auto;
}
.totalRank {
height: 100%;
}
.avator {
width: 60rpx;
height: 60rpx;
border-radius: 50%;
}
.user {
height: 88rpx;
display: flex;
align-items: center;
background: #f4f4f4;
padding: 0 43rpx;
margin: 30rpx 30rpx 0 30rpx;
border-radius: 10rpx;
box-sizing: border-box;
font-size: 24rpx;
}
.name, .score, .order {
flex: 1;
text-align: center;
}
.name{
margin-left: 50rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.order {
color: #42c541;
text-align: right;
}
.question-wrap{
display: flex;
flex-direction: column;
margin: 0 30rpx;
border: 2rpx solid #DCDCDC;
border-radius: 10rpx;
box-sizing: border-box;
padding: 0 50rpx;
margin-top: 40rpx;
}
.question-header{
display: flex;
justify-content: space-between;
margin-top: 60rpx;
}
/* .question-wrap .options{
max-height: 600rpx;
overflow: auto;
} */
.question-header .total{
color: #E3E3E3;
}
.question-header .current{
color: #353535;
}
.question-wrap .title{
margin-top: 36rpx;
min-height: 178rpx;
}
.opt{
text-align: center;
position: relative;
background: #F0F0F0;
margin-bottom: 44rpx;
border-radius: 10rpx;
padding: 26rpx 20rpx;
display: flex;
align-items: center;
}
.opt image, .opt .tag{
width: 46rpx;
height: 34rpx;
}
.opt .rate{
min-width: 3em;
}
.opt .content{
flex: 1;
text-align: center;
}
.right{
background: #FF920B;
color: #FFF;
}
.btns{
display: flex;
margin-top: 60rpx;
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 148rpx;
}
.btns button{
width: 260rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
border-radius: 10rpx;
color: #FFF;
background: #41C629;
}
.btns button:active{
background: #179B16;
color: #A2D7A2;
}
.btns button[disabled]:active{
background: #F7F7F7;
color: #ACACAC;
}
Page({
data: {
tabs: [
'題目分析',
'成績(jī)排名'
],
ranks: [
{ name: '張三', score: 93 },
{ name: '李四', score: 60 },
{ name: '趙六', score: 8 },
{ name: '王五', score: 1000 },
{ name: '馮二', score: 45 }
],
questions: [],
current: 0,
tabIdx: 0
}
})
當(dāng)一個(gè)字符串被當(dāng)作一個(gè)數(shù)值來取值,其結(jié)果和類型如下:如果該字符串沒有包含 '.','e' 或 'E' 并且其數(shù)字值在整型的范圍之內(nèi)(由 PHP_INT_MAX 所定義),該字符串將被當(dāng)成 integer 來取值。其它所有情況下都被作為 float 來取值。
該字符串的開始部分決定了它的值。如果該字符串以合法的數(shù)值開始,則使用該數(shù)值。否則其值為 0(零)。合法數(shù)值由可選的正負(fù)號(hào),后面跟著一個(gè)或多個(gè)數(shù)字(可能有小數(shù)點(diǎn)),再跟著可選的指數(shù)部分。指數(shù)部分由 'e' 或 'E' 后面跟著一個(gè)或多個(gè)數(shù)字構(gòu)成。
1.你的表里面已經(jīng)有有xpm字段了.就不用增加字段了吧.
添加字段 alter table totaltable add xpm int
2.現(xiàn)在你表中的xpm是沒有數(shù)據(jù)的.你想把數(shù)據(jù)填充進(jìn)來.
如果學(xué)生不多,你可以手動(dòng)添加.(利用軟件)
數(shù)量足夠多,那么你就把數(shù)據(jù)整理好.生產(chǎn)sql.重新添加
file_put_contents 沒有文件就創(chuàng)建前提是 你資源路徑得存在,并且有權(quán)限,路徑不存在的話 就是報(bào)這個(gè)錯(cuò)誤
document監(jiān)聽點(diǎn)擊事件
e.target!=彈窗 的時(shí)候,關(guān)閉
親測(cè)可用:
class BaseActiveController extends \yii\rest\ActiveController
{
public function behaviors()
{
$behaviors = parent::behaviors();
$behaviors['timeFilter'] = [
'class' => 'app\filters\ActionTimeFilter',
'except'=>['test']
];
return $behaviors;
}
}
值得注意的是,behaviors()
中需要繼承父類behaviors()
方法返回的內(nèi)容,否則父類behaviors()
就會(huì)被完全覆蓋了。
檢查看看是否字段名沒對(duì)上
這個(gè)情況很詭異,也是題主的邏輯有問題,setInterval
大概每3500ms執(zhí)行一次,但是ajax
異步的結(jié)果什么時(shí)候返回呢?這個(gè)時(shí)間不確定,所以邏輯不好,建議修改:
setInterval
,而是在ajax的返回中根據(jù)判定使用來遞歸調(diào)用自身;function ChangeTime() {
$.ajax({
type: "POST",
url: "/Home/Index",
success: function(msg){
if(msg == 1){
//clearInterval(iCount); //停止刷新事件,防止出現(xiàn)請(qǐng)求多次
location.href = '/Home/reg_result_no_card';
return false;
} else {
ChangeTime();
}
}
});
}
1: uuid
2:使用更小的微秒
// 生成一萬個(gè)
for ($i = 0; $i < 10000; ++ $
do {
$time = str_replace('.', '', microtime(true));
// 這樣子重復(fù)的概率已經(jīng)比較小了,如果還怕重復(fù),只能手動(dòng)篩選了
$key = $time . str_pad(1, 9999, STR_PAD_LEFT);
// 可以裝進(jìn)數(shù)組判斷,但注意內(nèi)存
if (不存在) {
// 存起來
break;
}
// 不存在 繼續(xù)循環(huán)
} while(true);
}
從代碼和http請(qǐng)求截圖中來看,暫時(shí)看不出問題。
既然這樣,排除法找問題:
可以先把這個(gè)請(qǐng)求加入 csrf 白名單,看是否功能正常
class VerifyCsrfToken extends BaseVerifier
{
/**
* 這些 URI 將免受 CSRF 驗(yàn)證
*
* @var array
*/
protected $except = [
'your url',
];
}
既然這樣,繼續(xù)嘗試其它方法:
請(qǐng)把 csrf_token 放入 data 里傳輸過去,字段名稱使用 _token
嘗試下。
var {...newData} = this.data
如果是數(shù)組
var [...newData] = this.data
這是es6的語法
感謝各位的回答,猜測(cè)是和主題文件損壞有關(guān)的。不過我已經(jīng)轉(zhuǎn)到WordPress了。
vue是一個(gè)基于對(duì)象的組件庫(所有的 組件都是對(duì)象,他的 方法啊,data啊都存在于組件對(duì)象里面。
而你要用一個(gè)操作dom的庫去操作Vue對(duì)象,把vue數(shù)據(jù)給修改了,這怎么可能呢,就算把dom節(jié)點(diǎn)改了其實(shí)也沒什么作用,vue會(huì)下次改回來。
而原生的 js 的確是可以操作對(duì)象,你把這個(gè)對(duì)象暴露出來,然后通過js操作,然后改數(shù)據(jù),但是呢,那你去操作vue對(duì)象,為什么不直接使用vue呢?
style直接寫到了head上面,查看源碼即可找到
使用workerman對(duì)在同個(gè)搶拍房間的用戶進(jìn)行消息推送(該過程為了向各個(gè)用戶推送信息還循環(huán)建立多個(gè)curl post提交請(qǐng)求)
這里不是很清楚為什么還要建立curl連接 建立連接會(huì)比較耗時(shí)啊
urldecode
解碼試試
crontab當(dāng)然可以添加多個(gè)了
北大青鳥APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
北大青鳥中博軟件學(xué)院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網(wǎng)學(xué)院和江蘇省首批服務(wù)外包人才培訓(xùn)基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團(tuán)創(chuàng)建于1999年,經(jīng)過二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術(shù)與教育服務(wù)機(jī)構(gòu),發(fā)展為教育服務(wù)業(yè)的綜合性企業(yè)集團(tuán),成為集合面授教學(xué)培訓(xùn)、網(wǎng)
達(dá)內(nèi)教育集團(tuán)成立于2002年,是一家由留學(xué)海歸創(chuàng)辦的高端職業(yè)教育培訓(xùn)機(jī)構(gòu),是中國一站式人才培養(yǎng)平臺(tái)、一站式人才輸送平臺(tái)。2014年4月3日在美國成功上市,融資1
浪潮集團(tuán)項(xiàng)目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺(tái)面向?qū)ο箝_發(fā)經(jīng)驗(yàn),技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項(xiàng)目經(jīng)理從事移動(dòng)互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對(duì)瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開發(fā)經(jīng)驗(yàn)。曾經(jīng)歷任德國Software AG 技術(shù)顧問,美國Dachieve 系統(tǒng)架構(gòu)師,美國AngelEngineers Inc. 系統(tǒng)架構(gòu)師。