E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
whil
python基础——购物车程序
watchGT2',1680),('matepadpro',3200),('soundx',1999),('matex',16999)]shoping_car=[]#print(product_list)
whil
@Joy.Chen
·
2020-07-08 01:08
Python_编程
C++ 中输入密码时显示*
=13){putch('*');i++;}pass[i]='\0';i=0;cout<<"\nconfirmpassword:";
whil
l_stream
·
2020-07-07 12:37
C++
链表实现两个多项式相加--C语言实现
*createpoly()//创建多项式链表{ListNode*h=NULL,*p,*q;inte;floatc;printf("请输入系数和指数:\n");scanf("%f,%d",&c,&e);
whil
knighkingLOL
·
2020-07-07 12:26
算法学习
约瑟夫环问题:有n个人围成一圈,顺序编号。从第1个人开始报数(从1-3报数),凡报到3的人退出圈子,问最后留下的是原来第几号的那位?
记录剩余数个数intarr[]=newint[n];//标记剩余数的位置0代表存活,初始全部存活1代表删除intflag=0;//标记报名,到三降0intdel=3;//扩展字段,将报三的删除,可以任意定义
whil
狂丰
·
2020-07-07 08:44
约瑟夫环
约瑟夫环
有n个人围成一圈
1-3
1-m
实现生产者消费者wait/notify
staticclassConsumerimplementsRunnable{privateListqueue;publicConsumer(Listqueue){this.queue=queue;}@Overridepublicvoidrun(){try{
whil
fruit513
·
2020-07-07 08:35
基础练习:矩阵乘法 -深度解析
zero[50][50],c[50][50];intmain(){intn,m;cin>>n>>m;for(inti=0;i>a[i][j];for(inti=0;i
whil
气场五十米
·
2020-07-06 20:20
蓝桥杯
-
历届题目解析
直接插入排序,快速排序,冒泡排序,希尔排序,简单选择排序--算法
;i=0&&a[j]>temp;j--){a[j+1]=a[j];//前边的[j+1]=1,后边的【j】=0,然后执行j--因为j现在为-1=temp){high--;}a[low]=a[high];
whil
叽叽喳喳乱七八糟
·
2020-07-06 18:49
C++socket编程学习总结(2)(发送信息send函数、recv函数与多线程实现多个用户同时连接)
如下所示:charbuf[1024];//接收信息的最大长度,记位bufmemset(buf,1024,0);
whil
TIM33470348
·
2020-07-06 17:04
socket编程
C/C++ 常用的函数与方法
constchar*dir){intm=0,n;stringstr1,str2;str1=dir;str2=str1.substr(0,2);str1=str1.substr(3,str1.size());
whil
小乌龟在大乌龟背上
·
2020-07-06 07:45
C/C++
VC
DS
Codeforces Round #631 (Div. 2) D. Dreamoon Likes Sequences (位运算&组合数学)
biusingnamespacestd;typedeflonglongll;intmain(){intt;cin>>t;while(t--){lld,mod,k=1,ans=1;cin>>d>>mod;
whil
Harris-H
·
2020-07-06 06:26
数论
位运算
组合数学
UVA 1328 - Period (KMP)
就是循环长度,然后推断一下是不是正好是倍数就可以代码:#include#includeconstintN=1000005;intn,next[N];charstr[N];intmain(){intcas=0;
whil
weixin_38168081
·
2020-07-06 02:08
NYOJ 17 单调递增最长子序列
include#include#include#include#defineMAX10005usingnamespacestd;intmain(){intn;scanf("%d",&n);//cin>>n;
whil
小梁先生
·
2020-07-05 17:27
NYOJ
动态规划
69.Sqrt(x)
下面给出简单的实现:classSolution{public:intmySqrt(intx){if(x==0)return0;doublem=x;doublen=m/2;
whil
shinefire
·
2020-07-05 11:04
LeetCode
CCF二十四点
includeusingnamespacestd;inta[100100];stacknum;intmain(){std::ios::sync_with_stdio(false);intn;charstr[14];cin>>n;
whil
Ray.C.L
·
2020-07-05 09:02
CCF
Codeforces Round #648 (Div. 2)
A.MatrixGameB.TroubleSortC.RotationMatchingD.SolveTheMazeA.MatrixGameAshishandVivekplayagameonamatrixconsistingofnrowsandmcolumns,wheretheytaketurnsclaimingcells.Unclaimedcellsarerepresentedby0,
whil
Josephu.
·
2020-07-04 23:26
codeforces
java高级部分(十)-(UDP聊天室)
;publicSendThread(DatagramSocketds){super();this.ds=ds;}@Overridepublicvoidrun(){//TODO自动生成的方法存根try{
whil
今昔何年小王
·
2020-07-04 23:19
javaSE
Matlab串口上位机
BaudRate=9600;%串口波特率9600fopen(port1)%打开串口b=fread(port1,1)%读取串口数据,1位数据读入a=0.1;%图x坐标stem(a,b)%画图i=0%计时指标
whil
少茗
·
2020-07-04 16:22
MATLAB
数学建模
python自动化测试第三课(预习课):for while if循环
如果一个需求,不知道循环了多少次,使用
whil
frogcar
·
2020-07-04 16:16
自动化测试
17_数据结构与算法_二叉堆_Python实现
一个空的二叉堆以零作为第一个元素,方便后续的整除计算self.curr_size=0#通过比较新添加的项与父项的大小,如果该项小于父项则交换,从而维持堆的结构属性defswap_up(self,i):
whil
PyDarren
·
2020-07-04 07:01
数据结构
[BZOJ2876][NOI2012]骑行川藏(导数+数学相关)
100005;doubles[N],k[N],v[N],E;intn;doublegetv(doublex,inti){doublel=max(v[i],(double)0),r=(double)N;
whil
wwyx2001
·
2020-07-04 04:12
数学相关
NOI
导数
NOI
数学相关
js剑指offer-14-链表中倒数第k个结点
=null)first=first.next;elsereturnnull;}
whil
buptlinchunyu
·
2020-07-04 00:15
算法题
STM32F103ZET--RFID-RC522使用例程(战舰版)
main.c#include"rc522.h"intmain(){...RC522_Init();//初始化射频卡模块...
whil
liefyuan
·
2020-07-02 17:58
C
STM32
利用 Java 的循环语句输出九九乘法表
今天咱们就把for、
whil
天诺IT技术
·
2020-07-02 11:28
二进制中1的个数(位运算)
int范围也就32位,移出界就变成0了,结束
whil
IIYMGF
·
2020-07-02 03:53
剑指Offer
LeetCode刷题-160. 相交链表
ListNodeheadB){//地址相同的第一个点;ListNodestartB=headB;//为空的存在if(headA==null||headB==null){returnnull;}//不为空
whil
怪我冷i
·
2020-07-01 23:40
零基础学数据结构
acm
codeforces-102B Sum of Digits(水题)
include#include#include#include#include#includeusingnamespacestd;chars[100010];intmain(){cin>>s;intres=0;
whil
GrimCake
·
2020-07-01 09:18
codeforces
算法笔记练习 6.9 algorithm 问题 C: 数组逆置
代码#include#includeusingnamespacestd;intmain(){stringinput;
whil
gorgeoustray
·
2020-07-01 09:02
算法笔记
算法
c++
c语言
栈和队列练习—奇偶数输出
includeusingnamespacestd;intmain(){queueQ1,Q2;intn,x;cin>>n;while(n--){cin>>x;if(x%2==0)Q2.push(x);elseQ1.push(x);}
whil
耳语吖
·
2020-07-01 09:47
C
C++
判断括弧匹配
54b80308488cb6cd31000161*@param{string}str待判断的字符串*@return{boolean}是否匹配*/functiongroupCheck(str){varreg=/\{\}|\[\]|\(\)/g;
whil
云香水识
·
2020-07-01 07:54
实现一个编译器(二)
内置list,map,值的读取和设置要用[];成员读取要用.6.支持显示的局部变量定义:vara=1;表示定义a到函数作用域,(只有函数作用域,
whil
weixin_30341745
·
2020-07-01 05:44
C语言课程设计之链表,文件,指针的使用
include"string.h"inta,c;charb[20],d[10],e[10];/****函数名:IsInteger(char*a)**函数功能:输入字符'0'~'9'转化成1~9**/intIsInteger(char*a){
whil
xpj55975
·
2020-07-01 04:48
比较牛逼的正则表达式替换
engineandab=(turbowf5jet)andpd=(2001-2009),pd=(2001~2009)";//StringreturnStr=null;//StringnewStr="";//
whil
2哥的成长记录
·
2020-06-30 20:18
编程之美2.10 寻找数组中的最大值和最小值
publicstaticvoidmain(String[]args){//TODOAuto-generatedmethodstubScannerscanner=newScanner(System.in);
whil
Alex-大伟
·
2020-06-30 18:02
编程之美问题
编程之美
1、编写程序读取一个文本文件的内容,分别统计并显示文件中小写英文字母、大写英文字母及数字字符的个数。
intupperCount=0;Filef=newFile("c:/temp/input.txt");FileInputStreamfis=null;try{fis=newFileInputStream(f);
whil
zhangjiaqianghh
·
2020-06-30 13:29
一步一步学习多线程编程之CreateThread
//#include"stdafx.h"#includeinttime=0;voidThreadProc1(){inthour=0;intmins=0;
whil
狂奔的乌龟
·
2020-06-30 04:45
操作系统
队列
q=Queue.LifoQueue()foriinrange(5):q.put(i)
whil
苟雨
·
2020-06-29 22:13
日期计算
usingnamespacestd;04.05.intmain()06.{07.intnTestNum;08.intnYear,09.nMonth,10.nDay;11.12.cin>>nTestNum;13.
whil
标哥-iOS攻城狮
·
2020-06-29 19:35
ACM语言入门
后序遍历判别
boolVerifySquenceOfBST(vectorsequence){intsize=sequence.size();if(0==size)returnfalse;inti=0;while(--size){
whil
顽固的云霄
·
2020-06-29 01:42
leetcode
编程
W5L2
webuymillionsofproductseveryyear.Andjustlikeus,theseproductshavealifecycle.Older,long-establishedproductseventuallybecomelesspopular,
whil
P22131735
·
2020-06-29 00:20
day10 下载
1]dst_fname=os.path.join(dest_dir,dst_fname)html=request.urlopen(url)withopen(dst_fname,'wb')asfobj:
whil
两条小鱼
·
2020-06-28 23:28
笔记
Python打印九九乘法表
运行结果:2.for循环实现foriinrange(1,10):forjinrange(1,i+1):print("%d*%d=%2d"%(j,i,i*j),end='\t')print()运行结果:3.
whil
Betty Kudo
·
2020-06-28 19:39
Python
统计一个数字在排序数组中出现的次数
(1)classSolution:defGetNumberOfK(self,data,k):defbinary_search_lower_bound(a,x):s,e=0,len(a)-1mid=-1
whil
明月几时有.
·
2020-06-28 19:20
算法
栈的应用
==0){s.Push(num%8);num=parseInt(num/8);}
whil
weixin_34397291
·
2020-06-28 18:50
python基本概念
(表).tuple和list的主要区别在于,一旦建立,tuple的各个元素不可再变更,而list的各个元素可以再变更缩进和选择(if语句):Python最具特色的是用缩进来标明成块的代码循环for循环
whil
三江渔者
·
2020-06-28 09:39
02-JavaScript动手篇-实践
s48m2.上demo打开WebStorm之后新建项目双击New->HTMLFile2.1简单练习/*1.数值交换2.计算今天星期几3.计算1-10的乘积4.计算100以内所有不能被7整除的和5.使用do-
whil
flowerflower
·
2020-06-28 08:15
C++踩坑-模板类
public:voidsearch(stt,knum)//模板类函数只能定义于此{tar=t;key=num;}intBisearch(){intlow=1;inthigh=tar.length;intmid;
whil
huairuo
·
2020-06-27 09:05
C++
写入redis数据慢问题排查
doredis-cli-p7000infoclients;sleep1;done观察链接状态while[true];doredis-cli-p7000infomemory;sleep1;done观察内存状态
whil
十年胭脂雪
·
2020-06-27 05:38
写入redis数据慢
数组奇偶移位
includeusingnamespacestd;intmain(){inta[10]={0,5,12,8,5,19,24,3,7,34};int*p=a;int*q=a+sizeof(a)/sizeof(int)-1;inttemp;
whil
Follow_My_Heart
·
2020-06-26 23:54
Algorithm
数组0,1和数组0,1,2排序
intp1=len-1;while(p0usingnamespacestd;voidsort(int*arr,intlen){intp0=0;intp2=len-1;intp1;//找到第一个非0的位置
whil
summer2day
·
2020-06-26 15:39
笔试题
jdk1.7HashMap与jdk1.8concurrenthashmap出现的死循环问题
voidtransfer(Entry[]newTable,booleanrehash){ intnewCapacity=newTable.length; for(Entrye:table){
whil
sjs_caomei
·
2020-06-26 12:24
JAVA
心得总结
HashMap
上一页
5
6
7
8
9
10
11
12
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他