JTS Self-intersection异常TopologyException: side location conflict解决办法

news2024/11/15 21:46:27

JTS Self-intersection异常TopologyException: side location conflict解决办法

举例:问题围栏

MULTIPOLYGON (((114.0905685 32.1120567, 114.0905685 32.112957, 114.0905685 32.1138535, 114.0905685 32.1147537, 114.0905685 32.115654, 114.0905685 32.1165543, 114.0905685 32.1174507, 114.0905685 32.118351, 114.0905685 32.1192513, 114.0905685 32.1201515, 114.0905685 32.121048, 114.0914612 32.121048, 114.0914612 32.1212578, 114.0918121 32.121048, 114.0923615 32.1207199, 114.0932617 32.1201782, 114.0933151 32.1201515, 114.094162 32.1196404, 114.0948181 32.1192513, 114.0950623 32.1191025, 114.0959625 32.1185646, 114.0963135 32.118351, 114.0967636 32.118084, 114.0968628 32.118042, 114.0977631 32.1176682, 114.0982666 32.1174507, 114.0986557 32.1172905, 114.099556 32.1169128, 114.1004105 32.1165543, 114.1004562 32.1165352, 114.1013565 32.1161575, 114.1022568 32.1157799, 114.1025543 32.115654, 114.1022568 32.115654, 114.1013565 32.115654, 114.1004562 32.115654, 114.099556 32.115654, 114.099556 32.1165543, 114.0986557 32.1165543, 114.0986557 32.115654, 114.0977631 32.115654, 114.0968628 32.115654, 114.0968628 32.1147537, 114.0977631 32.1147537, 114.0986557 32.1147537, 114.099556 32.1147537, 114.099556 32.1138535, 114.1004562 32.1138535, 114.1004562 32.112957, 114.1013565 32.112957, 114.1013565 32.1120567, 114.1022568 32.1120567, 114.1022568 32.1111565, 114.103157 32.1111565, 114.103157 32.1102562, 114.1040573 32.1102562, 114.1040573 32.1093597, 114.103157 32.1093597, 114.103157 32.1084595, 114.1040573 32.1084595, 114.1040573 32.1075592, 114.103157 32.1075592, 114.103157 32.1066589, 114.1040573 32.1066589, 114.1049576 32.1066589, 114.1049576 32.1057625, 114.1049576 32.1048622, 114.1058502 32.1048622, 114.1058502 32.1039619, 114.1067505 32.1039619, 114.1067505 32.1030617, 114.1076508 32.1030617, 114.108551 32.1030617, 114.108551 32.1021652, 114.1094513 32.1021652, 114.1103516 32.1021652, 114.1103516 32.101265, 114.1103516 32.1003647, 114.1103516 32.0994644, 114.1103516 32.098568, 114.1103516 32.0976677, 114.1112518 32.0976677, 114.1112518 32.0967674, 114.1103516 32.0967674, 114.1094513 32.0967674, 114.108551 32.0967674, 114.108551 32.0958672, 114.108551 32.0949707, 114.108551 32.0940704, 114.1076508 32.0940704, 114.1076508 32.0949707, 114.1067505 32.0949707, 114.1067505 32.0958672, 114.1058502 32.0958672, 114.1058502 32.0949707, 114.1049576 32.0949707, 114.1040573 32.0949707, 114.1040573 32.0940704, 114.103157 32.0940704, 114.1022568 32.0940704, 114.1022568 32.0949707, 114.1022568 32.0958672, 114.1022568 32.0967674, 114.1013565 32.0967674, 114.1013565 32.0976677, 114.1004562 32.0976677, 114.1004562 32.098568, 114.099556 32.098568, 114.099556 32.0994644, 114.0986557 32.0994644, 114.0986557 32.1003647, 114.0977631 32.1003647, 114.0977631 32.101265, 114.0977631 32.1021652, 114.0986557 32.1021652, 114.0986557 32.1030617, 114.099556 32.1030617, 114.1004562 32.1030617, 114.1004562 32.1039619, 114.099556 32.1039619, 114.099556 32.1048622, 114.1004562 32.1048622, 114.1004562 32.1057625, 114.1004562 32.1066589, 114.1004562 32.1075592, 114.099556 32.1075592, 114.099556 32.1066589, 114.0986557 32.1066589, 114.0986557 32.1075592, 114.0977631 32.1075592, 114.0977631 32.1084595, 114.0968628 32.1084595, 114.0968628 32.1093597, 114.0959625 32.1093597, 114.0950623 32.1093597, 114.0950623 32.1102562, 114.094162 32.1102562, 114.094162 32.1111565, 114.0932617 32.1111565, 114.0932617 32.1102562, 114.0923615 32.1102562, 114.0923615 32.1111565, 114.0914612 32.1111565, 114.0914612 32.1120567, 114.0905685 32.1120567)), ((114.0752768 32.1282442, 114.0752768 32.1291435, 114.0752768 32.1300428, 114.0752768 32.1309422, 114.0761761 32.1309422, 114.0761761 32.1318415, 114.0761761 32.1327408, 114.0761761 32.1336401, 114.0761761 32.133748, 114.0763593 32.1336401, 114.0770754 32.1332181, 114.0778854 32.1327408, 114.0779748 32.1326881, 114.0788741 32.1321582, 114.0794116 32.1318415, 114.079594 32.131734, 114.0797734 32.1315036, 114.0802106 32.1309422, 114.0806727 32.1303487, 114.0809109 32.1300428, 114.081237 32.129624, 114.0815721 32.1293581, 114.0818426 32.1291435, 114.0824714 32.1286446, 114.082976 32.1282442, 114.0833707 32.1279311, 114.0841095 32.1273449, 114.08427 32.1272175, 114.084858 32.126751, 114.0851693 32.1264867, 114.0852177 32.1264456, 114.0860687 32.1257232, 114.0862772 32.1255462, 114.086968 32.1249597, 114.0873365 32.1246469, 114.0878673 32.1241962, 114.0883958 32.1237476, 114.0887666 32.1234328, 114.0894551 32.1228483, 114.0896659 32.1226693, 114.090108 32.122294, 114.0904915 32.121949, 114.0905653 32.1218826, 114.090855 32.121622, 114.0914646 32.121257, 114.0914646 32.1210496, 114.0905653 32.1210496, 114.0905653 32.1201503, 114.0905653 32.119251, 114.0905653 32.1183517, 114.0905653 32.1174523, 114.0896659 32.1174523, 114.0896659 32.1183517, 114.0896659 32.119251, 114.0887666 32.119251, 114.0887666 32.1201503, 114.0887666 32.1210496, 114.0878673 32.1210496, 114.0878673 32.121949, 114.0878673 32.1228483, 114.0878673 32.1237476, 114.086968 32.1237476, 114.0860687 32.1237476, 114.0860687 32.1246469, 114.0851693 32.1246469, 114.08427 32.1246469, 114.0833707 32.1246469, 114.0833707 32.1255462, 114.0824714 32.1255462, 114.0815721 32.1255462, 114.0806727 32.1255462, 114.0806727 32.1264456, 114.0797734 32.1264456, 114.0788741 32.1264456, 114.0788741 32.1273449, 114.0779748 32.1273449, 114.0770754 32.1273449, 114.0761761 32.1273449, 114.0761761 32.1282442, 114.0752768 32.1282442)))

如图:下面的围栏存在自相交问题
在这里插入图片描述
java代码在进行集合运算时会出现以下异常信息

Exception in thread "main" org.locationtech.jts.geom.TopologyException: side location conflict [ (114.0914612, 32.1210496, NaN) ]

问题原因分析

上面的围栏,小数点后存在7位小数。精度过高。将其缩减为6为小数。
java代码

import org.locationtech.jts.geom.Geometry;
import org.locationtech.jts.geom.Point;
import org.locationtech.jts.geom.PrecisionModel;
import org.locationtech.jts.io.ParseException;
import org.locationtech.jts.precision.GeometryPrecisionReducer;

public class Test{

	public static GeometryPrecisionReducer mergeReducer =
			new GeometryPrecisionReducer(new PrecisionModel(1000000));
	
	public static void main(String[] args) throws ParseException {
		String  polyline ="MULTIPOLYGON (((114.0905685 32.1120567, 114.0905685 32.112957, 114.0905685 32.1138535, 114.0905685 32.1147537, 114.0905685 32.115654, 114.0905685 32.1165543, 114.0905685 32.1174507, 114.0905685 32.118351, 114.0905685 32.1192513, 114.0905685 32.1201515, 114.0905685 32.121048, 114.0914612 32.121048, 114.0914612 32.1212578, 114.0918121 32.121048, 114.0923615 32.1207199, 114.0932617 32.1201782, 114.0933151 32.1201515, 114.094162 32.1196404, 114.0948181 32.1192513, 114.0950623 32.1191025, 114.0959625 32.1185646, 114.0963135 32.118351, 114.0967636 32.118084, 114.0968628 32.118042, 114.0977631 32.1176682, 114.0982666 32.1174507, 114.0986557 32.1172905, 114.099556 32.1169128, 114.1004105 32.1165543, 114.1004562 32.1165352, 114.1013565 32.1161575, 114.1022568 32.1157799, 114.1025543 32.115654, 114.1022568 32.115654, 114.1013565 32.115654, 114.1004562 32.115654, 114.099556 32.115654, 114.099556 32.1165543, 114.0986557 32.1165543, 114.0986557 32.115654, 114.0977631 32.115654, 114.0968628 32.115654, 114.0968628 32.1147537, 114.0977631 32.1147537, 114.0986557 32.1147537, 114.099556 32.1147537, 114.099556 32.1138535, 114.1004562 32.1138535, 114.1004562 32.112957, 114.1013565 32.112957, 114.1013565 32.1120567, 114.1022568 32.1120567, 114.1022568 32.1111565, 114.103157 32.1111565, 114.103157 32.1102562, 114.1040573 32.1102562, 114.1040573 32.1093597, 114.103157 32.1093597, 114.103157 32.1084595, 114.1040573 32.1084595, 114.1040573 32.1075592, 114.103157 32.1075592, 114.103157 32.1066589, 114.1040573 32.1066589, 114.1049576 32.1066589, 114.1049576 32.1057625, 114.1049576 32.1048622, 114.1058502 32.1048622, 114.1058502 32.1039619, 114.1067505 32.1039619, 114.1067505 32.1030617, 114.1076508 32.1030617, 114.108551 32.1030617, 114.108551 32.1021652, 114.1094513 32.1021652, 114.1103516 32.1021652, 114.1103516 32.101265, 114.1103516 32.1003647, 114.1103516 32.0994644, 114.1103516 32.098568, 114.1103516 32.0976677, 114.1112518 32.0976677, 114.1112518 32.0967674, 114.1103516 32.0967674, 114.1094513 32.0967674, 114.108551 32.0967674, 114.108551 32.0958672, 114.108551 32.0949707, 114.108551 32.0940704, 114.1076508 32.0940704, 114.1076508 32.0949707, 114.1067505 32.0949707, 114.1067505 32.0958672, 114.1058502 32.0958672, 114.1058502 32.0949707, 114.1049576 32.0949707, 114.1040573 32.0949707, 114.1040573 32.0940704, 114.103157 32.0940704, 114.1022568 32.0940704, 114.1022568 32.0949707, 114.1022568 32.0958672, 114.1022568 32.0967674, 114.1013565 32.0967674, 114.1013565 32.0976677, 114.1004562 32.0976677, 114.1004562 32.098568, 114.099556 32.098568, 114.099556 32.0994644, 114.0986557 32.0994644, 114.0986557 32.1003647, 114.0977631 32.1003647, 114.0977631 32.101265, 114.0977631 32.1021652, 114.0986557 32.1021652, 114.0986557 32.1030617, 114.099556 32.1030617, 114.1004562 32.1030617, 114.1004562 32.1039619, 114.099556 32.1039619, 114.099556 32.1048622, 114.1004562 32.1048622, 114.1004562 32.1057625, 114.1004562 32.1066589, 114.1004562 32.1075592, 114.099556 32.1075592, 114.099556 32.1066589, 114.0986557 32.1066589, 114.0986557 32.1075592, 114.0977631 32.1075592, 114.0977631 32.1084595, 114.0968628 32.1084595, 114.0968628 32.1093597, 114.0959625 32.1093597, 114.0950623 32.1093597, 114.0950623 32.1102562, 114.094162 32.1102562, 114.094162 32.1111565, 114.0932617 32.1111565, 114.0932617 32.1102562, 114.0923615 32.1102562, 114.0923615 32.1111565, 114.0914612 32.1111565, 114.0914612 32.1120567, 114.0905685 32.1120567)), ((114.0752768 32.1282442, 114.0752768 32.1291435, 114.0752768 32.1300428, 114.0752768 32.1309422, 114.0761761 32.1309422, 114.0761761 32.1318415, 114.0761761 32.1327408, 114.0761761 32.1336401, 114.0761761 32.133748, 114.0763593 32.1336401, 114.0770754 32.1332181, 114.0778854 32.1327408, 114.0779748 32.1326881, 114.0788741 32.1321582, 114.0794116 32.1318415, 114.079594 32.131734, 114.0797734 32.1315036, 114.0802106 32.1309422, 114.0806727 32.1303487, 114.0809109 32.1300428, 114.081237 32.129624, 114.0815721 32.1293581, 114.0818426 32.1291435, 114.0824714 32.1286446, 114.082976 32.1282442, 114.0833707 32.1279311, 114.0841095 32.1273449, 114.08427 32.1272175, 114.084858 32.126751, 114.0851693 32.1264867, 114.0852177 32.1264456, 114.0860687 32.1257232, 114.0862772 32.1255462, 114.086968 32.1249597, 114.0873365 32.1246469, 114.0878673 32.1241962, 114.0883958 32.1237476, 114.0887666 32.1234328, 114.0894551 32.1228483, 114.0896659 32.1226693, 114.090108 32.122294, 114.0904915 32.121949, 114.0905653 32.1218826, 114.090855 32.121622, 114.0914646 32.121257, 114.0914646 32.1210496, 114.0905653 32.1210496, 114.0905653 32.1201503, 114.0905653 32.119251, 114.0905653 32.1183517, 114.0905653 32.1174523, 114.0896659 32.1174523, 114.0896659 32.1183517, 114.0896659 32.119251, 114.0887666 32.119251, 114.0887666 32.1201503, 114.0887666 32.1210496, 114.0878673 32.1210496, 114.0878673 32.121949, 114.0878673 32.1228483, 114.0878673 32.1237476, 114.086968 32.1237476, 114.0860687 32.1237476, 114.0860687 32.1246469, 114.0851693 32.1246469, 114.08427 32.1246469, 114.0833707 32.1246469, 114.0833707 32.1255462, 114.0824714 32.1255462, 114.0815721 32.1255462, 114.0806727 32.1255462, 114.0806727 32.1264456, 114.0797734 32.1264456, 114.0788741 32.1264456, 114.0788741 32.1273449, 114.0779748 32.1273449, 114.0770754 32.1273449, 114.0761761 32.1273449, 114.0761761 32.1282442, 114.0752768 32.1282442)))";
	
		Geometry geometry = GeometryUtil.readGeometry(polyline);
		System.out.println(geometry.isValid());
		Geometry reduce = mergeReducer.reduce(geometry);
		System.out.println(reduce);
		System.out.println(reduce.isValid());
	}
}

精度缩小到6位小数后,围栏数据

POLYGON ((114.075277 32.128244, 114.075277 32.129143, 114.075277 32.130043, 114.075277 32.130942, 114.076176 32.130942, 114.076176 32.131842, 114.076176 32.132741, 114.076176 32.13364, 114.076176 32.133748, 114.076359 32.13364, 114.077075 32.133218, 114.077885 32.132741, 114.077975 32.132688, 114.078874 32.132158, 114.079412 32.131842, 114.079594 32.131734, 114.079773 32.131504, 114.080211 32.130942, 114.080673 32.130349, 114.080911 32.130043, 114.081237 32.129624, 114.081572 32.129358, 114.081843 32.129143, 114.082471 32.128645, 114.082976 32.128244, 114.083371 32.127931, 114.08411 32.127345, 114.08427 32.127218, 114.084858 32.126751, 114.085169 32.126487, 114.085218 32.126446, 114.086069 32.125723, 114.086277 32.125546, 114.086968 32.12496, 114.087337 32.124647, 114.087867 32.124196, 114.088396 32.123748, 114.088767 32.123433, 114.089455 32.122848, 114.089666 32.122669, 114.090108 32.122294, 114.090492 32.121949, 114.090565 32.121883, 114.090855 32.121622, 114.091465 32.121257, 114.091465 32.121256, 114.091812 32.121048, 114.092362 32.12072, 114.093262 32.120178, 114.093315 32.120152, 114.094162 32.11964, 114.094818 32.119251, 114.095062 32.119102, 114.095963 32.118565, 114.096314 32.118351, 114.096764 32.118084, 114.096863 32.118042, 114.097763 32.117668, 114.098267 32.117451, 114.098656 32.117291, 114.099556 32.116913, 114.100411 32.116554, 114.100456 32.116535, 114.101357 32.116158, 114.102257 32.11578, 114.102554 32.115654, 114.102257 32.115654, 114.101357 32.115654, 114.100456 32.115654, 114.099556 32.115654, 114.099556 32.116554, 114.098656 32.116554, 114.098656 32.115654, 114.097763 32.115654, 114.096863 32.115654, 114.096863 32.114754, 114.097763 32.114754, 114.098656 32.114754, 114.099556 32.114754, 114.099556 32.113853, 114.100456 32.113853, 114.100456 32.112957, 114.101357 32.112957, 114.101357 32.112057, 114.102257 32.112057, 114.102257 32.111157, 114.103157 32.111157, 114.103157 32.110256, 114.104057 32.110256, 114.104057 32.10936, 114.103157 32.10936, 114.103157 32.10846, 114.104057 32.10846, 114.104057 32.107559, 114.103157 32.107559, 114.103157 32.106659, 114.104057 32.106659, 114.104958 32.106659, 114.104958 32.105762, 114.104958 32.104862, 114.10585 32.104862, 114.10585 32.103962, 114.106751 32.103962, 114.106751 32.103062, 114.107651 32.103062, 114.108551 32.103062, 114.108551 32.102165, 114.109451 32.102165, 114.110352 32.102165, 114.110352 32.101265, 114.110352 32.100365, 114.110352 32.099464, 114.110352 32.098568, 114.110352 32.097668, 114.111252 32.097668, 114.111252 32.096767, 114.110352 32.096767, 114.109451 32.096767, 114.108551 32.096767, 114.108551 32.095867, 114.108551 32.094971, 114.108551 32.09407, 114.107651 32.09407, 114.107651 32.094971, 114.106751 32.094971, 114.106751 32.095867, 114.10585 32.095867, 114.10585 32.094971, 114.104958 32.094971, 114.104057 32.094971, 114.104057 32.09407, 114.103157 32.09407, 114.102257 32.09407, 114.102257 32.094971, 114.102257 32.095867, 114.102257 32.096767, 114.101357 32.096767, 114.101357 32.097668, 114.100456 32.097668, 114.100456 32.098568, 114.099556 32.098568, 114.099556 32.099464, 114.098656 32.099464, 114.098656 32.100365, 114.097763 32.100365, 114.097763 32.101265, 114.097763 32.102165, 114.098656 32.102165, 114.098656 32.103062, 114.099556 32.103062, 114.100456 32.103062, 114.100456 32.103962, 114.099556 32.103962, 114.099556 32.104862, 114.100456 32.104862, 114.100456 32.105762, 114.100456 32.106659, 114.100456 32.107559, 114.099556 32.107559, 114.099556 32.106659, 114.098656 32.106659, 114.098656 32.107559, 114.097763 32.107559, 114.097763 32.10846, 114.096863 32.10846, 114.096863 32.10936, 114.095963 32.10936, 114.095062 32.10936, 114.095062 32.110256, 114.094162 32.110256, 114.094162 32.111157, 114.093262 32.111157, 114.093262 32.110256, 114.092362 32.110256, 114.092362 32.111157, 114.091461 32.111157, 114.091461 32.112057, 114.090569 32.112057, 114.090569 32.112957, 114.090569 32.113853, 114.090569 32.114754, 114.090569 32.115654, 114.090569 32.116554, 114.090569 32.117451, 114.090569 32.118351, 114.090569 32.119251, 114.090569 32.120152, 114.090569 32.121048, 114.091461 32.121048, 114.091461 32.12105, 114.090565 32.12105, 114.090565 32.12015, 114.090565 32.119251, 114.090565 32.118352, 114.090565 32.117452, 114.089666 32.117452, 114.089666 32.118352, 114.089666 32.119251, 114.088767 32.119251, 114.088767 32.12015, 114.088767 32.12105, 114.087867 32.12105, 114.087867 32.121949, 114.087867 32.122848, 114.087867 32.123748, 114.086968 32.123748, 114.086069 32.123748, 114.086069 32.124647, 114.085169 32.124647, 114.08427 32.124647, 114.083371 32.124647, 114.083371 32.125546, 114.082471 32.125546, 114.081572 32.125546, 114.080673 32.125546, 114.080673 32.126446, 114.079773 32.126446, 114.078874 32.126446, 114.078874 32.127345, 114.077975 32.127345, 114.077075 32.127345, 114.076176 32.127345, 114.076176 32.128244, 114.075277 32.128244))

JTS TestBuilder检查围栏是否有效(如下图所示,已经正常)

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/855593.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

深入理解Go语言中的并发编程【30】【多路复用】

文章目录 多路复用 多路复用 操作系统级的I/O模型有: 阻塞I/O非阻塞I/O信号驱动I/O异步I/O多路复用I/O   Linux下,一切皆文件。包括普通文件、目录文件、字符设备文件(键盘、鼠标)、块设备文件(硬盘、光驱&#xff…

【LeetCode】按摩师

按摩师 题目描述算法分析编程代码 链接: 按摩师 题目描述 算法分析 编程代码 class Solution { public:int massage(vector<int>& nums) {int n nums.size();if(n 0) return 0;vector<int> f(n);auto g f;f[0] nums[0];for(int i 1;i<n;i){f[i] g[i…

Winform中DatagridView 表头实现一个加上一个checkBox,实现全选选项功能

实现效果 点击checkBox1或者直接在第一列列表头点击即可实现 代码实现 我的datagridview叫dgv 我在datagridview已经默认添加了一个DataGridViewCheckBoxColumn&#xff0c;勾选时value为1&#xff0c;不勾选时value为0 第一种通过可视化拖动一个checkBox来实现 拖动组…

ElasticSearch单节点部署

&#x1f388; 作者&#xff1a;互联网-小啊宇 &#x1f388; 简介&#xff1a; CSDN 运维领域创作者、阿里云专家博主。目前从事 Kubernetes运维相关工作&#xff0c;擅长Linux系统运维、开源监控软件维护、Kubernetes容器技术、CI/CD持续集成、自动化运维、开源软件部署维护…

餐饮管理系统ssm酒店饭店仓库进销存jsp源代码mysql

本项目为前几天收费帮学妹做的一个项目&#xff0c;Java EE JSP项目&#xff0c;在工作环境中基本使用不到&#xff0c;但是很多学校把这个当作编程入门的项目来做&#xff0c;故分享出本项目供初学者参考。 一、项目描述 餐饮管理系统ssm 系统有1权限&#xff1a;管理员 二…

使用MethodInterceptor和ResponseBodyAdvice做分页处理

目录 一、需求 二、代码实现 父pom文件 pom文件 配置文件 手动注册SqlSessionFactory&#xff08;MyBatisConfig &#xff09; 对象 实体类Users 抽象类AbstractQuery 查询参数类UsersQuery 三层架构 UsersController UsersServiceImpl UsersMapper UsersMapper.…

C++项目:在线五子棋对战网页版--session管理模块开发

session 在WEB开发中&#xff0c;HTTP协议是⼀种⽆状态短链接的协议&#xff0c;这就导致⼀个客⼾端连接到服务器上之后&#xff0c;服务器不知道当前的连接对应的是哪个用户&#xff0c;也不知道客⼾端是否登录成功&#xff0c;这时候为客⼾端提所有服务是不合理的。因此&am…

微信昵称后面的“小耳朵”,原来有这么多用处,让我带你涨知识

微信昵称后面的“小耳朵”&#xff0c;原来有这么多用处&#xff0c;让我带你涨知识 大家都知道&#xff0c;在微信昵称后面加上一个"小耳朵"符号是一种常见的表达方式&#xff0c;但你知道吗&#xff1f;这个看似简单的符号其实有着丰富的用处和意义。让我带你了解…

java中io流、属性集Properties、缓冲流、转换流、序列化和反序列化、打印流、网络编程(TCP通信程序、文件复制案例、文件上传案例、B/S服务案例)

IO流&#xff1a; io流中i表示input输入&#xff0c;o表示output输出&#xff0c;流表示数据&#xff08;字符&#xff0c;字节&#xff0c;1个字符2个字节8个位&#xff09;&#xff1b;这里的输入输出是以内存为基础&#xff0c;将数据从内存中输出到硬盘的过程称为输出&…

CMSIS—OS(V1/V2)

在RTOS基础上再封装一层API。 更换项目中所使用到的RTOS。 例如将freertos项目替换为ucos RTX liteos等其他RTOS。 只需更改该CMSIS-OS的API所调用的RTOS的API。 更换RTOS的意义何在&#xff1f;&#xff1f;&#xff1f;&#xff1f;&#xff1f;&#xff1f;&#xff1f;&am…

函数的学习

函数学习 最后附上全部java源码&#xff0c;可自行下载学习 文章目录 函数入门函数重载函数可变个数参数foreach输出传参 基本数据类型传参_引用数据类型文件夹展示所有里面的文件使用递归算法展示文件夹下所有文件1加到100的递归调用下载链接 函数入门 函数重载 public class…

为什么企业一定要走标准化、体系化的道路?

企业实行标准化、体系化道路&#xff0c;有几个重要原因&#xff1a; 1.一致性和质量&#xff1a;标准化流程和系统可确保任务始终如一且高质量地执行。这种一致性对于提供满足客户期望的产品和服务至关重要&#xff0c;从而在客户之间建立信任和忠诚度。 2.效率和生产力&…

强化安全防线:迅软科技助力美容院提升终端安全管理水平

某美容院专注于皮肤抗衰老研究与美容领域服务,业务主要包含轮廊塑型、自体脂肪、五官雕塑等,业务涵盖中国、香港、美国、韩国等多个国家及地区提倡以积极、健康、理智的美学观点,以完善的美容院管理,过硬的技术设备,为消费者提供个性化漂亮服务。 美容院的核心诉求 美容院新产…

【攻防世界】command_execution

题目再现 小宁写了个ping功能,但没有写waf,X老师告诉她这是非常危险的&#xff0c;你知道为什么吗。 题目分析 本题目说没有写WAF&#xff0c;然后可以执行Linux经典代码PING&#xff0c;我猜测到服务器不会校验我所注入的代码&#xff0c;我利用串行执行符&&进行测…

查看CentOS版本及系统位数与设置CentOS 7.9 2009 防火墙配置放开端口的命令与过程

一、查看CentOS版本及系统位数 1.1 命令汇总 //1、安装redhat-lsb yum install -y redhat-lsb//2、查看系统版本信息 lsb_release -a //3、查看系统位数 getconf LONG_BIT1.2 截图 二、设置CentOS7.9 2009 防火墙配置放开端口 2.1 命令汇总 //禁止防火墙开机启动。这种方法方…

侯捷C++高级编程(下)

对于1个类要么像指针要么像函数 主题1:转换函数 转换函数 /** 1. 转换函数没有返回类型* 2. 转换函数一般需要加上const*/ class Fraction { public:Fraction(int num,int den1):m(num),n(den){cout<<"Fraction(int num,int den1): m/n "<< m/n<&…

[Leetcode - Python]704.二分查找(Easy)

1. 题目&#xff1a; 704.二分查找&#xff08;Easy&#xff09; 1代码&#xff1a; class Solution:def search(self, nums: List[int], target: int) -> int:left , right 0 ,len(nums)-1while left < right :mid (leftright)//2 # // 取整除&#xff0c;向…

Windows 安装 pandoc 将 jupyter 导出 pdf 文件

Windows 安装 pandoc 将 jupyter 导出 pdf 文件 1. 下载 pandoc 安装文件2. 安装 pandoc3. 安装 nbconvert4. 使用 pandoc 1. 下载 pandoc 安装文件 访问 https://github.com/jgm/pandoc/releases&#xff0c;下载最新版安装文件&#xff0c;例如&#xff0c;3.1.6.1 版&#…

【Kubernetes】Kubernetes之Pod详解

Pod 一、 Pod1. Pod 基础概念2. 在 Kubrenetes 集群中 Pod 使用方式2.1 pasue 容器2.2 kubernetes 中的 pause 容器提供的功能 3. Pod 的概念和结构组成4. Pod 的分类5. Pod 容器的分类5.1 基础容器&#xff08;infrastructure container&#xff09;5.2 初始化容器&#xff08…

【效率提升—Python脚本】根据Verilog文件自动生成tb文件

文章目录 Verilog端口文件&#xff08;仅做示范用&#xff09;对应的tb文件相应代码 在数字IC设计过程中&#xff0c;根据顶层生成testbench时存在很多重复性工作&#xff0c;因此为了提高工作效率&#xff0c;特地开发此脚本。 Verilog端口文件&#xff08;仅做示范用&#xf…