我有一个pdf文件,其中包含utf-8字符(İ,ğ,ı和阿拉伯字母等).如何解析这个文件?
我使用itext和pdfBox,但我看到"çekti¤ikå¤> da"而不是"çektiğikağıda".我该如何解决这个问题?
我的问题是thymeleaf与angularJS的整合.我有这个thymleaf页面:
<div ng-controller="ctrlsubcomment" >
<div class="media" th:fragment="comments" th:each="newsComment : ${comments}">
<img class="media-object" src="/resources/images/adam1.jpg" alt="" width="52" height="52" />
<div class="media-body">
<div class="media-heading">
<span th:text="${newsComment.comment.user.name}"></span>
<span th:text="${newsComment.comment.user.surname}"></span>
<small>
<span class="glyphicon glyphicon-calendar"></span>
<span th:text="${newsComment.comment.creationTime}"></span>
</small>
</div>
<span th:text="${newsComment.comment.text}"></span>
<img th:if="${newsComment.comment.image != null and newsComment.comment.image.fileExist()}" th:src="${newsComment.comment.image.getImageData()}" alt="" width="160" height="120"/>
</div>
<div class="media-icons" >
<div class="btn-group" role="group" aria-label="...">
<span th:inline="text" th:text="${newsComment.comment.id}">${newsComment.comment.id}</span>
<a href="#" class="btn btn-success btn-xs"><span class="glyphicon glyphicon-thumbs-up"></span> (45)</a>
<a href="#" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-thumbs-down"></span> (12)</a>
<button type="button" ng-click="addSubComment(${newsComment.comment.id})" class="btn btn-primary btn-xs" data-toggle="modal" data-target="#cevapla"> …Run Code Online (Sandbox Code Playgroud) 我不知道它们之间的区别,我有时会使用this,有时候activityame.this,有时候,getAplicationContext()当android需要context通过时.
我的问题是空值必须是最后一个 order by 语句。我的代码截图如下。我使用 javax 持久性标准构建器。我的查询很复杂。
import javax.persistence.criteria.CriteriaBuilder;
public Predicate getSomePredicate() {
Predicate predicate = cb.conjunction();....
...predicate.getExpressions().add(cb.and(cb.or(cb.and(v1, v2), cb.and(s1, s2))));
EOrderByType orderType = EOrderByType.values()[orderBy]
;
switch (orderType) {
case PRICE: cq.where(predicate).orderBy(cb.asc(root.get("price")));
break;
case PRICE_HIGH_TO_LOW: cq.where(predicate).orderBy(cb.desc(root.get("price")));
break;
case CONSUPTION: cq.where(predicate).orderBy(cb.desc(root.get("consume")));
break;
default:
break;
}
return cq.getRestriction();
}
Run Code Online (Sandbox Code Playgroud)
如何使用标准构建器按价格 null 最后实现订单?