history

What is the reason for having unreserved identifiers as built-in macros in gcc?

孤人 提交于 2019-12-04 22:19:49
Today I stumbled upon a rather interesting compiler error: int main() { int const unix = 0; // error-line return unix; } Gives the following message with gcc 4.3.2 (yes, ancient...): error: expected unqualified-id before numeric constant which is definitely quite confusing. Fortunately, clang (3.0) is a little more helpful (as usual): error: expected unqualified-id int const unix = 0 ^ <built-in>:127:14: note: expanded from: #define unix 1 ^ I certainly did not expect unix , which is neither written in upper-case nor begin with underscore to be a macro, especially a built-in one. I checked the

How do you store business activities in a SQL database?

百般思念 提交于 2019-12-04 21:04:33
The goal is to store activities such as inserting, updating, and deleting business records. One solution I'm considering is to use one table per record to be tracked. Here is a simplified example: CREATE TABLE ActivityTypes ( TypeId int IDENTITY(1,1) NOT NULL, TypeName nvarchar(50) NOT NULL, CONSTRAINT PK_ActivityTypes PRIMARY KEY (TypeId), CONSTRAINT UK_ActivityTypes UNIQUE (TypeName) ) INSERT INTO ActivityTypes (TypeName) VALUES ('WidgetRotated'); INSERT INTO ActivityTypes (TypeName) VALUES ('WidgetFlipped'); INSERT INTO ActivityTypes (TypeName) VALUES ('DingBatPushed'); INSERT INTO

Database entries modification history

穿精又带淫゛_ 提交于 2019-12-04 19:41:57
I am currently working on a big management system (in PHP using Zend Framework, but that is not really revelant of the solution to this question) in which I have to manage multiple entries. Each entry has many fields and span on two tables in a 1-to-many relationship (through a single foreign key). There is roughly 50 fields in the first table and 30 fields in the second one. I am now at the stage to implement a history tracking of the different modifications made by users (and some automated tasks). Each entry might enventually be rolled back partially or totally to a previous value. I was

Andrew Ng机器学习 一: Linear Regression

ぃ、小莉子 提交于 2019-12-04 18:42:27
一: 单变量线性回归 (Linear regression with one variable)   背景:在某城市开办饭馆,我们有这样的数据集ex1data1.txt,第一列代表某个城市的人口,第二列代表在该城市开办饭馆的利润。      我们将数据集显示在可视图,可以看出跟某个线性方程有关,而此数据只有单个变量(某城市人口),故接下来我们就使用单变量线性回归拟合出一条近似满足于上数据的直线。   1,单变量的脚本ex1.m: %% Machine Learning Online Class - Exercise 1: Linear Regression % Instructions % ------------ % % This file contains code that helps you get started on the % linear exercise. You will need to complete the following functions % in this exericse: % % warmUpExercise.m % plotData.m % gradientDescent.m % computeCost.m % gradientDescentMulti.m % computeCostMulti.m % featureNormalize.m

数据仓库_第二次笔记

ⅰ亾dé卋堺 提交于 2019-12-04 13:57:33
1.整理 全局环境变量 个人环境变量 which的理解 2.整理 别名 3.整理 删除 4.整理 history 全局环境变量 全局环境变量的配置文件是:/etc/profile 全局环境变量中一般配置的是共用的程序环境 比如java 下面以java为例子配置 [root@aliyun ~]# vim /etc/profile java的安装路径在 /usr/java下,所以文件中如下配置 export JAVA_HOME=/usr/java/jdk1.8.0_144 export PATH=$JAVA_HOME/bin:$PATH 需要注意的是 $PATH接在$JAVA_HOME的后面,即把$JAVA_HOME放在$PATH的最前面 /opt/module/jdk1.8.0_144/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/module/jdk1.8.0_144/bin:/root/bin 个人环境变量 个人环境变量配置在 ~/.bashrc 文件中, 这里需要注意的是如果配置在 ~/.bash_profile文件中,使用ssh远程连接的时候不会加载 ~/.bash_profile,造成一些无法排查的bug 个人环境配置一些独自使用的程序变量,如果配置在用户的个人环境中,其他用户无法访问

Linux中history历史命令使用方法详解

本秂侑毒 提交于 2019-12-04 12:53:07
注意:上下箭头按键本身就可以访问到历史的命令信息 当你在玩Linux的时候,如果你经常使用命令行来控制你的Linux系统,那么有效地使用命令历史机制将会使效率获得极大提升。一旦掌握了下面给出的15个有关Linux history历史命令的例子,你就会发现使用history历史命令行将更有乐趣。 1、使用HISTTIMEFORMAT在历史中显示TIMESTAMP 通常情况下,当你在命令行中键入history时,终端中将显示你刚输入的命令及其编号。如果出于审查命令的目的,和命令一起显示时间戳将会很有帮助,如下所示。 # export HISTTIMEFORMAT='%F %T ' # history | more 1 2008-08-05 19:02:39 service network restart 2 2008-08-05 19:02:39 exit 3 2008-08-05 19:02:39 id 4 2008-08-05 19:02:39 cat /etc/redhat-release [注:你也可以设置alias语句来查看最近的历史命令] alias h1='history 10' alias h2='history 20' alias h3='history 30' 2、用Ctrl + R搜索历史命令 方法是:按下Ctrl +R然后输入关键字。

SVN Rename directory, maintain file history

核能气质少年 提交于 2019-12-04 12:14:23
问题 I originally created my svn repository without the suggested trunk, branches, tags structure. It looks something like this. /src /src/file.txt /src/file2.txt I used TortoiseSVN to rename the /src directory to /projectName/trunk/src; however, now I can't easily view the history of a file within the directory structure using Show Log. Is there a better way to do this to maintain a continuous history of all the files? 回答1: Tortoise defaults to Stop on copy when viewing logs, if I remember right.

Hide android application in long-press-HOME-button-menu

岁酱吖の 提交于 2019-12-04 11:36:14
I want to hide my android app from (and only from) the menu that appears when long holding the HOME-button after it is finished. Is there a way to do that? Calling finish() programatically dont do the trick. There are many threads about hiding an app from the launcher and taskmanager, but this is not what I want, I simply dont want it to show up in this "app history". best regards Sebastian Add android:excludeFromRecents="true" to any <activity> element in the manifest for any activity that should not appear in the recent tasks list. 来源: https://stackoverflow.com/questions/9645159/hide-android

How to remove local git history after a commit?

一个人想着一个人 提交于 2019-12-04 09:59:15
I would like to switch from Dropbox to the open source Sparkleshare. It uses git for the syncing and versioning. If say I had a 1GB file I deleted in my folder, it stays within the history of the local .git folder. But I would like to have this kind of heavy data on the server and not the client. How can I commit my repository and delete the local one with git? Many thanks! Solution removing the history git fetch --depth=1 to prune the old commits. This makes the old commits and their objects unreachable. git reflog expire --expire-unreachable=now --all . To expire all old commits and their

Materials for reading various assembly languages?

半世苍凉 提交于 2019-12-04 09:14:49
This is a wiki question to gather useful references for learning assembly languages for various architectures. I recently attempted to read the source code for Basic Pdp-1 Lisp from 1964, and needed to search extensively for reference materials to make even the slightest bit of sense from the code. I feel the links I've collected may prove useful to anyone attempting to read code of similar vintage, like SpaceWar! So a good answer should comprise: The name of the architecture A non-trivial program in assembly language (This is the real focus of the question: a classic program that's worth