https://www.cnblogs.com/hepeng/p/8780552.html public class ShareMem { [DllImport("user32.dll", CharSet = CharSet.Auto)] public static extern IntPtr Se ...
1:添加Nlog的组件 直接在NuGet里面搜索NLog.Web.AspNetCore 2:然后就是配置服务 public class Program { public static void Main(string[] args) { CreateHostBuilder(args).Build() ...
分类:
Web程序 时间:
2021-04-27 14:26:50
阅读次数:
0
自增,自减&&逻辑运算符&&位运算符 1 package operator; 2 3 public class Demo4 { 4 public static void main(String[] args) { 5 //++ -- 自增 自减 一元运算符 6 int a=3; 7 8 int b= ...
分类:
编程语言 时间:
2021-04-27 14:20:46
阅读次数:
0
此博客链接: 题解: 找大写26个字母的位置,26个字母可以重复M个 输入为N M,N测试用例个数,M为字母重复个数, 输出字母和处于第几位 代码 public class leetcode { public static void main(String[] args) { Scanner sca ...
分类:
其他好文 时间:
2021-04-27 14:19:47
阅读次数:
0
package com.example.demo.util; /** * JDK的rt.jar包中Unsafe类提供了硬件级别的非阻塞(一个线程的失败或者挂起不应该影响其他线程的失败或挂起的算法)原子性操作, * Unsafe类中方法都是native方法,它们使用JNI的方式访问本地C++实现库。 ...
分类:
编程语言 时间:
2021-04-27 14:17:13
阅读次数:
0
保持代码单元的接口简单 限制每个代码单元的参数不能超过4个。将多个参数提取成对象。 为了保持代码的可维护性,需要限制参数的个数,避免使用过多的参数(也称为代码单元接口) 之前的JPacman项目中,BoardPanel类的render方法,拥有许多参数的典型,此方法在一个由x,y,w,h表示的矩形中 ...
分类:
其他好文 时间:
2021-04-26 14:00:52
阅读次数:
0
1. 判断是否是基础数据类型 /** * 判断是否是基础数据类型,即 int,double,long等类似格式 */ public static boolean isCommonDataType(Class clazz){ return clazz.isPrimitive(); } 2、 判断是否是 ...
分类:
其他好文 时间:
2021-04-26 13:54:00
阅读次数:
0
完全数 : 其所有因子的的和等于该数(包括1,但是不包括该数字本身) package judgment;/** * 求1~1000的所有完全数 */public class Judgment { public static void main(String[] args) { for (int i ...
分类:
其他好文 时间:
2021-04-26 13:45:19
阅读次数:
0
写一个java文件 public static void main(String[] args) { String str1="abc"; String str2 ="abc"; String str3=new String("abc"); boolean b1= str1==str2; boole ...
分类:
其他好文 时间:
2021-04-26 13:44:32
阅读次数:
0
import java.util.*; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Problem53 { public static void main(String[] args) { ...
分类:
编程语言 时间:
2021-04-26 13:44:00
阅读次数:
0