HWPF http://poi.apache.org/documen...
可以用這個(gè)修改word文檔, svn 里一些例子 http://svn.apache.org/repos/a...
下載很簡單吧, 生成后放到特定的目錄下,給用戶生成一個(gè)鏈接,用戶自己下載就好了
chrome可以獲取到事件的引用, 因此removeEventListener是正確的。
element-ui分頁:
http://element-cn.eleme.io/2....
因?yàn)樵诿臻gstd中已經(jīng)有了一個(gè)max函數(shù),編譯器無法判斷你在調(diào)用哪個(gè)max函數(shù)。做出如下修改即可。
// test.cpp
#include <iostream>
//using namespace std;
template <class T>
T max(T m1, T m2)
{return (m1 > m2)? m1:m2;}
int main() {
std::cout << max(2, 5) << "\t" << max(2.0, 5.) << "\t"
<< max('w', 'a') << "\t" << max("ABC", "ABD") << std::endl;
return 0;
}
沒太懂你的意思。不過你說的這個(gè)網(wǎng)站采用的了bootsrap框架和jquery庫。
router.js
// router用history
const appRouter = {
mode: "history",
routes: [
{
path: "/list",
name: "list",
component: List,
meta: {
keepAlive: true //不刷新
}
}
]
}
App.vue入口文件添加keep-alive
<template>
<div id="app">
<keep-alive>
<router-view v-if="$route.meta.keepAlive"></router-view>
</keep-alive>
<router-view v-if="!$route.meta.keepAlive"></router-view>
</div>
</template>
router.js主要代碼(也可以放到main.js)
import { getScrollTop, setScrollTop } from "@/utils/mixin";
let routerList = [];
router.beforeEach((to, from, next) => {
//返回上一級(jí)瀏覽位置
let position = getScrollTop();
let currentRouterIndex = routerList.findIndex(e => {
return e.path === from.fullPath;
});
if (currentRouterIndex != -1) {
routerList[currentRouterIndex].position = position;
} else {
routerList.push({
path: from.fullPath,
position: position
});
}
});
router.afterEach((to, from, next) => {
let savedPosition = routerList.find(e => {
return e.path === to.fullPath;
});
if (typeof savedPosition !== "undefined") {
Vue.nextTick(() => {
setScrollTop(savedPosition.position);
});
} else {
Vue.nextTick(() => {
setScrollTop(0);
});
}
});
utils/mixin.js
/*獲取到頂部的距離*/
export function getScrollTop() {
return (
window.pageYOffset ||
document.documentElement.scrollTop ||
document.body.scrollTop
);
}
/*設(shè)置距離*/
export function setScrollTop(value) {
window.scrollTo(0, value);
}沒有什么比官方文檔更有說服力的了: http://zsh.sourceforge.net/Do...
要相信抓包工具呀,從抓包軟件里復(fù)制JSON,然后用Chrome的JSON工具檢查下數(shù)據(jù)格式吧。
應(yīng)該是this.$emit(eventName,arg);是不是不能像你那樣寫,可以this.$emit("select-house", [houseData, houseId]);
接受selectHouse(data) {
this.agreeForm.houseName = data[0];
this.selectHouseId=data[1]
console.log(this.agreeForm.houseName)
}在app.json中,添加:
{
window:{
"backgroundColor": "#ffffff",
}
}中文字體超出了ascii的編碼范圍,解析不出來,換成utf-8試試
Python3.6 :https://docs.python.org/3.6/w...
(1) 要使用正確的對(duì)象類型
這里不能用Mesh,因?yàn)檫@里geometry的點(diǎn)數(shù)不滿足Mesh的規(guī)范,圖形是渲染不出來的,Mesh是由小三角面構(gòu)成,頂點(diǎn)數(shù)必須是3的倍數(shù)。所以,這里應(yīng)該用THREE.Line
將:
allLineMesh=new THREE.Mesh(allLine,new THREE.MeshBasicMaterial({color:0x000000,side:THREE.DoubleSide}))
改成:
allLineMesh=new THREE.Line(allLine,new THREE.MeshBasicMaterial({color:0x000000,side:THREE.DoubleSide}))
你會(huì)發(fā)現(xiàn)有圖像出來了,但只有一條直線,下面講這個(gè)問題。
(2)對(duì)對(duì)象使用變換之后,要手動(dòng)更新對(duì)象變換矩陣
在three.js中,考慮到性能,框架在做變換的時(shí)候不會(huì)自動(dòng)更新變換矩陣(其實(shí)還有很多東西都不會(huì)自動(dòng)更新,可以參考文檔里面定義的xxxNeedsUpdate,computeXXX,updateXXX之類的屬性),所以,如果你對(duì)對(duì)象做了變換之后要用到對(duì)象的矩陣,那么你首先需要更新對(duì)象的變換矩陣,可以使用Object3D.updateMatrix()方法。
所以,像下面這種寫法是不能看到geometry有任何改變的:
var line = new THREE.Line( geometry, new THREE.LineBasicMaterial( { color: 0x000000, opacity: 0.2 } ) );
line.position.z = ( i * 50 ) - 500; // 這里做了變換,但是沒更新變換矩陣
allLine.merge(line.geometry,line.matrix)//使用原始的變換矩陣,于是對(duì)象的變換并沒有應(yīng)用到geometry上
可以改成:
var line = new THREE.Line( geometry, new THREE.LineBasicMaterial( { color: 0x000000, opacity: 0.2 } ) );
line.position.z = ( i * 50 ) - 500;
line.updateMatrix(); // 加了這句
allLine.merge(line.geometry,line.matrix)
現(xiàn)在可以看到圖像了,但是你會(huì)發(fā)現(xiàn)圖像很奇怪:
這是什么鬼?為什么有那么多交叉線?
其實(shí)這和Line類型的繪制策略有關(guān),Line是把vertices的點(diǎn)一個(gè)一個(gè)連起來的,比如vertices里有四個(gè)點(diǎn)[A,B,C,D],那么Line在畫的時(shí)候,就是A-->B-->C--D,而你想的可能是A-->B,C-->D,簡單驗(yàn)證一下,使用下面的函數(shù):
function initObject(){
var material = new THREE.LineBasicMaterial({
color: 0x0000ff
});
var geometry = new THREE.Geometry();
geometry.vertices.push(
new THREE.Vector3( -500, 0, 0 ),
new THREE.Vector3( 500, 0, 0 ),
new THREE.Vector3( 0, 0, -500 ),
new THREE.Vector3( 0, 0, 500 )
);
var line = new THREE.Line( geometry, material );
scene.add( line );
}
運(yùn)行的結(jié)果如下圖:
確實(shí)是A-->B-->C--D這樣連的
(3)利用吸附算法使中間連線吸附到邊緣
對(duì)于Line的A-->B-->C--D這種畫法我們是沒辦法改變,但是,在這個(gè)例子中,我們可以人為的將B-->C邊吸附到邊緣。比如有個(gè)上面四個(gè)點(diǎn)的坐標(biāo)如下:
A:[1,0,0]
B:[-1,0,0]
C:[0,0,1]
D:[0,0,-1]
我們可以人為的插一個(gè)點(diǎn)E:
A:[1,0,0]
B:[-1,0,0]
E:[-1,0,1]
C:[0,0,1]
D:[0,0,-1]
使得B-->C由斜線變成了沿著邊緣走的斜線:
吸附算法如下:
// 吸附算法
function adsorb(geometry,compares){
var vertices = geometry.vertices;
var cdt1 = compares[0];
var cdt2 = compares[1];
for (var i = 0 ; i < vertices.length-1; i++) {
var vertice = vertices[i];
var nextVertice = vertices[i+1];
if(Math.round(vertice[cdt1]) !== Math.round(nextVertice[cdt1])
&& Math.round(vertice[cdt2]) !== Math.round(nextVertice[cdt2])){ // 差異超過兩個(gè)維度
var vector = new THREE.Vector3();
vector[cdt1] = vertice[cdt1];
vector[cdt2] = nextVertice[cdt2];
vertices.splice(i+1, 0,vector); // 插入一個(gè)點(diǎn)
i++;
}
}
geometry.vertices = vertices;
}
將吸附算法加入到創(chuàng)建過程中:
function initObject() {
var geometry = new THREE.Geometry();
var allLine=new THREE.Geometry();
geometry.vertices.push( new THREE.Vector3( - 500, 0, 0 ) );
geometry.vertices.push( new THREE.Vector3( 500, 0, 0 ) );
for ( var i = 0; i <= 20; i ++ ) {
var line = new THREE.Line( geometry, new THREE.LineBasicMaterial( { color: 0x000000, opacity: 0.2 } ) );
line.position.z = ( i * 50 ) - 500;
line.updateMatrix();
allLine.merge(line.geometry,line.matrix)
var line = new THREE.Line( geometry, new THREE.LineBasicMaterial( { color: 0x000000, opacity: 0.2 } ) );
line.position.x = ( i * 50 ) - 500;
line.rotation.y = 90 * Math.PI / 180;
line.updateMatrix();
allLine.merge(line.geometry,line.matrix)
}
adsorb(allLine,["x","z"]); // 添加這一行
allLine.verticesNeedUpdate = true;
allLineMesh=new THREE.Line(allLine,new THREE.MeshBasicMaterial({color:0x000000,side:THREE.DoubleSide}))
scene.add( allLineMesh );
}
這樣看起來就正確了
已經(jīng)解決了,寫法沒錯(cuò),應(yīng)用錯(cuò)DOM結(jié)構(gòu)了,由于樣式覆蓋,導(dǎo)致效果沒出來
這么能做成了橫向全屏嗎?
https://www.baidu.com/s?ie=UT...
<VirtualHost *:80>
ServerAdmin 23.*.*.*
DocumentRoot /data/www/abcd.com
ServerName abcd.com
ServerAlias www.abcd.com
</VirtualHost>現(xiàn)行的數(shù)據(jù)結(jié)構(gòu)是一個(gè)數(shù)組,可以對(duì)這個(gè)數(shù)組進(jìn)行循環(huán),相同的區(qū)的item存入一個(gè)數(shù)組,數(shù)據(jù)結(jié)構(gòu)由一個(gè)一層數(shù)組,變成一個(gè)兩層的數(shù)組,然后可以在頁面中顯示
北大青鳥APTECH成立于1999年。依托北京大學(xué)優(yōu)質(zhì)雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數(shù)據(jù)專業(yè)的國家
達(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
北大課工場(chǎng)是北京大學(xué)校辦產(chǎn)業(yè)為響應(yīng)國家深化產(chǎn)教融合/校企合作的政策,積極推進(jìn)“中國制造2025”,實(shí)現(xiàn)中華民族偉大復(fù)興的升級(jí)產(chǎn)業(yè)鏈。利用北京大學(xué)優(yōu)質(zhì)教育資源及背
博為峰,中國職業(yè)人才培訓(xùn)領(lǐng)域的先行者
曾工作于聯(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é)及管理工作。
浪潮集團(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)突出、引人入勝。
精通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)師。