For those new to message boards please try to follow a few simple rules when posting your question.
Choose the correct forum for your message. Posting a VB.NET question in the C++ forum will end in tears.
Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with.
Keep the subject line brief, but descriptive. eg "File Serialization problem"
Keep the question as brief as possible. If you have to include code, include the smallest snippet of code you can.
Be careful when including code that you haven't made a typo. Typing mistakes can become the focal point instead of the actual question you asked.
Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If you are posting source code with your question, place it inside <pre></pre> tags. We advise you also check the "Encode "<" (and other HTML) characters when pasting" checkbox before pasting anything inside the PRE block, and make sure "Use HTML in this post" check box is checked.
Be courteous and DON'T SHOUT. Everyone here helps because they enjoy helping others, not because it's their job.
Please do not post links to your question into an unrelated forum such as the lounge. It will be deleted. Likewise, do not post the same question in more than one forum.
Do not be abusive, offensive, inappropriate or harass anyone on the boards. Doing so will get you kicked off and banned. Play nice.
If you have a school or university assignment, assume that your teacher or lecturer is also reading these forums.
No advertising or soliciting.
We reserve the right to move your posts to a more appropriate forum or to delete anything deemed inappropriate or illegal.
I tried all possible compile switches but nothing seem to be able to cut the execution times.
Do you have some possible explanation? Is .NET really that slow?
If you like, please have a look at the Github repo and run the tests independently. There must be a flaw somewhere that I can't see. Please help me find it out.
Without analyzing your code (I don't have the time right now) it's impossible to say.
One possible explanation is that your implementation is generic and does not play to the strengths of C# and the .NET Framework. It may be that your implementation is the one that is inefficient. One way to test this would be to compare your ray tracing implementation against the implementations written by others in C#.
I avoided to use optimizations, the basic idea was to keep it generic so to make comparison between languages more meaningful. Also, I can't think of any specific optimization that applies only to C#--the code is rather plain-vanilla, classes, lists and floating point math.
A quick look at your SimpleRaytracer.cs file shows an unnecessarily large number of class instantiations. You can start off by reducing the number of allocations you're performing. Then howabout firing some of those calculations off onto parallel threads? In other words, play to the strengths.
Hey guys recently I've been wondering about which would be the best way to implement a localization system based on namespaces.
Let's say that for some reason I wanted to use a few source code files in many different projects, and for some other reason I don't want or cannot build a DLL out of them (which of course would be the "right" way to do this). Let's also say I need to localize that code in a few different languages. Also, the files I'll be sharing all use the same namespace.
Now, the standard localization technique in Visual Studio works real fine and is very easy to maintain and update within the IDE, but it's all tied to the project's main assembly name. So, while I could just copy and paste over all the necessary localization strings for my shared files each time, and prefix all the relevant localized string names with my namespace ID, that would be clumsy and error prone.
I was wondering if there was a way to build up some DLL or resource files and just bundle them up with the source code to be shared. I've been considering for example building up a few resource files within the IDE, using file names that include the namespace and the different culture IDs, and then implementing a custom resource manager using ResXResourceReader or something similar.
Any other ideas ?
P.S.: we are talking C# here.
In theory, there is no difference between theory and practice, but not in practice. - Anonymous
A computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match. - B. Bryson
but it's all tied to the project's main assembly name
You can add a *.res file to a project, and name it as you like. You can then add resources there. You could name it after your class, having a *.cs and .res file for it (and optionally a .xaml/.cs.Designer file).
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
but it's all tied to the project's main assembly name
I kind of doubt that. I would suspect that although that is one way to use it there are others.
Moreno Airoldi wrote:
Let's also say I need to localize that code in a few different languages.
You don't localize code - you localize applications. There will be differences otherwise little point in having different applications. If you have common blocks that need to be translated then keep them in their own files and then, if necessary, write a tool that merges them in the build process as a pre-build step.
Hi All, As per the title of this post... I have developed a small Dot Net WinForms C# application which uses a SQL Server Express 2008 as the database to link to which I would like to sell.
What I'd like to do is use some remote hosting service so I can put up the app and DB and give customers a trial of it before they commit to paying for it at which point I can roll it out to their own network or leave them with the hosted service if they don't have their own network.
As I've never deployed an app to a cloud based host, can some kind person give me some recommended cloud hosts who won't charge too much monthly and where I can load my Winforms App (dot Net 4.5) and I can install SQLServer Express 2008? Basically the host will need to support dot net framework 4.5 (or I have the option to put it on myself ) and SQL Server Express 2008 (or I have the option to put it on myself). The end-user would ideally access the app via a VM.
I've had a look at RackSpace but I'm unsure of which of their options I would need...
Hi, I find lots about a 64 bit app calling a 32 bit, but I am struggling with the reverse and would like to start a discussion about this. The scenario is that there are legacy calling applications that call our unmanaged C++ dll's. Our product is graphics intensive, and we could greatly benefit from the increased memory a 64 bit app would give.
So first is is it possible? Fortunately we have an intermediate DLL that interfaces the calling apps to our DLL's. The callers are a variety of languages/environments, but are all 32 bits at this time. The thought is to first get our program compiled into 64 bits (that's another discussion), but assuming that is accomplished, I was thinking of wrapping our program with .Net, and then modifying the calls to the intermediate DLL (32 bits) to instantiate us as a 64 bit dll. Am I on the right track? What issues should I be concerned with? What if the system is 32 bit windows vs 64 bit windows?
If you use some kind of remoting you can have one process in 64 bit, even if it is seen as a library, and another one in 32 bit calling it.
You can use .NET remoting or WCF to do the job.
You can't really load 32-bit and 64-bit DLLs in the same process.
Hi all, I need the following methods for login module and reset-password module.
a) Salted MD5 technique in „authentication or login module‟ and b) MD5 hash technique in „change password‟ and „reset password‟ modules.
and how it should work, I write the description below.
You're adding a password to the site because you want to protect the user's data. You want to add client-side hashing of the user's password in case someone is intercepting the traffic between the client and the server. But if someone is intercepting the traffic, then they can just read the user's data as they request it. They can also hijack the user's session and authentication cookies, and perform whatever action they want on your site.
To properly protect the communication between the client and the server, you need to install an SSL certificate and ensure that your site is only accessible over HTTPS. (Depending on the nature of your site, you might be able to get away with a free certificate from StartSSL[^].)
Once your site is protected with SSL, you don't need to worry about hashing the password on the client-side.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
Now see my situation. My Web application's security audit is being done. I implemented everything like MD5, SSL etc.
But if my auditor use this fiddler (or may be another tool for testing, i don't know what they are using) and he/she can see the password in the fiddler what should I do/say? I am not getting the point.
If they always use fiddler or any other tool they can easily see the password. then what's the solution so that password between server and client should not be in clear text.
Is there any other methods doing this so that they cant see the password using any tool? or any other client side technique?
One could explain the expert that it he/she is looking at a stream that is encrypted before it goes over the net.
Is there any other methods doing this so that they cant see the password using any tool?
Yes, but if he/she is using the key to open the lock, then it is not a security risk. If there's another application client side with administrative priviliges, then you already lost and don't need the audit.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
After successfully inject .dll file into a target process, i' would like to run it but how can i do this !!
I' know how to do it into my application by adding the dllMain() function ...
But in the target process how can it be achived ??
I read many articles talking about windows Hook but i would like to understand the method !
Good afternoon, I wanted to share with you a problem I'm having, which you can not find a convincing answer.
What is the problem?
It is that database connections are many active and AWAITING COMMAND status SLEEPING, and every time I run a new query to the database, a new connection is added, I see this with sp_who2 from Management Studio.
What is the scenario?
An application of three layers (BUSINESS, DATA and PRESENTATION) which, because it is a client-server application, data is accessed by a Windows service that raises a
console application that instantiates a class that encapsulates access to data and records on the server so it can be accessed through Net Remotting.
Proper operation, can access data and execute everything correctly. At each attempt to access data, I end with Connection.close () method.
The problem is that despite using Connection.close () connections do not die and are all state SLEEPING, and there comes a time when you can no longer accumulate more
and SQL SERVER rejects the connection attempt, because limit was reached in the POOL.
Even if I close the main application, connections are maintained, but if I close the application that instantiates the object, all connections are closed.
Anyone has been in a similar situation? any suggestions?
Hi again, i've implemeted the Dispose method on the conection object and it's seems to be the solution, first close, then dispose.
I also made some changes, before the Windows Service starts a mini app than register the remote object in a tcp channel, now the Windows services does all the work, and no extra app is needed, so, the solution copuld be bay one of thos changes or a combination.
Actually, you're looking at two different things. Visual Studio Online is not the Visual Studio IDE in the cloud. There is one feature of VSO that does enable you to edit code in the cloud, but it's only for websites deployed to Azure. See: Visual Studio Online "Monaco" videos on Channel 9.
Visual Studio Online is essentially a cloud implementation of Team Foundation Server with some additional cloud-based functionality. You should go ahead and create a free Visual Studio Online Basic account. That'll give you a place in the cloud for online source control. As you learn to code, you should also learn how to work with source control.
Express for Windows Desktop is the IDE heir to what was once Visual Basic Express, Visual C# Express, and Visual C++ Express. All three of those products (2010 era) are now what comprises Express for Windows Desktop. It's the best starting point for learning to code with any of those languages, and it connects to Visual Studio Online. For ASP.NET development, you'll need a separate Express product: Express for Web.
Agree with others. Go with Visual Studio Express. If you need cross platform option(some people use VMs to run other OS), use MonoDevelop[^]. FYI one more open source IDE SharpDevelop[^] there as an alternative.