汇成软件 Create the world!!!

webpack全局安装了,使用命令时却提示安装脚手架

全局安装了webpack ,使用webpack的时候,却有如下的提示


One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:
 - webpack-cli (https://github.com/webpack/webpack-cli)
   The original webpack full-featured CLI.
We will use "npm" to install the CLI via "npm install -D".
Do you want to install 'webpack-cli' (yes/no): n
You need to install 'webpack-cli' to use webpack via CLI.
You can also install the CLI manually.
作者:admin 分类:前端技术 浏览:755 评论:0

正则获取图片

"hiRes":"(?<content>[\s\S]*?)SL1500_.jpg","thumb"

方法来自:https://blog.csdn.net/sflsgfs/article/details/51298651

作者:admin 分类:火车头 浏览:416 评论:0

php过滤emod与特殊字符

<?php 
function xml_entities($string) {
//过滤emod
$ts_zifu= json_encode($string);
$str = json_decode(preg_replace("#(\\\ud[0-9a-f]{3})#i", "", $ts_zifu));
//过滤特殊字符
$text=preg_replace("/[[:punct:]\s]/",' ',$str);
$text=urlencode($text);
$text=preg_replace("/(%7E|%60|%21|%40|%23|%24|%25|%5E|%26|%27|%2A|%28|%29|%2B|%7C|%5C|%3D|\-|_|%5B|%5D|%7D|%7B|%3B|%22|%3A|%3F|%3E|%3C|%2C|\.|%2F|%A3%BF|%A1%B7|%A1%B6|%A1%A2|%A1%A3|%A3%AC|%7D|%A1%B0|%A3%BA|%A3%BB|%A1%AE|%A1%AF|%A1%B1|%A3%FC|%A3%BD|%A1%AA|%A3%A9|%A3%A8|%A1%AD|%A3%A4|%A1%A4|%A3%A1|%E3%80%82|%EF%BC%81|%EF%BC%8C|%EF%BC%9B|%EF%BC%9F|%EF%BC%9A|%E3%80%81|%E2%80%A6%E2%80%A6|%E2%80%9D|%E2%80%9C|%E2%80%98|%E2%80%99|%EF%BD%9E|%EF%BC%8E|%EF%BC%88)+/",' ',$text);
$str=urldecode($text);
//过滤指定的空格与字符
  return   strtr(
        $str, 
        array(
            "<" => "",
            ">" => "",
            '"' => "",
            "'" => "",
            "&" => "",
            "|" => "",
            "-" => "",
            "–" => "",
            ":" => "",
            "Ⅱ" => "2",
            "”" => "",
            "】" => "",
            "【" => "",
            "%" => "",
            "(" => "",
            ")" => "",
            ";" => "",  
            "  " => "",      
        )
    );

}

$string="I love you>>><<,?❤?????‍??????✔?‍??‍???‍?;asdfasdfasdf;";
echo xml_entities($string) ;
 ?>
作者:admin 分类:php 浏览:1434 评论:0

mysql的自动补齐

  1. 设置my.cnf : auto-rehash

  2. mysql>use  mysql; #这是关键

作者:admin 分类:mysql 浏览:823 评论:0

mysql远程操作命令

mysql -h  ***.***.***.***  -P 3306 -u root -p

mysqldump -h  ***.***.***.***  -P 3306 -u root -p

作者:admin 分类:mysql 浏览:569 评论:0

Centos 挂载云盘

查找

fdisk -l


格式化

mkfs.ext4 /dev/vdb


手动挂载

mount /dev/vdb /data

 mount -a


全自动挂载

vi /etc/fstab


/dev/vdb  /bdisk ext4 defaults 0 0

作者:admin 分类:Linux 浏览:451 评论:0

win10 hyper-v 虚拟机ping不通宿主机问题

在Windows10  Hyper-V 中安装 Linux (Centos6.9)虚拟机无法 ping 通宿主机


这种情况下关闭 Windows 防火墙就能ping通了,当然关闭防火墙不安全。所以需要  做以下步骤:


控制面板-》系统和安全-》Windows防火墙-》高级设置-》入站规则    启用下图被红框选中的两个选项即可。

fires.png

作者:admin 分类:Linux 浏览:1300 评论:0

分享与定时自动跳转

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>My test</title>
</head>
<body>
	       <script src="js/jquery.min.js"></script> 
<div id="txt"></div>
         <a href="https://www.163.com"><span>ppp</span></a>
	       <div id="xs_my">
<div id="fb-root"></div>
 



<div class="fb-share-button" data-href="https://www.eobdmall.com/product_content.php?product_id=1015" data-layout="button_count" data-size="large"><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https://www.eobdmall.com/product_content.php?product_id=1015;src=sdkpreparse" class="fb-xfbml-parse-ignore">分享</a></div>
</div>
<script type="text/javascript">
$(".fb-share-button").click(function(event) {

       setTimeout(function() {
        $("#xs_my").html('<button type="button" onclick="timedText()">see my </button>') 
    }, 5000);
  
});


function timedText(){
  var x=document.getElementById('txt');
  var t1=setTimeout(function(){$("#txt").html("2 秒")},2000);
  var t2=setTimeout(function(){$("#txt").html("4 秒")},4000);
  var t3=setTimeout(function(){$("span").click()},6000);
}

</script>

</body>
</html>


<a href="https://www.facebook.com/sharer/sharer.php?u=example.org" target="_blank">
  Share on Facebook
</a>


<script type="text/javascript">
 // $(document).ready(function() {
 //     setTimeout(function() {
 //  $("span").click();
 //    }, 1000);
  
 
 // });
 
</script>
作者:admin 分类:前端技术 浏览:564 评论:0