码迷,mamicode.com
首页 >  
搜索关键字:循环 if for while case    ( 74454个结果
sql case when的使用
最近在sql使用中,发现 case when 的功能相当强大。 可以根据现有字段定义新的字段,可以对新字段进行排序等等。 下面简单举例说明。 用来测试的数据表内容如下: mysql> select * from test_student; + + + + + + | id | name | age ...
分类:数据库   时间:2020-11-20 11:53:29    阅读次数:10
[题解]CSP2020-S T4 Snakes
放个代码吧,开个坑 #include<bits/stdc++.h> #define rep(i,a,b) for (register int i=(a);i<=(b);i++) #define drep(i,a,b) for (register int i=(a);i>=(b);i--) typed ...
分类:其他好文   时间:2020-11-20 11:48:09    阅读次数:5
python好玩的小工具(正在create中)
思路: 0)复制test.xls,为new.xls ,并 以key ,value的形式存base.xls数据( C列是key B列是value ) 1)在new.xls中:判断这个sheet页是否为空 不为空可,走2),为空跳过不走 2)判断当前行是否为空 不为空可,走3),为空跳过不走 3) 判断 ...
分类:编程语言   时间:2020-11-20 11:38:28    阅读次数:6
实验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%f",&a, ...
分类:其他好文   时间:2020-11-20 11:37:01    阅读次数:10
Mac Appium ANDROID_HOME 环境变量问题
macOS 版本:10.15.4 (19E287) appium版本:1.18.3 遇到的问题: 先是报这个:An unknown server-side error occurred while processing the command. Original error: Neither AND ...
分类:移动开发   时间:2020-11-20 11:36:33    阅读次数:50
实验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
29.shell脚本正整数加减乘除计算
思路:函数先计算数值加减乘除,case赋值输出对应的加减乘除#!/bin/bashadd(){add=$[$1+$2]echo"outcome:$1+$2=$add"}minus(){min=$[$1-$2]echo"outcome:$1-$2=$min"}multiply(){mult=$[$1*$2]echo"outcome:$1x$2=$mult"}divide(){div=$[$1/$2]
分类:系统相关   时间:2020-11-20 11:18:50    阅读次数:15
排序算法之——选择排序
1.算法思想 选择排序,从头至尾扫描序列,找出无序区最小的一个元素,和有序区的最后一个元素比较,如果较小就交换元素,如果相等就不交换元素,接着下一次循环(有序区不断增加,无序区不断往后减少),执行同样的操作,最终得到一个有序序列。 2.C++实现 #include <iostream> using ...
分类:编程语言   时间:2020-11-19 12:46:29    阅读次数:11
€$P被Ak 题解
T1:獳畧日 老子他妈直接拿熊刀tong死出题人 导致被Ak的罪魁祸首 考场三个多小时的消耗 考后发现考场写的又臭又长就重构了一份 直接分三个阶段考虑 公元前,$1600$ 前和 $1600$ 后 三个阶段分别预处理 询问时直接判断+二分 前两个阶段预处理每一年的日期 后一个阶段 $400$ 一循环 ...
分类:其他好文   时间:2020-11-19 12:41:25    阅读次数:7
实验三:磕磕碰碰
实验内容 1.实验任务1 #include<math.h> #include<stdio.h> int main(){ float a,b,c,x1,x2; float delta,real,image; printf("Enter a,b,c: "); while(scanf("%f,%f,%f" ...
分类:其他好文   时间:2020-11-19 12:36:32    阅读次数:6
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!