上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页
摘要: 找了个1801-2099的数据#include <iostream> using namespace std; struct LunarDate { int year; int month; int day; bool isLeap; int yearCyl;//cyclic天干地支 int monCyl; int dayCyl; }; unsigned short g_LunarInfo[]={ 0x6b50, 0x2ba0, 0xab62, 0x9370, 0x52e6, 0xd160, 0xe4b0, 0x6d25, 0xda90, 0x5b50, // 1... 阅读全文
posted @ 2011-08-23 18:13 好好学习,天天进步 阅读(529) 评论(0) 推荐(0) 编辑
摘要: 网上找了一些阳历转农历的代码,但总是有些对不上。参照百度万年历和好记星的日历,实现了一下1900-2099年之间的阳历转农历。#include <iostream> using namespace std; struct LunarDate { int year; int month; int day; bool isLeap; int yearCyl;//cyclic天干地支 int monCyl; int dayCyl; }; int lunarInfo[]= { // 1899年:0x0AB50 0x04BD8, 0x04AE0, 0x0A570, 0x05... 阅读全文
posted @ 2011-08-23 15:47 好好学习,天天进步 阅读(798) 评论(0) 推荐(0) 编辑
摘要: 求教奥数题:张明骑自行车,速度为每小时14千米,王华骑摩托车,速度为每小时35千米,他们分别从A、B两地出发,并在两地之间不断往返行驶,且两人第四次相遇(两人同时到达同一地点叫做相遇)与第五次相遇的地点恰好相距120千米,那么,A、B两地只见的距离是多少千米?图解:相遇和追击其实都是函数的交点(这小学学过?) 程序员解:#include <iostream>#include <iomanip>using namespace std;//speedA>=speedBint speedA = 35;int speedB = 14;struct TEncounter{ 阅读全文
posted @ 2011-08-09 17:47 好好学习,天天进步 阅读(1036) 评论(0) 推荐(0) 编辑
摘要: curl = require("luacurl") --下载这个页面的.java文件 downloadurl = "http://www.cs.princeton.edu/~rs/talks/LLRB/Java/" function get_html(url, c) local result = { } if c == nil then c = curl.new() end c:setopt(curl.OPT_URL, url) c:setopt(curl.OPT_WRITEDATA, result) c:setopt(curl.... 阅读全文
posted @ 2011-08-08 16:08 好好学习,天天进步 阅读(807) 评论(0) 推荐(0) 编辑
摘要: typedef struct tagTOOLINFOA { UINT cbSize; UINT uFlags; HWND hwnd; UINT_PTR uId; RECT rect; HINSTANCE hinst; LPSTR lpszText;#if (_WIN32_IE >= 0x0300) LPARAM lParam;#endif#if (_WIN32_WINNT >= 0x0501) void *lpReserved;#endif} TTTOOLINFOA, NEAR *PTOOLINFOA, *LPTTTOOLINFOA;如果#define _WIN32_WINN... 阅读全文
posted @ 2011-08-02 17:27 好好学习,天天进步 阅读(619) 评论(0) 推荐(0) 编辑
摘要: #include <windows.h>#include <Wininet.h>#include <Sensapi.h>#include <iostream>using namespace std;#pragma comment( lib , "Sensapi.lib" )#pragma comment( lib , "Wininet.lib" )BOOL IsConnectedState(){ //#define INTERNET_CONNECTION_MODEM 1 //#define INTERNET 阅读全文
posted @ 2011-04-29 13:22 好好学习,天天进步 阅读(587) 评论(0) 推荐(0) 编辑
摘要: A final aspect of Clock that deserves scrutiny is its OnGetMinMaxInfo handler. As a window is being resized, it receives a series of WM_GETMINMAXINFO messages with lParam pointing to a MINMAXINFO structure containing information about the window's minimum and maximum "tracking" sizes. 阅读全文
posted @ 2011-04-02 18:07 好好学习,天天进步 阅读(553) 评论(0) 推荐(0) 编辑
摘要: The difference between a topmost window and a nontopmost window is an extended window style bit. WS_EX_TOPMOST makes a window a topmost window. You can create a topmost frame window by including a WS_EX_TOPMOST flag in the call to Create, like this:Create (NULL, _T ("MyWindow"), WS_OVERLAP 阅读全文
posted @ 2011-04-02 18:04 好好学习,天天进步 阅读(905) 评论(1) 推荐(0) 编辑
摘要: One problem with a window without a title bar is that it can't be repositioned with the mouse. Windows are dragged by their title bars, and when there's no title bar, the user has nothing to grab onto. Clock solves this little dilemma by playing a trick with the window's WM_NCHITTEST han 阅读全文
posted @ 2011-04-02 18:01 好好学习,天天进步 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 1、消息反射解释: 父窗口将控制子窗口发给它的通知消息,首先反射回子窗口进行处理(即给控制子窗口一个机会,让控制子窗口处理此消息),这样通知消息就有机会能被子窗口自身进行处理。2、MFC中引入消息反射的原因: 在Windows的消息处理中,控制子窗口的发给其父窗口的通知消息只能由其父窗口进行处理,这使得控制子窗口的自身能动性大大降低(你想,它连改变自己的背景色,处理一个自身滚动问题都要其父窗口来完成),为了解决这个问题,在MFC中引入了反射消息“Reflect Message”的概念,进行消息反射,可以使得控制子窗口能够自行处理与自身相关的一些消息,增强了封装性,从而提高了控制子窗口的可重.. 阅读全文
posted @ 2011-04-02 17:48 好好学习,天天进步 阅读(633) 评论(1) 推荐(1) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 15 下一页