Geeks With Blogs
Welcome to
Geeks with Blogs
Login
cdpcodingblog
Post Categories
data structures
random
cloud computing
open source
Archives
April 2012 (1)
March 2012 (2)
February 2012 (1)
September 2011 (1)
August 2011 (2)
July 2011 (1)
It should just work...
17
Apr 12
A simple pattern to separate Business Logic from Data Access.
Comments
|
Share
Whether we like it or not, unlike conventional engineering structures like bridges and buildings, software will always be engineered and built to be changed at some future point. It is the nature of the business requirements that we are there to serve. Everything changes. Constantly. Software Engineering is the science we busy ourselves with in order ......
Posted On
Tuesday, April 17, 2012 4:52 PM
13
Mar 12
RhinoMocks - How to intercept a and re-direct a method call to a stub using the original parameters
Comments (2)
|
Share
Suppose I have a stubbed interface acting as a proxy for the real object:IDatabase databaseStub = MockRepository.GenerateStub... suppose I have a parameterized method which needs redirecting to some utility method, for instance to return some test data:DataSet IDatabase.RetrieveData(int entityId);And I have a local utility method ......
Posted On
Tuesday, March 13, 2012 1:00 PM
01
Mar 12
C++ CLI - How to test if a derived class derives from a base class
Comments
|
Share
In this case there is a base class:
struct base {};
and a derived class:
struct derived1:base {};
To test if derived derives from base:
return dynamic_cast<base*>(derived*) != nullptr;
Posted On
Thursday, March 1, 2012 10:47 AM
15
Feb 12
C++ CLI - How to assign a gcroot instance to a stack based instance
Comments
|
Share
So suppose I have:gcroot<SomeObject^> someObjectGCRoot;SomeObject someObjectOnTheStack;And I want to assign the gcroot object to the stack object.The solution is to declare the stack object as tracking reference instead of the raw type. So instead of:SomeObject someObjectOnTheStack;instead declare:SomeObject% someObjectOnTheStack;Then the conversion ......
Posted On
Wednesday, February 15, 2012 2:12 PM
01
Sep 11
How to create a method stub in Rhino Mocks that performs nothing.
Comments
|
Share
The usual rules for stubbing objects apply: The method has to be public. Generate the stub from the interface and not the physical object to avoid the actual implementation being called.If you want to create a partial stub of an object instead of the interface, the methods you wish to stub HAS to be virtual, or they'll be called as you are stubbing ......
Posted On
Thursday, September 1, 2011 2:03 PM
19
Aug 11
ZeroMQ blocking on the constructor for Context on Windows Server 2008
Comments
|
Share
We had an issue once we deployed our .Net 4.0 C# ZeroMQ solution to a Windows Server 2008 instance where the application would freeze up or block, seemingly on the initialization of our ZeroMQ library. Upon furthter investigation it was discovered that the application was blocking on the construction of each new zmq Context object. Having exhausted ......
Posted On
Friday, August 19, 2011 2:21 PM
18
Aug 11
How to copy from char* to managed Byte array.
Comments
|
Share
Scratched my head with this one a bit, but here is the solution: Obtain the IntPtr equivalent of the char*: const unsigned char* data; System::IntPtr dataptr((int)data); Then use the System::Runtime::InteropSer... class to copy the data into the cli::array<Byte>: array<Byte>^ byteArray = gcnew array<Byte>(dataLength); Marshal::Copy(dataptr, ......
Posted On
Thursday, August 18, 2011 5:36 PM
19
Jul 11
Visual C++ Linker Error (LNK2020: unresolved token) with managed class implementations in .cpp file
Comments
|
Share
It turns out that in order for executable assemblies to successfully link, the simple reference to the managed assembly is not enough on its own. Although this is sufficient for the compiler, the linker also needs to be told where to find implementations. This is done through setting the "Use Library Dependency Inputs" to Yes under Project Properties->Configuration ......
Posted On
Tuesday, July 19, 2011 9:46 AM
Copyright © cdpcodingblog | Powered by:
GeeksWithBlogs.net
Popular Posts on Geeks with Blogs
0
Code Monkey Projectiles - Index
Kindle days are gone and amazon is not gonna accept it.
Geeks With Blogs Content Categories
ASP.Net
SQL Server
Apple
Google
SharePoint
Windows
Visual Studio
Team Foundation Server
Agile
Office
Design Patterns
Web
Azure
Brand New Posts on Geeks with Blogs
0
Kindle days are gone and amazon is not gonna accept it.
How do you run multiple instances of Microsoft Teams?
Benefits of Apple Cider Vinegar
Shaking down the Raspberry Pi 400
Blog is Moving