我正在使用带有"Checkbox"插件的jsTree jQuery插件,并使用异步http请求来延迟加载树的每个级别.一切都很好,除了我不能让树在第一级之后预先选择某些节点.我使用"selected"属性来提供要预选的ID数组.树的顶层ID正确预先选择.但是,当级别加载时,不会选择树的较低级别的ID.我错过了什么吗?
这是构造函数代码:
var myArrayOfIDs = new Array();
myArrayOfIDs[0] = '123'; //etc...
$(sDivID).tree(
{
data : {
async : true,
opts : {url : sURL}
},
plugins:{
"checkbox" : {three_state : false}
},
selected : myArrayOfIDs,
ui:{
theme_name : "checkbox",
dots : false,
animation : 400
},
callback : {
beforedata : function(NODE, TREE_OBJ) { return { id : $(NODE).attr("id") || 0, rand : Math.random().toString() } }
}
}
)
Run Code Online (Sandbox Code Playgroud) 我最近听说过不同的.NET ORM方法的"粉丝"表达了其他ORM方法的强大,甚至是古怪的选择.坦率地说,有点在黑暗中.
您能解释一下这些.NET ORM解决方案的主要优点吗?
我对1和4有很好的理解,对2和3有一个粗略的理解,但显然不足以理解一个人对另一个人隐含的文化认知.
我想知道是否有人可以帮助我.我正在尝试创建自定义AlertDialog.为此,我在styles.xml中添加了以下代码行
<resources>
<style name="CustomAlertDialog" parent="android:Theme.Dialog.Alert">
<item name="android:windowBackground">@drawable/color_panel_background</item>
</style>
</resources>
Run Code Online (Sandbox Code Playgroud)
以下是主要活动.
package com.customdialog;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
public class CustomDialog extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
this.setTheme(R.style.CustomAlertDialog);
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage("HELLO!");
builder .setCancelable(false)
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
//MyActivity.this.finish();
}
})
.setNegativeButton("No", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int …Run Code Online (Sandbox Code Playgroud) 所以我在Windows 7上运行Visual Studio 2003 - 是的我知道它没有得到官方支持 - 不,不幸的是我无法改变这种情况:-(
在大多数情况下它工作正常,但我有一个特定的问题,我无法弄清楚.如果对字符串执行项目范围搜索(Ctrl - Shift - F),应用程序将挂起.
我有一个相当强大的机器和所有其他繁重的任务,如编译和调试都工作正常.如果我将搜索限制为当前文档(Ctrl-F),它也可以工作.我以管理员身份运行它并已应用VS.NET 2003 SP1.
项目的大小似乎不是问题,因为同事也在为包含5页的单个项目解决方案遇到此问题.
我目前正在使用Windows搜索作为解决方法,我想知道是否有一些我错过了我应该尝试的东西.
我有持久对象,字符串属性通常超过500个字符.Google App Engine说我需要将其另存为com.google.appengine.api.datastore.Text.
如何将String类型转换为com.google.appengine.api.datastore.Text类型,以便我可以在属性上使用setMethod(),或者将我的长sting数据转换为该持久值?
我正在尝试让HTML5的音频标签在Chrome中运行.以下代码在Firefox中完美运行,为什么它不能在Webkit中运行?
<html>
<head>
<script type="text/javascript">
function init(){
audio = new Audio("chat.ogg");
audio.play();
}
</script>
</head>
<body onload="init()">
</body>
Run Code Online (Sandbox Code Playgroud)
我还应该注意到我也尝试用mp3.无论采用何种格式,只要在音频上调用.play(),Chrome就会以"未定义"进行响应.
我将文件的属性(大小,更新时间......)存储在数据库中.所以问题是如何管理数据库和文件的事务.
在Java EE环境中,JTA只能管理数据库事务.如果更新数据库成功但文件操作失败,我应该为此编写文件回滚方法吗?此外,EJB容器中的文件操作违反了EJB规范.
你怎么看?
即使我拥有权限,也无法向我的应用用户发送电子邮件.
我正在使用java库,虽然我认为它与此无关.
long uid = ...;
Collection<Long> uids = new ArrayList<Long>();
uids.add(uid);
FacebookXmlRestClient client = new FacebookXmlRestClient(api, secret);
boolean sendEmailPerm = client.users_hasAppPermission(Permission.EMAIL,uid);
System.out.println("Can send email: "+ sendEmailPerm);
Collection<String> sent = client.notifications_sendTextEmail(uids, "subject", "body");
System.out.println("Succesfully sent email to: "+sent);
sent = client.notifications_sendFbmlEmail(uids, "subject", "body");
System.out.println("Succesfully sent email to: "+sent);
Run Code Online (Sandbox Code Playgroud)
我正在尝试使用fbml和文本电子邮件.我也可以获取用户的proxied_email属性,但是当我用常规邮件发送电子邮件到该地址时,客户端无法到达.
输出是:
Can send email: true Succesfully sent email to: [] Succesfully sent email to: []
当我尝试调用Find()时,我不断收到此错误
public void findTxt(string text)
{
BindingSource src = new BindingSource();
src.DataSource = dataGridView1.DataSource;
src.Position = src.Find("p_Name", text); // Specified method is not supported
if (src.Position == 0 && dataGridView1.Rows[0].Cells[2].Value.ToString() == text)
{
MessageBox.Show("Item found!!");
dataGridView1.CurrentCell = dataGridView1.Rows[src.Position].Cells[2];
}
else if (src.Position == 0 && dataGridView1.Rows[0].Cells[2].Value.ToString() != text)
{
MessageBox.Show("Item not found!!");
}
else
{
MessageBox.Show("Item found!!");
dataGridView1.CurrentCell = dataGridView1.Rows[src.Position].Cells[2];
}
}
Run Code Online (Sandbox Code Playgroud)
编辑:
从另一个表单调用findText方法时出现错误,但是从主窗体调用此方法不会导致这样的错误.