instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
We're in the process of redesigning the customer-facing section of our site in .NET 3.5. It's been going well so far, we're using the same workflow and stored procedures, for the most part, the biggest changes are the UI, the ORM (from dictionaries to LINQ), and obviously the language. Most of the pages to this point h...
Refactoring a large and complex legacy codebase can indeed be challenging, especially when transitioning to a new architecture or language. Here are some tips to make your process easier and more efficient: 1. **Understand the Business Logic**: Before diving into code, take some time to understand the business process...
3,634
[ { "from": "human", "value": "We're in the process of redesigning the customer-facing section of our site in .NET 3.5. It's been going well so far, we're using the same workflow and stored procedures, for the most part, the biggest changes are the UI, the ORM (from dictionaries to LINQ), and obviously the la...
I have a java back-end that needs to expose services to clients running in the following environments : J2ME Windows Mobile iPhone I am looking for the best tool for each platform. I do not search a technology that works everywhere. I need something "light" adapted to low speed internet access. Right now I am using...
Given the constraints and requirements you've outlined, JSON does indeed emerge as a strong candidate for data interchange between your Java backend and the various mobile platforms you're targeting (J2ME, Windows Mobile, and iPhone). Here are some considerations for each platform: ### 1. **J2ME** For J2ME, you can us...
2,914
[ { "from": "human", "value": "I have a java back-end that needs to expose services to clients running in the following environments :\n\nJ2ME\nWindows Mobile\niPhone\n\nI am looking for the best tool for each platform.\nI do not search a technology that works everywhere.\nI need something \"light\" adapted t...
Ok, so there has to be a way to do this... no? If not I'd love some ideas. I have two repeaters and an image inside an update panel along with some AJAX dropdowns with link buttons to the left. I want to update the data inside the update panel as fast as possible as values are selected from the dropdowns. What do you...
Certainly! It sounds like you want to efficiently update the content of your UpdatePanel based on selections made in your dropdowns without needing to fetch new data from the server each time. Here are a few strategies you could consider: ### 1. Use JavaScript for Client-Side Filtering Instead of triggering a server r...
3,291
[ { "from": "human", "value": "Ok, so there has to be a way to do this... no? If not I'd love some ideas. \nI have two repeaters and an image inside an update panel along with some AJAX dropdowns with link buttons to the left. I want to update the data inside the update panel as fast as possible as values are...
I'm reading through head first design patterns at the moment and while the book is excellent I also would like to see how these are actually used in the real world. If you know of a good example of design pattern usage (preferably in a OSS program so we can have a look :) then please list it below.
Certainly! Here are some examples of design patterns as used in various open-source software projects. These examples can help you see how design patterns are implemented in real-world scenarios: 1. **Singleton Pattern**: **Example Project**: [Apache Log4j](https://logging.apache.org/log4j/2.x/) **Usage**: L...
677
[ { "from": "human", "value": "I'm reading through head first design patterns at the moment and while the book is excellent I also would like to see how these are actually used in the real world.\nIf you know of a good example of design pattern usage (preferably in a OSS program so we can have a look :) then ...
I have a .net web application that has a Flex application embedded within a page. This flex application calls a .net webservice. I can trace the execution proccess through the debugger and all looks great until I get the response: soap:ReceiverSystem.Web.Services.Protocols.SoapException: Server was unable to process...
The error message you're seeing indicates that the server is unable to process the response due to a missing root element in the SOAP response. This issue can arise from various factors, and below are several possible causes and solutions you can consider: ### Possible Causes and Solutions 1. **No Response Generated*...
1,101
[ { "from": "human", "value": "I have a .net web application that has a Flex application embedded within a page. This flex application calls a .net webservice. I can trace the execution proccess through the debugger and all looks great until I get the response:\n\n\n\nsoap:ReceiverSystem.Web.Services.Protocol...
I'm not sure how this question will be recieved here but lets give it a shot... It's time for me to get a new dev PC. What's the best choice these days? I typically have 2-3 Visual Studios open along with mail and all that stuff. Ideally I would imagine 2+ GB of RAM would be nice as my current XP box is dying. =) I hop...
It's great that you're looking to upgrade your development PC! Given your needs for running multiple instances of Visual Studio along with other applications, you'll want a machine that provides good performance and can handle multitasking effectively. Here are some considerations for your new dev PC: ### Processor 1...
3,667
[ { "from": "human", "value": "I'm not sure how this question will be recieved here but lets give it a shot...\nIt's time for me to get a new dev PC. What's the best choice these days?\nI typically have 2-3 Visual Studios open along with mail and all that stuff. Ideally I would imagine 2+ GB of RAM would be n...
Unchecked exceptions are alright if you want to handle every failure the same way, for example by logging it and skipping to the next request, displaying a message to the user and handling the next event, etc. If this is my use case, all I have to do is catch some general exception type at a high level in my system, an...
You've raised some important considerations regarding exception handling in a web application, especially when dealing with unchecked exceptions like `ConstraintViolationException` from Hibernate. Let's discuss how you can effectively manage this scenario while addressing your concerns about recoverability, abstraction...
402
[ { "from": "human", "value": "Unchecked exceptions are alright if you want to handle every failure the same way, for example by logging it and skipping to the next request, displaying a message to the user and handling the next event, etc. If this is my use case, all I have to do is catch some general except...
I would like to compare the contents of a couple of collections in my Equals method. I have a Dictionary and an IList. Is there a built-in method to do this? Edited: I want to compare two Dictionaries and two ILists, so I think what equality means is clear - if the two dictionaries contain the same keys mapped to the...
To compare two `Dictionary<TKey, TValue>` objects and two `IList<T>` collections in C#, you can create your own equality checks, as there are no built-in methods that directly provide this functionality in the form you might want. However, there are some useful methods available in the .NET framework that you can use t...
2,418
[ { "from": "human", "value": "I would like to compare the contents of a couple of collections in my Equals method. I have a Dictionary and an IList. Is there a built-in method to do this?\nEdited:\nI want to compare two Dictionaries and two ILists, so I think what equality means is clear - if the two dicti...
I have a web service (ASMX) and in it, a web method that does some work and throws an exception if the input wasn't valid. [ScriptMethod] [WebMethod] public string MyWebMethod(string input) { string l_returnVal; if (!ValidInput(input)) { string l_errMsg = System.Web.HttpUtility.HtmlEncode(GetErrorM...
The issue you're experiencing with special characters being misinterpreted in your error messages is likely due to encoding mismatches when your ASMX web service throws exceptions. Here’s how to ensure that the encoding is consistently applied throughout your service. ### 1. Ensure Proper Encoding in Your Web.config T...
2,145
[ { "from": "human", "value": "I have a web service (ASMX) and in it, a web method that does some work and throws an exception if the input wasn't valid.\n[ScriptMethod]\n[WebMethod]\npublic string MyWebMethod(string input)\n{\n string l_returnVal;\n\n if (!ValidInput(input))\n {\n string l_er...
I just saw a comment of suggesting J#, and it made me wonder... is there a real, beneficial use of J# over Java? So, my feeling is that the only reason you would even consider using J# is that management has decreed that the company should jump on the Java bandwagon... and the .NET bandwagon. If you use J#, you are e...
You've raised some interesting points about J# and its position in the landscape of programming languages, especially when compared to Java and C#. **Background on J#:** J# (pronounced "J-sharp") is a programming language developed by Microsoft as part of its .NET framework. It was designed to allow Java developers t...
3,193
[ { "from": "human", "value": "I just saw a comment of suggesting J#, and it made me wonder... is there a real, beneficial use of J# over Java? So, my feeling is that the only reason you would even consider using J# is that management has decreed that the company should jump on the Java bandwagon... and the ...
When asked to create system XYZ and you ask to do it in Python over PHP or Ruby, what are the main features you can mention when they require you to explain it?
When advocating for Python over PHP or Ruby for creating a system like XYZ, you can highlight several key features and advantages that make Python a compelling choice: 1. **Readability and Simplicity**: - Python is designed with an emphasis on code readability and simplicity, which makes it easier for developers to...
1,642
[ { "from": "human", "value": "When asked to create system XYZ and you ask to do it in Python over PHP or Ruby, what are the main features you can mention when they require you to explain it?\n" }, { "from": "gpt", "value": "When advocating for Python over PHP or Ruby for creating a system like XY...
What would be the best way to have a list of items with a checkbox each in Java Swing? I.e. a JList with items that have some text and a checkbox each?
Creating a list of items with a checkbox for each item in Java Swing can be achieved by using a combination of `JList`, a custom `ListCellRenderer`, and a model to hold the checkbox state. Here's a step-by-step guide to implement it: 1. **Create a model for the list items**: Each item should have a string (text) and a...
1,528
[ { "from": "human", "value": "What would be the best way to have a list of items with a checkbox each in Java Swing?\nI.e. a JList with items that have some text and a checkbox each?\n" }, { "from": "gpt", "value": "Creating a list of items with a checkbox for each item in Java Swing can be achie...
I have a control that, upon postback, saves form results back to the database. It populates the values to be saved by iterating through the querystring. So, for the following SQL statement (vastly simplified for the sake of discussion)... UPDATE MyTable SET MyVal1 = @val1, MyVal2 = @val2 WHERE @id = @id ...it woul...
To handle the situation where certain parameters may not be present in the query string, leading to the `SqlException` about missing parameter declarations, you can take a couple of different approaches without resorting to regular expressions or cluttering your SQL code with conditional checks. ### Approach 1: Dynami...
3,962
[ { "from": "human", "value": "I have a control that, upon postback, saves form results back to the database. It populates the values to be saved by iterating through the querystring. So, for the following SQL statement (vastly simplified for the sake of discussion)...\nUPDATE MyTable\nSET MyVal1 = @val1,\n ...
I have a tree structure in memory that I would like to render in HTML using a Django template. class Node(): name = "node name" children = [] There will be some object root that is a Node, and children is a list of Nodes. root will be passed in the content of the template. I have found this one discussion of how ...
Rendering a tree structure in a Django template can be done in a clean and efficient way without overcomplicating the code. Here's a simple approach using recursion in the template to render the tree structure. You can pass the root node of your tree to the template and then render it by calling a custom template tag o...
1,153
[ { "from": "human", "value": "I have a tree structure in memory that I would like to render in HTML using a Django template. \nclass Node():\n name = \"node name\"\n children = []\n\nThere will be some object root that is a Node, and children is a list of Nodes. root will be passed in the content of the te...
I'm trying to set the group type for a new Active Directory Entry via VB.NET and DirectoryServices to create a distribution list. How do I access the ADS_GROUP_TYPE enumerations? Specifically I'm after ADS_GROUP_TYPE_GLOBAL_GROUP.
To set the group type for a new Active Directory entry in VB.NET, you need to access the `ADS_GROUP_TYPE` enumerations. The `ADS_GROUP_TYPE` constants are defined in the Active Directory Services Interfaces (ADSI). You can use these constants to specify the type of group you want to create (in your case, a distribution...
2,268
[ { "from": "human", "value": "I'm trying to set the group type for a new Active Directory Entry via VB.NET and DirectoryServices to create a distribution list.\nHow do I access the ADS_GROUP_TYPE enumerations?\nSpecifically I'm after ADS_GROUP_TYPE_GLOBAL_GROUP.\n" }, { "from": "gpt", "value": "T...
I work in VBA, and want to parse a string eg <PointN xsi:type='typens:PointN' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xs='http://www.w3.org/2001/XMLSchema'> <X>24.365</X> <Y>78.63</Y> </PointN> and get the X & Y values into two separate integer variables. I'm a newbie when it comes to XML...
To parse XML in VBA, you can use the Microsoft XML library. Below is a step-by-step guide to extract the `X` and `Y` values from your XML string into two separate variables. 1. First, ensure you have the Microsoft XML library enabled in your VBA environment. You can do this by going to Tools -> References in the VBA e...
1,951
[ { "from": "human", "value": "I work in VBA, and want to parse a string eg\n<PointN xsi:type='typens:PointN' \nxmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' \nxmlns:xs='http://www.w3.org/2001/XMLSchema'>\n <X>24.365</X>\n <Y>78.63</Y>\n</PointN>\n\nand get the X & Y values into two separate int...
In the past I've never been a fan of using triggers on database tables. To me they always represented some "magic" that was going to happen on the database side, far far away from the control of my application code. I also wanted to limit the amount of work the DB had to do, as it's generally a shared resource and I al...
The use of triggers in database design can be a polarizing topic, and your perspective is shared by many developers and database administrators. Here’s a breakdown of the general consensus on triggers and some of the considerations involved in using them: ### Pros of Using Triggers: 1. **Automatic Actions**: Triggers ...
1,662
[ { "from": "human", "value": "In the past I've never been a fan of using triggers on database tables. To me they always represented some \"magic\" that was going to happen on the database side, far far away from the control of my application code. I also wanted to limit the amount of work the DB had to do, a...
I want to use the MultipleLookupField control in a web page that will run in the context of SharePoint. I was wondering if anyone would help me with an example, which shows step by step how to use the control two display two SPField Collections.
Certainly! The `MultipleLookupField` control in SharePoint is a powerful way to allow users to select multiple items from a list or library. Below is a step-by-step guide on how to use the `MultipleLookupField` control to display two SharePoint field collections on a webpage. ### Prerequisites 1. A SharePoint site wh...
1,267
[ { "from": "human", "value": "I want to use the MultipleLookupField control in a web page that will run in the context of SharePoint. I was wondering if anyone would help me with an example, which shows step by step how to use the control two display two SPField Collections.\n" }, { "from": "gpt", ...
We have a large database on which we have DB side pagination. This is quick, returning a page of 50 rows from millions of records in a small fraction of a second. Users can define their own sort, basically choosing what column to sort by. Columns are dynamic - some have numeric values, some dates and some text. While ...
To achieve natural sorting in SQL Server without modifying the original data, you can utilize a combination of string manipulation functions to create a derived sort key. This key will be used for sorting while keeping the original data intact. The general approach involves breaking down the alphanumeric strings into t...
573
[ { "from": "human", "value": "We have a large database on which we have DB side pagination. This is quick, returning a page of 50 rows from millions of records in a small fraction of a second.\nUsers can define their own sort, basically choosing what column to sort by. Columns are dynamic - some have numeri...
I have a listening port on my server that I'm connecting to using a Java class and the Socket interface, i.e. Socket mySocket = new Socket(host,port); I then grab an OutputStream, decorate with a PrintWriter in autoflush mode and I'm laughing - except if the listening port closes. Then I get tcp4 0 0 *.99...
When dealing with socket programming in Java, it's important to be aware that a socket can be in various states, and detecting whether it is still connected can be a bit tricky. The `isConnected()` method only indicates whether the socket was connected at some point; it does not account for whether the connection is st...
938
[ { "from": "human", "value": "I have a listening port on my server that I'm connecting to using a Java class and the Socket interface, i.e.\nSocket mySocket = new Socket(host,port);\n\nI then grab an OutputStream, decorate with a PrintWriter in autoflush mode and I'm laughing - except if the listening port c...
Ok, I have been working with Solaris for a 10+ years, and have never seen this... I have a directory listing which includes both a file and subdirectory with the same name: -rw-r--r-- 1 root other 15922214 Nov 29 2006 msheehan drwxrwxrwx 12 msheehan sysadmin 2048 Mar 25 15:39 msheehan I use file to disco...
It looks like you encountered a situation where a file and a directory had similar names, but the file had an unusual character at the end of its name, likely a non-printable or special character (like the `^?` you saw when you opened the file listing in your editor). This can occur due to various reasons, including ac...
3,276
[ { "from": "human", "value": "Ok, I have been working with Solaris for a 10+ years, and have never seen this...\nI have a directory listing which includes both a file and subdirectory with the same name:\n-rw-r--r-- 1 root other 15922214 Nov 29 2006 msheehan\ndrwxrwxrwx 12 msheehan sysadmin 204...
I want to build a lightweight linux configuration to use for development. The first idea is to use it inside a Virtual Machine under Windows, or old Laptops with 1Gb RAM top. Maybe even a distributable environment for developers. So the whole idea is to use a LAMP server, Java Application Server (Tomcat or Jetty) and X...
Here's a compilation of lightweight Linux distributions and window managers that can be used to create an efficient development environment, especially for older hardware or virtualized setups: ### Distros 1. **Ubuntu / Xubuntu** - **Pros:** - Familiarity and ease of use, especially for those transitioning fr...
1,314
[ { "from": "human", "value": "I want to build a lightweight linux configuration to use for development. The first idea is to use it inside a Virtual Machine under Windows, or old Laptops with 1Gb RAM top. Maybe even a distributable environment for developers.\nSo the whole idea is to use a LAMP server, Java ...
In SQL Server 2005, a snapshot of a database can be created that allows read-only access to a database, even when the database is in "recovery pending" mode. One use case for this capability is in creating a reporting database that references a copy of a production database, which is kept current through log-shipping...
In SQL Server 2005, database snapshots do inherit security settings from the source database, and you can't directly modify the security of the snapshot itself. However, there are a few workarounds you can consider to implement different security requirements for reporting purposes without modifying the original produc...
4,932
[ { "from": "human", "value": "In SQL Server 2005, a snapshot of a database can be created that allows read-only access to a database, even when the database is in \"recovery pending\" mode. One use case for this capability is in creating a reporting database that references a copy of a production database,...
I'm developing a data access component that will be used in a website that contains a mix of classic ASP and ASP.NET pages, and need a good way to manage its configuration settings. I'd like to use a custom ConfigurationSection, and for the ASP.NET pages this works great. But when the component is called via COM inter...
When dealing with a mixed environment of Classic ASP and ASP.NET, managing configuration settings can be a bit tricky, especially when trying to access a `ConfigurationSection` from your ASP.NET component when it's being called via COM interop from a Classic ASP page. The `ConfigurationManager` in ASP.NET is designed t...
1,366
[ { "from": "human", "value": "I'm developing a data access component that will be used in a website that contains a mix of classic ASP and ASP.NET pages, and need a good way to manage its configuration settings.\nI'd like to use a custom ConfigurationSection, and for the ASP.NET pages this works great. But ...
Story: The user uploads an image that will be added to a photo gallery. As part of the upload process, we need to A) store the image on the web server's hard drive and B) store a thumbnail of the image on the web server's hard drive. "Best" here is defined as Relatively easy to implement, understand, and maintain R...
To implement the process of uploading an image and creating a thumbnail for a photo gallery, you can follow a straightforward approach using a server-side programming language like PHP, along with a popular image manipulation library. Below, I'll outline a simple implementation using PHP and the GD library to meet your...
1,372
[ { "from": "human", "value": "Story: The user uploads an image that will be added to a photo gallery. As part of the upload process, we need to A) store the image on the web server's hard drive and B) store a thumbnail of the image on the web server's hard drive.\n\"Best\" here is defined as \n\nRelatively...
I am considering to apply Entity Framework in a new project because I liked its OR/M-API as well as the storage/conceptual model mapping-capabilities (plus Linq of course and Entity SQL). But how can loose coupling be achieved betwen the UI layer and the business layer if EF entities are used as dataholders in both. If...
You're right to be concerned about maintaining loose coupling between the UI and business layers when using Entity Framework (EF) in your application. It's a common challenge in applications that use an ORM, as the temptation to bind UI components directly to EF entities can lead to issues like bypassing business logic...
3,275
[ { "from": "human", "value": "I am considering to apply Entity Framework in a new project because I liked its OR/M-API as well as the storage/conceptual model mapping-capabilities (plus Linq of course and Entity SQL).\nBut how can loose coupling be achieved betwen the UI layer and the business layer if EF en...
This is something I've pseudo-solved many times and have never quite found a solution for. The problem is to come up with a way to generate N colors, that are as distinguishable as possible where N is a parameter.
Generating a set of N distinguishable colors can be a challenging task, especially as N increases. However, there are several methods to achieve this, depending on your requirements for color differentiation, aesthetics, and specific application (e.g., data visualization, art, etc.). Here are some approaches you might ...
1,439
[ { "from": "human", "value": "This is something I've pseudo-solved many times and have never quite found a solution for.\nThe problem is to come up with a way to generate N colors, that are as distinguishable as possible where N is a parameter.\n" }, { "from": "gpt", "value": "Generating a set of...
I'm trying to set up an inheritance hierarchy similar to the following: abstract class Vehicle { public string Name; public List<Axle> Axles; } class Motorcycle : Vehicle { } class Car : Vehicle { } abstract class Axle { public int Length; public void Turn(int numTurns) { ... } } class MotorcycleAxle : Axle...
To achieve strong typing while maintaining a clean design in your inheritance hierarchy, you can use generics in your `Vehicle` class. This will allow you to specify the type of `Axle` that each vehicle uses without losing the benefits of strong typing and polymorphism. Here's how you could modify your classes: ```csh...
3,202
[ { "from": "human", "value": "I'm trying to set up an inheritance hierarchy similar to the following:\nabstract class Vehicle\n{\n public string Name;\n public List<Axle> Axles;\n}\n\nclass Motorcycle : Vehicle\n{\n}\n\nclass Car : Vehicle\n{\n}\n\nabstract class Axle\n{\n public int Length;\n public voi...
I am doing an e-commerce solution in ASP.NET which uses PayPal's Website Payments Standard service. Together with that I use a service they offer (Payment Data Transfer) that sends you back order information after a user has completed a payment. The final thing I need to do is to parse the POST request from them and pe...
To handle and parse the raw HTTP POST data sent by PayPal's Payment Data Transfer in an ASP.NET application, you'll need to follow these general steps. This can be done in an ASP.NET Web Forms application, ASP.NET MVC, or ASP.NET Core. I will outline a general approach that can be adapted to any of these frameworks. #...
2,203
[ { "from": "human", "value": "I am doing an e-commerce solution in ASP.NET which uses PayPal's Website Payments Standard service. Together with that I use a service they offer (Payment Data Transfer) that sends you back order information after a user has completed a payment. The final thing I need to do is t...
It's not just a capture I'm looking to do here. I want to first capture the packet, then in real time, check the payload for specific data, remove it, inject a signature and reinject the packet into the stack to be sent on as before. I had a read of the ipfw divert sockets using IPFW and it looks very promising. What a...
To accomplish packet capture, modification, and reinjection in real time on a network interface, you're looking at a few potential solutions that can involve low-level programming with `divert sockets` using `IPFW` on FreeBSD (or similar systems), or alternatively, using libraries in higher-level languages like Java. ...
2,389
[ { "from": "human", "value": "It's not just a capture I'm looking to do here. I want to first capture the packet, then in real time, check the payload for specific data, remove it, inject a signature and reinject the packet into the stack to be sent on as before.\nI had a read of the ipfw divert sockets usin...
I have a .exe and many plug-in .dll modules that the .exe loads. (I have source for both.) A cross-platform (with source) solution would be ideal, but the platform can be narrowed to WinXP and Visual Studio (7.1/2003 in my case). The built-in VS leak detector only gives the line where new/malloc was called from, but I ...
To build a leak detection tool that works well with your `.exe` and its accompanying `.dll` modules, you can consider the following approach, leveraging your existing knowledge of C/C++ and the capabilities of Visual Studio 2003. This method will allow for symbolic stack tracing and will work across both the executable...
1,181
[ { "from": "human", "value": "I have a .exe and many plug-in .dll modules that the .exe loads. (I have source for both.) A cross-platform (with source) solution would be ideal, but the platform can be narrowed to WinXP and Visual Studio (7.1/2003 in my case).\nThe built-in VS leak detector only gives the lin...
One of our legacy applications relies heavily on PostThreadMessage() for inter-thread communication, so we increased USERPostMessageLimit in the registry (way) beyond the normal 10.000. However, documentation on MSDN states that "This limit should be sufficiently large. If your application exceeds the limit, it should ...
When working with inter-thread communication in Windows, especially using mechanisms like `PostThreadMessage()`, it’s important to understand the implications of exceeding limits such as `USERPostMessageLimit`. Here’s an overview of how consuming too many system resources can manifest, what constitutes system resources...
3,263
[ { "from": "human", "value": "One of our legacy applications relies heavily on PostThreadMessage() for inter-thread communication, so we increased USERPostMessageLimit in the registry (way) beyond the normal 10.000.\nHowever, documentation on MSDN states that \"This limit should be sufficiently large. If you...
I'm writing an application that is basically just a preferences dialog, much like the tree-view preferences dialog that Visual Studio itself uses. The function of the application is simply a pass-through for data from a serial device to a file. It performs many, many transformations on the data before writing it to the...
You're certainly not alone in finding tree-view preferences dialogs to be cumbersome to design and implement, especially with the approach you've described. Your current approach is one common way to implement such a dialog, but there are alternative strategies that can simplify both the design and runtime behavior of ...
2,553
[ { "from": "human", "value": "I'm writing an application that is basically just a preferences dialog, much like the tree-view preferences dialog that Visual Studio itself uses. The function of the application is simply a pass-through for data from a serial device to a file. It performs many, many transformat...
One simple method I've used in the past is basically just creating a second table whose structure mirrors the one I want to audit, and then create an update/delete trigger on the main table. Before a record is updated/deleted, the current state is saved to the audit table via the trigger. While effective, the data in ...
Auditing sensitive information is crucial, and while your method using a trigger to populate an audit table is a common approach, it can lead to challenges in terms of reporting and data analysis. Here are some alternative methods and best practices for auditing changes that might provide more clarity and usability for...
3,523
[ { "from": "human", "value": "One simple method I've used in the past is basically just creating a second table whose structure mirrors the one I want to audit, and then create an update/delete trigger on the main table. Before a record is updated/deleted, the current state is saved to the audit table via t...
is there a solution for batch insert via hibernate in partitioned postgresql table? currently i'm getting an error like this... ERROR org.hibernate.jdbc.AbstractBatcher - Exception executing batch: org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expec...
The error you are encountering (`StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1`) typically occurs in Hibernate when it tries to perform a batch insert or update and the expected number of rows affected does not match the actual result from the database...
3,225
[ { "from": "human", "value": "is there a solution for batch insert via hibernate in partitioned postgresql table? currently i'm getting an error like this...\nERROR org.hibernate.jdbc.AbstractBatcher - Exception executing batch:\norg.hibernate.StaleStateException: Batch update returned unexpected row count ...
I'm about to deploy a mediumsized site powered by Django. I have a dedicated Ubuntu Server. I'm really confused over which serversoftware to use. So i thought to myself: why not ask stackoverflow. What i'm looking for is: Easy to set up Fast and easy on resources Can serve mediafiles Able to serve multiple djangosite...
Deploying a Django application can indeed be confusing when you're considering the various server options available. Let's break down your considerations and look at some of the popular options, along with their pros and cons. ### 1. **Gunicorn + Nginx** **Pros:** - **Easy to Set Up:** Gunicorn is straightforward to i...
2,101
[ { "from": "human", "value": "I'm about to deploy a mediumsized site powered by Django. I have a dedicated Ubuntu Server. \nI'm really confused over which serversoftware to use. So i thought to myself: why not ask stackoverflow.\nWhat i'm looking for is:\n\nEasy to set up\nFast and easy on resources\nCan ser...
I have been trying to implement Win32's MessageBox using GTK. The app uses SDL/OpenGL, so this isn't a GTK app. I handle the initialization (gtk_init) sort of stuff inside the MessageBox function as follows: int MessageBox(HWND hwnd, const char* text, const char* caption, UINT type) { GtkWidget *window = NULL; ...
Your approach to implementing a MessageBox-like function using GTK in a non-GTK application has some issues that can lead to the behavior you're experiencing (the dialog hanging around until the application exits). The key points to address are the handling of the GTK main loop and the destruction of the dialog. Here's...
2,246
[ { "from": "human", "value": "I have been trying to implement Win32's MessageBox using GTK. The app uses SDL/OpenGL, so this isn't a GTK app.\nI handle the initialization (gtk_init) sort of stuff inside the MessageBox function as follows:\nint MessageBox(HWND hwnd, const char* text, const char* caption, UINT...
We recently discovered that the Google Maps API does not play nicely with SSL. Fair enough, but what are some options for overcoming this that others have used effectively? Will the Maps API work over SSL (HTTPS)? At this time, the Maps API is not available over a secure (SSL) connection. If you are running the ...
It seems that you're dealing with a common challenge when integrating the Google Maps API into a secure (SSL) environment. The statement you provided suggests that you may be referencing outdated information, as the Google Maps JavaScript API has supported secure (HTTPS) connections for quite some time. However, if you...
1,496
[ { "from": "human", "value": "We recently discovered that the Google Maps API does not play nicely with SSL. Fair enough, but what are some options for overcoming this that others have used effectively?\n\nWill the Maps API work over SSL (HTTPS)?\nAt this time, the Maps API is not\n available over a secure...
A few months back I was tasked with implementing a unique and random code for our web application. The code would have to be user friendly and as small as possible, but still be essentially random (so users couldn't easily predict the next code in the sequence). It ended up generating values that looked something like...
Your current implementation is creative and does have some positive aspects, especially regarding the balance between uniqueness and user-friendliness. However, there are certainly alternative approaches you could consider that might improve upon your solution, especially if you’re concerned about predictability and ra...
1,460
[ { "from": "human", "value": "A few months back I was tasked with implementing a unique and random code for our web application. The code would have to be user friendly and as small as possible, but still be essentially random (so users couldn't easily predict the next code in the sequence).\nIt ended up ge...
I'm developing a library alongside several projects that use it, and I've found myself frequently modifying the library at the same time as a project (e.g., adding a function to the library and immediately using it in the project). As a result, the project would no longer compile with previous versions of the library. ...
To automatically track the version of your library used in your projects during check-in, you can follow a systematic approach. Here are a few methods that can help you achieve this: ### 1. Use Git Submodules or Git Subtree If your library is in a separate Git repository, consider using Git submodules or Git subtree....
3,721
[ { "from": "human", "value": "I'm developing a library alongside several projects that use it, and I've found myself frequently modifying the library at the same time as a project (e.g., adding a function to the library and immediately using it in the project).\nAs a result, the project would no longer compi...
Sometimes I have to work on code that moves the computer clock forward. In this case some .cpp or .h files get their latest modification date set to the future time. Later on, when my clock is fixed, and I compile my sources, system rebuilds most of the project because some of the latest modification dates are in the f...
It sounds like you're encountering a common issue when manipulating system time, especially in the context of build systems that rely on file timestamps to determine what needs to be rebuilt. Unfortunately, there isn't a built-in setting in Visual Studio that allows you to change how it detects changes (i.e., switching...
2,714
[ { "from": "human", "value": "Sometimes I have to work on code that moves the computer clock forward. In this case some .cpp or .h files get their latest modification date set to the future time.\nLater on, when my clock is fixed, and I compile my sources, system rebuilds most of the project because some of ...
Even though I have a robust and fast computer (Pentium Dual Core 2.0 with 2Gb RAM), I'm always searching for lightweight software to have on it, so it runs fast even when many apps are up and running simultaneously. On the last few weeks I've been migrating gradually to Linux and want to install a free lightweight yet ...
It's great that you're transitioning to Linux! For your needs—C++ and PHP development with a focus on lightweight and efficient IDEs—here are some options that offer syntax highlighting and code completion while being relatively light on system resources: ### Lightweight IDEs for C++ and PHP: 1. **Geany** - **Desc...
2,470
[ { "from": "human", "value": "Even though I have a robust and fast computer (Pentium Dual Core 2.0 with 2Gb RAM), I'm always searching for lightweight software to have on it, so it runs fast even when many apps are up and running simultaneously.\nOn the last few weeks I've been migrating gradually to Linux a...
I'm using Visual C++ 2005 and would like to know the simplest way to connect to a MS SQL Server and execute a query. I'm looking for something as simple as ADO.NET's SqlCommand class with it's ExecuteNonQuery(), ExecuteScalar() and ExecuteReader(). Sigh offered an answer using CDatabase and ODBC. Can anybody demonstrat...
Certainly! Using ATL (Active Template Library) with OLE DB is a powerful way to work with SQL Server in C++. Below is a simple example that demonstrates how to connect to a Microsoft SQL Server database using ATL's OLE DB consumer templates and execute a query. ### Step 1: Set Up Your Project Make sure to set up your ...
112
[ { "from": "human", "value": "I'm using Visual C++ 2005 and would like to know the simplest way to connect to a MS SQL Server and execute a query.\nI'm looking for something as simple as ADO.NET's SqlCommand class with it's ExecuteNonQuery(), ExecuteScalar() and ExecuteReader().\nSigh offered an answer using...
I'm trying to fetch some HTML from various blogs and have noticed that different providers use the same tag in different ways. For example, here are two major providers that use the meta name generator tag differently: Blogger: <meta content='blogger' name='generator'/> (content first, name later and, yes, single quot...
To extract the value of the `content` attribute from the `<meta name="generator">` tag, regardless of whether the attribute is defined with single or double quotes, or the order of the attributes, you can use a regular expression pattern. Here’s a regex pattern that will help you achieve this: ```regex <meta\s+(?:nam...
137
[ { "from": "human", "value": "I'm trying to fetch some HTML from various blogs and have noticed that different providers use the same tag in different ways.\nFor example, here are two major providers that use the meta name generator tag differently:\n\nBlogger: <meta content='blogger' name='generator'/> (con...
Imagine you want to animate some object on a WinForm. You setup a timer to update the state or model, and override the paint event of the Form. But from there, what's the best way to continually repaint the Form for the animation? Invalidate the Form as soon as you are done drawing? Setup a second timer and invalidate...
Animating objects on a WinForms application can indeed be a bit tricky, but there are well-established patterns and practices that can help you achieve smooth animations. Here’s a consolidated approach based on common practices and community recommendations: ### 1. Use a Timer Using a `System.Windows.Forms.Timer` is a...
1,953
[ { "from": "human", "value": "Imagine you want to animate some object on a WinForm. You setup a timer to update the state or model, and override the paint event of the Form. But from there, what's the best way to continually repaint the Form for the animation?\n\nInvalidate the Form as soon as you are done d...
What options are there in the industry for enterprise reporting? I'm currently using SSRS 2005, and know that there is another version coming out with the new release of MSSQL. But, it seems like it might also be a good time to investigate the market to see what else is out there. What have you encountered? Do you li...
When considering options for enterprise reporting, especially if you're currently using SQL Server Reporting Services (SSRS) 2005 and thinking about exploring other solutions, there are several robust options available in the market. Below are some notable reporting tools, along with their pros and cons. ### 1. **Micr...
1,882
[ { "from": "human", "value": "What options are there in the industry for enterprise reporting? I'm currently using SSRS 2005, and know that there is another version coming out with the new release of MSSQL.\nBut, it seems like it might also be a good time to investigate the market to see what else is out th...
I'm using Struts 2. I'd like to return from an Action to the page which invoked it. Say I'm in page x.jsp, I invoke Visual action to change CSS preferences in the session; I want to return to x.jsp rather than to a fixed page (i.e. home.jsp) Here's the relevant struts.xml fragment: <action name="Visual" class="...
In Struts 2, there isn't a built-in magic constant for returning to the calling page directly. However, you can achieve your goal by using a couple of methods. Here are a few approaches you can consider: ### 1. Use a Hidden Field or Session Variable One common method is to pass the "referer" URL to your action, so you...
2,000
[ { "from": "human", "value": "I'm using Struts 2.\nI'd like to return from an Action to the page which invoked it.\nSay I'm in page x.jsp, I invoke Visual action to change CSS preferences in the session; I want to return to x.jsp rather than to a fixed page (i.e. home.jsp)\nHere's the relevant struts.xml fra...
I'm trying to find the best design for the following scenario - an application to store results of dance competitions. An event contains multiple rounds, each round contains a number of performances (one per dance). Each performance is judged by many judges, who return a scoresheet. There are two types of rounds, a fi...
Designing a data model for your dance competition application requires balancing normalization, ease of access, and clear differentiation between the final round and normal rounds without causing unnecessary duplication. Below is a refined design suggestion that maintains a single hierarchy with polymorphic behavior wh...
2,367
[ { "from": "human", "value": "I'm trying to find the best design for the following scenario - an application to store results of dance competitions. \nAn event contains multiple rounds, each round contains a number of performances (one per dance). Each performance is judged by many judges, who return a score...
I have a library that reads/writes to a USB-device using CreateFile() API. The device happens to implement the HID-device profile, such that it's compatible with Microsoft's HID class driver. Some other application installed on the system is opening the device in read/write mode with no share mode. Which prevents my li...
It sounds like you're encountering a common issue with HID devices where one application holds an exclusive lock on the device, preventing other applications from accessing it. When opening a device in Windows, using the `CreateFile()` function without any share mode means that you want exclusive access to the device, ...
3,069
[ { "from": "human", "value": "I have a library that reads/writes to a USB-device using CreateFile() API. The device happens to implement the HID-device profile, such that it's compatible with Microsoft's HID class driver.\nSome other application installed on the system is opening the device in read/write mod...
I have two programs. One is in C# and another one in Java. Those programs will, most probably, always run on the same machine. What would be the best way to let them talk to each other? So, to clarify the problem: This is a personal project (so professional/costly libraries are a no go). The message volume is low, ther...
Using sockets with a simple CSV-like format is a reasonable and straightforward approach for inter-process communication (IPC) between your C# and Java applications, especially since they will be running on the same machine and the message volume is low. This method allows for a relatively simple implementation without...
1,414
[ { "from": "human", "value": "I have two programs. One is in C# and another one in Java.\nThose programs will, most probably, always run on the same machine.\nWhat would be the best way to let them talk to each other?\nSo, to clarify the problem:\nThis is a personal project (so professional/costly libraries ...
I'm a bit newbieish when it comes to the deeper parts of OSX configuration and am having to put up with a fairly irritating niggle which while I can put up with it, I know under Windows I could have sorted in minutes. Basically, I have an external disk with two volumes: One is an HFS+ volume which I use for TimeMachin...
It sounds like you've already done quite a bit of research and experimentation to resolve the issue with the NTFS volume automatically mounting on your Mac. For anyone else facing a similar problem, here's a comprehensive guide to prevent an NTFS volume from auto-mounting on macOS using the `fstab` method. ### Prevent...
3,382
[ { "from": "human", "value": "I'm a bit newbieish when it comes to the deeper parts of OSX configuration and am having to put up with a fairly irritating niggle which while I can put up with it, I know under Windows I could have sorted in minutes.\nBasically, I have an external disk with two volumes: \nOne i...
When using Office Interop in C#, if you insert a chart object into a MS Word document, the Grap application loads up very briefly and then goes away. Is there a way to prevent this from happening? I have tried setting the Visible property of the application instance to false to no effect. EDIT: The Visible property doe...
When working with Office Interop in C#, it's common for the Graph application to flash briefly when you insert charts or work with data. Although setting the `Visible` property of the Word application instance to false works for Word, the behavior of the Graph application can be different because it is designed to show...
1,825
[ { "from": "human", "value": "When using Office Interop in C#, if you insert a chart object into a MS Word document, the Grap application loads up very briefly and then goes away. Is there a way to prevent this from happening? I have tried setting the Visible property of the application instance to false to ...
I currently have a relatively small (4 or 5 tables, 5000 rows) MySQL database that I would like to convert to an sqlite database. As I'd potentially have to do this more than once, I'd be grateful if anyone could recommend any useful tools, or at least any easily-replicated method. (I have complete admin access to the...
Converting a MySQL database to SQLite can be done using several methods, ranging from manual exports and imports to using specialized tools. Here are some methods and tools you can use to make this process easier: ### Method 1: Using SQLite3 Command-Line Tool 1. **Export MySQL Database to SQL File**: You can expo...
2,636
[ { "from": "human", "value": "I currently have a relatively small (4 or 5 tables, 5000 rows) MySQL database that I would like to convert to an sqlite database. As I'd potentially have to do this more than once, I'd be grateful if anyone could recommend any useful tools, or at least any easily-replicated met...
This is a very specific question regarding MySQL as implemented in WordPress. I'm trying to develop a plugin that will show (select) posts that have specific 'tags' and belong to specific 'categories' (both multiple) I was told it's impossible because of the way categories and tags are stored: wp_posts contains a list...
To query posts in WordPress that match specific tags and categories, you will need to perform a series of `JOIN` operations on the WordPress database tables you've mentioned. Here's how you can structure your SQL query to select posts that have the tags "Nuclear" and "Deals" and belong to the category "Category1". Fir...
1,660
[ { "from": "human", "value": "This is a very specific question regarding MySQL as implemented in WordPress.\nI'm trying to develop a plugin that will show (select) posts that have specific 'tags' and belong to specific 'categories' (both multiple)\nI was told it's impossible because of the way categories and...
I've recently taken up learning some C# and wrote a Yahtzee clone. My next step (now that the game logic is in place and functioning correctly) is to integrate some method of keeping stats across all the games played. My question is this, how should I go about storing this information? My first thought would be to us...
It's great to hear that you've made progress on your Yahtzee clone! Both database and XML file options have their own merits, so let's consider both approaches. ### Using a Database Using a database can be advantageous if you expect to scale your application, handle complex queries, or if you plan to keep a large amo...
1,963
[ { "from": "human", "value": "I've recently taken up learning some C# and wrote a Yahtzee clone. My next step (now that the game logic is in place and functioning correctly) is to integrate some method of keeping stats across all the games played.\nMy question is this, how should I go about storing this inf...
Is there any feasible way of using generics to create a Math library that does not depend on the base type chosen to store data? In other words, let's assume I want to write a Fraction class. The fraction can be represented by two ints or two doubles or whatnot. The important thing is that the basic four arithmetic ope...
Creating a generic `Fraction<T>` class that can handle arithmetic operations for different numeric types in C# (or similar languages) is indeed a common challenge due to the lack of built-in support for operator overloading in generics. However, there are a few approaches that can help achieve this. ### 1. Using Inter...
2,627
[ { "from": "human", "value": "Is there any feasible way of using generics to create a Math library that does not depend on the base type chosen to store data?\nIn other words, let's assume I want to write a Fraction class. The fraction can be represented by two ints or two doubles or whatnot. The important t...
Do you normally set your compiler to optimize for maximum speed or smallest code size? or do you manually configure individual optimization settings? Why? I notice most of the time people tend to just leave compiler optimization settings to their default state, which with visual c++ means max speed. I've always felt th...
Compiler optimization settings can significantly impact the performance and size of compiled programs, and your approach to configuring them depends on the specific goals of your project and the context in which it will be executed. Here are some considerations regarding optimization settings: 1. **Default Settings**...
5,447
[ { "from": "human", "value": "Do you normally set your compiler to optimize for maximum speed or smallest code size? or do you manually configure individual optimization settings? Why?\nI notice most of the time people tend to just leave compiler optimization settings to their default state, which with visua...
I'm a complete Xcode/Objective-C/Cocoa newbie but I'm learning fast and really starting to enjoy getting to grips with a new language, platform and paradigm. One thing is though, having been using Visual Studio with R# for so long I've kind of been spoiled with the coding tools such as refactorings and completion etc a...
Welcome to the world of Xcode and Objective-C! You're correct that Xcode's refactoring tools and code completion features are not as extensive as what you might be accustomed to with Visual Studio and ReSharper. However, there are a few built-in features and some third-party tools that can help enhance your coding expe...
2,702
[ { "from": "human", "value": "I'm a complete Xcode/Objective-C/Cocoa newbie but I'm learning fast and really starting to enjoy getting to grips with a new language, platform and paradigm.\nOne thing is though, having been using Visual Studio with R# for so long I've kind of been spoiled with the coding tools...
In the latest version of WordPress, it gives you the opportunity to view a preview of what your site would look like using a different theme. You basically just click on the theme, it takes over the screen and you have a chance to activate or close it (and return to the previous screen, which is grayed out in the backg...
The technique you’re describing is commonly referred to as a **modal window** or **lightbox** effect. It is often used to display content, images, or previews without navigating away from the current page. Here’s a breakdown of the technologies and techniques typically involved in creating such effects: ### Technologi...
1,116
[ { "from": "human", "value": "In the latest version of WordPress, it gives you the opportunity to view a preview of what your site would look like using a different theme. You basically just click on the theme, it takes over the screen and you have a chance to activate or close it (and return to the previous...
I'm about to implement a feature in our application that allows the user to 'upload' a PDF or Microsoft PowerPoint document, which the application will then make available to other users in a viewer (so they don't get to 'download' it in the 'Save as..' sense). I already know how to save and retrieve arbitrary binary i...
When implementing file upload features, especially for large files like PDFs or PowerPoint presentations (which may include videos), you're correct to consider how to manage the storage efficiently. Storing large binary files (BLOBs) directly in your database can lead to significant database growth and might affect per...
2,056
[ { "from": "human", "value": "I'm about to implement a feature in our application that allows the user to 'upload' a PDF or Microsoft PowerPoint document, which the application will then make available to other users in a viewer (so they don't get to 'download' it in the 'Save as..' sense).\nI already know h...
I have an application that sometimes causes a BSOD on a Win XP machine. Trying to find out more, I loaded up the resulting *.dmp file (from C:\Windows\Minidump), but get this message when in much of the readout when doing so: ********************************************************************* * Symbols can not be lo...
The message you are seeing indicates that the Windows Debugger (WinDbg) cannot locate the necessary symbol files to interpret the minidump file correctly. Symbol files contain information that helps debuggers understand the structure of the code in an executable, including function names, variable names, and source fil...
3,389
[ { "from": "human", "value": "I have an application that sometimes causes a BSOD on a Win XP machine. Trying to find out more, I loaded up the resulting *.dmp file (from C:\\Windows\\Minidump), but get this message when in much of the readout when doing so:\n*************************************************...
As part of our current database work, we are looking at a dealing with the process of updating databases. A point which has been brought up recurrently, is that of dealing with system vs. user values; in our project user and system vals are stored together. For example... We have a list of templates. 1, <system templat...
Both approaches you've outlined have their merits and drawbacks, and your inclination towards the first option—using a numerical range for IDs—is understandable given its simplicity and ease of implementation. However, it’s essential to consider a few factors to solidify your stance and address any potential concerns o...
2,950
[ { "from": "human", "value": "As part of our current database work, we are looking at a dealing with the process of updating databases.\nA point which has been brought up recurrently, is that of dealing with system vs. user values; in our project user and system vals are stored together. For example...\nWe h...
I am trying to convince those who set standards at my current organization that we should use jQuery rather than Prototype and/or YUI. What are some convincing advantages I can use to convince them?
When advocating for the use of jQuery over Prototype or YUI, it's important to highlight a range of advantages that can resonate with the decision-makers in your organization. Here are some convincing points you can use: ### 1. **Simplicity and Ease of Use** - **Intuitive Syntax**: jQuery has a more concise and rea...
3,925
[ { "from": "human", "value": "I am trying to convince those who set standards at my current organization that we should use jQuery rather than Prototype and/or YUI. What are some convincing advantages I can use to convince them?\n" }, { "from": "gpt", "value": "When advocating for the use of jQue...
I can create a menu item in the Windows Explorer context menu by adding keys in the registry to HKEY_CLASSES_ROOT\Folder\shell. How can I create submenu items to the just created menu item?
Creating submenu items in the Windows Explorer context menu involves adding additional keys to the Windows Registry under the previously created context menu item. Here's how you can do it: 1. **Create the Main Menu Item**: - First, ensure you have created your main menu item in the registry under `HKEY_CLASSES_ROO...
749
[ { "from": "human", "value": "I can create a menu item in the Windows Explorer context menu by adding keys in the registry to HKEY_CLASSES_ROOT\\Folder\\shell.\nHow can I create submenu items to the just created menu item?\n" }, { "from": "gpt", "value": "Creating submenu items in the Windows Exp...
Here we go again, the old argument still arises... Would we better have a business key as a primary key, or would we rather have a surrogate id (i.e. an SQL Server identity) with a unique constraint on the business key field? Please, provide examples or proof to support your theory.
The debate between using a business key versus a surrogate key (like an SQL Server identity) as a primary key in database design is a common one, and both approaches have their pros and cons. Here’s a breakdown of the two options along with examples to support the argument. ### Business Key as Primary Key **Pros:** 1...
2,354
[ { "from": "human", "value": "Here we go again, the old argument still arises... \nWould we better have a business key as a primary key, or would we rather have a surrogate id (i.e. an SQL Server identity) with a unique constraint on the business key field? \nPlease, provide examples or proof to support your...
I'm designing an application which includes the need to log all incoming messages I receive from a Telnet connection. The text is largely plain though can include ANSI tags that provide text colour and formatting (16 colours, bold, underline, etc). I'm would like to format my logs to store the text with formatting, dat...
Your project sounds interesting! Logging messages with formatting and relevant metadata requires a balance between usability, performance, and simplicity. Here are some considerations for your logging structure and how to handle ANSI tags effectively: ### Proposed Structure: 1. **Log File Format**: - Use a simple ...
4,337
[ { "from": "human", "value": "I'm designing an application which includes the need to log all incoming messages I receive from a Telnet connection. The text is largely plain though can include ANSI tags that provide text colour and formatting (16 colours, bold, underline, etc).\nI'm would like to format my l...
How should I load files into my Java application?
Loading files into a Java application can vary depending on the type of file, its format, and what you intend to do with it. Here are some common methods for loading various types of files in Java: ### 1. **Loading Text Files** You can read text files using `BufferedReader` or `Files` API from `java.nio.file`. Here's ...
1,178
[ { "from": "human", "value": "How should I load files into my Java application?\n" }, { "from": "gpt", "value": "Loading files into a Java application can vary depending on the type of file, its format, and what you intend to do with it. Here are some common methods for loading various types of f...
I've come back to using NHibernate after using other technologies (CSLA and Subsonic) for a couple of years, and I'm finding the querying a bit frustrating, especially when compared to Subsonic. I was wondering what other approaches people are using? The Hibernate Query Language doesn't feel right to me, seems too much...
It's understandable that transitioning back to NHibernate after using other ORM frameworks can be challenging, especially when it comes to query syntax and structure. Each ORM has its own strengths and weaknesses, and it often takes some time to get comfortable with the nuances of a new one. Here are some approaches a...
1,280
[ { "from": "human", "value": "I've come back to using NHibernate after using other technologies (CSLA and Subsonic) for a couple of years, and I'm finding the querying a bit frustrating, especially when compared to Subsonic. I was wondering what other approaches people are using?\nThe Hibernate Query Languag...
Does anyone know of any good tutorials on ADO.NET Entity Framework? There are a few useful links here at Stack OverFlow, and I've found one tutorial at Jason's DotNet Architecture Blog, but can anyone recommend any other good tutorials? Any tutorials available from Microsoft, either online or as part of any conference...
Certainly! Here are several resources for learning ADO.NET Entity Framework that you might find useful: ### Official Microsoft Documentation 1. **Microsoft Learn**: - [Get started with Entity Framework Core](https://learn.microsoft.com/en-us/ef/core/get-started/) - [Entity Framework Documentation](https://learn...
3,427
[ { "from": "human", "value": "Does anyone know of any good tutorials on ADO.NET Entity Framework?\nThere are a few useful links here at Stack OverFlow, and I've found one tutorial at Jason's DotNet Architecture Blog, but can anyone recommend any other good tutorials? \nAny tutorials available from Microsoft,...
I have some ASP.NET web services which all share a common helper class they only need to instantiate one instance of per server. It's used for simple translation of data, but does spend some time during start-up loading things from the web.config file, etc. The helper class is 100% thread-safe. Think of it as a simple ...
The issue you're experiencing is due to the fact that in a web garden (which you are using with your IIS 6.0 setup), each worker process can have its own instance of the `Global.asax` class and, consequently, its own private static variable. This means that each worker process will create a separate instance of `MyHelp...
1,796
[ { "from": "human", "value": "I have some ASP.NET web services which all share a common helper class they only need to instantiate one instance of per server. It's used for simple translation of data, but does spend some time during start-up loading things from the web.config file, etc. The helper class is 1...
I'm sure this is easy but I can't figure it out: I have an ASP.NET page with some UpdatePanels on it. I want the page to completely load with some 'Please wait' text in the UpdatePanels. Then once the page is completely loaded I want to call a code-behind function to update the UpdatePanel. Any ideas as to what combi...
You can achieve this functionality in ASP.NET with a combination of JavaScript and the ASP.NET AJAX framework. The idea is to show the "Please wait" message in your UpdatePanel while the page loads, and once it finishes loading, you can call a server-side function asynchronously to update the content of the UpdatePanel...
974
[ { "from": "human", "value": "I'm sure this is easy but I can't figure it out:\nI have an ASP.NET page with some UpdatePanels on it. I want the page to completely load with some 'Please wait' text in the UpdatePanels. Then once the page is completely loaded I want to call a code-behind function to update t...
The DBAs here maintain all SQL Server and SQL Reporting servers. I have a custom developed SQL Reporting 2005 project in Visual Studio that runs fine on my local SQL Database and Reporting instances. I need to deploy to a production server, so I had a folder created on a SQL Reporting 2005 server with permissions to ...
The error message you are encountering indicates that Visual Studio is attempting to deploy the data source files to the Reporting Services, but it finds that the data source already exists in the target location. Since you mentioned that the data sources are managed by DBAs and should not be overwritten, you need to e...
4,280
[ { "from": "human", "value": "The DBAs here maintain all SQL Server and SQL Reporting servers. I have a custom developed SQL Reporting 2005 project in Visual Studio that runs fine on my local SQL Database and Reporting instances. I need to deploy to a production server, so I had a folder created on a SQL R...
What are some good steps to follow for a smooth migration from PHP4 to PHP5. What are some types of code that are likely to break?
Migrating from PHP4 to PHP5 can be a significant upgrade, as PHP5 introduced many new features and improvements, including better object-oriented programming support, the introduction of PDO (PHP Data Objects), and numerous deprecations and changes in existing functions. Here are some steps to ensure a smooth migration...
1,154
[ { "from": "human", "value": "What are some good steps to follow for a smooth migration from PHP4 to PHP5. What are some types of code that are likely to break?\n" }, { "from": "gpt", "value": "Migrating from PHP4 to PHP5 can be a significant upgrade, as PHP5 introduced many new features and impr...
My motto for Java is "just because Java has static blocks, it doesn't mean that you should be using them." Jokes aside, there are a lot of tricks in Java that make testing a nightmare. Two of the most I hate are Anonymous Classes and Static Blocks. We have a lot of legacy code that make use of Static Blocks and these a...
You've brought up a very important consideration when dealing with static initialization in Java, particularly in legacy codebases. Here are some alternatives and ideas to tackle the issues with static blocks without resorting to JMockit or similar tools, and that allow you to write unit tests more effectively. ### 1....
2,896
[ { "from": "human", "value": "My motto for Java is \"just because Java has static blocks, it doesn't mean that you should be using them.\" Jokes aside, there are a lot of tricks in Java that make testing a nightmare. Two of the most I hate are Anonymous Classes and Static Blocks. We have a lot of legacy code...
I am implementing a quite simple state-machine order processing application. It is a e-commerce application with a few twists. The users of the application will not be editing workflows by themselves. Microsoft claims that asp.net and Windows Workflow is possible to combine. How hard is it to install and maintain a com...
When considering whether to use Windows Workflow Foundation (WF) in combination with ASP.NET for your state-machine order processing application, there are several factors to weigh. Here's a breakdown of the considerations: ### Windows Workflow Foundation (WF) **Pros:** 1. **Built-in Features**: WF provides a rich se...
4,146
[ { "from": "human", "value": "I am implementing a quite simple state-machine order processing application. It is a e-commerce application with a few twists. The users of the application will not be editing workflows by themselves.\nMicrosoft claims that asp.net and Windows Workflow is possible to combine. Ho...
It seems that Silverlight/WPF are the long term future for user interface development with .NET. This is great because as I can see the advantage of reusing XAML skills on both the client and web development sides. But looking at WPF/XAML/Silverlight they seem very large technologies and so where is the best place to g...
When considering where to start with user interface development in .NET, particularly with WPF and Silverlight, it's essential to understand the context and the evolution of these technologies. ### Overview of WPF and Silverlight: - **WPF (Windows Presentation Foundation)**: This is a UI framework for building deskto...
2,984
[ { "from": "human", "value": "It seems that Silverlight/WPF are the long term future for user interface development with .NET. This is great because as I can see the advantage of reusing XAML skills on both the client and web development sides. But looking at WPF/XAML/Silverlight they seem very large technol...
Currently, I am writing up a bit of a product-based CMS as my first project. Here is my question. How can I add additional data (products) to my Product model? I have added '/admin/products/add' to my urls.py, but I don't really know where to go from there. How would i build both my view and my template? Please keep in...
Creating a product management system in Django requires you to set up a view to handle the form submission, a form to add products, and a template to render that form. Below, I'll guide you through the steps to achieve this. ### Step 1: Define Your Product Model First, ensure you have a model defined for your Product...
3,700
[ { "from": "human", "value": "Currently, I am writing up a bit of a product-based CMS as my first project.\nHere is my question. How can I add additional data (products) to my Product model?\nI have added '/admin/products/add' to my urls.py, but I don't really know where to go from there. How would i build b...
I have a requirement to make a large amount of code MISRA compliant. First question: Can somebody to give an estimation for passing well written code for embedded system based on experience. I understand that "well written" is poorly defined and vague so i ask for raw estimation. Second question: Any recommendation for...
Making code MISRA compliant can indeed be a challenging task, but it is often necessary for safety-critical systems, particularly in embedded environments. Here are some answers to your questions: ### 1. Estimation for Passing Well-Written Code Estimating the effort required to make well-written code MISRA compliant ...
2,124
[ { "from": "human", "value": "I have a requirement to make a large amount of code MISRA compliant.\nFirst question: Can somebody to give an estimation for passing well written code for embedded system based on experience. I understand that \"well written\" is poorly defined and vague so i ask for raw estimat...
We have a SQL server database. To manipulate the data non-programmatically, I can use SQL Server Management Studio by right-clicking a table and selecting "Open Table". However this is slow for very large tables and sorting and filtering is cumbersome. Typically what we have done until now is to create an Access databa...
If you're looking for a more efficient way to interact with SQL Server data without the drawbacks of Access, there are several alternatives that can provide the usability you're seeking while improving performance and usability. Here are some options to consider: 1. **Power BI**: - Power BI is a powerful business a...
1,616
[ { "from": "human", "value": "We have a SQL server database. To manipulate the data non-programmatically, I can use SQL Server Management Studio by right-clicking a table and selecting \"Open Table\". However this is slow for very large tables and sorting and filtering is cumbersome.\nTypically what we have ...
I remember hearing Joel Spolsky mention in podcast 014 that he'd barely ever used a foreign key (if I remember correctly). However, to me they seem pretty vital to avoid duplication and subsequent data integrity problems throughout your database. Do people have some solid reasons as to why (to avoid a discussion in lin...
The debate around the use of foreign keys in database design is a nuanced one, and different developers and database architects may have varying opinions based on their experiences and the specific requirements of their projects. Here are some reasons why some developers might choose to avoid foreign keys, along with t...
3,272
[ { "from": "human", "value": "I remember hearing Joel Spolsky mention in podcast 014 that he'd barely ever used a foreign key (if I remember correctly). However, to me they seem pretty vital to avoid duplication and subsequent data integrity problems throughout your database.\nDo people have some solid reaso...
I've done some WPF programing and one thing I never got was the command pattern. Every example seems to be for built in ones, edit, cut, paste. Anyone have an example or suggestion of best practice for custom commands?
Certainly! The Command Pattern is a fundamental design pattern that is very useful in WPF (Windows Presentation Foundation) to encapsulate action handling, making your code cleaner and more maintainable. The pattern allows you to separate the logic of an action from the UI, which is particularly useful in MVVM (Model-V...
2,190
[ { "from": "human", "value": "I've done some WPF programing and one thing I never got was the command pattern. Every example seems to be for built in ones, edit, cut, paste. Anyone have an example or suggestion of best practice for custom commands?\n" }, { "from": "gpt", "value": "Certainly! Th...
Has anyone encountered this oddity? I'm checking for the existence of a number of directories in one of my unit tests. is_dir is reporting true (1) in spite of the folder not existing at the time it is called. The code looks like this (with a few extraneous intermediate vars to ease debugging): foreach($userfolders as ...
This issue you're encountering with `is_dir` returning true (1) when checking for non-existing directories in PHP can be quite perplexing. While you've done a thorough job of checking potential issues, here are a few additional points to consider that may help you understand the odd behavior: 1. **Caching Issues**: In...
4,182
[ { "from": "human", "value": "Has anyone encountered this oddity?\nI'm checking for the existence of a number of directories in one of my unit tests. is_dir is reporting true (1) in spite of the folder not existing at the time it is called. The code looks like this (with a few extraneous intermediate vars to...
std::swap() is used by many std containers (such as std::list and std::vector) during sorting and even assignment. But the std implementation of swap() is very generalized and rather inefficient for custom types. Thus efficiency can be gained by overloading std::swap() with a custom type specific implementation. But ho...
To implement a custom `std::swap()` for your own types that will be used by the standard library containers (like `std::vector`, `std::list`, etc.), you need to follow these steps: 1. **Create a custom type** for which you want to define a more efficient swap operation. 2. **Overload the `std::swap` function** for yo...
2,041
[ { "from": "human", "value": "std::swap() is used by many std containers (such as std::list and std::vector) during sorting and even assignment.\nBut the std implementation of swap() is very generalized and rather inefficient for custom types.\nThus efficiency can be gained by overloading std::swap() with a ...
How do you access a SQL Server 2005 Express Edition from a application in a network computer? The access I need is both from application (Linq-to-SQL and ODBC) and from Management Studio
Accessing SQL Server 2005 Express Edition from a network computer involves several steps, including configuring the SQL Server instance, setting up network protocols, and ensuring that the necessary permissions are in place. Here’s how you can do this for both application access (Linq-to-SQL and ODBC) and access from S...
1,507
[ { "from": "human", "value": "How do you access a SQL Server 2005 Express Edition from a application in a network computer?\nThe access I need is both from application (Linq-to-SQL and ODBC) and from Management Studio\n" }, { "from": "gpt", "value": "Accessing SQL Server 2005 Express Edition from...
How do I rewrite a URL in ASP.NET? I would like users to be able to go to http://www.website.com/users/smith instead of http://www.website.com/?user=smith
To rewrite a URL in ASP.NET so that you can use a cleaner format like `http://www.website.com/users/smith` instead of `http://www.website.com/?user=smith`, you can use several methods depending on whether you're using ASP.NET Web Forms, ASP.NET MVC, or ASP.NET Core. ### ASP.NET MVC If you're using ASP.NET MVC, you ca...
2,157
[ { "from": "human", "value": "How do I rewrite a URL in ASP.NET?\nI would like users to be able to go to\nhttp://www.website.com/users/smith\n\ninstead of\nhttp://www.website.com/?user=smith\n\n" }, { "from": "gpt", "value": "To rewrite a URL in ASP.NET so that you can use a cleaner format like `...
I am writing a webapp using CodeIgniter that requires authentication. I created a model which handles all my authentication. However, I can't find a way to access this authentication model from inside another model. Is there a way to access a model from inside another mode, or a better way to handle authentication insi...
In CodeIgniter, you can certainly access one model from another. Here's how you can do it, as well as some additional suggestions for handling authentication. ### Accessing One Model from Another 1. **Load the Authentication Model**: In your other model, you can load the authentication model in the constructor or any...
1,430
[ { "from": "human", "value": "I am writing a webapp using CodeIgniter that requires authentication. I created a model which handles all my authentication. However, I can't find a way to access this authentication model from inside another model. Is there a way to access a model from inside another mode, or a...
In the course of your software development lifecycle, what essential design artifacts do you produce? What makes them essential to your practice? The project I'm currently on has been in production for more than 8 years. This web application has been actively enhanced and maintained over that time. While we have CMMI-b...
In a software development lifecycle (SDLC), especially for a project that has been in production for many years, it’s essential to have a set of design artifacts that can guide development, facilitate communication among team members, and help ensure the software’s maintainability and scalability. Here are some essenti...
535
[ { "from": "human", "value": "In the course of your software development lifecycle, what essential design artifacts do you produce? What makes them essential to your practice?\nThe project I'm currently on has been in production for more than 8 years. This web application has been actively enhanced and maint...
Anybody have a good example how to deep clone a WPF object, preserving databindings? The marked answer is the first part. The second part is that you have to create an ExpressionConverter and inject it into the serialization process. Details for this are here: http://www.codeproject.com/KB/WPF/xamlwriterandbinding.as...
Deep cloning a WPF object while preserving its data bindings can be tricky because the default serialization methods don't handle bindings well. To achieve this, you can use a combination of XAML serialization and a custom `IValueConverter` to manage bindings during the cloning process. Here's a step-by-step guide to ...
4,048
[ { "from": "human", "value": "Anybody have a good example how to deep clone a WPF object, preserving databindings?\n\nThe marked answer is the first part.\nThe second part is that you have to create an ExpressionConverter and inject it into the serialization process. Details for this are here:\nhttp://www.c...
By looking at our DB's error log, we found that there was a constant stream of almost successful SQL injection attacks. Some quick coding avoided that, but how could I have setup a monitor for both the DB and Web server (including POST requests) to check for this? By this I mean if there are off the shelf tools for sc...
To monitor for SQL injection attempts and other web application threats, you can use a combination of web application firewalls (WAFs), intrusion detection systems (IDS), and logging and monitoring tools. Here are some off-the-shelf tools and strategies that can help you monitor your database and web server for suspici...
2,349
[ { "from": "human", "value": "By looking at our DB's error log, we found that there was a constant stream of almost successful SQL injection attacks. Some quick coding avoided that, but how could I have setup a monitor for both the DB and Web server (including POST requests) to check for this? By this I mea...
In my host, I currently have installed 2 wordpress applications, 1 phpBB forum and one MediaWiki. Is there a way to merge the login so that all applications share the same credentials? For instance, I want to register only in my phpBB and then I want to access all other applications with the given username and password...
Merging login credentials across different applications like WordPress, phpBB, and MediaWiki can be a complex process, as each system typically manages user authentication independently. However, you can implement several strategies to achieve a single sign-on (SSO) experience. Here are a few methods to consider, along...
628
[ { "from": "human", "value": "In my host, I currently have installed 2 wordpress applications, 1 phpBB forum and one MediaWiki.\nIs there a way to merge the login so that all applications share the same credentials?\nFor instance, I want to register only in my phpBB and then I want to access all other applic...
I've always been intrigued by Map Routing, but I've never found any good introductory (or even advanced!) level tutorials on it. Does anybody have any pointers, hints, etc? Update: I'm primarily looking for pointers as to how a map system is implemented (data structures, algorithms, etc).
Map routing is a fascinating field that combines elements of computer science, geography, and algorithms. Understanding how a map routing system is implemented involves several key concepts, including data structures, algorithms, and potentially geographic information systems (GIS). Here are some pointers to get you st...
2,495
[ { "from": "human", "value": "I've always been intrigued by Map Routing, but I've never found any good introductory (or even advanced!) level tutorials on it. Does anybody have any pointers, hints, etc?\nUpdate: I'm primarily looking for pointers as to how a map system is implemented (data structures, algori...
I've learned in College that you always have to free your unused Objects but not how you actually do it. For example structuring your code right and so on. Are there any general rules on how to handle pointers in C++? I'm currently not allowed to use boost. I have to stick to pure c++ because the framework I'm using ...
When working with pointers in C++, especially when you need to manage memory manually, it's important to follow some best practices to ensure that your code is safe and efficient. Here are some general rules and guidelines for handling pointers and dynamic memory in C++: ### 1. Use Smart Pointers When Possible While y...
398
[ { "from": "human", "value": "I've learned in College that you always have to free your unused Objects but not how you actually do it. For example structuring your code right and so on. \nAre there any general rules on how to handle pointers in C++? \nI'm currently not allowed to use boost. I have to stick t...
I have an ASP.NET webservice with along the lines of: [WebService(Namespace = "http://internalservice.net/messageprocessing")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [ToolboxItem(false)] public class ProvisioningService : WebService { [WebMethod] public XmlDocument ProcessMessage(XmlDocum...
The issue you're facing is related to how the ASP SOAP Toolkit is serializing the XML message when it calls your .NET web service. Specifically, it adds a namespace to the `<message>` element that your .NET web service does not expect. ### Potential Solutions 1. **Modify the Web Method Signature**: Instead of acce...
3,464
[ { "from": "human", "value": "I have an ASP.NET webservice with along the lines of:\n[WebService(Namespace = \"http://internalservice.net/messageprocessing\")]\n[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]\n[ToolboxItem(false)]\npublic class ProvisioningService : WebService\n{\n [WebMetho...
I am getting the following error: Access denied for user 'apache'@'localhost' (using password: NO) When using the following code: <?php include("../includes/connect.php"); $query = "SELECT * from story"; $result = mysql_query($query) or die(mysql_error()); echo "<h1>Delete Story</h1>"; if (mysql_num_rows($result...
The error message `Access denied for user 'apache'@'localhost' (using password: NO)` indicates that the connection to the MySQL server is being attempted without a password. This often happens if the database connection is not correctly set up or if the connection is being made under a user that requires a password but...
2,535
[ { "from": "human", "value": "I am getting the following error:\n\nAccess denied for user 'apache'@'localhost' (using password: NO)\n\nWhen using the following code:\n<?php\n\ninclude(\"../includes/connect.php\");\n\n$query = \"SELECT * from story\";\n\n$result = mysql_query($query) or die(mysql_error());\n\...
I'm slowly learning Objective-C and Cocoa, and the only way I see so far to capture key events in Text Views is to use delegation, but I'm having trouble finding useful documentation and examples on how to implement such a solution. Can anyone point me in the right direction or supply some first-hand help?
Capturing key events in a `UITextView` using delegation in Objective-C is a common approach, and it involves implementing the `UITextViewDelegate` methods. Here’s a step-by-step guide to help you set this up. ### Step 1: Set Up Your UITextView First, make sure you have a `UITextView` in your interface. You can do thi...
1,947
[ { "from": "human", "value": "I'm slowly learning Objective-C and Cocoa, and the only way I see so far to capture key events in Text Views is to use delegation, but I'm having trouble finding useful documentation and examples on how to implement such a solution. Can anyone point me in the right direction or ...
When I use the PrintOut method to print a Worksheet object to a printer, the "Printing" dialog (showing filename, destination printer, pages printed and a Cancel button) is displayed even though I have set DisplayAlerts = False. The code below works in an Excel macro but the same thing happens if I use this code in a ...
The "Printing" dialog that appears when you use the `PrintOut` method in Excel is a Windows dialog and not an Excel-specific dialog. Unfortunately, there isn't a built-in Excel option to suppress this dialog directly from the Excel VBA environment. However, if you are looking to print without user interaction, you can ...
4,430
[ { "from": "human", "value": "When I use the PrintOut method to print a Worksheet object to a printer, the \"Printing\" dialog (showing filename, destination printer, pages printed and a Cancel button) is displayed even though I have set DisplayAlerts = False. The code below works in an Excel macro but the ...
I have a Ruby on Rails Website that makes HTTP calls to an external Web Service. About once a day I get a SystemExit (stacktrace below) error email where a call to the service has failed. If I then try the exact same query on my site moments later it works fine. It's been happening since the site went live and I've ha...
It seems you are experiencing intermittent issues with external HTTP calls in your Ruby on Rails application, leading to a `SystemExit` error. This kind of issue can be particularly frustrating to debug due to its intermittent nature. Let's analyze the stack trace and possible causes: ### Key Points in the Stack Trace...
2,632
[ { "from": "human", "value": "I have a Ruby on Rails Website that makes HTTP calls to an external Web Service.\nAbout once a day I get a SystemExit (stacktrace below) error email where a call to the service has failed. If I then try the exact same query on my site moments later it works fine.\nIt's been hap...
I'm using the Yahoo Uploader, part of the Yahoo UI Library, on my ASP.Net website to allow users to upload files. For those unfamiliar, the uploader works by using a Flash applet to give me more control over the FileOpen dialog. I can specify a filter for file types, allow multiple files to be selected, etc. It's grea...
To handle the issue of session management during file uploads while using the Yahoo Uploader (or any flash-based uploader) in an ASP.NET application, you have several options. The key challenge here is to maintain user context across the upload process, especially considering potential application restarts or when scal...
1,053
[ { "from": "human", "value": "I'm using the Yahoo Uploader, part of the Yahoo UI Library, on my ASP.Net website to allow users to upload files. For those unfamiliar, the uploader works by using a Flash applet to give me more control over the FileOpen dialog. I can specify a filter for file types, allow mult...
I am using Simpletest as my unit test framework for the PHP site I am currently working on. I like the fact that it is shipped with a simple HTML reporter, but I would like a bit more advanced reporter. I have read the reporter API documentation, but it would be nice to be able to use an existing reporter, instead of h...
SimpleTest is a lightweight framework for testing PHP code, and while its default HTML reporter is straightforward, there are indeed a few options for enhancing reporting capabilities. Below are some suggestions for both SimpleTest and PHPUnit. ### Extended Reporters for SimpleTest 1. **Custom HTML Reporter**: Althou...
2,622
[ { "from": "human", "value": "I am using Simpletest as my unit test framework for the PHP site I am currently working on. I like the fact that it is shipped with a simple HTML reporter, but I would like a bit more advanced reporter.\nI have read the reporter API documentation, but it would be nice to be able...
This is a difficult and open-ended question I know, but I thought I'd throw it to the floor and see if anyone had any interesting suggestions. I have developed a code-generator that takes our python interface to our C++ code (generated via SWIG) and generates code needed to expose this as WebServices. When I developed...
It sounds like you're grappling with a common issue in software testing, especially when dealing with code generation. When unit tests become brittle and overly complex, they can hinder development rather than facilitate it. Here are some suggestions that might help you refocus your testing strategy and improve the ove...
887
[ { "from": "human", "value": "This is a difficult and open-ended question I know, but I thought I'd throw it to the floor and see if anyone had any interesting suggestions.\nI have developed a code-generator that takes our python interface to our C++ code (generated via SWIG) and generates code needed to exp...