Skip to content

Instantly share code, notes, and snippets.

View sailfish009's full-sized avatar

sailfish009

  • freelancer
  • South Korea
View GitHub Profile
@sailfish009
sailfish009 / deferreddevice.h
Created February 27, 2018 02:53 — forked from zeux/deferreddevice.h
Implementing Direct3D for fun and profit
struct DeferredDirect3DDevice9: DummyDirect3DDevice9
{
private:
char* begin;
char* write;
char* read;
char* end;
enum command_t
{
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0939r0.pdf
Directions for ISO C++
DWG
P0939
r0
9
unions, low
-level use of variants, and eliminate the visitor pattern (which is an expensive
workaround that confuse
How to properly use CComPtr in function calls?
https://stackoverflow.com/questions/11294537/how-to-properly-use-ccomptr-in-function-calls
IMoniker::BindToStorage method
https://msdn.microsoft.com/en-us/library/windows/desktop/ms688738(v=vs.85).aspx
IBindStatusCallback interface
https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/ms775060(v=vs.85)
(D3DFORMAT)MAKEFOURCC('N', 'V', '1', '2') //842094158
// C#
public class WIN32
{
[DllImport("kernel32.dll")]
public static extern Boolean AllocConsole();
[DllImport("kernel32.dll")]
public static extern Boolean FreeConsole();
@sailfish009
sailfish009 / books.txt
Last active September 16, 2018 02:31
Backup/Keep my books list
Hackers: Heroes of the Computer Revolution
by Steven Levy
Hackers & Painters: Big Ideas from the Computer Age
by Paul Graham
Functional Thinking
by Neal Ford
http://www.xtremevbtalk.com/-net-general/322905-importing-class-dll.html
<UnmanagedFunctionPointerAttribute(CallingConvention.Cdecl)>
Public Delegate Sub function_callback(ByRef state As MY_STRUCT)
Dim function_callback = New function_callback(AddressOf my_function_callback)
Private Sub my_function_callback(ByRef state As MY_STRUCT)
"rtsp://id:[email protected]:554/ch01.264" // nadatel ipcam
"rtsp://id:[email protected]/" // hikvision ipcam #1
"rtsp://id:[email protected]:554/live // hikvision ipcam #2
"rtsp://id:[email protected]/Streaming/Channels/101 // dahua ipcam
// when rtsp url string is wrong
>> Could not find codec parameters for stream 0 (Video: h264, none): unspecified size
>> Consider increasing the value for the 'analyzeduration' and 'probesize' options
----------------------------------------------------------------------------------
https://doc.rust-lang.org/book/second-edition/
https://www.rust-lang.org/en-US/other-installers.html
https://crates.io/
https://docs.rs/
@sailfish009
sailfish009 / _vimrc
Last active April 18, 2018 01:13
C:\vim\vim80\_vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=$VIMRUNTIME/bundle/Vundle.vim " $VIMRUNTIME C:\vim\vim80
call vundle#begin('$VIMRUNTIME/bundle')
syntax on
colorscheme moonfly
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim