1、Python中的条件表达式 条件表达式的语法结构: 结构1: if 条件表达式1: 条件执行体1 else: 条件执行体2 举例: #条件表达式 #普通写法 num1=int(input('请输入一个整数:')) num2=int(input('请输入第二个整数:')) if num1>=num ...
分类:
编程语言 时间:
2020-11-24 12:40:33
阅读次数:
11
缘由:看到redis的缓存淘汰机制,便自己实现了一下 代码实现(双向链表+HashMap) package com.jarjune.jdalao.framework.algorithm; import java.util.*; /** * LRU * @author jarjune * @versi ...
分类:
编程语言 时间:
2020-11-24 12:37:52
阅读次数:
8
原项目代码如下 def data_filter(src=r'D:\material\data.json',des=r'D:\material\pro_data.json',db = r'D:\material\tnbs.db'): fw = open(des, 'w', encoding='utf- ...
分类:
其他好文 时间:
2020-11-23 12:38:04
阅读次数:
5
Dart语言的控制语句跟其他常见语言的控制语句是一样的,基本如下:
- **if 和 else**
- **for 循环**
- **while 和 do-while 循环**
- **break 和 continue**
- **switch 和 case**
- **assert** ...
分类:
编程语言 时间:
2020-11-23 12:01:42
阅读次数:
8
C# 中大端序与小端序 static void Main(string[] args) { uint value = 0x12345678; Console.WriteLine("原始字节序:0x12345678"); byte[] bigLittleEndian = BitConverter.Ge ...
@(C++内联函数) #include <iostream> using namespace std; inline int Max(int a, int b) { if (a > b) return a; else return b; } int main() { cout << Max(23, ...
分类:
编程语言 时间:
2020-11-21 12:39:21
阅读次数:
17
Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. The overall run time complexity shou ...
分类:
编程语言 时间:
2020-11-21 12:37:58
阅读次数:
15
1 //反选、计算 2 function trCheck(id,name,obj){ 3 if($("input[name='check']").length== $("input[name='check']:checked").length){ 4 $("input[name='all-check ...
分类:
其他好文 时间:
2020-11-21 12:05:15
阅读次数:
4
cf gym 链接 A. Kick Start 简单签到题。 code: #include<bits/stdc++.h> #define pi pair<int,int> #define f first #define s second using namespace std; const stri ...
分类:
其他好文 时间:
2020-11-21 11:48:03
阅读次数:
4
#include<math.h> #include<stdio.h> int main(){ float a,b,c,x1,x2; float delta,real,imag; printf("Enter a,b,c:"); while(scanf("%f%f%f",&a,&b,&c) != EOF ...
分类:
其他好文 时间:
2020-11-20 11:32:25
阅读次数:
7