instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I need to set a dependency property on a control (Slider.Value) in my code without it triggering a ValueChanged event (since I set the value, not the user). What is the best way to handle this situation in WPF? For clarification, what I am trying to do is hook up WPF sliders to a WinForms User Control. Currently in my...
In WPF, to set a dependency property like `Slider.Value` without triggering its `ValueChanged` event, you can temporarily detach the event handler before setting the value and then reattach it afterward. Here’s how you can achieve this: 1. **Detach the Event Handler**: Before setting the `Slider.Value`, unsubscribe fr...
20,353
[ { "from": "human", "value": "I need to set a dependency property on a control (Slider.Value) in my code without it triggering a ValueChanged event (since I set the value, not the user). What is the best way to handle this situation in WPF? \nFor clarification, what I am trying to do is hook up WPF sliders t...
I'm working with a number of 'helper' classes, which affectively have a bunch of static functions which allow the controllers and actions have access to chunks of shared functionality. Problem is that these files have been used as a dumping ground for any functionality which is required across the modules/application a...
This is a common challenge when working with helper classes and shared functionality in software development. To strike a balance between maintainability, performance, and modularity, consider the following best practices: ### 1. **Modularization of Helper Classes** - **Break Down Monolithic Helpers**: Instead of h...
17,441
[ { "from": "human", "value": "I'm working with a number of 'helper' classes, which affectively have a bunch of static functions which allow the controllers and actions have access to chunks of shared functionality.\nProblem is that these files have been used as a dumping ground for any functionality which is...
I've got several modules containing functions, classes and templates that I keep in a directory called (hah!) 'reuse'. I know the content reasonably well, so to find a particular class or bit of code doesn't take too long, but it is slowly growing in size and I need some sensible method to store them for easy search & ...
Organizing and managing a growing collection of code can be challenging, but there are several strategies you can adopt to make searching and retrieval easier. Here are some effective methods: ### 1. Directory Structure Organize your code into a well-defined directory structure based on functionality or purpose. For ...
18,124
[ { "from": "human", "value": "I've got several modules containing functions, classes and templates that I keep in a directory called (hah!) 'reuse'. I know the content reasonably well, so to find a particular class or bit of code doesn't take too long, but it is slowly growing in size and I need some sensibl...
Given two vectors A and B which form the line segment L = A-B. Furthermore given a view frustum F which is defined by its left, right, bottom, top, near and far planes. How do I clip L against F? That is, test for an intersection and where on L that intersection occurs? (Keep in mind that a line segment can have more ...
Clipping a line segment against a view frustum can be done using the Liang-Barsky algorithm or the Cohen-Sutherland algorithm. However, since we want to clip the line segment against a frustum defined by six planes (left, right, bottom, top, near, and far), we can approach it using a point-plane intersection method. I...
18,099
[ { "from": "human", "value": "Given two vectors A and B which form the line segment L = A-B.\nFurthermore given a view frustum F which is defined by its left, right, bottom, top, near and far planes.\nHow do I clip L against F? \nThat is, test for an intersection and where on L that intersection occurs?\n(Ke...
What is the most efficient way to go through and update every single node in a drupal site, to, for instance mechanically add tags? Drupal 6 has a shiny new batch API, but what to do in Drupal 5? I started writing a script that keeps a pointer and then goes around all nodes on a cron, loads them and then saves them, bu...
In Drupal 5, you don't have the luxury of the Batch API available in Drupal 6, but you can still accomplish your goal of updating every single node efficiently by taking a few considerations into account to avoid memory issues and timeouts. Here's a general approach to updating nodes programmatically in Drupal 5: 1. ...
18,575
[ { "from": "human", "value": "What is the most efficient way to go through and update every single node in a drupal site, to, for instance mechanically add tags? Drupal 6 has a shiny new batch API, but what to do in Drupal 5?\nI started writing a script that keeps a pointer and then goes around all nodes on ...
I have some code that uses the shared gateway pattern to implement an inversion of control container. I have several hundred NUnit unit tests that exercises the code that uses this IOC. They all work (on my machine!) but I am concerned that these tests might fail under load. I seem to remember that NUnit (and MSTest...
Yes, both NUnit and MSTest can run tests in parallel, but the behavior depends on the version of the framework and the configuration settings you use. ### NUnit 1. **Parallel Execution**: - NUnit 3 introduced parallel test execution. By default, tests can run in parallel unless explicitly configured otherwise. ...
20,352
[ { "from": "human", "value": "I have some code that uses the shared gateway pattern to implement an inversion of control container. I have several hundred NUnit unit tests that exercises the code that uses this IOC. They all work (on my machine!) but I am concerned that these tests might fail under load. ...
I want to change the authentication process that is used by the Acegi - Plugin. It should be a completely customized process. Custom login form + custom auth method. Obviously there is only little documentation regarding this topic. In the book The Definitive Guide to Grails it is described for an older version of grai...
To customize the authentication process in a Grails application using Spring Security (formerly Acegi Security), you'll need to do a few things to configure your custom authentication process. This includes creating a custom login form and defining your own authentication method. Since the newer versions of Grails have...
12,469
[ { "from": "human", "value": "I want to change the authentication process that is used by the Acegi - Plugin. It should be a completely customized process. Custom login form + custom auth method.\nObviously there is only little documentation regarding this topic.\nIn the book The Definitive Guide to Grails i...
At work, I use Cygwin a lot because it offers me a small oasis in the vast desert of Windows. I inevitably end up running some non-Cygwin programs through the bash shell, such as build scripts (batch files created in-house) and the Subversion CLI binaries (I have the Windows ones installed). 99% of the time, I don't ...
The issues you are experiencing with Cygwin in relation to how it interacts with non-Cygwin programs, such as build scripts and the Subversion CLI, seem to stem from how terminal input/output is being handled, particularly with regard to line endings, terminal modes, and the integration of different types of programs. ...
18,921
[ { "from": "human", "value": "At work, I use Cygwin a lot because it offers me a small oasis in the vast desert of Windows. I inevitably end up running some non-Cygwin programs through the bash shell, such as build scripts (batch files created in-house) and the Subversion CLI binaries (I have the Windows on...
I have an intranet application that needs contact information for various locations on our campus that are served by our IT lab support organization. We have an enterprise directory that contains contact information so I'm not keeping the actual contact information in the database, but rather an immutable identifier t...
Your approach to handling the translation from the Master Records Unique ID (MRUID) to the Active Directory login ID in the presentation layer makes sense, especially given your current architecture and the caching requirements. However, there are some factors to consider when evaluating whether this is the best place ...
18,121
[ { "from": "human", "value": "I have an intranet application that needs contact information for various locations on our campus that are served by our IT lab support organization. We have an enterprise directory that contains contact information so I'm not keeping the actual contact information in the databa...
I know that attributes are extremely useful. There are some predefined ones such as [Browsable(false)] which allows you to hide properties in the properties tab. Here is a good question explaining attributes: What are attributes in .NET? What are the predefined attributes (and their namespace) you actually use in your ...
Attributes in .NET are a powerful feature that allow developers to add metadata to classes, methods, properties, and other entities in their code. This metadata can provide additional information that can be used at runtime by the .NET framework or by other libraries, and it can influence how your code behaves. Attrib...
20,491
[ { "from": "human", "value": "I know that attributes are extremely useful. There are some predefined ones such as [Browsable(false)] which allows you to hide properties in the properties tab. Here is a good question explaining attributes: What are attributes in .NET?\nWhat are the predefined attributes (and ...
In our application, we are using RMI for client-server communication in very different ways: Pushing data from the server to the client to be displayed. Sending control information from the client to the server. Callbacks from those control messages code paths that reach back from the server to the client (sidebar not...
It sounds like you're navigating some of the intricacies of RMI (Remote Method Invocation) and ensuring that your application adheres to a specified inventory of ports for all client-server interactions, including the callbacks. To directly address your concern about ensuring that the callbacks from the server to the...
19,340
[ { "from": "human", "value": "In our application, we are using RMI for client-server communication in very different ways:\n\nPushing data from the server to the client to be displayed.\nSending control information from the client to the server.\nCallbacks from those control messages code paths that reach ba...
How important is it to make a website layout fit on 640 x 480 and 800 x 600 displays? For some time I have been designing with the assumption of at least 1024 x 768, but I haven't been doing it professionally (just on my site which is just a blog that only 10-15 friends read). Does anyone have any non-anecdotal stati...
When considering website layout and screen resolutions, it's important to understand current usage trends among general users. As of my last update in October 2023, most users have moved well beyond the 640 x 480 and 800 x 600 resolutions. Here are some key points and data to consider: 1. **Current Screen Resolution T...
21,991
[ { "from": "human", "value": "How important is it to make a website layout fit on 640 x 480 and 800 x 600 displays? For some time I have been designing with the assumption of at least 1024 x 768, but I haven't been doing it professionally (just on my site which is just a blog that only 10-15 friends read). ...
I was reviewing some code that a consultant checked in and notice they were using SQLCLR. I don't have any experience with it so thought I would research what it was about. I noticed that they used Dim cn As New SqlConnection("server=LOCALHOST;integrated security=yes;database=" & sDb) instead of DIM conn As New SqlC...
SQLCLR (SQL Server Common Language Runtime) allows you to write stored procedures, triggers, user-defined types, and functions in .NET languages such as C# or VB.NET. This enables developers to leverage .NET functionalities within SQL Server. When you see different connection strings like `Dim cn As New SqlConnection(...
20,312
[ { "from": "human", "value": "I was reviewing some code that a consultant checked in and notice they were using SQLCLR. I don't have any experience with it so thought I would research what it was about. I noticed that they used\nDim cn As New SqlConnection(\"server=LOCALHOST;integrated security=yes;databas...
I have an Open Source app and I currently only post the binary for the Windows build. At this point Linux users have to get the source and compile it. Is there a standard way for posting a Linux binary? My app is in c / c++ and compiled with gcc, the only external Linux code I use is X Windows and CUPS.
Yes, there is a standard way to distribute Linux binaries for your open-source application, and there are several approaches you can consider. Here are some common methods: ### 1. Precompiled Binaries You can provide precompiled binaries for common Linux distributions. Here’s how you can do it: - **Create binary pac...
13,356
[ { "from": "human", "value": "I have an Open Source app and I currently only post the binary for the Windows build. At this point Linux users have to get the source and compile it. Is there a standard way for posting a Linux binary? \nMy app is in c / c++ and compiled with gcc, the only external Linux code I...
I am running NUnit with the project named AssemblyTest.nunit. The test calls another assembly which uses the log4net assembly. This is using nunit version 2.4.3 with the .net 2.0 framework. In TestFixtureSetup I am calling log4net.Config.XmlConfigurator.Configure( ) and am getting the following error: System.Configura...
The error you're encountering suggests that the `log4net` configuration section is not being recognized in the configuration file for your assembly. This is typically caused by the lack of a corresponding section handler for the `log4net` configuration in the configuration file. Since you're using NUnit and your test ...
20,056
[ { "from": "human", "value": "I am running NUnit with the project named AssemblyTest.nunit. The test calls another assembly which uses the log4net assembly. This is using nunit version 2.4.3 with the .net 2.0 framework.\nIn TestFixtureSetup I am calling log4net.Config.XmlConfigurator.Configure( ) and am gett...
Many Java Apps don't use anti-aliased fonts by default, despite the capability of Swing to provide them. How can you coerce an arbitrary java application to use AA fonts? (both for applications I'm running, and applications I'm developing)
Anti-aliasing (AA) in Java applications can significantly improve the visual quality of text rendering. Although many Java applications, especially those built with Swing, may not enable anti-aliasing by default, you can force anti-aliasing in various ways for both applications you are running and those you are develop...
22,636
[ { "from": "human", "value": "Many Java Apps don't use anti-aliased fonts by default, despite the capability of Swing to provide them. How can you coerce an arbitrary java application to use AA fonts? (both for applications I'm running, and applications I'm developing)\n" }, { "from": "gpt", "v...
I have the task of developing an online examination software for a small university, I need to implement measures to prevent cheating... What are your ideas on how to do this? I would like to possibly disable all IE / firefox tabs, or some how log internet activity so I know if they are googling anwsers...is there any...
Developing an online examination software that minimizes cheating can be quite challenging. While it's difficult to completely eliminate the possibility of cheating in online assessments, there are several strategies you can employ to reduce it. Here are some ideas that you can consider: ### 1. **Proctoring** - **L...
13,751
[ { "from": "human", "value": "I have the task of developing an online examination software for a small university, I need to implement measures to prevent cheating...\nWhat are your ideas on how to do this? \nI would like to possibly disable all IE / firefox tabs, or some how log internet activity so I know ...
When adding an EditItemTemplate of some complexity (mulitple fields in one template), and then parsing the controls from the RowUpdating event, the controls that were manually entered by the user have no values. My guess is there is something going on with when the data is bound, but I've had instances where simply add...
When dealing with `GridView` controls in ASP.NET, particularly when using an `EditItemTemplate`, it's essential to manage the page lifecycle correctly to ensure that user inputs are captured as expected. The issue you are experiencing—where the `TextBox` control's `.Text` property is not populated with the user's input...
17,901
[ { "from": "human", "value": "When adding an EditItemTemplate of some complexity (mulitple fields in one template), and then parsing the controls from the RowUpdating event, the controls that were manually entered by the user have no values. My guess is there is something going on with when the data is bound...
I heard on a recent podcast (Polymorphic) that it is possible to cache a user control as opposed to the entire page. I think my header control which displays static content and my footer control could benefit from being cached. How can I go about caching just those controls?
Caching user controls in ASP.NET can be achieved using a couple of different techniques. If you want to cache only specific user controls (like your header and footer) rather than the entire page, you can use the `OutputCache` directive or programmatically cache the controls. Here's how to do both: ### Using OutputCac...
12,541
[ { "from": "human", "value": "I heard on a recent podcast (Polymorphic) that it is possible to cache a user control as opposed to the entire page. \nI think my header control which displays static content and my footer control could benefit from being cached. \nHow can I go about caching just those control...
I've got a script that takes a user uploaded RTF document and merges in some person data into the letter (name, address, etc), and does this for multiple people. I merge the letter contents, then combine that with the next merge letter contents, for all people records. Affectively I'm combining a single RTF document in...
Using regular expressions (RegEx) can be a suitable approach for this task, especially since RTF is essentially plain text and you're looking to manipulate specific patterns in that text. To construct a regular expression that matches and removes the entire string `}\n\page ANYTHING \par`, you can use the following p...
18,667
[ { "from": "human", "value": "I've got a script that takes a user uploaded RTF document and merges in some person data into the letter (name, address, etc), and does this for multiple people. I merge the letter contents, then combine that with the next merge letter contents, for all people records.\nAffectiv...
I'm getting into more of a TDD workflow, and have a mix of MVC and asp.net Web Forms apps. MOQ is recommended for MVC. I've used Rhino for Web Forms. Does anyone have a best practice for having 1 framework mock for both?
Transitioning to a Test-Driven Development (TDD) workflow and trying to unify your mocking framework across different technologies like ASP.NET MVC and Web Forms can be a bit challenging. However, there are some best practices that you can follow to simplify the process and achieve consistency. ### Using Moq for Both ...
4,532
[ { "from": "human", "value": "I'm getting into more of a TDD workflow, and have a mix of MVC and asp.net Web Forms apps.\nMOQ is recommended for MVC.\nI've used Rhino for Web Forms.\nDoes anyone have a best practice for having 1 framework mock for both?\n" }, { "from": "gpt", "value": "Transition...
Let's say I have to implement a piece of T-SQL code that must return a table as result. I can implement a table-valued function or else a stored procedure that returns a set of rows. What should I use? In short, what I want to know is: Which are the main differences between functions and stored procedures? What consid...
When deciding whether to use a table-valued function (TVF) or a stored procedure in T-SQL to return a result set, there are several key differences and considerations to take into account. Here's an overview: ### Key Differences 1. **Return Type:** - **Table-Valued Function:** Always returns a table, which can be ...
17,276
[ { "from": "human", "value": "Let's say I have to implement a piece of T-SQL code that must return a table as result. I can implement a table-valued function or else a stored procedure that returns a set of rows. What should I use?\nIn short, what I want to know is: \nWhich are the main differences between f...
I call my JavaScript function. Why do I sometimes get the error 'myFunction is not defined' when it is defined? For example. I'll occasionally get 'copyArray is not defined' even in this example: function copyArray( pa ) { var la = []; for (var i=0; i < pa.length; i++) la.push( pa[i] ); return la; }...
The error you're encountering, "myFunction is not defined," despite the function being clearly defined, can often be attributed to issues related to scope, hoisting, or the way JavaScript handles asynchronous loading of scripts. Here are several possible explanations and solutions to consider: 1. **Scope Issues**: Ens...
19,092
[ { "from": "human", "value": "I call my JavaScript function. Why do I sometimes get the error 'myFunction is not defined' when it is defined?\nFor example. I'll occasionally get 'copyArray is not defined' even in this example:\nfunction copyArray( pa ) {\n var la = [];\n for (var i=0; i < pa.length; i+...
I'm looking for a GPS with a good API. I would like to be able to send an address to it, and tell it to navigate to that address. I also need to pull the current location from the GPS. I'd like to be able to do this with the GPS hooked up to a laptop by bluetooth or even just a USB cable. I've looked at the Dash a l...
If you're looking for a GPS device that offers a robust API and allows for integration with a .NET application, here are a few options you might consider: ### 1. **Garmin GPS Devices** Garmin offers a range of GPS devices that can be connected via USB or Bluetooth. They have an SDK called **Garmin Connect API**, which...
4,469
[ { "from": "human", "value": "I'm looking for a GPS with a good API. I would like to be able to send an address to it, and tell it to navigate to that address. I also need to pull the current location from the GPS. I'd like to be able to do this with the GPS hooked up to a laptop by bluetooth or even just...
I have a database file that is generated on a PC using Sqlite. This file is then transferred to an ARM7 based embedded system without an operating system. The embedded system must access this database, but does not need to update it. I have been trying to get sqlite3 small enough for the embedded system, but so far I...
Reducing the size of SQLite to fit within the constraints of your embedded system can be quite challenging, especially if you're working with an ARM7-based system. However, there are several strategies and alternatives you might consider to achieve your goal: ### 1. **Custom SQLite Build** You can create a smaller bui...
17,520
[ { "from": "human", "value": "I have a database file that is generated on a PC using Sqlite. This file is then transferred to an ARM7 based embedded system without an operating system. The embedded system must access this database, but does not need to update it.\nI have been trying to get sqlite3 small en...
I want to migrate from Embarcadero Delphi to Visual Studio, but without a TClientDataset class it is very difficult. This class represents an in-memory dataset. I can't find any class like TClientDataset. Can anyone help me find something like this please?
Migrating from Embarcadero Delphi to Visual Studio (particularly using C# or VB.NET) can indeed be a challenging process, especially when trying to replicate components that you may have relied on in Delphi, such as `TClientDataset`. In Visual Studio, there isn't a direct equivalent to `TClientDataset`, but there are...
14,681
[ { "from": "human", "value": "I want to migrate from Embarcadero Delphi to Visual Studio, but without a TClientDataset class it is very difficult.\nThis class represents an in-memory dataset.\nI can't find any class like TClientDataset.\nCan anyone help me find something like this please?\n" }, { "fr...
I hope this is programmer-related question. I'm in the hobby business of C# programming. For my own purposes I need to parse html files and the best idea is..regular expression. As many found out, it's quite time consuming to learn them and thus I'm quite interested if you know about some application that would be able...
You're correct that regular expressions (regex) can be quite complex and sometimes challenging to master. However, there are tools and applications that can help simplify the process of creating regex patterns based on the text you want to extract. Here are a few tools and applications that might be helpful for you: ...
18,389
[ { "from": "human", "value": "I hope this is programmer-related question. I'm in the hobby business of C# programming. For my own purposes I need to parse html files and the best idea is..regular expression. As many found out, it's quite time consuming to learn them and thus I'm quite interested if you know ...
The solution we developed uses a database (sqlserver 2005) for persistence purposes, and thus, all updated data is saved to the database, instead of sent to the program. I have a front-end (desktop) that currently keeps polling the database for updates that may happen anytime on some critical data, and I am not really ...
Polling a database for updates is a common approach but can indeed lead to inefficiencies, especially if your application is built to be more responsive or resource-efficient. Since you are using SQL Server 2005 and C# 3.5, there are a few alternative strategies you can consider to reduce the need for polling while kee...
16,968
[ { "from": "human", "value": "The solution we developed uses a database (sqlserver 2005) for persistence purposes, and thus, all updated data is saved to the database, instead of sent to the program.\nI have a front-end (desktop) that currently keeps polling the database for updates that may happen anytime o...
I've written a small hello world test app in Silverlight which i want to host on a Linux/Apache2 server. I want the data to come from MySQL (or some other linux compatible db) so that I can databind to things in the db. I've managed to get it working by using the MySQL Connector/.NET: MySqlConnection conn = new MySqlCo...
You're correct in noting that it is not advisable to include database credentials directly in your client-side Silverlight application. This creates a security risk since anyone can decompile your application and access sensitive information. To securely connect your Silverlight app to a database like MySQL, you typic...
16,855
[ { "from": "human", "value": "I've written a small hello world test app in Silverlight which i want to host on a Linux/Apache2 server. I want the data to come from MySQL (or some other linux compatible db) so that I can databind to things in the db.\nI've managed to get it working by using the MySQL Connecto...
During the installation of Apache2 I got the following message into cmd window: Installing the Apache2.2 service The Apache2.2 service is successfully installed. Testing httpd.conf.... Errors reported here must be corrected before the service can be started. httpd.exe: Could not reliably determine the server...
The error messages you encountered during the installation and startup of Apache2 indicate a few potential issues that you'll need to address in order to get Apache running successfully. Let's break down the issues and look at possible solutions: 1. **ServerName Warning**: - The message `Could not reliably determin...
20,292
[ { "from": "human", "value": "During the installation of Apache2 I got the following message into cmd window:\n\nInstalling the Apache2.2 service The\n Apache2.2 service is successfully\n installed. Testing httpd.conf....\nErrors reported here must be corrected\n before the service can be started.\n http...
How to calculate CRC_B encoding in C# as described in ISO 14443? Here is some background info: CRC_B encoding This annex is provided for explanatory purposes and indicates the bit patterns that will exist in the physical layer. It is included for the purpose of checking an ISO/IEC 14443-3 Type B implementation...
To calculate CRC_B encoding as per ISO 14443, you can implement the CRC algorithm manually. The CRC_B (Cyclic Redundancy Check) specifically follows the polynomial \(x^{16} + x^{12} + x^5 + 1\) with an initial value of `0xFFFF`. Here is how you can implement the CRC calculation in C#: ```csharp using System; public...
19,005
[ { "from": "human", "value": "How to calculate CRC_B encoding in C# as described in ISO 14443?\nHere is some background info:\n\nCRC_B encoding\n This annex is provided for explanatory purposes and indicates the bit patterns that will \n exist in the physical layer. It is included for the purpose of checki...
I'm trying to polish up my Ruby by re writing Kent Beck's xUnit Python example from "Test Driven Development: By Example". I've got quite far but now I get the following error when I run which I don't grok. C:\Documents and Settings\aharmel\My Documents\My Workspace\TDD_Book\TDDBook_xUnit_RubyVersion\lib\main.rb:21:in...
The error you're encountering is due to the fact that you are trying to invoke the `test_running` method without passing the required arguments when you call `TestCaseTest.new("test_running").run`. Here's the key part of the code where the problem lies: ```ruby class TestCaseTest < TestCase def set_up @test = ...
11,069
[ { "from": "human", "value": "I'm trying to polish up my Ruby by re writing Kent Beck's xUnit Python example from \"Test Driven Development: By Example\". I've got quite far but now I get the following error when I run which I don't grok.\nC:\\Documents and Settings\\aharmel\\My Documents\\My Workspace\\TDD...
I have an array of items that are time sensitive. After an amount of time, the last item needs to fall off and a new item is put at the beginning. What is the best way to do this?
To efficiently manage a time-sensitive array of items where you need to add a new item to the beginning and remove the last item after a specified duration, you can consider using a data structure that supports these operations well. Here are a couple of approaches depending on your programming environment and requirem...
17,209
[ { "from": "human", "value": "I have an array of items that are time sensitive. After an amount of time, the last item needs to fall off and a new item is put at the beginning.\nWhat is the best way to do this?\n" }, { "from": "gpt", "value": "To efficiently manage a time-sensitive array of item...
i have a library with some entities that share the same interface. clients and service share this assembly. now i wonder if there is a way to have this Interface-type as Parameter in my service contracts so that i can use the same method for all classes implementing the interface. the entities themselve are all decorat...
Yes, it is possible to use an interface as a parameter in your service contracts while utilizing the `NetDataContractSerializer` in .NET. However, there are a few considerations to take into account, particularly regarding how .NET handles serialization and polymorphism with interfaces. ### Using Interfaces with NetD...
18,454
[ { "from": "human", "value": "i have a library with some entities that share the same interface. clients and service share this assembly. now i wonder if there is a way to have this Interface-type as Parameter in my service contracts so that i can use the same method for all classes implementing the interfac...
I'm new to jquery and asp.net so please forgive if this is an obvious question. I'm using a jquery autocomplete plugin which requires that the page it looks up asynchronously for data is in this format as pure text only: product1|price1 product2|price2 product3|price3 WITHOUT ANY OTHER HTML MARKUP. Any other html tags ...
To achieve your goal of outputting data as pure text without any HTML markup in an ASP.NET environment, you can create a simple Web API or an ASPX page that serves plain text. ### Option 1: Using an ASPX Page You can create an ASPX page specifically for this purpose. Here's how you can do it: 1. **Create an ASPX Pag...
17,859
[ { "from": "human", "value": "I'm new to jquery and asp.net so please forgive if this is an obvious question. I'm using a jquery autocomplete plugin which requires that the page it looks up asynchronously for data is in this format as pure text only:\nproduct1|price1\nproduct2|price2\nproduct3|price3\nWITHOU...
Fixed: See notes at bottom I am implementing a generic class that supports two features, implicit type conversion and custom equality operators. Well, it supports IN-equality as well, if it does that. 1) if ( "value" = myInstance ) then ... 2) Dim s As String = myInstance 3) Dim s As String = CType(myInstance,String)...
It sounds like you've been working through a complex set of requirements for your generic class in VB.NET and have made significant progress. Let's summarize and clarify your implementation strategy to support both implicit type conversion and custom equality operators without running into overload resolution issues. ...
17,362
[ { "from": "human", "value": "Fixed: See notes at bottom\nI am implementing a generic class that supports two features, implicit type conversion and custom equality operators. Well, it supports IN-equality as well, if it does that.\n1) if ( \"value\" = myInstance ) then ...\n2) Dim s As String = myInstance...
I've been searching around, and I haven't found how I would do this from C#. I was wanting to make it so I could tell Google Chrome to go Forward, Back, Open New Tab, Close Tab, Open New Window, and Close Window from my C# application. I did something similar with WinAmp using [DllImport("user32", EntryPoint = "SendMes...
Controlling Google Chrome programmatically using Windows APIs and `SendMessage` can be complex and is generally not recommended. Chrome does not expose a simple interface for external control like some other applications (e.g., media players). Instead, it is often better to use Chrome's remote debugging protocol or com...
15,184
[ { "from": "human", "value": "I've been searching around, and I haven't found how I would do this from C#.\nI was wanting to make it so I could tell Google Chrome to go Forward, Back, Open New Tab, Close Tab, Open New Window, and Close Window from my C# application.\nI did something similar with WinAmp using...
I need to fire an event when the mouse is above a PictureBox with the mouse button already clicked and held down. Problems: The MouseDown and MouseEnter event handlers do not work together very well. For instance once a mouse button is clicked and held down, C# will fire the MouseDown event handler, but when the curso...
To handle the situation where you want to fire an event when the mouse is hovering over a `PictureBox` with the mouse button already clicked and held down, you need to use the `MouseMove` event along with the `MouseDown` and `MouseUp` events. Here's how you can implement this behavior in a Windows Forms application: ...
17,205
[ { "from": "human", "value": "I need to fire an event when the mouse is above a PictureBox with the mouse button already clicked and held down.\nProblems: \nThe MouseDown and MouseEnter event handlers do not work together very well.\nFor instance once a mouse button is clicked and held down, C# will fire the...
I want to use a timer in my simple .NET application written in C#. The only one I can find is the Windows.Forms.Timer class. I don't want to reference this namespace just for my console application. Is there a C# timer (or timer like) class for use in console applications?
Yes, there are several options for using a timer in a C# console application without relying on the `System.Windows.Forms.Timer` class. Here are a few options you can consider: 1. **System.Timers.Timer**: This is a versatile timer that can be used in console applications and is part of the `System.Timers` namespace. I...
16,603
[ { "from": "human", "value": "I want to use a timer in my simple .NET application written in C#. The only one I can find is the Windows.Forms.Timer class. I don't want to reference this namespace just for my console application. \nIs there a C# timer (or timer like) class for use in console applications?\n"...
I'm running into a mental roadblock here and I'm hoping that I'm missing something obvious. Anyway, assume I have a table that looks like this: ID LookupValue SortOrder ============================================ 1 A 1000 2 B 2000 3 ...
It looks like you are on the right track with using LINQ to group the data by `LookupValue` and `SortOrder`. However, your current approach has a few key issues. 1. The way you are currently attempting to count is not correct; you are trying to call `.Count()` on the `Key`, which is just a string and doesn't have a c...
20,807
[ { "from": "human", "value": "I'm running into a mental roadblock here and I'm hoping that I'm missing something obvious.\nAnyway, assume I have a table that looks like this:\n\nID LookupValue SortOrder\n============================================\n1 A 1000\n...
I have an Arduino sending and receiving instructions with a Python script via a serial port. The Arduino takes a button state and when it is pushed, it will send a message via the serial port to a Python script and await a response. (via Serial.available()). It works well enough. However, if the Python script has crash...
Unfortunately, the standard Serial communication protocol does not provide a built-in way for the Arduino to check if there's a listener or device on the other end of the line. Serial communication is designed to be straightforward and doesn't have mechanisms for detecting connectivity or verifying the presence of a li...
18,786
[ { "from": "human", "value": "I have an Arduino sending and receiving instructions with a Python script via a serial port.\nThe Arduino takes a button state and when it is pushed, it will send a message via the serial port to a Python script and await a response. (via Serial.available()). It works well enoug...
A Visual Studio 2008 project in one solution needs to reference a WCF service in another VS 2008 solution on the same development machine. Does anybody have any suggestions on how best to accomplish this?
To reference a WCF service from a project in one Visual Studio 2008 solution in another solution on the same machine, you can follow these steps: ### Step 1: Ensure the WCF Service is Running 1. **Start the WCF Service**: Make sure that the WCF service project is running. You can do this by starting the WCF service p...
12,463
[ { "from": "human", "value": "A Visual Studio 2008 project in one solution needs to reference a WCF service in another VS 2008 solution on the same development machine. Does anybody have any suggestions on how best to accomplish this?\n" }, { "from": "gpt", "value": "To reference a WCF service f...
As a programming exercise, I've written a Ruby snippet that creates a class, instantiates two objects from that class, monkeypatches one object, and relies on method_missing to monkeypatch the other one. Here's the deal. This works as intended: class Monkey def chatter puts "I am a chattering monkey!" end ...
The error you are encountering stems from a misunderstanding of how the `define_method` function is used and the context in which it can be called. The `define_method` method is part of the `Module` class and is not callable in the context of an instance method like you are trying to do. It's designed to be used withi...
19,047
[ { "from": "human", "value": "As a programming exercise, I've written a Ruby snippet that creates a class, instantiates two objects from that class, monkeypatches one object, and relies on method_missing to monkeypatch the other one.\nHere's the deal. This works as intended:\nclass Monkey\n\n def chatter\n...
I'm trying to monitor the states of a group of threads in a Microsoft.NET application written in C#. I'd like to be able to also monitor any child threads spawned by the original threads. In Java, you can assign threads to a thread group, and their children will also belong to the group. Is there an equivalent in .NET?...
In .NET, there isn't a built-in mechanism that directly equates to Java's thread groups, which allows you to easily monitor a group of threads along with their child threads. However, there are ways you can achieve similar functionality using existing .NET constructs and classes. ### Key Considerations 1. **Thread Ma...
19,567
[ { "from": "human", "value": "I'm trying to monitor the states of a group of threads in a Microsoft.NET application written in C#. I'd like to be able to also monitor any child threads spawned by the original threads.\nIn Java, you can assign threads to a thread group, and their children will also belong to ...
Is there any simple way to programatically colorize images in .NET? Basically we have a black and white image and need to put a layer of say pink above it and reduce the opacity of that layer to make the picture colorized in pink.
Yes, you can programmatically colorize black and white images in .NET using the `System.Drawing` namespace. Below is a simple example of how to apply a pink color overlay to a black and white image while controlling the opacity of the overlay. ### Steps: 1. Load the black and white image. 2. Create a new bitmap for th...
15,649
[ { "from": "human", "value": "Is there any simple way to programatically colorize images in .NET? Basically we have a black and white image and need to put a layer of say pink above it and reduce the opacity of that layer to make the picture colorized in pink.\n" }, { "from": "gpt", "value": "Yes...
I'm trying to convert a multipage color tiff file to a c# CompressionCCITT3 tiff in C#. I realize that I need to make sure that all pixels are 1 bit. I have not found a useful example of this online.
To convert a multipage color TIFF file to a CCITT3 compressed monochrome TIFF file in C#, you can use the `System.Drawing` namespace to read and manipulate images, and `BitMiracle.LibTiff.NET` for creating the TIFF output with CCITT compression. Here’s a basic example of how to achieve this: 1. **Install the BitMira...
11,999
[ { "from": "human", "value": "I'm trying to convert a multipage color tiff file to a c# CompressionCCITT3 tiff in C#. I realize that I need to make sure that all pixels are 1 bit. I have not found a useful example of this online.\n" }, { "from": "gpt", "value": "To convert a multipage color TIFF ...
Has anybody been successful in integrating the Enterprise Library v4.0 with SharePoint WSS 3.0? I created a very simple .ASPX page. It's only purpose will to be to connect to an Oracle database and display some values in a DropDownList. But right now, all it does is displays Hello World. I've added the necessary re...
Integrating the Enterprise Library with SharePoint can sometimes be challenging, especially when dealing with older versions like WSS 3.0. Here are some steps and tips that might help you troubleshoot and resolve your issue: ### 1. Check the SharePoint Logs The first step is to check the ULS (Unified Logging Service) ...
17,791
[ { "from": "human", "value": "Has anybody been successful in integrating the Enterprise Library v4.0 with SharePoint WSS 3.0? I created a very simple .ASPX page. It's only purpose will to be to connect to an Oracle database and display some values in a DropDownList. But right now, all it does is displays ...
The subject says it all, almost. How do I automatically fix jsp pages so that relative URLs are mapped to the context path instead of the server root? That is, given for example <link rel="stylesheet" type="text/css" href="/css/style.css" /> how do I set-up things in a way that maps the css to my-server/my-context/css...
Yes, you can achieve this by creating a JSP tag that automatically resolves the context path for you, eliminating the need to manually prepend `<%= request.getContextPath() %>` to every relative URL in your JSP files. Below are two common approaches: creating a custom tag or using a JSP directive to define a base URL. ...
13,584
[ { "from": "human", "value": "The subject says it all, almost. How do I automatically fix jsp pages so that relative URLs are mapped to the context path instead of the server root? That is, given for example\n<link rel=\"stylesheet\" type=\"text/css\" href=\"/css/style.css\" />\n\nhow do I set-up things in a...
How do I locate resources on the classpath in java? Specifically stuff that ends in .hbm.xml. My goal is to get a List of all resources on the classpath that end with ".hbm.xml".
In Java, you can locate resources on the classpath using the `ClassLoader` API. Specifically, you can use the `getResources` method to retrieve resources by their name or path. To find all resources ending with `.hbm.xml`, you might want to use a combination of classpath scanning and resource filtering. Here’s a gener...
16,196
[ { "from": "human", "value": "How do I locate resources on the classpath in java? \nSpecifically stuff that ends in .hbm.xml.\nMy goal is to get a List of all resources on the classpath that end with \".hbm.xml\".\n" }, { "from": "gpt", "value": "In Java, you can locate resources on the classpath...
Is there a maximum length when using window.returnValue (variant) in a modal? I am calling a modal window using showModalDialog() and returning a comma delimited string. After selecting a group of users, I am putting them into a stringbuilder to display in a literal. Dim strReturn As New StringBuilder strReturn.Appe...
When using `window.returnValue` in the context of a modal dialog created with `showModalDialog()`, there isn't a specifically documented maximum length for the string that can be assigned to `window.returnValue`. However, practical limitations may arise based on the specific browser's implementation and constraints of ...
21,323
[ { "from": "human", "value": "Is there a maximum length when using window.returnValue (variant) in a modal? \nI am calling a modal window using showModalDialog() and returning a comma delimited string. After selecting a group of users, I am putting them into a stringbuilder to display in a literal.\nDim st...
When creating a class that has internal private methods, usually to reduce code duplication, that don't require the use of any instance fields, are there performance or memory advantages to declaring the method as static? Example: foreach (XmlElement element in xmlDoc.DocumentElement.SelectNodes("sample")) { string...
Declaring methods as `static` in a class, especially for utility functions like your `GetInnerXml` methods, can provide several advantages, particularly in terms of performance and clarity. Here are some key points to consider: 1. **Performance**: - **Memory Usage**: Static methods do not require an instance of th...
21,234
[ { "from": "human", "value": "When creating a class that has internal private methods, usually to reduce code duplication, that don't require the use of any instance fields, are there performance or memory advantages to declaring the method as static?\nExample:\nforeach (XmlElement element in xmlDoc.Document...
The situation I have a Git repo and an SVN repo that both hold the same source code but different commit histories. The Git repo has a lot of small well commented submits... while the SVN repo has a few huge commits with comments like "Lots of stuff". Both series of commits follow the same changes made in the code and ...
To integrate the detailed history from your Git repository into your SVN repository using Git-SVN, you can follow the steps below. This method uses "grafting" to create a new branch in the SVN repository that contains the commits from the Git repository. ### Step-by-Step Guide 1. **Create a Branch in SVN:** First,...
18,016
[ { "from": "human", "value": "The situation\nI have a Git repo and an SVN repo that both hold the same source code but different commit histories. The Git repo has a lot of small well commented submits... while the SVN repo has a few huge commits with comments like \"Lots of stuff\".\nBoth series of commits ...
I have just started using Boost 1.36. These libraries would be very useful in reducing the amount of code needed in the unmanaged C++ software project that I am working on. However when I tried to used these libraries my compile times increased ten fold. This would pretty much offset the productivity gains I would rece...
Your experience with Boost 1.36 and the associated compilation time issues may be influenced by a few factors. Here are some insights and suggestions to address your concerns: 1. **Compiler Version**: Visual Studio 2003 is quite old, and the compiler's performance (both in terms of speed and optimizations) has signifi...
19,947
[ { "from": "human", "value": "I have just started using Boost 1.36. These libraries would be very useful in reducing the amount of code needed in the unmanaged C++ software project that I am working on.\nHowever when I tried to used these libraries my compile times increased ten fold. This would pretty much ...
What are some methods of utilising Eclipse for Dependency Management?
Eclipse provides several methods and tools for managing project dependencies effectively. Here are some common methods: ### 1. **Maven Integration (M2E)** - **Description**: Maven is a popular build automation and dependency management tool. The Maven Integration for Eclipse (M2E) plugin allows you to manage depend...
19,334
[ { "from": "human", "value": "What are some methods of utilising Eclipse for Dependency Management?\n" }, { "from": "gpt", "value": "Eclipse provides several methods and tools for managing project dependencies effectively. Here are some common methods:\n\n### 1. **Maven Integration (M2E)**\n - ...
Information-Expert, Tell-Don't-Ask, and SRP are often mentioned together as best practices. But I think they are at odds. Here is what I'm talking about. Code that favors SRP but violates Tell-Don't-Ask & Info-Expert: Customer bob = ...; // TransferObjectFactory has to use Customer's accessors to do its work, // viola...
You're right to highlight the potential tensions between the Information Expert, Tell-Don't-Ask, and Single Responsibility Principle (SRP) practices in object-oriented design. However, these principles can indeed coexist with some careful consideration and design techniques. Let's dive into how to reconcile these princ...
16,977
[ { "from": "human", "value": "Information-Expert, Tell-Don't-Ask, and SRP are often mentioned together as best practices. But I think they are at odds. Here is what I'm talking about.\nCode that favors SRP but violates Tell-Don't-Ask & Info-Expert:\nCustomer bob = ...;\n// TransferObjectFactory has to use Cu...
I am using an authentication attribute on some of my actions in an asp.net mvc page to refer people to a login screen if they have not authenticated. My problem is returning them to the referring page after they have logged in. I was just keeping track of the referring action and referring controller but that becomes...
Yes, ASP.NET MVC provides a built-in way to return users to their originally requested page after they log in. You can accomplish this using the `ReturnUrl` parameter, which allows you to redirect users back to the page they were trying to access after successfully authenticating. Here's how you can implement it: 1. ...
18,892
[ { "from": "human", "value": "I am using an authentication attribute on some of my actions in an asp.net mvc page to refer people to a login screen if they have not authenticated. My problem is returning them to the referring page after they have logged in. I was just keeping track of the referring action ...
The application I am currently working on generates a lot of SQL inline queries. All generated SQL is then handed off to a database execution class. I want to write a parsing service for the data execution class that will take a query like this: SELECT field1, field2, field3 FROM tablename WHERE foo=1 AND bar="baz" an...
Creating a parsing service in C# that can take a SQL query and replace the literals with parameter placeholders is a great approach for the situation you described. There are libraries and tools available that can help with SQL parsing, but given the requirement for inline parameterization of existing SQL statements, w...
14,488
[ { "from": "human", "value": "The application I am currently working on generates a lot of SQL inline queries. All generated SQL is then handed off to a database execution class. I want to write a parsing service for the data execution class that will take a query like this:\nSELECT field1, field2, field3 FR...
I've been admiring StackOverflow's default quilt-like profile pictures (which I notice are also on the Fail Blog) and am curious what program both are using to generate them. But what I really want to know is: If you were to design the system to create default profile pictures, how would you do it? I'm looking for idea...
Designing a system to create default profile pictures can be a fun challenge, combining aesthetics with user representation. Here’s a structured approach to how I would design such a system: ### 1. Algorithm for Generating Images #### a. Geometric Patterns Utilize a combination of geometric shapes (triangles, squares...
18,290
[ { "from": "human", "value": "I've been admiring StackOverflow's default quilt-like profile pictures (which I notice are also on the Fail Blog) and am curious what program both are using to generate them.\nBut what I really want to know is: If you were to design the system to create default profile pictures,...
I have a few combo-boxes and double spin boxes on my Qt Dialog. Now I need a "ResetToDefault" item on a menu that comes up when you right click on the widget (spin box or combo box). How do i get it. Is there some way I can have a custom menu that comes up on right click or Is there a way i can add items to the menu t...
In Qt, you can create a custom context menu for your widgets by reimplementing the `contextMenuEvent` method. This allows you to add your own actions, such as a "Reset to Default" item, when the user right-clicks on a widget like a combo box or a double spin box. Here's a step-by-step guide on how to implement a custo...
17,857
[ { "from": "human", "value": "I have a few combo-boxes and double spin boxes on my Qt Dialog. Now I need a \"ResetToDefault\" item on a menu that comes up when you right click on the widget (spin box or combo box).\nHow do i get it. Is there some way I can have a custom menu that comes up on right click or ...
It seems like searching with CAML and SPQuery doesn't work properly against custom metadata, when searching for SPFolders instead of files, or when searching for custom content types. I've been using U2U to test a variety of queries, and just not getting anywhere. The doc's aren't very complete on the topic, and goog...
When working with SharePoint and querying for folders or specific content types using CAML (Collaborative Application Markup Language) and SPQuery, it's important to keep in mind certain nuances regarding folders and metadata. Here are some insights and suggestions that might help resolve your issues: ### 1. **Underst...
15,765
[ { "from": "human", "value": "It seems like searching with CAML and SPQuery doesn't work properly against custom metadata, when searching for SPFolders instead of files, or when searching for custom content types. I've been using U2U to test a variety of queries, and just not getting anywhere. The doc's ar...
We have a typical business web app that allows our users to send e-mails with offerings to their clients. We set user e-mail in FROM field so the client can reply directly to the user. The problem is that because of SMTP protocol, undelivered e-mail notification is returned to our e-mail address(the address of the acco...
Handling undelivered emails in a business web app can indeed be a challenge, especially when using SMTP protocols that route bounce notifications to the account from which the emails are sent. Here are a few elegant solutions to manage this issue: ### 1. **Email Tracking and Bounce Handling Service** - **Use a Serv...
17,986
[ { "from": "human", "value": "We have a typical business web app that allows our users to send e-mails with offerings to their clients. We set user e-mail in FROM field so the client can reply directly to the user. The problem is that because of SMTP protocol, undelivered e-mail notification is returned to o...
What would you consider best practice for organizing JUnit tests in a project, and why? For example, do you keep your tests next to the classes they test? Do you put them in a separate but parallel package structure? Do you use a different organization strategy entirely?
Organizing JUnit tests effectively in a project is crucial for maintainability, readability, and collaboration within a development team. Here are some best practices to consider: ### 1. **Keep Tests Close to the Code:** One common approach is to keep your test classes in the same package as the classes they test. Th...
19,323
[ { "from": "human", "value": "What would you consider best practice for organizing JUnit tests in a project, and why? For example, do you keep your tests next to the classes they test? Do you put them in a separate but parallel package structure? Do you use a different organization strategy entirely?\n" },...
I'm having trouble figuring out how to access a cookie from a compiled object. I'm trying to make a compiled (DLL) object that will check the users cookie and then compare that to a database to confirm they have the correct access. I can pass in the cookie info fine and the component will work, but I'm trying to have ...
To access cookies in a DLL (compiled) component, you typically rely on the `HttpRequest` object that is available in the context of an ASP.NET application. While you cannot directly access the `Request` object within a compiled DLL, you can pass the necessary information to the DLL from the ASP.NET page that calls it. ...
15,575
[ { "from": "human", "value": "I'm having trouble figuring out how to access a cookie from a compiled object. I'm trying to make a compiled (DLL) object that will check the users cookie and then compare that to a database to confirm they have the correct access. \nI can pass in the cookie info fine and the co...
From the first days the .NET framework came out there was a minimum OS support: .NET 1.0 - Windows NT or higher (Windows 98/ME are also supported) .NET 2.0 - Windows 2000 or higher (Windows 98/ME are also supported) .NET 3.0 - Windows XP or higher .NET 3.5 - Windows XP or higher This minimum OS support made possible ...
The introduction of the `PlatformNotSupportedException` in .NET 3.5 for certain classes, such as the `EventLogReader`, indeed marked a shift in how Microsoft approached platform compatibility in the .NET framework. This shift reflects a broader trend within the software development world where newer features and functi...
21,355
[ { "from": "human", "value": "From the first days the .NET framework came out there was a minimum OS support:\n\n.NET 1.0 - Windows NT or higher (Windows 98/ME are also supported)\n.NET 2.0 - Windows 2000 or higher (Windows 98/ME are also supported)\n.NET 3.0 - Windows XP or higher\n.NET 3.5 - Windows XP or ...
Has anyone ever integrated an external web application with Siebel On-Premise CRM? Note that I'm not talking about Siebel On-Demand SaaS, but their behind-the-firewall product. Specifically, I'm trying to achieve two-way synchronization of CRM objects (contacts, accounts, sales opportunities) between my web applicat...
Yes, integrating an external web application with Siebel On-Premise CRM for two-way synchronization of CRM objects is a common requirement, and several well-known techniques can facilitate this integration. ### Techniques for Integration 1. **Siebel EAI (Enterprise Application Integration):** - Siebel provides bui...
19,766
[ { "from": "human", "value": "Has anyone ever integrated an external web application with Siebel On-Premise CRM? Note that I'm not talking about Siebel On-Demand SaaS, but their behind-the-firewall product. Specifically, I'm trying to achieve two-way synchronization of CRM objects (contacts, accounts, sal...
Are there any open source or commercial web programming language that function much like Fog Creek's Wasabi? As in you write your web app in this parent language and it then compiles down to php for Linux hosts and ASP.NET for Windows hosts.
Fog Creek's Wasabi was designed to simplify web application development by allowing developers to write their applications in a higher-level language, which would then compile down to either PHP or ASP.NET for deployment. While Wasabi itself is no longer actively developed, there are several modern alternatives that se...
16,221
[ { "from": "human", "value": "Are there any open source or commercial web programming language that function much like Fog Creek's Wasabi? As in you write your web app in this parent language and it then compiles down to php for Linux hosts and ASP.NET for Windows hosts.\n" }, { "from": "gpt", "...
I posted a question about using Messages versus Fault Exceptions to communicate business rules between services. I was under the impression it carried overhead to throw this exception over the wire, but considering it's just a message that get serialized and deserialized, they were in fact one and the same. But this go...
When considering the overhead of using `FaultException` versus returning a DTO (Data Transfer Object) to communicate business rules in WCF (Windows Communication Foundation) services, there are several aspects to keep in mind. ### Option A: Throwing a FaultException 1. **Serialization and Communication**: When you th...
16,615
[ { "from": "human", "value": "I posted a question about using Messages versus Fault Exceptions to communicate business rules between services.\nI was under the impression it carried overhead to throw this exception over the wire, but considering it's just a message that get serialized and deserialized, they ...
Trying to install the RMagick gem is failing with an error about being unable to find ImageMagick libraries, even though I'm sure they are installed. The pertinent output from gem install rmagick is: checking for InitializeMagick() in -lMagick... no checking for InitializeMagick() in -lMagickCore... no checking for Ini...
It looks like you're running into an issue with the RMagick gem not being able to find the ImageMagick libraries, even though you've confirmed that they are installed. This is a common issue that can often be resolved with a few configuration tweaks. Here are some steps you can take to troubleshoot and potentially fix ...
16,390
[ { "from": "human", "value": "Trying to install the RMagick gem is failing with an error about being unable to find ImageMagick libraries, even though I'm sure they are installed.\nThe pertinent output from gem install rmagick is:\nchecking for InitializeMagick() in -lMagick... no\nchecking for InitializeMag...
I am debugging a large, complex web page that has a lot of JavaScript, JQuery, Ajax and so on. Somewhere in that code I am getting a rouge request (I think it is an empty img) that calls the root of the server. I know it is not in the html or the css and am pretty convinced that somewhere in the JavaScript code the r...
Debugging AJAX requests in a large codebase can be quite challenging, especially when trying to pinpoint rogue requests. Here are some strategies and tools you can use to help identify where those requests are being made: 1. **Network Panel in Developer Tools**: - Use the **Network** panel in your browser's develop...
20,399
[ { "from": "human", "value": "I am debugging a large, complex web page that has a lot of JavaScript, JQuery, Ajax and so on. Somewhere in that code I am getting a rouge request (I think it is an empty img) that calls the root of the server. I know it is not in the html or the css and am pretty convinced th...
What does it take to get C++ tr1 members (shared_ptr especially, but we'd like function and bind and ALL the others) working with GCC 3.4.4 (for the Nokia N810 tablet computer). Has anyone done this? Attempted this? It may not be feasible for us to upgrade to GCC 4.x to cross-compile for this device (but if you've...
Getting C++ TR1 (Technical Report 1) features such as `shared_ptr`, `function`, and `bind` working with GCC 3.4.4 can be quite challenging, especially considering the age of the compiler and its limitations. Here are some approaches you can take, along with some guidance on each: ### 1. **Upgrade to a Newer GCC Versio...
15,823
[ { "from": "human", "value": "What does it take to get C++ tr1 members (shared_ptr especially, but we'd like function and bind and ALL the others) working with GCC 3.4.4 (for the Nokia N810 tablet computer). \nHas anyone done this? Attempted this? \nIt may not be feasible for us to upgrade to GCC 4.x to c...
I need to create a news ticker that is updated via an RSS feed. Any ideas on how to implement this? I would prefer Javascript but any language is acceptable.
Creating a news ticker that updates via an RSS feed can be accomplished using JavaScript. Below, I'll guide you through a basic implementation using JavaScript along with HTML and CSS for the visual aspect. ### Step-by-Step Implementation #### 1. HTML Structure Create a simple HTML structure for your news ticker. He...
15,984
[ { "from": "human", "value": "I need to create a news ticker that is updated via an RSS feed. Any ideas on how to implement this?\nI would prefer Javascript but any language is acceptable.\n" }, { "from": "gpt", "value": "Creating a news ticker that updates via an RSS feed can be accomplished us...
I'm not a beginner at C# but I really need to increase my understanding, so I've picked a classic deadlock problem to code to help teach myself some of the more advanced concepts of C#. The Dining Philosophers Problem seems like a good one, but I need a little help to get started. I know I need to approach the "diner...
The Dining Philosophers Problem is indeed a classic synchronization problem that illustrates the challenges of resource sharing and can lead to deadlocks if not handled properly. You’re right in thinking that using threading will help you simulate the random delays associated with the dining philosophers. Here’s a gene...
14,735
[ { "from": "human", "value": "I'm not a beginner at C# but I really need to increase my understanding, so I've picked a classic deadlock problem to code to help teach myself some of the more advanced concepts of C#. The Dining Philosophers Problem seems like a good one, but I need a little help to get start...
OK, another road bump in my current project. I have never had form elements in both my master and content pages, I tend to have all the forms in the content where relevant. In the current project however, we have a page where they want both. A login form at the top right, and a questions form in the content. Having tri...
In ASP.NET Web Forms, the requirement for a single form element on a page is due to the way the framework handles postbacks and state management. By default, ASP.NET expects a single `<form>` element in the page hierarchy to encapsulate all server controls, allowing it to manage view state and events seamlessly. If yo...
17,636
[ { "from": "human", "value": "OK, another road bump in my current project.\nI have never had form elements in both my master and content pages, I tend to have all the forms in the content where relevant.\nIn the current project however, we have a page where they want both. A login form at the top right, and ...
So how does someone create a music visualizer? I've looked on Google but I haven't really found anything that talks about the actual programming; mostly just links to plug-ins or visualizing applications. I use iTunes but I realize that I need Xcode to program for that (I'm currently deployed in Iraq and can't download...
Creating a music visualizer involves several steps, including understanding audio processing, graphics programming, and the overall architecture of your visualizer. Below is a theoretical overview of the process and some concepts that you need to understand. ### 1. Understanding Audio Processing #### a. Audio Signal ...
18,039
[ { "from": "human", "value": "So how does someone create a music visualizer? I've looked on Google but I haven't really found anything that talks about the actual programming; mostly just links to plug-ins or visualizing applications.\nI use iTunes but I realize that I need Xcode to program for that (I'm cur...
I'm trying to write a log file from an ASP.NET application under IIS7, but keep getting the following exception: UnauthorizedAccessException "Access to the path 'C:\Users\Brady\Exports' is denied." I've been advised to use Process Monitor to help resolve this, but it's quite a complex tool, and I really don't have tim...
To resolve the `UnauthorizedAccessException` when writing to a log file in your ASP.NET application, you can use Process Monitor (ProcMon) to help identify which user account is attempting to access the path and why access is denied. Here’s a step-by-step guide to using Process Monitor for this purpose: ### Step 1: Do...
17,741
[ { "from": "human", "value": "I'm trying to write a log file from an ASP.NET application under IIS7, but keep getting the following exception:\nUnauthorizedAccessException \"Access to the path 'C:\\Users\\Brady\\Exports' is denied.\"\n\nI've been advised to use Process Monitor to help resolve this, but it's ...
I am writing Eclipse plugins where there are quite a few running jobs. In some cases, I want the job to "sleep" for a while at the current point of execution and continue from that spot (rather than reschedule the job and start it from scratch). My understanding is that using Thread.sleep within Eclipse jobs is quite d...
Using `Thread.sleep()` within Eclipse jobs is indeed not a recommended practice as it can block the entire thread, affecting the responsiveness of your Eclipse application and potentially causing UI freezes. Instead, a better approach is to use job scheduling mechanisms provided by the Eclipse Platform itself. To achi...
17,290
[ { "from": "human", "value": "I am writing Eclipse plugins where there are quite a few running jobs.\nIn some cases, I want the job to \"sleep\" for a while at the current point of execution and continue from that spot (rather than reschedule the job and start it from scratch).\nMy understanding is that usin...
I do mostly Windows development. We use Mantis and Subversion for our development but they aren't integrated together, in fact they are on different servers. I did a little googling about integrating the two together and came across this post. It looked interesting. I was wondering if anyone is doing this or has done...
Integrating Mantis Bug Tracker with Subversion can indeed streamline your development workflow by allowing you to link bugs to commits, track changes related to specific issues, and improve overall communication among team members. While Mantis and Subversion do not have built-in integration, there are a few approaches...
20,287
[ { "from": "human", "value": "I do mostly Windows development. We use Mantis and Subversion for our development but they aren't integrated together, in fact they are on different servers.\nI did a little googling about integrating the two together and came across this post. It looked interesting.\nI was wo...
I've got a unidirectional tree of objects, in which each objects points to its parent. Given an object, I need to obtain its entire subtree of descendants, as a collection of objects. The objects are not actually in any data structure, but I can easily get a collection of all the objects. The naive approach is to exami...
Hi Yuval, You're correct in recognizing the inefficiencies in both the naive and recursive approaches when dealing with a unidirectional tree where each object points to its parent. However, there is indeed a more efficient way to obtain the entire subtree of descendants for a given object. ### Efficient Approach 1....
21,089
[ { "from": "human", "value": "I've got a unidirectional tree of objects, in which each objects points to its parent. Given an object, I need to obtain its entire subtree of descendants, as a collection of objects. The objects are not actually in any data structure, but I can easily get a collection of all th...
I have a DataGridView which shows the content of a DataTable. I want to set the backcolor of a row based on the value of a cell in this row. Note that the cell in question is in a column which is not displayed in the DataGridView (Visible=False).
To change the background color of a row in a `DataGridView` based on the value of a cell in a hidden column, you can handle the `DataGridView`'s `CellFormatting` event or the `RowPrePaint` event. Here's how you can achieve this in C# WinForms. ### Example using CellFormatting Event In this method, you will use the `C...
17,886
[ { "from": "human", "value": "I have a DataGridView which shows the content of a DataTable.\nI want to set the backcolor of a row based on the value of a cell in this row.\nNote that the cell in question is in a column which is not displayed in the DataGridView (Visible=False).\n" }, { "from": "gpt",...
I have found no way of dumping the stack on all threads in .NET. Neither a signal to be send to the process nor programatic access to all the threads. I can only get access to the current thread via Thread.CurrentThread. Any tricks ?
Dumping the stack of all threads in a .NET application can be challenging, but there are several ways to accomplish this. While .NET does not provide a direct API for dumping the stack of all threads, you can use a combination of tools and methods to get the information you need. Below are some options to consider: ##...
17,390
[ { "from": "human", "value": "I have found no way of dumping the stack on all threads in .NET. Neither a signal to be send to the process nor programatic access to all the threads. I can only get access to the current thread via Thread.CurrentThread.\nAny tricks ?\n" }, { "from": "gpt", "value": ...
Anyone knows if is possible to have partial class definition on C++ ? Something like: file1.h: class Test { public: int test1(); }; file2.h: class Test { public: int test2(); }; For me it seems quite useful for definining multi-platform classes that have common functions between them tha...
In C++, the language itself does not directly support "partial class definitions" in the way you describe, as seen in some other languages like C# where you can define a class across multiple files. In C++, a class must be fully defined in a single translation unit (a `.cpp` file, for example), though you can declare i...
15,295
[ { "from": "human", "value": "Anyone knows if is possible to have partial class definition on C++ ?\nSomething like:\nfile1.h:\n \nclass Test {\n public:\n int test1();\n};\n\nfile2.h: \n\nclass Test {\n public:\n int test2();\n};\n\nFor me it seems quite useful for definining multi-pla...
We are using the MVC framework (release 5) and the CrystalReportViewer control to show our reports. I cannot get any of the buttons at the top of the report viewer control to work. If I'm working with the report 'HoursSummary'. If I hover over any of the buttons on the report viewer in IE the displayed link at the bo...
It sounds like you're dealing with a routing issue within the MVC framework when using the `CrystalReportViewer` control. The `CrystalReportViewer` tries to manage the report navigation and needs to correctly point to the appropriate controller action and route that handles report requests. To fix the issue, you can s...
15,545
[ { "from": "human", "value": "We are using the MVC framework (release 5) and the CrystalReportViewer control to show our reports. I cannot get any of the buttons at the top of the report viewer control to work.\nIf I'm working with the report 'HoursSummary'. If I hover over any of the buttons on the report...
I'm using HttpListener to allow a user to set up a proxy on a user-defined port. When I start the HttpListener, I get an exception if the application isn't running under administrator privileges in Vista. From what I've read, this is expected behavior - administrator privileges are required to start listening on a port...
Yes, you are correct that in Windows Vista and later, the `HttpListener` class requires administrative privileges to bind to certain ports (typically those below 1024) or to listen on all interfaces. However, you can work around this limitation by using a couple of different approaches: ### 1. Use a Non-Privileged Por...
18,358
[ { "from": "human", "value": "I'm using HttpListener to allow a user to set up a proxy on a user-defined port. When I start the HttpListener, I get an exception if the application isn't running under administrator privileges in Vista.\nFrom what I've read, this is expected behavior - administrator privileges...
I've got a div that contains some content that's being added and removed dynamically, so its height is changing often. I also have a div that is absolutely positioned directly underneath with javascript, so unless I can detect when the height of the div changes, I can't reposition the div below it. So, how can I detect...
To detect changes in the height of a dynamically changing `<div>`, you have a few options, but jQuery does not provide a built-in event specifically for height changes. Instead, you can use the MutationObserver API or a jQuery-based approach with a polling mechanism. ### Option 1: Using MutationObserver The MutationO...
16,158
[ { "from": "human", "value": "I've got a div that contains some content that's being added and removed dynamically, so its height is changing often. I also have a div that is absolutely positioned directly underneath with javascript, so unless I can detect when the height of the div changes, I can't repositi...
I'm getting a heap corruption error in a C# library module I'm calling through COM in a C++ app. The specific error is: HEAP: Free Heap block 4b61bb8 modified at 4b61be8 after it was freed ... This may be due to a corruption of the heap, and indicates a bug in [app].exe or any of the DLLs it has loaded. The...
Debugging heap corruption and access violation errors in interop scenarios between C# and C++ can indeed be challenging, especially since you’re dealing with two different memory management models. Here are several strategies you can use to track down and potentially resolve the issue: ### Steps for Debugging 1. **Ch...
17,008
[ { "from": "human", "value": "I'm getting a heap corruption error in a C# library module I'm calling through COM in a C++ app. The specific error is:\n\nHEAP: Free Heap block 4b61bb8 modified\n at 4b61be8 after it was freed\n ... This may be due to a\n corruption of the heap, and indicates\n a bug in [ap...
What resources have to be manually cleaned up in C# and what are the consequences of not doing so? For example, say I have the following code: myBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black); // Use Brush If I don't clean up the brush using the dispose method, I'm assuming the garbage collector fre...
In C#, certain resources are not managed by the garbage collector (GC) and require explicit cleanup to avoid resource leaks. The example you provided with `System.Drawing.SolidBrush` is one such resource that implements the `IDisposable` interface, meaning it requires you to call its `Dispose` method to free up unmanag...
15,802
[ { "from": "human", "value": "What resources have to be manually cleaned up in C# and what are the consequences of not doing so?\nFor example, say I have the following code:\nmyBrush = new System.Drawing.SolidBrush(System.Drawing.Color.Black);\n// Use Brush\n\nIf I don't clean up the brush using the dispose ...
I'm working in Visual Studio 2005 and have added a text file that needs to be parsed by right-clicking the project in the solution explorer and add --> new item. This places the .txt file to the project folder. The debug .exe file is in the /bin/debug folder. How do I properly point to the txt file from code using rel...
To properly point to your text file in Visual Studio 2005 using relative paths, you can follow these steps: 1. **Understand the Directory Structure**: When you build your project, Visual Studio typically creates a `bin\Debug` (or `bin\Release`) folder where your executable is located. The text file you've added is lik...
19,478
[ { "from": "human", "value": "I'm working in Visual Studio 2005 and have added a text file that needs to be parsed by right-clicking the project in the solution explorer and add --> new item. This places the .txt file to the project folder. The debug .exe file is in the /bin/debug folder. \nHow do I properly...
As someone who has spent around 10 years programming web applications with Adobe's ColdFusion, I have decided to add ASP.NET as a string to my bow. For someone who has spent so long with CF and the underlying Java, ASP.NET seems a little alien to me. How should I go about getting up to speed with ASP.NET so that I can...
Getting up to speed with ASP.NET after working with Adobe ColdFusion and Java is a great step, as you will find many concepts similar, albeit with different syntax and paradigms. Here’s a structured approach to becoming proficient in ASP.NET, including the C# language, which is essential for building applications in th...
8,830
[ { "from": "human", "value": "As someone who has spent around 10 years programming web applications with Adobe's ColdFusion, I have decided to add ASP.NET as a string to my bow.\nFor someone who has spent so long with CF and the underlying Java, ASP.NET seems a little alien to me. How should I go about gett...
I'm trying to dynamically hide certain DIV's when a print (or print preview) occurs from the browser. I can easily differentiate statically by having two style sheets, one for normal and one for print media: But I need to go one step further and hide some elements dynamically when the print style sheet becomes active...
To dynamically hide certain `<div>` elements when a print (or print preview) occurs in the browser, you can use a combination of JavaScript and CSS. While there is no specific DOM event that directly listens for a print or print preview action, you can utilize the `beforeprint` and `afterprint` events to achieve your g...
17,938
[ { "from": "human", "value": "I'm trying to dynamically hide certain DIV's when a print (or print preview) occurs from the browser.\nI can easily differentiate statically by having two style sheets, one for normal and one for print media:\n\n\nBut I need to go one step further and hide some elements dynamica...
I hope this isn't considered a duplicate since it's more pointed than similar questions (I'm curious about a specific weakness in C# to VB.net conversion utilities). I've been looking at using a tool like this .net code converter to convert a class library to VB since I'm the only one in my group comfortable with C#. T...
Your observation about the limitations of .NET code conversion tools, especially in the context of converting automatic properties from C# to VB.NET, is indeed a valid concern. The conversion of C# properties with private setters into a more verbose VB.NET syntax can be tricky for automated tools due to the differences...
18,678
[ { "from": "human", "value": "I hope this isn't considered a duplicate since it's more pointed than similar questions (I'm curious about a specific weakness in C# to VB.net conversion utilities).\nI've been looking at using a tool like this .net code converter to convert a class library to VB since I'm the o...
I have code from an old website that I needed to modify. There are two pages that I modified some form code in. I modified the max length of a textbox and I modified slightly a line or two of code in a function. The "btnSubmit_Click" function as it happens. With the new code FTPed up on the webserver, when I click on t...
It sounds like you are dealing with a JavaScript or compatibility issue between your modified code and Internet Explorer 7. Here are several steps and considerations that might help you diagnose and resolve the issue: ### 1. Compatibility Mode - Ensure that Internet Explorer 7 is not running in compatibility mode for ...
19,093
[ { "from": "human", "value": "I have code from an old website that I needed to modify. There are two pages that I modified some form code in. I modified the max length of a textbox and I modified slightly a line or two of code in a function. The \"btnSubmit_Click\" function as it happens.\nWith the new code ...
I'm writing a server that I expect to be run by many different people, not all of whom I will have direct contact with. The servers will communicate with each other in a cluster. Part of the server's functionality involves selecting a small subset of rows from a potentially very large table. The exact choice of what ro...
Designing a Domain Specific Language (DSL) for your server's row selection functionality, while ensuring ease of maintenance and deployment for server administrators, can be achieved through a few key principles and design choices. Here’s a structured approach to implement your DSL: ### 1. **Define the Language Syntax...
17,141
[ { "from": "human", "value": "I'm writing a server that I expect to be run by many different people, not all of whom I will have direct contact with. The servers will communicate with each other in a cluster. Part of the server's functionality involves selecting a small subset of rows from a potentially very...
How do you actually perform datetime operations such as adding date, finding difference, find out how many days excluding weekends in an interval? I personally started to pass some of these operations to my postgresql dbms as typically I would only need to issue one sql statement to obtain an answer, however, to do it ...
In PHP, performing date and time operations can be made much easier and less error-prone by using libraries like `DateTime`, `DateInterval`, and `DatePeriod` which are built into PHP. Additionally, the `Carbon` library (part of the Laravel framework but usable standalone) provides an even more user-friendly API for dat...
18,421
[ { "from": "human", "value": "How do you actually perform datetime operations such as adding date, finding difference, find out how many days excluding weekends in an interval? I personally started to pass some of these operations to my postgresql dbms as typically I would only need to issue one sql statemen...
What tricks can be used to stop javascript callouts to various online services from slowing down page loading? The obvious solution is to do all the javascript calls at the bottom of the page, but some calls need to happen at the top and in the middle. Another idea that comes to mind is using iframes. Have you ever ha...
Certainly! Dealing with external JavaScript calls can be tricky, especially if they are slowing down your page load or causing server issues. Here are several strategies to optimize the loading of JavaScript from various online services, which can improve performance and prevent outages: 1. **Asynchronous Loading**: ...
18,996
[ { "from": "human", "value": "What tricks can be used to stop javascript callouts to various online services from slowing down page loading?\nThe obvious solution is to do all the javascript calls at the bottom of the page, but some calls need to happen at the top and in the middle. Another idea that comes t...
I need to track traffic between a specific set of web sites. I would then store the number of clicks in a database table with the fields fromSite, toSite, day, noOfClicks. The complete urls are unimportant - only web site identity is needed. I've ruled out redirects since I don't want my server to be a single point of ...
To track traffic between a specific set of websites while minimizing the burden on each site and ensuring reliability, you can consider the following solution: ### Use Client-Side Tracking with Cookies and a Central Database 1. **Client-Side Tracking**: - Implement a small JavaScript snippet on each participating ...
18,076
[ { "from": "human", "value": "I need to track traffic between a specific set of web sites. I would then store the number of clicks in a database table with the fields fromSite, toSite, day, noOfClicks. The complete urls are unimportant - only web site identity is needed.\nI've ruled out redirects since I don...
Anyone can point me to any info regarding physics of a snooker game, if possible more about the ball collisions? I would like to make a game and I need some help about the physics.
Sure! The physics of snooker involves a few key principles that can help you simulate ball collisions and the overall gameplay accurately. Here are some important aspects to consider: ### 1. **Basic Principles of Physics** - **Newton's Laws of Motion**: These laws govern how objects move and interact. The first law (...
9,806
[ { "from": "human", "value": "Anyone can point me to any info regarding physics of a snooker game, if possible more about the ball collisions? I would like to make a game and I need some help about the physics.\n" }, { "from": "gpt", "value": "Sure! The physics of snooker involves a few key princ...
I have a c++ header file containing a class. I want to use this class in several projects, bu I don't want to create a separate library for it, so I'm putting both methods declarations and definitions in the header file: // example.h #ifndef EXAMPLE_H_ #define EXAMPLE_H_ namespace test_ns{ class TestClass{ public: ...
The behavior you're observing is due to the rules of C++ regarding the definition and linkage of functions, and how they interact with the one-definition rule (ODR). In C++, when you define a function outside of the class (like in your first example), that definition has external linkage by default. This means that if...
20,057
[ { "from": "human", "value": "I have a c++ header file containing a class.\nI want to use this class in several projects, bu I don't want to create a separate library for it, so I'm putting both methods declarations and definitions in the header file: \n// example.h\n#ifndef EXAMPLE_H_\n#define EXAMPLE_H_\...
I have an API that is dependent on certain state information between requests. As an easy first version of the code, I am simply using PHP session's to store the state information instead of something more advanced (APC, memcache, DB). Throughout my initial testing in a web browser, everything worked perfectly. However...
You are correct in your understanding of how PHP sessions work and the distinction between `session_name()` and `session_id()`. Let's clarify a few points to ensure everything works as intended, especially when clients are using non-browser tools like cURL or wget. ### PHP Sessions Overview 1. **Session Creation**: P...
18,889
[ { "from": "human", "value": "I have an API that is dependent on certain state information between requests. As an easy first version of the code, I am simply using PHP session's to store the state information instead of something more advanced (APC, memcache, DB). Throughout my initial testing in a web brow...
different programming languages have different features or lack certain features. Design patterns are a way to work around those shortcomings. I have seen the books and lists about design patterns in static, object oriented languages (Java, C++), but also the Videos about design patterns in Python. I'm interested in to...
Design patterns are common solutions to recurring problems in software design. While most discussions of design patterns focus on mainstream object-oriented languages, various programming languages—especially those that differ significantly in paradigm (like Forth, Icon, and Lisp)—have their own ways of approaching des...
10,373
[ { "from": "human", "value": "different programming languages have different features or lack certain features. Design patterns are a way to work around those shortcomings. I have seen the books and lists about design patterns in static, object oriented languages (Java, C++), but also the Videos about design...
Trying to build a CHM using Microsoft HTML Help Workshop. A soon as I click Compile, HTML Help Workshop states: An internal error has occurred. An error record has been saved to c:\os.err. The only contents of the file are: ((Today's Date & Time)) Microsoft HTML Help Workshop Version 4.74.8702 HHA Version 4.74.8...
The error you're encountering in Microsoft HTML Help Workshop (HHW) seems to be related to memory management or buffer overflow issues, which might be triggered by the size or complexity of your project. The assertion failure indicates that there might be a problem with the way HTML Help Workshop is processing HTML fil...
16,660
[ { "from": "human", "value": "Trying to build a CHM using Microsoft HTML Help Workshop. A soon as I click Compile, HTML Help Workshop states:\n\nAn internal error has occurred. An error record has been saved to c:\\os.err.\n\nThe only contents of the file are:\n\n((Today's Date & Time))\n Microsoft HTML Hel...