instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I have a https link that requires user login & password. If I run it in FX like this: https://usernameassword@www.example.com/link/sublink it will return the xml data as expected. However, what i'm trying to do, is to automate this process. I try to use file_get_contents() in PHP. I even tried to use AJAX, but still do...
To automate the process of fetching XML data from a secure link that requires a username and password in PHP, you can use `cURL`, which provides greater control over HTTP requests compared to `file_get_contents()`. ### Here’s how to do it with cURL in PHP: 1. **Set up cURL to handle basic authentication**. 2. **Get t...
26,545
[ { "from": "human", "value": "I have a https link that requires user login & password. If I run it in FX like this:\nhttps://usernameassword@www.example.com/link/sublink\nit will return the xml data as expected.\nHowever, what i'm trying to do, is to automate this process.\nI try to use file_get_contents() i...
I'm looking for some help and it goes like this: I'm a fairly green software developer, and focus mainly on the web (python/PHP) but am pretty well experienced with Java applications and as an electrical engineering student, looking forward to dive into some c/c++. I've pretty much grown up on Windows machine, but hate...
Making the switch from Windows to Ubuntu can be a rewarding experience, especially for a developer like yourself. Here are some resources and tips to help you transition smoothly: ### 1. **Getting Started with Ubuntu** - **Official Ubuntu Documentation**: The [Ubuntu Desktop Guide](https://help.ubuntu.com/stable/ubunt...
18,227
[ { "from": "human", "value": "I'm looking for some help and it goes like this:\nI'm a fairly green software developer, and focus mainly on the web (python/PHP) but am pretty well experienced with Java applications and as an electrical engineering student, looking forward to dive into some c/c++. I've pretty ...
I read all over the Internet (various sites and blogs) about version control. How great it is and how all developers NEED to use it because it is very useful. Here is the question: do I really need this? I'm a front-end developer (usually just HTML/CSS/JavaScript) and I NEVER had a problem like "Wow, my files from yest...
It's understandable to feel that version control might not be necessary for your workflow, especially if you haven't faced any significant issues in your projects. However, there are several reasons why adopting version control, like Subversion (SVN) or more commonly Git, could be beneficial to you, even as a front-end...
30,288
[ { "from": "human", "value": "I read all over the Internet (various sites and blogs) about version control. How great it is and how all developers NEED to use it because it is very useful.\nHere is the question: do I really need this? I'm a front-end developer (usually just HTML/CSS/JavaScript) and I NEVER h...
A quick question about elf file headers, I can't seem to find anything useful on how to add/change fields in the elf header. I'd like to be able to change the magic numbers and to add a build date to the header, and probably a few other things. As I understand it the linker creates the header information, but I don't...
Yes, it is possible to modify the ELF file header at link time, but it requires a deeper understanding of how ELF files are structured and the tools available for working with them. ### Understanding the ELF Header The ELF (Executable and Linkable Format) header contains various fields, including the magic number, ar...
30,085
[ { "from": "human", "value": "A quick question about elf file headers, I can't seem to find anything useful on how to add/change fields in the elf header. I'd like to be able to change the magic numbers and to add a build date to the header, and probably a few other things. \nAs I understand it the linker c...
I am trying to download an xml.gz file from a remote server with HttpsURLConnection in java, but I am getting an empty response. Here is a sample of my code: URL server = new URL("https://www.myurl.com/path/sample_file.xml.gz"); HttpsURLConnection connection = (HttpsURLConnection)server.openConnection(); connection.co...
If you're getting an empty response when attempting to download the file using `HttpsURLConnection`, there are several things you can check and potentially adjust in your code. Here are some recommendations to troubleshoot and fix the issue: 1. **Check Response Code**: Before reading from the `InputStream`, check the ...
28,042
[ { "from": "human", "value": "I am trying to download an xml.gz file from a remote server with HttpsURLConnection in java, but I am getting an empty response. Here is a sample of my code:\nURL server = new URL(\"https://www.myurl.com/path/sample_file.xml.gz\");\nHttpsURLConnection connection = (HttpsURLConn...
I have an Excel 2003 workbook that contains a macro to copy certain of its sheets across to a new workbook, then save and close the new workbook. It does this several dozen times, with slightly different sheet selections each time. I would like to add an extra step to the macro to export the secondary workbooks' sprea...
To automate the export of your Excel sheets to PDF without the need for manual intervention in a macro, there are a few options you can consider. Here are some suggestions, including free PDF printing solutions that can work with VBA macros: ### 1. **Using Microsoft Print to PDF** If you are using a version of Windows...
25,235
[ { "from": "human", "value": "I have an Excel 2003 workbook that contains a macro to copy certain of its sheets across to a new workbook, then save and close the new workbook. It does this several dozen times, with slightly different sheet selections each time.\nI would like to add an extra step to the macr...
I have put together the following mootools script window.addEvent('domready', function() { var shouts = "timed.php"; var log = $('log_res'); function updateData (url,target) { new Ajax(url,{ method: 'get', update: $(target), onComplete: function() { log.removeC...
Certainly! You can modify your script to include custom HTML (such as a spinning loader) in the `log_res` div while the AJAX request is loading. Here's how you can do that: 1. Create the custom HTML for the spinner. 2. Insert this HTML into the `log_res` div before making the AJAX request. 3. Update the div with the A...
26,751
[ { "from": "human", "value": "I have put together the following mootools script\n window.addEvent('domready', function() {\n var shouts = \"timed.php\";\n var log = $('log_res');\n function updateData (url,target)\n {\n new Ajax(url,{\n method: 'get', \n update: $(target), \n...
Let's say we have a method signature like public static function explodeDn($dn, array &$keys = null, array &$vals = null, $caseFold = self::ATTR_CASEFOLD_NONE) we can easily call the method by omitting all parameters after $dn: $dn=Zend_Ldap_Dn::explodeDn('CN=Alice Baker,CN=Users,DC=example,DC=com'); We can also...
The issue you're encountering with the `explodeDn` method signature is related to the way PHP handles default parameter values and the use of `null` when parameters are declared as nullable types or when they're passed by reference. 1. **Understanding Default Values and References**: - In the method signature you p...
32,680
[ { "from": "human", "value": "Let's say we have a method signature like \npublic static function explodeDn($dn, array &$keys = null, array &$vals = null,\n $caseFold = self::ATTR_CASEFOLD_NONE)\n\nwe can easily call the method by omitting all parameters after $dn:\n$dn=Zend_Ldap_Dn::explodeDn('CN=Alice Ba...
Anyone out there with sufficient knowledge of EMC Documentum and Oracle to know whether it is possible to set up a documentum repository on top of oracle so that it uses Character based field lengths rather than byte based. By Default Documentum seems to use byte based fields so if a field is string(32) it can contain ...
When using EMC Documentum with Oracle, the handling of character data types can indeed lead to confusion, especially when dealing with multi-byte character sets like Unicode. By default, Oracle uses byte semantics for character fields in many configurations, which can lead to the truncation issue you described if you'r...
28,025
[ { "from": "human", "value": "Anyone out there with sufficient knowledge of EMC Documentum and Oracle to know whether it is possible to set up a documentum repository on top of oracle so that it uses Character based field lengths rather than byte based.\nBy Default Documentum seems to use byte based fields s...
I don't know why it happens but my form for some reason does not post properly. I am very sure the form contains the required authentication token: <form action="/account/complete_verify_email/4df78710-e27b-4527-bd2d-71cd2e9a1271" method="post" <div style="margin:0;padding:0"> <input name="authenticity_toke...
It sounds like you experienced a frustrating issue with your form submission, and I'm glad to hear that restarting Safari resolved it! Intermittent behavior like this can often be attributed to a few common causes. Here are some possibilities that might explain what happened: 1. **Browser Cache and Cookies**: Sometime...
32,874
[ { "from": "human", "value": "I don't know why it happens but my form for some reason does not post properly. I am very sure the form contains the required authentication token:\n<form action=\"/account/complete_verify_email/4df78710-e27b-4527-bd2d-71cd2e9a1271\" method=\"post\"\n <div style=\"margin:0;pa...
Is there any way that I can change how a Literal of a code snippet renders when it is used in the code that the snippet generates? Specifically I'd like to know if I can have a literal called say, $PropertyName$ and then get the snippet engine to render "_$PropertyName$ where the first character is made lowercase. I ca...
In many code snippet engines, including those in Visual Studio, you cannot directly modify how a literal renders in a code snippet. However, you can achieve your goal through a workaround involving additional parameters or by using specific conventions in your code snippet template. Here’s a way to approach your requi...
31,211
[ { "from": "human", "value": "Is there any way that I can change how a Literal of a code snippet renders when it is used in the code that the snippet generates?\nSpecifically I'd like to know if I can have a literal called say, $PropertyName$ and then get the snippet engine to render \"_$PropertyName$ where ...
I want to fade out an element and all its child elements after a delay of a few seconds. but I haven't found a way to specify that an effect should start after a specified time delay.
To fade out an element and all of its child elements after a specified time delay, you can use CSS transitions in combination with JavaScript. Here’s a simple example demonstrating how to achieve this: ### HTML ```html <div id="fadeElement" class="fade"> <h1>This is a heading</h1> <p>This is a paragraph inside the...
31,735
[ { "from": "human", "value": "I want to fade out an element and all its child elements after a delay of a few seconds. but I haven't found a way to specify that an effect should start after a specified time delay.\n" }, { "from": "gpt", "value": "To fade out an element and all of its child elemen...
Does anyone know of a set of bindings for C# to drive the FFMpeg library directly ? I could shell to ffmpeg.exe directly but I found it hard to sync/control as a separate process. any help would be appreciated.
Yes, there are several options for C# bindings to work with the FFmpeg library directly instead of shelling out to `ffmpeg.exe`. Here are some popular libraries you can consider: 1. **FFmpeg.AutoGen**: This is a popular C# binding for FFmpeg. It allows you to call FFmpeg functions directly from C#. You will need to ha...
31,845
[ { "from": "human", "value": "Does anyone know of a set of bindings for C# to drive the FFMpeg library directly ? I could shell to ffmpeg.exe directly but I found it hard to sync/control as a separate process. any help would be appreciated.\n" }, { "from": "gpt", "value": "Yes, there are several ...
Has anyone found a plugin for Visual Studio to allow for PowerShell syntax highlighting or IntelliSense? If not, does anyone have any idea why not? I keep hoping someone else with copious free time would have tackled this by now. I have hope since other folks have managed to take the limited documentation and build cu...
As of my last knowledge update in October 2023, there were a few options for adding PowerShell support, including syntax highlighting and IntelliSense, in Visual Studio. However, the most robust integration typically comes from using specific extensions or tools that were either officially supported or community-develo...
33,923
[ { "from": "human", "value": "Has anyone found a plugin for Visual Studio to allow for PowerShell syntax highlighting or IntelliSense? If not, does anyone have any idea why not? I keep hoping someone else with copious free time would have tackled this by now. I have hope since other folks have managed to ta...
Since I need to do some checks depending on which control is on focus in my app, I am getting the focused control ID like this: HWND controlOnFocus = ::GetFocus(); int controlID = ::GetDlgCtrlID(controlOnFocus); I am getting consistent IDs, but I can't find them in the resource file! Can I rely on the IDs I am getting...
When you're working with Win32 API and dialog boxes, the control IDs you retrieve with `GetDlgCtrlID` are indeed associated with the controls in your dialog. However, these IDs are not automatically generated by the resources. Instead, they should be explicitly defined in the resource file (usually a `.rc` file) where ...
32,154
[ { "from": "human", "value": "Since I need to do some checks depending on which control is on focus in my app, I am getting the focused control ID like this:\nHWND controlOnFocus = ::GetFocus();\nint controlID = ::GetDlgCtrlID(controlOnFocus);\n\nI am getting consistent IDs, but I can't find them in the reso...
I want to convert for example a particular date 12-11-2008 11:33:04.510 to UTC datetime. Can anyone help me how to do this. I want to do this in c# coding.
To convert a specific date and time string to UTC in C#, you can use the `DateTime` and `DateTimeKind` enums. First, you'll need to parse the date string into a `DateTime` object, then you can convert it to UTC. Here's a simple example of how to do this: ```csharp using System; class Program { static void Main()...
33,033
[ { "from": "human", "value": "I want to convert for example a particular date 12-11-2008 11:33:04.510 to UTC datetime. Can anyone help me how to do this. I want to do this in c# coding.\n" }, { "from": "gpt", "value": "To convert a specific date and time string to UTC in C#, you can use the `Date...
I have the following xml I'd like to deserialize into a class <?xml version="1.0" encoding="utf-8" ?> <root> <element1>String1</element1> <element2>String2</element2> </root> I am trying to serialize it into the following class: [XmlRoot("root")] public class root { [XmlElement("element1")] ...
The issue you are encountering with the deserialization process is likely due to the access modifiers of the properties in your `root` class. In C#, when using the `XmlSerializer`, the properties need to be public for them to be serialized or deserialized correctly. Since you have declared the properties as `internal`,...
30,749
[ { "from": "human", "value": "I have the following xml I'd like to deserialize into a class\n<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<root>\n <element1>String1</element1>\n <element2>String2</element2>\n</root>\n\nI am trying to serialize it into the following class:\n [XmlRoot(\"root\")]\n publ...
Are there any known security issues related to running a web application via a .hta file. I am especially interested in the drag & drop issues related to .hta files and frames see: http://sqlblogcasts.com/blogs/jonsayce/archive/2008/01/10/drag-and-drop-problems-in-hta-frames.aspx
Yes, there are known security issues related to running web applications via HTML Applications (HTA) files, particularly concerning the way they handle drag and drop events and frame interactions. Here are some key points to consider: ### General Security Issues with HTA Files 1. **Execution Privileges**: HTA files a...
31,998
[ { "from": "human", "value": "Are there any known security issues related to running a web application via a .hta file. I am especially interested in the drag & drop issues related to .hta files and frames\nsee: http://sqlblogcasts.com/blogs/jonsayce/archive/2008/01/10/drag-and-drop-problems-in-hta-frames.a...
i have form with one textbox and dropdownlist <%=Html.TextBox("Name")%> <%=Html.ValidationMessage("Name", "Enter name")%> <%=Html.DropDownList("Not Selected", "DomainID", ViewData["DomainID"])%> I select value from drop downlist but dont fill name, im getting validation for textbox and then i need select value from d...
The behavior you're experiencing is due to how validation works in ASP.NET MVC. When validation fails for a required field (like your `Name` textbox), the model binding process does not proceed, which can affect the state of your dropdown list, causing it to reset. To ensure that the dropdown list retains its selected...
31,513
[ { "from": "human", "value": "i have form with one textbox and dropdownlist\n\n<%=Html.TextBox(\"Name\")%>\n<%=Html.ValidationMessage(\"Name\", \"Enter name\")%>\n<%=Html.DropDownList(\"Not Selected\", \"DomainID\", ViewData[\"DomainID\"])%>\n\nI select value from drop downlist but dont fill name, im getting...
Say you have a standard template with included (parsed) header, body, footer templates. In the body template a variable like $subject is defined and you want that also displayed in the header template. In some other template languages like HTML::Mason(perl based) you would evaluate the body template first to pick up th...
In Apache Velocity, the typical approach to handle templates and variable scope is slightly different from what you described for other templating systems like HTML::Mason. In Velocity, variables are scoped to the context in which they are defined, and you can't directly pass a variable from one part of the template to...
29,316
[ { "from": "human", "value": "Say you have a standard template with included (parsed) header, body, footer templates.\nIn the body template a variable like $subject is defined and you want that also displayed in the header template.\nIn some other template languages like HTML::Mason(perl based) you would eva...
In Reporting Services I would like to add a parameter that contains data from a custom code block. Ideally, I would be able to run the following code (this is a simple testing example): Function GetPeriods() As String() Dim values As System.Collections.ArrayList = New System.Collections.ArrayList() For i as int...
In SQL Server Reporting Services (SSRS), parameters are designed to retrieve their values directly from a dataset, and the method you're trying to use to populate a parameter using a custom code function won't work as you expect. The code you provided runs fine, but it does not provide a way to assign those values to t...
29,992
[ { "from": "human", "value": "In Reporting Services I would like to add a parameter that contains data from a custom code block. Ideally, I would be able to run the following code (this is a simple testing example):\nFunction GetPeriods() As String()\n Dim values As System.Collections.ArrayList = \n New ...
I need to compare the answer in with the aspnet_membership tables PasswordAnswer value. The text in Password answer is in the form of Hashed. What algorithm they have used how they implemented the Salt value in ASP.net Membership Provider. I have tried hashing (sh1) and compared with text what is salt value How to hash...
In ASP.NET Membership Provider, the password and password answer are typically stored as hashes using a combination of a hashing algorithm and a salt value. The default algorithm used in the older ASP.NET Membership Providers is SHA1, but it is recommended to use more secure algorithms like SHA256 or SHA512 if you're i...
28,976
[ { "from": "human", "value": "I need to compare the answer in with the aspnet_membership tables PasswordAnswer value.\nThe text in Password answer is in the form of Hashed. What algorithm they have used how they implemented the Salt value in ASP.net Membership Provider.\nI have tried hashing (sh1) and compar...
I am trying to figure out how a library works and I would like to be able to visualize which methods and lines of code are executed in response to user input (e.g. a keypress or mouse click). Is there a way to do this in .NET?
Yes, in .NET, you can visualize which methods and lines of code are executed in response to user input by utilizing a few different approaches. Here are some methods that can help you achieve this: ### 1. **Debugging Tools in Visual Studio** Visual Studio provides powerful debugging tools that allow you to step throug...
28,553
[ { "from": "human", "value": "I am trying to figure out how a library works and I would like to be able to visualize which methods and lines of code are executed in response to user input (e.g. a keypress or mouse click). Is there a way to do this in .NET?\n" }, { "from": "gpt", "value": "Yes, in...
I would like to do remote deployment from my build machine onto a server. The remoting can be done via ssh commands from a script, but I would rather use phing and a deploy.xml file that would do the automation. What alternatives do I have to do ssh (and also scp) tasks from within a phing build file?
Phing is a build system based on Apache Ant, and it allows you to automate various tasks, including SSH and SCP operations, using XML-based configuration files. While the `ssh` and `scp` tasks are not included by default in Phing, there are several options you can explore to achieve your remote deployment needs: ### 1...
22,928
[ { "from": "human", "value": "I would like to do remote deployment from my build machine onto a server. The remoting can be done via ssh commands from a script, but I would rather use phing and a deploy.xml file that would do the automation.\nWhat alternatives do I have to do ssh (and also scp) tasks from wi...
So I know it's considered somewhat good practice to always include curly braces for if, for, etc even though they're optional if there is only one following statement, for the reason that it's easier to accidentally do something like: if(something == true) DoSomething(); DoSomethingElse(); when quickly editing...
The style you described—using curly braces `{}` for single statements while still keeping the content within the braces concise and close together—does have a valid rationale behind it. It increases the likelihood of avoiding common pitfalls associated with the omission of braces and keeps related code grouped together...
32,117
[ { "from": "human", "value": "So I know it's considered somewhat good practice to always include curly braces for if, for, etc even though they're optional if there is only one following statement, for the reason that it's easier to accidentally do something like:\nif(something == true)\n DoSomething();\n...
Let's assume we're talking about the recently released Beta version. Specifically I'm interested in a step-by-step tutorial or similar, and I'd be thrilled with information addressing how to do so on CrystalTech.
Sure! Here's a step-by-step guide on how to set up and use a Beta version of a software (let's say a web application or a specific tool) on CrystalTech. Since I don't have specific details about the software in question, I will keep the instructions general. You can adapt them to your particular case. ### Step-by-Step...
26,832
[ { "from": "human", "value": "Let's assume we're talking about the recently released Beta version. Specifically I'm interested in a step-by-step tutorial or similar, and I'd be thrilled with information addressing how to do so on CrystalTech.\n" }, { "from": "gpt", "value": "Sure! Here's a step-...
Using vim 7.1, I recently heard you can debug php in VI. But how?
Debugging PHP in Vim (or Vi) can be done with the help of additional tools and plugins. Although Vim doesn't have built-in debugging capabilities for PHP, you can use external debuggers like Xdebug and integrate them with Vim. Below is a general guide on how to set this up: ### 1. Install Xdebug Xdebug is a PHP exten...
28,405
[ { "from": "human", "value": "Using vim 7.1, I recently heard you can debug php in VI.\nBut how?\n" }, { "from": "gpt", "value": "Debugging PHP in Vim (or Vi) can be done with the help of additional tools and plugins. Although Vim doesn't have built-in debugging capabilities for PHP, you can use ...
I'm trying to use xcodebuild and OCUnit with my Continuous Integration server (TeamCity). JetBrains offers test observer implementations for boost::test and CppUnit that format test output in a way that TeamCity can interpret. I need to do something similar for OCUnit if I want to use it. There appears to be a SenTe...
OCUnit is the original testing framework for Objective-C, which has since been largely succeeded by XCTest. However, if you're working with OCUnit and want to integrate it with TeamCity for better test reporting, you can definitely create a custom test observer using the `SenTestObserver` class. ### Steps to Create a ...
31,026
[ { "from": "human", "value": "I'm trying to use xcodebuild and OCUnit with my Continuous Integration server (TeamCity). \nJetBrains offers test observer implementations for boost::test and CppUnit that format test output in a way that TeamCity can interpret. I need to do something similar for OCUnit if I w...
I'm having trouble getting pictures supported with PIL - it throws me this: IOError: decoder jpeg not available I installed PIL from binary, not realizing I needed libjpeg. I installed libjpeg and freetype2 through fink. I tried to reinstall PIL using instructions from http://timhatch.com/ (bottom of the page) Downl...
It sounds like you're having trouble getting the Python Imaging Library (PIL) to work properly with JPEG support on macOS Leopard (PPC). The `IOError: decoder jpeg not available` error typically indicates that the necessary JPEG libraries weren't detected or properly linked during the installation of PIL. Here’s a ste...
28,970
[ { "from": "human", "value": "I'm having trouble getting pictures supported with PIL - it throws me this:\nIOError: decoder jpeg not available\n\nI installed PIL from binary, not realizing I needed libjpeg.\nI installed libjpeg and freetype2 through fink. \nI tried to reinstall PIL using instructions from ht...
I must be overlooking something simple. I'm setting a variable from a query result in a MySQL stored procedure like this: SELECT @myName := username FROM User WHERE ID=1; So, @myName is storing the username of userid 1, which is 'Paul'. Great. But later in the stored procedure I run an update on this record: UPDATE Us...
The behavior you're encountering is actually due to how MySQL processes variable assignments. When you use the assignment operator (`:=`) in your SELECT statement, it does indeed set the variable `@myName` to the value returned by the query. However, what you're observing with the `@myName` variable changing after the ...
31,919
[ { "from": "human", "value": "I must be overlooking something simple. I'm setting a variable from a query result in a MySQL stored procedure like this:\nSELECT @myName := username FROM User WHERE ID=1;\n\nSo, @myName is storing the username of userid 1, which is 'Paul'. Great.\nBut later in the stored proced...
What do I have to consider in database design for a new application which should be able to support the most common relational database systems (SQL Server, MySQL, Oracle, PostgreSQL ...)? Is it even worth the effort? What are the pitfalls?
Designing a database that is intended to support multiple relational database systems like SQL Server, MySQL, Oracle, and PostgreSQL can be a challenging but rewarding endeavor. Here are some considerations, benefits, and potential pitfalls you should keep in mind. ### Considerations: 1. **SQL Dialects**: - Be awa...
29,034
[ { "from": "human", "value": "What do I have to consider in database design for a new application which should be able to support the most common relational database systems (SQL Server, MySQL, Oracle, PostgreSQL ...)?\nIs it even worth the effort? What are the pitfalls?\n" }, { "from": "gpt", "v...
Here is the scenario. There is content loaded in iframe from other site. I click to some link inside the iframe. Is it possible to catch somehow outside the iframe what is that link? UPDATE Since I recieved question if my intentions are pure, I would explain more on the use case. May be I started in wrong direction fo...
It's important to note that iframes can create challenges due to the same-origin policy, which restricts how documents or scripts from one origin can interact with resources from another origin. If the content loaded in the iframe comes from a different domain, you won't be able to directly access its contents or captu...
31,441
[ { "from": "human", "value": "Here is the scenario. There is content loaded in iframe from other site. I click to some link inside the iframe.\nIs it possible to catch somehow outside the iframe what is that link? \nUPDATE\nSince I recieved question if my intentions are pure, I would explain more on the use ...
Our application is written in C++ and used on Windows XP. On some client machines with only a C: drive, an error pop ups when the application starts: There is no disk in the drive. Please insert a disk into drive "D" If they hit "Continue" or insert a CD (even an empty one!) and press "Try Again", everything works fi...
Yes, the issue you're encountering is commonly associated with the way Windows handles removable drives and drive letters. Here are some possible reasons and solutions for the error "There is no disk in the drive. Please insert a disk into drive 'D'" when launching your application: ### Possible Causes: 1. **Reference...
28,040
[ { "from": "human", "value": "Our application is written in C++ and used on Windows XP. On some client machines with only a C: drive, an error pop ups when the application starts: \nThere is no disk in the drive. Please insert a disk into drive \"D\" \nIf they hit \"Continue\" or insert a CD (even an empty o...
So we are building an application with a UI Layer (web, mobile, Ajax client, etc) Service/API Layer Business Logic Layer Data Access Layer Our goal is to have an Entity Framework dependency from the Service Layer on down to the DAL. That means the Sevice layer will only accept and return POCOs (plain old CLR object...
It sounds like you're dealing with a common challenge when separating concerns in a layered architecture while using Entity Framework (EF). Manually coding a mapping layer between your Service Layer and Business Logic Layer can indeed be tedious. Here are several approaches you might consider to simplify and improve th...
28,346
[ { "from": "human", "value": "So we are building an application with a\n\nUI Layer (web, mobile, Ajax client, etc)\nService/API Layer\nBusiness Logic Layer \nData Access Layer\n\nOur goal is to have an Entity Framework dependency from the Service Layer on down to the DAL. That means the Sevice layer will on...
I'm writing some mail-processing software in Python that is encountering strange bytes in header fields. I suspect this is just malformed mail; the message itself claims to be us-ascii, so I don't think there is a true encoding, but I'd like to get out a unicode string approximating the original one without throwing a...
In Python, particularly with Python 3, handling bytes and strings (specifically Unicode) can indeed be tricky, especially when dealing with potentially malformed data in email headers. While there isn't a built-in function that "guesses" the right way to decode a byte string into Unicode, you can implement a function t...
28,743
[ { "from": "human", "value": "I'm writing some mail-processing software in Python that is encountering strange bytes in header fields. I suspect this is just malformed mail; the message itself claims to be us-ascii, so I don't think there is a true encoding, but I'd like to get out a unicode string approxim...
The exception mentions FILE* __cdecl _getstream I'm calling fopen and it keeps crashing. AfxMessageBox("getting here 1"); FILE* filePtr = fopen(fileName, "rb"); AfxMessageBox("getting here 2"); For some reason, I never get to the second message box. Interestingly, when I'm in debug mode, the app works perfectly. Why...
When you're encountering a crash during a call to `fopen` in release mode but not in debug mode, this discrepancy can be caused by a few different factors. Here are some potential issues and steps you might take to diagnose and resolve the problem: 1. **Invalid File Name**: The most common reason for `fopen` to fail i...
30,408
[ { "from": "human", "value": "The exception mentions\nFILE* __cdecl _getstream\n\nI'm calling fopen and it keeps crashing. \nAfxMessageBox(\"getting here 1\");\nFILE* filePtr = fopen(fileName, \"rb\");\nAfxMessageBox(\"getting here 2\");\n\nFor some reason, I never get to the second message box. Interestingl...
What is the difference between having <%# Eval("State") %> in your aspx page, versus having <%# DataBinder.Eval(Container.DataItem, "State") %> in your aspx page?
In ASP.NET Web Forms, both `<%# Eval("State") %>` and `<%# DataBinder.Eval(Container.DataItem, "State") %>` are used for data binding within data-bound controls like GridView, ListView, or Repeater. However, they differ in terms of how they retrieve the data based on the context in which they are used. Here’s a breakdo...
29,675
[ { "from": "human", "value": "What is the difference between having\n<%# Eval(\"State\") %>\n\nin your aspx page, versus having\n<%# DataBinder.Eval(Container.DataItem, \"State\") %>\n\nin your aspx page?\n" }, { "from": "gpt", "value": "In ASP.NET Web Forms, both `<%# Eval(\"State\") %>` and `<%...
The application I'm writing calls a web service that sends an email to the user. After the call to the web service is complete, I would like to bring up the Mail application so the user can read the email. I know I can use mailto:, but then a new email is created for the user to compose. Is there a way to invoke the Ma...
To open the Mail application directly to the Mailboxes view, you generally have to use platform-specific URL schemes or APIs, depending on the environment your application is running on. Here's how you can achieve this on a couple of popular platforms: ### For macOS: On macOS, you can use the `open` command in Termin...
32,376
[ { "from": "human", "value": "The application I'm writing calls a web service that sends an email to the user. After the call to the web service is complete, I would like to bring up the Mail application so the user can read the email. I know I can use mailto:, but then a new email is created for the user to...
Does anyone have any data on how to interface with a Compris POS? I have a Compris POS, and I need to grab data from the database. I can't get information from NCR regarding the underlying data format, and I was wondering if anyone had reverse engineered the device, or had any documentation on the device.
Interfacing with a Compris POS can be challenging, especially if official documentation or support from the manufacturer (NCR) is limited. Here are some general approaches you can take to extract data from your Compris POS system: 1. **Check the Manual**: If you have access to the user manual or technical documentatio...
28,665
[ { "from": "human", "value": "Does anyone have any data on how to interface with a Compris POS? I have a Compris POS, and I need to grab data from the database. I can't get information from NCR regarding the underlying data format, and I was wondering if anyone had reverse engineered the device, or had any d...
How can I check if cookies are being blocked using JavaScript?
You can check if cookies are being blocked in the user's browser using JavaScript by attempting to set a cookie and then reading it back. Here’s a simple way to perform this check: ```javascript function checkCookiesEnabled() { // Try to set a test cookie document.cookie = "testcookie=1; SameSite=Strict"; ...
33,095
[ { "from": "human", "value": "How can I check if cookies are being blocked using JavaScript?\n" }, { "from": "gpt", "value": "You can check if cookies are being blocked in the user's browser using JavaScript by attempting to set a cookie and then reading it back. Here’s a simple way to perform th...
I am working with a huge list of URL's. Just a quick question I have trying to slice a part of the URL out, see below: http://www.domainname.com/page?CONTENT_ITEM_ID=1234&param2&param3 How could I slice out: http://www.domainname.com/page?CONTENT_ITEM_ID=1234 Sometimes there is more than two parameters after the CONT...
You can achieve this by finding the first occurrence of the `&` character in the URL and then slicing the string up to that point. In Python, you can use the `find()` method to locate the position of the first `&`, and then slice the string accordingly. Here’s a simple example: ```python url = "http://www.domainname....
33,641
[ { "from": "human", "value": "I am working with a huge list of URL's. Just a quick question I have trying to slice a part of the URL out, see below:\nhttp://www.domainname.com/page?CONTENT_ITEM_ID=1234&param2&param3\n\nHow could I slice out:\nhttp://www.domainname.com/page?CONTENT_ITEM_ID=1234\n\nSometimes t...
The Zend Framework coding standard mentions the following: For files that contain only PHP code, the closing tag ("?>") is never permitted. It is not required by PHP, and omitting it prevents the accidental injection of trailing whitespace into the response. Zend Framework coding standard: file formatting However I...
The Zend Framework coding standard's stance on omitting the closing PHP tag (`?>`) in files that contain only PHP code is well-grounded, and it aligns with best practices in PHP development. Here are some reasons why you would typically avoid using closing tags in such files: 1. **Prevention of Accidental Whitespace**...
30,263
[ { "from": "human", "value": "The Zend Framework coding standard mentions the following:\n\nFor files that contain only PHP code, the closing tag (\"?>\") is never permitted. It is not required by PHP, and omitting it prevents the accidental injection of trailing whitespace into the response.\n\n\nZend Frame...
In C#, what is the best way to access a property of the derived class when the generic list contains just the base class. public class ClassA : BaseClass { public object PropertyA { get; set; } } public class ClassB: BaseClass { public object PropertyB { get; set; } } public class BaseClass { } public void Ma...
To access properties of derived classes when you have a list of the base class type, you can use type checking and casting. Specifically, you can use the `is` operator to check the type of each item in the list, and then cast it to the appropriate derived type to access its specific properties. Here’s how you can do t...
23,040
[ { "from": "human", "value": "In C#, what is the best way to access a property of the derived class when the generic list contains just the base class.\npublic class ClassA : BaseClass\n{\n public object PropertyA { get; set; }\n}\n\npublic class ClassB: BaseClass\n{\n public object PropertyB { get; set...
I'm kinda stuck with this one so I hoped someone could help me. I am doing a Winforms application and I need to show a Modal Dialog (form.ShowDialog) that returns a value (prompts the User some values and wraps them in a Object). I just can't see how to do this rather than give a reference into the object or depending...
In WinForms, the standard approach for returning values from a modal dialog is indeed to use properties or methods, as you mentioned. While it's true that `ShowDialog()` does not return a value, there are ways to achieve what you want in an elegant manner. Here’s a typical pattern for doing this: 1. **Create a Modal ...
26,143
[ { "from": "human", "value": "I'm kinda stuck with this one so I hoped someone could help me.\nI am doing a Winforms application and I need to show a Modal Dialog (form.ShowDialog) that returns a value (prompts the User some values and wraps them in a Object). \nI just can't see how to do this rather than gi...
I've seen some examples of C++ using template template parameters (that is templates which take templates as parameters) to do policy-based class design. What other uses does this technique have?
Template template parameters in C++ can be quite powerful and versatile. They allow you to write generic code that is highly flexible and reusable. Here are some common use cases and benefits beyond policy-based class design: 1. **Generic Container Adapters**: You can create container adapters that work with various c...
26,809
[ { "from": "human", "value": "I've seen some examples of C++ using template template parameters (that is templates which take templates as parameters) to do policy-based class design. What other uses does this technique have?\n" }, { "from": "gpt", "value": "Template template parameters in C++ ca...
Thinking about my other problem, i decided I can't even create a regular expression that will match roman numerals (let alone a context-free grammar that will generate them) The problem is matching only valid roman numerals. Eg, 990 is NOT "XM", it's "CMXC" My problem in making the regex for this is that in order to a...
Matching valid Roman numerals with a regular expression can be quite challenging because Roman numeral rules require you to consider the context of the characters being used. As you pointed out, specific characters cannot appear in specific contexts, which makes it difficult to express in a regular expression since reg...
30,228
[ { "from": "human", "value": "Thinking about my other problem, i decided I can't even create a regular expression that will match roman numerals (let alone a context-free grammar that will generate them)\nThe problem is matching only valid roman numerals. \nEg, 990 is NOT \"XM\", it's \"CMXC\"\nMy problem in...
I need to perform a SNMP Set operation in a printer in the network which as an Access Control List configured (ACL) and my host's IP Address is not in the ACL table. I'm getting a strange behavior: When I have a SNMPv1 Set community name configured, I am ONLY able to perform a SNMP Set if my host ip is in the ACL table...
Yes, your observations regarding the behavior of SNMP Set operations in relation to the Access Control List (ACL) are quite logical and make sense within the context of how SNMP and ACLs typically operate. ### SNMP and ACLs: 1. **ACL Configuration**: Access Control Lists are used to define which IP addresses are perm...
21,680
[ { "from": "human", "value": "I need to perform a SNMP Set operation in a printer in the network which as an Access Control List configured (ACL) and my host's IP Address is not in the ACL table.\nI'm getting a strange behavior: When I have a SNMPv1 Set community name configured, I am ONLY able to perform a ...
Currently I have an activex control and I registered it to my computer with regsvr32 foo.dll. (NOTE: This is a third party activex control so I do not actually have the source code for it, just a dll) When I pull up regedit under the classes I see my dll registered, however it has multiple classes. Foo.class1, Foo.cl...
To embed a third-party ActiveX control that consists of multiple classes into an HTML page, you can indeed create a wrapper ActiveX control that encapsulates the functionality of the existing ActiveX control. This wrapper will act as a bridge between your HTML page and the original control. Below is a basic guide on ho...
27,673
[ { "from": "human", "value": "Currently I have an activex control and I registered it to my computer with regsvr32 foo.dll. \n(NOTE: This is a third party activex control so I do not actually have the source code for it, just a dll)\nWhen I pull up regedit under the classes I see my dll registered, however i...
I do TDD, and I've been fairly loose in organizing my unit tests. I tend to start with a file representing the next story or chunk of functionality and write all the unit-tests to make that work. Of course, if I'm introducing a new class, I usually make a separate unit-test module or file for that class, but I don't o...
Organizing unit tests is an important aspect of maintaining a codebase, especially as it grows. While it’s great that you are using TDD (Test-Driven Development) to write tests alongside your code, having a messy or disorganized structure for your tests can lead to several issues down the line: 1. **Maintenance Diffic...
27,345
[ { "from": "human", "value": "I do TDD, and I've been fairly loose in organizing my unit tests. I tend to start with a file representing the next story or chunk of functionality and write all the unit-tests to make that work. \nOf course, if I'm introducing a new class, I usually make a separate unit-test mo...
We are using standard asp.net forms authentication. Certain pages require a user to be logged in; and least some of these pages are delivered by https. There is a search control at the top of each page. When this is used, we don't care whether the user's session has expired, even if the current page requires a log i...
To handle the requirement of bypassing the Forms Authentication check when performing a search without prompting the user to log in, you have several options. Below are some recommended approaches: ### 1. Use a Separate Search Handler Instead of posting to a page that requires authentication, you could create a separ...
28,275
[ { "from": "human", "value": "We are using standard asp.net forms authentication. Certain pages require a user to be logged in; and least some of these pages are delivered by https. There is a search control at the top of each page. When this is used, we don't care whether the user's session has expired, ...
We have a database that many persons have to have access to. I am looking for a way that will allow us to get notification whenever "alter" occurs on this database, so other parties can be aware of it. Please advise.
To get notifications when any changes (e.g., ALTER commands) occur in your database, you can implement several strategies depending on your database management system (DBMS). Here are some approaches you can consider: ### 1. **Database Triggers** Many DBMSs support triggers, which are procedures that are automatically...
27,933
[ { "from": "human", "value": "We have a database that many persons have to have access to. I am looking for a way that will allow us to get notification whenever \"alter\" occurs on this database, so other parties can be aware of it. Please advise.\n" }, { "from": "gpt", "value": "To get notifica...
I was getting bad data from an application I was writting using C++ in Visual Studio 2k3 so I decided to debug it. Then I found it was throwing an exception but one I can't track down. Then I placed some try/catch blocks and low and behold, when I don't debug there is no exception. That is, I have code that looks like ...
This behavior is often associated with "undefined behavior" in C++. In your situation, it looks like there might be an issue with the way you're accessing the elements of the vector, or with the state of the vector itself. Let's go through some possible reasons for the behavior you're experiencing: 1. **Out-of-Bounds ...
29,498
[ { "from": "human", "value": "I was getting bad data from an application I was writting using C++ in Visual Studio 2k3 so I decided to debug it. Then I found it was throwing an exception but one I can't track down.\nThen I placed some try/catch blocks and low and behold, when I don't debug there is no except...
I was wondering if the C# project setting "Allow unsafe code" applies only to unsafe C# code in the project itself, or is it necessary to set this option when linking in a native C++ DLL? What about linking in a managed DLL that itself links to a native DLL? What does this option really do, under the hood?
The "Allow unsafe code" setting in a C# project enables the use of unsafe constructs in C# code, such as pointer operations and direct memory manipulation. Here’s how it affects different scenarios: ### Unsafe Code in C# Projects 1. **Direct Usage**: If your C# project contains unsafe code (i.e., code that uses pointe...
32,234
[ { "from": "human", "value": "I was wondering if the C# project setting \"Allow unsafe code\" applies only to unsafe C# code in the project itself, or is it necessary to set this option when linking in a native C++ DLL? What about linking in a managed DLL that itself links to a native DLL? What does this op...
When designing a collection class, is there any reason not to implement locking privately to make it thread safe? Or should I leave that responsibility up to the consumer of the collection?
When designing a collection class, deciding whether to implement locking for thread safety is an important consideration, and there are several factors to weigh in making that decision: ### Reasons to Implement Locking Privately: 1. **Ease of Use**: By handling thread safety internally, you make the class easier to u...
27,751
[ { "from": "human", "value": "When designing a collection class, is there any reason not to implement locking privately to make it thread safe? Or should I leave that responsibility up to the consumer of the collection?\n" }, { "from": "gpt", "value": "When designing a collection class, deciding ...
I have a simple class that essentially just holds some values. I have overridden the ToString() method to return a nice string representation. Now, I want to create a ToXml() method, that will return something like this: <Song> <Artist>Bla</Artist> <Title>Foo</Title> </Song> Of course, I could just use a Strin...
To create an XML representation of your class in the form of an `XmlElement`, you indeed need to use an `XmlDocument` to facilitate the creation of XML nodes. There's no built-in way to create an `XmlElement` without first having an `XmlDocument` to work with, as `XmlElement` instances are created as part of the docume...
30,691
[ { "from": "human", "value": "I have a simple class that essentially just holds some values. I have overridden the ToString() method to return a nice string representation.\nNow, I want to create a ToXml() method, that will return something like this:\n<Song>\n <Artist>Bla</Artist>\n <Title>Foo</Title>...
In .NET should you place unit test projects in with the rest of the solution? Or should there be a test solution that houses all the test projects? We have all the test projects in with our code base solution...it seems a bit cumbersome. What do you usually do?
The organization of unit test projects in .NET solutions can vary based on team preferences, project size, and other factors. Here are the two common approaches, along with their pros and cons: ### 1. **Test Projects in the Same Solution** #### Pros: - **Convenience**: Having the test projects in the same solution as...
29,411
[ { "from": "human", "value": "In .NET should you place unit test projects in with the rest of the solution? Or should there be a test solution that houses all the test projects?\nWe have all the test projects in with our code base solution...it seems a bit cumbersome. \nWhat do you usually do?\n" }, { ...
I use LINQ to Objects instructions on an ordered array. Which operations shouldn't I do to be sure the order of the array is not changed?
When using LINQ to Objects on an ordered array, certain operations can change the order of the elements. To ensure that the order of the array remains unchanged, you should be cautious with the following LINQ operations: 1. **`OrderBy` and `OrderByDescending`**: These operations will reorder the elements based on the ...
32,171
[ { "from": "human", "value": "I use LINQ to Objects instructions on an ordered array. \nWhich operations shouldn't I do to be sure the order of the array is not changed?\n" }, { "from": "gpt", "value": "When using LINQ to Objects on an ordered array, certain operations can change the order of the...
I would like create my own collection that has all the attributes of python list and also knows how to save/load itself into/from a database. Also I want to make the load implicit and lazy, as in it doesn't happen at the point of creation of the list, but waits until its first used. Is there a single__xxx__method I ca...
In Python, to implement a custom collection that behaves like a list and incorporates lazy loading from a database, you can use the `__getitem__`, `__len__`, and `__iter__` methods. However, if you want to avoid explicitly overriding each method to implement the lazy loading, you can use `__getattr__` to catch attribut...
27,504
[ { "from": "human", "value": "I would like create my own collection that has all the attributes of python list and also knows how to save/load itself into/from a database. Also I want to make the load implicit and lazy, as in it doesn't happen at the point of creation of the list, but waits until its first ...
I'm currently writing a C# application that does a lot of digital signal processing, which involves a lot of small fine-tuned memory xfer operations. I wrote these routines using unsafe pointers and they seem to perform much better than I first thought. However, I want the app to be as fast as possible. Would I get any...
When considering whether to stick with C# using unsafe pointers or to port your digital signal processing (DSP) routines to C or C++, there are several factors to consider regarding performance: ### 1. **Performance of Unsafe Code in C#** - **Unsafe Code**: Using `unsafe` pointers in C# allows you to manipulate memory...
27,414
[ { "from": "human", "value": "I'm currently writing a C# application that does a lot of digital signal processing, which involves a lot of small fine-tuned memory xfer operations. I wrote these routines using unsafe pointers and they seem to perform much better than I first thought. However, I want the app t...
We have sales reps who access our 'system' via terminal services. In our system we would like to enable clicking the number of a client and launching skype on their local machine not in the terminal services session. We see two potential ways of this working... Clicking on a URL ( eg skype:01234569?call ) and it work...
To enable clicking a client number in a terminal services (TS) session to launch Skype on the local machine (rather than within the terminal session), you can follow one of the approaches outlined below: ### Method 1: Using URL Protocol Handler with Redirection You can set up a custom URL protocol handler that can pa...
27,477
[ { "from": "human", "value": "We have sales reps who access our 'system' via terminal services. In our system we would like to enable clicking the number of a client and launching skype on their local machine not in the terminal services session.\nWe see two potential ways of this working...\n\nClicking on ...
I get the following error when trying to load an RSS feed: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. My code works fine from my local host, error only occurs when i upload it to my dedicated server! Here is the code: Protected Sub Page_Load(ByVal sender As ...
The error message "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." suggests that there might be a deeper issue, likely related to your server configuration or the way it is handling the request, rather than a specific error in your code. Here are some steps you c...
26,915
[ { "from": "human", "value": "I get the following error when trying to load an RSS feed:\n\nAttempted to read or write protected memory. This is often an indication that other memory is corrupt.\n\nMy code works fine from my local host, error only occurs when i upload it to my dedicated server!\nHere is the ...
I have one website on my server, and my IIS Worker Process is using 4GB RAM consistently. What should I be checking? c:\windows\system32\inetsrv\w3wp.exe
When you're noticing that the IIS Worker Process (`w3wp.exe`) is using a consistent 4GB of RAM on your server, it's important to investigate the root causes, as high memory usage can lead to performance degradation. Here are some steps you can take to diagnose and address the issue: ### 1. **Check Application Code** ...
27,604
[ { "from": "human", "value": "I have one website on my server, and my IIS Worker Process is using 4GB RAM consistently. What should I be checking?\nc:\\windows\\system32\\inetsrv\\w3wp.exe\n\n" }, { "from": "gpt", "value": "When you're noticing that the IIS Worker Process (`w3wp.exe`) is using a ...
For some reason, my visual studio 2008 installation doesn't have the "Create Test Project" template installed. I'm assuming I should be able to download it from somewhere on MSDN, but I cannot find it anywhere (Guess my Google-Fu is weak) Does anyone know where I can get the template to install it? Thanks EDIT: I've ma...
If you're trying to install the "Create Test Project" template in Visual Studio 2008 and have the project templates from another machine, but are having trouble installing them using `devenv /installvstemplates`, here are some steps you can follow: 1. **Ensure Correct Folder Structure**: Make sure that the project tem...
31,884
[ { "from": "human", "value": "For some reason, my visual studio 2008 installation doesn't have the \"Create Test Project\" template installed. I'm assuming I should be able to download it from somewhere on MSDN, but I cannot find it anywhere (Guess my Google-Fu is weak)\nDoes anyone know where I can get the ...
Is it possible to do something like (?'A-B'\s*) ?
In regular expressions, the construct `(?'A-B'\s*)` does not conform to standard syntax. Let's break down what you're trying to achieve and what the components mean: 1. **Named Groups**: In regex, you can create named groups using the syntax `(?<name>...)` or `(?P<name>...)`, where `name` is the identifier for the gro...
31,946
[ { "from": "human", "value": "Is it possible to do something like (?'A-B'\\s*) ?\n" }, { "from": "gpt", "value": "In regular expressions, the construct `(?'A-B'\\s*)` does not conform to standard syntax. Let's break down what you're trying to achieve and what the components mean:\n\n1. **Named Gr...
I need to replace some 2- and 3-digit numbers with the same number plus 10000. So Photo.123.aspx needs to become Photo.10123.aspx and also Photo.12.aspx needs to become Photo.10012.aspx I know that in .NET I can delegate the replacement to a function and just add 10000 to the number, but I'd rather stick to garden-...
You can accomplish this using a regular expression with a substitution pattern in most programming languages that support regular expressions. However, pure regex alone cannot perform arithmetic calculations like adding 10000 to a number. Instead, you can use a regex to match the numbers and then use a callback functio...
32,506
[ { "from": "human", "value": "I need to replace some 2- and 3-digit numbers with the same number plus 10000. So\nPhoto.123.aspx\n\nneeds to become\nPhoto.10123.aspx\n\nand also\nPhoto.12.aspx\n\nneeds to become\nPhoto.10012.aspx\n\nI know that in .NET I can delegate the replacement to a function and just add...
I'm trying to read the contents of the clipboard using JavaScript. With Internet Explorer it's possible using the function window.clipboardData.getData("Text") Is there a similar way of reading the clipboard in Firefox, Safari and Chrome?
Yes, modern browsers, including Firefox, Safari, and Chrome, support clipboard access through the Clipboard API. This API allows you to read from and write to the clipboard in a more standardized way compared to the old Internet Explorer method. However, clipboard access generally requires the context of a user gesture...
32,103
[ { "from": "human", "value": "I'm trying to read the contents of the clipboard using JavaScript. With Internet Explorer it's possible using the function\nwindow.clipboardData.getData(\"Text\")\n\nIs there a similar way of reading the clipboard in Firefox, Safari and Chrome?\n" }, { "from": "gpt", ...
I wrote a C++ project in VS2005, and used lots of STL container with its plus-in STL. However, I found STL in VS2005 does not have a hash_map in it, I want to use SGI hash_map. How can I change my project to use SGI STL? Thanks for Brian's method, it works! And it's simple.
To use the SGI STL in your Visual Studio 2005 project, you will need to follow a few steps to set up the SGI implementation and ensure your project can find and utilize it properly. Here’s a general guide on how to do this: ### Step 1: Download SGI STL 1. **Get the SGI STL Source**: - You can download the SGI STL...
28,916
[ { "from": "human", "value": "I wrote a C++ project in VS2005, and used lots of STL container with its plus-in STL. However, I found STL in VS2005 does not have a hash_map in it, I want to use SGI hash_map. How can I change my project to use SGI STL?\nThanks for Brian's method, it works! And it's simple.\n" ...
Does anyone know if the problems that have been affecting Stack Overflow with regards to SQL Server 2008 Full Text Search performance have implications for the search in SharePoint? As far as I understand it SharePoint search uses SQL Server full text search.
Yes, the issues affecting SQL Server 2008 Full Text Search performance can also have implications for SharePoint search, as SharePoint relies on SQL Server's full-text search capabilities for its search functionality. When you encounter performance problems with SQL Server 2008's full-text search, it can lead to slow...
34,273
[ { "from": "human", "value": "Does anyone know if the problems that have been affecting Stack Overflow with regards to SQL Server 2008 Full Text Search performance have implications for the search in SharePoint? As far as I understand it SharePoint search uses SQL Server full text search.\n" }, { "fr...
I have a coworker who is looking to switch from InteilliJ Idea to Eclipse, and is concerned about not knowing the Eclipse set of commands. I was wondering - would anyone have a link to keyboard mappings that can set Eclipse commands to at least sort of match Idea? Have you made this switch? Any "gotchas", tips, or in...
Switching from IntelliJ IDEA to Eclipse can be a significant transition, given the differences in their interfaces and keyboard shortcuts. Fortunately, Eclipse allows you to customize keyboard bindings, and there are some mappings available to help ease this transition. ### Keyboard Mappings: 1. **Eclipse Key Bindings...
28,310
[ { "from": "human", "value": "I have a coworker who is looking to switch from InteilliJ Idea to Eclipse, and is concerned about not knowing the Eclipse set of commands. \nI was wondering - would anyone have a link to keyboard mappings that can set Eclipse commands to at least sort of match Idea? \nHave you m...
I have an object, that is facing a particular direction with (for instance) a 45 degree field of view, and a limit view range. I have done all the initial checks (Quadtree node, and distance), but now I need to check if a particular object is within that view cone, (In this case to decide only to follow that object if ...
To check if a particular object is within a specific field of view (FOV) and distance without casting a ray for each degree, you can utilize geometric concepts and vector mathematics. Here's a more efficient way to determine if an object is within the view cone: 1. **Define the View Cone**: The view cone can be define...
26,888
[ { "from": "human", "value": "I have an object, that is facing a particular direction with (for instance) a 45 degree field of view, and a limit view range. I have done all the initial checks (Quadtree node, and distance), but now I need to check if a particular object is within that view cone, (In this case...
I would like to have a Java component which has a resize icon on the bottom right of the component so that when I drag that icon, the component will automatically resize with it. By resize icon, I mean the following: The above image contains the resize icon in the Google Talk messenger's main window. Is there any Java...
You can create a custom Java Swing component with a resize icon in the bottom-right corner by extending a JPanel and adding mouse listeners to handle resizing. Below is a simple example that demonstrates how to implement a resizable component with a resize icon. ### Example Code ```java import javax.swing.*; import j...
27,934
[ { "from": "human", "value": "I would like to have a Java component which has a resize icon on the bottom right of the component so that when I drag that icon, the component will automatically resize with it.\nBy resize icon, I mean the following:\n\nThe above image contains the resize icon in the Google Tal...
Our system (exotic commodity derivative trade capture and risk management) is being redeveloped shortly. One proposal that I have heard is that a rule engine will be incorporated to make it easier for the end-users (commodities traders, so fairly sophisticated) to make certain changes to the business logic. I am a litt...
Your skepticism about rule engines is understandable, particularly in a complex environment like commodities trading. However, there are scenarios where rule engines have proven to be beneficial, especially when the need for flexibility and quick adjustments to business logic is paramount. ### Situations Where Rule En...
30,353
[ { "from": "human", "value": "Our system (exotic commodity derivative trade capture and risk management) is being redeveloped shortly. One proposal that I have heard is that a rule engine will be incorporated to make it easier for the end-users (commodities traders, so fairly sophisticated) to make certain c...
I'm trying to make a combo box that behaves somewhat like the Firefox 3 Awesomebar, with the following behavior: Type in text Asynchronously bring back results Up and down selects results in the list, BUT leaves the text that was typed in the entry box so the user can continue editing to limit the resultset differentl...
To create a custom control that mimics the behavior of the Firefox Awesomebar, you can create a combination of a TextBox and a ListBox, where the ListBox acts as a dropdown that is displayed below the TextBox, and it will allow you to navigate the results with the arrow keys without modifying the text in the TextBox. ...
23,293
[ { "from": "human", "value": "I'm trying to make a combo box that behaves somewhat like the Firefox 3 Awesomebar, with the following behavior:\n\nType in text\nAsynchronously bring back results\nUp and down selects results in the list, BUT leaves the text that was typed in the entry box so the user can conti...
I have a shell script which copies a few files to the current directory, compresses them, and streams the compressed file to stdout. On the client side I use plink to execute the script and stream stdin to a file. This almost works. It seems that the cp command outputs the file name being copied when its executed from ...
The behavior you're observing is because the `cp` command outputs the names of files being copied when it is run in a script in a certain context. This is often due to the `cp` command's default verbosity level or because it is influenced by the shell's settings. To suppress this output in your script, you can do the ...
31,376
[ { "from": "human", "value": "I have a shell script which copies a few files to the current directory, compresses them, and streams the compressed file to stdout.\nOn the client side I use plink to execute the script and stream stdin to a file.\nThis almost works.\nIt seems that the cp command outputs the fi...
How do I create a grails war file so that it doesn't have the version number (e.g. foo-0.1.war) attached to the end when I execute the 'grails war' command?
To create a WAR file in a Grails application without the version number included in the filename, you can customize the build process. By default, Grails appends the version number to the WAR file name when you run the `grails war` command. Here’s how you can remove the version number from the WAR file name: 1. **Ope...
31,209
[ { "from": "human", "value": "How do I create a grails war file so that it doesn't have the version number\n(e.g. foo-0.1.war) \nattached to the end when I execute the 'grails war' command?\n" }, { "from": "gpt", "value": "To create a WAR file in a Grails application without the version number in...
How can I compare the content of two (or more) large .resx files? With hundreds of Name/Value pairs in each file, it'd be very helpful to view a combined version. I'm especially interested in Name/Value pairs which are present in the neutral culture but are not also specified in a culture-specific version.
Comparing large `.resx` files (which are XML-based resource files used in .NET applications) can be done using various approaches, from simple text comparison tools to more advanced scripting. Here's a structured way to achieve your goal, focusing on both manual and automated methods. ### Method 1: Using XML Compariso...
16,648
[ { "from": "human", "value": "How can I compare the content of two (or more) large .resx files? With hundreds of Name/Value pairs in each file, it'd be very helpful to view a combined version. I'm especially interested in Name/Value pairs which are present in the neutral culture but are not also specified in...
I'm trying to create a WSTransfer implementation (I realise Roman Kiss has written one already for WCF - but it doesn't actually meet the specifications) I've ended up abandoning data contracts on the service contacts because WSTransfer is loosely coupled; so each the create message looks like Message Create(Message re...
When working with WCF and dealing with responses that need to have multiple XML namespaces in their output, particularly in a scenario like your WSTransfer implementation, it indeed presents challenges with the default behavior of WCF data contracts. By default, WCF will serialize all members of a data contract into th...
28,814
[ { "from": "human", "value": "I'm trying to create a WSTransfer implementation (I realise Roman Kiss has written one already for WCF - but it doesn't actually meet the specifications)\nI've ended up abandoning data contracts on the service contacts because WSTransfer is loosely coupled; so each the create me...
I have a text file of URLs, about 14000. Below is a couple of examples: http://www.domainname.com/pagename?CONTENT_ITEM_ID=100&param2=123 http://www.domainname.com/images?IMAGE_ID=10 http://www.domainname.com/pagename?CONTENT_ITEM_ID=101&param2=123 http://www.domainname.com/images?IMAGE_ID=11 http://www.domainname.com...
You can achieve this by iterating over the list of URLs, checking if each URL contains the substring `CONTENT_ITEM_ID`, and then extracting those URLs into a separate list. Here’s an example of how to do this in Python: ```python # Assuming you have loaded your URLs into a list called 'url_list' url_list = [ "http...
31,925
[ { "from": "human", "value": "I have a text file of URLs, about 14000. Below is a couple of examples:\nhttp://www.domainname.com/pagename?CONTENT_ITEM_ID=100&param2=123\nhttp://www.domainname.com/images?IMAGE_ID=10\nhttp://www.domainname.com/pagename?CONTENT_ITEM_ID=101&param2=123\nhttp://www.domainname.com...
How do you get the current directory where your app is running?
In Python, you can use the `os` module to get the current directory where your application is running. Specifically, you can use `os.getcwd()`. Here's how you can do it: ```python import os current_directory = os.getcwd() print("Current Directory:", current_directory) ``` This will output the absolute path of the di...
35,177
[ { "from": "human", "value": "How do you get the current directory where your app is running? \n" }, { "from": "gpt", "value": "In Python, you can use the `os` module to get the current directory where your application is running. Specifically, you can use `os.getcwd()`. Here's how you can do it...
How can I comment a JSP expression like: <%= map.size() %> Is there something like <%= // map.size() %>?
In JSP (JavaServer Pages), you cannot directly comment out an expression within the `<%= %>` tags using the same syntax that you might use for Java comments. This is because JSP expressions are evaluated, and anything inside `<%= %>` is treated as code to be executed. However, if you want to comment out the expression...
34,032
[ { "from": "human", "value": "How can I comment a JSP expression like: <%= map.size() %>\nIs there something like <%= // map.size() %>?\n" }, { "from": "gpt", "value": "In JSP (JavaServer Pages), you cannot directly comment out an expression within the `<%= %>` tags using the same syntax that you...
Does hitting the back button in a web browser cause the session data set in the preceding call to be deleted?
Hitting the back button in a web browser does not typically delete session data set during a web session. Session data is usually stored on the server side, and it persists as long as the session is active, regardless of the navigation actions the user takes, such as going back or forward in their browser history. Her...
32,122
[ { "from": "human", "value": "Does hitting the back button in a web browser cause the session data set in the preceding call to be deleted?\n" }, { "from": "gpt", "value": "Hitting the back button in a web browser does not typically delete session data set during a web session. Session data is us...
I've built web apps before that utilize phpBB session, and user data. The common move is to use code like this: define('IN_PHPBB', true); //replace $phpbb_root_path with path to your forum $phpbb_root_path = '../forum/'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); // Sta...
Yes, you can certainly extract the `$user->data` array from phpBB and save it to your own session in CodeIgniter without having to include the entire `common.php` file, which might introduce conflicts with your existing methods. Here’s a step-by-step approach to achieve that: ### Step 1: Initialize phpBB Session Firs...
31,502
[ { "from": "human", "value": "I've built web apps before that utilize phpBB session, and user data. The common move is to use code like this:\ndefine('IN_PHPBB', true);\n//replace $phpbb_root_path with path to your forum\n$phpbb_root_path = '../forum/';\n$phpEx = substr(strrchr(__FILE__, '.'), 1);\ninclude($...
I just noticed that you can not use standard math operators on an enum such as ++ or +=. So what is the best way to iterate through all of the values in a C++ enum?
In C++, standard enums do not support arithmetic operations like `++`, `+=`, etc. However, you can still iterate through the values of an enum using a couple of different approaches. Below are some common methods: ### Method 1: Use an array You can define an array containing all the enum values and iterate through th...
28,312
[ { "from": "human", "value": "I just noticed that you can not use standard math operators on an enum such as ++ or +=.\nSo what is the best way to iterate through all of the values in a C++ enum?\n" }, { "from": "gpt", "value": "In C++, standard enums do not support arithmetic operations like `++...
I am analyzing a .dmp file that was created and I have a call stack which gives me a lot of info. But I'd like to double click on the call stack and have it bring me to the source code. I can right click on the call stack and select symbol settings.. where I can put the location to the PDB. But there is no option f...
In order to enable source code navigation directly from the call stack in a debugger (like WinDbg or Visual Studio), you typically need to ensure that a few things are in place: 1. **Source Code Availability**: Make sure that you have the source code available locally and that it matches the version of the binary that...
21,627
[ { "from": "human", "value": "I am analyzing a .dmp file that was created and I have a call stack which gives me a lot of info. But I'd like to double click on the call stack and have it bring me to the source code. \nI can right click on the call stack and select symbol settings.. where I can put the loca...
Why am I getting an out of memory exception? So this dies in C# on the first time through: splitBitmaps.Add(neededImage.Clone(rectDimensions, neededImage.PixelFormat)); Where splitBitmaps is a List<BitMap> BUT this works in VB for at least 4 iterations: arlSplitBitmaps.Add(Image.Clone(rectDimensions, Image.PixelFormat...
The `OutOfMemoryException` you are encountering in C# when attempting to clone a `Bitmap` can occur for several reasons. Since you mentioned that it works in VB but fails in C#, this suggests that there could be some subtle differences in how resources are managed or allocated in the two environments. Here are some pot...
28,980
[ { "from": "human", "value": "Why am I getting an out of memory exception?\nSo this dies in C# on the first time through:\nsplitBitmaps.Add(neededImage.Clone(rectDimensions, neededImage.PixelFormat)); \nWhere splitBitmaps is a List<BitMap> BUT this works in VB for at least 4 iterations:\narlSplitBitmaps.Add(...
I got a very similar error to the one below: How can I fix this delphi 7 compile error - "Duplicate resource(s)" However, the error I got is this: [Error] WARNING. Duplicate resource(s): [Error] Type 10 (RCDATA), ID TFMMAINTQUOTE: [Error] File P:\[PATH SNIPPED]\Manufacturing.RES resource kept; file FMaintQu...
The "Duplicate resource(s)" error in Delphi can occur when there are conflicting resource IDs in your project. In your case, it looks like both your application resource file (`Manufacturing.RES`) and your form's resource file (`FMaintQuote.DFM`) contain a resource with the ID `TFMMAINTQUOTE`, which is causing the conf...
30,564
[ { "from": "human", "value": "I got a very similar error to the one below:\nHow can I fix this delphi 7 compile error - \"Duplicate resource(s)\"\nHowever, the error I got is this:\n [Error] WARNING. Duplicate resource(s):\n [Error] Type 10 (RCDATA), ID TFMMAINTQUOTE:\n [Error] File P:\\[PATH SNIPPE...
My Flash (AS3/AIR) application is currently using a slightly unusual architecture (for a Flash app) to provide particular base classes for loaded content at runtime. The external content is published with 'stub' base classes, which are eclipsed by the 'real' base classes at runtime when it is loaded. I've heard this re...
It seems like you're facing a challenging situation with your Flash application architecture, specifically regarding the security model and application domains in ActionScript 3. Your understanding of the limitations is on point. Let’s summarize and provide some insights. ### Bootstrapping and Application Domains The...
29,071
[ { "from": "human", "value": "My Flash (AS3/AIR) application is currently using a slightly unusual architecture (for a Flash app) to provide particular base classes for loaded content at runtime. The external content is published with 'stub' base classes, which are eclipsed by the 'real' base classes at runt...
I have 3 projects in my solution that I want to deploy. Is there a nice and quick way of using Visual Studio's setup projects to deploy all three apps using one MSI and letting the user decide which apps he wants to install during the install process? I have setup projects for the 3 individual apps, I also have an ...
Yes, you are on the right track using Visual Studio's setup projects to create a single MSI that allows the user to choose which apps to install. You can achieve this by leveraging the "Setup Project" to include multiple applications and customize the installation options accordingly. Here's a step-by-step approach: #...
29,496
[ { "from": "human", "value": "I have 3 projects in my solution that I want to deploy. Is there a nice and quick way of using Visual Studio's setup projects to deploy all three apps using one MSI and letting the user decide which apps he wants to install during the install process? \nI have setup projects ...
Are the .net classes relating to DbProviderFactory thread safe?
In the .NET Framework, the classes related to `DbProviderFactory`, which are part of the ADO.NET architecture, are generally designed to be thread-safe in terms of providing factory methods for creating database connections, commands, etc. This means that you can safely use the same instance of `DbProviderFactory` acro...
34,080
[ { "from": "human", "value": "Are the .net classes relating to DbProviderFactory thread safe?\n" }, { "from": "gpt", "value": "In the .NET Framework, the classes related to `DbProviderFactory`, which are part of the ADO.NET architecture, are generally designed to be thread-safe in terms of provid...
Is there an easy way to modify this code so that the target URL opens in the SAME window? <a href="javascript:q=(document.location.href);void(open('http://example.com/submit.php?url='+escape(q),'','resizable,location,menubar,toolbar,scrollbars,status'));">click here</a>``
Yes, you can modify the code so that the target URL opens in the same window instead of using `open()`, which opens a new window or tab. You can simply change the `href` of the anchor tag to point directly to the desired URL. Here’s how you can modify the code: ```html <a href="http://example.com/submit.php?url=" + e...
31,519
[ { "from": "human", "value": "Is there an easy way to modify this code so that the target URL opens in the SAME window?\n\n\n<a href=\"javascript:q=(document.location.href);void(open('http://example.com/submit.php?url='+escape(q),'','resizable,location,menubar,toolbar,scrollbars,status'));\">click here</a>``...
Say I have a data structure, such as d dog DS qualified d name 20 d breed 20 d birthdate 8 0 I can then define d poochie likeds(dog) and use poochie.name, etc. But can I just set up the 'dog' a...
In RPG (Report Program Generator), you can define a data structure (DS) like `dog` as a template without creating an instance of it in memory. This is commonly done using the `LIKE` keyword when you want to create other data structures based on the template without allocating storage for the original structure. If you...
31,837
[ { "from": "human", "value": "Say I have a data structure, such as\nd dog DS qualified\nd name 20\nd breed 20\nd birthdate 8 0\n\nI can then define \nd poochie likeds(dog)\n\nand use po...
In another question I asked if mutation-testing is useful in practice. As I didn't get any answers that satisfy me, I want to check the current tools myself. So I need an overview about current existing mutation-test-frameworks. Which of them are most usable and why? I program in Java, so I would prefer Java-tools, bu...
Mutation testing is a useful technique in software testing that helps evaluate the quality of test cases by introducing small changes (mutations) to the code and checking whether the existing tests can catch these changes. Here’s an overview of some current mutation testing frameworks, especially focusing on Java but a...
29,095
[ { "from": "human", "value": "In another question I asked if mutation-testing is useful in practice. As I didn't get any answers that satisfy me, I want to check the current tools myself. So I need an overview about current existing mutation-test-frameworks. Which of them are most usable and why?\n\nI progra...
I have a page where my combo box has hundreds of elements which makes it very hard to pick the one item I want. Is there a good Javascript replacement that would do better than <select id="field-component" name="field_component"> <option selected="selected">1</option><option>2</option>... </select> ...
Yes! For a better user experience, especially when dealing with a large number of options in a dropdown, you can use a JavaScript library that provides autocomplete functionality. Here are a few popular libraries that offer features like filtering and "intellisense"-like autocomplete: ### 1. Select2 [Select2](https://...
29,360
[ { "from": "human", "value": "I have a page where my combo box has hundreds of elements which makes it very hard to pick the one item I want. Is there a good Javascript replacement that would do better than\n<select id=\"field-component\" name=\"field_component\"> \n <option selected=\"selec...
Slightly related to my other question: What is the difference between the following: private class Joe protected class Joe public class Joe class Joe Once again, the difference between the last 2 is what I'm most interested in.
In Java, the access modifiers (private, protected, public) and the absence of an access modifier (which implies package-private) define the accessibility of classes and members within your code. Here’s a breakdown of the access modifiers you mentioned, especially focusing on the last two. ### 1. `private class Joe` - ...
31,966
[ { "from": "human", "value": "Slightly related to my other question: What is the difference between the following:\nprivate class Joe\nprotected class Joe\npublic class Joe\nclass Joe\n\nOnce again, the difference between the last 2 is what I'm most interested in.\n" }, { "from": "gpt", "value": ...
Are ColdFusion objects (i.e. CFCs invoked via cfobject) normally passed by reference or by value (copied in memory)? And is it possible to force ColdFusion to pass an object in either manner?
In ColdFusion, when you work with ColdFusion components (CFCs), they are passed by reference rather than by value. This means that when you pass an object to a function or method, you are passing a reference to that object, not a copy of the object itself. As a result, any modifications made to the object within the fu...
31,493
[ { "from": "human", "value": "Are ColdFusion objects (i.e. CFCs invoked via cfobject) normally passed by reference or by value (copied in memory)? And is it possible to force ColdFusion to pass an object in either manner?\n" }, { "from": "gpt", "value": "In ColdFusion, when you work with ColdFus...
I just re-read The Pragmatic Programmer (my third time reading it...I get something new every time, too). It seems like the tips that they mention are related to many of the various Agile methodologies. Is Pragmatic Programming just another form of Agile Development?
"The Pragmatic Programmer," authored by Andrew Hunt and David Thomas, is a seminal book in software development that focuses on best practices, principles, and methodologies for programmers. While it shares many principles with Agile methodologies, it is not strictly another form of Agile development. Here are a few k...
34,001
[ { "from": "human", "value": "I just re-read The Pragmatic Programmer (my third time reading it...I get something new every time, too). It seems like the tips that they mention are related to many of the various Agile methodologies. Is Pragmatic Programming just another form of Agile Development?\n" }, {...
Having a strange rendering issue with Safari: I have a table inside a div. Inside the table <td> I have lots of div's floated left. So the normal display is all of the divs within the td stacked up to the left until they fill the width, then flow to the next line, and so forth. So something like this: |===============...
It sounds like you've encountered a common issue with CSS rendering, particularly with how different browsers interpret certain properties. The `white-space: nowrap;` rule you applied to your inner divs is indeed the source of the problem, especially in WebKit-based browsers like Safari. This rule prevents line breaks ...
31,729
[ { "from": "human", "value": "Having a strange rendering issue with Safari: \nI have a table inside a div. Inside the table <td> I have lots of div's floated left. So the normal display is all of the divs within the td stacked up to the left until they fill the width, then flow to the next line, and so forth...
I hope someone will be able to answer my question. I have Subversion set up, served by Apache2+SSL, doing web development. I want a post-commit hook that runs svn update on my testing server, so when someone commits, it will automatically update the testing site. The hook doesn't work because the certificate is a self ...
Using a self-signed SSL certificate with Subversion can indeed cause issues, especially with post-commit hooks that run automatically without a user interface to accept the certificate. Here are a few approaches to resolve the issue: ### Option 1: Use the `--trust-server-cert` Option You can modify your post-commit ho...
29,462
[ { "from": "human", "value": "I hope someone will be able to answer my question.\nI have Subversion set up, served by Apache2+SSL, doing web development.\nI want a post-commit hook that runs svn update on my testing server, so when someone commits, it will automatically update the testing site. The hook does...
I have a macro in excel which calls a few other functions in vba. The problem is that there seem to be a lot of circular references and memory is not freed up. I am trying to explicitly free up memory by setting objects to nothing, but still cannot plug it. Morever, even after the macro stops running, the memory is not...
Memory leaks in VBA can be quite challenging to manage, especially with circular references and object management. Here are some strategies to help you troubleshoot and resolve memory issues in your Excel VBA macro: ### 1. **Review Object Usage** - Ensure that all objects (such as `Range`, `Workbook`, `Worksheet`, ...
27,698
[ { "from": "human", "value": "I have a macro in excel which calls a few other functions in vba. The problem is that there seem to be a lot of circular references and memory is not freed up. I am trying to explicitly free up memory by setting objects to nothing, but still cannot plug it. Morever, even after t...
When working on a big C/C++ project, do you have some specific rules regarding the #include within source or header files? For instance, we can imagine to follow one of these two excessive rules: #include are forbidden in .h files; it is up to each .c file to include all the headers it needs Each .h file should includ...
When working on C/C++ projects, the handling of `#include` directives in header and source files is a crucial aspect of code organization and maintainability. Each approach you mentioned has its pros and cons, and it's indeed common to find a balance between them. Here are some guidelines and best practices that can he...
20,741
[ { "from": "human", "value": "When working on a big C/C++ project, do you have some specific rules regarding the #include within source or header files?\nFor instance, we can imagine to follow one of these two excessive rules:\n\n#include are forbidden in .h files; it is up to each .c file to include all the...