AlexDcosta's Q&A profile
Visual Studio Express Editions how to calcuate log
Hi Guys, I am tryinig to figure how to calculate the standard deviation of a data set. For any of you who trade stocks I want to create a function that calculates bollinger bands. Any pointers of samples There are two general ways to calcuate the standard deviation and interestingly you see both portrayed here. The only thing I would suggest with Renee's version is divide by sts.N - 1 so as to produce an unbiased estimator for the standard deviation, and you would also match Excel's stdev function (using Excel to validate statistical programs is a nice thing to do). Extra info: in Renee's version we subtract the mean from each data point (and square it), but in doing so we lose a degree of freedom since the mean already contai ...Show All
.NET Development code and logic generation from xml
Hi, Is it possible to generate a working code with a working logic in it from a xml file. If yes then how I have to build a class with methods and attributes from XML on some machine. So machine updates the code in run time and then receives objects from various sources and do some algorithm on them Any idea Regards Ash Thanks for the reply. I am currently looking into it. But to give you a better idea the machine I am talking about is a portable machine placed in a highly specialized and customized optical network. Hence it uses some sort of translation mechanism for messages to talk to other devices on this network. As the other devices on the network are not fixed hence I have to device a dynami ...Show All
Visual Basic SOAP Reader Error
Please can anyone help me sort out the error from SOAP communication. I am using the normal way for communicating with a webservice from VB6. At the end, the code lines below load the soapreader. Connector.EndMessage Set Reader = New SoapReader Reader.Load Connector.OutputStream stroutput = Reader.RPCResult.Text But, the RPCResult object is always "nothing" and so the last line errors out "object variable or with block variable not set". Any clues Please respond ASAP.. Thanks and regards, Franklin ...Show All
.NET Development Huge bug in .NET 2.0 TripleDESCryptoServiceProvider
Hi we use the TripleDESCryptoServiceProvider to encrypt passwords which works fine on the .NET 1.1 framework. While porting our code to 2.0 we noticed that a CryptographicException is being thrown when trying to decrypt certain passwords. The exception says "Length of the data to decrypt is invalid". I've provided some test code that works fine in 1.1 but causes the exception in 2.0. How can we fix this issue so that it maintains compatibility with are 1.1 apps using System; using System.Text; using System.IO; using System.Security.Cryptography; namespace ConsoleApplication39 { class Program { static void Main(string[] args) { Test("12345"); Test("ABCDEFGHIJK"); Test("123!@#asdfASDF"); Console.ReadLine(); } static i ...Show All
SQL Server SSL with Multiple Instances
Can SQL Server be setup such that one instance on a server is using SSL and another instance is not Or is SSL a server-wide all-or-nothing issue Dave A question I have in addition to this is whether or not VM can be used to resolve this issue. Dave ...Show All
SQL Server How to use a variable from the code on Microsoft Reporting Services 2005
Hi all. I have a Application developed on VB2005 with the reports (processed local) from Microsoft Reporting Services 2005. I would like to know how can i use the value of a variable to be displayed on a textbox on my report. Thanks for the help. Best regards. dp This is basically what you're looking for: Dim varA As Integer = 123 Dim param As New Microsoft.Reporting.WebForms.ReportParameter Dim paramArr(0) As Microsoft.Reporting.WebForms.ReportParameter param = New Microsoft.Reporting.Webforms.ReportParameter("MyReportParameter", varA) paramArr(0) = param ReportViewer1.ServerReport.SetParameters(paramArr) In your report, you will need to allow it to accep ...Show All
Visual C# Static Class Overhead
Hi, We were doing some refactoring here and had a discussion concerning static classes. Basically we have a set of classes with a bunch of methods in them that refer to strings. Now I have recommended that all strings should be defined as constants at the top of each class so that if a string needs to change we only change it in one place and not have to go through every method finding every instance of it. So basic good practice. Now with C# 2 came static classes. So the debate is to whether we should drop the constant strings out into a seperate static class and then refer to them in the method like a property of the static: i.e string myVariable = MyStaticClass.MYSTRING; as opposed to string myVariable = MYSTRING; W ...Show All
Visual Basic VB Timer interval
the systemtimer interval only goes to 1/1000 of a second if I understand it correctly. IS there a nother timer source that goes further My issue is i have an sub that calls the paintbox.invalidate every tick. But with the timer interval set to 1, it still seems slow. TImer1.interval = 1 sub timer1_tick() handles timer1.tick time = time + 0.001 ** my time source for calculations *** perform velocity calculations **** paintbox.invalidate() I can set my time to increment by 0.01 which will speed it up, but will also mess up my calcualtion timing. any ideas Does directx have a clock/timer I have the June sdk2006 You could look at the System.Threading.Timer class or the System.Timers.Ti ...Show All
SQL Server How do I move my database?
I am using VWD 2005 Express, with SQL 2005 Express. My web hosting company supports ASP 2.0 and SQL Server 2005, but have put SQL on a database server, which is separate from the application server. I successfully published a "Hello world" test application, but my database application failed after displaying the logon page, presumably when it first tried to connect to the database. VWD has created my database within the application folder ( app \App_Data\ASPNETDB.MDF) and created the configuration string in web.config: - < add name = " ConnectionString " connectionString = " Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True " pr ...Show All
.NET Development Security when Hosting CLR
I have an unmanaged application that hosts the CLR. This application may be located in a location that does not have full trust for managed applications (on a network share, or on a locked down machine). The unmanaged application obviously has full access to machine resources. However, any functionality in managed code is limited by the security settings for where the assemblies are located. Is there a way (since I'm hosting the CLR) to give the managed code I am running full trust access, even if they are located on a network share, for example. This looks promising, but... the AppDomainManager must reside in an assembly in the GAC, or in the directory of the application and must be full trust. I want ...Show All
Visual Studio 2008 (Pre-release) Changing rectangle's position in the scene
Hello, I was trying to change a rectangle's position in a scene by using the procedurel code: Rectangle.Margin.Top = Rectangle.Margin.Top + 10; But I got an error which says that "Cannot modify the return value of 'System.Windows.FrameworkElement.Margin' because it is not a variable." So how the position of the rectangle could be changed Rectangle.Margin = new Thickness(Rectangle.Margin.left, Rectangle.Margin.Top + 10, Rectangle.Margin.Right, Rectangle.Margin.Bottom ); ...Show All
Visual C++ exception when using C++ and COM
I'm a totally newbie when it comes to C++ adn COM so if you have the answer please let me know, even if it's trivial. I'm using the following piece of code: #import "..\libs\BGMXmlLib.tlb" no_namespace #import "..\libs\BGMEngine.dll" no_namespace using namespace std; static CComPtr<IEngine> pIEngine; static CComPtr<_XmlWriter> pXmlWriter; class CCoInitializer { public: CCoInitializer() { HRESULT hr; hr = CoInitialize( NULL ); if (FAILED(hr)) { throw hr; } CComPtr<IUnknown> spUnknown; hr = spUnknown.CoCreateInstance(__uuidof(Engine)); if (FAILED(hr)) { throw hr; } spUnknown.QueryInterface(&pIEngine); spUnknown.R ...Show All
SQL Server Architectural Design Question ?
We currently have a number of SSAS 2000 physical cubes and a single KPI virtual cube that our finance department reports from. A colleague is prototyping a new approach in SSAS 2005 and I’m looking for some feedback. Please see http://www.dailyware.com/SSAS2005Design.jpg for a high level overview. The lines in red illustrate custom .Net applications that push aggregated data from cubes to some other reporting source (SQL tables, XML ) that our finance department will report from. Thought that come to my mind include: many points of failure, significant custom development required, none-mainstream, high maintenance cost…. Thanks, Gary Hi Gary, Edward already provided ...Show All
Smart Device Development AntiAlias / LogFont problem ...
Hi all, I'm trying to use the LogFont class (Microsoft.WindowsCE.Forms.dll) to be able to see the different Quality options for fonts rendering. I have tried with an MSDN sample http://msdn2.microsoft.com/en-us/library/ms181011.aspx The sample is running fine, i can see the text rotate, but none of the Quality options is working, setting the Quality to NonAntiAlias or to ClearType have no effects at all. I'm trying to found a way to get really smooth fonts on Windows CE5.0 based device, but it definitely seems impossible ... Thanks. Lucas Hi Lucas, You won't see any difference between fonts when the device has ClearType enabled system wide (this trumps all other settings). If you have system wide ClearType turned off, you should b ...Show All
SQL Server question about job names
When I create a 'simple' transactional push replication 3 jobs are created. As far as I know from studing books online I can either let SQL Server generate the jobs, and SQL Server determine the jobname (which is different with every time I let generate them), or I can create the jobs manually and use that jobs when I create publication and subscription. What I like is that SQL Server generate the jobs with a name I define. Why is this not supported Or do I miss something Regards Wolfgang Kunk I can mail you the exploit code where a mere db_owner of a publisher database can drop the distribution cleanup job on a < SQL2000 sp3 server although I doubt that will convince you. -Raymond ...Show All
