小编ben*_*r78的帖子

通过代理连接SSH

我不知道我在这里做什么,所以如果你能帮助我,请记住这一点!

我试图通过代理连接到我的虚拟服务器,但我无法连接,它只是挂起.我假设这是因为它没有通过我们的代理.

我在家尝试过完全相同的东西,它完美无缺.我正在运行使用终端进行连接的OSX.

任何人都可以告诉我如何通过SSH获取代理?

ssh terminal proxy

45
推荐指数
5
解决办法
15万
查看次数

访问Vuejs组件内的元素

我正试图从我的Vue组件中访问dom中的元素,但我只是得到'null'.如果我进入开发工具并尝试我可以访问它.我认为这是一个范围问题,但我找不到答案.

<template>
    <ul class="list-group" id="criteria" v-for="item in criteria">
        <li class="list-group-item">{{ item.name }}</li>
    </ul>
</template>

<script>
    export default {
        template: "report-criteria",
        data() {
            return {
                criteria: []
            }
        },
        ready() {
            console.log(document.getElementById('criteria'));
        },
        methods: {},
    };
</script>
Run Code Online (Sandbox Code Playgroud)

有人可以帮忙吗?

javascript vue.js

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

Google Maps API显示空白地图

我确定这是一个基本问题,但我现在已经多次撞到墙上了,所以希望有人会怜悯我!

我有以下示例,但它只是显示一个灰色的框,根本没有地图.谁能告诉我为什么?

我已经检查过我实际上正在返回一个结果,它似乎工作正常.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title></title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <style>
            html, body, #map-canvas {margin: 0;padding: 0;height: 100%;}
        </style>
    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
    <script>
      var geocoder;
      var map;

      function initialize() 
      {
        geocoder = new google.maps.Geocoder();        
        geocoder.geocode( { 'address': "England"}, function(results, status) 
        {
          if (status == google.maps.GeocoderStatus.OK) 
          {
            var mapOptions = {
              zoom: 8,
              center: new google.maps.LatLng(results[0].geometry.location),
              mapTypeId: google.maps.MapTypeId.ROADMAP
            }

            // Let's draw the map
            map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);

          } 
          else 
          { …
Run Code Online (Sandbox Code Playgroud)

javascript google-maps-api-3

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

Xdebug需要不同的Zend版本

我真的很茫然,我只是不明白如何解决这个错误.

Xdebug requires Zend Engine API version 220121212.
The Zend Engine API version 220131226 which is installed, is newer.
Run Code Online (Sandbox Code Playgroud)

我读过一些关于phpize的内容,但是当我运行命令时,我得到...

Make sure that you run '/usr/local/bin/phpize' in the top level source directory of the module
Run Code Online (Sandbox Code Playgroud)

我不确定这意味着什么.什么是顶级源目录?

有人可以帮我吗?

谢谢

php xdebug

11
推荐指数
2
解决办法
7481
查看次数

无法运行composer安装

我正在尝试在我的项目中运行composer install但是我有以下错误

[Composer\Downloader\TransportException]
The "http://packagist.org/p/provider-2013$43e3f41fbe30a46245103451248f688a727f076a6e90636d19a69a156c17a416.json" file could not be downloaded (HTTP/1.1 400 Received invalid request from Client)
Run Code Online (Sandbox Code Playgroud)

我试图运行composer自我更新并出现此错误

[Composer\Downloader\TransportException]
The "https://getcomposer.org/version" file could not be downloaded: Failed to enable crypto failed to open stream: operation failed
Run Code Online (Sandbox Code Playgroud)

我用代理后面的apache/php5.6.4/mysql运行Ubuntu 15.04.

我试过下载http://curl.haxx.se/ca/cacert.pem并用以下内容更新我的php.ini文件

curl.cainfo=/etc/ssl/certs/cacert.pem
openssl.cafile=/etc/ssl/certs/cacert.pem
openssl.capath=/etc/ssl/certs
Run Code Online (Sandbox Code Playgroud)

运行composer diagnose会返回此信息

Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: FAIL
[Composer\Downloader\TransportException] The "http://packagist.org/packages.json" file could not be downloaded (HTTP/1.1 400 Received invalid request from Client)
Checking https …
Run Code Online (Sandbox Code Playgroud)

php ubuntu composer-php

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

PHPStorm Live模板未扩展

我刚刚开始用PHPStorm播放araound,我无法让实时模板工作.例如,有一个公共功能..'pubf'然后选项卡展开但是当我选择我的选项时它看起来像这样...

<pubf></pubf>
Run Code Online (Sandbox Code Playgroud)

这是怎么回事?是否需要启用设置才能使其正常工作?

谢谢

ide phpstorm

7
推荐指数
2
解决办法
2988
查看次数

从匿名函数访问 Vue 方法

我只是在玩 Vue.js(对 javascript 也很陌生)并尝试访问我的 Google 日历中的事件。

在控制台中查看时,我不断收到“未定义”。

    new Vue({
    el: '#app',
    data: {
        client_id: 'my_client_id',
        scopes: ["https://www.googleapis.com/auth/calendar.readonly"],
        events: {
            title: 'Upcoming Events',
            items: [],
        }
    },
    created: function () {
        this.loadCalendarApi();
    },
    methods: {
        addEvent: function (event) {
            this.events.items.push({
                title: event.summary,
                date: event.start.dateTime
            });
        },
        loadCalendarApi: function () {
            gapi.client.load('calendar', 'v3', this.listUpcomingEvents);
        },
        listUpcomingEvents: function () {
            var request = gapi.client.calendar.events.list({
                'calendarId': 'primary',
                'timeMin': (new Date()).toISOString(),
                'showDeleted': false,
                'singleEvents': true,
                'maxResults': 10,
                'orderBy': 'startTime'
            });
            var events = this.requestEvents(request);
            console.log(events); …
Run Code Online (Sandbox Code Playgroud)

javascript vue.js

5
推荐指数
2
解决办法
4902
查看次数

如何使用顺风CSS填充视口的高度

我只是在尝试Tailwind CSS,想知道如何填充视口的高度。

从文档中获取此示例HTML

<div class="flex items-stretch bg-grey-lighter">
    <div class="flex-1 text-grey-darker text-center bg-grey-light px-4 py-2 m-2">1</div>
    <div class="flex-1 text-grey-darker text-center bg-grey-light px-4 py-2 m-2">2</div>
    <div class="flex-1 text-grey-darker text-center bg-grey-light px-4 py-2 m-2">3</div>
</div>
Run Code Online (Sandbox Code Playgroud)

如何使其延伸到屏幕底部?

css flexbox tailwind-css

4
推荐指数
6
解决办法
3809
查看次数

在EC2实例上安装Laravel

我是AWS的新手,这让我很难过.我正在尝试在运行AMI Linux软件包的EC2上安装Laravel 4.我没有域名,只需使用免费套餐并尝试一下.

Laravel需要将laravel/public文件夹作为文档根目录,但我无法弄清楚如何执行此操作.我已经阅读了关于conf.d文件夹vhosts文件httpd.conf文件的大量内容,我真的不明白它们是如何组合在一起的.

有人可以帮助我并告诉我如何设置我的documnent root,这样当我访问我的弹性IP地址时它会正确加载吗?

谢谢

amazon-ec2 amazon-web-services laravel laravel-4

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

使用同步在Laravel中的数据透视表中分离

我有一些奇怪的事情,我无法理解,并想知道是否有人可以帮我弄清楚发生了什么.

我有2个表(评估者,流程)和一个数据库(process_assessor).我正在尝试使用评估员的流程更新数据透视表,因此我有一个表单,在提交时将其传递给此方法...

public function updateProcesses( $id )
{
    $assessor = $this->model->find( $id );
    return $assessor->processes()->sync( $this->request->get( 'process_id' ) );
}
Run Code Online (Sandbox Code Playgroud)

这工作正常但是当更新用户没有进程时我收到错误消息...

Argument 1 passed to Illuminate\Database\Eloquent\Relations\BelongsToMany::formatSyncList() must be of the type array, null given, called
Run Code Online (Sandbox Code Playgroud)

然而,(这是奇怪的一点)我还有一个用户配置文件模块,它使用与数据透视表"同步"完全相同的方式但是当我提交该表单时,该特定模块的所有选项都未选中,那么它可以工作,用户在数据透视表中与它们分离.

我究竟做错了什么?有任何想法吗?

php laravel eloquent

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

使用jQuery获取动态单选按钮的价值

我害怕,我几乎是一个完全jquery noob!我确信这是一件非常简单的事情,但我似乎无法解决这个问题.

我正试图获得一个动态的,选定的单选按钮的值.

HTML ...

<div id="holder" class="">
<table id="qual-holder" class="table table-striped qual-table">
    <thead>
        <tr>
            <th>Sector</th>
            <th>Qualification Title</th>
            <th>Cost</th>
            <th>Confirm</th>
        </tr>
    </thead>
    <tr class="sector_qual">
        <td>OM207</td>
        <td>Diploma in Children and Young People's Workforce Level 3</td>
        <td>0</td>
        <td>
            <input name="qualification" id="28" type="radio" value="28" class="">
        </td>
    </tr>
    <tr class="sector_qual">
        <td>OM207</td>
        <td>Diploma in Children and Young People's Workforce</td>
        <td>0</td>
        <td>
            <input name="qualification" id="29" type="radio" value="29" class="">
        </td>
    </tr>
    <tbody id="sector_quals"></tbody>
</table>
<div class="control-group spacing-top">
    <label for="loan_value" class="control-label required">Amount to Borrow</label>
    <div class="controls">
        <div class="input-prepend"> …
Run Code Online (Sandbox Code Playgroud)

jquery radio-button

0
推荐指数
1
解决办法
3548
查看次数