小编use*_*181的帖子

省略号在Firefox中运行不正常,但在chrome中运行

我试图使用省略号将链接限制为宽度.

html是这样的:

<a class="blueLink2 destination-url-space" style="top:0;" href="http://google.com/uyv245">http://google.com/iuh345345345gthrthrthrth</a>
Run Code Online (Sandbox Code Playgroud)

而CSS则是

.blueLink2 {
    color: #0051A1;
    display: inline;
    font-size: 14px;
    margin-left: 5px;
    overflow: hidden;
    position: relative;
    text-overflow: ellipsis;
    top: 0;
}
.destination-url-space {
    display: inline-block;
    max-width: 200px;
    overflow-x: hidden;
}
Run Code Online (Sandbox Code Playgroud)

但它仅适用于Chrome.在Firefox中不起作用.演示:http://jsfiddle.net/xE6HG/ 请帮帮我.

html css ellipsis

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

mkdir():权限被拒绝Laravel

我正在为服务器中的图像上传运行以下脚本,并在以下主机上完美运行时收到以下错误。

$user_id = Auth::id();
$logicpath = 'userdp/' . $user_id . '/';
$pubpath = 'userdp/' . $user_id . '/' . $dpFile;
$path = '/userdp/' . $user_id . '/' . $dpFile;

if (!file_exists($logicpath)) {
     mkdir($logicpath, 0777, true);
}
Run Code Online (Sandbox Code Playgroud)

错误

UploadController.php第605行中的ErrorException:mkdir():权限被拒绝

在HandleExceptions-> handleError('2','mkdir():权限被拒绝','/var/www/html/laravel/app/Http/Controllers/UploadController.php','605',array('dp'= > object(UploadedFile),'ext'=>'jpg','img'=> object(Image),'mime'=>'image / jpeg','width'=>'200','height'=> '200','fileSize'=>'17152','dpFile'=>'f12f298ab18d58a59c4ed8a589cd1cdc.jpg','user_id'=>'1','logicpath'=>'userdp / 1 /','pubpath'=> 'userdp / 1 / f12f298ab18d58a59c4ed8a589cd1cdc.jpg','path'=>'/userdp/1/f12f298ab18d58a59c4ed8a589cd1cdc.jpg')

我尝试chmod 777 public并重新启动了服务器。但这没有用。

php laravel

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

如何在同一个 .js 文件上创建多个 Vue 实例?

我正在尝试将两个Vue.js实例添加到同一个.js文件中,如下所示:

new Vue({
  el: '#step1',
  data: {
    value1: '',
  }
})


new Vue({
  el: '#step2',
  data: {
    value2: '',
  }
})
Run Code Online (Sandbox Code Playgroud)

我在两个单独的网页中调用这两个实例。但是我收到 Vue 警告,例如[Vue warn]: Cannot find element: #step1未找到或未[Vue warn]: Cannot find element: #step2找到。我做错了吗?或者有什么方法可以将两个实例连接在一起?

vue.js

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

无法解析模块'babel-runtime/core-js/object/define-properties'

我正在尝试为Vue应用程序创建一个插件.我编写以下代码时遇到错误:

export default function(Vue){
    Vue.auth = Authentication;

    Object.defineProperties(Vue.prototype, {
        $auth: {
            get() {return Vue.auth; }
        }
    });
}
Run Code Online (Sandbox Code Playgroud)

而错误是:

./src/authentication.js中的错误找不到模块:错误:无法在D:\ Dropbox\www\Vue\src @ ./src/authentication中解析模块'babel-runtime/core-js/object/define-properties' .js 7:24-81

这有什么问题?我无法解决它.任何的想法?

javascript vue.js

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

目标CSS仅适用于Mac上的Firefox

我的编码中有一些对齐问题.在Windows中,所有浏览器似乎都没问题.但是当我在Mac firefox中检查它时,对齐并不完美.我可以通过改变一点来修复它.但它应该只适用于Mac上的Firefox.

是否有任何CSS属性或东西?

示例:http://jsfiddle.net/9chk5/

.notes {
display: inline-block;
position: relative;
width: 16px;
height: 16px;
margin: 0 auto;
background: #abc;
}

.search-notes {
font-size: 14px;
color: #484848;
position: relative;
top: -20px;
margin: 0 25px 0 22px;
}
Run Code Online (Sandbox Code Playgroud)

和HTML

<div class="notes" style="top:2px"></div><div class="search-notes">This link is used to get information about the visitors from the google organic search. This link is used to get information about the visitors from the google organic search. This link is used to get information …
Run Code Online (Sandbox Code Playgroud)

css macos firefox

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

在DigitalOcean Droplet上安装Laravel 5.1时出错

我是DigitalOcean的基本款.

首先我安装composer如下:

curl -sS https://getcomposer.org/installer | php

mv composer.phar /usr/local/bin/composer

然后我尝试按如下方式安装Laravel:

composer create-project laravel/laravel --prefer-dist

然后我得到以下错误:

Installing laravel/laravel (v5.1.4)
  - Installing laravel/laravel (v5.1.4)
    Loading from cache

Created project in /var/www/html/laravel
> php -r "copy('.env.example', '.env');"
Loading composer repositories with package information
Installing dependencies (including require-dev)
  - Installing vlucas/phpdotenv (v1.1.1)
    Loading from cache
The following exception is caused by a lack of memory and not having swap configured
Check https://getcomposer.org/doc/articles/troubleshooting.md#proc-open-fork-failed-errors for details
PHP Fatal error:  Uncaught exception 'ErrorException' with …
Run Code Online (Sandbox Code Playgroud)

digital-ocean laravel-5.1

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

Laravel 5.1 单元测试中的用户身份验证

我对 Laravel 5.1 中的单元测试有点困惑。

我想测试来自用户帐户的设置更新。我是phpunit用来测试的。

这是我的测试用例。

/** @test */
    public function it_updates_personal_details(){

        $this->withoutMiddleware();
        $this->visit('/account/settings')
            ->post('/account/settings', ["firstname"=>"RingoUpdated", 'lastname'=>"RingyUpdated", "username"=>"ringo", "bio"=>"My Personal Information", "facebook"=>"myFbUsername", "twitter"=>"myTwUsername", ])
            ->seeJson([
                "signup"=>true
            ]);
    }
Run Code Online (Sandbox Code Playgroud)

但是在我的控制器中,我使用Auth::id()获取当前登录用户的id. 我怎么能在Laravel5.1 中嘲笑这个?

php unit-testing laravel-5.1

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

使用php预选选择选项

我有一个表单要完成创建一个post.现在创建该帖子之后,如果我想编辑它,我会select在编辑页面中显示如下所示的选项.(我正在使用Laravel)

<select name="posts">
@foreach($posts as $post)

  <option value="{{$post->id}}"> {{$post->name }} </option>

@endforeach
</select>
Run Code Online (Sandbox Code Playgroud)

现在我需要使用当前预选填充的选择字段post name.我在URL中有一个帖子ID,我可以知道我在哪个帖子中.如何选择正确的选项而不在选项字段中复制相同的选项.?

php laravel laravel-4

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

无法在“WorkerGlobalScope”上执行“importScripts”

我正在尝试在我的 pwa nuxtjs 应用程序中启用 OneSignal 通知。

modules: [
    '@nuxtjs/axios',
    '@nuxtjs/onesignal',
    '@nuxtjs/pwa',
  ],

  oneSignal: {
    cdn: true,
    OneSignalSDK: 'https://cdn.onesignal.com/sdks/OneSignalSDK.js',
    init: {
      appId: 'xxxxxxxxxxx',
      allowLocalhostAsSecureOrigin: true,
      welcomeNotification: {
          disable: true
      }
    }
  },
  workbox: {
    dev: true,
    debug: true
  },
Run Code Online (Sandbox Code Playgroud)

我收到弹出通知,当我按下 时Accept,出现以下错误:

获取脚本时收到错误的 HTTP 响应代码 (404)。sw.js?1557093232129:1 未捕获的 DOMException:无法执行

“WorkerGlobalScope”上的“importScripts”:“ http://localhost:3333/_nuxt/workbox.dev.4c4f5ca6.js ”上的脚本加载失败。在http://localhost:3333/sw.js?1557093232129:1:1http://localhost:3333/OneSignalSDKWorker.js?appId=xxxxxxxx:1:1 (匿名)@sw.js?1557093232129:1

ServiceWorkerManager.js:371 [Service Worker Installation] 安装 Service Worker 失败 TypeError: Failed to register a ServiceWorker: ServiceWorker 脚本评估失败

sw.js在静态文件夹中也有该文件。在 Github 问题部分找到了类似的问题,但没有真正的解决方案。

javascript onesignal progressive-web-apps nuxt.js

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

如何使用jquery更改左值

我有两节课:

offcanvas-menu-selectorsub-navigation.默认情况下,左边的值sub-navigationleft:-250px.我想left:0px在点击时更改此值offcanvas-menu-selector

我尝试了以下方法:

$('.offcanvas-menu-selector').onclick(function(){
    $('.sub-navigation').css({left: 0, position:'absolute'});
});
Run Code Online (Sandbox Code Playgroud)

但它没有用.给我一个错误: Uncaught TypeError: undefined is not a functionjquery.js:33 (anonymous function)jquery.min.js:2 jjquery.min.js:2 k.fireWithjquery.min.js:2 m.extend.readyjquery.min.js:2 J

我怎样才能做到这一点?

html css jquery

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

为什么/ etc/apache2/sites-enabled/000-default返回空白?

我在我的服务器上安装了LAMP和phpmyadmin.(DigitalOcean中的Droplet)

我在编辑文件时遇到问题 sudo nano /etc/apache2/sites-enabled/000-default

这将返回一个空文件.

我甚至试过 sudo nano /etc/apache2/sites-enabled/default ,它也是空的.

当我尝试

> ls -l /etc/apache2/sites-enabled


    lrwxrwxrwx 1 root root 26 Nov 14  2013 000-default -> ../sites-available/000-default.conf
Run Code Online (Sandbox Code Playgroud)

可能是什么问题?

apache lamp ubuntu-14.04

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