求一boost正则表达式,能获取多层花括号中的每一层花括号的内容 10C

如题,求一boost正则表达式,能获取多层花括号中的每一层花括号的内容,例如

When(A=B)
{
if(C=d)
{
Test =1
}
if(F=g)
{
Test=0
}
}

希望能获取最外层花括号之间内容,以及内层花括号之间的内容。而且花括号数目及层数不限。求大神帮忙。

2个回答

不明白 RegularExpressionValidator

to qq_35905323 :
什么意思啊?RegularExpressionValidator这个是不是.net中的呀?具体的正则表达式应该怎么写

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
用boost库中的正则表达式匹配函数regex_match(),字符串长一点,匹配失败会出现异常
使用用boost库中的正则表达式匹配函数regex_match(),当字符串长一点,并且匹配失败时会出现异常。 如果配匹的字符串短一点就没问题,这里用"RtkAudio64.exe" ``` #include "stdafx.h" #include <boost/regex.hpp> #include<string> #include<iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { string sz = "(\\w+)*a(\\w+)*.(\\w+)"; boost::regex reg(sz); bool r = boost::regex_match("RtkAudio64.exe", reg);//正则表达式匹配 cout << r; return 0; } ``` 如果匹配的字符串长一点,这里用"RtkServiceAudio64.exe",而且匹配失败,就会出错 ``` #include "stdafx.h" #include <boost/regex.hpp> #include<string> #include<iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { string sz = "(\\w+)*a(\\w+)*.(\\w+)"; boost::regex reg(sz); bool r = boost::regex_match("RtkServiceAudio64.exe", reg);//正则表达式匹配 cout << r; return 0; } ``` ![图片说明](https://img-ask.csdn.net/upload/201904/26/1556287110_283036.png) 这是为什么呢...求大家指点!
用vcpkg安装软件包失败./vcpkg install opencv boost
![图片说明](https://img-ask.csdn.net/upload/202002/05/1580915496_926557.png) 在powershell中安装第三方库的时候显示 Building package boost-regex:x64-windows failed with: BUILD_FAILED 我尝试过将vs2017设置成英文 也下载了cmake相关插件 ![图片说明](https://img-ask.csdn.net/upload/202002/05/1580915633_103415.png) 求求大佬们解答一下这个问题!~~
Linux下用ccmake编译boost库报错
问题:Linux下用ccmake编译boost库报错,cmake以及ccmake为3.16.3,boost为1_70。出现了为未知错误 官网教程:http://esa.github.io/pygmo/index.html 在Pygmo的环境配置上出了问题!! 求助!!! ![图片说明](https://img-ask.csdn.net/upload/202002/06/1580959145_407818.png)![图片说明](https://img-ask.csdn.net/upload/202002/06/1580959153_107428.png)
关于cvxopt在C语言中使用的问题?
最近想用C语言进行凸优化,凸优化工具箱用的是python中的cvxopt(因为官网上有using from C的example)。 但是将cvxopt安装到python后,打开官网的测试代码还是报错无法打开cvxopt.h 提问:安装到python后,是否已生成cvxopt.h?如果有,路径一般在哪里?如果没有,应该怎么生成? 编译环境:vs2019+python3.7(64bits)+boost1.72.0 附官网代码: ``` /* A modified version of the example in the Python documentation: http://docs.python.org/ext/pure-embedding.html Solves the LP: minimize -4*x1 -5*x2 subject 2*x1 + x2 <= 3 x1 + 2*x2 <= 3 x1 >= 0, x2 >= 0 and prints the solution from C. On Ubuntu Linux compile with: gcc -o embed_cvxopt embed_cvxopt.c \ -I${CVXOPT_SRC}/C \ -I/usr/include/python2.4 -lpython2.4 */ #include "cvxopt.h" int main(int argc, char *argv[]) { Py_Initialize(); if (import_cvxopt() < 0) { fprintf(stderr, "error importing cvxopt"); return 1; } /* import cvxopt.solvers */ PyObject *solvers = PyImport_ImportModule("cvxopt.solvers"); if (!solvers) { fprintf(stderr, "error importing cvxopt.solvers"); return 1; } /* get reference to solvers.solvelp */ PyObject *lp = PyObject_GetAttrString(solvers, "lp"); if (!lp) { fprintf(stderr, "error referencing cvxopt.solvers.lp"); Py_DECREF(solvers); return 1; } /* create matrices */ PyObject *c = (PyObject *)Matrix_New(2, 1, DOUBLE); PyObject *G = (PyObject *)Matrix_New(4, 2, DOUBLE); PyObject *h = (PyObject *)Matrix_New(4, 1, DOUBLE); PyObject *pArgs = PyTuple_New(3); if (!c || !G || !h || !pArgs) { fprintf(stderr, "error creating matrices"); Py_DECREF(solvers); Py_DECREF(lp); Py_XDECREF(c); Py_XDECREF(G); Py_XDECREF(h); Py_XDECREF(pArgs); return 1; } MAT_BUFD(c)[0] = -4; MAT_BUFD(c)[1] = -5; MAT_BUFD(G)[0] = 2; MAT_BUFD(G)[1] = 1; MAT_BUFD(G)[2] = -1; MAT_BUFD(G)[4] = 1; MAT_BUFD(G)[5] = 2; MAT_BUFD(G)[7] = -1; MAT_BUFD(h)[0] = 3; MAT_BUFD(h)[1] = 3; /* pack matrices into an argument tuple - references are stolen*/ PyTuple_SetItem(pArgs, 0, c); PyTuple_SetItem(pArgs, 1, G); PyTuple_SetItem(pArgs, 2, h); PyObject *sol = PyObject_CallObject(lp, pArgs); if (!sol) { PyErr_Print(); Py_DECREF(solvers); Py_DECREF(lp); Py_DECREF(pArgs); return 1; } PyObject *x = PyDict_GetItemString(sol, "x"); fprintf(stdout, "\n\nx = (%5.4e, %5.4e)\n", MAT_BUFD(x)[0], MAT_BUFD(x)[1]); Py_DECREF(solvers); Py_DECREF(lp); Py_DECREF(pArgs); Py_DECREF(sol); Py_Finalize(); return 0; } ```
正则表达式匹配html标签内的内容
例如标签如下 <div class="tour-title"> <h3 >这里是要匹配的内容,但是可能包括<这个符号</h3> 我想匹配的内容是“这里是要匹配的内容,但是可能包括<这个符号” 我原本用的正则式 boost::regex re("<\\s*div\\s*class\\s*=\\s*\"tour-title\"\\s*>\\s*<\\s*h3\\s*>([^<]*)<\\s*/\\s*h3\\s*>", boost::regex::normal | boost::regbase::icase); 这个正则式在内容里面包括“<”这个符号时会出问题吧,那应该怎么处理好呢?
Elasticsearch nested 嵌套分词查询返回结果不准确
通过ES分词搜索文档的标题和内容,标题和内容这两个字段是分词的text字段。 因为一个文档时多语言的,所以mapping设置是嵌套的,但是搜索出来的结果并不是我期望的。 ```json { "mappings": { "properties": { "title": { // 标题字段 "type": "nested", "properties": { "lang": { // 语种字段,"zh/en/ja..." "type": "keyword" }, "value": { // 标题对应的值 "type": "text", "search_analyzer": "ik_max_word", "analyzer": "ik_max_word", "fields": { "keyword": { "ignore_above": 256, "type": "keyword" } } } } }, "content": { // 正文内容 "type": "nested", "properties": { "lang": { "type": "keyword" }, "value": { "type": "text", "search_analyzer": "ik_max_word", "analyzer": "ik_max_word", "fields": { "keyword": { "ignore_above": 256, "type": "keyword" } } } } }, "baseCode": { //属于某个知识库下 "type": "keyword" }, "knowledgeId": { // 唯一ID "type": "long" }, "order": { // 序号 "type": "integer" }, "publish": { // 发布状态 "type": "integer" }, "status": { // 逻辑删除,0删除1存在 "type": "integer" } } } } ``` 这个是查询条件: ```json { "query": { "bool": { "must": [{ "bool": { "should": [{ "nested": { "query": { "bool": { "must": [{ "term": { "title.lang": { "value": "zh", "boost": 1 } } }, { "match": { "title.value": { "query": "测试", "operator": "OR", "prefix_length": 0, "max_expansions": 50, "fuzzy_transpositions": true, "lenient": false, "zero_terms_query": "NONE", "auto_generate_synonyms_phrase_query": true, "boost": 1.5 } } } ], "adjust_pure_negative": true, "boost": 1.5 } }, "path": "title", "ignore_unmapped": false, "score_mode": "avg", "boost": 2 } }, { "nested": { "query": { "bool": { "must": [{ "term": { "content.lang": { "value": "zh", "boost": 1 } } }, { "match": { "content.value": { "query": "测试", "operator": "OR", "prefix_length": 0, "max_expansions": 50, "fuzzy_transpositions": true, "lenient": false, "zero_terms_query": "NONE", "auto_generate_synonyms_phrase_query": true, "boost": 1 } } } ], "adjust_pure_negative": true, "boost": 1 } }, "path": "content", "ignore_unmapped": false, "score_mode": "avg", "boost": 1 } } ], "adjust_pure_negative": true, "boost": 2 } }, { "term": { "status": { "value": 1, "boost": 1 } } }, { "term": { "categoryType": { "value": 0, "boost": 1 } } }, { "term": { "baseCode": { "value": "B8rqalut2bajk", "boost": 1 } } }, { "term": { "publish": { "value": 1, "boost": 1 } } }, { "term": { "isOpen": { "value": 1, "boost": 1 } } } ], "adjust_pure_negative": true, "boost": 1 } } } ``` 期望结果是标题是“测试标题并有多个测试词语”的数据在第一个,因为标题和内容都匹配到了,并且次数最多。但是第一条返回的并不是这条。 ![图片说明](https://img-ask.csdn.net/upload/202001/31/1580472299_2137.png) 但实际返回的第一条数据是这个: ![图片说明](https://img-ask.csdn.net/upload/202001/31/1580472386_601750.png) 怎么样才能返回第一条是我想要的数据呢?
mysql connector c++ 抛出异常
我在官网下了mysql-connector-c++-8.0.17之后跑官网上的例程,抛出了下面这个错误: Connector/C++ standalone program example... Creating session on tcp://127.0.0.1 ... terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc 已放弃 (核心已转储) 我想知道是哪里出了问题,应该怎么解决 我用的系统是Ubuntu 18.04.4 下面是我的cmake ``` cmake_minimum_required(VERSION 3.10) project(SERVER) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) # Boost Library set(BOOST_INC_DIR /usr/local/include) set(BOOST_LIB_DIR /usr/local/lib) include_directories(${BOST_INC_DIR}) link_directories(${BOOST_LIB_DIR}) add_subdirectory(src) ``` ``` # Class MySqlConnector referenced by Class MySqlSession set(MYSQLCONNECTOR_LIB_DIR /usr/local/lib/mysql-connector-c++) set(MYSQLCONNECTOR_INC_DIR /usr/local/include) set(MYSQLCONNECTOR_SRC mysqlcppconn) include_directories(${MYSQLCONNECTOR_INC_DIR} ${SQL_INC_DIR}) link_directories(${MYSQLCONNECTOR_LIB_DIR}) add_executable(Server main.cpp) target_link_libraries(Server ${MYSQLCONNECTOR_SRC}) ``` ``` /* * Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2.0, as * published by the Free Software Foundation. * * This program is also distributed with certain software (including * but not limited to OpenSSL) that is licensed under separate terms, * as designated in a particular file or component or in included license * documentation. The authors of MySQL hereby grant you an * additional permission to link the program and your derivative works * with the separately licensed software that they have included with * MySQL. * * Without limiting anything contained in the foregoing, this file, * which is part of MySQL Connector/C++, is also subject to the * Universal FOSS Exception, version 1.0, a copy of which can be found at * http://oss.oracle.com/licenses/universal-foss-exception. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU General Public License, version 2.0, for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /* Basic example of an application using JDBC API of Connector/C++ */ /* Standard C++ includes */ #include <stdlib.h> #include <iostream> #include <sstream> #include <stdexcept> /* Note: Boost must be in the include path to build code which uses the JDBC API. */ #include <boost/scoped_ptr.hpp> #include <mysql/jdbc.h> #define DEFAULT_URI "tcp://127.0.0.1" #define EXAMPLE_USER "root" #define EXAMPLE_PASS "" #define EXAMPLE_DB "test" using namespace std; /* Usage example for Driver, Connection, (simple) Statement, ResultSet */ int main(int argc, const char **argv) { const char *url = (argc > 1 ? argv[1] : DEFAULT_URI); const string user(argc >= 3 ? argv[2] : EXAMPLE_USER); const string pass(argc >= 4 ? argv[3] : EXAMPLE_PASS); const string database(argc >= 5 ? argv[4] : EXAMPLE_DB); cout << endl; cout << "Connector/C++ standalone program example..." << endl; cout << endl; try { sql::Driver * driver = sql::mysql::get_driver_instance(); /* Using the Driver to create a connection */ cout << "Creating session on " << url << " ..." << endl << endl; boost::scoped_ptr< sql::Connection > con(driver->connect(url, user, pass)); con->setSchema(database); boost::scoped_ptr< sql::Statement > stmt(con->createStatement()); boost::scoped_ptr< sql::ResultSet > res(stmt->executeQuery("SELECT 'Welcome to Connector/C++' AS _message")); cout << "\t... running 'SELECT 'Welcome to Connector/C++' AS _message'" << endl; while (res->next()) { cout << "\t... MySQL replies: " << res->getString("_message") << endl; cout << "\t... say it again, MySQL" << endl; cout << "\t....MySQL replies: " << res->getString(1) << endl; } } catch (sql::SQLException &e) { /* The JDBC API throws three different exceptions: - sql::MethodNotImplementedException (derived from sql::SQLException) - sql::InvalidArgumentException (derived from sql::SQLException) - sql::SQLException (derived from std::runtime_error) */ cout << "# ERR: SQLException in " << __FILE__; cout << "(" << "EXAMPLE_FUNCTION" << ") on line " << __LINE__ << endl; /* Use what() (derived from std::runtime_error) to fetch the error message */ cout << "# ERR: " << e.what(); cout << " (MySQL error code: " << e.getErrorCode(); cout << ", SQLState: " << e.getSQLState() << " )" << endl; return EXIT_FAILURE; } cout << endl; cout << "... find more at http://www.mysql.com" << endl; cout << endl; return EXIT_SUCCESS; } ```
boost asio实现的TCP异步服务端,如何主动发送数据。
在使用boost做tcp异步服务端时,看到网上的例子都是在收到客户端的数据后触发回调函数。现在我想在我的程序里如何主动调用发送函数。 比如,我按照网上的例子 (链接:https://blog.csdn.net/caoshangpa/article/details/79412096)写了一个异步服务端的类,那么在io_service.run被执行后,如何调用发送函数。
Boost Note 的全新版本(β版)体验如何?
Boost Note的全新版本(β版)开放了! - 云功能(因为使用了CouchDB,离线也可以使用。云功能并不是必须的,您也可以继续使用本地存储) - 复数目录阶段构造(可以创建无限的子文件夹) - 多设备化(网页·桌面软件·手机软件) 关于本次的公开以及技术规格都记录在以下的GitHub issue里。
这样的coredump如何定位问题,求大神指导
# 一个服务程序,平均一天挂一次,coredump内容都已一样,分析不出来 ``` c++ Program terminated with signal 11, Segmentation fault. #0 SLL_Next (t=0x2) at src/linked_list.h:45 45 src/linked_list.h: No such file or directory. Missing separate debuginfos, use: debuginfo-install glibc-2.17-260.el7.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.15.1-34.el7.x86_64 libcom_err-1.42.9-13.el7.x86_64 libgcc-4.8.5-36.el7.x86_64 libselinux-2.5-14.1.el7.x86_64 libstdc++-4.8.5-36.el7.x86_64 nspr-4.19.0-1.el7_5.x86_64 nss-3.36.0-7.el7_5.x86_64 openldap-2.4.44-20.el7.x86_64 pcre-8.32-17.el7.x86_64 zlib-1.2.7-18.el7.x86_64 (gdb) bt #0 SLL_Next (t=0x2) at src/linked_list.h:45 #1 SLL_TryPop (rv=<synthetic pointer>, list=0x1f9c080) at src/linked_list.h:69 #2 TryPop (rv=<synthetic pointer>, this=0x1f9c080) at src/thread_cache.h:220 #3 Allocate (cl=4, size=48, this=<optimized out>) at src/thread_cache.h:381 #4 malloc_fast_path<tcmalloc::allocate_full_cpp_throw_oom> (size=<optimized out>) at src/tcmalloc.cc:1751 #5 tc_new (size=<optimized out>) at src/tcmalloc.cc:1851 #6 0x00007fd6bf3bca19 in std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) () from /lib64/libstdc++.so.6 #7 0x00007fd6c2c3842d in char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag) () from ./lib/libcpprest.so.2.10 #8 0x00007fd6bf3be6d8 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) () from /lib64/libstdc++.so.6 #9 0x000000000069b836 in InformationCommand::Process (this=0x7ec8a38, task=..., response=@0x7fd58890f3f8: 0x0) at src/modules/DataCommand/InformationCommand.cpp:74 #10 0x0000000000724c62 in ThreadPoolGateway::task (this=0x252bda0, task=0x3b792f0) at src/modules/Servers/impl/ThreadPoolGateway.cpp:115 #11 0x0000000000726306 in boost::_mfi::mf1<void, ThreadPoolGateway, HDConstants::TaskDef*>::operator() (this=0x606ac40, p=0x252bda0, a1=0x3b792f0) at /usr/local/include/boost/bind/mem_fn_template.hpp:165 #12 0x00000000007261fd in boost::_bi::list2<boost::_bi::value<ThreadPoolGateway*>, boost::_bi::value<HDConstants::TaskDef*> >::operator()<boost::_mfi::mf1<void, ThreadPoolGateway, HDConstants::TaskDef*>, boost::_bi::list0> (this=0x606ac50, f=..., a=...) at /usr/local/include/boost/bind/bind.hpp:319 #13 0x0000000000725fc5 in boost::_bi::bind_t<void, boost::_mfi::mf1<void, ThreadPoolGateway, HDConstants::TaskDef*>, boost::_bi::list2<boost::_bi::value<ThreadPoolGateway*>, boost::_bi::value<HDConstants::TaskDef*> > >::operator() (this=0x606ac40) at /usr/local/include/boost/bind/bind.hpp:1294 #14 0x0000000000725eea in boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void, boost::_mfi::mf1<void, ThreadPoolGateway, HDConstants::TaskDef*>, boost::_bi::list2<boost::_bi::value<ThreadPoolGateway*>, boost::_bi::value<HDConstants::TaskDef*> > >, void>::invoke (function_obj_ptr=...) at /usr/local/include/boost/function/function_template.hpp:159 #15 0x0000000000660f7e in boost::function0<void>::operator() (this=0x7fd58890fa80) at /usr/local/include/boost/function/function_template.hpp:760 ---Type <return> to continue, or q <return> to quit--- #16 0x000000000067cc94 in boost::threadpool::detail::pool_core<boost::function0<void>, boost::threadpool::fifo_scheduler, boost::threadpool::static_size, boost::threadpool::resize_controller, boost::threadpool::wait_for_all_tasks>::execute_task (this=0x258c180) at /usr/local/include/boost/threadpool/detail/pool_core.hpp:440 #17 0x000000000067bd44 in boost::threadpool::detail::worker_thread<boost::threadpool::detail::pool_core<boost::function0<void>, boost::threadpool::fifo_scheduler, boost::threadpool::static_size, boost::threadpool::resize_controller, boost::threadpool::wait_for_all_tasks> >::run (this=0x25a0150) at /usr/local/include/boost/threadpool/detail/worker_thread.hpp:82 #18 0x000000000067f4ee in boost::_mfi::mf0<void, boost::threadpool::detail::worker_thread<boost::threadpool::detail::pool_core<boost::function0<void>, boost::threadpool::fifo_scheduler, boost::threadpool::static_size, boost::threadpool::resize_controller, boost::threadpool::wait_for_all_tasks> > >::call<boost::shared_ptr<boost::threadpool::detail::worker_thread<boost::threadpool::detail::pool_core<boost::function0<void>, boost::threadpool::fifo_scheduler, boost::threadpool::static_size, boost::threadpool::resize_controller, boost::threadpool::wait_for_all_tasks> > > > (this=0x2571298, u=...) at /usr/local/include/boost/bind/mem_fn_template.hpp:40 #19 0x000000000067f473 in boost::_mfi::mf0<void, boost::threadpool::detail::worker_thread<boost::threadpool::detail::pool_core<boost::function0<void>, boost::threadpool::fifo_scheduler, boost::threadpool::static_size, boost::threadpool::resize_controller, boost::threadpool::wait_for_all_tasks> > >::operator()<boost::shared_ptr<boost::threadpool::detail::worker_thread<boost::threadpool::detail::pool_core<boost::function0<void>, boost::threadpool::fifo_scheduler, boost::threadpool::static_size, boost::threadpool::resize_controller, boost::threadpool::wait_for_all_tasks> > > > (this=0x2571298, u=...) at /usr/local/include/boost/bind/mem_fn_template.hpp:55 #20 0x000000000067f41e in boost::_bi::list1<boost::_bi::value<boost::shared_ptr<boost::threadpool::detail::worker_thread<boost::threadpool::detail::pool_core<boost::function0<void>, boost::threadpool::fifo_scheduler, boost::threadpool::static_size, boost::threadpool::resize_controller, boost::threadpool::wait_for_all_tasks> > > > >::operator()<boost::_mfi::mf0<void, boost::threadpool::detail::worker_thread<boost::threadpool::detail::pool_core<boost::function0<void>, boost::threadpool::fifo_scheduler, boost::threadpool::static_size, boost::threadpool::resize_controller, boost::threadpool::wait_for_all_tasks> > >, boost::_bi::list0> (this=0x25712a8, f=..., a=...) at /usr/local/include/boost/bind/bind.hpp:259 #21 0x000000000067f303 in boost::_bi::bind_t<void, boost::_mfi::mf0<void, boost::threadpool::detail::worker_thread<boost::threadpool::detail::pool_core<boost::function0<void>, boost::threadpool::fifo_scheduler, boost::threadpool::static_size, boost::threadpool::resize_controller, boost::threadpool::wait_for_all_tasks> > >, boost::_bi::list1<boost::_bi::value<boost::shared_ptr<boost::threadpool::detail::worker_thread<boost::threadpool::detail::pool_core<boost::function0<void>, boost::threadpool::fifo_scheduler, boost::threadpool::static_size, boost::threadpool::resize_controller, boost::threadpool::wait_for_all_tasks> > > > > >::operator() (this=0x2571298) at /usr/local/include/boost/bind/bind.hpp:1294 #22 0x000000000067f0ee in boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf0<void, boost::threadpool::detail::worker_---Type <return> to continue, or q <return> to quit--- thread<boost::threadpool::detail::pool_core<boost::function0<void>, boost::threadpool::fifo_scheduler, boost::threadpool::static_size, boost::threadpool::resize_controller, boost::threadpool::wait_for_all_tasks> > >, boost::_bi::list1<boost::_bi::value<boost::shared_ptr<boost::threadpool::detail::worker_thread<boost::threadpool::detail::pool_core<boost::function0<void>, boost::threadpool::fifo_scheduler, boost::threadpool::static_size, boost::threadpool::resize_controller, boost::threadpool::wait_for_all_tasks> > > > > > >::run ( this=0x25710e0) at /usr/local/include/boost/thread/detail/thread.hpp:116 #23 0x00007fd6bfa826d9 in thread_proxy () from ./lib/libboost_thread.so.1.64.0 #24 0x00007fd6bfeabdd5 in start_thread () from /lib64/libpthread.so.0 #25 0x00007fd6beb17ead in clone () from /lib64/libc.so.6 (gdb) (gdb) (gdb) f 9 #9 0x000000000069b836 in InformationCommand::Process (this=0x7ec8a38, task=..., response=@0x7fd58890f3f8: 0x0) at src/modules/DataCommand/InformationCommand.cpp:74 74 src/modules/DataCommand/InformationCommand.cpp: No such file or directory. (gdb) p task $1 = (const HDConstants::TaskDef &) @0x3b792f0: {data = 0x4537b60, socket = 0x3122000, clientAddr = 3748199939, clientPort = 33385, msgType = (unknown: 0), protocol = 2} (gdb) p task.data.size $2 = 71 (gdb) p serialNum $3 = 4623 (gdb) ``` ![Core源码位置](https://img-ask.csdn.net/upload/201912/05/1575510670_285044.png)
fatal error: boost/python.hpp: No such file or directory
本来想将crf装到Python3版本下面,所以把之前的Python2.7给卸载了,但它只能在Python2上运行,之后又照网上的方法把它安装好了,但是又出现了下面的错误: ``` fatal error: boost/python.hpp: No such file or directory ``` 不知道如何解决,崩溃...... 求大神解答......
caffe编译:compute_image_mean.cpp:(.text.startup+0x2f):对‘boost::system::generic_category()’未定义的引用
caffe编译: compute_image_mean.cpp:(.text.startup+0x2f):对‘boost::system::generic_category()’未定义的引用 ![图片说明](https://img-ask.csdn.net/upload/201911/28/1574900443_165848.png) 求大神解决
fatal error: boost/python/numpy.hpp: No such file or directory
哪个大神能解决这个问题,感激不尽!!! ``` fatal error: boost/python/numpy.hpp: No such file or directory ```
python用lgb时报错——Do not support non-ascii characters in feature name.
最后一行lgb=LGB.train....执行时候就报错:LightGBMError: Do not support non-ascii characters in feature name.这是为什么啊,别人的代码可以执行,我就不行,该怎解?决 import lightgbm as LGB params = { 'objective': 'binary', "boosting" : "gbdt", 'num_leaves': 4, 'min_data_in_leaf': 20, "subsample": 0.9, "colsample_bytree": 0.8, 'learning_rate':0.09, 'tree_learner': 'voting', 'metric': 'auc' } dtrain = LGB.Dataset(X_train, y_train, categorical_feature=col) dtest = LGB.Dataset(X_test, y_test, reference=dtrain, categorical_feature=col) lgb = LGB.train(params, dtrain, valid_sets=[dtrain, dtest], num_boost_round=3000, early_stopping_rounds=100, verbose_eval=10)
我想在 wp8 上使用boost库,但是不知道怎么编译出arm 的lib库,有谁知道吗?
我想在 wp8 上使用boost库,但是不知道怎么编译出arm 的lib库,尝试了很多方法多不能编译, 使用 b2 toolset=msvc-11.0 architecture=arm address-model=32 cxxflags="-DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP" stage 命令,只能编译成功几个库,线程库,data_time,正则表达式库等都不能生成,有很多错误。 有谁能在wp8上使用boost库吗?
在ros上实时运行视觉slam,保存地图问题
环境:ubuntu16.04, ros kinetic, kinect v1 问题描述: 使用Kinect v1相机实时的运行由orb_slam2系统修改之后的视觉slam系统,现在无法保存运行之和的地图。有大神能帮助解决吗?最好给出具体代码 代码: ``` ```int main(int argc, char **argv) { ros::init(argc, argv, "RGBD"); ros::start(); if(argc != 3) { cerr << endl << "Usage: 1111" << endl; ros::shutdown(); return 1; } // 创建SLAM系统,并初始化所有的线程 ``` ``` orb_slam::System SLAM(argv[1],argv[2],orb_slam::System::RGBD,true); ImageGrabber igb(&SLAM); ros::NodeHandle nh; message_filters::Subscriber<sensor_msgs::Image> rgb_sub(nh, "/camera/rgb/image_color", 1); message_filters::Subscriber<sensor_msgs::Image> depth_sub(nh, "/camera/depth_registered/hw_registered/image_rect_raw", 1); typedef message_filters::sync_policies::ApproximateTime<sensor_msgs::Image, sensor_msgs::Image> sync_pol; message_filters::Synchronizer<sync_pol> sync(sync_pol(10), rgb_sub,depth_sub); sync.registerCallback(boost::bind(&ImageGrabber::GrabRGBD,&igb,_1,_2)); pcl::PointCloud<pcl::PointXYZRGBA>::Ptr global_map(new pcl::PointCloud<pcl::PointXYZRGBA>); global_map = SLAM.mpPointCloudMapping->GetGlobalMap(); pcl::PointCloud<pcl::PointXYZRGB>::Ptr global_map_copy(new pcl::PointCloud<pcl::PointXYZRGB>); // signal(SIGINT, MySigintHandler); while(ros::ok())//使用ros::ok()与ros::spinOnce()搭配实现回调 { pcl::copyPointCloud(*global_map, *global_map_copy); //向topic : /orb_slam_with_kinect1/output 发送信息,发送频率为loop_rate(10),即10hz,消息池最大容量为10. ros::Publisher pcl_pub = nh.advertise<sensor_msgs::PointCloud2> ("/orb_slam_with_kinect1/output", 10); sensor_msgs::PointCloud2 output; // 转换成ROS下的数据类型 最终通过topic发布 pcl::toROSMsg(*global_map_copy,output); output.header.stamp=ros::Time::now(); output.header.frame_id ="camera_rgb_frame"; ros::Rate loop_rate(10); pcl_pub.publish(output); ros::spinOnce(); loop_rate.sleep(); } // 保存轨迹与地图 SLAM.save(); SLAM.Shutdown(); SLAM.SaveTrajectoryTUM("CameraTrajectory.txt"); ros::shutdown(); return 0; } ``` ```
Boost 二进制序列化,如何多次写入一次读取。
1. 近期在用Boost对对象进行序列化以便存储工业控制中产生的数据。 { 文件头对象Header(1个) 定期或者不定期的数据文件对象Data(n个,n不确定) } 具体如下: (1)、系统启动时产生头文件,此时我创建二进制文件file,并将Header对象以序列化的方式写入到file中去,然后close(file)。 (2)后续有数据过来时打开file文件,然后将收到的Data对象序列化,存入file中,此时产生了一个新的Boost序列化文件,包含相关的Boost头等信息。随后写入文件file,并close。 (3) 重复(2)的操作,直至退出系统。 (4)读取文件时直接Open文件,将文件读入Boost二进制流对象ia; ia >> Header; ia >> Data1; ia >> Data2 ia >> Dara...; 此时因为存储关系的原因,Boost无法准确读取Data文件,麻烦各位有相关经验的大佬告知下如何解决这个问题呢,谢谢。
thrift使用TThreadPoolServer时出现undefined
thrift使用时编译服务端出现了TThreadPoolServer的构造问题,这里无故出现的boost::shared_ptr类型问题,在之前编译过程中一直没有出现问题,直到重新编译thrift之后才出现类似问题 undefined reference to `apache::thrift::server::TThreadPoolServer::TThreadPoolServer(boost::shared_ptr<apache::thrift::TProcessor> const&, boost::shared_ptr<apache::thrift::transport::TServerTransport> const&, boost::shared_ptr<apache::thrift::transport::TTransportFactory> const&, boost::shared_ptr<apache::thrift::protocol::TProtocolFactory> const&, boost::shared_ptr<apache::thrift::concurrency::ThreadManager> const&)' undefined reference to `apache::thrift::concurrency::PosixThreadFactory::newThread(boost::shared_ptr<apache::thrift::concurrency::Runnable>) const'
用荣耀9调试显示[ThreadDexHotfixMonitor]Bind hotfix monitor service fail!
有没有大佬看看这是什么问题啊,用荣耀9调试的时候日志显示[ThreadDexHotfixMonitor]Bind hotfix monitor service fail! 手机上打开了开发者模式,android studio也能连上,就想发条通知,但怎么点击按钮都没用。下面是debug日志 10-02 17:16:04.256 16362-16362/? I/otificationtes: Late-enabling -Xcheck:jni 10-02 17:16:04.330 16362-16362/? I/otificationtes: Reinit property: dalvik.vm.checkjni= false 10-02 17:16:04.346 16362-16362/? D/ZrHung.AppEyeUiProbe: AppEyeUIP created. 10-02 17:16:04.349 16362-16362/? D/ActivityThread: Attach thread to application 10-02 17:16:04.432 16362-16393/com.example.notificationtest I/HwApiCacheMangerEx: apicache path=/storage/emulated/0 state=mounted key=com.example.notificationtest#10223#256 10-02 17:16:04.434 16362-16393/com.example.notificationtest I/HwApiCacheMangerEx: apicache path=/storage/emulated/0 state=mounted key=com.example.notificationtest#10223#0 10-02 17:16:04.457 16362-16362/com.example.notificationtest I/InstantRun: Instant Run Runtime started. Android package is com.example.notificationtest, real application class is null. 10-02 17:16:04.642 16362-16362/com.example.notificationtest W/otificationtes: Accessing hidden method Ldalvik/system/BaseDexClassLoader;->getLdLibraryPath()Ljava/lang/String; (light greylist, reflection) 10-02 17:16:04.644 16362-16362/com.example.notificationtest W/otificationtes: Unsupported class loader 10-02 17:16:04.770 16362-16362/com.example.notificationtest W/otificationtes: Skipping duplicate class check due to unsupported classloader 10-02 17:16:04.770 16362-16362/com.example.notificationtest W/otificationtes: Unsupported class loader 10-02 17:16:04.842 16362-16362/com.example.notificationtest W/otificationtes: Skipping duplicate class check due to unsupported classloader 10-02 17:16:04.843 16362-16362/com.example.notificationtest W/otificationtes: Unsupported class loader 10-02 17:16:04.933 16362-16362/com.example.notificationtest W/otificationtes: Skipping duplicate class check due to unsupported classloader 10-02 17:16:04.933 16362-16362/com.example.notificationtest W/otificationtes: Unsupported class loader 10-02 17:16:05.006 16362-16362/com.example.notificationtest W/otificationtes: Skipping duplicate class check due to unsupported classloader 10-02 17:16:05.007 16362-16362/com.example.notificationtest W/otificationtes: Unsupported class loader 10-02 17:16:05.092 16362-16362/com.example.notificationtest W/otificationtes: Skipping duplicate class check due to unsupported classloader 10-02 17:16:05.093 16362-16362/com.example.notificationtest W/otificationtes: Unsupported class loader 10-02 17:16:05.163 16362-16362/com.example.notificationtest W/otificationtes: Skipping duplicate class check due to unsupported classloader 10-02 17:16:05.164 16362-16362/com.example.notificationtest W/otificationtes: Unsupported class loader 10-02 17:16:05.243 16362-16362/com.example.notificationtest W/otificationtes: Skipping duplicate class check due to unsupported classloader 10-02 17:16:05.244 16362-16362/com.example.notificationtest W/otificationtes: Unsupported class loader 10-02 17:16:05.342 16362-16362/com.example.notificationtest W/otificationtes: Skipping duplicate class check due to unsupported classloader 10-02 17:16:05.343 16362-16362/com.example.notificationtest W/otificationtes: Unsupported class loader 10-02 17:16:05.442 16362-16362/com.example.notificationtest W/otificationtes: Skipping duplicate class check due to unsupported classloader 10-02 17:16:05.442 16362-16362/com.example.notificationtest W/otificationtes: Unsupported class loader 10-02 17:16:05.526 16362-16362/com.example.notificationtest W/otificationtes: Skipping duplicate class check due to unsupported classloader 10-02 17:16:05.527 16362-16362/com.example.notificationtest W/otificationtes: Unsupported class loader 10-02 17:16:05.659 16362-16362/com.example.notificationtest W/otificationtes: Skipping duplicate class check due to unsupported classloader 10-02 17:16:05.660 16362-16362/com.example.notificationtest W/otificationtes: Unsupported class loader 10-02 17:16:05.746 16362-16362/com.example.notificationtest W/otificationtes: Skipping duplicate class check due to unsupported classloader 10-02 17:16:05.746 16362-16362/com.example.notificationtest W/otificationtes: Unsupported class loader 10-02 17:16:05.817 16362-16362/com.example.notificationtest W/otificationtes: Skipping duplicate class check due to unsupported classloader 10-02 17:16:05.818 16362-16362/com.example.notificationtest W/otificationtes: Unsupported class loader 10-02 17:16:05.946 16362-16362/com.example.notificationtest W/otificationtes: Skipping duplicate class check due to unsupported classloader 10-02 17:16:05.947 16362-16362/com.example.notificationtest W/otificationtes: Unsupported class loader 10-02 17:16:06.055 16362-16362/com.example.notificationtest W/otificationtes: Skipping duplicate class check due to unsupported classloader 10-02 17:16:06.056 16362-16362/com.example.notificationtest W/otificationtes: Unsupported class loader 10-02 17:16:06.182 16362-16362/com.example.notificationtest W/otificationtes: Skipping duplicate class check due to unsupported classloader 10-02 17:16:06.183 16362-16362/com.example.notificationtest W/otificationtes: Unsupported class loader 10-02 17:16:06.305 16362-16362/com.example.notificationtest W/otificationtes: Skipping duplicate class check due to unsupported classloader 10-02 17:16:06.306 16362-16362/com.example.notificationtest W/otificationtes: Unsupported class loader 10-02 17:16:06.493 16362-16362/com.example.notificationtest W/otificationtes: Skipping duplicate class check due to unsupported classloader 10-02 17:16:06.494 16362-16362/com.example.notificationtest W/otificationtes: Unsupported class loader 10-02 17:16:06.710 16362-16362/com.example.notificationtest W/otificationtes: Skipping duplicate class check due to unsupported classloader 10-02 17:16:06.711 16362-16362/com.example.notificationtest W/otificationtes: Unsupported class loader 10-02 17:16:06.785 16362-16362/com.example.notificationtest W/otificationtes: Skipping duplicate class check due to unsupported classloader 10-02 17:16:06.787 16362-16362/com.example.notificationtest W/otificationtes: Accessing hidden field Ljava/lang/ClassLoader;->parent:Ljava/lang/ClassLoader; (light greylist, reflection) 10-02 17:16:06.790 16362-16362/com.example.notificationtest W/otificationtes: Accessing hidden method Landroid/app/ActivityThread;->currentActivityThread()Landroid/app/ActivityThread; (light greylist, reflection) 10-02 17:16:06.790 16362-16362/com.example.notificationtest W/otificationtes: Accessing hidden field Landroid/app/ActivityThread;->mInitialApplication:Landroid/app/Application; (light greylist, reflection) 10-02 17:16:06.790 16362-16362/com.example.notificationtest W/otificationtes: Accessing hidden field Landroid/app/ActivityThread;->mAllApplications:Ljava/util/ArrayList; (light greylist, reflection) 10-02 17:16:06.790 16362-16362/com.example.notificationtest W/otificationtes: Accessing hidden field Landroid/app/LoadedApk;->mApplication:Landroid/app/Application; (light greylist, reflection) 10-02 17:16:06.790 16362-16362/com.example.notificationtest W/otificationtes: Accessing hidden field Landroid/app/LoadedApk;->mResDir:Ljava/lang/String; (light greylist, reflection) 10-02 17:16:06.790 16362-16362/com.example.notificationtest W/otificationtes: Accessing hidden field Landroid/app/Application;->mLoadedApk:Landroid/app/LoadedApk; (light greylist, reflection) 10-02 17:16:06.790 16362-16362/com.example.notificationtest W/otificationtes: Accessing hidden field Landroid/app/ActivityThread;->mPackages:Landroid/util/ArrayMap; (light greylist, reflection) 10-02 17:16:06.790 16362-16362/com.example.notificationtest W/otificationtes: Accessing hidden field Landroid/app/ActivityThread;->mResourcePackages:Landroid/util/ArrayMap; (light greylist, reflection) 10-02 17:16:06.795 16362-16393/com.example.notificationtest I/AwareBitmapCacher: init processName:com.example.notificationtest pid=16362 uid=10223 10-02 17:16:06.798 16362-16791/com.example.notificationtest E/AwareLog: AtomicFileUtils: readFileLines file not exist: android.util.AtomicFile@28ac4fd 10-02 17:16:06.798 16362-16791/com.example.notificationtest E/AwareLog: AtomicFileUtils: readFileLines file not exist: android.util.AtomicFile@d43b3f9 10-02 17:16:06.800 16362-16362/com.example.notificationtest D/ZrHung.AppEyeUiProbe: notify runnable to start. 10-02 17:16:06.802 16362-16793/com.example.notificationtest D/ZrHung.AppEyeUiProbe: Runnable thread started. 10-02 17:16:06.802 16362-16393/com.example.notificationtest E/MemoryLeakMonitorManager: MemoryLeakMonitor.jar is not exist! 10-02 17:16:06.802 16362-16793/com.example.notificationtest D/IMonitor: Load library imonitor_jni 10-02 17:16:06.904 16362-16362/com.example.notificationtest I/HwApsImpl: APS: new HwApsImpl created 10-02 17:16:06.911 16362-16362/com.example.notificationtest I/HwPhoneWindow: updateLayoutParamsColor false mSpecialSet=false, mForcedNavigationBarColor=false, navigationBarColor=0, mNavBarShow=false, mIsFloating=false 10-02 17:16:06.911 16362-16362/com.example.notificationtest I/HwPhoneWindow: updateLayoutParamsColor true mSpecialSet=true, mForcedNavigationBarColor=false, navigationBarColor=fffcfcfc, mNavBarShow=false, mIsFloating=false 10-02 17:16:06.934 16362-16362/com.example.notificationtest I/OverScrollerOptimization: start init SmartSlideOverScroller and get the overscroller config 10-02 17:16:06.934 16362-16362/com.example.notificationtest I/OverScrollerOptimization: get the overscroller config 10-02 17:16:06.938 16362-16362/com.example.notificationtest I/FLTAG_FM: loadFeature class:com.huawei.featurelayer.systemfeature.HwWidget.IHwSplineOverScrollerEx 10-02 17:16:06.938 16362-16362/com.example.notificationtest I/FLTAG_SFM: getRequireClassLoader() succ ! className: com.huawei.featurelayer.systemfeature.HwWidget.IHwSplineOverScrollerEx 10-02 17:16:06.938 16362-16362/com.example.notificationtest D/FeatureFactory: loadFeature() : com.huawei.featurelayer.systemfeature.HwWidget.IHwSplineOverScrollerEx 10-02 17:16:06.938 16362-16362/com.example.notificationtest D/FeatureFactory: loadFeature() new IHwSplineOverScrollerEx() 10-02 17:16:06.939 16362-16362/com.example.notificationtest D/HwSplineOverScrollerExImpl: initSplineOverScrollerImpl paras: android.widget.OverScroller$SplineOverScroller@5f9433,android.support.v7.view.ContextThemeWrapper@a4bd3f0 10-02 17:16:06.940 16362-16362/com.example.notificationtest D/HwSplineOverScrollerExImpl: initSplineOverScrollerImpl: mScrollerVelocity is 0, value is 0 10-02 17:16:06.941 16362-16362/com.example.notificationtest I/FLTAG_FM: loadFeature class:com.huawei.featurelayer.systemfeature.HwWidget.IHwSplineOverScrollerEx 10-02 17:16:06.941 16362-16362/com.example.notificationtest I/FLTAG_SFM: getRequireClassLoader() succ ! className: com.huawei.featurelayer.systemfeature.HwWidget.IHwSplineOverScrollerEx 10-02 17:16:06.941 16362-16362/com.example.notificationtest D/FeatureFactory: loadFeature() : com.huawei.featurelayer.systemfeature.HwWidget.IHwSplineOverScrollerEx 10-02 17:16:06.941 16362-16362/com.example.notificationtest D/FeatureFactory: loadFeature() new IHwSplineOverScrollerEx() 10-02 17:16:06.941 16362-16362/com.example.notificationtest D/HwSplineOverScrollerExImpl: initSplineOverScrollerImpl paras: android.widget.OverScroller$SplineOverScroller@b323f1c,android.support.v7.view.ContextThemeWrapper@a4bd3f0 10-02 17:16:06.941 16362-16362/com.example.notificationtest D/HwSplineOverScrollerExImpl: initSplineOverScrollerImpl: mScrollerVelocity is 0, value is 0 10-02 17:16:06.979 16362-16362/com.example.notificationtest W/otificationtes: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection) 10-02 17:16:06.980 16362-16362/com.example.notificationtest W/otificationtes: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection) 10-02 17:16:06.990 16362-16362/com.example.notificationtest D/TextView: get Display Panel Type is : 0 10-02 17:16:07.005 16362-16362/com.example.notificationtest D/ActivityThread: add activity client record, r= ActivityRecord{29dbe14 token=android.os.BinderProxy@b543ac0 {com.example.notificationtest/com.example.notificationtest.MainActivity}} token= android.os.BinderProxy@b543ac0 10-02 17:16:07.010 16362-16362/com.example.notificationtest D/ZrHung.AppEyeUiProbe: notify runnable to start. 10-02 17:16:07.021 16362-16362/com.example.notificationtest D/OpenGLRenderer: Skia GL Pipeline 10-02 17:16:07.027 16362-16362/com.example.notificationtest D/HwAppInnerBoostImpl: set config for com.example.notificationtest BOOST_FLAG=false REPORT_DURATION_CLICK=1000 REPORT_TIMES_CLICK=3 REPORT_DURATION_SLIDE=5000 REPORT_TIMES_SLIDE=16 10-02 17:16:07.028 16362-16362/com.example.notificationtest D/OpenGLRenderer: HWUI Binary is enabled 10-02 17:16:07.028 16362-16362/com.example.notificationtest D/OpenGLRenderer: disableOutlineDraw is true 10-02 17:16:07.053 16362-16799/com.example.notificationtest I/HiTouch_HiTouchSensor: enabledInPad = false,isPcCastMode = false 10-02 17:16:07.055 16362-16799/com.example.notificationtest D/HiTouch_PressGestureDetector: onAttached, package=com.example.notificationtest, windowType=1, mHiTouchRestricted=false 10-02 17:16:07.099 16362-16797/com.example.notificationtest I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0 10-02 17:16:07.099 16362-16797/com.example.notificationtest I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0 10-02 17:16:07.101 16362-16797/com.example.notificationtest I/iGraphics: [0020080c] pn: com.example.notificationtest, p: 16362 10-02 17:16:07.101 16362-16797/com.example.notificationtest I/iGraphics: [0030080c] no spt app: com.example.notificationtest 10-02 17:16:07.101 16362-16797/com.example.notificationtest I/OpenGLRenderer: Initialized EGL, version 1.4, mEglDisplay 0x1 10-02 17:16:07.101 16362-16797/com.example.notificationtest D/OpenGLRenderer: Swap behavior 2 10-02 17:16:07.114 16362-16797/com.example.notificationtest D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000 10-02 17:16:07.374 16362-16362/com.example.notificationtest W/InputMethodManager: startInputReason = 1 10-02 17:16:07.389 16362-16362/com.example.notificationtest W/InputMethodManager: startInputReason = 5 10-02 17:16:09.655 16362-16418/com.example.notificationtest W/ServiceManager: Service huawei.android.security.IAppBehaviorDataAnalyzer didn't start. Returning NULL 10-02 17:16:09.655 16362-16418/com.example.notificationtest E/[HOTFIX]: [ThreadDexHotfixMonitor]Bind hotfix monitor service fail! 10-02 17:16:11.803 16362-16362/com.example.notificationtest D/AwareBitmapCacher: handleInit switch not opened pid=16362 10-02 17:16:13.556 16362-16362/com.example.notificationtest W/Settings: Setting device_provisioned has moved from android.provider.Settings.Secure to android.provider.Settings.Global. 10-02 17:16:13.614 16362-16362/com.example.notificationtest I/ViewRootImpl: jank_removeInvalidNode jank list is null 10-02 17:16:13.744 16362-16362/com.example.notificationtest D/HwGalleryCacheManagerImpl: mIsEffect:false 10-02 17:16:20.627 16362-16362/com.example.notificationtest I/ViewRootImpl: jank_removeInvalidNode all the node in jank list is out of time
终于明白阿里百度这样的大公司,为什么面试经常拿ThreadLocal考验求职者了
点击上面↑「爱开发」关注我们每晚10点,捕获技术思考和创业资源洞察什么是ThreadLocalThreadLocal是一个本地线程副本变量工具类,各个线程都拥有一份线程私有的数
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
《奇巧淫技》系列-python!!每天早上八点自动发送天气预报邮件到QQ邮箱
此博客仅为我业余记录文章所用,发布到此,仅供网友阅读参考,如有侵权,请通知我,我会删掉。 补充 有不少读者留言说本文章没有用,因为天气预报直接打开手机就可以收到了,为何要多此一举发送到邮箱呢!!!那我在这里只能说:因为你没用,所以你没用!!! 这里主要介绍的是思路,不是天气预报!不是天气预报!!不是天气预报!!!天气预报只是用于举例。请各位不要再刚了!!! 下面是我会用到的两个场景: 每日下
Python 植物大战僵尸代码实现(2):植物卡片选择和种植
这篇文章要介绍的是: - 上方植物卡片栏的实现。 - 点击植物卡片,鼠标切换为植物图片。 - 鼠标移动时,判断当前在哪个方格中,并显示半透明的植物作为提示。
死磕YOLO系列,YOLOv1 的大脑、躯干和手脚
YOLO 是我非常喜欢的目标检测算法,堪称工业级的目标检测,能够达到实时的要求,它帮我解决了许多实际问题。 这就是 YOLO 的目标检测效果。它定位了图像中物体的位置,当然,也能预测物体的类别。 之前我有写博文介绍过它,但是每次重新读它的论文,我都有新的收获,为此我准备写一个系列的文章来详尽分析它。这是第一篇,从它的起始 YOLOv1 讲起。 YOLOv1 的论文地址:https://www.c
知乎高赞:中国有什么拿得出手的开源软件产品?(整理自本人原创回答)
知乎高赞:中国有什么拿得出手的开源软件产品? 在知乎上,有个问题问“中国有什么拿得出手的开源软件产品(在 GitHub 等社区受欢迎度较好的)?” 事实上,还不少呢~ 本人于2019.7.6进行了较为全面的 回答 - Bravo Yeung,获得该问题下回答中得最高赞(236赞和1枚专业勋章),对这些受欢迎的 Github 开源项目分类整理如下: 分布式计算、云平台相关工具类 1.SkyWalk
记一次腾讯面试:进程之间究竟有哪些通信方式?如何通信? ---- 告别死记硬背
有一次面试的时候,被问到进程之间有哪些通信方式,不过由于之前没深入思考且整理过,说的并不好。想必大家也都知道进程有哪些通信方式,可是我猜很多人都是靠着”背“来记忆的,所以今天的这篇文章,讲给大家详细着讲解他们是如何通信的,让大家尽量能够理解他们之间的区别、优缺点等,这样的话,以后面试官让你举例子,你也能够顺手拈来。 1、管道 我们来看一条 Linux 的语句 netstat -tulnp | gr...
20行Python代码爬取王者荣耀全英雄皮肤
引言 王者荣耀大家都玩过吧,没玩过的也应该听说过,作为时下最火的手机MOBA游戏,咳咳,好像跑题了。我们今天的重点是爬取王者荣耀所有英雄的所有皮肤,而且仅仅使用20行Python代码即可完成。 准备工作 爬取皮肤本身并不难,难点在于分析,我们首先得得到皮肤图片的url地址,话不多说,我们马上来到王者荣耀的官网: 我们点击英雄资料,然后随意地选择一位英雄,接着F12打开调试台,找到英雄原皮肤的图片
网络(8)-HTTP、Socket、TCP、UDP的区别和联系
TCP/IP协议是传输层协议,主要解决数据如何在网络中传输,而HTTP是应用层协议,主要解决如何包装数据。 一、TCP与UDP的不同 1. 是否需要建立连接。 UDP在传送数据之前不需要先建立连接;TCP则提供面向连接的服务; 2. 是否需要给出确认 对方的传输层在收到UDP报文后,不需要给出任何确认,而 TCP需要给出确认报文,要提供可靠的、面向连接的传输服务。 3.虽然UDP不提供可靠交...
简明易理解的@SpringBootApplication注解源码解析(包含面试提问)
欢迎关注文章系列 ,关注我 《提升能力,涨薪可待》 《面试知识,工作可待》 《实战演练,拒绝996》 欢迎关注我博客,原创技术文章第一时间推出 也欢迎关注公 众 号【Ccww笔记】,同时推出 如果此文对你有帮助、喜欢的话,那就点个赞呗,点个关注呗! 《提升能力,涨薪可待篇》- @SpringBootApplication注解源码解析 一、@SpringBootApplication 的作用是什
防劝退!数据结构和算法难理解?可视化动画带你轻松透彻理解!
大家好,我是 Rocky0429,一个连数据结构和算法都不会的蒟蒻… 学过数据结构和算法的都知道这玩意儿不好学,没学过的经常听到这样的说法还没学就觉得难,其实难吗?真难! 难在哪呢?当年我还是个小蒟蒻,初学数据结构和算法的时候,在忍着枯燥看完定义原理,之后想实现的时候,觉得它们的过程真的是七拐八绕,及其难受。 在简单的链表、栈和队列这些我还能靠着在草稿上写写画画理解过程,但是到了数论、图...
西游记团队中如果需要裁掉一个人,会先裁掉谁?
2019年互联网寒冬,大批企业开始裁员,下图是网上流传的一张截图: 裁员不可避免,那如何才能做到不管大环境如何变化,自身不受影响呢? 我们先来看一个有意思的故事,如果西游记取经团队需要裁员一名,会裁掉谁呢,为什么? 西游记团队组成: 1.唐僧 作为团队teamleader,有很坚韧的品性和极高的原则性,不达目的不罢休,遇到任何问题,都没有退缩过,又很得上司支持和赏识(直接得到唐太宗的任命,既给
开挂的人生!那些当选院士,又是ACM/IEEE 双料Fellow的华人学者们
昨日,2019年两院院士正式官宣,一时间抢占了各大媒体头条。 朋友圈也是一片沸腾,奔走相告,赶脚比自己中了大奖还嗨皮! 谁叫咱家导师就是这么厉害呢!!! 而就在最近,新一年度的IEEE/ACM Fellow也将正式公布。 作为学术届的顶级荣誉,不自然地就会将院士与Fellow作比较,到底哪个含金量更高呢? 学术君认为,同样是专业机构对学者的认可,考量标准不一,自然不能一概而论。 但...
聊聊C语言和指针的本质
坐着绿皮车上海到杭州,24块钱,很宽敞,在火车上非正式地聊几句。 很多编程语言都以 “没有指针” 作为自己的优势来宣传,然而,对于C语言,指针却是与生俱来的。 那么,什么是指针,为什么大家都想避开指针。 很简单, 指针就是地址,当一个地址作为一个变量存在时,它就被叫做指针,该变量的类型,自然就是指针类型。 指针的作用就是,给出一个指针,取出该指针指向地址处的值。为了理解本质,我们从计算机模型说起...
Python语言高频重点汇总
Python语言高频重点汇总 GitHub面试宝典仓库——点这里跳转 文章目录Python语言高频重点汇总**GitHub面试宝典仓库——点这里跳转**1. 函数-传参2. 元类3. @staticmethod和@classmethod两个装饰器4. 类属性和实例属性5. Python的自省6. 列表、集合、字典推导式7. Python中单下划线和双下划线8. 格式化字符串中的%和format9.
究竟你适不适合买Mac?
我清晰的记得,刚买的macbook pro回到家,开机后第一件事情,就是上了淘宝网,花了500元钱,找了一个上门维修电脑的师傅,上门给我装了一个windows系统。。。。。。 表砍我。。。 当时买mac的初衷,只是想要个固态硬盘的笔记本,用来运行一些复杂的扑克软件。而看了当时所有的SSD笔记本后,最终决定,还是买个好(xiong)看(da)的。 已经有好几个朋友问我mba怎么样了,所以今天尽量客观
代码详解:如何用Python快速制作美观、炫酷且有深度的图表
全文共12231字,预计学习时长35分钟生活阶梯(幸福指数)与人均GDP(金钱)正相关的正则图本文将探讨三种用Python可视化数据的不同方法。以可视化《2019年世界幸福报告》的数据为例,本文用Gapminder和Wikipedia的信息丰富了《世界幸福报告》数据,以探索新的数据关系和可视化方法。《世界幸福报告》试图回答世界范围内影响幸福的因素。报告根据对“坎特里尔阶梯问题”的回答来确定幸...
程序员一般通过什么途径接私活?
二哥,你好,我想知道一般程序猿都如何接私活,我也想接,能告诉我一些方法吗? 上面是一个读者“烦不烦”问我的一个问题。其实不止是“烦不烦”,还有很多读者问过我类似这样的问题。 我接的私活不算多,挣到的钱也没有多少,加起来不到 20W。说实话,这个数目说出来我是有点心虚的,毕竟太少了,大家轻喷。但我想,恰好配得上“一般程序员”这个称号啊。毕竟苍蝇再小也是肉,我也算是有经验的人了。 唾弃接私活、做外
(经验分享)作为一名普通本科计算机专业学生,我大学四年到底走了多少弯路
今年正式步入了大四,离毕业也只剩半年多的时间,回想一下大学四年,感觉自己走了不少弯路,今天就来分享一下自己大学的学习经历,也希望其他人能不要走我走错的路。 (一)初进校园 刚进入大学的时候自己完全就相信了高中老师的话:“进入大学你们就轻松了”。因此在大一的时候自己学习的激情早就被抛地一干二净,每天不是在寝室里玩游戏就是出门游玩,不过好在自己大学时买的第一台笔记本性能并不是很好,也没让我彻底沉...
如何写一篇技术博客,谈谈我的看法
前言 只有光头才能变强。 文本已收录至我的GitHub精选文章,欢迎Star:https://github.com/ZhongFuCheng3y/3y 我一直推崇学技术可以写技术博客去沉淀自己的知识,因为知识点实在是太多太多了,通过自己的博客可以帮助自己快速回顾自己学过的东西。 我最开始的时候也是只记笔记,认为自己能看得懂就好。但如果想验证自己是不是懂了,可以写成技术博客。在写技术博客的...
字节跳动面试官这样问消息队列:分布式事务、重复消费、顺序消费,我整理了一下
你知道的越多,你不知道的越多 点赞再看,养成习惯 GitHub上已经开源 https://github.com/JavaFamily 有一线大厂面试点脑图、个人联系方式和人才交流群,欢迎Star和完善 前言 消息队列在互联网技术存储方面使用如此广泛,几乎所有的后端技术面试官都要在消息队列的使用和原理方面对小伙伴们进行360°的刁难。 作为一个在互联网公司面一次拿一次Offer的面霸...
面试还搞不懂redis,快看看这40道面试题(含答案和思维导图)
Redis 面试题 1、什么是 Redis?. 2、Redis 的数据类型? 3、使用 Redis 有哪些好处? 4、Redis 相比 Memcached 有哪些优势? 5、Memcache 与 Redis 的区别都有哪些? 6、Redis 是单进程单线程的? 7、一个字符串类型的值能存储最大容量是多少? 8、Redis 的持久化机制是什么?各自的优缺点? 9、Redis 常见性...
大学四年自学走来,这些珍藏的「实用工具/学习网站」我全贡献出来了
知乎高赞:文中列举了互联网一线大厂程序员都在用的工具集合,涉及面非常广,小白和老手都可以进来看看,或许有新收获。
互联网公司的裁员,能玩出多少种花样?
裁员,也是一门学问,可谓博大精深!以下,是互联网公司的裁员的多种方法:-正文开始-135岁+不予续签的理由:千禧一代网感更强。95后不予通过试用期的理由:已婚已育员工更有责任心。2通知接下来要过苦日子,让一部分不肯同甘共苦的员工自己走人,以“兄弟”和“非兄弟”来区别员工。3强制996。员工如果平衡不了工作和家庭,可在离婚或离职里二选一。4不布置任何工作,但下班前必须提交千字工作日报。5不给活干+...
【设计模式】单例模式的八种写法分析
网上泛滥流传单例模式的写法种类,有说7种的,也有说6种的,当然也不排除说5种的,他们说的有错吗?其实没有对与错,刨根问底,写法终究是写法,其本质精髓大体一致!因此完全没必要去追究写法的多少,有这个时间还不如跟着宜春去网吧偷耳机、去田里抓青蛙得了,一天天的....
《面试宝典》:检验是否为合格的初中级程序员的面试知识点,你都知道了吗?查漏补缺
欢迎关注文章系列,一起学习 《提升能力,涨薪可待篇》 《面试知识,工作可待篇》 《实战演练,拒绝996篇》 也欢迎关注公 众 号【Ccww笔记】,原创技术文章第一时间推出 如果此文对你有帮助、喜欢的话,那就点个赞呗,点个关注呗! 《面试知识,工作可待篇》-Java笔试面试基础知识大全 前言 是不是感觉找工作面试是那么难呢? 在找工作面试应在学习的基础进行总结面试知识点,工作也指日可待,欢...
关于研发效能提升的思考
研发效能提升是最近比较热门的一个话题,本人根据这几年的工作心得,做了一些思考总结,由于个人深度有限,暂且抛转引入。 三要素 任何生产力的提升都离不开这三个因素:人、流程和工具,少了其中任何一个因素都无法实现。 人,即思想,也就是古人说的“道”,道不同不相为谋,是制高点,也是高层建筑的基石。 流程,即方法,也是古人说的“法”。研发效能的提升,也就是要提高投入产出比,既要增加产出,也要减...
微博推荐算法简述
在介绍微博推荐算法之前,我们先聊一聊推荐系统和推荐算法。有这样一些问题:推荐系统适用哪些场景?用来解决什么问题、具有怎样的价值?效果如何衡量? 推荐系统诞生很早,但真正被大家所重视,缘起于以”facebook”为代表的社会化网络的兴起和以“淘宝“为代表的电商的繁荣,”选择“的时代已经来临,信息和物品的极大丰富,让用户如浩瀚宇宙中的小点,无所适从。推荐系统迎来爆发的机会,变得离用户更近: 快...
相关热词 c#开发的dll注册 c#的反射 c# grid绑定数据源 c#多线程怎么循环 c# 鼠标左键 c# char占位符 c# 日期比较 c#16进制转换为int c#用递归求顺序表中最大 c#小型erp源代码
立即提问