码迷,mamicode.com
首页 >  
搜索关键字:for input string 0    ( 126666个结果
设计模式之代理模式
代理模式 代理模式分为静态代理和动态代理.下图为静态代理结构图: 静态代理示例代码: // 抽象主题接口 public interface Subject { void request(); } // 具体主题角色 public class RealSubject implements Subjec ...
分类:其他好文   时间:2021-04-20 15:00:18    阅读次数:0
c++面向对象实验五
定义一个学生类,包含学号、姓名、成绩等属性。(1)使用重载函数定义多个构造函数。(2)使用默认参数定义构造函数。 #include<iostream> #include<string> using namespace std; class Student { public: Student(){ n ...
分类:编程语言   时间:2021-04-20 14:48:10    阅读次数:0
LINUX-shell&find 指令
1、编写脚本 createuser.sh,实现如下功能:使用一个用户名作为参数,如果 指定参数的用户存在,就显示其存在,否则添加之;显示添加的用户的id号等信息 read -p " input the user: " USER if id $USER &> /dev/null ; then echo ...
分类:系统相关   时间:2021-04-20 14:31:15    阅读次数:0
golang easyjson使用
golang easyjson使用 1.先安装easyjson go get -u github.com/mailru/easyjson/ 2.在结构体上加//easyjson:json的注解 //easyjson:json type School struct { Name string `jso ...
分类:Web程序   时间:2021-04-20 14:21:08    阅读次数:0
十进制转十六进制
代码: #include <stdio.h> #include <stdlib.h> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int ma ...
分类:其他好文   时间:2021-04-20 14:10:46    阅读次数:0
4.单例模式的五种实现
1.饿汉式,这种方式不推荐,会造成资源的浪费。 public class Hungry { private Hungry(){ } private static Hungry hungry = new Hungry(); public static Hungry getInstance(){ ret ...
分类:其他好文   时间:2021-04-20 14:07:56    阅读次数:0
多态多态多态多态 的 向上转型 一个小栗子....
public class Main { public static void main(String[] args) { test test = new test(); test.xxx(new zi()); } } class fu{ public void x(){ System.out.pri ...
分类:其他好文   时间:2021-04-20 14:06:09    阅读次数:0
状态模式
public class StatePattern { public static void main(String[] args) { Context context=new Context(); for (int i = 0; i < 10; i++) { context.handle(); } ...
分类:其他好文   时间:2021-04-19 16:06:54    阅读次数:0
resultMap结果集映射解决属性名和字段不一致问题
解决属性名和字段名不一致的问题 1.出现的问题 数据库中的字段 ? 新建一个项目,拷贝之前的,测试实体类与数据库字段不一致的情况 public class User { private int id; private String name; private String password; } 现 ...
分类:其他好文   时间:2021-04-19 16:03:47    阅读次数:0
成绩统计
6.成绩统计(15) 对给定人数的成绩输出其及格率和优秀率(百分号前保留整数) n = int(input()) a,b=0,0 for i in range (n): s = int(input()) if s>=60: a+=1 if s>=85: b+=1 print('{:.0%}'.for ...
分类:其他好文   时间:2021-04-19 15:57:59    阅读次数:0
126666条   上一页 1 ... 76 77 78 79 80 ... 12667 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!