zoukankan      html  css  js  c++  java
  • 知识杂项

    void  *p = malloc(100)

    string s = new(p) string();

    free p

    而s未被free掉;自己实现free;

     该写法可以大大提高代码效率!!!

    sys:1: DeprecationWarning: Non-ASCII character 'xe6' in file 0730.py on line 2 

    在文件的首行加上
    #!/usr/bin/python
    # -*- coding: <encoding name> -*-

     我用的是utf8

    #!/usr/bin/python   
    # -*- coding: utf-8 -*-

    AttributeError: 'str' object has no attribute 'format'  版本要大于2.6才可以的
    =========================


    sync(); //同步函数;
    3个点2个注意:-----重载;
    4个构造类型;4个构造;拷贝构造;类型构造,;
    3个没有返回类型的函数;---构造函数,析构函数,类型转换函数(重点);
    explicit---作用;

    ACE适配器;
    bootstc++通用库;
    +/-m.a;
    循环打印矩阵内的值。
    时间复杂度
    二、

    //通过层层的调用,注意画图。类和类之间的关系;
    MVC;
    vector 相当于动态数组;
    类模板, 模板类;

    thiscall详解;
    thiscall 5个压栈顺序;不同编译器顺序;

    变量从两个角度: 数据类型;存储类型;


    QGraphicsPixmapItem


    定义行数据类型;
    class aa;
    aa bb = new();
    bb.dkfjld
    const 7种用法;
    static 7种用法;
    typedef 4种用法;

    struct myclass
    {
    myclass();
    ~myclass();
    }

    回调函数;
    orlice;
    脚本;
    定时器开始;
    中断;

    初始化成员变量;
    发送信号的五种函数;arm
    timer实现
    event事件;
    控制台;
    单元测试;

    linux字节转换函数;
    uml
    23种设计模式;
    838907361 qq孔维刚

    /*
    select expression from table references
    group by
    having where
    order by
    limit
    procedure
    */

    用来连接两个表的条件为连接条件;
    同时设计多个表的查询成为连接查询;

    //联合查询;
    select S.xingming as 姓名,C.kemu as 科目 from studentinfo as S inner join scoreinfo as C on (S.xuehao = C.xuehao);

    左表/右表
    左链接/右链接;

    在一个函数内部定义的变量是内部变量,它只在本函数范围内有效;也就是说只有在
    本函数内才能使用它们,在此函数以外是不能使用这些变量的, 这称为“局部变量”

    在函数外定义的变量称为外部变量,也称为全局变量;
    全局变量可以为本文件中其他的函数所共用,它的有效
    范围为从定义变量的位置开始到本源文件的结束

    对于静态局部变量来说, 编译时自动赋初值0或者空字符
    即构造函数不能声明为虚函数;


    循环内局部变量;根据编译器的差异;


    静态局部变量(函数内有效)
    静态全局变量(本文件中有效)
    全局变量(外部变量)其他文件可以引用

    上机亲测过,的确如此

    二者有明显的区别;
    用于计算堆上面的空间,而不能用于计算栈空间;

    实时操作系统:real time os;
    volatile 挥发物;易

    svn/cvs可不学;
    项目管理软件
    autotools 4个工具;
    makefile
    make
    automake;
    git---比较难学;
    gun工具链;
    设计模式(23种)

    c++(必考)
    4个显示类型转换;
    虚表
    智能指针;
    typedef用法;
    处理有理数的类(面试题)

    模板STL:
    9种容器;
    函数对象;
    泛形指针;
    迭代器
    适配器

    数据结构:(面试搜索引擎必备)
    11种排序算法;
    4大类索引查找算法;
    平衡二叉树;
    红黑树
    二叉树的9个概念;
    二叉树的时间空间复杂度;
    网状数据结构;
    图;最优路径算法;


    关于:core dump
    符号表(二大符号表)

    #ifdef MODEL_H
    #define MODEL_H
    #include <QSettings>
    #include <vector>
    #include <stdlib.h>

    using namespace std;
    typedef vector<int> cRow;
    typedef vector<cRow> cMatrix;

    class model
    {
    public:
    model();
    ~model();
    void initmines();
    void countmines(int x, int y);
    void debug() const;
    int getwidth() const {return width;}
    int getheight() const {return height;}
    int getmines() const {return mines;}
    private:
    int width;
    int height;
    int mines;
    qsetting set;
    cMatrix cM;
    };

    #include "model.h"
    #include <iostream>
    using namespace std;

    model::model():set("romalin99", "sweep-min")
    {
    width = set.value("width", 9).toint();
    height = set.value("height", 9).toine();
    mines= set.value("mines", 20).tointI();
    width = width <9?9:9;
    height = width<9?9:9;
    mines = width<20?20:20;
    cM.clear();
    }

    model::~model()
    {
    set.setvalue("width", width);
    set.setvalue("height", height);
    set.setvalue("mines", mines);
    cM.clear();
    }

    void model::initmines()
    {
    int x, y;
    cM.clear();
    for(int x =0; x<width;x++)
    {
    cM.push_back(cRow(height));
    for(y=0;y<height; y++)
    c[x][y] =0;
    }
    }

     virtual用法析构函数;

  • 相关阅读:
    设置共享文件夹大小
    About IConfigurationSectionHandler Interface
    zoj 1050
    SQL Server 数据库优化经验总结
    一、页面输出缓存
    [转]深入解读 ADO.NET 2.0 的十大最新特性
    ASP.NET 缓存学习
    [转]写给ASP.NET程序员:网站中的安全问题
    [转] ASP.NET 性能提升秘诀之管道与进程优化
    实战 SQL Server 2005 镜像配置
  • 原文地址:https://www.cnblogs.com/chris-cp/p/3665742.html
Copyright © 2011-2022 走看看