|
I am quite new in this area of posting messages. I have wrongly placed it. I am sorry. There is no question from me. This was to be sent JHVirtualKeyboard area. Once again I am sorry to have invited your response to this.
|
|
|
|
|
Hi,
I have a view that inherits from a user control. The problem is when trying to load in the designer, I get the call stack below. I've just about given up on how to fix it and would appreciate any pointers.
(note: I can see the composite UI assembly is in the references, and the version matches (the runtime version is different though)
Thank you!
at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent)
at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
at System.RuntimeType.GetCustomAttributes(Type attributeType, Boolean inherit)
at System.ComponentModel.ReflectTypeDescriptionProvider.ReflectGetAttributes(Type type)
at System.ComponentModel.ReflectTypeDescriptionProvider.ReflectedTypeData.GetAttributes()
at System.ComponentModel.TypeDescriptor.TypeDescriptionNode.DefaultTypeDescriptor.System.ComponentModel.ICustomTypeDescriptor.GetAttributes()
at System.ComponentModel.TypeDescriptor.TypeDescriptionNode.DefaultTypeDescriptor.System.ComponentModel.ICustomTypeDescriptor.GetAttributes()
at System.ComponentModel.TypeDescriptor.TypeDescriptionNode.DefaultTypeDescriptor.System.ComponentModel.ICustomTypeDescriptor.GetAttributes()
at System.ComponentModel.TypeDescriptor.GetAttributes(Type componentType)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.EnsureDocument(IDesignerSerializationManager manager)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at System.ComponentModel.Design.Serialization.BasicDesignerLoader.BeginLoad(IDesignerLoaderHost host)
----------------------------------------------------------
Lorem ipsum dolor sit amet.
|
|
|
|
|
You can use dependency walker to look for missing dependencies for a dll.
As a guess the library you are using might require one or more of the following (could be others as well.)
Microsoft.Practices.ObjectBuilder2.dll
Microsoft.Practices.Unity.dll
|
|
|
|
|
Hi,
A server farm used by our business currently only has the .Net framework up to version 2.0. I'd like to upgrade the entire farm to include all versions of the framework up to 4.0
As far as I'm aware, this shouldn't cause any issues with the servers or existing applications installed on the servers. I advised...
The frameworks can be installed side-by-side with no issues and an application running on .Net would need
to specifically target a particular version - an existing application running on an older version of .Net will not care that a later version of the framework is installed. Non .Net applications are not affected in any way by framework installations.
However, the company responsible for rollouts in our data silo came back with the rather vague...
We have experienced other clients having problems with a similar installation...
Has anyone experienced any issues with installing 3.5/4.0 on top of 1.1/2.0 where existing application functionality may have broken (or any other adverse effects)
I've performed installations up to version 4.0 on servers we directly support and haven't had any problems at all, I just need to convice the infrastructure guys this is low risk.
Anything I'm missing here, or was my advice correct?
Thanks
|
|
|
|
|
My employer has a server room, most of which only have up to .NET 2.0. Earlier this year I had installed .NET 4.0 on one of them and it works flawlessly. I have never encountered this issue either. Not at work, not at home, not anywhere else.
djj55: Nice but may have a permission problem
Pete O'Hanlon: He has my permission to run it.
|
|
|
|
|
My company upgraded to 4 sometime in the last year and did 3 sometime before that. No problems with running installs.
One mitigation strategy would be as follows.
1. Upgraded a single server and monitor for problems. Allow sufficient time for problems to show. Certainly a week and perhaps a month.
2. (Optional) if you have enough servers with the same type of installs then upgrade a percentage of them. For example if you have 100 servers then upgrade 10 of them. Allow sufficient time for problems to show. Certainly a week and perhaps a month.
3. Upgrade the rest of the servers in a staggered manner. Perhaps one a day. Monitor each as you proceed.
As a counter to what they said then you might ask about security patches. Presumably those are being applied. And sometimes those cause problems as well.
|
|
|
|
|
OK thanks both, that's what I expected but good to hear others with no issues
Cheers
|
|
|
|
|
Hi,
I've been googling for hours without finding anything, so I have to turn here! (Frequent reader, first time poster).
I have a VB.net class (myMechModel) that is used to solve a mechanical problem. The class contains all (mechanical) parameters (mass, stiffness, length) are needed to solve the problem and it stores the results in a collection within the class. The class has a method that is being called to run the simulation (myMechModel.Calculate()).
I now want to run multiple simulations of the simulation, but change some of the parameters between each simulation. I could run it sequentially, but I really want to run it in parallel (each simulation run takes about 2 second).
I've been trying to get it working with Parallel.Tasks, but of course calling myMechModel.Calculate() just results in a threading conflict because multiple threads try to write results to the same results collection.
I've been looking into cloning the initial class for each task and then changing the values I want (like mass, stiffness, length). But before I go down that path, I'd like to here comments on what would be the best way of dealing with this!
|
|
|
|
|
2 seconds a run isn't really long enough to be multithreading a single Calculate. What would work is create a number of threads, say one for each processor core in the system, each with its own myMechModel instance, and let each instance do an entire range of parameters.
So, basically, N threads each with a myMechModel, and each thread repeats: { set parameters, run Calculate } for a range of parameters that you want. That way, each thread should be busy for a while and you might be able to benefit from multithreading.
Of course, you need to be interested in running enough calculations before it becomes interesting.
|
|
|
|
|
Thanks for the comments,
I just want to clarify somethings:
* Each run of myMechModel.Calculate() takes about 2 seconds
* I need to run parameter sweeps (mass going from 100-200 in 4 steps, stiffness going from 100-200 in 4 steps etc).
* If I run it all on a single instance of myMechModel on a single thread, I'm talking 10+ seconds.
I think the main problem I have is to figure out how many instances to create, because the number of simulations might vary quite a bit. Should I see how many threads the computer runs, create that many instances and manually setup all the runs on the different threads.
I'd much rather use something more automated/efficient such as the Task Parallel Library, is there anything I could do to use that?
Final questions, I've read about IClonable, is that the way to go to create instances of myMechModel?
|
|
|
|
|
Assuming each simulation takes a small amount of input data, and generates a significant amount of output data, this is what I would do:
- create a single queue with "jobs" (instances of a Job class), each job describing one simulation, with the associated input values;
- have N threads each executing the same code, basically a loop getting a job from the job queue (needs a lock while dequeueing, not while simulating); have each thread stuff its results in:
= the Job object itself, if that is reasonnable (depends on amount and kind of results);
= its own output container (a queue, a file, whatever);
= a shared resource, such as a database.
- launch these N threads where N would equal the number of processors available (i.e. Environment.ProcessorCount), or the number of processors you willing to spend to this work.
- if necessary, have some post-processing that collects all the results, sorts them in the order you want, etc.
The one thing you must watch out for, is results requiring locks for too long a period (in case you use a shared output container), causing other threads to stall.
BTW: if there are many jobs, there is no need to first stuff them all in a queue, you could as well have a separate process that continues to feed the job queue while your simulator threads are already processing some jobs.
Note: if the calculating threads have reasons to stall (e.g. they need file, network, or database data) then you should observe the processor load (with Task Manager) and basically raise N till the CPU is fully loaded. Adding more threads beyond that point isn't going to improve things, and may even work against you.
|
|
|
|
|
i need to run a encryption and decryption algorithm which is written in c language and call the exe file in vb.net and show the output in form window.
|
|
|
|
|
|
Good link...
I quit being afraid when my first venture failed and the sky didn't fall down.
|
|
|
|
|
you gave a -ive vote...
|
|
|
|
|
prdshukla wrote:
you gave a -ive vote...
How do you know it was him? It could have been anybody.
|
|
|
|
|
yeah..you are right...but may be by mistake he may have done it..
The rating process is not very intuitive...
|
|
|
|
|
How can Good Answer, Bad Answer not be intuitive? It's hard to see how it could be any easier.
BTW - it looks like it was two people who didn't like your answer.
|
|
|
|
|
You may have received the 1s because he says it's an EXE, not a DLL.
|
|
|
|
|
Perhaps this[^] might be of use? (At least the concepts involved might be what you want.)
|
|
|
|
|
<DllImport("E:\Temp\simple.dll", CallingConvention:="CallingConvention.Cdecl)"> _
Private Shared Sub ReturnInParam(ByRef Stan As Integer, _
ByRef Message As String)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Dim Num As Integer = 8
Dim Message As String = "Harun"
ReturnInParam(Num, Message)
MessageBox.Show(Message)
End Sub
|
|
|
|
|
You can run the exe in the shell, but I'm not sure about the cmd window. I didnt need it, but thi scode will scrape the hidden cmd box for the shel output, in whichyou can regex the return values.
Private Function Shell_Exceute_FLV(ByVal Parameters_FFMpeg As String) As String
Dim Context As HttpContext = HttpContext.Current
Dim SB_FFMpeg As StringBuilder = New StringBuilder
Try
Dim Results As String = Nothing
Dim ffmpeg As New Process()
Dim ffmpeg_StartInfo As New ProcessStartInfo(Path_FFMPEG, Parameters_FFMpeg)
ffmpeg_StartInfo.UseShellExecute = False
ffmpeg_StartInfo.RedirectStandardError = True
ffmpeg_StartInfo.RedirectStandardOutput = True
ffmpeg.StartInfo = ffmpeg_StartInfo
ffmpeg.Start()
Dim ffmpeg_StreamReader As IO.StreamReader = ffmpeg.StandardError
SB_FFMpeg = New StringBuilder()
SB_FFMpeg.Append(ffmpeg_StreamReader.ReadToEnd().ToString())
Do While Not ffmpeg.WaitForExit(1000)
SB_FFMpeg.Append(ffmpeg_StreamReader.ReadToEnd().ToString())
Loop
If ffmpeg.ExitCode = 0 Then
ffmpeg.Close()
If Not ffmpeg_StreamReader Is Nothing Then
ffmpeg_StreamReader.Close()
End If
Else
ffmpeg.Close()
If Not ffmpeg_StreamReader Is Nothing Then
ffmpeg_StreamReader.Close()
End If
End If
ffmpeg.Close()
ffmpeg.Dispose()
ffmpeg = Nothing
Catch ex As Exception
End Try
Return SB_FFMpeg.ToString
End Function
|
|
|
|
|
hi every body!
I'm using Enterprise Library caching (memory caching) in my project. every thing works OK but when the application starts up for the first time I have a none ignorable delay! I can not understand the reason
every suggestion would be appreciated
|
|
|
|
|
Caches take time to fill up, to overcome this fill your cache on a separate thread.
Its the man, not the machine - Chuck Yeager
If at first you don't succeed... get a better publicist
If the final destination is death, then we should enjoy every second of the journey.
|
|
|
|
|
You should define priority of the data and load only the most important data while starting the App\service and put rest of the data load process on a background worker thread.
And it would be better if you do caching on server side rather than on client side. In case if it's really required to have a client caching, try using a different alternate something like SQL compact DB which could be shipped with the release binary rather than getting loaded each time when the App is launched.
Hope it helps.
|
|
|
|
|