ceebee's Q&A profile
Visual Basic change string array to byte array
hi can you please help. in my program i saved a picture as a jpeg loaded it up and converted it to a string with a seperator of "-" but i cant reverse it and get the string into a byte array to save it to another file again i have managed to seperate the string into a string array i just cant convert it how do you do this. thanks Why do you load the image as a string There is not a 1:1 mapping between binary data (a byte array) and a string - the same string may have many binary representation depending on encoding and/or if the string is normalized. If I had to load binarry data into a string, I would most likely use Base64 encoding. Check out http://msdn2.microsoft.com/en-us/library/dhx0d524.aspx for more info ...Show All
Visual Studio 2008 (Pre-release) Open the configuration file.
I have a question regarding the opening of the configuration file. I have written a library to assist me writing ASP.NET webservices and I want to use it in WCF applications. How do I open the configuration file so I can get my custom section The service is hosted in the ASP.NET developement server but will be hosted in IIS6. Thanks in advance, Trilobyte I use the following code in my application: // check if this is a web application System.Configuration.Configuration config = null; if (HttpContext.Current != null) { // open the web configuration config = WebConfigurationManager.OpenWebConfiguration(null); } else { // open the application configuration config = ConfigurationManager.OpenExeConfigu ...Show All
SQL Server Import from Data from Microsoft Access
In SQL Server 2005, Im trying to append data to tables which already exist. Im importing the data through the import wizard. The source from is Microsoft Access with no username and password. The source to is SQL Server 2005 using OLE DB Provider SQL Server with the login information of the schema I wish to use. I click through and the tables appear in the source. When I select all, they appear in the destination but they appear with the dbo. prefix which would regard them as new tables since the tables dont exist under that schema. I can click on the first destination table drop down text box and see all the tables under the schema there suppose to be under but its not the default. There are a lot of tables and I don't feel lik ...Show All
SQL Server Rank function
hello, this the MDX for my calculate measure in AS2005 Rank([SL_Territory].currentmember, order([SL_Territory].members,([Measures].[Sales],[SL_InvoiceDate].currentmember), bdesc),[Measures].[Sales]) the problem is...I get the Rank=1 on the Grand Total instead of on one Territory dimension as it should be. Am I doing something wrong Thx Hi Guys, I think you are trying to get to the following query! try it.. With Member [Measures].[SalesRank] as Rank ([Geography].[State-Province]. CurrentMember , Order ([Geography].[State-Province].[State-Province]. Members , [Measures].[Reseller Sales Amount], BDESC )), NON_EMPTY_BEHAVIOR = '[Measures].[Reseller Sales Amount]' ...Show All
Visual C# Compare ArrayList
Hello, I have 2 sorted array lists. e.g. arrayList1 = a,b,c,d,e,f,h,k,l and arrayList2 = a,c,d,f,g,h,i,j ArrayList1 contains the list of strings that are to be compared against. Unfortunately there are thousands of strings in each. So I don't know if it would be any good doing something like; does arrayList[0] == arrayList[0]||arrayList[1]||.... (in a loop of course). Another thing, arrayList2 is getting its (distinct) data from a database so I can't really check it against arrayList1 there and then, as it would leave the connection open for longer... I don't know maybe this is an ok trade off I don't suppose there is an efficient arrayList1.compare(arrayList2) method out there ...Show All
.NET Development ? .Net2: ChannelServices.RegisterChannel is obsolete - So what SHOULD I use ?
I have this line of code in a .Net 2 program: System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel( new TcpChannel( INCOMING_PORT ) ); This gives a warning: 'System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel(System.Runtime.Remoting.Channels.IChannel)' is obsolete: 'Use System.Runtime.Remoting.ChannelServices.RegisterChannel(IChannel chnl, bool ensureSecurity) instead.' The thing is, as far as I can see, System.Runtime.Remoting.ChannelServices.RegisterChannel(IChannel chnl, bool ensureSecurity) doesn't exist! What should I do Oh...now I see. The a nnoying message disappeared... thks ...Show All
SQL Server Attribute Relationships, Related Attributes, Uniqueness
I haven't see a clear example of how to setup the following for efficient aggregations: Example 1: If I have a Hierarchy like: Year->Month->Day Its clear how to setup the attribute relationships as long as the Month members are all unique. Can I somehow include an Attribute like WeekendIndicator Weekend certainly isn't unique, but it would seem there should be a way to roll this up and include it in the attribute relationships. Example 2: In many of my dimensions, I have Hierarchies whose Name member is not unique, but there is an Id value that is unique. I want to build the relationships using the Ids since I know the aggregations will be good...the problem is, that a program querying the data would use the IDs, b ...Show All
Audio and Video Development Video Size
As I see current version of the ihd doesn't support vido resizing. I.E. I can not place menu items at the left side of the screen and video at the right side of the screen. Is it planned to be implemented in future :( It doesn't work. Player.mainVideo, Player.subVideo, Player.Video are null or not an objects. Also 1. Where can I see specification for the method "setLayout" 2. How can I see current values of the layout ...Show All
.NET Development Object Allocation Performance
I have been implementing a geometrical algorithm in C#. The algorithm performs boolean operation on triangle meshes of arbitrary size. This implies that meshes sometimes get rather large (500,000-1,000,000 triangles) and as a result a lot of objects need to be allocated (triangles and vertices of the mesh). The allocation seems to be the primary bottle neck of the algorithm, instead of the very large amount of arithmetic computations. So my question is if there is any way to fasten or tweak the allocation of such a large amount of objects (avoiding the managed heap by using structs is of course not an option as the vertices are not unique for each triangle neither are triangle adjacencies). Pre-allocat ...Show All
Visual Basic Saving my users settings?
I know how to save the settings for say info from a text box but I have radio buttons and depending on which they choose I want to save that so that next time my program loads there settings load aswell. Help Needed as soon as possible. Thanks Sam Well the settings are: The user can only pick one as its radio buttons which is what I want. Colour (blue, black or dark red) Transparency (100%,90%,80%,70%,60%,50%,40%,30%) Always on top (Yes,No) So how would I do it with those ...Show All
Commerce Server Taxation data
Hi, following on from my previous question: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=1094829&SiteID=1 I'm looking for the most suitable place to store tax rates. I thought of creating a new profile object but don't think that is the most efficient place to store the data. The tax rates need to be easily accessible for my tax pipeline, without having a large performance hit. Thanks in advance Paul Hey Paul, I've been out with the flu this week and I haven't had time to wrap everything up. If you can send me an email (colin.bowern@officialcommunity.com) I'll give you a drop of the code to look over and I'll get it posted in full this weekend. Thanks, Colin ...Show All
Visual Studio Team System Start Date and Finish Date on Tasks
There does not appear to be a way to enter values for these two fields. How doe the start date and finish date get populated into a task You could always go into the work item type, and modify the type to allow you to edit those fields. Currently, those fields aren't editable (as you have seen). Otherwise, you are correct, the only way to modify them is to open your work items in Project, make changes there, and then synch back up. ...Show All
Visual Studio Express Editions Is this possible???
As part of my program I would like to set up an address book. I have created the form for this. My question is: can I connect/create a database for just this part of my program. I have never created a database but am looking forward to giving it a go. This programming thing is totally addictive!! The reason storing in a text file is not the best of ideas - is that it means you have to write more code to do searching, sorting, modification of records etc. For this reason a database is a better bet. As to how difficult it is - With databinding, this is not a difficult task. Many of the walkthroughs / examples and webcasts which cover databinding can be modified to basically store different fields for ...Show All
Commerce Server SiteConfigReadOnly
Hi, I have loads of warning messages in the event log concerning too many instances of the SiteConfigReadOnlyFreeThreaded objects. I do not manually instantiate these and have checked the code for manual context creation. I found minimal occurrences of "offending" code, though and these warnings are getting logged when hitting pages which do not even call this code. Could anyone let me know which CS components may be calling this code and when, or offer any assistance on diagnosing this problem Many thanks, Amy Can you try removing the following from web.config of your site <add name="CommerceDataWarehouseAuthenticationModule" ................. /> ...Show All
Visual Studio Express Editions Compile project from command line
I would like to build a C# project from the command line. I know of the compileroptions that can be used to specify the output etc. but what do I give as an argument to tell the compiler to build the complete project. I thought maybe it would require the .csproj file. Hi stanjo, This post ( http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=653855&SiteID=1 ) should answer you question. Scott ...Show All
