Hello!
A project I'll be working on in the near future requires me to do some font replacement for some headings and small portions of the copy (blockquotes, etc)
The catch is that the designer wants to use Helvetica Neue.
I've looked at Typekit, Fontdeck, Google Fonts, and FontSquirrel and they don't seem to have said font nor anythi...
I am implementing a few strategies (Strategy Pattern) which have some common behavior and am undecided where the common operations should live.
Assuming I 1 context and 3 strategies, some of the operations used in the strategies are shared, some are needed only by 2 others just be 1 of the strategies.
There is no member level state s...
I'm building a specialized pipeline, and basically, every step in the pipeline involves taking one file as input and creating a different file as output. Not all files are in the same directory, all output files are of a different format, and because I'm using several different programs, different actions have to be taken to appease the ...
Simple question, I think.
I have one thread that responds to a callback that is called when a user connects via TCP. That callback wants an answer if I accept or reject the login. Problem is I have to send a login request to a security server via asynchronous message passing and wait for a response.
What is the best way to handle t...
Hello all,
An easy one ;-)
I declared:
xmlns:om="clr-namespace:System.Collections.ObjectModel;assembly=System"
I try to set a generaic as the DataType:
<DataGrid d:DataContext="{
d:DesignInstance Type=om:ObservableCollection<System:Int32>}" />
But I'm receiving an error: "Invalid format for a type".
Anybody ha...
In my framewrok I have an ITransaction interface.
It implements some basic operations like Commit() and Rollback(), it is being used for flat files and other data sources.
However NHibernate has an ITransaction interface as well.
It is not the same as my interface since there are some database specific methods but there are similarities....
Hello guys,
I have a class with two related functions (methods):
public class class1
{
public void SubscribeToListOfEvents()
{
// ....
}
public void UnSubscribeFromListOfEvents()
{
// ....
}
}
What's the best practice to use related functions in one class ?
Do you know of any implementations...
What is the use/advantage of function overloading?
...
Wondering what others do / best practice for communicating between layers. This question relates to communication between layers 2-3 and 3-4.
Our Basic Architecture (in order) as follows:
UI
Front End Business Classes
Web Services
Back End Business Classes
DAL
The web services are just a façade that include logging and authenticatio...
Hi,
I'm working on a c++ app and I'm facing a problem:
I have a class B derived from the abstract class A that has some event handling methods. A third class C is derived from B and must reimplement some of B methods. Is there a way to implicitly call B's method before calling C's one?
Class diagram:
class A
{
virtual void OnKeyPr...
I have fair amount of knowledge on unit testing. I have been trying to read about code contracts. Does it really help unit testing? Is it over-rated especially when we talk about code-contract helping to do unit testing. I am specifically referring to contracts in .net 4.0. I use nunit for unit testing.
...
I have checked the design guidelines from the Android developers recently and found the recommendation to use at least 4 states for interactive ui elements.
default, disabled, focused, pressed
see http://www.slideshare.net/AndroidDev/android-ui-design-tips, slide 13
On the other hand in slide 10 it is said to make the right things vis...
I'm trying to design a program that uses a third party API. The third party API describes an input with 296 fields, and an output with 179 fields. Obviously I want classes to represent the input and output. Are there any tricks to designing a class with so many fields? Should I have a normal getter and setter for every field?
Note: ...
I am thinking of storing bunch of data in XML files. Each file will has information about a distinct element lets say contacts. Now I am trying to do retrieve a contact based on some information eg: Find all the contacts who live in CA. How do I search for this information? Can I use something like LINQ. I am seeing XElement but does it ...
CFtpFileFind finder(mConnection);
found = finder.FindFile("*.log");
while (found)
{
found = finder.FindNextFile();
wsprintf(fileInfo, "%s", finder.GetFileName());
//need file size of this .log
//no member function for this in CFTPFileFind class?
}
EDIT Answer
finder.GetLength();
...
Its amazing how many programmers in the greater community of programmers ask questions like "How do I do an EXTJS backend?" or "How do I integrate jQuery with Java?", not understanding the distinction between the client and the server. Then I got to thinking, are there frameworks where the server actually sends JS or something to the cl...
Consider the following class structure:
class Filter
{
virtual void filter() = 0;
virtual ~Filter() { }
};
class FilterChain : public Filter
{
FilterChain(collection<Filter*> filters)
{
// copies "filters" to some internal list
// (the pointers are copied, not the filters themselves)
}
~Filter...
I have a RequestHandler class and a RequestListener class. A RequestHandler creates a RequestListener and passes it a reference to itself. The RequestListener in turn calls methods on the RequestHandler to handle requests of different types when they are processed (eg handleTypeARequest(), handleTypeBRequest() and so on). Unfortunately, ...
Would it be considered bad practice to use a widgets title attribute to refer it?
For example I have a number of custom radioBoxCtrls on a panel
I only ever need to get/set all the values at once
so the container class(a panel) for the radioBoxCtrls objects has the following methods
get_options()
set_options()
To set options for...
In past years I have learned the most important languages for web development (CSS, HTML, JS, PHP) and I can create good-structured sites.
But an important part of web design is the images used for buttons, backgrounds, text, gradients... Also the main logo is a very important element in the layout of a website.
However, I dont know...