我的应用程序中有一个带有选项组的简单选择框.
<select>
<optgroup label="Swedish Cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
</optgroup>
----
----
----
</select>
Run Code Online (Sandbox Code Playgroud)
当它在浏览器中显示时,选项组标签以粗体和斜体显示; 我想让它显示没有任何这些风格.
我使用谷歌图表api在我的应用程序中显示折线图,在该图表中现在我想显示具有百分号的垂直轴值.为此,我尝试了以下选项
chart.draw(data, {vAxis: {format:'#%'} } );
Run Code Online (Sandbox Code Playgroud)
如提到的那样
如何在Google Visualization Chart API中设置百分比?
' B七 '
当使用这种方法时,垂直轴值乘以100.即不是'12%' - 我在vaxis中得到1200%!!!!
我也检查了https://developers.google.com文件,我找不到任何方法来做到这一点.
是否有任何替代显示vaxis中的百分比符号.
我们可以根据cookie中可用的值在apache中编写重写规则吗?下面是示例cookie值(来自firebug).在这里我需要根据值jforumUserId控制我的重写规则
JSESSIONID=96A0AFA5E2EE4500C8483679DA530041;
__utma=111872281.1699469794.1302588971.1305090522.1305099051.66;
__utmz=111872281.1302588971.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);
jforumUserId=1; __utmc=111872281
Run Code Online (Sandbox Code Playgroud)
如果jforumUserId值不是-1,我需要强制页面加载到https.这可能吗.
我需要强制将Apache中的所有页面重定向到HTTPS,除了几页.如何在Apache中为这种情况编写重写规则?
在使用具有常量实用程序类的final关键字时,我们可以获得性能和/或任何其他好处的任何差异.[此类仅包含静态最终字段和私有构造函数以避免对象创建]
public class ActionConstants {
private ActionConstants() // Prevents instantiation
{ }
public static final String VALIDFIRSTLASTNAME = "[A-Za-z0-9.\\s]+";
public static final String VALIDPHONENUMBER = "\\d{10}";
...
...
}
Run Code Online (Sandbox Code Playgroud)
只有差异才是最终的阶级
public final class ActionConstants {
private ActionConstants() // Prevents instantiation
{ }
public static final String VALIDFIRSTLASTNAME = "[A-Za-z0-9.\\s]+";
public static final String VALIDPHONENUMBER = "\\d{10}";
...
...
}
Run Code Online (Sandbox Code Playgroud)
我想知道,使用final有什么好处,以及为常量定义类的正确方法是什么.
apache ×2
mod-rewrite ×2
charts ×1
class ×1
constants ×1
cookies ×1
css ×1
final ×1
html ×1
https ×1
java ×1
javascript ×1
performance ×1
styling ×1