baswegan2's Q&A profile
SQL Server YTD calc doesn't work
I have a YTD calc: Sum ( YTD ([Dim Date].[Full Date]),[Measures].[Commitment Amt]) This produces a #VALUE result, with the error "By default, a year level was expected. No such level was found in the cube." But my Date dimension Type property is Time and the attribute type properties are set at Days, Months, and Years respectfully. What am I doing wrong Do you have a hierarchy after [Dim Date] If this is the case try [Dim Date].[Date_Hierarchy] in your sum calculation. /Thomas ...Show All
Smart Device Development Discovering OS version / device model number programatically.
Hello. We are developing the same app for 2 different devices. They are running WM 5.0 and WM 2003. The proxy string which one uses does not work for the other and vice versa. One likes "192.168.10.3" and the other likes "http://192.168.10.3". So I need to discover at run-time either the OS version or device model number. I've not been able to find this info anywhere. Does anyone know of a way to do this Thanks in advance Lee. I make a call to KernelIoControl in a C# program to get the device ID and platform ID. The device ID is typically the serial number of the device. The platform ID is typically the model number of the device. I can upload sample code if needed, or you can review t ...Show All
Visual Studio 2008 (Pre-release) Required or optional fields.
I have a data contract that looks like: private string _BasketIDField; [ DataMember (IsRequired= true )] public string BasketID { get { return this ._BasketIDField; } set { this ._BasketIDField = value ; } } But when I generated the proxy for the client I see: [System.Runtime.Serialization. OptionalFieldAttribute ()] private string BasketIDField; [System.Runtime.Serialization. DataMemberAttribute ()] public string BasketID { get { return this .BasketIDField; } set { this .BasketIDField = value ; } It seems that the "IsRequired" on the property is getting ignored. One other indication is that I get an exception ...Show All
Windows Forms Serial number in VS 2005 Setup Project
How do i generate the serial number that is needed, when you want to install an application made in VS 2005 as a Setup project and add a customer information dialog to it I was looking for a propperty value to set, but all i can find is a propperty named SerialNumberTemplate.... Thank you in advance. SerialNumberTemplate is correct.. check out this topic: http://msdn2.microsoft.com/en-us/library/w3xwh311.aspx The trick is to change the template slightly so that the template works, but people don't know about the values not shown.... It's not a rock-solid system, but it works pretty okay :-) ...Show All
SQL Server PredictProbability with Association Rule model..
I have run into a .. somewhat of a "duh" question. I'm running association rule to run a basket analysis, and I'm trying to get probability of each prediction. I know this is wrong, but how do I go about running PredictProbability on each ProductPurchase prediction When I run the below DMX query, I get this error message... Error (Data mining): the dot expression is not allowed in the context at line 5, column 25. Use sub-SELECT instead. Thanks in advance... -Young K SELECT t.[AgeGroupName] , t.[ChildrenStatusName] , (Predict([Basket Analysis AR].[Training Product], 3)) as [ProductPurchases] , (PredictProbability([Basket Analysis AR].[Training Product].[ProductName])) as [ProductPurchases] From [Basket Analysi ...Show All
.NET Development XslCompiledTransform and xml namespace
Having trouble performing a XslCompiledTransform on an xsl file because the xml file has a xmlns="http://www.abc.ie/cv/1.0" declared within it. Is their any way around this like declaring a XmlNamespaceManager like what is available for XmlDocument. here is the xml file < xml version="1.0" > <cv xmlns="http://www.abc.ie/cv/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="Schema.xsd"> <personalDetails> <name>Joe Soap</name> </personalDetails> </cv> here is the sample xsl file i am loading into XslCompiledTransform and am writing out to another xml file using XmlTextWriter. but it do ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Help needed with Spacewar Disaster
Hello, I am a C# begginer and i was just wondering if anyone could help me with a little problem. I have made a basic Spacewar game following a gamestate system. when the game load you press X and the game begins. you are meant to be able to fly a spaceship around but all i can get it to do is turn. i have some code which should fix the problem but i don't know where to insert it. Vector3 modelPosition = Vector3 .Zero; float modelRotation = 0.0f; //Position of the Camera in world space, for our view matrix Vector3 cameraPosition = new Vector3 (0.0f, 50.0f, 5000.0f); //Aspect ratio to use for the projection matrix float aspectRatio = 640.0f / 480.0f; anythough on where the code goes ...Show All
Smart Device Development Windows CE5.0 or Windows Mobile 5.0?
Dear All: I am developing a smart device application, but I have a choice of operation system either on Windows CE5.0 or Windows Mobile 5.0. I am not sure about the difference for these two operating system from a development point of view. I heard Windows CE have a richer set of functionalities than Windows Mobile. However, if I develop my application on .NET compact framework 2.0, what the difference these two operating systems will make for my development. Please help. Thanks Below should clarify few things for you: Windows CE is the embedded real-time operating system used inside small devices e.g. controllers, GPS devices etc. Window ...Show All
Windows Forms How to get more than one inputs from a textbox?
Hi, I have one doubt in using textbox control. How can I get more more than one inputs from single textbox for example abc, def, ghi is the textbox text. I want individual words(like abc , def or ghi) seperated by "," (comma) to store them in seperate datafields in a table. Is seperator "comma" only or we can use other chars, or spaces some body reply me, Bye Ananth... Use String.Split VB example Dim strWords() as String = textbox1.text.split(","c) C# example String[] strWords; strWords = textBox1.Text.Split(','); ...Show All
Smart Device Development Wireless C#.NET
Hi there, I've been posed with a problem like following: I have a laptop in an environment with several different access points, each has a SSID. I would like to write a tool with C# that takes a SSID as input and connect to the according access point. Can anyone give me any clue how to do it Any input is appreciated. Thank you. Yes this library is a good one. I've tried the opennetcf.net namespace which works on windows CE. But when I tried to debug it on Windows XP there is a problem: it couldn't find the "coredll.dll", which is only on CE. Any suggestions on this Thanks a lot. ...Show All
Visual Studio dll reference doesn't work on another machine
Hello, I hope someone will have an answer to this question... I have two projects: An addin project and a console project. Both are sending/receiving a struct using the following from the addin project: MyObj.GetType().InvokeMember(sMethodName, System.Reflection.BindingFlags.InvokeMethod, null, MyObj, oParam); // where MyObj is the console project. All of that works on my development machine just fine!! But when I try to send that to any another machine that does NOT have Visual studio installed, the program breaks at the line above saying: "an error occurred here: Exception has been thrown by the target of an invocation. and exception System.Runtime.Interopservices.COMException (0x8002801D): Library not registered... (TYPE_E ...Show All
Visual Studio Do we need to make any registry key values to install an addin?
Hi, I have implemented an addin (Visual Studio 2005) which works perfectly in my development pc but it does not seems to be working on other machines. I created an installation (.msi) for that to install the .addin file to the appropriate folder (../My Documents/Visual Studio 2005/Addins/) and the assembly file to the installation directory but it doesn't seems to be working on other machines. Do we need to make any registry key values during the installation Thanks in advance! Best regards, Imesh No, if you are using XML registration, you don't need COM registration for the assembly and Registry registration for the add-in. This question is always t ...Show All
Visual C++ How to watch a static variable of method in debugger?
I noticed today that I am unable to view the value of a static variable declared in a method in the VC++ 2005 debugger. I cannot view the variable both in the watch window and in the mouse over tooltip. Also in my project, this seems to affect other non static variable declared in a scope block in the same method. (stupid) Example: int addsub10(bool add, int val) { static int callcount = false; <-- cannot see in watch/mouseover callcount ++; if(add) { int foo = val + 10; <-- cannot see in watch/mouseover return foo; } else { int bar = val - 10; <-- cannot see in watch/mouseover return bar; } } If I remove 'static' from the first line of addsub10 then I can see the values of callcount, foo and ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Managed Direct3D 10
Since XNA only supports DirectX 9.0 Where is Managed Direct3D 10 I hope there will be Managed wrapper for Direct3D 10 thanks Thanks Michael, That was the answer I was looking for. (Official MDX10 way cool). I already did check out XNA it is awesome, But XNA is partially crippled because it had to make so many compromises in order to be multiplatform. That is why pure PC managed DX API is imperative in order for PC to remain competitive gaming platform. When creating MDX10 1- making close mapping between DX10 and MDX10 will considerably ease up migration from C++ to C#. 2- following .net design pattern make it much easier for .net programmer to use MDX10 sinc ...Show All
Visual Studio Express Editions Favorites in webbrowser help!!???
ok im making a internet browser and i added the addtofavorites option and a favorites drop downlist these are the codes im useing Private Sub Favorites_DropDownItemClicked( ByVal sender As Object , ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles Favorites.DropDownItemClicked WebBrowser1.Navigate(e.ClickedItem.Text) End Sub Private Sub AddToFavorites_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddToFavorites.Click Favorites.DropDownItems.Add(WebBrowser1.Url.ToString) End Sub and when i add a favorite it gos right and everything but when i close the app and reopen all my favorites are gone how do i ...Show All
