instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I have several sites (Asp.Net) that I would like to have a single sign on for... I would like a user to visit Site1 and have Site1 contact a central single sign-on server (SSS). The SSS would then determine that the user was not logged on (Not sure how) and would redirect the user to a Logon screen (Still on the SSS)....
Implementing a Single Sign-On (SSO) solution for multiple ASP.NET sites involves a few key components: a central authentication server (SSS), the individual sites (Site1, Site2), and a secure way to communicate between them without relying on shared cookies, especially since the sites may not be on the same domain. Her...
23,412
[ { "from": "human", "value": "I have several sites (Asp.Net) that I would like to have a single sign on for...\nI would like a user to visit Site1 and have Site1 contact a central single sign-on server (SSS). \nThe SSS would then determine that the user was not logged on (Not sure how) and would redirect the...
I'm trying to add parameters to an objectDataSource at runtime like this: Parameter objCustomerParameter = new Parameter("CustomerID", DbType.String, customerID); Parameter objGPDatabaseParameter = new Parameter("Database", DbType.String, gpDatabase); //set up object data source parameters ...
When you are adding parameters to an `ObjectDataSource` at runtime, it's essential to do it at the correct point in the page lifecycle. Since you mentioned that some values are coming from a master page property that loads after the `Page_Load` event of the page containing the `ObjectDataSource`, you should consider us...
24,454
[ { "from": "human", "value": "I'm trying to add parameters to an objectDataSource at runtime like this:\n Parameter objCustomerParameter = new Parameter(\"CustomerID\", DbType.String, customerID);\n Parameter objGPDatabaseParameter = new Parameter(\"Database\", DbType.String, gpDatabase);\n\n ...
I have a django application that I'd like to add some rest interfaces to. I've seen http://code.google.com/p/django-rest-interface/ but it seems to be pretty simplistic. For instance it doesn't seem to have a way of enforcing security. How would I go about limiting what people can view and manipulate through the res...
When adding REST interfaces to a Django application, using a robust library can greatly simplify the development process while also ensuring security and maintainability. Here are some approaches and recommendations for implementing RESTful APIs in Django: ### 1. Use Django REST Framework (DRF) **Recommendation**: Th...
20,866
[ { "from": "human", "value": "I have a django application that I'd like to add some rest interfaces to. I've seen http://code.google.com/p/django-rest-interface/ but it seems to be pretty simplistic. For instance it doesn't seem to have a way of enforcing security. How would I go about limiting what peopl...
Is there a CSS editor which automatically expands one-line declarations as multi-line declarations on focus ? To clarify my thought, see example below: Original CSS: div#main { color: orange; margin: 1em 0; border: 1px solid black; } But when focusing on it, editor automatically expands it to: div#main { color: ora...
Yes, there are several code editors and IDEs that support features like this, either natively or through plugins. Here are a few options you can consider: 1. **Visual Studio Code**: - With the help of extensions like "Prettier" or "Beautify", you can format your CSS code to expand it to multi-line declarations. How...
22,627
[ { "from": "human", "value": "Is there a CSS editor which automatically expands one-line declarations as multi-line declarations on focus ? To clarify my thought, see example below:\nOriginal CSS:\ndiv#main { color: orange; margin: 1em 0; border: 1px solid black; }\n\nBut when focusing on it, editor automati...
So odd situation that I ran into today with OrderBy: Func<SomeClass, int> orderByNumber = currentClass => currentClass.SomeNumber; Then: someCollection.OrderBy(orderByNumber); This is fine, but I was going to create a method instead because it might be usable somewhere else other than an orderBy. private int R...
The issue you're encountering stems from how method groups and delegates are treated in C#. Let's break it down: ### Direct Usage of Lambda Expressions When you use a lambda expression directly, like so: ```csharp Func<SomeClass, int> orderByNumber = currentClass => currentClass.SomeNumber; ``` The compiler can eas...
28,840
[ { "from": "human", "value": "So odd situation that I ran into today with OrderBy:\nFunc<SomeClass, int> orderByNumber = \n currentClass => \n currentClass.SomeNumber;\n\nThen:\nsomeCollection.OrderBy(orderByNumber);\n\nThis is fine, but I was going to create a method instead because it might be usable so...
I need to do some large integer math. Are there any classes or structs out there that represent a 128-bit integer and implement all of the usual operators? BTW, I realize that decimal can be used to represent a 96-bit int.
Yes, there are libraries and built-in types in various programming languages that can help you work with large integers, including 128-bit integers. Below are a few options across different programming languages: ### C++ In C++, you can use libraries like **Boost.Multiprecision** to work with large integers, includin...
25,126
[ { "from": "human", "value": "I need to do some large integer math. Are there any classes or structs out there that represent a 128-bit integer and implement all of the usual operators?\nBTW, I realize that decimal can be used to represent a 96-bit int.\n" }, { "from": "gpt", "value": "Yes, ther...
How does the event creation and handling work in Java Swing?
In Java Swing, event creation and handling are integral to building interactive GUI applications. The process involves several key components, including event sources, event objects, event listeners, and the event dispatching thread (EDT). Here's a detailed overview of how these components work together: ### 1. Event ...
26,127
[ { "from": "human", "value": "How does the event creation and handling work in Java Swing?\n" }, { "from": "gpt", "value": "In Java Swing, event creation and handling are integral to building interactive GUI applications. The process involves several key components, including event sources, event...
Over the years I have slowly developed a regular expression that validates most email addresses correctly, assuming they don't use an IP address as the server part. I use it in several PHP programs, and it works most of the time. However, from time to time I get contacted by someone that is having trouble with a site ...
Validating email addresses with regular expressions can be quite complex due to the variety of valid formats. However, a comprehensive regex that captures most valid email address formats while still being manageable can be constructed. Here’s a commonly used regular expression that you can use in your PHP application ...
24,265
[ { "from": "human", "value": "Over the years I have slowly developed a regular expression that validates most email addresses correctly, assuming they don't use an IP address as the server part.\nI use it in several PHP programs, and it works most of the time. However, from time to time I get contacted by s...
I got myself reading a article regarding changing the existing bad code into a good one. For reference, this is the link to the article http://www.javaworld.com/jw-03-2001/jw-0323-badcode.html?page=1 It broadly talked about the following Add comments Re-Factoring Code Break large classes into smaller classes Break la...
Certainly! The article you referenced discusses some fundamental principles for improving code quality. Here are additional practices and techniques you may consider to enhance the quality of your code further: 1. **Consistent Naming Conventions**: Use clear and consistent naming conventions for variables, functions, ...
17,804
[ { "from": "human", "value": "I got myself reading a article regarding changing the existing bad code into a good one.\nFor reference, this is the link to the article http://www.javaworld.com/jw-03-2001/jw-0323-badcode.html?page=1\nIt broadly talked about the following\n\nAdd comments\nRe-Factoring Code\n\nB...
When I annotate a Java class with "@WebService" and use it with JAX-WS RI ("Metro"), how many objects of my class does the JAX-WS RI create? Is there at most one object at all times or (perhaps depending on usage) can there be more instances be created?
When you annotate a Java class with `@WebService` and use it with JAX-WS RI (Metro), the framework typically creates a single instance of the annotated class to handle all incoming requests. This means that at most one object of your class will be created and shared across multiple requests, which aligns with the singl...
28,995
[ { "from": "human", "value": "When I annotate a Java class with \"@WebService\" and use it with JAX-WS RI (\"Metro\"), how many objects of my class does the JAX-WS RI create? Is there at most one object at all times or (perhaps depending on usage) can there be more instances be created?\n" }, { "from...
I need to copy a set of DLL and PDB files from a set of folders recursively into another folder. I don't want to recreate the folder hierarchy in the target folder. I want to use built in Windows tools, e.g. DOS commands.
You can use the built-in Windows command-line tool `robocopy` to accomplish this task. Although `robocopy` is primarily used for copying files and directories while preserving the directory structure, you can leverage it along with a simple `for` loop in a batch script to copy only the DLL and PDB files without recreat...
29,250
[ { "from": "human", "value": "I need to copy a set of DLL and PDB files from a set of folders recursively into another folder. I don't want to recreate the folder hierarchy in the target folder. \nI want to use built in Windows tools, e.g. DOS commands. \n" }, { "from": "gpt", "value": "You can ...
I have a string. string strToProcess = "fkdfdsfdflkdkfk@dfsdfjk72388389@kdkfkdfkkl@jkdjkfjd@jjjk@"; I need to add a newline after every occurence of "@" symbol in the string. My Output should be like this fkdfdsfdflkdkfk@ dfsdfjk72388389@ kdkfkdfkkl@ jkdjkfjd@ jjjk@
To add a newline after every occurrence of the "@" symbol in your string, you can use a simple replacement technique. In many programming languages, this can be achieved using the `replace` function. Below are examples in a few common programming languages: ### C# ```csharp string strToProcess = "fkdfdsfdflkdkfk@dfsd...
25,022
[ { "from": "human", "value": "I have a string.\nstring strToProcess = \"fkdfdsfdflkdkfk@dfsdfjk72388389@kdkfkdfkkl@jkdjkfjd@jjjk@\";\n\nI need to add a newline after every occurence of \"@\" symbol in the string.\nMy Output should be like this\nfkdfdsfdflkdkfk@\ndfsdfjk72388389@\nkdkfkdfkkl@\njkdjkfjd@\njjjk...
I want to find out if length property for Java arrays is an int/long or something else.
In Java, the `length` property of an array is of type `int`. This is true for all types of arrays in Java, whether they are arrays of primitives (like `int`, `char`, etc.) or arrays of objects. Here's an example: ```java public class ArrayLengthExample { public static void main(String[] args) { int[] int...
30,969
[ { "from": "human", "value": "I want to find out if length property for Java arrays is an int/long or something else.\n" }, { "from": "gpt", "value": "In Java, the `length` property of an array is of type `int`. This is true for all types of arrays in Java, whether they are arrays of primitives (...
Is there a way to select designtime packages on a project bases? Packages are very useful in large project to keep the build time acceptable, but they are a real pita in those large projects too. When one developer adds a new package, it breaks to build for all other until they install the new package on their machine....
Managing design-time packages in large projects can indeed be challenging, especially when it comes to versioning and ensuring that all developers have the same environment set up. Here are some strategies to help mitigate these issues: ### 1. **Package Management Tools** Using a package management system like `npm`,...
26,214
[ { "from": "human", "value": "Is there a way to select designtime packages on a project bases?\nPackages are very useful in large project to keep the build time acceptable, but they are a real pita in those large projects too. When one developer adds a new package, it breaks to build for all other until they...
One of the guys I work with needs a custom control that would work like a multiline ddl since such a thing does not exist as far as we have been able to discover does anyone have any ideas or have created such a thing before we have a couple ideas but they involve to much database usage We prefer that it be FREE!!!
Creating a custom control that mimics a multiline dropdown list (DDL) can be an interesting challenge, especially if you're aiming for a free solution. Here are a couple of approaches you might consider: ### 1. **Using a Text Area with Suggestions** You can create a text area that allows users to input multiple lines....
20,659
[ { "from": "human", "value": "One of the guys I work with needs a custom control that would work like a multiline ddl since such a thing does not exist as far as we have been able to discover\ndoes anyone have any ideas or have created such a thing before\nwe have a couple ideas but they involve to much data...
Occasionally my MS Access reports: The search key was not found in any record After this happens the solution is to close Access, compact and repair the backend and then delete the record. What causes this and how can I avoid it?
The error message "The search key was not found in any record" in Microsoft Access typically indicates that the database is encountering an inconsistency between the data and the underlying structure of the database, particularly when accessing a record that no longer exists or has become corrupted. Here are some commo...
28,086
[ { "from": "human", "value": "Occasionally my MS Access reports: \n\nThe search key was not found in any record\n\nAfter this happens the solution is to close Access, compact and\nrepair the backend and then delete the record.\nWhat causes this and how can I avoid it?\n" }, { "from": "gpt", "valu...
In SP2007/MOSS I need to run a CAML query against a single list like so: <Where> <Or> <Eq> <FieldRef Name='URL' /> <Value Type='URL'>/path/item1.aspx</Value> </Eq> <Eq> <FieldRef Name='URL' /> <Value Type='URL'>/path/item4.aspx</Value> ...
It looks like you're encountering an issue with your CAML query due to the field type used for the `Value` elements. In SharePoint, when querying for URL fields, it is important to ensure that you use the correct `Value Type`. The `URL` field type should be queried using `Value Type='FileRef'` instead of `Value Type='...
19,346
[ { "from": "human", "value": "In SP2007/MOSS I need to run a CAML query against a single list like so:\n<Where>\n <Or>\n <Eq>\n <FieldRef Name='URL' />\n <Value Type='URL'>/path/item1.aspx</Value>\n </Eq>\n <Eq>\n <FieldRef Name='URL' />\n <...
I know this is somewhat of a server question, but I wanted to ask anyways in case someone has done this before. I have a web service that is on our internal 172.x.x.x subnet and a web server that is on our internal 10.x.x.x subnet. The webserver needs to hit the 172 web service, but is unable to route there. The real...
Setting up a proxy server on a Windows Server 2003 machine to facilitate communication between your internal networks is a reasonable approach, especially since you want to avoid costly solutions like ISA Server 2006. Here are a few alternatives you can consider for setting up a lightweight proxy without needing to pur...
20,371
[ { "from": "human", "value": "I know this is somewhat of a server question, but I wanted to ask anyways in case someone has done this before.\nI have a web service that is on our internal 172.x.x.x subnet and a web server that is on our internal 10.x.x.x subnet. The webserver needs to hit the 172 web servic...
I'm writing a sample console service host and I want to plug into WCF stack to be able to print a message to console when new message arrives, even if it won't get processed by the service at the moment (because service is working on previous calls). This is based on my assumption that messages arriving get queued by t...
In WCF (Windows Communication Foundation), when using the `netTcpBinding`, the handling of messages does depend on the service’s concurrency and instance context modes. WCF does queue messages internally under certain conditions, which can lead to a scenario where new messages can arrive while previous ones are still b...
21,439
[ { "from": "human", "value": "I'm writing a sample console service host and I want to plug into WCF stack to be able to print a message to console when new message arrives, even if it won't get processed by the service at the moment (because service is working on previous calls).\nThis is based on my assumpt...
I am using a DataGridView control in a Windows Forms application. When a user holds down control to select multiple items, it works fine. Now when the user releases control and clicks (and holds down the left mouse button) to start a drag operation, the selection changes. How can I stop the selection from clearing when...
To prevent the selection from changing when the user holds down the left mouse button in a `DataGridView` while starting a drag-and-drop operation, you can handle the `MouseDown` event of the `DataGridView`. In your handler, you can set the `Handled` property to `true` to indicate that you want to suppress the default ...
16,820
[ { "from": "human", "value": "I am using a DataGridView control in a Windows Forms application. When a user holds down control to select multiple items, it works fine. Now when the user releases control and clicks (and holds down the left mouse button) to start a drag operation, the selection changes. How ca...
I want to display a list of images (instead of text) for the user to choose from. The control is databound (the URLs come from the database) Instead of the typical vertical scroll bar in a listbox, I want this box to be horizontal. I'm looking for an ASP.NET server control similar to this: http://www.infragistics.com/d...
It sounds like you're looking for a way to display a list of images in a horizontal manner for user selection in an ASP.NET application. Since you've mentioned that you’re using the ComboBox from obout.com, that's a great choice because it allows for customization and supports images. Here's how you can implement it i...
21,328
[ { "from": "human", "value": "I want to display a list of images (instead of text) for the user to choose from. The control is databound (the URLs come from the database) Instead of the typical vertical scroll bar in a listbox, I want this box to be horizontal. I'm looking for an ASP.NET server control simil...
I'm trying to learn scheme via SICP. Exercise 1.3 reads as follow: Define a procedure that takes three numbers as arguments and returns the sum of the squares of the two larger numbers. Please comment on how I can improve my solution. (define (big x y) (if (> x y) x y)) (define (p a b c) (cond ((> a b) (+ (squ...
Your solution to the exercise is a great start! You're correctly defining a procedure to find the two larger numbers among three inputs and return the sum of their squares. However, there are a few improvements and clarifications we can discuss to enhance your solution. ### Suggested Improvements 1. **More General Na...
26,922
[ { "from": "human", "value": "I'm trying to learn scheme via SICP. Exercise 1.3 reads as follow: Define a procedure that takes three numbers as arguments and returns the sum of the squares of the two larger numbers. Please comment on how I can improve my solution.\n(define (big x y)\n (if (> x y) x y))\n\...
How would you manually trigger additional team builds from a team build? For example, when we were in CC.Net other builds would trigger if certain builds were successful. The second build could either be projects that use this component or additional, long running test libraries for the same component.
To manually trigger additional builds from a team build, you can follow several approaches depending on the Continuous Integration (CI) tool you are using. Assuming you are using popular CI/CD systems like Azure DevOps, Jenkins, GitLab CI, or similar platforms, here are some general steps you can follow to set this up:...
21,398
[ { "from": "human", "value": "How would you manually trigger additional team builds from a team build? For example, when we were in CC.Net other builds would trigger if certain builds were successful. The second build could either be projects that use this component or additional, long running test librarie...
Is it possible to have multiple folders where I can place applications to be deployed? How are these defined? And is it possible to restrict one folder to just be applications for "domain.com" and no other domain. Thanks
Yes, it is certainly possible to have multiple folders for deploying applications, and how these folders are defined can vary depending on the server and deployment framework you are using. Below, I'll outline a general approach, and then I'll address your question about domain restrictions. ### Defining Multiple Depl...
28,338
[ { "from": "human", "value": "Is it possible to have multiple folders where I can place applications to be deployed?\nHow are these defined?\nAnd is it possible to restrict one folder to just be applications for \"domain.com\" and no other domain.\nThanks\n" }, { "from": "gpt", "value": "Yes, it ...
We want to reprint a payment advice, even before it is posted. The report BankPaymAdviceCheque should be able to do this but only prints advices for already posted cheques. The report's dialog, however, allows you to choose unposted ones as well. No matter how I searched in the code, I cannot find the bit that pre...
It sounds like you're dealing with an issue in your financial or accounting software where the `BankPaymAdviceCheque` report is not allowing you to reprint unposted payment advices, despite the dialog options suggesting otherwise. Here’s a general approach you can take to troubleshoot this issue: 1. **Check Report Log...
23,121
[ { "from": "human", "value": "We want to reprint a payment advice, even before it is posted. The report \nBankPaymAdviceCheque should be able to do this but only prints advices for \nalready posted cheques. The report's dialog, however, allows you to choose \nunposted ones as well. \nNo matter how I searched...
Is there a reliable equivalent of xkill for Windows? For those who don't know what xkill is: it is a Unix tool which basically kills the process of any windows you click on. A Windows port can be downloaded here.
Yes, there are several alternatives to `xkill` for Windows that can help you close unresponsive applications by clicking on their window. Here are a few options: 1. **TaskKill Command**: - You can use the built-in `taskkill` command in the Command Prompt to kill a process. Although it requires you to know the name ...
26,680
[ { "from": "human", "value": "Is there a reliable equivalent of xkill for Windows?\nFor those who don't know what xkill is: it is a Unix tool which basically kills the process of any windows you click on.\nA Windows port can be downloaded here.\n" }, { "from": "gpt", "value": "Yes, there are seve...
I'm working on a file sharing website, I need a way to take screenshots of the uploaded documents. The site will support several file formarts, from plain text to office documents (doc, xls, ppt, ...), videos (mpeg, avi, ...), images (jpg, gif, png, ...) PDF's, Open Office, etc. Each document need to have a "preview" o...
Hi Javier, You are on the right track with your approach to taking screenshots of the uploaded documents for your file sharing website. Here are some suggestions and alternative methods for converting various file formats to images, which might help you achieve your goal: 1. **JODConverter**: As you mentioned, JODCon...
24,499
[ { "from": "human", "value": "I'm working on a file sharing website, I need a way to take screenshots of the uploaded documents.\nThe site will support several file formarts, from plain text to office documents (doc, xls, ppt, ...), videos (mpeg, avi, ...), images (jpg, gif, png, ...) PDF's, Open Office, etc...
All Weather Tickers I found are static and if the user wants to select a zip code it links you to a different page. Do you know any weather ticker that just gets the new info in the same page?
Yes, there are several weather ticker solutions that can dynamically update information on the same page without redirecting users to a different page. Here are a few options you can consider: 1. **Weather APIs with Custom JavaScript**: You can use weather APIs like OpenWeatherMap, WeatherAPI, or AccuWeather and creat...
24,090
[ { "from": "human", "value": "All Weather Tickers I found are static and if the user wants to select a zip code it links you to a different page.\nDo you know any weather ticker that just gets the new info in the same page?\n" }, { "from": "gpt", "value": "Yes, there are several weather ticker s...
Can we call functions using function pointer? if yes how?
Yes, you can call functions using function pointers in C and C++. A function pointer is a pointer that points to the address of a function. Once you have a function pointer pointing to a function, you can invoke the function using this pointer. Here's how you can do it: ### 1. Define a Function First, define a functi...
26,381
[ { "from": "human", "value": "Can we call functions using function pointer? if yes how?\n" }, { "from": "gpt", "value": "Yes, you can call functions using function pointers in C and C++. A function pointer is a pointer that points to the address of a function. Once you have a function pointer poi...
Greetings! I've created a custom button class to render the following: <span class="btnOrange"> <input type="submit" id="ctl00_MainContent_m_GoBack" value="Back" name="ctl00$MainContent$m_GoBack"/> </span> However, it renders like this instead (note the extraneous "class" attribute in the INPUT tag): <span class="...
Yes, you can avoid rendering the `class` attribute for the `INPUT` tag by overriding the `Render` method and controlling how the properties are rendered for your custom button. Specifically, you can prevent the default `CssClass` behavior of the `Button` control from being applied to the `INPUT` element. Here's how yo...
26,007
[ { "from": "human", "value": "Greetings!\nI've created a custom button class to render the following:\n<span class=\"btnOrange\">\n <input type=\"submit\" id=\"ctl00_MainContent_m_GoBack\" value=\"Back\" name=\"ctl00$MainContent$m_GoBack\"/>\n</span>\n\nHowever, it renders like this instead (note the extr...
Does anyone know how to get the name of the TARGET (/t) called from the MSBuild command line? There are a few types of targets that can be called and I want to use that property in a notification to users. Example: msbuild Project.proj /t:ApplicationDeployment /p:Environment=DEV I want access to the target words Appli...
In MSBuild, there is no built-in property that automatically captures the target specified in the command line (e.g., `/t:ApplicationDeployment`). However, you can create a custom property in your project file to capture this information using a combination of the `TargetName` built-in property. Here’s how you can acc...
23,360
[ { "from": "human", "value": "Does anyone know how to get the name of the TARGET (/t) called from the MSBuild command line? There are a few types of targets that can be called and I want to use that property in a notification to users.\nExample:\nmsbuild Project.proj /t:ApplicationDeployment /p:Environment=D...
I am attempting to deploy .NET 2.0 web services on IIS that has both 1.0 and 2.0 installed. This web server primarily serves a large .NET 1.0 application. I have copied by .NET 2.0 web service project to the server and have created a virtual directory to point to the necessary folder. When I set the ASP.NET version t...
When deploying a .NET 2.0 web service on an IIS server that is also serving a .NET 1.0 application, it's crucial to ensure that the authentication settings are correctly configured. The issue you are facing—being prompted for a username and password when ASP.NET version is set to 2.0—suggests that there may be a mismat...
24,771
[ { "from": "human", "value": "I am attempting to deploy .NET 2.0 web services on IIS that has both 1.0 and 2.0 installed. This web server primarily serves a large .NET 1.0 application. \nI have copied by .NET 2.0 web service project to the server and have created a virtual directory to point to the necessary...
I'm trying to implement an IErrorHandler in my WCF service in order to log every exception that hits the service boundary before it's passed to the client. I already use IErrorHandlers for translating Exceptions to typed FaultExceptions, which has been very useful. According to the MSDN for IErrorHandler.HandleError(...
To effectively implement logging for exceptions in a WCF service, especially in the context of using the `IErrorHandler` interface, you can follow a structured approach that allows you to capture useful information about the operation context when an exception occurs. Since the `HandleError` method does not provide di...
21,965
[ { "from": "human", "value": "I'm trying to implement an IErrorHandler in my WCF service in order to log every exception that hits the service boundary before it's passed to the client. I already use IErrorHandlers for translating Exceptions to typed FaultExceptions, which has been very useful. According t...
I have an old legacy application around for which I only have the installer. it doesn't do anything more than uncompress and register itself and his library's. As i don't have the source-code it gives me a lot of headaches in maintenance problems. In some particular computers (Acer Aspire One with Windows) just do not ...
You're not nuts; it's definitely possible to extract files from an installer and recreate it using NSIS (Nullsoft Scriptable Install System). However, there are some considerations to keep in mind: ### Steps to Extract Files from the Installer 1. **Extraction Tools**: You can use tools like **7-Zip** or **Universal E...
24,148
[ { "from": "human", "value": "I have an old legacy application around for which I only have the installer. it doesn't do anything more than uncompress and register itself and his library's.\nAs i don't have the source-code it gives me a lot of headaches in maintenance problems. In some particular computers (...
Does anybody know about an Eclipse plug-in to analyze code coverage for TestNG unit tests?
Yes, there are several Eclipse plug-ins you can use to analyze code coverage for TestNG unit tests. Here are a couple of popular options: 1. **EclEmma**: EclEmma is a popular and widely used code coverage tool for Eclipse. It integrates seamlessly with Eclipse IDE and supports various testing frameworks, including Tes...
28,755
[ { "from": "human", "value": "Does anybody know about an Eclipse plug-in to analyze code coverage for TestNG unit tests?\n" }, { "from": "gpt", "value": "Yes, there are several Eclipse plug-ins you can use to analyze code coverage for TestNG unit tests. Here are a couple of popular options:\n\n1....
Is there any way to add a field to a class at runtime ( a field that didn't exist before ) ? Something like this snippet : Myobject *ob; // create an object ob->addField("newField",44); // we add the field to the class and we assign an initial value to it printf("%d",ob->newField); // now we can access that field I do...
In C++, unlike languages such as JavaScript or Python, you cannot directly add fields to a class at runtime due to the static nature of C++ types. However, there are a few workarounds that can give you similar behavior. Here are some approaches you could consider: ### 1. Use a `std::map` to store dynamic fields One c...
24,578
[ { "from": "human", "value": "Is there any way to add a field to a class at runtime ( a field that didn't exist before ) ? Something like this snippet :\nMyobject *ob; // create an object\nob->addField(\"newField\",44); // we add the field to the class and we assign an initial value to it\nprintf(\"%d\",ob->...
What exactly is the purpose of the 'obj' directory in .NET?
In .NET, the 'obj' directory serves a specific purpose during the build process of a project. Here's a breakdown of its purpose and function: 1. **Intermediate Files**: The 'obj' directory contains intermediate files that are generated during the compilation of a .NET project. These files include compiled code, tempor...
28,871
[ { "from": "human", "value": "What exactly is the purpose of the 'obj' directory in .NET?\n" }, { "from": "gpt", "value": "In .NET, the 'obj' directory serves a specific purpose during the build process of a project. Here's a breakdown of its purpose and function:\n\n1. **Intermediate Files**: Th...
So, I have an autocomplete dropdown with a list of townships. Initially I just had the 20 or so that we had in the database... but recently, we have noticed that some of our data lies in other counties... even other states. So, the answer to that was buy one of those databases with all towns in the US (yes, I know, geo...
Implementing an autocomplete feature with a large dataset, like 80,000 townships, can indeed be challenging, but there are several strategies you can employ to improve performance and user experience. Here are some suggestions: ### 1. **State Selector** As you mentioned, adding a state selector is a good first step. B...
21,255
[ { "from": "human", "value": "So, I have an autocomplete dropdown with a list of townships. Initially I just had the 20 or so that we had in the database... but recently, we have noticed that some of our data lies in other counties... even other states. So, the answer to that was buy one of those databases w...
Within an n-tier app that makes use of a WCF service to interact with the database, what is the best practice way of making use of LinqToSql classes throughout the app? I've seen it done a couple of different ways but they seemed like they burned a lot of hours creating extra interfaces, message classes, and the like w...
Using LINQ to SQL in an n-tier architecture can indeed lead to some complexities, especially when considering how to properly manage data access, service boundaries, and separation of concerns. Here are some best practices for using LINQ to SQL in a WCF service within an n-tier application: ### 1. **Data Access Layer ...
25,750
[ { "from": "human", "value": "Within an n-tier app that makes use of a WCF service to interact with the database, what is the best practice way of making use of LinqToSql classes throughout the app?\nI've seen it done a couple of different ways but they seemed like they burned a lot of hours creating extra i...
Various programs can do stuff only when you haven't used the computer for a while (eg screensaver, Google Desktop indexing, etc). How do they know when it has been inactive? Is there some function in Windows that tells you how long it has been inactive, or do you have to use some kind of keyboard/mouse hook to track ac...
In Windows, various programs can determine user inactivity primarily by monitoring input events such as keyboard and mouse activity. There are a couple of ways to accomplish this, both of which you can implement in C#. ### Method 1: Using Windows API You can use the Windows API to check for the last input time. The f...
19,871
[ { "from": "human", "value": "Various programs can do stuff only when you haven't used the computer for a while (eg screensaver, Google Desktop indexing, etc).\nHow do they know when it has been inactive? Is there some function in Windows that tells you how long it has been inactive, or do you have to use so...
My question is quite relevant to something asked before but I need some practical advice. I have "Working effectively with legacy code" in my hands and I 'm using advice from the book as I read it in the project I 'm working on. The project is a C++ application that consists of a few libraries but the major portion of ...
Setting up a build process for unit tests in a legacy codebase, especially one that's compiled into a single executable, can be challenging. Here are some practical strategies you can consider to improve your setup: ### 1. **Use a Shared Library for Tests:** - **Create a Separate Shared Library:** If it's feasible,...
22,689
[ { "from": "human", "value": "My question is quite relevant to something asked before but I need some practical advice.\nI have \"Working effectively with legacy code\" in my hands and I 'm using advice from the book as I read it in the project I 'm working on. The project is a C++ application that consists ...
Is it possible to run a ruby application as a Windows Service? I see that there is a related question which discusses running a Java Application as a Windows Service, how can you do this with a Ruby application?
Yes, it is possible to run a Ruby application as a Windows Service. To do this, you can use a gem called `win32-service`, which provides a framework for creating and managing Windows Services. Below are the general steps you can follow to set this up: ### Step 1: Install the Required Gems First, you need to install t...
22,603
[ { "from": "human", "value": "Is it possible to run a ruby application as a Windows Service? I see that there is a related question which discusses running a Java Application as a Windows Service, how can you do this with a Ruby application?\n" }, { "from": "gpt", "value": "Yes, it is possible t...
I have a question at SO asking how to wire a middle tier to a DataSet. I put up an answer showing what I had come up with, but I am not happy with the tight coupling. I have just started to get into testing and find it a good goal for my code. How would this code be de-coupled to allow for unit testing? Thank you, K...
Decoupling your code from a `DataSet` can improve testability and maintainability, and it’s great to hear you’re focusing on unit testing. Here are some steps and best practices you can follow to achieve this: ### 1. Use Interfaces Instead of directly depending on a `DataSet`, create an interface that abstracts the op...
27,400
[ { "from": "human", "value": "I have a question at SO asking how to wire a middle tier to a DataSet.\nI put up an answer showing what I had come up with, but I am not happy with the tight coupling. I have just started to get into testing and find it a good goal for my code.\nHow would this code be de-couple...
Is there a way to test the type of an element in JavaScript? The answer may or may not require the prototype library, however the following setup does make use of the library. function(event) { var element = event.element(); // if the element is an anchor ... // if the element is a td ... }
Yes, you can test the type of an element in JavaScript by checking its tag name. The `event.element()` method from the Prototype library returns the DOM element associated with the event. You can then check the tag name of that element to determine its type. Here's how you can implement this in your function: ```javas...
29,982
[ { "from": "human", "value": "Is there a way to test the type of an element in JavaScript? \nThe answer may or may not require the prototype library, however the following setup does make use of the library.\nfunction(event) {\n var element = event.element();\n // if the element is an anchor\n ...\n // i...
I was just wondering if anyone knew of a good way that I could parse the file at the bottom of the post. I have a database setup with the correct tables for each section eg Refferal Table,Caller Table,Location Table. Each table has the same columns that are show in the file below I would really like something that is f...
To parse a file like the one you provided in a generic way, you can create a structured approach that dynamically handles sections and fields without relying on rigid structures. Below is an example implementation in C#. It reads the file line by line, determines the section and extracts the corresponding key-value pai...
22,851
[ { "from": "human", "value": "I was just wondering if anyone knew of a good way that I could parse the file at the bottom of the post.\nI have a database setup with the correct tables for each section eg Refferal Table,Caller Table,Location Table. Each table has the same columns that are show in the file bel...
EDIT: It seems to be something with having the two queues in the same schema. I’m trying to experiment with queue propagation but I’m not seeing records in the destination queue. But that could easily be because I don’t have all the pieces in place. Does anyone have a test case they could post? I’ll include what I trie...
It looks like you are trying to set up an Advanced Queuing (AQ) scenario in Oracle, where messages are propagated from one queue to another. I see a few areas where you might need to make adjustments or check to ensure that the propagation works correctly. Below are suggestions and a revised version of your code: 1. *...
21,024
[ { "from": "human", "value": "EDIT: It seems to be something with having the two queues in the same schema.\nI’m trying to experiment with queue propagation but I’m not seeing records in the destination queue. But that could easily be because I don’t have all the pieces in place.\nDoes anyone have a test cas...
In Microsoft Oslo SDK CTP 2008 (using Intellipad) the following code compiles fine: module T { type A { Id : Integer32 = AutoNumber(); } where identity Id; As : A*; type B { Id : Integer32 = AutoNumber(); // A : A; // } where A in As && identity Id; } where identity Id; ...
The error message "M2037: SQL Generation Internal Error: Missing generator for variable 'A'" indicates that there is an issue related to the handling of the type `A` in the context of the `type B`. When you uncomment the line `A : A;` and include it in the `type B`, you're defining a property `A` that references type ...
27,768
[ { "from": "human", "value": "In Microsoft Oslo SDK CTP 2008 (using Intellipad) the following code compiles fine:\nmodule T {\n\n type A {\n Id : Integer32 = AutoNumber();\n } where identity Id;\n\n As : A*;\n\n type B {\n Id : Integer32 = AutoNumber();\n// A : A;\n// } wh...
Wrong answer was autoselected by the stupid bounty system. I'm using front page extensions to interact with SharePoint Services 3.0 as described here. In most samples I have seen the client simply looks for particular English strings in the result and uses that to determine if an error has occurred. However, I am writi...
It sounds like you're dealing with a challenging aspect of working with SharePoint Services 3.0, especially concerning error handling and localization. The documentation can indeed be sparse when it comes to specific error codes and their meanings. To help you navigate this, here are a few suggestions that might provi...
26,185
[ { "from": "human", "value": "Wrong answer was autoselected by the stupid bounty system.\nI'm using front page extensions to interact with SharePoint Services 3.0 as described here.\nIn most samples I have seen the client simply looks for particular English strings in the result and uses that to determine if...
Whats the best practice for setting up package structures in a Java Web Application? How would you setup your src, unit test code, etc?
Setting up a well-structured package structure for a Java web application is crucial for maintainability, readability, and scalability. Below are some best practices and a suggested directory structure: ### Recommended Package Structure A common way to structure a Java web application follows the Maven conventions, w...
23,013
[ { "from": "human", "value": "Whats the best practice for setting up package structures in a Java Web Application?\nHow would you setup your src, unit test code, etc?\n" }, { "from": "gpt", "value": "Setting up a well-structured package structure for a Java web application is crucial for maintain...
which would you recommend? which is faster, reliable? apache mod_python or nginx/lighttpd FastCGI?
When comparing Apache with mod_python to Nginx or Lighttpd with FastCGI, there are several factors to consider, including speed, reliability, and overall suitability for your specific use case. Here’s a breakdown of the two options: ### Apache with mod_python: - **Speed**: Apache, while highly configurable and versati...
26,364
[ { "from": "human", "value": "which would you recommend?\nwhich is faster, reliable?\napache mod_python or nginx/lighttpd FastCGI?\n" }, { "from": "gpt", "value": "When comparing Apache with mod_python to Nginx or Lighttpd with FastCGI, there are several factors to consider, including speed, reli...
I'd like to make it easy for users to forward a port on their NAT to their local machine for my C++ app. I'd like to make this work on OSX & Windows. Linux would be a great bonus, but Linux users are probably more comfortable forwarding ports manually, so it is less of a concern. LGPL type code is OK, but I can't us...
Port forwarding through NAT (Network Address Translation) can be tricky, but using UPnP (Universal Plug and Play) or NAT-PMP (NAT Port Mapping Protocol) can simplify the process significantly for users. Here’s a breakdown of your specific questions and some additional information: ### 1. Best Libraries for UPnP **Min...
23,531
[ { "from": "human", "value": "I'd like to make it easy for users to forward a port on their NAT to their local machine for my C++ app. I'd like to make this work on OSX & Windows. Linux would be a great bonus, but Linux users are probably more comfortable forwarding ports manually, so it is less of a conce...
i'm trying to make the following routes .. and currently i'm going about this in a really long way.. ie. one route instance for EACH route. this is what i'm after... (assuming i'm doing a 'stackoverflow website') / <-- root site /page/{page} <-- root site, but to the page of question...
It looks like you're trying to create a routing structure for a web application that supports dynamic pages and filters. The routes you've specified can be efficiently handled by a routing library or framework, allowing you to define a single route for each pattern while making use of parameters. Below, I’ll illustrate...
26,486
[ { "from": "human", "value": "i'm trying to make the following routes .. and currently i'm going about this in a really long way.. ie. one route instance for EACH route.\nthis is what i'm after... (assuming i'm doing a 'stackoverflow website')\n/ <-- root site\n/page/{page} ...
Can I map the identity of an entity to a column whose values are not automatically generated, but is still unique? If so, what should I put in the xml identity/generator tag? Thanks.
Yes, you can map the identity of an entity to a column whose values are unique but not automatically generated. In this case, you will need to specify that the column is not an auto-generated key. In JPA (Java Persistence API) or Hibernate, if you're using XML mapping, you should indicate that the entity's identifier ...
29,040
[ { "from": "human", "value": "Can I map the identity of an entity to a column whose values are not automatically generated, but is still unique?\nIf so, what should I put in the xml identity/generator tag?\nThanks.\n" }, { "from": "gpt", "value": "Yes, you can map the identity of an entity to a c...
I have a public static class in which I would like to have a ToString() method. I have defined it as public static string ToString(), but get the following warning: 'Class.ToString()' hides inherited member 'object.ToString()'. To make the current member override that implementation, add the override keyword. Ot...
In C#, the `ToString()` method is an instance method defined in the `System.Object` class, which means it can only be overridden in non-static classes. Since your class is declared as static, it cannot override `ToString()` or any other instance methods from `object`. To resolve the warning you're encountering, you ca...
30,358
[ { "from": "human", "value": "I have a public static class in which I would like to have a ToString() method. \nI have defined it as public static string ToString(), but get the following warning: \n\n'Class.ToString()' hides inherited member 'object.ToString()'. To make the current member override that i...
I'm current developing a WebService in a Bea Websphere 6.1 environment with Axis 2 implementation, I'm trying to respect the current standards for Web Services (JAXB, JAXWS, StAX...). How long can be an XML message on this platform? I've searched around but I haven't found anything related to this topic.
In the context of web services, especially when dealing with XML messages, there isn't a strict maximum length defined by standards like JAXB, JAX-WS, or the Axis 2 framework itself. Instead, the maximum size of an XML message is usually determined by several factors: 1. **Server Configuration**: WebSphere Application...
27,791
[ { "from": "human", "value": "I'm current developing a WebService in a Bea Websphere 6.1 environment with Axis 2 implementation, I'm trying to respect the current standards for Web Services (JAXB, JAXWS, StAX...).\nHow long can be an XML message on this platform? \nI've searched around but I haven't found an...
I'm using jQuery validate on a form I am building and it is working great. What I want to do is when something is invalid to have the text field change colors and the error message to be white. I figured the following CSS would work: label .error {color: white; font-weight: bold;} input .error {background-color: pink; ...
The issue with your CSS is in how you're targeting the elements. The CSS selectors you've used are incorrect because the space between the selectors is causing them to look for a descendant instead of applying styles directly to the elements with the `error` class. Here's how your original CSS is structured: ```css l...
29,794
[ { "from": "human", "value": "I'm using jQuery validate on a form I am building and it is working great. What I want to do is when something is invalid to have the text field change colors and the error message to be white. I figured the following CSS would work:\nlabel .error {color: white; font-weight: bol...
I've encountered an odd problem that doesn't make any sense to me. I am trying to dynamically set up MasterPage Content controls on a page. I have it working nicely with the following code: protected override void OnPreInit(EventArgs e) { base.OnPreInit(e); MasterPageFile = "~/MasterPages/Defau...
The behavior you are observing is due to the timing of when controls are being added to the page lifecycle in ASP.NET. When you call `Master.FindControl(existantContentPlaceHolderID)` or any control from the Master Page, it affects the current context of the page, which can inadvertently interfere with control creation...
26,386
[ { "from": "human", "value": "I've encountered an odd problem that doesn't make any sense to me. I am trying to dynamically set up MasterPage Content controls on a page. I have it working nicely with the following code:\n protected override void OnPreInit(EventArgs e)\n {\n base.OnPreInit(e);\n\...
I'm creating a cms and have not yet settled on the matter of where to store the complete url for a given page in the structure. Every page have a slug (url friendly name of the page) and every page has a nullable (for top-level pages) parent and children. Where do I store the complete url (/first-page/sub-page) for a g...
The challenge you’re facing is common when designing a CMS, particularly with respect to URL management. Here are some common approaches and considerations for handling the complete URL for pages effectively: ### 1. Store Complete URL in Database One option is to store the complete URL in the database as a separate f...
26,993
[ { "from": "human", "value": "I'm creating a cms and have not yet settled on the matter of where to store the complete url for a given page in the structure.\nEvery page have a slug (url friendly name of the page) and every page has a nullable (for top-level pages) parent and children.\nWhere do I store the ...
While calculating the hash table bucket index from the hash code of a key, why do we avoid use of remainder after division (modulo) when the size of the array of buckets is a power of 2?
When calculating the hash table bucket index from a hash code, using the remainder after division (modulo) is a common approach. However, when the size of the array of buckets is a power of 2, there is a more efficient way to perform this calculation using bitwise operations instead of modulo. ### Explanation: 1. **H...
29,428
[ { "from": "human", "value": "While calculating the hash table bucket index from the hash code of a key, why do we avoid use of remainder after division (modulo) when the size of the array of buckets is a power of 2?\n" }, { "from": "gpt", "value": "When calculating the hash table bucket index fr...
I want with ant access a subversion-repository and get a list of files available under a specific svn-url like https://svn.myhost.de/repository/path/into/repo. I want to list all items, subdirectories or files, in some form I can work with later in the ant-file. A comma-separated list is fine, it can be input for the f...
To access a Subversion (SVN) repository and list files available at a specific URL using Apache Ant, you can utilize the `svn` command-line tool in combination with an Ant `exec` task. Here's how you can achieve that: 1. **Ensure you have SVN installed**: First, ensure that the `svn` command-line client is installed o...
25,169
[ { "from": "human", "value": "I want with ant access a subversion-repository and get a list of files available under a specific svn-url like https://svn.myhost.de/repository/path/into/repo. I want to list all items, subdirectories or files, in some form I can work with later in the ant-file. A comma-separate...
Is there a simple out of the box way to impersonate a user in .NET? So far I've been using this class from code project for all my impersonation requirements. Is there a better way to do it by using .NET Framework? I have a user credential set, (username, password, domain name) which represents the identity I need to i...
Yes, .NET Framework provides a built-in way to impersonate a user using the `WindowsIdentity` and `WindowsImpersonationContext` classes. This method is relatively straightforward and allows you to run code under a different user's credentials. Here's an example of how you can accomplish this using the `WindowsIdentit...
25,913
[ { "from": "human", "value": "Is there a simple out of the box way to impersonate a user in .NET?\nSo far I've been using this class from code project for all my impersonation requirements.\nIs there a better way to do it by using .NET Framework?\nI have a user credential set, (username, password, domain nam...
Guys, can someone give me a brief run through of how to change the background colour of a CEdit control at runtime? I want to be able to change the background to red if the field is zero length and the normal white otherwise.
To change the background color of a `CEdit` control at runtime in an MFC application, you can derive a new class from `CEdit` and override the `OnCtlColor` method. This will allow you to customize the background color based on the content of the edit control. Here’s a step-by-step guide to achieve this: 1. **Create a...
24,206
[ { "from": "human", "value": "Guys, can someone give me a brief run through of how to change the background colour of a CEdit control at runtime? I want to be able to change the background to red if the field is zero length and the normal white otherwise.\n" }, { "from": "gpt", "value": "To chang...
Im trying to squeeze some extra performance from searching through a table with many rows. My current reasoning is that if I can throw away some of the seldom used member from the searched table thereby reducing rowsize the amount of pagesplits and hence IO should drop giving a benefit when data start to spill from mem...
Optimizing the performance of queries on large tables is a common concern in database management, and your reasoning about reducing row size to decrease page splits and IO operations is a sound approach. Here are some considerations and resources that could help you: ### Considerations: 1. **Row Size Reduction**: ...
25,892
[ { "from": "human", "value": "Im trying to squeeze some extra performance from searching through a table with many rows.\nMy current reasoning is that if I can throw away some of the seldom used member from the searched table thereby reducing rowsize the amount of pagesplits and hence IO should drop giving a...
A project I'm working on requires serializing a data structure before shutting down and restores its state from this serialized data when it start up again. Last year, we were building for .NET 1.1, and ran into a tricky issue where our code ran on .NET 2.0 a customer upgraded with some software that somehow set 1.1 a...
When it comes to the serialization format in .NET, specifically with the BinaryFormatter, you need to be cautious about potential incompatibilities between different versions of the .NET Framework. ### Serialization Compatibility 1. **Serialization Format Stability**: The .NET Framework has generally aimed to mainta...
26,218
[ { "from": "human", "value": "A project I'm working on requires serializing a data structure before shutting down and restores its state from this serialized data when it start up again.\nLast year, we were building for .NET 1.1, and ran into a tricky issue where\n\nour code ran on .NET 2.0\na customer upgra...
Intuitively, it would seems that a compiler for language Foo cannot itself be written in Foo. More specifically, the first compiler for language Foo cannot be written in Foo, but any subsequent compiler could be written for Foo. But is this actually true? I have some very vague recollection of reading about a language ...
The intuition that a language cannot have a compiler written in itself, particularly for the first compiler, is a common initial assumption in programming language design and compiler theory. This is often tied to the idea of "bootstrapping," which involves writing a language's compiler in a different, often lower-leve...
28,558
[ { "from": "human", "value": "Intuitively, it would seems that a compiler for language Foo cannot itself be written in Foo. More specifically, the first compiler for language Foo cannot be written in Foo, but any subsequent compiler could be written for Foo.\nBut is this actually true? I have some very vague...
I'm looking for a dummy SQL statement that will work from a C# SQL connection to check for connectivity. Basically I need to send a request to the database, I don't care what it returns I just want it to be successful if the database is still there and throw an exception if the database isn't. The scenario I'm testing ...
To check the connectivity of a database in C# using SQL, you can execute a simple SQL command that doesn't depend on any specific data. A common practice is to run a simple `SELECT 1` query, which is lightweight and does not require any special setup in the database. If the database is not reachable, this query will th...
27,567
[ { "from": "human", "value": "I'm looking for a dummy SQL statement that will work from a C# SQL connection to check for connectivity.\nBasically I need to send a request to the database, I don't care what it returns I just want it to be successful if the database is still there and throw an exception if the...
Configuring synergy for multiple computers, each with a single screen, is fairly easy. But it is not so obvious how to configure multiple X11 screens. For example, sys1, a minimac is on the right. sys1 is the server and has a single monitor (screen). To the left of sys1 is a Fedora 9 system, sys2, with two X11 displ...
Configuring Synergy for multiple X11 screens, especially when you're mixing systems with different display setups, can be tricky but certainly possible. Below is a guide that walks through the configuration for your setup, where sys1 (Mac mini) is the server and sys2 (Fedora 9) has two X11 displays. ### Step 1: Instal...
25,939
[ { "from": "human", "value": "Configuring synergy for multiple computers, each with a single screen, is fairly easy. But it is not so obvious how to configure multiple X11 screens. For example, sys1, a minimac is on the right. sys1 is the server and has a single monitor (screen). To the left of sys1 is a ...
I have a repository using Rational ClearCase Explorer 2003.06.10+ which I want to migrate into Serena ChangeMan Version Manager 8.1.4.2. Is this possible? The ClearCase repository was not used for all it's functions, just as a place to hold copies of documents, so the only thing I need to keep is the files and their v...
Migrating from Rational ClearCase to Serena ChangeMan Version Manager (CM) can be a complex process, especially given the differences in how these systems manage version control and history. However, since you mentioned that you're primarily interested in keeping the files and their version histories, it is possible to...
26,103
[ { "from": "human", "value": "I have a repository using Rational ClearCase Explorer 2003.06.10+ which I want to migrate into Serena ChangeMan Version Manager 8.1.4.2.\nIs this possible? The ClearCase repository was not used for all it's functions, just as a place to hold copies of documents, so the only thi...
I'm trying to get some code working that a previous developer has written. Yep, he now left the company. :-( I have a JSON RPC call being made from the JS code. The JS all runs fine and the callback method gets an object back (not an error object). But the method on the Java class never gets hit. The smd method does ge...
Hi Jeff, It looks like you're trying to troubleshoot a JSON-RPC implementation in a Struts 2 application, and while you can hit the `smd()` method, the `updateRowValueForField()` method is not being called. Here are a few things to check: ### 1. Ensure Proper Method Annotation Make sure that the `@SMDMethod` annotati...
26,162
[ { "from": "human", "value": "I'm trying to get some code working that a previous developer has written.\nYep, he now left the company. :-(\nI have a JSON RPC call being made from the JS code.\nThe JS all runs fine and the callback method gets an object back (not an error object).\nBut the method on the Java...
I have recently been working with Python using Komodo Edit and other simpler editors but now I am doing a project which is to be done in C# using VS 08. I would appreciate any hints on how to get productive on that platform as quickly as possible.
Transitioning from Python and simpler editors to C# and Visual Studio (VS) 2008 can be a bit of a shift, but with some guidance, you can become productive in no time. Here are some tips to help you get started: ### 1. Familiarize Yourself with Visual Studio 2008 - **Explore the Interface**: Spend some time exploring t...
23,839
[ { "from": "human", "value": "I have recently been working with Python using Komodo Edit and other simpler editors but now I am doing a project which is to be done in C# using VS 08. I would appreciate any hints on how to get productive on that platform as quickly as possible.\n" }, { "from": "gpt", ...
I am working on a PHP application that intends to ease company workflow and project management, let's say something like Basecamp and GoPlan. I am not sure on what the best approach is, database-wise. Should I use a single database and add client-specific columns to each of the tables, or should I create a database for...
When designing a database architecture for a multi-tenant application like the one you're building, there are a few common approaches: **Single Database with Client-Specific Columns**, **Single Database with Tenant ID**, or **Separate Databases for Each Client**. Each approach has its pros and cons, and the choice larg...
26,977
[ { "from": "human", "value": "I am working on a PHP application that intends to ease company workflow and project management, let's say something like Basecamp and GoPlan.\nI am not sure on what the best approach is, database-wise. Should I use a single database and add client-specific columns to each of the...
I would like to know what kind of toolkits, languages, libraries exist for agent-based modeling and what are the pros/cons of them? Some examples of what I am thinking of are Swarm, Repast, and MASS.
Agent-based modeling (ABM) is a powerful methodology used in various fields to simulate and study complex systems comprised of autonomous agents. There are a variety of toolkits, languages, and libraries available for creating agent-based models. Below, I'll outline several notable options along with their pros and con...
20,876
[ { "from": "human", "value": "I would like to know what kind of toolkits, languages, libraries exist for agent-based modeling and what are the pros/cons of them?\nSome examples of what I am thinking of are\nSwarm, Repast, and MASS.\n" }, { "from": "gpt", "value": "Agent-based modeling (ABM) is a ...
I work in an Oracle shop. There's a toolset that consists of roughly 1000 Oracle Forms (using the Forms builder from 6i, early 90's software) with Oracle 10g on the back end. It's serving roughly 500 unique people a month, with 200 concurrent connections at any given time during the work day. Obviously this is someth...
Migrating from Oracle Forms to a more modern, web-based solution is indeed a significant undertaking, especially with the complexity of the existing forms and the need to support various operating systems and user environments. Here are several options and considerations for your migration: ### 1. **Java-Based Solutio...
22,262
[ { "from": "human", "value": "I work in an Oracle shop. There's a toolset that consists of roughly 1000 Oracle Forms (using the Forms builder from 6i, early 90's software) with Oracle 10g on the back end. It's serving roughly 500 unique people a month, with 200 concurrent connections at any given time duri...
I am currently using the following JavaScript to create an expanding menu: http://demo.raibledesigns.com/struts-menu/scripts/menuExpandable.js.src Currently, only the hyperlink text is clickable. What is the best way to have the icon next to the text respond to the click?
To make the icon next to the text clickable in your expanding menu, you will need to modify your HTML structure and possibly update the JavaScript that handles the click events. Here are some steps you can follow: ### 1. Update HTML Structure Make sure the icon and the hyperlink are contained within the same clickabl...
27,940
[ { "from": "human", "value": "I am currently using the following JavaScript to create an expanding menu:\nhttp://demo.raibledesigns.com/struts-menu/scripts/menuExpandable.js.src\nCurrently, only the hyperlink text is clickable. What is the best way to have the icon next to the text respond to the click?\n" ...
When using SubSonic, do you return the data as a dataset or do you put that in a strongly typed custom collection or a generic object? I ran through the subsonic project and for the four stored procs I have in my DB, it gave me a Sps.cs with 4 methods which return a StoredProcedure object. If you used a MVC, do you usu...
When working with SubSonic (or any ORM for that matter), the approach you take for data representation can vary based on your application's architecture, maintainability, and scalability needs. Below are some considerations regarding your questions: ### 1. Returning Data: Dataset vs. Strongly Typed Collections - **St...
25,937
[ { "from": "human", "value": "When using SubSonic, do you return the data as a dataset or do you put that in a strongly typed custom collection or a generic object?\nI ran through the subsonic project and for the four stored procs I have in my DB, it gave me a Sps.cs with 4 methods which return a StoredProce...
it appears if you have something like var my_var = {"foo" : "bar"}; in javascript (with firefox at least) and post it to a php server you will receive a string like {foo:"bar",} on the server side. But json_decode in php doesn't like the trailing ',' or the lack or quotes around 'foo'. Is there a nice way to clean ...
It looks like you've identified the root cause of the issue: the JavaScript code is generating improperly formatted JSON due to the use of unquoted keys and an extra trailing comma. However, if you ever encounter this situation again, here are a few general strategies to clean up the JSON string before parsing it with ...
28,378
[ { "from": "human", "value": "it appears if you have something like\nvar my_var = {\"foo\" : \"bar\"};\n\nin javascript (with firefox at least) and post it to a php server you will receive a string like\n{foo:\"bar\",}\n\non the server side. But json_decode in php doesn't like the trailing ',' or the lack o...
Today I had a discussion with a colleague about nested functions in Javascript: function a() { function b() { alert('boo') } var c = 'Bound to local call object.' d = 'Bound to global object.' } In this example, trials point out that b is not reachable outside the body of a, much like c is. However, ...
Your understanding of the scoping rules in JavaScript is mostly correct, and your observations about the behavior of nested functions and variable declarations are aligned with how JavaScript functions work. In your example, you have: ```javascript function a() { function b() { alert('boo'); } var c = ...
24,571
[ { "from": "human", "value": "Today I had a discussion with a colleague about nested functions in Javascript:\nfunction a() {\n function b() {\n alert('boo')\n }\n var c = 'Bound to local call object.'\n d = 'Bound to global object.'\n}\n\nIn this example, trials point out that b is not reachabl...
I'm looking for a container that keeps all its items in order. I looked at SortedList, but that requires a separate key, and does not allow duplicate keys. I could also just use an unsorted container and explicitly sort it after each insert. Usage: Occasional insert Frequent traversal in order Ideally not working wi...
It sounds like you're looking for a data structure that maintains its elements in a sorted order without requiring separate keys and allows for duplicates. While the .NET framework does not include a built-in data structure that perfectly matches your needs, you do have a couple of options that might work for you: 1. ...
25,879
[ { "from": "human", "value": "I'm looking for a container that keeps all its items in order. I looked at SortedList, but that requires a separate key, and does not allow duplicate keys. I could also just use an unsorted container and explicitly sort it after each insert.\nUsage:\n\nOccasional insert\nFrequ...
Hey all I'm hoping someone has enough experience with Cake PHP to make this work. I'm working on something that at the moment could affectionately be called a twitter clone. Essentially I have a set up like this. Users have many friends. This is a many to many relationship to the user table. It is stored in a link ta...
To replicate the SQL query you provided using CakePHP's ORM (Object-Relational Mapping), you will typically use the `contain` method along with a custom finder or condition in the `find` method. Given your requirement to retrieve tips from a specific user and their friends, you can follow these steps: 1. **Define the...
25,491
[ { "from": "human", "value": "Hey all I'm hoping someone has enough experience with Cake PHP to make this work. \nI'm working on something that at the moment could affectionately be called a twitter clone. Essentially I have a set up like this. \nUsers have many friends. This is a many to many relationship t...
I have a console application that require to use some code that need administrator level. I have read that I need to add a Manifest file myprogram.exe.manifest that look like that : <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <trust...
To ensure your console application raises a User Account Control (UAC) prompt when it starts, you need to ensure that the manifest file is properly embedded into your application during the build process, rather than just having a standalone `.manifest` file. Here’s how to do that and a few additional steps to ensure e...
23,300
[ { "from": "human", "value": "I have a console application that require to use some code that need administrator level. I have read that I need to add a Manifest file myprogram.exe.manifest that look like that :\n<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<assembly xmlns=\"urn:schemas-mic...
Is it possible to configure the default file extension that Oracle's Pro*COBOL precompiler assumes for EXEC SQL INCLUDE filename END-EXEC statements in which there is no filename specified for the include file? The docs seem specify that in this case - INCLUDE statement without file extension - the precompiler will u...
Yes, it is indeed possible to configure the default file extension for the `EXEC SQL INCLUDE` statements in Oracle's Pro*COBOL precompiler when no file extension is specified. By default, if you do not provide a file extension in an `EXEC SQL INCLUDE` statement, the Pro*COBOL precompiler will use the system's default...
28,735
[ { "from": "human", "value": "Is it possible to configure the default file extension that Oracle's Pro*COBOL precompiler assumes for \nEXEC SQL INCLUDE filename END-EXEC\n\nstatements in which there is no filename specified for the include file?\nThe docs seem specify that in this case - INCLUDE statement wi...
Solution -- WorkflowProject   -- Workflow1   -- Workflow2 -- WebProject (WAP)   -- App_Data     -- MyDatabase.vdb3   -- MyWebService.asmx   -- Web.Config Ok, so.. that's the basic "outline" of the project. The database, is stored in the website, and is a VistaDB database (this could also be an MSAccess or SQLite Databa...
To access the database located in the `App_Data` directory of your web project dynamically, without hardcoding the path, you can utilize the `|DataDirectory|` placeholder in your connection string. This placeholder gets resolved at runtime to the correct path of the `App_Data` directory. Here's how you can implement ...
26,051
[ { "from": "human", "value": "Solution\n-- WorkflowProject\n  -- Workflow1\n  -- Workflow2\n-- WebProject (WAP)\n  -- App_Data\n    -- MyDatabase.vdb3\n  -- MyWebService.asmx\n  -- Web.Config\nOk, so.. that's the basic \"outline\" of the project.\nThe database, is stored in the website, and is a VistaDB data...
The interop library is slow and needs MS Office installed. Many times you don't want to install MS Office on servers. I'd like to use Apache POI, but I'm on .NET. I need only to extract the text portion of the files, not creating nor "storing information" in Office files. I need to tell you that I've got a very large ...
If you are looking for an alternative to Apache POI for .NET to read the text from older binary MS Office files (like .doc, .xls, and .ppt), you have a few options to consider: 1. **NPOI**: This is a .NET port of the Apache POI project, and it supports both .xls (Excel) and .doc (Word) file formats. While it primarily...
27,256
[ { "from": "human", "value": "The interop library is slow and needs MS Office installed. \nMany times you don't want to install MS Office on servers.\nI'd like to use Apache POI, but I'm on .NET.\nI need only to extract the text portion of the files, not creating nor \"storing information\" in Office files.\...
I'm trying this: Type ThreadContextType = typeof(Application).GetNestedType("ThreadContext", System.Reflection.BindingFlags.NonPublic); MethodInfo FDoIdleMi = ThreadContextType.GetMethod("FDoIdle", BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { typeof(Int32) }, null); ThreadContextType is ok bu...
To access the `FDoIdle` method through reflection, it's important to ensure you're using the correct binding flags and parameters. Since `FDoIdle` comes from an interface and could be implemented by a class, it might be declared in a different way than you expect. Here's how to proceed step by step: 1. **Check the Me...
28,183
[ { "from": "human", "value": "I'm trying this:\nType ThreadContextType = typeof(Application).GetNestedType(\"ThreadContext\", System.Reflection.BindingFlags.NonPublic);\nMethodInfo FDoIdleMi = ThreadContextType.GetMethod(\"FDoIdle\", BindingFlags.NonPublic |\n BindingFlags.Instance, null, new Type[] { typ...
I am at the point where I need to add keys to my app. What are some of the possible solutions you guys used? I've looked at an earlier post so far, anything else before I decide. My 2 influential factors are: Price Ease of use Thanks
When it comes to adding keys to your app, there are several solutions you can consider based on your requirements for price and ease of use. Here are some options: ### 1. **API Key Management Services** - **AWS Secrets Manager**: This is a fully managed service that can store and manage API keys, passwords, and oth...
27,166
[ { "from": "human", "value": "I am at the point where I need to add keys to my app. What are some of the possible solutions you guys used? I've looked at an earlier post so far, anything else before I decide. My 2 influential factors are:\n\nPrice\nEase of use\n\nThanks\n" }, { "from": "gpt", "va...
I'm using a the TreeView control and it scrolls automatically to left-align TreeViewItem when one of them is clicked. I've gone looking at my Styles and ControlTemplates, but I haven't found anything. Is there a default ControlTemplate that causes this? I want to disable it.
In WPF, the `TreeView` control does not have a built-in behavior that automatically scrolls to left-align `TreeViewItem` when one is clicked. This could be due to the default styling or custom styles/templates applied to your `TreeView` or `TreeViewItem` controls. ### Possible Causes 1. **Custom Styles/Control Templa...
25,739
[ { "from": "human", "value": "I'm using a the TreeView control and it scrolls automatically to left-align TreeViewItem when one of them is clicked. I've gone looking at my Styles and ControlTemplates, but I haven't found anything. Is there a default ControlTemplate that causes this? I want to disable it.\n...
I am progamatically creating a SharePoint site using SPWeb spWeb = spSite.AllWebs.Add(...); What code do I need run to set the spWeb to turn off the "Show pages in navigation" option? Answer: publishingWeb.IncludePagesInNavigation = false;
To programmatically set the "Show pages in navigation" option to `false` for a SharePoint site (or page) when creating a new `SPWeb`, you can use the following code snippet. This assumes that you have created the `SPWeb` instance (i.e., `spWeb`) and that you are working with a publishing web. Here’s how you can turn o...
25,906
[ { "from": "human", "value": "I am progamatically creating a SharePoint site using \nSPWeb spWeb = spSite.AllWebs.Add(...);\n\nWhat code do I need run to set the spWeb to turn off the \"Show pages in navigation\" option?\nAnswer:\npublishingWeb.IncludePagesInNavigation = false;\n\n" }, { "from": "gpt...
I have a base class with an optional virtual function class Base { virtual void OnlyImplementThisSometimes(int x) {} }; When I compile this I get a warning about the unused param x. Is there some other way I should have implemented the virtual function? I have re-written it like this: class Base { virtual vo...
You've raised two important issues regarding the design and implementation of virtual functions in C++. Let's address them one by one. ### 1. Unused Parameter Warning The warning about the unused parameter `x` occurs because the compiler detects that you're not using the parameter in your implementation of `OnlyImple...
27,344
[ { "from": "human", "value": "I have a base class with an optional virtual function\nclass Base {\n virtual void OnlyImplementThisSometimes(int x) {}\n};\n\nWhen I compile this I get a warning about the unused param x. Is there some other way I should have implemented the virtual function? I have re-wri...
I have a .net project (MySolution.Common) that uses the app.config. I am using the project MySolution.Common in an InteropUserControl project called MySolution.InteropCtrl. MySolution.InteropCtrl is embedded into a VB6 project. When the MySolution.InteropCtrl is in the VB6 project, It cannot find the app.config file. E...
When you are using a .NET assembly (like `MySolution.Common`) within a VB6 application through an Interop UserControl (like `MySolution.InteropCtrl`), there are a few considerations regarding how .NET handles configuration files (e.g., `app.config`). ### Problem Overview The `.NET` runtime looks for the `app.config` f...
25,180
[ { "from": "human", "value": "I have a .net project (MySolution.Common) that uses the app.config. I am using the project MySolution.Common in an InteropUserControl project called MySolution.InteropCtrl. MySolution.InteropCtrl is embedded into a VB6 project. When the MySolution.InteropCtrl is in the VB6 proje...
Does anyone know how could I programatically disable/enable sleep mode on Windows Mobile? Thanks!
To programmatically enable or disable sleep mode on Windows Mobile, you typically need to use the Windows Mobile API. Specifically, you can manipulate power management settings using the `SetSystemPowerState` function or similar APIs. Here's a brief overview of how you might achieve this: ### Using `SetSystemPowerStat...
29,012
[ { "from": "human", "value": "Does anyone know how could I programatically disable/enable sleep mode on Windows Mobile?\nThanks!\n" }, { "from": "gpt", "value": "To programmatically enable or disable sleep mode on Windows Mobile, you typically need to use the Windows Mobile API. Specifically, you...
I have a batch file (in windows XP, with command extension activated) with the following line: for /f %%s in ('type version.txt') do set VERSION=%%s On some computer, it works just fine (as illustrated by this SO question), but on other it kills cmd (the console window just closes) Why ? Note: the computers seem to h...
The issue you are encountering with your batch file that leads to the command prompt closing unexpectedly could be due to several factors, despite having a seemingly similar configuration on the computers. Here are some possible reasons and solutions: 1. **File Existence and Content**: Ensure that `version.txt` exists...
28,047
[ { "from": "human", "value": "I have a batch file (in windows XP, with command extension activated) with the following line:\nfor /f %%s in ('type version.txt') do set VERSION=%%s\n\nOn some computer, it works just fine (as illustrated by this SO question), but on other it kills cmd (the console window just ...
I've got a byte() array returned as result of directx sound capture, but for other parts of my program I want to treat the results as single(). Is trundling down the array item by item the fastest way of doing it or is there a clever way to do it ? The code that gets it is CType(Me._applicationBuffer.Read(Me._nextCapt...
When you want to convert a `Byte()` array to a `Single()` array in .NET (or VB.NET), doing it item by item is indeed one approach, but it may not be the fastest way if you have a large array. Instead, you can use `Buffer.BlockCopy` to convert the byte array into a float array more efficiently. Here’s a breakdown of th...
21,441
[ { "from": "human", "value": "I've got a byte() array returned as result of directx sound capture, but for other parts of my program I want to treat the results as single(). Is trundling down the array item by item the fastest way of doing it or is there a clever way to do it ? \nThe code that gets it is\nCT...
I'm a bit surprised that this isn't on more forums as it is a total show stopper. I have a ASP.NET app that calls a web service I wrote. It is hosted on a shared hosting site. Recently the company moved my server to allow for both 1.1 and 2.0 applications. The trust level has changed from 'full' to 'medium' and my cod...
It sounds like you are facing a common challenge when dealing with shared hosting environments that impose stricter security and permissions. Here are some steps and strategies you can consider to work around the limitations imposed by the medium trust level: 1. **Review Your Code**: First, ensure that your code does ...
26,079
[ { "from": "human", "value": "I'm a bit surprised that this isn't on more forums as it is a total show stopper. \nI have a ASP.NET app that calls a web service I wrote. It is hosted on a shared hosting site. Recently the company moved my server to allow for both 1.1 and 2.0 applications. The trust level has ...
Timsort is an adaptive, stable, natural mergesort. It has supernatural performance on many kinds of partially ordered arrays (less than lg(N!) comparisons needed, and as few as N-1), yet as fast as Python's previous highly tuned samplesort hybrid on random arrays. Have you seen timsort used outside of C...
Yes, Timsort has been adopted outside of CPython and has found its way into several programming languages and libraries due to its efficiency, particularly with partially ordered data. Here are a few notable examples: 1. **Java**: The Java programming language's `Arrays.sort()` method for object arrays and the `Collec...
21,903
[ { "from": "human", "value": "\nTimsort is an adaptive, stable,\n natural mergesort. It has supernatural\n performance on many kinds of partially\n ordered arrays (less than lg(N!)\n comparisons needed, and as few as\n N-1), yet as fast as Python's previous\n highly tuned samplesort hybrid on\n random...
I'm looking for an example algorithm of smart pagination. By smart, what I mean is that I only want to show, for example, 2 adjacent pages to the current page, so instead of ending up with a ridiculously long page list, I truncate it. Here's a quick example to make it clearer... this is what I have now: Pages: 1 2 3 4 ...
Certainly! Smart pagination is a great way to keep your navigation clean and user-friendly. Below is a simple example of how you could implement smart pagination in PHP. ### PHP Code Example: ```php function generatePagination($currentPage, $totalPages) { $adjacents = 2; // Number of adjacent pages to show $p...
24,622
[ { "from": "human", "value": "I'm looking for an example algorithm of smart pagination. By smart, what I mean is that I only want to show, for example, 2 adjacent pages to the current page, so instead of ending up with a ridiculously long page list, I truncate it.\nHere's a quick example to make it clearer.....
I'm having a disagreement with someone over how best to implement a simple method that takes an array of integers, and returns the highest integer (using C# 2.0). Below are the two implementations - I have my own opinion of which is better, and why, but I'd appreciate any impartial opinions. Option A public int GetLarg...
Both options provided for implementing the `GetLargestValue` method have their strengths and weaknesses. Here's an impartial analysis of each implementation: ### Option A Analysis ```csharp public int GetLargestValue(int[] values) { try { Array.Sort(values); return values[values.Length - 1]; ...
29,507
[ { "from": "human", "value": "I'm having a disagreement with someone over how best to implement a simple method that takes an array of integers, and returns the highest integer (using C# 2.0).\nBelow are the two implementations - I have my own opinion of which is better, and why, but I'd appreciate any impar...
Is there any elegant way in the Android API for detecting new media when it is written to the device? I’m mainly interested in photos taken by the camera, video taken by the camera and audio recorded from the mic. My current thinking is to periodically scan each media content provider and filter based on last scan time...
Yes, there is a more elegant way to detect new media on an Android device using `ContentObserver`. Instead of periodically scanning the media content providers, you can register a `ContentObserver` to listen for changes in the media store database, which provides real-time notifications whenever new media is added or u...
24,447
[ { "from": "human", "value": "Is there any elegant way in the Android API for detecting new media when it is written to the device? I’m mainly interested in photos taken by the camera, video taken by the camera and audio recorded from the mic.\nMy current thinking is to periodically scan each media content p...
For example if I have an auto-numbered field, I add new records without specifying this field and let DB engine to pick it for me. So, will it pick the number of the deleted record? If yes, when? // SQL Server, MySQL. // Follow-up question: What happens when DB engine runs out of numbers to use for primary keys?
In both SQL Server and MySQL, auto-incrementing fields (such as auto-numbered fields) behave slightly differently when it comes to filling in gaps created by deleted records. ### Auto-increment Behavior: 1. **SQL Server:** - In SQL Server, if you delete a record, the auto-increment value (IDENTITY) does not reuse ...
27,519
[ { "from": "human", "value": "For example if I have an auto-numbered field, I add new records without specifying this field and let DB engine to pick it for me.\nSo, will it pick the number of the deleted record? If yes, when?\n// SQL Server, MySQL. //\nFollow-up question: What happens when DB engine runs ou...
I've personally always used some type of external application for my SCM work; these days, that means tortoiseSVN on windows and versions.app on the mac. However, I keep running up against developers (namely eclipse users) who argue that SCM is better done within the IDE itself. I've yet to hear any really compelling...
Your perspective on separating SCM tools from the IDE is certainly valid and has its own set of advantages. Here are some key points to consider for both approaches: ### Advantages of Using External SCM Applications 1. **Specialization**: External tools like TortoiseSVN or Versions.app are specialized applications de...
23,608
[ { "from": "human", "value": "I've personally always used some type of external application for my SCM work; these days, that means tortoiseSVN on windows and versions.app on the mac. However, I keep running up against developers (namely eclipse users) who argue that SCM is better done within the IDE itself...
I'm looking to implement a "Contact Us" form with Cherrypy and was wondering: Is there a good recipe (or a BSD licensed set of code) that I could use instead of reinventing the wheel? Ideally, this would be Cherrpy 3.1 compatible.
Certainly! While there may not be a specific "recipe" for a Contact Us form using CherryPy that's BSD licensed, I can provide you with a simple example of how to implement such a form using CherryPy 3.1. This will involve creating an HTML form and handling the form submission in your CherryPy application. Here’s a ba...
23,986
[ { "from": "human", "value": "I'm looking to implement a \"Contact Us\" form with Cherrypy and was wondering: Is there a good recipe (or a BSD licensed set of code) that I could use instead of reinventing the wheel?\nIdeally, this would be Cherrpy 3.1 compatible.\n" }, { "from": "gpt", "value": "...