热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

tensorflowtfserving进行warmup设置

最近发现模型在更新的一瞬间容易产生超时的问题,于是就了解了一下tf-serving中有个warmup主要是通过模型启动时加载${model}${version}ass

最近发现模型在更新的一瞬间容易产生超时的问题,于是就了解了一下 tf-serving 中有个warmup主要是通过模型启动时加载${model}/${version}/assets.extra/tf_serving_warmup_requests达到热启动的目的,使得模型更新时不易产生超时的问题

首先根据自己的模型字段进行编写形成tf_serving_warmup_requests文件,server就是tf-serving的机器加端口号,,在导出模型时和warmup文件一起导出

以下是我warmup文件生成代码

#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author: supeihuang
# Time: 2019/9/5 9:33import numpy
import tensorflow as tf
from tensorflow_serving.apis import model_pb2
from tensorflow_serving.apis import predict_pb2
from tensorflow_serving.apis import prediction_log_pb2
from tensorflow_serving.apis import prediction_service_pb2
from grpc.beta import implementations
import grpc
import tensorflow as tf
from tensorflow_serving.apis import prediction_service_pb2_grpc
import datetimetf.app.flags.DEFINE_string('server', '47.93.217.40:31220','PredictionService host:port')tf.app.flags.DEFINE_string('model', 'din_pregrant_posts_3','Model name.')
FLAGS = tf.app.flags.FLAGS_CSV_COLUMNS =["labels", "userId", "itemId","userEntrance", "userRequestTime", "userRequestWeek", "userOs", "userApn","userUa",#9"userMode", "userProvince", "userCity", "userCityLevel", "userMarr", "userAge","userGestat_week","userAgeRange", "userBage", "userAppV",#10"userCliN_Inc", "userShoN_Inc", "userBotActCt","userTotalTime", "userView2BottomTimes", "userEffTimes", "userFirstRequest", "userAppLTag", "userHisL",#9"itemAlgSource", "itemTexL", "itemKwN", "itemTitL", "itemTwN", "itemImgN", "itemSour", "itemCreT", "itemCliN_Inc","itemShoN_Inc",#10"itemRevi", "itemColN","itemShare", "itemVreN", "itemLireN", "itemLike", "itemEffUsers", "itemView2BottomTimes", "itemTotalTime","itemBotSum","itemMt",#11"itemContentH", "itemCtr", "itemAvsT", "itemFiR", "itemTimeScore", "itemBotSumCliR", "itemSexW","itemSuperstiW","itemLowTitleW",#9"itemTtP","itemKtW", "itemKtW2", "itemTag1", "itemTag2", "itemTag3", "itemKs1", "itemKs2",#7"userItemHistory", "userKeywordHistory", "userKeyword2History","userTag1History", "userTag2History", "userTag3History", "userKs1History", "userKs2History","userKtW","userTtP"]#10#10个 userItemHistory可有可无
_COLUMNS_NEED_SPILIT = ["userItemHistory", "userKeywordHistory", "userKeyword2History", "userTag1History","userTag2History", "userTag3History", "userKs1History", "userKs2History"]def main():# create the RPC stub# channel = implementations.insecure_channel("127.0.0.1", int(8502))# stub = prediction_service_pb2.beta_create_PredictionService_stub(channel)## # create the request object and set the name and signature_name params# request = predict_pb2.PredictRequest()# request.model_spec.name = &#39;din&#39;# request.model_spec.signature_name = &#39;predict&#39;channel = grpc.insecure_channel(FLAGS.server)stub = prediction_service_pb2_grpc.PredictionServiceStub(channel)request = predict_pb2.PredictRequest()print(FLAGS.model)request.model_spec.name = FLAGS.modelrequest.model_spec.signature_name = &#39;serving_default&#39;requests = []file = open("209", &#39;r&#39;, encoding=&#39;UTF-8&#39;)i = 0try:while True and (i <200):text_line = file.readline()if text_line:a = eval(text_line)b = {}for j in range(76):b[_CSV_COLUMNS[j]] = [a[j]]i = i + 1print("b:",b)c = [&#39;userKeywordHistory&#39;,&#39;userKeyword2History&#39;,&#39;userTag1History&#39;,
&#39;userTag2History&#39;,&#39;userTag3History&#39;,&#39;userKs1History&#39;,&#39;userKs2History&#39;,"userTtP","userKtW"]for item in c:print("item:",item)tmp = b[item]print("tmp:",tmp)if tmp[0] is not &#39;&#39;:b[item] = [list(eval(tmp[0]))]else:b[item]=tmp[0]# print(b[&#39;userTag1History&#39;])requests.append(b)else:breakfinally:file.close()# read file and get valuenum = 1with tf.io.TFRecordWriter("tf_serving_warmup_requests") as writer:for i in range(0, 1):request = predict_pb2.PredictRequest(model_spec=model_pb2.ModelSpec(name="din_pregrant_posts_3", signature_name="serving_default"),inputs={# "time_weight": tf.make_tensor_proto([10] * num, shape=[num],# dtype=tf.int32),"userEntrance": tf.make_tensor_proto(requests[i][&#39;userEntrance&#39;] * num,shape=[num] , dtype=tf.int32),"userRequestTime": tf.make_tensor_proto(requests[i][&#39;userRequestTime&#39;] * num,shape=[num] ,dtype=tf.int32),"userRequestWeek": tf.make_tensor_proto(requests[i][&#39;userRequestWeek&#39;]* num,shape=[num] , dtype=tf.int32),"userOs": tf.make_tensor_proto(requests[i][&#39;userOs&#39;]* num,shape=[num] , dtype=tf.int32),"userApn": tf.make_tensor_proto(requests[i][&#39;userApn&#39;]* num,shape=[num] , dtype=tf.int32),"userUa": tf.make_tensor_proto(requests[i][&#39;userUa&#39;]* num,shape=[num] , dtype=tf.int32),"userMode": tf.make_tensor_proto(requests[i][&#39;userMode&#39;]* num,shape=[num] , dtype=tf.int32),"userProvince": tf.make_tensor_proto(requests[i][&#39;userProvince&#39;]* num,shape=[num] , dtype=tf.int32),"userCity": tf.make_tensor_proto(requests[i][&#39;userCity&#39;]* num,shape=[num] , dtype=tf.int32),"userCityLevel": tf.make_tensor_proto(requests[i][&#39;userCityLevel&#39;]* num,shape=[num] , dtype=tf.int32),"userMarr": tf.make_tensor_proto(requests[i][&#39;userMarr&#39;]* num,shape=[num] , dtype=tf.int32),"userAge": tf.make_tensor_proto(requests[i][&#39;userAge&#39;]* num,shape=[num] , dtype=tf.int32),"userGestat_week": tf.make_tensor_proto(requests[i][&#39;userGestat_week&#39;]* num,shape=[num], dtype=tf.int32),"userAgeRange": tf.make_tensor_proto(requests[i][&#39;userAgeRange&#39;]* num,shape=[num] , dtype=tf.int32),"userBage": tf.make_tensor_proto(requests[i][&#39;userBage&#39;]* num,shape=[num] , dtype=tf.int32),"userAppV": tf.make_tensor_proto(requests[i][&#39;userAppV&#39;]* num,shape=[num] , dtype=tf.int32),"userCliN_Inc": tf.make_tensor_proto(requests[i][&#39;userCliN_Inc&#39;]* num,shape=[num] , dtype=tf.int32),"userShoN_Inc": tf.make_tensor_proto(requests[i][&#39;userShoN_Inc&#39;]* num,shape=[num] , dtype=tf.int32),"userBotActCt": tf.make_tensor_proto(requests[i][&#39;userBotActCt&#39;]* num,shape=[num] , dtype=tf.int32),"userTotalTime": tf.make_tensor_proto(requests[i][&#39;userTotalTime&#39;]* num,shape=[num] , dtype=tf.int32),"userView2BottomTimes": tf.make_tensor_proto(requests[i][&#39;userView2BottomTimes&#39;]* num,shape=[num] , dtype=tf.int32),"userEffTimes": tf.make_tensor_proto(requests[i][&#39;userEffTimes&#39;]* num,shape=[num] , dtype=tf.int32),"userFirstRequest": tf.make_tensor_proto(requests[i][&#39;userFirstRequest&#39;]* num,shape=[num] , dtype=tf.int32),"userAppLTag": tf.make_tensor_proto(requests[i][&#39;userAppLTag&#39;]* num,shape=[num] , dtype=tf.int32),"itemAlgSource": tf.make_tensor_proto(requests[i][&#39;itemAlgSource&#39;]* num,shape=[num] , dtype=tf.int32),"itemTexL": tf.make_tensor_proto(requests[i][&#39;itemTexL&#39;]* num,shape=[num] , dtype=tf.int32),"itemKwN": tf.make_tensor_proto(requests[i][&#39;itemKwN&#39;]* num,shape=[num] , dtype=tf.int32),"itemTitL": tf.make_tensor_proto(requests[i][&#39;itemTitL&#39;]* num,shape=[num] , dtype=tf.int32),"itemTwN": tf.make_tensor_proto(requests[i][&#39;itemTwN&#39;]* num,shape=[num] , dtype=tf.int32),"itemImgN": tf.make_tensor_proto(requests[i][&#39;itemImgN&#39;]* num,shape=[num] , dtype=tf.int32),"itemSour": tf.make_tensor_proto(requests[i][&#39;itemSour&#39;]* num,shape=[num] , dtype=tf.int32),"itemCreT": tf.make_tensor_proto(requests[i][&#39;itemCreT&#39;]* num,shape=[num] , dtype=tf.int32),"itemCliN_Inc": tf.make_tensor_proto(requests[i][&#39;itemCliN_Inc&#39;]* num,shape=[num] , dtype=tf.int32),"itemShoN_Inc": tf.make_tensor_proto(requests[i][&#39;itemShoN_Inc&#39;]* num,shape=[num] , dtype=tf.int32),"itemRevi": tf.make_tensor_proto(requests[i][&#39;itemRevi&#39;]* num,shape=[num] , dtype=tf.int32),"itemColN": tf.make_tensor_proto(requests[i][&#39;itemColN&#39;]* num,shape=[num] , dtype=tf.int32),"itemShare": tf.make_tensor_proto(requests[i][&#39;itemShare&#39;]* num,shape=[num] , dtype=tf.int32),"itemVreN": tf.make_tensor_proto(requests[i][&#39;itemVreN&#39;]* num,shape=[num] , dtype=tf.int32),"itemLireN": tf.make_tensor_proto(requests[i][&#39;itemLireN&#39;]* num,shape=[num] , dtype=tf.int32),"itemLike": tf.make_tensor_proto(requests[i][&#39;itemLike&#39;]* num,shape=[num] , dtype=tf.int32),"itemEffUsers": tf.make_tensor_proto(requests[i][&#39;itemEffUsers&#39;]* num,shape=[num] , dtype=tf.int32),"itemView2BottomTimes": tf.make_tensor_proto(requests[i][&#39;itemView2BottomTimes&#39;]* num,shape=[num] , dtype=tf.int32),"itemTotalTime": tf.make_tensor_proto(requests[i][&#39;itemTotalTime&#39;]* num,shape=[num] , dtype=tf.int32),"itemBotSum": tf.make_tensor_proto(requests[i][&#39;itemBotSum&#39;]* num,shape=[num] , dtype=tf.int32),"itemMt": tf.make_tensor_proto(requests[i][&#39;itemMt&#39;] * num, shape=[num], dtype=tf.int32),"itemContentH": tf.make_tensor_proto(requests[i][&#39;itemContentH&#39;]* num,shape=[num] , dtype=tf.double),"itemCtr": tf.make_tensor_proto(requests[i][&#39;itemCtr&#39;]* num,shape=[num] , dtype=tf.double),"itemAvsT": tf.make_tensor_proto(requests[i][&#39;itemAvsT&#39;]* num,shape=[num] , dtype=tf.double),"itemFiR": tf.make_tensor_proto(requests[i][&#39;itemFiR&#39;]* num,shape=[num] , dtype=tf.double),"itemTimeScore": tf.make_tensor_proto(requests[i][&#39;itemTimeScore&#39;]* num,shape=[num] , dtype=tf.double),"itemBotSumCliR": tf.make_tensor_proto(requests[i][&#39;itemBotSumCliR&#39;]* num,shape=[num] , dtype=tf.double),"itemSexW": tf.make_tensor_proto(requests[i][&#39;itemSexW&#39;]* num,shape=[num] , dtype=tf.double),"itemSuperstiW": tf.make_tensor_proto(requests[i][&#39;itemSuperstiW&#39;]* num,shape=[num] , dtype=tf.double),"itemLowTitleW": tf.make_tensor_proto(requests[i][&#39;itemLowTitleW&#39;]* num,shape=[num] , dtype=tf.double),"itemKtW": tf.make_tensor_proto(requests[i][&#39;itemKtW&#39;]* num,shape=[num] , dtype=tf.int32),"itemKtW2": tf.make_tensor_proto(requests[i][&#39;itemKtW2&#39;]* num,shape=[num] , dtype=tf.int32),"itemTag1": tf.make_tensor_proto(requests[i][&#39;itemTag1&#39;]* num,shape=[num] , dtype=tf.int32),"itemTag2": tf.make_tensor_proto(requests[i][&#39;itemTag2&#39;]* num,shape=[num] , dtype=tf.int32),"itemTag3": tf.make_tensor_proto(requests[i][&#39;itemTag3&#39;]* num,shape=[num] , dtype=tf.int32),"itemKs1": tf.make_tensor_proto(requests[i][&#39;itemKs1&#39;]* num,shape=[num] , dtype=tf.int32),"itemKs2": tf.make_tensor_proto(requests[i][&#39;itemKs2&#39;] * num, shape=[num], dtype=tf.int32),"userKeywordHistory": tf.make_tensor_proto(requests[i][&#39;userKeywordHistory&#39;] * num ,shape=[num,requests[i][&#39;userHisL&#39;][0]], dtype=tf.int32),"userKeyword2History": tf.make_tensor_proto(requests[i][&#39;userKeyword2History&#39;]* num,shape=[num,requests[i][&#39;userHisL&#39;][0]], dtype=tf.int32),"userTag1History": tf.make_tensor_proto(requests[i][&#39;userTag1History&#39;]* num,shape=[num,requests[i][&#39;userHisL&#39;][0]], dtype=tf.int32),"userTag2History": tf.make_tensor_proto(requests[i][&#39;userTag2History&#39;]* num,shape=[num,requests[i][&#39;userHisL&#39;][0]], dtype=tf.int32),"userTag3History": tf.make_tensor_proto(requests[i][&#39;userTag3History&#39;]* num,shape=[num,requests[i][&#39;userHisL&#39;][0]], dtype=tf.int32),"userKs1History": tf.make_tensor_proto(requests[i][&#39;userKs1History&#39;]* num,shape=[num,requests[i][&#39;userHisL&#39;][0]], dtype=tf.int32),"userKs2History": tf.make_tensor_proto(requests[i][&#39;userKs2History&#39;]* num, shape=[num,requests[i][&#39;userHisL&#39;][0]],dtype=tf.int32),# "userTtP": tf.make_tensor_proto(requests[i][&#39;userTtP&#39;]* num,shape=[num,requests[i][&#39;userHisL&#39;][0]], dtype=tf.int32),# "userKtW": tf.make_tensor_proto(requests[i][&#39;userKtW&#39;]* num, shape=[num,requests[i][&#39;userHisL&#39;][0]],dtype=tf.int32),"userHisL": tf.make_tensor_proto(requests[i][&#39;userHisL&#39;] * num, shape=[num], dtype=tf.int32),})log = prediction_log_pb2.PredictionLog(predict_log=prediction_log_pb2.PredictLog(request=request))writer.write(log.SerializeToString())print(request)print(requests[i][&#39;userKeywordHistory&#39;])time_start = datetime.datetime.utcnow()for i in range(1000):respOnse= stub.Predict.future(request, 30.)time_end = datetime.datetime.utcnow()time_elapsed_sec = (time_end - time_start).total_seconds()print(&#39;Total elapsed time: {} seconds&#39;.format(time_elapsed_sec))print(&#39;Time for batch size {} repeated {} times&#39;.format(1, 1000))print(&#39;Average latency per batch: {} seconds&#39;.format(time_elapsed_sec / 1000))print(response)prediction = response.result()print(prediction)if __name__ == "__main__":main()

导出模型是的代码如下

def export_model(model, export_dir, checkpoint_path):"""Export to SavedModel format.Args:model_din: Estimator objectexport_dir: directory to export the model_din.model_column_fn: Function to generate model_din feature columns."""#54个特征feature_name = [ &#39;userEntrance&#39;, &#39;userRequestTime&#39;, &#39;userRequestWeek&#39;, &#39;userOs&#39;, &#39;userApn&#39;, &#39;userUa&#39;,&#39;userMode&#39;, &#39;userProvince&#39;, &#39;userCity&#39;, &#39;userCityLevel&#39;,&#39;userMarr&#39;, &#39;userAge&#39;,&#39;userGestat_week&#39;, &#39;userAgeRange&#39;, &#39;userBage&#39;, &#39;userAppV&#39;, &#39;userCliN_Inc&#39;, &#39;userShoN_Inc&#39;, &#39;userBotActCt&#39;, &#39;userTotalTime&#39;,&#39;userView2BottomTimes&#39;, &#39;userEffTimes&#39;, &#39;userFirstRequest&#39;, &#39;userAppLTag&#39;, &#39;itemAlgSource&#39;, &#39;itemTexL&#39;, &#39;itemKwN&#39;, &#39;itemTitL&#39;, &#39;itemTwN&#39;,&#39;itemImgN&#39;,&#39;itemSour&#39;, &#39;itemCreT&#39;, &#39;itemCliN_Inc&#39;, &#39;itemShoN_Inc&#39;, &#39;itemRevi&#39;, &#39;itemColN&#39;, &#39;itemShare&#39;, &#39;itemVreN&#39;, &#39;itemLireN&#39;, &#39;itemLike&#39;,&#39;itemEffUsers&#39;, &#39;itemView2BottomTimes&#39;,&#39;itemTotalTime&#39;, &#39;itemBotSum&#39;,&#39;itemMt&#39;,&#39;itemContentH&#39;, &#39;itemCtr&#39;, &#39;itemAvsT&#39;, &#39;itemFiR&#39;, &#39;itemTimeScore&#39;,&#39;itemBotSumCliR&#39;,&#39;itemSexW&#39;,&#39;itemSuperstiW&#39;, &#39;itemLowTitleW&#39;]serving_features = {}for item in feature_name:double_feature = ["itemContentH", "itemCtr", "itemAvsT", "itemFiR", "itemTimeScore","itemBotSumCliR", "itemSexW", "itemSuperstiW", "itemLowTitleW"]if item in double_feature:serving_features[item] = tf.placeholder(tf.double, [None, ], name=item)else:serving_features[item] = tf.placeholder(tf.int32, [None, ], name=item)#18个serving_features1 = {# "itemTtp": tf.placeholder(tf.int32, [None, ], name=&#39;itemTtp&#39;),"itemKtW": tf.placeholder(tf.int32, [None, ], name=&#39;keyword&#39;),"itemKtW2": tf.placeholder(tf.int32, [None, ], name=&#39;keyword2&#39;),"itemTag1": tf.placeholder(tf.int32, [None, ], name=&#39;tag1&#39;),"itemTag2": tf.placeholder(tf.int32, [None, ], name=&#39;tag2&#39;),"itemTag3": tf.placeholder(tf.int32, [None, ], name=&#39;tag3&#39;),"itemKs1": tf.placeholder(tf.int32, [None, ], name=&#39;ks1&#39;),"itemKs2": tf.placeholder(tf.int32, [None, ], name=&#39;ks2&#39;),"userKeywordHistory": tf.placeholder(tf.int32, [None, None], name=&#39;hist_keyword&#39;),"userKeyword2History": tf.placeholder(tf.int32, [None, None], name=&#39;hist_keyword2&#39;),"userTag1History": tf.placeholder(tf.int32, [None, None], name=&#39;hist_tag1&#39;),"userTag2History": tf.placeholder(tf.int32, [None, None], name=&#39;hist_tag2&#39;),"userTag3History": tf.placeholder(tf.int32, [None, None], name=&#39;hist_tag3&#39;),"userKs1History": tf.placeholder(tf.int32, [None, None], name=&#39;hist_ks1&#39;),"userKs2History": tf.placeholder(tf.int32, [None, None], name=&#39;hist_ks2&#39;),# "userTtP": tf.placeholder(tf.int32, [None, None], name=&#39;userTtP&#39;),# "userKtW": tf.placeholder(tf.int32, [None, None], name=&#39;userKtW&#39;),"userHisL": tf.placeholder(tf.int32, [None, ], name=&#39;sl&#39;)}serving_features.update(serving_features1)#构建一个serving_input_receiver_fn期望特征张量example_input_fn = (tf.estimator.export.build_raw_serving_input_receiver_fn(serving_features))# 导出为Tensorflow SavedModelreturn model.export_savedmodel(export_dir, example_input_fn, checkpoint_path=checkpoint_path,assets_extra={&#39;tf_serving_warmup_requests&#39;: &#39;/data/supeihuang/din_209_data/data_item/tf_serving_warmup_requests&#39;})

 


推荐阅读
  • Centos7.6安装Gitlab教程及注意事项
    本文介绍了在Centos7.6系统下安装Gitlab的详细教程,并提供了一些注意事项。教程包括查看系统版本、安装必要的软件包、配置防火墙等步骤。同时,还强调了使用阿里云服务器时的特殊配置需求,以及建议至少4GB的可用RAM来运行GitLab。 ... [详细]
  • 计算机存储系统的层次结构及其优势
    本文介绍了计算机存储系统的层次结构,包括高速缓存、主存储器和辅助存储器三个层次。通过分层存储数据可以提高程序的执行效率。计算机存储系统的层次结构将各种不同存储容量、存取速度和价格的存储器有机组合成整体,形成可寻址存储空间比主存储器空间大得多的存储整体。由于辅助存储器容量大、价格低,使得整体存储系统的平均价格降低。同时,高速缓存的存取速度可以和CPU的工作速度相匹配,进一步提高程序执行效率。 ... [详细]
  • 本文介绍了在使用Python中的aiohttp模块模拟服务器时出现的连接失败问题,并提供了相应的解决方法。文章中详细说明了出错的代码以及相关的软件版本和环境信息,同时也提到了相关的警告信息和函数的替代方案。通过阅读本文,读者可以了解到如何解决Python连接服务器失败的问题,并对aiohttp模块有更深入的了解。 ... [详细]
  • Python瓦片图下载、合并、绘图、标记的代码示例
    本文提供了Python瓦片图下载、合并、绘图、标记的代码示例,包括下载代码、多线程下载、图像处理等功能。通过参考geoserver,使用PIL、cv2、numpy、gdal、osr等库实现了瓦片图的下载、合并、绘图和标记功能。代码示例详细介绍了各个功能的实现方法,供读者参考使用。 ... [详细]
  • WebSocket与Socket.io的理解
    WebSocketprotocol是HTML5一种新的协议。它的最大特点就是,服务器可以主动向客户端推送信息,客户端也可以主动向服务器发送信息,是真正的双向平等对话,属于服务器推送 ... [详细]
  • 本文介绍了Python爬虫技术基础篇面向对象高级编程(中)中的多重继承概念。通过继承,子类可以扩展父类的功能。文章以动物类层次的设计为例,讨论了按照不同分类方式设计类层次的复杂性和多重继承的优势。最后给出了哺乳动物和鸟类的设计示例,以及能跑、能飞、宠物类和非宠物类的增加对类数量的影响。 ... [详细]
  • 深入理解Kafka服务端请求队列中请求的处理
    本文深入分析了Kafka服务端请求队列中请求的处理过程,详细介绍了请求的封装和放入请求队列的过程,以及处理请求的线程池的创建和容量设置。通过场景分析、图示说明和源码分析,帮助读者更好地理解Kafka服务端的工作原理。 ... [详细]
  • YOLOv7基于自己的数据集从零构建模型完整训练、推理计算超详细教程
    本文介绍了关于人工智能、神经网络和深度学习的知识点,并提供了YOLOv7基于自己的数据集从零构建模型完整训练、推理计算的详细教程。文章还提到了郑州最低生活保障的话题。对于从事目标检测任务的人来说,YOLO是一个熟悉的模型。文章还提到了yolov4和yolov6的相关内容,以及选择模型的优化思路。 ... [详细]
  • Java实战之电影在线观看系统的实现
    本文介绍了Java实战之电影在线观看系统的实现过程。首先对项目进行了简述,然后展示了系统的效果图。接着介绍了系统的核心代码,包括后台用户管理控制器、电影管理控制器和前台电影控制器。最后对项目的环境配置和使用的技术进行了说明,包括JSP、Spring、SpringMVC、MyBatis、html、css、JavaScript、JQuery、Ajax、layui和maven等。 ... [详细]
  • 开发笔记:加密&json&StringIO模块&BytesIO模块
    篇首语:本文由编程笔记#小编为大家整理,主要介绍了加密&json&StringIO模块&BytesIO模块相关的知识,希望对你有一定的参考价值。一、加密加密 ... [详细]
  • http:my.oschina.netleejun2005blog136820刚看到群里又有同学在说HTTP协议下的Get请求参数长度是有大小限制的,最大不能超过XX ... [详细]
  • 本文介绍了如何使用C#制作Java+Mysql+Tomcat环境安装程序,实现一键式安装。通过将JDK、Mysql、Tomcat三者制作成一个安装包,解决了客户在安装软件时的复杂配置和繁琐问题,便于管理软件版本和系统集成。具体步骤包括配置JDK环境变量和安装Mysql服务,其中使用了MySQL Server 5.5社区版和my.ini文件。安装方法为通过命令行将目录转到mysql的bin目录下,执行mysqld --install MySQL5命令。 ... [详细]
  • 本文介绍了Windows操作系统的版本及其特点,包括Windows 7系统的6个版本:Starter、Home Basic、Home Premium、Professional、Enterprise、Ultimate。Windows操作系统是微软公司研发的一套操作系统,具有人机操作性优异、支持的应用软件较多、对硬件支持良好等优点。Windows 7 Starter是功能最少的版本,缺乏Aero特效功能,没有64位支持,最初设计不能同时运行三个以上应用程序。 ... [详细]
  • MyBatis多表查询与动态SQL使用
    本文介绍了MyBatis多表查询与动态SQL的使用方法,包括一对一查询和一对多查询。同时还介绍了动态SQL的使用,包括if标签、trim标签、where标签、set标签和foreach标签的用法。文章还提供了相关的配置信息和示例代码。 ... [详细]
  • web.py开发web 第八章 Formalchemy 服务端验证方法
    本文介绍了在web.py开发中使用Formalchemy进行服务端表单数据验证的方法。以User表单为例,详细说明了对各字段的验证要求,包括必填、长度限制、唯一性等。同时介绍了如何自定义验证方法来实现验证唯一性和两个密码是否相等的功能。该文提供了相关代码示例。 ... [详细]
author-avatar
tuiqiu
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有