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

鍍金池/ 問答/ 云計算問答
冷眸 回答

建議看下基礎概念介紹吧。object-key就是存儲文件的內部唯一key,URL就是訪問和分享用的,管理文件的話肯定不會用,就像你刪服務器文件也不會按URL刪除一樣,把OSS看成是一種文件系統(tǒng)就好。

妖妖 回答

獲取 2D 圖紙構件包圍框的方法跟 3D 模型的不太一樣,下面是樣例(從 Viewer3D.js 里頭截取來的):

function find2DBounds( fragList, fragId, dbId, bc ) {
    const mesh = fragList.getVizmesh( fragId );
    const vbr = new Autodesk.Viewing.Private.VertexBufferReader( mesh.geometry );
    vbr.enumGeomsForObject( dbId, bc );
}

function get2DBounds( dbId, model ) {
    const it = model.getData().instanceTree;
    const fragList = model.getFragmentList();

    let bounds = new THREE.Box3();
    let bc = new Autodesk.Viewing.Private.BoundsCallback( bounds );
    const dbId2fragId = model.getData().fragments.dbId2fragId;
    const fragIds = dbId2fragId[dbId];

    if( Array.isArray( fragIds ) ) {
        for( let i = 0; i < fragIds.length; i++ ) {
            find2DBounds( fragList, fragIds[i], dbId, bc );
        }
    } else if( typeof fragIds === 'number' ) {
        find2DBounds( fragList, fragIds, dbId, bc );
    }

    return bc.bounds;
}

// 包圍匡
cosnt bondingBox = get2DBounds( dbId, viewer.model );
陌璃 回答

這里就是你的父項目的相關信息,有時還有個relativePath指定父項目的pom.xml文件。
舉個例子,我創(chuàng)建了個項目cloud-demo,它的pom.xml配置為:

<project>
...
    <groupId>com.example</groupId>
    <artifactId>cloud-demo</artifactId>
    <version>1.0-SNAPSHOT</version>
...
    <!-- 子模塊 -->
    <modules>
        <module>server-module</module>
    </modules>
...
</project>

然后,在該項目下創(chuàng)建子模塊server-module,那么子模塊中應該是這樣寫:

<project>
...
    <artifactId>server-module</artifactId>
    <version>1.0-SNAPSHOT</version>
...
    <parent>
        <groupId>com.example</groupId>
        <artifactId>cloud-demo</artifactId>
        <version>1.0-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
...
</project>
巫婆 回答

自己解決一下,在找相關資料的時候看到的:
And finally if we deploy application with Capistrano we have to deploy it properly. We should put local_env.yml to the Capistrano shared folder on the server and change config/deploy.rb like this:

before 'deploy:assets:precompile', :symlink_config_files

desc "Link shared files"
task :symlink_config_files do
  symlinks = {
    "#{shared_path}/config/database.yml" => "#{release_path}/config/database.yml",
    "#{shared_path}/config/local_env.yml" => "#{release_path}/config/local_env.yml"
  }
  run symlinks.map{|from, to| "ln -nfs #{from} #{to}"}.join(" && ")
end

于是我在自己的rails application中找到config/deploy.rb,里面有一行是:

append :linked_files, "config/database.yml", "config/secrets.yml"

于是我試著把application.yml加到后面去,再次嘗試部署成功。

安淺陌 回答

服務器上的ss加密和ss客戶端的加密方式不一樣,修改后解決了
修改配置文件的加密方式,然后重啟ss就可以上谷歌了圖片描述

失魂人 回答

可以的,在 Forge Viewer 里頭有很多方法可以做到這點,這邊我會以 AutoCam.goToView() 來示范,以下樣例假設相機的新位置是 ( x1, y1, z1 ):

// 獲取當前相機信息
const currentView = viewer.autocam.getCurrentView();
cosnt eye = viewer.navigation.getEyeVector();
const eyeDir = viewVec.normalize();
const distance = eye.length();                         //!<<< 相機與焦點的距離

const newPosition = new THREE.Vector3( x1, y1, z1 );   //!<<< 相機的新位置
const target = eye.add( newPosition );                 //!<<< 計算新焦點位置

// 產生新相機信息
const newView = {
    position: newPosition.clone(),                     //!<<< 相機的新位置
    up: currentView.up.clone(),
    center: target.clone(),                            //!<<< 相機的新焦點
    pivot: target.clone(),                             //!<<< 相機的新環(huán)繞(Orbit)中心
    fov: currentView.fov,
    worldUp: currentView.worldUp.clone(),
    isOrtho: (currentView.isOrtho === false)
};

// 將信息更新到相機上
viewer.autocam.goToView( newView );

以上希望對你幫助~

蟲児飛 回答

top看下服務器負載高不高,是否有被攻擊,查看一下當前各連接狀態(tài)(SYN_RECV、FIN_WAIT、TIME_WAIT、ESTABLISHED)的數(shù)量。把iptables打開看看一段時間后會不會下降。

枕頭人 回答

unloadModel 后,要調用 viewer.tearDown(); 載入模型占用的資源才會釋放,如果要在載入新的模型在調用 viewer.loadModel(...); 前要先調用 viewer.setUp();。

貓小柒 回答
<!DOCTYPE html>
<html>
<body>


<audio id="myAudio" autoplay controls loop>
  <source src="/i/horse.ogg" type="audio/ogg">
  <source src="/i/horse.mp3" type="audio/mpeg">
  Your browser does not support the audio element.
</audio>


<p id="demo"></p>

<button onclick="myFunction()">切換</button>

<script>
function myFunction()
{
 var audio = document.getElementById("myAudio");
   if(audio.paused){
     audio.play(); 
  }else{
     audio.pause();
}
}
</script>

</body>
</html>

這個代碼粘貼到這里 http://www.w3school.com.cn/ti...

女流氓 回答

哦哦 知道了 樓上也是這個答案,謝謝 沒辦法采納你的答案了

莓森 回答

在controller上,把你所定義的header項轉化成類似的形式賦值給Session之類的。
相當于在外面套了一層封裝吧。

你講的太籠統(tǒng),猜測大概可以通過上述方法實現(xiàn)

舊時光 回答

url策略一般是默認必須鑒權,帶"/xxx/"的是公開接口跳過鑒權,未必非得是前綴,否則影響路由規(guī)則.和服務方開發(fā)約定好url規(guī)則

初念 回答

選中某樓層或者只需剖切某構件上下剖切面

viewer有方法:self.viewer.model.getVisibleBounds();
之后將獲取得到的值返回給setplanes,實現(xiàn)剖切

情殺 回答
  1. 獲取當前選擇的構件或者當前選擇的構建集
// 直接獲取
viewer.getSelection();

//或者監(jiān)聽選擇集變更事件
var onSelectionChanged = function( event ) {
    console.log( event.dbIdArray );
};

viewer.addEventListener(
    Autodesk.Viewing.SELECTION_CHANGED_EVENT,
    onSelectionChanged
);

2、獲取選擇構件的屬性

//直接獲取屬性
var onPropsFeteched = function( result ) {
    console.log( result.properties );
}

var onFetchingPropsFailed = function( error, message ) {
    console.error( error, message );
}

viewer.getProperties(
    dbId,
    onPropsFeteched,
    onFetchingPropsFailed
);

// 從給予的 dbId 里獲取所有擁有特定屬性的構件
// https://forge.autodesk.com/blog/getbulkproperties-method
viewer.model.getBulkProperties( dbIds, ['屬性名稱'],
   function( elements ) {
     for(var i=0; i<elements.length; i++){
        console.log( elements[i].properties[0] );
     }
   });

// 通過查找功能
// https://segmentfault.com/a/1190000010977818
viewer.search( 
    "屬性值",
    function( dbIds ) {
        console.log( dbIds );
    },
    ["屬性名稱"]
);

3、添加構件屬性
你的標題似乎跟內文不符,我先回答標題的問題,F(xiàn)orge 轉換的模型跟屬性是不可修改的,所以無法添加;或者通過自訂屬性窗顯示自己的屬性 https://segmentfault.com/a/11...

至于內文的添加圖標部份,可以參考這些樣例:

P.S. 建議可以到查找樣例 https://github.com/Autodesk-F...

局外人 回答

1.請求的時候是否帶上參數(shù)e
2.e的時間是否校準,和服務器時間比較是否有時區(qū)差別

可參看文檔https://developer.qiniu.com/k...

淡墨 回答

解決了

問題原因:阿里云默認關閉其他端口

需要在阿里云web管理界面 安全組創(chuàng)建規(guī)則,見圖

clipboard.png

clipboard.png

不將就 回答

可以通過下列方式拿到構件樹:

var it = viewer.model.getData().instanceTree;

//或
viewer.getObjectTree(function( instanceTree ) {
   console.log( instanceTree );
});

因數(shù)據(jù)優(yōu)化的緣故,所有數(shù)據(jù)都是平坦化過的,要重建數(shù)據(jù)結構可以通過:

function buildModelTree( model ) {

    //builds model tree recursively
   function _buildModelTreeRec( node ) {
         it.enumNodeChildren( node.dbId, function(childId) {
                 node.children = node.children || [];

                 var childNode = {
                   dbId: childId,
                   name: it.getNodeName( childId )
                 };

                 node.children.push( childNode );

                 _buildModelTreeRec( childNode );
           });

   }

   //get model instance tree and root component
   var it = model.getData().instanceTree;

   var rootId = it.getRootId();

   var rootNode = {
         dbId: rootId,
         name: it.getNodeName( rootId )
   };

   _buildModelTreeRec( rootNode );

   return rootNode;
 }

 var root = buildModelTree( viewer.model );