宏RC_INVOKED的含义? 15C

C++头文件iostream内的#define RC_INVOKED中的RC_INVOKED宏是什么含义?

我知道RC_INVOKED是一个标识符,代表宏的名称,它在iostrem istream ostream 等头文件内都有定义,不知是什么意思,作用是什么?

2个回答

RC_INVOKED 是资源编译器(RC)的宏定义。有此定义说明,是资源编译器在调用此文件。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
python face_recognition库中使用其他的功能都可以正常运行,但只有用face_encodings会报错?
已正确安装dlib和face_recognition库 __代码如下:__ ``` import face_recognition face_recognition.face_encodings("F:/multi-media/video frames/260.png") ``` 报错如下: ``` PS F:\multi-media> & C:/Users/ONE7/AppData/Local/Programs/Python/Python37/python.exe "f:/multi-media/vedio analysis.py" Traceback (most recent call last): File "f:/multi-media/vedio analysis.py", line 118, in <module> face_recognition.face_encodings("F:/multi-media/video frames/260.png", known_face_locations=None, num_jitters=1) File "C:\Users\ONE7\AppData\Local\Programs\Python\Python37\lib\site-packages\face_recognition\api.py", line 209, in face_encodings raw_landmarks = _raw_face_landmarks(face_image, known_face_locations, model="small") File "C:\Users\ONE7\AppData\Local\Programs\Python\Python37\lib\site-packages\face_recognition\api.py", line 153, in _raw_face_landmarks face_locations = _raw_face_locations(face_image) File "C:\Users\ONE7\AppData\Local\Programs\Python\Python37\lib\site-packages\face_recognition\api.py", line 102, in _raw_face_locations return face_detector(img, number_of_times_to_upsample) TypeError: __call__(): incompatible function arguments. The following argument types are supported: 1. (self: dlib.fhog_object_detector, image: array, upsample_num_times: int=0) -> dlib.rectangles Invoked with: <dlib.fhog_object_detector object at 0x0000026A438B91B0>, 'F:/multi-media/video frames/260.png', 1 ```
怎么编写 Win32 多语言用户界面应用程序
请问win32项目怎么实现程序的多语言? 我在文件里创建了两组控件,一个是中文,一个是英文。请问怎么编程实现切换?就像下图所示 ![这是中文程序](https://img-ask.csdn.net/upload/201703/31/1490969844_238730.jpg) ![这是英文程序](https://img-ask.csdn.net/upload/201703/31/1490969877_3741.jpg) 查阅msdn文档后没太看懂,有人帮一下嘛,困住好久了 ![图片说明](https://img-ask.csdn.net/upload/201703/31/1490969992_302261.jpg) 我自己写的.rc代码如下: // Microsoft Visual C++ generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #ifndef APSTUDIO_INVOKED #include "targetver.h" #endif #define APSTUDIO_HIDDEN_SYMBOLS #include "windows.h" #undef APSTUDIO_HIDDEN_SYMBOLS ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // 中文(简体,中国) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS) LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED ///////////////////////////////////////////////////////////////////////////// // // Icon // // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDI_LAB5 ICON "lab5.ico" IDI_SMALL ICON "small.ico" ///////////////////////////////////////////////////////////////////////////// // // Menu // IDC_LAB5 MENU BEGIN POPUP "文件(&F)" BEGIN MENUITEM "退出(&X)", IDM_EXIT END POPUP "对话框(&O)" BEGIN MENUITEM "模式对话框(&M)...\tCtrl+A", ID_32771 MENUITEM "无模式对话框(&L)...\tCtrl+B", ID_32772 MENUITEM "文件对话框(&F)...\tCtrl+C", ID_Menu END POPUP "光标类型(&C)" BEGIN MENUITEM "光标&1(箭头)\tCtrl+1", ID_32774 MENUITEM "光标&2(十字)\tCtrl+2", ID_32775 MENUITEM "光标&3(自定义)\tCtrl+3", ID_32776 END POPUP "语言(&L)" BEGIN MENUITEM "中文(&C)\tCtrl+Shift+C", ID_32777 MENUITEM "&English\tCtrl+Shift+D", ID_32778 END POPUP "关于(&A)" BEGIN MENUITEM "程序信息(&I)\tF1", IDM_ABOUT END END ///////////////////////////////////////////////////////////////////////////// // // Accelerator // IDC_LAB5 ACCELERATORS BEGIN "?", IDM_ABOUT, ASCII, ALT "/", IDM_ABOUT, ASCII, ALT END ///////////////////////////////////////////////////////////////////////////// // // Dialog // /* IDD_ABOUTBOX DIALOGEX 0, 0, 170, 62 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Lab5(SDK)" FONT 9, "MS Shell Dlg", 0, 0, 0x1 BEGIN ICON IDR_MAINFRAME, IDC_STATIC, 14, 14, 21, 20 LTEXT "第五次上机练习(SDK)\n对话框、光标、位图、字符串\n\n", IDC_STATIC, 42, 14, 114, 8, SS_NOPREFIX LTEXT LTEXT "学号:10152130206\n姓名:高吉祥\n", IDC_STATIC, 42, 26, 114, 8 DEFPUSHBUTTON "确定", IDOK, 113, 41, 50, 14, WS_GROUP END */ ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO // #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 163 TOPMARGIN, 7 BOTTOMMARGIN, 55 END END #endif // APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE BEGIN "resource.h\0" END 2 TEXTINCLUDE BEGIN "#ifndef APSTUDIO_INVOKED\r\n" "#include ""targetver.h""\r\n" "#endif\r\n" "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" "\0" END 3 TEXTINCLUDE BEGIN "\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Cursor // IDC_CURSOR1 CURSOR "cursor1.cur" ///////////////////////////////////////////////////////////////////////////// // // String Table // STRINGTABLE BEGIN IDS_APP_TITLE "lab5" IDS_STRING1 "当前光标是:IDC_ARROW" IDS_STRING2 "当前光标是:IDC_CROSS" IDS_STRING3 "当前光标是:我的光标" IDC_LAB5 "LAB5" END #endif // 中文(简体,中国) resources ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // Englisch (GB) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK #pragma code_page(1252) #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// // // Icon // // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDI_LAB5 ICON "lab5.ico" IDI_SMALL ICON "small.ico" ///////////////////////////////////////////////////////////////////////////// // // Menu // IDC_LAB5 MENU BEGIN POPUP "&File" BEGIN MENUITEM "E&xit", IDM_EXIT END POPUP "&Dialog" BEGIN MENUITEM "&Modal Dialog...\tCtrl+A", ID_32771 MENUITEM "Modal&Less Dialog(L)...\tCtrl+B", ID_32772 MENUITEM "&File Dialog...\tCtrl+C", ID_Menu END POPUP "&Cursor" BEGIN MENUITEM "Cursor&1(ARROW)\tCtrl+1", ID_32774 MENUITEM "Cursor&2(CROSS)\tCtrl+2", ID_32775 MENUITEM "Cursor&3(UserDefined)\tCtrl+3", ID_32776 END POPUP "&Language" BEGIN MENUITEM "中文(&C)\tCtrl+Shift+C", ID_32777 MENUITEM "&English\tCtrl+Shift+D", ID_32778 END POPUP "&About" BEGIN MENUITEM "Program &Information\tF1", IDM_ABOUT END END ///////////////////////////////////////////////////////////////////////////// // // Accelerator // IDC_LAB5 ACCELERATORS BEGIN "?", IDM_ABOUT, ASCII, ALT "/", IDM_ABOUT, ASCII, ALT END ///////////////////////////////////////////////////////////////////////////// // // Dialog // /* IDD_ABOUTBOX DIALOGEX 0, 0, 170, 62 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Lab5(SDK)" FONT 9, "MS Shell Dlg", 0, 0, 0x1 BEGIN ICON IDR_MAINFRAME, IDC_STATIC, 14, 14, 21, 20 LTEXT "第五次上机练习(SDK)\n对话框、光标、位图、字符串\n\n", IDC_STATIC, 42, 14, 114, 8, SS_NOPREFIX LTEXT LTEXT "学号:10152130206\n姓名:高吉祥\n", IDC_STATIC, 42, 26, 114, 8 DEFPUSHBUTTON "确定", IDOK, 113, 41, 50, 14, WS_GROUP END */ ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO // #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO BEGIN IDD_ABOUTBOX, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 163 TOPMARGIN, 7 BOTTOMMARGIN, 55 END END #endif // APSTUDIO_INVOKED #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE BEGIN "resource.h\0" END 2 TEXTINCLUDE BEGIN "#ifndef APSTUDIO_INVOKED\r\n" "#include ""targetver.h""\r\n" "#endif\r\n" "#define APSTUDIO_HIDDEN_SYMBOLS\r\n" "#include ""windows.h""\r\n" "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n" "\0" END 3 TEXTINCLUDE BEGIN "\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Cursor // IDC_CURSOR1 CURSOR "cursor1.cur" ///////////////////////////////////////////////////////////////////////////// // // String Table // STRINGTABLE BEGIN IDS_APP_TITLE "lab5" IDS_STRING1 "The current cusor is:IDC_ARROW" IDS_STRING2 "The current cusor is:IDC_CROSS" IDS_STRING3 "The current cusor is:My Cursor" IDC_LAB5 "LAB5" END #endif // 中文(简体,中国) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED
customElements.define()的调用顺序为什么会影响构造函数的调用次数?
html里写 ``` <my-h1> <my-h2 name="my h2" > <my-h3>测试</my-h3> </my-h2> </my-h1> ``` 使用自定义标签,在js里面如果是这样的调用次序: ``` // MyH2的构造函数是: constructor() { super(); cosole.log('invoked'); } //如果使用这种次序,则MyH2的构造函数只会调用一次,也就是打印一次invoked customElements.define('my-h1', MyH1); customElements.define('my-h2', MyH2); customElements.define('my-h3', MyH3); //如果使用这种次序,即MyH2和MyH3调换位置,MyH2就会构造两次,打印两个invoked customElements.define('my-h1', MyH1); customElements.define('my-h3', MyH3); customElements.define('my-h2', MyH2); ``` 我是经过google浏览器一步一步调试的,但不知道为什么customElements.define()的调用次序会影响构造次数。
请大神帮我解决这个c/c++麻烦,谢谢!
//一下代码是一个窗口显示界面,我想弄懂这个代码,然后删除第一个窗口,改一改窗口和按钮的布局,就这样了,谢谢大神啊 //Microsoft Developer Studio generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // Chinese (中国) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS) #ifdef _WIN32 LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED #pragma code_page(936) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE DISCARDABLE BEGIN "resource.h\0" END 2 TEXTINCLUDE DISCARDABLE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE DISCARDABLE BEGIN "#define _AFX_NO_SPLITTER_RESOURCES\r\n" "#define _AFX_NO_OLE_RESOURCES\r\n" "#define _AFX_NO_TRACKER_RESOURCES\r\n" "#define _AFX_NO_PROPERTY_RESOURCES\r\n" "\r\n" "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)\r\n" "#ifdef _WIN32\r\n" "LANGUAGE 4, 2\r\n" "#pragma code_page(936)\r\n" "#endif //_WIN32\r\n" "#include ""res\\Medical3D.rc2"" // non-Microsoft Visual C++ edited resources\r\n" "#include ""l.chs\\afxres.rc"" // Standard components\r\n" "#endif\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Icon // // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. //IDR_MAINFRAME ICON DISCARDABLE "res\\Medical3D.ico" ///////////////////////////////////////////////////////////////////////////// // // Dialog // IDD_MEDICAL3D_DIALOG DIALOGEX 0, 0, 443, 370 STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_APPWINDOW CAPTION "Medical3D" FONT 9, "微软雅黑" BEGIN LTEXT "",IDC_SurfaceRender,7,6,186,176,0,WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE LTEXT "",IDC_VolumeRender,201,5,186,176,0,WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE LTEXT "",IDC_ImageShow,7,189,186,176,0,WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE LTEXT "",IDC_ImageWedget,200,189,186,176,0,WS_EX_DLGMODALFRAME | WS_EX_CLIENTEDGE PUSHBUTTON "面绘制",IDC_BUTTON1,393,269,36,15,0,WS_EX_STATICEDGE PUSHBUTTON "体绘制",IDC_BUTTON2,393,292,36,15,0,WS_EX_STATICEDGE PUSHBUTTON "图像显示",IDC_BUTTON3,393,315,36,15,0,WS_EX_STATICEDGE PUSHBUTTON "切片显示",IDC_BUTTON4,393,338,36,15,0,WS_EX_STATICEDGE END #ifndef _MAC ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,1 PRODUCTVERSION 1,0,0,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x1L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "080404B0" BEGIN VALUE "CompanyName", "\0" VALUE "FileDescription", "Medical3D Microsoft 基础类应用程序\0" VALUE "FileVersion", "1, 0, 0, 1\0" VALUE "InternalName", "Medical3D\0" VALUE "LegalCopyright", "版权所有 (C) 2007\0" VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "Medical3D.EXE\0" VALUE "ProductName", "Medical3D 应用程序\0" VALUE "ProductVersion", "1, 0, 0, 1\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x804, 1200 END END #endif // !_MAC ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO // #ifdef APSTUDIO_INVOKED GUIDELINES DESIGNINFO DISCARDABLE BEGIN IDD_MEDICAL3D_DIALOG, DIALOG BEGIN RIGHTMARGIN, 437 BOTTOMMARGIN, 365 END END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // String Table // STRINGTABLE DISCARDABLE BEGIN IDS_ABOUTBOX "关于 Medical3D(&A)..." END #endif // Chinese (中国) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // #define _AFX_NO_SPLITTER_RESOURCES #define _AFX_NO_OLE_RESOURCES #define _AFX_NO_TRACKER_RESOURCES #define _AFX_NO_PROPERTY_RESOURCES #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS) #ifdef _WIN32 LANGUAGE 4, 2 #pragma code_page(936) #endif //_WIN32 //#include "res\Medical3D.rc2" // non-Microsoft Visual C++ edited resources #include "l.chs\afxres.rc" // Standard components #endif ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED
小程序在开发者工具运行测试一切正常,但真机上运行onready have been invoked
小程序请求数据部署的本机的地址,已部署了IIS服务器,使用微信开发者工具运行时一切测试数据都正常,但是在真机上运行时却只有页面,没有进行任何数据的请求,调式状态下日志如下图 ![图片说明](https://img-ask.csdn.net/upload/201911/08/1573194151_889795.jpg) 请问这是什么原因呢
Hive on spark查询报错。
求助!!!在hadoop使用Hive on spark执行Bigbench测试时,一直会有报错,log信息: FAILED: SemanticException Failed to get a spark session: org.apache.hadoop.hive.ql.metadata.HiveException: Failed to create spark client. WARN: The method class org.apache.commons.logging.impl.SLF4JLogFactory#release() was invoked. WARN: Please see http://www.slf4j.org/codes.html#release for an explanation. An error occured while running command: ========== runEngineCmd -f /var/lib/hadoop-hdfs/Big-Bench/engines/hive/queries/q04/q04.sql ========== 在网上查了很多资料,有说版本不匹配的,有说是概率性问题,有没有大佬来瞅一眼啊。。哭了
undefined keyword or key name: TYPELIB
//Microsoft Developer Studio generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "winres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // Chinese (P.R.C.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS) #ifdef _WIN32 LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED #pragma code_page(936) #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// // // REGISTRY // IDR_GoodsCollection REGISTRY DISCARDABLE "GoodsCollection.rgs" IDR_Goods REGISTRY DISCARDABLE "Goods.rgs" #endif // Chinese (P.R.C.) resources ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE DISCARDABLE BEGIN "resource.h\0" END 2 TEXTINCLUDE DISCARDABLE BEGIN "#include ""winres.h""\r\n" "\0" END 3 TEXTINCLUDE DISCARDABLE BEGIN "1 TYPELIB ""GoodsCenter.tlb""\r\n" "\0" END #endif // APSTUDIO_INVOKED #ifndef _MAC ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION 1,0,0,1 PRODUCTVERSION 1,0,0,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x2L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904B0" BEGIN VALUE "CompanyName", "\0" VALUE "FileDescription", "GoodsCenter Module\0" VALUE "FileVersion", "1, 0, 0, 1\0" VALUE "InternalName", "GoodsCenter\0" VALUE "LegalCopyright", "Copyright 2001\0" VALUE "OriginalFilename", "GoodsCenter.DLL\0" VALUE "ProductName", "GoodsCenter Module\0" VALUE "ProductVersion", "1, 0, 0, 1\0" VALUE "OLESelfRegister", "\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END #endif // !_MAC ///////////////////////////////////////////////////////////////////////////// // // String Table // STRINGTABLE DISCARDABLE BEGIN IDS_PROJNAME "GoodsCenter" IDS_GOODSCOLLECTION_DESC "CGoodsCollection Class" IDS_GOODS_DESC "CGoods Class" //END #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // 1 TYPELIB "GoodsCenter.tlb" ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED 源代码是这样的,求各位大神帮帮忙
android开发BLE蓝牙时蓝牙连接不稳定会自动断开重连
搜索、通讯均正常,只是连接不正常 public void onCreate(){ super.onCreate(); // Initializes a Bluetooth adapter. For API level 18 and above, get a reference to // BluetoothAdapter through BluetoothManager. final BluetoothManager bluetoothManager = (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE); mBluetoothAdapter = bluetoothManager.getAdapter(); // Checks if Bluetooth is supported on the device. if (mBluetoothAdapter == null) { Toast.makeText(this, "没有蓝牙", Toast.LENGTH_SHORT).show(); stopSelf(); return; } if(!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)){ Toast.makeText(this, "不支持BLE", Toast.LENGTH_SHORT).show(); stopSelf(); return; } } @Override public void onDestroy(){ if(mBluetoothGatt != null){ mBluetoothGatt.close(); } mBluetoothGatt = null; super.onDestroy(); } @Override public boolean onUnbind(Intent intent){ if(mBluetoothGatt != null){ mBluetoothGatt.close(); } mBluetoothGatt = null; return super.onUnbind(intent); } // Device scan callback. private BluetoothAdapter.LeScanCallback mLeScanCallback = new BluetoothAdapter.LeScanCallback() { @Override public void onLeScan(final BluetoothDevice device, final int rssi, final byte[] scanRecord) { String str = device.getName() + "|" + device.getAddress(); LogUtil.d(TAG, "get BluetoothDevice.ACTION_FOUND:" + str); sendLocalBroadcast(ACTION_SCAN_FOUND,str); } }; public void startScan(){ Handler mHandler = new Handler(); mHandler.postDelayed(new Runnable() { @Override public void run() { stopScan(); } },SCAN_PERIOD ); LogUtil.d(TAG, "get startScan"); mScanning = true; mBluetoothAdapter.startLeScan(mLeScanCallback); sendLocalBroadcast(ACTION_SCAN_STARTED); } public void stopScan(){ if(mScanning){ LogUtil.d(TAG, "get stopScan"); mScanning = false; mBluetoothAdapter.stopLeScan(mLeScanCallback); sendLocalBroadcast(ACTION_SCAN_FINISHED); } } public void findService(List<BluetoothGattService> gattServices) { Log.i(TAG, "Count is:" + gattServices.size()); for (BluetoothGattService gattService : gattServices) { Log.i(TAG, gattService.getUuid().toString()); Log.i(TAG, UUID_SERVICE.toString()); if(gattService.getUuid().toString().equalsIgnoreCase(UUID_SERVICE.toString())) { List<BluetoothGattCharacteristic> gattCharacteristics = gattService.getCharacteristics(); Log.i(TAG, "Count is:" + gattCharacteristics.size()); for (BluetoothGattCharacteristic gattCharacteristic : gattCharacteristics) { if(gattCharacteristic.getUuid().toString().equalsIgnoreCase(UUID_NOTIFY.toString())) { Log.i(TAG, gattCharacteristic.getUuid().toString()); Log.i(TAG, UUID_NOTIFY.toString()); mNotifyCharacteristic = gattCharacteristic; setCharacteristicNotification(gattCharacteristic, true); //broadcastUpdate(ACTION_GATT_SERVICES_DISCOVERED); return; } } } } } // Implements callback methods for GATT events that the app cares about. For example, // connection change and services discovered. //设备连接 private final BluetoothGattCallback mGattCallback = new BluetoothGattCallback() { @Override public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) { String intentAction; Log.i(TAG, "oldStatus=" + status + " NewStates=" + newState); if(status == BluetoothGatt.GATT_SUCCESS) { if (newState == BluetoothProfile.STATE_CONNECTED) { intentAction = ACTION_CONNECTED; sendLocalBroadcast(intentAction); Log.i(TAG, "Connected to GATT server."); // Attempts to discover services after successful connection. Log.i(TAG, "Attempting to start service discovery:" + mBluetoothGatt.discoverServices()); } else if (newState == BluetoothProfile.STATE_DISCONNECTED) { intentAction = ACTION_DISCONNECTED; mBluetoothGatt.close(); mBluetoothGatt = null; Log.i(TAG, "Disconnected from GATT server."); sendLocalBroadcast(intentAction); } } } //发现服务 @Override public void onServicesDiscovered(BluetoothGatt gatt, int status) { if (status == BluetoothGatt.GATT_SUCCESS) { Log.w(TAG, "onServicesDiscovered received: " + status); findService(gatt.getServices()); } else { if(mBluetoothGatt.getDevice().getUuids() == null) Log.w(TAG, "onServicesDiscovered received: " + status); } } @Override public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) { if (status == BluetoothGatt.GATT_SUCCESS) { byte[] bufRecv = characteristic.getValue(); int nRecv = bufRecv.length; if(nRecv > 1024 + nReadPtr - nRecvPtr) nRecv = 1024 + nReadPtr - nRecvPtr; if(nRecv + nRecvPtr <= 1024){ System.arraycopy(bufRecv, 0, bRecv, nRecvPtr, nRecv); nRecvPtr += nRecv; } else{ System.arraycopy(bufRecv, 0, bRecv, nRecvPtr, 1024-nRecvPtr); System.arraycopy(bufRecv, 1024-nRecvPtr, bRecv, 0, nRecv - (1024-nRecvPtr)); nRecvPtr = nRecv - (1024 - nRecvPtr); } sendLocalBroadcast(ACTION_DATA_RECV); } } /** * 发送数据后的回调 * @param gatt * @param characteristic * @param status */ @Override public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) { Log.e(TAG, "OnCharacteristicWrite"); } @Override public void onDescriptorRead(BluetoothGatt gatt, BluetoothGattDescriptor bd, int status) { Log.e(TAG, "onDescriptorRead"); } @Override public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) { byte[] bufRecv = characteristic.getValue(); int nRecv = bufRecv.length; if(nRecv > 1024 + nReadPtr - nRecvPtr) nRecv = 1024 + nReadPtr - nRecvPtr; if(nRecv + nRecvPtr <= 1024){ System.arraycopy(bufRecv, 0, bRecv, nRecvPtr, nRecv); nRecvPtr += nRecv; } else{ System.arraycopy(bufRecv, 0, bRecv, nRecvPtr, 1024-nRecvPtr); System.arraycopy(bufRecv, 1024-nRecvPtr, bRecv, 0, nRecv - (1024-nRecvPtr)); nRecvPtr = nRecv - (1024 - nRecvPtr); } sendLocalBroadcast(ACTION_DATA_RECV); Log.e(TAG, "onCharacteristicChanged"); } @Override public void onDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor bd, int status) { Log.e(TAG, "onDescriptorWrite"); } @Override public void onReadRemoteRssi(BluetoothGatt gatt, int a, int b) { Log.e(TAG, "onReadRemoteRssi"); } @Override public void onReliableWriteCompleted(BluetoothGatt gatt, int a) { Log.e(TAG, "onReliableWriteCompleted"); } @Override public void onMtuChanged(BluetoothGatt gatt, int mtu, int status) { Log.e(TAG, "onMtuChanged"); } }; public boolean connect(final String address){ if (mBluetoothAdapter == null || address == null) { Log.w(TAG, "BluetoothAdapter not initialized or unspecified address."); return false; } BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(address); if (device == null) { Log.w(TAG, "Device not found. Unable to connect."); return false; } // We want to directly connect to the device, so we are setting the autoConnect // parameter to false. if(mBluetoothGatt != null) { mBluetoothGatt.close(); mBluetoothGatt = null; } mBluetoothGatt = device.connectGatt(this, false, mGattCallback); Log.d(TAG, "Trying to create a new connection."); return true; } public void disconnect(){ if (mBluetoothAdapter == null || mBluetoothGatt == null) { Log.w(TAG, "BluetoothAdapter not initialized"); return; } mBluetoothGatt.disconnect(); } @Override public int read(byte[] data) { int readLen = data.length; int bufLen; int retLen; if(nRecvPtr >= nReadPtr) bufLen = nRecvPtr - nReadPtr; else bufLen = nRecvPtr + 1024 - nReadPtr; if(readLen <= bufLen) retLen = readLen; else retLen = bufLen; if(nReadPtr + retLen < 1024){ System.arraycopy(bRecv, nReadPtr, data,0,retLen); nReadPtr += retLen; } else{ System.arraycopy(bRecv, nReadPtr, data, 0, 1024-nReadPtr); System.arraycopy(bRecv, 0, data, 1024-nReadPtr, retLen - (1024-nReadPtr)); nReadPtr = retLen-(1024-nReadPtr); } return retLen; } public byte[] write(byte[] data){ mNotifyCharacteristic.setValue(data/*strValue.getBytes()*/); mBluetoothGatt.writeCharacteristic(mNotifyCharacteristic); LogUtil.i(TAG, "12154123164512332465451218451231654561233545612"); //return data.length; return data; } public final void onCharacteristicChanged(final BluetoothGatt gatt, final BluetoothGattCharacteristic characteristic) { byte[] value = characteristic.getValue(); Log.d(TAG, "onCharacteristicChanged: " + value); String s0 = Integer.toHexString(value[0] & 0xFF); String s = Integer.toHexString(value[1] & 0xFF); Log.d(TAG, "onCharacteristicChanged: " + s0 + "、" + s); for (byte b : value) { Log.d(TAG, "onCharacteristicChanged: " + b); } } /** * Request a read on a given {@code BluetoothGattCharacteristic}. The read result is reported * asynchronously through the {@code BluetoothGattCallback#onCharacteristicRead(android.bluetooth.BluetoothGatt, android.bluetooth.BluetoothGattCharacteristic, int)} * callback. * * @param characteristic The characteristic to read from. */ public void readCharacteristic(BluetoothGattCharacteristic characteristic) { if (mBluetoothAdapter == null || mBluetoothGatt == null) { Log.w(TAG, "BluetoothAdapter not initialized"); return; } mBluetoothGatt.readCharacteristic(characteristic); } /** * Enables or disables notification on a give characteristic. * * @param characteristic Characteristic to act on. * @param enabled If true, enable notification. False otherwise. */ public void setCharacteristicNotification(BluetoothGattCharacteristic characteristic, boolean enabled) { if (mBluetoothAdapter == null || mBluetoothGatt == null) { Log.w(TAG, "BluetoothAdapter not initialized"); return; } mBluetoothGatt.setCharacteristicNotification(characteristic, enabled); /* // This is specific to Heart Rate Measurement. if (UUID_HEART_RATE_MEASUREMENT.equals(characteristic.getUuid())) { BluetoothGattDescriptor descriptor = characteristic.getDescriptor( UUID.fromString(SampleGattAttributes.CLIENT_CHARACTERISTIC_CONFIG)); descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE); mBluetoothGatt.writeDescriptor(descriptor); } */ } /** * Retrieves a list of supported GATT services on the connected device. This should be * invoked only after {@code BluetoothGatt#discoverServices()} completes successfully. * * @return A {@code List} of supported services. */ public List<BluetoothGattService> getSupportedGattServices() { if (mBluetoothGatt == null) return null; return mBluetoothGatt.getServices(); } } ``` ```
The SetStack Computer
Problem Description Background from Wikipedia: 揝et theory is a branch of mathematics created principally by the German mathematician Georg Cantor at the end of the 19th century. Initially controversial, set theory has come to play the role of a foundational theory in modern mathematics, in the sense of a theory invoked to justify assumptions made inmathematics concerning the existence of mathematical objects (such as numbers or functions) and their properties. Formal versions of set theory also have a foundational role to play as specifying a theoretical ideal of mathematical rigor in proofs.?Given this importance of sets, being the basis of mathematics, a set of eccentric theorist set off to construct a supercomputer operating on sets instead of numbers. The initial Set-Stack Alpha is under construction, and they need you to simulate it in order to verify the operation of the prototype. The computer operates on a single stack of sets, which is initially empty. After each operation, the cardinality of the topmost set on the stack is output. The cardinality of a set S is denoted |S| and is the number of elements in S. The instruction set of the SetStack Alpha is PUSH, DUP, UNION, INTERSECT, and ADD. ?PUSH will push the empty set {} on the stack. ?DUP will duplicate the topmost set (pop the stack, and then push that set on the stack twice). ?UNION will pop the stack twice and then push the union of the two sets on the stack. ?INTERSECT will pop the stack twice and then push the intersection of the two sets on the stack. ?ADD will pop the stack twice, add the first set to the second one, and then push the resulting set on the stack. For illustration purposes, assume that the topmost element of the stack is A = {{}, {{}}} and that the next one is B = {{}, {{{}}}}. For these sets, we have |A| = 2 and |B| = 2. Then: ?UNION would result in the set { {}, {{}}, {{{}}} }. The output is 3. ?INTERSECT would result in the set { {} }. The output is 1. ?ADD would result in the set { {}, {{{}}}, {{},{{}}} }. The output is 3. Input An integer 0 <= T <= 5 on the first line gives the cardinality of the set of test cases. The first line of each test case contains the number of operations 0 <= N <= 2 000. Then follow N lines each containing one of the five commands. It is guaranteed that the SetStack computer can execute all the commands in the sequence without ever popping an empty stack. Output For each operation specified in the input, there will be one line of output consisting of a single integer. This integer is the cardinality of the topmost element of the stack after the corresponding command has executed. After each test case there will be a line with *** (three asterisks). Sample Input 2 9 PUSH DUP ADD PUSH ADD DUP ADD DUP UNION 5 PUSH PUSH ADD PUSH INTERSECT Sample Output 0 0 1 0 1 1 2 2 2 *** 0 0 1 0 0 ***
spring boot整合rabbitmq ack出现异常
先贴一下我的代码,配置类 ``` @Configuration public class RabbitConfig { @Autowired RedisService redisService; @Bean public Queue queue() { return new Queue(MqConstant.QUEUE_NAME); } @Bean public Queue BQueue() { return new Queue(MqConstant.BQUEUE_NAME); } /** * 消费者数量,默认10 */ private static final int DEFAULT_CONCURRENT = 10; /** * 每个消费者获取最大投递数量,默认50 */ private static final int DEFAULT_PREFETCH_COUNT = 5; /** * 初始化环境参数 */ private void initEnv() { SwitchTool.initEnv(redisService); } @Bean public MessageConverter jsonMessageConverter(ObjectMapper objectMapper) { return new Jackson2JsonMessageConverter(objectMapper); } @Bean public RabbitTemplate rabbitTemplate(ConnectionFactory connectionFactory) { RabbitTemplate template = new RabbitTemplate(connectionFactory); template.setMessageConverter(new Jackson2JsonMessageConverter()); return template; } @Bean public SimpleRabbitListenerContainerFactory simpleRabbitListenerContainerFactory( SimpleRabbitListenerContainerFactoryConfigurer configurer, ConnectionFactory connectionFactory) { // 初始化环境参数 initEnv(); // 初始化环境参数-end SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory(); factory.setPrefetchCount(DEFAULT_PREFETCH_COUNT); factory.setConcurrentConsumers(DEFAULT_CONCURRENT); factory.setAcknowledgeMode(AcknowledgeMode.MANUAL); configurer.configure(factory, connectionFactory); return factory; } } ``` 然后是消费者类,消费者1: ``` @RabbitListener(queues = MqConstant.QUEUE_NAME, containerFactory = "simpleRabbitListenerContainerFactory") @RabbitHandler public void process(@Payload MessageBody messageBody, @Headers Map<String, Object> headers, Channel channel) throws Exception {.....} ``` 消费者2: ``` @RabbitListener(queues = MqConstant.BQUEUE_NAME,containerFactory = "simpleRabbitListenerContainerFactory") @RabbitHandler public void process(@Payload MessageBody messageBody, @Headers Map<String, Object> headers, Channel channel) throws Exception { log.info("get enter msg:"+messageBody); Long deliveryTag = (Long) headers.get(AmqpHeaders.DELIVERY_TAG); channel.basicAck(deliveryTag,false); } ``` 如果我只写消费者1,不写消费者2的话是完全没有问题的,当我写两个消费者的时候,启动就报错了,如下: ``` 2019-09-29 14:35:48.307 WARN 4380 --- [cTaskExecutor-1] s.a.r.l.ConditionalRejectingErrorHandler : Execution of Rabbit message listener failed. org.springframework.amqp.rabbit.listener.exception.ListenerExecutionFailedException: Listener method could not be invoked with the incoming message Endpoint handler details: Method [public void com.chinamobile.cmic.rcsoa.wishsms.component.EnterClient.process(com.chinamobile.cmic.rcsoa.wishsms.dto.MessageBody,java.util.Map<java.lang.String, java.lang.Object>,com.rabbitmq.client.Channel) throws java.lang.Exception] Bean [com.chinamobile.cmic.rcsoa.wishsms.component.EnterClient@6fbfd28b] at org.springframework.amqp.rabbit.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:129) at org.springframework.amqp.rabbit.listener.adapter.MessagingMessageListenerAdapter.onMessage(MessagingMessageListenerAdapter.java:106) at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:856) at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:779) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$001(SimpleMessageListenerContainer.java:105) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$1.invokeListener(SimpleMessageListenerContainer.java:208) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.invokeListener(SimpleMessageListenerContainer.java:1349) at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:760) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:1292) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:1262) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$1800(SimpleMessageListenerContainer.java:105) at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:1518) at java.lang.Thread.run(Thread.java:748) Caused by: org.springframework.amqp.support.converter.MessageConversionException: Cannot handle message ... 13 common frames omitted Caused by: org.springframework.messaging.converter.MessageConversionException: Cannot convert from [[B] to [com.chinamobile.cmic.rcsoa.wishsms.dto.MessageBody] for GenericMessage [payload=byte[298], headers={amqp_receivedDeliveryMode=PERSISTENT, amqp_receivedRoutingKey=legalize.enter.queue, amqp_deliveryTag=2, amqp_consumerQueue=legalize.enter.queue, amqp_redelivered=true, id=f8b6a47d-baa1-eded-60f9-0b83554c56c0, amqp_consumerTag=amq.ctag-QgKSp5nfJeTaRNyWogyBbw, contentType=application/x-java-serialized-object, timestamp=1569738948306}] at org.springframework.messaging.handler.annotation.support.PayloadArgumentResolver.resolveArgument(PayloadArgumentResolver.java:142) at org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:112) at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.getMethodArgumentValues(InvocableHandlerMethod.java:135) at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:107) at org.springframework.amqp.rabbit.listener.adapter.HandlerAdapter.invoke(HandlerAdapter.java:49) at org.springframework.amqp.rabbit.listener.adapter.MessagingMessageListenerAdapter.invokeHandler(MessagingMessageListenerAdapter.java:126) ... 12 common frames omitted ``` 希望大佬们可以帮我看看这怎么解决。QAQ
vs中编写了一个会显示水平和竖直滚动条的程序,但是运行时出现错误的结果,请问这是为啥?
这是源代码: #include<windows.h> #include"resource.h" LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { static char szAppName[] = "SysMets2"; HWND hwnd; MSG msg; WNDCLASS wndclass; if (!hPrevInstance) { wndclass.style = CS_HREDRAW | CS_VREDRAW; wndclass.lpfnWndProc = WndProc; wndclass.cbClsExtra = 0; wndclass.cbWndExtra = 0; wndclass.hInstance = hInstance; wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION); wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); wndclass.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); wndclass.lpszMenuName = NULL; wndclass.lpszClassName = szAppName; RegisterClass(&wndclass); } hwnd = CreateWindow(szAppName, "Get System Metrics No.2", WS_OVERLAPPEDWINDOW|WS_HSCROLL|WS_VSCROLL, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInstance, NULL ); ShowWindow(hwnd, nCmdShow); UpdateWindow(hwnd); while (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } return msg.wParam; } LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { static short cxChar, cxCaps, cyChar, cxClient, cyClient, nHscrollPos,nMaxWidth,nVscrollPos,nVscrollMax,nHscrollMax; char szBuffer[10]; HDC hdc; short i,x,y,nPaintBeg,nPaintEnd,nVscrollInc,nHscrollInc; PAINTSTRUCT ps; TEXTMETRIC tm; switch (message) { case WM_CREATE: hdc = GetDC(hwnd); GetTextMetrics(hdc, &tm); cxChar = tm.tmAveCharWidth; cxCaps = (tm.tmPitchAndFamily & 1 ? 3 : 2)*cxChar / 2; cyChar = tm.tmHeight + tm.tmExternalLeading; ReleaseDC(hwnd, hdc); nMaxWidth = 40 * cxChar + 18 * cxCaps; return 0; case WM_SIZE: cyClient = HIWORD(lParam); cxClient = LOWORD(lParam); nVscrollMax = max(0, NUMLINES + 2 - cyClient / cyChar); nVscrollPos = min(nVscrollPos, nVscrollMax); SetScrollRange(hwnd, SB_VERT, 0, nVscrollMax, FALSE); SetScrollPos(hwnd, SB_VERT, nVscrollPos, TRUE); nHscrollMax = max(0, 2 + (nMaxWidth - cxClient) / cxChar); nHscrollPos = min(nHscrollPos, nHscrollMax); SetScrollRange(hwnd, SB_HORZ, 0, nHscrollMax, FALSE); SetScrollPos(hwnd, SB_HORZ, nHscrollPos, TRUE); return 0; case WM_VSCROLL: switch (wParam) { case SB_TOP: nVscrollInc = -nVscrollPos; break; case SB_BOTTOM: nVscrollInc = nVscrollMax - nVscrollPos; break; case SB_LINEUP: nVscrollInc = -1; break; case SB_LINEDOWN: nVscrollInc = 1; case SB_PAGEUP: nVscrollPos = min(-1, -cyClient / cyChar); break; case SB_PAGEDOWN: nVscrollPos = max(1, cyClient / cyChar); break; case SB_THUMBTRACK: nVscrollInc = LOWORD(lParam) - nVscrollPos; break; default: nVscrollInc = 0; } if (nVscrollInc == max(-nVscrollPos, min(nVscrollInc, nVscrollMax - nVscrollPos))) { nVscrollPos += nVscrollInc; ScrollWindow(hwnd, 0, -cyChar*nVscrollInc, NULL, NULL); SetScrollPos(hwnd, SB_VERT, nVscrollPos, TRUE); UpdateWindow(hwnd); } return 0; case WM_HSCROLL: switch (wParam) { case SB_LINEDOWN: nHscrollPos = 1; break; case SB_LINEUP: nHscrollPos =- 1; break; case SB_PAGEUP: nHscrollPos = -8; break; case SB_PAGEDOWN: nHscrollPos = 8; break; case SB_THUMBPOSITION: nHscrollInc = LOWORD(lParam) - nHscrollPos; break; default: nHscrollInc=0; } if (nHscrollPos = max(-nHscrollPos, min(nHscrollInc, nHscrollMax - nHscrollPos))) { nHscrollPos += nHscrollInc; ScrollWindow(hwnd, -cxChar*nHscrollInc, 0, NULL, NULL); SetScrollPos(hwnd, SB_HORZ, nHscrollPos, TRUE); } return 0; case WM_PAINT: hdc = BeginPaint(hwnd, &ps); nPaintBeg = max(0,nVscrollPos+ps.rcPaint.top/cyChar-1); nPaintEnd = min(NUMLINES,nVscrollPos=ps.rcPaint.bottom/cyChar); for (i = nPaintBeg; i < nPaintEnd; i++) { x = cxChar*(1-nHscrollPos); y = cyChar*(1-nVscrollPos+i); TextOut(hdc,cxChar,y, sysmetrics[i].szLabel, lstrlen(sysmetrics[i].szLabel) ); TextOut(hdc, x+18*cxCaps,y, sysmetrics[i].szDesc, lstrlen(sysmetrics[i].szDesc) ); SetTextAlign(hdc,TA_RIGHT | TA_TOP); TextOut(hdc,x+18*cxCaps+40*cxChar, y, szBuffer, wsprintf(szBuffer, "%5d", GetSystemMetrics(sysmetrics[i].nIndex)) ); SetTextAlign(hdc, TA_LEFT| TA_TOP); } EndPaint(hwnd, &ps); return 0; case WM_DESTROY: PostQuitMessage(0); return 0; } return DefWindowProc(hwnd, message, wParam, lParam); } 这是resource.h中的代码: //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by Win32Project1.rc // 新对象的下一组默认值 // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1001 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif #define NUMLINES (sizeof sysmetrics/sizeof sysmetrics[0]) struct { int nIndex; char *szLabel; char *szDesc; } sysmetrics[] = { SM_CXSCREEN, "SM_CXSCREEN", "Screen with in pixels", SM_CYSCREEN, "SM_CYSCREEN", "Screen height in pixels", SM_CXVSCROLL, "SM_CXVSCROLL", "Vertical scroll arrow width", SM_CYHSCROLL, "SM_CYHSCROLL", "Horizontal scroll arrow height", SM_CYCAPTION, "SM_CYCAPTION", "Caption bar height", SM_CXBORDER, "SM_CXBORDER", "border width", SM_CYBORDER, "SM_CYBORDER", "border height", SM_CXDLGFRAME, "SM_CXDLGFRAME", "Dialog window frame width", SM_CYDLGFRAME, "SM_CYDLGFRAME", "Dialog window frame height", SM_CYVTHUMB, "SM_CYVTHUMB", "Vertical scroll thumb height", SM_CXHTHUMB, "SM_CXHTHUMB", "Horizontal scroll thumb height", SM_CXICON, "SM_CXICON", "Icon width", SM_CYICON, "SM_CYICON", "icon height", SM_CXCURSOR, "SM_CXCURSOR", "Cursor width", SM_CYCURSOR, "SM_CYCURSOR", "Cursor height", SM_CYMENU, "SM_CYMENU", "Menu bar height", SM_CXFULLSCREEN, "SM_CXFULLSCREEN", "Full-screen client window width", SM_CYFULLSCREEN, "SM_CYFULLSCREEN", "Full-screen client window height", SM_CYKANJIWINDOW, "SM_CYKANJIWINDOW", "Kanji window height", SM_MOUSEPRESENT, "SM_MOUSEPRESENT", "Mouse present flag", SM_CYVSCROLL, "SM_CYVSCROLL", "vertical scroll arrow height", SM_CXHSCROLL, "SM_CXHSCROLL", "Horiozntal scroll arrow width", SM_DEBUG, "SM_DEBUG", "Debug version flag", SM_SWAPBUTTON, "SM_SWAPBUTTON", "Mouse buttons swapped flag", SM_RESERVED1, "SM_RESERVED1", "Reserved", SM_RESERVED2, "SM_RESERVED2", "Reserved", SM_RESERVED3, "SM_RESERVED3", "Reserved", SM_RESERVED4, "SM_RESERVED4", "Reserved", SM_CXMIN, "SM_CXMIN", "Mininum window width", SM_CYMIN, "SM_CYMIN", "Mininum window height", SM_CXSIZE, "SM_CXSIZE", "Minimize/Maximize icon width", SM_CYSIZE, "SM_CYSIZE", "Minimize/Maximize icon height", SM_CXFRAME, "SM_CXFRAME", "Window frame width", SM_CYFRAME, "SM_CYFRAME", "Window frame height", SM_CXMINTRACK, "SM_CXMINTRACK", "Minimize tracking width of window", SM_CYMINTRACK, "SM_CYMINTRACK", "Minimize tracking height of window", SM_CMETRICS, "SM_CMETRICS", "Number of system metrics" }; 下面是运行结果:![图片说明](https://img-ask.csdn.net/upload/201502/13/1423800573_416655.png)
Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used
一、控制台打印信息 "D:\Program Files\tomcat9.0.20\bin\catalina.bat" run [2019-10-26 08:59:45,240] Artifact Jia01.02:war exploded: Waiting for server connection to start artifact deployment... Using CATALINA_BASE: "C:\Users\Administrator\.IntelliJIdea2018.2\system\tomcat\Unnamed_ekp" Using CATALINA_HOME: "D:\Program Files\tomcat9.0.20" Using CATALINA_TMPDIR: "D:\Program Files\tomcat9.0.20\temp" Using JRE_HOME: "D:\Program Files\Java\jdk1.8.0_181" Using CLASSPATH: "D:\Program Files\tomcat9.0.20\bin\bootstrap.jar;D:\Program Files\tomcat9.0.20\bin\tomcat-juli.jar" Connected to the target VM, address: '127.0.0.1:65083', transport: 'socket' 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.服务器版本: Apache Tomcat/9.0.20 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.构建: May 3 2019 22:26:00 UTC 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.20.0 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS.版本: 10.0 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 结.造: amd64 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java 环境变量: D:\Program Files\Java\jdk1.8.0_181\jre 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM 版本: 1.8.0_181-b13 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM.供应商: Oracle Corporation 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Users\Administrator\.IntelliJIdea2018.2\system\tomcat\Unnamed_ekp 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: D:\Program Files\tomcat9.0.20 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\Administrator\.IntelliJIdea2018.2\system\tomcat\Unnamed_ekp\conf\logging.properties 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:65083,suspend=y,server=n 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -javaagent:C:\Users\Administrator\.IntelliJIdea2018.2\system\captureAgent\debugger-agent.jar=file:/C:/Users/Administrator/AppData/Local/Temp/capture11347.props 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote= 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms1024m 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx3072m 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:PermSize=256M 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxPermSize=512M 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmn256M 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Duser.timezone=Asia/Shanghai 26-Oct-2019 08:59:46.571 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.net.preferIPv4Stack=true 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms1024m 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx3072m 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:PermSize=256M 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxPermSize=512M 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmn256M 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Duser.timezone=Asia/Shanghai 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.net.preferIPv4Stack=true 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs= 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\Administrator\.IntelliJIdea2018.2\system\tomcat\Unnamed_ekp 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=D:\Program Files\tomcat9.0.20 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=D:\Program Files\tomcat9.0.20\temp 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.21] using APR version [1.6.5]. 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] 26-Oct-2019 08:59:46.587 信息 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1a 20 Nov 2018] 26-Oct-2019 08:59:46.962 信息 [main] org.apache.coyote.AbstractProtocol.init 初始化协议处理器 ["http-nio-8080"] 26-Oct-2019 08:59:46.993 信息 [main] org.apache.coyote.AbstractProtocol.init 初始化协议处理器 ["ajp-nio-8009"] 26-Oct-2019 08:59:46.993 信息 [main] org.apache.catalina.startup.Catalina.load 服务器在[827]毫秒内初始化 26-Oct-2019 08:59:47.056 信息 [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina] 26-Oct-2019 08:59:47.056 信息 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.20] 26-Oct-2019 08:59:47.071 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["http-nio-8080"] 26-Oct-2019 08:59:47.103 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["ajp-nio-8009"] 26-Oct-2019 08:59:47.103 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in [103] milliseconds Connected to server [2019-10-26 08:59:47,353] Artifact Jia01.02:war exploded: Artifact is being deployed, please wait... 26-Oct-2019 08:59:57.450 信息 [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployDirectory 把web 应用程序部署到目录 [D:\Program Files\tomcat9.0.20\webapps\manager] 26-Oct-2019 08:59:58.502 信息 [Catalina-utility-1] org.apache.jasper.servlet.TldScanner.scanJars 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。 26-Oct-2019 08:59:58.645 信息 [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\Program Files\tomcat9.0.20\webapps\manager] has finished in [1,196] ms 26-Oct-2019 09:00:18.849 信息 [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。 本地网络IP:192.168.58.1,网卡物理地址:00:50:56:c0:00:08 2019-10-26 09:00:20,447 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: com.landray.kmss.framework.plugin.loader.PluginContextLoaderListener.printHwadd(159) 获取本地网卡地址时,出现多个网卡,可能会导致正式版的license失效,建议通过JVM参数“-Djgroups.bind_addr=ip地址”,绑定本机地址 授权给:深圳市蓝凌软件股份有限公司开发演示许可 试用版:2019-11-09 Plugin Context is starting ... WebContentPath:/E:/idea_workSpace/jointsoon/20191025_ekp_v15/out/artifacts/Jia01.02.war 2019-10-26 09:01:13,491 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(133) No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/E:/idea_workSpace/jointsoon/20191025_ekp_v15/out/artifacts/Jia01.02.war/WEB-INF/lib/ehcache-1.5.0.jar!/ehcache-failsafe.xml 2019-10-26 09:01:26,540 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: com.landray.kmss.sys.config.loader.KmssLookupListableBeanFactory.resolveBeanDefinition(151) Overriding bean definition for bean 'lbpmRobotNodeServiceAdapter for using @replace': replacing [bean name: lbpmRobotNodeServiceAdapter; defined in ServletContext resource [/WEB-INF/KmssConfig/sys/lbpmservice/node/robotnode/spring.xml]] with [bean name: @replace(lbpmRobotNodeServiceAdapter); defined in ServletContext resource [/WEB-INF/KmssConfig/sys/workflow/support/oa/spring.xml]] 2019-10-26 09:01:36,793 [INFO] ==== RMI TCP Connection(3)-127.0.0.1: com.alibaba.druid.pool.DruidDataSource.init(722) {dataSource-1} inited 2019-10-26 09:02:13,638 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: com.landray.kmss.sys.restservice.client.cloud.eureka.EkpCloudClientFactoryBean.getObject(78) UnusableRestClient will be created, it will throw RestClientException when invoked at any time. 2019-10-26 09:02:36,036 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: com.landray.kmss.sys.authentication.integration.KmssProcessingFilterProxy.init(126) com.landray.kmss.sys.authentication.integration.KmssAuthenticationProcessingFilter is a GenericFilterBean, cannot execute init with a null value, be sure this situation is accepted. 2019-10-26 09:02:36,233 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.security.web.access.intercept.FilterSecurityInterceptor.afterPropertiesSet(141) Could not validate configuration attributes as the SecurityMetadataSource did not return any attributes from getAllConfigAttributes() 2019-10-26 09:02:36,713 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(133) No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/E:/idea_workSpace/jointsoon/20191025_ekp_v15/out/artifacts/Jia01.02.war/WEB-INF/lib/ehcache-1.5.0.jar!/ehcache-failsafe.xml 2019-10-26 09:02:36,726 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: net.sf.ehcache.CacheManager.detectAndFixDiskStorePathConflict(322) Creating a new instance of CacheManager using the diskStorePath "D:\Program Files\tomcat9.0.20\temp" which is already used by an existing CacheManager. The source of the configuration was classpath. The diskStore path for this CacheManager will be set to D:\Program Files\tomcat9.0.20\temp\ehcache_auto_created_1572051756726. To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance. 2019-10-26 09:03:02,518 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(133) No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/E:/idea_workSpace/jointsoon/20191025_ekp_v15/out/artifacts/Jia01.02.war/WEB-INF/lib/ehcache-1.5.0.jar!/ehcache-failsafe.xml 2019-10-26 09:03:02,527 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: net.sf.ehcache.CacheManager.detectAndFixDiskStorePathConflict(322) Creating a new instance of CacheManager using the diskStorePath "D:\Program Files\tomcat9.0.20\temp" which is already used by an existing CacheManager. The source of the configuration was classpath. The diskStore path for this CacheManager will be set to D:\Program Files\tomcat9.0.20\temp\ehcache_auto_created_1572051782527. To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance. 2019-10-26 09:03:02,535 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: com.landray.kmss.third.ftsearch.cache.ehcache.EhCacheProvider.buildCache(94) Could not find configuration [indexSchemaCache]; using defaults. 2019-10-26 09:03:03,176 [INFO] ==== RMI TCP Connection(3)-127.0.0.1: net.paoding.analysis.knife.PaodingMaker.getProperties(138) config paoding analysis from: D:\Program Files\tomcat9.0.20\bin\file:\E:\idea_workSpace\jointsoon\20191025_ekp_v15\out\artifacts\Jia01.02.war\WEB-INF\lib\paoding-landray.jar!\paoding-analysis.properties;D:\Program Files\tomcat9.0.20\bin\file:\E:\idea_workSpace\jointsoon\20191025_ekp_v15\out\artifacts\Jia01.02.war\WEB-INF\lib\paoding-landray.jar!\paoding-analysis-default.properties;D:\Program Files\tomcat9.0.20\bin\file:\E:\idea_workSpace\jointsoon\20191025_ekp_v15\out\artifacts\Jia01.02.war\WEB-INF\lib\paoding-landray.jar!\paoding-analyzer.properties;D:\Program Files\tomcat9.0.20\bin\file:\E:\idea_workSpace\jointsoon\20191025_ekp_v15\out\artifacts\Jia01.02.war\WEB-INF\lib\paoding-landray.jar!\paoding-dic-home.properties;E:\idea_workSpace\jointsoon\20191025_ekp_v15\out\artifacts\Jia01.02.war\WEB-INF\dic\paoding-dic-names.properties;D:\Program Files\tomcat9.0.20\bin\file:\E:\idea_workSpace\jointsoon\20191025_ekp_v15\out\artifacts\Jia01.02.war\WEB-INF\lib\paoding-landray.jar!\paoding-knives.properties;D:\Program Files\tomcat9.0.20\bin\file:\E:\idea_workSpace\jointsoon\20191025_ekp_v15\out\artifacts\Jia01.02.war\WEB-INF\lib\paoding-landray.jar!\paoding-knives-user.properties 2019-10-26 09:03:03,185 [INFO] ==== RMI TCP Connection(3)-127.0.0.1: net.paoding.analysis.knife.PaodingMaker.createPaodingWithKnives(456) add knike: net.paoding.analysis.knife.CJKKnife 2019-10-26 09:03:03,190 [INFO] ==== RMI TCP Connection(3)-127.0.0.1: net.paoding.analysis.knife.PaodingMaker.createPaodingWithKnives(456) add knike: net.paoding.analysis.knife.LetterKnife 2019-10-26 09:03:03,193 [INFO] ==== RMI TCP Connection(3)-127.0.0.1: net.paoding.analysis.knife.PaodingMaker.createPaodingWithKnives(456) add knike: net.paoding.analysis.knife.NumberKnife 2019-10-26 09:03:08,969 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:09,044 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:09,124 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:09,312 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:09,409 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:09,515 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:09,615 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:09,721 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:09,925 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:10,015 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:10,104 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:10,210 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:10,315 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:10,399 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:10,529 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:10,664 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:10,753 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:10,956 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,045 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,142 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,252 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,317 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,377 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,451 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,559 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,638 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,724 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,885 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:11,976 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:12,047 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:12,128 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:12,228 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:12,298 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:12,386 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:12,467 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 2019-10-26 09:03:12,542 [WARN] ==== RMI TCP Connection(3)-127.0.0.1: org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodForActualAccess(123) Invalid JavaBean property 'forwards' being accessed! Ambiguous write methods found next to actually used [public abstract void com.landray.kmss.common.actions.IStrutsActionSupport.setForwards(java.util.Map)]: [public final void com.landray.kmss.common.actions.AbstractActionController.setForwards(java.util.Map)] 二、一直在控制台打印这个,非常影响时间,怎么解决?
关于MySQL触发器的问题
``` CREATE TABLE `retailcatalog` ( `UUID` varchar(38) NOT NULL COMMENT '唯一标识,自动生成,为主键', `PRODUCTUUID` varchar(38) NOT NULL COMMENT '商品唯一标识,需要创建索引', `BEGINDATE` date NOT NULL COMMENT '起始时间', `ENDDATE` date NOT NULL COMMENT '截止时间', `PRICE` double(19,4) NOT NULL COMMENT '销售价', PRIMARY KEY (`UUID`), UNIQUE KEY `UQ_RETAILCATALOG_RetailcatalogID` (`UUID`,`PRODUCTUUID`), KEY `IX_retailcatalog_productUUID` (`PRODUCTUUID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ``` ``` CREATE TABLE `product` ( `UUID` varchar(38) NOT NULL, `CODE` varchar(20) NOT NULL COMMENT '代码,需要创建索引', `NAME` varchar(100) NOT NULL COMMENT '名称', `ORDERPRICE` double(19,4) DEFAULT NULL COMMENT '采购价', `SALEPRICE` double(19,4) DEFAULT NULL COMMENT '销售价(数据来源于 RETAILCATALOG 表)', `STATE` int(11) DEFAULT NULL COMMENT '状态 (0 为使用中, 999 为已删除 )', PRIMARY KEY (`UUID`), UNIQUE KEY `UUID` (`UUID`), KEY `IX_product_code` (`CODE`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ``` 有两张表,retailcatalog和product 有一个存储过程 ``` /* *将 RETAILCATALOG 上的 PRICE 数据同步到 PRODUCT 表上的 SALEPRICE */ drop procedure if exists proc_product_saleprice_state_update; create procedure proc_product_saleprice_state_update( in nowday date ) begin update product p, retailcatalog r set p.SALEPRICE=r.PRICE,p.STATE=0 where r.PRODUCTUUID = p.UUID and nowday >= r.BEGINDATE and nowday <= r.ENDDATE; update product p, retailcatalog r set p.SALEPRICE=0,p.STATE=999 where (r.PRODUCTUUID = p.UUID and (nowday < r.BEGINDATE or nowday > r.ENDDATE)) or not exists( select 1 from retailcatalog r where p.UUID = r.PRODUCTUUID); end; ``` a. 编写一个触发器,要求在修改销售目录( RETAILCATALOG )数据的 PRICE 之后,修改 PRODUCT 表的 SALEPRICE b. 编写一个触发器,要求在修改商品表( PRODUCT )数据的状态( STATE )之后,如果发现 STATE 为 999 ,则删除对应的 RETAILCATALOG 以下是我写的触发器 ``` /* *在修改销售目录( RETAILCATALOG )数据的 PRICE 之后,修改 PRODUCT 表的 SALEPRICE */ DROP TRIGGER IF EXISTS retailcatalog_after_update_price_on_product; CREATE TRIGGER retailcatalog_after_update_price_on_product AFTER UPDATE ON retailcatalog FOR EACH ROW BEGIN IF new.PRICE <> old.PRICE THEN UPDATE product p SET p.SALEPRICE = new.PRICE WHERE p.UUID = new.PRODUCTUUID; END IF; END; ``` ``` /* *在修改商品表( PRODUCT )数据的状态( STATE )之后,如果发现 STATE 为 999 ,则删除对应的 RETAILCATALOG */ DROP TRIGGER IF EXISTS product_after_update_state_on_retailcatalog; CREATE TRIGGER product_after_update_state_on_retailcatalog AFTER UPDATE ON product FOR EACH ROW BEGIN IF new.STATE = 999 THEN DELETE r FROM retailcatalog r WHERE ( r.PRODUCTUUID = new.UUID AND new.STATE = 999 ); END IF; END; ``` 当我运行存储过程时 call proc_product_salepriceAndstate_update(CURDATE()); 数据库报错 call proc_product_salepriceAndstate_update(CURDATE()) > 1442 - Can't update table 'retailcatalog' in stored function/trigger because it is already used by statement which invoked this stored function/trigger. 各位大神能指导下我应该如何改进吗?
_nwbsa_is_retryable_error是什么错误
N年前给客户做的一个考勤程序,delphi2005+sqlsever2000,直接在电脑上接读卡器刷卡,一直运行还不错。但是前一阵客户说现在经常是16:30下班刷卡的时候程序反应慢。通常是先刷几个人没问题,然后就突然反应慢了,过一会就又好了,之后就没问题了。前后一般也就几分钟的事,但是那个时候工人都挤在那等着刷卡,显得人很多。我查了一下事件查看器,在应用程序日志里每天总会有下面这样的错误: XBSA-1.0.1 rbnmsql522.Build.23 43440 Wed Dec 02 16:29:50 2015 _nwbsa_is_retryable_error: 收到了一个可重试的网络错误(严重性为 0,编号为 -13):需要重试 还有下面这样的: SQLVDI: Loc=TriggerAbort. Desc=invoked. ErrorCode=(0). Process=1468. Thread=8176. Server. Instance=MSSQLSERVER. VD=Global\Legato#e501901b-7d5b-47f7-9ce7-2fb2c5ea8f20. 以及这样的: 18210: BackupVirtualDeviceFile::RequestDurableMedia: 在备份设备“Legato#e501901b-7d5b-47f7-9ce7-2fb2c5ea8f20”上 Flush 失败。操作系统错误 995(由于线程退出或应用程序请求,已放弃 I/O 操作。)。 但是我在这个服务器上并没有这样的备份操作,数据库维护备份也刻意避开这个时间段,这会是什么原因呢,求大神解答
有线+无线混合模拟,NS2.35仿真报错
《NS网络模拟和协议仿真》书上的源代码如下: #无线节点参数 set val(chan) Channel/WirelessChannel ;# channel type 信道类型:无线信道 set val(prop) Propagation/TwoRayGround ;# radio-propagation model 信道模型:TwoRayGround set val(netif) Phy/WirelessPhy ;# network interface type 无线物理层 set val(mac) Mac/802_11 ;# MAC type MAC层协议 set val(ifq) Queue/DropTail/PriQueue ;# interface queue type set val(ll) LL ;# link layer type set val(ant) Antenna/OmniAntenna ;# antenna model set val(ifqlen) 50 ;# max packet in ifq set val(rp) DSDV ;#路由协议 set val(nn) 4 ;#节点数目 set val(x) 600 ; set val(y) 600 ; set val(stop) 10.0 ;# time of simulation end # 建立一个simulator实例 set ns [new Simulator] #设定分层路由地址 $ns node-config -addressType hierarchical AddrParams set domain_num_ 2 ;# 2个网络 lappend cluster_num 1 1 ;# 每个网络一个子网 AddrParams set cluster_num_ $cluster_num lappend eilastlevel 1 3 ;# 2个子网的节点数目为1和3 AddrParams set nodes_num_ $eilastlevel puts "Configuration of hierarchical addressing done" #$ns use-newtrace #设置trace set tracefd [open wired_wireless2.tr w] set namtrace [open wired_wireless2.nam w] $ns trace-all $tracefd $ns namtrace-all-wireless $namtrace $val(x) $val(y) #建立topology对象 set topo [new Topography] $topo load_flatgrid $val(x) $val(y) #创建god create-god $val(nn) set sinkNode [$ns node 0.0.0] $sinkNode set X_ 500 $sinkNode set Y_ 300 $sinkNode set Z_ 0 $ns initial_node_pos $sinkNode 60 set chan_1_ [new $val(chan)] #无线节点配置 $ns node-config -wiredRouting ON \ -adhocRouting $val(rp) \ -llType $val(ll) \ -macType $val(mac) \ -ifqType $val(ifq) \ -ifqLen $val(ifqlen) \ -antType $val(ant) \ -propType $val(prop) \ -phyType $val(netif) \ -channel $chan_1_ \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON \ -macTrace ON \ -movementTrace OFF #新建BS节点 set bs(0) [$ns node 1.0.0] $bs(0) random-motion 0 #节点标签与初始位置设定 $bs(0) set X_ 200.0 $bs(0) set Y_ 300.0 $bs(0) set Z_ 0.0 $ns initial_node_pos $bs(0) 60 #定义节点间的链路 $ns duplex-link $sinkNode $bs(0) 10Mb 1ms DropTail $ns duplex-link-op $sinkNode $bs(0) orient left #定义链路的队列长度 #$ns queue-limit $bs(0) $sinkNode 10 #监视链路的队列 #$ns duplex-link-op $bs(0) $sinkNode queuePos 0.5 $ns node-config -wiredRouting OFF \ -macType Mac/802_11 #新建SS节点 set ss(0) [$ns node 1.0.1] $ss(0) base-station [AddrParams addr2id [$bs(0) node-addr]] $ss(0) set X_ 50.0 $ss(0) set Y_ 450.0 $ss(0) set Z_ 0.0 $ns initial_node_pos $ss(0) 60 set ss(1) [$ns node 1.0.2] $ss(1) base-station [AddrParams addr2id [$bs(0) node-addr]] $ss(1) set X_ 50.0 $ss(1) set Y_ 150.0 $ss(1) set Z_ 0.0 $ns initial_node_pos $ss(1) 60 set udp0 [new Agent/UDP] $ns attach-agent $ss(0) $udp0 set null0 [new Agent/Null] $ns attach-agent $sinkNode $null0 $ns connect $udp0 $null0 set ugs0 [new Application/Traffic/UGS] $ugs0 attach-agent $udp0 set udp1 [new Agent/UDP] $ns attach-agent $sinkNode $udp1 set null1 [new Agent/Null] $ns attach-agent $ss(1) $null1 $ns connect $udp1 $null1 set ugs1 [new Application/Traffic/UGS] $ugs1 attach-agent $udp1 $ns at 0.5 "$ugs0 start" $ns at 1.0 "$ugs1 start" $ns at 9.0 "$ugs1 stop" $ns at 9.5 "$ugs0 stop" proc finish {} { global ns tracefd namtrace $ns flush-trace close $tracefd close $namtrace exit 0 } #事件安排 $ns at $val(stop) "finish" $ns at $val(stop) "puts \"NS EXISTING...\"; $ns halt" puts "Start Simulation..." # run the simulation $ns run **执行ns wired_wireless2.tcl ,报错如下: Configuration of hierarchical addressing done num_nodes is set 4 INITIALIZE THE LIST xListHead invalid command name "Application/Traffic/UGS" while executing "Application/Traffic/UGS create _o137 " invoked from within "catch "$className create $o $args" msg" invoked from within "if [catch "$className create $o $args" msg] { if [string match "__FAILED_SHADOW_OBJECT_" $msg] { delete $o return "" } global errorInfo error "class $..." (procedure "new" line 3) invoked from within "new Application/Traffic/UGS" invoked from within "set ugs0 [new Application/Traffic/UGS]" (file "wired_wireless2.tcl" line 115) 执行nam文件时,没有节点。请问怎么修改呢?
freeMarker问题,求高手
FreeMarker template error (HTML_DEBUG mode; use RETHROW in production!) Java method "org.apache.struts2.components.Form.getValidators(String)" threw an exception when invoked on org.apache.struts2.components.Form object "org.apache.struts2.components.Form@18fc07d"; see cause exception in the Java stack trace.
关于ruby的问题,如何按时间发送命令。
这是一个关于ruby的问题。其中一段代码如下。 ``` def switch_output(option_json) log_debug("switch_output command invoked") return send_command({command: "startNewOutputFile"}) end ``` 我需要把这个地方,改成每10分钟发送一次命令(command)。 ``` send_command({command: "startNewOutputFile"}) ``` 我问了原代码的作者,他给的建议如下。 My suggestion is for you to take a look at above daq.rb and learn how to connect to MessageServer via ZeroMQ in Ruby or Python, and then send the startNewOutputFile command at a rate you want (e.g. 1/600 Hz). 我建议您查看上面的daq.rb并了解如何通过Ruby或Python中的ZeroMQ连接到MessageServer,然后以您想要的时间速率发送startNewOutputFile命令(例如1/600 Hz)。 请各位大神帮助。 全部代码如下,文件名是dap.rb,需要改动的地方在最后。 ``` require "rbczmq" require "json" require "yaml" require "socket" require "growth_controller/logger" require "growth_controller/controller_module" module GROWTH class ControllerModuleDAQ < ControllerModule # TCP port number of growth_daq ZeroMQ server DAQ_ZMQ_PORT_NUMBER = 10020 def initialize(name, zmq_context, logger: nil) super(name, logger: logger) define_command("ping") define_command("stop") define_command("pause") define_command("resume") define_command("status") define_command("switch_output") @context = zmq_context connect() end private def connect() log_info("Connecting to DAQ ZeroMQ server...") @requester = @context.socket(ZMQ::REQ) begin @requester.connect("tcp://localhost:#{DAQ_ZMQ_PORT_NUMBER}") @requester.rcvtimeo = 1000 @requester.sndtimeo = 1000 log_info("Connected to DAQ ZeroMQ server") rescue log_error("Connection failed. It seems the DAQ program is not running") @requester = nil end end private def send_command(hash) # Connect if necessary if(@requester == nil)then connect() end if(@requester == nil)then return {status: "error", message: "Could not connect to DAQ ZeroMQ server"} end begin @requester.send(hash.to_json.to_s) rescue => e @requester.close @requester = nil log_warn("send_command() returning error (#{e})") return {status: "error", message: "ZeroMQ send failed (#{e})"} end return receive_reply() end private def receive_reply() begin reply_message = @requester.recv() return JSON.parse(reply_message) rescue => e @requester.close @requester = nil log_warn("receive_reply() returning error (#{e})") return {status: "error", message: "ZeroMQ communication failed (#{e}"} end end #--------------------------------------------- # Implemented commands #--------------------------------------------- def ping(option_json) log_debug("ping command invoked") return send_command({command: "ping"}) end def stop(option_json) log_debug("stop command invoked") return send_command({command: "stop"}) end def pause(option_json) log_debug("pause command invoked") return send_command({command: "pause"}) end def resume(option_json) log_debug("resume command invoked") return send_command({command: "resume"}) end def status(optionJSON) log_debug("status command invoked") return send_command({command: "getStatus"}) end def switch_output(option_json) log_debug("switch_output command invoked") return send_command({command: "startNewOutputFile"}) end end end ```
如何调用dll中类的方法
才学C++,正在研究dll动态调用,调用函数算是明白了,不知道怎么调用dll中类的方法,网上也没找到具体的实现。自己瞎想了一个办法,就是在包含类定义的dll中加一个返回该类实例指针的函数,再通过调用这个函数得到该类的实例指针。可是在调用类的方法时出错,信息如下: 2>ExeProj.obj : error LNK2019: unresolved external symbol "public: void __thiscall ClassA::M(void)" (?M@ClassA@@QAEXXZ) referenced in function _main 2>c:\users\administrator\documents\visual studio 2015\Projects\TestSln\Debug\ExeProj.exe : fatal error LNK1120: 1 unresolved externals dll中类的h文件如下: ``` #pragma once class ClassA { public: void M(); }; ``` dll中cpp文件如下: ``` #include <iostream> #include "ClassA.h" using namespace std; void ClassA::M() { cout << "I am invoked."; } extern "C" _declspec(dllexport) ClassA* CreatClassA() { return new ClassA; } ``` 调用程序cpp文件如下: ``` #include <Windows.h> #include <iostream> #include "../TestSln/ClassA.h" using namespace std; int main() { auto hmod = LoadLibrary("DllProj.dll"); if (hmod == NULL) { cout << "Load dll failed."; FreeLibrary(hmod); return 0; } auto hf = GetProcAddress(hmod, "CreatClassA"); if (hf == NULL) { cout << "Get funtion failed."; FreeLibrary(hmod); return 0; } typedef ClassA* (*pf)(); auto pClass = reinterpret_cast<pf>(hf)(); pClass->M(); FreeLibrary(hmod); delete pClass; return 0; } ``` 请专家指点: 1、调用dll中类的方法 的正确方法如何实现?烦请演示一下代码。 2、我的办法为什么出错?如何修正? 谢谢!
Win7采集摄像头数据显示图像回抖
开发环境:VS2015+qt5.7+相机驱动 实现方案:通过驱动配置回调函数,获取相机数据,然后把数据放入到数据缓冲区; 然后开启一个线程读取缓冲队列的数据,拷贝到一帧图像的缓冲块,并使用opengl(QOpenglWidget) 进行显示(updata()-onFrameSwapped()中emit render消息,次线程SLot进行显示)。 显示代码如下: void GLThreadWidget::UpdateShowImage() { update(); } void GLThreadWidget::onFrameSwapped() { m_renderer->unlockRenderer(); if (IsShowUpdateflag() == true) { emit renderRequested();//f发送消息 } } //槽函数 void Renderer::render() { if (m_exiting) return; bool needrender = m_glwidget->IsShowUpdateflag(); if (needrender == false) return; QImage * pimage = m_glwidget->GetCurImage(); if (pimage == nullptr) return; QOpenGLContext *ctx = m_glwidget->context(); if (!ctx) // QOpenGLWidget not yet initialized { m_glwidget->SetShowUpdateFlagFalse(); return; } if (ctx->thread() == QThread::currentThread()) { //qDebug() << "ctx->thread()" << ctx->thread(); m_glwidget->SetShowUpdateFlagFalse(); return; } // Grab the context. m_grabMutex.lock(); emit contextWanted(); m_grabCond.wait(&m_grabMutex); QMutexLocker lock(&m_renderMutex); m_grabMutex.unlock(); if (m_exiting) return; Q_ASSERT(ctx->thread() == QThread::currentThread()); // Make the context (and an offscreen surface) current for this thread. The // QOpenGLWidget's fbo is bound in the context. m_glwidget->makeCurrent(); if (!m_inited) { m_inited = true; initializeOpenGLFunctions(); initShaders(); initTextures(); initBuffArray(); } //initializeOpenGLFunctions(); GLfloat *pViewRect = m_glwidget->GetViewPortForRender(); glViewport(pViewRect[0], pViewRect[1], pViewRect[2], pViewRect[3]); glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glEnable(GL_CULL_FACE); glEnable(GL_DEPTH_TEST); // pimage = m_glwidget->GetCurImage(); int width; int height; m_glwidget->GetImageSize(width, height); m_texture->destroy(); m_texture->create(); m_texture->setSize(width, height); m_texture->setData((*pimage).mirrored()); m_program->bind(); m_texture->bind(); QMatrix4x4 m; this->m_program->setUniformValue(m_projviewUniform, m); this->m_program->setUniformValue(m_textureUniform, 0); // Draw cube geometry using indices from VBO 1 glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); m_texture->release(); m_program->release(); glDisable(GL_DEPTH_TEST); glDisable(GL_CULL_FACE); // Make no context current on this thread and move the QOpenGLWidget's // context back to the gui thread. m_glwidget->doneCurrent(); ctx->moveToThread(qGuiApp->thread()); // Schedule composition. Note that this will use QueuedConnection, meaning // that update() will be invoked on the gui thread. QMetaObject::invokeMethod(m_glwidget, "update", Qt::QueuedConnection); m_glwidget->SetShowUpdateFlagFalse(); // qDebug() << "render finished"; } 方案结果:刚开始能够正常显示,当手在移动的时候,图像也能实时的进行移动。但是 过一段时间之后,图像出现回抖现象。 比如说,手在移动的时候,能看出来显示后面的一帧图像时,又显示了前一帧图像, 看到就是手往回移了一点然后又立马往前移动。 针对此问题怀疑是数据缓冲区对列乱了,但通过使用序号验证, 读取数据用于显示时,显示的序号都是从小到大的,没有出现变小的情况。 异常现象视频:http://v.youku.com/v_show/id_XMzI0MDg5NjYyNA==.html?spm=a2h3j.8428770.3416059.1 正常现象视频:http://v.youku.com/v_show/id_XMzI0MDg5Mzg3Ng==.html?spm=a2h3j.8428770.3416059.1
终于明白阿里百度这样的大公司,为什么面试经常拿ThreadLocal考验求职者了
点击上面↑「爱开发」关注我们每晚10点,捕获技术思考和创业资源洞察什么是ThreadLocalThreadLocal是一个本地线程副本变量工具类,各个线程都拥有一份线程私有的数
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过...
《奇巧淫技》系列-python!!每天早上八点自动发送天气预报邮件到QQ邮箱
此博客仅为我业余记录文章所用,发布到此,仅供网友阅读参考,如有侵权,请通知我,我会删掉。 补充 有不少读者留言说本文章没有用,因为天气预报直接打开手机就可以收到了,为何要多此一举发送到邮箱呢!!!那我在这里只能说:因为你没用,所以你没用!!! 这里主要介绍的是思路,不是天气预报!不是天气预报!!不是天气预报!!!天气预报只是用于举例。请各位不要再刚了!!! 下面是我会用到的两个场景: 每日下
面试官问我:什么是消息队列?什么场景需要他?用了会出现什么问题?
你知道的越多,你不知道的越多 点赞再看,养成习惯 GitHub上已经开源 https://github.com/JavaFamily 有一线大厂面试点脑图、个人联系方式,欢迎Star和完善 前言 消息队列在互联网技术存储方面使用如此广泛,几乎所有的后端技术面试官都要在消息队列的使用和原理方面对小伙伴们进行360°的刁难。 作为一个在互联网公司面一次拿一次Offer的面霸,打败了无数
8年经验面试官详解 Java 面试秘诀
    作者 | 胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。   Java程序员准备和投递简历的实
究竟你适不适合买Mac?
我清晰的记得,刚买的macbook pro回到家,开机后第一件事情,就是上了淘宝网,花了500元钱,找了一个上门维修电脑的师傅,上门给我装了一个windows系统。。。。。。 表砍我。。。 当时买mac的初衷,只是想要个固态硬盘的笔记本,用来运行一些复杂的扑克软件。而看了当时所有的SSD笔记本后,最终决定,还是买个好(xiong)看(da)的。 已经有好几个朋友问我mba怎么样了,所以今天尽量客观
程序员一般通过什么途径接私活?
二哥,你好,我想知道一般程序猿都如何接私活,我也想接,能告诉我一些方法吗? 上面是一个读者“烦不烦”问我的一个问题。其实不止是“烦不烦”,还有很多读者问过我类似这样的问题。 我接的私活不算多,挣到的钱也没有多少,加起来不到 20W。说实话,这个数目说出来我是有点心虚的,毕竟太少了,大家轻喷。但我想,恰好配得上“一般程序员”这个称号啊。毕竟苍蝇再小也是肉,我也算是有经验的人了。 唾弃接私活、做外
大学四年自学走来,这些珍藏的「实用工具/学习网站」我全贡献出来了
知乎高赞:文中列举了互联网一线大厂程序员都在用的工具集合,涉及面非常广,小白和老手都可以进来看看,或许有新收获。
《阿里巴巴开发手册》读书笔记-编程规约
Java编程规约命名风格 命名风格 类名使用UpperCamelCase风格 方法名,参数名,成员变量,局部变量都统一使用lowerCamelcase风格 常量命名全部大写,单词间用下划线隔开, 力求语义表达完整清楚,不要嫌名字长 ...
Python爬虫爬取淘宝,京东商品信息
小编是一个理科生,不善长说一些废话。简单介绍下原理然后直接上代码。 使用的工具(Python+pycharm2019.3+selenium+xpath+chromedriver)其中要使用pycharm也可以私聊我selenium是一个框架可以通过pip下载 pip install selenium -i https://pypi.tuna.tsinghua.edu.cn/simple/ 
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
你知道的越多,你不知道的越多 点赞再看,养成习惯 本文 GitHub https://github.com/JavaFamily 已收录,有一线大厂面试点思维导图,也整理了很多我的文档,欢迎Star和完善,大家面试可以参照考点复习,希望我们一起有点东西。 前前言 为啥今天有个前前言呢? 因为你们的丙丙啊,昨天有牌面了哟,直接被微信官方推荐,知乎推荐,也就仅仅是还行吧(心里乐开花)
Java工作4年来应聘要16K最后没要,细节如下。。。
前奏: 今天2B哥和大家分享一位前几天面试的一位应聘者,工作4年26岁,统招本科。 以下就是他的简历和面试情况。 基本情况: 专业技能: 1、&nbsp;熟悉Sping了解SpringMVC、SpringBoot、Mybatis等框架、了解SpringCloud微服务 2、&nbsp;熟悉常用项目管理工具:SVN、GIT、MAVEN、Jenkins 3、&nbsp;熟悉Nginx、tomca
Python爬虫精简步骤1 获取数据
爬虫的工作分为四步: 1.获取数据。爬虫程序会根据我们提供的网址,向服务器发起请求,然后返回数据。 2.解析数据。爬虫程序会把服务器返回的数据解析成我们能读懂的格式。 3.提取数据。爬虫程序再从中提取出我们需要的数据。 4.储存数据。爬虫程序把这些有用的数据保存起来,便于你日后的使用和分析。 这一篇的内容就是:获取数据。 首先,我们将会利用一个强大的库——requests来获取数据。 在电脑上安装
Python绘图,圣诞树,花,爱心 | Turtle篇
1.画圣诞树 import turtle screen = turtle.Screen() screen.setup(800,600) circle = turtle.Turtle() circle.shape('circle') circle.color('red') circle.speed('fastest') circle.up() square = turtle.Turtle()
作为一个程序员,CPU的这些硬核知识你必须会!
CPU对每个程序员来说,是个既熟悉又陌生的东西? 如果你只知道CPU是中央处理器的话,那可能对你并没有什么用,那么作为程序员的我们,必须要搞懂的就是CPU这家伙是如何运行的,尤其要搞懂它里面的寄存器是怎么一回事,因为这将让你从底层明白程序的运行机制。 随我一起,来好好认识下CPU这货吧 把CPU掰开来看 对于CPU来说,我们首先就要搞明白它是怎么回事,也就是它的内部构造,当然,CPU那么牛的一个东
破14亿,Python分析我国存在哪些人口危机!
2020年1月17日,国家统计局发布了2019年国民经济报告,报告中指出我国人口突破14亿。 猪哥的朋友圈被14亿人口刷屏,但是很多人并没有看到我国复杂的人口问题:老龄化、男女比例失衡、生育率下降、人口红利下降等。 今天我们就来分析一下我们国家的人口数据吧! 更多有趣分析教程,扫描下方二维码关注vx公号「裸睡的猪」 即可查看! 一、背景 1.人口突破14亿 2020年1月17日,国家统计局发布
听说想当黑客的都玩过这个Monyer游戏(1~14攻略)
第零关 进入传送门开始第0关(游戏链接) 请点击链接进入第1关: 连接在左边→ ←连接在右边 看不到啊。。。。(只能看到一堆大佬做完的留名,也能看到菜鸡的我,在后面~~) 直接fn+f12吧 &lt;span&gt;连接在左边→&lt;/span&gt; &lt;a href="first.php"&gt;&lt;/a&gt; &lt;span&gt;←连接在右边&lt;/span&gt; o
在家远程办公效率低?那你一定要收好这个「在家办公」神器!
相信大家都已经收到国务院延长春节假期的消息,接下来,在家远程办公可能将会持续一段时间。 但是问题来了。远程办公不是人在电脑前就当坐班了,相反,对于沟通效率,文件协作,以及信息安全都有着极高的要求。有着非常多的挑战,比如: 1在异地互相不见面的会议上,如何提高沟通效率? 2文件之间的来往反馈如何做到及时性?如何保证信息安全? 3如何规划安排每天工作,以及如何进行成果验收? ......
作为一个程序员,内存和磁盘的这些事情,你不得不知道啊!!!
截止目前,我已经分享了如下几篇文章: 一个程序在计算机中是如何运行的?超级干货!!! 作为一个程序员,CPU的这些硬核知识你必须会! 作为一个程序员,内存的这些硬核知识你必须懂! 这些知识可以说是我们之前都不太重视的基础知识,可能大家在上大学的时候都学习过了,但是嘞,当时由于老师讲解的没那么有趣,又加上这些知识本身就比较枯燥,所以嘞,大家当初几乎等于没学。 再说啦,学习这些,也看不出来有什么用啊!
别低估自己的直觉,也别高估自己的智商
所有群全部吵翻天,朋友圈全部沦陷,公众号疯狂转发。这两周没怎么发原创,只发新闻,可能有人注意到了。我不是懒,是文章写了却没发,因为大家的关注力始终在这次的疫情上面,发了也没人看。当然,我...
这个世界上人真的分三六九等,你信吗?
偶然间,在知乎上看到一个问题 一时间,勾起了我深深的回忆。 以前在厂里打过两次工,做过家教,干过辅导班,做过中介。零下几度的晚上,贴过广告,满脸、满手地长冻疮。   再回首那段岁月,虽然苦,但让我学会了坚持和忍耐。让我明白了,在这个世界上,无论环境多么的恶劣,只要心存希望,星星之火,亦可燎原。   下文是原回答,希望能对你能有所启发。   如果我说,这个世界上人真的分三六九等,
为什么听过很多道理,依然过不好这一生?
记录学习笔记是一个重要的习惯,不希望学习过的东西成为过眼云烟。做总结的同时也是一次复盘思考的过程。 本文是根据阅读得到 App上《万维钢·精英日课》部分文章后所做的一点笔记和思考。学习是一个系统的过程,思维模型的建立需要相对完整的学习和思考过程。以下观点是在碎片化阅读后总结的一点心得总结。
B 站上有哪些很好的学习资源?
哇说起B站,在小九眼里就是宝藏般的存在,放年假宅在家时一天刷6、7个小时不在话下,更别提今年的跨年晚会,我简直是跪着看完的!! 最早大家聚在在B站是为了追番,再后来我在上面刷欧美新歌和漂亮小姐姐的舞蹈视频,最近两年我和周围的朋友们已经把B站当作学习教室了,而且学习成本还免费,真是个励志的好平台ヽ(.◕ฺˇд ˇ◕ฺ;)ノ 下面我们就来盘点一下B站上优质的学习资源: 综合类 Oeasy: 综合
如何优雅地打印一个Java对象?
你好呀,我是沉默王二,一个和黄家驹一样身高,和刘德华一样颜值的程序员。虽然已经写了十多年的 Java 代码,但仍然觉得自己是个菜鸟(请允许我惭愧一下)。 在一个月黑风高的夜晚,我思前想后,觉得再也不能这么蹉跎下去了。于是痛下决心,准备通过输出的方式倒逼输入,以此来修炼自己的内功,从而进阶成为一名真正意义上的大神。与此同时,希望这些文章能够帮助到更多的读者,让大家在学习的路上不再寂寞、空虚和冷。 ...
雷火神山直播超两亿,Web播放器事件监听是怎么实现的?
Web播放器解决了在手机浏览器和PC浏览器上播放音视频数据的问题,让视音频内容可以不依赖用户安装App,就能进行播放以及在社交平台进行传播。在视频业务大数据平台中,播放数据的统计分析非常重要,所以Web播放器在使用过程中,需要对其内部的数据进行收集并上报至服务端,此时,就需要对发生在其内部的一些播放行为进行事件监听。 那么Web播放器事件监听是怎么实现的呢? 01 监听事件明细表 名
3万字总结,Mysql优化之精髓
本文知识点较多,篇幅较长,请耐心学习 MySQL已经成为时下关系型数据库产品的中坚力量,备受互联网大厂的青睐,出门面试想进BAT,想拿高工资,不会点MySQL优化知识,拿offer的成功率会大大下降。 为什么要优化 系统的吞吐量瓶颈往往出现在数据库的访问速度上 随着应用程序的运行,数据库的中的数据会越来越多,处理时间会相应变慢 数据是存放在磁盘上的,读写速度无法和内存相比 如何优化 设计
Linux 命令(122)—— watch 命令
1.命令简介 2.命令格式 3.选项说明 4.常用示例 参考文献 [1] watch(1) manual
Linux 命令(121)—— cal 命令
1.命令简介 2.命令格式 3.选项说明 4.常用示例 参考文献 [1] cal(1) manual
记jsp+servlet+jdbc实现的新闻管理系统
1.工具:eclipse+SQLyog 2.介绍:实现的内容就是显示新闻的基本信息,然后一个增删改查的操作。 3.数据库表设计 列名 中文名称 数据类型 长度 非空 newsId 文章ID int 11 √ newsTitle 文章标题 varchar 20 √ newsContent 文章内容 text newsStatus 是否审核 varchar 10 news...
Python新型冠状病毒疫情数据自动爬取+统计+发送报告+数据屏幕(三)发送篇
今天介绍的项目是使用 Itchat 发送统计报告 项目功能设计: 定时爬取疫情数据存入Mysql 进行数据分析制作疫情报告 使用itchat给亲人朋友发送分析报告(本文) 基于Django做数据屏幕 使用Tableau做数据分析 来看看最终效果 目前已经完成,预计2月12日前更新 使用 itchat 发送数据统计报告 itchat 是一个基于 web微信的一个框架,但微信官方并不允
相关热词 c#导入fbx c#中屏蔽键盘某个键 c#正态概率密度 c#和数据库登陆界面设计 c# 高斯消去法 c# codedom c#读取cad文件文本 c# 控制全局鼠标移动 c# temp 目录 bytes初始化 c#
立即提问