- `计算机知识` 租云服务器, Docker
supimo
计算机知识服务器运维docker
catalog云服务器Docker阿里云重载系统创建用户配置免密登录安装tmux安装DockerDocker命令配置统一镜像docker容器配置云服务器云平台的作用存放docket容器,让运算操作运行在云端获得一个公网IP,让别人可以访问云服务器的分类1,毛坯,即这个服务器是NULL的,然后我们自定义的去配置.比如一些项目框架django,thrift,是使用这种2,现成,比如数据库db,不用我们
- thrift RPC调用性能对比
飞稀饭你的微笑
1.测试环境CPU:IntelE5-26402.50GHz(8cores)内存:16GBCentOS6.5,Go1.4、Gcc4.4.6,开启tcpreuse,tcprecycle;2.测试数据对比如下一、单进程下,长短连接,两个RPC框架和两大语言对比二二.多进程(线程,协程)下,两大RPC框架和两大语言对比总结:1)Thrift框架性能比gRPC框架快两倍以上;2)高并发场景下,使用Thrif
- python利用pyhive 连接hive
Leonban
《Python基础知识》pythonhive大数据
1.下载需求包pipinstallsaslpipinstallthriftpipinstallthrift-saslpipinstallPyHive2.连接hive注意端口默认为10000frompyhiveimporthiveconn=hive.Connection(host='192.168.100.100',port=10000,username='root',database='defau
- python连接hive--Pyhive
Elvis_hui
hivehivepythonsql
Pyhive安装包pipinstallsaslpipinstallthriftpipinstallthrift-saslpipinstallPyHive#安装对应的包sasl可能会报错#下载sasl文件sasl下载执行语句第一种frompyhiveimporthivedefselect_pyhive(sql):#创建hive连接conn=hive.Connection(host='##',port
- Spark-第六周
fightingD&W
Sparkspark大数据分布式
1.sparksql运行流程【Spark精讲】一文讲透SparkSQL执行过程_sparksql执行过程-CSDN博客摸鱼大数据——SparkSQL——SparkSQL的运行机制-CSDN博客2.熟练使用thriftserver服务thriftserver和beeline的使用,代码连接server(连接hive)_thrift连接hive-CSDN博客【八】thriftserver和beelin
- 从零开始基于go-thrift创建一个RPC服务
weixin_30371875
golangphpjson
Thrift是一种被广泛使用的rpc框架,可以比较灵活的定义数据结构和函数输入输出参数,并且可以跨语言调用。为了保证服务接口的统一性和可维护性,我们需要在最开始就制定一系列规范并严格遵守,降低后续维护成本。Thrift开发流程是:先定义IDL,使用thrift工具生成目标语言接口(interface)代码,然后进行开发。官网:http://thrift.apache.org/github:http
- 大规模时序数据存储(三)| 核心功能设计
AIOPstack
作者简介运小尧百度高级研发工程师一、简介基本功能方面,我们的TSDB在数据的收集上提供了HTTP、Thrift等API;对查询,除了提供API之外还提供了命令行工具(CLITool),这些基本功能的设计在不同的TSDB中大同小异,因此本文不再赘述。由于数据规模庞大且出于业务数据隔离和定期清理的需要,我们设计了分库分表功能;为了提升历史数据存储和查询效率,同时节省存储成本,我们又设计了多级降采样功能
- spark CTAS nuion all (union all的个数很多)导致超过spark.driver.maxResultSize配置(2G)
鸿乃江边鸟
背景该sql运行在spark版本3.1.2下的thriftserver下现象在运行包含多个union的sparksql的时候报错(该sql包含了50多个uinon,且每个union字查询中会包含join操作),其中union中子查询sql类似如下:SELECTa1.order_no,a1.need_column,a1.join_idFROMtemp.actul_aa1jointemp.actul_
- 微服务(四)
Jiandong
服务发现这是第四章,这本书是关于用微服务构建应用。第一章介绍了微服务架构模式和讨论了采用微服务的优缺点。第二章和第三章描述了微服务之间通讯的各个方面。本章,我们探索服务发现相关的问题。为什么要用服务发现?让我们想象一下你正在写一些代码通过RESTAPI或ThriftAPI调用一个服务。为了发起一个请求,你的代码需要知道这个服务实例的网络地址(IP地址和端口号)。运行在物理机上的传统应用,服务实例的
- Java原生序列化和Kryo序列化性能比较
编码前线
1.背景最近几年,各种新的高效序列化方式层出不穷,不断刷新序列化性能的上限,最典型的包括:专门针对Java语言的:Kryo,FST等等跨语言的:Protostuff,ProtoBuf,Thrift,Avro,MsgPack等等这些序列化方式的性能多数都显著优于hessian2(。有鉴于此,我们为dubbo引入Kryo和FST这两种高效Java序列化实现,来逐步取代hessian2。其中,Kryo是
- 接口自动化测试,完整入门篇
.咖啡加剁椒
软件测试功能测试软件测试自动化测试程序人生职场和发展
目录1.什么是接口测试2.基本流程3.需求分析4.用例设计5.脚本开发6.结果分析7.完整脚本8.参考资料1.什么是接口测试顾名思义,接口测试是对系统或组件之间的接口进行测试,主要是校验数据的交换,传递和控制管理过程,以及相互逻辑依赖关系。其中接口协议分为HTTP,WebService,Dubbo,Thrift,Socket等类型,测试类型又主要分为功能测试,性能测试,稳定性测试,安全性测试等。在
- Spark 使用之操作Hudi表
AlienPaul
HudiSpark使用本篇为大家带来通过Sparkshell和SparkSQL操作Hudi表的方式。Hudi表还可以通过SparkThriftServer操作,参见通过Sparkthriftserver操作Hudi表。Hudi编译我们使用如下软件环境:Scala2.12Flink1.15Spark3.3Hudi0.13.1Hudi编译的时候会遇到依赖下载缓慢的情况。需要换用国内源。修改settin
- rpc协议中,字段值类型改变的思考
赤子心_d709
背景今天遇到了一个场景,下游强行把某个字段的类型给改了(字段顺序没有变),上线的过程中上下游都没有出错,和我预想的不一样,我认为上游反序列化解析的时候会出错python语言,thrift协议当然这样的做法不推荐,这里只说明一下上游没有报错的原因代码框架上:用的是thrift,当然是公司封装了一层,对于我rpcclient,也就是上游,影响的代码如下eliffid==11:ifftype==TTyp
- c# 访问hbase_【C#】透过Thrift操作HBase系列
weixin_39946500
c#访问hbase
题外话:C#调用Java的几种方法1.将Java端的接口通过WebService方式发布,C#可以方便的调用2.先使用C++通过JNI调用Java,C#调用C++的接口3.使用开源的库直接使用C#调用Java,详细信息请点击4.使用IKVM实现C#调用Java,参考:http://www.ikvm.net/之所以说这些,是因为自己这边客户端要调用HBase接口(Java实现),刚开始我是使用WS方
- thrift协议抓包解析(tcpdump+wireshark or thrift-tool)
struggle6688
常用技术
目前thrift使用较多,所以我们可能会遇到线上查case或者想拉取一些具体请求的场景,这种需求下如果没有提前打日志就只能通过抓包来分析了。一、tcpdump+wireshark抓包第一反应就是通过tcpdump命令来抓取,其中比较常用的命令就是sudotcpdump-iany-Xvvdstport11311andtcp这种情况下的包通常都是二进制的格式,通过-Xvv也就能展现成这个样子:当然我们
- Wireshark不显示Thrift协议
cuijiecheng2018
网络/服务器wireshark网络
使用Wireshark对thrift协议进行抓包,但是只显示了传输层的tcp协议:"右键"->"DecodeAs"选择thrift的tcp端口将“当前”修改为Thrift,然后点击“确定”设置后,可以发现Wireshark里面显示的协议从Tcp变为Thrift了参考:《thrift协议抓包解析(tcpdump+wiresharkorthrift-tool)》《pinterest/thrift-to
- springboot hikari jooq mongodb thrift 相关配置
Helen_Cat
image.png之前使用的数据库连接池是ali的Druid,不过springboot默认是使用Hikari作为数据库连接池的,听说要比Druid更优秀一些。正常我们使用Druid和spring的jdbcTemplate一起操作,不过JDBCTemplate好像不是纯面向对象的数据库操作,拼写sql,总是感觉弱弱的,也容易出错还有就是mybatis,这个吧,要为每个sqltemplate都要配置一
- 5年经验之谈:2年功能测试、3年自动化测试,从入门到不可自拔...
豆子熊
毕业3年了,学的是环境工程专业,毕业后零基础转行做软件测试。已近从事测试行业8年了,自己也从事过2年的手工测试,从事期间越来越觉得如果一直在手工测试的道路上前进,并不会有很大的发展,所以通过自己的努力,早几年已经成功的转入自动化测试的方向,又过去了这么久,现在就职于美团测试开发框架组,搭建过美团platuo测试框架,thrift测试框架,自动化测试平台,熟悉python3,java,vue,在多家
- 数据格式--二进制格式
MontyOak
Thrift与ProtocolBuffers在大量调用或者需要传输大量数据的时候,数据编码之后的体积大小就是一个尤为关键的因素。ApacheThrift和ProtocolBuffers(protobuf)就是业界最为知名的两种二进制编码格式。其中前者由Facebook发起并贡献给了Apache作为开源项目,后者则有Google发起并开源。两者格式有很多相似之处,一般都是作为接口定义语言(IDL)配
- Kuberntes DNS
zhixingheyi_tian
DNSkubernetes
查找服务端点#kubectlgetendpointsNAMEENDPOINTSAGEdocker-registry172.17.0.10:500019dkubernetes10.0.2.41:844319drouter10.0.2.41:1936,10.0.2.41:80,10.0.2.41:44319dsparkthrift-headless172.17.0.12:18887dWhenyouar
- 使用Dubbo实现微服务之间的高效通信
程序吟游
分布式微服务dubbo
目录一、RPC与Dubbo二、Springboot整合Dubbo服务端实现消费端实现一、RPC与DubboRPC(RemoteProcedureCall)是指远程过程调用。常见的RPC框架有Dubbo(Alibaba)、gRPC(Google)、Thrift(Facebook)。其中Dubbo是一款JavaRPC框架,致力于提供高性能的RPC远程服务调用方案。以帮助开发人员快速构建高效的分布式系统
- 使用haproxy做impala的负载均衡
要树立远大的理想
Impala负载均衡impalahaproxy
1.IMPALA组件概述Impala组件包含3个子模块(ImpalaCatalogServer、ImpalaStateStore、ImpalaDaemon),如图所示:其中ImpalaCatalogServer与ImpalaStateStore是无数据、无状态的模块,没有高可用的需求更不需要做负载均衡;ImpalaDaemon模块的每一个节点都可以提供jdbc和thrift服务(作为coordin
- HBase实践篇 _ 为HBase的ThriftAPI设计连接池
大猿小猿向前冲
[toc]1.摘要客户端连接HBase,常用的方式主要有两种,直连Zookeeper和连接HBaseThriftServer。第一种是Java中常用的方式,官方在hbase-client包里提供了丰富的API,另一种是HBase的thriftapi,主要在跨语言环境中使用。我们线上大部分的业务是由happybase封装的PythonAPI来提供数据的读写服务,小部分业务则是用Java语言,例如:F
- (四)hive的搭建2
调试大师
大数据Hadoophivehadoop数据仓库
在(三)hive的搭建1中我们搭建好了hive环境,但是只能本地访问,在本节中配置Hive的访问方式。1.元数据服务的方式1.1编辑hive-site.xmlsudovihive-site.xml在文件最后增加以下内容hive.metastore.uristhrift://hadoop-master:90831.2启动metastore执行命令hive–servicemetastore(此命令启动
- DNS 代理?Pipy:这我也可以
dotNET跨平台
Pipy是个可编程代理,曾经我们做过TCP/HTTP代理、MQTT代理、Dubbo代理、Redis代理、Thrift代理。前几天有人问DNS[1]的代理能不能做?当然可以,而且DNS代理已经应用在跨集群流量调度中,文末经对此进行简单地介绍。阅读本文将了解到:•DNS的基本介绍以及DNS的处理流程•使用编码实现一个DNS代理•在代理中增加智能线路解析功能DNS介绍DNS(DomainNameSyst
- Java在网络通信中应该如何选择合适的序列化框架?
coffee_babe
Netty网络IOjava开发语言序列化
前言说到网络通信就会牵涉到数据的序列化与反序列化,现如今序列化框架也是层出不穷,比如FST、Kryo、ProtoBuffer、Thrift、Hessian、Avro、MsgPack等等,有的人可能会有疑问,为什么市面上有这么多框架,JDK不是已经有自带的Serializable序列化接口吗?很遗憾地说出这个事实,作为JDK自带地序列化机制,无论是在时间还是空间上的性能不尽人意,但凡时间或者空间上性
- dubbo--03--- dubbo 支持的9种协议
知行合一。。。
dubbo
提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档文章目录Dubbo框架特性Dubbo和SpringCloud区别dubbo支持的9种协议协议类型1、dubbo协议(==默认==)特性配置常见问题2、rmi协议3、hessian协议4、http协议特性5、webservice协议6、thrift协议![在这里插入图片描述](https://img-blog.csdnimg.cn/di
- 语法分析器的生成器——Bison
跟 屁 虫
RPC框架
文章目录前言概述Bison的语法初步深入语法树一、导言二、递归的一些思想高级yylval:union有歧义的文法前言做个编译器:https://coolshell.cn/articles/1547.htmlhttps://www.ctolib.com/docs/sfile/diy-c-compiler/1.htmlBNF&递归thrift的complier采用bison语法分析生成器来生成语法分析
- Dubbo 协议
holmes000
Dubbo是Alibaba开源的分布式服务框架远程调用框架,在网络间传输数据,就需要通信协议和序列化。一通信协议Dubbo支持dubbo、rmi、hessian、http、webservice、thrift、redis等多种协议,但是Dubbo官网是推荐我们使用Dubbo协议的,默认也是用的dubbo协议。先介绍几种常见的协议:1.dubbo协议缺省协议,使用基于mina1.1.7+hessian
- Spark Thrift Server 架构和原理介绍
疯狂的哈丘
也可以看我CSDN的博客:https://blog.csdn.net/u013332124/article/details/90339850一、SparkThriftServer介绍SparkThriftServer是Spark社区基于HiveServer2实现的一个Thrift服务。旨在无缝兼容HiveServer2。因为SparkThriftServer的接口和协议都和HiveServer2完
- HQL之投影查询
归来朝歌
HQLHibernate查询语句投影查询
在HQL查询中,常常面临这样一个场景,对于多表查询,是要将一个表的对象查出来还是要只需要每个表中的几个字段,最后放在一起显示?
针对上面的场景,如果需要将一个对象查出来:
HQL语句写“from 对象”即可
Session session = HibernateUtil.openSession();
- Spring整合redis
bylijinnan
redis
pom.xml
<dependencies>
<!-- Spring Data - Redis Library -->
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redi
- org.hibernate.NonUniqueResultException: query did not return a unique result: 2
0624chenhong
Hibernate
参考:http://blog.csdn.net/qingfeilee/article/details/7052736
org.hibernate.NonUniqueResultException: query did not return a unique result: 2
在项目中出现了org.hiber
- android动画效果
不懂事的小屁孩
android动画
前几天弄alertdialog和popupwindow的时候,用到了android的动画效果,今天专门研究了一下关于android的动画效果,列出来,方便以后使用。
Android 平台提供了两类动画。 一类是Tween动画,就是对场景里的对象不断的进行图像变化来产生动画效果(旋转、平移、放缩和渐变)。
第二类就是 Frame动画,即顺序的播放事先做好的图像,与gif图片原理类似。
- js delete 删除机理以及它的内存泄露问题的解决方案
换个号韩国红果果
JavaScript
delete删除属性时只是解除了属性与对象的绑定,故当属性值为一个对象时,删除时会造成内存泄露 (其实还未删除)
举例:
var person={name:{firstname:'bob'}}
var p=person.name
delete person.name
p.firstname -->'bob'
// 依然可以访问p.firstname,存在内存泄露
- Oracle将零干预分析加入网络即服务计划
蓝儿唯美
oracle
由Oracle通信技术部门主导的演示项目并没有在本月较早前法国南斯举行的行业集团TM论坛大会中获得嘉奖。但是,Oracle通信官员解雇致力于打造一个支持零干预分配和编制功能的网络即服务(NaaS)平台,帮助企业以更灵活和更适合云的方式实现通信服务提供商(CSP)的连接产品。这个Oracle主导的项目属于TM Forum Live!活动上展示的Catalyst计划的19个项目之一。Catalyst计
- spring学习——springmvc(二)
a-john
springMVC
Spring MVC提供了非常方便的文件上传功能。
1,配置Spring支持文件上传:
DispatcherServlet本身并不知道如何处理multipart的表单数据,需要一个multipart解析器把POST请求的multipart数据中抽取出来,这样DispatcherServlet就能将其传递给我们的控制器了。为了在Spring中注册multipart解析器,需要声明一个实现了Mul
- POJ-2828-Buy Tickets
aijuans
ACM_POJ
POJ-2828-Buy Tickets
http://poj.org/problem?id=2828
线段树,逆序插入
#include<iostream>#include<cstdio>#include<cstring>#include<cstdlib>using namespace std;#define N 200010struct
- Java Ant build.xml详解
asia007
build.xml
1,什么是antant是构建工具2,什么是构建概念到处可查到,形象来说,你要把代码从某个地方拿来,编译,再拷贝到某个地方去等等操作,当然不仅与此,但是主要用来干这个3,ant的好处跨平台 --因为ant是使用java实现的,所以它跨平台使用简单--与ant的兄弟make比起来语法清晰--同样是和make相比功能强大--ant能做的事情很多,可能你用了很久,你仍然不知道它能有
- android按钮监听器的四种技术
百合不是茶
androidxml配置监听器实现接口
android开发中经常会用到各种各样的监听器,android监听器的写法与java又有不同的地方;
1,activity中使用内部类实现接口 ,创建内部类实例 使用add方法 与java类似
创建监听器的实例
myLis lis = new myLis();
使用add方法给按钮添加监听器
- 软件架构师不等同于资深程序员
bijian1013
程序员架构师架构设计
本文的作者Armel Nene是ETAPIX Global公司的首席架构师,他居住在伦敦,他参与过的开源项目包括 Apache Lucene,,Apache Nutch, Liferay 和 Pentaho等。
如今很多的公司
- TeamForge Wiki Syntax & CollabNet User Information Center
sunjing
TeamForgeHow doAttachementAnchorWiki Syntax
the CollabNet user information center http://help.collab.net/
How do I create a new Wiki page?
A CollabNet TeamForge project can have any number of Wiki pages. All Wiki pages are linked, and
- 【Redis四】Redis数据类型
bit1129
redis
概述
Redis是一个高性能的数据结构服务器,称之为数据结构服务器的原因是,它提供了丰富的数据类型以满足不同的应用场景,本文对Redis的数据类型以及对这些类型可能的操作进行总结。
Redis常用的数据类型包括string、set、list、hash以及sorted set.Redis本身是K/V系统,这里的数据类型指的是value的类型,而不是key的类型,key的类型只有一种即string
- SSH2整合-附源码
白糖_
eclipsespringtomcatHibernateGoogle
今天用eclipse终于整合出了struts2+hibernate+spring框架。
我创建的是tomcat项目,需要有tomcat插件。导入项目以后,鼠标右键选择属性,然后再找到“tomcat”项,勾选一下“Is a tomcat project”即可。具体方法见源码里的jsp图片,sql也在源码里。
补充1:项目中部分jar包不是最新版的,可能导
- [转]开源项目代码的学习方法
braveCS
学习方法
转自:
http://blog.sina.com.cn/s/blog_693458530100lk5m.html
http://www.cnblogs.com/west-link/archive/2011/06/07/2074466.html
1)阅读features。以此来搞清楚该项目有哪些特性2)思考。想想如果自己来做有这些features的项目该如何构架3)下载并安装d
- 编程之美-子数组的最大和(二维)
bylijinnan
编程之美
package beautyOfCoding;
import java.util.Arrays;
import java.util.Random;
public class MaxSubArraySum2 {
/**
* 编程之美 子数组之和的最大值(二维)
*/
private static final int ROW = 5;
private stat
- 读书笔记-3
chengxuyuancsdn
jquery笔记resultMap配置ibatis一对多配置
1、resultMap配置
2、ibatis一对多配置
3、jquery笔记
1、resultMap配置
当<select resultMap="topic_data">
<resultMap id="topic_data">必须一一对应。
(1)<resultMap class="tblTopic&q
- [物理与天文]物理学新进展
comsci
如果我们必须获得某种地球上没有的矿石,才能够进行某些能量输出装置的设计和建造,而要获得这种矿石,又必须首先进行深空探测,而要进行深空探测,又必须获得这种能量输出装置,这个矛盾的循环,会导致地球联盟在与宇宙文明建立关系的时候,陷入困境
怎么办呢?
 
- Oracle 11g新特性:Automatic Diagnostic Repository
daizj
oracleADR
Oracle Database 11g的FDI(Fault Diagnosability Infrastructure)是自动化诊断方面的又一增强。
FDI的一个关键组件是自动诊断库(Automatic Diagnostic Repository-ADR)。
在oracle 11g中,alert文件的信息是以xml的文件格式存在的,另外提供了普通文本格式的alert文件。
这两份log文
- 简单排序:选择排序
dieslrae
选择排序
public void selectSort(int[] array){
int select;
for(int i=0;i<array.length;i++){
select = i;
for(int k=i+1;k<array.leng
- C语言学习六指针的经典程序,互换两个数字
dcj3sjt126com
c
示例程序,swap_1和swap_2都是错误的,推理从1开始推到2,2没完成,推到3就完成了
# include <stdio.h>
void swap_1(int, int);
void swap_2(int *, int *);
void swap_3(int *, int *);
int main(void)
{
int a = 3;
int b =
- php 5.4中php-fpm 的重启、终止操作命令
dcj3sjt126com
PHP
php 5.4中php-fpm 的重启、终止操作命令:
查看php运行目录命令:which php/usr/bin/php
查看php-fpm进程数:ps aux | grep -c php-fpm
查看运行内存/usr/bin/php -i|grep mem
重启php-fpm/etc/init.d/php-fpm restart
在phpinfo()输出内容可以看到php
- 线程同步工具类
shuizhaosi888
同步工具类
同步工具类包括信号量(Semaphore)、栅栏(barrier)、闭锁(CountDownLatch)
闭锁(CountDownLatch)
public class RunMain {
public long timeTasks(int nThreads, final Runnable task) throws InterruptedException {
fin
- bleeding edge是什么意思
haojinghua
DI
不止一次,看到很多讲技术的文章里面出现过这个词语。今天终于弄懂了——通过朋友给的浏览软件,上了wiki。
我再一次感到,没有辞典能像WiKi一样,给出这样体贴人心、一清二楚的解释了。为了表达我对WiKi的喜爱,只好在此一一中英对照,给大家上次课。
In computer science, bleeding edge is a term that
- c中实现utf8和gbk的互转
jimmee
ciconvutf8&gbk编码
#include <iconv.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <sys/stat.h>
int code_c
- 大型分布式网站架构设计与实践
lilin530
应用服务器搜索引擎
1.大型网站软件系统的特点?
a.高并发,大流量。
b.高可用。
c.海量数据。
d.用户分布广泛,网络情况复杂。
e.安全环境恶劣。
f.需求快速变更,发布频繁。
g.渐进式发展。
2.大型网站架构演化发展历程?
a.初始阶段的网站架构。
应用程序,数据库,文件等所有的资源都在一台服务器上。
b.应用服务器和数据服务器分离。
c.使用缓存改善网站性能。
d.使用应用
- 在代码中获取Android theme中的attr属性值
OliveExcel
androidtheme
Android的Theme是由各种attr组合而成, 每个attr对应了这个属性的一个引用, 这个引用又可以是各种东西.
在某些情况下, 我们需要获取非自定义的主题下某个属性的内容 (比如拿到系统默认的配色colorAccent), 操作方式举例一则:
int defaultColor = 0xFF000000;
int[] attrsArray = { andorid.r.
- 基于Zookeeper的分布式共享锁
roadrunners
zookeeper分布式共享锁
首先,说说我们的场景,订单服务是做成集群的,当两个以上结点同时收到一个相同订单的创建指令,这时并发就产生了,系统就会重复创建订单。等等......场景。这时,分布式共享锁就闪亮登场了。
共享锁在同一个进程中是很容易实现的,但在跨进程或者在不同Server之间就不好实现了。Zookeeper就很容易实现。具体的实现原理官网和其它网站也有翻译,这里就不在赘述了。
官
- 两个容易被忽略的MySQL知识
tomcat_oracle
mysql
1、varchar(5)可以存储多少个汉字,多少个字母数字? 相信有好多人应该跟我一样,对这个已经很熟悉了,根据经验我们能很快的做出决定,比如说用varchar(200)去存储url等等,但是,即使你用了很多次也很熟悉了,也有可能对上面的问题做出错误的回答。 这个问题我查了好多资料,有的人说是可以存储5个字符,2.5个汉字(每个汉字占用两个字节的话),有的人说这个要区分版本,5.0
- zoj 3827 Information Entropy(水题)
阿尔萨斯
format
题目链接:zoj 3827 Information Entropy
题目大意:三种底,计算和。
解题思路:调用库函数就可以直接算了,不过要注意Pi = 0的时候,不过它题目里居然也讲了。。。limp→0+plogb(p)=0,因为p是logp的高阶。
#include <cstdio>
#include <cstring>
#include <cmath&