```python a = [1] [dir(a)[i] for i in range(len(dir(a))) if (not dir(a)[i].startswith('_')) and callable(getattr(a, dir(a)[i]))] ``` 该怎么委婉地劝他滚蛋呢? 脑溢血, 该怎么, 犯了
招C++不,我跟他写的差不多,给钱就干 [ol] bool Driver::load( std::string path, std::string deviceName, std::string symbolName, unsigned long startOptions ) { SC_HANDLE hSCManager = OpenSCManagerA(NULL, NULL, startOptions); if (!hSCManager) { m_error = GetLastError(); return false; } SC_HANDLE hService = CreateServiceA(hSCManager, m_serviceName.c_str(), m_serviceName.c_str(), SERVICE_ALL_ACCESS, SERVICE_KERNEL_DRIVER, startOptions, SERVICE_ERROR_IGNORE, m_path.c_str(), 0, 0, 0, 0, 0); if (hService == NULL) { if (ERROR_SERVICE_EXISTS == GetLastError()) { hService = OpenServiceA(hSCManager, m_serviceName.c_str(), SERVICE_ALL_ACCESS); if (hService == NULL) { CloseServiceHandle(hSCManager); m_error = GetLastError(); return false; } } else { if (ERROR_SERVICE_MARKED_FOR_DELETE == GetLastError() || ERROR_DUPLICATE_SERVICE_NAME == GetLastError()) { hService = OpenServiceA(hSCManager, m_serviceName.c_str(), SERVICE_ALL_ACCESS); if (hService == NULL) { CloseServiceHandle(hSCManager); m_error = GetLastError(); return false; } SERVICE_STATUS status; ControlService(hService, SERVICE_CONTROL_STOP,&status); DeleteService(hService); CloseServiceHandle(hService); CloseServiceHandle(hSCManager); hSCManager = OpenSCManagerA(NULL, NULL, SC_MANAGER_ALL_ACCESS); if (hSCManager == NULL) { m_error = GetLastError(); return false; } hService = CreateServiceA(hSCManager, m_serviceName.c_str(), m_serviceName.c_str(), SERVICE_ALL_ACCESS, SERVICE_KERNEL_DRIVER, startOptions, SERVICE_ERROR_IGNORE, m_path.c_str(), 0, 0, 0, 0, 0); if (hService == NULL) { CloseServiceHandle(hSCManager); m_error = GetLastError(); return false; } } else { m_path = ""; m_deviceHandle = NULL; CloseServiceHandle(hSCManager); m_error = GetLastError(); return false; } } } if (StartServiceA(hService, NULL, NULL) == 0) { if (ERROR_SERVICE_ALREADY_RUNNING != GetLastError()) { CloseServiceHandle(hService); CloseServiceHandle(hSCManager); m_path = ""; m_error = GetLastError(); return false; } } m_deviceHandle = CreateFileA(("\\\\.\" + m_symbolName).c_str(),GENERIC_READ|GENERIC_WRITE, NULL, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,NULL); if (m_deviceHandle == NULL) { SERVICE_STATUS status; ControlService(hService, SERVICE_CONTROL_STOP, &status); DeleteService(hService); CloseServiceHandle(hService); CloseServiceHandle(hSCManager); m_path = ""; m_error = GetLastError(); return false; } CloseServiceHandle(hService); CloseServiceHandle(hSCManager); return true; } [/ol]复制代码
千牛 发表于 2024-7-10 16:55 就不能特么的写的正常人能理解的吗,搞那么长秀技术牛逼? 可能技术还行,但是过分去装了 ... 也没看来他有技术啊,和他说了一万次了别tm写这种又臭又长的了… 这种到底是提前和HR说,还是最后他实习结束的时候给个“一般,不留用”的评价啊