Sarwanan's Q&A profile
Visual C++ function malloc()
Hello everybody int* p; p=(int *)(malloc (10 * sizeof (int) ) ); the above statements tells the c compiler that we wnat to store 10 integer values. it is just like that int a[10]; Means the last value that can go in p[9] if indexing is starting from p[0], just like a[0] to a[9] But in p we are able to store value at location p[10] and even in p[100] WHY For example int *p,i; p=(int *)(malloc (10 * sizeof (int) ) ); for(i=0;i<=1000;i++){ p =i; } The above code runs well in vs 2003 but i think it has to give error at p[10] Please tell what is it happening Thanks In C (and C++) arrays are not bounds checked: you can keep writing to ever increasing locations until your progr ...Show All
SQL Server What is the best algorithm to use?
I am new to DM and I am not sure which algorithm would be best to use. I am trying to build a custom comparitor application that companies can use to compare themselves against other companies based on certain pieces of information. I need to group a company with 11 other companies based on 6 attributes. I need the ability to apply weightings to each of the 6 attributes and have those taken into consideration when determining which 10 other companies each company is grouped with. Each group must contain 11 members, the company for the user logged in and 10 other companies that it will be compared against. At first I thought that clustering would be a good fit for this but I can not see a way to mandate that each cluster contain exac ...Show All
Smart Device Development 24 hr time handling
Hi, I wonder if you have any tips on this subject; My app will be running in the background and perform tasks on certain times and also react differently on certain events depending on the time and date. For example, if a certain button can maximum be allowed to be pushed 15 times a day, how would I do And say after being pushed three times, it cannot be pushed for the next 30 minutes and then I could push it three times again before it gets disabled for a while. Thankful for tips. indeed, you would need the Timer class firstly to run the processes needed to be ran throughout the timeframe of the application being ran. Secondly you probably want to store the DateTime of the button being pushed on the button click event. So if the ...Show All
Visual Studio Express Editions Link
For a link label, on click what's the code to make it launch the link I have a linklabel.text set but when I click it, it doesn't launch. I tried this, but got some errors: AddHandler - Syntax Error. Me.spawnBrowserBackgroundWorker - Syntax Error. If (Not url Is Nothing) Then - Variable 'url' has been used before being assigned a value. A null exception could occur at runtime. Not sure if I declared everything right, try it to see if it works. ...Show All
Visual C# how can i use ole like tech in C#?
first Q: i want use c# to insert into richtextbox an object ,but i can't find ole in c#,so what can i do to insert an object Second Q: when i use ,i find richtextbox can't displey table correctly in vs2005,for example i draw a table in word application ,but when i copy it to richtextbox ,the table is not the same like in word. thank you for you reply,i want make a text editer like notepad, in it i can use other program support ole, and table also need . now ,i and my colleague want use com tech to resolve ole ,for the talbe , richtextbox higher version supper display talbe copy from word,but can't edit it , ...Show All
Visual Basic Panning more quickly
I am making a program that displays complex graphs in a PictureBox that take a long time to render. Currently I draw the graph in PictureBox_Paint. When the user is panning the view, I want to stop drawing the graphs and instead display a previous 'Screenshot' of what the graphs looked like when the user started panning. So far I've done this: Private Sub PictureBox1_MouseDown( ByVal sender As Object , ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseDown Moving = True MovingImage = PictureBox1.Image End Sub Private Sub PictureBox1_Paint( ByVal sender As Object , ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint Dim g As Graphics ...Show All
Visual Studio 2008 (Pre-release) WCF Interoperability problem - unable to resolve KeyInfo for verifying signature
Hi, I'm creating simple WCF (CTP February) service & Java (JWSDP 2.0) client interoperability sample with WS-Security (XWSS 2.0). WCF throws following error: Security header element 'Timestamp' with id 'xxxx' is required to be signed, but was not, although timestam IS signed. Below is the request message sent to WCF service: Does anybody know what's wrong with the request Can I somehow disable the check for signed timestamp Any other ideas to solve the problem Thanx for help. Marko < xml version = " 1.0 " encoding = " UTF-8 " > < SOAP-ENV:Envelope xmlns:SOAP-ENV = " http://schemas.xmlsoap.org/soap/envelope/ " > < SOAP-ENV:Header > < wsse:Secu ...Show All
Visual Studio Tools for Office Missing Office-Template using VS-Pro 2005 and VSTO 2005
Hello, I want to use VSTO 2005 and VS-Professional 2005 (german). Thus first I have installed VSTO. If I start it here I can find a some office-templates in the new project dialog. Second I have installed VS-Pro german. Now I have much more templates but the office templates are missing. frustrated I removed VSTO and installed it again. but no changes. the office templates are still missing. Do you have any suggestions for me Thanks Alex Hello Cindy, Thanks for that quick answer. The points 1. and 2. are OK on my machine. What I mean is in your point 3. After installing VSTO I have project template in Visual Studio! After the second installation (Visual Studio 2005 Profession ...Show All
Windows Live Developer Forums Windows Vista and MS Private Folder
Hi All! I have a question: Is there any way to install MS Private Folder on Vista I tried to install it but I got error message that a program part of the installer not finished correctly or something like that. If there is a trick to install Private Folder on Vista, please, let me know. Regards, Chris Krieger wrote: Hi All! I have a question: Is there any way to install MS Private Folder on Vista I tried to install it but I got error message that a program part of the installer not finished correctly or something like that. If there is a trick to install Private Folder on Vista, please, let me know. Regards, Chris i have a related question, when installing MS private ...Show All
Visual Studio Problem using filters.
Hi, I have a table iof items, each item has an ID, name and location. What I'm trying to do is let the user filter items by location, by choosing a location in a DropDownList. What I have done so far is create a report-parameter "location" and connected this to the filter on my report-table. So far, so good. My problem is that I want the users to be able to select "All Locations" from the list, but I cant seem to find a way to disable the filter. Thanks in advance. ...Show All
Visual Studio CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed.
Hi......, I 'm using the bundled version of CR with VS.NET 2003. I have designed my report using the schema dataset that has the extension xsd. The report did get displayed properly. OK..... Now i added a sub-report object to the same report. Now when i tried to view the same report, i get the following error message CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed. I strongly believe that when we set the crystal report datasource to our xsd, we need not specify the logon info (and thatz why i was able to view my report when it has not included the subreport). One more thing, i first installed, some times ago, VS.NET 2003 with CR. Later i got the software (CR 9) and installed to the same machine. Could thi ...Show All
Windows Forms How to open a form, collect user input from a second form that opens, then display the appropriate data on the original form?
I am trying to develop my first multi-user program in VB. NET - a language that I don't know, in an object oriented environment which I know very little about. Yay. I have run into a couple of challenges that I am not sure how to approach and figured maybe some of you could point me in the right direction. Both of these issues are related to opening a form, prompting another form to open and gathering information, and then sending that information back to the first form. The first scenario: When I run the application, I have a menu of different screens. I select the "Benefits Management" screen (which has information about an employee's benefits). That screen opens and all of the data fields are blank. I then want to hit a hot-ke ...Show All
Windows Forms Tarce problem
I have written Trace lines for my application, which creates a text file(dsTrace.txt) and stores errors occurred during the execution of the app in that file. I have a form on which I keep loading various user controls and what happens is there is a file created with name dsTrace, but also there are other text files created with name: {some GUID}dsTrace.txt .i.e I have various files created along with dsTrace.txt. why does this happen I write these statements for creating the text file in constructor of the form. Trace.Listeners.Add(new TextWriterTraceListener("dsTrace.txt")); Trace.AutoFlush = true; Trace.WriteLine("*** Trace started on: " + DateTime.Now.ToString() + " ***"); Trace.WriteLi ...Show All
Smart Device Development synchronize deployment with activesync
Hello, I have developped some applications in VS 2005 and CF 2.0 with WM 5.0 PPC and created the respective CAB files for deployment. however i found it very inconvenient for the user to copy the CAB onto the PPC and then click every single one of them to install and they need to specified the location. Is there any solution i can by pass all these issues by installing the programs from a computer in an installation package if possible Thank you I follow the walkthrough in the second link. when i launch the installation it's not installing the app onto the pocket pc. however it tells me that the process was successful. i also downloaded the sample program from the tutorial and rn the setup and it doing th ...Show All
Windows Forms Selective Fonts for different structure members!
Hi! I have a structure with many member elements. There are many charecter strings aswell. The problem is, i want to assign different fonts to different members (based on some properties), coz i want to load these members from this structure into a windows form where i want them to be displayed in different fonts. I know exactly which members must have what font and and how many members with one particular font. Can i somehow predetermine the font for the members of the structure It should be noted that i load these structure members into cells of a datagridview. I cannot change the font style of the cell because each cell should be capable of daisplaying members with different fonts that i predetermine for my structure. How do i ...Show All
