码迷,mamicode.com
首页 >  
搜索关键字:if then else    ( 23991个结果
Python学习系列之条件表达式、pass语句和对象bool应用(八)
1、Python中的条件表达式 条件表达式的语法结构: 结构1: if 条件表达式1: 条件执行体1 else: 条件执行体2 举例: #条件表达式 #普通写法 num1=int(input('请输入一个整数:')) num2=int(input('请输入第二个整数:')) if num1>=num ...
分类:编程语言   时间:2020-11-24 12:40:33    阅读次数:11
LRU算法的实现
缘由:看到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
【Flutter 1-8】Flutter教程Dart语言——控制语句
Dart语言的控制语句跟其他常见语言的控制语句是一样的,基本如下: - **if 和 else** - **for 循环** - **while 和 do-while 循环** - **break 和 continue** - **switch 和 case** - **assert** ...
分类:编程语言   时间:2020-11-23 12:01:42    阅读次数:8
C# 中大端序与小端序
C# 中大端序与小端序 static void Main(string[] args) { uint value = 0x12345678; Console.WriteLine("原始字节序:0x12345678"); byte[] bigLittleEndian = BitConverter.Ge ...
分类:Windows程序   时间:2020-11-21 12:40:13    阅读次数:25
C++内联函数
@(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
4. 寻找两个正序数组的中位数 Median of Two Sorted Arrays
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
[2020.11.15]CCPC Final 2019
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
实验3
#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
23991条   上一页 1 ... 43 44 45 46 47 ... 2400 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!