数据结构的疑问:不存在从 "int" 转换到 "People" 的适当构造函数?
#include<stdio.h>
#include<iostream>
#define MaxWindow 30
#define MaxProc 1
#define error 0
using namespace std;
typedef struct People ElementType;

struct People
{
    int T;
    int P;
};

typedef int Position;
struct QNode 
{
    ElementType *Data;
    Position Front, Rear;
    int MaxSize;
};
typedef struct QNode *Queue;

Queue CreatQueue(int MaxSize)
{
    Queue Q = (Queue)malloc(sizeof(struct QNode));
    Q->Data = (ElementType *)malloc(MaxSize * sizeof(ElementType));
    Q->Front = Q->Rear = 0;
    Q->MaxSize = MaxSize;
    return Q;
}

bool IsFull(Queue Q)
{
    return((Q->Rear + 1) % Q->MaxSize == Q->Front);
}

bool AddQ(Queue Q, ElementType X)
{
    if (IsFull(Q))
    {
        printf("队列满\n");
        return false;
    }
    else
    {
        Q->Rear = (Q->Rear + 1) % Q->MaxSize;
        Q->Data[Q->Rear] = X;
        return true;
    }
}

bool IsEmpty(Queue Q)
{
    return(Q->Front == Q->Rear);
}

ElementType DeleteQ(Queue Q)
{
    if (IsEmpty(Q))
    {
        printf("队列空\n");
        return 0;
    }
else
    {
        Q->Front = (Q->Front + 1) % Q->MaxSize;
        return Q->Data[Q->Front];
    }
}

void DestroyQueue(Queue Q)
{
    free(Q);
}

double QueueingAtBank(Queue Q, int N)
{
    struct People Next;
    int k;
    int TotalTime;
    int CurrentTime;
    int Window[MaxWindow];
    int WaitTime;
    int WinAvail;
    int i, j;
    scanf("%d", &k);

    for (i = 0; i < k; i++)
        Window[i] = 0;
    TotalTime = 0;

    while (!IsEmpty)
    {
        WinAvail = FindNextWindow(Window, k, &WaitTime);
        CurrentTime += WaitTime;
        Next = DeleteQ(Q);
        if (CurrentTime >= Next.T)
            TotalTime += (CurrentTime - Next.T);
        else
        {
            WaitTime = Next.T - CurrentTime;
            for (j = 0; j < k; j++)
            {
                Window[j] -= WaitTime;
                if (Window[j] < 0)
                    Window[j] = 0;
            }
            CurrentTime = Next.T;
        }
        Window[WinAvail] = Next.P;
    }
    return((double)TotalTime / (double)N);
}

int FindNextWindow(int W[], int k, int *WaitTime)
{
    int WinAvail;
    int MinW = MaxProc + 1;
    int i;
    for (i = 0; i < k; i++)
        if (W[i] < MinW)
        {
            MinW = W[i];
            WinAvail = i;
        }
    *WaitTime = MinW;
    for (i = 0; i < k; i++)
        W[i] -= MinW;
    return WinAvail;
}

int main()
{
    int N;
    Queue Q;
    int i;
    ElementType X;
    scanf("%d", &N);
    Q = CreatQueue(N);
    for (i = 0; i < N; i++)
    {
        scanf("%d %d", &X.T, &X.P);
        AddQ(Q, X);
    }
    printf("Average waiting time = %.lf minute(s).\n", QueueingAtBank(Q, N));

    DestroyQueue(Q);
    return 0;
}
1   IntelliSense:  不存在从 "int" 转换到 "People" 的适当构造函数

请问各位大佬我这串代码的报错是为什么呀

c++

1个回答

图片说明
建议编译一下代码

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
不存在从"int"转换到"std::vector<cv::Mat,>>"的适当构造函数
void Cut_img(Mat src_img, int m, int n, vector<Mat> ceil_img) { int t = m * n; int height = src_img.rows; int width = src_img.cols; int ceil_height = height / m; int ceil_width = width / n; Mat roi_img, tmp_img; Point p1, p2; for (int i = 0; i<m; i++) for (int j = 0; j<n; j++) { //p1 = Rect rect(i + j*ceil_width, j + i*ceil_height, ceil_width, ceil_height); src_img(rect).copyTo(roi_img); ceil_img.push_back(roi_img); imshow("roi_img", roi_img); //getchar(); waitKey(0); //rectangle(i+j*ceil_width,j+i*ceil_height,); } } void show_images(vector<Mat> imgs, int n) { //do something } int _tmain(int argc, _TCHAR* argv[]) { Mat img = imread("dog.jpg", 1); imshow("src img", img); int m = 3; int n = 3; vector<Mat> ceil_img = m*n; Cut_img(img, m, n, ceil_img); waitKey(); return 0; } 整个代码是图片剪切的代码,问题出现在倒数第三行代码,cut_img(img,m,n,ceil_img); 错误为:不存在从"int"转换到"std::vector<cv::Mat,std::allocator<cv::Mat>>"的适当构造函数 还有错误C2440:"初始化":无法从“int”转换为"std::vector<cv::Mat,std::allocator<_Ty>>"
error: syntax error before "int"
#include<stdio.h> main() { float x,y,z,m,n; scanf("%f,%f,%f",&x,&y,&z); n=(x+z)/9; if(int(n)==n) { m=((x+z)/9+y)/2; if(int(m)==m) { printf("%g,%g\n",m-n,7*n-z); printf("1\n"); } else printf("gg\n"); } else printf("gg\n"); }
java 多次嵌套数据,如何遍历获取到最内层的数据?
``` [ { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U00-U49 对新发生的不明原因疾病的或紧急情况的临时安排", "partnum":"22", "children":[ { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U04 严重急性呼吸道综合征[SARS]", "partnum":"22", "children":[ { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U04.9 未特指的严重急性呼吸道综合征", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U04.9", "icdPid":"119f028c-7938-11e9-9611-8cec4bd010f3", "icdName":"未特指的严重急性呼吸道综合征", "icdId":"119f0307-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 } ], "isParent":"false", "level":2, "icdCode":"U04", "icdPid":"69b8458e-8034-11e9-b519-8cec4bd010f3", "icdName":"严重急性呼吸道综合征[SARS]", "icdId":"119f028c-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":3 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U06 紧急使用U06", "partnum":"22", "children":[ { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U06.0 紧急使用U06.0", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U06.0", "icdPid":"119f0404-7938-11e9-9611-8cec4bd010f3", "icdName":"紧急使用U06.0", "icdId":"119f047b-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U06.1 紧急使用U06.1", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U06.1", "icdPid":"119f0404-7938-11e9-9611-8cec4bd010f3", "icdName":"紧急使用U06.1", "icdId":"119f04f6-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U06.2 紧急使用U06.2", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U06.2", "icdPid":"119f0404-7938-11e9-9611-8cec4bd010f3", "icdName":"紧急使用U06.2", "icdId":"119f056d-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U06.3 紧急使用U06.3", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U06.3", "icdPid":"119f0404-7938-11e9-9611-8cec4bd010f3", "icdName":"紧急使用U06.3", "icdId":"119f05ec-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U06.4 紧急使用U06.4", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U06.4", "icdPid":"119f0404-7938-11e9-9611-8cec4bd010f3", "icdName":"紧急使用U06.4", "icdId":"119f0671-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U06.5 紧急使用U06.5", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U06.5", "icdPid":"119f0404-7938-11e9-9611-8cec4bd010f3", "icdName":"紧急使用U06.5", "icdId":"119f06e5-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U06.6 紧急使用U06.6", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U06.6", "icdPid":"119f0404-7938-11e9-9611-8cec4bd010f3", "icdName":"紧急使用U06.6", "icdId":"119f075c-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U06.7 紧急使用U06.7", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U06.7", "icdPid":"119f0404-7938-11e9-9611-8cec4bd010f3", "icdName":"紧急使用U06.7", "icdId":"119f07db-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U06.8 紧急使用U06.8", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U06.8", "icdPid":"119f0404-7938-11e9-9611-8cec4bd010f3", "icdName":"紧急使用U06.8", "icdId":"119f0852-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U06.9 紧急使用U06.9", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U06.9", "icdPid":"119f0404-7938-11e9-9611-8cec4bd010f3", "icdName":"紧急使用U06.9", "icdId":"119f08cd-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 } ], "isParent":"false", "level":2, "icdCode":"U06", "icdPid":"69b8458e-8034-11e9-b519-8cec4bd010f3", "icdName":"紧急使用U06", "icdId":"119f0404-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":3 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U07 紧急使用U07", "partnum":"22", "children":[ { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U07.0 紧急使用U07.0", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U07.0", "icdPid":"119f09bf-7938-11e9-9611-8cec4bd010f3", "icdName":"紧急使用U07.0", "icdId":"119f0a3a-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U07.1 紧急使用U07.1", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U07.1", "icdPid":"119f09bf-7938-11e9-9611-8cec4bd010f3", "icdName":"紧急使用U07.1", "icdId":"119f0ab2-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U07.2 紧急使用U07.2", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U07.2", "icdPid":"119f09bf-7938-11e9-9611-8cec4bd010f3", "icdName":"紧急使用U07.2", "icdId":"119f0b2d-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U07.3 紧急使用U07.3", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U07.3", "icdPid":"119f09bf-7938-11e9-9611-8cec4bd010f3", "icdName":"紧急使用U07.3", "icdId":"119f0ba7-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U07.4 紧急使用U07.4", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U07.4", "icdPid":"119f09bf-7938-11e9-9611-8cec4bd010f3", "icdName":"紧急使用U07.4", "icdId":"119f0c22-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U07.5 紧急使用U07.5", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U07.5", "icdPid":"119f09bf-7938-11e9-9611-8cec4bd010f3", "icdName":"紧急使用U07.5", "icdId":"119f0c9a-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U07.6 紧急使用U07.6", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U07.6", "icdPid":"119f09bf-7938-11e9-9611-8cec4bd010f3", "icdName":"紧急使用U07.6", "icdId":"119f0d15-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U07.7 紧急使用U07.7", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U07.7", "icdPid":"119f09bf-7938-11e9-9611-8cec4bd010f3", "icdName":"紧急使用U07.7", "icdId":"119f0d90-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U07.8 紧急使用U07.8", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U07.8", "icdPid":"119f09bf-7938-11e9-9611-8cec4bd010f3", "icdName":"紧急使用U07.8", "icdId":"119f0e0a-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U07.9 紧急使用U07.9", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U07.9", "icdPid":"119f09bf-7938-11e9-9611-8cec4bd010f3", "icdName":"紧急使用U07.9", "icdId":"119f0e96-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 } ], "isParent":"false", "level":2, "icdCode":"U07", "icdPid":"69b8458e-8034-11e9-b519-8cec4bd010f3", "icdName":"紧急使用U07", "icdId":"119f09bf-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":3 } ], "isParent":"true", "level":1, "icdCode":"U00-U49", "icdPid":"f514142c-795f-11e9-9611-8cec4bd010f3", "icdName":"对新发生的不明原因疾病的或紧急情况的临时安排", "icdId":"69b8458e-8034-11e9-b519-8cec4bd010f3", "open":"false", "codelength":0 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U82-U85 对微生物和抗肿瘤药物产生的抗药性", "partnum":"22", "children":[ { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U82 对β-内酰胺类抗生素耐药", "partnum":"22", "children":[ { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U82.0 对青霉素耐药", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U82.0", "icdPid":"119f0f18-7938-11e9-9611-8cec4bd010f3", "icdName":"对青霉素耐药", "icdId":"119f0f93-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U82.1 对甲氧苯青霉素耐药", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U82.1", "icdPid":"119f0f18-7938-11e9-9611-8cec4bd010f3", "icdName":"对甲氧苯青霉素耐药", "icdId":"119f1178-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U82.2 对β-内酰胺(ESBL)类耐药", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U82.2", "icdPid":"119f0f18-7938-11e9-9611-8cec4bd010f3", "icdName":"对β-内酰胺(ESBL)类耐药", "icdId":"119f144b-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U82.8 对其他β-内酰胺类抗生素耐药", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U82.8", "icdPid":"119f0f18-7938-11e9-9611-8cec4bd010f3", "icdName":"对其他β-内酰胺类抗生素耐药", "icdId":"119f163e-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U82.9 对β-内酰胺类抗生素耐药,未特指", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U82.9", "icdPid":"119f0f18-7938-11e9-9611-8cec4bd010f3", "icdName":"对β-内酰胺类抗生素耐药,未特指", "icdId":"119f18a7-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 } ], "isParent":"false", "level":2, "icdCode":"U82", "icdPid":"69b852ad-8034-11e9-b519-8cec4bd010f3", "icdName":"对β-内酰胺类抗生素耐药", "icdId":"119f0f18-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":3 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U83 对其他抗生素耐药", "partnum":"22", "children":[ { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U83.0 对万古霉素耐药", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U83.0", "icdPid":"119f19a4-7938-11e9-9611-8cec4bd010f3", "icdName":"对万古霉素耐药", "icdId":"119f1a1c-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U83.1 对其他与万古霉素有关的抗生素耐药", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U83.1", "icdPid":"119f19a4-7938-11e9-9611-8cec4bd010f3", "icdName":"对其他与万古霉素有关的抗生素耐药", "icdId":"119f1b85-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U83.2 对喹诺酮耐药", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U83.2", "icdPid":"119f19a4-7938-11e9-9611-8cec4bd010f3", "icdName":"对喹诺酮耐药", "icdId":"119f1c74-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U83.7 对多种抗生素耐药", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U83.7", "icdPid":"119f19a4-7938-11e9-9611-8cec4bd010f3", "icdName":"对多种抗生素耐药", "icdId":"119f1d6d-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U83.8 对其他单一指定抗生素耐药", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U83.8", "icdPid":"119f19a4-7938-11e9-9611-8cec4bd010f3", "icdName":"对其他单一指定抗生素耐药", "icdId":"119f1e63-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U83.9 对未特指的抗生素耐药", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U83.9", "icdPid":"119f19a4-7938-11e9-9611-8cec4bd010f3", "icdName":"对未特指的抗生素耐药", "icdId":"119f1fef-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 } ], "isParent":"false", "level":2, "icdCode":"U83", "icdPid":"69b852ad-8034-11e9-b519-8cec4bd010f3", "icdName":"对其他抗生素耐药", "icdId":"119f19a4-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":3 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U84 对其他抗菌药耐药", "partnum":"22", "children":[ { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U84.0 对抗寄生虫药物耐药", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U84.0", "icdPid":"119f20ec-7938-11e9-9611-8cec4bd010f3", "icdName":"对抗寄生虫药物耐药", "icdId":"119f216a-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U84.1 对抗真菌药物耐药", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U84.1", "icdPid":"119f20ec-7938-11e9-9611-8cec4bd010f3", "icdName":"对抗真菌药物耐药", "icdId":"119f2259-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U84.2 对抗病毒药物耐药", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U84.2", "icdPid":"119f20ec-7938-11e9-9611-8cec4bd010f3", "icdName":"对抗病毒药物耐药", "icdId":"119f237f-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U84.3 抗结核病药物耐药", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U84.3", "icdPid":"119f20ec-7938-11e9-9611-8cec4bd010f3", "icdName":"抗结核病药物耐药", "icdId":"119f2471-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U84.7 对多种抗菌药物耐药", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U84.7", "icdPid":"119f20ec-7938-11e9-9611-8cec4bd010f3", "icdName":"对多种抗菌药物耐药", "icdId":"119f25ec-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U84.8 对其他特指抗菌药耐药", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U84.8", "icdPid":"119f20ec-7938-11e9-9611-8cec4bd010f3", "icdName":"对其他特指抗菌药耐药", "icdId":"119f2704-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U84.9 对未特指的抗菌药物耐药", "partnum":"22", "isParent":"true", "level":3, "icdCode":"U84.9", "icdPid":"119f20ec-7938-11e9-9611-8cec4bd010f3", "icdName":"对未特指的抗菌药物耐药", "icdId":"119f2801-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":5 } ], "isParent":"false", "level":2, "icdCode":"U84", "icdPid":"69b852ad-8034-11e9-b519-8cec4bd010f3", "icdName":"对其他抗菌药耐药", "icdId":"119f20ec-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":3 }, { "isclinical":-1, "isusing":1, "mid":"", "remark":"", "className":"U85 对抗肿瘤药物耐药", "partnum":"22", "isParent":"false", "level":2, "icdCode":"U85", "icdPid":"69b852ad-8034-11e9-b519-8cec4bd010f3", "icdName":"对抗肿瘤药物耐药", "icdId":"119f297f-7938-11e9-9611-8cec4bd010f3", "open":"false", "codelength":3 } ], "isParent":"true", "level":1, "icdCode":"U82-U85", "icdPid":"f514142c-795f-11e9-9611-8cec4bd010f3", "icdName":"对微生物和抗肿瘤药物产生的抗药性", "icdId":"69b852ad-8034-11e9-b519-8cec4bd010f3", "open":"false", "codelength":0 } ] ``` ![图片说明](https://img-ask.csdn.net/upload/201911/23/1574521364_679491.png) 如图,获取最内层的children节点下的值。 ``` public static List<Map<String, Object>> getLastChildren(List<Map<String, Object>> list,String key) { List<Map<String, Object>> lastChildrenList = new ArrayList<Map<String,Object>>(); for(int i=0;i<list.size();i++) { Map<String,Object> map = list.get(i); /*判断是否存在key*/ boolean containsKey = map.containsKey(key); /*如果存在则继续遍历*/ if(containsKey && map.get(key)!= null) { List<Map<String, Object>> childrenList = (List<Map<String, Object>>) map.get(key); getLastChildren(childrenList,key); }else {/*如果不存在则获取到key值 返回数据*/ lastChildrenList.add(map); } } return lastChildrenList; } ```
derby sql错误 错误 42X01:语法错误:Encountered "(" at line
创建表的时候总是报这个错误:错误 42X01:语法错误:Encountered "(" at line 2, column 28。 这是具体的信息: [code="java"]ij> create table student (id int(2) generated by default as identity, name varchar(12) not null, totalScore int(3) not null, chinese int(2) not null, maths int(2) not null, english int(2) not null); 错误 42X01:语法错误:Encountered "(" at line 2, column 28。 ij>[/code]为什么呢
datax转换mongodb的数据到mysql遇到一个问题
公司新项目需要从旧的mongodb库了把数据导入到新的mysql库。在用淘宝的datax工具导入数据的时候遇到以下的问题 mongodb的是数据很多都是一个document里不是所有字段都的值都有. 例如:user = [{“name”:”张三”,”id”:”0000001″}, {“age”:12,”id”:”0000002″}, {“name”:”王二麻子”,”age”:13,”id”:”0000003″}] 这样在datax调度Job的时候回报读入和写入的字段数量不同。 请问该如何解决? 我的job.json配置如下: { "job": { "setting": { "speed": { "channel": 2 } }, "content": [ { "reader": { "name": "mongodbreader", "parameter": { "address": ["192.168.1.1:27017"], "userName": "", "userPassword": "", "dbName": "test", "collectionName": "usertest" "column": [ { "name": "name", "type": "string" }, { "name": "age", "type": "int" }, { "name": "id", "type": "string" } ] } }, "writer": { "name": "mysqlwriter", "parameter": { "writeMode": "insert", "username": "user", "password": "123456", "column": [ "id", "name", "age" ], "session": [ "set session sql_mode='ANSI'" ], "preSql": [ "delete from user" ], "connection": [ { "jdbcUrl": "jdbc:mysql://192.168.1.1:3306/datax?useUnicode=true&characterEncoding=utf-8", "table": [ "user" ] } ] } } } ] } }
spring hibernate jpa 用findAll的时候,取出的所有的string类型的字段都是空字符串
但数据库中是有值的,int值可以选出 {"id":18187,"no":"","parent_id":11654,"name":"","route":"","type":0,"state":1,"plugin_id":2},{"id":18488,"no":"","parent_id":18484,"name":"","route":"","type":0,"state":1,"plugin_id":2},{"id":5482,"no":"","parent_id":5475,"name":"","route":"","type":0,"state":1,"plugin_id":2},{"id":5484,"no":"","parent_id":5475,"name":"","route":"","type":0,"state":1,"plugin_id":2},
为什么我看了这个关于高校人员信息管理系统设计的代码运行时总是会说找不到“common.h”这个文件,这个那里有错误呢?
#ifndef COMMON_H_INCLUDED #define COMMON_H_INCLUDED #include<string> #include<iostream> #include<iomanip> class COMMON { protected: std::string name; bool sex; int age; std::string id; static int person_sum; static int man_sum; static int woman_sum; public: COMMON(std::string a, bool b, int c, std::string d); virtual ~COMMON(); static int get_person_sum(); static int get_man_sum(); static int get_woman_sum(); virtual void show(){} virtual void show_row(){} virtual bool change(){} std::string get_name(){return name;} bool get_sex(){return sex;} int get_age(){return age;} std::string get_id(){return id;} }; int COMMON::person_sum = 0; int COMMON::man_sum = 0; int COMMON::woman_sum = 0; int COMMON::get_person_sum() { return person_sum; } int COMMON::get_man_sum() { return man_sum; } int COMMON::get_woman_sum() { return woman_sum; } COMMON::COMMON(std::string a, bool b, int c, std::string d): name(a), sex(b), age(c), id(d) { person_sum++; if(b) man_sum++; else woman_sum++; } COMMON::~COMMON() { person_sum--; if(sex) man_sum--; else woman_sum--; } #endif // COMMON_H_INCLUDED tester.h 实验员: #ifndef TESTER_H_INCLUDED #define TESTER_H_INCLUDED #include"common.h" class TESTER: public COMMON { private: std::string laboratory; std::string title; static int tester_sum; public: TESTER(std::string a = "haha", bool b = 1, int c = 19, std::string d = "1", std::string e = "tt", std::string f = "学生"); ~TESTER(); static int get_tester_sum(); virtual void show(); virtual void show_row(); virtual bool change(); std::string get_laboratory(){return laboratory;} std::string get_title(){return title;} }; int TESTER::tester_sum = 0; int TESTER::get_tester_sum() { return tester_sum; } TESTER::TESTER(std::string a, bool b, int c, std::string d, std::string e, std::string f): COMMON(a,b,c,d), laboratory(e), title(f) { tester_sum++; } TESTER::~TESTER() { tester_sum--; } void TESTER::show() { std::cout << "实验员:\n"; std::cout << "姓名:\t\t" << name << std::endl; std::cout << "姓别:\t\t"; if(sex) std::cout << "男\n"; else std::cout << "女\n"; std::cout << "年龄:\t\t" << age << std::endl; std::cout << "ID:\t\t" << id << std::endl; std::cout << "所属实验室:\t" << laboratory << std::endl; std::cout << "职务:\t\t" << title << std::endl; } void TESTER::show_row() { std::cout << std::left << std::setw(8) << name; if(sex) std::cout << std::left << std::setw(8) << "男"; else std::cout << std::left << std::setw(8) << "女"; std::cout << std::left << std::setw(8) << age; std::cout << std::left << std::setw(16) << id; std::cout << std::left << std::setw(16) << laboratory; std::cout << std::left << std::setw(16) << title; std::cout << std::endl; } bool TESTER::change() { std::cout << "姓名:\t\t" ; std::string new_name; std::cin >> new_name; for(unsigned int i = 0; i < new_name.length(); i++) { if(new_name[i] >= '0' && new_name[i] <= '9') { std::cout << "输入非法,输入任意键返回\n"; return 1; } } name = new_name; std::cout << "姓别:\t\t"; std::string a; std::cin >> a; if(sex) man_sum--; else woman_sum--; if(a == "男") sex = 1, man_sum++; else sex = 0, woman_sum++; std::cout << "年龄:\t\t"; std::cin >> age; std::cout << "所属实验室:\t"; std::cin >> laboratory; std::cout << "职务:\t\t"; std::cin >> title; return 0; } #endif // TESTER_H_INCLUDED teacher.h 教师: #ifndef TEACHER_H_INCLUDED #define TEACHER_H_INCLUDED #include"common.h" class TEACHER: virtual public COMMON { protected: std::string department; std::string profession; std::string title; static int teacher_sum; public: TEACHER(std::string a = "xixi", bool b = 1, int c = 30, std::string d = "213", std::string e = "计算机与信息工程学院", std::string f = "计算机科学与技术", std::string g = "教师"); ~TEACHER(); static int get_teacher_sum(); virtual void show(); virtual void show_row(); virtual bool change(); std::string get_department(){return department;} std::string get_profession(){return profession;} std::string get_title(){return title;} }; int TEACHER::teacher_sum = 0; int TEACHER::get_teacher_sum() { return teacher_sum; } TEACHER::TEACHER(std::string a, bool b, int c, std::string d, std::string e, std::string f, std::string g): COMMON(a,b,c,d), department(e), profession(f), title(g) { teacher_sum++; } TEACHER::~TEACHER() { teacher_sum--; } void TEACHER::show() { std::cout << "教师:\n"; std::cout << "姓名:\t\t" << name << std::endl; std::cout << "姓别:\t\t"; if(sex) std::cout << "男\n"; else std::cout << "女\n"; std::cout << "年龄:\t\t" << age << std::endl; std::cout << "ID:\t\t" << id << std::endl; std::cout << "院系:\t\t" << department << std::endl; std::cout << "专业:\t\t" << profession << std::endl; std::cout << "职务:\t\t" << title << std::endl; } void TEACHER::show_row() { std::cout << std::left << std::setw(8) << name; if(sex) std::cout << std::left << std::setw(8) << "男"; else std::cout << std::left << std::setw(8) << "女"; std::cout << std::left << std::setw(8) << age; std::cout << std::left << std::setw(16) << id; std::cout << std::left << std::setw(16) << department; std::cout << std::left << std::setw(16) << profession; std::cout << std::left << std::setw(16) << title; std::cout << std::endl; } bool TEACHER::change() { std::cout << "姓名:\t\t" ; std::string new_name; std::cin >> new_name; for(unsigned int i = 0; i < new_name.length(); i++) { if(new_name[i] >= '0' && new_name[i] <= '9') { std::cout << "输入非法,输入任意键返回\n"; return 1; } } name = new_name; std::cout << "姓别:\t\t"; std::string a; std::cin >> a; if(sex) man_sum--; else woman_sum--; if(a == "男") sex = 1, man_sum++; else sex = 0, woman_sum++; std::cout << "年龄:\t\t"; std::cin >> age; std::cout << "院系:\t\t"; std::cin >> department; std::cout << "专业:\t\t"; std::cin >> profession; std::cout << "职务:\t\t"; std::cin >> title; return 0; } #endif // TEACHER_H_INCLUDED administrator.h 行政人员: #ifndef ADMINISTRATOR_H_INCLUDED #define ADMINISTRATOR_H_INCLUDED #include"common.h" class ADMINISTRATOR: virtual public COMMON { protected: std::string politics; std::string position; static int administrator_sum; public: ADMINISTRATOR(std::string a = "huhu", bool b = 1, int c = 39, std::string d = "176", std::string e = "群众", std:: string f = "社会主义新青年"); ~ADMINISTRATOR(); static int get_administrator_sum(); virtual void show(); virtual void show_row(); virtual bool change(); std::string get_politics(){return politics;} std::string get_position(){return position;} }; int ADMINISTRATOR::administrator_sum = 0; int ADMINISTRATOR::get_administrator_sum() { return administrator_sum; } ADMINISTRATOR::ADMINISTRATOR(std::string a, bool b, int c, std::string d, std::string e, std::string f): COMMON(a,b,c,d), politics(e), position(f) { administrator_sum++; } ADMINISTRATOR::~ADMINISTRATOR() { administrator_sum--; } void ADMINISTRATOR::show() { std::cout << "行政人员:\n"; std::cout << "姓名:\t\t" << name << std::endl; std::cout << "姓别:\t\t"; if(sex) std::cout << "男\n"; else std::cout << "女\n"; std::cout << "年龄:\t\t" << age << std::endl; std::cout << "ID:\t\t" << id << std::endl; std::cout << "政治面貌:\t" << politics << std::endl; std::cout << "职称:\t\t" << position << std::endl; } void ADMINISTRATOR::show_row() { std::cout << std::left << std::setw(8) << name; if(sex) std::cout << std::left << std::setw(8) << "男"; else std::cout << std::left << std::setw(8) << "女"; std::cout << std::left << std::setw(8) << age; std::cout << std::left << std::setw(16) << id; std::cout << std::left << std::setw(16) << politics; std::cout << std::left << std::setw(16) << position; std::cout << std::endl; } bool ADMINISTRATOR::change() { std::cout << "姓名:\t\t" ; std::string new_name; std::cin >> new_name; for(unsigned int i = 0; i < new_name.length(); i++) { if(new_name[i] >= '0' && new_name[i] <= '9') { std::cout << "输入非法,输入任意键返回\n"; return 1; } } name = new_name; std::cout << "姓别:\t\t"; std::string a; std::cin >> a; if(sex) man_sum--; else woman_sum--; if(a == "男") sex = 1, man_sum++; else sex = 0, woman_sum++; std::cout << "年龄:\t\t"; std::cin >> age; std::cout << "政治面貌:\t"; std::cin >> politics; std::cout << "职称:\t\t"; std::cin >> position; return 0; } #endif // ADMINISTRATOR_H_INCLUDED tea&admi.h 教师及行政人员: #ifndef TEAADMI_H_INCLUDED #define TEAADMI_H_INCLUDED #include"teacher.h" #include"administrator.h" class TEAADMI: public TEACHER, public ADMINISTRATOR { private: static int teaadmi_sum; public: TEAADMI(std::string a = "maomao", bool b = 1, int c = 59, std::string d = "0", std::string e = "计算机与信息工程学院", std::string f = "计算机科学与技术", std::string g = "教师", std::string h = "群众", std:: string i = "社会主义新青年"); ~TEAADMI(); static int get_teaadmi_sum(); virtual void show(); virtual void show_row(); virtual bool change(); }; int TEAADMI::teaadmi_sum = 0; int TEAADMI::get_teaadmi_sum() { return teaadmi_sum; } TEAADMI::TEAADMI(std::string a, bool b, int c, std::string d, std::string e, std::string f, std::string g, std::string h, std::string i): COMMON(a,b,c,d), TEACHER(a,b,c,d,e,f,g), ADMINISTRATOR(a,b,c,d,h,i) { teaadmi_sum++; } TEAADMI::~TEAADMI() { teaadmi_sum--; } void TEAADMI::show() { std::cout << "教师及行政人员:\n"; std::cout << "姓名:\t\t" << name << std::endl; std::cout << "姓别:\t\t"; if(sex) std::cout << "男\n"; else std::cout << "女\n"; std::cout << "年龄:\t\t" << age << std::endl; std::cout << "ID:\t\t" << id << std::endl; std::cout << "院系:\t\t" << department << std::endl; std::cout << "专业:\t\t" << profession << std::endl; std::cout << "职务:\t\t" << title << std::endl; std::cout << "政治面貌:\t" << politics << std::endl; std::cout << "职称:\t\t" << position << std::endl; } void TEAADMI::show_row() { std::cout << std::left << std::setw(8) << name; if(sex) std::cout << std::left << std::setw(8) << "男"; else std::cout << std::left << std::setw(8) << "女"; std::cout << std::left << std::setw(8) << age; std::cout << std::left << std::setw(16) << id; std::cout << std::left << std::setw(16) << department; std::cout << std::left << std::setw(16) << profession; std::cout << std::left << std::setw(16) << title; std::cout << std::left << std::setw(16) << politics; std::cout << std::left << std::setw(16) << position; std::cout << std::endl; } bool TEAADMI::change() { std::cout << "姓名:\t\t" ; std::string new_name; std::cin >> new_name; for(unsigned int i = 0; i < new_name.length(); i++) { if(new_name[i] >= '0' && new_name[i] <= '9') { std::cout << "输入非法,输入任意键返回\n"; return 1; } } name = new_name; std::cout << "姓别:\t\t"; std::string a; std::cin >> a; if(sex) man_sum--; else woman_sum--; if(a == "男") sex = 1, man_sum++; else sex = 0, woman_sum++; std::cout << "年龄:\t\t"; std::cin >> age; std::cout << "院系:\t\t"; std::cin >> department; std::cout << "专业:\t\t"; std::cin >> profession; std::cout << "职务:\t\t"; std::cin >> title; std::cout << "政治面貌:\t"; std::cin >> politics; std::cout << "职称:\t\t"; std::cin >> position; return 0; } #endif // TEA&ADMI_H_INCLUDED interface.h 界面: #ifndef INTERFACE_H_INCLUDED #define INTERFACE_H_INCLUDED #include"teacher.h" #include"tester.h" #include"administrator.h" #include"tea&admi.h" #include<stdio.h> #include<stdlib.h> #include<conio.h> /*----------------函数声明-------------------*/ void interface_login(); //初始界面 void interface_Manager(); //管理者界面 void staff_list(); //管理者清单 #include"myfun.h" /*----------------函数定义-------------------*/ void interface_Manager() //管理界面 { int n=1; while(n) { system("cls"); std::cout << "------------欢迎来到只有神知道的领域 o(*≧▽≦)ツ----------\n"; std::cout << "-----------------------------------------------------------\n"; std::cout << "-----------------------------------------------------------\n"; std::cout << "------------- 输入1 添加信息 -------------\n"; std::cout << "------------- 输入2 查询信息 -------------\n"; std::cout << "------------- 输入3 浏览信息 -------------\n"; std::cout << "------------- 输入4 修改信息 -------------\n"; std::cout << "------------- 输入5 删除信息 -------------\n"; std::cout << "------------- 输入6 统计信息 -------------\n"; std::cout << "------------- 输入0 返回上一级 -------------\n"; std::cout << "-----------------------------------------------------------\n"; std::cout << "-----------------------------------------------------------\n"; std::cin >> n; switch(n) { case 1:Add_information();break; case 2: { int a = 1; if(!Query_information()) break; while(a) { std::cout << "输入1 修改信息\n"; std::cout << "输入2 删除信息\n"; std::cout << "输入0 返回上一级\n"; std::cin >> a; switch(a) { case 1:Edit_information(); a = 0; break; case 2:Delete_information(); a= 0; break; } } break; } case 3: { int a=1; while(a) { Browse_information(); std::cout << "输入1 修改信息\n"; std::cout << "输入2 删除信息\n"; std::cout << "输入0 返回上一级\n"; std::cin >> a; switch(a) { case 1:Edit_information(); break; case 2:Delete_information(); break; } } break; } case 4:Edit_information(); break; case 5:Delete_information(); break; case 6:count_information(); break; } } } void interface_login() //登入界面 { int n=1; while(n) { system("cls"); std::cout << "----------欢迎进入高校人员信息管理系统 o(*≧▽≦)ツ--------\n"; std::cout << "-----------------------------------------------------------\n"; std::cout << "-----------------------------------------------------------\n"; std::cout << "------------- 输入1 管理员账号登入 -------------\n"; std::cout << "------------- 输入2 查询信息 -------------\n"; std::cout << "------------- 输入3 浏览信息 -------------\n"; std::cout << "------------- 输入4 统计信息 -------------\n"; std::cout << "------------- 输入5 观看制作信息 -------------\n"; std::cout << "------------- 输入0 关闭系统 -------------\n"; std::cout << "-----------------------------------------------------------\n"; std::cout << "-----------------------------------------------------------\n"; std::cin >> n; switch(n) { case 1:login(); break; case 2:if(Query_information()) std::cout << "输入任意键,返回上一级\n", getch(); break; case 3:Browse_information(); std::cout << "输入任意键,返回上一级\n"; getch(); break; case 4:count_information(); break; case 5:staff_list(); break; } } } void staff_list() //制作人员名单 { system("cls"); std::cout << "-----------------------------------------------------------\n"; std::cout << "-----------------------------------------------------------\n"; std::cout << "--------------Include the following members----------------\n"; std::cout << "-------------- wzy ----------------\n"; std::cout << "-------------- ToRe ----------------\n"; std::cout << "-----------------------------------------------------------\n"; std::cout << "-----------------------------------------------------------\n\n\n"; std::cout << "\n输入任意键返回主菜单…\n"; getch(); } #endif // INTERFACE_H_INCLUDED myfun.h 主要功能实现: #ifndef MYFUN_H_INCLUDED #define MYFUN_H_INCLUDED #include<vector> #include<map> #include<fstream> /*----------------成员声明-------------------*/ std::multimap<std::string, COMMON *> sear; std::vector<TESTER*> tester; std::vector<TEACHER*> teacher; std::vector<ADMINISTRATOR*> administrator; std::vector<TEAADMI*> teaadmi; /*----------------函数声明-------------------*/ void Information_load(); //信息加载 void room_delete(); //释放空间 void login(); //登入函数 void Add_information(); //添加信息 bool Query_information(); //显示查询信息 void Browse_information(); //浏览信息 void Edit_information(); //修改信息 void Delete_information(); //删除信息 void count_information(); //统计信息 /*----------------函数定义-------------------*/ void Information_load() //信息加载 { std::ifstream in; in.open("实验员.txt", std::ios::in); std::string name, id; int age; bool sex; while(in >> name) { std::string laboratory, title; in >> sex >> age >> id >> laboratory >> title; TESTER *t = new TESTER(name,sex,age,id,laboratory,title); tester.push_back(t); sear.insert(make_pair(name, t)); sear.insert(make_pair(id, t)); } in.close(); in.open("教师.txt", std::ios::in); while(in >> name) { std::string department, profession, title; in >> sex >> age >> id >> department >> profession >> title; TEACHER *t = new TEACHER(name,sex,age,id,department,profession,title); teacher.push_back(t); sear.insert(make_pair(name, t)); sear.insert(make_pair(id, t)); } in.close(); in.open("行政人员.txt", std::ios::in); while(in >> name) { std::string politics, position; in >> sex >> age >> id >> politics >> position; ADMINISTRATOR *t = new ADMINISTRATOR(name,sex,age,id,politics,position); administrator.push_back(t); sear.insert(make_pair(name, t)); sear.insert(make_pair(id, t)); } in.close(); in.open("教师&行政人员.txt", std::ios::in); while(in >> name) { std::string department, profession, title, politics, position; in >> sex >> age >> id >> department >> profession >> title >> politics >> position; TEAADMI *t = new TEAADMI(name,sex,age,id,department,profession,title,politics,position); teaadmi.push_back(t); sear.insert(make_pair(name, t)); sear.insert(make_pair(id, t)); } } void room_delete() //释放空间 { for(auto iter:tester) delete iter; for(auto iter:teacher) delete iter; for(auto iter:administrator) delete iter; for(auto iter:teaadmi) delete iter; } void login() //登入函数 { std::string com; system("cls"); std::cout << "请输入密码\n"; getchar(); std::getline(std::cin,com); if(com == "bokuwasinnsekainokamitonaru") interface_Manager(); else { std::cout << "密码错误,输入任意键返回上一级\n"; getch(); } } void Add_information()//添加信息 { system("cls"); std::cout << "请输入添加类型\n1:实验员\t2:教师\t\t3:行政人员\t4:教师及行政人员\n"; int flag; std::cin >> flag; std::string name, se, id; int age; bool sex = 0; std::cout << "ID:\t\t"; std::cin >> id; for(unsigned int i = 0; i < id.length(); i++) { if(id[i] < '0' || id[i] > '9') { std::cout << "输入非法,输入任意键返回\n"; getch(); return; } } std::multimap<std::string, COMMON *>::iterator beg, en; beg = sear.lower_bound(id); en = sear.upper_bound(id); if(beg != en) { std::cout << "此ID已存在,输入任意键返回\n"; getch(); return; } std::cout << "姓名:\t\t"; std::cin >> name; for(unsigned int i = 0; i < name.length(); i++) { if(name[i] >= '0' && name[i] <= '9') { std::cout << "输入非法,输入任意键返回\n"; getch(); return; } } std::cout << "性别:\t\t"; std::cin >> se; if(se == "男") sex = 1; std::cout << "年龄:\t\t"; std::cin >> age; if(flag == 1) { std::string laboratory, title; std::cout << "实验室名称:\t"; std::cin >> laboratory; std::cout << "职务:\t\t"; std::cin >> title; TESTER *t = new TESTER(name,sex,age,id,laboratory,title); tester.push_back(t); sear.insert(make_pair(name, t)); sear.insert(make_pair(id, t)); std::ofstream out; out.open("实验员.txt", std::ios::app); out << name << " " << sex << " " << age << " " << id << " "; out << laboratory << " " << title << std::endl; out.close(); } if(flag == 2) { std::string department, profession, title; std::cout << "院系:\t\t"; std::cin >> department; std::cout << "专业:\t\t"; std::cin >> profession; std::cout << "职务:\t\t"; std::cin >> title; TEACHER *t = new TEACHER(name,sex,age,id,department,profession,title); teacher.push_back(t); sear.insert(make_pair(name, t)); sear.insert(make_pair(id, t)); std::ofstream out; out.open("教师.txt", std::ios::app); out << name << " " << sex << " " << age << " " << id << " "; out << department << " " << profession << " " << title << std::endl; out.close(); } if(flag == 3) { std::string politics, position; std::cout << "政治面貌:\t"; std::cin >> politics; std::cout << "职称:\t\t"; std::cin >> position; ADMINISTRATOR *t = new ADMINISTRATOR(name,sex,age,id,politics,position); administrator.push_back(t); sear.insert(make_pair(name, t)); sear.insert(make_pair(id, t)); std::ofstream out; out.open("行政人员.txt", std::ios::app); out << name << " " << sex << " " << age << " " << id << " "; out << politics << " " << position << std::endl; out.close(); } if(flag == 4) { std::string department, profession, title, politics, position; std::cout << "院系:\t\t"; std::cin >> department; std::cout << "专业:\t\t"; std::cin >> profession; std::cout << "职务:\t\t"; std::cin >> title; std::cout << "政治面貌:\t"; std::cin >> politics; std::cout << "职称:\t\t"; std::cin >> position; TEAADMI *t = new TEAADMI(name,sex,age,id,department,profession,title,politics,position); teaadmi.push_back(t); sear.insert(make_pair(name, t)); sear.insert(make_pair(id, t)); std::ofstream out; out.open("教师&行政人员.txt", std::ios::app); out << name << " " << sex << " " << age << " " << id << " "; out << department << " " << profession << " " << title << " "; out << politics << " " << position << std::endl; out.close(); } std::cout << "注册成功,输入任意键返回\n"; getch(); } void Delete_information() //删除信息 { std::cout << "输入目标ID以确认\n"; std::string aid; std::cin >> aid; for(unsigned int i = 0; i < aid.length(); i++) { if(aid[i] < '0' || aid[i] > '9') { std::cout << "输入非法,输入任意键返回\n"; getch(); return; } } std::multimap<std::string, COMMON *>::iterator beg, en, iter; beg = sear.lower_bound(aid); en = sear.upper_bound(aid); if(beg == en) { std::cout << "目标不存在,输入任意键返回\n"; getch(); return; } std::string aid_name = beg -> second -> get_name(); sear.erase(beg); beg = sear.lower_bound(aid_name); en = sear.upper_bound(aid_name); for(iter = beg; iter != en; ++iter) if(iter -> second -> get_id() == aid) {sear.erase(iter); break;} bool flag = 0; std::ofstream out; out.open("实验员.txt", std::ios::out); for(std::vector<TESTER*>::iterator it = tester.begin(); it != tester.end();) { if((*it) -> get_id() == aid){flag = 1; delete (*it); it = tester.erase(it); continue;} out << (*it) -> get_name() << " " << (*it) -> get_sex() << " "; out << (*it) -> get_age() << " " << (*it) -> get_id() << " "; out << (*it) -> get_laboratory() << " " << (*it) -> get_title() << std::endl; ++it; } out.close(); if(flag) {std::cout << "删除成功,输入任意键返回\n"; getch(); return;} out.open("教师.txt", std::ios::out); for(std::vector<TEACHER*>::iterator it = teacher.begin(); it != teacher.end();) { if((*it) -> get_id() == aid){flag = 1; delete (*it); it = teacher.erase(it); continue;} out << (*it) -> get_name() << " " << (*it) -> get_sex() << " "; out << (*it) -> get_age() << " " << (*it) -> get_id() << " "; out << (*it) -> get_department() << " " << (*it) -> get_profession() << " " << (*it) -> get_title() << std::endl; it++; } out.close(); if(flag) {std::cout << "删除成功,输入任意键返回\n"; getch(); return;} out.open("行政人员.txt", std::ios::out); for(std::vector<ADMINISTRATOR*>::iterator it = administrator.begin(); it != administrator.end();) { if((*it) -> get_id() == aid){flag = 1; delete (*it); it = administrator.erase(it); continue;} out << (*it) -> get_name() << " " << (*it) -> get_sex() << " "; out << (*it) -> get_age() << " " << (*it) -> get_id() << " "; out << (*it) -> get_politics() << " " << (*it) -> get_position() << std::endl; it++; } out.close(); if(flag) {std::cout << "删除成功,输入任意键返回\n"; getch(); return;} out.open("教师&行政人员.txt", std::ios::out); for(std::vector<TEAADMI*>::iterator it = teaadmi.begin(); it != teaadmi.end();) { if((*it) -> get_id() == aid){flag = 1; delete (*it); it = teaadmi.erase(it); continue;} out << (*it) -> get_name() << " " << (*it) -> get_sex() << " "; out << (*it) -> get_age() << " " << (*it) -> get_id() << " "; out << (*it) -> get_department() << " " << (*it) -> get_profession() << " " << (*it) -> get_title() << " "; out << (*it) -> get_politics() << " " << (*it) -> get_position() << std::endl; ++it; } out.close(); std::cout << "删除成功,输入任意键返回\n"; getch(); } void Edit_information() //修改信息 { std::cout << "输入目标ID以确认\n"; std::string aid; std::cin >> aid; for(unsigned int i = 0; i < aid.length(); i++) { if(aid[i] < '0' || aid[i] > '9') { std::cout << "输入非法,输入任意键返回\n"; getch(); return; } } std::multimap<std::string, COMMON *>::iterator beg, en, iter; beg = sear.lower_bound(aid); en = sear.upper_bound(aid); if(beg == en) { std::cout << "目标不存在,输入任意键返回\n"; getch(); return; } system("cls"); bool flag = 0; std::ofstream out; out.open("实验员.txt", std::ios::out); for(auto iter:tester) { if(iter -> get_id() == aid) { iter -> show(), std::cout << "\n\n根据提示输入修改信息\n\n"; while(iter -> change()) { system("cls"); iter -> show(); std::cout << "输入非法,请重新输入\n"; } flag = 1; } out << iter -> get_name() << " " << iter -> get_sex() << " "; out << iter -> get_age() << " " << iter -> get_id() << " "; out << iter -> get_laboratory() << " " << iter -> get_title() << std::endl; } out.close(); if(flag) {std::cout << "修改成功,输入任意键返回\n"; getch(); return;} out.open("教师.txt", std::ios::out); for(auto iter:teacher) { if(iter -> get_id() == aid) { iter -> show(), std::cout << "\n\n根据提示输入修改信息\n\n"; while(iter -> change()) { system("cls"); iter -> show(); std::cout << "输入非法,请重新输入\n"; } flag = 1; } out << iter -> get_name() << " " << iter -> get_sex() << " "; out << iter -> get_age() << " " << iter -> get_id() << " "; out << iter -> get_department() << " " << iter -> get_profession() << " " << iter -> get_title() << std::endl; } out.close(); if(flag) {std::cout << "修改成功,输入任意键返回\n"; getch(); return;} out.open("行政人员.txt", std::ios::out); for(auto iter:administrator) { if(iter -> get_id() == aid) { iter -> show(), std::cout << "\n\n根据提示输入修改信息\n\n"; while(iter -> change()) { system("cls"); iter -> show(); std::cout << "输入非法,请重新输入\n"; } flag = 1; } out << iter -> get_name() << " " << iter -> get_sex() << " "; out << iter -> get_age() << " " << iter -> get_id() << " "; out << iter -> get_politics() << " " << iter -> get_position() << std::endl; } out.close(); if(flag) {std::cout << "修改成功,输入任意键返回\n"; getch(); return;} out.open("教师&行政人员.txt", std::ios::out); for(auto iter:teaadmi) { if(iter -> get_id() == aid) { iter -> show(), std::cout << "\n\n根据提示输入修改信息\n\n"; while(iter -> change()) { system("cls"); iter -> show(); std::cout << "输入非法,请重新输入\n"; } flag = 1; } out << iter -> get_name() << " " << iter -> get_sex() << " "; out << iter -> get_age() << " " << iter -> get_id() << " "; out << iter -> get_department() << " " << iter -> get_profession() << " " << iter -> get_title() << " "; out << iter -> get_politics() << " " << iter -> get_position() << std::endl; } out.close(); std::cout << "修改成功,输入任意键返回\n"; getch(); } bool Query_information() //查询函数 { system("cls"); std::cout << "输入目标姓名或ID以查询\n"; std::string aid; std::cin >> aid; std::multimap<std::string, COMMON *>::iterator beg, en, iter; beg = sear.lower_bound(aid); en = sear.upper_bound(aid); if(beg == en) { std::cout << "查询结果为空,输入任意键返回\n"; getch(); return 0; } for(iter = beg; iter != en; ++iter) { iter -> second -> show(); std::cout << std::endl; } return 1; } void Browse_information() //浏览函数 { system("cls"); std::cout << "-------------------实验员-------------------\n"; std::cout << "姓名\t" << "性别\t" << "年龄\t" << "ID\t\t" << "实验室名称\t" << "职务\n"; for(auto iter:tester) iter -> show_row(); std::cout << "\n------------------行政人员------------------\n"; std::cout << "姓名\t" << "性别\t" << "年龄\t" << "ID\t\t" << "政治面貌\t" << "职称\n"; for(auto iter:administrator) iter -> show_row(); std::cout << "\n--------------------教师--------------------\n"; std::cout << "姓名\t" << "性别\t" << "年龄\t" << "ID\t\t" << "院系\t\t" << "专业\t\t" << "职务\n"; for(auto iter:teacher) iter -> show_row(); std::cout << "\n-----------------行政人员&教师--------------\n"; std::cout << "姓名\t" << "性别\t" << "年龄\t" << "ID\t\t" << "政治面貌\t" << "职称\t\t" << "院系\t\t" << "专业\t\t" << "职务\n"; for(auto iter:teaadmi) iter -> show_row(); } void count_information() //统计信息 { system("cls"); std::cout << "员工总人数:\t\t" << COMMON::get_person_sum() << std::endl; std::cout << "男性人数:\t\t" << COMMON::get_man_sum() << std::endl; std::cout << "女性人数:\t\t" << COMMON::get_woman_sum() << std::endl; std::cout << "教师人数:\t\t" << TEACHER::get_teacher_sum() << std::endl; std::cout << "实验员人数:\t\t" << TESTER::get_tester_sum() << std::endl; std::cout << "行政管理人员人数:\t" << ADMINISTRATOR::get_administrator_sum() << std::endl; std::cout << "行政管理人员&教师人数:\t" << TEAADMI::get_teaadmi_sum() << std::endl; std::cout << "\n\n输入任意键返回上一级\n"; getch(); } #endif // MYFUN_H_INCLUDED main.cpp 主函数: #include"interface.h" int main() { Information_load(); //加载信息 interface_login(); //首界面 room_delete(); //释放空间 // count_information(); return 0; }
为什么我用freemarker导出word文档,导出的里面全是ftl文字内容,而不是正确的格式呢?找了好久了都没找出来问题。。。
java代码: ``` import freemarker.template.Configuration; import freemarker.template.DefaultObjectWrapper; import freemarker.template.Template; import freemarker.template.TemplateExceptionHandler; import lombok.extern.slf4j.Slf4j; import sun.misc.BASE64Encoder; import java.io.*; import java.util.*; @Slf4j public class WordReporter { private static final String ENCODING = "UTF-8"; private static Configuration cfg = new Configuration(); //初始化cfg static { //设置模板所在文件夹 try { cfg.setDirectoryForTemplateLoading(new File("D:/")); } catch (IOException e) { e.printStackTrace(); } // setEncoding这个方法一定要设置国家及其编码,不然在ftl中的中文在生成html后会变成乱码 cfg.setEncoding(Locale.getDefault(), ENCODING); // 设置对象的包装器 cfg.setObjectWrapper(new DefaultObjectWrapper()); // 设置异常处理器,这样的话就可以${a.b.c.d}即使没有属性也不会出错 cfg.setTemplateExceptionHandler(TemplateExceptionHandler.IGNORE_HANDLER); } //获取模板对象 public static Template getTemplate(String templateFileName) throws IOException { return cfg.getTemplate(templateFileName, ENCODING); } /** * 据数据及模板生成文件 * @param data Map的数据结果集 * @param templateFileName ftl模版文件名 * @param outFilePath 生成文件名称(可带路径) */ public static File crateFile(Map<String, Object> data, String templateFileName, String outFilePath) { Writer out = null; File outFile = new File(outFilePath); try { // 获取模板,并设置编码方式,这个编码必须要与页面中的编码格式一致 Template template = getTemplate(templateFileName); if (!outFile.getParentFile().exists()) { outFile.getParentFile().mkdirs(); } out = new OutputStreamWriter(new FileOutputStream(outFile), ENCODING); // 处理模版 template.process(data, out); out.flush(); log.info("由模板文件" + templateFileName + "生成" + outFilePath + "成功."); } catch (Exception e) { log.error("由模板文件" + templateFileName + "生成" + outFilePath + "出错"); e.printStackTrace(); } finally { try { if (out != null) { out.close(); } } catch (IOException e) { log.error("关闭Write对象出错", e); e.printStackTrace(); } } return outFile; } public static void main(String[] args) { try { Map<String, Object> data = new HashMap<String, Object>(); List<Map<String, String>> newsList = new ArrayList<Map<String, String>>(); for(int i=1;i<=5;i++){ Map<String, String> map=new HashMap<String, String>(); map.put("stName", "字段姓名"+i); newsList.add(map); } data.put("list",newsList); crateFile(data, "a.ftl", "D:/aaa.docx"); } catch (Exception e) { e.printStackTrace(); } } } ``` ftl文件内容: ``` <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <w:document xmlns:wpc="http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp14="http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w15="http://schemas.microsoft.com/office/word/2012/wordml" xmlns:wpg="http://schemas.microsoft.com/office/word/2010/wordprocessingGroup" xmlns:wpi="http://schemas.microsoft.com/office/word/2010/wordprocessingInk" xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml" xmlns:wps="http://schemas.microsoft.com/office/word/2010/wordprocessingShape" xmlns:wpsCustomData="http://www.wps.cn/officeDocument/2013/wpsCustomData" mc:Ignorable="w14 w15 wp14"> <w:body> <#list list as data> <w:tbl> <w:tblPr> <w:tblStyle w:val="4"/> <w:tblW w:w="0" w:type="auto"/> <w:tblInd w:w="0" w:type="dxa"/> <w:tblBorders> <w:top w:val="single" w:color="auto" w:sz="4" w:space="0"/> <w:left w:val="single" w:color="auto" w:sz="4" w:space="0"/> <w:bottom w:val="single" w:color="auto" w:sz="4" w:space="0"/> <w:right w:val="single" w:color="auto" w:sz="4" w:space="0"/> <w:insideH w:val="single" w:color="auto" w:sz="4" w:space="0"/> <w:insideV w:val="single" w:color="auto" w:sz="4" w:space="0"/> </w:tblBorders> <w:tblLayout w:type="autofit"/> <w:tblCellMar> <w:left w:w="108" w:type="dxa"/> <w:right w:w="108" w:type="dxa"/> </w:tblCellMar> </w:tblPr> <w:tblGrid> <w:gridCol w:w="2840"/> <w:gridCol w:w="2841"/> <w:gridCol w:w="2841"/> </w:tblGrid> <w:tr> <w:tblPrEx> <w:tblBorders> <w:top w:val="single" w:color="auto" w:sz="4" w:space="0"/> <w:left w:val="single" w:color="auto" w:sz="4" w:space="0"/> <w:bottom w:val="single" w:color="auto" w:sz="4" w:space="0"/> <w:right w:val="single" w:color="auto" w:sz="4" w:space="0"/> <w:insideH w:val="single" w:color="auto" w:sz="4" w:space="0"/> <w:insideV w:val="single" w:color="auto" w:sz="4" w:space="0"/> </w:tblBorders> <w:tblCellMar> <w:left w:w="108" w:type="dxa"/> <w:right w:w="108" w:type="dxa"/> </w:tblCellMar> </w:tblPrEx> <w:tc> <w:tcPr> <w:tcW w:w="2840" w:type="dxa"/> </w:tcPr> <w:p> <w:pPr> <w:rPr> <w:rFonts w:hint="eastAsia" w:eastAsiaTheme="minorEastAsia"/> <w:vertAlign w:val="baseline"/> <w:lang w:val="en-US" w:eastAsia="zh-CN"/> </w:rPr> </w:pPr> <w:r> <w:rPr> <w:rFonts w:hint="eastAsia"/> <w:vertAlign w:val="baseline"/> <w:lang w:val="en-US" w:eastAsia="zh-CN"/> </w:rPr> <w:t>1</w:t> </w:r> </w:p> </w:tc> <w:tc> <w:tcPr> <w:tcW w:w="2841" w:type="dxa"/> </w:tcPr> <w:p> <w:pPr> <w:rPr> <w:rFonts w:hint="eastAsia" w:eastAsiaTheme="minorEastAsia"/> <w:vertAlign w:val="baseline"/> <w:lang w:val="en-US" w:eastAsia="zh-CN"/> </w:rPr> </w:pPr> <w:r> <w:rPr> <w:rFonts w:hint="eastAsia"/> <w:vertAlign w:val="baseline"/> <w:lang w:val="en-US" w:eastAsia="zh-CN"/> </w:rPr> <w:t>1</w:t> </w:r> </w:p> </w:tc> <w:tc> <w:tcPr> <w:tcW w:w="2841" w:type="dxa"/> </w:tcPr> <w:p> <w:pPr> <w:rPr> <w:rFonts w:hint="default" w:eastAsiaTheme="minorEastAsia"/> <w:vertAlign w:val="baseline"/> <w:lang w:val="en-US" w:eastAsia="zh-CN"/> </w:rPr> </w:pPr> <w:r> <w:rPr> <w:rFonts w:hint="eastAsia"/> <w:vertAlign w:val="baseline"/> <w:lang w:val="en-US" w:eastAsia="zh-CN"/> </w:rPr> <w:t>${data.stName}</w:t> </w:r> </w:p> </w:tc> </w:tr> </w:tbl> </#list> <w:p> <w:bookmarkStart w:id="0" w:name="_GoBack"/> <w:bookmarkEnd w:id="0"/> </w:p> <w:sectPr> <w:pgSz w:w="11906" w:h="16838"/> <w:pgMar w:top="1440" w:right="1800" w:bottom="1440" w:left="1800" w:header="851" w:footer="992" w:gutter="0"/> <w:cols w:space="425" w:num="1"/> <w:docGrid w:type="lines" w:linePitch="312" w:charSpace="0"/> </w:sectPr> </w:body> </w:document> ``` ![图片说明](https://img-ask.csdn.net/upload/201912/11/1576078986_743908.png) 导出的文件里面全是ftl文件里的文字内容
VScode调试时单步跳出失效
利用VScode对C语言编写的代码进行调试时, 点击单步跳出会弹出如图的错误 请问我该如何修改调试文件或者其他文件? 程序代码如下: 断点在printf函数处 ``` #include<stdio.h> #include<stdlib.h> int main(void) { for(int i=0;i<10;i++) printf("Hello world!\n"); system("pause"); return 0; } ``` ![图片说明](https://img-ask.csdn.net/upload/201912/03/1575361003_51914.png) launch.json文件内容如下 ``` { "version": "0.2.0", "configurations": [ { "name": "(gdb) Launch", "preLaunchTask": "build", "type": "cppdbg", "request": "launch", "program": "${fileDirname}/${fileBasenameNoExtension}.exe", "args": [], "stopAtEntry": false, "cwd": "${workspaceFolder}", "environment": [], "externalConsole": true, "MIMode": "gdb", "miDebuggerPath": "C:/mingw64/bin/gdb.exe", "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true, } ], "launchCompleteCommand": "exec-run", }] } ``` tasks.json文件内容如下 ``` { "version": "2.0.0", "tasks": [ { "label": "build", "type": "shell", "group": { "kind": "build", "isDefault": true }, "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "shared" }, "windows": { "command": "g++", "args": [ "-g", "\"${file}\"", "--std=c++11", "-o", "\"${fileDirname}\\${fileBasenameNoExtension}.exe\"", "-finput-charset=UTF-8", "-fexec-charset=GBK" ] } } ] } ```
js拼接对象里面含数组的json数据?
本人新手,对js了解不深,js拼接对象里面含数组json字符串不知道怎么搞了,求大神指导 数组代码 ``` var crulearr=[] for(var ccode of this.newDB){ if(ccode.id == this.ipboxid){ crulearr.push('{"rules":[{"field":"ParentID","op":"equal","value":"'+this.ipboxid+'","type":"int"},{"field":"CarbinCode","op":"equal","value":"'+this.cabincodearr+'","type":"string"}],"op":"and"}') } else{ crulearr.push('{"rules":[{"field":"ParentID","op":"equal","value":"'+ccode.id+'","type":"int"},{"field":"CarbinCode","op":"equal","value":"'+ccode.cabincodes+'","type":"string"}],"op":"and"}') } } console.log('row202:'+ JSON.stringify(crulearr)) ``` 数组数据如下: ![图片说明](https://img-ask.csdn.net/upload/201911/17/1574003769_109293.png) 拼json数据代码 ``` var rules='{"groups":'+ JSON.stringify(crulearr) +',"op":"and"}' this.prule=JSON.parse(rules) console.log('row222:'+ JSON.stringify(this.prule) ) ``` 获取到的数据如下: ![图片说明](https://img-ask.csdn.net/upload/201911/17/1574003811_555565.png) 想要实现的数据格式: ![图片说明](https://img-ask.csdn.net/upload/201911/17/1574003829_317921.png)
ieda 编译后报错Error:(2, 1) java: 需要class, interface或enum;该怎么办
{ "title" : "调试:com.intellij.database.psi.DbTableImpl", "methodList" : [ { "name" : "isSystem", "desc" : "public boolean com.intellij.database.psi.DbTableImpl.isSystem()", "value" : "false" }, { "name" : "isTemporary", "desc" : "public boolean com.intellij.database.psi.DbTableImpl.isTemporary()", "value" : "false" }, { "name" : "getDocumentation", "desc" : "public java.lang.StringBuilder com.intellij.database.psi.DbTableImpl.getDocumentation()", "value" : "<html><body><b>Data Source:</b> @localhost<br><b>Schema:</b> book<br><b>Table:</b> book<br><br><code><pre><font color=\"#808080\">-- auto-generated definition</font>\n<font color=\"#cc7832\"><b>create</b></font> <font color=\"#cc7832\"><b>table</b></font> book\n(\n id <font color=\"#cc7832\"><b>int</b></font> <font color=\"#cc7832\"><b>null</b></font><font color=\"#cc7832\">,</font>\n price <font color=\"#cc7832\"><b>double</b></font> <font color=\"#cc7832\"><b>null</b></font>\n)<font color=\"#cc7832\">;</font></pre></code>" }, { "name" : "getDocumentation", "desc" : "public java.lang.CharSequence com.intellij.database.psi.DbTableImpl.getDocumentation()", "value" : "<html><body><b>Data Source:</b> @localhost<br><b>Schema:</b> book<br><b>Table:</b> book<br><br><code><pre><font color=\"#808080\">-- auto-generated definition</font>\n<font color=\"#cc7832\"><b>create</b></font> <font color=\"#cc7832\"><b>table</b></font> book\n(\n id <font color=\"#cc7832\"><b>int</b></font> <font color=\"#cc7832\"><b>null</b></font><font color=\"#cc7832\">,</font>\n price <font color=\"#cc7832\"><b>double</b></font> <font color=\"#cc7832\"><b>null</b></font>\n)<font color=\"#cc7832\">;</font></pre></code>" }, { "name" : "getColumnAttrs", "desc" : "public java.util.Set<com.intellij.database.model.DasColumn$Attribute> com.intellij.database.psi.DbTableImpl.getColumnAttrs(com.intellij.database.model.DasColumn)", "value" : null }, { "name" : "getName", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getName()", "value" : "book" }, { "name" : "getName", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getName(com.intellij.psi.PsiElement)", "value" : null }, { "name" : "getLanguage", "desc" : "public com.intellij.lang.Language com.intellij.database.psi.DbElementImpl.getLanguage()", "value" : "Language: SQL" }, { "name" : "getTypeName", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getTypeName()", "value" : "table" }, { "name" : "getParent", "desc" : "public com.intellij.database.psi.DbElement com.intellij.database.psi.DbElementImpl.getParent()", "value" : "schema:book" }, { "name" : "getParent", "desc" : "public com.intellij.psi.PsiElement com.intellij.database.psi.DbElementImpl.getParent()", "value" : "schema:book" }, { "name" : "getParent", "desc" : "public com.intellij.psi.PsiFileSystemItem com.intellij.database.psi.DbElementImpl.getParent()", "value" : "schema:book" }, { "name" : "init", "desc" : "public void com.intellij.database.psi.DbElementImpl.init(com.intellij.psi.PsiElement)", "value" : null }, { "name" : "setName", "desc" : "public com.intellij.psi.PsiElement com.intellij.database.psi.DbElementImpl.setName(java.lang.String) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "isDirectory", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.isDirectory()", "value" : "false" }, { "name" : "getDeclaration", "desc" : "public com.intellij.psi.PsiElement com.intellij.database.psi.DbElementImpl.getDeclaration()", "value" : "table:book" }, { "name" : "isValid", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.isValid()", "value" : "true" }, { "name" : "getText", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getText()", "value" : "create table book\n(\n id int null,\n price double null\n);\n\n" }, { "name" : "getComment", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getComment()", "value" : null }, { "name" : "isWritable", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.isWritable()", "value" : "true" }, { "name" : "newDeclarationProcessor", "desc" : "public static com.intellij.util.Processor<com.intellij.database.psi.DbElement> com.intellij.database.psi.DbElementImpl.newDeclarationProcessor(com.intellij.psi.scope.PsiScopeProcessor,com.intellij.psi.ResolveState,com.intellij.psi.PsiElement)", "value" : null }, { "name" : "createDeclarationProcessor", "desc" : "public com.intellij.util.Processor<com.intellij.database.psi.DbElement> com.intellij.database.psi.DbElementImpl.createDeclarationProcessor(com.intellij.psi.scope.PsiScopeProcessor,com.intellij.psi.ResolveState,com.intellij.psi.PsiElement,com.intellij.psi.PsiElement)", "value" : null }, { "name" : "getIcon", "desc" : "public javax.swing.Icon com.intellij.database.psi.DbElementImpl.getIcon()", "value" : "Deferred. Base=Row icon. myIcons=[jar:file:/C:/Program%20Files/JetBrains/IntelliJ%20IDEA%202018.3.4/plugins/DatabaseTools/lib/database-openapi.jar!/icons/table.svg, null]" }, { "name" : "getIcon", "desc" : "public javax.swing.Icon com.intellij.database.psi.DbElementImpl.getIcon(boolean)", "value" : null }, { "name" : "getManager", "desc" : "public com.intellij.psi.PsiManager com.intellij.database.psi.DbElementImpl.getManager()", "value" : "com.intellij.psi.impl.PsiManagerImpl@6823f16" }, { "name" : "getWeight", "desc" : "public int com.intellij.database.psi.DbElementImpl.getWeight()", "value" : "10000" }, { "name" : "isCaseSensitive", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.isCaseSensitive()", "value" : "false" }, { "name" : "getPosition", "desc" : "public short com.intellij.database.psi.DbElementImpl.getPosition()", "value" : "0" }, { "name" : "getChildren", "desc" : "public com.intellij.psi.PsiElement[] com.intellij.database.psi.DbElementImpl.getChildren()", "value" : "[Lcom.intellij.psi.PsiElement;@55d5f84e" }, { "name" : "getDelegate", "desc" : "public D com.intellij.database.psi.DbElementImpl.getDelegate()", "value" : "book: table" }, { "name" : "getKind", "desc" : "public com.intellij.database.model.ObjectKind com.intellij.database.psi.DbElementImpl.getKind()", "value" : "table" }, { "name" : "getProject", "desc" : "public com.intellij.openapi.project.Project com.intellij.database.psi.DbElementImpl.getProject()", "value" : "Project 'E:\\2019实践学期' demo" }, { "name" : "getVirtualFile", "desc" : "public com.intellij.openapi.vfs.VirtualFile com.intellij.database.psi.DbElementImpl.getVirtualFile()", "value" : "DB VirtualFile: table, book.book [@localhost] (Valid)" }, { "name" : "getMetaData", "desc" : "public com.intellij.psi.meta.PsiMetaData com.intellij.database.psi.DbElementImpl.getMetaData()", "value" : "table:book" }, { "name" : "getLocationString", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getLocationString()", "value" : "book [@localhost]" }, { "name" : "processDeclarations", "desc" : "public final boolean com.intellij.database.psi.DbElementImpl.processDeclarations(com.intellij.psi.scope.PsiScopeProcessor,com.intellij.psi.ResolveState,com.intellij.psi.PsiElement,com.intellij.psi.PsiElement)", "value" : null }, { "name" : "navigate", "desc" : "public void com.intellij.database.psi.DbElementImpl.navigate(boolean)", "value" : null }, { "name" : "canNavigate", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.canNavigate()", "value" : null }, { "name" : "acceptChildren", "desc" : "public void com.intellij.database.psi.DbElementImpl.acceptChildren(com.intellij.psi.PsiElementVisitor)", "value" : null }, { "name" : "processChildren", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.processChildren(com.intellij.psi.search.PsiElementProcessor<com.intellij.psi.PsiFileSystemItem>)", "value" : null }, { "name" : "getDataSource", "desc" : "public com.intellij.database.psi.DbDataSource com.intellij.database.psi.DbElementImpl.getDataSource()", "value" : "root:@localhost" }, { "name" : "getDataSource", "desc" : "public com.intellij.database.psi.DbDataSourceImpl com.intellij.database.psi.DbElementImpl.getDataSource()", "value" : "root:@localhost" }, { "name" : "checkSetName", "desc" : "public void com.intellij.database.psi.DbElementImpl.checkSetName(java.lang.String) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "getDasParent", "desc" : "public P com.intellij.database.psi.DbElementImpl.getDasParent()", "value" : "schema:book" }, { "name" : "getDasParent", "desc" : "public com.intellij.database.model.DasObject com.intellij.database.psi.DbElementImpl.getDasParent()", "value" : "schema:book" }, { "name" : "getDasChildren", "desc" : "public com.intellij.util.containers.JBIterable<com.intellij.database.psi.DbElement> com.intellij.database.psi.DbElementImpl.getDasChildren(com.intellij.database.model.ObjectKind)", "value" : null }, { "name" : "canNavigateToSource", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.canNavigateToSource()", "value" : null }, { "name" : "getBaseIcon", "desc" : "public javax.swing.Icon com.intellij.database.psi.DbElementImpl.getBaseIcon()", "value" : "jar:file:/C:/Program%20Files/JetBrains/IntelliJ%20IDEA%202018.3.4/plugins/DatabaseTools/lib/database-openapi.jar!/icons/table.svg" }, { "name" : "getNode", "desc" : "public com.intellij.lang.ASTNode com.intellij.psi.impl.FakePsiElement.getNode()", "value" : null }, { "name" : "getTextLength", "desc" : "public int com.intellij.psi.impl.FakePsiElement.getTextLength()", "value" : "0" }, { "name" : "getFirstChild", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.FakePsiElement.getFirstChild()", "value" : null }, { "name" : "getLastChild", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.FakePsiElement.getLastChild()", "value" : null }, { "name" : "getNextSibling", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.FakePsiElement.getNextSibling()", "value" : null }, { "name" : "getIcon", "desc" : "public final javax.swing.Icon com.intellij.psi.impl.FakePsiElement.getIcon(int)", "value" : null }, { "name" : "getPresentation", "desc" : "public com.intellij.navigation.ItemPresentation com.intellij.psi.impl.FakePsiElement.getPresentation()", "value" : "table:book" }, { "name" : "getTextOffset", "desc" : "public int com.intellij.psi.impl.FakePsiElement.getTextOffset()", "value" : "0" }, { "name" : "getPrevSibling", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.FakePsiElement.getPrevSibling()", "value" : null }, { "name" : "isPhysical", "desc" : "public boolean com.intellij.psi.impl.FakePsiElement.isPhysical()", "value" : "false" }, { "name" : "getTextRange", "desc" : "public com.intellij.openapi.util.TextRange com.intellij.psi.impl.FakePsiElement.getTextRange()", "value" : null }, { "name" : "findElementAt", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.FakePsiElement.findElementAt(int)", "value" : null }, { "name" : "getStartOffsetInParent", "desc" : "public int com.intellij.psi.impl.FakePsiElement.getStartOffsetInParent()", "value" : "0" }, { "name" : "textContains", "desc" : "public boolean com.intellij.psi.impl.FakePsiElement.textContains(char)", "value" : null }, { "name" : "textToCharArray", "desc" : "public char[] com.intellij.psi.impl.FakePsiElement.textToCharArray()", "value" : null }, { "name" : "getPresentableText", "desc" : "public java.lang.String com.intellij.psi.impl.FakePsiElement.getPresentableText()", "value" : "book" }, { "name" : "add", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.add(com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "replace", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.replace(com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "checkDelete", "desc" : "public void com.intellij.psi.impl.PsiElementBase.checkDelete() throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "delete", "desc" : "public void com.intellij.psi.impl.PsiElementBase.delete() throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "accept", "desc" : "public void com.intellij.psi.impl.PsiElementBase.accept(com.intellij.psi.PsiElementVisitor)", "value" : null }, { "name" : "getContext", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.getContext()", "value" : "schema:book" }, { "name" : "copy", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.copy()", "value" : null }, { "name" : "addRange", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.addRange(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "addBefore", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.addBefore(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "addAfter", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.addAfter(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "getReference", "desc" : "public com.intellij.psi.PsiReference com.intellij.psi.impl.PsiElementBase.getReference()", "value" : null }, { "name" : "getContainingFile", "desc" : "public com.intellij.psi.PsiFile com.intellij.psi.impl.PsiElementBase.getContainingFile()", "value" : null }, { "name" : "getOriginalElement", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.getOriginalElement()", "value" : "table:book" }, { "name" : "getNavigationElement", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.getNavigationElement()", "value" : "table:book" }, { "name" : "getUseScope", "desc" : "public com.intellij.psi.search.SearchScope com.intellij.psi.impl.PsiElementBase.getUseScope()", "value" : "Project and Libraries" }, { "name" : "getResolveScope", "desc" : "public com.intellij.psi.search.GlobalSearchScope com.intellij.psi.impl.PsiElementBase.getResolveScope()", "value" : "Project and Libraries" }, { "name" : "getReferences", "desc" : "public com.intellij.psi.PsiReference[] com.intellij.psi.impl.PsiElementBase.getReferences()", "value" : "[Lcom.intellij.psi.PsiReference;@140035ec" }, { "name" : "checkAdd", "desc" : "public void com.intellij.psi.impl.PsiElementBase.checkAdd(com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "addRangeBefore", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.addRangeBefore(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "addRangeAfter", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.addRangeAfter(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "findReferenceAt", "desc" : "public com.intellij.psi.PsiReference com.intellij.psi.impl.PsiElementBase.findReferenceAt(int)", "value" : null }, { "name" : "textMatches", "desc" : "public boolean com.intellij.psi.impl.PsiElementBase.textMatches(com.intellij.psi.PsiElement)", "value" : null }, { "name" : "textMatches", "desc" : "public boolean com.intellij.psi.impl.PsiElementBase.textMatches(java.lang.CharSequence)", "value" : null }, { "name" : "isEquivalentTo", "desc" : "public boolean com.intellij.psi.impl.PsiElementBase.isEquivalentTo(com.intellij.psi.PsiElement)", "value" : null }, { "name" : "deleteChildRange", "desc" : "public void com.intellij.psi.impl.PsiElementBase.deleteChildRange(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "isNativeFileType", "desc" : "public static boolean com.intellij.psi.impl.ElementBase.isNativeFileType(com.intellij.openapi.fileTypes.FileType)", "value" : null }, { "name" : "overlayIcons", "desc" : "public static javax.swing.Icon com.intellij.psi.impl.ElementBase.overlayIcons(javax.swing.Icon...)", "value" : null }, { "name" : "buildRowIcon", "desc" : "public static com.intellij.ui.RowIcon com.intellij.psi.impl.ElementBase.buildRowIcon(javax.swing.Icon,javax.swing.Icon)", "value" : null }, { "name" : "transformFlags", "desc" : "public static int com.intellij.psi.impl.ElementBase.transformFlags(com.intellij.psi.PsiElement,int)", "value" : null }, { "name" : "createLayeredIcon", "desc" : "public static com.intellij.ui.RowIcon com.intellij.psi.impl.ElementBase.createLayeredIcon(com.intellij.openapi.util.Iconable,javax.swing.Icon,int)", "value" : null }, { "name" : "iconWithVisibilityIfNeeded", "desc" : "public static javax.swing.Icon com.intellij.psi.impl.ElementBase.iconWithVisibilityIfNeeded(int,javax.swing.Icon,javax.swing.Icon)", "value" : null }, { "name" : "registerIconLayer", "desc" : "public static void com.intellij.psi.impl.ElementBase.registerIconLayer(int,javax.swing.Icon)", "value" : null }, { "name" : "replace", "desc" : "public <T> boolean com.intellij.openapi.util.UserDataHolderBase.replace(com.intellij.openapi.util.Key<T>,T,T)", "value" : null }, { "name" : "getUserData", "desc" : "public <T> T com.intellij.openapi.util.UserDataHolderBase.getUserData(com.intellij.openapi.util.Key<T>)", "value" : null }, { "name" : "copyUserDataTo", "desc" : "public void com.intellij.openapi.util.UserDataHolderBase.copyUserDataTo(com.intellij.openapi.util.UserDataHolderBase)", "value" : null }, { "name" : "isUserDataEmpty", "desc" : "public boolean com.intellij.openapi.util.UserDataHolderBase.isUserDataEmpty()", "value" : "false" }, { "name" : "putUserData", "desc" : "public <T> void com.intellij.openapi.util.UserDataHolderBase.putUserData(com.intellij.openapi.util.Key<T>,T)", "value" : null }, { "name" : "getCopyableUserData", "desc" : "public <T> T com.intellij.openapi.util.UserDataHolderBase.getCopyableUserData(com.intellij.openapi.util.Key<T>)", "value" : null }, { "name" : "putCopyableUserData", "desc" : "public <T> void com.intellij.openapi.util.UserDataHolderBase.putCopyableUserData(com.intellij.openapi.util.Key<T>,T)", "value" : null }, { "name" : "copyCopyableDataTo", "desc" : "public void com.intellij.openapi.util.UserDataHolderBase.copyCopyableDataTo(com.intellij.openapi.util.UserDataHolderBase)", "value" : null }, { "name" : "getUserDataString", "desc" : "public java.lang.String com.intellij.openapi.util.UserDataHolderBase.getUserDataString()", "value" : "{CACHED_SMART_POINTER_KEY=com.intellij.reference.SoftReference@2190c68d, lastComputedIcon={0=Row icon. myIcons=[jar:file:/C:/Program%20Files/JetBrains/IntelliJ%20IDEA%202018.3.4/plugins/DatabaseTools/lib/database-openapi.jar!/icons/table.svg, null]}, COLOR_KEY=com.intellij.database.view.DatabaseColorManager$CachedColor@36fd2726}" }, { "name" : "putUserDataIfAbsent", "desc" : "public <T> T com.intellij.openapi.util.UserDataHolderBase.putUserDataIfAbsent(com.intellij.openapi.util.Key<T>,T)", "value" : null }, { "name" : "getTextRangeInParent", "desc" : "public default com.intellij.openapi.util.TextRange com.intellij.psi.PsiElement.getTextRangeInParent()", "value" : "(0,0)" }, { "name" : "getDbParent", "desc" : "public default com.intellij.database.model.DasObject com.intellij.database.model.DasObject.getDbParent()", "value" : "schema:book" }, { "name" : "getDbChildren", "desc" : "public default <C> com.intellij.util.containers.JBIterable<C> com.intellij.database.model.DasObject.getDbChildren(java.lang.Class<C>,com.intellij.database.model.ObjectKind)", "value" : null }, { "name" : "getDependencies", "desc" : "public default java.lang.Object[] com.intellij.psi.meta.PsiMetaData.getDependencies()", "value" : "[Ljava.lang.Object;@4c90ae3f" }, { "name" : "getDependences", "desc" : "public default java.lang.Object[] com.intellij.psi.meta.PsiMetaData.getDependences()", "value" : "[Ljava.lang.Object;@4c90ae3f" } ], "----" : "-----------------我是一条华丽的分割线-----------------", "fieldList" : [ { "name" : "LOG", "type" : "com.intellij.openapi.diagnostic.Logger", "value" : "com.intellij.idea.IdeaLogger@689a33b9" }, { "name" : "WEIGHT_BASE", "type" : "int", "value" : "10000" }, { "name" : "WEIGHT_INC", "type" : "int", "value" : "1000" }, { "name" : "myParent", "type" : "com.intellij.database.psi.DbElement", "value" : "schema:book" }, { "name" : "myDelegate", "type" : "java.lang.Object", "value" : "book: table" }, { "name" : "myTransactionalVersion", "type" : "long", "value" : "11" }, { "name" : "ASYNC_DOC_CUT", "type" : "java.lang.String", "value" : "<!-- async-doc-cut -->" }, { "name" : "LOG", "type" : "com.intellij.openapi.diagnostic.Logger", "value" : "com.intellij.idea.IdeaLogger@63538153" }, { "name" : "LOG", "type" : "com.intellij.openapi.diagnostic.Logger", "value" : "com.intellij.idea.IdeaLogger@57ae08e7" }, { "name" : "FLAGS_LOCKED", "type" : "int", "value" : "2048" }, { "name" : "ICON_COMPUTE", "type" : "com.intellij.util.NullableFunction", "value" : "com.intellij.psi.impl.ElementBase$$Lambda$705/682411935@622e87c4" }, { "name" : "VISIBILITY_ICON_PLACEHOLDER", "type" : "com.intellij.openapi.util.NotNullLazyValue", "value" : "com.intellij.psi.impl.ElementBase$1@5b1067c3" }, { "name" : "ICON_PLACEHOLDER", "type" : "com.intellij.openapi.util.NotNullLazyValue", "value" : "com.intellij.psi.impl.ElementBase$2@24b63ceb" }, { "name" : "ourIconLayers", "type" : "java.util.List", "value" : "[com.intellij.psi.impl.ElementBase$IconLayer@3f8e1aa, com.intellij.psi.impl.ElementBase$IconLayer@157e46b6, com.intellij.psi.impl.ElementBase$IconLayer@4d0815a5, com.intellij.psi.impl.ElementBase$IconLayer@58cc298b]" }, { "name" : "COPYABLE_USER_MAP_KEY", "type" : "com.intellij.openapi.util.Key", "value" : "COPYABLE_USER_MAP_KEY" }, { "name" : "myUserMap", "type" : "com.intellij.util.keyFMap.KeyFMap", "value" : "{CACHED_SMART_POINTER_KEY=com.intellij.reference.SoftReference@2190c68d, lastComputedIcon={0=Row icon. myIcons=[jar:file:/C:/Program%20Files/JetBrains/IntelliJ%20IDEA%202018.3.4/plugins/DatabaseTools/lib/database-openapi.jar!/icons/table.svg, null]}, COLOR_KEY=com.intellij.database.view.DatabaseColorManager$CachedColor@36fd2726}" }, { "name" : "updater", "type" : "com.intellij.util.concurrency.AtomicFieldUpdater", "value" : "com.intellij.util.concurrency.AtomicFieldUpdater@1c7d7689" } ] } //调试列原始对象 { "title" : "调试:com.intellij.database.psi.DbColumnImpl", "methodList" : [ { "name" : "getDefault", "desc" : "public java.lang.String com.intellij.database.psi.DbColumnImpl.getDefault()", "value" : null }, { "name" : "getParent", "desc" : "public com.intellij.database.psi.DbTable com.intellij.database.psi.DbColumnImpl.getParent()", "value" : "table:book" }, { "name" : "getParent", "desc" : "public com.intellij.database.psi.DbElement com.intellij.database.psi.DbColumnImpl.getParent()", "value" : "table:book" }, { "name" : "getParent", "desc" : "public com.intellij.psi.PsiFileSystemItem com.intellij.database.psi.DbColumnImpl.getParent()", "value" : "table:book" }, { "name" : "getParent", "desc" : "public com.intellij.psi.PsiElement com.intellij.database.psi.DbColumnImpl.getParent()", "value" : "table:book" }, { "name" : "getTable", "desc" : "public com.intellij.database.model.DasTable com.intellij.database.psi.DbColumnImpl.getTable()", "value" : "table:book" }, { "name" : "getTable", "desc" : "public com.intellij.database.psi.DbTable com.intellij.database.psi.DbColumnImpl.getTable()", "value" : "table:book" }, { "name" : "getWeight", "desc" : "public int com.intellij.database.psi.DbColumnImpl.getWeight()", "value" : "10030" }, { "name" : "getDataType", "desc" : "public com.intellij.database.model.DataType com.intellij.database.psi.DbColumnImpl.getDataType()", "value" : "int(11)" }, { "name" : "isNotNull", "desc" : "public boolean com.intellij.database.psi.DbColumnImpl.isNotNull()", "value" : "false" }, { "name" : "getDocumentation", "desc" : "public java.lang.StringBuilder com.intellij.database.psi.DbColumnImpl.getDocumentation()", "value" : "<html><body><b>Data Source:</b> @localhost<br><b>Schema:</b> book<br><b>Table:</b> book<br><b>Column:</b> id<br><br><code><pre><font color=\"#cc7832\"><b>alter</b></font> <font color=\"#cc7832\"><b>table</b></font> book\n <font color=\"#cc7832\"><b>add</b></font> id <font color=\"#cc7832\"><b>int</b></font> <font color=\"#cc7832\"><b>null</b></font><font color=\"#cc7832\">;</font>\n\n</pre></code>" }, { "name" : "getDocumentation", "desc" : "public java.lang.CharSequence com.intellij.database.psi.DbColumnImpl.getDocumentation()", "value" : "<html><body><b>Data Source:</b> @localhost<br><b>Schema:</b> book<br><b>Table:</b> book<br><b>Column:</b> id<br><br><code><pre><font color=\"#cc7832\"><b>alter</b></font> <font color=\"#cc7832\"><b>table</b></font> book\n <font color=\"#cc7832\"><b>add</b></font> id <font color=\"#cc7832\"><b>int</b></font> <font color=\"#cc7832\"><b>null</b></font><font color=\"#cc7832\">;</font>\n\n</pre></code>" }, { "name" : "getTableName", "desc" : "public java.lang.String com.intellij.database.psi.DbColumnImpl.getTableName()", "value" : "book" }, { "name" : "getName", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getName()", "value" : "id" }, { "name" : "getName", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getName(com.intellij.psi.PsiElement)", "value" : null }, { "name" : "getLanguage", "desc" : "public com.intellij.lang.Language com.intellij.database.psi.DbElementImpl.getLanguage()", "value" : "Language: SQL" }, { "name" : "getTypeName", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getTypeName()", "value" : "column" }, { "name" : "init", "desc" : "public void com.intellij.database.psi.DbElementImpl.init(com.intellij.psi.PsiElement)", "value" : null }, { "name" : "setName", "desc" : "public com.intellij.psi.PsiElement com.intellij.database.psi.DbElementImpl.setName(java.lang.String) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "isDirectory", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.isDirectory()", "value" : "false" }, { "name" : "getDeclaration", "desc" : "public com.intellij.psi.PsiElement com.intellij.database.psi.DbElementImpl.getDeclaration()", "value" : "column:id" }, { "name" : "isValid", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.isValid()", "value" : "true" }, { "name" : "getText", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getText()", "value" : "alter table book\n add id int null;\n\n" }, { "name" : "getComment", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getComment()", "value" : null }, { "name" : "isWritable", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.isWritable()", "value" : "true" }, { "name" : "newDeclarationProcessor", "desc" : "public static com.intellij.util.Processor<com.intellij.database.psi.DbElement> com.intellij.database.psi.DbElementImpl.newDeclarationProcessor(com.intellij.psi.scope.PsiScopeProcessor,com.intellij.psi.ResolveState,com.intellij.psi.PsiElement)", "value" : null }, { "name" : "createDeclarationProcessor", "desc" : "public com.intellij.util.Processor<com.intellij.database.psi.DbElement> com.intellij.database.psi.DbElementImpl.createDeclarationProcessor(com.intellij.psi.scope.PsiScopeProcessor,com.intellij.psi.ResolveState,com.intellij.psi.PsiElement,com.intellij.psi.PsiElement)", "value" : null }, { "name" : "getIcon", "desc" : "public javax.swing.Icon com.intellij.database.psi.DbElementImpl.getIcon()", "value" : "Deferred. Base=jar:file:/C:/Program%20Files/JetBrains/IntelliJ%20IDEA%202018.3.4/plugins/DatabaseTools/lib/database-openapi.jar!/icons/col.svg" }, { "name" : "getIcon", "desc" : "public javax.swing.Icon com.intellij.database.psi.DbElementImpl.getIcon(boolean)", "value" : null }, { "name" : "getManager", "desc" : "public com.intellij.psi.PsiManager com.intellij.database.psi.DbElementImpl.getManager()", "value" : "com.intellij.psi.impl.PsiManagerImpl@6823f16" }, { "name" : "isCaseSensitive", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.isCaseSensitive()", "value" : "false" }, { "name" : "getPosition", "desc" : "public short com.intellij.database.psi.DbElementImpl.getPosition()", "value" : "1" }, { "name" : "getChildren", "desc" : "public com.intellij.psi.PsiElement[] com.intellij.database.psi.DbElementImpl.getChildren()", "value" : "[Lcom.intellij.psi.PsiElement;@55d5f84e" }, { "name" : "getDelegate", "desc" : "public D com.intellij.database.psi.DbElementImpl.getDelegate()", "value" : "id: column" }, { "name" : "getKind", "desc" : "public com.intellij.database.model.ObjectKind com.intellij.database.psi.DbElementImpl.getKind()", "value" : "column" }, { "name" : "getProject", "desc" : "public com.intellij.openapi.project.Project com.intellij.database.psi.DbElementImpl.getProject()", "value" : "Project 'E:\\2019实践学期' demo" }, { "name" : "getVirtualFile", "desc" : "public com.intellij.openapi.vfs.VirtualFile com.intellij.database.psi.DbElementImpl.getVirtualFile()", "value" : "DB VirtualFile: column, book.book.id [@localhost] (Valid)" }, { "name" : "getMetaData", "desc" : "public com.intellij.psi.meta.PsiMetaData com.intellij.database.psi.DbElementImpl.getMetaData()", "value" : "column:id" }, { "name" : "getLocationString", "desc" : "public java.lang.String com.intellij.database.psi.DbElementImpl.getLocationString()", "value" : "book.book [@localhost]" }, { "name" : "processDeclarations", "desc" : "public final boolean com.intellij.database.psi.DbElementImpl.processDeclarations(com.intellij.psi.scope.PsiScopeProcessor,com.intellij.psi.ResolveState,com.intellij.psi.PsiElement,com.intellij.psi.PsiElement)", "value" : null }, { "name" : "navigate", "desc" : "public void com.intellij.database.psi.DbElementImpl.navigate(boolean)", "value" : null }, { "name" : "canNavigate", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.canNavigate()", "value" : null }, { "name" : "acceptChildren", "desc" : "public void com.intellij.database.psi.DbElementImpl.acceptChildren(com.intellij.psi.PsiElementVisitor)", "value" : null }, { "name" : "processChildren", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.processChildren(com.intellij.psi.search.PsiElementProcessor<com.intellij.psi.PsiFileSystemItem>)", "value" : null }, { "name" : "getDataSource", "desc" : "public com.intellij.database.psi.DbDataSource com.intellij.database.psi.DbElementImpl.getDataSource()", "value" : "root:@localhost" }, { "name" : "getDataSource", "desc" : "public com.intellij.database.psi.DbDataSourceImpl com.intellij.database.psi.DbElementImpl.getDataSource()", "value" : "root:@localhost" }, { "name" : "checkSetName", "desc" : "public void com.intellij.database.psi.DbElementImpl.checkSetName(java.lang.String) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "getDasParent", "desc" : "public P com.intellij.database.psi.DbElementImpl.getDasParent()", "value" : "table:book" }, { "name" : "getDasParent", "desc" : "public com.intellij.database.model.DasObject com.intellij.database.psi.DbElementImpl.getDasParent()", "value" : "table:book" }, { "name" : "getDasChildren", "desc" : "public com.intellij.util.containers.JBIterable<com.intellij.database.psi.DbElement> com.intellij.database.psi.DbElementImpl.getDasChildren(com.intellij.database.model.ObjectKind)", "value" : null }, { "name" : "canNavigateToSource", "desc" : "public boolean com.intellij.database.psi.DbElementImpl.canNavigateToSource()", "value" : null }, { "name" : "getBaseIcon", "desc" : "public javax.swing.Icon com.intellij.database.psi.DbElementImpl.getBaseIcon()", "value" : "jar:file:/C:/Program%20Files/JetBrains/IntelliJ%20IDEA%202018.3.4/plugins/DatabaseTools/lib/database-openapi.jar!/icons/col.svg" }, { "name" : "getNode", "desc" : "public com.intellij.lang.ASTNode com.intellij.psi.impl.FakePsiElement.getNode()", "value" : null }, { "name" : "getTextLength", "desc" : "public int com.intellij.psi.impl.FakePsiElement.getTextLength()", "value" : "0" }, { "name" : "getFirstChild", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.FakePsiElement.getFirstChild()", "value" : null }, { "name" : "getLastChild", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.FakePsiElement.getLastChild()", "value" : null }, { "name" : "getNextSibling", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.FakePsiElement.getNextSibling()", "value" : null }, { "name" : "getIcon", "desc" : "public final javax.swing.Icon com.intellij.psi.impl.FakePsiElement.getIcon(int)", "value" : null }, { "name" : "getPresentation", "desc" : "public com.intellij.navigation.ItemPresentation com.intellij.psi.impl.FakePsiElement.getPresentation()", "value" : "column:id" }, { "name" : "getTextOffset", "desc" : "public int com.intellij.psi.impl.FakePsiElement.getTextOffset()", "value" : "0" }, { "name" : "getPrevSibling", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.FakePsiElement.getPrevSibling()", "value" : null }, { "name" : "isPhysical", "desc" : "public boolean com.intellij.psi.impl.FakePsiElement.isPhysical()", "value" : "false" }, { "name" : "getTextRange", "desc" : "public com.intellij.openapi.util.TextRange com.intellij.psi.impl.FakePsiElement.getTextRange()", "value" : null }, { "name" : "findElementAt", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.FakePsiElement.findElementAt(int)", "value" : null }, { "name" : "getStartOffsetInParent", "desc" : "public int com.intellij.psi.impl.FakePsiElement.getStartOffsetInParent()", "value" : "0" }, { "name" : "textContains", "desc" : "public boolean com.intellij.psi.impl.FakePsiElement.textContains(char)", "value" : null }, { "name" : "textToCharArray", "desc" : "public char[] com.intellij.psi.impl.FakePsiElement.textToCharArray()", "value" : null }, { "name" : "getPresentableText", "desc" : "public java.lang.String com.intellij.psi.impl.FakePsiElement.getPresentableText()", "value" : "id" }, { "name" : "add", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.add(com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "replace", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.replace(com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "checkDelete", "desc" : "public void com.intellij.psi.impl.PsiElementBase.checkDelete() throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "delete", "desc" : "public void com.intellij.psi.impl.PsiElementBase.delete() throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "accept", "desc" : "public void com.intellij.psi.impl.PsiElementBase.accept(com.intellij.psi.PsiElementVisitor)", "value" : null }, { "name" : "getContext", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.getContext()", "value" : "table:book" }, { "name" : "copy", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.copy()", "value" : null }, { "name" : "addRange", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.addRange(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "addBefore", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.addBefore(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "addAfter", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.addAfter(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "getReference", "desc" : "public com.intellij.psi.PsiReference com.intellij.psi.impl.PsiElementBase.getReference()", "value" : null }, { "name" : "getContainingFile", "desc" : "public com.intellij.psi.PsiFile com.intellij.psi.impl.PsiElementBase.getContainingFile()", "value" : null }, { "name" : "getOriginalElement", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.getOriginalElement()", "value" : "column:id" }, { "name" : "getNavigationElement", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.getNavigationElement()", "value" : "column:id" }, { "name" : "getUseScope", "desc" : "public com.intellij.psi.search.SearchScope com.intellij.psi.impl.PsiElementBase.getUseScope()", "value" : "Project and Libraries" }, { "name" : "getResolveScope", "desc" : "public com.intellij.psi.search.GlobalSearchScope com.intellij.psi.impl.PsiElementBase.getResolveScope()", "value" : "Project and Libraries" }, { "name" : "getReferences", "desc" : "public com.intellij.psi.PsiReference[] com.intellij.psi.impl.PsiElementBase.getReferences()", "value" : "[Lcom.intellij.psi.PsiReference;@140035ec" }, { "name" : "checkAdd", "desc" : "public void com.intellij.psi.impl.PsiElementBase.checkAdd(com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "addRangeBefore", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.addRangeBefore(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "addRangeAfter", "desc" : "public com.intellij.psi.PsiElement com.intellij.psi.impl.PsiElementBase.addRangeAfter(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "findReferenceAt", "desc" : "public com.intellij.psi.PsiReference com.intellij.psi.impl.PsiElementBase.findReferenceAt(int)", "value" : null }, { "name" : "textMatches", "desc" : "public boolean com.intellij.psi.impl.PsiElementBase.textMatches(com.intellij.psi.PsiElement)", "value" : null }, { "name" : "textMatches", "desc" : "public boolean com.intellij.psi.impl.PsiElementBase.textMatches(java.lang.CharSequence)", "value" : null }, { "name" : "isEquivalentTo", "desc" : "public boolean com.intellij.psi.impl.PsiElementBase.isEquivalentTo(com.intellij.psi.PsiElement)", "value" : null }, { "name" : "deleteChildRange", "desc" : "public void com.intellij.psi.impl.PsiElementBase.deleteChildRange(com.intellij.psi.PsiElement,com.intellij.psi.PsiElement) throws com.intellij.util.IncorrectOperationException", "value" : null }, { "name" : "isNativeFileType", "desc" : "public static boolean com.intellij.psi.impl.ElementBase.isNativeFileType(com.intellij.openapi.fileTypes.FileType)", "value" : null }, { "name" : "overlayIcons", "desc" : "public static javax.swing.Icon com.intellij.psi.impl.ElementBase.overlayIcons(javax.swing.Icon...)", "value" : null }, { "name" : "buildRowIcon", "desc" : "public static com.intellij.ui.RowIcon com.intellij.psi.impl.ElementBase.buildRowIcon(javax.swing.Icon,javax.swing.Icon)", "value" : null }, { "name" : "transformFlags", "desc" : "public static int com.intellij.psi.impl.ElementBase.transformFlags(com.intellij.psi.PsiElement,int)", "value" : null }, { "name" : "createLayeredIcon", "desc" : "public static com.intellij.ui.RowIcon com.intellij.psi.impl.ElementBase.createLayeredIcon(com.intellij.openapi.util.Iconable,javax.swing.Icon,int)", "value" : null }, { "name" : "iconWithVisibilityIfNeeded", "desc" : "public static javax.swing.Icon com.intellij.psi.impl.ElementBase.iconWithVisibilityIfNeeded(int,javax.swing.Icon,javax.swing.Icon)", "value" : null }, { "name" : "registerIconLayer", "desc" : "public static void com.intellij.psi.impl.ElementBase.registerIconLayer(int,javax.swing.Icon)", "value" : null }, { "name" : "replace", "desc" : "public <T> boolean com.intellij.openapi.util.UserDataHolderBase.replace(com.intellij.openapi.util.Key<T>,T,T)", "value" : null }, { "name" : "getUserData", "desc" : "public <T> T com.intellij.openapi.util.UserDataHolderBase.getUserData(com.intellij.openapi.util.Key<T>)", "value" : null }, { "name" : "copyUserDataTo", "desc" : "public void com.intellij.openapi.util.UserDataHolderBase.copyUserDataTo(com.intellij.openapi.util.UserDataHolderBase)", "value" : null }, { "name" : "isUserDataEmpty", "desc" : "public boolean com.intellij.openapi.util.UserDataHolderBase.isUserDataEmpty()", "value" : "false" }, { "name" : "putUserData", "desc" : "public <T> void com.intellij.openapi.util.UserDataHolderBase.putUserData(com.intellij.openapi.util.Key<T>,T)", "value" : null }, { "name" : "getCopyableUserData", "desc" : "public <T> T com.intellij.openapi.util.UserDataHolderBase.getCopyableUserData(com.intellij.openapi.util.Key<T>)", "value" : null }, { "name" : "putCopyableUserData", "desc" : "public <T> void com.intellij.openapi.util.UserDataHolderBase.putCopyableUserData(com.intellij.openapi.util.Key<T>,T)", "value" : null }, { "name" : "copyCopyableDataTo", "desc" : "public void com.intellij.openapi.util.UserDataHolderBase.copyCopyableDataTo(com.intellij.openapi.util.UserDataHolderBase)", "value" : null }, { "name" : "getUserDataString", "desc" : "public java.lang.String com.intellij.openapi.util.UserDataHolderBase.getUserDataString()", "value" : "{CACHED_SMART_POINTER_KEY=com.intellij.reference.SoftReference@1e1e2d40}" }, { "name" : "putUserDataIfAbsent", "desc" : "public <T> T com.intellij.openapi.util.UserDataHolderBase.putUserDataIfAbsent(com.intellij.openapi.util.Key<T>,T)", "value" : null }, { "name" : "getTextRangeInParent", "desc" : "public default com.intellij.openapi.util.TextRange com.intellij.psi.PsiElement.getTextRangeInParent()", "value" : "(0,0)" }, { "name" : "getDbParent", "desc" : "public default com.intellij.database.model.DasObject com.intellij.database.model.DasObject.getDbParent()", "value" : "table:book" }, { "name" : "getDbChildren", "desc" : "public default <C> com.intellij.util.containers.JBIterable<C> com.intellij.database.model.DasObject.getDbChildren(java.lang.Class<C>,com.intellij.database.model.ObjectKind)", "value" : null }, { "name" : "getDependencies", "desc" : "public default java.lang.Object[] com.intellij.psi.meta.PsiMetaData.getDependencies()", "value" : "[Ljava.lang.Object;@4c90ae3f" }, { "name" : "getDependences", "desc" : "public default java.lang.Object[] com.intellij.psi.meta.PsiMetaData.getDependences()", "value" : "[Ljava.lang.Object;@4c90ae3f" } ], "----" : "-----------------我是一条华丽的分割线-----------------", "fieldList" : [ { "name" : "LOG", "type" : "com.intellij.openapi.diagnostic.Logger", "value" : "com.intellij.idea.IdeaLogger@689a33b9" }, { "name" : "WEIGHT_BASE", "type" : "int", "value" : "10000" }, { "name" : "WEIGHT_INC", "type" : "int", "value" : "1000" }, { "name" : "myParent", "type" : "com.intellij.database.psi.DbElement", "value" : "table:book" }, { "name" : "myDelegate", "type" : "java.lang.Object", "value" : "id: column" }, { "name" : "myTransactionalVersion", "type" : "long", "value" : "11" }, { "name" : "ASYNC_DOC_CUT", "type" : "java.lang.String", "value" : "<!-- async-doc-cut -->" }, { "name" : "LOG", "type" : "com.intellij.openapi.diagnostic.Logger", "value" : "com.intellij.idea.IdeaLogger@63538153" }, { "name" : "LOG", "type" : "com.intellij.openapi.diagnostic.Logger", "value" : "com.intellij.idea.IdeaLogger@57ae08e7" }, { "name" : "FLAGS_LOCKED", "type" : "int", "value" : "2048" }, { "name" : "ICON_COMPUTE", "type" : "com.intellij.util.NullableFunction", "value" : "com.intellij.psi.impl.ElementBase$$Lambda$705/682411935@622e87c4" }, { "name" : "VISIBILITY_ICON_PLACEHOLDER", "type" : "com.intellij.openapi.util.NotNullLazyValue", "value" : "com.intellij.psi.impl.ElementBase$1@5b1067c3" }, { "name" : "ICON_PLACEHOLDER", "type" : "com.intellij.openapi.util.NotNullLazyValue", "value" : "com.intellij.psi.impl.ElementBase$2@24b63ceb" }, { "name" : "ourIconLayers", "type" : "java.util.List", "value" : "[com.intellij.psi.impl.ElementBase$IconLayer@3f8e1aa, com.intellij.psi.impl.ElementBase$IconLayer@157e46b6, com.intellij.psi.impl.ElementBase$IconLayer@4d0815a5, com.intellij.psi.impl.ElementBase$IconLayer@58cc298b]" }, { "name" : "COPYABLE_USER_MAP_KEY", "type" : "com.intellij.openapi.util.Key", "value" : "COPYABLE_USER_MAP_KEY" }, { "name" : "myUserMap", "type" : "com.intellij.util.keyFMap.KeyFMap", "value" : "{CACHED_SMART_POINTER_KEY=com.intellij.reference.SoftReference@1e1e2d40}" }, { "name" : "updater", "type" : "com.intellij.util.concurrency.AtomicFieldUpdater", "value" : "com.intellij.util.concurrency.AtomicFieldUpdater@1c7d7689" } ] } //调试列原始列类型 { "title" : "调试:com.intellij.database.model.DataType", "methodList" : [ { "name" : "getLength", "desc" : "public int com.intellij.database.model.DataType.getLength()", "value" : "11" }, { "name" : "getScale", "desc" : "public int com.intellij.database.model.DataType.getScale()", "value" : "0" }, { "name" : "getPrecision", "desc" : "public int com.intellij.database.model.DataType.getPrecision()", "value" : "11" }, { "name" : "getSpecification", "desc" : "public java.lang.String com.intellij.database.model.DataType.getSpecification()", "value" : "int(11)" }, { "name" : "getSpecification", "desc" : "public java.lang.String com.intellij.database.model.DataType.getSpecification(boolean,boolean)", "value" : null }, { "name" : "equalsWithoutJdbc", "desc" : "public boolean com.intellij.database.model.DataType.equalsWithoutJdbc(com.intellij.database.model.DataType)", "value" : null } ], "----" : "-----------------我是一条华丽的分割线-----------------", "fieldList" : [ { "name" : "MAX_SIZE", "type" : "int", "value" : "2147483647" }, { "name" : "STAR_SIZE", "type" : "int", "value" : "2147483646" }, { "name" : "NO_SIZE", "type" : "int", "value" : "-1" }, { "name" : "NO_SCALE", "type" : "int", "value" : "0" }, { "name" : "UNKNOWN", "type" : "com.intellij.database.model.DataType", "value" : "unknown" }, { "name" : "schemaName", "type" : "java.lang.String", "value" : null }, { "name" : "packageName", "type" : "java.lang.String", "value" : null }, { "name" : "typeName", "type" : "java.lang.String", "value" : "int" }, { "name" : "size", "type" : "int", "value" : "11" }, { "name" : "scale", "type" : "int", "value" : "0" }, { "name" : "sizeUnit", "type" : "com.intellij.database.model.LengthUnit", "value" : "com.intellij.database.model.LengthUnit@257447ef" }, { "name" : "vagueArg", "type" : "java.lang.String", "value" : null }, { "name" : "suffix", "type" : "java.lang.String", "value" : null }, { "name" : "sizeUnitExplicit", "type" : "boolean", "value" : "false" }, { "name" : "custom", "type" : "boolean", "value" : "false" }, { "name" : "enumValues", "type" : "java.util.List", "value" : null }, { "name" : "jdbcType", "type" : "int", "value" : "0" } ] } //获取原始列类型中的字段 sqlType = int //执行原始列类型中的方法 sqlTypeLen = 11
C# 反序列化嵌套JSON。请问这个JSON C#怎么来处理
{"total"=>1, "success"=>true, "metaData"=>{"fields"=>[{"name"=>"presno", "type"=>"string"}, {"name"=>"medid", "type"=>"float"}, {"name"=>"medouttime", "type"=>"date", "dateFormat"=>"Y-m-d H:i:s.u"}, {"name"=>"prestype", "type"=>"float"}, {"name"=>"windowno", "type"=>"string"}, {"name"=>"patientid", "type"=>"float"}, {"name"=>"patientname", "type"=>"string"}, {"name"=>"patientsex", "type"=>"string"}, {"name"=>"patientbirth", "type"=>"string"}, {"name"=>"diagnosis", "type"=>"string"}, {"name"=>"wardno", "type"=>"float"}, {"name"=>"wardname", "type"=>"string"}, {"name"=>"doctorname", "type"=>"string"}, {"name"=>"fpno", "type"=>"string"}, {"name"=>"sendflag", "type"=>"string"}, {"name"=>"tfcode", "type"=>"int"}, {"name"=>"medpresinfo", "type"=>"string"}]}, "rows"=>[{"presno"=>"19840491", "medid"=>40491, "medouttime"=>"2016-11-29 07:15:48.269085", "prestype"=>1, "windowno"=>"", "patientid"=>42361, "patientname"=>"陈诗玉", "patientsex"=>"", "patientbirth"=>"", "diagnosis"=>"", "wardno"=>10153, "wardname"=>"急诊科", "doctorname"=>"周耀亮", "fpno"=>"35654", "sendflag"=>"", "tfcode"=>1, "medpresinfo"=>[{"medid"=>40491, "medonlycode"=>2119, "medamt"=>1, "medpack"=>"", "medunitpack"=>"", "medunit"=>"0.125g*12s", "windowno"=>"", "medpredos"=>"0.5", "medusage"=>"qd", "medpreday"=>1, "medunitprice"=>46.3, "medtotalprice"=>"", "medtype"=>"", "medconvercof"=>"", "tfcode"=>"", "medname"=>"地红霉素肠溶片(派盛)", "medfactory"=>"西安利君制药"}]}], "processedTime"=>43}
解析数据调用set方法取不到值是什么情况
JSONObject jsonObject = new JSONObject((String) msg.obj); String data = jsonObject.optString("data"); JSONObject obj = new JSONObject(data); String recommend=obj.optString("recommend"); L.e("recommend",recommend); if (recommend!=null) { JSONArray jsonArray = new JSONArray(recommend); int leng = jsonArray.length(); if (leng != -1) { for (int i = 0; i < leng; i++) { JSONObject jsobj = (JSONObject) jsonArray.get(i); Recommendbean.Houserecommendbean b=new Recommendbean.Houserecommendbean(); b.setAddress(jsobj.optString("address")); b.setCommunityName(jsobj.optString("communityName")); b.setCoverPhoto(jsobj.optString("coverPhoto")); MatcherUtil.retainTwo(String.valueOf(jsobj.optInt("price"))); list.add(b); L.e("list",list.toString()); } } } } catch (JSONException e) { e.printStackTrace(); } jsobj的值已经打印出来了: {"id":179,"productId":null,"address":"沙井","roomCount":1,"roomArea":20,"hallCount":0,"name":"1303","floor":3,"configMap":{"宽带":false,"热水器":false,"空调":false,"衣柜":true,"床":true,"冰箱":false,"电视":false},"decorationStr":"简单装修","price":100,"coverPhoto":"photos\/product\/original\/1476066510441400.jpg","directionStr":"朝向东","lon":113.812273,"lat":22.746692,"localeStr":"宝安区","paymentMode":"押一付一","ownerName":"王超","ownerMobile":"18476546521","deposit":null,"photo":"[\"product\/original\/1476066510441400.jpg\",\"product\/original\/1476066511284816.jpg\",\"product\/original\/1494465874339.jpg\"]","status":0,"dateFrom":1501862400000,"photos":["photos\/product\/original\/1476066510441400.jpg","photos\/product\/original\/1476066511284816.jpg","photos\/product\/original\/1494465874339.jpg"],"isfavorite":null,"description":"简单装修","communityName":"沙井•住银青年公寓","configurations":null} 07-06 14:59:50.485 18525-18525/com.zhuyin.zy E/list: {"id":180,"productId":null,"address":"沙井","roomCount":1,"roomArea":20,"hallCount":0,"name":"1304","floor":3,"configMap":{"宽带":false,"热水器":false,"空调":false,"衣柜":true,"床":true,"冰箱":false,"电视":false},"decorationStr":"简单装修","price":100,"coverPhoto":"photos\/product\/original\/1476066892459810.jpg","directionStr":"朝向东","lon":113.811698,"lat":22.746825,"localeStr":"宝安区","paymentMode":"押一付一","ownerName":"王超","ownerMobile":"18476546521","deposit":null,"photo":"[\"product\/original\/1476066892459810.jpg\",\"product\/original\/1476066893085570.jpg\",\"product\/original\/1476066893836111.jpg\"]","status":0,"dateFrom":1499270400000,"photos":["photos\/product\/original\/1476066892459810.jpg","photos\/product\/original\/1476066893085570.jpg","photos\/product\/original\/1476066893836111.jpg"],"isfavorite":null,"description":"简单装修","communityName":"沙井•住银青年公寓","configurations":null} 07-06 14:59:50.485 18525-18525/com.zhuyin.zy E/list: {"id":182,"productId":null,"address":"沙井","roomCount":1,"roomArea":20,"hallCount":0,"name":"1306","floor":13,"configMap":{"宽带":false,"热水器":false,"空调":false,"衣柜":false,"床":false,"冰箱":false,"电视":false},"decorationStr":"简单装修","price":100,"coverPhoto":"photos\/product\/original\/147606751510329.jpg","directionStr":"朝向东","lon":113.811986,"lat":22.746958,"localeStr":"宝安区","paymentMode":"押一付一","ownerName":"王超","ownerMobile":"18476546521","deposit":null,"photo":"[\"product\/original\/147606751510329.jpg\",\"product\/original\/1476067515928356.jpg\",\"product\/original\/1494466140803.jpg\"]","status":0,"dateFrom":1490716800000,"photos":["photos\/product\/original\/147606751510329.jpg","photos\/product\/original\/1476067515928356.jpg","photos\/product\/original\/1494466140803.jpg"],"isfavorite":null,"description":"简单装修","communityName":"沙井•住银青年公寓","configurations":null} 07-06 14:59:50.486 18525-18525/com.zhuyin.zy E/list: {"id":190,"productId":null,"address":"沙井","roomCount":1,"roomArea":20,"hallCount":0,"name":"1319","floor":3,"configMap":{"宽带":false,"热水器":false,"空调":false,"衣柜":true,"床":true,"冰箱":false,"电视":false},"decorationStr":"简单装修","price":100,"coverPhoto":"photos\/product\/original\/1493691138736.jpg","directionStr":"朝向东","lon":113.81601,"lat":22.740692,"localeStr":"宝安区","paymentMode":"押一付一","ownerName":"王超","ownerMobile":"18476546521","deposit":null,"photo":"[\"product\/original\/1493691138736.jpg\",\"product\/original\/1493691133978.jpg\",\"product\/original\/1493691121355.jpg\"]","status":0,"dateFrom":1490716800000,"photos":["photos\/product\/original\/1493691138736.jpg","photos\/product\/original\/1493691133978.jpg","photos\/product\/original\/1493691121355.jpg"],"isfavorite":null,"description":"南北通透的房型,明亮的奶黄墙壁,阳光透过窗纱照进,微风流动,一天的好心情开始。上层卧室,闲适隐秘,尽享一人之乐;下层起居室,办公待客两不误;独立阳台厨房,享受烹饪之乐,遇见品质生活。","communityName":"沙井•住银青年公寓","configurations":null} 07-06 14:59:50.486 18525-18525/com.zhuyin.zy E/list: {"id":183,"productId":null,"address":"沙井","roomCount":1,"roomArea":20,"hallCount":0,"name":"1307","floor":13,"configMap":{"宽带":false,"热水器":false,"空调":false,"衣柜":false,"床":false,"冰箱":false,"电视":false},"decorationStr":"简单装修","price":100,"coverPhoto":"photos\/product\/original\/1494410461105.jpg","directionStr":"朝向东","lon":113.811842,"lat":22.745358,"localeStr":"宝安区","paymentMode":"押一付一","ownerName":"王超","ownerMobile":"18476546521","deposit":null,"photo":"[\"product\/original\/1494410461105.jpg\",\"product\/original\/1494410523384.jpg\",\"product\/original\/1494410449723.jpg\"]","status":0,"dateFrom":1490716800000,"photos":["photos\/product\/original\/149441046110 5.jpg","photos\/product\/original\/1494410523384.jpg","photos\/product\/original\/1494410449723.jpg"],"isfavorite":null,"description":"简单装修","communityName":"沙井•住银青年公寓","configurations":null}
无法解析的外部符号 "private: static float student::z m e"
#include <iostream> #include <string> using namespace std; class student{ string p; int num; float math, english; static float z, m, e; public: student(string s, int n, float a, float b) { p = s, num = n, math = a, english = b; z = m = e = 0; } student(){} void input(); void output(); float sum(); static void outputsum(); float average(); ~student(){} }; void student::input() { cout << "输入姓名:"; string s; cin.sync(); getline(cin, s); cout << "输入学号:"; int n; cin >> n; float x, b; cout << "输入数学成绩:"; cin >> x; cout << "输入英语成绩:"; cin >> b; student(s, n, x, b); } void student::output() { cout << "姓名:" << p << "\n学号:" << num << endl << "数学成绩:" << math << endl << "英语成绩:" << english << endl << "总成绩:" << this->sum() << endl << "平均成绩:" << this->average() << endl; } float student::sum() { z += math + english, m += math, e += english; return math + english; } void student::outputsum() { cout << "所有学生的总成绩:" << z << '\n' << "所有学生的数学成绩:" << m << endl << "所有学生的英语成绩:" << e << endl; } float student::average() { return (this->sum()) / 2; } int main() { int n; cout << "students' number:"; cin >> n; student *s = new student[n]; if (NULL == s) return 1; for (int i = 0; i < n; i++) s[i].input(); for (int i = 0; i < n; i++) s[i].output(); s->outputsum(); delete[]s; system("pause"); return 0; }
为什么数据库的数据显示不了在kendo ui的grid编辑页面上
![图片说明](https://img-ask.csdn.net/upload/201707/19/1500444258_657139.jpg) ``` <a class="offline-button" href="login.jsp">Back</a> <div id="example"> <div id="grid"></div> <script> $(document).ready(function () { var crudServiceBaseUrl = "", dataSource = new kendo.data.DataSource({ transport: { read: { url: crudServiceBaseUrl + "", dataType: "json" }, update: { url: crudServiceBaseUrl + "", dataType: "json" }, destroy: { url: crudServiceBaseUrl + "", dataType: "json" }, create: { url: crudServiceBaseUrl + "", dataType: "json" }, parameterMap: function(options, operation) { if (operation !== "read" && options.models) { return {models: kendo.stringify(options.models)}; } } }, batch: true, pageSize: 15, schema: { model: { id: "book_id", fields: { book_id: { type:"int" }, book_name: { type:"String" }, book_sort: { type: "String" }, book_author: { type: "String" }, book_price: { type: "double"}, book_amount:{type:"amount"}, book_time:{type:"date"}, } } } }); $("#grid").kendoGrid({ dataSource: dataSource, pageable: true, height: 550, toolbar: ["create"], columns: [ { field:"book_id", title: "图书编号" ,width: "120px"}, { field: "book_name", title:"图书名称", width: "120px" }, { field: "book_sort", title:"分类", width: "120px" }, { field: "book_author", title:"作者", width: "120px" }, { field: "book_price", title:"价格", width: "120px" }, { field: "book_amount", title:"数量", width: "120px" }, { field: "book_time", title:"上架时间", width: "120px" }, { command: ["edit", "destroy"], title: "&nbsp;", width: "200px" }], editable: "popup" }); }); </script> </div> </body> </html> ``` 这个页面的url到底怎么写。。。。
Gson : Expected BEGIN_ARRAY but was BEGIN_OBJECT
使用Gson解析的时候,遇到这个问题: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 21 path $.data Json字符串是这样的: { "data": { "banner": [ { "aid": "7", "catid": "0", "description": "asd", "end_time": "1432915200", "imgurl": "/upload/ads/2015-05-06/5549ac6f05399.jpg", "is_open": "1", "link": "http://", "order": "50", "start_time": "1430755200", "title": "asd" } ], "cat": [ { "addtime": "1429063456", "arrchildid": "1", "arrparentid": "", "catid": "1", "catname": "母婴2", "child": "0", "image": "", "is_show": "1", "listorder": "123", "pid": "0", "style": "0" }, { "addtime": "1429063835", "arrchildid": "2,3,4,12,16", "arrparentid": "", "catid": "2", "catname": "第三方", "child": "0", "image": "", "is_show": "1", "listorder": "0", "pid": "0", "style": "0" }, { "addtime": "1429068195", "arrchildid": "6,14", "arrparentid": "", "catid": "6", "catname": "母婴1", "child": "0", "image": "", "is_show": "1", "listorder": "0", "pid": "0", "style": "0" }, { "addtime": "1429068572", "arrchildid": "7", "arrparentid": "", "catid": "7", "catname": "母婴", "child": "0", "image": "", "is_show": "1", "listorder": "0", "pid": "0", "style": "0" }, { "addtime": "1429068577", "arrchildid": "8", "arrparentid": "", "catid": "8", "catname": "母婴水电费", "child": "0", "image": "", "is_show": "1", "listorder": "0", "pid": "0", "style": "0" }, { "addtime": "1429153032", "arrchildid": "11,13", "arrparentid": "", "catid": "11", "catname": "水电费水电费", "child": "0", "image": "", "is_show": "1", "listorder": "0", "pid": "0", "style": "0" }, { "addtime": "1430117866", "arrchildid": "15", "arrparentid": "", "catid": "15", "catname": "SDFG", "child": "0", "image": "", "is_show": "1", "listorder": "0", "pid": "0", "style": "0" } ], "filter": { "catid": 0, "keywords": "" }, "goods": [ { "addtime": "123123123", "brokerage": "600.00", "catid": "2", "collection": "0", "content": "", "description": "", "id": "4", "images": "", "is_delete": "0", "is_recommend": "1", "is_sale": "1", "keywords": "", "listorder": "12", "market_price": "1500.00", "on_sale": "0", "price": "1200.00", "sales": "0", "spec_array": "", "status": "1", "store": "120", "title": "我是商品1", "userid": "2" } ] }, "status": 0 } 使用HiJson格式化是这样的: ![图片说明](https://img-ask.csdn.net/upload/201505/07/1430994254_213752.png) 我的MallBean.java是这样写的 ``` public class MallBean { public List<MallData> data; public int status; public class MallData{ public List<MallDataBanner> banner; public List<MallDataCat> cat; public MallDataFilter filter; public List<MallDataGoods> goods; } public class MallDataBanner{ public String aid; public String catid; public String description; public String end_time; public String imgurl; public String is_open; public String link; public String order; public String start_time; public String title; } public class MallDataCat{ public String addtime; public String arrchildid; public String arrparentid; public String catid; public String catname; public String child; public String image; public String is_show; public String listorder; public String pid; public String style; } public class MallDataFilter{ public int catid; public String keywords; } public class MallDataGoods{ public String addtime; public String brokerage; public String catid; public String collection; public String content; public String description; public String id; public String images; public String is_delete; public String is_recommend; public String is_sale; public String keywords; public String listorder; public String market_price; public String on_sale; public String price; public String sales; public String status; public String store; public String title; public String userid; } } ``` 我解析是这样的(一下三种方法都是报同样的错): ``` Gson gson = new Gson(); MallBean mallBeanGson = gson.fromJson(response, MallBean.class); // MallBean mallBeanGson = gson.fromJson(response, new TypeToken<MallBean>(){}.getType()); // List<MallBean> mallBeanGson = gson.fromJson(response, new TypeToken<List<MallBean>>(){}.getType()); ```
python2中r开头字符串一行太长,如何写成多行写
``` body = r"""{"group_id":%s,"json":"[{\"data\":\"{\\\"Modify\\\":0,\\\"Name\\\":\\\"ExitUnload\\\",\\\"Value\\\":\\\"0\\\",\\\"ValueType\\\":\\\"int\\\",\\\"Details\\\":{\\\"PwdHash\\\":\\\"085a751cdbe0400633a7627b500760cf085a751cdbe0400633a7627b500760cf\\\",\\\"NeedPwd\\\":0}}\",\"bid\":104,\"ver\":27,\"name\":\"ExitUnload\",\"pdata\":\"{\\\"pwd\\\":\\\"\\\"}\",\"inherit\":true},{\"data\":\"{\\\"Modify\\\":0,\\\"Name\\\":\\\"EvlSetting\\\",\\\"Value\\\":\\\"0\\\",\\\"ValueType\\\":\\\"int\\\"}\",\"bid\":104,\"ver\":16,\"name\":\"EvlSetting\",\"pdata\":\"{}\",\"inherit\":true},{\"data\":\"{\\\"Modify\\\":0,\\\"Name\\\":\\\"QMUUpdateType\\\",\\\"Value\\\":\\\"2\\\",\\\"ValueType\\\":\\\"int\\\",\\\"Details\\\":{\\\"TimeType\\\":2,\\\"Day\\\":1,\\\"Hour\\\":0,\\\"Minute\\\":0,\\\"HourEnd\\\":1,\\\"MinuteEnd\\\":0,\\\"Md5\\\":\\\"\\\",\\\"Url\\\":\\\"\\\",\\\"Version\\\":\\\"\\\"}}\",\"bid\":104,\"ver\":14,\"name\":\"QMUUpdateType\",\"pdata\":\"{}\",\"inherit\":true},{\"data\":\"{\\\"Modify\\\":1,\\\"Name\\\":\\\"DataReportFlag\\\",\\\"Value\\\":\\\"1\\\",\\\"ValueType\\\":\\\"int\\\"}\",\"bid\":104,\"ver\":15,\"name\":\"DataReportFlag\",\"pdata\":\"{}\",\"inherit\":true},{\"data\":\"{\\\"Modify\\\":0,\\\"Name\\\":\\\"RTPSelfProtection\\\",\\\"Value\\\":\\\"1\\\",\\\"ValueType\\\":\\\"int\\\"}\",\"bid\":104,\"ver\":18,\"name\":\"RTPSelfProtection\",\"pdata\":\"{}\",\"inherit\":true},{\"data\":\"{\\\"Details\\\":{\\\"ConfigProxyAddress\\\":\\\"\\\",\\\"ConfigProxyDomain\\\":\\\"\\\",\\\"ConfigProxyPassword\\\":\\\"\\\",\\\"ConfigProxyPort\\\":\\\"\\\",\\\"ConfigProxyUsername\\\":\\\"\\\"},\\\"Modify\\\":0,\\\"Name\\\":\\\"ConfigProxyType\\\",\\\"Value\\\":\\\"0\\\",\\\"ValueType\\\":\\\"int\\\"}\",\"bid\":104,\"ver\":17,\"name\":\"ConfigProxyType\",\"pdata\":\"{}\",\"inherit\":true},{\"data\":\"{\\\"Details\\\":{\\\"HTTPDownload\\\":1024,\\\"P2PDownload\\\":99999,\\\"P2PUpload\\\":99999,\\\"ClientUploadTimeout\\\":600},\\\"Modify\\\":0,\\\"Name\\\":\\\"P2spSpeedLimit\\\",\\\"Value\\\":\\\"0\\\",\\\"ValueType\\\":\\\"int\\\"}\",\"bid\":104,\"ver\":56,\"name\":\"P2spSpeedLimit\",\"pdata\":\"{}\",\"inherit\":true},{\"data\":\"{\\\"Name\\\":\\\"P2spControl\\\",\\\"Value\\\":\\\"0\\\",\\\"ValueType\\\":\\\"int\\\",\\\"Modify\\\":0,\\\"Details\\\":{\\\"IP\\\":\\\"\\\"}}\",\"bid\":104,\"ver\":55,\"name\":\"P2spControl\",\"pdata\":\"{}\",\"inherit\":true}]"}"""%(group_id) ```
Android开发行列式逆矩阵计算器Java板块有些问题如何解决?
学校作业:我想开发一个能求n阶行列式和n阶矩阵逆矩阵的计算器,xml已写是6x6的格子,想首先判断输入几阶方阵反馈n的值,就通过判断第一行到第几个格子有值决定。之后求n阶行列式值用了行列式公式,设了int p[][]的矩阵,可是不会在静态函数中给矩阵赋textview里的值,只学过p[0][0] = (EditText)this.findViewById(R.id.editText1); 此外能不能直接在公用里给p数组赋值然后复制p1来计算,(这样应该就不用在静态里赋值)但公用的我不知道放在哪里放这个头下会报错public class MainActivity extends Activity {。逆矩阵的思路是在右侧补充单位矩阵,将左侧矩阵化为单位矩阵右侧就变成逆矩阵了。可以复制一个同阶数组然后将左侧转化为单位矩阵同时对右侧做相同操作,最后在6x6文本框里输出复制的矩阵。有没有大佬可以帮助我修改一下行列式代码写一下逆矩阵代码让它能实现目标并解释一下修改的问题。谢谢谢谢了真写不动了没系统学过Java就要写这个作业,如果逆矩阵不行只有行列式部分也可吧---xml文件在这应该没有问题----------------------------------------------------Java文件在下侧是半成品但我实在不知道怎么完善了。 ``` <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".MainActivity" > <EditText android:id="@+id/editText1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:ems="2" android:inputType="numberDecimal" > <requestFocus /> </EditText> <EditText android:id="@+id/editText2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText1" android:layout_alignBottom="@+id/editText1" android:layout_toRightOf="@+id/editText1" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText2" android:layout_alignBottom="@+id/editText2" android:layout_toRightOf="@+id/editText2" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBottom="@+id/editText3" android:layout_toRightOf="@+id/editText3" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText5" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText4" android:layout_alignBottom="@+id/editText4" android:layout_toRightOf="@+id/editText4" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText6" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText5" android:layout_alignBottom="@+id/editText5" android:layout_toRightOf="@+id/editText5" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText7" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_below="@+id/editText1" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText8" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/editText1" android:layout_toRightOf="@+id/editText1" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText9" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText8" android:layout_alignBottom="@+id/editText8" android:layout_toRightOf="@+id/editText8" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText10" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText9" android:layout_alignBottom="@+id/editText9" android:layout_toRightOf="@+id/editText9" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText11" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText10" android:layout_alignBottom="@+id/editText10" android:layout_toLeftOf="@+id/editText6" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText12" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText11" android:layout_alignBottom="@+id/editText11" android:layout_alignLeft="@+id/editText6" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText13" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_below="@+id/editText7" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText14" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText13" android:layout_alignBottom="@+id/editText13" android:layout_toRightOf="@+id/editText13" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText15" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText14" android:layout_alignBottom="@+id/editText14" android:layout_toRightOf="@+id/editText14" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText16" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText15" android:layout_alignBottom="@+id/editText15" android:layout_toRightOf="@+id/editText15" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText17" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText16" android:layout_alignBottom="@+id/editText16" android:layout_toLeftOf="@+id/editText12" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText18" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText17" android:layout_alignBottom="@+id/editText17" android:layout_alignLeft="@+id/editText12" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText19" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_below="@+id/editText13" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText20" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText19" android:layout_alignBottom="@+id/editText19" android:layout_toRightOf="@+id/editText19" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText21" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText20" android:layout_alignBottom="@+id/editText20" android:layout_toRightOf="@+id/editText20" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText22" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText21" android:layout_alignBottom="@+id/editText21" android:layout_toRightOf="@+id/editText21" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText23" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText22" android:layout_alignBottom="@+id/editText22" android:layout_toLeftOf="@+id/editText18" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText24" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText23" android:layout_alignBottom="@+id/editText23" android:layout_alignLeft="@+id/editText18" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText25" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_below="@+id/editText19" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText26" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText25" android:layout_alignBottom="@+id/editText25" android:layout_toRightOf="@+id/editText25" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText27" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText26" android:layout_alignBottom="@+id/editText26" android:layout_toRightOf="@+id/editText26" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText28" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText27" android:layout_alignBottom="@+id/editText27" android:layout_toRightOf="@+id/editText27" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText29" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@+id/editText28" android:layout_toLeftOf="@+id/editText24" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText30" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText29" android:layout_alignBottom="@+id/editText29" android:layout_alignLeft="@+id/editText24" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText31" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_below="@+id/editText25" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText32" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText31" android:layout_alignBottom="@+id/editText31" android:layout_alignLeft="@+id/editText26" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText33" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText32" android:layout_alignBottom="@+id/editText32" android:layout_alignLeft="@+id/editText27" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText34" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText33" android:layout_alignBottom="@+id/editText33" android:layout_toRightOf="@+id/editText33" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText35" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText34" android:layout_alignBottom="@+id/editText34" android:layout_toLeftOf="@+id/editText30" android:ems="2" android:inputType="numberDecimal" /> <EditText android:id="@+id/editText36" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/editText35" android:layout_alignBottom="@+id/editText35" android:layout_alignLeft="@+id/editText30" android:ems="2" android:inputType="numberDecimal" /> <Button android:id="@+id/button2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/button1" android:layout_alignBottom="@+id/button1" android:layout_alignLeft="@+id/editText33" android:layout_toLeftOf="@+id/editText35" android:text="求逆" /> <Button android:id="@+id/button3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignBaseline="@+id/button2" android:layout_alignBottom="@+id/button2" android:layout_alignLeft="@+id/editText35" android:layout_alignRight="@+id/editText36" android:text="清空" /> <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/button2" android:layout_alignLeft="@+id/editText31" android:layout_alignRight="@+id/editText36" android:layout_alignTop="@+id/textView1" android:text="" /> <Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="@+id/textView2" android:layout_alignRight="@+id/editText32" android:layout_below="@+id/editText31" android:layout_marginTop="50dp" android:text="计算" android:onClick="GetValue"/> <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_above="@+id/button1" android:layout_alignLeft="@+id/editText31" android:layout_below="@+id/editText31" android:text="TextView" /> </RelativeLayout> ``` Java文件 ``` package com.example.calculatorstrong; import com.example.calculator.R; import android.os.Bundle; import android.app.Activity; import android.view.Menu; import android.view.View; import android.widget.EditText; import android.widget.TextView; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } p[0][0] = (EditText)this.findViewById(R.id.editText1); //直接这么赋值吗但之前在哪里定义数组p 其余省略 TextView anwser = (TextView)this.findViewById(R.id.textView2); } public static double GetValue(int p[][], int n) { if (n == 1) // 如果是一阶行列式,直接返回该元素 return p[0][0]; double sum = 0; // 累加求和变量 for (int j = 0; j < n; j++) {// 遍历最后一行各元素,p[n - 1][j] int pt = (n - 1) + j; // 符号判断指数 double[][] p1 = new double[n][n]; for (int row = 0; row < n; row++) { for (int col = 0; col < n; col++) { p1[row][col] = p[row][col]; } } for (int index = 0; index < n - 1; index++) { for (int index1 = j; index1 < n - 1; index1++) { p1[index][index1] = p1[index][index1 + 1]; } } // 此过程,截取临时数组 p1 左上角 n-1 阶行列式,提取元素 p[n-1][j] 的余子式 double[][] temp = new double[n - 1][n - 1]; for (int row = 0; row < n - 1; row++) { for (int col = 0; col < n - 1; col++) { temp[row][col] = p1[row][col]; } } sum += p[n - 1][j] * Math.pow(-1, pt) * GetValue(temp, n - 1); // System.out.println(p[n - 1][j] + " * " + Math.pow(-1, pt) + " * " + GetValue(p1, n - 1)); } return sum; } } ```
C语言 程序中想要调用grade_panduan函数用于结构体类型数组来判断成绩是否合理 但总是显示错误 printf("高等数学:"); scanf("%d",&ST[i].math); int grade_panduan(int ST[i].math);
#include<stdio.h> #include<string.h> #define ST_NUM 2//学生数 在运行开始前修改 //int number panduan(char b); int grade_panduan(int a); typedef struct { char num[10];//学号 char name[9];//姓名 int xuefen;//获得学分 int math;//高等数学成绩 int pe;//大学体育成绩 int chinesehistory;//中国近代史成绩 int daolun;//软件技术导论成绩 int english;//大学英语 int c_program;//C语言程序设计 float average;//平均分 }student; student ST[ST_NUM]; void main() { int i,j; printf("请输入%d个学生的信息;\n",ST_NUM); for(i=0;i<ST_NUM;i++) { printf("请输入学号:"); scanf("%s",&ST[i].num); printf("姓名:"); scanf("%s",&ST[i].name); printf("高等数学:"); scanf("%d",&ST[i].math); int grade_panduan(int ST[i].math); printf("大学体育:"); scanf("%d",&ST[i].pe); printf("中国近代史纲要:"); scanf("%d",&ST[i].chinesehistory); printf("软件技术导论成绩:"); scanf("%d",&ST[i].daolun); printf("大学英语:"); scanf("%d",&ST[i].english); printf("C语言成绩:"); scanf("%d",&ST[i].c_program); } for(i=0;i<ST_NUM;i++) { ST[i].xuefen=5*(ST[i].math>=60)+(ST[i].pe>=60)+2*(ST[i].chinesehistory>=60)+2*(ST[i].daolun>=60)+4*(ST[i].english>=60)+4*(ST[i].c_program>=60); ST[i].average=(ST[i].math+ST[i].pe+ST[i].chinesehistory+ST[i].english+ST[i].c_program)/6; } printf("学号\t姓名\t"); printf("学分\t数学\t体育\t中国近代史纲要\t导论\t大学英语 C语言\t平均分\n"); for (i=0;i<ST_NUM;i++) { printf("%s\t%s\t",ST[i].num,ST[i].name); printf("%d\t",ST[i].xuefen); printf("%d\t",ST[i].math); printf("%d\t",ST[i].pe); printf("%d ",ST[i].chinesehistory); printf("%d\t",ST[i].daolun); printf("%d\t",ST[i].english); printf("%d\t",ST[i].c_program); printf("%f\n",ST[i].average); } } int grade_panduan(int a) { if(0<=a<=100) return 1; else { printf("成绩输入错误"); } return 0; }
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、PDF搜索网站推荐 对于大部
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
Vue + Spring Boot 项目实战(十四):用户认证方案与完善的访问拦截
本篇文章主要讲解 token、session 等用户认证方案的区别并分析常见误区,以及如何通过前后端的配合实现完善的访问拦截,为下一步权限控制的实现打下基础。
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入  假设现有4个人
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
写在前面: 我是 扬帆向海,这个昵称来源于我的名字以及女朋友的名字。我热爱技术、热爱开源、热爱编程。技术是开源的、知识是共享的。 这博客是对自己学习的一点点总结及记录,如果您对 Java、算法 感兴趣,可以关注我的动态,我们一起学习。 用知识改变命运,让我们的家人过上更好的生活。 目录一、杨辉三角的介绍二、杨辉三角的算法思想三、代码实现1.第一种写法2.第二种写法 一、杨辉三角的介绍 百度
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
SQL-小白最佳入门sql查询一
一 说明 如果是初学者,建议去网上寻找安装Mysql的文章安装,以及使用navicat连接数据库,以后的示例基本是使用mysql数据库管理系统; 二 准备前提 需要建立一张学生表,列分别是id,名称,年龄,学生信息;本示例中文章篇幅原因SQL注释略; 建表语句: CREATE TABLE `student` ( `id` int(11) NOT NULL AUTO_INCREMENT, `
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // dosho
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,
程序员:我终于知道post和get的区别
IT界知名的程序员曾说:对于那些月薪三万以下,自称IT工程师的码农们,其实我们从来没有把他们归为我们IT工程师的队伍。他们虽然总是以IT工程师自居,但只是他们一厢情愿罢了。 此话一出,不知激起了多少(码农)程序员的愤怒,却又无可奈何,于是码农问程序员。 码农:你知道get和post请求到底有什么区别? 程序员:你看这篇就知道了。 码农:你月薪三万了? 程序员:嗯。 码农:你是怎么做到的? 程序员:
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
      11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员
Android 9.0系统新特性,对刘海屏设备进行适配
其实Android 9.0系统已经是去年推出的“老”系统了,这个系统中新增了一个比较重要的特性,就是对刘海屏设备进行了支持。一直以来我也都有打算针对这个新特性好好地写一篇文章,但是为什么直到拖到了Android 10.0系统都发布了才开始写这篇文章呢?当然,一是因为我这段时间确实比较忙,今年几乎绝大部分的业余时间都放到写新书上了。但是最主要的原因并不是这个,而是因为刘海屏设备的适配存在一定的特殊性
网易云6亿用户音乐推荐算法
网易云音乐是音乐爱好者的集聚地,云音乐推荐系统致力于通过 AI 算法的落地,实现用户千人千面的个性化推荐,为用户带来不一样的听歌体验。 本次分享重点介绍 AI 算法在音乐推荐中的应用实践,以及在算法落地过程中遇到的挑战和解决方案。 将从如下两个部分展开: AI 算法在音乐推荐中的应用 音乐场景下的 AI 思考 从 2013 年 4 月正式上线至今,网易云音乐平台持续提供着:乐屏社区、UGC
【技巧总结】位运算装逼指南
位算法的效率有多快我就不说,不信你可以去用 10 亿个数据模拟一下,今天给大家讲一讲位运算的一些经典例子。不过,最重要的不是看懂了这些例子就好,而是要在以后多去运用位运算这些技巧,当然,采用位运算,也是可以装逼的,不信,你往下看。我会从最简单的讲起,一道比一道难度递增,不过居然是讲技巧,那么也不会太难,相信你分分钟看懂。 判断奇偶数 判断一个数是基于还是偶数,相信很多人都做过,一般的做法的代码如下
日均350000亿接入量,腾讯TubeMQ性能超过Kafka
整理 | 夕颜出品 | AI科技大本营(ID:rgznai100) 【导读】近日,腾讯开源动作不断,相继开源了分布式消息中间件TubeMQ,基于最主流的 OpenJDK8开发的
8年经验面试官详解 Java 面试秘诀
    作者 | 胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。   Java程序员准备和投递简历的实
面试官如何考察你的思维方式?
1.两种思维方式在求职面试中,经常会考察这种问题:北京有多少量特斯拉汽车? 某胡同口的煎饼摊一年能卖出多少个煎饼? 深圳有多少个产品经理? 一辆公交车里能装下多少个乒乓球? 一
相关热词 c# 图片上传 c# gdi 占用内存 c#中遍历字典 c#控制台模拟dos c# 斜率 最小二乘法 c#进程延迟 c# mysql完整项目 c# grid 总行数 c# web浏览器插件 c# xml 生成xsd
立即提问