小编huw*_*uwr的帖子

将shell命令的输出插入emacs缓冲区

我想设置一个键绑定来将日期插入缓冲区.我在我的.emacs文件中写了以下lisp .以date身份为例:

;;put the date                                                                  
(global-set-key
 (kbd "C-c C-d")
 (shell-command "date" (current-buffer))
)
Run Code Online (Sandbox Code Playgroud)

当我使用其他命令时,键绑定工作正常'next-line,但是当读取.emacs并将其保留shell-command*scratch*缓冲区时,它会将其放入缓冲区.

也许我需要使用shell-command-on-region.

emacs

37
推荐指数
2
解决办法
2万
查看次数

RestTemplate to NOT escape url

我正在成功使用Spring RestTemplate:

String url = "http://example.com/path/to/my/thing/{parameter}";
ResponseEntity<MyClass> response = restTemplate.postForEntity(url, payload, MyClass.class, parameter);
Run Code Online (Sandbox Code Playgroud)

这很好.

但是,有时候parameter%2F.我知道这不是理想的,但事实就是如此.正确的URL应该是:http://example.com/path/to/my/thing/%2F但是当我设置parameter"%2F"它时,双重转义为http://example.com/path/to/my/thing/%252F.我该如何防止这种情况?

java spring resttemplate

19
推荐指数
2
解决办法
1万
查看次数

在emacs Web模式下关闭自动标记关闭?

在Web模式下使用HTML模板时,我对标签的自动关闭感到沮丧.在<div>I类型内部</填充之前div>.

这使得从另一个地方复制/粘贴到我的终端烦人.

如何关闭此功能?

emacs

3
推荐指数
1
解决办法
1013
查看次数

如何在弹性beanstalk中隐藏nginx版本

我正在平台Ruby 2.2(Passenger Standalone)上运行一个应用程序,并希望隐藏HTTP标头中的nginx版本.我没有使用Docker.其他Stack Overflow答案建议将此添加到我的.ebextensions:

00_nginx.conf:

files:
  "/etc/nginx/conf.d/proxy.conf":
    mode: "000644"
    content: |
      http {
        server_tokens off;
        passenger_show_version_in_header off;
      }
Run Code Online (Sandbox Code Playgroud)

但这没有任何作用.我应该把文件放在另一个地方吗?

ruby nginx amazon-web-services amazon-elastic-beanstalk

3
推荐指数
1
解决办法
1510
查看次数

错误:无法解析“babel-loader”

我收到此错误,您能帮帮我吗?以下是我的 webpack.config 和 package.JSON 文件。我的服务器工作正常,但 webpack 不行。我全局安装了 Webpack,但这并没有解决这个问题。

===webpack.config文件===

var path = require('path');
const webpack = require('webpack');
module.exports = {
  entry: './src/app.js',
  output: {
    filename: 'bundle.js',
    path: path.resolve(__dirname, 'public')
  },
watch: true,
module: {
  loaders: [
    {
      test:/\.js$/,
      exclude:/node_modules/,
      loader: 'babel-loader',
      query: {
        presets: ['react', 'es2015', 'stage-1']
      }
    }

  ]
}
Run Code Online (Sandbox Code Playgroud)

===Package.JSON文件===

{
  "name": "reduxApp",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": …
Run Code Online (Sandbox Code Playgroud)

webpack babel-loader

2
推荐指数
1
解决办法
3036
查看次数