在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答
青裙 回答

在url中增加‘http://’前綴,瀏覽器將會(huì)認(rèn)為是個(gè)絕對(duì)url
默認(rèn)不帶'http://'則會(huì)認(rèn)為是當(dāng)前url

青裙 回答
  1. mysql中可以用DATE_FORMAT()函數(shù)把它轉(zhuǎn)換成字符串來查詢.
    PS: 該函數(shù)的使用請(qǐng)看: http://www.w3school.com.cn/sq...
  2. 用SimpleDateFormat或 jodaTime的DateTimeFormatter來轉(zhuǎn)換 (兩者的區(qū)別可以百度一下)

下面是用DateTimeFormatter的代碼

DateTimeFormatter dateTimeFormatter = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss");
DateTime dateTime = new DateTime(date);//這里的date就是你要轉(zhuǎn)換的Date對(duì)象
String dateTimeStr = dateTime.toString(dateTimeFormatter);

這是你想要的工具類

/**
 *
 * Created by MenzilBiz on 18-1-25.
 */
public class DateUtil {

    private static final DateTimeFormatter dateTimeFormatter = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss");

    /**
     * Date類型轉(zhuǎn)為yyyy-MM-dd HH:mm:ss類型String
     */
    public static String formatDateTime(Date date) {
        return format(date, dateTimeFormatter);
    }

    /**
     * yyyy-MM-dd HH:mm:ss類型String轉(zhuǎn)為DateTime
     */
    public static DateTime parseDateTime(String dateString) {
        return parse(dateString, dateTimeFormatter);
    }

    private static String format(Date date, DateTimeFormatter formatter) {
        if (date == null) {
            return null;
        }
        DateTime dateTime = new DateTime(date);
        return dateTime.toString(formatter);
    }

    private static DateTime parse(String date, DateTimeFormatter formatter) {
        if (StringUtils.isEmpty(date)) {
            return null;
        }
        DateTime dateTime = formatter.parseDateTime(date);
        return dateTime;
    }

}

里面可以根據(jù)自己的需要添加各種格式的轉(zhuǎn)換方法

用的時(shí)候直接調(diào)用public方法即可.

題主把其他的 console 注釋掉,在 while 里面加一個(gè) console

while (objStack.length) {
          for (let i = count; i < objStack[objStack.length - 1].children.length; i++) {
            /*this.*/objectIterator(objStack[objStack.length - 1].children[i], arr, objStack)
          console.log(objStack[objStack.length - 1],objStack.length);//新增:最后一個(gè) undefined,0
          }
          let obj = objStack.pop()
          if (obj.parent && obj.parent.children && Array.isArray(obj.parent.children)) {
            count = obj.parent.children.indexOf(obj) + 1
          } else {
            count = 0
          }
        }

報(bào)錯(cuò)的原因是,你在 for 循環(huán)里遞歸的時(shí)候,報(bào)錯(cuò)之前已經(jīng)把 objStack 清空了,所以在 for 循環(huán)里 objStack[objStack.length - 1].children 這樣用的時(shí)候,相當(dāng)于objStack[-1].children ,objStack 是個(gè)空數(shù)組,當(dāng)然報(bào)錯(cuò)了,,
解決辦法:我給你沒有辦法參與循環(huán)的時(shí)候,直接跳出了 while 循環(huán),不知道是不是你想要的結(jié)果:

        loop://新增
        while (objStack.length) {
          for (let i = count; i < objStack[objStack.length - 1].children.length; i++) {
            this.objectIterator(objStack[objStack.length - 1].children[i], arr, objStack)
          //console.log(objStack[objStack.length - 1],objStack.length);//最后一個(gè) undefined,0
            if(objStack.length===0){break loop;}//新增
          }
          let obj = objStack.pop()
          if (obj.parent && obj.parent.children && Array.isArray(obj.parent.children)) {
            count = obj.parent.children.indexOf(obj) + 1
          } else {
            count = 0
          }
        }

代碼不加分號(hào),可讀性差

朕略傻 回答

圖片描述

應(yīng)該是網(wǎng)絡(luò)問題吧,看下util.js 1024行。

不討囍 回答

在需要使用其它賬號(hào)的地方,自己創(chuàng)建一個(gè)新的Swift_Mailer來發(fā)送郵件

// 備份原有Mailer
$backup = Mail::getSwiftMailer();

// 設(shè)置郵箱賬號(hào)
$transport = Swift_SmtpTransport::newInstance('smtp.qq.com', 25, 'tls');
$transport->setUsername('email_username');
$transport->setPassword('email_password');

$mailer = new Swift_Mailer($transport);

Mail::setSwiftMailer($mailer);

Mail::send();

// 發(fā)送后還原
Mail::setSwiftMailer($backup);
柒喵 回答

流式訓(xùn)練正統(tǒng)叫法online training,在線學(xué)習(xí)。意思是訓(xùn)練數(shù)據(jù)不是一次放入模型學(xué)習(xí),而是不斷加入的。這個(gè)典型是大數(shù)據(jù)場景,像電商,每天都有新的數(shù)據(jù),每天都要讓模型學(xué)習(xí)新的數(shù)據(jù),所以不可能一次把數(shù)據(jù)學(xué)完。

Batch Training是指數(shù)據(jù)量太大(一般來說你已經(jīng)獲得了所有數(shù)據(jù),后面不會(huì)新增了),全部一次學(xué)完計(jì)算量太大,電腦吃不消,就分批丟給模型訓(xùn)練,CPU和內(nèi)存負(fù)載都會(huì)小很多。深度學(xué)習(xí)的mini batch就是典型應(yīng)用。

女流氓 回答

這不是cols的問題,是你沒設(shè)置每個(gè)item的高度,文本有兩行的時(shí)候高度多了,把底下的元素?cái)D走了

痞性 回答

Echarts 貌似沒這樣的配置項(xiàng)。

我寫了個(gè)另類的方法可以試試

// 鼠標(biāo)退出
myChart.on('mouseout', function (params) {
    setBrush(params.name)
});

// 設(shè)置豎線
function setBrush(focus) {
    myChart.dispatchAction({
        type: 'brush',
        areas: [
            {
                brushType: 'lineX',
                coordRange: [focus, focus],
                xAxisIndex: 0
            }
        ]
    });
}

完整實(shí)例代碼:

var upColor = '#00da3c';
var downColor = '#ec0000';


function splitData(rawData) {
    var categoryData = [];
    var values = [];
    var volumes = [];
    for (var i = 0; i < rawData.length; i++) {
        categoryData.push(rawData[i].splice(0, 1)[0]);
        values.push(rawData[i]);
        volumes.push([i, rawData[i][4], rawData[i][0] > rawData[i][1] ? 1 : -1]);
    }

    return {
        categoryData: categoryData,
        values: values,
        volumes: volumes
    };
}

function calculateMA(dayCount, data) {
    var result = [];
    for (var i = 0, len = data.values.length; i < len; i++) {
        if (i < dayCount) {
            result.push('-');
            continue;
        }
        var sum = 0;
        for (var j = 0; j < dayCount; j++) {
            sum += data.values[i - j][1];
        }
        result.push(+(sum / dayCount).toFixed(3));
    }
    return result;
}

$.get('data/asset/data/stock-DJI.json', function (rawData) {

    var data = splitData(rawData);

    myChart.setOption(option = {
        backgroundColor: '#fff',
        animation: false,
        legend: {
            bottom: 10,
            left: 'center',
            data: ['Dow-Jones index', 'MA5', 'MA10', 'MA20', 'MA30']
        },
        tooltip: {
            trigger: 'axis',
         
           // backgroundColor: 'rgba(245, 245, 245, 0.8)',
            borderWidth: 1,
            borderColor: '#ccc',
            padding: 10,
            textStyle: {
                color: '#000'
            },
         
            // extraCssText: 'width: 170px'
        },
        axisPointer: {
            link: {xAxisIndex: 'all'},
            label: {
                backgroundColor: '#777'
            }
        },
        toolbox: {
            feature: {
                dataZoom: {
                    yAxisIndex: false
                },
                brush: {
                    type: ['lineX', 'clear']
                }
            }
        },
        brush: {
            xAxisIndex: 'all',
            brushLink: 'all',
            outOfBrush: {
                colorAlpha: 1
            }
        },
        visualMap: {
            show: false,
            seriesIndex: 5,
            dimension: 2,
            pieces: [{
                value: 1,
                color: downColor
            }, {
                value: -1,
                color: upColor
            }]
        },
        grid: [
            {
                left: '10%',
                right: '8%',
                height: '50%'
            },
            {
                left: '10%',
                right: '8%',
                top: '63%',
                height: '16%'
            }
        ],
        xAxis: [
            {
                type: 'category',
                data: data.categoryData,
                scale: true,
                boundaryGap : false,
                axisLine: {onZero: false},
                splitLine: {show: false},
                splitNumber: 20,
                min: 'dataMin',
                max: 'dataMax',
                axisPointer: {
                    z: 100
                }
            },
            {
                type: 'category',
                gridIndex: 1,
                data: data.categoryData,
                scale: true,
                boundaryGap : false,
                axisLine: {onZero: false},
                axisTick: {show: false},
                splitLine: {show: false},
                axisLabel: {show: false},
                splitNumber: 20,
                min: 'dataMin',
                max: 'dataMax'
                // axisPointer: {
                //     label: {
                //         formatter: function (params) {
                //             var seriesValue = (params.seriesData[0] || {}).value;
                //             return params.value
                //             + (seriesValue != null
                //                 ? '\n' + echarts.format.addCommas(seriesValue)
                //                 : ''
                //             );
                //         }
                //     }
                // }
            }
        ],
        yAxis: [
            {
                scale: true,
                splitArea: {
                    show: true
                }
            },
            {
                scale: true,
                gridIndex: 1,
                splitNumber: 2,
                axisLabel: {show: false},
                axisLine: {show: false},
                axisTick: {show: false},
                splitLine: {show: false}
            }
        ],
        dataZoom: [
            {
                type: 'inside',
                xAxisIndex: [0, 1],
                start: 98,
                end: 100
            },
            {
                show: true,
                xAxisIndex: [0, 1],
                type: 'slider',
                top: '85%',
                start: 98,
                end: 100
            }
        ],
        series: [
            {
                name: 'Dow-Jones index',
                type: 'candlestick',
                data: data.values,
                itemStyle: {
                    normal: {
                        color: upColor,
                        color0: downColor,
                        borderColor: null,
                        borderColor0: null
                    }
                },
         
            },
            {
                name: 'MA5',
                type: 'line',
                data: calculateMA(5, data),
                smooth: true,
                lineStyle: {
                    normal: {opacity: 0.5}
                }
            },
            {
                name: 'MA10',
                type: 'line',
                data: calculateMA(10, data),
                smooth: true,
                lineStyle: {
                    normal: {opacity: 0.5}
                }
            },
            {
                name: 'MA20',
                type: 'line',
                data: calculateMA(20, data),
                smooth: true,
                lineStyle: {
                    normal: {opacity: 0.5}
                }
            },
            {
                name: 'MA30',
                type: 'line',
                data: calculateMA(30, data),
                smooth: true,
                lineStyle: {
                    normal: {opacity: 0.5}
                }
            },
            {
                name: 'Volume',
                type: 'bar',
                xAxisIndex: 1,
                yAxisIndex: 1,
                data: data.volumes
            }
        ]
    }, true);


    // 鼠標(biāo)退出
    myChart.on('mouseout', function (params) {
        setBrush(params.name)
    });
    
    // 設(shè)置豎線
    function setBrush(focus) {
        myChart.dispatchAction({
            type: 'brush',
            areas: [
                {
                    brushType: 'lineX',
                    coordRange: [focus, focus],
                    xAxisIndex: 0
                }
            ]
        });
    }
    

});
你好胸 回答
window.addEventListener("scroll",function(){
            var stop = document.documentElement.clientHeight;
                console.log(stop)
            if(stop > 100 &&  stop< 500){
                
            }
        })

這樣沒問題啊

妖妖 回答

var myCalendar = new SimpleCalendar('#container');放在mounted里面,放在外面此時(shí)渲染還沒完成,找不到dom

export default {
  data() {
    return {
      //button:"預(yù)定",
    }
  }
    mounted:(){
    this.$nextTick(()=>{
     var myCalendar = new SimpleCalendar('#container');
})
    }
}
伴謊 回答

1、定義路由的時(shí)候可以配置 meta 字段,在beforeEach勾函數(shù)進(jìn)行權(quán)限過濾。
2、登錄后后端返回一個(gè)標(biāo)識(shí)(token),所有請(qǐng)求都帶上token。如果對(duì)不上則返回403,然后進(jìn)行跳轉(zhuǎn)到登錄頁!

不過用a跳轉(zhuǎn)的路由沒有找到比較好的方法,只能在后端判斷一個(gè)用來記錄是否登錄的一個(gè)標(biāo)識(shí)是否存在,來進(jìn)行權(quán)限控制。

情殺 回答

windows還是linux?