当前位置: 首页 > wzjs >正文

网站改版需要注意哪些seo问题google搜索引擎

网站改版需要注意哪些seo问题,google搜索引擎,以下哪个域名是做游戏网站的,wordpress 仪表盘自定义目录 1. 说明 2. 用法示例 1. 说明 std::transform 是一种多功能算法&#xff0c;用于将已知函数应用于一个或多个范围内的元素&#xff0c;并将结果存储在输出范围内。它主要有两种形式&#xff1a;一元运算和二元运算。具体来说是在 <algorithm> 标头中。函数声明&am…

目录

1. 说明

2. 用法示例


1. 说明

std::transform 是一种多功能算法,用于将已知函数应用于一个或多个范围内的元素并将结果存储在输出范围内。它主要有两种形式:一元运算和二元运算。具体来说是在 <algorithm> 标头中。函数声明:

template< class InputIt, class OutputIt, class UnaryOp >

OutputIt transform( InputIt first1, InputIt last1,

                    OutputIt d_first, UnaryOp unary_op );

(1)

(constexpr since C++20)

template< class ExecutionPolicy,

          class ForwardIt1, class ForwardIt2, class UnaryOp >
ForwardIt2 transform( ExecutionPolicy&& policy,
                      ForwardIt1 first1, ForwardIt1 last1,

                      ForwardIt2 d_first, UnaryOp unary_op );

(2)

(since C++17)

template< class InputIt1, class InputIt2,

          class OutputIt, class BinaryOp >
OutputIt transform( InputIt1 first1, InputIt1 last1, InputIt2 first2,

                    OutputIt d_first, BinaryOp binary_op );

(3)

(constexpr since C++20)

template< class ExecutionPolicy,

          class ForwardIt1, class ForwardIt2,
          
class ForwardIt3, class BinaryOp >
ForwardIt3 transform( ExecutionPolicy&& policy,
                      ForwardIt1 first1, ForwardIt1 last1,
                      ForwardIt2 first2,

                      ForwardIt3 d_first, BinaryOp binary_op );

(4)

(since C++17)

一元操作的函数相当于:Ret fun(const Type &a);

二元操作的函数相当于:Ret fun(const Type1 &a, const Type2 &b);

即传进去的是一个函数对象。

2. 用法示例

#include <algorithm>

#include <cctype>

#include <iomanip>

#include <iostream>

#include <string>

#include <utility>

#include <vector>

 

void print_ordinals(const std::vector<unsigned>& ordinals)

{

    std::cout << "ordinals: ";

    for (unsigned ord : ordinals)

        std::cout << std::setw(3) << ord << ' ';

    std::cout << '\n';

}

 

char to_uppercase(unsigned char c)

{

    return std::toupper(c);

}

 

void to_uppercase_inplace(char& c)

{

    c = to_uppercase(c);

}

 

void unary_transform_example(std::string& hello, std::string world)

{

    // string就地转化为大写形式

 

    std::transform(hello.cbegin(), hello.cend(), hello.begin(), to_uppercase);

    std::cout << "hello = " << std::quoted(hello) << '\n';

 

    // for_each version (see Notes above)

    std::for_each(world.begin(), world.end(), to_uppercase_inplace);

    std::cout << "world = " << std::quoted(world) << '\n';

}

 

void binary_transform_example(std::vector<unsigned> ordinals)

{

    // 将数转换为double

 

    print_ordinals(ordinals);

 

    std::transform(ordinals.cbegin(), ordinals.cend(), ordinals.cbegin(),

                   ordinals.begin(), std::plus<>{});

 //或使用 std::plus<>()

    print_ordinals(ordinals);

}

 

int main()

{

    std::string hello("hello");

    unary_transform_example(hello, "world");

 

    std::vector<unsigned> ordinals;

    std::copy(hello.cbegin(), hello.cend(), std::back_inserter(ordinals));

    binary_transform_example(std::move(ordinals));

}

输出:

hello = "HELLO"

world = "WORLD"

ordinals:  72  69  76  76  79

ordinals: 144 138 152 152 158

说明:std::quoted 是 C++14 中引入的 I/O 操作符,属于 <iomanip> 库的一部分。其主要目的是简化使用流进行输入输出操作时对带引号的字符串的处理。

http://www.dtcms.com/wzjs/499837.html

相关文章:

  • 十大品牌网站互联网推广引流公司
  • 孝感做招聘信息的网站2023年11月新冠高峰
  • 西安公司网站建设服务商购买域名的网站
  • 网站建设正规公司腾讯广告联盟
  • 如何做各大网站广告链接台州网络推广
  • 国家网站建设网络营销意思
  • 苹果电脑如何做网站seo有哪些经典的案例
  • 百花广场做网站的公司郑州网站推广排名公司
  • 做网站要学的教程关键词排名优化如何
  • 做响应式网站的公司线下推广的渠道和方法
  • 网站数据没有更新百度答主招募入口官网
  • 做网站的软件名字全拼百度推广收费多少
  • 曲靖网站制作公司什么是优化设计
  • wordpress首页置顶文章奶盘seo伪原创工具
  • 网站的产品图片怎样做清晰百度上做优化
  • 2万元建设网站贵吗百度推广怎么优化
  • 网站微信登录怎么做百度指数是搜索量吗
  • 广州门户网站建设方案莆田百度推广开户
  • 医生在网站上做自我宣传美国搜索引擎
  • 学做美食交流网站有哪些百度经验首页
  • 网站设计 素材全网搜索引擎
  • 河北省石家庄疫情最新情况网站seo快速排名优化的软件
  • 用jsp做的简单网站代码盘多多网盘资源库
  • 深圳价格实惠的网站建设公司网站建设网站定制
  • 做网站卖链接软文代写是什么
  • 在线照片编辑工具青岛seo霸屏
  • 绍兴网站建设报价广州百度推广代理公司
  • wordpress woocommerce台州seo优化
  • 微网站一键导航熊猫关键词工具
  • 网站设计会存在什么问题上海关键词优化按天计费