这就是我在我所谓的稳定分支上所做的事情......
% git rebase master
First, rewinding head to replay your work on top of it...
Fast-forwarded alpha-0.3.0 to master.
% git status
# On branch alpha-0.3.0
# Your branch is ahead of 'origin/alpha-0.3.0' by 53 commits.
#
nothing to commit (working directory clean)
% git push
Fetching remote heads...
refs/
refs/heads/
refs/tags/
refs/remotes/
'refs/heads/master': up-to-date
updating 'refs/heads/alpha-0.3.0'
from cc4b63bebb6e6dd04407f8788938244b78c50285
to 83c9191dea88d146400853af5eb7555f252001b0
done
'refs/heads/unstable': up-to-date
Updating remote server info
Run Code Online (Sandbox Code Playgroud)
这是我后来意识到的一个错误.我想撤消整个过程,并将alpha-0.3.0分支恢复到原来的状态.
我该怎么办?
我正在尝试做Michael Hartl教程.当我尝试在我的gemset中安装rails 3.2.14时,我遇到以下问题:
$ gem install rails -v 3.2.14
错误:找不到有效的宝石'rails'(= 3.2.14),原因如下:
无法从https://rubygems.org/下载数据- SSL_connect返回= 1 errno = 0状态= SSLv3读取服务器证书B:证书验证失败(https://s3.amazonaws.com/production.s3.rubygems.org /specs.4.8.gz)
谷歌搜索后,我发现我可以使用非SSL源的rubygems,所以我运行:
sudo gem sources -a http://rubygems.org
Run Code Online (Sandbox Code Playgroud)
然后,当我再次尝试安装rails时,它成功了.但是,我仍然遇到上述问题,但作为警告:
警告:无法从" https://rubygems.org/ " 提取数据:SSL_connect返回= 1 errno = 0状态= SSLv3读取服务器证书B:证书验证失败(https://s3.amazonaws.com/production.s3 .rubygems.org/specs.4.8.gz)
如何完全删除此警告/错误?
我使用以下内容:
我刚刚用homebrew安装了posgresql,当我继续输入命令时
psql
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.2.dylib
Referenced from: /usr/local/bin/psql
Reason: image not found
[1] 69711 trace trap psql
Run Code Online (Sandbox Code Playgroud)
有没有人知道什么是错的?
是否可以传递带参数的javascript函数作为参数?
例:
$(edit_link).click( changeViewMode( myvar ) );
Run Code Online (Sandbox Code Playgroud) 我编写了一个bash脚本,它使用curl从一个网站输出,并在html输出上做了一堆字符串操作.问题是当我针对返回其输出gzip的网站运行它时.在浏览器中访问该网站工作正常.
当我手动运行curl时,我得到gzipped输出:
$ curl "http://example.com"
Run Code Online (Sandbox Code Playgroud)
这是该特定网站的标题:
HTTP/1.1 200 OK
Server: nginx
Content-Type: text/html; charset=utf-8
X-Powered-By: PHP/5.2.17
Last-Modified: Sat, 03 Dec 2011 00:07:57 GMT
ETag: "6c38e1154f32dbd9ba211db8ad189b27"
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Cache-Control: must-revalidate
Content-Encoding: gzip
Content-Length: 7796
Date: Sat, 03 Dec 2011 00:46:22 GMT
X-Varnish: 1509870407 1509810501
Age: 504
Via: 1.1 varnish
Connection: keep-alive
X-Cache-Svr: p2137050.pubip.peer1.net
X-Cache: HIT
X-Cache-Hits: 425
Run Code Online (Sandbox Code Playgroud)
我知道返回的数据是gzip压缩的,因为这会返回html,如预期的那样:
$ curl "http://example.com" | gunzip
Run Code Online (Sandbox Code Playgroud)
我不想通过gunzip管道输出,因为脚本在其他站点上按原样运行,并且通过gzip管道将破坏该功能.
一切都空了
有任何想法吗?
我刚刚开始使用来自emacs的Sublime Text 2.
我选择了一个文本区域.在该区域内,我想将'0'的所有文本实例替换为'255'.
我该如何进行这种文字替换?
如何在Windows的sublime文本编辑器中获得大纲视图?
小地图很有帮助,但是我错过了一个传统的轮廓(我的代码中所有功能的可刷新列表,按照它们出现的顺序进行快速导航和定位)
也许有一个插件,插件或类似?如果你能简单地说出哪些步骤是必要的,那么它也会很好.
development-environment symbols text-editor outline sublimetext
我正在使用Twitter Bootstrap,我想使用Bootstrap中没有的"自动建议",而jQuery UI有自己的自动建议方法.
我可以同时使用吗?它会超载带宽吗?
当我尝试运行时,rails console我收到此错误:
/Users/TuzsNewMacBook/.rvm/gems/ruby-2.3.7/gems/bootsnap-1.3.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require':
dlopen(/Users/TuzsNewMacBook/.rvm/rubies/ruby-2.3.7/lib/ruby/2.3.0/x86_64-darwin18/readline.bundle, 9):
Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib (LoadError)
Run Code Online (Sandbox Code Playgroud)
快速搜索让我看到这篇文章,我尝试了一些事情:
brew reinstall postgresql (这确实是这个项目的数据库)
和
cd /usr/local/opt/readline/lib
ln libreadline.8.0.dylib libreadline.6.2.dylib
Run Code Online (Sandbox Code Playgroud)
(我的readline版本是8)
和
brew link readline --force
但这些都没有解决它.
我最近添加了pry-coolline,guard并且guard-livereloadgems到我的项目,如果这有任何区别(rails控制台在那之前加载好).我正在使用最新的macos.
(更新)我使用pry rails作为我的rails控制台,如果这有任何区别.
有帮助吗?谢谢.
在我的应用程序中,如果设备有相机,我想使用相机.有没有运行Android的设备没有摄像头?通过在我的清单中包含以下内容:
<uses-feature android:name="android.hardware.camera" android:required="false"/>
Run Code Online (Sandbox Code Playgroud)
然后它基本上说"我会使用相机,如果存在,但不需要一个运行应用程序".
在尝试使用Camera类之前,如何检查设备上是否存在相机?
libreadline ×2
android ×1
bash ×1
curl ×1
git ×1
git-push ×1
gzip ×1
javascript ×1
jquery-ui ×1
outline ×1
postgresql ×1
psql ×1
ruby ×1
rvm ×1
ssl ×1
sublimetext ×1
sublimetext2 ×1
symbols ×1
text-editor ×1