Regular, Revisitedfor its data structures and algorithms to work properly. STL vocabulary types such as string_view, span, optional, expected etc., raise new questions regarding values types, whole-part semantics, copies analysis provides us some basis to evaluate non-owning reference parameters types (like string_view and span) in a practical fashion, without discarding Regular design. Let's go back to the roots... ## C++20 std::spanThink "array view" as in std::string_view, but mutable on underlying data https://en.cppreference.com/w/cpp/container/span ## C++20 std::spanA std::span does not manage 0 码力 | 180 页 | 19.96 MB | 1 年前3
The Beauty and Power of Primitive C++## placement new // accessor for an Vectorcalled vs: Span vs() { return mbuf->vs; } flat type access type a Span is a range of elements  Flat::Span Message descriptor 000 lines of simple C++ ## • Flats support library • Vector, String, Optional, Variant, Array, Span, Span_ref, Uint32 • Minimal in-buffer representations • No pointers • ~500 lines of simple C++ “Programming 0 码力 | 53 页 | 1.03 MB | 1 年前3
Unraveling string_view: Basics, Benefits, and Best Practicesand their interoperability • When to use string_view • Using string_view safely • Intro to span • span vs. string_view • Case study of an optimization using string_view. ## Motivation • Consider destroyed at the end of the full-expression [-Wdangling] 15 | const auto sv = foo("hello"); ## span: Motivation ## Consider the following functions void foo(int* arr, int n) { for (int i = 0; these contiguous containers with a single interface? ## span: Motivation void foo(spans) { for (const auto i : s) { cout << i << ' "; 0 码力 | 61 页 | 1.11 MB | 1 年前3
Back to Basics: C++ Templates - Part 1size away. For example span Can hold both C-Array and std::array. Of course, range-based forready. Cleaned up the code safely and with little overhead. ## bool Send(const span& data) 3 return return write(data.data(), data.size()); void Read(span data) int i = 1; // fill buffer with data for (auto& c : data) { c = i; ++i; } void Main() 18 std::array span Can hold both C-Array and std::array. Of course, range-based forready. Cleaned up the code safely and with little overhead. C++20 Single Header Version of span: [2]. ## 1 template 0 码力 | 17 页 | 817.47 KB | 1 年前3
Tracing in TiDB 浅谈全链路监控:
从应用到数据库到 RuntimeTrace & Span   ## Trace & Span 例子 ![ span := opentracing.GlobalTracer().StartSpan("Root Span") defer span.Finish() }) (func() { span := span.Tracer().StartSpan("Child Span 1", opentracing.ChildOf(span.Context))) Context))) defer span.Finish() time.Sleep(time.Second) }) })( (func() { span := span.Tracer().StartSpan("Child Span 2", opentracing.ChildOf(span.Context())) defer span.Finish()0 码力 | 39 页 | 3.43 MB | 2 年前3
如何使用 docker 部署一个 beego 项目<span class="highlight-line"><span class="highlight cl">在root目录下mkdir docker_test 在此目录下创建Dockerfilespan>span><span class="highlight-line"><span class="highlight-cl">vi Do cker中)span>span><span class="highlight-line"><span class="highlight cl">FROM golang:1.9.1span>span><span class="highlight-line"><span class="h class="highlight-cl">span>span><span class="highlight-line"><span class="highlight-cl"># Install beego an the bee dev tool*span>span><span class="highlight-line"><span class="highlight-cl">RUN go get githu0 码力 | 5 页 | 269.19 KB | 2 年前3
廖雪峰JavaScript教程innerHTML = 'ABC'; //ABC
5. // 设置HTML: 6. p.innerHTML = 'ABC <span style="color:red">REDspan> XYZ'; 7. //...
的内部结构已修改 用 innerHTML 时要注意,是否需要写入HTML。如果写入的字符串是通过网络拿到了,要注意对字符编码来避免XSS攻击。 节点内插入新的DOM,应该如何做? 如果这个DOM节点是空的,例如,<div></div>,那么,直接使用 innerHTML = '<span>child</span>' 就可以修改DOM节点的内容,相当于“插入”了新的DOM节点。 如果这个DOM节点不是空的,那就不能这么做,因为 innerHTML 会直接替换掉原来的所有子节点。 $('#test-ul li.js'); 3. var j2 = $('#test-ul li[name=book]'); 4. j1.html('<span style="color: red">JavaScriptspan>'); 5. j2.text('JavaScript & ECMAScript'); 一个jQuery对象可以包含◐个或任意0 码力 | 264 页 | 2.81 MB | 1 年前3
一次线上java 应用响应时间过长问题的排查<span class="highlight-line">span><span class="highlight cl">jstack pid |grep tid -A 30span>看到的结果居然是,CMS 垃圾收集器的线程。。。
$$<span class="highlight-line">span><span class="highlight cl">span><span class="highlight cl">span><span class="highlight cl">span> <span class="highlight-line"> <span class="highlight-cl"> ap/styles") span>span><span class="highlight-line"> <span class="highlight-cl"> @RequestMapping("/sdk/map/styles") span>span><span class="highlight-line"><span class="highlight-cl">public
0 码力 | 3 页 | 247.74 KB | 2 年前3
How Meta Made Debugging Async Code Easier with Coroutines and Sendersunifex::sync_wait(std::move(task)); } return 0; unifex::taskasync_main(unifex::span unifex::taskargs, auto &pool, auto &io) { auto jobs = args | views::transform( [io](fs::path args[i], mean); } } } async_main(unifex::span unifex::taskargs, auto &pool, auto &io) { auto jobs = args | views::transform([io](fs::path %g\n", args[i], mean); } } async_main(unifex::span args, auto &pool, auto &io) { auto jobs = args | views::transform( [io](fs::path 0 码力 | 131 页 | 907.41 KB | 1 年前3
Scrapy 2.10 Documentationyield { "author": quote.xpath("span/small/text").get(), "text": quote.css("span.text::text").get(), } next_page = response look like this: <span class="text">The world as we have created it is a process of our thinking. It cannot be changed without changing our thinking."span> <span> by Albert class="author">Albert Einstein about span>0 码力 | 519 页 | 697.14 KB | 2 年前3共 1000 条- 1
- 2
- 3
- 4
- 5
- 6
- 100
相关搜索词
Regular typesSTLC++string_viewspanPrimitive C++IDL ParserFlatsSpanstd::string性能优化内存分配C++ Templatesstd::arrayTemplate ParametersFunction TemplatesTracingTiDB全链路监控gRPCJaegerDockerBeegoGo语言镜像容器JavaScript数组对象函数DOM操作Java应用响应时间垃圾回收OssClient连接池Async CodeCoroutinesSendersAsyncStacksAsyncStackFrameScrapy框架版本更新网络爬取爬虫数据提取













