管理员 发布的文章

资源:L2Dwidget 二次元前端插件


使用方法:

如下面代码一样,在HTML的head头内或body尾部引入L2Dwidget.js即可在页面中引入动画。

<script src="https://eqcn.ajz.miesnfu.com/wp-content/plugins/wp-3d-pony/live2dw/lib/L2Dwidget.min.js"></script> 
<script src="https://eqcn.ajz.miesnfu.com/wp-content/plugins/wp-3d-pony/live2dw/lib/L2Dwidget.0.min.js"></script> 
<script>
  L2Dwidget.init({ 
  "model": {jsonPath:"https://unpkg.com/live2d-widget-model-shizuku@1.0.5/assets/shizuku.model.json","scale": 1 }, 
  "display": { "position": "left", "width": 150, "height": 300,"hOffset": 0, "vOffset": -20 }, 
  "mobile": { "show": true, "scale": 0.5 }, 
  "react": { "opacityDefault": 0.7, "opacityOnHover": 0.2 } });
</script>

其中,model内的jsonPath对应的就是动画模型的json文件地址,不同模型,显示不同图形。

可选模型有:

模型类型url
小帅哥https://unpkg.com/live2d-widget-model-chitose@1.0.5/assets/chitose.model.json
萌娘https://unpkg.com/live2d-widget-model-shizuku@1.0.5/assets/shizuku.model.json
小可爱(女)https://unpkg.com/live2d-widget-model-koharu@1.0.5/assets/koharu.model.json
小可爱(男)https://unpkg.com/live2d-widget-model-haruto@1.0.5/assets/haruto.model.json
初音https://unpkg.com/live2d-widget-model-miku@1.0.5/assets/miku.model.json
z16https://unpkg.com/live2d-widget-model-z16@1.0.5/assets/z16.model.json
黑猫https://unpkg.com/live2d-widget-model-hijiki/assets/hijiki.model.json

等有时间放到宝塔插件上去(但是最近良哥说插件无大bug不给与审核)。。。。


PHP封装: html转pdf文件 mPDF 使用


mpdf中文开发使用文档附demo实例

官网URL:http://www.mpdf1.com/mpdf/index.php
github:https://github.com/mpdf/mpdf
官方开发手册,英文的:http://www.mpdfonline.com/repos/mpdfmanual.pdf
网页版 https://mpdf.github.io/

安装

官方安装方法是通过composer and its packagist package mpdf/mpdf.

$ composer require mpdf/mpdf

mPDF8中文乱码问题的修复

'autoScriptToLang' => true,
'autoLangToFont' => true,
'useSubstitutions' => true,

示例

$html = <<<EOF
<h3 style="text-align: center;">
    <strong>demo测试</strong>
</h3>
<table>
    <tbody>
        <tr class="firstRow">
            <td width="299" valign="top" style="word-break: break-all;">
                1
            </td>
            <td width="299" valign="top" style="word-break: break-all;">
                2
            </td>
            <td width="299" valign="top" style="word-break: break-all;">
                1
            </td>
            <td width="299" valign="top">
                12
            </td>
        </tr>
        <tr>
            <td width="299" valign="top" style="word-break: break-all;">
                3
            </td>
            <td width="299" valign="top" style="word-break: break-all;">
                1
            </td>
            <td width="299" valign="top" style="word-break: break-all;">
                213
            </td>
            <td width="299" valign="top" style="word-break: break-all;"></td>
        </tr>
    </tbody>
</table>
<p>
    <img src="https://w7file.0cms.vip/images/82/2020/11/BxUV9v9v94E4qVXDqqdB4UX5buxEvK.png" alt="4bc48dd8700da94c923706015368c2d.png" style="max-width: 100%"/>
</p>
<p>
    的空间神佛案件多发卡迪夫安家费哦按实际的发家史的方法论叫阿里打开激发了四道口附近阿拉山口大家法律上的开发啊手动阀手动阀安抚安抚阿斯蒂芬阿斯蒂芬阿斯顿发士大夫阿斯蒂芬阿斯蒂芬阿斯顿阿道夫
</p>
EOF;
        $mpdf = new \Mpdf\Mpdf(['mode'=>'utf-8','format'=>'A4','useSubstitutions'=>true,'useAdobeCJK'=>true,'autoScriptToLang'=>true,'autoLangToFont'=>true,'mgl'=>15,'mgr'=>15,'mgt'=>16,'mgb'=>16,'mgh'=>9,'mgf'=>9, 'orientation'=>'P']);
        $mpdf->WriteHTML($html);
        $mpdf->Output('mpdf.pdf',"D");

最终效果

微信截图_20201118165819.png


Mysql出现的问题_1:表丢失报 is marked as crashed and should be repaired


问题

早上到公司同时说数据库的表丢了,上去一看确实丢了,由于断过一次电,怀疑断电导致的,但是一想想断电出现的问题就不止只丢失一个表的事啊,先看一下日志和同时反馈的问题。
同时直接给我发了这样的一条消息:
Table './we7_71yunduan_to/ims_mc_members' is marked as crashed and should be repaired
那就检查一下这个表具体的问题!

解决方法

mysql> use we7_71yunduan_to
Database changed
mysql> check table ims_mc_members
    -> ;
+---------------------------------+-------+----------+----------------------------------------------------------------+
| Table                           | Op    | Msg_type | Msg_text                                                       |
+---------------------------------+-------+----------+----------------------------------------------------------------+
| we7_71yunduan_to.ims_mc_members | check | warning  | Table is marked as crashed                                     |
| we7_71yunduan_to.ims_mc_members | check | warning  | 1 client is using or hasn't closed the table properly          |
| we7_71yunduan_to.ims_mc_members | check | error    | Found key at page 26624 that points to record outside datafile |
| we7_71yunduan_to.ims_mc_members | check | error    | Corrupt                                                        |
+---------------------------------+-------+----------+----------------------------------------------------------------+
4 rows in set (0.04 sec)

mysql> repair table ims_mc_members
    -> ;
+---------------------------------+--------+----------+----------------------------------------------+
| Table                           | Op     | Msg_type | Msg_text                                     |
+---------------------------------+--------+----------+----------------------------------------------+
| we7_71yunduan_to.ims_mc_members | repair | info     | Wrong bytesec:   0-  0-  0 at 70372; Skipped |
| we7_71yunduan_to.ims_mc_members | repair | warning  | Number of rows changed from 243 to 242       |
| we7_71yunduan_to.ims_mc_members | repair | status   | OK                                           |
+---------------------------------+--------+----------+----------------------------------------------+
3 rows in set (0.11 sec)

mysql> check table ims_mc_members;
+---------------------------------+-------+----------+----------+
| Table                           | Op    | Msg_type | Msg_text |
+---------------------------------+-------+----------+----------+
| we7_71yunduan_to.ims_mc_members | check | status   | OK       |
+---------------------------------+-------+----------+----------+
1 row in set (0.00 sec)

mysql>

在处理过程发现表有两个警告和两个错误:表崩了,表被占着或关的姿势不对。。。。
处理方法就是repair table ims_mc_members
最后再检查一下问题结局