code
stringlengths
1
1.05M
repo_name
stringlengths
6
83
path
stringlengths
3
242
language
stringclasses
222 values
license
stringclasses
20 values
size
int64
1
1.05M
#!/bin/sh # defines variable git=`ls -d */` && path=`pwd` && gitpath=$path/$git # git pull cd $gitpath && git pull && sh init.sh \ && now=`git log -1 --format="%at"` \ && last=`cat $path/last` # check timestamp, if changed print git log if [ ! $last ] || [ $now -gt $last ] ; then echo "git changed!!" && echo $now>...
00fly/git-auto-push
all-in-one-cron-push.sh
Shell
apache-2.0
546
#!/bin/bash cp all-in-one-cron*.sh .. dos2unix ../*.sh && chmod +x ../*.sh
00fly/git-auto-push
init.sh
Shell
apache-2.0
76
#!/bin/sh # defines variable git=`ls -d */` && path=`pwd` && gitpath=$path/$git # git pull cd $gitpath && git pull \ && now=`git log -1 --format="%at"` \ && last=`cat $path/last` # check timestamp, if changed print git log if [ ! $last ] || [ $now -gt $last ] ; then echo "git changed!!" && echo $now>$path/last && e...
00fly/git-auto-push
run.sh
Shell
apache-2.0
369
QT += core gui network greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 # The following define makes your compiler emit warnings if you use # any Qt feature that has been marked deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in...
2201_75373101/CloudFileManagementSystem
Client/Client.pro
QMake
unknown
1,330
#include "chat.h" #include "protocol.h" #include "ui_chat.h" #include "client.h" Chat::Chat(QWidget *parent) : QWidget(parent), ui(new Ui::Chat) { ui->setupUi(this); setAttribute(Qt::WA_QuitOnClose, false); } Chat::~Chat() { delete ui; } void Chat::updateShowContent(QString strMsg) { ui->show...
2201_75373101/CloudFileManagementSystem
Client/chat.cpp
C++
unknown
920
#ifndef CHAT_H #define CHAT_H #include <QWidget> namespace Ui { class Chat; } class Chat : public QWidget { Q_OBJECT public: explicit Chat(QWidget *parent = nullptr); ~Chat(); QString m_strChatName; void updateShowContent(QString strMsg); void setChatName(QString strName); private slots: ...
2201_75373101/CloudFileManagementSystem
Client/chat.h
C++
unknown
400
#include <QFile> #include <QDebug> #include <QHostAddress> #include <QMessageBox> #include "client.h" #include "protocol.h" #include "ui_client.h" #include "index.h" Client::Client(QWidget *parent): QWidget(parent), ui(new Ui::Client) { ui->setupUi(this); rh = new ResHandler(); loadConfig(); //加载配置 co...
2201_75373101/CloudFileManagementSystem
Client/client.cpp
C++
unknown
4,954
#ifndef CLIENT_H #define CLIENT_H #include <QWidget> #include <QTcpSocket> #include "protocol.h" #include "index.h" #include "reshandler.h" QT_BEGIN_NAMESPACE namespace Ui { class Client; } QT_END_NAMESPACE class Client : public QWidget { Q_OBJECT public: ~Client(); static Client& getInstance(); // 单...
2201_75373101/CloudFileManagementSystem
Client/client.h
C++
unknown
1,326
#include "client.h" #include "file.h" #include "ui_file.h" #include <QInputDialog> #include <QMessageBox> File::File(QWidget *parent) : QWidget(parent), ui(new Ui::File) { ui->setupUi(this); m_strUserPath = QString("%1/%2").arg(Client::getInstance().getRootPath()).arg(Client::getInstance().m_strLoginName); ...
2201_75373101/CloudFileManagementSystem
Client/file.cpp
C++
unknown
987
#ifndef FILE_H #define FILE_H #include <QWidget> namespace Ui { class File; } class File : public QWidget { Q_OBJECT public: explicit File(QWidget *parent = nullptr); ~File(); QString m_strUserPath; QString m_strCurPath ; private slots: void on_mkdir_PB_clicked(); private: Ui::File *u...
2201_75373101/CloudFileManagementSystem
Client/file.h
C++
unknown
344
#include "friend.h" #include "protocol.h" #include "ui_friend.h" #include "client.h" #include <QInputDialog> #include <QMessageBox> Friend::Friend(QWidget *parent) : QWidget(parent), ui(new Ui::Friend) { ui->setupUi(this); m_pOnlineUser = new OnlineUser; m_pChat = new Chat; flushFriend(); } Friend::~...
2201_75373101/CloudFileManagementSystem
Client/friend.cpp
C++
unknown
2,265
#ifndef FRIEND_H #define FRIEND_H #include <QWidget> #include "onlineuser.h" #include "chat.h" namespace Ui { class Friend; } class Friend : public QWidget { Q_OBJECT public: explicit Friend(QWidget *parent = nullptr); ~Friend(); OnlineUser* getOnlineUser(); void flushFriend(); void updateF...
2201_75373101/CloudFileManagementSystem
Client/friend.h
C++
unknown
663
#include "index.h" #include "ui_index.h" Index::Index(QWidget *parent) : QWidget(parent), ui(new Ui::Index) { ui->setupUi(this); } Index::~Index() { delete ui; } Index& Index::getInstance() { static Index instance; return instance; } Friend *Index::getFriend() { return ui->friendPage; } Fil...
2201_75373101/CloudFileManagementSystem
Client/index.cpp
C++
unknown
979
#ifndef INDEX_H #define INDEX_H #include <QWidget> #include "friend.h" #include "file.h" namespace Ui { class Index; } class Index : public QWidget { Q_OBJECT public: ~Index(); static Index& getInstance(); Friend* getFriend(); File * getFile (); private slots: void on_friend_PB_clicked()...
2201_75373101/CloudFileManagementSystem
Client/index.h
C++
unknown
452
#include "client.h" #include "protocol.h" #include "index.h" #include <QApplication> int main(int argc, char *argv[]) { QApplication a(argc, argv); Client::getInstance().show(); return a.exec(); }
2201_75373101/CloudFileManagementSystem
Client/main.cpp
C++
unknown
211
#include "client.h" #include "onlineuser.h" #include "ui_onlineuser.h" OnlineUser::OnlineUser(QWidget *parent) : QWidget(parent), ui(new Ui::OnlineUser) { ui->setupUi(this); setAttribute(Qt::WA_QuitOnClose, false); } OnlineUser::~OnlineUser() { delete ui; } void OnlineUser::updateOnlineUserWigetL...
2201_75373101/CloudFileManagementSystem
Client/onlineuser.cpp
C++
unknown
845
#ifndef ONLINEUSER_H #define ONLINEUSER_H #include <QListWidget> #include <QWidget> namespace Ui { class OnlineUser; } class OnlineUser : public QWidget { Q_OBJECT public: explicit OnlineUser(QWidget *parent = nullptr); ~OnlineUser(); void updateOnlineUserWigetList(QStringList& userlist); private s...
2201_75373101/CloudFileManagementSystem
Client/onlineuser.h
C++
unknown
455
#include "protocol.h" #include <stdlib.h> PDU *mkPDU(uint uiMsgType, uint uiMsgLen) { PDU* pdu = (PDU*)malloc(sizeof (PDU) + uiMsgLen); if(pdu == NULL){ //判断是否成功分配内存 exit(1); } pdu->uiMsgLen = uiMsgLen; pdu->uiPDULen = uiMsgLen + sizeof(PDU); pdu->uiMsgType = uiMsgType; return pd...
2201_75373101/CloudFileManagementSystem
Client/protocol.cpp
C++
unknown
345
#ifndef PROTOCOL_H #define PROTOCOL_H typedef unsigned int uint; enum ENUM_MSG_TYPE{ // 消息类型 ENUM_MSG_TYPE_MIN = 0, ENUM_MSG_TYPE_REGIST_REQUEST, // 注册请求 ENUM_MSG_TYPE_REGIST_RESPOND, // 注册应答 ENUM_MSG_TYPE_LOGIN_REQUEST , // 登录请求 ENUM_MSG_TYPE_LOGIN_RESPOND , // 登录应答 ENUM_MSG_TYPE_FIND_USER_...
2201_75373101/CloudFileManagementSystem
Client/protocol.h
C
unknown
1,649
#include <QMessageBox> #include "index.h" #include "reshandler.h" #include "client.h" ResHandler::ResHandler(QObject *parent) : QObject(parent) { } ResHandler::~ResHandler() { // delete pdu; } void ResHandler::regist() { bool ret; memcpy(&ret, pdu->caData, sizeof(bool)); if(ret) { QMessa...
2201_75373101/CloudFileManagementSystem
Client/reshandler.cpp
C++
unknown
4,932
#ifndef RESHANDLER_H #define RESHANDLER_H #include <QObject> #include "protocol.h" class ResHandler : public QObject { Q_OBJECT public: explicit ResHandler(QObject *parent = nullptr); ~ResHandler(); PDU* pdu; void regist(); void login(); void findUser(); void onlineUser(QString login...
2201_75373101/CloudFileManagementSystem
Client/reshandler.h
C++
unknown
531
QT += core gui network sql greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 # The following define makes your compiler emit warnings if you use # any Qt feature that has been marked deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated AP...
2201_75373101/CloudFileManagementSystem
Server/Server.pro
QMake
unknown
1,219
#include "server.h" #include <QApplication> #include "operatedb.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); OperateDB::getInstance().connect(); Server::getInstance(); // w.show(); return a.exec(); }
2201_75373101/CloudFileManagementSystem
Server/main.cpp
C++
unknown
242
#include "mytcpserver.h" #include "mytcpsocket.h" MyTcpServer &MyTcpServer::getInstance() { static MyTcpServer instance; return instance; } void MyTcpServer::incomingConnection(qintptr handle) { qDebug() << "新的客户端连接"; // 每一个新的客户端连接都其tcpSocket将存入的列表中 MyTcpSocket* pTcpSocket = new MyTcpSocket; p...
2201_75373101/CloudFileManagementSystem
Server/mytcpserver.cpp
C++
unknown
1,639
#ifndef MYTCPSERVER_H #define MYTCPSERVER_H #include "mytcpsocket.h" #include <QObject> #include <QTcpServer> class MyTcpServer : public QTcpServer { Q_OBJECT public: // 返回单例模式下的静态实例 static MyTcpServer& getInstance(); void incomingConnection(qintptr handle); void resend(char* tarName, PDU* pdu);...
2201_75373101/CloudFileManagementSystem
Server/mytcpserver.h
C++
unknown
675
#include <QString> #include "mytcpsocket.h" #include "protocol.h" #include "operatedb.h" #include "mytcpserver.h" MyTcpSocket::MyTcpSocket() { rh = new ReqHandler(); connect(this, &QTcpSocket::readyRead , this, &MyTcpSocket::recvMsg ); connect(this, &QTcpSocket::disconnected, this, &MyTcpSocket::cl...
2201_75373101/CloudFileManagementSystem
Server/mytcpsocket.cpp
C++
unknown
3,549
#ifndef MYTCPSOCKET_H #define MYTCPSOCKET_H #include "protocol.h" #include "reqhandler.h" #include <QObject> #include <QTcpSocket> class MyTcpSocket : public QTcpSocket { Q_OBJECT public: MyTcpSocket(); ~MyTcpSocket(); // 发送消息 void sendMsg(PDU* pdu); PDU* readPDU(); PDU* handleReq(PDU* pd...
2201_75373101/CloudFileManagementSystem
Server/mytcpsocket.h
C++
unknown
539
#include "operatedb.h" #include <QDebug> #include <QSqlError> #include <QSqlQuery> OperateDB &OperateDB::getInstance() { static OperateDB instance; return instance; } OperateDB::OperateDB(QObject *parent) : QObject(parent) { m_db = QSqlDatabase::addDatabase("QMYSQL"); } // 连接数据库 void OperateDB::connect()...
2201_75373101/CloudFileManagementSystem
Server/operatedb.cpp
C++
unknown
7,215
#ifndef OPERATEDB_H #define OPERATEDB_H #include <QObject> #include <QSqlDatabase> class OperateDB : public QObject { Q_OBJECT public: QSqlDatabase m_db; //数据库对象 static OperateDB& getInstance(); // 连接数据库 void connect(); ~OperateDB(); bool handleResgist (const char* name, const char* pwd);...
2201_75373101/CloudFileManagementSystem
Server/operatedb.h
C++
unknown
1,318
#include "protocol.h" #include <stdlib.h> #include <string.h> PDU *mkPDU(uint uiMsgType, uint uiMsgLen) { PDU* pdu = (PDU*)malloc(sizeof (PDU) + uiMsgLen); if(pdu == NULL) { exit(1); } memset(pdu, 0, sizeof (PDU) + uiMsgLen); pdu->uiMsgLen = uiMsgLen; pdu->uiPDULen = uiMsgLen + s...
2201_75373101/CloudFileManagementSystem
Server/protocol.cpp
C++
unknown
382
#ifndef PROTOCOL_H #define PROTOCOL_H typedef unsigned int uint; enum ENUM_MSG_TYPE{ // 消息类型 ENUM_MSG_TYPE_MIN = 0, ENUM_MSG_TYPE_REGIST_REQUEST, // 注册请求 ENUM_MSG_TYPE_REGIST_RESPOND, // 注册应答 ENUM_MSG_TYPE_LOGIN_REQUEST , // 登录请求 ENUM_MSG_TYPE_LOGIN_RESPOND , // 登录应答 ENUM_MSG_TYPE_FIND_USE...
2201_75373101/CloudFileManagementSystem
Server/protocol.h
C
unknown
1,653
#include <QDebug> #include <QDir> #include "operatedb.h" #include "reqhandler.h" #include "mytcpserver.h" ReqHandler::ReqHandler(QObject *parent) : QObject(parent) { } PDU *ReqHandler::regist() { char caName[32] = { '\0' }; char caPwd [32] = { '\0' }; memcpy(caName, pdu->caData , 32); memcpy(caP...
2201_75373101/CloudFileManagementSystem
Server/reqhandler.cpp
C++
unknown
5,569
#ifndef REQHANDLER_H #define REQHANDLER_H #include <QObject> #include "protocol.h" #include "server.h" class ReqHandler : public QObject { Q_OBJECT public: PDU* pdu; explicit ReqHandler(QObject *parent = nullptr); PDU* regist (); PDU* login (QString &m_strLoginName); PDU* findUser (...
2201_75373101/CloudFileManagementSystem
Server/reqhandler.h
C++
unknown
539
#include "server.h" #include "ui_server.h" #include "mytcpserver.h" #include <QFile> #include <QDebug> #include <QHostAddress> Server::Server(QWidget *parent): QWidget(parent), ui(new Ui::Server) { ui->setupUi(this); loadConfig(); MyTcpServer::getInstance().listen(QHostAddress(m_strIP), m_usPORT); } Ser...
2201_75373101/CloudFileManagementSystem
Server/server.cpp
C++
unknown
1,122
#ifndef SERVER_H #define SERVER_H #include <QWidget> #include <QTcpSocket> QT_BEGIN_NAMESPACE namespace Ui { class Server; } QT_END_NAMESPACE class Server : public QWidget { Q_OBJECT public: ~Server(); void loadConfig(); // 加载配置 static Server& getInstance(); QString getRootRath(); private: ...
2201_75373101/CloudFileManagementSystem
Server/server.h
C++
unknown
530
ff tianjia 跳到主要内容 GitCode Logo 帮助中心 入门指南 帮助文档 API 文档 社区支持 2.0.0 反馈 中文 主页介绍 用户中心 界面介绍 账号管理 安全管理 SSH 公钥管理 生成 GPG 公钥 访问令牌(PAT) 数据管理 组织与项目 AI社区 通用参考 计费说明 关于我们 相关协议 用户中心安全管理SSH 公钥管理 SSH 公钥管理 在 GitCode 中,您可以通过 SSH(安全外壳协议)公钥实现安全的代码托管和提交操作。SSH 公钥提供了以下优势: 便捷访问:使用 SSH 公钥后,您无需每...
111/111_fofk_zxn0223project
011.ts
TypeScript
unknown
819,400
h022.ts
111/111_fofk_zxn0223project
022.ts
TypeScript
unknown
7
0303gg
111/111_fofk_zxn0223project
0303.ts
TypeScript
unknown
6
0101.
111/111_fofk_zxn0223project
fork0202.ts
TypeScript
unknown
5
print("Hello world!!!")
2201_75539691/Python
2024.10.26-day01/test.py
Python
unknown
23
money = 50 print("当前钱包余额:",money,"元") cost_bql = 10 print("购买了冰淇淋,花费:",cost_bql,"元") cost_kl = 10 print("购买了可乐,花费:",cost_kl,"元") money -= cost_kl + cost_bql print("最终,钱包剩余:",money,"元")
2201_75539691/Python
2024.10.27-day02/test1.py
Python
unknown
260
name = "传智博客" stock_price = 19.99 stock_code = "003032" stock_price_daily_growth_factor = 1.2 growth_dats = 7 print(f"公司:{name},股票代码:{stock_code},当前股价:{stock_price}") print("每日增长系数是:%.1f,经过%d天的增长后,股价达到了:%.2f"%(stock_price_daily_growth_factor,growth_dats,(stock_price_daily_growth_factor**growth_dats*stock_price)))
2201_75539691/Python
2024.10.27-day02/test2.py
Python
unknown
400
user_name = input("请输入用户名称:") user_type = input("请输入用户类型:") print("您好:%s,您是尊贵的:%s用户,欢迎您的光临。"%(user_name,user_type))
2201_75539691/Python
2024.10.27-day02/test3.py
Python
unknown
187
# 错误示范 # import random # num = random.randint(1,10) # # if int(input("请输入你猜的数字:"))==num: # print("恭喜你,第一次猜对了!") # elif int(input("请输入你猜的数字:"))>num: # print("猜错啦,猜大了") # if int(input("请输入第二次你猜的数字:"))==num: # print("恭喜你,第二次猜对了") # elif int(input("请输入第二次你猜的数字:"))>num: # print("猜错啦,猜大了") # ...
2201_75539691/Python
2024.10.28-day03/test.py
Python
unknown
1,544
print("欢迎来到黑马儿童游乐场,儿童免费,成人收费。") age=int(input("请输入你的年龄:")) if age>= 18: print("您已成年,游玩需要补票10元") print("祝您游玩愉快")
2201_75539691/Python
2024.10.28-day03/test1.py
Python
unknown
211
print("欢迎来到黑马动物园") height=int(input("请输入你的身高(cm):")) standard = 120 if height>standard: print(f"您的身高超出{standard}cm,游玩需要购票10元") else: print("您的身高未超出%d,可以免费游玩。" % standard) print("祝您游玩愉快")
2201_75539691/Python
2024.10.28-day03/test2.py
Python
unknown
299
number = 10 if int(input("请输入第一次猜想的数字:"))==number: print("恭喜你,第一次就猜对了") elif int(input("不对,再猜一次:"))==number: print("恭喜你,第二次猜对了") elif int(input("不对,再猜最后一次:"))==number: print("恭喜你,最后一次猜对了") else: print("Sorry,全部猜错啦,我想的是:%d" % number)
2201_75539691/Python
2024.10.28-day03/test3.py
Python
unknown
394
import random num = random.randint(1,10) guess_num = int(input("请输入第一次你猜的数字:")) if guess_num == num: print("恭喜你,第一次就猜成功了!") else: if guess_num > num: print("猜错啦,第一次你猜大了") else: print("猜错啦,第一次你猜小了") guess_num = int(input("请输入第二次你猜的数字:")) if guess_num == num: print("恭喜你,第二次猜成功...
2201_75539691/Python
2024.10.28-day03/test4.py
Python
unknown
881
sum = 0 i = 1 while i <= 100: sum += i i += 1 print("%d"%sum) print(f"{sum}")
2201_75539691/Python
2024.10.30-day04/test1.py
Python
unknown
86
import random num = random.randint(1,100) guess = True count = 1 while guess: guess_num = int(input(f"输入你第{count}次要猜的数字:")) if guess_num == num: print(f"恭喜你猜对了,你一共猜了{count}次") guess = False elif guess_num > num: print("猜错啦,猜大了") count += 1 else: print(...
2201_75539691/Python
2024.10.30-day04/test2.py
Python
unknown
430
i = 1 while i <= 9: j = 1 while j <= i: print(f"\t{j}*{i}={i*j}",end='') j += 1 print( ) i += 1
2201_75539691/Python
2024.10.30-day04/test3.py
Python
unknown
127
name = "itheima is a brand of itcast" sum = 0 for x in name: if x == "a": sum += 1 print("%d"% sum)
2201_75539691/Python
2024.10.30-day04/test4.py
Python
unknown
112
num = 156 count = 0 for x in range(1,num + 1): if x % 2 == 0: count += 1 print(f"0-{num}之间有{count}个偶数")
2201_75539691/Python
2024.10.30-day04/test5.py
Python
unknown
129
## for套for i = 0 for i in range(100): print(f"表白小美的第{i+1}天") for j in range(10): print(f"第{i+1}天送的第{j+1}朵花") print(f"第{i+1}天表白成功") ## for 套 while j = 0 i = 0 for i in range(1,101): print(f"表白小美的第{i}天") while j <= 10: print(f"第{i}天送的第{j}朵花") j += 1 print(f"第{i}天表白成功") ## while...
2201_75539691/Python
2024.10.30-day04/test6.py
Python
unknown
595
for i in range(1,10): for j in range(1,i+1): print(f"\t{j}*{i}={i*j}",end='') print()
2201_75539691/Python
2024.10.30-day04/test7.py
Python
unknown
101
# import random # balance = 10000 # for i in range(1,21): # if balance != 0: # num = random.randint(1, 10) # if num < 5: # print(f"员工{i},绩效分{num},低于5,不发工资,下一位。") # continue # balance -= 1000 # print(f"向员工{i}发放工资1000元,账户余额还剩余{balance}元") # else: # p...
2201_75539691/Python
2024.10.30-day04/test8.py
Python
unknown
872
money = 5000000 name = input("请输入客户姓名:") def menu(): print("--------------主菜单--------------") print(f"{name},您好,欢迎来到黑马银行ATM。请选择操作:\n查询余额 [输入1]\n存款 [输入2]\n取款 [输入3]\n退出 [输入4]") return int(input("请输入您的选择:")) def check_balance(show_header): if show_header: print("--------------查询余额--------------...
2201_75539691/Python
2024.11.1/homework.py
Python
unknown
1,322
def welcome(): print("欢迎来到黑马程序员!\n请出示您的健康码以及72小时核酸证明!") print("请出示您的健康码以及72小时核酸证明!") welcome()
2201_75539691/Python
2024.11.1/test1.py
Python
unknown
191
def welcome (temperature): """ :param temperature:111 :return:111 """ print("欢迎来到黑马程序员!请出示您的健康码以及72小时核酸证明,并配合测量体温!") if temperature <= 37.5: print(f"体温测量中,您的体温是:{temperature}度,体温正常请进!") else: print(f"体温测量中,您的体温是:{temperature}度,需要隔离!") temperature = float(input("检测体温结果是:")) ...
2201_75539691/Python
2024.11.1/test2.py
Python
unknown
507
List1 = [21,25,21,23,22,20] List1.append(31) print(f"列表为:{List1}") List2 = [28,33,30] List1.extend(List2) print(f"列表为:{List1}") out = List1.pop(0) print(f"取出元素{out},列表为:{List1}") out = List1.pop(7) print(f"取出元素{out},列表为:{List1}") find=List1.index(31) print(f"找到下标31位置为{find}")
2201_75539691/Python
2024.11.2/test1.py
Python
unknown
342
my_list = [1,2,3,4,5,6,7,8,9,10] ## while循环 def while_even(list): my_list2 = [] i = 0 while i < len(my_list): if my_list[i]%2 == 0: my_list2.append(my_list[i]) i += 1 print(f"通过while循环,从列表:{my_list}中取出偶数,组成新列表:{my_list2}") while_even(my_list) ## for循环 def for_even(list): ...
2201_75539691/Python
2024.11.2/test2.py
Python
unknown
575
message = ("周杰伦",11,["football","music"]) age = message.index(11) print(f"年龄所在的下标位置是{age}") name = message[0] print(f"学生的姓名是{name}") football = message[2].pop(0) print(f"删除{football}后,当前元组为{message}") message[2].append("coding") print(f"当前元组为{message}")
2201_75539691/Python
2024.11.2/test3.py
Python
unknown
319
# while循环 my_str = "黑马程序员" index = 0 while index < len(my_str): print(my_str[index]) index += 1 print("------------") my_str = "周鑫程序员" for x in my_str: print(x)
2201_75539691/Python
2024.11.3/test1.py
Python
unknown
197
my_str = "itheima itcast boxuegu" count = my_str.count("it") print(f"字符串{my_str}中有{count}个it字符") new_str = my_str.replace( " ","|") print(f"字符串{my_str},被替换空格后,结果:{new_str}") new2_str = new_str.split("|") print(f"字符串{new_str},按照|分隔后,得到{new2_str}")
2201_75539691/Python
2024.11.3/test2.py
Python
unknown
318
my_str = "万过薪月,员序程马黑来,nohtyP学" # result = my_str[9:4:-1] # print(f"{result}") # # # result = my_str.replace("来,",",") # my_str = result.split(",") # result1 = my_str[1] # result2 = result1[::-1] # print(f"{result2}") # 1.先倒序,再切片 result1 = my_str[::-1][9:14] print(f"第一种结果是:{result1}") # 2.先切片,再倒序 result2 = my_str[5:...
2201_75539691/Python
2024.11.3/test3.py
Python
unknown
584
x = None print(x) # 输出:None
2201_75539691/Python
2024.11.3/test4.py
Python
unknown
34
my_set = set() my_list=['黑马程序员','传智播客','黑马程序员','传智播客','itheima','itcast','itheima','itcast','best'] for x in my_list: my_set.add(x) print(f"最终的集合是{my_set}")
2201_75539691/Python
2024.11.3/test5.py
Python
unknown
208
//#include<stdio.h> // //int main(){ // int num = 0; // for (num = 1; num <= 100; num++) { // if (num % 3 == 0) { // printf("%d\n", num); // } // } // return 0; //}
2201_75539691/C
2024.10.22/test1.c
C
unknown
168
#include<stdio.h> #define _CRT_SECURE_NO_WARNINGS 1 //int main() { // int a, b, c = 0; // scanf("%d %d %d", &a, &b, &c); // if (a > b && a > c) { // if (b > c) { // printf("%d %d %d", a,b,c); // } // else { // printf("%d %d %d",a,c,b ); // } // } // else if (b > a && b > c){ // if (a > c) { // printf("%d %d ...
2201_75539691/C
2024.10.22/test2.c
C
unknown
526
//#include<stdio.h> //#define _CRT_SECURE_NO_WARNINGS 1 //int main() { // int a = 0; // float sum = 0; // for (a = 1; a <= 100; a++) { // if (a % 2 == 0) { // sum -= 1.0 / a; // } // else { // sum += 1.0 / a; // } // } // printf("%f", sum); // return 0; //}
2201_75539691/C
2024.10.22/test3.c
C
unknown
266
//#include<stdio.h> //#define _CRT_SECURE_NO_WARNINGS 1 //int main() { // int num = 0; // for (int i = 1; i <= 100; i++) { // if (i % 10 == 9) { // num++; // } // if(i/10==9){ // num++; // } // } // printf("%d",num); // return 0; //}
2201_75539691/C
2024.10.22/test4.c
C
unknown
242
//#include<stdio.h> //#define _CRT_SECURE_NO_WARNINGS 1 //int main() { // int year = 0; // for (year = 1000; year <= 2000; year++) { // if ((year % 4 == 0 && year % 100 != 0) || year / 400 == 0) { // printf("%d\n", year); // } // } // return 0; //}
2201_75539691/C
2024.10.22/test5.c
C
unknown
253
#include<stdio.h> #define _CRT_SECURE_NO_WARNINGS 1 int main() { int i = 0; int count = 0; for (i = 1; i <= 100; i++) { if (i % 10 == 9) count++; if (i / 10 == 9) count++; } printf("%d\n", count); return 0; }
2201_75539691/C
2024.10.22/test6.c
C
unknown
227
#include<stdio.h> #define _CRT_SECURE_NO_WARNINGS 1 //int main2() { // for (int i = 1; i <= 9; i++) { // for (int j = 1; j <= i; j++) { // printf("%d*%d=%d ", i, j, i * j); // } // printf("\n"); // } // return 0; //} //int main() { // int a, b; // int maxnum = 0; // scanf("%d %d",&a,&b); // for (int i = 1; i <= ...
2201_75539691/C
2024.10.24/test.c
C
unknown
440
#include<stdio.h> #define _CRT_SECURE_NO_WARNINGS 1 //int main2() { // int a, b; // int maxnum = 0; // scanf_s("%d %d", &a, &b); // for (int i = 1; i <= b; i++) { // if (a % i == 0 && b % i == 0) { // maxnum = i; // } // } // printf("%d", maxnum); // return 0; //} int main() { int temp = 1; for (int i = 100; i <...
2201_75539691/C
2024.10.24/test2.c
C
unknown
492
#define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> //int main() { // int n; // while (scanf("%d", &n) != EOF) { // for (int i = 0; i < n; i++) { // for (int j = 0; j < n; j++) { // if (i == 0 || i == n - 1) { // printf("* "); // } // else if(j ==0||j==n-1){ // printf("* "); // }else { // p...
2201_75539691/C
2024.10.29/test2.c
C
unknown
398
//#define _CRT_SECURE_NO_WARNINGS 1 //#include <stdio.h> // //int main() { // // int m, n; // scanf("%d %d", &m, &n); // int arr[10][10]; // for (int i = 0; i < m; i++) { // for (int j = 0; j < n; j++) { // scanf("%d", &arr[i][j]); // } // } // // for (int j = 0; j < n; j++) { // for (int i = 0; i < m; i++) { // ...
2201_75539691/C
2024.10.29/test3.c
C
unknown
445
#define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> int main() { int n, m; scanf("%d %d", &n, &m); int arr1[1000] = {0}; int arr2[1000] = {0}; for (int i = 0; i < n; i++) { scanf("%d", &arr1[i]); } for (int i = 0; i < m; i++) { scanf("%d", &arr2[i]); } int i = 0; int j = 0; while (i < n && j < m) { if...
2201_75539691/C
2024.10.29/test4_1.c
C
unknown
560
//#define _CRT_SECURE_NO_WARNINGS 1 //#include <stdio.h> // //int main() { // int n, m; // scanf("%d %d", &n, &m); // int arr1[100]; // int arr2[100]; // for (int i = 0; i < n; i++) { // scanf("%d", &arr1[i]); // } // for (int j = 0; j < n; j++) { // scanf("%d", &arr2[j]); // } // // // // return 0; //}
2201_75539691/C
2024.10.29/test5.c
C
unknown
307
#define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> # if 0 int main() { for (int i = 1; i <= 9; i++) { for (int j = 1; j <= i; j++) { printf("\t%d*%d=%d ", j, i, i * j); } printf("\n"); } return 0; } #endif
2201_75539691/C
2024.10.30/test.c
C
unknown
223
#define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> void init(int arr[],int size) { for (int i = 0; i < size; i++) { arr[i] = 0; } } void print(int arr[],int size) { for (int i = 0; i < size; i++) { printf("%d ", arr[i]); } printf("\n"); } void reverse(int arr[], int size) { for (int i = 0; i < size / 2; ...
2201_75539691/C
2024.10.31/test5.c
C
unknown
652
#define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> void antiString(char *arr) { int len = strlen(arr) - 1; while (len >= 0) { printf("%c", arr[len]); printf("\n"); len--; } } int main1() { char str[] = "1,2,3,4,5,6,7,8,9,10"; char* arr = str; antiString(arr); return 0; }
2201_75539691/C
2024.11.26/test1.c
C
unknown
289
#define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> void rotation(char* arr, int k) { char arr2[100]; int len = strlen(arr); for (int i = 0; i < len; i++) { arr2[i] = arr[(i + k) % len]; } arr2[len] = '\0'; printf("%s", arr2); } int main2() { char arr[] = "ABCD"; char* str = arr; rotation(str, 2); retu...
2201_75539691/C
2024.11.26/test2.c
C
unknown
327
#define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> int main5() { unsigned long pulArray[] = { 6, 7, 8, 9, 10 }; unsigned long* pulPtr; pulPtr = pulArray; *(pulPtr + 3) += 3; printf("%d, %d\n", *pulPtr, *(pulPtr + 3)); return 0; }
2201_75539691/C
2024.11.26/test5.c
C
unknown
237
#define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> void Reverse(char* str) { char* left = str; char* right = str + strlen(str) - 1; while (left < right) { char tmp = *left; *left = *right; *right = tmp; left++; right--; } } int main6() { char str[10000] = { ...
2201_75539691/C
2024.11.26/test6.c
C
unknown
421
#define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> #include <string.h> //void leftRound(char* str, int k) { // int len = strlen(str); // int time = k % len; // // for (int i = 0; i < time; i++) { // char tmp = str[0]; // int j = 0; // for (; j < len - 1; j++) { // str[j] = str...
2201_75539691/C
2024.11.26/test8.c
C
unknown
495
#define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> void leftRound(char* str, int k) { int len = strlen(str); int time = k % len; char tmp[256] = { 0 }; strcpy(tmp, str + time); strncat(tmp, str, time); strcpy(str, tmp); } int main() { char str[] = "abcdef"; leftRound(str, 7); p...
2201_75539691/C
2024.11.26/test9.c
C
unknown
355
#define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> int main2() { int n = 7; int i = 0; int j = 0; for (i = 1; i <= n; i++) { for (j = 1; j <= n-i; j++) { printf(" "); } for (j = 1; j < 2 * i; j++) { printf("*"); } printf("\n"); } for (i = n - 1; i >= 1; i--) { for (j = 1; j <= n - i; j++) { ...
2201_75539691/C
2024.11.3/test2.c
C
unknown
427
#define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> int count (int n) { int count = 0; while (n) { n = n & (n - 1); count++; } return count; } int main2() { int n = 0; scanf("%d", &n); int result = count(n); printf("%d", result); return 0; }
2201_75539691/C
2024.11.5/test2.c
C
unknown
258
#define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> int main() { int a, b; scanf("%d %d", &a, &b); int c = a ^ b; int count = 0; while (c) { c = c & (c - 1); count++; } printf("%d", count); return 0; }
2201_75539691/C
2024.11.5/test3.c
C
unknown
253
#define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> /* 在一个整型数组中,只有一个数字出现一次,其他数组都是成对出现的,请找出那个只 出现一次的数字。 例如:数组中有:123451234,只有5出现一次,其他数字都出现2次,找出5 */ int find(int arr[], int len) { int result = 0; for (int i = 0; i < len; i++) { result ^= arr[i]; } return result; } main1() { int arr[9] = { 1, 2, 3, 4, 5, 1, 2, 3...
2201_75539691/C
2024.11.6/test.c
C
unknown
580
package com.hmall.cart; import com.hmall.api.config.DefaultFeignConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.openfeign.EnableFeignClients; @MapperScan("...
2201_75631765/hmall
car-service/src/main/java/com/hmall/cart/CarApplication.java
Java
unknown
615
package com.hmall.cart.controller; import com.hmall.cart.domain.dto.CartFormDTO; import com.hmall.cart.domain.po.Cart; import com.hmall.cart.domain.vo.CartVO; import com.hmall.cart.service.ICartService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.Ap...
2201_75631765/hmall
car-service/src/main/java/com/hmall/cart/controller/CartController.java
Java
unknown
1,666
package com.hmall.cart.domain.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data @ApiModel(description = "新增购物车商品表单实体") public class CartFormDTO { @ApiModelProperty("商品id") private Long itemId; @ApiModelProperty("商品标题") private String...
2201_75631765/hmall
car-service/src/main/java/com/hmall/cart/domain/dto/CartFormDTO.java
Java
unknown
577
package com.hmall.cart.domain.po; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; import java.io.Serializable; import ...
2201_75631765/hmall
car-service/src/main/java/com/hmall/cart/domain/po/Cart.java
Java
unknown
1,335
package com.hmall.cart.domain.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.time.LocalDateTime; /** * <p> * 订单详情表 * </p> * * @author 虎哥 * @since 2023-05-05 */ @Data @ApiModel(description = "购物车VO实体") public class CartVO { @ApiMo...
2201_75631765/hmall
car-service/src/main/java/com/hmall/cart/domain/vo/CartVO.java
Java
unknown
1,106
package com.hmall.cart.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.hmall.cart.domain.po.Cart; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Update; /** * <p> * 订单详情表 Mapper 接口 * </p> * * @author 虎哥 * @since 2023-05-05 */ public interface CartMa...
2201_75631765/hmall
car-service/src/main/java/com/hmall/cart/mapper/CartMapper.java
Java
unknown
548
package com.hmall.cart.service; import com.baomidou.mybatisplus.extension.service.IService; import com.hmall.cart.domain.dto.CartFormDTO; import com.hmall.cart.domain.po.Cart; import com.hmall.cart.domain.vo.CartVO; import java.util.Collection; import java.util.List; /** * <p> * 订单详情表 服务类 * </p> * * @author 虎哥...
2201_75631765/hmall
car-service/src/main/java/com/hmall/cart/service/ICartService.java
Java
unknown
559
package com.hmall.cart.service.impl; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.hmall.api.client.ItemClient; import com.hmall.api.dto.ItemDTO; import com.hmall.cart.domain.dto.Car...
2201_75631765/hmall
car-service/src/main/java/com/hmall/cart/service/impl/CartServiceImpl.java
Java
unknown
4,840
package com.hmall.api.client; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.RequestParam; import java.util.Set; /** * author Link * * @version 1.0 * @date 2025/3/12 9:58 */ @FeignClient("cart-s...
2201_75631765/hmall
hm-api/src/main/java/com/hmall/api/client/CartClient.java
Java
unknown
456