Remember the game Civilization, where there was a large scrollable map with different behavior of some tiles. Or in Google Maps there is also a map where tiles are loaded with Ajax.
Where can I find more information on tiles classes (in C++)? How does a class hierarchy look like to implement a scrollable canvas with tiles?
...
I have a custom class written, which I instantiate from an event procedure similar to
Private Sub EventHandler
For intForCounter = 1 to intUserEntry
Dim newObj As New MyClass
newObj.Property
newObj.Method()
Next
End Sub
The class itself looks something like this
Public Property Time As Date
'First atte...
So I have case statements grouped together here, but I have a few case statements that need extra decision based on a second variable after the original case is confirmed.
This is what I have now:
Case "PRIVATE_PARTY"
If Condition = KBB_CONDITION_EXCELLENT Then
Vehicle.MarketValue = Response.PrivatePartyExcellent
ElseIf...
I know that when manipulating UI controls from any non-UI thread, you must marshal your calls to the UI thread to avoid issues. The general consensus is that you should use test InvokeRequired, and if true, use .Invoke to perform the marshaling.
This leads to a lot of code that looks like this:
private void UpdateSummary(string text)
{...
A marketing guy came to me with a request to time out the session every 6 hours regardless of the user activity on the site.
I understand that if the user leaves his computer for a certain period of time (Set right now to 30 minutes) the session should time out, but forcing a user to log in after a certain period of time just doesn't m...
Let's say I have 10 programs (in terminals) working in tandem: {p1,p2,p3,...,p10}.
It's hard to keep track of all STDOUT debug statements in their respective terminal. I plan to create a GUI to keep track of each STDOUT such that, if I do:
-- Click on p1 would "tail" program 1's output.
-- Click on p3 would "tail" program 4's output...
I haven't, but I don't say there isn't one.
All of the C# developers who read this probably do know what is protected internal and when to use it. My question is simple : did you actually ever use it or worked on a successfully designed project using protected internal access modifier? If yes, please share your knowledge and post nice s...
What is the best and simplest way to have persistent data on android for a 'favourtes' tab?
I have three types of objects which can be found on three different tabs and the user can choose to 'star' them and they get added to a favourites list. I'm not to sure what the best way of doing this is...
Currently I'm adding the items to thre...
Hi All,
I wanted to ask,
If writing nested(deep) iteration loops (as shown in example) a bad practice (in OOPs)?
For example :
If i want to zip all files that in all Workspaces.
Given example classes are Workspace, Project , File
please ignore avoid syntax errors
for each Workspace workspace in WorkSpaces
{
Pro...
In my web application authorized user has at least 4 "facets": http session related data, persistent data, facebook data, runtime business data.
I've decided to go with case class composition instead of traits for at least two reasons:
traits mixing can cause name clashes
i want the free case class goodies like pattern matching and co...
std::istream has the prototype istream& read (char* s, streamsize n) the actual number of bytes read should be gotten by calling istream::gcount(), also the validity of the istream can be known from ios::good.
I was discussing another stream class' implementation I was trying to write with a colleague of mine, where I was saying I might...
My problem is that I have to deal somehow with cases when database is down in my MVC application. So, should I like try{} catch{} to open connection in every controller? Or what is the best practice?
Note:
For sample database access is isolated in few "manager" classes that work repository kind of way.
...
Hi,
I think it's a design question, and it's been haunting me since I started my project.
I'm working on a project involving a lot IO operations, mainly reading and writing files.
I'm trying to use MVC (Model-View-Controler) architectural strategy, but I found it's very difficult to implement, especially with the exception handling.
...
Hi All,
I'm working on a Video Application and would like to hear some opinionenter code here of other developer about the logic for this section of the application.
The application I'm working on will allow two live video streams to be recorded, and combined into a single FLV file.
The application will have two "channels", I will hav...
I use interfaces/abstract base classes for most of my types and don't often inherit from concrete classes but I've recently run into a situation where either inheritance or composition is desired. I've been aware of the adage "program to an interface, not an implementation" but recently decided to dig deeper.
I've seen arguments again...
There are a lot of questions regarding side-by-side divs. I didn't miss those. But I need something that spans the whole width of the screen. This is the situation:
I need three divs positioned side-by-side. The left, middle, and right divs we'll call them. The middle div holds the header contents of the site and is a fixed width (800px...
I am looking for software that can draw some web ui icons like butttons or navigation tabs etc. I've tried fireworks and liked it but trial expired. I used to make simple buttons using ms paint but it drives me nuts trying to make it fancy.
I could pay for fireworks but would like to know is there is any decent program I can get for fre...
Here's a question that has been bugging me. I'd like to think that I prefer writing elegant C++ code. — You know, well designed, clean, documented code. But, what do you do if you are under pressure to deliver and maintain large legacy code which is supposed to meet functional and, especially, performance requirements?
After a while, my...
So, imagine we have a class like this
class Testee
{
public:
void Func()
private:
void auxFunc()
};
and we want to do white-box unit-testing on it.
Which do you think is a better approach? To declare the tester class a friend of the testee class? Or use the preprocessor like this:
class Testee
{
public:
void Fu...
Hi,
I'm writing some code to do some stuff and I'm pretty sure its not well designed at the moment but I can't think how I should be refactoring it to make it nicer...
The simple summary is that I have some code which goes through some files in a directory structure and different directories contain different content types. I have a li...