There are enough resources on how to convert an expression tree into postfix notation, and it's not that hard.
But I have to parse a postfix expression into an expression tree.
The expression is:
A 2 ^ 2 A * B * - B 2 ^ + A B - /
I don't really have a clue on how to interpret the expression. Does someone has a clue on how to proc...
You may have noticed that we now show an edit summary on Community Wiki posts:
community wiki
220 revisions, 48 users
I'd like to also show the user who "most owns" the final content displayed on the page, as a percentage of the remaining text:
community wiki
220 revisions, 48 users
kronoz 87%
Yes, there could be top (n...
Commercial products are often a source of ideas and inspiration for open source projects. There are free and open source implementations of almost every programming language ever devised, and a lot of them are very good.
For non-work related personal programming projects, have you ever bought an expensive commerical implementation of a ...
I often find myself confused with how the terms 'arguments' and 'parameters' are used. They seem to be used interchangeably in the programming world.
What's the correct convention for their use?
...
I have not used Windows Vista. I knew that many APIs have been changed/deprecated in Vista, so programs need to be fixed or configured to execute in XP Compatible mode.
So, what should windows programmer know when they move from XP/Vista to Windows 7?
...
Let's for a moment assume that you're programming in a language that uses camelcase words for identifiers, by convention. All you Ruby types with your underscore-separated method names get to sit this one out.
What approach do you take to capitalising the letters after the first when your name contains an acronym? For example, would y...
Hi
I've wrapped Perl's Net::SSH::Expect with a small module to reduce the boilerplate code needed to write a new configuration script for use with our HP iLO cards. While on one hand I want this wrapper to be as lean as possible, so non-programmer colleagues can use it, I also want it to be as well-written as possible.
It's used like s...
A number of students want to get into sections for a class, some are already signed up for one section but want to change section, so they all get on the wait lists. A student can get into a new section only if someone drops from that section. No students are willing to drop a section they are already in unless that can be sure to get...
To me it was the If statement, I'm psyched up, since then I believed that computers are very intelligent, or I can at least make it appear intelligent because of it.
...
I have been thinking quite a bit here lately about screen scraping and what a task it can be. So I pose the following question.
Would you as a site developer expose simple APIs to prevent users from screen scraping, such as JSON results?
These results could then implement caching, and they are much smaller for traffic than the huge amo...
Here's the background... in my free time I'm designing an artillery warfare game called Staker (inspired by the old BASIC games Tank Wars and Scorched Earth) and I'm programming it in MATLAB. Your first thought might be "Why MATLAB? There are plenty of other languages/software packages that are better for game design." And you would be r...
I'm using sequential ids as primary keys and there are cases where I don't want those ids to be visible to users, for example I might want to avoid urls like ?invoice_id=1234 that allow users to guess how many invoices the system as a whole is issuing.
I could add a database field with a GUID or something conjured up from hash function...
In allusion to Dare Obasanjo's impressions on Map, Reduce, Filter (Functional Programming in C# 3.0: How Map/Reduce/Filter can Rock your World) "With these three building blocks, you could replace the majority of the procedural for loops in your application with a single line of code. C# 3.0 doesn't just stop there."
Should we increasin...
Know any good stories that describe how a keyword or an operator got it's name?
For example, why is main() the starting point on so many programs? Or why is the pipe (|) used as an OR operator in some languages? Most are derived from older syntax, but why were these chosen to begin with?
I was just reading about why we use an asterisk...
I have a source file with two similar yet subtly different sections. I'd like to merge the two sections into one subroutine with a parameter that handles the subtle differences, but I need to be sure I'm aware of them all so I don't miss any.
What I usually do in such cases is copy each of the sections to a separate file and then use tk...
my company processes paper forms so that written data is being put to databases. every form has a set of fields. i'm writing a simple internal app to define the form's fields and that includes field's validations. i'm thinking of classes structure now and i can think of two approaches:
i could write a set of classes, each representi...
I'm looking to build a "quick link" directory access widget.
e.g. (option 1)
0-9 | A-F | G-K | L-P | Q-U | V-Z
Where each would be a link into sub-chunks of a directory starting with that character. The widget itself would be used in multiple places for looking up contacts, companies, projects, etc.
Now, for the programming part... ...
I'm trying to implement an undo/redo feature into my application, using the Command Pattern. I'm facing a problem.
To illustrate it, let's imagine you can create with my application 2D profiles (as many as you want).
From these 2D profiles, you can then create a 3D part with different attributes (name, colour, scale, etc.).
+---------...
Typically languages have keywords that you are unable to use directly with the exact same spelling and case for naming things (variables,functions,classes ...) in your program. Yet sometimes a keyword is the only natural choice for naming something. What is your system for avoiding/getting around this clash in your chosen technology?
...
I am planning on putting up a web service, or some other service exposed over the internet. I would like to create an API for applications to interact with this service. I would like the API to be usable in different languages, such as Java, C++, C#, or PHP. How can I maintain one code base for my API, but distribute nice packaged bin...