原创 GAMES101 Transformation Cont.

3D Transformation 旋轉矩陣是正交矩陣 (A的逆=A的轉置,則A是正交矩陣) Viewing Transformation Model Transformation View Transformation 位置、朝向(Loo

原创 Games101 Tansformer

線性變換 線性變換是指對數乘和加法封閉 對圖像的操作包括縮放(Scale)、旋轉(rotation)、錯切(shear)、翻轉(flip) 仿射變換 線性變換+平移 二維情況 (x,y,w) 我們的目標:使用一個矩陣A,使得變換後的

原创 c++ strcmp函數

對兩個字符串進行比較 如果返回值小於 0,則表示 str1 小於 str2。 如果返回值大於 0,則表示 str1 大於 str2。 如果返回值等於 0,則表示 str1 等於 str2。

原创 nvcc fatal : '--ptxas-options=-v': expected a number

對於CUDA 10.1,此配置行不再正確: nvcc_compile_args = ['-O', '--ptxas-options=-v', '-arch=sm_35', '-c', '--compiler-options=-fPIC']

原创 C++ 遍歷set的三種方式

三種方式 set<int> s = mm[ques]; for (auto it = s.cbegin(); it != s.cend(); it++) { printf(

原创 C++ sort()函數

sort(first_pointer,first_pointer+n,cmp) 該函數可以給數組,或者鏈表list、向量排序。 此函數有3個參數: 參數1:第一個參數是數組的首地址,一般寫上數組名就可以,因爲數組名是一個指針常量。 參數2:

原创 PAT A1039 Vector的使用

#include<iostream> #include<map> #include<vector> #include<algorithm> using namespace std; int main() { map<string, vec

原创 C++%f和%lf的區別

%f代表單精度浮點型數據(float),%lf代表雙精度浮點型數據(double)。

原创 C++ int與string互轉換

int轉string to_string函數 string轉int 標準庫中atoi函數 對於其他類型也都有相應的標準庫函數,比如浮點型atof(),long型atol()等等 參考 https://www.cnblogs.com/smil

原创 C++小知識(1)

iostream 輸入輸出是由iostream庫提供的 iostream庫定義了以下三個標準流對象: cin,表示標準輸入(standard input)的istream類對象。cin使我們可以從設備讀入數據。 cout,表示標準輸出(st

原创 C++ 字符串逆序

代碼 #include<iostream> #include <string> using namespace std; int main() { string str("cvicses"); string s(str.rbegin

原创 C++ printf輸出

如果在程序中要使用 printf 或者 scanf,那麼就必須要包含頭文件 stdio.h。因爲這兩個函數就是包含在該頭文件中的。 常用的輸出控制符 控制符 說明 %d 按十進制整型數據的實際長度輸出。 %ld 輸出長整型

原创 webService發佈在IIS服務器上

創建WebService 編寫webService代碼 using System; using System.Collections.Generic; using System.Linq; using System.Web; using

原创 獨立構件風格之C2風格

新增C2組件:移位運算 主要代碼 public class Yiwei extends C2Component{ public Yiwei(String host, int port, String user, String pwd

原创 Mysql遠程授權報語法錯誤

MySQL8.0及之後的版本已經將創建賬戶和賦予權限的方式分開了,設置遠程連接權限要用下面的語句纔可以: 創建賬戶 create user root@'%' identified by '密碼'; 賦予權限 grant all privi