|
Got it to work;
override this.GetShapeDefinition() = seq<shapedef>{
let def = new PolygonDef()
def.VertexCount <- 3
def.Vertices.[0] <- new Vector2(1.0f, 2.0f)
def.Vertices.[1] <- new Vector2(-2.0f,-3.0f)
def.Vertices.[2] <- new Vector2(2.0f,-3.0f)
def.Restitution <- 0.0f
def.Friction <- 1.0f
def.Density <- 1.0f
yield (def :> ShapeDef)
}
|
|
|
|
|
|
This isn't a project yet, it's a wishlist - have you started on a project-plan?
I are troll
|
|
|
|
|
I have created Abc.msi File using setup and Deployment from Visual Studio 2008. I would like to test this in vertual machine before installing to a client machine. I followed these procedures
1. install .net framework 3.5 on Virtual Machine
2. then install Abc.msi
I gets installed perfectly fine but when I try to open that it Gives me error saying that --
"Abc" encountred some problem. How can I overcome this problem? Any help will be appreciated.
In that winform I have one of the function "print" that prints in Excel file. Vertual machine does have office 2007 installed.
Thank you
bijaya
|
|
|
|
|
If you're using the Office interop, then you'll have to have Excel installed.
Use the Assembly Binding Log Viewer[^] to make sure that missing assemblies is the problem that you're encountering.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
I have Excel installed in the vertual machine.
Thank you
Bijaya
|
|
|
|
|
What are the differences between singleton and pooling?
If singleton design pattern is used to have just one connection.
Also, we know that the connection pooling helps to organise the connections.
How are hese two things similar and different?
Many Thanks....
|
|
|
|
|
A Singleton implementation should guarantee that there is ONE AND ONLY ONE instance of a particular object in a system.
A pool is a management object that contains resources. It is generally used to maintain high-cost connections to resources and limit the number of the resources generated by the system.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Can we have a practical explanation of that? More elaborate...
t.a.
|
|
|
|
|
Sure.- Singleton Example
- Let's say that you're implementing an interpreter for a scripting language that contains some mathematical operators. Now, you design your language so that none of the objects that implement the operators (such as AddOperator, MultOperator) have state, just a collection of methods. To reduce the memory consumption of the interpreter, you can choose to have each of those operators as singletons, one instance of the AddOperator will exist in any AppDomain. This is in contrast to parsing the input and creating an AddOperator into an abstract syntax tree every time the parser encounters the + symbol.
- Pool Example
- Quite often in multi-threaded applications that access data from a persistent store, the connections that the applications use to connect to the persistent store are pooled. For example, it's a common practice to pool a certain number of connections to a database because it's so darn expensive to create the connection. Then, when an application wants to get data from the database, it asks the pool for a connection instead of creating its own.
I think that your confusion may be coming from the thought that "a resource pool is a singleton." That can be true and quite often is. In general, why would you create multiple pools of resource connections when that kind of defeats the purpose of having that limited number of expensive connections?
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Thanks for explanation.
However, could you please select another example.
Call me a dumbo, but i am in a loss of differentiating between the two.
For example, if i have a web application where there are 7 odd connections strings. Do i hav to use the Singleton or just use Pooling to take care of that?
You are already writing good and helping my understanding.
Appreciate Much!
|
|
|
|
|
In general, why would you create multiple pools of resource connections when that kind of defeats the purpose of having that limited number of expensive connections?
Designing an architecture around singleton objects that hold state may lead to problems if requirements change in unexpected ways. Even if it's expected that the singleton will be associated with a hardware resource of which there will never be more than one (e.g. the current display monitor) it's possible that there may in future be a need to support more than one such resource, no matter how unlikely it may seem today.
That having been said, the proper type of object is something like a singleton, in that at most one such object should be associated with any particular hardware resource, and the object should persist as long as anyone has use for it.
There are other pooling situations, like thread pools, where sharing one pool between different parts of an application may lead to resource starvation. While there may be ways of having a single pool implement a suitable prioritization strategy to ensure that every separately-designated part of an application is allowed to have at least one thread running at a time from a shared pool, having different parts use different pools may be simpler.
|
|
|
|
|
Right you are! That's why I started it with "In general." Special cases for anything exist.
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
nicetohaveyou wrote: What are the differences between singleton and pooling?
nicetohaveyou wrote: How are hese two things similar and different?
Well, if you have a Singleton Pool they are one thing and so not different nor similar.
|
|
|
|
|
Is there a lifeguard on duty there? 'Cause I'm not that strong of a swimmer....
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
You might ask that question in the get-together forum.
My best guess is the guard is in one of the lounges though.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Visions of Pamela Anderson running in slow motion...
|
|
|
|
|
|
Don't crosspost in a bunch of forums. It's considered very rude.
|
|
|
|
|
Hi,
When to use patterns and practices?
I think it's used for architecture like 3 tier...
How to start using it?
I read on Microsoft that it's recommended arch. for .net projects but how to start using it?
|
|
|
|
|
A pattern is merely a recognition that certain types of problems have been dealt with in a certain fashion before and that this was a successful way of dealing with it. If you like, you can think of patterns as bricks which can be used to build an application.
Whenever you build an application, you should start off by thinking about the problem you're trying to solve. When you start to break it down, you'll be able to identify what patterns are appropriate.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys
|
|
|
|
|
|
Patterns are great for solving common problems. The only problem is a lot of the examples accompanying design pattern publications don't appear to be common problems in my eyes. I am writing some articles about design patterns at the mo. and I'm going to provide practical examples.
My first article is about the Implementing The State Software Design Pattern[^]. I will be writing many more!!
When I have a few Design Pattern articles in my blog I will create a new 'Design Patterns' header for them so they are easier to find.
Hope my blog will assist you.
Ps. Also, do a google for Extract Method, Extract Parameter. These are a couple of basic patterns that can be applied to code straight away.
|
|
|
|
|
Visual Studio 2005 CE (Windows CE 5.0) Emulator not listing even after installation
why ??
thanks
|
|
|
|
|
Hi,
I am using mmc in my application, when i dynamically refer a dll using the following code.
Assembly assembly = Assembly.LoadFrom("PlgWebSvrAuto.2.dll");
objIConfig = (PlgWebServer.Proxy.IConfig)Activator.GetObject(typeof(PlgWebServer.Proxy.IConfig), "tcp://localhost:8085/PlgCamera");
objIConfig.UpdateDBData();
this goes and hits our server when the solution is executed, but does not work when the dll is installed and executed.
Any ideas please..
Thanks,
Renuga P
|
|
|
|