我正在用Apache2作为服务器创建一个django网站.我需要一种方法来确定我的网站(特别是每个页面)的唯一访问者的数量,以完全证明的方式.不幸的是,用户会有很高的动机试图"游戏"跟踪系统,所以我试图让它充分证明.
有没有办法做到这一点?
目前我正在尝试使用IP和Cookie来确定唯一身份访问者,但这个系统很容易被无头浏览器所迷惑.
我对以下代码非常困惑:
class Tree {
protected:
struct Node {
Node* leftSibling;
Node* rightSibling;
int value;
};
private:
Node* root;
int value;
.....
public:
void addElement(int number) {
if (root == NULL) {
printf("This is the value of the pointer %lld\n",(long long)root);
printf("This is the value of the int %d\n",value);
...
return;
}
printf("NOT NULL\n");
}
};
int main() {
Tree curTree;
srand(time(0));
for(int i = 0;i < 40; ++i) {
curTree.addElement(rand() % 1000);
}
}
Run Code Online (Sandbox Code Playgroud)
该curTree变量是main函数的本地变量,因此我预计它不会将其成员初始化为0,但它们都已初始化.