Javascript XMLHTTPRequest file/image upload
Using javascript and XMLHTTPRequest to upload file/image.
Using javascript and XMLHTTPRequest to upload file/image.
Some tips & examples for flowplayer programming (javascript api)
http://stackoverflow.com/questions/478898/how-to-execute-a-command-and-get-output-of-command-within-c 用 popen (open pipe)執行 command, 並用 fgets 收結果。如果是在 windows 上,則是改用 _popen, _pclose #include <string> #include <iostream> #include <stdio.h> std::string exec(char* cmd) { FILE* pipe = popen(cmd, "r"); if (!pipe) return "ERROR"; char buffer[128]; std::string result = ""; while(!feof(pipe)) { if(fgets(buffer, 128, pipe) != NULL) result += buffer; } pclose(pipe); return result; }
In 3ds Max, users can import and export via UI. In batching process, we utilize scripting to largely reduce users’ interactions with calling “importFile” and “exportFile”. These two function calls provides “#noPrompt” option for “silently” processing. However, this “#noPrompt” mode is a bit different to “prompt” mode, “functionally”. We more focus on export in this […]
如果是一般的 range value 選取, 還可以用 scrollbar 之類的東西蒙混過去。但二維值就不行了,maxscript 的 default ui controllers 沒這樣的東西, 而 .net default windows form controllers 也沒這樣的東西, 所以只好自己動手做…
有些時候需要用到這樣的功能,把來自其他animation application的morpher set轉成另一組 controllers / morphers。這時候就需要弄個 mapping,然後就少不了參數設定… so..
記錄一下 Assembly = dotNetClass “System.Reflection.Assembly” Assembly.loadfrom (“D:/user/library/path/file.dll”) test = dotNetObject “dll_namespace.class_name”
做個紀錄 socket = dotNetObject “System.Net.Sockets.Socket” (dotnetclass “System.Net.Sockets.AddressFamily”).InterNetwork (dotnetclass “System.Net.Sockets.SocketType”).Stream (dotnetclass “System.Net.Sockets.ProtocolType”).Tcp socket.connect ip_address port buf = DotNetObject “System.Byte[]” 1000 fn doFaceShiftSocket = ( try ( while socket.Connected == true do ( socket.Receive buf ) ) catch ( — do nothing ) ) thread = dotNetObject “system.componentModel.backgroundWorker” dotnet.addEventHandler thread “DoWork” doFaceShiftSocket thread.WorkerSupportsCancellation = true thread.runWorkerAsync() for […]
喵的,以前學的時候都不知道 union 可以在什麼地方用到,原來這樣的用途才是王道… union { float f; uchar b[4]; } u; u.b[3] = b0; u.b[2] = b1; u.b[1] = b2; u.b[0] = b3; return u.f; Ref: http://stackoverflow.com/questions/3991478/building-a-32bit-float-out-of-its-4-composite-bytes-c