complex

Why is complex<double> * int not defined in C++?

The C++ program #include <complex> #include <iostream> int main() { std::complex<double> z(0,2); int n = 3; std::cout << z * n << std::endl; } yields an error: no match for ‘operator*’ in ‘z * n’. Why? I'm compiling with g++ 4.4.1. Perhaps the compiler is just following the C++ standard, in which case my question is: why does...

OpenESB Nested BPEL?

Hi all, I have an unusual design goal that I would like to solve using OpenESB. We have a number of files that will be generated by our system to be transferred to another system. Depending on the data type, the source system and the destination system, a series of transforms will need to take place before the data can be uploaded to th...

achieving a complex sort via Linq to Objects

I've been asked to apply conditional sorting to a data set and I'm trying to figure out how to achieve this via LINQ. In this particular domain, purchase orders can be marked as primary or secondary. The exact mechanism used to determine primary/secondary status is rather complex and not germane to the problem at hand. Consider the d...

Need help to modify this complex regular expression

Hi, I am using ExtJS. One of the textfield made with ExtJS component should allow comma separated number/opeator strings (3 similar examples) like 1, 2-3, 4..5, <6, <=7, >8, >=9 2, 3..5, >=9,>10 <=9, 1, <=8, 4..5, 8-9 Here I am using equals, range (-), sequence (..) & greater than/equal to operators for numbers less than or eq...

Testing complex datatypes?

What's are some ways of testing complex data types such as video, images, music, etc. I'm using TDD and wonder are there alternatives to "gold file" testing for rendering algorithms. I understand that there's ways to test other parts of the program that don't render and using those results you can infer. However, I'm particularly interes...

How would you use AGILE here?

I am a big proponent of agile, but a friend of mine (who doesn't know agile yet - hes a managerial type ^^) asked me how I would go about planning and developing a complex distributed project, with a database layer, comms layer, interface, and integration into embedded devices. The agile method emphasises the concept of releasing early ...

jQuery Complex selector with mid-wild card?

I have a series of INPUT tags with this id structure. id="menu_popSearch_chk1_I" id="menu_popSearch_chk2_I" id="menu_popSearch_chk3_I" Etc. HOWEVER, so I do not want these id="menu_popSearch_chk1_S" id="menu_popSearch_chk2_S" id="menu_popSearch_chk3_S" Is there a 'wildcard' kind of feature where I can get the first set, but not the...

Making one copy of complex type from 2 webservices.

Hi In C# (other .Net OOP languages as well), I have 2 webservices. Svc1 returns a complex datatype which becomes the parameter for svc2. Note that it is the same complex type. Now, I create the 2 proxy classes of these 2 webservices. Which means the same type gets generated twice. How can I make sure that in 2 proxies only one copy of...

Architecting a Complex iPhone Application ?

I am comming from an enterprise java development organization where we did development in nicely seperated re-usable layers. Persistency layers, Service layers, etc etc. Now, I am looking for iPhone example apps or documentation on how to architecture complex iPhone projects. Most books & apple examples show you very limited code & arch...

Is it possible to call Complex soap API from QTP web-service addin?

Hi All, Is it possible invoke the SOAP API which returns object of some class or which takes the object of class as input parameter via QTP web-service addin? Is there any way to call overloaded API via QTP web service addin? Thannks Laxman ...

CakePHP, Setting a complex/multiple find condition for a multi select box.

I have a multi-select box named Manufacturer Name that is displaying correctly, even clickable for multi search. When I run the search I am not getting any results from my database using the complex find conditions I set. I've tried to use Complex-Find-Conditions from the bakery, and other various websites but no avail. //This my in...

ASP.NET MVC - Submit Form with complex Model with EntitySet

Hello There, I'm struggling myself trying to make my form work with my models... So, I have 3 Models Account has_one -> Company has_many -> Individuals -> has_one Document So the account can have one company and many individuals with one document each. When submit my forms I have the following action [AcceptVerbs(HttpVerbs.Pos...

SQL. How to work/compare/find differences within different rows in the same table.

Hello, I have a table which looks like this: ID Date Size Marked 1 2010-02-02 2 X 2 2002-02-02 1 1 2010-02-03 2 X 2 2010-02-03 3 3 2010-02-03 4 X And I have a code (PHP) which does following things: a) Calculate sum of sizes per day b) Find the difference between tot...

ASP.MVC 1.0 complex ViewModel not populating on Action

Hi, I'm 3 days into learning MVC for a new project and i've managed to stumble my way over the multitude of issues I've come across - mainly about something as simple as moving data to a view and back into the controller in a type-safe (and manageable) manner. This is the latest. I've seen this reported before but nothing advised has s...

How to make rich/compound views

Hi, I have recently started to examine asp.net mvc. I have studied quite a few examples and common to these are that they contain quite simple scenarios, where a view will map to either an instance of a type in the model or a list of a paritcular type from the model. I'm looking for guidelines to compose/composite views. In the long ...

Complex ListView example with complex data and complex layout of each row?

Im pulling a list of product objects from a database call and I want to build a ListView of the data in my activity with a non-scrolling header and footer. Each row will consist of a product thumbnail, some data and a button arranged horizontally. I understand that using the ListView I can inflate each row using a separate layout. Most ...

Complex SELECT statement; one-to-many all details in one row

There are two tables: Products ID (Primary Key), ProductName PlannedByMonths ProductID (Primary Key) (Link to the Products table many-to-one), MonthNumber (Primary Key), QtytoProduce, How to write SELECT statement to retrieve results in the following format? ProductName, QtytoProduceMonth1, QtytoProduceMonth2, QtytoProduceMonth3,...

jquery countdown/countUP with server side values

script: http://keith-wood.name/countdown.htm daily json response: items: { fajr: '5:23 am', sharooq: '7:23 am', dhur: '1:34 pm', asr: '4:66 pm': magrib: '6:23 pm', isha: '8:01 pm'} when site loads i make ajax request and get the above response times, these are events that happens daily for everyday, but different timing. i want to get...

Precision of cos(atan2(y,x)) versus using complex <double>, C++

Hi all, I'm writing some coordinate transformations (more specifically the Joukoswky Transform, Wikipedia Joukowsky Transform), and I'm interested in performance, but of course precision. I'm trying to do the coordinate transformations in two ways: 1) Calculating the real and complex parts in separate, using double precision, as below:...

Numpy: Creating a complex array from 2 real ones?

I swear this should be so easy... Why is it not? :( In fact, I want to combine 2 parts of the same array to make a complex array: Data[:,:,:,0] , Data[:,:,:,1] These don't work: x = np.complex(Data[:,:,:,0], Data[:,:,:,1]) x = complex(Data[:,:,:,0], Data[:,:,:,1]) Am I missing something? Does numpy not like performing array functi...