废话不多讲,由于种种原因项目上出现了移动手持录入标签信息通过pc端转接实现打印的需求,所以简单研究了一下,本来考虑使用webapi方式实现,但是发现这种方式调用打印机实现自动打印比较困难,所以转而求其次就用了他:winform程序实现HttpListener对地址的监听.上正餐: 1. 项目结构:类HttpPostListener(实现监听业务类),HttpListenerPostValue(监听工具类) 2.HttpPostListener 代码 public class HttpPostLi
使用python语言实现在控制台打印日历 输入年.月.日 输出对应日历,指定的日数输出为'--' 程序没有做严格的输入验证,故输入整数即可. 以下为没有优化的源码: print_calendar.py #输出日历 def print_calendar(year,month,date = 1): month_dict = {':'July', ':'December'} #数字月份转换为字符串,并判断月份和号数是否合法 if month in range(1,13) and date in ran