我正在努力恢复我的工作.我愚蠢地做了git reset --hard
,但在那之前我只做过get add .
而且没做过git commit
.请帮忙!这是我的日志:
MacBookPro:api user$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
# modified: .gitignore
...
MacBookPro:api user$ git reset --hard
HEAD is now at ff546fa added new strucuture for api
Run Code Online (Sandbox Code Playgroud)
git reset --hard
在这种情况下可以撤消吗?
问题:我需要以某种方式签出已经在我的文件系统上本地克隆的项目的现有分支,而不是在该项目的特定文件夹中.
解决方案:我正在尝试执行以下操作:
我确实意识到第二步不是很正确,但我也试图避免使用"cd'file-system-folder'".
问题:我错过了什么或做错了什么?
我正在尝试使用php5-fpm将完全功能的Zend Framework应用程序从带有mod_php5的Apache2迁移到nginx.我遇到这种错误:
2012/06/27 12:08:04 [error] 1986#0: *1 open() "/var/www/public/sales/live-trials-json" failed (2: No such file or directory), client: *.*.*.*, server: www.mydomain.com, request: "POST /sales/live-trials-json HTTP/1.1", host: "www.mydomain.com", referrer: "https://www.mydomain.com/sales/live-trials"
这是我的配置文件:
a)/ etc/nginx/sites-enabled/www
server {
listen 80;
listen 443 default ssl;
server_name www.mydomain.com;
root /var/www/public;
ssl_certificate /etc/nginx/ssl/mydomain.crt;
ssl_certificate_key /etc/nginx/ssl/mydomain.key;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log error;
index index.php index.phtml index.html;
location = /(favicon.ico|robots.txt) {
access_log off;
log_not_found off;
}
location ~* ^.+.(css|js|jpeg|jpg|gif|png|ico|xml) {
access_log off;
expires 30d;
}
location / {
try_files $uri …
Run Code Online (Sandbox Code Playgroud) 我正在尝试这样做SELECT * FROM tbl
,但是在20列中,我不希望选择1个特定列.有没有动态的方法呢?只是讨厌在查询中指定19列!
我创建了一个Amazon EC2实例并在其上安装了Apache和PHP:
$ sudo yum install apache2
$ sudo yum install php
$ ls -al /var/www/services/
lrwxrwxrwx 1 root root 42 Jun 22 21:13 production -> /home/ec2-user/services
Run Code Online (Sandbox Code Playgroud)
我创建了新的VirtualHost:
<VirtualHost *:80>
ServerName ec2-***.compute-1.amazonaws.com
DocumentRoot "/var/www/services/production/public"
<Directory "/var/www/services/production/public">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
现在,当我在浏览器中运行我的请求时,它说403 Forbidden
并且日志显示符号链接问题:
[Wed Jun 22 21:14:19 2011] [error] [client ***] Symbolic link not allowed or link target not accessible: /var/www/services/production
[Wed Jun 22 21:14:20 2011] [error] [client ***] Symbolic …
Run Code Online (Sandbox Code Playgroud) 我无法在代码中找到触发查询的位置,并且想知道是否有一个mysql配置会在触发时拒绝该查询?例如,在我的情况下,它是UPDATE table SET col1 = NULL, col2 = NULL, col3 = NULL
......请帮助!
我在 Redshift 中运行以下命令:
myDB=> unload ('select * from (select * from myTable limit 2147483647);')
to 's3://myBucket/'
credentials 'aws_access_key_id=***;aws_secret_access_key=***';
Run Code Online (Sandbox Code Playgroud)
这是我得到的回复:
ERROR: S3ServiceException:The bucket you are attempting to access must be addressed
using the specified endpoint. Please send all future requests to this
endpoint.,Status 301,Error PermanentRedirect,Rid 85ACD9FFAFC5CE8F,
ExtRid vsz4/0NdOAYbaJ48WYCnrYBCvuuL0cBTdcEN
DETAIL:
-----------------------------------------------
error: S3ServiceException:The bucket you are attempting to access must be addressed
using the specified endpoint. Please send all future requests to this
endpoint.,Status 301,Error PermanentRedirect,Rid 85ACD9FFAFC5CE8F,
ExtRid vsz4/0NdOAYbaJ48WYCnrYBCvuuL0cBTdcEN
code: 8001
context: …
Run Code Online (Sandbox Code Playgroud) 我正在努力将多行插入 Redshift 中。以下是 SQL 查询:
CREATE TABLE tblA (
column1 bigint primary key,
column2 varchar(255) default null,
column3 varchar(255) default null,
recordModifiedTimestamp timestamp
);
INSERT INTO tblA (column1, column2, column3) VALUES
(1, "DES", "article"),
(2, "DES", "slideshow"),
(3, "DES", "video");
Run Code Online (Sandbox Code Playgroud)
当我运行最后一个查询时,我得到的结果如下:
ERROR: column "des" does not exist in tblA
Run Code Online (Sandbox Code Playgroud)
我错过了什么吗?
mysql ×4
sql ×3
git ×2
amazon-s3 ×1
apache ×1
branch ×1
clone ×1
data-dump ×1
git-add ×1
git-checkout ×1
git-commit ×1
git-reset ×1
linux ×1
my.cnf ×1
nginx ×1
permissions ×1
php ×1
postgresql ×1
select ×1
sql-server ×1
symlink ×1
ubuntu ×1
undo ×1
vhosts ×1