1.获取某个类的属性值 在CjJssetDTO中,有名为cj1,cj2...的字段。由于列不固定,所以获取值的时候,需要使用反射。通过循环遍历,取到cj1,cj2等字段的值。 2.设置某个属性的值 通过循环遍历,设置cj1,cj2等字段的值。 其中, Field是java.lang.reflect. Read More
posted @ 2017-10-14 15:25 四十四次日落 Views(15183) Comments(1) Diggs(0) Edit
查询结果如下: 现在我想要把这个结果变成 残疾人 53民政 52综合治理 51计划生育 50物业监管 49安全生产 48环境类 47司法信访 5党建 4社会组织 3文化体育 2社保 1 这样就把行拆分开了。 Read More
posted @ 2017-04-01 11:04 四十四次日落 Views(1953) Comments(0) Diggs(0) Edit
今天在查询视图时,遇到了一个问题。 因为mysq不能嵌套select的子查询。所以我把子查询建成了视图b,主查询通过left join on关联视图b ,形成视图a。 由于视图b中也有left join , 通过left join 关联表c 。通过c确定视图b中的字段state。如果c中有数据,则s Read More
posted @ 2016-12-01 18:09 四十四次日落 Views(834) Comments(0) Diggs(1) Edit
今天改他们的代码的时候,遇到了MySQL表名和数据库关键字的问题。 由于表名是关键字,导致增删改查都报错。 Hibernate: select leave0_.id as id22_, leave0_.stuNumber as stuNumber22_, leave0_.stuName as stu Read More
posted @ 2016-11-21 16:58 四十四次日落 Views(7192) Comments(1) Diggs(0) Edit
后台执行importExcel,明明方法执行成功,但是前台却提示404 @RequestMapping("/import") public Json importExcel(@RequestParam(value="file", required=true) CommonsMultipartFile Read More
posted @ 2016-11-10 11:13 四十四次日落 Views(2534) Comments(0) Diggs(0) Edit
(一)树状数组的概念如果给定一个数组,要你求里面所有数的和,一般都会想到累加。但是当那个数组很大的时候,累加就显得太耗时了,时间复杂度为O(n),并且采用累加的方法还有一个局限,那就是,当修改掉数组中的元素后,仍然要你求数组中某段元素的和,就显得麻烦了。所以我们就要用到树状数组,他的时间复杂度为O(... Read More
posted @ 2014-08-15 20:22 四十四次日落 Views(458) Comments(1) Diggs(0) Edit
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2689 Sort itProblemDescriptionYouwanttoprocesseasequenceofndistinctintegersbyswap... Read More
posted @ 2014-08-15 20:11 四十四次日落 Views(428) Comments(0) Diggs(0) Edit
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2838 Cow SortingProblemDescriptionSherlock'sN(1≤N≤100,000)cowsarelineduptobemilkedinthee... Read More
posted @ 2014-08-15 20:05 四十四次日落 Views(546) Comments(0) Diggs(0) Edit
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2227 Find the nondecreasing subsequences Time Limit: 10000/5000 MS (Java/Othe... Read More
posted @ 2014-08-15 19:54 四十四次日落 Views(263) Comments(0) Diggs(0) Edit
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3584 CubeProblemDescriptionGivenanN*N*NcubeA,whoseelementsareeither0or1.A[i,j,k]m... Read More
posted @ 2014-08-15 19:50 四十四次日落 Views(418) Comments(0) Diggs(0) Edit