前言 file是一个类,使用file('file_name', 'r+')这种方式打开文件,返回一个file对象,以写模式打开文件不存在则会被创建。但是更推荐使用内置函数open()来打开一个文件。 首先open是内置函数,使用方式是open('file_name', mode, buffering ...
分类:
编程语言 时间:
2020-01-16 01:06:25
阅读次数:
74
Model层Region.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace WebApplication1.Models { public class R ...
分类:
移动开发 时间:
2020-01-15 23:10:36
阅读次数:
135
一 [classic_tong @ https://www.cnblogs.com/hugetong/p/12198122.html] 查看一个命令或程序,都调用了什么系统API的方法, 可以是用strace [root@T9 OUTPUT_nginx]# strace echo execve("/ ...
分类:
系统相关 时间:
2020-01-15 19:26:54
阅读次数:
123
前言 在设计流程中,可能有的模块是不使用的,但某时候可能需要使用。 不同代码段的选择就可以使用条件编译。 流程 使用`define和`ifdef `else `endif语句实现此功能。 `timescale 1ns/1ps `define SIM_USE //定义SIM_USE,如果取消定义,注释 ...
分类:
其他好文 时间:
2020-01-15 11:47:59
阅读次数:
149
# 作者:薛志军import sysimport timename = input('请输入用户名:')with open('Name', 'r+', True, 'utf-8') as fn: names = fn.readlines() if name+'\n' not in names: # ...
分类:
编程语言 时间:
2020-01-15 09:57:38
阅读次数:
95
原题链接在这里:https://leetcode.com/problems/coin-change-2/ 题目: You are given coins of different denominations and a total amount of money. Write a function ...
分类:
其他好文 时间:
2020-01-15 09:55:48
阅读次数:
59
js控制文本框输入权限 1 $("#tel").prop("disabled", true);//禁止输入,tel代表input的id 2 $("#tel").prop("disabled", false);//允许输入,tel代表input的id js控制按钮的可用/不可用 1 $('#tel') ...
分类:
Web程序 时间:
2020-01-15 09:25:25
阅读次数:
111
背景公司有个渠道系统,专门对接三方渠道使用,没有什么业务逻辑,主要是转换报文和参数校验之类的工作,起着一个承上启下的作用。最近在优化接口的响应时间,优化了代码之后,但是时间还是达不到要求;有一个诡异的100ms左右的耗时问题,在接口中打印了请求处理时间后,和调用方的响应时间还有差了100ms左右。比如程序里记录150ms,但是调用方等待时间却为250ms左右。下面记录下当时详细的定位&解决
分类:
其他好文 时间:
2020-01-14 19:00:09
阅读次数:
66
前端使用input 来写radio,小程序使用radio标签 也可以使用<radio />单标签 1.自定义radio样式、 wx默认的是真的丑 /* 单选框样式 */ /* 初始样式 */ radio .wx-radio-input{ width: 32rpx; height: 32rpx; bo ...
分类:
微信 时间:
2020-01-14 17:52:57
阅读次数:
319
1.js方法封装 MC.upperCase=function chang(domId){ $(domId).on("input propertychange",function(){ var a=$(this).val(); a=a.toUpperCase(); $(domId).val(a) }) ...
分类:
Web程序 时间:
2020-01-14 17:49:15
阅读次数:
310