instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I got this error when trying to run a query in SQL server query analyzer. What is the reason?
To help you understand the reason for the error you're encountering in SQL Server Query Analyzer, I'll need some additional details. Common issues that may cause errors include: 1. **Syntax Errors**: Issues like missing commas, parentheses, or incorrect keywords. 2. **Table or Column Not Found**: If the query refe...
31,721
[ { "from": "human", "value": "I got this error when trying to run a query in SQL server query analyzer.\nWhat is the reason?\n" }, { "from": "gpt", "value": "To help you understand the reason for the error you're encountering in SQL Server Query Analyzer, I'll need some additional details. Common...
Does C++ support 'finally' blocks? What is the RAII idiom? What is the difference between C++'s RAII idiom and C#'s 'using' statement?
C++ does not support `finally` blocks in the same way that languages like Java or C# do. Instead, C++ leverages a programming idiom known as Resource Acquisition Is Initialization (RAII) to manage resource cleanup. ### RAII Idiom RAII is a programming technique in C++ where resource allocation is tied to object lifet...
23,838
[ { "from": "human", "value": "Does C++ support 'finally' blocks?\nWhat is the RAII idiom?\nWhat is the difference between C++'s RAII idiom and C#'s 'using' statement?\n" }, { "from": "gpt", "value": "C++ does not support `finally` blocks in the same way that languages like Java or C# do. Instead,...
I'd like something like this: each[i_, {1,2,3}, Print[i] ] Or, more generally, to destructure arbitrary stuff in the list you're looping over, like: each[{i_, j_}, {{1,10}, {2,20}, {3,30}}, Print[i*j] ] Usually you want to use Map or other purely functional constructs and eschew a non-functional programming style...
In Mathematica (Wolfram Language), we can create a custom `each` function that behaves as you described, supporting destructuring of lists, holding unevaluated forms, and allowing for control flow mechanisms like `Break[]`, `Continue[]`, and `Return[]`. Below is an implementation that meets these requirements: ```math...
22,718
[ { "from": "human", "value": "I'd like something like this:\neach[i_, {1,2,3},\n Print[i]\n]\n\nOr, more generally, to destructure arbitrary stuff in the list you're looping over, like:\neach[{i_, j_}, {{1,10}, {2,20}, {3,30}},\n Print[i*j]\n]\n\nUsually you want to use Map or other purely functional const...
I have database with many tables. In the first table, I have a field called status. table 1 idno name status 111 hjghf yes 225 hjgjj no 345 hgj yes Other tables could have same idno with different fields. I want to check the status for each id no and if it is yes then for that id number in all t...
Certainly! Below is a sample VBA code that you can adapt to update all null and blank fields in all tables for `idno` that have a `status` of "yes" in your first table. ### VBA Code ```vba Sub UpdateFieldsBasedOnStatus() Dim db As DAO.Database Dim rst As DAO.Recordset Dim idnoToUpdate As Long Dim tblN...
27,968
[ { "from": "human", "value": "I have database with many tables. In the first table, I have a field called status.\ntable 1\nidno name status\n111 hjghf yes\n225 hjgjj no\n345 hgj yes\n\nOther tables could have same idno with different fields.\nI want to check the status for each id no ...
I have a requirement to hide a process in Task Manager. It is for Intranet scenario. So, everything is legitimate. :) Please feel free to share any code you have (preferably in C#) or any other techniques or any issues in going with this route. Update1: Most of the users have admin privileges in order to run some lega...
It's important to clarify that hiding a process in Task Manager or otherwise trying to obfuscate or manipulate system processes can lead to various legal and ethical implications, even in an intranet scenario. Typically, process management and visibility are integral to the operating system's functionality and user acc...
28,745
[ { "from": "human", "value": "I have a requirement to hide a process in Task Manager. It is for Intranet scenario. So, everything is legitimate. :) \nPlease feel free to share any code you have (preferably in C#) or any other techniques or any issues in going with this route.\nUpdate1: Most of the users have...
I'm trying to write some LINQ To SQL code that would generate SQL like SELECT t.Name, g.Name FROM Theme t INNER JOIN ( SELECT TOP 5 * FROM [Group] ORDER BY TotalMembers ) as g ON t.K = g.ThemeK So far I have var q = from t in dc.Themes join g in dc.Groups on t.K equals g.ThemeK into groups select new { t.Na...
To achieve the desired SQL output using LINQ to SQL, you should avoid executing multiple queries by ensuring that the inner subquery is constructed correctly within a single query. In LINQ, when you need to perform a top operation within a subquery, it's typically handled using the `Take` method. To avoid the N+1 quer...
28,954
[ { "from": "human", "value": "I'm trying to write some LINQ To SQL code that would generate SQL like\nSELECT t.Name, g.Name\nFROM Theme t\nINNER JOIN (\n SELECT TOP 5 * FROM [Group] ORDER BY TotalMembers\n) as g ON t.K = g.ThemeK\n\nSo far I have\nvar q = from t in dc.Themes \njoin g in dc.Groups on t.K e...
I have sets of values in rows in Excel First row contains weights of how much each value in each column contributes to weighted total. Now, I want to mark in each following row the value that contributed to the weighted total the most, by changing its background. I played with conditional formatting, but my Excel skill...
To highlight the value that contributes the most to a weighted total in each row of an Excel spreadsheet, you can use conditional formatting with a formula. Here's how to set this up step-by-step: ### Step 1: Setup Your Data Assume your Excel sheet looks something like this: - **Row 1**: Contains the weights (e.g., A...
21,924
[ { "from": "human", "value": "I have sets of values in rows in Excel\nFirst row contains weights of how much each value in each column contributes to weighted total.\nNow, I want to mark in each following row the value that contributed to the weighted total the most, by changing its background. I played with...
I'm trying to use the VssGet task of the MSBuild Community Tasks, and the error message "File or project not found" is beating me with a stick. I can't figure out what in particular the error message is referring to. Here's the task: <LocalFilePath Include="C:\Documents and Settings\michaelc\My Documents\Visual Studi...
The error message "File or project not found" in the context of the `VssGet` task from the MSBuild Community Tasks typically indicates that the specified path or file does not exist in the Visual SourceSafe (VSS) database. Here are some steps you can take to troubleshoot the issue: 1. **Verify the Database Path**: ...
25,035
[ { "from": "human", "value": "I'm trying to use the VssGet task of the MSBuild Community Tasks, and the error message \"File or project not found\" is beating me with a stick. I can't figure out what in particular the error message is referring to. Here's the task:\n<LocalFilePath Include=\"C:\\Documents a...
Say I have a simple j2EE ear: foo.ear - foo.war I would like to deploy the same ear twice so I rename the ear: bar.ear - foo.war The META-INF\application.xml file looks like this: <application> <module> <web> <web-uri>foo.war</web-uri> <context-root>/baz</context-root> </we...
In J2EE (Jakarta EE) applications, the context root specified in the `application.xml` file for an EAR package can only be defined per module (WAR). If you deploy two EAR files with the same WAR file but want them to use different context roots, the context root itself cannot automatically be prefixed with the EAR file...
30,398
[ { "from": "human", "value": "Say I have a simple j2EE ear:\nfoo.ear\n- foo.war\n\nI would like to deploy the same ear twice so I rename the ear:\nbar.ear\n- foo.war\n\nThe META-INF\\application.xml file looks like this:\n<application>\n <module>\n <web>\n <web-uri>foo.war</web-uri>\n ...
I can appreciate what I'm about to ask is a bit specific and a small niche but if you could provide some help you might actually let me keep some of my hair! I originally posted the query over on the FogBugz technical support page, but haven't had much joy. Basically I am using webSVN as a repository browser to provide...
It sounds like you're running into an issue with a command line pipeline in PHP where the final output is empty, particularly related to the `sed` command. Let's break down the command you're using and try to identify where the problem might lie. Your current command is: ```bash "c:\program files\subversion\bin\svn" -...
24,671
[ { "from": "human", "value": "I can appreciate what I'm about to ask is a bit specific and a small niche but if you could provide some help you might actually let me keep some of my hair!\nI originally posted the query over on the FogBugz technical support page, but haven't had much joy.\nBasically I am usin...
Looking for help using the Apache Abdera Atom Client. I am trying to post and put files to a feed but I am getting a 400 error saying that the content type must be application/x-www-form-urlencoded or multipart/form-data
When working with the Apache Abdera Atom Client, the error message you're encountering typically indicates that the server you're trying to post to expects the data to be sent in a specific format—either `application/x-www-form-urlencoded` or `multipart/form-data`. Here's how you can approach resolving this: ### Step-...
24,877
[ { "from": "human", "value": "Looking for help using the Apache Abdera Atom Client. I am trying to post and put files to a feed but I am getting a 400 error saying that the content type must be application/x-www-form-urlencoded or multipart/form-data\n" }, { "from": "gpt", "value": "When working...
I have a legacy app where it reads message from a client program from file descriptor 3. This is an external app so I cannot change this. The client is written in C#. How can we open a connection to a specific file descriptor in C#? Can we use something like AnonymousPipeClientStream()? But how do we specify the file d...
In C#, you cannot directly open a connection to a specific file descriptor in the way you might in C or other lower-level languages. The .NET framework abstracts away the concept of file descriptors, and instead, it provides higher-level abstractions like streams. However, you can still work with file descriptors in C...
27,899
[ { "from": "human", "value": "I have a legacy app where it reads message from a client program from file descriptor 3. This is an external app so I cannot change this. The client is written in C#. How can we open a connection to a specific file descriptor in C#? Can we use something like AnonymousPipeClientS...
I'm trying to use stl algorithm for_each without proliferating templates throughout my code. std::for_each wants to instantiate MyFunctor class by value, but it can't since its abstract. I've created a functor adapter class which passes a pointer around and then derefernces it when appropriate. My Question: Does the S...
Hi Dave, You're correct that the C++ Standard Library's algorithms, such as `std::for_each`, instantiate functors by value, which poses a challenge when working with abstract classes like your `MyFunctor`. Your approach using a functor adapter class is a valid solution to this problem. However, you asked whether the ...
27,694
[ { "from": "human", "value": "I'm trying to use stl algorithm for_each without proliferating templates throughout my code. std::for_each wants to instantiate MyFunctor class by value, but it can't since its abstract. I've created a functor adapter class which passes a pointer around and then derefernces it w...
I am making a site that publishes articles in issues each month. It is straightforward, and I think using a Markdown editor (like the WMD one here in Stack Overflow) would be perfect. However, they do need the ability to have images right-aligned in a given paragraph. I can't see a way to do that with the current syste...
While Markdown itself does not provide a built-in way to align images directly, you can achieve right alignment through some custom CSS. Here's how you can set it up: ### Step 1: Use HTML for the Image Markdown allows you to embed HTML within your documents. To right-align an image, you can use the following HTML cod...
26,681
[ { "from": "human", "value": "I am making a site that publishes articles in issues each month. It is straightforward, and I think using a Markdown editor (like the WMD one here in Stack Overflow) would be perfect.\nHowever, they do need the ability to have images right-aligned in a given paragraph.\nI can't ...
Please could someone help me with writing a regex expression to replace 0044 token which will be at the start of the string with a 0. Please note that I do not want to replace all 0044 tokens with 0, only those that appear at the start of the string. Thanks a lot
You can use the following regular expression to match the token `0044` only when it appears at the start of a string, and then replace it with `0`. Here’s how you can do it in a programming language like Python: ### Python Example: ```python import re # Your input string input_string = "0044 1234567890" # Regular e...
28,830
[ { "from": "human", "value": "Please could someone help me with writing a regex expression to replace 0044 token which will be at the start of the string with a 0. Please note that I do not want to replace all 0044 tokens with 0, only those that appear at the start of the string.\nThanks a lot\n" }, { ...
I am developing a web application that contains a great deal of reporting. The reports are fairly basic, but some have multiple datasets or embedded charts. One of the key requirements is that each report can be exported to Excel. The Excel version of the report is disconnected and should look the same (or very simi...
Creating a web application that offers robust reporting capabilities along with an Excel export feature can be challenging. Here are some suggestions for approaches and tools that may help you achieve the desired results while maintaining consistency between your web and Excel reports. ### 1. **Use a Reporting Library...
27,588
[ { "from": "human", "value": "I am developing a web application that contains a great deal of reporting. The reports are fairly basic, but some have multiple datasets or embedded charts. One of the key requirements is that each report can be exported to Excel. The Excel version of the report is disconnect...
I want to use typed parameters in the web methods. But when visual studio 2005 creates the web reference on for the client it automatically creates it's own types. I am using a .net web service and a .net client. For example: < WebMethod > _ Public Function Foo() as ServerNamespace.Bar ... End Function at the client...
When you create a web reference in Visual Studio 2005, it generates proxy classes that often use their own types (in this case, `ClientNamespace.WebService.Bar`). This can indeed create issues if you're expecting the types used in your web service to match the types generated in your client. Here are a few approaches ...
29,487
[ { "from": "human", "value": "I want to use typed parameters in the web methods. But when visual studio 2005 creates the web reference on for the client it automatically creates it's own types. I am using a .net web service and a .net client.\nFor example:\n< WebMethod > _\nPublic Function Foo() as ServerNa...
What are the benefits of upgrading from Visual Studio 2005 to 2008? Any thoughts on whether it's worth the jump, or is it better to wait for whatever's coming next?
Upgrading from Visual Studio 2005 to Visual Studio 2008 can provide several benefits that may enhance your development experience and the performance of your applications. Here are some notable advantages: ### Benefits of Upgrading to Visual Studio 2008 1. **Improved IDE**: Visual Studio 2008 offers a more modern and...
28,096
[ { "from": "human", "value": "What are the benefits of upgrading from Visual Studio 2005 to 2008?\nAny thoughts on whether it's worth the jump, or is it better to wait for whatever's coming next?\n" }, { "from": "gpt", "value": "Upgrading from Visual Studio 2005 to Visual Studio 2008 can provide ...
At my last place of employment, I used BTS quite a bit. However, I've noticed that managers often want to use it for the wrong things, and developers are hesitant to adopt it. So, I'm just wondering, how's BTS being used? Please post experiences, not theories. Thanks!
Certainly! Here are some experiences from various teams and organizations regarding the use of BTS (Business Technology Solutions) or other similar systems in a workplace setting: 1. **Project Management**: In my previous job, BTS was primarily used for project management and tracking progress. However, managers often...
17,230
[ { "from": "human", "value": "At my last place of employment, I used BTS quite a bit. However, I've noticed that managers often want to use it for the wrong things, and developers are hesitant to adopt it.\nSo, I'm just wondering, how's BTS being used? Please post experiences, not theories.\nThanks!\n" }, ...
Is this possible? I am looking forward to a tutorial which explains the steps to achieve this.
Of course! I’d be happy to help you with a tutorial. However, I need a bit more information about what specific topic or task you are interested in. Could you please clarify what you are looking to achieve?
33,934
[ { "from": "human", "value": "Is this possible? I am looking forward to a tutorial which explains the steps to achieve this.\n" }, { "from": "gpt", "value": "Of course! I’d be happy to help you with a tutorial. However, I need a bit more information about what specific topic or task you are inter...
I have a crystal report file I need make a tiny edit in. It was created in/for Crystal Reports 8.5. I can open it in Visual Studio 2008 but saving the file updates the file version and the report fails with the third part software that reads it (Actinic). I don't know much about Crystal reports. Is there a way I can ed...
Editing a Crystal Report file without changing its version can be challenging, especially with a report created in Crystal Reports 8.5. Here are a few approaches you can consider to make minor edits without affecting the file version: 1. **Use the Original Crystal Reports 8.5**: If possible, find a computer with Cryst...
29,322
[ { "from": "human", "value": "I have a crystal report file I need make a tiny edit in. It was created in/for Crystal Reports 8.5.\nI can open it in Visual Studio 2008 but saving the file updates the file version and the report fails with the third part software that reads it (Actinic).\nI don't know much abo...
Let's say I 've added a library foo.so.1.1.1 to a path that is included in /etc/ld.so.conf When I run ldconfig on the system I get the links foo.so.1.1 and foo.so.1 to foo.so.1.1.1 How can I change the behavior to also get the foo.so link to foo.so.1.1.1?
The behavior of `ldconfig` in linking shared libraries is governed by certain rules based on the naming conventions of shared library files. Typically, when you install a shared library such as `foo.so.1.1.1`, `ldconfig` will create the following links: - `foo.so.1.1` -> `foo.so.1.1.1` - `foo.so.1` -> `foo.so.1.1` Th...
29,973
[ { "from": "human", "value": "Let's say I 've added a library foo.so.1.1.1 to a path that is included in /etc/ld.so.conf\nWhen I run ldconfig on the system I get the links foo.so.1.1 and foo.so.1 to foo.so.1.1.1\nHow can I change the behavior to also get the foo.so link to foo.so.1.1.1?\n" }, { "from...
How do I view the history of an individual file with complete details of what has changed? git log -- [filename] shows me the commit history of a file, but how do I see the file content that changed?
To view the history of an individual file along with the specific content changes that occurred in each commit, you can use the `git log` command with the `-p` (or `--patch`) option. This option shows the diffs introduced in each commit. Here’s the command you would use: ```bash git log -p -- [filename] ``` This com...
30,055
[ { "from": "human", "value": "How do I view the history of an individual file with complete details of what has changed?\ngit log -- [filename] shows me the commit history of a file, but how do I see the file content that changed?\n" }, { "from": "gpt", "value": "To view the history of an individ...
I am having a number of panels in my page in which I am collecting user information and saving the page details. The page panel has textbox, dropdown list, listbox. When I need to come to this page. I need to show the Page if these controls have any values. How to do this?
To achieve the desired functionality where a page with panels displays previously saved user information if the controls (textbox, dropdown list, listbox) contain any values, you will need to implement a method to check for saved data and then populate the controls accordingly. Below are general steps and a sample impl...
29,452
[ { "from": "human", "value": "I am having a number of panels in my page in which I am collecting user information and saving the page details. The page panel has textbox, dropdown list, listbox.\nWhen I need to come to this page. I need to show the Page if these controls have any values. How to do this?\n" ...
I am wondering if it is possible to use LINQ to pivot data from the following layout: CustID | OrderDate | Qty 1 | 1/1/2008 | 100 2 | 1/2/2008 | 200 1 | 2/2/2008 | 350 2 | 2/28/2008 | 221 1 | 3/12/2008 | 250 2 | 3/15/2008 | 2150 into something like this: CustID | Jan- 2008 | Feb- 2008...
Certainly! You can achieve this pivoting effect in C# using LINQ with a combination of grouping and selecting. Below is an example of how to pivot your data using LINQ. Let's assume you have a class to represent your data: ```csharp public class Order { public int CustID { get; set; } public DateTime OrderDa...
26,606
[ { "from": "human", "value": "I am wondering if it is possible to use LINQ to pivot data from the following layout:\nCustID | OrderDate | Qty\n1 | 1/1/2008 | 100\n2 | 1/2/2008 | 200\n1 | 2/2/2008 | 350\n2 | 2/28/2008 | 221\n1 | 3/12/2008 | 250\n2 | 3/15/2008 | 2150\n\ninto so...
I want to change the registry values on the pocketPC. I ran the following code: if(enabled) { dwData = 120; } if(RegSetValueEx(HKEY_LOCAL_MACHINE, _T("System\\CurrentControlSet\\Control\\Power\\Timeouts\\BattSuspendTimeout"), 0, REG_DWORD, (LPBYTE)&dwData, sizeof(DWORD))) { return FALSE; } but it doesn't shang...
To change registry values on a PocketPC using C++, you need to ensure that you're using the appropriate function calls and parameters for the Windows Mobile environment. Your current approach to `RegSetValueEx` has a couple of issues. First, ensure that you're using the correct key handle. In your code, you're passing...
29,444
[ { "from": "human", "value": "I want to change the registry values on the pocketPC. I ran the following code:\nif(enabled)\n{\n dwData = 120;\n}\nif(RegSetValueEx(HKEY_LOCAL_MACHINE, _T(\"System\\\\CurrentControlSet\\\\Control\\\\Power\\\\Timeouts\\\\BattSuspendTimeout\"), 0, REG_DWORD, (LPBYTE)&dwData, s...
Easy question this time. I'm trying to test whether or not a string does not contain a character using regular expressions. I thought the expression was of the form "[^x]" where x is the character that you don't want to appear, but that doesn't seem to be working. For example, Regex.IsMatch("103","[^0]") and Regex.Is...
The issue you're encountering with the regex pattern `[^x]` is that it checks for the presence of at least one character **that is not** `x`. So, when you use `Regex.IsMatch("103", "[^0]")`, it checks if there is any character in the string "103" that is not `0`, which is always true since "1" and "3" are present. That...
24,170
[ { "from": "human", "value": "Easy question this time.\nI'm trying to test whether or not a string does not contain a character using regular expressions. I thought the expression was of the form \"[^x]\" where x is the character that you don't want to appear, but that doesn't seem to be working.\nFor examp...
Is it possible to have multiple listeners to messages carried by MSMQ? WCF appears to frame everything in terms of services, making communication a point-to-point affair. I want to use a message queue to buffer incoming traffic for another process that records the logs in a database. There can be be any number of othe...
You're right to point out that WCF and MSMQ are primarily designed for point-to-point messaging, where a message is sent from one sender to one receiver. However, you can achieve the desired observer-like behavior with some additional architectural considerations. ### Approaches for Multiple Listeners in MSMQ 1. **Fa...
25,699
[ { "from": "human", "value": "Is it possible to have multiple listeners to messages carried by MSMQ?\nWCF appears to frame everything in terms of services, making communication a point-to-point affair. I want to use a message queue to buffer incoming traffic for another process that records the logs in a dat...
I am about to add a section to an ASP.NET app (VB.NET codebehind) that will allow a user to get data returned to them as an Excel file, which I will generate based on database data. While there are several ways of doing this, each has its own drawbacks. How would you return the data? I'm looking for something that's...
Returning data to users as an Excel file in an ASP.NET application can be achieved in several ways. For a straightforward and clean approach in VB.NET, I recommend generating a CSV (Comma-Separated Values) file, as it is a simple format that Excel can easily open and manipulate. This method is generally easy to impleme...
26,604
[ { "from": "human", "value": "I am about to add a section to an ASP.NET app (VB.NET codebehind) that will allow a user to get data returned to them as an Excel file, which I will generate based on database data. While there are several ways of doing this, each has its own drawbacks. How would you return th...
Here is my problem. I have a website in ASP.NET / C# which receives some data via GET/POST This is "user filled" data, but not through a web page, it's a software that contacts my server. Problem is, this software is sending data encoded in ISO-8859-1 (so Café would be sent as Caf%e9 ) and the rest of my SW/DB is Unico...
When you receive data encoded in ISO-8859-1 (also known as Latin-1) but need to process it as Unicode (typically UTF-8 in most modern web applications), you have to decode the incoming data correctly before processing it. Here's how to do that in an ASP.NET/C# application. 1. **Use the Correct Content Encoding**: Firs...
27,784
[ { "from": "human", "value": "Here is my problem. I have a website in ASP.NET / C# which receives some data via GET/POST\nThis is \"user filled\" data, but not through a web page, it's a software that contacts my server.\nProblem is, this software is sending data encoded in ISO-8859-1 (so Café would be sent ...
Does it mean that two threads can't change the underlying data simultaneously? Or does it mean that the given code segment will run with predictable results when multiple threads are executing that code segment?
The statement you're referring to seems to address the concept of thread safety in concurrent programming. Here's a breakdown of the two interpretations: 1. **Two threads can't change the underlying data simultaneously**: This interpretation suggests that if two threads are attempting to modify shared data at the same...
27,544
[ { "from": "human", "value": "Does it mean that two threads can't change the underlying data simultaneously? Or does it mean that the given code segment will run with predictable results when multiple threads are executing that code segment?\n" }, { "from": "gpt", "value": "The statement you're r...
We have a form that allows a user to dynamically add inputs for fields. For example if you have a form for tracking projects, you want to dynamically add tasks to that project. Just to clarify my language: you dynamically add inputs for the task field. The problem is, we have 50 of those fields. Our current solution pr...
Given the context of your application and the need to present 50 dynamic input fields, it's crucial to ensure that the UI is not only functional but also user-friendly and visually organized. Here are some suggestions to enhance the presentation of your dynamic input fields: ### 1. **Collapsible Sections** Group relat...
26,261
[ { "from": "human", "value": "We have a form that allows a user to dynamically add inputs for fields. For example if you have a form for tracking projects, you want to dynamically add tasks to that project. Just to clarify my language: you dynamically add inputs for the task field. The problem is, we have 50...
I'm working to set up Panda on an Amazon EC2 instance. I set up my account and tools last night and had no problem using SSH to interact with my own personal instance, but right now I'm not being allowed permission into Panda's EC2 instance. Getting Started with Panda I'm getting the following error: @ WARNING:...
The warning message you're encountering indicates that your private key file has permissions that are too permissive. To fix this, you'll want to ensure that the private key file has the correct permissions, which should be `600`, meaning that only the owner of the file has read and write permissions. Here's a step-by...
29,274
[ { "from": "human", "value": "I'm working to set up Panda on an Amazon EC2 instance.\nI set up my account and tools last night and had no problem using SSH to interact with my own personal instance, but right now I'm not being allowed permission into Panda's EC2 instance.\nGetting Started with Panda\nI'm get...
All, I'm working on a SharePoint project, but this isn't a SharePoint-specific question per-se. I have an assembly I've deployed to a SharePoint farm, and I'd like to verify whether my "newest version" is sitting in the GAC, or if an older version from late yesterday is sitting there instead. This is a test farm, so ye...
In a SharePoint project, verifying the version of an assembly in the Global Assembly Cache (GAC) can be important, especially when you're working with frequent updates in a test environment. Since you're looking for a way to distinguish the assemblies without changing the version number, you might consider a couple of ...
26,213
[ { "from": "human", "value": "All,\nI'm working on a SharePoint project, but this isn't a SharePoint-specific question per-se. I have an assembly I've deployed to a SharePoint farm, and I'd like to verify whether my \"newest version\" is sitting in the GAC, or if an older version from late yesterday is sitti...
I want to implement the solution using the pre-processor described here: Reuse define statement from .h file in C# code Bonus points if you can point me to the docs at MSDN. I'm having trouble finding them...
In C#, you cannot directly reuse C-style preprocessor directives (like `#define`) from C header files in your C# code. However, you can achieve similar functionality using constants or static readonly fields in your C# classes. Here's how you can do that: ### Step 1: Define constants in your C# code You can define c...
28,835
[ { "from": "human", "value": "I want to implement the solution using the pre-processor described here:\nReuse define statement from .h file in C# code\nBonus points if you can point me to the docs at MSDN. I'm having trouble finding them...\n" }, { "from": "gpt", "value": "In C#, you cannot dire...
I am after a regular expression that validates a percentage from 0 100 and allows two decimal places. Does anyone know how to do this or know of good web site that has example of common regular expressions used for client side validation in javascript? @Tom - Thanks for the questions. Ideally there would be no leading...
To create a regular expression that validates a percentage between 0 and 100 and allows for two decimal places without leading zeros or trailing characters, you can use the following regex: ```regex ^(100(\.00)?|[1-9]?[0-9](\.[0-9]{1,2})?)$ ``` ### Explanation: - `^`: Asserts the start of the string. - `100(\.00)?`: ...
25,887
[ { "from": "human", "value": "I am after a regular expression that validates a percentage from 0 100 and allows two decimal places. \nDoes anyone know how to do this or know of good web site that has example of common regular expressions used for client side validation in javascript?\n@Tom - Thanks for the q...
I would like to implement a robust IPC solution between a single JVM app (one process, potentially multiple threads) and a native C++ application that is linked to a C++ dll. The dll may or may not be on the same physical machine. What is the best approach for doing so? Any suggestions will be greatly appreciated! T...
Implementing a robust Inter-Process Communication (IPC) solution between a Java Virtual Machine (JVM) application and a native C++ application (whether it's in a shared library (DLL) or a separate executable) can be accomplished through a few approaches. Here are some of the best options based on your requirements: ##...
23,510
[ { "from": "human", "value": "I would like to implement a robust IPC solution between a single JVM app (one process, potentially multiple threads) and a native C++ application that is linked to a C++ dll. The dll may or may not be on the same physical machine. What is the best approach for doing so?\nAny s...
I can't find any method to change it. Any help will be appreciated!
Of course! I’d be happy to help. However, I need a bit more information about what you’re trying to change. Are you referring to a specific software, device, setting, or something else? Please provide more details, and I'll do my best to assist you!
33,847
[ { "from": "human", "value": "I can't find any method to change it. Any help will be appreciated!\n" }, { "from": "gpt", "value": "Of course! I’d be happy to help. However, I need a bit more information about what you’re trying to change. Are you referring to a specific software, device, setting,...
I want to write a web application using Google App Engine (so the reference language would be Python). My application needs a simple search engine, so the users would be able to find data specifying keywords. For example, if I have one table with those rows: 1 Office space 2 2001: A space odyssey 3 Brazil and the u...
Creating a simple search engine for your web application using Google App Engine and Python involves a few steps, focusing on querying and string matching rather than complex indexing algorithms. Below are some technical guidelines and approaches for building your search functionality. ### 1. Data Structure **Storage...
25,286
[ { "from": "human", "value": "I want to write a web application using Google App Engine (so the reference language would be Python). My application needs a simple search engine, so the users would be able to find data specifying keywords.\nFor example, if I have one table with those rows:\n\n1 Office space 2...
New school datastore paradigms like Google BigTable and Amazon SimpleDB are specifically designed for scalability, among other things. Basically, disallowing joins and denormalization are the ways this is being accomplished. In this topic, however, the consensus seems to be that joins on large tables don't necessarilly...
You raise some important points regarding the design choices behind NoSQL systems like Google BigTable and Amazon SimpleDB. Let's delve into the reasons these systems often disallow joins and encourage denormalization, especially in the context of scalability and performance. ### 1. **Scalability and Performance** - ...
25,244
[ { "from": "human", "value": "New school datastore paradigms like Google BigTable and Amazon SimpleDB are specifically designed for scalability, among other things. Basically, disallowing joins and denormalization are the ways this is being accomplished.\nIn this topic, however, the consensus seems to be tha...
i have a bunch of sql scripts that should upgrade the database when the java web application starts up. i tried using the ibatis scriptrunner, but it fails gloriously when defining triggers, where the ";" character does not mark an end of statement. now i have written my own version of a script runner, which basically ...
Your situation presents a common challenge in managing SQL scripts for upgrades, especially when dealing with PL/SQL and Oracle databases, where the syntax and conventions differ significantly from standard SQL. Given your requirements and concerns, here are some suggestions and improvements you could consider for your...
27,757
[ { "from": "human", "value": "i have a bunch of sql scripts that should upgrade the database when the java web application starts up.\ni tried using the ibatis scriptrunner, but it fails gloriously when defining triggers, where the \";\" character does not mark an end of statement.\nnow i have written my own...
A lot of iPhone apps use a blue badge to indicate the number of items in the subviews, such as the Mail client: iPhoto http://img.skitch.com/20081103-tjr9yupbhgr3sqfh7u56if4rsn.preview.jpg Are there any standards way (or even an API) do this? UPDATE: I have created a class called BlueBadge to do this. It is available a...
Yes, the blue badge that indicates the number of items is a common UI element in iOS apps, particularly for notifications or counts related to messages, emails, and other similar items. While there is no official API specifically for creating blue badges, many developers create custom views or use third-party libraries...
31,900
[ { "from": "human", "value": "A lot of iPhone apps use a blue badge to indicate the number of items in the subviews, such as the Mail client:\niPhoto http://img.skitch.com/20081103-tjr9yupbhgr3sqfh7u56if4rsn.preview.jpg\nAre there any standards way (or even an API) do this?\nUPDATE: I have created a class ca...
I've caught the bug to learn functional programming for real. So my next self-study project is to work through the Structure and Interpretation of Computer Programs. Unfortunately, I've never learned Lisp, as I was not a CS major in college. While SICP does not emphasize the tools for programming, doing the exercises ...
It's great that you're diving into functional programming and looking to tackle "Structure and Interpretation of Computer Programs" (SICP). The book is a classic and offers deep insights into programming concepts, using Scheme as its primary language. Here are some points to consider regarding your choice of language f...
26,850
[ { "from": "human", "value": "I've caught the bug to learn functional programming for real. So my\nnext self-study project is to work through the Structure and\nInterpretation of Computer Programs. Unfortunately, I've never\nlearned Lisp, as I was not a CS major in college. \nWhile SICP does not emphasize th...
I'm using this XPath to get the value of a field: //input[@type="hidden"][@name="val"]/@value I get several results, but I only want the first. Using //input[@type="hidden"][@name="val"]/@value[1] Doesn't work. Once I have this, how do I pick up the value in Greasemonkey? I am trying things like: alert("val " + val.s...
To get the first value from the XPath expression you provided, you can make a small adjustment. The correct way to get the first value is to use the `position()` function in your XPath expression. However, if you want to retrieve only the first matching element's value, you can access it directly using the XPath query ...
30,131
[ { "from": "human", "value": "I'm using this XPath to get the value of a field:\n//input[@type=\"hidden\"][@name=\"val\"]/@value\n\nI get several results, but I only want the first. Using\n//input[@type=\"hidden\"][@name=\"val\"]/@value[1]\n\nDoesn't work. Once I have this, how do I pick up the value in Grea...
I've been working with a small group of people on a coding project for fun. It's an organized and fairly cohesive group. The people I work with all have various skill sets related to programming, but some of them use older or outright wrong methods, such as excessive global variables, poor naming conventions, and oth...
Navigating conversations about coding practices, especially with peers who may have differing skill sets or approaches, can be delicate. Here are some strategies to introduce better methodologies in a positive and constructive manner: 1. **Lead by Example**: When you contribute code, use modern practices and well-esta...
30,319
[ { "from": "human", "value": "I've been working with a small group of people on a coding project for fun. It's an organized and fairly cohesive group. The people I work with all have various skill sets related to programming, but some of them use older or outright wrong methods, such as excessive global va...
I have barcode images in jpg format and want to extract barcode # from those. Please help!
To extract barcodes from images in JPG format, you can use a combination of Python libraries that handle image processing and barcode decoding. One popular approach is to use the `opencv-python` library for image manipulation and `pyzbar` for barcode decoding. Here's how you can do it step by step: ### Step 1: Install...
28,925
[ { "from": "human", "value": "I have barcode images in jpg format and want to extract barcode # from those. Please help!\n" }, { "from": "gpt", "value": "To extract barcodes from images in JPG format, you can use a combination of Python libraries that handle image processing and barcode decoding....
I've always done web apps and now I need to do a console app. I need to use both an odbc connection and a regular connection. In the past I would have used: <add name="LinkConnectionString" connectionString="Data Source=SERENITY\SQLEXPRESS;Initial Catalog=Link;Integrated Security=True" providerName="System.Data.SqlCli...
Sure! To create a console application in C# that uses both an ODBC connection and a regular SQL Server connection, you'll need to define the connection strings directly in your code rather than using the `web.config` file. Below is an example of how to do this. ### Regular SQL Server Connection String For the SQL Serv...
28,902
[ { "from": "human", "value": "I've always done web apps and now I need to do a console app. I need to use both an odbc connection and a regular connection. \nIn the past I would have used:\n<add name=\"LinkConnectionString\" connectionString=\"Data Source=SERENITY\\SQLEXPRESS;Initial Catalog=Link;Integrated ...
I'm developing an application which has a lot of text and also different modules which can be included or not in every build. For each saved project we generate automatically a report with all the details (i.e. description of algorithms used in that project and so on). Currently we embed all text as strings in the sour...
The choice between embedding documentation directly in the code versus using external documentation files depends on various factors, including maintainability, ease of translation, and the desired workflow for your team. Here are some considerations for each approach: ### Embedding Documentation in Code **Pros:** 1....
27,441
[ { "from": "human", "value": "I'm developing an application which has a lot of text and also different modules which can be included or not in every build.\nFor each saved project we generate automatically a report with all the details (i.e. description of algorithms used in that project and so on). Currentl...
Here's the situation - I've got a shell that loads an external .swf. Now, that .swf is 800x600, but it's an animation piece, and there are elements that extends off the stage. When I load the .swf into the shell and call its width attribute, it returns 1200 - because it's including the elements that break out of the st...
In Adobe Flash (or ActionScript), when you load an external .swf file, you typically only get access to the properties that the loaded .swf exposes. Unfortunately, there are no built-in properties that specifically differentiate between a "calculated width" (including off-stage elements) and a "default width" (the stag...
26,892
[ { "from": "human", "value": "Here's the situation - I've got a shell that loads an external .swf. Now, that .swf is 800x600, but it's an animation piece, and there are elements that extends off the stage. When I load the .swf into the shell and call its width attribute, it returns 1200 - because it's includ...
I tried GNUBOX which use bluetooth to connect to my computer then to the internet. It's very painful to set up (under windows more than under linux, but it's still painful, it works 1 time on 3). I own a Nokia 6630 so there is no WLAN support. Is there any emulator? I'd need to know something like max width, max heigh...
Setting up GNUBOX for internet access via Bluetooth can indeed be a challenging experience, especially with compatibility issues across different operating systems. If you're looking for an emulator or software to test and simulate the capabilities of your Nokia 6630, here are a few suggestions: ### Emulators 1. **No...
26,291
[ { "from": "human", "value": "I tried GNUBOX which use bluetooth to connect to my computer then to the internet. It's very painful to set up (under windows more than under linux, but it's still painful, it works 1 time on 3).\nI own a Nokia 6630 so there is no WLAN support. Is there any emulator? I'd need t...
I am working on a process to allow people to upload PDF files and manage the document (page order) via a web based interface. The pages of the PDF file need to be cropped to a particular size for printing and currently we run them through a Photoshop action that takes care of this. What I want to do is upload the PDF f...
Implementing a system for uploading PDFs, processing them, and providing progress updates can be achieved through various architectures and technologies. Below, I outline a possible approach with key components and techniques to consider for both processing and job tracking. ### Overall Architecture 1. **Web Server**:...
25,595
[ { "from": "human", "value": "I am working on a process to allow people to upload PDF files and manage the document (page order) via a web based interface.\nThe pages of the PDF file need to be cropped to a particular size for printing and currently we run them through a Photoshop action that takes care of t...
I have a VB.NET ClickOnce application that I am trying to install on my computer. Previously, I was able to install and run these apps without issue. Now when I install the application, I can see the flash of a window opening, and then nothing. (There are also no processes left hanging or anything when viewed with th...
It seems like you're facing a frustrating issue with your VB.NET ClickOnce application not launching correctly. Here are some steps to troubleshoot and resolve the problem: 1. **Check Application Logs**: - ClickOnce applications often log errors to the Windows Event Viewer. You can open the Event Viewer (type `eve...
26,280
[ { "from": "human", "value": "I have a VB.NET ClickOnce application that I am trying to install on my computer. Previously, I was able to install and run these apps without issue. Now when I install the application, I can see the flash of a window opening, and then nothing. (There are also no processes lef...
How can I count operations in C++? I'd like to analyze code in a better way than just timing it since the time is often rounded to 0 millisec.
Counting operations in C++ can provide a more precise analysis of your code's performance characteristics compared to just measuring execution time. Here are several methods you can use to count operations in C++: ### 1. Manual Counting This is the most straightforward approach. You manually count the number of operat...
27,023
[ { "from": "human", "value": "How can I count operations in C++? I'd like to analyze code in a better way than just timing it since the time is often rounded to 0 millisec.\n" }, { "from": "gpt", "value": "Counting operations in C++ can provide a more precise analysis of your code's performance c...
I'm currently using Subversion to manage my ASP.NET website. I'm finding that whenever I go to upload my website to my server, I'm copying a large number of hidden .svn folders and whatever contents may lie within them. Does anyone have any suggestions for avoiding this? I don't particularly want those hidden .svn fold...
To avoid uploading `.svn` folders to your production server when deploying your ASP.NET website, you have a few options. Here are some suggestions: ### 1. Use a Build Script Create a build script that cleans up your working directory before you deploy. You can write a simple PowerShell or batch script to delete all `....
29,078
[ { "from": "human", "value": "I'm currently using Subversion to manage my ASP.NET website. I'm finding that whenever I go to upload my website to my server, I'm copying a large number of hidden .svn folders and whatever contents may lie within them.\nDoes anyone have any suggestions for avoiding this? I don'...
I need a Project management tool that works in Linux, and has Gantt charts. It doesn't have to be free, just not expensive. I don't care how it stores the information I give it, as long as I can access it. I must be able to print the Gantt charts. Must work in Linux. With those requirements, what can you recommend? T...
Based on your requirements for a project management tool that works on Linux, includes Gantt chart functionality, allows for printing, and is reasonably priced, here are some recommendations: 1. **GanttProject** - **Overview**: GanttProject is a free desktop tool that runs on multiple platforms, including Linux. It...
23,691
[ { "from": "human", "value": "I need a Project management tool that works in Linux, and has Gantt charts.\n\nIt doesn't have to be free, just not expensive.\nI don't care how it stores the information I give it, as long as I can access it.\nI must be able to print the Gantt charts.\nMust work in Linux.\n\nWi...
Are there any issues with running an asp.net 1.1 application under windows server 2008 64-bit web edition?
Running an ASP.NET 1.1 application on Windows Server 2008, especially in its 64-bit Web Edition, can present several issues. Here are some key considerations and potential issues: 1. **Compatibility**: ASP.NET 1.1 was designed for older versions of Windows and might not be fully compatible with the newer architecture ...
30,159
[ { "from": "human", "value": "Are there any issues with running an asp.net 1.1 application under windows server 2008 64-bit web edition?\n" }, { "from": "gpt", "value": "Running an ASP.NET 1.1 application on Windows Server 2008, especially in its 64-bit Web Edition, can present several issues. He...
I've just installed CodeGear Studio 2009 and I didn`t find where I can put the Intellisense and code hints on. And, by the way, in Visual Studio we can indent selected blocks of code in the same way. How can I use similar functions in CodeGear? Any ideas about that?
CodeGear Studio 2009, which is a version of the Delphi IDE, has its own ways of handling IntelliSense and code formatting. Here are some steps to enable IntelliSense and code hints, as well as how to indent blocks of code: ### Enabling IntelliSense and Code Hints 1. **Access Preferences**: Go to `Tools` in the menu, t...
29,673
[ { "from": "human", "value": "I've just installed CodeGear Studio 2009 and I didn`t find where I can put the Intellisense and code hints on.\nAnd, by the way, in Visual Studio we can indent selected blocks of code in the same way. How can I use similar functions in CodeGear?\nAny ideas about that?\n" }, ...
Is there any solution how to initialize properties of component marked as 'internal'? What assembly name should I use for InternalsVisibleTo attrribute or it won't help?
In .NET, if you want to allow another assembly to access the internal members of your assembly (like properties, methods, or classes), you can use the `InternalsVisibleTo` attribute. This attribute must be applied in the assembly where the internal members are defined. ### Steps to Use `InternalsVisibleTo` 1. **Defin...
29,798
[ { "from": "human", "value": "Is there any solution how to initialize properties of component marked as 'internal'? What assembly name should I use for InternalsVisibleTo attrribute or it won't help?\n" }, { "from": "gpt", "value": "In .NET, if you want to allow another assembly to access the int...
I have a c# form (let's call it MainForm) with a number of custom controls on it. I'd like to have the MainForm.OnClick() method fire anytime someone clicks on the form regardless of whether the click happened on the form or if the click was on one of the custom controls. I'm looking for behavior similar to the KeyPrev...
To achieve a global click event handler on a Windows Forms application that captures all click events on the form and its child controls, you can override the `OnClick` method in your `MainForm` class. However, since the `OnClick` method is not automatically invoked for child controls, you can use the `Control.Click` e...
26,782
[ { "from": "human", "value": "I have a c# form (let's call it MainForm) with a number of custom controls on it. I'd like to have the MainForm.OnClick() method fire anytime someone clicks on the form regardless of whether the click happened on the form or if the click was on one of the custom controls. I'm lo...
I've been using maven2 and hudson for a while to do my continuous integration, but I find that Eclipse and Maven do not play well together. Sure there's a plugin, but it's cranky to mash the maven project into something that eclipse likes and the build times and unit test are too long. I'm considering switching back to...
Switching from Maven and Hudson to a pure Eclipse project can streamline your development process, especially if you prefer a more integrated development environment. However, you can still incorporate continuous integration (CI) practices and maintain automated testing without relying heavily on Maven. Here are some s...
24,156
[ { "from": "human", "value": "I've been using maven2 and hudson for a while to do my continuous integration, but I find that Eclipse and Maven do not play well together. Sure there's a plugin, but it's cranky to mash the maven project into something that eclipse likes and the build times and unit test are to...
Could someone supply some code that would get the xpath of a System.Xml.XmlNode instance? Thanks!
To obtain the XPath of a `System.Xml.XmlNode` instance in C#, you can create a function that traverses the XML tree from the node to the root, constructing the XPath along the way. Below is a code example that demonstrates how to achieve this: ```csharp using System; using System.Xml; class Program { static void ...
28,305
[ { "from": "human", "value": "Could someone supply some code that would get the xpath of a System.Xml.XmlNode instance?\nThanks!\n" }, { "from": "gpt", "value": "To obtain the XPath of a `System.Xml.XmlNode` instance in C#, you can create a function that traverses the XML tree from the node to th...
I have Slackware 12.1 and wish to try out Eclipse for PHP/HTML/JavaScript development. However, it seems I'm facing myriad of possible options and I'd hate to miss the best thing and give up on Eclipse (I'm currently using Geany, but I'm missing some stuff like , for example, auto-complete for JavaScript) I'm currently...
Given your interest in PHP, HTML, and JavaScript development, as well as your current dissatisfaction with your existing tools, Eclipse could be a good option. However, there are a few considerations to keep in mind when choosing the right version and whether or not to stick with Eclipse. ### Eclipse PDT Versions 1. ...
27,294
[ { "from": "human", "value": "I have Slackware 12.1 and wish to try out Eclipse for PHP/HTML/JavaScript development. However, it seems I'm facing myriad of possible options and I'd hate to miss the best thing and give up on Eclipse (I'm currently using Geany, but I'm missing some stuff like , for example, au...
So if I have to choose between a hash table or a prefix tree what are the discriminating factors that would lead me to choose one over the other. From my own naive point of view it seems as though using a trie has some extra overhead since it isn't stored as an array but that in terms of run time (assuming the longest ...
Choosing between a hash table and a trie (prefix tree) depends on several factors, including your specific use case, the nature of the data you are storing, and the types of operations you need to perform. Here are some discriminating factors to consider: ### 1. **Structure and Storage Efficiency:** - **Hash Tables:**...
28,161
[ { "from": "human", "value": "So if I have to choose between a hash table or a prefix tree what are the discriminating factors that would lead me to choose one over the other. From my own naive point of view it seems as though using a trie has some extra overhead since it isn't stored as an array but that in...
Is there a URL for StackOverflow that I can use on the VS startpage in place of the never updated MS page? The URL that VS uses can be set on the Tools->Options::Startup dialog. I've tried https://stackoverflow.com/feeds VS complaints with the following error: The current news channel might not be a valid RSS feed,...
Visual Studio's startup page supports RSS feeds, but it may require a valid RSS feed URL that conforms to the expected format. The URL you provided (`https://stackoverflow.com/feeds`) does not work because it does not lead to a valid RSS feed specifically for Stack Overflow's main site. Instead, you can use the follow...
31,852
[ { "from": "human", "value": "Is there a URL for StackOverflow that I can use on the VS startpage in place of the never updated MS page? The URL that VS uses can be set on the Tools->Options::Startup dialog.\nI've tried https://stackoverflow.com/feeds VS complaints with the following error:\n\nThe current n...
I want the log to roll over as long as the application is running, but I want the log to start fresh when the application is restarted. Updated: Based on erickson's feedback, my appender looks like this: <appender name="myRFA" class="org.apache.log4j.RollingFileAppender"> <param name="File" value="my-server.lo...
It looks like you are using Log4j and have already made progress toward your logging requirements. You've set up the `RollingFileAppender` correctly to ensure that the main log file is truncated at startup, but you're seeing that the rolled files remain intact. To achieve your goal of starting fresh with the main log...
29,332
[ { "from": "human", "value": "I want the log to roll over as long as the application is running, but I want the log to start fresh when the application is restarted.\nUpdated:\nBased on erickson's feedback, my appender looks like this:\n <appender name=\"myRFA\" class=\"org.apache.log4j.RollingFileAppender...
I use jsmin to compress my javascript files before uploading them to production. Since I tend to have one "code-behind" javascript file per page, I wind up doing this a lot. I installed a Windows Powertoy that adds a context menu item in Windows Explorer, so I can "Open Command Window Here". When I click that, the com...
You can achieve this by creating a custom context menu item in Windows that allows you to right-click on a `.js` file and run `jsmin` to create a minified version. Here’s how you can set it up: ### Step 1: Create a Batch File 1. Open Notepad (or any text editor). 2. Paste the following code: ```batch @echo off...
24,217
[ { "from": "human", "value": "I use jsmin to compress my javascript files before uploading them to production.\nSince I tend to have one \"code-behind\" javascript file per page, I wind up doing this a lot.\nI installed a Windows Powertoy that adds a context menu item in Windows Explorer, so I can \"Open Com...
I need to develop a system for storing large numbers (10's to 100's of thousands) of objects. Each object is email-like - there is a main text body, and several ancillary text fields of limited size. A body will be from a few bytes, to several KB in size. Each item will have a single unique ID (probably a GUID) th...
For your project, given the requirements you've outlined, there are several viable alternatives to traditional relational databases, as well as considerations for using a database effectively. Here are some options and insights based on your needs: ### Alternatives to Traditional Relational Databases 1. **Key-Value S...
27,832
[ { "from": "human", "value": "I need to develop a system for storing large numbers (10's to 100's of thousands) of objects. Each object is email-like - there is a main text body, and several ancillary text fields of limited size. A body will be from a few bytes, to several KB in size. \nEach item will ha...
I have a problem with a Delphi 2009 project : It can't initialize Indy 10 ! This code worked fine before in Delphi 2007 (although we might have been using an older revision of Indy, but I suspect that has not much to do with it); The initial call to IdWinsock2.InitializeWinSock(), raises this exception (with error code...
The issue you are encountering with Indy 10 in Delphi 2009 may be related to changes in how the memory management and DLL loading are handled between Delphi 2007 and Delphi 2009. The error code 998 ("Invalid access to memory location") suggests that there might be a memory corruption or an access violation happening wh...
29,904
[ { "from": "human", "value": "I have a problem with a Delphi 2009 project : It can't initialize Indy 10 !\nThis code worked fine before in Delphi 2007 (although we might have been using an older revision of Indy, but I suspect that has not much to do with it);\nThe initial call to IdWinsock2.InitializeWinSoc...
I use the ASP.NET Development Web server (also known as the Visual Studio Development Web server) to do local web site debugging and testing. I've pretty much found exact functionality with IIS with the dev web server. However - where can you manage the settings of the dev web server - specifically regarding never cac...
The ASP.NET Development Web Server (also known as Cassini) does not have a dedicated management interface like IIS, so you can't change its settings directly via a graphical interface. However, you can configure caching behavior in your ASP.NET application by modifying your web.config file or by using attributes in you...
26,189
[ { "from": "human", "value": "I use the ASP.NET Development Web server (also known as the Visual Studio Development Web server) to do local web site debugging and testing.\nI've pretty much found exact functionality with IIS with the dev web server. However - where can you manage the settings of the dev web...
Which JSON rewriter is the best for applications written in Java? Criteria may vary. I'm personally most interested in stability and performance.
When it comes to JSON rewriting in Java, there are several libraries that stand out, particularly in terms of stability and performance. Here are a few of the most popular options you might consider: 1. **Jackson**: - **Overview**: Jackson is one of the most widely used libraries for processing JSON in Java. It's k...
26,695
[ { "from": "human", "value": "Which JSON rewriter is the best for applications written in Java? Criteria may vary. I'm personally most interested in stability and performance.\n" }, { "from": "gpt", "value": "When it comes to JSON rewriting in Java, there are several libraries that stand out, p...
Like most developers, I'm a business developer, which in essence consists of slapping a UI onto some back-end data store. (We all know there's a lot more to it than that, but that's usually what it boils down to.) I understand that game development is very different from business development, but I'm having a hard time...
You're right that game development and business application development involve fundamentally different approaches, particularly when it comes to programming. Here's a breakdown of some of the key differences that you can share with your friend: ### 1. **Core Focus and Goals** - **Business Development**: The primar...
21,966
[ { "from": "human", "value": "Like most developers, I'm a business developer, which in essence consists of slapping a UI onto some back-end data store. (We all know there's a lot more to it than that, but that's usually what it boils down to.)\nI understand that game development is very different from busine...
I have some event handler on a boundary class that manages a persistence mechanism for a given generic transaction: void MyBoundaryClass::MyEventHandler(...) { //retrieve stuff from the UI //... //declare and initialize trasaction to persist SimpleTransaction myTransaction(.../*pass down stuff*/); //do some o...
Your instincts about the complexity of your event handler and the need for better encapsulation are valid. Having a `TransactionManager` that encapsulates both the `SimpleTransaction` and `TransactionPersistor` can indeed provide several benefits: ### Benefits of Introducing a TransactionManager 1. **Single Responsib...
27,181
[ { "from": "human", "value": "I have some event handler on a boundary class that manages a persistence mechanism for a given generic transaction:\nvoid MyBoundaryClass::MyEventHandler(...)\n{\n //retrieve stuff from the UI\n //...\n //declare and initialize trasaction to persist\n SimpleTransaction myTra...
As far as i know the EAP editions of JBoss Application Server (AS) are just a bunch of community edition JBoss projects with some sugar. So, what is the community edition of the JBoss Application Server that JBoss EAP 4.3.0 corresponds to?
JBoss EAP (Enterprise Application Platform) 4.3.0 corresponds to JBoss Application Server (AS) 4.2.3, which is the community edition that was available prior to EAP 4.3.0. The EAP versions are generally based on the community releases, with additional support, bug fixes, and enhancements tailored for enterprise use. In...
33,654
[ { "from": "human", "value": "As far as i know the EAP editions of JBoss Application Server (AS) are just a bunch of community edition JBoss projects with some sugar.\nSo, what is the community edition of the JBoss Application Server that JBoss EAP 4.3.0 corresponds to?\n" }, { "from": "gpt", "va...
Ok, NHibernate question here. I have two objects that I would like to map to each other. I have the "Vendor" and the "Township" ... now the two should be linked by zip code, NOT ID. I have done this many times btw objects using id's but never something like this. The issue I am having it that the ZipCodes while stored...
It sounds like you are trying to establish a many-to-one relationship between your `Vendor` and `Township` entities based on the `ZipCode`, rather than the IDs. There are a few things that could be going wrong with your configuration. Below are some suggestions and points to check that might help resolve the issue. ##...
25,827
[ { "from": "human", "value": "Ok, NHibernate question here. I have two objects that I would like to map to each other. I have the \"Vendor\" and the \"Township\" ... now the two should be linked by zip code, NOT ID. I have done this many times btw objects using id's but never something like this. \nThe issue...
I do more and more exercise with Lambda but I do not figure out why sometime example use .AsQueryable(); that use the IQueryable and sometime it omit the .AsQueryable(); and use the IEnumerable. I have read the MSDN but I do no see how "executing an expression tree" is an advantage over not. Anyone can explain it to me...
Certainly! The distinction between `IQueryable` and `IEnumerable` can be a bit confusing, but it’s fundamental to understanding how LINQ (Language Integrated Query) works in .NET. ### Key Differences Between `IQueryable` and `IEnumerable`: 1. **Execution Context**: - **IEnumerable**: This interface is used for in-...
26,778
[ { "from": "human", "value": "I do more and more exercise with Lambda but I do not figure out why sometime example use .AsQueryable(); that use the IQueryable and sometime it omit the .AsQueryable(); and use the IEnumerable.\nI have read the MSDN but I do no see how \"executing an expression tree\" is an adv...
Has anybody used a good obfuscator for PHP? I've tried some but they don't work for very big projects. They can't handle variables that are included in one file and used in another, for instance. Or do you have any other tricks for stopping the spread of your code?
Obfuscating PHP code can be a challenging task, especially for larger projects where variable names and functions may be spread across multiple files. Here are some options and techniques to consider for PHP obfuscation: ### 1. **Obfuscators** There are several PHP obfuscators available, some of which might handle lar...
28,473
[ { "from": "human", "value": "Has anybody used a good obfuscator for PHP? I've tried some but they don't work for very big projects. They can't handle variables that are included in one file and used in another, for instance.\nOr do you have any other tricks for stopping the spread of your code?\n" }, { ...
I have a form which is used to insert/display and update. In the edit mode (update), when I pass my BO back to the Controller, what is the best possible way to check if any of the property values were changed, in order to execute the update to the datastore? textbox1.text = CustomerController.GetCustomerInformation(id...
To determine if any properties of your business object (BO) have changed during an edit operation, you can implement a "dirty check" mechanism. This involves comparing the current state of the object with its original state. Here’s how you can do this in a structured way: ### 1. Create a Clone/Copy of the Original Obj...
29,194
[ { "from": "human", "value": "I have a form which is used to insert/display and update. In the edit mode (update), when I pass my BO back to the Controller, what is the best possible way to check if any of the property values were changed, in order to execute the update to the datastore? \ntextbox1.text = Cu...
We're using Prototype for all of our Ajax request handling and to keep things simple we simple render HTML content which is then assigned to the appropriate div using the following function: function ajaxModify(controller, parameters, div_id) { var div = $(div_id); var request = new Ajax.Request ( ...
The challenge you're facing is that when you inject HTML directly into the innerHTML of a div, any `<script>` tags that might be included in that HTML will not execute. This is a common limitation in JavaScript due to security and performance reasons. However, you can modify your `ajaxModify` function to evaluate any ...
29,935
[ { "from": "human", "value": "We're using Prototype for all of our Ajax request handling and to keep things simple we simple render HTML content which is then assigned to the appropriate div using the following function:\nfunction ajaxModify(controller, parameters, div_id)\n{\n var div = $(div_id);\n\n ...
how to find out mal characters(unsupported eg. Ω ) when inserting using sqlloader? or list the mal characters to avoid junk data?
When using SQL*Loader to insert data into an Oracle database, you might encounter unsupported or "mal" characters that could lead to junk data in your database. Here are steps to identify and handle these characters effectively: ### Step 1: Identify Unsupported Characters To find unsupported characters, you can perfo...
23,980
[ { "from": "human", "value": "how to find out mal characters(unsupported eg. Ω ) when inserting using sqlloader? or \nlist the mal characters to avoid junk data?\n" }, { "from": "gpt", "value": "When using SQL*Loader to insert data into an Oracle database, you might encounter unsupported or \"mal...
Does anybody know how to edit a syntax file for VIM so that keywords are capitalized automatically? I need to do this to keep my coding style consistent with the rest of the developers in my team. I'm using VIm version 7.2 (actually gVIM) and the syntax file I'm using is the Progress.vim file (installed automatically w...
To make keywords in your Progress syntax file automatically capitalize in Vim, you can use an `autocmd` in your Vim configuration file (`.vimrc`). This method will enable you to capitalize certain keywords as you type. Here are the steps to do that: ### Step 1: Modify Your `.vimrc` Open your `.vimrc` file (located in...
29,641
[ { "from": "human", "value": "Does anybody know how to edit a syntax file for VIM so that keywords are capitalized automatically? I need to do this to keep my coding style consistent with the rest of the developers in my team.\nI'm using VIm version 7.2 (actually gVIM) and the syntax file I'm using is the Pr...
Is there a connection limit on Sql Server 2005 Developers Edition. We have many threads grabbing connections, and I know ADO.NET does connection pooling, but I get OutOfMemory exceptions. We take out the db connections and it works fine.
SQL Server 2005 Developer Edition has the same connection limits as the other editions of SQL Server 2005 (such as Standard and Enterprise). The maximum number of simultaneous connections is 32,767. However, practical limits are often reached much sooner due to factors like server resources (CPU, memory), system load, ...
27,351
[ { "from": "human", "value": "Is there a connection limit on Sql Server 2005 Developers Edition. We have many threads grabbing connections, and I know ADO.NET does connection pooling, but I get OutOfMemory exceptions. We take out the db connections and it works fine. \n" }, { "from": "gpt", "va...
Given the following java enum: public enum AgeRange { A18TO23 { public String toString() { return "18 - 23"; } }, A24TO29 { public String toString() { return "24 - 29"; } }, A30TO35 { public String toString() { ...
Yes, you can convert a string value like "18 - 23" to the corresponding enum value in `AgeRange` by adding a static method that iterates through the enum constants and compares their string representations. Here's how you can implement that: ```java public enum AgeRange { A18TO23 { public String toString(...
27,245
[ { "from": "human", "value": "Given the following java enum:\npublic enum AgeRange {\n\n A18TO23 {\n public String toString() { \n return \"18 - 23\";\n }\n },\n A24TO29 {\n public String toString() { \n return \"24 - 29\";\n }\n },\n ...
My ASP.NET MVC application will take a lot of bandwidth and storage space. How can I setup an ASP.NET upload page so the file the user uploaded will go straight to Amazon S3 without using my web server's storage and bandwidth?
To set up an ASP.NET MVC application that allows users to upload files directly to Amazon S3 without utilizing your web server's storage and bandwidth, you can use the AWS SDK for .NET along with pre-signed URLs. This allows the client to upload files directly to S3 without the files passing through your server. Here'...
21,449
[ { "from": "human", "value": "My ASP.NET MVC application will take a lot of bandwidth and storage space. How can I setup an ASP.NET upload page so the file the user uploaded will go straight to Amazon S3 without using my web server's storage and bandwidth?\n" }, { "from": "gpt", "value": "To set ...
I was wondering how other developers begin refactoring. What is your first step? How this process (refactoring) differ if you refactor code which is not yours? Do you write tests while refactoring?
Refactoring is a crucial part of maintaining and improving code quality. Here’s a general approach that developers commonly follow when they begin the refactoring process: ### First Steps in Refactoring 1. **Understand the Existing Code**: - Before making any changes, spend time understanding the existing code. Th...
24,811
[ { "from": "human", "value": "I was wondering how other developers begin refactoring. What is your first step? How this process (refactoring) differ if you refactor code which is not yours? Do you write tests while refactoring?\n" }, { "from": "gpt", "value": "Refactoring is a crucial part of mai...
For the most part, you just take whatever Visual Studio sets it for you as a default... I'm referring to the BuildAction property for each file selected in Solution Explorer. There are a number of options and it's difficult to know what each one of them will do.
In Visual Studio, the **Build Action** property of a file determines how that file is treated during the build process of your project. Different file types have different purposes, and setting the Build Action correctly is essential for your application to function as intended. Here’s a breakdown of the most common Bu...
29,159
[ { "from": "human", "value": "For the most part, you just take whatever Visual Studio sets it for you as a default... I'm referring to the BuildAction property for each file selected in Solution Explorer. There are a number of options and it's difficult to know what each one of them will do.\n" }, { ...
Is it possible to run more than one website on IIS 5.1 (Windows XP)? I'm able to create multiple websites through adminscripts in IIS, but only one website can be active at a time. Is there is any workaround, trick, or script for this limitation? Thanks,
IIS 5.1, which comes with Windows XP, does indeed have limitations when it comes to hosting multiple websites. By default, IIS 5.1 supports only one website at a time since it was designed for individual use and small development setups. However, there are a few approaches you can consider to work around this limitatio...
29,809
[ { "from": "human", "value": "Is it possible to run more than one website on IIS 5.1 (Windows XP)?\nI'm able to create multiple websites through adminscripts in IIS, but only one website can be active at a time.\nIs there is any workaround, trick, or script for this limitation?\nThanks,\n" }, { "from...
I'm trying to extract the polygons from placemarks in a KML file. So far so good: Imports <xmlns:g='http://earth.google.com/kml/2.0'> Imports System.Xml.Linq Partial Class Test_ImportPolygons Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Lo...
To extract the entire `<Polygon>` block as a string from an `XElement`, you can use the `ToString()` method, which returns the XML representation of the `
27,797
[ { "from": "human", "value": "I'm trying to extract the polygons from placemarks in a KML file. So far so good:\nImports <xmlns:g='http://earth.google.com/kml/2.0'>\nImports System.Xml.Linq\n\nPartial Class Test_ImportPolygons\n Inherits System.Web.UI.Page\n\n Protected Sub Page_Load(ByVal sender As Ob...
So far I've been using public void run() {} methods to execute my code in Java. When/why might one want to use main() or init() instead of run()?
In Java, the method you choose to execute your code can depend on the context in which you're working. Here’s a brief overview of when and why you might want to use `main()`, `init()`, and `run()`: ### 1. `main()` - **Purpose**: The `main()` method is the entry point for any standalone Java application. It’s where the...
28,157
[ { "from": "human", "value": "So far I've been using public void run() {} methods to execute my code in Java. When/why might one want to use main() or init() instead of run()?\n" }, { "from": "gpt", "value": "In Java, the method you choose to execute your code can depend on the context in which y...
Where to read up on (the best-practice in) source code formatting, for individual languages i.e. what are the conventions for naming variables etc., for indentation and where to place braces, how and where to include comments, etc. For example for C Kernighan and Ritchie's book The C Programming Language and Linus Tor...
Getting a good start with coding styles and best practices in source code formatting is crucial for writing maintainable and readable code. Here are some key resources, organized by programming language, along with general principles and guidance on how to get started with coding styles: ### General Principles of Code...
28,759
[ { "from": "human", "value": "Where to read up on (the best-practice in) source code formatting, for individual languages i.e. what are the conventions for naming variables etc., for indentation and where to place braces, how and where to include comments, etc. \nFor example for C Kernighan and Ritchie's boo...
I'm using CodeSynthesis XSD C++/Tree Mapping utility to convert an existing xsd into c++ code we can populate the values in. This was we always make sure we follow the schema. After doing the conversion, I'm trying to get it to work so I can test it. Problem is, I'm not used to doing this in c++ and it's my first tim...
In your code snippet, there are a few misunderstandings regarding how to instantiate your `ABSTRACTNETWORKMODEL` and the types it expects. ### Key Issues: 1. **Instantiation of `::xml_schema::time`**: You are declaring `::xml_schema::time t();`, which is not creating an instance of `time`. Instead, it is declarin...
29,231
[ { "from": "human", "value": "I'm using CodeSynthesis XSD C++/Tree Mapping utility to convert an existing xsd into c++ code we can populate the values in. This was we always make sure we follow the schema.\nAfter doing the conversion, I'm trying to get it to work so I can test it. Problem is, I'm not used ...
I have a MSSQL2005 DB with about 140 tables. I want to create either an accessible diagram or a printable API type document with the table structure. Is there a program that offers this kind of db visualization? I find the diagramming built into SQL Server to be very clunky and very inaccessible for my DB size.
For visualizing and documenting a SQL Server 2005 database with a large number of tables, there are several tools and methods you can consider that are more user-friendly and effective than the built-in diagramming tool in SQL Server Management Studio (SSMS). Here are some options: 1. **dbForge Studio for SQL Server**...
25,127
[ { "from": "human", "value": "I have a MSSQL2005 DB with about 140 tables. I want to create either an accessible diagram or a printable API type document with the table structure. Is there a program that offers this kind of db visualization?\nI find the diagramming built into SQL Server to be very clunky a...
I've had success with LuaSocket's TCP facility, but I'm having trouble with its FTP module. I always get a timeout when trying to retrieve a (small) file. I can download the file just fine using Firefox or ftp in passive mode (on Ubuntu Dapper Linux). I thought it might be that I need LuaSocket to use passive FTP, bu...
It seems you're encountering issues with LuaSocket's FTP module timing out when trying to retrieve files, even in passive mode. Given the details you've provided, let's troubleshoot and identify possible reasons and solutions for this problem. ### Possible Causes and Solutions 1. **Firewall or Network Configuration**...
22,835
[ { "from": "human", "value": "I've had success with LuaSocket's TCP facility, but I'm having trouble with its FTP module. I always get a timeout when trying to retrieve a (small) file. I can download the file just fine using Firefox or ftp in passive mode (on Ubuntu Dapper Linux).\nI thought it might be th...
At the moment I use PHP for almost everything I develop for the Web but its linguistic limitations are starting to annoy me. However, as I developed some practices and maintain some PHP libraries that help me a lot, I don't feel I'd be ready to just switch to LISP throwing away all my PHP output. It could even be impos...
Integrating LISP and PHP can be a complex task, but it is possible to combine them, allowing you to leverage your existing PHP codebase while exploring LISP's capabilities. Here are a few approaches you can consider: ### 1. **Web Services Approach** You can create a web service in LISP that your PHP application can ca...
28,478
[ { "from": "human", "value": "At the moment I use PHP for almost everything I develop for the Web but its linguistic limitations are starting to annoy me. However, as I developed some practices and maintain some PHP libraries that help me a lot, I don't feel I'd be ready to just switch to LISP throwing away ...
As part of a college project we are localising our application. Is it possible to localise swing components such as JOptionPane and if so how?
Yes, it is possible to localize Swing components, including `JOptionPane`, in Java. Localization in Java is typically done using Resource Bundles that store the strings in different languages. Here's a step-by-step guide on how to localize `JOptionPane`: ### Step 1: Create Resource Bundles 1. Create property files fo...
27,652
[ { "from": "human", "value": "As part of a college project we are localising our application. \nIs it possible to localise swing components such as JOptionPane and if so how?\n" }, { "from": "gpt", "value": "Yes, it is possible to localize Swing components, including `JOptionPane`, in Java. Local...
Is it possible to embed a Vimeo video in Flex? When I try to embed this link in a <mx:SWFLoader/> , it doesn't come up as anything.
Embedding a Vimeo video directly into a Flex application can be a bit tricky because the `<mx:SWFLoader>` component is generally used for loading SWF files, not for embedding HTML content like Vimeo videos. However, you can still achieve this by using a different approach, such as using an HTMLLoader (available in Adob...
22,551
[ { "from": "human", "value": "Is it possible to embed a Vimeo video in Flex?\nWhen I try to embed this link in a <mx:SWFLoader/> , it doesn't come up as anything.\n" }, { "from": "gpt", "value": "Embedding a Vimeo video directly into a Flex application can be a bit tricky because the `<mx:SWFLoad...
I'm considering the best way to design a permissions system for an "admin" web application. The application is likely to have many users, each of whom could be assigned a certain role; some of these users could be permitted to perform specific tasks outside the role. I can think of two ways to design this: one, with a ...
Designing a permissions system is a crucial part of building a robust and secure application. Both approaches you've mentioned have their pros and cons, and the best choice can depend on the specific requirements and future plans for your application. Here’s a breakdown of both methods and some alternative consideratio...
27,392
[ { "from": "human", "value": "I'm considering the best way to design a permissions system for an \"admin\" web application. The application is likely to have many users, each of whom could be assigned a certain role; some of these users could be permitted to perform specific tasks outside the role.\nI can th...
I have class A: public class ClassA<T> Class B derives from A: public class ClassB : ClassA<ClassB> Class C derives from class B: public class ClassC : ClassB Now I have a generic method with constraints public static T Method<T>() where T : ClassA<T> OK, now I want to call: ClassC c = Method<ClassC>(); but I get ...
The issue you're encountering stems from how generics and type constraints work in C#. When you define `ClassA<T>`, you are saying that `ClassA` will work with a specific type `T`. When you derive `ClassB` from `ClassA<ClassB>`, you're essentially binding `ClassB` to the type parameter of `ClassA`, which means that `Cl...
29,638
[ { "from": "human", "value": "I have class A:\npublic class ClassA<T>\n\nClass B derives from A:\npublic class ClassB : ClassA<ClassB>\n\nClass C derives from class B:\npublic class ClassC : ClassB\n\nNow I have a generic method with constraints\npublic static T Method<T>() where T : ClassA<T>\n\nOK, now I w...
I can't seem to get my application up and running on my dev server and I'm not sure why. I have compiled my code in VS 2008 with a target framework of 3.5. I am using 3.5 mainly because I have implemented LINQ rather extensively. Compiling and runs local without any problems. The hang up is that my server only has ...
To run your application that targets .NET Framework 3.5 on a server that only has .NET Framework 2.0 installed, you will likely encounter issues. The .NET Framework versions are not fully backward compatible, especially if your application relies heavily on features introduced in .NET 3.0 or 3.5, such as LINQ. ### Add...
29,689
[ { "from": "human", "value": "I can't seem to get my application up and running on my dev server and I'm not sure why.\nI have compiled my code in VS 2008 with a target framework of 3.5. I am using 3.5 mainly because I have implemented LINQ rather extensively. Compiling and runs local without any problems....
i want to know how to edit a single row (which i select) from a data grid for example i have a datagrid with columns A, B and C and i have a couple rows of data, approx 10 rows. lets say i want to change the value of data within row 4. how would i do this? i am using visual studio 2003, but i guess if visual studio 200...
To edit a single row in a DataGrid in a Windows Forms application using C# in Visual Studio 2003 or 2005, you'll typically follow these steps: 1. **Set Up the DataGrid**: Make sure your DataGrid is bound to a data source, such as a DataTable or a List. This allows you to manipulate the data programmatically. 2. **Sel...
21,196
[ { "from": "human", "value": "i want to know how to edit a single row (which i select) from a data grid\nfor example i have a datagrid with columns A, B and C\nand i have a couple rows of data, approx 10 rows.\nlets say i want to change the value of data within row 4.\nhow would i do this?\ni am using visual...
I am writing a .NET wrapper class for an existing native class which throws exceptions. What are the best practices for translating between native C++ exceptions and Managed exceptions? Catch and re-throw on a one-to-one basis (e.g. std::invalid_argument -> System.System.ArgumentException)? Is there a mapping already d...
When creating a .NET wrapper class for a native C++ class that throws exceptions, handling the translation between native C++ exceptions and managed .NET exceptions is an important aspect. Here are some best practices and considerations for doing this effectively: ### Best Practices 1. **Use Specific Mappings**: It i...
22,391
[ { "from": "human", "value": "I am writing a .NET wrapper class for an existing native class which throws exceptions. What are the best practices for translating between native C++ exceptions and Managed exceptions? Catch and re-throw on a one-to-one basis (e.g. std::invalid_argument -> System.System.Argumen...