HTML
<span class="caret"></span>
Run Code Online (Sandbox Code Playgroud)
给我一个插入箭头?
,但我想要一个看起来像的插入符号?
.
Bootstrap中是否有可用的课程?如果没有,如何实现这一目标?
我有一个按钮,在ajax调用后加载,点击我想重新加载页面(就像我按f5)
我试过了
$( ".delegate_update_success" ).click(function() {
location.reload();
});
Run Code Online (Sandbox Code Playgroud)
但它做了一个简单的刷新,但我的页面没有提出新的请求来获取内容.它应该像我输入URL来获取该页面一样.
我有一个字符串
String str = "My name is Monda"
Run Code Online (Sandbox Code Playgroud)
我怎样才能实现像这样的字符串
str = "MynameisMonda"
Run Code Online (Sandbox Code Playgroud) 公共培训班
class PublicTraining{
static hasMany = [trainingOrder: TrainingOrder]
}
Run Code Online (Sandbox Code Playgroud)
和TrainingOrder类
class TrainingOrder {
Date createdOn
static mapping = {
sort id:"asc"
}
}
Run Code Online (Sandbox Code Playgroud)
如果我想获得所有培训订单
def orders = publicTrainingInstance.trainingOrder.sort()
println orders // [59,58] (id of orders)
Run Code Online (Sandbox Code Playgroud)
它没有给出排序的订单
<select id="testID" multiple="multiple">
<option value="1">test Value1</option>
<option value="2">test Value2</option>
<option value="3">test Value3</option>
<option value="4">test Value4</option>
<option value="5">test Value5</option>
<option value="6">test Value6</option>
</select>
<input type="button" value="Get dropdown selected Value" id ="select-values">
Run Code Online (Sandbox Code Playgroud)
我想让逗号分隔选定的文本.
我试过了 ,
$("#select-values").click(function () {
$("select option:selected").text();
});
Run Code Online (Sandbox Code Playgroud)
让我说我已经选择了前两个选择选项,但我得到的价值 test Value1test Value2
我想要它 test Value1,test Value2
我的验证只接受字母表.我也想要允许空格.
$.validator.addMethod("alpha", function(value, element) {
return this.optional(element) || value == value.match(/^[a-zA-Z]+$/);
});
Run Code Online (Sandbox Code Playgroud)
这里需要做些什么改变?
Java中的哪种数据类型只能包含日期而不需要时间组件?例如,只是为了存储12/07/2012
.我正在将数据保存到具有仅日期数据类型的数据库中,因此我正在寻找Java中最佳的等效数据类型.
环境:Windows 7 XAMPP 1.7.3
我已经通过许多stackoverflow解决方案来解决这个问题并更改了文件中的设置
my.ini
现在看起来像
# Example MySQL config file for medium systems.
#
# This is for a system with little memory (32M - 64M) where MySQL plays
# an important part, or systems up to 128M where MySQL is used together with
# other programs (such as a web server)
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory …
Run Code Online (Sandbox Code Playgroud) Grails控制器的默认范围是,prototype
将为每个请求创建一个新的控制器(推荐用于Closure属性的操作)
控制器还支持另外两个范围:
session
- 为用户会话的范围创建一个控制器
singleton
- 只存在一个控制器实例(建议将操作用作方法)
我什么时候应该使用哪个范围?我什么时候可以决定改变范围?在什么情况下?
从PHP应用程序调用grails控制器,它以JSON格式发送数据.
当我打印params
println params
Run Code Online (Sandbox Code Playgroud)
打印
[{"courseCategory":null,"courseId":null,"show":null,
"rows":6,"trainers":null,"courses":null,"cities":null,
"fromDate":null,"toDate":null,"pageType":"HOME","deal":null}:,
action:getTrainingsAsJson,
controller:publicTraining]
Run Code Online (Sandbox Code Playgroud)
当我做
println params.rows
println params.pageType
Run Code Online (Sandbox Code Playgroud)
打印 null
我试过了
def jsonObject = request.JSON // prints [:]
Run Code Online (Sandbox Code Playgroud)
我也尝试过 JsonSlurper
def slurper = new JsonSlurper()
def result = slurper.parseText(params)
Run Code Online (Sandbox Code Playgroud)
这给出了错误
No signature of method: groovy.json.JsonSlurper.parseText() is applicable for argument types: (org.codehaus.groovy.grails.web.servlet.mvc.GrailsParameterMap)
Run Code Online (Sandbox Code Playgroud)
如何转换它来检索参数值?
或者有没有办法将其转换为地图,以便我可以轻松访问参数?