首页 \ 问答 \ NHibernate中的多个子集合查询*在lambdas中*(NHibernate multiple child collections query *in lambdas*)

NHibernate中的多个子集合查询*在lambdas中*(NHibernate multiple child collections query *in lambdas*)

我看起来完全一样

如何有效地使用过滤器查询不同级别的儿童?

但是“在lambdas中”的语法。

我真的需要这个,有人可以帮忙吗? 谢谢!


I'm looking exactly the same

How to efficiently query with filter on children at different levels?

but "in lambdas" syntax.

I am really need this, can anybody help? Thanks!


原文:https://stackoverflow.com/questions/13382712
更新时间:2022-03-15 07:03

最满意答案

看一下$.serializeArray()的文档,它具体说明了这一点

文件选择元素中的数据未序列化。

不幸的是,在AJAX中上传文件并不是那么简单。 这里有一个使用直接JQuery的详细教程。 它的要点是你需要:

  1. 将文件输入绑定到change事件处理程序,
  2. 收集FormData对象中的所有表单数据,
  3. 然后使用$.ajax函数POST表单数据。

太多工作?

或者,如果您不介意在代码中包含插件,可以使用以下选项:

  1. jQuery的Ajax的文件上传
  2. jQuery的形式

或者正如Rohan所指出的,如果您使用的是HTML5,则可以浏览FileReader API


Looking at the doc of $.serializeArray(), it specifically says that

Data from file select elements is not serialized.

Unfortunately, uploading file in AJAX isn't as straight forward. There is a detailed tutorial here using straight-up JQuery. The gist of it is that you need to:

  1. Bind the file input to a change event handler,
  2. Gather all the form data in a FormData object,
  3. Then POST the form data using the $.ajax function.

Too much work?

Alternately, if you don't mind including plugins in your codes, here are some options:

  1. jQuery-Ajax-File-Upload
  2. jquery-form

Or as Rohan pointed out, if you are using HTML5, you can explore the FileReader API.

相关问答

更多
  • $.get("servlet的URL ",{value:document.getElementById("name").value},function(data){ $("#ajax_div").html(decodeURI(data)); //如果是json格式 data=eval('('+data+')'); }); $.post("test?name="+userName,null,back); } function back(result){ var result=$("#result"); res ...
  • 只包括相关部分。 "Confirm": function() { $.post("includes/inc_details.php", { "type":"remove", "id":rid }).then(function() { window.location.reload(); $(this).dialog("close"); ...
  • songURL中没有任何内容,因为当您的Ajax函数返回时,它将重定向到您刚刚发布到的同一页面。 它正在为该PHP文件创建一个新的HTTP请求,但没有数据发送给它。 删除控制台消息上的注释,您将看到正确的回显消息。 $.ajax({ type: "POST", url: "loadSketch.php", data: content, success: function (data, text) { alert("success"); console.log(data); }, error ...
  • 这是使用$ .post发送数据的方法 var param = "value"; $.post('query.php', { param: param }, function(data) { //do what you want with returned data }) This is how to send data using $.post var param = "value"; $.post('query.php', { param: param }, function(data) { ...
  • 您需要使用HttpUrlConnection才能使用HttpRequest进行通信 看到 如何使用的Java的净URLConnection的对火和手柄的HTTP请求 You need to use HttpUrlConnection in order to communicate using HttpRequest See how-to-use-java-net-urlconnection-to-fire-and-handle-http-requests
  • 我的后端代码出错了。 以上代码完美工作。 真诚道歉的错误的职位! There was a mistake in my backend code. Above code works perfectly. Sincere apologies for the wrong post!
  • 我认为你的意思是将所有这些行放在帖子后调用的函数中? 警报工作意味着您实际上正在暂停内容流,并且在您关闭警报之前,其下面的代码将不会继续。 这通常表示您具有在等待异步数据时同步工作的代码。 如果您打算在后面的代码中使用opciones = datos作为服务器响应,那么您也需要在函数内部使用它。 像这样的东西: $("#btnAgregarCuentasHost").click(function(){ // store a reference to the table we are updati ...
  • 看一下$.serializeArray()的文档,它具体说明了这一点 文件选择元素中的数据未序列化。 不幸的是,在AJAX中上传文件并不是那么简单。 这里有一个使用直接JQuery的详细教程。 它的要点是你需要: 将文件输入绑定到change事件处理程序, 收集FormData对象中的所有表单数据, 然后使用$.ajax函数POST表单数据。 太多工作? 或者,如果您不介意在代码中包含插件,可以使用以下选项: jQuery的Ajax的文件上传 jQuery的形式 或者正如Rohan所指出的,如果您使用的是H ...
  • 只需在POST请求体上使用HTTP multipart/form-data编码即可。 它在RFC-2388中描述,是通过HTTP上传(多个)文件的标准方式。 您可以使用java.net.URLConnection来完成此操作,如本迷你教程中所述 ,尽管它会生成许多样板代码。 更方便的方法是使用Apache Commons HttpClient 。 在servlet方面,您可以使用Apache Commons Fileupload以通常的HTTP方式处理上传的文件(或者当您已经在Servlet 3.0上时,使 ...
  • HttpRequestWithEntity.java import java.net.URI; import java.net.URISyntaxException; import org.apache.http.client.methods.HttpEntityEnclosingRequestBase; public class HttpRequestWithEntity extends HttpEntityEnclosingRequestBase { private String meth ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。