小编Tah*_*oon的帖子

Composer安装错误 - 输出不是tty,输入不是tty

我正在尝试通过php安装composer,如他们的wesite所述.

php -r "readfile('https://getcomposer.org/installer');" | php
Run Code Online (Sandbox Code Playgroud)

但它显示以下错误:

$ php -r "readfile('https://getcomposer.org/installer');" | php
output is not a tty
input is not a tty
Run Code Online (Sandbox Code Playgroud)

我在Windows 7中并使用git bash来执行此命令.在Windows命令提示符下,它工作正常.只有从git bash 2.6.2-64bit运行此命令时才会出现此问题.

顺便说一下,我已经为windows安装了composer,这很好用.但我无法以这种方式下载composer.phar.我该如何解决这个问题?

php windows git-bash composer-php

8
推荐指数
1
解决办法
9916
查看次数

如何在一个页面中多次显示Google广告单元?

我想在一个页面中多次显示相同的广告单元.只有第一个广告位在第一次工作.当我单击刷新按钮时,会出现第二个插槽.我怎样才能使它工作?

这是我的代码:

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Google Advertisement</title>
        <script type='text/javascript'>
            var googletag = googletag || {};
            googletag.cmd = googletag.cmd || [];
            (function() {
                var gads = document.createElement('script');
                gads.async = true;
                gads.type = 'text/javascript';
                var useSSL = 'https:' == document.location.protocol;
                gads.src = (useSSL ? 'https:' : 'http:') +
                        '//www.googletagservices.com/tag/js/gpt.js';
                var node = document.getElementsByTagName('script')[0];
                node.parentNode.insertBefore(gads, node);
            })();
        </script>
        <script type='text/javascript'>
            var slots = {};
            googletag.cmd.push(function() {
                slots['sky1'] = googletag.defineSlot('4757460/Home-Above-Fold-300x250', [300, 250], 'ad-sky1').addService(googletag.pubads());
                slots['sky2'] = googletag.defineSlot('4757460/Home-Above-Fold-300x250', [300, 250], 'ad-sky2').addService(googletag.pubads()); …
Run Code Online (Sandbox Code Playgroud)

javascript adsense

5
推荐指数
1
解决办法
2016
查看次数

Phoenix 静态内容并不总是加载

在我的应用程序中,我创建了两个 java 脚本文件 -“app.js”和“vendor.js”。这些文件是通过“brunch build”在 priv/static/js 文件夹中正确生成的。但是当我使用牛仔服务器运行我的应用程序时,有时文件会加载到浏览器中,有时我会看到 404,即出现以下错误 -

GET http://localhost:4000/js/vendor.js 404 (Not Found)
GET http://localhost:4000/js/app.js 
Run Code Online (Sandbox Code Playgroud)

这是我的早午餐配置:

exports.config = {
    files: {
        javascripts: {
            joinTo: {
                "js/app.js": /^(web\/static\/js)|(web\/static\/js\/*)|(node_modules\/*)/,
                "js/vendor.js": [
                    "web/static/vendor/jquery/dist/jquery.min.js",
                    "web/static/vendor/bootstrap-sass/assets/javascripts/bootstrap.min.js"
                ],
                'js/ignoreThis.js': /^(web\/static\/vendor)/                
            },
            order: {
              before: []
            }
        },
        stylesheets: {
            joinTo: "css/app.css",
            order: {
              before: [],
              after: [
                "web/static/css/app.css"
              ]
            }
        },
        templates: {
            joinTo: "js/app.js"
        }
    },
    conventions: {
        assets: /^(web\/static\/assets)/
    },
    paths: {      
        watched: [
            "web/static",
            "test/static"
        ],        
        public: "priv/static"
    },    
    plugins: {
        babel: …
Run Code Online (Sandbox Code Playgroud)

elixir cowboy brunch phoenix-framework

5
推荐指数
0
解决办法
986
查看次数

如何解决在debian中安装netbeans8时的错误java.lang.NoClassDefFoundError

我想在debian-7.0-amd64-minimal中安装netbeans 8.(VPS)

首先我按照https://www.digitalocean.com/community/tutorials/how-to-manually-install-oracle-java-on-a-debian-or-安装了java/JDK最新版本(1.8.0_20) Ubuntu的VPS

接下来我试图通过以下方式安装netbeans

http://installnetbeansdebian.blogspot.com/2013/06/how-to-install-netbeans-73-ide-complete.html

我跑的时候

./netbeans-8.0-php-linux.sh
Run Code Online (Sandbox Code Playgroud)

它显示以下错误.

Configuring the installer...
Searching for JVM on the system...
Extracting installation data...
Running the installer wizard...

Exception: java.lang.NoClassDefFoundError thrown from the UncaughtExceptionHandler in thread "main"
Run Code Online (Sandbox Code Playgroud)

谁知道,如何解决这个问题?

java linux debian netbeans

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

如何使用“ get”方法检索angularfire2中的所有集合

Firebase云存储提供了“获取”方法来检索整个集合,如下所示-

db.collection("users").get().then((querySnapshot) => {
    querySnapshot.forEach((doc) => {
        console.log(doc);
    });
});
Run Code Online (Sandbox Code Playgroud)

我在Ionic 3项目中使用Angularfire2版本5.0.0rc3与Firebase云存储连接。

我试图按以下方式访问此get方法-

constructor(
    private afs: AngularFirestore
) {

    this.afs.collection("users").get().then((querySnapshot) => {
        querySnapshot.forEach((doc) => {
            console.log(doc);
        });
    });

}
Run Code Online (Sandbox Code Playgroud)

但是在这里,“获取”方法不起作用。谁能告诉我谁将这种“ get”方法与firebase clould存储和angularfire2一起使用。

firebase angularfire2 ionic3 angular google-cloud-firestore

4
推荐指数
2
解决办法
5431
查看次数