This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void main() | |
| { | |
| // Convert to grayscale using NTSC conversion weights | |
| float gray = dot(gl_Color.rgb, vec3(0.299, 0.587, 0.114)); | |
| gl_FragColor = vec4(gray, gray, gray, gl_Color.a); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| uniform float shininess; | |
| varying vec3 normal, color, pos; | |
| void main() | |
| { | |
| vec3 l = normalize(gl_LightSource[0].position.xyz - pos); | |
| vec3 n = normalize(nromal); | |
| float nl = max(0.0, (dot(n,l))); | |
| // flatten |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //RVA To Offset | |
| DWORD CPEReaderDlg::RVAToOffset(DWORD pMapping,DWORD dwRVA) | |
| { | |
| //Defines | |
| DWORD pNTDst = 0; | |
| IMAGE_DOS_HEADER* pidh = (IMAGE_DOS_HEADER*)pMapping; | |
| pNTDst = pMapping + pidh->e_lfanew; | |
| DWORD pSeDst = pNTDst; | |
| IMAGE_NT_HEADERS* pinh = (IMAGE_NT_HEADERS*)pNTDst; | |
| IMAGE_SECTION_HEADER* pish = NULL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Coefficients for Matrix M */ | |
| #define M11 0.0 | |
| #define M12 1.0 | |
| #define M13 0.0 | |
| #define M14 0.0 | |
| #define M21 -0.5 | |
| #define M22 0.0 | |
| #define M23 0.5 | |
| #define M24 0.0 | |
| #define M31 1.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <p id="demo">点击这个按钮,获得您的位置:</p> | |
| <button onclick="getLocation()">试一下</button> | |
| <div id="mapholder"></div> | |
| <script src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
| <script> | |
| var x=document.getElementById("demo"); | |
| function getLocation() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;研究了一下 Intel CPU的CPUID指令 | |
| ;搞了一个晚上~弄出来这个东西~! | |
| ;呵呵``没什么技术~别见笑 | |
| ;附件是完整原文件,和偶收集的一点资料 | |
| ;编译环境:winxp sp3 RadASM | |
| .586p | |
| .model flat ,stdcall | |
| NULL equ 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <windows.h> | |
| #include <Tlhelp32.h.> | |
| using namespace std; | |
| int main() | |
| { | |
| HANDLE h= CreateToolhelp32Snapshot(8, 780); | |
| MODULEENTRY32 me; | |
| int ret = Module32First(h, &me); |
NewerOlder