padding

[Flutter] Style a message chat style-ish bubble

别等时光非礼了梦想. 提交于 2019-12-04 14:43:40
const kOtherBubblePointer = BorderRadius.only( topRight: Radius.circular(30), bottomLeft: Radius.circular(30), bottomRight: Radius.circular(30), ); const kMeBubblePointer = BorderRadius.only( topLeft: Radius.circular(30), bottomLeft: Radius.circular(30), bottomRight: Radius.circular(30), ); class MessageBubble extends StatelessWidget { MessageBubble({this.sender, this.text, this.isMe}); final String text; final String sender; final bool isMe; @override Widget build(BuildContext context) { return Padding( padding: EdgeInsets.all(10.0), child: Column( crossAxisAlignment: isMe ?

C# Socket通信DEMO

℡╲_俬逩灬. 提交于 2019-12-04 13:49:01
一、套接字(socket)概念 套接字(socket)是通信的基石,是支持TCP/IP协议的网络通信的基本操作单元。它是网络通信过程中端点的抽象表示,包含进行网络通信必须的五种信息:连接使用的协议,本地主机的IP地址,本地进程的协议端口,远地主机的IP地址,远地进程的协议端口。   应用层通过传输层进行数据通信时,TCP会遇到同时为多个应用程序进程提供并发服务的问题。多个TCP连接或多个应用程序进程可能需要通过同一个 TCP协议端口传输数据。为了区别不同的应用程序进程和连接,许多计算机操作系统为应用程序与TCP/IP协议交互提供了套接字(Socket)接口。应 用层可以和传输层通过Socket接口,区分来自不同应用程序进程或网络连接的通信,实现数据传输的并发服务。 二、建立socket连接 建立Socket连接至少需要一对套接字,其中一个运行于客户端,称为ClientSocket ,另一个运行于服务器端,称为ServerSocket 。   套接字之间的连接过程分为三个步骤: 服务器监听,客户端请求,连接确认。 服务器监听:服务器端套接字并不定位具体的客户端套接字,而是处于等待连接的状态,实时监控网络状态,等待客户端的连接请求 客户端请求:指客户端的套接字提出连接请求,要连接的目标是服务器端的套接字。为此,客户端的套接字必须首先描述它要连接的服务器的套接字

博客园定制皮肤

ⅰ亾dé卋堺 提交于 2019-12-04 13:16:54
页面定制 css 代码 .day {width: auto;} html {font-size:62.5%;} body {font-family: "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;} #main{max-width: 1090px;width:100%;} #mainContent {width:76%;} #mainContent .forFlow {width:100%;} #topics {width:100%;} .postBody {width:100%;} #sideBar {width:20%;}} #mainContent .day {width: 100%;} #mainContent .dayTitle {width:100%;} #mainContent .postTitle {width:100%;} #mainContent .postCon {width:100%;} #mainContent .postDesc {width:100%;} @media (max-width: 767px) { #nav_next_page a{float: left;margin-top:

11.14 CSS样式

点点圈 提交于 2019-12-04 12:16:52
1.设置标签样式 给标签设置长宽:只有块级标签可以设置长宽,行内标签设置了没作用(仅仅只取决于内部文本值) <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> div{ width: 300px; height:200px; background-color: aqua; } span{ width: 60px; height:80px; background-color: orange; } </style> </head> <body> <div>div</div> <span>span</span> </body> </html> 2.字体颜色 color后面可以跟多种颜色数据 ​ 颜色英文 pink ​ #06a0de 直接用pycharm提供的取色器即可 ​ rgb(1,1,2) 可以利用截图软件获取三基色数字 ​ rgba(0,128,128,0.9) 最后一个数字只能用来调节颜色的透明度 <head> <meta charset="UTF-8"> <title>Title</title> <style> p{ font-family: "Microsoft New Tai Lue","新宋体","Arial",sans-serif;

day44 css

梦想与她 提交于 2019-12-04 12:12:30
css样式操作 给标签设置长宽 只有块级标签才可以设置长宽,行内标签设置了没有任何作用(仅仅只取决于内部文本值) <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <style> div { width: 200px; height: 400px; } span { width: 50px; height: 50px; } </style> </head> <body> <div> div </div> <span>span</span> </body> </html> 字体属性 font-family: 字体类型 font-size: 字体大小 font-weight: 字体粗细 值|描述 :-:|:-: normal|默认值,标准粗细 bold|粗体 bolder|更粗 lighter|更细(***************) 100~900|设置具体粗细,400等同于normal,而700等同于bold inherit|继承父元素字体的粗细值 color: 字体颜色 颜色英文 red 06a0de 直接用python提供的取色器即可 rgb(1,1,1) 可以利用截图软件获取三基色数字 rgba(128,128,128,0.6) 最后一个数字

手机网页,div内滚动条,以及div内部滚动条拉到底部之后触发事件

折月煮酒 提交于 2019-12-04 12:07:13
var gao = document.documentElement.clientHeight; var headHeight = parseInt($('.yhead').css('height')) $('.ybody').css('height', gao - headHeight + 'px') //前端分页 $(".yright").scroll(function(){ var scrollHeight = document.querySelector(".yright").scrollHeight; // 没用滚动条的情况下,元素内容的总高度 var scrollTop = document.querySelector(".yright").scrollTop; console.log(gao,scrollHeight,scrollTop) if((scrollTop + gao - scrollHeight) == headHeight){ $('.fenye').click() } console.log("没到底: ", ); })     div布局就不用讲了,主要是滚动条事件这一块是真晕,上网查资料查到的情况,用了一下真的可以,真是太高兴了 以后有时间了在好好研究研究,暂时就先这样,另附几个查阅的资料: javascript、jquery获取网页的高度和宽度

What would you use to zero pad a number in Flex/AS3?

大兔子大兔子 提交于 2019-12-04 11:09:56
问题 Duplicate of this one. What would you use to pad zeroes to the left of a number in Flex/AS3? Is there an equivalent to printf or NumberFormat that does this? I'm looking for the nicest implementation of this or something similar: public function zeroPad(number:int, width:int):String { // number = 46, width = 4 would return "0046" } 回答1: public function zeroPad(number:int, width:int):String { var ret:String = ""+number; while( ret.length < width ) ret="0" + ret; return ret; } 回答2: Performance

How can I get rid of horizontal padding or indent in html5 search inputs in webkit on mac?

风流意气都作罢 提交于 2019-12-04 10:53:25
In webkit on mac only, the text in a search input is indented from the left side. Here's a demo . Even after stripping all padding, text-indent, and setting -webkit-appearance to textfield or none , the text is still indented. It looks to be around 10px or so, but the inspector doesn't show any CSS rules (even browser defaults) that seem to apply this style. Any ideas? <input type="search" value="Search"> -webkit-appearance: textfield; border: 1px solid #ccc; padding: 0; margin: 0; text-indent: 0; This is how you really reset the default styling in WebKit: input[type="search"] { -webkit

Cocoa autolayout constraint - programmatic padding of variable number of views

陌路散爱 提交于 2019-12-04 10:35:46
I want to be able to add new views to a superview but so that they keep a constant vertical distance between each other. For that I tried to programmatically set up a constraint for each view but I could not figure out how to do it. The problem is I do not know beforehand the number or the relative position of the views. Is there a way to programmaically set up a constraint for each view so that regardless of whatever other views they neighbor, autolayout will keep the constant spacing between the views? Possible this short code snippet is what you are looking for: NSMutableArray*

Node.js crypto key and iv to match java SecretKeySpec / IvParameterSpec

孤街醉人 提交于 2019-12-04 09:40:03
问题 I'm trying to to port a Java (simple) encryption algorythm to Node JS. I will need to be able to decrypt/encrypt stuff encrypted/decrypted from the Java side. I'm stuck at the very beginning, the initialization of the cipher. In Java, I get the key with SecretKeySpec , and the Initialization Vector with IvParameterSpec : public CryptStuff(String password) throws zillion_exceptions { if (password==null) throw new InvalidKeyException("No encryption password is set!"); key = new SecretKeySpec