double testx, testy, testdeg, testrad, endx, endy;
testx = 1;
testy = 1;
testdeg = atan2( testx, testy) / Math::PI* 180;
testrad = sqrt(pow(testx,2) + pow(testy,2));
endx = testrad * cos(testdeg);
endy = testrad * sin(testdeg);
All parts of this seem to equate properly,
except endx and endy should = testx and testy
they do when cal...
Based on my understanding SerializableAttribute provides no compile time checks, as its all done at runtime, then why is it required for classes to be marked as serializable?
Couldn't sterilizer just try to serialize an object and just fail? isn't it what it does right-now when something is marked, it tries and fails. wouldn't it be bet...
I used the code on http://www.obviex.com/samples/Encryption.aspx for encryption/decryption.
I was successful in creating a simple test to functionality encrypt and decrypt data. However, I keep on getting the following error when I test the decrypt function that is used from the Accounts Controller. I am thinking it either has to do w...
I am writing a WPF application that allows the user to draw over the entire screen when the right mouse button is held down. I use a full screen transparent overlay form to achieve this, however, as I draw lines with the mouse, what's happening is that the portion of my window that contains the line is becoming visible (as expected). The...
Possible Duplicate:
What is strong naming and how do I strong name a binary?
Actually, yesterday I attended an intrview..in that they asked 1 question about strong name..I can't able to guess what it is?.pls explain about this..thanks.
...
What am I missing here? It seems from all that I read and watched, exposing JSON from a WCF Data Service should be as easy as adding the '[JSONPSupportBehavior]' directive in front of the Service Class. Problem is VS2010 doesn't recognize 'JSONPSupportBehavior'. Is there a reference I am missing? Seemed like, from alll the articles, it w...
The following code causes my vs 2008 wpf project to hang, I'm not sure why. Both Part 1 and Part 2 work perfectly fine independently, but when I run them together on an control event (click a button for example) the program hangs. I've also tried shell execute for part 2 - same results. However, this code when run within the form loaded...
Where can I look at what features planned for Mono 2.8 release are already implemented in Mono SVN?
...
I look forward to develop a WPF MVVC application which is to be ran both on Windows with .Net Framework and Mac/Linux with Mono.
As far as I understand the only part of of WPF implemented in Mono is Silverlight as Moonlight.
As far as I've read it is possible to develop a standalone application with Silverlight 3, but is it possible wi...
Hello Evryone.
I am new to this type of programming..i just want some help...regarding what to do when u need to extract the data from the serial port..and how to check that tha data is available in the serial port..so that no data loss is there....
...
Running the following code against a large PostgreSQL table, the NpgsqlDataReader object blocks until all data is fetched.
NpgsqlCommand cmd = new NpgsqlCommand(strQuery, _conn);
NpgsqlDataReader reader = cmd.ExecuteReader(); // <-- takes 30 seconds
How can I get it to behave such that it doesn't prefetch all the data? I want to step ...
What im after is a greyed out editbox you see at the bottom of some programs.
A list of results.
Im having problems having the text properly formatted.
so starting from scratch, how is it usually done?
The filling of the half page sized editbox with text.
one big long string with line breaks?
Results->Text = System::Convert::ToString...
I needed to remove the gap between the buttons while creating a skin using Devexpress skin editor. I couldn't find such an option. Then I thought it can be done by code but I couldn't find an answer, even using the Windows API.
...
I'm a C# programmer and want to write an Android app. I'm a stubborn curmudgeon and refuse to write Java ever again (after switching to C# six years ago).
Besides Mono and MonoDroid (and writing Java), are there any options for me? Or should I just feel foolish for refusing to returning to my Java roots?
(Please refrain from Java-relat...
I want to test for example
int orderId = myRepository.SubmitOrder(orderA);
orderB = myRepository.GetOrder(orderId);
Assert.AreEqual(orderA, orderB); // fail
Obviously I need a value comparison here, but I don't want to have to provide an overridden Equals implementation for all of my classes purely for the sake of testing (it wouldn...
I have created a windows application setup program, it needs to have a text file in the application folder. The file is also included while creating the setup.
Once the setup successfully completes and my program tries to modify the file based on user input, its simple throwing an exception.
I am using Windows 7 Home Premium OS.
Any s...
Hello,
How to Bring (form_x) to the front.
I have a custom usercontrol which opens (form_x) and I use this usercontrol for all of my forms. and now the problem is that the usercontrol opens a new (form_x) instead of Bringing of(form_x) to the front.
my control
namespace template
{
public partial class Background : UserControl
...
In VB.NET projects, errors are highlighted immediately after cursor leaves the line. IN C#, I have to wait several seconds for IntelliSense to highlight it. Also, C# version doesn't show all project errors in "Errors List", unless you start to build it. Actually, it seems to work differently in every way. Is it possible to adjust that be...
I have a class that needs to get some settings from the application configuration file and that is used in a console based app and a web app.
Other than catching an exception how can I determine whether to use:
ServiceModelSectionGroup serviceModelSectionGroup = ServiceModelSectionGroup.GetSectionGroup(ConfigurationManager.OpenExeConfi...
I am considering using Windows Server Appfabric for it caching functionality. I have an existing classic ASP application that I want to rewrite in ASP.NET MVC. However, I want to be able to do this "piecemeal" i.e. a few pages at a time. The problem is session state between the ASP and ASP.Net MVC application. I could use a database but ...