测试: 测试 Redis连接
```
// mat01generate19datasys190101.cpp : 定义应用程序的入口点。
#include "stdafx.h"
#include "mat01generate19datasys190101.h"
#include <iostream>
#include <iomanip>
#include "redisUtils.h"
#define MAX_LOADSTRING 100
// 全局变量:
//搜索:14159265358979323846264338327950288419716939937510得到:
long double Pild = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196;
long double Pild64bit = 3.141592653589793115997963468544185161590576171875; //
long double Pildwin32 = 3.141592653589793;//115997963468544185161590576171875; ///win32位
//上面两个精度都是 1.234567890234567//仅仅有17位精度,小数点后16位,需要注意!
//MGDs系统测试变量
double mGDsTest1d = 12.3;
int redisAllowGDSMp = 1;
HINSTANCE hInst; // 当前实例
WCHAR szTitle[MAX_LOADSTRING]; // 标题栏文本
WCHAR szWindowClass[MAX_LOADSTRING]; // 主窗口类名
// 此代码模块中包含的函数的前向声明:
ATOM MyRegisterClass(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM);
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
_In_ LPWSTR lpCmdLine,
_In_ int nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
// TODO: 在此处放置代码。
//调用Console控制台
AllocConsole();
#pragma warning(disable:4996)
_tfreopen(TEXT("CONOUT$"), TEXT("w"), stdout);
_tfreopen(TEXT("CONOUT$"), TEXT("w"), stderr);
_tfreopen(TEXT("CONIN$"), TEXT("r"), stdin);
#pragma warning(default:4996)
_tsetlocale(LC_ALL, TEXT("chs"));//头:<iomanip> LC_ALL=chs支持中文
//
// std::cout << std::setprecision(99) << Pild << std::endl;
std::cout << std::setprecision(999) << Pild << std::endl;
//
//------------------------------------------------------------------
//代码块一,编号:code110(请只写 一次性执行的代码
//code110
{//code110
//测试 redis
double test1redis01double = 12.4;
Redis *redi001 = new Redis();
if (!redi001->connect("localhost", 6379)) {
printf("redis connect error!\n");
return 0;
}
redi001->set("tes1str", "hello12");
// redi001->set("tes1", test1redis01double);
}//code110
//------------------------------------------------------------------
// 初始化全局字符串
LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
LoadStringW(hInstance, IDC_MAT01GENERATE19DATASYS190101, szWindowClass, MAX_LOADSTRING);
MyRegisterClass(hInstance);
// 执行应用程序初始化:
if (!InitInstance (hInstance, nCmdShow))
{
return FALSE;
}
HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_MAT01GENERATE19DATASYS190101));
MSG msg;
// 主消息循环:
while (GetMessage(&msg, nullptr, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return (int) msg.wParam;
}//wWinMain
```
- 啥叫DynamicalBilliards动态粒子(动力台球)
- 五大系统-为啥搞那么复杂?
- 内存数据库triangleBilliard19Redis参数190101
- HiRedis在C++Windows下配置编译使用190101
- 三大视图:inputOrigin_计算系统(无理数非视图)_3输出视图190110
- MGDs-Mp系统:数学生成数据(或数据生成)系统-参数修改模块190102
- MGDs的安装攻略190110
- redis+MGDs-Mp系统完整代码之-代码块1-测试Redis连接190110
- c++中longdouble_longlong等能计算的最大、最小值190101
- 充分解耦的MGDs-充分松耦合的数学生成数据系统190111
- MGDs-数据生成系统的(部分)核心代码190114
- mfc190115