购物车,实现增删改查;无bug,还有一个直接修改购物车数量功能未实现
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>购物车</title>
<link rel="stylesheet" href="assets/css/cssreset.css">
<link rel="stylesheet" href="css/login.css">
<link rel="stylesheet" href="assets/css/cosmetics.css">
<link rel="stylesheet" href="assets/font-awesome-4.5.0/css/font-awesome.css">
<link rel="stylesheet" href="assets/css/bootstrap.css">
<style>
.content{
width: 1903px;
height: auto;
background: url("assets/img/bg.jpg"); }
.content{
background: url("assets/img/bg.jpg");
background-size: cover;
width: 100%;
height: auto;
}
.content .title{
width: 1200px;
height: 70px;
margin: 0 auto;
}
.content .title ul{
width: 700px;
height: 100%;
display: flex;
margin-left: 60px;
}
.content .title ul li{
flex: 1;
text-align: center;
line-height: 70px;
font-size: 20px;
font-weight: normal;
cursor: pointer;
}
.content .title ul li a{
color: #999999; }
.content .title ul li a:hover{
color: red;
text-decoration: none;
}
.content .title ul li:nth-child(1){
border-bottom:2px solid black;
}
.content .title ul li:nth-child(1) a{
color: black;
font-weight: bold;
}
.content .main{
width: 1200px;
margin: 0 auto;
display: flex;
justify-content: space-around;
}
.content .main .right{
width: 300px;
height: 800px;
}
.content .main .right .concat{
width: 100%;
height: 420px;
background-color: white;
box-shadow:0 0 12px #ccc ;
}
.content .main .right .concat h2{
font-size: 16px;
line-height: 40px;
font-weight: normal;
text-indent: 1em;
padding-top: 20px;
}
.content .main .right .concat p{
text-indent: 1em;
font-size: 14px;
line-height: 40px;
color: #999999;
}
.content .main .right .concat .dapartment:nth-child(3){
margin-top: 20px;
}
.content .main .right .concat .dapartment>span{
display: inline-block;
margin-left: 40px;
line-height: 20px;
}
.content .main .right .concat .email{
margin-top: 30px;
display: inline-block;
}
.content .main .right .special{
margin-top: 20px;
height: 230px;
display: flex;
flex-direction: column;
justify-content: center;
width: 100%;
background-color: white;
box-shadow:0 0 12px #ccc ;
}
.content .main .right .special h1{
font-size: 16px;
font-weight: normal;
margin-left: 16px;
width: 268px;
line-height: 40px;
border-bottom: 1px solid #ccc;
}
.content .main .right .special p{
margin-left: 16px;
}
.content .left{
width: 800px;
box-shadow:0 0 12px #ccc ;
} .shopping-car-container {
padding: 50px 40px;
width: 800px;
} .shopping-car-container .car-headers-menu {
border-bottom: 1px solid #f5f5f5;
padding: 0 15px;
} .shopping-car-container .panel-body {
padding: 15px 0;
} #checkAll {
display: inline-block;
width: 30px;
position: absolute;
top: 0;
left: 20px;
} .shopping-car-container .car-menu label{
width: 60px;
height: 30px;
display: block;
position: relative;
}
/*
商品区
* */ .shopping-car-container .goods-content {
margin-top: 15px;
}
.shopping-car-container .goods-content h1{
text-align: center;
margin-top: 80px;
} .shopping-car-container .goods-content a{
text-align: center;
display: block;
width: 100%;
margin: 40px;
}
.shopping-car-container .goods-content .goods-item {
margin-top: 0;
} .shopping-car-container .goods-content .goods-item .car-goods-info {
height: 150px;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden; } .shopping-car-container .goods-content .goods-item .goods-image-column img,
.shopping-car-container .goods-content .goods-item .goods-image-column span {
display: block;
float: left;
} .shopping-car-container .goods-content .goods-item .goods-image-column span {
width: calc(100% - 100px);
box-sizing: border-box;
text-indent: 2rem;
line-height: 25px;
padding: 10px;
}
.goods-item{
margin-top: 0px;
border: none;
}
.goods-item .panel-body{
border: none; }
.goods-operate{
width: 54px;
}
.goods-price {
color: red;
font-weight: bolder;
align-items: center; } .form-control {
text-align: center;
}
.goods-counts{
width: 120px;
}
.goods-counts .btn{
border-radius: 50%;
outline: none;
}
.single-total {
color: red;
font-weight: bold;
} .goods-params { display: flex;
flex-direction: column;
}
.goods-params p:nth-child(1){
color: black;
font-size: 12px;
font-weight: bold;
}
.goods-params p:nth-child(2){
font-size: 12px;
color: darkgray;
}
.bottom-menu {
display: flex;
align-items: center;
justify-content: center;
position: relative;
margin-left: -20px;
} .bottom-menu span {
vertical-align: text-bottom;
position: absolute;
left: 40px;
top: 0;
display: block;
width: 200px;
} #deleteMulty {
color: cornflowerblue;
cursor: pointer;
vertical-align: text-bottom;
} .bottom-menu-include {
background: #e5e5e5;
} #selectGoodsCount {
color: orangered;
font-size: 16px;
font-weight: bolder;
width: 20px;
display: block;
left: 60px;
} #selectGoodsMoney {
color: orangered;
font-size: 16px;
font-weight: bolder;
} .panel-default .submitData {
background: orangered;
color: white;
cursor: pointer;
font-weight: bolder;
height: 58px;
position: absolute;
width: 90px;
font-size: 14px;
right: 0;
top: 0;
} .panel-default .submitDis {
background: #B0B0B0;
cursor: no-drop;
} .shopping-car-container .panel-default {
position: relative;
}
.content .main .left .footer{
width: 100%;
height: 200px;
background-color:#F6F6F6; }
.content .main .left .footer .three{
width: 720px;
height: 100%;
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
}
.content .main .left .footer .three .safe{
width: 184px;
height: 184px;
}
.content .main .left .footer .three h2{
font-size: 18px;
font-weight: normal;
line-height: 35px;
}
.content .main .left .footer .three p{
font-size: 14px;
color: #767676;
line-height: 20px;
}
.content .main .left .footer .three .paystyle{
width: 184px;
height: 184px;
}
.content .main .left .footer .three .paystyle img{
margin-left: 20px;
margin-top: 20px;
}
.content .main .left .footer .three .return{
width: 184px;
height: 184px;
}
</style>
</head>
<body>
<div class="cartTop"></div>
<div class="content serve">
<div class="title">
<ul>
<li><a href="">购物袋</a></li>
<li><a href="">订单提交</a></li>
<li><a href="">支付</a></li>
</ul>
</div>
<div class="main">
<div class="left">
<div class="shopping-car-container">
<div class="goods-content">
<h1>很遗憾,你还未选购商品</h1>
<a href="http://localhost:8080/cosmetics.html">点此选购商品</a>
</div>
<div class="panel panel-default">
<div class="panel-body bottom-menu-include">
<div class="col-md-1 check-all-bottom bottom-menu">
<label>
<input type="checkbox" id="checked-all-bottom" />
<span id="checkAllBottom">全选</span>
</label>
</div> <div class="col-md-6 bottom-menu"> </div>
<div class="col-md-2 bottom-menu">
<span>已选商品 <span id="selectGoodsCount">0</span> 件</span>
</div>
<div class="col-md-1 bottom-menu">
<span>合计:<span id="selectGoodsMoney">0.00</span></span>
</div>
<div class="submitData">
提交订单
</div>
</div>
</div>
<div class="modal fade" tabindex="-1" role="dialog" id="deleteItemTip" aria-labelledby="gridSystemModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title" id="gridSystemModalLabel">提示</h4>
</div>
<div class="modal-body">
确认删除此商品?
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button type="button" class="btn btn-primary deleteSure">确定</button>
</div>
</div>
</div>
</div> </div>
<div class="footer">
<div class="three"> <div class="safe">
<h2>信息安全保障</h2>
<p>您的数据包括订单信息都将通过加密的方式传输。</p>
</div>
<div class="paystyle">
<h2>支付方式</h2>
<p>我们支持支付宝,网银支付以及微信支付</p>
<img src="assets/img/wechat.jpg" alt="">
<img src="assets/img/alipay.jpg" alt="">
</div>
<div class="return">
<h2>信息安全保障</h2>
<p>您可以享受7天内无理由退货。如需帮助,请拨打客服热线
<br>
迪奥时装:400-122-6622
<br>
迪奥美妆:400-921-8833
</p>
</div>
</div>
</div>
</div>
<div class="right">
<div class="concat">
<h2>您可以通过以下方式联系到我们
</h2>
<div class="dapartment">
<p><i class="fa fa-weixin"></i> <span>迪奥时装</span>
</p>
<span>
客户服务热线:400 122 66 22</span>
<br>
<span>
(周一至周日 10:00 - 22:00)
</span>
<br>
<span class="email">
电子邮件:
</span>
<br>
<span>
<a href="">
contactdiorasia@dior.com
</a>
</span>
</div>
<div class="dapartment">
<p><i class="fa fa-weixin"></i> <span>迪奥美妆</span>
</p>
<span>
客户服务热线:400 921 88 33</span>
<br>
<span>
(周一至周日 9:00 - 21:00) </span>
<br>
<span class="email">
电子邮件:
</span>
<br>
<span>
<a href="">ecservice_china@diormail.com </a>
</span>
</div>
</div>
<div class="special">
<h1>Dior迪奥官网购物的特殊礼遇 </h1>
<p><b>免配送费</b></p>
<p><b>Dior迪奥美妆订单配以试用装礼赠</b></p>
<p><b>Dior迪奥艺术包装</b></p>
</div> </div>
</div>
</div> </div>
<div class="cartFooter"></div>
</body>
<script src="assets/js/jquery.js"></script>
<script src="assets/js/ajax.js"></script>
<script src="assets/js/jquery.cookie.js"></script>
<script src="assets/js/cookie.js"></script>
<script src="assets/js/jquery-menu.js"></script>
<script src="js/login.js"></script>
<script>
$(".cartTop").load("http://localhost:8080/public.html .log-h",function () {
$(".top").find("button").on("click",function () {
$(".top").css("display","none")
})
$(".cartTop").find(".login").on("click",function () {
if($.cookie("onoff")){
window.location.href="http://localhost:8080/personcenter.html"
}
else{
alert("您还未登录,请先登录")
window.location.href='http://localhost:8080/login.html'
} });
$(".cartTop").find(".fa-shopping-bag").on("click",function () {
if($.cookie("onoff")){
window.location.href="http://localhost:8080/car.html"
}
else{
alert("您还未登录,请先登录")
window.location.href='http://localhost:8080/login.html'
} });
})
$(".cartFooter").load("http://localhost:8080/public.html .log-f",function () {
$(".footer").pull({ //课下再看看
li:$(".list").find("li"),
menu:$(".footer").find(".menu"),
list:$(".footer").find(".list"),
h2:$(".footer").find("h2"),
})//下拉地点搜索菜单
});
</script>
<script> class Cart{
constructor(){
this.content=document.querySelector(".goods-content")
this.all=document.querySelector("#checked-all-bottom")
this.url="http://localhost:8080/assets/data/cosmetics.json";
this.load();
this.addEvent()
}
addEvent(){
var that=this;
$(".submitData").on("click",function () {
{
that.agoods=[];
var abox=document.querySelectorAll(".goods-list-item")
console.log(abox.length)
for(var i=0;i<abox.length;i++){
if(abox[i].checked){
that.agoods.push({
id:abox[i].getAttribute('index'),
num:abox[i].getAttribute('num')
});
console.log(that.agoods)
}
}
that.setCookie() }
})
this.content.addEventListener("click",function (eve) {
var e=eve||window.event;
var target=e.target||e.srcElement;
if(target.className=="btn btn-danger item-delete"){
that.id = target.getAttribute("index");//要把id也改变了
target.parentNode.parentNode.parentNode.remove();
var subnum=0;
var abox=document.querySelectorAll(".goods-list-item");
for(var i=0;i<abox.length;i++){ //关键思想:难点!!!!!!!!!!!!!!!
if(abox[i].checked){
subnum++;
} } if(subnum==abox.length){
that.all.checked=true;
}else{
that.all.checked=false;
}
if(target.parentNode.parentNode.firstElementChild.firstElementChild.firstElementChild.checked){
$("#selectGoodsMoney").text(parseFloat( $("#selectGoodsMoney").text())-parseFloat(target.parentNode.parentNode.lastElementChild.previousElementSibling.lastElementChild.innerHTML));
$("#selectGoodsCount").text(parseInt($("#selectGoodsCount").text())-parseInt(target.parentNode.parentNode.lastElementChild.previousElementSibling.previousElementSibling.firstElementChild.firstElementChild.nextElementSibling.value))
}
that.removeCookie();
}
if(target.className=="btn btn-default car-add"){
that.id = target.getAttribute("index");
console.log(that.id)
target.parentNode.previousElementSibling.value=parseInt(target.parentNode.previousElementSibling.value)+1
console.log( target.parentNode)
if(target.parentNode.parentNode.parentNode.parentNode.firstChild.nextSibling.firstChild.nextSibling.firstChild.checked){
$("#selectGoodsMoney").text(parseFloat( $("#selectGoodsMoney").text())+parseFloat(parseFloat($(target).attr("price"))));
$("#selectGoodsCount").text(parseInt($("#selectGoodsCount").text())+1)
}
var p=parseFloat($(target).attr("price"))
var n=parseFloat(target.parentNode.previousElementSibling.value)
target.parentNode.parentNode.parentNode.nextSibling.nextSibling.lastChild.innerHTML=p*n;//单个总价
that.count=parseFloat(target.parentNode.previousElementSibling.value)//单个商品num
that.updateCookie()
}
if(target.className=="btn btn-default car-decrease"){
that.id = target.getAttribute("index");
console.log(that.id)
target.parentNode.nextSibling.nextSibling.value=parseInt( target.parentNode.nextSibling.nextSibling.value)-1;
if(target.parentNode.nextSibling.nextSibling.value>=1){
if(target.parentNode.parentNode.parentNode.parentNode.firstChild.nextSibling.firstChild.nextSibling.firstChild.checked){
$("#selectGoodsMoney").text(parseFloat( $("#selectGoodsMoney").text())-parseFloat(parseFloat($(target).attr("price"))));
$("#selectGoodsCount").text(parseInt($("#selectGoodsCount").text())-1) } }
if(target.parentNode.nextSibling.nextSibling.value<=1){
target.parentNode.nextSibling.nextSibling.value=1; } var p=parseFloat($(target).attr("price"))
var n= target.parentNode.nextSibling.nextSibling.value target.parentNode.parentNode.parentNode.nextSibling.nextSibling.lastChild.innerHTML=p*n;
that.count=parseFloat(target.parentNode.nextSibling.nextSibling.value)
that.updateCookie()
}
if(target.id="#checked"){
var abox = document.querySelectorAll(".goods-list-item");
var subnum=0; if(target.checked){
$("#selectGoodsMoney").text(parseFloat( $("#selectGoodsMoney").text())+parseFloat(target.parentNode.parentNode.parentNode.lastChild.previousSibling.previousSibling.previousSibling.lastChild.innerHTML)); $("#selectGoodsCount").text(parseFloat($("#selectGoodsCount").text())+parseFloat(target.parentNode.parentNode.parentNode.lastChild.previousSibling.previousSibling.previousSibling.previousElementSibling.children[0].children[1].value))
}
else{
$("#selectGoodsMoney").text(parseFloat( $("#selectGoodsMoney").text())-parseFloat(target.parentNode.parentNode.parentNode.lastChild.previousSibling.previousSibling.previousSibling.lastChild.innerHTML)); $("#selectGoodsCount").text(parseFloat($("#selectGoodsCount").text())-parseFloat(target.parentNode.parentNode.parentNode.lastChild.previousSibling.previousSibling.previousSibling.previousElementSibling.children[0].children[1].value))
}
for(var i=0;i<abox.length;i++){
if(abox[i].checked){
subnum++;
}
}
if(subnum==abox.length){
that.all.checked=true;
}else{
that.all.checked=false;
}
} });
this.all.addEventListener("click",function () {
if(that.all.checked==true){
that.display();
$("#selectGoodsMoney").text(that.rmb);
$("#selectGoodsCount").text(that.num);
var abox = document.querySelectorAll(".goods-list-item");
for (var i = 0; i < abox.length; i++) {
abox[i].checked = true;
}
}
else{
$("#selectGoodsMoney").text(0);
$("#selectGoodsCount").text(0);
var abox = document.querySelectorAll(".goods-list-item");
for (var i = 0; i < abox.length; i++) {
abox[i].checked = false;
}
}
})
} setCookie(){
setCookie("indent",JSON.stringify(this.agoods))
setCookie("countmoney",$("#selectGoodsMoney").text())
this.other()//要写在setcookie后面,否则异步 }
other(){
if(that.agoods.length>0){
window.location.href="http://localhost:8080/indent.html"
}
}
updateCookie(){
var i = 0;
// 遍历数组,找到符合条件的数据
var onoff = this.cosmetics.some((val,index)=>{//这里的val是cookie中的json的每一个对象。
i = index;
return val.id == this.id;//val.id是cookie中的id
});
if(onoff){
// 找到符合的数据之后,更新数组中的数据
this.cosmetics[i].num = this.count;//这里的this.val是输入框总的值
}
// 将数组再设置回cookie
setCookie("cosmetics",JSON.stringify(this.cosmetics))
} //更新
removeCookie(){
var i=0;
var onoff=this.cosmetics.some((val,index)=>{ //val是数组对象中中,每一个对象。
i=index;//每次将传达的索引存出来。就是所点击的那个id在cookie数组中拍的那个位置。
return val.id==this.id;//返回val的id是否等当前点击的id;如果相等返回true,同时index停止往前走。
})
if(onoff){ //找到相同的了。
this.cosmetics.splice(i,1)
}
setCookie("cosmetics",JSON.stringify(this.cosmetics))
//更改了原来的cookie;
} //删除
load(){
ajax({
url:this.url,
success:res=>{
this.res = JSON.parse(res);
console.log(this.res);
this.getCookie();
}
})
} //请求ajax
getCookie(){
this.cosmetics=getCookie("cosmetics")?JSON.parse(getCookie("cosmetics")):[];
this.display();
} //得到cookie
display(){
var goodsHtml = ""
this.rmb=0;
this.num=0;
for(var i=0;i<this.res.length;i++){
for(var j=0;j<this.cosmetics.length;j++){
if(this.res[i].id==this.cosmetics[j].id){
this.rmb+=this.res[i].singleGoodsMoney* this.cosmetics[j].num;
this.num+=(this.cosmetics[j].num*1) goodsHtml += `<div class="goods-item" index="${this.cosmetics[j].id}">
<div class="panel panel-default">
<div class="panel-body">
<div class="col-md-1 car-goods-info">
<label><input type="checkbox" class="goods-list-item" title=${this.res[i].tip1} img="${this.res[i].url}" num="${this.cosmetics[j].num}" index="${this.res[i].id}" ap="${this.num * this.res[i].price}" id="checked" /></label>
</div>
<div class="col-md-3 car-goods-info goods-image-column">
<img class="goods-image" src="${this.res[i].url}" style="width: 100px; height: 100px;" />
</div>
<div class="col-md-3 car-goods-info goods-params">${this.res[i].tip2}</div>
<div class="col-md-1 car-goods-info goods-price"><span>¥</span><span class="single-price">${this.res[i].price}</span></div>
<div class="col-md-1 car-goods-info goods-counts">
<div class="input-group">
<div class="input-group-btn">
<button type="button" class="btn btn-default car-decrease" price="${this.res[i].price}" index="${this.res[i].id}">-</button>
</div> <input type="text" style="width: 50px" class="form-control goods-count" value=${this.cosmetics[j].num}>
<div class="input-group-btn">
<button type="button" class="btn btn-default car-add" index="${this.res[i].id}" price="${this.res[i].price}">+</button>
</div>
</div>
</div>
<div class="col-md-1 car-goods-info goods-money-count"><span>¥</span><span class="single-total">${this.res[i].singleGoodsMoney* this.cosmetics[j].num} </span></div>
<div class="col-md-2 car-goods-info goods-operate">
<button type="button" class="btn btn-danger item-delete" index="${this.res[i].id}">删除</button>
</div>
</div>
</div>
</div>`
}
}
}
if(!goodsHtml){
console.log("你好呢" )
}
else{
$(".goods-content")[0].innerHTML= goodsHtml ; }
} //渲染页面
}
new Cart() </script>
//直接修改购物车物品数量思想:修改了数量存入cookie,如果单选框被勾上了,那么修改总价和总数。总价是加上(物品数量修改后的价格减去修改前的价格。)总数是加上(物品数量修改后的减去修改前的);实现太麻烦了吧。。。
购物车,实现增删改查;无bug,还有一个直接修改购物车数量功能未实现的更多相关文章
- 分享一个自己写的MVC+EF “增删改查” 无刷新分页程序
分享一个自己写的MVC+EF “增删改查” 无刷新分页程序 一.项目之前得添加几个组件artDialog.MVCPager.kindeditor-4.0.先上几个效果图. 1.首先建立一个数 ...
- 在ASP.NET MVC4中实现同页面增删改查,无弹出框02,增删改查界面设计
在上一篇"在ASP.NET MVC4中实现同页面增删改查,无弹出框01,Repository的搭建"中,已经搭建好了Repository层,本篇就剩下增删改查的界面了......今 ...
- SpringBoot JPA实现增删改查、分页、排序、事务操作等功能
今天给大家介绍一下SpringBoot中JPA的一些常用操作,例如:增删改查.分页.排序.事务操作等功能.下面先来介绍一下JPA中一些常用的查询操作: //And --- 等价于 SQL 中的 and ...
- 在ASP.NET MVC4中实现同页面增删改查,无弹出框01,Repository的搭建
通常,在同一个页面上实现增删改查,会通过弹出框实现异步的添加和修改,这很好.但有些时候,是不希望在页面上弹出框的,我们可能会想到Knockoutjs,它能以MVVM模式实现同一个页面上的增删改查,再辅 ...
- Vue+MySQL实现购物车的增删改查
1,创建简单数据库数据表 2,创建Mapper文件 <!--查询商品--> <select id="selectcommodity" resultType=&qu ...
- 第二百七十七节,MySQL数据库-数据表、以及列的增删改查
MySQL数据库-数据表.以及列的增删改查 1.创建一个表 CREATE(创建) TABLE(表) ENGINE(引擎) ENGINE=INNODB(引擎)还有很多类引擎,这里只是简单的提一下INNO ...
- JS组件系列——BootstrapTable+KnockoutJS实现增删改查解决方案(三):两个Viewmodel搞定增删改查
前言:之前博主分享过knockoutJS和BootstrapTable的一些基础用法,都是写基础应用,根本谈不上封装,仅仅是避免了html控件的取值和赋值,远远没有将MVVM的精妙展现出来.最近项目打 ...
- Node+Express+node-mysql 实战于演习 全套mysql(增删改查)
最近这段时间研究Node感觉不错,自己做了一个增删改查,虽然有些简陋,但是思想是想通的,其实所有项目都是增删改查,有助于初学者快速掌握Node 首先 本实例展示的是基于Node+Express+nod ...
- 快速入门GreenDao框架并实现增删改查案例
大家的项目中不可避免的使用到SQLite,为此我们要花费心思编写一个增删改查框架.而一个好的ORM框架则能够给我们带来极大的方便,今天给大家讲解一个非常火热的ORM-GreenDao. 基本概念 Gr ...
- android 数据库的增删改查的另一种方式
老师笔记 # 3 Android下另外一种增删改查方式 1.创建一个帮助类的对象,调用getReadableDatabase方法,返回一个SqliteDatebase对象 2.使用Sq ...
随机推荐
- Python openpyxl【包】
介绍 Excel是我们日常工作中经常用到的办公软件,在处理数据和表格方面有着优异的性能,那么能不能用python来操作Excel呢? 答案是肯定的,openpyxl是一个第三方库,可以处理xlsx格式 ...
- chap3第三小组总结
本周我们第三小组在张庆老师的带领下,走向编程的新一扇大门--分支结构. 我们第三小组是线下聚在一起学习,这样可以使我们的学习效率大大提高,我们在线下学习可以让我们的小组长更方便的指导我们的学习 ...
- redis每天生成自增流水号(001、002...)
原理:利用redis的RedisAtomicLong类实现该功能:让其每天第一次放置一个新的自增的值(一天过期)然后和每天的日期相加就可以了例子: 20180901 + 001 ;当天就是 20180 ...
- dbeaver,执行SQL时,空行导致SQL执行报错" ERROR: syntax error at or near "case"Position: 1"
dbeaver,执行SQL时,空行导致SQL执行报错" ERROR: syntax error at or near "case"Position: 1" 解决 ...
- 据库连接中useSSL
在进行数据库连接时: jdbc.driver=com.mysql.jdbc.Driver jdbc.url=jdbc:mysql://localhost:3306/db?useSSL=false&am ...
- 装了google浏览器不代表就能使用google搜索
第一步:装google浏览器 第二步:连接外网(FQ的本质就是连接一个服务器) 第三步:输入网址google.com 跳转到此页面即成功 现在的想法是
- oracle 将以逗号分隔的列拆成多行的的方法
原表如下 select * from hs_acct.custattach a where a.client_id='888827395'; 将列拆分成多行的语句 select * from ( -- ...
- Ubuntu与centos之间的文件传输
Ubuntu与centos之间的文件传输 默认端口:22 传输前确认端口是否开启 1.在Ubuntu上安装scp命令 apt-get install openssh-server 2.将U ...
- 9、http cache管理器
jmeter决定是否缓存的功能 2.操作步骤:
- Learning under Concept Drift: A Review 概念漂移综述论文阅读
首先这是2018年一篇关于概念漂移综述的论文[1]. 最新的研究内容包括 (1)在非结构化和噪声数据集中怎么准确的检测概念漂移.how to accurately detect concept dri ...