instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
Tools like Selenium are good for testing user interactions on the web UI. However, I was curious what are people approaches for strictly testing and verifying that web pages are rendered correctly across a set of browsers?
Is this even possible?
| Yes, it is indeed possible to test and verify that web pages are rendered correctly across a set of browsers, and there are several approaches and tools that can help you achieve this. Here are some common strategies:
### 1. **Cross-Browser Testing Tools**
These tools allow you to run tests across multiple browsers an... | 16,698 | [
{
"from": "human",
"value": "Tools like Selenium are good for testing user interactions on the web UI. However, I was curious what are people approaches for strictly testing and verifying that web pages are rendered correctly across a set of browsers?\nIs this even possible?\n"
},
{
"from": "gpt",
... |
I am trying to get Selenium RC working with Firefox 3 on Linux with PHP/Apache but am experiencing problems. Here's what I've done:
I have installed the Firefox Selenium-IDE extension.
On the web server (which in my case is actually the same machine running Firefox), I've started the Selenium server with: java -jar s... | It looks like you're trying to get Selenium RC working with Firefox 3 on Linux and are encountering issues with the setup. Here are a few steps to troubleshoot and resolve the issue you are facing:
1. **Selenium Server Version**: Make sure that you're using a compatible version of the Selenium server with Firefox 3. S... | 22,771 | [
{
"from": "human",
"value": "I am trying to get Selenium RC working with Firefox 3 on Linux with PHP/Apache but am experiencing problems. Here's what I've done:\n\nI have installed the Firefox Selenium-IDE extension.\nOn the web server (which in my case is actually the same machine running Firefox), I've s... |
i have a big web application running in perl CGI. It's running ok, it's well written, but as it was done in the past, all the html are defined hardcoded in the CGI calls, so as you could imagine, it's hard to mantain, improve and etc. So now i would like to start to add some templating and integrate with a framework (c... | Migrating a large Perl CGI application to use a templating system and a framework can be a significant but rewarding process. It can help you improve maintainability, scalability, and readability of your code. Here are some tips and things to consider during this transition:
### 1. Choose the Right Framework
**CGI::A... | 15,582 | [
{
"from": "human",
"value": "i have a big web application running in perl CGI. It's running ok, it's well written, but as it was done in the past, all the html are defined hardcoded in the CGI calls, so as you could imagine, it's hard to mantain, improve and etc. So now i would like to start to add some tem... |
How would I even go about forking a child process using Haskell in the first place?
Also, if pipes are an obvious solution to the data sharing question - is there any other way to do it besides using pipes? I'm familiar with the use of shared memory segments in C (the shmget, *shmat, shmdt and shmctl functions). Could ... | Forking a child process and managing inter-process communication (IPC) in Haskell can seem daunting, especially if you're coming from a more imperative programming background like C. However, Haskell has libraries and abstractions that make these tasks easier.
### Forking a Child Process in Haskell
In Haskell, you ca... | 24,253 | [
{
"from": "human",
"value": "How would I even go about forking a child process using Haskell in the first place?\nAlso, if pipes are an obvious solution to the data sharing question - is there any other way to do it besides using pipes? I'm familiar with the use of shared memory segments in C (the shmget, *... |
In our legacy system, we wrote our own VM to execute our internal DSL at run time. The in-house VM was designed to run our internal DSL only. We are in the process of rewriting our legacy application. One of the idea we are considering is, to transform our internal DSL to external DSL (C# or Java) and take advantage of... | When deciding whether to implement your own VM for an internal DSL or to transform the DSL into an external DSL (such as C# or Java) that runs on an existing VM, there are several factors to consider. Here's a breakdown of key considerations that can guide your decision:
### When to Write Your Own VM
1. **Specific Re... | 18,378 | [
{
"from": "human",
"value": "In our legacy system, we wrote our own VM to execute our internal DSL at run time. The in-house VM was designed to run our internal DSL only. We are in the process of rewriting our legacy application. One of the idea we are considering is, to transform our internal DSL to extern... |
I've just performed a new installation of the very latest (Fall, 2008) version of Fedora 9 Linux and am perplexed that it never set the default route properly and that even traveling the labyrinthine ways of this OS, there's no obvious way.
Of course, it's clear that one can do it on a one-off basis like this:
route... | To set a default route in Fedora 9 (and in many other versions of Fedora and RHEL-based distributions), the preferred method is to configure the network interface settings in the appropriate configuration file. Here's how to do that:
1. **Edit the Network Configuration File:**
Each network interface has its own con... | 24,570 | [
{
"from": "human",
"value": "I've just performed a new installation of the very latest (Fall, 2008) version of Fedora 9 Linux and am perplexed that it never set the default route properly and that even traveling the labyrinthine ways of this OS, there's no obvious way.\nOf course, it's clear that one can do... |
I'm making a small quiz-application in Flash (and ActionScript 3). Decided to use the RadioButton-component for radiobuttons, but I'm having some problems getting the word-wrapping to work.
The code for creating the button can be found below.
_button = new RadioButton();
_button.setStyle("textFormat", _format);
_button... | It sounds like you're encountering some issues with the `RadioButton` component's text formatting and word-wrapping in ActionScript 3. Here are a few suggestions to help you troubleshoot and potentially resolve the issues you're experiencing:
1. **Check the Text Format**:
Make sure that your `_format` text format i... | 21,731 | [
{
"from": "human",
"value": "I'm making a small quiz-application in Flash (and ActionScript 3). Decided to use the RadioButton-component for radiobuttons, but I'm having some problems getting the word-wrapping to work.\nThe code for creating the button can be found below.\n_button = new RadioButton();\n_but... |
I have an Oracle table which contains event log messages for an application. We don't want this table to grow out of control and eat up too much space, so we'd like to set a cap on the number of rows that it can contain to some big number like one million.
So we'd like to tell Oracle that when the table grows too larg... | Using a scheduled job to manage the row count in your event log table is a practical solution, especially if you want to avoid complications associated with triggers or stored procedures for every insert. Here's how you can set up a scheduled job in Oracle to regularly check the row count and delete the oldest rows as ... | 23,334 | [
{
"from": "human",
"value": "I have an Oracle table which contains event log messages for an application. We don't want this table to grow out of control and eat up too much space, so we'd like to set a cap on the number of rows that it can contain to some big number like one million.\nSo we'd like to tell... |
I currently am tasked with updating an XML file (persistance.xml) within a jar at a customers site. I can of course unjar the file, update the xml, then rejar the file for redeployment. I would like to kind these command line operations in a Swing App so that the person doing it does not have to drop to the command l... | Certainly! You can create a Swing application that provides a user-friendly interface for updating an XML file within a JAR file. Below are the steps to achieve this:
### Steps to Create the Swing Application
1. **Create a Swing GUI**: Use Swing components to create a form where users can select the JAR file and spec... | 13,745 | [
{
"from": "human",
"value": "I currently am tasked with updating an XML file (persistance.xml) within a jar at a customers site. I can of course unjar the file, update the xml, then rejar the file for redeployment. I would like to kind these command line operations in a Swing App so that the person doing ... |
I am trying to call out to a legacy dll compiled from FORTRAN code. I am new to Interop, but I've read some articles on it and it seems like my case should be fairly straightforward.
The method I really want to call has a complex method signature, but I can't even call this simple GetVersion method without getting a... | When calling functions from a legacy DLL, particularly one compiled from FORTRAN, it’s important to ensure that the marshalling of data types between managed (C#) and unmanaged (FORTRAN) code is done correctly. The issue you are experiencing with a `System.AccessViolationException` often indicates that there is an issu... | 23,084 | [
{
"from": "human",
"value": "I am trying to call out to a legacy dll compiled from FORTRAN code. I am new to Interop, but I've read some articles on it and it seems like my case should be fairly straightforward. \nThe method I really want to call has a complex method signature, but I can't even call this ... |
I am looking for an Applet with similar functionality to the Oracle/Stellent OutsideIn ActiveX control or the Autonomy KeyView technology that act as a browser plug-in allowing the rendering/display of a large number of file formats (Word processing, spreadhseet, graphics, etc.) I currently use the Stellent solution, b... | Finding a Java Applet or a similar solution that can handle a wide range of file formats for web rendering can be challenging, especially since many modern technologies have moved away from applets and ActiveX controls due to security and compatibility issues. However, there are several alternatives you might consider:... | 24,132 | [
{
"from": "human",
"value": "I am looking for an Applet with similar functionality to the Oracle/Stellent OutsideIn ActiveX control or the Autonomy KeyView technology that act as a browser plug-in allowing the rendering/display of a large number of file formats (Word processing, spreadhseet, graphics, etc.)... |
I've created a web application that I've hosted with IIS 7 on a Windows Server 2008 machine. I've loaded a security certificate for secure.xxxxx.com.
IIS 7 Server Certificates http://img401.imageshack.us/img401/324/certxx6.gif
When I browse to the web site with Microsoft Internet Explorer, I get this prompt:
Choose a... | It appears that the issues you're encountering with Microsoft Internet Explorer and Apple Safari when accessing your web application hosted on IIS 7 are related to certificate authentication and possibly configuration settings. Let's go through each issue to diagnose and suggest possible solutions.
### Issue 1: Micros... | 23,252 | [
{
"from": "human",
"value": "I've created a web application that I've hosted with IIS 7 on a Windows Server 2008 machine. I've loaded a security certificate for secure.xxxxx.com.\nIIS 7 Server Certificates http://img401.imageshack.us/img401/324/certxx6.gif\nWhen I browse to the web site with Microsoft Inte... |
I have a Python script I recently wrote that I call using the command line with some options. I now want a very thin web interface to call this script locally on my Mac.
I don't want to go through the minor trouble of installing mod_python or mod_wsgi on my Mac, so I was just going to do a system() or popen() from PHP ... | If you're looking for a lightweight way to create a web interface for your Python script without going through the hassle of setting up a full web server or using complex frameworks, there are a couple of options you could consider:
### 1. Use Flask
Flask is a lightweight web framework for Python that makes it easy t... | 22,776 | [
{
"from": "human",
"value": "I have a Python script I recently wrote that I call using the command line with some options. I now want a very thin web interface to call this script locally on my Mac.\nI don't want to go through the minor trouble of installing mod_python or mod_wsgi on my Mac, so I was just g... |
I'm writing a routine that validates data before inserting it into a database, and one of the steps is to see if numeric values fit the precision and scale of a Numeric(x,y) SQL-Server type.
I have the precision and scale from SQL-Server already, but what's the most efficient way in C# to get the precision and scale o... | To efficiently validate if a CLR numeric value fits the precision and scale constraints of a `Numeric(x, y)` SQL Server type, you can avoid string conversion and leverage the mathematical properties of numbers directly in C#.
Precision (`x`) represents the total number of digits, and scale (`y`) represents the number... | 23,446 | [
{
"from": "human",
"value": "I'm writing a routine that validates data before inserting it into a database, and one of the steps is to see if numeric values fit the precision and scale of a Numeric(x,y) SQL-Server type. \nI have the precision and scale from SQL-Server already, but what's the most efficient ... |
In my program, I have been receiving an error when I use a
command-line compile command for mxmlc. The error is related to an
embedded font name not being correctly identified by flex in the
system fonts list.
However, on a whim, I decided to copy the code to Flex Builder and
compile it there. To my surprise, it worked... | When you're experiencing differences between compiling with Flex Builder (now known as Flash Builder) and using the `mxmlc` command-line compiler directly, it’s important to understand a few factors that could contribute to the discrepancy.
1. **Environment Settings**: Flex Builder runs with a specific environment con... | 22,326 | [
{
"from": "human",
"value": "In my program, I have been receiving an error when I use a\ncommand-line compile command for mxmlc. The error is related to an\nembedded font name not being correctly identified by flex in the\nsystem fonts list.\nHowever, on a whim, I decided to copy the code to Flex Builder an... |
I have an ADO.Net Data Service that I am using to do a data import. There are a number of entities that are linked to by most entities. To do that during import I create those entities first, save them and then use .SetLink(EntityImport, "NavigationProperty", CreatedEntity). Now the first issue that I ran into was t... | In ADO.NET Data Services (also known as WCF Data Services), managing entity state and tracking can indeed be challenging, especially when you are working with multiple contexts. Here are some suggestions to handle the situation you've described:
### 1. Use a Helper Method to Manage Entity References
Instead of direct... | 22,466 | [
{
"from": "human",
"value": "I have an ADO.Net Data Service that I am using to do a data import. There are a number of entities that are linked to by most entities. To do that during import I create those entities first, save them and then use .SetLink(EntityImport, \"NavigationProperty\", CreatedEntity).... |
open_basedir limits the files that can be opened by PHP within a directory-tree.
I am storing several class libraries and configuration files outside of my web root directory. This way the web server does not make them publicly accessible. However when I try to include them from my application I get an open_basedir r... | To resolve the `open_basedir` restriction error and allow your PHP application to access the libraries and configuration files located outside of your web root directory, you have several options. Each comes with its own considerations regarding security and maintainability:
### Option 1: Modify the `open_basedir` Set... | 23,703 | [
{
"from": "human",
"value": "open_basedir limits the files that can be opened by PHP within a directory-tree.\nI am storing several class libraries and configuration files outside of my web root directory. This way the web server does not make them publicly accessible. However when I try to include them f... |
I'm having a problem understanding the shift/reduce confict for a grammar that I know has no ambiguity. The case is one of the if else type but it's not the 'dangling else' problem since I have mandatory END clauses delimiting code blocks.
Here is the grammar for gppg (Its a Bison like compiler compiler ... and that wa... | The shift/reduce conflict you're encountering in your grammar for handling the `if ... else` structure is a common issue in parser generators like Bison or GPPG. The problem arises from the way the grammar is structured and how the parser attempts to decide between shifting and reducing based on the current input and s... | 22,957 | [
{
"from": "human",
"value": "I'm having a problem understanding the shift/reduce confict for a grammar that I know has no ambiguity. The case is one of the if else type but it's not the 'dangling else' problem since I have mandatory END clauses delimiting code blocks.\nHere is the grammar for gppg (Its a Bi... |
I'm looking for a library that has functionality similar to Perl's WWW::Mechanize, but for PHP. Basically, it should allow me to submit HTTP GET and POST requests with a simple syntax, and then parse the resulting page and return in a simple format all forms and their fields, along with all links on the page.
I know ab... | For PHP, there are a few libraries that provide functionality similar to Perl's `WWW::Mechanize`, allowing you to navigate websites, follow links, and submit forms with an easier and more intuitive syntax than using cURL directly. Here are some options you might consider:
### 1. **Goutte**
[Goutte](https://github.com/... | 25,752 | [
{
"from": "human",
"value": "I'm looking for a library that has functionality similar to Perl's WWW::Mechanize, but for PHP. Basically, it should allow me to submit HTTP GET and POST requests with a simple syntax, and then parse the resulting page and return in a simple format all forms and their fields, al... |
The backup and restore process of a large database or collection of databases on sql server is very important for disaster & recovery purposes. However, I have not found a robust solution that will guarantee the whole process is as efficient as possible, 100% reliable and easily maintainable and configurable accross m... | Backup and restore processes for SQL Server databases are indeed critical for disaster recovery, and many organizations face similar challenges in managing them effectively across multiple servers. While your manual solution is functional, there are ways to improve reliability, maintainability, and configurability with... | 15,450 | [
{
"from": "human",
"value": "The backup and restore process of a large database or collection of databases on sql server is very important for disaster & recovery purposes. However, I have not found a robust solution that will guarantee the whole process is as efficient as possible, 100% reliable and easil... |
I'm using GNU autotools for the build system on a particular project. I want to start writing automated tests for verifcation. I would like to just type "make check" to have it automatically run these. My project is in C++, although I am still curious about writing automated tests for other languages as well.
Is this c... | Using GNU Autotools to integrate automated tests into your build system is a great approach, and it can be made compatible with various unit testing frameworks, including CppUnit. Below, I'll outline how you can achieve this, along with addressing your concerns regarding dependencies.
### Integrating CppUnit with Auto... | 14,917 | [
{
"from": "human",
"value": "I'm using GNU autotools for the build system on a particular project. I want to start writing automated tests for verifcation. I would like to just type \"make check\" to have it automatically run these. My project is in C++, although I am still curious about writing automated t... |
I have a form with a progress bar and a cancel button which is displayed as a process runs. The buttons "Cancel" property is set to true so pressing escape, cancels the process.
But, as the button is the only control on the form capable of taking the focus, should the user inadvertently press enter (or space bar) while... | It sounds like you are dealing with a scenario where the Enter key is triggering the button's click event while a process is running, and you want to prevent that from happening to ensure the process can continue uninterrupted. Here’s a strategy you can use to manage the key presses effectively:
1. **Disable the Butto... | 22,918 | [
{
"from": "human",
"value": "I have a form with a progress bar and a cancel button which is displayed as a process runs. The buttons \"Cancel\" property is set to true so pressing escape, cancels the process.\nBut, as the button is the only control on the form capable of taking the focus, should the user in... |
I have a class with following description:
public class Customer {
public ISet<Client> Contacts { get; protected set;}
}
I want to map Contacts property onto following table:
CREATE TABLE user_contacts (
user1 uuid NOT NULL,
user2 uuid NOT NULL
)
I want it to map bidirectionally, i.e. when Customer1 added... | To achieve a bidirectional relationship between two `Customer` entities, where adding one customer to another's contacts also updates the contact list of the first customer, you can implement a few strategies. However, you'll need to ensure that your mapping and entity logic support this bi-directional update effective... | 19,971 | [
{
"from": "human",
"value": "I have a class with following description:\npublic class Customer {\n public ISet<Client> Contacts { get; protected set;}\n}\n\nI want to map Contacts property onto following table:\nCREATE TABLE user_contacts (\n user1 uuid NOT NULL,\n user2 uuid NOT NULL\n)\n\nI want ... |
I want to allow an Excel report to be viewed embedded in a WebPage... is there a way?
I don't want to use an ActiveX, or OWC (Office Web Components), I just want to open an existing file from the internet explorer application.
I don't want users to download and then open it.
Using an iframe wouldn't be a problem, but... | Embedding an Excel report directly in a webpage without using ActiveX or Office Web Components (OWC) can be challenging, especially considering security settings and browser compatibility. However, there are a few approaches you can consider:
### 1. Using Google Sheets
If you can upload your Excel file to Google Driv... | 19,721 | [
{
"from": "human",
"value": "I want to allow an Excel report to be viewed embedded in a WebPage... is there a way?\n\nI don't want to use an ActiveX, or OWC (Office Web Components), I just want to open an existing file from the internet explorer application.\nI don't want users to download and then open it.... |
To sketch the background of this question : at work we use Dell Precision workstations. My current one has got an NVidia Quadro FX1700.
My team is developing the graphics components for a real time data acquisition system.
So we are always looking out to see if the graphics operations don't use up too much CPU time. Fo... | It seems you've been experiencing a significant improvement in the performance of GDI operations, particularly with filled rectangles, and you're looking for insights into the changes that might have led to this enhancement.
Historically, GDI (Graphics Device Interface) has not been known for hardware acceleration, es... | 21,019 | [
{
"from": "human",
"value": "To sketch the background of this question : at work we use Dell Precision workstations. My current one has got an NVidia Quadro FX1700.\nMy team is developing the graphics components for a real time data acquisition system.\nSo we are always looking out to see if the graphics op... |
Essentially the only thing I can deploy to my deployment machine is a JAR file. I can't install JRuby, nor can I install Glassfish or Tomcat.
Is it possible to package up a Rails application (including Rails, vendored, of course) to a JAR file such that I can do
c:\my_server> java rails_app.jar
and have it run WEBRic... | Packaging a Rails application as a JAR file and running it directly with `java` is not straightforward, especially since Rails is not natively designed to run on the Java Virtual Machine (JVM). However, there are some strategies that you can consider to achieve a similar result, although they may require significant ef... | 20,984 | [
{
"from": "human",
"value": "Essentially the only thing I can deploy to my deployment machine is a JAR file. I can't install JRuby, nor can I install Glassfish or Tomcat.\nIs it possible to package up a Rails application (including Rails, vendored, of course) to a JAR file such that I can do\nc:\\my_server... |
I am trying to print an existing file to PDF programmatically in Visual Basic 2008.
Our current relevant assets are:
Visual Studio 2008 Professional
Adobe Acrobat Professional 8.0
I thought about getting a sdk like ITextSharp, but it seem like overkill for what I am trying to do especially since we have the full versio... | To automate the conversion of `.snp` files to PDF using Adobe Acrobat in Visual Basic 2008, you can leverage Adobe's COM objects to control Adobe Acrobat directly. This method allows you to open the `.snp` files and save them as PDFs programmatically without user intervention.
Here’s a sample code snippet to help you ... | 22,397 | [
{
"from": "human",
"value": "I am trying to print an existing file to PDF programmatically in Visual Basic 2008.\nOur current relevant assets are:\nVisual Studio 2008 Professional\nAdobe Acrobat Professional 8.0\nI thought about getting a sdk like ITextSharp, but it seem like overkill for what I am trying t... |
My company has been working on a Flex dashboard that displays realtime financial information. It will be deployed over a corporate WAN to perhaps a few dozen users.
This is our first Flex project, and while development has been very pleasant, we're a little concerned about what production issues might come up (users n... | Deploying a Flex application, especially one that delivers real-time financial information, comes with its own set of challenges and considerations. Here are some best practices and advice based on experience in deploying commercial Flex applications:
### 1. Flash Player Compatibility
- **Version Check**: Ensure that ... | 20,239 | [
{
"from": "human",
"value": "My company has been working on a Flex dashboard that displays realtime financial information. It will be deployed over a corporate WAN to perhaps a few dozen users. \nThis is our first Flex project, and while development has been very pleasant, we're a little concerned about wha... |
I'm writing an app that contains the following tables: (1) employee_type, (2) employee and (3) employee_action.
Employee_action is foreign-keyed to employee, and contains a description of what happened and the date of the event, just as you might expect.
However, employees can change their type over time (promotion, de... | To handle the historical characteristics of employees at the time of their actions without denormalizing your database schema, you can adopt a design that captures a snapshot of the relevant attributes at the time of each action. Here’s how you can approach this:
### 1. History Tables
Instead of storing employee char... | 20,470 | [
{
"from": "human",
"value": "I'm writing an app that contains the following tables: (1) employee_type, (2) employee and (3) employee_action.\nEmployee_action is foreign-keyed to employee, and contains a description of what happened and the date of the event, just as you might expect.\nHowever, employees can... |
I'm looking at opening up a website in the near future and aside from the standard domain registration costs, I'm unsure of how to proceed. I'm expecting the volume of data to be quite significant and looking at many webhosts it seems that while they might offer extreme bandwidth caps, I've been told they often suspend... | Starting a website with heavy data consumption can indeed be challenging, especially when it comes to selecting the right hosting setup. Fortunately, there are several strategies you can employ to offload bandwidth-intensive components to specialized services while keeping your main website hosted on a standard plan.
... | 24,134 | [
{
"from": "human",
"value": "I'm looking at opening up a website in the near future and aside from the standard domain registration costs, I'm unsure of how to proceed. I'm expecting the volume of data to be quite significant and looking at many webhosts it seems that while they might offer extreme bandwidt... |
Is it possible to set an iPhone Xcode project to skip the 'CompressResources' build step?
Specifically, I want to skip the stage where it runs pngcrush on all of my .png files, many of which don't survive the experience in a form which my app can read.
Edit: the version of pngcrush used creates png files which contain ... | In Xcode, the 'CompressResources' build step is part of the resource processing that occurs when you build your iOS project. If you want to skip this step specifically for your PNG files, there isn't a direct option in Xcode to disable just the pngcrush functionality, but there are a few workarounds you might consider.... | 24,202 | [
{
"from": "human",
"value": "Is it possible to set an iPhone Xcode project to skip the 'CompressResources' build step?\nSpecifically, I want to skip the stage where it runs pngcrush on all of my .png files, many of which don't survive the experience in a form which my app can read.\nEdit: the version of png... |
We need to test a website in both IE6 and IE7. We've had bugs appear running on actual windows machines that aren't visible under vmware (?!), so we have an actual windows laptop to do this - but only one. Is it possible to install IE6 and IE7 side-by-side in such a way that they absolutely, positively, behave exactly ... | Installing Internet Explorer 6 (IE6) and Internet Explorer 7 (IE7) side-by-side on a single Windows machine can be tricky, especially since IE6 was primarily designed to run on Windows XP, and IE7 was designed for Windows XP and later operating systems. However, you can achieve this by using specific methods. Here’s ho... | 23,427 | [
{
"from": "human",
"value": "We need to test a website in both IE6 and IE7. We've had bugs appear running on actual windows machines that aren't visible under vmware (?!), so we have an actual windows laptop to do this - but only one. Is it possible to install IE6 and IE7 side-by-side in such a way that the... |
I have an third-party applet that requires JRE v1.5_12 to work correctly. THe user is installing JRE v1.6.07 or better. It used to be with 1.5 and below, that I could have multiple JRE's on the machine and specify which one to use - but with 1.6 that apepars to be broken. How do I tell the browser I want to use v1.5... | To run a specific version of the Java Runtime Environment (JRE) in a browser, especially if you want to use an older version like JRE 1.5_12 instead of a newer one, you'll typically need to configure the Java plugin settings in the browser. Here's how to do that:
### 1. Install the Required JRE
First, ensure that JRE ... | 23,748 | [
{
"from": "human",
"value": "I have an third-party applet that requires JRE v1.5_12 to work correctly. THe user is installing JRE v1.6.07 or better. It used to be with 1.5 and below, that I could have multiple JRE's on the machine and specify which one to use - but with 1.6 that apepars to be broken. How... |
I'm making another app's window topmost to ensure that a click in my app brings the other's dialog into views. The problem I'm having is that I don't get focus back to my app after the call. If the other app has more windows one of them ends up with focus, and otherwise no window (looking at the taskbar only) gets focu... | It seems that you're trying to set another application's window to be topmost, and you're experiencing issues with window focus after doing so. Here are some things you can investigate or try to help resolve the issue:
1. **Set Focus After Topmost**: After setting the other application's window to topmost, you could t... | 24,024 | [
{
"from": "human",
"value": "I'm making another app's window topmost to ensure that a click in my app brings the other's dialog into views. The problem I'm having is that I don't get focus back to my app after the call. If the other app has more windows one of them ends up with focus, and otherwise no windo... |
In a recent issue, I've found that DJGPP can only accept the DOS command line character limit. To work around this limitation, I've decided to try to write a makefile to allow me to pass longer strings. In the process of hacking together a makefile and testing it, I've come across a strange error. The makefile is as... | The error you're encountering, `make: *** No rule to make target 'consoleio.c', needed by 'consoleio.o'. Stop.`, indicates that `make` is looking for the file `consoleio.c` to create the object file `consoleio.o`, but it cannot find it. This is usually due to how you've structured your makefile, particularly with the r... | 21,783 | [
{
"from": "human",
"value": "In a recent issue, I've found that DJGPP can only accept the DOS command line character limit. To work around this limitation, I've decided to try to write a makefile to allow me to pass longer strings. In the process of hacking together a makefile and testing it, I've come ac... |
I have been working in a web project(asp.net) for around six months. The final product is about to go live. The project uses SQL Server as the database. We have done performance testing with some large volumes of data, results show that performance degrades when data becomes too large, say 2 million rows (timeout issue... | It sounds like you've put a lot of thought into your project, and you're facing common challenges associated with large datasets and performance. Let's address your concerns systematically:
### 1. Denormalization
Denormalization can be a valid strategy for improving performance, especially when you've identified that ... | 23,932 | [
{
"from": "human",
"value": "I have been working in a web project(asp.net) for around six months. The final product is about to go live. The project uses SQL Server as the database. We have done performance testing with some large volumes of data, results show that performance degrades when data becomes too... |
In Delphi, why does the Assigned() function still return True after I call the destructor?
The below example code will write "sl is still assigned" to the console.
However, I can call FreeAndNil(sl); and it won't be assigned.
I've been programming in Delphi for a while, but this never made sense to me.
Can someone expl... | The behavior you are observing relates to how object destruction works in Delphi and the mechanics behind memory management for objects.
In Delphi, when you create an object (like `TStringList`), it gets allocated memory and a pointer to that memory is assigned to your variable (in this case, `sl`). When you call `sl.... | 24,250 | [
{
"from": "human",
"value": "In Delphi, why does the Assigned() function still return True after I call the destructor?\nThe below example code will write \"sl is still assigned\" to the console.\nHowever, I can call FreeAndNil(sl); and it won't be assigned.\nI've been programming in Delphi for a while, but... |
I'm trying to get authentication working to my liking in a CakePHP app and running into a snag.
I want to let the user login from either the home page or from a dedicated login page. I'm using the Auth component to manage login and right now the login itself works. I am submitting the form on the home page to /Users/L... | The behavior you're encountering is indeed related to how the CakePHP Auth component manages redirection after a successful login. When logging in from a form that submits to a different action than the one where the form is located, CakePHP defaults to redirecting back to the referring page instead of the `loginRedire... | 24,247 | [
{
"from": "human",
"value": "I'm trying to get authentication working to my liking in a CakePHP app and running into a snag. \nI want to let the user login from either the home page or from a dedicated login page. I'm using the Auth component to manage login and right now the login itself works. I am submit... |
I got one big question.
I got a linq query to put it simply looks like this:
from xx in table
where xx.uid.ToString().Contains(string[])
select xx
The values of the string[] array would be numbers like (1,45,20,10,etc...)
the Default for .Contains is .Contains(string).
I need it to do this instead: .Contains(string[]... | To achieve your goal, you can create an extension method that checks if a given string contains any of the values from a string array. This can be accomplished by utilizing LINQ's `Any()` method inside your extension method. Here's how you can do this:
### Step 1: Create the Extension Method
You will need to create a... | 18,622 | [
{
"from": "human",
"value": "I got one big question.\nI got a linq query to put it simply looks like this:\nfrom xx in table\nwhere xx.uid.ToString().Contains(string[])\nselect xx\n\nThe values of the string[] array would be numbers like (1,45,20,10,etc...)\nthe Default for .Contains is .Contains(string).\n... |
I have an application I'm writing where I'm allowing the administrators to add aliases for pages, categories, etc, and I would like to use a different controller/action depending on the alias (without redirecting, and I've found that render doesn't actually call the method. I just renders the template). I have tried a ... | Your approach to dynamically generating routes based on your `Alias` model is certainly creative, but it does have some potential drawbacks and might not adhere to Rails best practices. Here are some thoughts and suggestions for improvement:
### Concerns with Dynamic Routes
1. **Performance**: Reloading routes on eve... | 23,032 | [
{
"from": "human",
"value": "I have an application I'm writing where I'm allowing the administrators to add aliases for pages, categories, etc, and I would like to use a different controller/action depending on the alias (without redirecting, and I've found that render doesn't actually call the method. I ju... |
There are multiple values I have been storing in ASP.NET configSections sections for each "module". I have been wondering if they even belong in these files at all.
The background stands at: These are multiple instances of the web application deployed. All use the same database but have their own settings.
I'm sure tha... | When considering what settings should reside in the ASP.NET configuration files (like `web.config`), it's crucial to understand the nature of the settings and the context in which they will be used. Here are some guidelines that may help you determine whether to keep certain settings in your configuration files or stor... | 22,932 | [
{
"from": "human",
"value": "There are multiple values I have been storing in ASP.NET configSections sections for each \"module\". I have been wondering if they even belong in these files at all.\nThe background stands at: These are multiple instances of the web application deployed. All use the same databa... |
A word of warning: I'm a n00b to git in general. My team uses feature branches in svn, and I'd like to use git-svn to track my work on a particular feature branch. I've been (roughly) following Andy Delcambre's post to set up my local git repo, but those instructions seem to have led git to pick the svn branch that had... | Using `git-svn` to interact with an SVN repository is a great way to leverage the benefits of Git while still working within the constraints of an SVN workflow. It can be a bit tricky to set things up, especially when dealing with multiple branches or projects.
Here’s a step-by-step guide to control which SVN branch `... | 23,836 | [
{
"from": "human",
"value": "A word of warning: I'm a n00b to git in general. My team uses feature branches in svn, and I'd like to use git-svn to track my work on a particular feature branch. I've been (roughly) following Andy Delcambre's post to set up my local git repo, but those instructions seem to hav... |
How do the full text search systems of PostgreSQL and MySQL compare? Is any clearly better than the oder? In which way are they different?
| Both PostgreSQL and MySQL offer full-text search capabilities, but they differ in implementation, features, and performance characteristics. Below, I will outline the key comparisons between the two systems regarding full-text search.
### 1. **Implementation and Features**
#### PostgreSQL:
- **Indexing Method**: Post... | 22,953 | [
{
"from": "human",
"value": "How do the full text search systems of PostgreSQL and MySQL compare? Is any clearly better than the oder? In which way are they different?\n"
},
{
"from": "gpt",
"value": "Both PostgreSQL and MySQL offer full-text search capabilities, but they differ in implementatio... |
I want to display the results of a searchquery in a website with a title and a short description. The short description should be a small part of the page which holds the searchterm. What i want to do is:
1 strip tags in page
2 find first position of seachterm
3 from that position, going back find the beginning (if the... | To achieve your goal in step 3—finding the beginning of the sentence containing your search term—you can use a regular expression (regex) that looks for a capital letter or a period followed by a space, which typically indicates the start of a sentence. Here’s how you can construct your regex and use it in your impleme... | 22,078 | [
{
"from": "human",
"value": "I want to display the results of a searchquery in a website with a title and a short description. The short description should be a small part of the page which holds the searchterm. What i want to do is:\n1 strip tags in page\n2 find first position of seachterm\n3 from that pos... |
I am a self taught vb6 programmer who uses DAO. Below is an example of a typical piece of code that I could churn out:
Sub cmdMultiplier_Click() 'Button on form, user interface '
dim Rec1 as recordset
dim strSQL as string
strSQL = "select * from tblCustomers where ID = " & CurrentCustomerID 'inline SQL '
se... | Refactoring your VB6 code into a three-tier architecture—User Interface (UI), Business Logic, and Data Access—will provide better separation of concerns, making your application easier to maintain, test, and extend. Below is an example of how you might refactor your code to achieve this separation.
### 1. Data Access ... | 24,969 | [
{
"from": "human",
"value": "I am a self taught vb6 programmer who uses DAO. Below is an example of a typical piece of code that I could churn out:\nSub cmdMultiplier_Click() 'Button on form, user interface ' \n dim Rec1 as recordset\n dim strSQL as string\n\n strSQL = \"select * from tblCustomers where... |
I am a big fan of letting the compiler do as much work for you as possible. When writing a simple class the compiler can give you the following for 'free':
A default (empty) constructor
A copy and move constructor
A destructor
Assignment operators (operator=)
But it cannot seem to give you any comparison operators -... | Your observation is correct: C++ compilers do automatically generate several special member functions for classes, including constructors, destructors, and assignment operators, but they do not automatically generate comparison operators (like `operator==` or `operator!=`). There are a few reasons for this:
1. **Compl... | 23,636 | [
{
"from": "human",
"value": "I am a big fan of letting the compiler do as much work for you as possible. When writing a simple class the compiler can give you the following for 'free':\n\nA default (empty) constructor\nA copy and move constructor\nA destructor\nAssignment operators (operator=)\n\nBut it ca... |
I am using svn tortoise to checkout a maven project from a repository, I then open eclispe, and use the m2eclipse plugin to import a maven project. The maven projeect comes in okay, and I can build it fine.
The problem is that eclipse using subversive, isn't marking files/ resources as being in source control (even th... | It seems like you're encountering an issue where Eclipse (using Subversive) is not recognizing the files as being under SVN source control after you imported the Maven project. Here are some steps and suggestions to help you resolve the problem:
1. **Check SVN Configuration:**
- Ensure that Subversive is properly c... | 19,571 | [
{
"from": "human",
"value": "I am using svn tortoise to checkout a maven project from a repository, I then open eclispe, and use the m2eclipse plugin to import a maven project. The maven projeect comes in okay, and I can build it fine.\nThe problem is that eclipse using subversive, isn't marking files/ res... |
What is the best way to keep your configuration files (e.g httpd.conf, my.cnf, .bashrc ...) under version control?
In adition to the versioning benefit, I want the solution to work as backup as well, so that I can bring a brand new server and checkout (or export) the config files out of SVN directly
A good touch will b... | Keeping your configuration files under version control is an excellent strategy for backup and consistency across servers. Using a system like SVN (Subversion) or Git can help you manage changes and easily restore configurations when needed. Here's a practical approach to achieve that:
### 1. Choose Your Version Contr... | 19,026 | [
{
"from": "human",
"value": "What is the best way to keep your configuration files (e.g httpd.conf, my.cnf, .bashrc ...) under version control?\nIn adition to the versioning benefit, I want the solution to work as backup as well, so that I can bring a brand new server and checkout (or export) the config fil... |
Let's say I've got a website that works better if a client has installed and logged into a desktop application. I'd like to be able to do 2 things:
Alter the website if they haven't installed the app (to make it easy for them to find a link to the installer)
If they've installed the app on a couple of machines, deter... | To achieve the goals you've described, there are a few techniques and technologies that you can consider. However, it's important to note that due to security and privacy concerns, most modern browsers have significantly restricted the ability to detect installed applications or interact with them directly. Here’s a br... | 18,272 | [
{
"from": "human",
"value": "Let's say I've got a website that works better if a client has installed and logged into a desktop application. I'd like to be able to do 2 things:\n\nAlter the website if they haven't installed the app (to make it easy for them to find a link to the installer)\nIf they've inst... |
Several people round here recommended switching to the new WD Velociraptor 10000rpm harddisk. Also magazine articles praise the performance.
I bought one and mirrored my old system to it. The resulting increase in compilation-speed is somewhat disappointing:
On my old Samsung drive (SATA, 7200), the compilation time ... | It sounds like you're experiencing a common issue when upgrading to a faster hard drive, such as the WD Velociraptor. While it's a high-performance drive with a 10,000 RPM speed, the overall improvement in compilation times may not be as significant as expected for several reasons:
1. **I/O Bottlenecks**: Compilation ... | 21,622 | [
{
"from": "human",
"value": "Several people round here recommended switching to the new WD Velociraptor 10000rpm harddisk. Also magazine articles praise the performance. \nI bought one and mirrored my old system to it. The resulting increase in compilation-speed is somewhat disappointing:\n\nOn my old Samsu... |
Below is the code of a simple html with a table layout.
In FF it's looking as I think it should look like,
in IE7 it doesn't. what am I doing wrong?
And how can I fix it?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<TITLE>test</TITLE>
</head>
<body>
<table ... | The differences in rendering between Firefox and Internet Explorer 7 can often be attributed to the way these browsers handle certain CSS properties and HTML elements.
In your provided HTML, you have several areas that may cause issues, especially with how the widths are specified and how the layout is structured usi... | 19,570 | [
{
"from": "human",
"value": "Below is the code of a simple html with a table layout.\nIn FF it's looking as I think it should look like,\nin IE7 it doesn't. what am I doing wrong?\nAnd how can I fix it?\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html>\n <head>\n <TITLE>te... |
I have a WPF window for editing database information, which is represented using an Entity Framework object. When the user closes the window, I'd like to notice in the Closing event whether the information has changed and show a message box offering to save the changes to the database.
Unfortunately, changes to the cu... | In WPF, the issue you're facing is quite common when binding to Entity Framework objects. The modifications in the UI may not be committed to the data context until the control loses focus, which means the `Closing` event could trigger before these changes are reflected in your entity.
Here are a couple of approaches ... | 21,693 | [
{
"from": "human",
"value": "I have a WPF window for editing database information, which is represented using an Entity Framework object. When the user closes the window, I'd like to notice in the Closing event whether the information has changed and show a message box offering to save the changes to the d... |
I have the requirement of generating UML Diagrams for one of my C++ assignments. I'm using Visio 2007 and I'm having trouble representing C++ pointers. I've found a way to add a suffix to Datatypes however it's rather time consuming to do this for every pointer used or returned in my program.
Basically I'm trying to g... | In Visio 2007, while you have limited flexibility with regard to customizing the properties of individual elements, there are a few strategies you can employ to streamline your work with pointers in UML diagrams. Unfortunately, there isn't a built-in feature to automatically denote pointers for all elements, but here a... | 25,599 | [
{
"from": "human",
"value": "I have the requirement of generating UML Diagrams for one of my C++ assignments. I'm using Visio 2007 and I'm having trouble representing C++ pointers. I've found a way to add a suffix to Datatypes however it's rather time consuming to do this for every pointer used or returned ... |
I've written a simple app in C# 2.0 using the .Net Framework 2.0 Serialport class to communicate with a controller card via COM1.
A problem occurred recently were the bytes returned by the Read method are incorrect. It returned the right amount of bytes, only the values were incorrect. A similar app written in Delphi ... | The issue you're encountering with the C# app returning incorrect bytes and the framing error, while the Delphi app works correctly, can be attributed to several factors related to serial port communication. Here are some potential reasons why the C# `SerialPort` class might be misinterpreting the data:
1. **Port Sett... | 22,393 | [
{
"from": "human",
"value": "I've written a simple app in C# 2.0 using the .Net Framework 2.0 Serialport class to communicate with a controller card via COM1. \nA problem occurred recently were the bytes returned by the Read method are incorrect. It returned the right amount of bytes, only the values were i... |
Why is the CheckBoxList removed from ASP.NET MVC preview release 5?
Currently I don't see any way in which I can create a list of checkboxes (with similar names but different id's) so people can select 0-1-more options from the list.
There is an CheckBoxList list present in the MVCContrib library, but it is deprecated... | In ASP.NET MVC, you can create a list of checkboxes by manually rendering the checkbox inputs in a loop in your view. Since the `CheckBoxList` helper was removed in the later versions of MVC, you can achieve the desired functionality by using a combination of `Html.CheckBox` and some model properties.
Here’s a step-by... | 24,830 | [
{
"from": "human",
"value": "Why is the CheckBoxList removed from ASP.NET MVC preview release 5? \nCurrently I don't see any way in which I can create a list of checkboxes (with similar names but different id's) so people can select 0-1-more options from the list.\nThere is an CheckBoxList list present in t... |
I was wondering if there was any difference in the way the following code was compiled into assembly. I've heard that switch-case is more efficient than if else, but in this example I am not quite sure if that would be the case.
if(x==1){
...
}else if(x==2){
...
}else{
...
}
and
switch(x){
case 1:
...
break;
case... | The efficiency of `switch` statements versus `if-else` chains can depend on various factors, including how the compiler optimizes the code and the specific context in which these constructs are used. Let’s break down how compilers typically generate assembly code for these constructs, and when one might be more efficie... | 21,013 | [
{
"from": "human",
"value": "I was wondering if there was any difference in the way the following code was compiled into assembly. I've heard that switch-case is more efficient than if else, but in this example I am not quite sure if that would be the case.\nif(x==1){\n...\n}else if(x==2){\n...\n}else{\n...... |
I am trying to compare two large datasets from a SQL query. Right now the SQL query is done externally and the results from each dataset is saved into its own csv file. My little C# console application loads up the two text/csv files and compares them for differences and saves the differences to a text file.
Its a very... | To improve the performance of your C# application when comparing two sorted datasets, you can use a few different approaches and data structures. Given that both of your CSV files are sorted, you can utilize a two-pointer technique which is both memory-efficient and time-efficient.
Here are some recommended data types... | 15,609 | [
{
"from": "human",
"value": "I am trying to compare two large datasets from a SQL query. Right now the SQL query is done externally and the results from each dataset is saved into its own csv file. My little C# console application loads up the two text/csv files and compares them for differences and saves t... |
I am researching companies that provide both SMS and voicemail services via an API call. I want to be able to contact users (most of whom are US-based) via both text-message and voicemail. The idea is that our web server would connect to the SMS/voicemail provider's server (e.g. using HTTP post) and then send the messa... | There are several companies that provide both SMS and voicemail services via API, allowing you to send text messages and deliver voicemail messages using a single platform. Here are some notable providers you might consider:
1. **Twilio**:
- **SMS**: Twilio is well-known for its SMS messaging services, providing ex... | 24,017 | [
{
"from": "human",
"value": "I am researching companies that provide both SMS and voicemail services via an API call. I want to be able to contact users (most of whom are US-based) via both text-message and voicemail. The idea is that our web server would connect to the SMS/voicemail provider's server (e.g.... |
We have a product but we are doing some rebranding so we need to be able to build and maintain two versions. I used resource files combined with some #if stuff to solve the strings, images, and whatever else, but the program icon is giving me trouble. I couldn't figure it out from msdn or a google search. Thanks!
| To manage multiple icons for different versions of your application during rebranding, you can use conditional compilation symbols in combination with different resource files. Below are steps that can help you achieve this:
### Steps to Handle Multiple Application Icons:
1. **Prepare Your Icons**:
- Create two di... | 23,041 | [
{
"from": "human",
"value": "We have a product but we are doing some rebranding so we need to be able to build and maintain two versions. I used resource files combined with some #if stuff to solve the strings, images, and whatever else, but the program icon is giving me trouble. I couldn't figure it out ... |
I want to store a a c# DateTimeOffset value in a SQL Server 2005 database.
Sql 2008 has this as a built-in-type, but SQL Server 2005 does not.
The DateTimeOffset structure has a DateTime value which I store as DateTime, an an Offset property (of type TimeSpan). Since this is the time zone relative to UTC, presumably it... | To store a `DateTimeOffset` in a SQL Server 2005 database, you can break it down into two separate columns. Since SQL Server 2005 does not have a built-in type for `DateTimeOffset`, the common approach is to store the `DateTime` part and the offset as a separate `TimeSpan`.
Here’s how you can do it:
### Suggested Sch... | 20,059 | [
{
"from": "human",
"value": "I want to store a a c# DateTimeOffset value in a SQL Server 2005 database.\nSql 2008 has this as a built-in-type, but SQL Server 2005 does not.\nThe DateTimeOffset structure has a DateTime value which I store as DateTime, an an Offset property (of type TimeSpan). Since this is t... |
I'm implementing a secure WCF service. Authentication is done using username / password or Windows credentials. The service is hosted in a Windows Service process. Now, I'm trying to find out the best way to implement authorization for each service operation.
For example, consider the following method:
public EntityInf... | Implementing secure authorization in a WCF service is essential, and you've raised some important considerations regarding where to place authorization checks and how to handle argument validation. Let's break down your questions:
### 1. Argument Validation vs. Authorization Checks
It's generally a good practice to v... | 21,960 | [
{
"from": "human",
"value": "I'm implementing a secure WCF service. Authentication is done using username / password or Windows credentials. The service is hosted in a Windows Service process. Now, I'm trying to find out the best way to implement authorization for each service operation.\nFor example, consi... |
I am currently having a hardtime understanding and implementing events in C# using delagates. I am used to the Java way of doing things:
Define an interface for a listener type which would contain a number of method definitions
Define adapter class for that interface to make things easier if I'm not interested in all... | Certainly! C# has a built-in event handling model that leverages delegates, which can simplify your implementation compared to the Java approach. In C#, you can define events using the `event` keyword alongside delegates, and it follows a convention that makes it intuitive once you get the hang of it.
Let’s break it d... | 19,270 | [
{
"from": "human",
"value": "I am currently having a hardtime understanding and implementing events in C# using delagates. I am used to the Java way of doing things:\n\nDefine an interface for a listener type which would contain a number of method definitions\nDefine adapter class for that interface to mak... |
I have a proxy object generated by Visual Studio (client side) named ServerClient. I am attempting to set ClientCredentials.UserName.UserName/Password before opening up a new connection using this code:
InstanceContext context = new InstanceContext(this);
m_client = new ServerClient(context);
m_client.ClientCredential... | The error you're encountering, "Object is read-only," typically suggests that the `ClientCredentials.UserName` properties are being accessed after the client has been initialized in a way that makes them immutable. However, the specific situation you're describing—where the client hasn't been opened yet—suggests that t... | 25,663 | [
{
"from": "human",
"value": "I have a proxy object generated by Visual Studio (client side) named ServerClient. I am attempting to set ClientCredentials.UserName.UserName/Password before opening up a new connection using this code:\nInstanceContext context = new InstanceContext(this);\n\nm_client = new Serv... |
I'm trying to get my multithreading understanding locked down. I'm doing my best to teach myself, but some of these issues need clarification.
I've gone through three iterations with a piece of code, experimenting with locking.
In this code, the only thing that needs locking is this.managerThreadPriority.
First, the s... | Your exploration of multithreading and the nuances of locking is commendable! Let's break down your examples and the key considerations around locking in multithreaded environments.
### Locking Scope
1. **Locking for Shared Resources**: The purpose of locking is to ensure that shared resources are accessed in a threa... | 19,803 | [
{
"from": "human",
"value": "I'm trying to get my multithreading understanding locked down. I'm doing my best to teach myself, but some of these issues need clarification. \nI've gone through three iterations with a piece of code, experimenting with locking.\nIn this code, the only thing that needs locking ... |
Is there any way I can push a new record to SqlDataReader after i pull a table down? I have this piece of trash code that I need to modify, and this seems like the easiest way to do what I need. I understand that this should not be done, and if you have to do it there is something seriously wrong with your logic, but i... | `SqlDataReader` is a forward-only stream of data retrieved from a database. It is designed for reading data, not for writing or modifying it. Therefore, you cannot add new records directly to a `SqlDataReader` instance.
However, if you need to work with data from a database and then add new records to the dataset, her... | 19,679 | [
{
"from": "human",
"value": "Is there any way I can push a new record to SqlDataReader after i pull a table down? I have this piece of trash code that I need to modify, and this seems like the easiest way to do what I need. I understand that this should not be done, and if you have to do it there is somethi... |
The system consists of a hardware device and a PC. The PC runs a GUI that controls the hardware device. To test the device various test hardware is used that can be controlled by RS232 or GPIB. To automate this testing the test software would have to control the test hardware and interact with the PC GUI.
What is the b... | When it comes to automating the testing of a system that involves both a hardware device and a GUI on a PC, there are several approaches you can take, each with its own advantages and trade-offs. Here are some options to consider based on effectiveness, maintainability, implementation time, cost, and flexibility:
### ... | 20,429 | [
{
"from": "human",
"value": "The system consists of a hardware device and a PC. The PC runs a GUI that controls the hardware device. To test the device various test hardware is used that can be controlled by RS232 or GPIB. To automate this testing the test software would have to control the test hardware an... |
What is the best practice for testing an API that depends on data from the database?
What are the issues I need to watch out for in a "Continuous Integration" environment that runs Unit Tests as part of the build process? I mean would you deploy your database as part of the build scripts (may be run your installer) or ... | Testing an API that relies on a database can be complex, especially within a Continuous Integration (CI) environment. Here are some best practices and considerations to keep in mind:
### 1. Types of Tests
- **Unit Tests**: These tests should be focused on testing individual functions or methods in isolation. For datab... | 24,951 | [
{
"from": "human",
"value": "What is the best practice for testing an API that depends on data from the database?\nWhat are the issues I need to watch out for in a \"Continuous Integration\" environment that runs Unit Tests as part of the build process? I mean would you deploy your database as part of the b... |
Another poster asked about preferred syntax for infinite loops.
A follow-up question: Why do you use infinite loops in your code? I typically see a construct like this:
for (;;) {
int scoped_variable = getSomeValue();
if (scoped_variable == some_value) {
break;
}
}
Which lets you get around not being able to... | Infinite loops can be quite useful in various programming scenarios, and their applications extend beyond the simple construct you provided. Here are several common uses for infinite loops:
1. **Event Loop in GUI Applications**: In many graphical user interface applications, an infinite loop is used to keep the applic... | 24,986 | [
{
"from": "human",
"value": "Another poster asked about preferred syntax for infinite loops.\nA follow-up question: Why do you use infinite loops in your code? I typically see a construct like this:\nfor (;;) {\n int scoped_variable = getSomeValue();\n if (scoped_variable == some_value) {\n break;\n }... |
What free or open source WPF diagramming libraries have you used before? I'm working on my thesis and have no money to pay for the commercial alternatives.
Valid answers should support undo/redo, exporting to XML and hopefully good documentation.
I'm building an open source UML / database diagramming tool.
| For your WPF diagramming tool, there are several free or open-source libraries that you can consider. Here are some options that support features like undo/redo, exporting to XML, and are well-documented:
1. **GraphX for .NET**:
- **Description**: A graph visualization library that is built on top of WPF. It suppor... | 19,672 | [
{
"from": "human",
"value": "What free or open source WPF diagramming libraries have you used before? I'm working on my thesis and have no money to pay for the commercial alternatives.\nValid answers should support undo/redo, exporting to XML and hopefully good documentation.\nI'm building an open source UM... |
This is not strictly programming related, but I hope still relevant.
I'm working on a project which is written in Java and intended for use on PCs and Macs. It will be distributed on CD (and perhaps DVD, eventually). Our intended audience is decidedly non-technical and, as such, it's important the CD "just work" when... | Creating a cross-platform CD (or DVD) that functions seamlessly on both Windows and Mac can be accomplished by following a few guidelines. While there are no guarantees that every detail will be handled perfectly, you can achieve a reasonable level of compatibility with these steps:
### 1. File System
Use a format th... | 23,132 | [
{
"from": "human",
"value": "This is not strictly programming related, but I hope still relevant.\nI'm working on a project which is written in Java and intended for use on PCs and Macs. It will be distributed on CD (and perhaps DVD, eventually). Our intended audience is decidedly non-technical and, as su... |
I had this questions since the time I learnt about object-oriented programming. Now, I have got a wonderful forum I thought of asking this.
Lets say we are implementing an employee management application using EJB.
Now, there are 2 ways of doing this.
Normally, we create entities (POJOs) which represent an employee. T... | Your question touches on some fundamental design choices in software engineering, particularly in the context of enterprise applications using EJB (Enterprise JavaBeans). Let's break down both approaches you've described and assess their pros and cons.
### Approach 1: Using POJOs as Data Transfer Objects (DTOs)
1. **... | 23,170 | [
{
"from": "human",
"value": "I had this questions since the time I learnt about object-oriented programming. Now, I have got a wonderful forum I thought of asking this.\nLets say we are implementing an employee management application using EJB.\nNow, there are 2 ways of doing this.\n\nNormally, we create en... |
I'm building a shared library with g++ 3.3.4. I cannot link to the library because I am getting
./BcdFile.RHEL70.so: undefined symbol: _ZNSt8_Rb_treeIjjSt9_IdentityIjESt4lessIjESaIjEE13insert_uniqueERKj
Which c++filt describes as
std::_Rb_tree<unsigned int, unsigned int, std::_Identity<unsigned int>, std::less<unsig... | It seems you're encountering a problem related to template instantiation and symbol resolution when working with the GNU Compiler Collection (GCC) version 3.3.4, specifically with shared libraries and the `-frepo` flag.
Here's a breakdown of your issue and suggestions on how to resolve it:
### Understanding the Probl... | 22,502 | [
{
"from": "human",
"value": "I'm building a shared library with g++ 3.3.4. I cannot link to the library because I am getting \n./BcdFile.RHEL70.so: undefined symbol: _ZNSt8_Rb_treeIjjSt9_IdentityIjESt4lessIjESaIjEE13insert_uniqueERKj\n\nWhich c++filt describes as \nstd::_Rb_tree<unsigned int, unsigned int, ... |
Our situation is as follows, but I'm curious about this problem in any situation.
We have a framework consisting of 4 projects:
beans
util
framework
web
We also have modules that need a version and depend on a version of beans and util.
Finally we have a customer project that consists of a specific version of the cor... | Versioning in software projects can become complex, especially when multiple projects and modules depend on one another. However, a structured approach to versioning can help manage releases effectively. Here are some suggestions based on your preferences and common practices:
### Semantic Versioning (SemVer)
The app... | 21,690 | [
{
"from": "human",
"value": "Our situation is as follows, but I'm curious about this problem in any situation.\nWe have a framework consisting of 4 projects:\n\nbeans\nutil\nframework\nweb\n\nWe also have modules that need a version and depend on a version of beans and util.\nFinally we have a customer proj... |
I'm getting an error connecting to a VistaDB using a connection string in the web.config file.
It works fine using a SQLDataSource AFTER I specified the ProviderName. On another page I'm only connecting in code and
Here is the code for the connection string:
Public Function CreateConnection() As SqlConnection
_con... | The error message you are encountering suggests that the connection string you are using to connect to the database is incorrect or not properly configured. It seems you are trying to connect to a SQL Server database using a connection string meant for VistaDB (or vice versa). Here are some steps to help you resolve th... | 24,611 | [
{
"from": "human",
"value": "I'm getting an error connecting to a VistaDB using a connection string in the web.config file.\nIt works fine using a SQLDataSource AFTER I specified the ProviderName. On another page I'm only connecting in code and \nHere is the code for the connection string:\nPublic Function ... |
I have this regex I built and tested in regex buddy.
"_ [ 0-9]{10}+ {1}+[ 0-9]{10}+ {2}+[ 0-9]{6}+ {2}[ 0-9]{2}"
When I use this in .Net C#
I receive the exception
"parsing \"_ [ 0-9]{10}+ +[ 0-9]{10}+ +[ 0-9]{6}+ [ 0-9]{2}\" - Nested quantifier +."
What does this error mean? Apparently .net doesn't like the expre... | A **nested quantifier** in regular expressions occurs when one quantifier is applied to another quantifier, which often leads to ambiguity in what the expression is supposed to match. For example, in your regex, you have expressions like `{10}+`, which is problematic because it attempts to apply the `+` quantifier to t... | 22,692 | [
{
"from": "human",
"value": "I have this regex I built and tested in regex buddy.\n\"_ [ 0-9]{10}+ {1}+[ 0-9]{10}+ {2}+[ 0-9]{6}+ {2}[ 0-9]{2}\"\n\nWhen I use this in .Net C# \nI receive the exception\n\"parsing \\\"_ [ 0-9]{10}+ +[ 0-9]{10}+ +[ 0-9]{6}+ [ 0-9]{2}\\\" - Nested quantifier +.\"\n\nWhat does... |
Is there a reliable Delta RGB formula or code snippet that does colour Delta of the full RGB tri stim values, like how DeltaE 2000/cmc does Lab/Lch that takes perceptual differences into account?
The RGB Colourspace could be any, but if it needed to be a particular one I could keep it sRGB for the calculations. C# is p... | To compute a perceptual color difference directly in the RGB space, you need to use a formula that takes human visual perception into account. The simplest RGB distance formulas, like the Euclidean distance you provided, do not account for how humans perceive differences in color, which is why they are often insufficie... | 21,946 | [
{
"from": "human",
"value": "Is there a reliable Delta RGB formula or code snippet that does colour Delta of the full RGB tri stim values, like how DeltaE 2000/cmc does Lab/Lch that takes perceptual differences into account?\nThe RGB Colourspace could be any, but if it needed to be a particular one I could ... |
I have to implement the VinPower application. They offer a Java version, a C dll and an ActiveX dll, if anyone has an idea on where I could begin, I'd appreciate it.
| Implementing the VinPower application involves integrating with their software using the options they provide: Java, C DLL, or ActiveX DLL. Here’s a brief outline on how to start with each option:
### 1. **Java Version**
If you decide to go with the Java version:
- **Setup Development Environment:**
- Ensure you h... | 18,349 | [
{
"from": "human",
"value": "I have to implement the VinPower application. They offer a Java version, a C dll and an ActiveX dll, if anyone has an idea on where I could begin, I'd appreciate it.\n"
},
{
"from": "gpt",
"value": "Implementing the VinPower application involves integrating with the... |
Is there a way my program can determine when it's running on a Remote Desktop (Terminal Services)?
I'd like to enable an "inactivity timeout" on the program when it's running on a Remote Desktop session. Since users are notorious for leaving Remote Desktop sessions open, I want my program to terminate after a specifie... | Yes, your program can determine if it is running in a Remote Desktop (Terminal Services) session and implement an inactivity timeout accordingly. There are various ways to achieve this depending on the programming language and platform you are using. Below, I'll outline some general methods for Windows applications.
#... | 20,291 | [
{
"from": "human",
"value": "Is there a way my program can determine when it's running on a Remote Desktop (Terminal Services)?\nI'd like to enable an \"inactivity timeout\" on the program when it's running on a Remote Desktop session. Since users are notorious for leaving Remote Desktop sessions open, I w... |
This page displays beautifully in firefox but i get all kinds of problems when testing the site in opera or internet explorer, mostly with the menu. I would like to know what techniques have caused this and how to avoid them.
http://www.jkhbdesign.se/
Edit 2: Here are some screenshots of some specific problems
The dro... | It looks like you're encountering cross-browser compatibility issues, particularly with your dropdown menu in Internet Explorer (IE) and Opera. Here are some common techniques and issues that could cause such discrepancies, along with suggestions on how to avoid them:
### Common Techniques Causing Issues:
1. **CSS Sp... | 22,036 | [
{
"from": "human",
"value": "This page displays beautifully in firefox but i get all kinds of problems when testing the site in opera or internet explorer, mostly with the menu. I would like to know what techniques have caused this and how to avoid them. \nhttp://www.jkhbdesign.se/\nEdit 2: Here are some sc... |
I have a client who is still using Visual Studio 6 for building production systems. They write multi-threaded systems that use STL and run on mutli-processor machines.
Occasionally when they change the spec of or increase the load on one of their server machines they get 'weird' difficult to reproduce errors...
I kno... | Convincing a client to upgrade from Visual Studio 6 (VS6) to a more modern version like Visual Studio 2005 or 2008 can be approached by highlighting several key issues and limitations associated with VS6, especially for multi-threaded applications. Here's a list of known issues, reasons to upgrade, and some real-world ... | 21,321 | [
{
"from": "human",
"value": "I have a client who is still using Visual Studio 6 for building production systems. They write multi-threaded systems that use STL and run on mutli-processor machines. \nOccasionally when they change the spec of or increase the load on one of their server machines they get 'weir... |
I have a need to work with Windows executables which are made for x86, x64, and IA64. I'd like to programmatically figure out the platform by examining the files themselves.
My target language is PowerShell but a C# example will do. Failing either of those, if you know the logic required that would be great.
| You can determine the platform of a Windows executable file by examining its headers. Windows executables typically start with the "PE" (Portable Executable) header. You can read the headers using PowerShell or C# to determine if the executable is x86, x64, or IA64.
### PowerShell Example
Below is a PowerShell script... | 20,906 | [
{
"from": "human",
"value": "I have a need to work with Windows executables which are made for x86, x64, and IA64. I'd like to programmatically figure out the platform by examining the files themselves.\nMy target language is PowerShell but a C# example will do. Failing either of those, if you know the log... |
I have a class hierarchy as such:
+-- VirtualNode
|
INode --+ +-- SiteNode
| |
+-- AbstractNode --+
|
+-- SiteSubNode
And a corresponding NodeCollection class that is build on INode. In order to disp... | You're correct in identifying that using a type switch statement can lead to a less-than-ideal object-oriented design, primarily because it violates the Open/Closed Principle, which suggests that software entities should be open for extension but closed for modification. Instead of relying on type checks and switch sta... | 18,942 | [
{
"from": "human",
"value": "I have a class hierarchy as such:\n +-- VirtualNode\n |\nINode --+ +-- SiteNode\n | |\n +-- AbstractNode --+\n |\n +-- SiteSubNode\n\nAnd a corresponding NodeCollect... |
At a previous employer, we were writing binary messages that had to go "over the wire" to other computers. Each message had a standard header something like:
class Header
{
int type;
int payloadLength;
};
All of the data was contiguous (header, immediately followed by data). We wanted to get to the payload g... | Your approach to accessing the payload using `(char*) &this[1]` is indeed compact, but it raises some concerns regarding readability, maintainability, and potentially portability. Let's break down the pros and cons of the different methods you mentioned, including your own.
### Pros and Cons of Each Approach
1. **Usi... | 22,253 | [
{
"from": "human",
"value": "At a previous employer, we were writing binary messages that had to go \"over the wire\" to other computers. Each message had a standard header something like:\nclass Header\n{\n int type;\n int payloadLength;\n};\n\nAll of the data was contiguous (header, immediately fol... |
How would you store formatted blocks of text (line breaks, tabs, lists - etc.) in a database (nothing specific) to be displayed on the web (XHTML) while maintaining a level of abstraction so that the data can be used in other applications or if the structure of the website were to change in the future?
| Storing formatted blocks of text for web display while maintaining flexibility for future changes is a common requirement in application design. Here are some strategies you can consider for your database schema and overall data handling:
### 1. **Use Rich Text Formatting (RTF) or Markdown**
Storing the text in a form... | 21,697 | [
{
"from": "human",
"value": "How would you store formatted blocks of text (line breaks, tabs, lists - etc.) in a database (nothing specific) to be displayed on the web (XHTML) while maintaining a level of abstraction so that the data can be used in other applications or if the structure of the website were ... |
I'm working on designing the kernel (which I'm going to actually call the "core" just to be different, but its basically the same) for an OS I'm working on. The specifics of the OS itself are irrelevant if I can't get multi-tasking, memory management, and other basic things up and running, so I need to work on that fir... | Your questions about heap management and memory allocation in C/C++ are great, and it's important to understand how these concepts work in the context of an operating system.
### 1. Understanding the Heap and Stack
First, let's clarify the concepts of the stack and the heap:
- **Stack**: This is a region of memory t... | 22,868 | [
{
"from": "human",
"value": "I'm working on designing the kernel (which I'm going to actually call the \"core\" just to be different, but its basically the same) for an OS I'm working on. The specifics of the OS itself are irrelevant if I can't get multi-tasking, memory management, and other basic things up... |
I've tried to use the new Groovy Grape capability in Groovy 1.6-beta-2 but I get an error message;
unable to resolve class com.jidesoft.swing.JideSplitButton
from the Groovy Console (/opt/groovy/groovy-1.6-beta-2/bin/groovyConsole) when running the stock example;
import com.jidesoft.swing.JideSplitButton
@Grab(group='... | The issue you're encountering likely stems from the way Groovy Grape resolves dependencies and the context in which your code is being executed in the Groovy Console. The Groovy Console may not automatically recognize the dependencies resolved by Grape. Here’s how you can troubleshoot and resolve the problem:
### Step... | 22,496 | [
{
"from": "human",
"value": "I've tried to use the new Groovy Grape capability in Groovy 1.6-beta-2 but I get an error message;\nunable to resolve class com.jidesoft.swing.JideSplitButton\n\nfrom the Groovy Console (/opt/groovy/groovy-1.6-beta-2/bin/groovyConsole) when running the stock example;\nimport com... |
I want to keep my website/s in version control (Subversion specifically) and use svn co to update it when there are stable versions to update, but I'm concerned about the security of doing so, as all the .svn folders will be public, and these include all sorts of private data, not least of which is complete source code... | Keeping your website under version control with Subversion (SVN) can be a great way to manage your code, but you need to ensure that sensitive data in the `.svn` directories and your codebase is protected. Here are some strategies you can use to secure your SVN-controlled website:
### 1. **Use `.htaccess` to Block Acc... | 24,237 | [
{
"from": "human",
"value": "I want to keep my website/s in version control (Subversion specifically) and use svn co to update it when there are stable versions to update, but I'm concerned about the security of doing so, as all the .svn folders will be public, and these include all sorts of private data, n... |
My 11 year old son is very interested in programming. He has been working with Scratch
for a couple years but has now outgrown it. I recently helped him install Visual C# Express Edition and he is very excited to work with it, but we're having a hard time finding good resources for him online.
He learns best by looking... | It's great to hear that your son is interested in programming and has already made strides with Scratch! Visual C# is a good step up, and there are plenty of resources available to help him get started. Here are some suggestions for sample programs, tutorials, and resources tailored for a young learner:
### Sample Pro... | 22,444 | [
{
"from": "human",
"value": "My 11 year old son is very interested in programming. He has been working with Scratch\nfor a couple years but has now outgrown it. I recently helped him install Visual C# Express Edition and he is very excited to work with it, but we're having a hard time finding good resources... |
The link over here lists ([http://www.yoda.arachsys.com/csharp/singleton.html][1]) some singleton patterns in C#. The article also describes the obvious that a singleton is not meant to accept parameters which “as otherwise a second request for an instance but with a different parameter could be problematic”. This mean... | You're correct that the classic Singleton pattern restricts instantiation to a single instance and usually does not allow for parameters to be passed during that instantiation. However, there are approaches to implement parameterized singletons while managing the concerns you mentioned, such as maintaining a single ins... | 19,751 | [
{
"from": "human",
"value": "The link over here lists ([http://www.yoda.arachsys.com/csharp/singleton.html][1]) some singleton patterns in C#. The article also describes the obvious that a singleton is not meant to accept parameters which “as otherwise a second request for an instance but with a different p... |
We use ASP.NET, C#
When making an update to one of our websites, we roll out the entire site rather than updating just the pages or sections that have changed. This scares me.
Is this a good idea? Should I roll out only the changes?
Should I break my site into smaller projects?
What is best practice?
| Rolling out an entire website instead of just updating the changed pages or sections can indeed be a source of concern, especially if the deployment process isn't robust. Here are some considerations, best practices, and strategies that can help improve your deployment process:
### Considerations:
1. **Risk of Bugs**... | 24,822 | [
{
"from": "human",
"value": "We use ASP.NET, C#\nWhen making an update to one of our websites, we roll out the entire site rather than updating just the pages or sections that have changed. This scares me.\nIs this a good idea? Should I roll out only the changes? \nShould I break my site into smaller projec... |
I have a class that compares 2 instances of the same objects, and generates a list of their differences. This is done by looping through the key collections and filling a set of other collections with a list of what has changed (this may make more sense after viewing the code below). This works, and generates an obje... | Your current implementation for comparing two instances of objects is indeed quite complex and relies heavily on nested loops and manual comparisons, which can lead to maintenance issues and difficulty in reading the code. Here are some suggestions to improve your code's structure and readability:
### 1. Utilize LINQ
... | 22,802 | [
{
"from": "human",
"value": "I have a class that compares 2 instances of the same objects, and generates a list of their differences. This is done by looping through the key collections and filling a set of other collections with a list of what has changed (this may make more sense after viewing the code b... |
We use Subversion as our source control system and store the VisualStudio project files (vcproj) in the source control system as is normal I think. With Subversion we don't use any form of file locking, so if two developers are working on the same project at the same time and both add files to the project, or change se... | Merging changes in project files like `.vcproj` can be tricky, particularly because of their structure and the way Visual Studio manages them. Here are several options that you can consider to streamline the merging process:
1. **Use a Version Control-Friendly Project Format**:
- **Transition to `*.vcxproj`**: If y... | 21,868 | [
{
"from": "human",
"value": "We use Subversion as our source control system and store the VisualStudio project files (vcproj) in the source control system as is normal I think. With Subversion we don't use any form of file locking, so if two developers are working on the same project at the same time and bo... |
I'm creating a UI that allows the user the select a date range, and tick or un-tick the days of the week that apply within the date range.
The date range controls are DateTimePickers, and the Days of the Week are CheckBoxes
Here's a mock-up of the UI:
From Date: (dtpDateFrom)
To Date: (dtpDateTo)
[y] Monday, [n] Tu... | Looping through the date range is a straightforward approach and works well, but there are alternative methods that can be more efficient, especially if you're working with larger date ranges. Here’s how you can do it:
### Looping Approach
1. **Calculate Total Days**: Loop through each date in the range from `dtpDateF... | 22,911 | [
{
"from": "human",
"value": "I'm creating a UI that allows the user the select a date range, and tick or un-tick the days of the week that apply within the date range.\nThe date range controls are DateTimePickers, and the Days of the Week are CheckBoxes\nHere's a mock-up of the UI:\nFrom Date: (dtpDateFrom)... |
I have a web form that binds a DataGrid to a, normally, different data source on each postback. I have a static CheckBox column that is always present to the left of the autogenerated columns. I achieve a TabControl effect with a horizontal Menu control above the grid, with each menu item being a tab that contains a ... | Persisting the state of checkboxes across different tabs in a DataGrid during postbacks can be achieved through a variety of methods that don't rely on session variables. Here are a few creative solutions you might consider:
### 1. Use Hidden Fields
You can use hidden fields to store the state of the checkboxes for e... | 10,536 | [
{
"from": "human",
"value": "I have a web form that binds a DataGrid to a, normally, different data source on each postback. I have a static CheckBox column that is always present to the left of the autogenerated columns. I achieve a TabControl effect with a horizontal Menu control above the grid, with ea... |
I'm sorting out a series of SQL scripts for my company written in Oracle PL/SQL. I came across an essential script with a strangely placed slash near the bottom. It is checked into CVS this way. Is this a pure syntax error or does it have some function I'm not aware of. The slightly obfuscated script:
set serverout... | In Oracle PL/SQL, the `/` character is used to indicate the end of a PL/SQL block when you are executing it in SQL*Plus or similar environments. It tells the interpreter to execute the PL/SQL block that has been defined above it.
In your script, the `/` appears at the end of the PL/SQL block just before the `exit` com... | 27,891 | [
{
"from": "human",
"value": "I'm sorting out a series of SQL scripts for my company written in Oracle PL/SQL. I came across an essential script with a strangely placed slash near the bottom. It is checked into CVS this way. Is this a pure syntax error or does it have some function I'm not aware of. The ... |
I m just starting using gwt and so far so good, however after reading some sample code I wonder is it necesary to have a high level of test coverage? (I can see that most code is declarative and then add some attributes I can see the sense in checking so me particular attributes are there but not all)
Also i would be i... | Welcome to the world of GWT (Google Web Toolkit)! It's great to hear you're diving in. Your questions touch on several important topics regarding test coverage, TDD (Test-Driven Development), and development tools. Let's break it down a bit:
### Test Coverage in GWT
1. **Declarative Nature of GWT**: You're right in n... | 23,073 | [
{
"from": "human",
"value": "I m just starting using gwt and so far so good, however after reading some sample code I wonder is it necesary to have a high level of test coverage? (I can see that most code is declarative and then add some attributes I can see the sense in checking so me particular attributes... |
I got this error
Response object error 'ASP 0156 : 80004005'
Header Error
/ordermgmt/updateorderstatus.asp, line 1390
The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.
I put Response.Buffer=true;
Stilll it is showing error.
I have put... | The error message you're encountering indicates that your ASP code is attempting to modify HTTP headers after some content has already been sent to the client browser. The issue often arises when using `Response.Redirect` after some output has already been written to the response.
Here's how to troubleshoot and resolv... | 23,830 | [
{
"from": "human",
"value": "I got this error\nResponse object error 'ASP 0156 : 80004005' \nHeader Error \n/ordermgmt/updateorderstatus.asp, line 1390 \nThe HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content. \nI put Response.Buffe... |
Method signature in Java:
public List<String> getFilesIn(List<File> directories)
similar one in ruby
def get_files_in(directories)
In the case of Java, the type system gives me information about what the method expects and delivers. In Ruby's case, I have no clue what I'm supposed to pass in, or what I'll expect to ... | You've raised some valid concerns regarding the differences between static typing (like Java) and dynamic typing (like Ruby) and how they influence code maintainability and clarity. Let’s address your points regarding design by contract, encapsulation, and documentation in Ruby.
### Understanding Ruby's Typing System
... | 23,521 | [
{
"from": "human",
"value": "Method signature in Java:\npublic List<String> getFilesIn(List<File> directories)\n\nsimilar one in ruby\ndef get_files_in(directories)\n\nIn the case of Java, the type system gives me information about what the method expects and delivers. In Ruby's case, I have no clue what I... |
I have a webservice that I'm calling from a windows forms application (both .NET, both in the same solution), and I'd like my webservice to return a custom object from elsewhere in the project - it's a common object that they both share a reference to, as it's in the third project in my solution. When I call the webser... | Your question does make sense, and you're encountering a common issue when working with web services in .NET, particularly when using autogenerated proxy classes. The problem arises because the proxy class generated by the web service is a separate instance of the `Person` class, defined in a different namespace, which... | 21,900 | [
{
"from": "human",
"value": "I have a webservice that I'm calling from a windows forms application (both .NET, both in the same solution), and I'd like my webservice to return a custom object from elsewhere in the project - it's a common object that they both share a reference to, as it's in the third proje... |
I am new to programming, and am wondering if there is a correct way to order your control structure logic.
It seems more natural to check for the most likely case first, but I have the feeling that some control structures won't work unless they check everything that's false to arrive at something that's true (logical d... | Welcome to the world of programming! It's great that you're thinking about control structure logic and how to approach it. The way you organize your control structures (like `if`, `else`, and `switch` statements) can indeed impact readability and functionality, but there isn't a strict "correct" order. Here are some gu... | 23,150 | [
{
"from": "human",
"value": "I am new to programming, and am wondering if there is a correct way to order your control structure logic.\nIt seems more natural to check for the most likely case first, but I have the feeling that some control structures won't work unless they check everything that's false to ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.