• IP_FORWARD


    debug in gdb

     一个QT的学习专栏,看问题的角度。

    QByteArray makes a deep copy of the const char * data, so you can modify it later without experiencing side effects. (If for performance reasons you don't want to take a deep copy of the character data, use QByteArray::fromRawData() instead.)

     at() can be faster than operator[](), because it never causes a deep copy to occur.

    A QByteArray can embed '' bytes. The size() function always returns the size of the whole array, including embedded '' bytes. If you want to obtain the length of the data up to and excluding the first '' character, call qstrlen() on the byte array.

    After a call to resize(), newly allocated bytes have undefined values. To set all the bytes to a particular value, call fill().

    To obtain a pointer to the actual character data, call data() or constData(). These functions return a pointer to the beginning of the data. The pointer is guaranteed to remain valid until a non-const function is called on the QByteArray. It is also guaranteed that the data ends with a '' byte unless the QByteArray was created from a raw data. This '' byte is automatically provided by QByteArray and is not counted in size().

    When you append() data to a non-empty array, the array will be reallocated and the new data copied to it. You can avoid this behavior by calling reserve(), which preallocates a certain amount of memory. You can also call capacity() to find out how much memory QByteArray actually allocated. Data appended to an empty array is not copied.

     If you want to find all occurrences of a particular character or substring in a QByteArray, use indexOf() or lastIndexOf(). The former searches forward starting from a given index position, the latter searches backward. Both return the index position of the character or substring if they find it; otherwise, they return -1. For example, here's a typical loop that finds all occurrences of a particular substring:

     

    MadEdit-0.2.9.1    今天终于摆了UltraEdit   

    还是用这惯。还是要UE

  • 相关阅读:
    如何把样例从文件中输入程序
    蓝桥杯--高僧斗法(变形尼姆博弈)
    tensorflow笔记(北大网课实战)
    深度学习笔记
    尼姆博弈
    并查集
    蓝桥杯算法训练--指针
    NumPy笔记:均匀分布与正态分布
    NumPy学习:创建ndarray数组(linespace,arange,uniform,normal)
    NumPy笔记:数组去重
  • 原文地址:https://www.cnblogs.com/iamgoodman/p/3818480.html
Copyright © 2020-2023  润新知