我在我的代码中使用Criteria Query.它总是火上浇油select * from ...
相反,我想从我的查询中忽略一个列(字段),因为该字段有大量以字节存储的数据.而这导致了性能问题.
任何人都可以为此提出想法吗?
一些更新
我在查询中添加了一个投影,它创建了一个像...的查询
select
this_.TEMPLATE_ID as y0_,
this_.TEMPLATE_NAME as y1_,
this_.CREATE_DATE as y2_,
this_.UPDATE_DATE as y3_,
this_.STATUS_CODE as y4_,
this_.USER_ID as y5_,
this_.UPDATED_BY as y6_,
this_.CATEGORY_ID as y7_,
this_.PRACTICE_ID as y8_
from
templates this_
inner join
user user1_
on this_.USER_ID=user1_.USER_ID
inner join
template_categories category2_
on this_.CATEGORY_ID=category2_.CATEGORY_ID
where
y4_=?
and y8_=?
and y5_ in (
?, ?
)
order by
y1_ asc limit ?
Run Code Online (Sandbox Code Playgroud)
现在问题就像.. Unknown column 'y4_' in 'where clause'
和y8_相同的错误,y5_意味着所有关闭它给出错误的地方.
我修改它像查询...
select …Run Code Online (Sandbox Code Playgroud) 我正在使用JSF 1.2
我正在尝试使用打印文本 <h:outputtext>
<h:outputText id="warningDose" styleClass="redText" value="#{templatePrescriptionMaintenanceBackingBean.doseWarningText}"></h:outputText>
Run Code Online (Sandbox Code Playgroud)
现在这个变量包含带有html标签的文本.<b>,<i>等...
但它显示内容,而不是实际的粗体或斜体html输出.
我们有什么方法可以做到这一点<h:outputText>,它给出了html响应?
任何人都可以解释我之间的区别  and 吗?
我已经存储在数据库中以二进制形式和空间在HTML数据可以是的 或 或有时 .
另外一个问题是当我将这个HTML转换为纯文本时使用JSoup lib它正确转换它但是如果我使用String的String.contains(我的字符串)方法.它看起来像HTML数据 有所不同 .无法找到字符串,反之亦然.
例:
HTML1: This is my test string
HTML2: This is my test string
如果我使用JSoup将其转换为纯文本.它回来了
HTML 1:这是我的测试字符串
HTML 2:这是我的测试字符串
但是两个字符串都不一样.为什么会这样?
当我下载jQuery zip文件LINK时.它给了我4个不同的文件:
pack.js是js文件中压缩程度最高的文件,并且min是缩小的.所以我有两个问题......
jquery.js和之间的区别是什么jquery.lite.js.当我查看代码时看起来没有区别.min.js或pack.js在现场网站上?如何检查EL中的equalIgnoreCase?
String a = "hello";
a.equalsIgnoreCase("hello");
Run Code Online (Sandbox Code Playgroud)
现在在JSP页面上..
<h:panelGroup rendered="#{patientNotePrescriptionVar.prescriptionSchedule == patientNotePresBackingBean.sendPrescription}">
... Some code here ....
</h:panelGroup>
Run Code Online (Sandbox Code Playgroud)
有没有办法比较patientNotePresBackingBean.sendPrescriptionequalIgnoreCase?
我已经准备好了一些小程序.我试着在Android平板电脑上运行它.它根本不起作用吗?我不确定?有谁知道这个?
或者是在android之后.Java不是平台独立的 - ;)
如何获取SeekBar像素的当前位置?
目前我正试图在计算的基础上获得这个位置.
屏幕宽度,搜索条宽度,当前搜索进度等等.但我无法从中获得确切的位置.
有人有任何想法吗?
编码相同如下.
我想在SeekBar拇指上投下一个组件.
translation = calculateTranslation(this.deviceScreenWidth, seekBarWidth, seekBar1T.getMax(), Integer.valueOf(ConstantData.seekbar_fifth.toString()), topComponentWidth, 0);
if (currentapiVersion < android.os.Build.VERSION_CODES.HONEYCOMB){
TranslateAnimation anim = new TranslateAnimation(translation - 1,
translation, 0, 0);
anim.setFillAfter(true);
anim.setDuration(0);
edtTextRodUpDown.startAnimation(anim);
}else{
edtTextRodUpDown.setTranslationX(translation);
}
Run Code Online (Sandbox Code Playgroud)
并计算翻译
private float calculateTranslation(int screenWidth, int seekBarWidth, int seekMaxProgress, int currentProgress, int componentWidth, int extraDifference){
double calculatedPosition = 0f;
calculatedPosition = (double)((double)(seekBarWidth-((screenWidth-seekBarWidth))) / (double)seekMaxProgress) * (double)currentProgress;
calculatedPosition = calculatedPosition - (double)(componentWidth/2);
calculatedPosition = calculatedPosition + extraDifference;
Double d = new Double(calculatedPosition);
if(d < 0){
return 0.0f; …Run Code Online (Sandbox Code Playgroud) 我在页面上有一个取消按钮。但是可以从不同的地方打开此页面。我的意思是父页面可以有所不同。
现在,通过单击“取消”按钮,我需要返回到我来自的确切页面,例如history.back()。
我们如何在JSF中实现它?
有人可以指导我吗?
那history.back()直接是行不通的。
<h:commandButton type="button" id="cancel" image="#{sessionScope.sessionObject.graphicImageFolderName}cancel_btn.gif" accesskey="#{bundle.oscer_command_cancel_accesskey}" value="Cancel" action="#{templatePrescriptionMaintenanceBackingBean.goBack}" />
Run Code Online (Sandbox Code Playgroud)
如果history.back()我要使用与...相同的按钮
<h:commandButton type="button" id="cancel" image="#{sessionScope.sessionObject.graphicImageFolderName}cancel_btn.gif" accesskey="#{bundle.oscer_command_cancel_accesskey}" value="Cancel" onclick="javascript: history.back();"/>
Run Code Online (Sandbox Code Playgroud)
在这两种情况下有什么问题吗?
如下图所示.我有一个relative layout.我有我ImageView的相同,我需要在视图开始和这个ImageView之间获得像素差距.我的活动如下.请指教.我试过各种各样的方法,topY()但找不到解决办法.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<LinearLayout
android:id="@+id/main_ruler_linear_layout"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:orientation="horizontal"
>
</LinearLayout>
<ImageView
android:id="@+id/line_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/line"/>
<EditText
android:id="@+id/txtRulerCenterPosition"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignTop="@+id/main_ruler_linear_layout"
android:layout_marginRight="17dp"
android:layout_marginTop="16dp"
android:ems="10"
android:textSize="5dp"
android:focusable="false"/>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud) 有人hashCode()在任何地方使用?
任何人都可以给我一个确切使用哈希码的例子,在哪些情况下我们需要实现它? 使用HashCode的任何特定区域?