小编aln*_*sre的帖子

如何在Android浏览器中检查元素?

我想在我的Android浏览器中检查我的网站CSS/HTML元素.

但它将通过智能手机或Android SDK.

最好的方法是什么?

firebug google-chrome-devtools

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

如何使CSS文件比另一个CSS文件更重要?

我希望css.css覆盖所有的类,标签和ID bootstrap.min.css 而不重复类,标签和ID bootstrap.min.css.

<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/css.css" rel="stylesheet">
Run Code Online (Sandbox Code Playgroud)

html css

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

如何将 phpmyadmin 添加到 Laravel 8 航行 docker-compose.yml

我正在尝试添加phpmyadminLaravel 8 docker-compose.yml文件。

现在,我可以phpmyadmin在“http://localhost:8080”上访问,但没有用户无法登录

Cannot log in to the MySQL server

mysqli::real_connect(): php_network_getaddresses: getaddrinfo failed: Name or service not known

mysqli::real_connect(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Name or service not known
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

我的docker-compose.yml文件看起来像这样:

# For more information: https://laravel.com/docs/sail
version: "3"
services:
  laravel.test:
    build:
      context: ./vendor/laravel/sail/runtimes/8.0
      dockerfile: Dockerfile
      args:
        WWWGROUP: "${WWWGROUP}"
    image: sail-8.0/app
    ports:
      - "${APP_PORT:-80}:80"
    environment:
      WWWUSER: "${WWWUSER}"
      LARAVEL_SAIL: 1
    volumes:
      - ".:/var/www/html"
    networks:
      - sail
    depends_on:
      - mysql
      # - pgsql …
Run Code Online (Sandbox Code Playgroud)

phpmyadmin docker docker-compose

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

如何在模块中创建自定义表单字段类型?

我使用joomla 2.5,我想创建一个自定义表单字段类型 that stored in the same module.

在XML中:

 <fieldset  name="basic" addfieldpath="/modules/mod_royalslider/fields"></fields>
      <fieldset name="basic">
           <field name="title" type="City" label="anythging" description=""   />
      </fieldset>
 </fields>
Run Code Online (Sandbox Code Playgroud)

在文件中 /modules/mod_royalslider/fields/city.php

<?php
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

jimport('joomla.form.formfield');

class JFormFieldCity extends JFormField {

    protected $type = 'City';

    // getLabel() left out

    public function getInput() {
            return '<select id="'.$this->id.'" name="'.$this->name.'">'.
                   '<option value="1" >New York</option>'.
                   '<option value="2" >Chicago</option>'.
                   '<option value="3" >San Francisco</option>'.
                   '</select>';
    }
}
Run Code Online (Sandbox Code Playgroud)

现在它显示我的错误,当我删除 <fieldset name="basic" addfieldpath="/modules/mod_royalslider/fields"></fields>

错误消失,字段显示为文本字段.

joomla joomla-module joomla2.5

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

离子电容器共享插件不与 Whatsapp 共享图像

我创建了这个功能,可以在许多应用程序上很好地共享图像,但当涉及到WhatsApp或 Instagram 时,它无法共享图像。

我使用 Ionic v5 和电容器 v3


  async shareImage() {
    let receiptName = 'Receipt N:123.png';
    const div = this.screenshotElement.nativeElement;
    const divHeight = div.clientHeight;
    const divWidth = div.clientWidth;
    const options = { background: '#ffffff', width: divWidth, height: divHeight };

    await Filesystem.requestPermissions();

    let base64Data = await domtoimage.toPng(div, options);

    // device shareing
    await Filesystem.writeFile({
      path: receiptName,
      data: base64Data,
      directory: Directory.Cache
    });


    let fileResult = await Filesystem.getUri({
      directory: Directory.Cache,
      path: receiptName
    });

    let imageLink = Capacitor.convertFileSrc(fileResult.uri);

    Share.share({
      title: receiptName,
      text: receiptName, …
Run Code Online (Sandbox Code Playgroud)

ionic-framework angular capacitor

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

运行 Laravel Seeder 时数组到字符串转换错误

ErrorException Array to string conversion当我运行播种器时出现错误。

\n

php artisan db:seed --class=StudentSeeder

\n

在我对 进行更改之前它工作得很好StudentFactory.php,我只是更改了所有的伪造者,而且我不知道是哪个伪造者造成了这个麻烦。

\n
<?php\n\nnamespace Database\\Factories;\n\nuse Illuminate\\Database\\Eloquent\\Factories\\Factory;\nuse Illuminate\\Support\\Str;\nuse App\\Models\\Student;\n\nclass StudentFactory extends Factory\n{\n    /**\n     * The name of the factory's corresponding model.\n     *\n     * @var string\n     */\n    protected $model = Student::class;\n\n    /**\n     * Define the model's default state.\n     *\n     * @return array\n     */\n    public function definition()\n    {\n        return [\n            'student_name' => $this->faker->name('male'),\n            'cpr' => $this->faker->creditCardNumber,\n            'email' => $this->faker->safeEmail,\n            'mobile' => $this->faker->e164PhoneNumber,\n            'mobile2' => $this->faker->e164PhoneNumber,\n            'dob' => $this->faker->date(),\n            'address' …
Run Code Online (Sandbox Code Playgroud)

php faker laravel

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