案例一: Animal: package text2; public class Animal { private String name; private int age; public String getName() { return name; } public void setName(S ...
分类:
编程语言 时间:
2019-03-29 17:24:42
阅读次数:
135
群聊 from flask import Flask,request,render_template from geventwebsocket.handler import WebSocketHandler from gevent.pywsgi import WSGIServer from geve ...
分类:
Web程序 时间:
2019-03-26 19:56:45
阅读次数:
229
这题写的比较匆忙,代码有点乱,仅供参考。有个坑就是一开始给的数字就是回文串,要先判断,注意一下。 #include <iostream> #include <string.h> #include <cstdio> #include <algorithm> #include <cstdlib> #in ...
分类:
其他好文 时间:
2019-03-24 18:48:17
阅读次数:
83
A. 题解:考虑最后一位的奇偶性就行 1 #include<bits/stdc++.h> 2 #define ll long long 3 #define pii pair<int,int> 4 #define mp(a,b) make_pair(a,b) 5 using namespace std ...
分类:
其他好文 时间:
2019-03-22 18:46:32
阅读次数:
151
Problem Description As a cute girl, Kotori likes playing ``Hide and Seek'' with cats particularly.Under the influence of Kotori, many girls and cats a ...
分类:
其他好文 时间:
2019-03-22 17:07:55
阅读次数:
123
准备知识 面向对象双下方法 __call__ 对象后面加括号,触发执行 为什么设计上下文这样的机制? 就是保证多线程环境下,实现线程之间的隔离. 在了解flask上下文机制之前,我们先了解下线程的数据安全. 线程安全 如上代码段,在1s内开启20个线程,执行add_num(),结果foo.num都为 ...
分类:
其他好文 时间:
2019-03-21 21:48:10
阅读次数:
199
面向对象的四大特性 static关键字 public class StaticDemo { String a = "非静态属性"; static String b = "静态属性"; static int c; static int d; static { System.out.println("这 ...
分类:
其他好文 时间:
2019-03-21 17:16:44
阅读次数:
147
//三角形的选择 #include<iostream> using namespace std; int a[101]; int i,j,k,nmm,ans,n; void solve(){ for(i=0;i<n-2;i++){ for(j=i+1;j<n-1;j++){ for(k=j+1;k< ...
分类:
其他好文 时间:
2019-03-21 12:01:19
阅读次数:
179
一. 案例 1.源码: /** @hide */ private TelephonyManager(int slotId) { mContext = null; mSlotId = slotId; if (sRegistry == null) { if (sRegistry == null) { s ...
题目描述: 小 $H$ 是一位优秀的越野赛车女选手。现在她准备在 $A$ 山上进行赛车训练。 $A$ 山上一共有 $n$ 个广场,编号依次为 $1$ 到 $n$ ,这些广场之间通过 $n-1$条双向车道直接或间接地连接在一起。对于每条车道$i$ ,可以用四个正整数 $u_i,v_i,l_i,r_i$ ...
分类:
其他好文 时间:
2019-03-20 01:21:50
阅读次数:
161