instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I have a server side ImageButton, and a server side Button, and then a simple HTML input-type="button". Neither the ImageButton nor the plain HTML button are visible, nor the alt text of the ImageButton. However, they are rendered out onto the client side HTML when I inspect it. Anyone have any ideas? <asp:ImageButto...
When your server-side `ImageButton` and `Button` controls are rendered to HTML but not visible on the client side, there could be several reasons for this issue. Below are some troubleshooting steps and potential solutions to address the problem: 1. **Check CSS Styles**: Ensure that there are no CSS styles applied to ...
49,690
[ { "from": "human", "value": "I have a server side ImageButton, and a server side Button, and then a simple HTML input-type=\"button\". Neither the ImageButton nor the plain HTML button are visible, nor the alt text of the ImageButton. However, they are rendered out onto the client side HTML when I inspect...
In my Java application I would like to download a JPEG, transfer it to a PNG and do something with the resulting bytes. I am almost certain I remember a library to do this exists, I cannot remember its name.
It sounds like you are referring to the **Apache Commons Imaging** (formerly known as Sanselan) library or possibly the **ImageIO** class that's included in Java's standard library for handling images. If you want to download a JPEG image, convert it to PNG format, and then manipulate the resulting byte data, you can ...
48,627
[ { "from": "human", "value": "In my Java application I would like to download a JPEG, transfer it to a PNG and do something with the resulting bytes.\nI am almost certain I remember a library to do this exists, I cannot remember its name.\n" }, { "from": "gpt", "value": "It sounds like you are re...
This is a weird problem I have started having recently. My team is developing a COTS application and we have a few people with their hands in the code. A few weeks ago, I received an error message when trying to debug (and run the compiled EXE): "Windows cannot access the specified device, path, or file. You may not...
The error message you're encountering ("Windows cannot access the specified device, path, or file") usually indicates issues related to file access, permissions, or the state of the compiled executable. It seems that you've already experienced a workaround by refactoring your code, but let’s dive deeper into your situa...
45,202
[ { "from": "human", "value": "This is a weird problem I have started having recently. My team is developing a COTS application and we have a few people with their hands in the code. A few weeks ago, I received an error message when trying to debug (and run the compiled EXE):\n\n\"Windows cannot access the sp...
How do I create a ListBox in ASP.NET MVC with single selection mode?
Creating a ListBox in ASP.NET MVC with single selection mode involves a few steps, including creating the model, view, and controller, as well as setting up the necessary HTML. Below is a step-by-step guide on how to accomplish this. ### Step 1: Create the Model First, you need to create a model that represents the i...
45,272
[ { "from": "human", "value": "How do I create a ListBox in ASP.NET MVC with single selection mode?\n" }, { "from": "gpt", "value": "Creating a ListBox in ASP.NET MVC with single selection mode involves a few steps, including creating the model, view, and controller, as well as setting up the nece...
Scenario You've got several bug reports all showing the same problem. They're all cryptic with similar tales of how the problem occurred. You follow the steps but it doesn't reliably reproduce the problem. After some investigation and web searching, you suspect what might be going on and you are pretty sure you can fix...
Verifying a fix for a bug that cannot be reliably reproduced can be challenging, but there are several strategies you can employ to increase your confidence in your changes: 1. **Code Review**: Have your changes reviewed by colleagues who may offer additional insights or identify potential issues with your proposed fi...
47,849
[ { "from": "human", "value": "Scenario\nYou've got several bug reports all showing the same problem. They're all cryptic with similar tales of how the problem occurred. You follow the steps but it doesn't reliably reproduce the problem. After some investigation and web searching, you suspect what might be go...
I'm trying to write out a Byte[] array representing a complete file to a file. The original file from the client is sent via TCP and then received by a server. The received stream is read to a byte array and then sent to be processed by this class. This is mainly to ensure that the receiving TCPClient is ready for th...
To write a `byte[]` array to a file in C#, you can use the `File.WriteAllBytes` method, which is the simplest way to do this. However, if you're looking to implement this in a separate thread to ensure that it doesn't block your TCP client, you can use the `Task` class or a `Thread`. Here is an example of how you can ...
47,851
[ { "from": "human", "value": "I'm trying to write out a Byte[] array representing a complete file to a file.\nThe original file from the client is sent via TCP and then received by a server. The received stream is read to a byte array and then sent to be processed by this class. \nThis is mainly to ensure t...
I am trying to get more processing power out of my grid. I am using all cpus/cores, is it possible to utilize the GPU with C#. Anyone know any libraries or got any sample code?
Yes, it's possible to utilize the GPU for processing in C# using several libraries. The GPU can significantly accelerate compute-heavy tasks such as data processing, image manipulation, and machine learning. Below are some libraries and examples that can help you get started with GPU programming in C#. ### 1. **CUDA w...
48,188
[ { "from": "human", "value": "I am trying to get more processing power out of my grid.\nI am using all cpus/cores, is it possible to utilize the GPU with C#.\nAnyone know any libraries or got any sample code?\n" }, { "from": "gpt", "value": "Yes, it's possible to utilize the GPU for processing in...
I have an entity class that has a property with an underlying db column of datatype Int, however in reality I want this property to be an Enum. Is there any way to specify that this property returns an Enum?
Yes, you can map an integer database column to an enum property in your entity class. The way you do this largely depends on the technology and framework you are using. Below are examples for commonly used technologies like Entity Framework (EF) in .NET, Hibernate in Java, and JPA. ### Entity Framework (C#) If you ar...
49,587
[ { "from": "human", "value": "I have an entity class that has a property with an underlying db column of datatype Int, however in reality I want this property to be an Enum. Is there any way to specify that this property returns an Enum?\n" }, { "from": "gpt", "value": "Yes, you can map an intege...
I'm using JQuery and Prototype in this web application that I'm developing. I'm looking for a way to use Lightbox v2.04 by Lokesh Dhakar to play flash movies. If its not possible using the Lightbox v2.04 then what other ways can I accomplish the shadowing overlayed flash video pop-up with jquery and/or Prototype? Th...
Using Lightbox v2.04 by Lokesh Dhakar, which is primarily designed for images, to display Flash content (like .flv files) is not directly supported out of the box. However, you can achieve your goal with some modifications and additional scripting. Here are two methods you could consider: ### Method 1: Modify Lightbo...
49,523
[ { "from": "human", "value": "I'm using JQuery and Prototype in this web application that I'm developing. I'm looking for a way to use Lightbox v2.04 by Lokesh Dhakar to play flash movies. If its not possible using the Lightbox v2.04 then what other ways can I accomplish the shadowing overlayed flash video...
This question flows from the answer to:How does one set up multiple accounts with separate databases for Django on one server? I haven't seen anything like this on Google or elsewhere (perhaps I have the wrong vocabulary), so I think input could be a valuable addition to the internet discourse. How could one configure ...
Setting up a server with multiple Django projects that can dynamically respond to user requests based on their session can be a complex task, but it’s certainly achievable. Your approach using a demultiplexing FastCGI script is on the right track, and I'll provide some additional insights and considerations that may he...
49,137
[ { "from": "human", "value": "This question flows from the answer to:How does one set up multiple accounts with separate databases for Django on one server?\nI haven't seen anything like this on Google or elsewhere (perhaps I have the wrong vocabulary), so I think input could be a valuable addition to the in...
What are the tips/techniques when you need to persist classes with inheritance to relational database that doesn't support inheritance? Say I have this classic example: Person -> Employee -> Manager -> Team lead -> Developer -> Customer -> PrivilegedCustomer ...
When dealing with a relational database that does not support inheritance directly, such as SQL Server 2005, there are several design techniques you can use to represent an inheritance hierarchy. Each technique has its pros and cons. Below are the most common strategies along with their advantages and disadvantages: #...
48,788
[ { "from": "human", "value": "What are the tips/techniques when you need to persist classes with inheritance to relational database that doesn't support inheritance?\nSay I have this classic example:\nPerson -> Employee -> Manager\n -> Team lead\n -> Developer\n -> C...
Im searching for the best way to mantain combo box values within a Mysql Database accessed by Hibernate objects. Currently we have the following table: CREATE TABLE COMBO_VALUES( KEY VARCHAR(5) NOT NULL, COMBO_TYPE VARCHAR(20) NOT NULL, VALUE VARCHAR(100) NOT NULL PRIMARY KEY(KEY,COMBO_TYPE) ); INSERT INTO ...
Certainly! Mapping a composite primary key in Hibernate can be done using either an `@EmbeddedId` or a `@IdClass`. Below, I’ll provide an example of how you can achieve this with both approaches. First, let's create a class to represent the composite key: ### 1. Using `@Embeddable` and `@EmbeddedId` #### Create an ...
48,608
[ { "from": "human", "value": "Im searching for the best way to mantain combo box values within a Mysql Database accessed by Hibernate objects.\nCurrently we have the following table:\nCREATE TABLE COMBO_VALUES(\n KEY VARCHAR(5) NOT NULL,\n COMBO_TYPE VARCHAR(20) NOT NULL,\n VALUE VARCHAR(100) NOT NULL\...
I was writing some code, and I notice a pattern in the exception handling that got me thinking: try{ // do stuff... throws JMS, Create and NamingException } catch (NamingException e) { log1(e); rollback(); doSomething(e) } catch (CreateException e) { log1(e); rollback(); ...
Your inquiry revolves around the idea of simplifying exception handling in Java, especially when dealing with multiple exception types that require the same handling logic. The suggestion to catch multiple exceptions in a single catch block is indeed a concept that many developers ponder, but let's examine its implicat...
47,870
[ { "from": "human", "value": "I was writing some code, and I notice a pattern in the exception handling that got me thinking:\ntry{\n\n // do stuff... throws JMS, Create and NamingException\n\n} catch (NamingException e) {\n\n log1(e);\n rollback();\n doSomething(e)\n} catch (CreateEx...
I'm creating a zip file using the class FastZip from SharpZipLib and once I after I close the program, I cannot delete the file because: "Cannot delete zip.zip: It is being used by another person or program. Close any programs that might be using the file and try again." The code that is generating the file is simply t...
The issue you're encountering with the inability to delete the zip file after creation usually indicates that a file stream or resource has not been properly released. Since `FastZip` from the SharpZipLib library does not implement `IDisposable`, you'll need to ensure that no other resources related to file access are ...
46,554
[ { "from": "human", "value": "I'm creating a zip file using the class FastZip from SharpZipLib and once I after I close the program, I cannot delete the file because:\n\"Cannot delete zip.zip: It is being used by another person or program. Close any programs that might be using the file and try again.\"\nThe...
If I have a notebook with three spreadsheet widgets, what is the best way to have changes to the spreadsheet update a dictionary (or maybe an sqlite file?). Do all wx grid objects come with a built in dictionary related to the SetNumberRows and SetNumberCols? Basically I am looking for guidance on how to work with th...
To achieve the goal of updating a dictionary or an SQLite database with changes made to the spreadsheet widgets, you will need to handle the events that occur when users edit the cells. In `wx.lib.sheet.CSheet`, you can capture events related to cell changes, specifically `EVT_GRID_CELL_CHANGED`. When a cell value is...
49,632
[ { "from": "human", "value": "If I have a notebook with three spreadsheet widgets, what is the best way to have changes to the spreadsheet update a dictionary (or maybe an sqlite file?). Do all wx grid objects come with a built in dictionary related to the SetNumberRows and SetNumberCols? Basically I am lo...
I am trying to create a wpf control that will display a map image using google maps. I want to be able to centre the map on a longitude and latitude specified by the application. Ideally, the control will then allow the user to move a map marker and store the latitude/longitude of the marker in the application. The onl...
Creating a WPF control to display a map using Google Maps and interact with it, such as moving a marker, can be achieved more elegantly by using a WebBrowser control in combination with the Google Maps JavaScript API. This allows you to display the map and handle user interactions in a more manageable way. Here are som...
46,544
[ { "from": "human", "value": "I am trying to create a wpf control that will display a map image using google maps. I want to be able to centre the map on a longitude and latitude specified by the application. Ideally, the control will then allow the user to move a map marker and store the latitude/longitude ...
I have a listview with a DataTemplate that has a ComboBox. I want the ComboBox to look flat like a label until the user actually wants to change the value. I had the example below working before, but I changed things around a bit, and now it doesn't work anymore and I'm not sure why. The IsMouseOver property does not ...
To achieve the desired behavior of a ComboBox that looks like a flat label until the user hovers over it or clicks to change the value, you may need to modify the `ControlTemplate` and add additional triggers. The primary issue you are facing with the `IsMouseOver` property might be due to the visual structure of your ...
47,880
[ { "from": "human", "value": "I have a listview with a DataTemplate that has a ComboBox. I want the ComboBox to look flat like a label until the user actually wants to change the value. I had the example below working before, but I changed things around a bit, and now it doesn't work anymore and I'm not sure...
I am building a menu using XHTML,CSS, and jQuery and I ran into a problem with my CSS. Here is my test page, and here is my css. What I am having problems with is that my .subMenu class is inheriting the properties of my #menu, the background colors and sizes are the same. I am looking for a solution that leaves .su...
Hello Levi, It sounds like you're experiencing issues with CSS specificity and inheritance due to the way your styles are applied. When you define styles for both the `#menu` and `.subMenu` classes, the properties that have the same names will follow CSS specificity rules. ### Problem Explanation 1. **Specificity**:...
48,030
[ { "from": "human", "value": "I am building a menu using XHTML,CSS, and jQuery and I ran into a problem with my CSS.\nHere is my test page, and here is my css. \nWhat I am having problems with is that my .subMenu class is inheriting the properties of my #menu, the background colors and sizes are the same. ...
I'm programming a simple network chat with a Python server and a Java client. But one question came into my mind: Which "network protocol" should I use for communication? There are some possibilities for me: YAML: Nice to parse, problem: parsed objects contain language specific parts XML: Easy to parse, big overhead f...
When designing a simple network chat application, choosing the right network protocol and data format for communication between the Python server and Java client is critical for ease of use, performance, and maintainability. Let's evaluate the options you've mentioned, as well as consider some alternatives: ### 1. **Y...
48,844
[ { "from": "human", "value": "I'm programming a simple network chat with a Python server and a Java client.\nBut one question came into my mind:\nWhich \"network protocol\" should I use for communication?\nThere are some possibilities for me:\n\nYAML: Nice to parse, problem: parsed objects contain language s...
Java 5 introduced generics, and they were added to many interfaces in the java.lang package. However, Cloneable did not get generics. I wonder why? Edit: In reply to the answers of @Jon and @litb, and the comment of @Earwicker, I was thinking Cloneable might be: public interface Cloneable<T> { public T clone(); } ...
Your thought about using generics in the `Cloneable` interface is interesting and highlights the complexities involved in adding generics to existing interfaces. Let's break down the reasons why `Cloneable` was not made generic in Java. ### 1. Backward Compatibility The primary concern with changing the `Cloneable` in...
49,236
[ { "from": "human", "value": "Java 5 introduced generics, and they were added to many interfaces in the java.lang package. However, Cloneable did not get generics. I wonder why?\n\nEdit: In reply to the answers of @Jon and @litb, and the comment of @Earwicker, I was thinking Cloneable might be:\npublic inter...
I'm stumped again on how to proceed with a survey system I am working on. We have database data for matrix sytle questions (rows are various questions, columns are various answer types), where each cell needs to be able hold a different kind of control. We have a database framework for this. The problem comes with h...
Rendering a dynamic survey system that contains various types of controls for a matrix-style question can be challenging, but you have several options to approach this problem effectively. Here are a few suggestions that you might find useful: ### Option 1: Using a GridView Using a `GridView` can be a straightforward ...
49,809
[ { "from": "human", "value": "I'm stumped again on how to proceed with a survey system I am working on. We have database data for matrix sytle questions (rows are various questions, columns are various answer types), where each cell needs to be able hold a different kind of control. We have a database fram...
I want a table similar to this one, but where the user can adjust the height of the table as well as sort it. How can I do this?
To create a table that users can adjust the height of and sort, you can use HTML, CSS, and JavaScript (or a framework like jQuery). Below is a simple example to illustrate how you can implement this functionality. ### HTML Structure ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta...
46,289
[ { "from": "human", "value": "I want a table similar to this one, but where the user can adjust the height of the table as well as sort it. How can I do this?\n" }, { "from": "gpt", "value": "To create a table that users can adjust the height of and sort, you can use HTML, CSS, and JavaScript (o...
I am writing an Eclipse plug-in that loads resources from a central database. I would like to use Hibernate to access that database. So how would I add this as a dependency to my plug-in project? I've tried Google but only get hits on about plug-ins for editing Hibernate configuration files.
To use Hibernate in your Eclipse plug-in project, you'll need to add the necessary Hibernate libraries and any dependencies required for Hibernate to function. Here’s a step-by-step guide to help you integrate Hibernate into your Eclipse plug-in project: ### Step 1: Download Hibernate Libraries 1. **Download Hibernat...
44,032
[ { "from": "human", "value": "I am writing an Eclipse plug-in that loads resources from a central database. I would like to use Hibernate to access that database. \nSo how would I add this as a dependency to my plug-in project? I've tried Google but only get hits on about plug-ins for editing Hibernate confi...
I am looking in to ways to enable a site to basically have something like: http://mysite.com/en-US/index.aspx` Where the "en-US" can vary by culture.. This culture in the URL will then basically set the CurrentUICulture for the application.. Basically, we currently have a page where the user explicitly clicks it, but s...
Implementing culture-specific URLs in an ASP.NET Web Forms application (especially in an older version like 2.0) can be approached in several ways. Here's a breakdown of a few options you might consider: ### Option 1: HttpModule Creating an `HttpModule` can help you intercept requests before they reach your ASP.NET pa...
43,742
[ { "from": "human", "value": "I am looking in to ways to enable a site to basically have something like:\nhttp://mysite.com/en-US/index.aspx`\nWhere the \"en-US\" can vary by culture..\nThis culture in the URL will then basically set the CurrentUICulture for the application..\nBasically, we currently have a ...
I'm writing an utility (http://reg2run.sf.net) which in case execution without arguments works as windows application (shows OpenFileDialog, etc), otherwise - as console application. So, in first case I don't want to show a console window, that's why project is Windows Application. But in second - I need to show it, an...
To capture the standard output of the parent process when your application is running as a console application, you'll need to handle the input and output redirection differently since the standard input/output/error streams are only available if the parent process has redirected them. Since you are trying to access ...
49,268
[ { "from": "human", "value": "I'm writing an utility (http://reg2run.sf.net) which in case execution without arguments works as windows application (shows OpenFileDialog, etc), otherwise - as console application.\nSo, in first case I don't want to show a console window, that's why project is Windows Applicat...
I'm using VBA in Excel 2003 to apply validation to apply validation to a given range of cells from a named list. The user can then select from a dropdown list of values. Edit: Here's how I'm setting the validation, given a named range called 'MyLookupList' With validatedRange.Validation .Delete ...
In Excel, data validation created through named ranges or any range does not support case-sensitive validation directly. However, you can implement a workaround using VBA to enforce case sensitivity after the data validation is applied. The idea is to use the `Worksheet_Change` event to check if the value entered by ...
44,643
[ { "from": "human", "value": "I'm using VBA in Excel 2003 to apply validation to apply validation to a given range of cells from a named list. The user can then select from a dropdown list of values.\nEdit: Here's how I'm setting the validation, given a named range called 'MyLookupList'\n With validat...
I am writing a text editor for Mac OS X. I need to display hidden characters in an NSTextView (such as spaces, tabs, and special characters). I have spent a lot of time searching for how to do this but so far I have not found an answer. If anyone could point me in the right direction I would be grateful.
Displaying hidden characters in an `NSTextView` involves customizing the text rendering to include visible representations of spaces, tabs, and other whitespace characters. Below are some steps you can follow to achieve this in your macOS text editor: ### Step 1: Subclass `NSTextView` You can create a subclass of `NS...
47,619
[ { "from": "human", "value": "I am writing a text editor for Mac OS X. I need to display hidden characters in an NSTextView (such as spaces, tabs, and special characters). I have spent a lot of time searching for how to do this but so far I have not found an answer. If anyone could point me in the right d...
So I have this GIF file on my desktop (it's a 52 card deck of poker cards). I have been working on a program that cuts it up into little acm.graphics.GImages of each card. Now, however, I want to write those GImages or pixel arrays to a file so that I can use them later. I thought it would be as straight forward as wri...
To save your card images as `.gif` files from pixel arrays or `GImages` in Java, you'll need to follow a few steps. Here’s a general approach to achieve this using the Java Image I/O API and a few additional libraries if necessary. ### Steps to Save GImages or Pixel Arrays as GIF Files 1. **Extract Pixels from GImage...
49,217
[ { "from": "human", "value": "So I have this GIF file on my desktop (it's a 52 card deck of poker cards). I have been working on a program that cuts it up into little acm.graphics.GImages of each card. Now, however, I want to write those GImages or pixel arrays to a file so that I can use them later. I thoug...
I want to create a similar behavior to the data reader class but for a bespoke emailer program so that I can do the follow Dim sender As New EmailSender(emailTemplate) While sender.Send() Response.Write(sender("HTMLContent")) End While Is there an advised interface or mustInherit class to utilize the stepping functi...
To create a bespoke emailer program similar to a data reader, you can design an interface or abstract class that provides the functionality for sending emails in a stepped manner. Below is an example of how you can achieve this in VB.NET. ### Step 1: Define an Interface First, define an interface for your email sende...
45,646
[ { "from": "human", "value": "I want to create a similar behavior to the data reader class but for a bespoke emailer program so that I can do the follow\nDim sender As New EmailSender(emailTemplate)\nWhile sender.Send()\n Response.Write(sender(\"HTMLContent\"))\nEnd While\n\nIs there an advised interface or...
I have a process that requires approval from any two people out of a group of four or five. I'd like to create a task assigned to each person, and after two of those tasks are complete, delete the remaining tasks and move on with the workflow. Is there a way to create multiple tasks with a single CreateTask activity? A...
Creating a workflow that requires approval from two out of a group of four or five individuals is a common scenario. You can definitely use a combination of task management and conditional logic to achieve this. Here’s a general outline of how you might design this workflow, with answers to your specific questions: ##...
47,157
[ { "from": "human", "value": "I have a process that requires approval from any two people out of a group of four or five. I'd like to create a task assigned to each person, and after two of those tasks are complete, delete the remaining tasks and move on with the workflow.\nIs there a way to create multiple ...
I've been working on a program to read a dbf file, mess around with the data, and save it back to dbf. The problem that I am having is specifically to do with the writing portion. private const string constring = "Driver={Microsoft dBASE Driver (*.dbf)};" + "SourceType=DBF;" ...
It sounds like you were facing some significant challenges when working with DBF files, especially when it comes to writing the modified data back to the file. Given the limitations you've mentioned—particularly the absence of a primary key—this can make updating records a cumbersome task. However, writing data back to...
49,185
[ { "from": "human", "value": "I've been working on a program to read a dbf file, mess around with the data, and save it back to dbf. The problem that I am having is specifically to do with the writing portion.\n private const string constring = \"Driver={Microsoft dBASE Driver (*.dbf)};\"\n ...
How can I find poor performing SQL queries in Oracle? Oracle maintains statistics on shared SQL area and contains one row per SQL string(v$sqlarea). But how can we identify which one of them are badly performing?
Identifying poorly performing SQL queries in Oracle can be done through a variety of methods, leveraging Oracle's tools and views. Here are some steps and techniques you can use: ### 1. Use the V$SQL and V$SQLAREA Views These views contain performance statistics for SQL statements currently in the shared SQL area. **...
49,444
[ { "from": "human", "value": "How can I find poor performing SQL queries in Oracle?\nOracle maintains statistics on shared SQL area and contains one row per SQL string(v$sqlarea).\nBut how can we identify which one of them are badly performing?\n" }, { "from": "gpt", "value": "Identifying poorly ...
I want to write my own little chat server in C on a MacOS machine. Now I want to connect to all clients, that are online and let the connection open, to be able to receive and send messages. The problem is that I only know, how to have one socket connection at a time open. So only one client can connect so far and chat...
Creating a chat server that can handle multiple clients simultaneously in C can be achieved using sockets and the `select()` system call (or `poll()` or `epoll()` on Linux). This way, you can manage multiple connections at the same time. Here’s a simplified approach to get you started with a chat server on macOS. ### ...
45,686
[ { "from": "human", "value": "I want to write my own little chat server in C on a MacOS machine. Now I want to connect to all clients, that are online and let the connection open, to be able to receive and send messages. The problem is that I only know, how to have one socket connection at a time open. So on...
I have a problem with a oneway web method that open a moss site (probably because in a oneway webmethod the context is null) Is possible to rewrite this code to remove the null reference exception? (without the oneway attribute i don't have the exception) [SoapDocumentMethod(OneWay = true)] [WebMethod(Descript...
In ASP.NET Web Services, marking a method with the `OneWay` attribute indicates that the method is asynchronous and does not return a response to the caller. This means that any exceptions thrown during the processing of the request cannot be sent back to the client. However, using `OneWay` can also cause issues when y...
45,860
[ { "from": "human", "value": "I have a problem with a oneway web method that open a moss site (probably because in a oneway webmethod the context is null)\nIs possible to rewrite this code to remove the null reference exception? (without the oneway attribute i don't have the exception)\n[SoapDocumentMethod(...
I want to perform integration testing of my webservices before shipping them out and am wondering if anyone can point out some tools for performing these tests automatically? I have both ASMX webservices as well as a few WCF ones. I want to be able to add this as a task to my build scripts and execute automatically if ...
Integration testing for web services is a crucial step to ensure that your services function correctly when integrated with other components or systems. There are several tools and frameworks that can help you perform these tests automatically. Since you are working with both ASMX and WCF web services, here are some re...
47,217
[ { "from": "human", "value": "I want to perform integration testing of my webservices before shipping them out and am wondering if anyone can point out some tools for performing these tests automatically?\nI have both ASMX webservices as well as a few WCF ones.\nI want to be able to add this as a task to my ...
I saw a potential answer here but that was for YYYY-MM-DD: JavaScript date validation I modified the code code above for MM-DD-YYYY like so but I still can't get it to work: String.prototype.isValidDate = function() { var IsoDateRe = new RegExp("^([0-9]{2})-([0-9]{2})-([0-9]{4})$"); var matches = IsoDateRe.e...
To modify your date validation function for both formats `MM-DD-YYYY` and `MM/DD/YYYY`, you'll need to adjust the regular expression to account for both delimiters (either `-` or `/`). Here’s a version of your function that accommodates both formats: ```javascript String.prototype.isValidDate = function() { // Reg...
48,642
[ { "from": "human", "value": "I saw a potential answer here but that was for YYYY-MM-DD: JavaScript date validation\nI modified the code code above for MM-DD-YYYY like so but I still can't get it to work:\nString.prototype.isValidDate = function() \n{\n var IsoDateRe = new RegExp(\"^([0-9]{2})-([0-9]{2})...
does anybody know how to save and retrieve files in MS SQL-Server 2000? I guess the image data type could be used as a container. I want to import/export the following file types: DOC, XLS, PDF, BMP, TIFF, etc. Due to resource issues we are using MS-Access 2007 as the front end, so I am looking for VBA code. Thanks in...
Yes, you can use the `IMAGE` data type in MS SQL Server 2000 to store binary files such as DOC, XLS, PDF, BMP, TIFF, etc. Below is a step-by-step guide on how to save and retrieve files using VBA in MS Access as the front end. ### Step 1: Create a Table in SQL Server First, create a table to store your files. For exa...
49,201
[ { "from": "human", "value": "does anybody know how to save and retrieve files in MS SQL-Server 2000? I guess the image data type could be used as a container.\nI want to import/export the following file types: DOC, XLS, PDF, BMP, TIFF, etc.\nDue to resource issues we are using MS-Access 2007 as the front e...
I've written a PHP script that handles file downloads, determining which file is being requested and setting the proper HTTP headers to trigger the browser to actually download the file (rather than displaying it in the browser). I now have a problem where some users have reported certain files being identified incorre...
It looks like you've put a good deal of thought into your PHP file download script, but there are a couple of points that can help with both the MIME type issues and the perceived delay when downloading files. Let's address each concern in turn. ### 1. MIME Types To avoid issues where the browser incorrectly identifi...
48,976
[ { "from": "human", "value": "I've written a PHP script that handles file downloads, determining which file is being requested and setting the proper HTTP headers to trigger the browser to actually download the file (rather than displaying it in the browser).\nI now have a problem where some users have repor...
I have a python fuse project based on the Xmp example in the fuse documentation. I have included a small piece of the code to show how this works. For some reason get_file does get called and the class gets created, but instead of fuse calling .read() on the class from get_file (file_class) fuse keeps calling Dstorage....
It looks like you are dealing with a FUSE implementation in Python and encountering issues with the `get_file` method not behaving as expected. Specifically, instead of calling the custom read method of the file class instantiated in `get_file`, FUSE is defaulting to call `Dstorage.read()`. You've mentioned that you r...
47,521
[ { "from": "human", "value": "I have a python fuse project based on the Xmp example in the fuse documentation. I have included a small piece of the code to show how this works. For some reason get_file does get called and the class gets created, but instead of fuse calling .read() on the class from get_file ...
I have some tables that represent various types. They usually just consist of an ID (int), and a name. Ideally I would have this in an enum. Is there a way to map a table like this onto an enum? EDIT: How would I handle it if there were extra fields other than an ID and Name?
Yes, you can map a database table to an enum in programming, but the implementation can vary based on the programming language you're using. Enums in languages like Java, C#, or TypeScript are typically used for a fixed set of constants and don't usually have the concept of directly retrieving values from a database. H...
46,040
[ { "from": "human", "value": "I have some tables that represent various types. They usually just consist of an ID (int), and a name. Ideally I would have this in an enum. Is there a way to map a table like this onto an enum?\nEDIT: How would I handle it if there were extra fields other than an ID and Name?\n...
Are there any known how-tos or best practices for web service REST API versioning? I have noticed that AWS does versioning by the URL of the endpoint. Is this the only way or are there other ways to accomplish the same goal? If there are multiple ways, what are the merits of each way?
Yes, there are several established practices for versioning REST APIs, and you're correct that AWS and many other services use versioning in the URL. Here are the most common approaches, along with their merits and drawbacks: ### 1. **URL Versioning** - **Description:** The API version is included in the URL path. ...
49,650
[ { "from": "human", "value": "Are there any known how-tos or best practices for web service REST API versioning?\nI have noticed that AWS does versioning by the URL of the endpoint. Is this the only way or are there other ways to accomplish the same goal? If there are multiple ways, what are the merits of ea...
I want to write a crawler to do some inventory of infrastructure (routers, WAPS, systems, etc) So I understand a crawler, implementing is a different story. So I have an app sitting on a server and how do I deploy it. How does the crawler start looking? Say I wanted to inventory unknown subnets, etc? How does the crawl...
Creating a crawler for inventorying network infrastructure involves several key components: network discovery, data collection, data transmission, and possibly data storage and visualization. Here’s a step-by-step guide to help you get started: ### Step 1: Define Objectives 1. **Determine Inventory Scope**: Identify w...
48,150
[ { "from": "human", "value": "I want to write a crawler to do some inventory of infrastructure (routers, WAPS, systems, etc)\nSo I understand a crawler, implementing is a different story.\nSo I have an app sitting on a server and how do I deploy it. How does the crawler start looking? Say I wanted to invento...
I would like to use c:import or c:url to grab the contents of a page (adserver). In addition, I need to specify a timeout, and if the call either times out or the page is not accessible I need some default text to be returned as my value. Is there a jstl tag lib to do this? Or do I need to create my own?
JSTL (JavaServer Pages Standard Tag Library) does not provide built-in tags for handling timeouts or directly fetching the content from a remote URL with error handling capabilities. The `c:import` and `c:url` tags are primarily used for importing content and creating URLs, respectively, but they lack advanced features...
46,125
[ { "from": "human", "value": "I would like to use c:import or c:url to grab the contents of a page (adserver). In addition, I need to specify a timeout, and if the call either times out or the page is not accessible I need some default text to be returned as my value.\nIs there a jstl tag lib to do this? Or ...
I have been hearing and reading about Agile for years. I own a book or two on it and I like the idea. I am finally in a position where I could roll something like this out where I work, but I have serious concerns about whether it's the way to go for us: Isn't there a minimum size for this? Big design up front must be...
Hi Brian, You've raised some valid concerns and considerations about implementing Agile methodologies in your organization, especially given your unique context. Let's address your points one by one. ### Minimum Size for Agile Agile isn't limited to large projects; it's actually designed to handle projects of varying...
43,256
[ { "from": "human", "value": "I have been hearing and reading about Agile for years. I own a book or two on it and I like the idea.\nI am finally in a position where I could roll something like this out where I work, but I have serious concerns about whether it's the way to go for us:\n\nIsn't there a minimu...
I have an ASP.NET web application hosted on DiscountASP.NET with its domain name registered on GoDaddy. This site is working perfectly and runs great, but I hate the domain name. So now, I decide to purchase a domain name I like better. How do I set it up so that this domain name runs the same web app as my original ...
To set up your new domain name so that it runs the same ASP.NET web application hosted on DiscountASP.NET without redirecting from your old domain, you'll need to follow a series of steps involving both your domain registrar (GoDaddy) and your hosting provider (DiscountASP.NET). Here’s a step-by-step guide: ### Step 1...
40,605
[ { "from": "human", "value": "I have an ASP.NET web application hosted on DiscountASP.NET with its domain name registered on GoDaddy. This site is working perfectly and runs great, but I hate the domain name.\nSo now, I decide to purchase a domain name I like better. How do I set it up so that this domain ...
I'm working with an application that logs to Windows Application Log regularly (viewable through the Event Viewer administrative tool), and I'm looking for a way to back it up on a daily basis. This is important because we sometimes discover a problem with the application - and to investigate further we need informatio...
Backing up the Windows Application Log on a daily basis can be accomplished using a batch file combined with Windows Task Scheduler. Below are the steps to set this up: ### Step 1: Create a Batch File to Export the Event Log 1. Open a text editor like Notepad. 2. Copy and paste the following command into the text edi...
48,391
[ { "from": "human", "value": "I'm working with an application that logs to Windows Application Log regularly (viewable through the Event Viewer administrative tool), and I'm looking for a way to back it up on a daily basis. This is important because we sometimes discover a problem with the application - and ...
I have a digital certificate that identifies a user. I need to use it to Digitally sign pdf files. Does anyone have an example that does not uses a third party component? I need to get this done but it would be nice to fully understand how things are done. C# Examples please :)
To digitally sign PDF files in C# without using a third-party component, you'll typically need to work with the PDF file format at a low level. While creating your own implementation from scratch is possible, it’s quite complex and involves a deep understanding of PDF file structure, cryptography, and handling X.509 ce...
49,822
[ { "from": "human", "value": "I have a digital certificate that identifies a user. I need to use it to Digitally sign pdf files.\nDoes anyone have an example that does not uses a third party component? I need to get this done but it would be nice to fully understand how things are done.\nC# Examples please :...
I was wondering if there's any way to change the behavior of the .NET JIT compiler, by specifying a preference for more in-depth optimizations. Failing that, it would be nice if it could do some kind of profile-guided optimization, if it doesn't already.
In .NET, the Just-In-Time (JIT) compiler performs a series of optimizations to improve the performance of your applications. While you don't have direct control over the JIT compiler's optimizations in a granular manner like you might with a C/C++ compiler, there are several options and approaches you can consider to i...
11,483
[ { "from": "human", "value": "I was wondering if there's any way to change the behavior of the .NET JIT compiler, by specifying a preference for more in-depth optimizations. Failing that, it would be nice if it could do some kind of profile-guided optimization, if it doesn't already.\n" }, { "from":...
I'm trying to find out where a BerkeleyDB PPM is for ActivePerl 5.10. Anyone have a clue where to find this, or how to build it? I had found a lead here. They claim BerkeleyDB 0.33 had built ok for Perl 5.10. They provide a link to the PPM, but not to the supporting zip file. So I got around it, manually getting the pp...
Building a BerkeleyDB PPM for ActivePerl 5.10 can be a bit of a challenge, especially since binary compatibility can be tricky with different compilers and platforms. Here are some steps you can follow to help you with this process: ### 1. Download BerkeleyDB Source You can download the source code for BerkeleyDB from...
49,761
[ { "from": "human", "value": "I'm trying to find out where a BerkeleyDB PPM is for ActivePerl 5.10. Anyone have a clue where to find this, or how to build it?\nI had found a lead here. They claim BerkeleyDB 0.33 had built ok for Perl 5.10. They provide a link to the PPM, but not to the supporting zip file. S...
A Session is per browser (determined via cookies), but when does an "Application" start, and end, and how does IIS know know when a request is a part of the same same "Application" instance (if not done via cookies the same way that sessions are)?
In the context of ASP.NET applications hosted on Internet Information Services (IIS), the concepts of "Session" and "Application" are quite distinct and relate to different scopes of state management. ### Application Lifecycle 1. **Start of an Application**: - An ASP.NET application starts when the first request i...
49,985
[ { "from": "human", "value": "A Session is per browser (determined via cookies), but when does an \"Application\" start, and end, and how does IIS know know when a request is a part of the same same \"Application\" instance (if not done via cookies the same way that sessions are)?\n" }, { "from": "gp...
Is it possible to mix all these access controls in one site? I have a requirement saying a) Users from the AD must be allowed access, using integrated security b) Users from some other AD must be allowed access; potentially by logging in c) Users not in the AD's should be able to create a new account on the site. ...
Yes, it is possible to implement a system that combines multiple access controls as you've described. To achieve this in a way that abstracts the authentication process so that the site does not need to care about the source of authentication, you can consider the following approach: ### 1. Use a Central Authenticatio...
47,488
[ { "from": "human", "value": "Is it possible to mix all these access controls in one site?\nI have a requirement saying \n\na) Users from the AD must be allowed\naccess, using integrated security \nb) Users from some other AD must be\nallowed access; potentially by\nlogging in \nc) Users not in the AD's\nsh...
I am currently testing with Silverlight 2.0 Beta 2, and my goal is to define a resource element once and then reuse it many times in my rendering. This simple example defines a rectangle (myRect) as a resource and then I attempt to reuse it twice -- which fails with the error: Attribute {StaticResource myRect} value i...
The issue you're experiencing with Silverlight 2.0 Beta 2 stems from the fact that, unlike WPF, Silverlight does not allow you to reuse certain types of resources in the way you are trying to do so. In this case, the `RectangleGeometry` you're defining as a resource cannot be shared between multiple `Path` elements. W...
8,974
[ { "from": "human", "value": "I am currently testing with Silverlight 2.0 Beta 2, and my goal is to define a resource element once and then reuse it many times in my rendering. This simple example defines a rectangle (myRect) as a resource and then I attempt to reuse it twice -- which fails with the error:\...
I am grouping using a formula fCity which goes like this If {X.MailingCity} > "" Then {X.MailingCity} Else {X.City} I have two different fields in my view (Home City and Mailing City) Now, these fields contain many rural communities and in my report I want to have these smaller rural communities included with the major...
It sounds like you're trying to group cities in your report based on whether the mailing city is available, and if not, use the city field as a fallback. You also want to include rural communities under their corresponding major cities, but you’re running into issues where some communities are ending up in an "OTHER" c...
46,516
[ { "from": "human", "value": "I am grouping using a formula fCity which goes like this\nIf {X.MailingCity} > \"\" Then\n{X.MailingCity}\nElse\n{X.City}\nI have two different fields in my view (Home City and Mailing City)\nNow, these fields contain many rural communities and in my report I want to have these ...
what's the best practice for creating test persistence layers when doing an ASP.NET site (eg. ASP.NET MVC site)? Many examples I've seen use Moq (or another mocking framework) in the unit test project, but I want to, like .. moq out my persistence layer so that my website shows data and stuff, but it's not coming from ...
Creating a test persistence layer for an ASP.NET MVC application can be achieved through a few common practices. You're already on the right track with your fake repository and dependency injection (DI). Below are several approaches and best practices that you can adopt for creating a persistence layer that doesn’t rel...
44,937
[ { "from": "human", "value": "what's the best practice for creating test persistence layers when doing an ASP.NET site (eg. ASP.NET MVC site)?\nMany examples I've seen use Moq (or another mocking framework) in the unit test project, but I want to, like .. moq out my persistence layer so that my website shows...
I have the need/desire to learn to program against Win32 in C++. I am a little confused as to what Win32 even is, as I have no experience on the platform. What would you recommend to get me started programming and debugging C++ programs on Win32?
Getting started with Win32 programming in C++ can be an exciting journey! Win32 is a Windows API (Application Programming Interface) that allows developers to create applications that run natively on Windows operating systems. Here's a step-by-step guide to help you get started: ### Step 1: Set Up Your Development Env...
45,653
[ { "from": "human", "value": "I have the need/desire to learn to program against Win32 in C++. I am a little confused as to what Win32 even is, as I have no experience on the platform. \nWhat would you recommend to get me started programming and debugging C++ programs on Win32?\n" }, { "from": "gpt",...
I think the question says it all. I have several monthly processes in stored procedures which take anywhere from a minute to an hour. If I declare them WITH RECOMPILE, an execution plan will be generated each time. If the underlying indexes or statistics or views are changed by the DBA, I don't want anyone to have to...
Using `WITH RECOMPILE` in your stored procedures can be beneficial in certain scenarios, especially when dealing with parameter sensitivity and when you anticipate that the optimal execution plan may change frequently due to updates in the underlying data or schema. However, there are important considerations regarding...
46,843
[ { "from": "human", "value": "I think the question says it all. I have several monthly processes in stored procedures which take anywhere from a minute to an hour. If I declare them WITH RECOMPILE, an execution plan will be generated each time.\nIf the underlying indexes or statistics or views are changed ...
I'm looking for a library in Python which will provide at and cron like functionality. I'd quite like have a pure Python solution, rather than relying on tools installed on the box; this way I run on machines with no cron. For those unfamiliar with cron: you can schedule tasks based upon an expression like: 0 2 * * 7...
If you're looking for a way to schedule Python functions with flexibility similar to cron without relying on external tools, there are several libraries that can help you achieve that. Here are a few popular ones: ### 1. APScheduler [APScheduler](https://apscheduler.readthedocs.io/en/stable/) is a powerful and flexib...
46,712
[ { "from": "human", "value": "I'm looking for a library in Python which will provide at and cron like functionality.\nI'd quite like have a pure Python solution, rather than relying on tools installed on the box; this way I run on machines with no cron.\nFor those unfamiliar with cron: you can schedule tasks...
I am considering adding validation on some insert and update statements for MS SQL Server 2005. I want to be able to check the values inserted before it is written into the table - in this particular case, it is an integer field where the data must conform to a rule. So a simple schema could be: ([id] [int] identity(1,...
In SQL Server, if you need to validate the values being inserted or updated in a table, there are a couple of options available to you: **CHECK constraints** and **triggers**. Each has its strengths and weaknesses, and the right choice depends on your specific requirements. Below, I'll outline both methods, with an exa...
49,037
[ { "from": "human", "value": "I am considering adding validation on some insert and update statements for MS SQL Server 2005.\nI want to be able to check the values inserted before it is written into the table - in this particular case, it is an integer field where the data must conform to a rule.\nSo a simp...
I need to delete a regsitry key. It has a deny ACL on Set Value (I need this permission to delete it). How do I change the ACLs in C++?
To change the Access Control List (ACL) of a registry key in C++, you can use the Windows API functions provided in the `advapi32.lib` library. Specifically, you will need to use functions like `RegOpenKeyEx`, `RegSetKeySecurity`, and `SetSecurityInfo`. Below are the steps and example code demonstrating how to change ...
49,543
[ { "from": "human", "value": "I need to delete a regsitry key. It has a deny ACL on Set Value (I need this permission to delete it).\nHow do I change the ACLs in C++?\n" }, { "from": "gpt", "value": "To change the Access Control List (ACL) of a registry key in C++, you can use the Windows API fun...
Is this ... T1 join T2 using(ID) where T2.VALUE=42 ... the same as ... T1 join T2 on(T1.ID=T2.ID) where T2.VALUE=42 ... for all types of joins? My understanding of using(ID) is that it's just shorthand for on(T1.ID=T2.ID). Is this true? Now for another question: Is the above the same as ... T1 join T2 on(T1.ID=T2.I...
Let's break down your questions regarding SQL joins and conditions. ### 1. `USING` vs `ON`: You are correct in your understanding that `USING(ID)` is shorthand for `ON(T1.ID = T2.ID)` in SQL. The `USING` clause is used when the two tables being joined have a column with the same name, and it simplifies the syntax. Wh...
49,095
[ { "from": "human", "value": "Is this\n... T1 join T2 using(ID) where T2.VALUE=42 ...\n\nthe same as\n... T1 join T2 on(T1.ID=T2.ID) where T2.VALUE=42 ...\n\nfor all types of joins?\nMy understanding of using(ID) is that it's just shorthand for on(T1.ID=T2.ID). Is this true?\n\nNow for another question:\nIs...
Whats the best practice to test an Asp.net MVC application?
Testing an ASP.NET MVC application involves various strategies and practices that ensure your application is robust, reliable, and maintainable. Here are some of the best practices for testing an ASP.NET MVC application: ### 1. **Unit Testing** - **Use a Testing Framework**: Use frameworks like xUnit, NUnit, or MSTes...
49,102
[ { "from": "human", "value": "Whats the best practice to test an Asp.net MVC application?\n" }, { "from": "gpt", "value": "Testing an ASP.NET MVC application involves various strategies and practices that ensure your application is robust, reliable, and maintainable. Here are some of the best pra...
In Java 1.4 you could use ((SunToolkit) Toolkit.getDefaultToolkit()).getNativeWindowHandleFromComponent() but that was removed. It looks like you have to use JNI to do this now. Do you have the JNI code and sample Java code to do this? I need this to call the Win32 GetWindowLong and SetWindowLong API calls, which can b...
To obtain the native window handle from a `JFrame` or `JDialog` in Java using JNI, you will indeed have to write a JNI interface that interacts with the native Windows API. Below, I'll provide a simplified example of how you can do this. Note that this example assumes you are working on Windows and have the necessary e...
48,903
[ { "from": "human", "value": "In Java 1.4 you could use ((SunToolkit) Toolkit.getDefaultToolkit()).getNativeWindowHandleFromComponent() but that was removed.\nIt looks like you have to use JNI to do this now. Do you have the JNI code and sample Java code to do this?\nI need this to call the Win32 GetWindowLo...
I'm looking for a quick start or template, or something, to get a web site's basic layout done quickly and looking fairly professional, and then let me do the coding. I don't want a CMS, as this is for a highly customised reporting application, but I need something like frame header and two columns and frame footer. ...
Certainly! To create a basic layout for a web application with a header, two columns (a left sidebar for navigation and a right main area for reports), and a footer, you can use simple HTML and CSS. Below is a template that you can use as a starting point for your application. ### Basic HTML Structure ```html <!DOCTYP...
47,900
[ { "from": "human", "value": "I'm looking for a quick start or template, or something, to get a web site's basic layout done quickly and looking fairly professional, and then let me do the coding. I don't want a CMS, as this is for a highly customised reporting application, but I need something like frame h...
I have a Hash like this { 55 => {:value=>61, :rating=>-147}, 89 => {:value=>72, :rating=>-175}, 78 => {:value=>64, :rating=>-155}, 84 => {:value=>90, :rating=>-220}, 95 => {:value=>39, :rating=>-92}, 46 => {:value=>97, :rating=>-237}, 52 => {:value=>73, :rating=>-177}, 64 => {:value=>69, :rating=>-167}, ...
You can easily sort a hash in Ruby by a specific value, such as `:rating` in your case. Here's how you can do it: ### Sorting the Hash by `:rating` You can use the `sort_by` method to sort the hash based on the `:rating` values. Here's an example of how you can do that: ```ruby hash = { 55 => {:value => 61, :ratin...
49,891
[ { "from": "human", "value": "I have a Hash like this\n{ 55 => {:value=>61, :rating=>-147},\n 89 => {:value=>72, :rating=>-175},\n 78 => {:value=>64, :rating=>-155},\n 84 => {:value=>90, :rating=>-220},\n 95 => {:value=>39, :rating=>-92},\n 46 => {:value=>97, :rating=>-237},\n 52 => {:value=>73, :ratin...
Example: The user login to the webpage => Click on a button This action starts the executable "CreatePrettyPicture" The file "prettypicture.jpg" is created on the server When the user reloads the page the pretty picture "PrettyPicture.jpg" is shown on the page. If I could start the application with a parameter it wou...
To implement the desired functionality, you will need to set up a simple web application that allows users to trigger the "CreatePrettyPicture" executable from their browser. Below are the steps you'll need to follow to achieve this setup on your Debian server with Apache. ### Step 1: Install Required Packages Make s...
48,677
[ { "from": "human", "value": "Example:\nThe user login to the webpage => Click on a button \nThis action starts the executable \"CreatePrettyPicture\" \nThe file \"prettypicture.jpg\" is created on the server\nWhen the user reloads the page the pretty picture \"PrettyPicture.jpg\" is shown on the page.\nIf I...
I was reading a review of the new Intel Atom 330, where they noted that Task Manager shows 4 cores - two physical cores, plus two more simulated by Hyperthreading. Suppose you have a program with two threads. Suppose also that these are the only threads doing any work on the PC, everything else is idle. What is the pro...
The probability of the operating system (OS) placing both threads on the same core in a hyperthreading scenario depends on how the OS scheduler is designed and the state of the system. In the context of a dual-core processor with hyperthreading, you have two physical cores, each capable of running two threads (one for ...
44,727
[ { "from": "human", "value": "I was reading a review of the new Intel Atom 330, where they noted that Task Manager shows 4 cores - two physical cores, plus two more simulated by Hyperthreading.\nSuppose you have a program with two threads. Suppose also that these are the only threads doing any work on the PC...
I'm looking into the idea of rolling out the web-based SSRS Report Builder to our end users to allow them to create their own reports against our production application databases. From what I have seen so far, this tool is easier to use than the VS Biz Intel Studio report designer, plus it is easier to install, and de...
Rolling out a web-based SSRS Report Builder to end users can be a great way to empower them to create their own reports and reduce the burden on your IT or reporting teams. However, there are several considerations and potential pitfalls you should be aware of when granting users this level of access and flexibility. H...
46,276
[ { "from": "human", "value": "I'm looking into the idea of rolling out the web-based SSRS Report Builder to our end users to allow them to create their own reports against our production application databases. From what I have seen so far, this tool is easier to use than the VS Biz Intel Studio report desig...
I place using namespace in a view code behind but i can't call any class of this name space in aspx. In codebehind: using MVCTest.Controller;
When you declare a namespace with `using` in the code-behind of an ASP.NET Web Forms page (the `.aspx.cs` file), it allows you to use that namespace within the code-behind file. However, if you want to access classes from that namespace directly in your `.aspx` file, you have to use a different approach. Here’s how yo...
46,946
[ { "from": "human", "value": "I place using namespace in a view code behind but i can't call any class of this name space in aspx.\nIn codebehind:\nusing MVCTest.Controller;\n\n" }, { "from": "gpt", "value": "When you declare a namespace with `using` in the code-behind of an ASP.NET Web Forms pag...
I am working in C# and have the need to capture individual frames of video files. As quickly as possible (faster than real-time), I wish to seek to a specific frame number and capture every nth frame to a graphic file format such as BMP or JPEG. It is highly desired that the frame that is captured be predictable and ...
For capturing individual frames from video files in a C# environment, there are several libraries that can help you achieve your goal of extracting frames quickly, predictably, and without the need for a user interface. Here are some options: ### 1. **FFmpeg with FFmpeg.AutoGen** FFmpeg is a powerful multimedia framew...
49,658
[ { "from": "human", "value": "I am working in C# and have the need to capture individual frames of video files. As quickly as possible (faster than real-time), I wish to seek to a specific frame number and capture every nth frame to a graphic file format such as BMP or JPEG. It is highly desired that the f...
I'm getting a strange effect in Jena 2.5.5 (on Linux) where I am playing around with the inference API. The following code is a stripped down version. I am creating an initially empty Model and a generic rule reasoner. I add a reflexivity rule for a certain statement. I attach the reasoner to the model to get an InfMod...
The behavior you're encountering with Jena 2.5.5, where the inference model does not seem to properly apply the rules until you output it to the console, is likely related to the lazy evaluation strategy used by Jena's inference engines. In Jena, when you create an `InfModel`, the rules are not immediately applied to...
47,526
[ { "from": "human", "value": "I'm getting a strange effect in Jena 2.5.5 (on Linux) where I am playing around with the inference API. The following code is a stripped down version. I am creating an initially empty Model and a generic rule reasoner. I add a reflexivity rule for a certain statement. I attach t...
I have the following two fields on my web page: BookAuthor and BookDescription. On submit, the page searches against Lucene index using the given search criteria. If the user does not type in anything in the two fields and submits the page, how do I make Lucene.Net return all the books from my index irrespective of Bo...
To allow a search that returns all books in your Lucene.Net index when no search criteria are provided (i.e., the user leaves the `BookAuthor` and `BookDescription` fields empty), you can handle this case in your search logic. ### Steps to Implement: 1. **Check Input Fields**: Before constructing your query, check i...
45,599
[ { "from": "human", "value": "I have the following two fields on my web page: BookAuthor and BookDescription. On submit, the page searches against Lucene index using the given search criteria.\nIf the user does not type in anything in the two fields and submits the page, how do I make Lucene.Net return all ...
When I go over a text document ,I divide the content into different categories by highlighting sentences with different colors. I would like to have the ability to create a set of categories , and then go over the text and mark a sentence and assign it to one of the categories. and then have the option to see a filtere...
In Microsoft Office and OpenOffice, there are some basic capabilities that can help you categorize and filter text, but neither offers a built-in feature that exactly matches the description of your use case out of the box. Here's an overview of the capabilities of both applications, along with potential solutions or w...
48,430
[ { "from": "human", "value": "When I go over a text document ,I divide the content into different categories by highlighting sentences with different colors.\nI would like to have the ability to create a set of categories , and then go over the text and mark a sentence and assign it to one of the categories....
I am thinking hard about how to play with access rights on several platforms. Now I am reaching Microsoft Windows and permissions on NTFS files/directories. I must say that I am working in C language. My question is pretty general. I have a username and a file path. Do I need more information to check if the user has t...
To check if a user has the right to read, write, or execute a file in an NTFS file system on Windows using C, you would generally rely on Access Control Lists (ACLs). ACLs provide a granular way to manage permissions and are the standard way of implementing security in Windows file systems. ### Key Information Needed ...
45,280
[ { "from": "human", "value": "I am thinking hard about how to play with access rights on several platforms. Now I am reaching Microsoft Windows and permissions on NTFS files/directories.\nI must say that I am working in C language. My question is pretty general. I have a username and a file path.\nDo I need ...
I have a draggable div that represents a little info popup that the user can drag around the screen. But this div is anchored to a point on the screen, and I would like there to be a caret drawn between the div and the point that it is anchored to. An example of this can be found on Google maps, when you hover over a ...
Creating a draggable info popup with a caret pointing to an anchor point can be achieved in various ways. Instead of using a series of caret images, which can indeed complicate the implementation, you might want to consider using CSS and SVG. This allows for more flexibility and a cleaner solution that adapts dynamical...
46,084
[ { "from": "human", "value": "I have a draggable div that represents a little info popup that the user can drag around the screen. But this div is anchored to a point on the screen, and I would like there to be a caret drawn between the div and the point that it is anchored to.\nAn example of this can be fo...
I have an xml file which I would like to create a form/table around to add, edit and delete records using PHP. Currently I use simpleXML to load the XML file, and display its content on various pages. Is there any way I can create a table that shows all results, and allows me to either edit or delete that particular r...
Creating a system to manage XML records using PHP and SimpleXML can be accomplished with a few steps. Below is a simplified version that allows you to display, edit, and delete records from an XML file. ### Step 1: XML File Structure Let’s assume your XML file (`data.xml`) looks like this: ```xml <records> <rec...
48,936
[ { "from": "human", "value": "I have an xml file which I would like to create a form/table around to add, edit and delete records using PHP. Currently I use simpleXML to load the XML file, and display its content on various pages.\nIs there any way I can create a table that shows all results, and allows me ...
i been thinking of a new programming language. Before trying to implement it i would like to check the syntax of code to see if there is much ambiguity. (i find it funny that its possibly to do var++++ to a class)
Creating a new programming language is an exciting endeavor! Syntax design is a critical part of language development and can greatly affect both the usability and readability of the language. To analyze the potential ambiguity in your syntax, you can follow several steps: ### 1. **Define Your Syntax Clearly:** - W...
47,377
[ { "from": "human", "value": "i been thinking of a new programming language. Before trying to implement it i would like to check the syntax of code to see if there is much ambiguity. (i find it funny that its possibly to do var++++ to a class)\n" }, { "from": "gpt", "value": "Creating a new progr...
How would I go about implementation the queries required for pagination? Basically, when page 1 is requested, get the first 5 entries. For page 2, get the next 5 and so on. I plan to use this via the couchdb-python module, but that shouldn't make any difference to the implementation.
Implementing pagination in CouchDB involves querying a database to retrieve a specific subset of documents based on the requested page and the number of entries per page. Since CouchDB is a document-oriented NoSQL database, you will typically retrieve documents in a way that emulates traditional pagination. Here's how...
49,770
[ { "from": "human", "value": "How would I go about implementation the queries required for pagination?\nBasically, when page 1 is requested, get the first 5 entries. For page 2, get the next 5 and so on.\nI plan to use this via the couchdb-python module, but that shouldn't make any difference to the implemen...
We are trying to populate a domain object from an oracle 10g database. The field in question is defined as a string in the domain object with the following constraints. zdata(blank:false,maxSize:3000000) The size of the data is approximately 70K of XML. The table definition looks like this: ZDATA ...
The Null Pointer Exception (NPE) you are encountering when attempting to retrieve data from the Oracle 10g database using the Grails framework can be due to several factors, especially considering that you are working with a `LONG` column type in Oracle. Here are some potential solutions and workarounds you can explore...
49,277
[ { "from": "human", "value": "We are trying to populate a domain object from an oracle 10g database. The field in question is defined as a string in the domain object with the following constraints.\nzdata(blank:false,maxSize:3000000)\nThe size of the data is approximately 70K of XML.\nThe table definition ...
How can I make a SQL Compact 2008 application for the desktop? I know how to connect to a .SDF file with SQL Management Studio 2008, but I can't figure out how to connect to it with my app. I have seen tutorials about this and I can see in the C# code they are referencing some special namespaces, but I can't seem to ...
Creating a SQL Server Compact 2008 application in C# involves several steps, including setting up the project, adding the required references, and writing the necessary code to connect to and interact with the .SDF file. Here’s a detailed guide to help you get started: ### Step 1: Install SQL Server Compact 3.5 Ensur...
29,077
[ { "from": "human", "value": "How can I make a SQL Compact 2008 application for the desktop? I know how to connect to a .SDF file with SQL Management Studio 2008, but I can't figure out how to connect to it with my app. I have seen tutorials about this and I can see in the C# code they are referencing some...
I was using an mxml class but since i need to pass some properties at construction time, to make it easier i will convert it to as3 code. The class is RectangleShape and it just draws a rectangle. Original mxml working <?xml version="1.0" encoding="utf-8"?> <BaseShape name="rectangle" xmlns="org.edorado.edoboard.vi...
Your conversion from MXML to ActionScript 3 (AS3) has a few issues that might prevent the rectangle from rendering properly. Here are some suggestions to fix the problems: 1. **Add the Surface to the Display List:** You are currently adding the `Surface` object to the `RectangleShape`, but you are not drawing anything...
45,432
[ { "from": "human", "value": "I was using an mxml class but since i need to pass some properties at construction time, to make it easier i will convert it to as3 code.\nThe class is RectangleShape and it just draws a rectangle.\nOriginal mxml working\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<BaseShape na...
is it possible to Post or Get the input data to a site by using objective C in iphone application,for example in HTML create a form it collect the input data from user and post to the server site
Yes, it is absolutely possible to send data to a server using Objective-C in an iPhone application. You can achieve this by making HTTP POST or GET requests using the `NSURLSession` API, which is the modern way to handle network requests in iOS. Here's a basic example of how you could implement this. This example assu...
49,555
[ { "from": "human", "value": "is it possible to Post or Get the input data to a site by using objective C in iphone application,for example in HTML create a form it collect the input data from user and post to the server site\n" }, { "from": "gpt", "value": "Yes, it is absolutely possible to send...
Hi I'm trying to fix a bit of test html to work with opera/chrome. It's using the holygrail box model from matt levine. In IE and firefox it looks like correct layout http://img187.imageshack.us/img187/4049/writedn1.jpg In chrome, opera and safari it pushes the sidebar element down. I've played with the margin and pad...
The problem you're encountering with the layout in Chrome and other browsers (aside from IE and Firefox) is likely due to how different browsers handle CSS, particularly with floats and positioning. The "Holy Grail" layout is a classic example that can be tricky to implement consistently across all browsers, especially...
48,602
[ { "from": "human", "value": "Hi I'm trying to fix a bit of test html to work with opera/chrome. It's using the holygrail box model from matt levine. \nIn IE and firefox it looks like\ncorrect layout http://img187.imageshack.us/img187/4049/writedn1.jpg\nIn chrome, opera and safari it pushes the sidebar eleme...
Is it possible to log certain events to -> event log for example, while others to -> file trace listener, while others still to -> SQL database. I want to be able to configure this somewhere so errors go to text, verbose information goes to SQL, and warnings go to (event viewer and text). Is this type of thing possib...
Yes, it is indeed possible to configure logging in such a way that different types of events (errors, warnings, verbose information) are directed to different logging sinks (like event logs, text files, and SQL databases). This kind of flexible logging configuration is common in many logging frameworks and can often be...
47,125
[ { "from": "human", "value": "Is it possible to log certain events to -> event log for example, while others to -> file trace listener, while others still to -> SQL database. \nI want to be able to configure this somewhere so errors go to text, verbose information goes to SQL, and warnings go to (event viewe...
I would like to access the contacts field on an email message (Email options) in outlook. Normally this field ties an email to a contact. Since it is a freeform text field available from the options dialog box, I am trying to use it to store a "next action" for my email message. I would like to set the next action base...
In Microsoft Outlook, the "Contacts" field you're referring to is not directly accessible through the standard Outlook Object Model, which is typically what you would use in VBA or similar automation scenarios. However, you can utilize the `UserProperties` collection of the `MailItem` object to store custom data. To s...
49,829
[ { "from": "human", "value": "I would like to access the contacts field on an email message (Email options) in outlook. Normally this field ties an email to a contact. Since it is a freeform text field available from the options dialog box, I am trying to use it to store a \"next action\" for my email messag...
I found some rather strange behavior... Here is how to replicate the problem: Create a WPF Application Project. Remove the StartupUri from the App.xaml file. Add a Startup Event Handler to the App with signature "private void Application_Startup(object sender, StartupEventArgs e)" Now, add a Form to the project (right...
The issue you're encountering stems from the interaction between Windows Forms and WPF in a single application context, specifically with respect to how WPF and Windows Forms manage their message loops and threading. ### Understanding the Problem When you run a WPF application, it typically has a message loop that pr...
48,811
[ { "from": "human", "value": "I found some rather strange behavior...\nHere is how to replicate the problem:\n\nCreate a WPF Application Project.\nRemove the StartupUri from the App.xaml file.\nAdd a Startup Event Handler to the App with signature \"private void Application_Startup(object sender, StartupEven...
I asked a question earlier, and got an excellent response, but, being a newbie to Rails and still getting the basics down, I need someone to show me how to set up some scaffolding for the situation that Hates_ was nice enough to outline for me. I've set up my application and whatnot, but I basically want to have, for e...
Certainly! Let's go through the process of setting up scaffolding in a Ruby on Rails application for your scenario with Stories, Pages, and LinkedPages. ### Step 1: Create a New Rails Application If you haven't already created your Rails application, you can do so by running: ```bash rails new my_stories_app cd my_s...
48,702
[ { "from": "human", "value": "I asked a question earlier, and got an excellent response, but, being a newbie to Rails and still getting the basics down, I need someone to show me how to set up some scaffolding for the situation that Hates_ was nice enough to outline for me. I've set up my application and wha...
I recently began working on a project which has many gridviews on a single page. During creation of a new record, the user needs to be able to add/remove/edit these gridviews and then save to the database at the end. The problem with this obviously is that there is no datasource to bind the data too until after its wri...
In situations where you need to manage a collection of dynamic gridviews (or similar controls) that represent a one-to-many relationship, using ViewState can work but can lead to performance issues and complexity as you mentioned. Here are some alternative approaches that you might find more efficient and maintainable:...
48,328
[ { "from": "human", "value": "I recently began working on a project which has many gridviews on a single page. During creation of a new record, the user needs to be able to add/remove/edit these gridviews and then save to the database at the end. The problem with this obviously is that there is no datasource...
I have a WPF application that runs fine under XP as an administrator. When I run as a limited user the application does not run at all, I get the hour glass for a half second and then nothing. Where do I start in working out what part of my application is causing it to crash when running under a limited user account? ...
When a WPF application runs fine under an administrator account but fails to launch under a limited user account, there are several common issues you can investigate. Here’s a systematic approach to diagnose and resolve the problem: ### 1. **Check for Exceptions and Logs** - **Unhandled Exceptions**: Ensure that your...
48,419
[ { "from": "human", "value": "I have a WPF application that runs fine under XP as an administrator.\nWhen I run as a limited user the application does not run at all, I get the hour glass for a half second and then nothing.\nWhere do I start in working out what part of my application is causing it to crash w...
I wonder how can I write a catch'em all exception handler in the application level which will give the user the option to resume the application flow?
Creating a catch-all exception handler in an application that provides users with the option to resume application flow involves several steps. Below is a general approach in pseudocode, as well as specific examples in popular programming languages like Python and JavaScript. ### General Approach 1. **Global Exceptio...
47,204
[ { "from": "human", "value": "I wonder how can I write a catch'em all exception handler in the application level which will give the user the option to resume the application flow?\n" }, { "from": "gpt", "value": "Creating a catch-all exception handler in an application that provides users with t...
I'm working on a PHP CMS like project and I'm trying to find out what's the most convenient way of dealing with the CRUD functionality in PHP. The CMS is programmed completely in procedural PHP (no OOP - I know that many of you will not agree with this...) and was designed keeping everything as simple and light as poss...
When creating a PHP CMS with CRUD (Create, Read, Update, Delete) functionality in a procedural style, there are a few strategies you can implement to manage the operations effectively and maintain code reusability. Here’s a structured approach you can consider for your project: ### 1. Structure of Your Project You sh...
48,975
[ { "from": "human", "value": "I'm working on a PHP CMS like project and I'm trying to find out what's the most convenient way of dealing with the CRUD functionality in PHP.\nThe CMS is programmed completely in procedural PHP (no OOP - I know that many of you will not agree with this...) and was designed keep...
I'm using SQL Server 2005. I have a field that must either contain a unique value or a NULL value. I think I should be enforcing this with either a CHECK CONSTRAINT or a TRIGGER for INSERT, UPDATE. Is there an advantage to using a constraint here over a trigger (or vice-versa)? What might such a constraint/trigger look...
In SQL Server 2005, enforcing the rule that a field must either contain a unique value or a NULL value can be effectively achieved through a unique constraint, rather than using a trigger. ### Advantages of Using a Unique Constraint: 1. **Simplicity**: Constraints are generally simpler to implement and understand th...
49,148
[ { "from": "human", "value": "I'm using SQL Server 2005.\nI have a field that must either contain a unique value or a NULL value. I think I should be enforcing this with either a CHECK CONSTRAINT or a TRIGGER for INSERT, UPDATE.\nIs there an advantage to using a constraint here over a trigger (or vice-versa)...
i'm using jdbc to work with my db. I want to store a HashMap directly in the db, oracle. i figure i need to serialize the Map, and its contents, which are only String. Map already implements Serializeable, but my question is how do i put the Map in the SQL using jdbc? for instance, i have a jdbcTemplate.update("insert ...
To store a `HashMap` directly in an Oracle database using JDBC, you will need to serialize the `HashMap` into a format that can be stored in a database column. The typical approach is to convert the `HashMap` to a byte array using serialization and then store it in a column of type `BLOB` or `BINARY` in the database. ...
48,171
[ { "from": "human", "value": "i'm using jdbc to work with my db.\nI want to store a HashMap directly in the db, oracle.\ni figure i need to serialize the Map, and its contents, which are only String.\nMap already implements Serializeable, but my question is how do i put the Map in the SQL using jdbc?\nfor in...
As input I get an int (well, actually a string I should convert to an int). This int should be converted to bits. For each bit position that has a 1, I should get the position. In my database, I want all records that have an int value field that has this position as value. I currently have the following naive code that...
It sounds like you're trying to perform bit manipulation to check which bits in an integer are set to 1, and then to find records in your database that match these positions. Let's clarify the steps involved and how to implement them correctly. ### Steps to Solve the Problem 1. **Convert the String to an Integer:** F...
47,875
[ { "from": "human", "value": "As input I get an int (well, actually a string I should convert to an int).\nThis int should be converted to bits.\nFor each bit position that has a 1, I should get the position.\nIn my database, I want all records that have an int value field that has this position as value.\nI...
I am having difficulty with the following method. I can't figure out if my problem is, but I have narrowed it down to not populating the array list from the file. Any help is greatly appreciated. private void searchButtonActionPerformed(java.awt.event.ActionEvent evt) { //create arraylists ArrayList<String> model = ...
Your code is attempting to read data from a file and populate several ArrayLists, but there are several issues that are preventing it from functioning correctly. Let's break down the key problems and provide solutions: ### Issues in Your Code 1. **Incorrect While Condition**: The condition for your while loop to pars...
46,916
[ { "from": "human", "value": "I am having difficulty with the following method. I can't figure out if my problem is, but I have narrowed it down to not populating the array list from the file. Any help is greatly appreciated.\nprivate void searchButtonActionPerformed(java.awt.event.ActionEvent evt) {\n\n//...
I am currently running into a problem when trying to import an Oracle 9i SQL script into my local Oracle 10g Express database. I am trying to import the DDL from the 9i database to the 10g express database. I keep getting "Not compatible - Your export file is not supported". Has someone been able to get this working? P...
The error message you're encountering suggests that there may be compatibility issues between the Oracle 9i export file and your Oracle 10g Express database. Here are a few steps you can take to troubleshoot and potentially resolve the issue: ### Steps to Import Oracle 9i DDL into Oracle 10g 1. **Check Export Compati...
46,047
[ { "from": "human", "value": "I am currently running into a problem when trying to import an Oracle 9i SQL script into my local Oracle 10g Express database. I am trying to import the DDL from the 9i database to the 10g express database. I keep getting \"Not compatible - Your export file is not supported\". H...
I asked this question a while back but now I'm looking to implement an actual separation between my database access layer and the domain layer. I am also going to be working to move business logic into the domain where it belongs and out of the controller scripts. I'm using Zend Framework which implements the Table Dat...
Creating a clean separation between your domain layer and data access layer while using Zend Framework involves a thoughtful design approach. Below are some strategies and concepts you can adopt to implement a robust domain model that aligns with your requirements: ### 1. Domain Model Design You should create a clear...
46,422
[ { "from": "human", "value": "I asked this question a while back but now I'm looking to implement an actual separation between my database access layer and the domain layer. I am also going to be working to move business logic into the domain where it belongs and out of the controller scripts.\nI'm using Zen...
I am getting this warning: Use of uninitialized value in eval \"string\" at myscript.pl line 57. When I run this code: eval; { `$client -f $confFile -i $inputFile -o $outputFile`; }; if( $@ ) { # error handling here ... } What is causing the error? How can I fix the underlying cause? (Or otherwise su...
The warning you're encountering, "Use of uninitialized value in eval", typically indicates that you're attempting to use a variable that has not been properly initialized. In your case, the issue arises from the usage of the `eval` block. Here's the breakdown of what's happening in your code: 1. The line `eval;` is ...
48,519
[ { "from": "human", "value": "I am getting this warning:\nUse of uninitialized value in eval \\\"string\\\" at myscript.pl line 57.\n\nWhen I run this code:\neval;\n{\n `$client -f $confFile -i $inputFile -o $outputFile`;\n};\n\nif( $@ )\n{\n # error handling here ...\n}\n\nWhat is causing the ...
I have been sold on the fun of using linq in areas other than pure database interaction. (See Calling fellow code nerds - Alternatives to Nested Loops?). We are stuck on 2.0. I have told the powers that be about the ease of updating to 3.5 (we have already migrated to VS2008) but they are wanting a list of "benefits" f...
Upgrading from .NET 2.0 to 3.5 can bring several significant benefits to your development process and the functionality of your application. Here are some compelling talking points that you can present to your management team: 1. **Language Enhancements**: C# 3.0, which is included in .NET 3.5, introduces several new ...
46,069
[ { "from": "human", "value": "I have been sold on the fun of using linq in areas other than pure database interaction. (See Calling fellow code nerds - Alternatives to Nested Loops?).\nWe are stuck on 2.0. I have told the powers that be about the ease of updating to 3.5 (we have already migrated to VS2008) b...
I am new to UserControls, and while developing my own control I found a problem with showing events of my control in the property grid at design time. If I have some events in my control I want to see them in Property grid and if I double-click that I want to have a handler, in the same way Microsoft does for its cont...
To make your custom UserControl's events appear in the Property Grid at design time, and to allow for double-clicking to generate event handler stubs, you need to make sure you are correctly implementing a few key concepts in your control. Here's how you can do this: ### Step 1: Create the User Control First, you sho...
45,350
[ { "from": "human", "value": "I am new to UserControls, and while developing my own control I found a problem with \nshowing events of my control in the property grid at design time.\nIf I have some events in my control I want to see them in Property grid and if I double-click that I want to have a handler, ...
Say you have something like an ASP.NET ASP:DetailsView to show and edit a single record in a database. It's simple to record the error cases... you add validation and a validation summary. When your update form fails validation it naturally makes noise: it shows the validation message and/or the validation summary. N...
This is a common challenge in ASP.NET web forms when dealing with `DetailsView` controls, especially when managing success and validation messages. Below, I'll outline a refined approach that should help you show success messages upon updates and clear them appropriately when validation fails. ### Overview of the Stra...
48,573
[ { "from": "human", "value": "Say you have something like an ASP.NET ASP:DetailsView to show and edit a single record in a database.\nIt's simple to record the error cases... you add validation and a validation summary. When your update form fails validation it naturally makes noise: it shows the validation...