complex numbers [closed] - parsing

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I am working on a math project.I need a programming language that allows me to evaluate users input.
Like Multiplying 2 complex numbers: I can't use a regular expression since there are many possibilities( I want to include all the steps of calculation.)

You could use Scheme, it's a nice Lisp-like language that has built-in support for complex numbers. Also, since in Scheme data is code, it is really easy to turn user input into executable code.
Chicken Scheme is a popular variant.
Other popular languages with built-in complex number support are:
R: use i as suffix for imaginary numbers. (1+2i)^2 returns -3+4j.
Python: use j as a suffix for imaginary numbers. (1+2j)**2 returns (-3+4j).
Ruby: use the Complex class.
C: include complex.h and use I as the imaginary unit. See also How to work with complex numbers in C?

Related

What is so special about 10^9+7? [duplicate]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
In many programming problems (e.g. some Project Euler problems) we are asked to report the answer as the remainder left after dividing the answer by 1,000,000,007.
Why not any other number?
Edit:
2 years later, here's what I know: the number is a big prime, and any answer to such a question is so large that it makes sense to report a remainder instead (as the number may be too large for a native datatype to handle).
Let me play a telepathist. 1000...7 are prime numbers and 1000000007 is the biggest one that fits in 32-bit integer. Since prime numbers are used to calculate hash (by finding the remainder of the division by prime), 1000000007 is good for calculating 32-bit hash.

Why use '/' instead of other characters for routing [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
In terms of routing urls for the web, it's standard practice to use the character / to separate routing urls.
Ex:
www.example.com/i/like/programming
Is there a specific reason, such as search engine optimization, that this is the standard way to generate urls?
However, it's also easily possible, especially with frameworks such as Symfony2 or Zend, to make routing patterns like so:
www.example.com/i<>like<>programming
I want to know specific reasons why special characters are not (or shouldn't be) used in place of the character /
The convention is named Uniform resource locator. Wikipedia has a great article here

Why do we have username rules? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Why to restrict allowed usernames by different rules? For example why can't user have "#123 qw" username? Is there any techical difficulties or it's just about community rules?
Also is it ok to have national characters in the username? If I use "UTF-8" encoding for my website it should work just well in all browsers.
Username within a system is most of the time for the consumption of HUMANS therefore, from usability point of view it should be READABLE
And yes you can use your national characters in username and make sure you understand character encoding , storage and retrieval. You system/application should be ready to consume the selected encoding at every level e.g client-side, server-side and at database end and tools you use to manipulate with each tier e.g IDEs etc ..
So from my point of view you need some extra knowledge and efforts to handle such a system without killing Usability
I believe I can give you more than one reason but the first that comes off my head is this one.
http://www.example.com/profile/%64123%20qw

Translations of common application strings [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
Ok, quick points for someone who is better at searching than I am...
I know I have seen before a list of translations of common application strings like "File," "Open," "Save," "Close," and "OK," into other languages. This was not just a scrape of Google translator, but an actual "official" list based on the localized OS. It seems to me that it was on Microsoft's site, but I'm not 100% sure.
I need to translate my application into Indonesian and wanted to give our translators a head start by filling in those common terms with the standard values, but now I cannot find the web page(s)! I've spent about 15 minutes and will continue to search (and will post the answer if I find it), but if someone else knows where that is (or finds it first!), please answer.
Microsoft Language Portal

When should I use #ifdef instead of if()? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
When working in Objective-C, when is it appropriate to use preprocessor directives like
#ifdef, #if, #ifndef, and #define instead of statements like if() and switch()?
Preprocessor directives like #ifdef, etc. are only valid at compile time. They are not able to make decisions or loops at runtime. They simply regulate what gets compiled and what not.
They are totally useless at runtime. They serve a totally different purpose.
These are all part of the C language, there's nothing specific to Objective-C here.
Most of the time in your program logic you're going to be using switches, if-elses, fors, whiles, etc. This applies to C, C++, Objective-C and other C-style languages.
Preprocessor directives are evaluated at compile-time, and so only the preprocessor/compiler is interested in that logic. Your actual program doesn't deal with any of this. You're not going to use directives much except for stuff like architecture differences, compile-time constants, macros and so on.

Resources