Google-like Calculator Program for Windows [closed] - windows

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 7 years ago.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
I love using Google for quick back-of-the-envelope calculations. For instance, if I want to know the approximate weight of a carbon-12 ion with charge state 4, I search for
12 u -4*electron mass in u
and get the answer 11.9978057 atomic mass units. More complex things, such as the cyclotron frequency of this ion in some magnetic field, are just as easy:
1/(2*pi)*4* (elementary charge)/(12 u - 4*(electron mass)) * 5.1125 Tesla
This returns the correct answer 26.174171 MHz. The fact that I can enter 12u - 4*(electron mass) and Google converts the units on the fly, is really helpful to me. WolframAlpha can do even more, but Google is a lot quicker and does not ask for a subscription after my nth query.
As an offline solution, I used a Matlab script in which I had most constants defined, but Matlab takes 30 sec to 1 min to start up, which is frustrating. Mathematica is not much faster to start up, either. Also, for technical reasons I have to use network licenses, so these programs are not offline solutions anymore. I switched to Excel (which loads quite fast), where I have a sheet that used named ranges. This is semi-convenient, but it just feels wrong.
Is there any lightweight Windows program that provides this functionality offline?

You can use the Units program that was originally developed for UNIX. There is a native Windows port that is based on version 1.87 (2008). The current version of the UNIX tool is 2.01 (2012).
Units was originally designed to do simple unit conversion, but it also supports evaluating mathematical expressions. It requires you to specify the unit of the output and gives you two lines as a result: The result that you want is the first line, the second line is the inverse of the result.
This program has three major shortcomings when compared to the Google math expression evaluation:
You have to know the unit that you want to get in advance. (I don't always know it, and sometimes I just don't care. Often this unit is "1", as for the result of the calculation sin(pi).)
It does not tell you how it interpreted the units that you entered. Google always returns a parsed version of the input string, so that you can see where Google misunderstood you.
It is quite strict when it comes to variable names. Multi-word names are not permitted, so electron mass is called electronmass (m_e also works).
The installer.exe is easy enough to use, but on my Windows XP machine it did not set the path variables of the command line correctly. I set up a simple shortcut on my Desktop that points to: C:\Programs\GnuWin32\bin\units.exe.
Overall, Units is a nice and quick calculator that starts up a few thousand times faster than Matlab or Mathematica - but the user interface has some shortcomings.

Related

In AND gate how two bits turns into 1 bit? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
In Book, "But how do it know" I am trying to understand how CPU actually works. I got the concept of bit. But I am not getting this line: "The computer part has a device that does something with bits. If you have 2 bits and you connect those two bits to input, the device looks at those bits and "Decides" Whether to turn one output bit on or off"
Author explains a little later, " when both inputs are off, the output is on, so.... how do you get electricity at the output if both inputs are off?. Well, that is an excellent question, and the excellent answer is that every one of these devices is also connected to power."
HOW?
Sounds like what you are talking about is an XNOR gate. These gates are similar to AND gates but also activate when both inputs are 0.
Logic gates use power similar to how many other electrical devices do. For example, a light switch only turns on the lightbulb when you apply the correct input (closing the switch). The gates simply have a more complicated switch that activates when the correct inputs "close the switch" and allow current to flow from the power source to the output of the gate.
The internals of logic gates can get fairly complicated which is why we simplify the logic to easily identifiable boolean logic gate symbols and their corresponding truth tables. You'll notice that these symbols often don't include any power inputs as they are assumed and omitted from the boolean logic diagrams.
https://www.electronics-tutorial.net/digital-logic-gates/xnor-gate/

How in the world does Windows File Explorer sort by name? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
Just once I'd like someone from Microsoft to say, "That seems weird. It looks like you might lose your files. I'll log a bug for that."
In what universe does 5 come before 4?
Courtesy #RaymondChen's Windows Confidential: The Evolution of Sorting:
...when Windows 95 sorted file names for display in Windows Explorer, it would put file139 ahead of file20. This is perfectly logical from a computer programmer’s point of view. It’s also completely counter-intuitive to normal human beings—thus proving that computer programmers are not normal human beings.
In Windows XP, Microsoft updated the Windows Explorer sorting algorithm to be more in line with what normal human beings expect. It treated digits in file names as numbers instead of sequences of characters. While this improved sorting for most people, there were cases where this change resulted in some surprises.
One example that recurred frequently was file names containing hex values. Under the new number-based sorting, Windows Explorer assumed that a file named “1040A” should sort slightly after “1040,” and nowhere near a file named “103F2.” If for whatever reason you’re in the habit of viewing folders full of files whose names are hex values, you can set the policy “Turn off numerical sorting in Windows Explorer.” This policy changes sorting back to the way it was in versions of Windows prior to Windows XP—namely, character-by-character.
Ironically enough, this was known as "intuitive file sorting" when the feature was introduced back in Windows XP. It can be turned off by setting local policies (as highlighted above) or by editing the registry - see How to Enable or Disable Numerical Sorting in Windows Explorer.

Pitch Detection In Mac OS X [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I don't suppose anyone is aware of any libraries that allow you to detect the current pitch (that is, in notes) received by the microphone in Mac OS X? I'm assuming it'd be a mixture of Objective-C and some provided lib. Or else in Java for multi-platform goodness?
There are some code snippets here that describe auto-correlation for pitch.
http://www.iwillapps.com/wordpress/?p=212
http://www.iwillapps.com/wordpress/?p=214
Also, this is a great "explanation" on two types of pitch detection
http://cnx.org/content/m11714/latest/):
time-domain
autocorrelation
frequency-domain harmonic product spectrum.
musical DSP solutions are difficult. finding something particularly GOOD and packed in a library and for free is very optimistic. (the music software industry being as competitive as it is...)
a useful repository of source code can be found at http://www.musicdsp.org/
otherwise, Miller Puckette's Fiddle~ code does pretty much exactly what you describe. it is not a library, though (it is an extension to PD). but the source is available AFAIK.
Well, you could use Aubio after recording a sample from the mic, or find a way to pipe to it.
Don't know of any specific liibraries but Praat does do pitch analysis, runs on OS X and can be scripted.
Transcribe is excellent. It will show you the pitch of a recording, and show you which piano keys.
If you are looking to write this yourself, have a look at FFT (Fast fourier transform) algorithms. Its actually quite easy to implement. Id do the FFT (which converts a signal into its frequency components) and then just pick out the top one.

Tool for analyzing VB6 source code (like Understand from SciTools) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Does anyone know of a tool to analyze/navigate VB6 source code like the tool from scitools?
http://www.scitools.com/products/understand/
Maybe Project Analyzer is an alternative?
Also you could take a look at codesmart 2009 for VB6
Project Analyzer
The free MZTools plug-in for the VB6 IDE has some nice features, like listing all callers to the current procedure, and a much-improved search tool. Get this, even if you decide you need another tool for analysing.
FKCoder mentions in another question that Microsoft's free Visual Basic 6.0 to Visual Basic .NET Upgrade Assessment Tool creates a call graph in HTML for a single VBP project.
If you have Visio, you probably have the Unified Modeling Language (UML) Reverse Engineering add-in for VB6 that will create UML diagrams from your code.
EDIT: +1 to kb for CodeSMART for VB6
VBDepend is now available,it's NDepend like for vb6.
Our SD Source Code Search Engine is a language sensitive tool for search across large bodies of source in VB6 (and it understands many other langauges, e.g, C, C++, C#, Java, COBOL, PHP, ... at the same time!).
It understands the structure of the langauge (identifiers, numbers, keywords, strings, operators, comments, whitespace) and lets you formulate queries for code constructs in terms of those entities. Because it understands langauge structure, it is isn't fooled by whitespace changes or line breaks, and this significantly reduces the number of false positive hits.
The Source Code Search Engine preindexes your source code base to provide extremely fast searches even over millions of lines of code. The Graphical UI shows hits on queries; from there, a single mouse click can show you the source code for hit. From the souce code, you can go directly into most editors.
As a side effect of indexing the code base, the SCSE also computes various metrics per file: SLOC, NCSLOC, McCabe and Halstead complexity numbers, etc.
A unique kind of analysis the we offer for VB6 that is different than SciTools is duplicate code detection.

Are there any software guarantees in critical systems? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
Are there systems or is there software out there that is developed with a proof of correctness to back it up? Or are all critical systems developed merely with an aggressive code review and test cycle?
Coding for high integrity applications, in the real world, generally involves jumping through a bunch of QA hoops. Sometimes these hoops actually have something to do with getting the software right.
The medical device industry in the USA is regulated by the FDA. They publish a bunch of regulations covering "design", which includes all the software development. These regulations are basically ISO 9000 on steroids. You have to have a bunch of documents which are written, marked up by reviewers, updated with the review comments and signed off by a senior manager. Because the regulations are backed by law the FDA want to see evidence that these records have not been tampered with, for instance by writing the "expected result" of a test after you saw what result the test gave. So you either have to have a locked down totally secure CM system, or it all has to be signed and dated on paper (including the source code). The FDA inspectors have real law enforcement powers; if they see fit they can inspect your source code with an armed federal marshal. However they are not software specialists: their job is not to judge the quality of your code, just to make sure you have complied with all the regulations.
The aviation industry has to follow DO-178B, which is also ISO-9000 on steroids. You have to produce lots of documents and demonstrate traceability between them. I don't know if the FAA has the same approach to QA as the FDA though.
The problem is that nobody really knows how to produce software that does what it is supposed to. So instead we have a kind of cargo cult approach where we produce lots of documentation in the hope that this will imbue our software with quality. Its true that quality software generally has clear requirements and a simple logical architecture, but that doesn't mean that writing a "Requirements Document" or an "Architecture Document" will improve matters.
The evidence suggests that factor with the biggest impact on code correctness is the team that created it. However you can't write a legal constraint on a team. So instead the people with the job of mandating quality have to write constraints on process instead, in the vague hope that this will have a similar effect.
See They Write The Right Stuff for an interesting look at how they develop software for the Space Shuttle.
Excerpt:
But how much work the software does is
not what makes it remarkable. What
makes it remarkable is how well the
software works. This software never
crashes. It never needs to be
re-booted. This software is bug-free.
It is perfect, as perfect as human
beings have achieved. Consider these
stats : the last three versions of the
program -- each 420,000 lines long-had
just one error each. The last 11
versions of this software had a total
of 17 errors. Commercial programs of
equivalent complexity would have 5,000
errors.
Yes, there are systems out there developed with proof of correctness. Praxis have been doing this for years using SPARK Ada, and now we're doing it with C and Escher C Verifier. It's not a panacea, because even though we prove that the code satisfies the specification, it's usually difficult to be certain that the specification is appropriate for the application concerned.
One of the barriers to more widespread adoption of formal proof is that the existing aviation software standard DO-178B is not friendly to formal techniques. The DO-178C rewrite currently in progress is supposed to fix that.
Check out this column by Walter Bright, basically arguing that it's virtually impossible to write perfect software, so the best thing to do is fail fast and build in redundancy.

Resources