- 博客(32)
- 资源 (1)
- 收藏
- 关注
原创 fedora35安装mysql 配置jdk18
配置jdk18很简单,下载jdk,只需要.tar.gz结尾的文件就行,https://download.oracle.com/java/18/latest/jdk-18_linux-x64_bin.tar.gz然后只要在/etc/profile文件里加入下列代码就行#这个java_home就是解压后,java文件夹地址export JAVA_HOME=/usr/local/java/jdk1.8.0_121export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JA
2022-04-05 23:08:07
1554
原创 springboot中@ConfigurationProperties的用法
@ConfigurationProperties(prefix="db")可以用两种方式把properties里的内容读取到类里去:第一种,如果是自己写的类,就把这个注解放到写的类的最前面,然后,类里的变量就会被自动填充。第二种,如果不是自己写的类,但是知道里面有几个变量,就在新建这个类的对象的之前加入@ConfigurationProperties(prefix="db")这一行代码,类里的变量也会被自动填充。...
2022-03-29 22:27:51
2065
原创 python修改excel表格
# This is a sample Python script.# Press Shift+F10 to execute it or replace it with your code.# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.import xlrdimport xlwtfrom xlwt import Workbookimport os.
2022-03-26 10:28:51
3995
原创 python读文件,写文件,数组,遍历目录
# This is a sample Python script.# Press Shift+F10 to execute it or replace it with your code.# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.import xlrdimport xlwtfrom xlwt import Workbookimport os.
2022-03-26 01:30:23
1182
原创 python读写excel文件(xls格式)
from xlutils.copy import copyimport xlrdimport os.path# 修改xls文件里的单元格# rb = xlrd.open_workbook('c:\\1.xls') # 打开1.xls文件# wb = copy(rb) # 利用xlutils.copy下的copy函数复制# ws = wb.get_sheet(0) # 获取表单0# ws.write(30, 0, label='好的') # 增加(8,0)的值# wb.save.
2022-03-25 20:36:22
3136
原创 设置国内maven镜像仓库
国外的镜像仓库访问慢,所以在打开新的maven项目或者用idea下载相关插件的时候,速度很慢,更改maven仓库地址,改成阿里巴巴的,就能加快反应速度了。找到idea安装目录,我的是sC:\Program Files\JetBrains\IntelliJ IDEA 2018.2.2\plugins\maven\lib\maven3\conf,然后在里面有一个settings.xml的文件,打开这个文件,找到<mirrors>标签,在里面加上阿里的镜像就可以了。<mirrors
2022-03-21 22:46:12
5167
原创 springboot+mybatis+mysql最简单实例
在第一步:新建一个工程下面一页,直接点finish,就行了。第二步,编辑pom.xml文件,因为我一开始就选了mybatis和mysql,所以里面已经有了这两项依赖我这里另外添加了一个mybatis自动生成的插件。 <plugin> <groupId>org.mybatis.generator</groupId> <artifactId&...
2022-03-21 13:34:11
2394
原创 springboot+mybatis自学一定记住
如果要在主程序访问其它包,一定要在主程序的最前面加上@SpringBootApplication@ComponentScan(basePackages = "com.example")
2022-03-19 14:35:12
277
原创 gitee项目更新代码
第一步,打开项目目录。然后,在目录里打开git bash然后,在弹出的窗口里输入git add . (如果是第一次就是git add '项目地址')然后,提次更改, git commit -a -m "更改的内容简述"。然后,把提交的内容推送到网站,git push origin master...
2022-03-18 17:05:36
1645
原创 使用com.alibaba里面的druid连接数据库
1、添加依赖: <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <scope>runtime</scope> </dependency> <dependency&..
2022-03-18 16:48:42
2578
原创 springboot热布署
首先要在pom.xml里加入依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependenc
2022-03-18 15:06:27
455
原创 springboot中application.properties参数传递
第一种,可以在某一个类里面定义:@Setter@Getter@ToString//自己写的类,就能在类里面直接定义并调用application.properties里的参数@Component@ConfigurationProperties(prefix = "spring.datasource")public class MyConnection { private String name; private String username; private Stri
2022-03-18 14:50:06
686
原创 通过idea发布一个最简单的springboot项目
建好的可以运行的springboot项目打包,双击右边的package,就会生成一个jar文件,如上图。然后点右键,在菜单里选show in explorer,如图然后在地址栏里输入cmd,打开cmd窗口,再在窗口里调用这个jar包,就可以使用这个项目 了,如图。...
2022-03-16 15:07:37
583
原创 mysql8.0密码重置
mysql密码忘了,以下步骤可以找回密码。1、打开一个cmd窗口,输入net stop mysql(关掉mysql服务)2、打开一个新的cmd窗口(win+R),然后进入mysql的安装目录下的bin目录,然后输入mysqld --skip-grant-tables --shared-memory --console,跳过密码--shared-memory一定要加,不加,进不去,--console则是让服务以命令行的模式启动,这样,可以看到启动记录(可加可不加)。然后再开一个新的cmd.
2022-03-11 16:18:04
5550
原创 Image和byte[]的转换
image到byte[] 用到memoryStream类 public byte[] imageToByteArray(System.Drawing.Image imageIn){ MemoryStream ms = new MemoryStream(); imageIn.Save(ms,System.Drawing.Imaging.ImageFormat.Gif); retur
2008-10-17 00:01:00
510
原创 得到文本框的值
int num1=0,num2,num3; TCHAR ch1[10],ch2[10],*pch3; CString str1,str2,str3; /*this->GetDlgItem(IDC_EDIT1)->GetWindowTextW(str1); this->GetDlgItem(IDC_EDIT2)->GetWin
2008-06-13 14:10:00
817
原创 string
num1=::_ttoi((LPCTSTR)str1);//string to intstr3.Format(_T("%d"),num3);//int to string使用 unicode 码的时候。要在字符或字符串 的前面 加上 L 。或者 写成 _T("this is a window.")形式的。strcpy 对应的 函数 为 wcscpy();CStringArray n
2008-06-13 02:48:00
438
原创 CString和int
num1=::_ttoi((LPCTSTR)str1);//string to intstr3.Format(_T("%d"),num3);//int to string
2008-06-13 02:46:00
429
原创 C#关机
[StructLayout(LayoutKind.Sequential, Pack = 1)] internal struct TokPriv1Luid { public int Count; public long Luid; public int Attr; } [DllImport("kernel32.dll", ExactSpellin
2008-05-29 14:51:00
616
原创 VC里对画图设备的调用的几种方法!!
/*HDC hdc; hdc=::GetDC(this->m_hWnd); ::MoveToEx(hdc,pt1.x,pt1.y,NULL); ::LineTo(hdc,point.x,point.y); ::ReleaseDC(m_hWnd,hdc);*/ /*CDC *pcd=GetDC(); pcd->MoveTo(pt1); pcd->LineTo(point); ReleaseDC(p
2008-05-19 00:04:00
471
原创 C#改IP
using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.Management;using System.Runtime.InteropServices;na
2007-12-26 20:17:00
1502
1
原创 C#操作数据库
using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.Data.SqlClient;namespace WindowsApplication2...{ /
2007-12-23 11:50:00
476
原创 C#用wmi读硬件,cpu,声卡,网卡,显卡
using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.Management;using System.Text;namespace WindowsAppl
2007-12-18 22:55:00
2722
原创 C#得到文件夹及文件大小
using System;using System.Text;using System.Runtime.InteropServices;using System.IO;namespace ConsoleApplication1...{ /**//// /// Class1 的摘要说明。 /// class Class1 ...{ private
2007-12-16 19:59:00
3287
1
原创 C#画图
using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using System.Runtime.InteropServices;namespace WindowsApplicati
2007-12-14 16:47:00
1196
原创 C#调用外部程序
using System;using System.Diagnostics;namespace WindowsApplication2...{ public class Form1 : System.Windows.Forms.Form ...{ public Form1() ...{ } [STAThread]
2007-12-14 11:10:00
754
原创 C#写注册表
using System;using System.Drawing;using System.Collections;using System.ComponentModel;using System.Windows.Forms;using System.Data;using Microsoft.Win32;namespace WindowsApplication1...{ /**/
2007-12-12 22:56:00
1012
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人