How to Implement Complex Form Data?

I’m supposed to implement a relatively complex form that looks like follows, but has at least four more pages requiring the user to fill in all necessary information for the tracks:

This data will need to be sent to the server, which is implemented using Dropwizard. I’m looking for best practices on how to upload and send such a complex form with potentially dozens of songs to the server.

The simplest available solution I have seen is a simple multipart/form-data request with the following form schema (Source):


<html> <body> <h1>File Upload with Jersey</h1>  <form action="rest/file/upload" method="post" enctype="multipart/form-data">     <p>     Select a file : <input type="file" name="file" size="45" />    </p>     <input type="submit" value="Upload It" /> </form>  </body> </html> 


@POST @Path("/upload") @Consumes(MediaType.MULTIPART_FORM_DATA) public Response uploadTrack(final FormDataMultiPart multiPart) {     List<FormDataBodyPart> artists = multiPart.getFields("artist");      StringBuffer output = new StringBuffer();     for (FormDataBodyPart artist : artists)         output.append(artist.getValueAs(String.class));      List<FormDataBodyPart> tracks = multiPart.getFields("track");     for (FormDataBodyPart track : tracks)         writeToFile(track.getValueAs(InputStream.class), "Foo");      return Response.status(200).entity(output.toString()).build(); } 

Then I have also read about file uploads via Ajax or Formdata (Mozilla HttpRequest) which allows for Posts in the formats application/x-www-form-urlencoded, multipart/form-data, or text/plain. I don’t know which approach, if any, is best.

An ideal solution would be to utilize Jackson to convert a json string into my data objects, but I don’t get the impression that this is possible with binary data.

PDE with complex roots of characterictic solution

I have the following equation $ $ \frac{\partial^2 V}{\partial x^2 }+\frac{\partial^2 V}{\partial y^2}=-4\pi(x^2+y^2)$ $ Such that $ V(x,y)$ is real and $ V(x,y)=0$ at $ y=0$ .

As it is clear form the problem the characteristic equation has complex roots. I have following as the solution $ $ z=\phi_1(y+ix)+\phi_2(y-ix)-\dfrac{\pi x^2\left(6\left(y-\mathrm{i}x\right)^2+\left(3\mathrm{i}-3\right)x^2+\left(8\mathrm{i}+4\right)x\left(y-\mathrm{i}x\right)\right)}{3}$ $

What is the state of the algorithmic art for floating point arithmetic on complex numbers?

Most modern compilers and processors implement the IEEE 754 binary formats for floating point numbers. IEEE 754 guarantees that the addition, subtraction, multiplication, division, and square root operations on real floating point values are correctly rounded, meaning that the result of each operation is as if the operation were computed to infinite precision and then subsequently rounded according to the specified rounding mode (most commonly round to nearest, ties to even). In other words, it is guaranteed for these operations that the final floating point number is as close as possible to the true value of the operation given the mathematical values of the input floating point numbers.

A number of programming languages also offer complex floating point arithmetic. Addition and subtraction of complex floating point numbers can obviously guarantee correct rounding (treating the rounding mode as applying to each component separately), since these operations can be computed componentwise. Surely then, I assumed, the correct rounding guarantee also applies to common language-provided implementations of complex multiplication, division, and square root?

So far, I have found no evidence that this is the case, and a fair amount of evidence to the contrary. For example, this recent paper provides examples of wildly incorrect results that can be obtained from naive attempts at computing complex multiplication via multiple floating point roundings, and describes an algorithm for complex multiplication that produces results accurate to within 2 ulps (but not guaranteed 100% correctly rounded as defined above).

Claude-Pierre Jeannerod, Christophe Monat, Laurent Thévenoux (2017). More accurate complex multiplication for embedded processors. SIES 2017.

This suggests that there is no standard/widely-used sequence of fused multiply-add tricks for doing complex multiplication with correct rounding. I’ve also found several references to the difficulty of computing complex division in a numerically-stable fashion.

Question 1: Given floating point inputs and outputs with $ n$ exponent bits and $ m$ significand bits, what is the best-known worst case time complexity for computing the correctly-rounded values of complex multiplication, division, and square root?

Question 2: Are any references available for methods for computing these complex operations with correct rounding using the real floating point operations available on a standard FPU?

Installation process for a modern complex Windows Software Installation?

We’re trying to re-think the installation process of our software suite and I’m trying to find out what specific pitfalls we’re facing without using my/our limited lens of the Windows software landscape today.

We have gathered a set of issues that an installation of our software potentially has to handle, and I would like to gather whether these points do make sense to consider in the context of a Windows installation procedure, or whether some of those points are better left outside the context of the installation procedure.

We face to issue, for at least a subset of the application suite, to at least do the following:

  • Require running 3rd party DMBS on the machine
  • Pre-Install .NET Framework or vcredist or other system-wide resources
  • Put Files into SystemDrive:\Program Files
  • (Optional) Automatic Update (of Program Files, …) when launching some applications
  • Put an Icon into the Start Menu / Desktop
  • Install and maintain Windows Services
  • Edit registry keys pertaining to our software (i.e. HKLM\SOFTWARE\OurShpo\...)
  • “Installation” should work on Windows 7 and all versions, including server and LTSB, upwards
  • “installation” should be optionally automated / no user interaction.

Is there any best practices on what and how to put these things into the installation process / or installation tools. What parts to keep hand off completely and what parts to better implement inside the application. (e.g. file-extension association is one point where I am very unsure who’s job it is to fix this up.)

Disclaimer: I’m not interested in the toolchain per se here. I know there’s InnoSetup, WiX, NSIS, … and all of these can achieve some – or all – of these points somehow. The problem is deciding which of these points raise which (conceptual) problems on different Windows versions or which points don’t actually make sense to put into our installation process.

Is it correct to say the field of complex numbers is contained in the field of quaternions?

I believe it is correct to refer to the complex numbers and their ‘native algebra’ a field. See for example Linear Algebra and Matrix Theory, by Evar Nering. I assume the same may be said for the set of Quaternions. Please correct me if that is wrong.

Based on that assumption, I ask: is the field of complex numbers are a subset (sub-field?) of the quaternions in the same sense that the real numbers are ‘contained’ in the complex numbers?

Is there a term for such a subordination of number fields?

I admit that I am reaching well beyond my realm of familiarity, and that my question may be nonsensical to those who are more knowledgeable in these matters.

Performing complex searchs using C# collections

I have a collection with millions of items of Generic type T. Assume this list never changes. I want to perform many types of searches with subsets of fields of type T. Some with only 1 field and others with 2 or more fields. Each search almost always returns more than 1 result.

This answer is very close to what I want but it only works for searches with only one field:

What approach should I use to let users “build” complex products?

I have a project I’m working on where the product detail page starts with a SKU, and as you build, or configure the product, it turns into a unique SKU/product. Not very different from a lot other ecommerce sites.

However, there are 3 or 4 configurations to be made. I started going the dropdown route but wanted to take a more visual approach so that the customer can see themselves actually building out a product and how them making one configuration effects their choices for the next configuration to be made. However, now I find out that each configuration might have around 10 or so options. I’m worried about overcrowding the page. does it pretty well, I think.. but their options for #2 have limited text in them…some of mine might have triple that amount.

Is casa’s approach valid? What other sites take this approach? I’ve seen Amazon do this as well.