1. 效果 2. Html <div id="main_app_content" class="container"> <div class="long-text-test1"> 好长 </div> <div class="long-text-test1"> 好长好长好长好长好长好长好长好长好长 </div> <div class="long-text…
一.    一般情况下,HTML字符串过长时都会将超过的部分隐藏点,方法如下: 设置CSS: .ellipsis-type{ max-width: 50px;                      //显示宽度white-space: nowrap;                //文本不换行.overflow: hidden;                       //超过部分隐藏 text-overflow: ellipsis;                //超过部分用...…
上代码: package tk.mybatis.plugin; import org.apache.ibatis.executor.ErrorContext; import org.apache.ibatis.executor.parameter.ParameterHandler; import org.apache.ibatis.mapping.BoundSql; import org.apache.ibatis.mapping.MappedStatement; import org.apac…
Visual studio 创建文件时自动添加备注 描述 要求每回添加一个类,普通类或单元测试类文件头自动添加备注, 比如:Copyright, FileName, Author and so on. 普通类文件 操作步骤: 1. 找出Class.cs, 存放位置:C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ItemTemplates\CSharp\Code\1033\Class. 2. 编辑Class.cs文件…
如果你每篇文章或页面都需要插入同一个自定义字段和值,可以考虑在WordPress发布文章/页面时,自动添加默认的自定义字段.将下面的代码添加到当前主题的 functions.php 即可: 1 2 3 4 5 6 7 8 9 10 11 12 /** * WordPress发布文章/页面时自动添加默认的自定义字段 * https://www.wpdaxue.com/add-custom-field-automatically-post-page-publish.html */ add_actio…
CSS控制文本超出指定宽度后用省略号代替,CSS控制文本不换行. 一般的文字截断(适用于内联与块): .text-overflow {     display:block;/*内联对象需加*/     width:31em;     word-break:keep-all;/* 不换行 */     white-space:nowrap;/* 不换行 */     overflow:hidden;/* 内容超出宽度时隐藏超出部分的内容 */     text-overflow:ellipsis;…
css: .clearfloat:after{display:block;clear:both;content:"";visibility:hidden;} .clearfloat{} 布局: <div class="div1 clearfloat"> <div class="left">Left</div> <div class="right">Right</div>…
在linux系统 vim md5data  # 打开文件 写入 abc 保存 md5sum md5Data  的计算值和openssl代码计算值不一样 原因在于linux文本文件末尾自动添加了换行 解决方法: 1. 重新vim打开 set binary 然后 :wq 保存 可以看到暂用3字节 之前是4个字节大小 2.用sublime 文本编译器 编写 备注: openssl  MD5代码 MD5_CTX md5Ctx; string data = "abc"; unsigned cha…
位置:File->settings->Editor->File and Code Templates->Python Script 添加以下代码: #!/usr/bin/env python# -*- coding: utf-8 -*-# @Time    : ${DATE} ${TIME}# @Author  : zejin# @File    : ${NAME}.py 如下图所示 再建一个py文件时就会自动添加信息: #!/usr/bin/env python# -*- cod…
先下载插件:  Vueter 打开设置的配置文件,写入一下代码: // //是否需要保存时自动格式化 "editor.formatOnSave": true, //使js 文件保存是不自动添加分号 "prettier.singleQuote": true, "prettier.semi": false, //使vue 文件自动保存时不自动添加分号 "vetur.format.defaultFormatterOptions":…