以我以往的經(jīng)驗來看,我們是把參數(shù)放在分享的url后面的,當(dāng)其他用戶打開這個鏈接,再字符串截取到這些參數(shù),然后請求。
var shareData = { //微信分享data
title: '',
desc: '',
dataUrl: '',
type: 'link',
imgUrl: '',
link: ''
}
這個是微信分享提供的api,用來配置一些信息(標(biāo)題,描述,目標(biāo)頁面鏈接,類型,縮略圖等)。如果不配置,分享的就只是一個鏈接,只是樣子丑一點(diǎn)。
類似這個:
一個是直接分享,一個是配置了參數(shù)的分享。結(jié)果都是一樣的
如果你要在你本地運(yùn)行,那你本地必須要有數(shù)據(jù)庫咯。如果要連遠(yuǎn)程的話把配置文件連接信息改成遠(yuǎn)程地址就OK了
感謝樓上提供思路,我請求返回的數(shù)據(jù)是一個Blob對象,存儲的是二進(jìn)制數(shù)據(jù)。
所以需要先從Blob對象中提取數(shù)據(jù),然后再用pako.inflate()方法進(jìn)行解壓
具體什么是Blob對象,請看這里鏈接描述
具體代碼如下:
ws.onmessage = function(evt){
if(evt.data instanceof Blob){
let result = '';
let reader = new FileReader();
//FileReader:從Blob對象中讀取數(shù)據(jù)
reader.onload = function() {
result = JSON.parse(pako.inflate(reader.result,{to:'string'}));
//pako.inflate()對數(shù)據(jù)進(jìn)行解壓,得到正常的json對象
if(result.ping){
ws.send(JSON.stringify({pong:result.ping}));
//響應(yīng)服務(wù)器,避免斷開連接
}
}
reader.readAsBinaryString(evt.data);
//將返回的數(shù)據(jù)解析為字符串格式
}
};
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
.common{
position: relative;
overflow: hidden;
}
.img{
width: 400px;
}
.img::after{
content: '我是文字';
position: absolute;
bottom: 10px;
right: 10px;
width: 60px;
height: 22px;
line-height: 22px;
background: #fff;
color: #000;
font-size: 15px;
display: block;
z-index: 45555
}
</style>
</head>
<body>
<div class="img common">
<img src="https://gd1.alicdn.com/imgext...; width="400px" height="300px"/>
</div>
</body>
</html>
你要控制的外層div 跟著你圖片寬度走,這個只是個可以實現(xiàn)思路,具體看你自己的需求
short不會比int大
請貼出你的ifxxx.cfg文件內(nèi)容
/^([A-Z][a-z0-9]*,)*[A-Z][a-z0-9]*$/
使用舉例
var reg = /^([A-Z][a-z0-9]*,)*[A-Z][a-z0-9]*$/;
if(reg.test(你輸入的str)) {
console.log('符合要求');
} else {
console.log('不符合要求');
}
url: '../authorization/authorization'這里錯了
用樓上思想實現(xiàn)的:
const html = `
<p>文字1
<span style="color: #E36C09;">文字2</span>
<span style="font-size: 20px;">文字3
<span style="font-size: 30px; color: #974806;">文字4</span>
</span>
</p>`;
let div = document.createElement('div');
div.innerHTML = html;
function getData(node, data) {
if (!Array.isArray(data)) {
throw TypeError('data is not Array');
}
if (node.hasChildNodes()) {
node.childNodes.forEach(element => {
if (element.nodeType === 1) { // 元素結(jié)點(diǎn)
getData(element, data); // 遞歸
}
if (element.nodeType === 3) { // 文本結(jié)點(diǎn)
const text = element.nodeValue;
if (!text.match(/^\s*$/g)) { // 非空白字符
const style = element.parentNode.style; // 父節(jié)點(diǎn)樣式
data.push({
text: text.trim(),
color: style.color,
font_size: style.fontSize,
});
}
}
});
}
}
let data = [];
getData(div, data);
console.log(data);
command + N
Java泛型了解一下
Windows下沒必要用nginx反代Apache
因為Windows下的nginx效率較低,不建議用于生產(chǎn)環(huán)境
直接用Apache跑php和靜態(tài)就行
是否全角半角區(qū)別
話說是怎么好的,就是安裝cnpm的時候(別問我為啥是cnpm,我一頓操作試出來的-_-),淘寶官方給出的命令如下:
npm install -g cnpm --registry=https://registry.npm.taobao.org
看見那個網(wǎng)址了么?https開頭的那個,我需要把https替換成http(而我之前一直都用的https的地址),也就是執(zhí)行如下命令:
npm install -g cnpm --registry=http://registry.npm.taobao.org
并且設(shè)置一下npm的registry也為上述地址
npm config set registry http://registry.npm.taobao.org
然后就好了。。。
后就好了。。。
就好了。。。
好了。。。
了。。。
。
好的不要不要的。。。
aa需要動態(tài)添加
<router-link :to="/index/demo" >{{item.name}}</router-link>
此時的demo就相當(dāng)于aa
<router-link :to="/index/:aa" >{{item.name}}</router-link>
{
path: '/index/:aa',
name: 'index',
component: index,
children:[
{path:'bb',name:'detail',component:detail},
]
},
這里的name,component是這樣取的 this.$route.query.name ,this.$route.query.component
所以 ‘vue 子路由的參數(shù)覆蓋父路由攜帶的參數(shù) ’
這個問題本身就是不存在的
默認(rèn)情況下, jupyter 啟動后會自動打開瀏覽器。你也可以從啟動日志里找到帶 token 的網(wǎng)址。
好像很多初學(xué)者都會遇到這種錯誤,主 python 文件名與某個模塊的名稱相同了。
本例中,主文件是 aiohttp.py,它與 aiohttp 模塊沖突了。你的代碼所導(dǎo)入的 aiohttp 實際上是主文件 aiohttp.py。
redirect寫成 '/HelloWorld' 試下
北大青鳥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)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
曾工作于聯(lián)想擔(dān)任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔(dān)任項目經(jīng)理從事移動互聯(lián)網(wǎng)管理及研發(fā)工作,曾創(chuàng)辦藍(lán)懿科技有限責(zé)任公司從事總經(jīng)理職務(wù)負(fù)責(zé)iOS教學(xué)及管理工作。
浪潮集團(tuán)項目經(jīng)理。精通Java與.NET 技術(shù), 熟練的跨平臺面向?qū)ο箝_發(fā)經(jīng)驗,技術(shù)功底深厚。 授課風(fēng)格 授課風(fēng)格清新自然、條理清晰、主次分明、重點(diǎn)難點(diǎn)突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網(wǎng)頁制作和網(wǎng)頁游戲開發(fā)。
具有10 年的Java 企業(yè)應(yīng)用開發(fā)經(jīng)驗。曾經(jīng)歷任德國Software AG 技術(shù)顧問,美國Dachieve 系統(tǒng)架構(gòu)師,美國AngelEngineers Inc. 系統(tǒng)架構(gòu)師。