這問題是發生在用OpenCV的時候
裡面有段code使用fopen
但vs覺得他不安全就不給編譯= =
解決方法就是改Preprocessor Definitions
Project -> Properties(Alt+F7) -> Configuration Properties -> C/C++ -> Preprocessor ->
Preprocessor Definitions.
新增
USE_STANDARD_FILE_FUNCTIONS
_CRT_SECURE_NO_WARNINGS
就可以了
reference
http://darmawan-salihun.blogspot.tw/2011/07/crtsecurenowarnings-error-message-in.html
Visual c++ ~ OpenCV
架設OpenCV環境至Visaul Studio C++專案
參考~
http://jepsonsblog.blogspot.tw/2012/07/installation-guide-opencv-24-with.html
參考~
http://jepsonsblog.blogspot.tw/2012/07/installation-guide-opencv-24-with.html
download Autoblog wallpaper javascript
會寫這支javascript是因為平常看autoblog的gallery
例如網址
http://www.autoblog.com/photos/2012-pagani-huayra-first-drive/#photo-5378629/
我都會邊看圖邊按下載桌布
DOWNLOAD WALLPAPER
這顆按鈕
可是這樣慢慢點慢慢看很費時間
後來我autoblog待看,下載的車就越積越多
0rz...............
我就想說乾脆叫程式下載就好
省時省力
而且抓下來的圖直接點了就可以看, 還是桌布size的圖片
就研究了一下他的gallery這支網頁的原始碼跟javascript
發現可以透過javascript一直跑回圈下載圖片
就自己寫了一隻js
之後進入網頁後開console貼上這段js給他run, 就可以開始下載了
超省時省力XD
var i = 0;
var totalItems = $('.thumbnails li').length;
var sleepSecond = 3500;
function xxx() {
if (i < totalItems) {
$('.thumbnails li:eq(' + i + ')').mousedown();
$('#gallery_wallpaper a').click();
i++;
setTimeout("xxx()", sleepSecond);
} else {
alert('over.')
}
}
xxx();
大致上就是每抓一次圖等待3.5秒在抓一次
抓取所有項目圖片項目的長度, 在一個一個觸發點下去項目的事件切換圖片後
在去處發點下載桌布的按鈕的程式
例如網址
http://www.autoblog.com/photos/2012-pagani-huayra-first-drive/#photo-5378629/
我都會邊看圖邊按下載桌布
DOWNLOAD WALLPAPER
這顆按鈕
可是這樣慢慢點慢慢看很費時間
後來我autoblog待看,下載的車就越積越多
0rz...............
我就想說乾脆叫程式下載就好
省時省力
而且抓下來的圖直接點了就可以看, 還是桌布size的圖片
就研究了一下他的gallery這支網頁的原始碼跟javascript
發現可以透過javascript一直跑回圈下載圖片
就自己寫了一隻js
之後進入網頁後開console貼上這段js給他run, 就可以開始下載了
超省時省力XD
var i = 0;
var totalItems = $('.thumbnails li').length;
var sleepSecond = 3500;
function xxx() {
if (i < totalItems) {
$('.thumbnails li:eq(' + i + ')').mousedown();
$('#gallery_wallpaper a').click();
i++;
setTimeout("xxx()", sleepSecond);
} else {
alert('over.')
}
}
xxx();
大致上就是每抓一次圖等待3.5秒在抓一次
抓取所有項目圖片項目的長度, 在一個一個觸發點下去項目的事件切換圖片後
在去處發點下載桌布的按鈕的程式
C++ ~ get char ASCII code
char c= 'a';
int z = c;
cout<<z<<"\n";
reference
http://www.velocityreviews.com/forums/t290064-c-getting-the-ascii-value-of-a-char.html
int z = c;
cout<<z<<"\n";
reference
http://www.velocityreviews.com/forums/t290064-c-getting-the-ascii-value-of-a-char.html
C++ ~ cin to array and output use vector, for_each
#include <iostream>
#include <vector>
#include <algorithm>
int inputNumber = 1 ;
vector<int> inputArray;
while(inputNumber != 0)
{
cin>>inputNumber;
inputArray.push_back(inputNumber);
}
for_each (inputArray.begin(), inputArray.end(), myfunction);
reference
http://www.cplusplus.com/reference/algorithm/for_each/
http://stackoverflow.com/questions/3807163/stdcin-in-an-array
#include <vector>
#include <algorithm>
int inputNumber = 1 ;
vector<int> inputArray;
while(inputNumber != 0)
{
cin>>inputNumber;
inputArray.push_back(inputNumber);
}
for_each (inputArray.begin(), inputArray.end(), myfunction);
reference
http://www.cplusplus.com/reference/algorithm/for_each/
http://stackoverflow.com/questions/3807163/stdcin-in-an-array
C++ ~ stringstream sample
void saveToTxt(stringstream& ss){
FILE *p = NULL;
char *file = "I:\\Hello.txt";
const std::string tmp = ss.str();
const char* cstr = tmp.c_str();
size_t len = 0;
p = fopen(file, "w");
if (p== NULL) {
cout <<"Error in opening a file.."< }
len = strlen(cstr);
fwrite(cstr, len, 1, p);
fclose(p);
cout<<"\nWritten Successfuly in the file.\n";
}
stringstream ss;
ss << "caaaaaaaaaaaaaa\n";
saveToTxt(ss);
FILE *p = NULL;
char *file = "I:\\Hello.txt";
const std::string tmp = ss.str();
const char* cstr = tmp.c_str();
size_t len = 0;
p = fopen(file, "w");
if (p== NULL) {
cout <<"Error in opening a file.."<
len = strlen(cstr);
fwrite(cstr, len, 1, p);
fclose(p);
cout<<"\nWritten Successfuly in the file.\n";
}
stringstream ss;
ss << "caaaaaaaaaaaaaa\n";
saveToTxt(ss);
C++ ~ stringstream write to file
stringstream ss;
ss << "ggggggggggg\n";
const std::string tmp = ss.str();
const char* cstr = tmp.c_str();
FILE *p = NULL;
char *file = "I:\\Hello.txt";
size_t len = 0;
p = fopen(file, "w");
if (p== NULL) {
cout <<"Error in opening a file..";
}
len = strlen(cstr);
fwrite(cstr, len, 1, p);
fclose(p);
cout<<"\nWritten Successfuly in the file.\n";
ss << "ggggggggggg\n";
const std::string tmp = ss.str();
const char* cstr = tmp.c_str();
FILE *p = NULL;
char *file = "I:\\Hello.txt";
size_t len = 0;
p = fopen(file, "w");
if (p== NULL) {
cout <<"Error in opening a file..";
}
len = strlen(cstr);
fwrite(cstr, len, 1, p);
fclose(p);
cout<<"\nWritten Successfuly in the file.\n";
C++ ~ stringstream
#include <sstream>
stringstream ss;
string name="Tom";
ss<<"Hello "<<name<<endl;
cout<<ss.str();
reference
http://hatsukiakio.blogspot.tw/2009/04/c-stringstream.html
stringstream ss;
string name="Tom";
ss<<"Hello "<<name<<endl;
cout<<ss.str();
reference
http://hatsukiakio.blogspot.tw/2009/04/c-stringstream.html
Seventeen 3

第37台車
通常我做一台車都會在一個禮拜內
一天摸個幾小時
可是這台車..........
過程竟然超過三個月
燈愣..........
37會想做Seventeen第3代, 可能也跟37這數字有關
當初命名Seventeen是因為那台是我第17台車
XD
這台車定位是FR
有了定位就開始想造型紙上畫畫, 想不到第一張圖就變成這台車的梗
那時候一看就覺得~~~~靠~~~超殺的~~~~車頭就長這樣吧
XDDXXD

車體的變化就比較多了= =
過程手繪的
用3dsmax做變成這樣

屁屁
3dsmax

車尾車窗中間那一條是整個被拿掉了 .....
我在modeling過程也會一邊想像這樣弄好不好看~~~後來是覺得搞剛又不好看就簡簡單單就好XD

至於製作過程會拉這麼長
可能真的太忙了.......導致沒fu去把車體完成
當初輪胎是在圖書館做好的說
6月多的事情
就一直拖到10月要底了才開始弄= =
車體花了4天約20多小時去做
還有這台車有兩種版本
第一種就是剛出爐做好的版本~~~結果被ptt的Car版很多鄉民說車頭太長了吧
靠XD
當初做也是有覺得車頭超長的~~~~~可是就覺得拉這麼長超爽的~~~超屌
可是事實上.......真的太長太長了= =
所以有第二種版本, 後來修改好長度又再算一批圖出來
確實是好了一點.........不然一開始真的超長= =
以下就放一推圖~~~個人蠻喜歡屁屁的角度說XD















Animation
以前的版本
Seventeen 2
http://bittyferrari.blogspot.tw/2009/09/seventeen-2-2.html
Seventeen
http://bittyferrari.blogspot.tw/2008/08/bitty-seventeen-photo-plenty.html
Unity ~ make model animation loop
function Start() {
animation.wrapMode = WrapMode.Loop;
animation.Play();
}
http://answers.unity3d.com/questions/26362/simple-question-about-animation.html
animation.wrapMode = WrapMode.Loop;
animation.Play();
}
http://answers.unity3d.com/questions/26362/simple-question-about-animation.html
訂閱:
文章 (Atom)






