instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I am trying to use WScript.Shell SendKeys method to emulate sending a key press from the Number Pad. I have an application that I am writing automated testing for using QTP. It is a Web Browser based application and the input is into a Java App within the web page. The input only accepts key presses from the Number P...
Using `WScript.Shell.SendKeys` to simulate number pad key presses can be a bit tricky because the method doesn't directly support key codes for the numeric keypad (NumPad). However, you can use specific codes that correspond to the NumPad keys. Here’s how you can send key presses from the NumPad: 1. **Sending Number ...
32,751
[ { "from": "human", "value": "I am trying to use WScript.Shell SendKeys method to emulate sending a key press from the Number Pad.\nI have an application that I am writing automated testing for using QTP. It is a Web Browser based application and the input is into a Java App within the web page. The input ...
Given a html document, what is the most correct and concise regular expression pattern to remove the query strings from each url in the document?
To remove query strings from URLs in an HTML document using a regular expression, you can use the following pattern: ```regex (\?[^"'\s]*)|(&[^"'\s]*) ``` Here’s a concise explanation of how this regex works: - `(\?[^"'\s]*)`: This part matches the query string that begins with a `?`, followed by any characters that...
34,694
[ { "from": "human", "value": "Given a html document, what is the most correct and concise regular expression pattern to remove the query strings from each url in the document?\n" }, { "from": "gpt", "value": "To remove query strings from URLs in an HTML document using a regular expression, you ca...
I'd like to have a custom object attached to the application so I can preserve state in it between different html pages in adobe air. Is this possible? I was asking for a fullblown solution to store a custom js object in memory and persist it between pages loaded from the application sandbox, but this cannot be done u...
Adobe AIR does have some limitations when it comes to sharing state or data between different HTML pages loaded in its application sandbox. However, there are a few approaches you can consider for preserving state across pages: ### 1. **Use of Local Shared Objects:** You can utilize Local Shared Objects (similar to co...
26,941
[ { "from": "human", "value": "I'd like to have a custom object attached to the application so I can preserve state in it between different html pages in adobe air. Is this possible?\n\nI was asking for a fullblown solution to store a custom js object in memory and persist it between pages loaded from the app...
Me and some friends are writing a MORPG in Java, and we would like to use a scripting language to, eg. to create quests. We have non experience with scripting in Java. We have used Python, but we are very inexperienced with it. One of us also have used Javascript. What scripting language should we use? What scripting ...
When choosing a scripting language for your MORPG in Java, several factors come into play, including ease of integration, performance, and community support. Here are some options and recommendations based on your background and needs: ### Recommended Scripting Languages 1. **JavaScript (via Nashorn or GraalVM)** ...
31,726
[ { "from": "human", "value": "Me and some friends are writing a MORPG in Java, and we would like to use a scripting language to, eg. to create quests.\nWe have non experience with scripting in Java. We have used Python, but we are very inexperienced with it. One of us also have used Javascript. \nWhat script...
I would like to know exactly how the "Is" command works in Linux and Unix. As far as I know, ls forks & exec to the Linux/Unix shell and then gets the output (of the current file tree. eg./home/ankit/). I need a more detailed explanation, as I am not sure about what happens after calling fork. Could anyone please expl...
The `ls` command in Linux and Unix is used to list directory contents. It is one of the most commonly used commands in the Unix/Linux command-line environment. To understand how `ls` works, let's break down the process into several key components: ### 1. Basic Invocation When you type `ls` in a terminal and press Ent...
30,062
[ { "from": "human", "value": "I would like to know exactly how the \"Is\" command works in Linux and Unix.\nAs far as I know, ls forks & exec to the Linux/Unix shell and then gets the output (of the current file tree. eg./home/ankit/). I need a more detailed explanation, as I am not sure about what happens ...
Imagine that you are handed a new book everyday from an author. The book is a work in progress. He does not tell you what he has changed or added. Your job is to identify the changes and additions, and pass ONLY these along to the publisher (who does not have time to read the entire book everyday) For the purposes of t...
Your idea of using SHA256 hashes to efficiently identify changes in the text of the book is a good one, especially given the large size of the dataset. Here’s a more structured approach to implementing the solution you described, with a few optimizations and suggestions. ### Step-by-step Approach: 1. **Initial Setup*...
26,064
[ { "from": "human", "value": "Imagine that you are handed a new book everyday from an author.\nThe book is a work in progress.\nHe does not tell you what he has changed or added.\nYour job is to identify the changes and additions, and pass ONLY these along to the publisher (who does not have time to read the...
We're seeing the error message ORA-00936 Missing Expression for the following SQL: Note that this is just a cut-down version of a much bigger SQL so rewriting it to a inner join or similar is not really in the scope of this: This is the SQL that fails: select (select count(*) from gt_roster where ROS_ROSTERPLAN_ID = RP...
The error message `ORA-00936: Missing Expression` typically indicates that the SQL statement is incomplete or malformed. However, from your description and the SQL provided, the structure appears to be correct for what you're trying to achieve. Here's a brief review of your SQL: ```sql SELECT (SELECT COUNT(*) FROM g...
32,044
[ { "from": "human", "value": "We're seeing the error message ORA-00936 Missing Expression for the following SQL:\nNote that this is just a cut-down version of a much bigger SQL so rewriting it to a inner join or similar is not really in the scope of this:\nThis is the SQL that fails:\nselect (select count(*)...
Is there some nice documentation for Windows batch scripting I can download and refer to while offline?
Yes, there are several resources available that you can download for offline reference regarding Windows batch scripting. Here are some suggestions: 1. **Microsoft Documentation**: The official Microsoft documentation for batch scripting (Command Line) can be downloaded as PDF files. You can navigate to the Microsoft ...
34,062
[ { "from": "human", "value": "Is there some nice documentation for Windows batch scripting I can download and refer to while offline?\n" }, { "from": "gpt", "value": "Yes, there are several resources available that you can download for offline reference regarding Windows batch scripting. Here are...
One of the features of the modern (64 bit OS X and iPhone OS) Objective C runtime is the ability for properties to dynamically synthesize ivars without explicitly declaring them in the class: @interface MyClass : NSObject { // NSString *name; unnecessary on modern runtimes } @property (retain) NSStrng *name; @end @...
In modern Objective-C, particularly with the 64-bit runtimes, the ability to synthesize properties without explicitly declaring instance variables (ivars) is a powerful feature. However, as you've pointed out, using custom getters can make it tricky to access these dynamically synthesized ivars directly. Here's how y...
33,366
[ { "from": "human", "value": "One of the features of the modern (64 bit OS X and iPhone OS) Objective C runtime is the ability for properties to dynamically synthesize ivars without explicitly declaring them in the class:\n@interface MyClass : NSObject {\n// NSString *name; unnecessary on modern runtimes\n}...
My PM just stopped by and he wanted a copy of all of our pages... Is there a way to do this for all pages without having to go to each one?
Yes, there are several ways to export or copy all your pages at once, depending on the platform or tool you are using. Here are some general methods for common platforms: ### For WordPress: 1. **Export Tool**: - Go to your WordPress dashboard. - Navigate to **Tools > Export**. - Select "All content" and click...
31,387
[ { "from": "human", "value": "My PM just stopped by and he wanted a copy of all of our pages... Is there a way to do this for all pages without having to go to each one?\n" }, { "from": "gpt", "value": "Yes, there are several ways to export or copy all your pages at once, depending on the platfor...
I was wondering if there was an alternative to itoa() for converting an integer to a string because when I run it in visual Studio I get warnings, and when I try to build my program under Linux, I get a compilation error.
Yes, if you're encountering issues with `itoa()` in Visual Studio or cross-platform development, there are several alternatives you can use to convert an integer to a string in C or C++. The `itoa()` function is not part of the C or C++ standard library, which is likely why you're running into compatibility issues. He...
25,821
[ { "from": "human", "value": "I was wondering if there was an alternative to itoa() for converting an integer to a string because when I run it in visual Studio I get warnings, and when I try to build my program under Linux, I get a compilation error.\n" }, { "from": "gpt", "value": "Yes, if you'...
Could somebody give me a brief overview of the differences between HTTP 1.0 and HTTP 1.1? I've spent some time with both of the RFCs, but haven't been able to pull out a lot of difference between them. Wikipedia says this: HTTP/1.1 (1997-1999) Current version; persistent connections enabled by default and works well...
Certainly! Here’s a brief overview of the key differences between HTTP/1.0 and HTTP/1.1 that can guide you in implementing an HTTP server or application: ### 1. Persistent Connections - **HTTP/1.0**: Connections are non-persistent by default, meaning that a new TCP connection is established for each HTTP request/respo...
27,695
[ { "from": "human", "value": "Could somebody give me a brief overview of the differences between HTTP 1.0 and HTTP 1.1? I've spent some time with both of the RFCs, but haven't been able to pull out a lot of difference between them. Wikipedia says this:\n\nHTTP/1.1 (1997-1999)\nCurrent version; persistent c...
Is there a way to have a RewriteRule fire on any domain that is requested on a box? For example, I have 5 VirtualHosts that would have the exact same RewriteRule applied to them and currently each VirtualHost directive has the rule, but can I put this somewhere 'global' so that upkeep is easier?
Yes, you can set up global rewrite rules in Apache so that you do not need to duplicate the `RewriteRule` in each `<VirtualHost>` directive. You can do this by placing your rewrite rules in a few different locations, depending on your server configuration. ### 1. Use `.htaccess` You can use an `.htaccess` file in the...
31,034
[ { "from": "human", "value": "Is there a way to have a RewriteRule fire on any domain that is requested on a box? For example, I have 5 VirtualHosts that would have the exact same RewriteRule applied to them and currently each VirtualHost directive has the rule, but can I put this somewhere 'global' so that ...
I would like VBA code for Outlook 2007 to right-click a message in any mail view, choose a rule to add it to, and have the sender email be added to the Message Header contains value for that rule. Only particular rules use Message Header as a criteria, so only those applicable rules should show when I right-click a mes...
Creating a VBA solution for Outlook 2007 that allows you to right-click on an email and assign the sender's email address to specific rules using the "Message Header contains" criteria requires a few steps. Here's how to achieve that: 1. **Open the Visual Basic for Applications Editor**: - Open Outlook 2007, press...
25,114
[ { "from": "human", "value": "I would like VBA code for Outlook 2007 to right-click a message in any mail view, choose a rule to add it to, and have the sender email be added to the Message Header contains value for that rule.\nOnly particular rules use Message Header as a criteria, so only those applicable ...
MTOM is the W3C Message Transmission Optimization Mechanism, a method of efficiently sending binary data to and from web services. How does it work in general?
The W3C Message Transmission Optimization Mechanism (MTOM) is a specification designed to optimize the transmission of binary data in web services, especially when using SOAP (Simple Object Access Protocol) messages. MTOM primarily addresses the inefficiencies that arise from encoding binary data into text formats such...
31,740
[ { "from": "human", "value": "MTOM is the W3C Message Transmission Optimization Mechanism, a method of efficiently sending binary data to and from web services.\nHow does it work in general?\n" }, { "from": "gpt", "value": "The W3C Message Transmission Optimization Mechanism (MTOM) is a specifica...
All the googling around hasn't found an answer for me yet... I have one of our devs that is using VSS and VS2005. Checking in works (abeit quite painfully across the 'Net) but there doesn't seem to be a way to put comments into a checkin (unless you embed it in the source file maybe?) I'll be one of the firs to admit...
In Visual SourceSafe (VSS), you can indeed add comments during a check-in, though the process may not be as straightforward as in some modern version control systems. Here's how you can add comments when checking in files using Visual SourceSafe with Visual Studio 2005: 1. **Check In via Visual SourceSafe Explorer:** ...
34,033
[ { "from": "human", "value": "All the googling around hasn't found an answer for me yet... I have one of our devs that is using VSS and VS2005. Checking in works (abeit quite painfully across the 'Net) but there doesn't seem to be a way to put comments into a checkin (unless you embed it in the source file ...
Which style of Ruby string quoting do you favour? Up until now I've always used 'single quotes' unless the string contains certain escape sequences or interpolation, in which case I obviously have to use "double quotes". However, is there really any reason not to just use double quoted strings everywhere?
Using single quotes (`'`) and double quotes (`"`) in Ruby does come with some differences in how they handle escape sequences and string interpolation. The choice between them often depends on personal preference, code style guidelines, and the specific requirements of the string. ### Reasons to Use Single Quotes 1. ...
33,316
[ { "from": "human", "value": "Which style of Ruby string quoting do you favour? Up until now I've always used 'single quotes' unless the string contains certain escape sequences or interpolation, in which case I obviously have to use \"double quotes\".\nHowever, is there really any reason not to just use dou...
I am not able to access localhost https pages in firefox3. It gave the error 'Can't connect securely because the SSL protocol has been disabled. (Error code: ssl_error_ssl_disabled)' I enabled all the SSL2 related preferences through about:config and the error changed to 'Data Transfer Error The browser connec...
The issue you are encountering seems related to how Firefox 3 handles SSL/TLS connections and possibly the configuration of your local server. Here are a few steps to troubleshoot and potentially resolve the issues: ### 1. Check SSL/TLS Settings Make sure that the SSL/TLS protocols you need are enabled in Firefox. Go ...
31,312
[ { "from": "human", "value": "I am not able to access localhost https pages in firefox3. It gave the error \n\n'Can't connect securely because the SSL protocol has been disabled.\n (Error code: ssl_error_ssl_disabled)'\n\nI enabled all the SSL2 related preferences through about:config and the error changed ...
To implement "method-missing"-semantics and such in C# 4.0, you have to implement IDynamicObject: public interface IDynamicObject { MetaObject GetMetaObject(Expression parameter); } As far as I can figure out IDynamicObject is actually part of the DLR, so it is not new. But I have not been able to find much document...
You are correct that the `IDynamicObject` interface is part of the Dynamic Language Runtime (DLR) introduced with C# 4.0. This interface enables dynamic behavior in C# by allowing you to define how operations like method calls, property accesses, and more are handled at runtime. The `GetMetaObject` method is crucial b...
28,250
[ { "from": "human", "value": "To implement \"method-missing\"-semantics and such in C# 4.0, you have to implement IDynamicObject:\npublic interface IDynamicObject\n{\n MetaObject GetMetaObject(Expression parameter);\n}\n\nAs far as I can figure out IDynamicObject is actually part of the DLR, so it is not ne...
I have an RDLC report that I'm having problems with page breaks. The report has a group that has a number of records that do not fit on one page. This report renders fine in Normal Mode, but when I switch to Print Mode, "extra" page breaks that were not there before appear. This is causing the report to print on more p...
Dealing with page breaks in RDLC reports, especially between different rendering modes, can be tricky. Since you’re experiencing issues with "extra" page breaks in Print Layout that don’t appear in Normal Mode, here are some suggestions to help resolve the problem: ### 1. Check the Page Size and Margins Make sure the ...
28,420
[ { "from": "human", "value": "I have an RDLC report that I'm having problems with page breaks. The report has a group that has a number of records that do not fit on one page. This report renders fine in Normal Mode, but when I switch to Print Mode, \"extra\" page breaks that were not there before appear. Th...
What are some good jQuery Resources along with some gotchas when using it with ASP.Net?
Certainly! jQuery is a popular JavaScript library that simplifies HTML document traversing, event handling, animating, and Ajax interactions. When using jQuery with ASP.NET, there are specific resources and considerations that can enhance your development experience. ### Good jQuery Resources 1. **Official jQuery Web...
30,280
[ { "from": "human", "value": "What are some good jQuery Resources along with some gotchas when using it with ASP.Net?\n" }, { "from": "gpt", "value": "Certainly! jQuery is a popular JavaScript library that simplifies HTML document traversing, event handling, animating, and Ajax interactions. When...
I'm working on a project where we're doing a lot of remote object transfer between a Java service and clients written in other various languages. Given our current constraints I've decided to see what it would take to generate code based on an existing Java class. Basically I need to take a .class file (or a collection...
Yes, it is possible to analyze Java bytecode to extract information about classes, including their data members (fields) and methods (getters/setters). You can use various libraries in Java that provide APIs to read and analyze bytecode. One of the most commonly used libraries for this purpose is **ASM** (a Java byteco...
30,022
[ { "from": "human", "value": "I'm working on a project where we're doing a lot of remote object transfer between a Java service and clients written in other various languages. Given our current constraints I've decided to see what it would take to generate code based on an existing Java class. Basically I ne...
Does anyone know if you can programmatically open a .webarchive on the iPhone? A .webarchive is Safari's way of packaging up a webpage and it's associated resources into a single file. I tried creating one and browsing to a link to one in mobile safari, but it didn't work.... Note: I was kind of hoping this could be d...
Opening a `.webarchive` file programmatically on an iPhone can be a bit challenging due to the limitations of the iOS environment. Safari on iOS does not natively support opening `.webarchive` files directly from a link or a file. Here are a few points to consider: 1. **File Handling**: iOS restricts certain types of ...
30,607
[ { "from": "human", "value": "Does anyone know if you can programmatically open a .webarchive on the iPhone? A .webarchive is Safari's way of packaging up a webpage and it's associated resources into a single file.\nI tried creating one and browsing to a link to one in mobile safari, but it didn't work....\...
How are paged results commonly implemented in PHP? I'd like to have a results page with 10 results. Paging forward in the navigation would give me the next and previous sets. Is there a way this is commonly done? Does anyone have simple advice on getting started?
Certainly! Implementing paged results in PHP is a common task when dealing with databases. Below are the basic steps and a simple example of how to achieve this. ### Steps to Implement Paged Results: 1. **Database Query**: Use SQL's `LIMIT` and `OFFSET` clauses to retrieve a specific subset of results. 2. **Calculat...
32,213
[ { "from": "human", "value": "How are paged results commonly implemented in PHP?\nI'd like to have a results page with 10 results. Paging forward in the navigation would give me the next and previous sets.\nIs there a way this is commonly done? Does anyone have simple advice on getting started?\n" }, { ...
I want to find in a vector of Object pointers for a matching object. Here's a sample code to illustrate my problem: class A { public: A(string a):_a(a) {} bool operator==(const A& p) { return p._a == _a; } private: string _a; }; vector<A*> va; va.push_back(new A("one")); va.push_back(new A(...
To find an object in a `vector` of pointers based on the content of the objects they point to, you can use a custom comparison function or a lambda expression with the `std::find_if` algorithm. Since you're dealing with pointers, you need to dereference the pointers to use your overloaded `operator==`. Here's a modifi...
31,394
[ { "from": "human", "value": "I want to find in a vector of Object pointers for a matching object. Here's a sample code to illustrate my problem:\nclass A {\npublic:\n A(string a):_a(a) {}\n bool operator==(const A& p) {\n return p._a == _a; \n }\n\nprivate: \n string _a;\n};\n\nvector<A*>...
Both of them are mbeans. Both are intended to setup Hibernate Session Factory and expose it through JNDI. Both are implemented in Red Hat. But at the same time each of them belongs to separate classes hierarchy. What is actually the difference between them? Thank you in advance.
It seems you're referring to two different implementations of MBeans (Managed Beans) in the context of managing Hibernate Session Factories within a Red Hat application, possibly in a JBoss/WildFly environment. Though you didn't specify the exact MBeans, this scenario typically involves different ways to configure or e...
31,653
[ { "from": "human", "value": "Both of them are mbeans. Both are intended to setup Hibernate Session Factory and expose it through JNDI. Both are implemented in Red Hat. But at the same time each of them belongs to separate classes hierarchy.\nWhat is actually the difference between them?\nThank you in advanc...
As kind of a followup to this question I've gotten a solution working on my local machine, but not on a machine on the network. I don't know too much about sockets other than that basics, so bear with me. The goal is for a client to look for a server on a local network, and this is the result of some cut/paste/edit co...
Based on your description and the provided code, it seems like you're running into a problem when trying to communicate between a client and a server on separate machines in the same local network. Let’s identify and address the potential issues. ### Issues and Recommendations: 1. **IP Address Configuration**: - I...
28,736
[ { "from": "human", "value": "As kind of a followup to this question I've gotten a solution working on my local machine, but not on a machine on the network.\nI don't know too much about sockets other than that basics, so bear with me. The goal is for a client to look for a server on a local network, and th...
Do the clients need something else than a proper jdk and javafx compliant browser to visit javafx applets?
JavaFX applets were designed to run in web browsers but have become largely obsolete due to the decline in support for applets and the rise of more modern web technologies. As of recent years, JavaFX applets are not commonly supported in modern browsers, and the use of applets in general has been deprecated. For clien...
30,876
[ { "from": "human", "value": "Do the clients need something else than a proper jdk and javafx compliant browser to visit javafx applets?\n" }, { "from": "gpt", "value": "JavaFX applets were designed to run in web browsers but have become largely obsolete due to the decline in support for applets ...
I have a long form that the user has to fill out. So I broke the form into logical units and created another user control for some elements (they will be reused elsewhere). So say the form has these fields: UserControl3.ascx Username password email -- usercontrol2.ascx address -- usercontrol2.ascx city -- use...
To access fields from `usercontrol2.ascx` in the code-behind of `usercontrol3.ascx`, you will need to ensure that you expose the fields from `usercontrol2.ascx` as public properties. This way, you can retrieve the values from the parent control (in this case, `usercontrol3.ascx`). Here's a step-by-step guide on how y...
28,001
[ { "from": "human", "value": "I have a long form that the user has to fill out. \nSo I broke the form into logical units and created another user control for some elements (they will be reused elsewhere).\nSo say the form has these fields:\nUserControl3.ascx\nUsername\npassword\nemail -- usercontrol2.ascx...
I implemented a small OOP library in Lua, and two things are not quite right yet. I need your advice! How to call super()? I need to make a choice. The three arguments I need to resolve a call to super() are: The class from where the call is being made (CallerClass) The instance to be passed (self) The name of the met...
Both your questions touch on important aspects of object-oriented programming in Lua, so let's tackle them one by one. ### 1. How to call `super()` Let's analyze the three options you presented for calling the `super()` method: 1. **Current way:** `self:super(CallerClass):method()` 2. **Variant:** `CallerClass:super...
31,371
[ { "from": "human", "value": "I implemented a small OOP library in Lua, and two things are not quite right yet. I need your advice!\nHow to call super()?\nI need to make a choice. The three arguments I need to resolve a call to super() are:\n\nThe class from where the call is being made (CallerClass)\nThe in...
Ever since I first wrote if ($a = 5) { # do something with $a, e.g. print "$a"; } and went through the normal puzzling session of why is the result always true why is $a always 5 until I realized, I'd assigned 5 to $a, instead of performing a comparison. So I decided to write that kind of condition above as ...
It's great to see your interest in defensive coding practices! Many developers have similar experiences, and it's wise to learn from them. Here are some common defensive coding practices that can help prevent errors and make your code more robust: 1. **Use Explicit Comparisons**: As you've mentioned, placing the const...
31,914
[ { "from": "human", "value": "Ever since I first wrote\nif ($a = 5) {\n # do something with $a, e.g.\n print \"$a\";\n}\n\nand went through the normal puzzling session of \n\nwhy is the result always true\nwhy is $a always 5\n\nuntil I realized, I'd assigned 5 to $a, instead of performing a comparison.\...
We've just moved our website to win2008 and IIS7 from win2000 with IS5 and I have some problems. I have a folder that in it is an ASP page that upload a file to an upper folder, in the old IIS, I gave to the folder with the ASP page the permissions of the administrator and it's work fine, the files could be uploaded to...
When moving from IIS 5 on Windows 2000 to IIS 7 on Windows Server 2008, you might encounter some permission issues due to the way Windows handles security. In your case, it appears that the ASP application running in IIS 7 needs additional permissions to write to an upper-level directory. Here are some steps to trouble...
32,917
[ { "from": "human", "value": "We've just moved our website to win2008 and IIS7 from win2000 with IS5 and I have some problems.\nI have a folder that in it is an ASP page that upload a file to an upper folder, in the old IIS, I gave to the folder with the ASP page the permissions of the administrator and it's...
I am using a custom item renderer in a combobox to display a custom drawing instead of the default text label. This works fine for the dropdown list but the displayed item ( when the list is closed) is still the textual representation of my object. Is there a way to have the displayed item rendered the same way as the ...
Yes, you can achieve a consistent rendering in both the dropdown list and the displayed item of a ComboBox by using a custom item renderer in both cases. The key is to set the `labelField` property to `null` or not set it at all, and instead create a custom item renderer class that handles the drawing for both the drop...
28,642
[ { "from": "human", "value": "I am using a custom item renderer in a combobox to display a custom drawing instead of the default text label.\nThis works fine for the dropdown list but the displayed item ( when the list is closed) is still the textual representation of my object.\nIs there a way to have the d...
I haven't found an answer to this particular question; perhaps there isn't one. But I've been wondering for a while about it. What exactly causes a binary file to display as "gibberish" when you look at it in a text editor? It's the same thing with encrypted files. Are the binary values of the file trying to be convert...
You've raised some interesting questions about binary files, text editors, and file associations. Let's go through each of them. ### 1. Why Do Binary Files Display as "Gibberish"? Binary files contain data in a format that is not meant to be interpreted as plain text. Text editors typically display text files using a...
33,067
[ { "from": "human", "value": "I haven't found an answer to this particular question; perhaps there isn't one. But I've been wondering for a while about it.\nWhat exactly causes a binary file to display as \"gibberish\" when you look at it in a text editor? It's the same thing with encrypted files. Are the bi...
Or is there a chance that the operation will fail? Thanks. I chose the wrong term and what I really meant was rounding to 0, not truncation. The point is, I need to compare the integer part of two doubles and I'm just casting them to int and then using ==, but, as someone pointed out in one of my earlier questions, thi...
When comparing the integer parts of two doubles, it's important to handle potential issues with casting and precision. Here are some considerations: 1. **Rounding vs. Truncating**: If you want to round to 0, you'll need to consider how to handle negative numbers. Rounding towards zero means that you will truncate the ...
29,680
[ { "from": "human", "value": "Or is there a chance that the operation will fail?\nThanks.\nI chose the wrong term and what I really meant was rounding to 0, not truncation.\nThe point is, I need to compare the integer part of two doubles and I'm just casting them to int and then using ==, but, as someone poi...
I would like to program Java servlets using Eclipse and I plan on deploying them using Tomcat. I think I can build the projects using Ant which is bundled with Eclipse. I have the standard Eclipse IDE. What options do I have for doing Servlet development in Eclipse? What changes do I need to make to Eclipse? Do I need ...
To develop Java servlets using Eclipse and deploy them on Apache Tomcat, you have several options and configurations to consider. Here’s a step-by-step guide on how to set up your Eclipse environment for servlet development: ### 1. **Install Eclipse IDE for Java EE Developers:** While the standard Eclipse IDE can be u...
29,542
[ { "from": "human", "value": "I would like to program Java servlets using Eclipse and I plan on deploying them using Tomcat. I think I can build the projects using Ant which is bundled with Eclipse. I have the standard Eclipse IDE. What options do I have for doing Servlet development in Eclipse? What changes...
I am writing an application using labview and need to use external code. I have read that using CINs are old fashioned and 'wrong' to use. Is this correct? Should I use shared dlls instead? What are the advantages/disadvantages of both methods?
Yes, you are correct that using Code Interface Nodes (CINs) in LabVIEW is generally considered old-fashioned and not the preferred method for integrating external code. Instead, using shared DLLs (Dynamic Link Libraries) is typically the recommended approach. Let's discuss the advantages and disadvantages of both metho...
31,249
[ { "from": "human", "value": "I am writing an application using labview and need to use external code. I have read that using CINs are old fashioned and 'wrong' to use. Is this correct? Should I use shared dlls instead?\nWhat are the advantages/disadvantages of both methods?\n" }, { "from": "gpt", ...
There is a console Java application which is supposed to run until it is stopped by Ctrl+C or closing the console window. How that application can be programmed to execute a clean up code before exit?
In a console Java application, you can handle clean-up tasks that need to occur when the application is terminated by signals like `Ctrl+C` or when the console window is closed by using a shutdown hook. A shutdown hook is a special thread that is executed when the Java Virtual Machine (JVM) is shutting down. This allow...
32,721
[ { "from": "human", "value": "There is a console Java application which is supposed to run until it is stopped by Ctrl+C or closing the console window. How that application can be programmed to execute a clean up code before exit?\n" }, { "from": "gpt", "value": "In a console Java application, yo...
Visual Studio 2005 is very slow with a solution with 21 projects. Any ideas how to speed it up?
Visual Studio 2005 can become slow when working with large solutions, especially those with multiple projects. Here are several strategies to improve performance: 1. **Upgrade Visual Studio**: If possible, consider upgrading to a more recent version of Visual Studio. Newer versions have improved performance and better...
33,267
[ { "from": "human", "value": "Visual Studio 2005 is very slow with a solution with 21 projects. Any ideas how to speed it up?\n" }, { "from": "gpt", "value": "Visual Studio 2005 can become slow when working with large solutions, especially those with multiple projects. Here are several strategie...
We are in the process of moving our SVN repositories from one machine to another one, and with it will come a new domain name for the new repo. The problem is, that within the repository, there are lots of svn:externals references to other projects within the repository. So for example, we have projectA, which has in...
To rewrite the SVN repository's history and update the `svn:externals` references from the old domain to the new one, you will need to use the `svnadmin dump` and `svnadmin load` commands along with some text processing to achieve this. Here’s a step-by-step guide on how to perform this operation: ### Step 1: Create a...
32,322
[ { "from": "human", "value": "We are in the process of moving our SVN repositories from one machine to another one, and with it will come a new domain name for the new repo. The problem is, that within the repository, there are lots of svn:externals references to other projects within the repository. So fo...
Is there anyway to use unicode strings (most probably in UTF-8, but could be any encoding) in PostScript? So far, i've been using this function to transforms fonts to Latin1 encoding: /latinize { findfont dup length dict begin { 1 index /FID ne {def}{pop pop} ifelse }forall /Encoding ISOLatin1Encoding def cur...
PostScript has limited built-in support for Unicode strings, as it primarily operates on the basis of the PostScript language specification, which traditionally uses 8-bit encodings. In general, PostScript does not natively support UTF-8 or other Unicode encodings directly. However, there are a few approaches you can ...
30,612
[ { "from": "human", "value": "Is there anyway to use unicode strings (most probably in UTF-8, but could be any encoding) in PostScript?\nSo far, i've been using this function to transforms fonts to Latin1 encoding:\n/latinize {\n findfont\n dup length dict begin\n { 1 index /FID ne {def}{pop pop} ifelse }...
I'm trying to enable SqlCacheDependency through my StructureMap IoC, I'm using LinqToSql I have the code done to take care of the Linq Caching but not quite sure how to go about setting up the SqlCacheDependency as it requires putting this in a global.asa file void Application_Start(object sender, EventArgs e) { s...
To enable `SqlCacheDependency` in a non-web application, you'll have to manage the lifecycle of the `SqlDependency` subscription manually. In a typical ASP.NET application, the `Application_Start` method in the `global.asax` file is a good place to start any necessary services or registrations because it is called when...
32,257
[ { "from": "human", "value": "I'm trying to enable SqlCacheDependency through my StructureMap IoC, I'm using LinqToSql I have the code done to take care of the Linq Caching but not quite sure how to go about setting up the SqlCacheDependency as it requires putting this in a global.asa file\nvoid Application_...
I have a Trac project installed on top of a Subversion implementation (easy to do thanks to Webfaction's control panel), but now I have configuration work to do. With that in mind, are there easy ways to do the following in Trac: 1) Ensure that customers can only see a high level progress indicator. 2) Give daily summ...
To configure Trac for your requirements and enhance its functionality, here are some recommendations: ### 1. Limiting Customer Access to High-Level Progress Indicators To ensure that customers can only see a high-level progress indicator, you can utilize Trac's permissions system. You might want to create a specific ...
28,178
[ { "from": "human", "value": "I have a Trac project installed on top of a Subversion implementation (easy to do thanks to Webfaction's control panel), but now I have configuration work to do. With that in mind, are there easy ways to do the following in Trac:\n1) Ensure that customers can only see a high le...
If this is true, I'd like to know why. Do we see a great percentage of secure and high traffic web applications built in LAMP?
The LAMP stack, which stands for Linux, Apache, MySQL, and PHP (or Perl/Python), has been a popular choice for building web applications for many years. Here are some reasons why you see a significant percentage of secure and high-traffic web applications built using LAMP: 1. **Maturity and Stability**: The LAMP stack...
30,393
[ { "from": "human", "value": "If this is true, I'd like to know why. Do we see a great percentage of secure and high traffic web applications built in LAMP?\n" }, { "from": "gpt", "value": "The LAMP stack, which stands for Linux, Apache, MySQL, and PHP (or Perl/Python), has been a popular choice...
I have heard that this is what JavaRebel does but is there any other good way to deploy a new version of an EAR while allowing users to remain active on the previous version? We use JBoss for the application server...
Yes, there are several strategies to deploy a new version of an EAR (Enterprise Archive) on JBoss (now known as WildFly) while allowing users to remain active on the previous version. Here are a few options you might consider: 1. **Rolling Updates**: This approach involves gradually updating instances of your applicat...
30,779
[ { "from": "human", "value": "I have heard that this is what JavaRebel does but is there any other good way to deploy a new version of an EAR while allowing users to remain active on the previous version? We use JBoss for the application server...\n" }, { "from": "gpt", "value": "Yes, there are ...
I am deciding on a framework to try out for PHP. I have narrowed it down to CakePHP and CodeIgniter. I have a couple of questions for any of you who have used or are familiar with both: I like the fact that CakePHP keeps most of the code outside of the webroot by default. Especially since I may end up using a single ...
Both CakePHP and CodeIgniter are popular PHP frameworks, each with its strengths and weaknesses. Let's address your questions regarding security, upgrades, and long-term maintenance. ### 1. Security and Directory Structure **CakePHP**: - CakePHP's default structure is designed to keep most of the code outside the webr...
26,619
[ { "from": "human", "value": "I am deciding on a framework to try out for PHP. I have narrowed it down to CakePHP and CodeIgniter. I have a couple of questions for any of you who have used or are familiar with both:\n\nI like the fact that CakePHP keeps most of the code outside of the webroot by default. Es...
I'm running Mac OS X Leopard and wanted to know what the easy way to setup a web development environment to use Python, MySQL, Apache on my machine which would allow me to develop on my Mac and then easily move it to a host in the future. I've been trying to get mod_wsgi installed and configured to work with Django and...
Setting up a web development environment on Mac OS X Leopard for Python, MySQL, and Apache can be a bit challenging, but it’s definitely achievable. Below are some steps to help you set up your environment and suggestions for web hosts that support mod_wsgi. ### Setting Up Your Development Environment 1. **Install Py...
30,521
[ { "from": "human", "value": "I'm running Mac OS X Leopard and wanted to know what the easy way to setup a web development environment to use Python, MySQL, Apache on my machine which would allow me to develop on my Mac and then easily move it to a host in the future.\nI've been trying to get mod_wsgi instal...
I'm looking for a way to sequentially number rows in a result set (not a table). In essence, I'm starting with a query like the following: SELECT id, name FROM people WHERE name = 'Spiewak' The ids are obviously not a true sequence (e.g. 1, 2, 3, 4). What I need is another column in the result set which contains the...
To sequentially number rows in a result set in MySQL, you can use the `ROW_NUMBER()` window function, which was introduced in MySQL 8.0. This function allows you to assign a unique sequential integer to rows within a partition of a result set. Here’s how you can modify your query to include a sequential number for eac...
31,683
[ { "from": "human", "value": "I'm looking for a way to sequentially number rows in a result set (not a table). In essence, I'm starting with a query like the following:\nSELECT id, name FROM people WHERE name = 'Spiewak'\n\nThe ids are obviously not a true sequence (e.g. 1, 2, 3, 4). What I need is another...
My coworkers and I were having a discussion about this yesterday. It seems that no matter how well we prepare and no matter how much we test and no matter what the client says immediately before the site becomes public, initial site launches almost always seem to be somewhat rocky. Some clients are better than others, ...
Yes, what you’re experiencing is a common issue in web development and launch processes. Many teams encounter a discrepancy between what is tested and approved in a controlled environment and how things perform in the live environment, especially when it comes to user perception and client satisfaction. Here are some ...
24,121
[ { "from": "human", "value": "My coworkers and I were having a discussion about this yesterday. It seems that no matter how well we prepare and no matter how much we test and no matter what the client says immediately before the site becomes public, initial site launches almost always seem to be somewhat roc...
I would like to include a different file depending on the version of GCC. More precisely I want to write: #if GCC_VERSION >= 4.2 # include <unordered_map> # define EXT std #elif GCC_VERSION >= 4 # include <tr1/unordered_map> # define EXT std #else # include <ext/hash_map> # define unordered_map __gnu_cxx::hash_ma...
In GCC, you can use the predefined macro `__GNUC__`, `__GNUC_MINOR__`, and `__GNUC_PATCHLEVEL__` to determine the version of the compiler being used. These macros can be combined to create a version check similar to what you're trying to achieve. Here’s how you can modify your code to check the GCC version: ```cpp #...
34,747
[ { "from": "human", "value": "I would like to include a different file depending on the version of GCC. More precisely I want to write:\n#if GCC_VERSION >= 4.2\n# include <unordered_map>\n# define EXT std\n#elif GCC_VERSION >= 4\n# include <tr1/unordered_map>\n# define EXT std\n#else\n# include <ext/has...
I am building an enterprise application with .Net 1.1 and SQL Server 2000. I use the read committed isolation level . However changes in non-functional requirements have made it necessary to take measures against non-repeatable reads and phantoms. I see two options: Introduce row-versioning to check if a row has been...
You are facing a significant challenge by needing to accommodate new non-functional requirements while working with legacy technology. Here are some suggestions regarding your two options: ### Option 1: Introduce Row-Versioning While this option can certainly solve the problem of non-repeatable reads and phantoms, it...
31,464
[ { "from": "human", "value": "I am building an enterprise application with .Net 1.1 and SQL Server 2000. I use the read committed isolation level . However changes in non-functional requirements have made it necessary to take measures against non-repeatable reads and phantoms. I see two options: \n\nIntroduc...
This is my very first question so I am a bit nervous about it because I am not sure whether I get the meaning across well enough. Anyhow, here we go.... Whenever new milestones in programming have been reached it seems they always have had one goal in common: to make it easier for programmers, well, to program. Machine...
Your question raises fascinating points about the evolution of programming paradigms and their relation to the concept of natural-language programming (NLP). Both functional programming (FP) and object-oriented programming (OOP) serve to improve the way programmers express their ideas and structure their code, but they...
33,034
[ { "from": "human", "value": "This is my very first question so I am a bit nervous about it because I am not sure whether I get the meaning across well enough. Anyhow, here we go....\nWhenever new milestones in programming have been reached it seems they always have had one goal in common: to make it easier ...
What is your favorite bug/issue tracking system? And why? (Please answer this question only if you have used at least three different bug tracking systems for quite a long time. And please mention these systems as well.)
As an AI, I don't have personal experiences or preferences, but I can provide insights based on information about various bug/issue tracking systems that are widely used in the industry. Here are three popular bug tracking systems: 1. **JIRA**: JIRA by Atlassian is one of the most widely used project management and is...
35,119
[ { "from": "human", "value": "What is your favorite bug/issue tracking system? And why?\n(Please answer this question only if you have used at least three different bug tracking systems for quite a long time. And please mention these systems as well.)\n" }, { "from": "gpt", "value": "As an AI, I ...
Is there any performance impact or any kind of issues? The reason I am doing this is that we are doing some synchronization between two set of DBs with similar tables and we want to avoid duplicate PK errors when synchronizing data.
When synchronizing data between two databases with similar tables, there are several considerations regarding performance impact and potential issues, particularly in avoiding duplicate primary key (PK) errors. Here are some key points to consider: ### Performance Impact 1. **Locking and Contention**: Depending on ho...
32,639
[ { "from": "human", "value": "Is there any performance impact or any kind of issues?\nThe reason I am doing this is that we are doing some synchronization between two set of DBs with similar tables and we want to avoid duplicate PK errors when synchronizing data.\n" }, { "from": "gpt", "value": "...
if i decide to use the 'publish' option for my ASP.NET website, instead of a Web Deployment Project, can i do custom msbuild things? Or do i need to stick with WDP's if i want to do custom msbuild stuff during compile/deployment.
Using the 'publish' option for your ASP.NET website does allow some customization through MSBuild, but there are limitations compared to using a Web Deployment Project (WDP). ### Using the 'Publish' Option When you choose the 'publish' option in your ASP.NET project, you can use various publish profiles to customize t...
27,497
[ { "from": "human", "value": "if i decide to use the 'publish' option for my ASP.NET website, instead of a Web Deployment Project, can i do custom msbuild things? Or do i need to stick with WDP's if i want to do custom msbuild stuff during compile/deployment.\n" }, { "from": "gpt", "value": "Usin...
Is there a clever way of adding XML serialization instructions without modifying the serialized class? I don’t like the default serialization and I can’t modify the class. I was considering inheriting the class, and using Shadows (VB.NET) to re-implement the properties (with the serialization instructions), but it resu...
Certainly! In situations where you can't modify the class itself but need to control XML serialization, you can use a few different approaches depending on your requirements and constraints. Here are some strategies you can employ: ### 1. Use a Custom Serialization Wrapper One approach is to create a wrapper class th...
31,787
[ { "from": "human", "value": "Is there a clever way of adding XML serialization instructions without modifying the serialized class?\nI don’t like the default serialization and I can’t modify the class. I was considering inheriting the class, and using Shadows (VB.NET) to re-implement the properties (with th...
If I start a number of process that could represent clients that is running in different TimeZones I can (depending on the actual code) use the TZ enivroment to make them look like they come from different timezones. Is there a more proper windows way to simulate this, without starting 24 virtual machines?
Yes, there are several approaches you can take to simulate different time zones on a Windows machine without needing to run multiple virtual machines. Here are some options: ### 1. **Use Windows Time Zone API in Your Application** If you're developing your application, you can programmatically manipulate time zones. ...
31,818
[ { "from": "human", "value": "If I start a number of process that could represent clients that is running in different TimeZones I can (depending on the actual code) use the TZ enivroment to make them look like they come from different timezones.\nIs there a more proper windows way to simulate this, without ...
Ok. I'm having an issue with the following bit of code: StreamReader arrComputer = new StreamReader(FileDialog.FileName); My first question had been answered already now my second question focuses on the tail end of this code. I'm reading a text file StreamReader that the user selects with a button event using OpenFi...
The error you're encountering is due to a misunderstanding of the `FileDialog` class. The `FileDialog` class is not static, and when you're trying to access `FileDialog.FileName`, it looks like you're trying to reference a class member directly rather than an instance of that class. Here's how you can fix the issue: ...
33,405
[ { "from": "human", "value": "Ok. I'm having an issue with the following bit of code:\nStreamReader arrComputer = new StreamReader(FileDialog.FileName);\n\nMy first question had been answered already now my second question focuses on the tail end of this code.\nI'm reading a text file StreamReader that the ...
Motivation I'd like to find a way to take an arbitrary color and lighten it a few shades, so that I can programatically create a nice gradient from the one color to a lighter version. The gradient will be used as a background in a UI. Possibility 1 Obviously I can just split out the RGB values and increase them individ...
Creating a gradient from an arbitrary color to a lighter version can be done effectively using either of your proposed methods, but the second option—converting to HSV/HSB/HSL and adjusting the brightness and saturation—is generally the more effective approach for achieving a visually pleasing result. ### Possibility ...
21,562
[ { "from": "human", "value": "Motivation\nI'd like to find a way to take an arbitrary color and lighten it a few shades, so that I can programatically create a nice gradient from the one color to a lighter version. The gradient will be used as a background in a UI.\nPossibility 1\nObviously I can just split ...
I'm looking to force my application to shut down, and return an Exit code. Had a look on MSDN and I can see that in WPF the Application has a Shutdown method which takes an error code as a parameter, but there doesn't appear to be one for System.Windows.Forms.Application. I can see Application.Exit() but not a way to ...
In Windows Forms, the `Application` class does not provide a direct way to exit with a specific exit code. However, you can achieve this by calling `Environment.Exit(int exitCode)` method. This method terminates the process and returns the specified exit code to the operating system. Here’s how you can do it: ```csha...
35,145
[ { "from": "human", "value": "I'm looking to force my application to shut down, and return an Exit code. Had a look on MSDN and I can see that in WPF the Application has a Shutdown method which takes an error code as a parameter, but there doesn't appear to be one for System.Windows.Forms.Application.\nI ca...
i am using a WSDL file to create a the proxy class file, this service has a big Enumeration. the description for each enum value is in documentation section, how can i programatically read that section?
Reading the documentation section of a WSDL file programmatically to extract enumeration descriptions is not a straightforward process, as WSDL files primarily serve to describe the web service operations, types, and messages. However, you can do this by parsing the XML content of the WSDL file. Here's a general approa...
28,159
[ { "from": "human", "value": "i am using a WSDL file to create a the proxy class file, this service has a big Enumeration. the description for each enum value is in documentation section, how can i programatically read that section?\n" }, { "from": "gpt", "value": "Reading the documentation secti...
How many can relate do this? Server Error in / Application Object reference not set to an object Description: Object reference not set to an object. Exception Details: System.NullReferenceException: Object reference not set to an object. Source Error: Line 56: posts.Add(post); On a more serious note, what are th...
The "yellow screen of death" (YSOD) that you're encountering is a common issue in ASP.NET applications, particularly the `NullReferenceException`, which indicates that you are trying to access a member on a reference type that is null. Here are some steps and techniques you can use to debug and resolve this issue: ###...
25,968
[ { "from": "human", "value": "How many can relate do this?\n\nServer Error in / Application\n\nObject reference not set to an object\nDescription: Object reference not set to an object.\nException Details: System.NullReferenceException: Object reference not set to an object.\nSource Error:\nLine 56: posts...
I would like to know what the pros and cons are for using an Anemic Domain Model (see link below). Fowler Article
An Anemic Domain Model is a design approach that separates the data and behavior of an object, often resulting in domain objects that contain little to no business logic. This model contrasts with the Rich Domain Model, where domain objects encapsulate both data and behavior. Here are some pros and cons of using an Ane...
32,543
[ { "from": "human", "value": "I would like to know what the pros and cons are for using an Anemic Domain Model (see link below).\nFowler Article\n" }, { "from": "gpt", "value": "An Anemic Domain Model is a design approach that separates the data and behavior of an object, often resulting in domai...
I am trying to use some pinvoke code to call a C function. The function fills a buffer with data. The structure is set up as a DWORD for the length, followed by a string. How do I extract the string from the IntPtr? IntPtr buffer = Marshal.AllocHGlobal(nRequiredSize); PInvokedFunction(buffer, nRequiredSize); strin...
To extract the string correctly from the buffer when dealing with an unmanaged memory pointer using PInvoke in C#, you need to take into account both the length of the string and the data stored in the pointer. The structure of your buffer is as follows: - A `DWORD` (4 bytes) for the length of the string. - A string ...
31,307
[ { "from": "human", "value": "I am trying to use some pinvoke code to call a C function. The function fills a buffer with data.\nThe structure is set up as a DWORD for the length, followed by a string. How do I extract the string from the IntPtr?\n IntPtr buffer = Marshal.AllocHGlobal(nRequiredSize);\n PIn...
For a product in long run (may be 0.5-1 million users) is it good to use java instead of .net from the cost/profitability perspective. To elaborate more..consider web farm scenario in which one will have to purchase windows + Sql server + some antivirus licenses for .net applications. But for java it's almost free. Wha...
Choosing between Java and .NET for a product that is expected to scale to hundreds of thousands or millions of users involves several factors beyond just licensing costs. Below are some key points to consider when evaluating the cost and profitability of using Java vs. .NET in a web farm scenario: ### Licensing Costs ...
22,577
[ { "from": "human", "value": "For a product in long run (may be 0.5-1 million users) is it good to use java instead of .net from the cost/profitability perspective. To elaborate more..consider web farm scenario in which one will have to purchase windows + Sql server + some antivirus licenses for .net applica...
I have data loaded and various transformations on the data complete, the problem is there is a parent/child relationship managed in the data - best explained by an example each row has (column names are made up) row_key parent_row_key row_name parent_row_name some rows have row_key == parent_row_key (their own...
To achieve this in your data pipeline, you will need to perform a self-join on your dataset to retrieve the `row_name` from the parent row and insert it into the `parent_row_name` of the child row. The specific query syntax can vary depending on the data processing framework or query language you're using (e.g., SQL, P...
16,251
[ { "from": "human", "value": "I have data loaded and various transformations on the data complete, the problem is there is a parent/child relationship managed in the data - best explained by an example\neach row has (column names are made up)\nrow_key parent_row_key row_name parent_row_name\n\nsome r...
How can I encrypt and decrypt a string in C#?
In C#, you can use the `System.Security.Cryptography` namespace to encrypt and decrypt strings. Below is a simple example using AES (Advanced Encryption Standard) for both encryption and decryption of a string. ### Important Note When using encryption, ensure that you securely store the encryption key and IV (Initial...
30,259
[ { "from": "human", "value": "How can I encrypt and decrypt a string in C#?\n" }, { "from": "gpt", "value": "In C#, you can use the `System.Security.Cryptography` namespace to encrypt and decrypt strings. Below is a simple example using AES (Advanced Encryption Standard) for both encryption and d...
We decided to use the minimumRequiredVersion in our clickOnce application manifest, and now when we try to rollback to a previous version when the user launches the application it fails to start. It says the application manifest has a earlier version than the required version and the user can not use the application. W...
The issue you're encountering with the `minimumRequiredVersion` in your ClickOnce application manifests is related to how ClickOnce handles versioning and updates. When you specify a `minimumRequiredVersion`, the ClickOnce deployment will prevent the application from starting if the installed version is lower than this...
30,105
[ { "from": "human", "value": "We decided to use the minimumRequiredVersion in our clickOnce application manifest, and now when we try to rollback to a previous version when the user launches the application it fails to start. It says the application manifest has a earlier version than the required version an...
For a one-shot operation, i need to parse the contents of an XML string and change the numbers of the "ID" field. However, i can not risk changing anything else of the string, eg. whitespace, line feeds, etc. MUST remain as they are! Since i have made the experience that XmlReader tends to mess whitespace up and may e...
To achieve your goal of modifying the "ID" field in an XML string while preserving the original whitespace and formatting, you can use a regular expression with a simple replacement logic. Below is a C# code snippet that demonstrates how to do this: ```csharp using System; using System.Text.RegularExpressions; class ...
33,424
[ { "from": "human", "value": "For a one-shot operation, i need to parse the contents of an XML string and change the numbers of the \"ID\" field. However, i can not risk changing anything else of the string, eg. whitespace, line feeds, etc. MUST remain as they are! \nSince i have made the experience that Xml...
I'm building a web application that uses the Entity Framework. The files are located on a remote machine, the same is for the database and the web server. In visual studio (2k8sp1), the path to the project is: \\Server\Web\XXXX Now, I've generated the EF entities from the database, and later I've updated the database a...
The error message you're encountering indicates that the Entity Framework (EF) designer in Visual Studio is having trouble accessing the database to update the model due to the way paths are handled with network locations. Here are some steps you can take to resolve the issue and successfully update your EF model: ##...
30,802
[ { "from": "human", "value": "I'm building a web application that uses the Entity Framework. The files are located on a remote machine, the same is for the database and the web server.\nIn visual studio (2k8sp1), the path to the project is: \\\\Server\\Web\\XXXX\nNow, I've generated the EF entities from the ...
I am trying to compare two decimal values in Java script. I have two objects as one assogned value "3" and the other as "3.00". When i say if (obj1 == obj2) it does not pass the condition as it is does the string comparision. I would instead want it to do a decimal comparision where 3 = 3.00. Please let me know how t...
In JavaScript, when you use the `==` operator, it performs type coercion, meaning it tries to convert the operands to the same type before making the comparison. However, since you're dealing with numbers in string format, you'll want to convert those strings to numbers first for a proper comparison. To compare the tw...
33,628
[ { "from": "human", "value": "I am trying to compare two decimal values in Java script. I have two objects as one assogned value \"3\" and the other as \"3.00\". When i say if (obj1 == obj2) it does not pass the condition as it is does the string comparision. \nI would instead want it to do a decimal compar...
Is there an ascii value I can put into a char in C++, that represents nothing? I tried 0 but it ends up screwing up my file so I can't read it.
In C++, the ASCII value `0` corresponds to the null character (`'\0'`), which is used to signify the end of a string in C-style strings. Using `'\0'` in your file can indeed cause issues if your reading mechanism expects to read until the end of a string since it will stop reading at the null character. If you are loo...
33,986
[ { "from": "human", "value": "Is there an ascii value I can put into a char in C++, that represents nothing? I tried 0 but it ends up screwing up my file so I can't read it.\n" }, { "from": "gpt", "value": "In C++, the ASCII value `0` corresponds to the null character (`'\\0'`), which is used to...
In PL/SQL, I would like to pass in a "source" schema as a parameter to a stored procedure. For instance: BEGIN CURSOR my_cursor IS SELECT my_field FROM <schema>.my_table ... I want the 'schema' value to come from an input parameter into the stored procedure. Does anyone know how I could do that? P.S. Sorry...
No problem! It's a common scenario in PL/SQL to want to reference a schema dynamically based on input parameters. However, PL/SQL does not allow dynamic schema names directly in static SQL statements. Instead, you will need to use Dynamic SQL with the `EXECUTE IMMEDIATE` statement or a cursor that uses dynamic SQL. He...
33,528
[ { "from": "human", "value": "In PL/SQL, I would like to pass in a \"source\" schema as a parameter to a stored procedure. For instance:\nBEGIN\n CURSOR my_cursor IS\n SELECT my_field FROM <schema>.my_table\n...\n\nI want the 'schema' value to come from an input parameter into the stored procedure. ...
Which component is best to use for receiving HTTP requests in Delphi application?
In Delphi, the best component to use for receiving HTTP requests in a Delphi application is the **TIdHTTPServer** component from the Indy library (Internet Direct). Indy is a set of Internet components included with Delphi, and TIdHTTPServer is specifically designed for handling HTTP requests. ### Features of TIdHTTPS...
31,391
[ { "from": "human", "value": "Which component is best to use for receiving HTTP requests in Delphi application?\n" }, { "from": "gpt", "value": "In Delphi, the best component to use for receiving HTTP requests in a Delphi application is the **TIdHTTPServer** component from the Indy library (Inter...
I'm making a program that fits the wizard concept ideally; the user is walked through the steps to create a character for a game. However, I'm realizing that the limitations of the wizard are making it difficult to design "elegant" logic flow. For example, because all pages of the wizard are initalized at the same time...
When creating a dynamic interface in wxPython, such as changing the content of a panel based on user interactions, you're on the right track thinking about using a splitter or a notebook-style widget, rather than sticking strictly to a wizard. Here are a few approaches you can take: ### 1. Using `wx.Notebook` A `wx.N...
28,467
[ { "from": "human", "value": "I'm making a program that fits the wizard concept ideally; the user is walked through the steps to create a character for a game.\nHowever, I'm realizing that the limitations of the wizard are making it difficult to design \"elegant\" logic flow. For example, because all pages o...
In oracle, I want to create a delete sproc that returns an integer based on the outcome of the deletion. this is what i have so far. create or replace PROCEDURE Testing ( iKey IN VARCHAR2 ) AS BEGIN delete from MyTable WHERE TheKey = iKey; END Testing; i've tried putting a RETURNS INTEGER in but the sproc wo...
In Oracle PL/SQL, stored procedures do not have a return type like functions do. If you want to return a value, you should use an OUT parameter. Here’s how you can modify your procedure to return an integer based on the outcome of the deletion: 1. Use an OUT parameter to return the result. 2. Set the OUT parameter bas...
31,096
[ { "from": "human", "value": "In oracle, I want to create a delete sproc that returns an integer based on the outcome of the deletion.\nthis is what i have so far.\ncreate or replace\nPROCEDURE Testing\n( \niKey IN VARCHAR2\n)\n AS \n\nBEGIN\n delete from MyTable WHERE \n TheKey = iKey;\n\nEND Testing;\n\n...
I have a Table called Product and I have the Table StorageHistory. Now, Product contains a reference to StorageHistory in it's mappings <set name="StorageHistories" lazy="false"> <key column="ProductId" /> <one-to-many class="StorageHistory" /> </set> And it works, when I retrieve an object from the ORM I get an e...
When you define a collection mapping in an ORM (like NHibernate), you typically want to manage the lifecycle of the collections properly to avoid `NullReferenceExceptions`. In your case, the issue arises because the `StorageHistories` property is not initialized when you create a new `Product` instance. Here's how you ...
30,920
[ { "from": "human", "value": "I have a Table called Product and I have the Table StorageHistory.\nNow, Product contains a reference to StorageHistory in it's mappings\n<set name=\"StorageHistories\" lazy=\"false\">\n <key column=\"ProductId\" />\n <one-to-many class=\"StorageHistory\" />\n</set>\n\nAnd it ...
What does InitializeComponent() do, and how does it work in WPF? In general first, but I would especially be interested to know the gory details of order of construction, and what happens when there are Attached Properties.
`InitializeComponent()` is a method that plays a crucial role in the architecture of Windows Presentation Foundation (WPF) applications. It is automatically generated by the XAML compiler when you define your user interface in XAML. Here’s a more detailed look at what it does and how it operates within the WPF framewor...
27,898
[ { "from": "human", "value": "What does InitializeComponent() do, and how does it work in WPF?\nIn general first, but I would especially be interested to know the gory details of order of construction, and what happens when there are Attached Properties.\n" }, { "from": "gpt", "value": "`Initiali...
Is there a preference or behavior difference between using: if(obj.getClass().isArray()) {} and if(obj instanceof Object[]) {} ?
Yes, there are some differences in behavior between using `if (obj.getClass().isArray()) {}` and `if (obj instanceof Object[]) {}` in Java, particularly in how they check for array types. ### `if (obj.getClass().isArray()) {}` - **Usage**: This checks if the object `obj` is an array of any type, not just of `Object`....
32,682
[ { "from": "human", "value": "Is there a preference or behavior difference between using:\nif(obj.getClass().isArray()) {}\n\nand\nif(obj instanceof Object[]) {}\n\n?\n" }, { "from": "gpt", "value": "Yes, there are some differences in behavior between using `if (obj.getClass().isArray()) {}` and ...
I am using XmlReader in .NET to parse an XML file using a loop: while (xml.Read()) { switch xml.NodeType { case XmlNodeType.Element: //Do something case XmlNodeType.Text: //Do something case XmlNodeType.EndElement: //Do something } } I was wondering if it was normal that the fo...
In XML, self-closing elements (also known as empty elements) do not produce explicit `EndElement` nodes. This is perfectly normal behavior in XML parsing. The XML parser will treat a self-closing element (like `<date month="November" year="2001"/>`) as a single element node, and when it encounters that node, it will re...
28,780
[ { "from": "human", "value": "I am using XmlReader in .NET to parse an XML file using a loop:\nwhile (xml.Read()) {\n switch xml.NodeType {\n case XmlNodeType.Element:\n //Do something\n case XmlNodeType.Text:\n //Do something\n case XmlNodeType.EndElement: \n //Do something\n ...
We've converted our solution from .NET 2.0 to .NET 3.5. All projects converted just fine except for the Website Project, which still doesn't understand what I mean when using 'var' and the like. I've looked in the property pages for the web project, and the Target Framework is set to '.NET Framework 3.5'. Any other ide...
The issue you're experiencing with the Website Project not recognizing the `var` keyword in .NET 3.5 could be due to a few different reasons. Here are some steps to troubleshoot and potentially resolve the issue: 1. **Ensure Project is set to .NET Framework 3.5**: You've mentioned that the Target Framework is set to ....
31,918
[ { "from": "human", "value": "We've converted our solution from .NET 2.0 to .NET 3.5. All projects converted just fine except for the Website Project, which still doesn't understand what I mean when using 'var' and the like.\nI've looked in the property pages for the web project, and the Target Framework is ...
Does anyone know how I can retrieve the previous JSP URL that a page has come from within a JSP? Can I retrieve this from the session/ request/ response object? Hope this makes sense, Thank you
Yes, you can retrieve the previous JSP URL (or the referring page) in your JSP using the `HttpServletRequest` object. The `HttpServletRequest` provides a method called `getHeader()` that you can use to access the "Referer" header. This header usually contains the URL of the page that linked to the resource being reques...
32,773
[ { "from": "human", "value": "Does anyone know how I can retrieve the previous JSP URL that a page has come from within a JSP?\nCan I retrieve this from the session/ request/ response object?\nHope this makes sense, Thank you \n" }, { "from": "gpt", "value": "Yes, you can retrieve the previous JS...
Since DBs do not reuse numbers of deleted records it is possible to run out of numbers, especially if you pick not really a big integer type for this column. What would happen and how to prevent it if it's bad? // SQL Server, MySQL //
When using auto-incrementing columns (like primary keys) in SQL databases such as SQL Server and MySQL, there is indeed a potential risk of running out of unique identifiers if the data type chosen for the auto-increment column is too small or if the records are deleted frequently. Here’s an overview of what can happen...
27,562
[ { "from": "human", "value": "Since DBs do not reuse numbers of deleted records it is possible to run out of numbers, especially if you pick not really a big integer type for this column.\nWhat would happen and how to prevent it if it's bad?\n// SQL Server, MySQL //\n" }, { "from": "gpt", "value"...
The default GWT StackPanel is not enough good, i want to have functionality similar to outlook stack panel. May be there is already something exists?
If you're looking for a StackPanel in GWT (Google Web Toolkit) that resembles the functionality of the Outlook StackPanel, you might want to consider a few options: 1. **GWT Extensions**: There are various GWT libraries and extensions available that enhance the existing components. Look into libraries like **GWT-Ext**...
33,014
[ { "from": "human", "value": "The default GWT StackPanel is not enough good, i want to have functionality similar to outlook stack panel. May be there is already something exists?\n" }, { "from": "gpt", "value": "If you're looking for a StackPanel in GWT (Google Web Toolkit) that resembles the fu...
I have several .NET Windows Forms applications that I'm preparing to convert into a ClickOnce/smart-client deployment scenario. I've read the isn't-this-great tutorials, but are there pitfalls or "gotchas" that I should be aware of? There are several minor applications used off and on, but the main application is in C#...
Converting your .NET Windows Forms applications to a ClickOnce deployment can provide several benefits, including simplified updates and user experience. However, there are several potential pitfalls and "gotchas" that you should consider during this transition: ### 1. **Deployment Configuration** - **Application M...
21,075
[ { "from": "human", "value": "I have several .NET Windows Forms applications that I'm preparing to convert into a ClickOnce/smart-client deployment scenario. I've read the isn't-this-great tutorials, but are there pitfalls or \"gotchas\" that I should be aware of?\nThere are several minor applications used o...
I am trying to streamline a complex process of storing information in multiple tables and them linking them to a central table. The linking occurs using IDENTITY values generated in each table to provide the unique linking. I know I can use a combination of SET NOCOUNT ON and SELECT @@identity to get each identity, b...
To achieve the desired functionality using ODBC without relying on ADO's `NextRecordset()`, you can utilize the ODBC API functions to manage multiple result sets returned from a single statement execution. The key functions for this are: 1. `SQLExecDirect()` or `SQLExecute()` - to execute the SQL statement. 2. `SQLFet...
22,494
[ { "from": "human", "value": "I am trying to streamline a complex process of storing information in multiple tables and them linking them to a central table. The linking occurs using IDENTITY values generated in each table to provide the unique linking. I know I can use a combination of SET NOCOUNT ON and ...
When I try opening a file it tries to use "C:\Program Files\Common Files\Microsoft Shared\DevServer\9.0" as the base directory. How can I get the working directory of the web application?
To get the working directory of a web application in ASP.NET (including ASP.NET Core), you can use different approaches depending on the framework you are using. Here's how you can obtain the current working directory for both ASP.NET and ASP.NET Core: ### ASP.NET Framework If you are using classic ASP.NET, you can r...
33,655
[ { "from": "human", "value": "When I try opening a file it tries to use \"C:\\Program Files\\Common Files\\Microsoft Shared\\DevServer\\9.0\" as the base directory.\nHow can I get the working directory of the web application?\n" }, { "from": "gpt", "value": "To get the working directory of a web ...
I'm considering one of two IRepository interfaces, one that is a descendant of IQueryable and one that contains IQueryable. Like this: public interface IRepository<T> : IQueryable<T> { T Save(T entity); void Delete(T entity); } Or this: public interface IRepository<T> { T Save(T entity); void Delete(T...
Both designs you've presented have their pros and cons, particularly regarding usability and testability. Let's go through each approach and discuss the implications, as well as some suggestions on how you can achieve both LINQ support and mockability. ### First Approach: `IQueryable` Inheritance ```csharp public inte...
29,536
[ { "from": "human", "value": "I'm considering one of two IRepository interfaces, one that is a descendant of IQueryable and one that contains IQueryable. \nLike this:\npublic interface IRepository<T> : IQueryable<T>\n{\n T Save(T entity);\n void Delete(T entity);\n}\n\nOr this:\npublic interface IRepos...
One of the files in my current head revision got corrupted. I want to make an older revision of that file the head revision as usually people sync to head revsion in my project. How to do that?
To make an older revision of a file the current head revision in your project, you generally have to follow these steps, assuming you're using a version control system like Git, SVN, or similar. Here's how you can do it for some common systems: ### If You Are Using Git 1. **Identify the Old Revision**: First, find th...
32,131
[ { "from": "human", "value": "One of the files in my current head revision got corrupted. I want to make an older revision of that file the head revision as usually people sync to head revsion in my project. How to do that?\n" }, { "from": "gpt", "value": "To make an older revision of a file the ...
What would be the best scheme for loading icons for an application? A little bit of a background... I’m creating an FTP-like application that has 4 panes (local folder pane, local file pane, cloud folder pane, cloud file pane). In both file panes, one of the columns is filename, which I want to display the icon next ...
Hi Jessy, It sounds like you're building a complex and interesting application. The approach you take to load icons will depend on several factors, including performance, memory usage, maintainability, and how dynamic you want your icon loading process to be. Let's break down each option you presented: 1. **Load all ...
30,657
[ { "from": "human", "value": "What would be the best scheme for loading icons for an application?\nA little bit of a background... I’m creating an FTP-like application that has 4 panes (local folder pane, local file pane, cloud folder pane, cloud file pane). In both file panes, one of the columns is filena...
In my spring application context file, I have something like: <util:map id="someMap" map-class="java.util.HashMap" key-type="java.lang.String" value-type="java.lang.String"> <entry key="some_key" value="some value" /> <entry key="some_key_2" value="some value" /> </util:map> In java class, the implementatio...
The warning you are encountering in Eclipse, "Type safety: Unchecked cast from Object to HashMap<String, String>", arises because you are using raw types and type erasure in Java's generics system. Here's a breakdown of what's happening and how to resolve it: ### Why the Warning Occurs: 1. **Raw Types**: The type `Map...
31,192
[ { "from": "human", "value": "In my spring application context file, I have something like:\n<util:map id=\"someMap\" map-class=\"java.util.HashMap\" key-type=\"java.lang.String\" value-type=\"java.lang.String\">\n <entry key=\"some_key\" value=\"some value\" />\n <entry key=\"some_key_2\" value=\"some...
I am using a bat file on a Windows 2000 SP4 server to copy database files while the database is shut down. Once the bat file hits the xcopy command, it does the copy, but never returns to the bat file to continue with the other commands (start up the database, etc). I should mention that the xcopy takes several hours...
In a batch file on Windows, commands will generally execute sequentially, meaning that the script will not move on to the next command until the current command has completed. This behavior is normal, and there are no specific timeout limits imposed on batch files themselves. If you are using the `xcopy` command, it wi...
33,516
[ { "from": "human", "value": "I am using a bat file on a Windows 2000 SP4 server to copy database files while the database is shut down. Once the bat file hits the xcopy command, it does the copy, but never returns to the bat file to continue with the other commands (start up the database, etc). I should m...
I want to use LabVIEW's Call Library Function Node to access a DLL function, and have this function return a string to displayed on my VI. How would I go about doing this? I am quite happy returning numbers from my DLL, but am really struggling to find any examples of how to return a string.
To use LabVIEW's Call Library Function Node to access a DLL function and have it return a string, you need to follow specific steps to ensure that the string is correctly passed between LabVIEW and the DLL. Here’s a step-by-step guide on how to do this: ### Step 1: Define the DLL Function Make sure that your DLL func...
28,762
[ { "from": "human", "value": "I want to use LabVIEW's Call Library Function Node to access a DLL function, and have this function return a string to displayed on my VI. How would I go about doing this? I am quite happy returning numbers from my DLL, but am really struggling to find any examples of how to ret...
What is the best way to avoid SQL injection on MSSQL Server from C# code using Linq? Should you use a function to strip of security issues or is it handled by the framework?
To avoid SQL injection in an application using C# and LINQ (specifically LINQ to SQL or Entity Framework), it's essential to rely on the framework's built-in features, which inherently manage many aspects of security. Here are the best practices to prevent SQL injection when working with MSSQL Server: ### 1. Use Param...
31,121
[ { "from": "human", "value": "What is the best way to avoid SQL injection on MSSQL Server from C# code using Linq?\nShould you use a function to strip of security issues or is it handled by the framework?\n" }, { "from": "gpt", "value": "To avoid SQL injection in an application using C# and LINQ ...
I have 15 stored procedures that return data from a common table and then join that table with a specific table to retrieve inventory. Example: Common: tblCommon Specific: tblSpecific Is there way I can pass the name "tblSpecific" into a single stored procedure as a variable, like the following? SELECT .... FROM tblCo...
In SQL Server, you cannot directly use a variable for table names in a static SQL query. However, you can achieve this by using dynamic SQL. This involves constructing a SQL statement as a string and then executing that string with `sp_executesql` or `EXEC`. Here's an example of how you might implement this in a store...
34,558
[ { "from": "human", "value": "I have 15 stored procedures that return data from a common table and then join that table with a specific table to retrieve inventory.\nExample:\nCommon: tblCommon\nSpecific: tblSpecific\n\nIs there way I can pass the name \"tblSpecific\" into a single stored procedure as a vari...
Despite an earlier question (asked here), our project is constrained to using glDrawPixels, so we have to do some hackery. One of the feature requirements is to be able to have a magnified view show up on a clicked region of an image; so, looking at an image, I want to click the mouse, and have a 200% image window show...
It sounds like you're dealing with a common issue when handling image data in OpenGL, particularly regarding the color mapping and pixel transfer settings. The fact that you're using `glDrawPixels` and have specific constraints in your project adds some complexity, but let's see how you can work around the clamping iss...
29,883
[ { "from": "human", "value": "Despite an earlier question (asked here), our project is constrained to using glDrawPixels, so we have to do some hackery.\nOne of the feature requirements is to be able to have a magnified view show up on a clicked region of an image; so, looking at an image, I want to click th...
I'm thinking of an application that would try to prove the "Six degrees of separation" theory with a set of users that are part of a social network. I would have those elements: A couple of users for which I'd like to prove the six degrees theory For each user, I know the list of friends in the social network Which i...
To prove the "Six Degrees of Separation" theory using a social network of users and their friendships, you can effectively use **Breadth-First Search (BFS)**. BFS is particularly suited for this task as it explores all neighbors at the present depth prior to moving on to nodes at the next depth level, making it ideal f...
32,593
[ { "from": "human", "value": "I'm thinking of an application that would try to prove the \"Six degrees of separation\" theory with a set of users that are part of a social network.\nI would have those elements:\n\nA couple of users for which I'd like to prove the six degrees theory\nFor each user, I know the...
I need to be able to send compact messages (ideally small enough to fit into a single UDP packet) from Java. It needs to be as efficient as possible - can anyone give me any pointers (other than constructing them manually)?
If you need to send compact messages efficiently in Java, especially fitting them within a single UDP packet, there are a few libraries and techniques you can consider that help with serialization and message size optimization. Here are some options: ### 1. Protocol Buffers [Protocol Buffers (Protobuf)](https://develo...
28,437
[ { "from": "human", "value": "I need to be able to send compact messages (ideally small enough to fit into a single UDP packet) from Java. It needs to be as efficient as possible - can anyone give me any pointers (other than constructing them manually)?\n" }, { "from": "gpt", "value": "If you ne...
I'm trying to foresee how big my database will be. Let's say I have only one table: CREATE TABLE user ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, email VARCHAR(50), pass CHAR(40), url VARCHAR(1000), PRIMARY KEY(id)); Adding all up: 4 + 51 + 40 + 1001 = 1096 bytes in one record. If I have 1 million records: 1,000,000 ...
Your estimation is on the right track, but let's refine the calculation a bit and clarify a few points. ### Size of Each Field 1. **id (INT UNSIGNED)**: Typically takes 4 bytes. 2. **email (VARCHAR(50))**: In MySQL, a VARCHAR uses 1 or 2 additional bytes for the length prefix (1 byte if the length is less than 255 ch...
32,347
[ { "from": "human", "value": "I'm trying to foresee how big my database will be. Let's say I have only one table: \nCREATE TABLE user (\nid INT UNSIGNED NOT NULL AUTO_INCREMENT,\nemail VARCHAR(50),\npass CHAR(40),\nurl VARCHAR(1000),\nPRIMARY KEY(id));\nAdding all up: 4 + 51 + 40 + 1001 = 1096 bytes in one...
I am using a DBGrid component in Delphi. I wonder how I can set the format of a column. I have real values that I want to be displayed as currency in the grid. Someone knows how?
To format a column in a `DBGrid` component in Delphi to display real values as currency, you can use the `OnGetText` event of the relevant field. Here's how to do it step by step: 1. **Add a DBGrid to your form**: Make sure you have a `DBGrid` component on your form and it is connected to a dataset (like `TTable`, `TQ...
33,851
[ { "from": "human", "value": "I am using a DBGrid component in Delphi. I wonder how I can set the format of a column. I have real values that I want to be displayed as currency in the grid. \nSomeone knows how?\n" }, { "from": "gpt", "value": "To format a column in a `DBGrid` component in Delph...