instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I am attempting to save an rtf file using FileDialog and would like to filter using a where clause. This is what I have: Set dlgSave = FileDialog(msoFileDialogSaveAs) With dlgSave .Title = "Provide the place to save this file" .ButtonName = "Save As..." .InitialFileName = Me.cmbPickAReportToPrint.Value & "-" & Fo...
In Microsoft Access, when you want to add a `WHERE` clause to a report output using `DoCmd.OutputTo`, you cannot do this directly in the `OutputTo` method, because it does not accept a `WHERE` clause parameter. However, you can achieve this by setting the report's `RecordSource` or `Filter` property before exporting it...
19,834
[ { "from": "human", "value": "I am attempting to save an rtf file using FileDialog and would like to filter using a where clause. This is what I have:\nSet dlgSave = FileDialog(msoFileDialogSaveAs)\nWith dlgSave\n .Title = \"Provide the place to save this file\"\n .ButtonName = \"Save As...\"\n .InitialFi...
We're working with a fixed transaction log size on our databases, and I'd like to put together an application to monitor the log sizes so we can see when things are getting too tight and we need to grow the fixed trn log. Is there any TSQL command that I can run which will tell me the current size of the transaction l...
Yes, you can use a combination of system views and dynamic management views in SQL Server to monitor the size of the transaction log and its fixed limit. Below are some T-SQL commands that you can run to get the current size of the transaction log and its maximum size. ### 1. Current Size of the Transaction Log To ge...
20,713
[ { "from": "human", "value": "We're working with a fixed transaction log size on our databases, and I'd like to put together an application to monitor the log sizes so we can see when things are getting too tight and we need to grow the fixed trn log. \nIs there any TSQL command that I can run which will tel...
What GNU/Linux command-line tool would I use for performing a search and replace on a file? Can the search text, and replacement, be specified in a regex format?
You can use the `sed` command-line tool to perform search and replace operations on a file in GNU/Linux. `sed` stands for Stream Editor, and it is widely used for text manipulation tasks. Yes, `sed` supports regular expressions (regex), so you can specify the search text and replacement in regex format. Here’s a basi...
22,069
[ { "from": "human", "value": "What GNU/Linux command-line tool would I use for performing a search and replace on a file? \nCan the search text, and replacement, be specified in a regex format?\n" }, { "from": "gpt", "value": "You can use the `sed` command-line tool to perform search and replace ...
Has anybody here succeeded in running Eclipse under Valgrind? I'm battling a particularly hairy crash involving JNI code, and was hoping that Valgrind perhaps could (again) prove its excellence, but when I run Eclipse under Valgrind, the JVM terminates with an error message about not being able to create the initial ob...
Running Eclipse under Valgrind can be tricky, especially since it involves running a Java Virtual Machine (JVM), which may not handle Valgrind well. Here are some steps and tips that might help you to successfully run Eclipse with Valgrind and diagnose your JNI issues: 1. **Use the Correct Flags**: When running Java a...
17,708
[ { "from": "human", "value": "Has anybody here succeeded in running Eclipse under Valgrind? I'm battling a particularly hairy crash involving JNI code, and was hoping that Valgrind perhaps could (again) prove its excellence, but when I run Eclipse under Valgrind, the JVM terminates with an error message abou...
We're building an app that stores "hours of operation" for various businesses. What is the easiest way to represent this data so you can easily check if an item is open? Some options: Segment out blocks (every 15 minutes) that you can mark "open/closed". Checking involves seeing if the "open" bit is set for the desire...
When designing a system to store and query hours of operation for businesses, there are various approaches to consider. Both of the options you've mentioned have their pros and cons, but let's take a deeper look at each approach and discuss some additional considerations. ### Option 1: Segmented Blocks (Every 15 Minut...
16,701
[ { "from": "human", "value": "We're building an app that stores \"hours of operation\" for various businesses. What is the easiest way to represent this data so you can easily check if an item is open?\nSome options:\n\nSegment out blocks (every 15 minutes) that you can mark \"open/closed\". Checking involve...
I have 7-8 xml files. Each one is approximately 50 MB in size. What is the best way to merge files programmatically in C# without getting System.OutOfMemory Exception? So far I have tried reading each file in a StringBuilder and than putting it in an array of string builder but I still get system.outofmemoery exceptio...
Merging large XML files in C# without running into memory issues requires a different approach than loading the entire file contents into memory. Instead of using `StringBuilder`, you can read and write the files in smaller chunks, utilizing streaming. This allows you to process the files piece by piece without consumi...
17,238
[ { "from": "human", "value": "I have 7-8 xml files. Each one is approximately 50 MB in size. What is the best way to merge files programmatically in C# without getting System.OutOfMemory Exception? So far I have tried reading each file in a StringBuilder and than putting it in an array of string builder but...
I'm trying to wrap my head around asp.net. I have a background as a long time php developer, but I'm now facing the task of learning asp.net and I'm having some trouble with it. It might very well be because I'm trying to force the framework into something it is not intended for - so I'd like to learn how to do it "the...
Welcome to the world of ASP.NET! It can indeed feel quite different from PHP, especially when it comes to the lifecycle of pages and controls. Your instincts about adding controls in the `Page_Init` event are correct, but you also need to consider the ASP.NET page lifecycle as a whole. Let me walk you through how to dy...
16,486
[ { "from": "human", "value": "I'm trying to wrap my head around asp.net. I have a background as a long time php developer, but I'm now facing the task of learning asp.net and I'm having some trouble with it. It might very well be because I'm trying to force the framework into something it is not intended for...
When you limit the number of rows to be returned by a SQL query, usually used in paging, there are two methods to determine the total number of records: Method 1 Include the SQL_CALC_FOUND_ROWS option in the original SELECT, and then get the total number of rows by running SELECT FOUND_ROWS(): SELECT SQL_CALC_FOUND_ROW...
The performance of the two methods for determining the total number of records in a dataset largely depends on various factors including the database system, the nature of the query, the size of the dataset, and whether indexing is employed. Here's a breakdown of both methods: ### Method 1: Using `SQL_CALC_FOUND_ROWS`...
21,184
[ { "from": "human", "value": "When you limit the number of rows to be returned by a SQL query, usually used in paging, there are two methods to determine the total number of records:\nMethod 1\nInclude the SQL_CALC_FOUND_ROWS option in the original SELECT, and then get the total number of rows by running SEL...
I want to log to the console when I'm using un-minimized JavaScript files. Comments are taken out already when I minimize JavaScript. I'm wondering if there's a way I can write a command that isn't commented out but will still be taken out when I minimize the JavaScript file.
In JavaScript, comments are stripped out during minification, which can indeed create a challenge if you want to log messages during development without them being included in the minified version. However, there are a few strategies you can use to achieve this: ### Strategy 1: Conditional Logging with a Build Tool I...
18,499
[ { "from": "human", "value": "I want to log to the console when I'm using un-minimized JavaScript files.\nComments are taken out already when I minimize JavaScript. I'm wondering if there's a way I can write a command that isn't commented out but will still be taken out when I minimize the JavaScript file. \...
When I run the following, PowerShell hangs waiting for the dialog to close, even though the dialog is never displayed: [void] [Reflection.Assembly]::LoadWithPartialName( 'System.Windows.Forms' ) $d = New-Object Windows.Forms.OpenFileDialog $d.ShowDialog( ) Calling ShowDialog on a Windows.Forms.Form works fine. I also ...
The issue you're facing with `OpenFileDialog` hanging in PowerShell can occur if the dialog does not get displayed properly, especially in the context of certain environments where a UI context isn't available or where the script doesn't have the necessary permissions or settings to show the dialog. Here are a few way...
21,749
[ { "from": "human", "value": "When I run the following, PowerShell hangs waiting for the dialog to close, even though the dialog is never displayed:\n[void] [Reflection.Assembly]::LoadWithPartialName( 'System.Windows.Forms' )\n$d = New-Object Windows.Forms.OpenFileDialog\n$d.ShowDialog( )\n\nCalling ShowDial...
If I have a series of points as longitude and latitude, how would I calculate the center of all of those points?
To calculate the center of a series of geographic points defined by their longitude and latitude, you can follow these steps: 1. **Convert Latitude and Longitude to Cartesian Coordinates**: The first step is to convert the geographic coordinates from degrees to Cartesian coordinates (x, y, z). This can be done using t...
17,162
[ { "from": "human", "value": "If I have a series of points as longitude and latitude, how would I calculate the center of all of those points?\n" }, { "from": "gpt", "value": "To calculate the center of a series of geographic points defined by their longitude and latitude, you can follow these st...
We have a two-screen DirectX application that previously ran at a consistent 60 FPS (the monitors' sync rate) using a NVIDIA 8400GS (256MB). However, when we swapped out the card for one with 512 MB of RAM the frame rate struggles to get above 40 FPS. (It only gets this high because we're using triple-buffering.) The t...
Your situation with the performance drop after upgrading your graphics card could be caused by several factors, especially given that you’re working with two different models of GPUs. Here are a few avenues to explore to diagnose and potentially fix the issue: 1. **Driver Differences**: Even though both cards are from...
17,294
[ { "from": "human", "value": "We have a two-screen DirectX application that previously ran at a consistent 60 FPS (the monitors' sync rate) using a NVIDIA 8400GS (256MB). However, when we swapped out the card for one with 512 MB of RAM the frame rate struggles to get above 40 FPS. (It only gets this high bec...
I have a custom application that was built to send opt-in newsletters and marketing emails. It does a pretty good job sending mail, but it doesn't respond at all to bounces or unsubscribe requests. It seems to me that rather than building that functionality myself I should use a mailing list manager such as LISTSERV. H...
LISTSERV is a well-established mailing list management tool with a lot of features, but it may not offer the level of integration flexibility you require. While LISTSERV does have some APIs, it might not be as straightforward to integrate with your existing application and database as you would like. ### Consideration...
19,926
[ { "from": "human", "value": "I have a custom application that was built to send opt-in newsletters and marketing emails. It does a pretty good job sending mail, but it doesn't respond at all to bounces or unsubscribe requests. It seems to me that rather than building that functionality myself I should use a...
If I want to check for the null string I would do [ -z $mystr ] but what if I want to check whether the variable has been defined at all? Or is there no distinction in Bash scripting?
In Bash, there's a distinction between checking if a variable is defined (i.e., whether it has been set at all) and checking if it is an empty string. To check if a variable has been defined (i.e., it exists), you can use the `-v` option in a conditional statement. Here’s how you can do it: ```bash if [ -v mystr ]; t...
22,422
[ { "from": "human", "value": "If I want to check for the null string I would do\n[ -z $mystr ]\n\nbut what if I want to check whether the variable has been defined at all? Or is there no distinction in Bash scripting?\n" }, { "from": "gpt", "value": "In Bash, there's a distinction between checkin...
I would like to set up a web application with good modularity and would like to use an AJAX Toolkit/Framework like GWT or ZK for its VIEW. Component information should be load from various modules-JAR. Which AJAX Toolkit/Framework is able to do this?
When considering an AJAX Toolkit/Framework for building a modular web application with a focus on good separation of concerns, both GWT (Google Web Toolkit) and ZK Framework are strong contenders. However, they have different approaches and strengths. ### GWT (Google Web Toolkit) 1. **Modularity**: GWT allows for mod...
20,867
[ { "from": "human", "value": "I would like to set up a web application with good modularity and would like to use an AJAX Toolkit/Framework like GWT or ZK for its VIEW. Component information should be load from various modules-JAR. \nWhich AJAX Toolkit/Framework is able to do this?\n" }, { "from": "g...
I have an error handling method in my ApplicationController: rescue_from ActiveRecord::RecordNotFound, :with => :not_found def not_found(exception) @exception = exception render :template => '/errors/not_found', :status => 404 end In RAILS_ROOT/app/views/errors/not_found.html.erb, I have this: <h1>Error 404: Not ...
In Rails, when you render a template within a controller action, the instance variables that are defined in that action are accessible in the view. However, in your case, when the `not_found` method is called through the `rescue_from` mechanism, it does not behave like a regular controller action. Therefore, the instan...
21,857
[ { "from": "human", "value": "I have an error handling method in my ApplicationController:\nrescue_from ActiveRecord::RecordNotFound, :with => :not_found\n\ndef not_found(exception)\n @exception = exception\n render :template => '/errors/not_found', :status => 404\nend\n\nIn RAILS_ROOT/app/views/errors/not...
I installed subclipse in eclipse, but I get an error message "Expected format '3' of repository; found format '5'" when I try to open a repository. Here is the sequence of steps that leads to the error message. Select "Window -> Open Perspective -> SNV Repository Exploring" from the Eclipse main menu. Right click on th...
The error message you're encountering indicates a version compatibility issue between your Subversion repository and the version that your Subclipse plugin in Eclipse supports. Specifically, your repository is using format '5', while Subclipse is expecting format '3'. This typically occurs when the Subversion repositor...
13,673
[ { "from": "human", "value": "I installed subclipse in eclipse, but I get an error message \"Expected format '3' of repository; found format '5'\" when I try to open a repository.\nHere is the sequence of steps that leads to the error message.\nSelect \"Window -> Open Perspective -> SNV Repository Exploring\...
I am trying to remotely run a DTSX package from a bat file with this command: DTEXEC /DTS "\File System\MY_PACKAGE_NAME" /SERVER MY_SERVER_NAME /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING V This is working fine locally but failing remotely (I do have admin rights on the machine I am pointing to and I have SQL...
When attempting to run a DTSX package remotely using DTEXEC and encountering a "Login timeout expired" error, there are several areas to investigate. Here are some troubleshooting steps and considerations that might help resolve the issue: ### 1. Verify SQL Server Instance Name Make sure that the `MY_SERVER_NAME` in y...
19,202
[ { "from": "human", "value": "I am trying to remotely run a DTSX package from a bat file with this command:\nDTEXEC /DTS \"\\File System\\MY_PACKAGE_NAME\" /SERVER MY_SERVER_NAME /MAXCONCURRENT \" -1 \" /CHECKPOINTING OFF /REPORTING V\n\nThis is working fine locally but failing remotely (I do have admin rig...
I'm wondering if there is a website that collects (and hopefully updates) information on available web services. Edit: Thanks for all the info; many good answers. I can only accept 1 as the "accepted answer" at this time, so I picked my favorite one.
There are several websites that collect and provide information on various web services, often categorized by their functionality. Here are a few notable ones: 1. **Product Hunt**: This site features new and trending tech products, including web services, and allows users to discover and discuss them. 2. **Alternativ...
23,773
[ { "from": "human", "value": "I'm wondering if there is a website that collects (and hopefully updates) information on available web services. \nEdit: Thanks for all the info; many good answers. I can only accept 1 as the \"accepted answer\" at this time, so I picked my favorite one.\n" }, { "from": ...
Using ASP.NET 2.0, I have a web app where I am trying to use JavaScript to make one tab in a tab-container the active tab. The recommendations have been based on: var mX=document.getElementById('<%= tc1.ClientID%>') $find('<%= tc1.ClientID%>').set_activeTabIndex(1); Which both produce the error: The Controls collect...
The error message you are encountering, "The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)," typically arises when you are trying to access a control's ID or manipulate it in a way that ASP.NET does not allow due to the presence of inline code blocks (like `<% %>`). I...
16,914
[ { "from": "human", "value": "Using ASP.NET 2.0, I have a web app where I am trying to use JavaScript to make one tab in a tab-container the active tab.\nThe recommendations have been based on:\nvar mX=document.getElementById('<%= tc1.ClientID%>')\n\n$find('<%= tc1.ClientID%>').set_activeTabIndex(1); \n\nWhi...
On our web application, the search results are displayed in sortable tables. The user can click on any column and sort the result. The problem is some times, the user does a broad search and gets a lot of data returned. To make the sortable part work, you probably need all the results, which takes a long time. Or I...
When dealing with sortable tables that return a large number of results, especially in scenarios where network latency is a concern, it's essential to strike a balance between performance and usability. Here are some best practices to consider: 1. **Server-side Pagination**: Instead of loading all results at once, imp...
19,302
[ { "from": "human", "value": "On our web application, the search results are displayed in sortable tables. The user can click on any column and sort the result. The problem is some times, the user does a broad search and gets a lot of data returned. To make the sortable part work, you probably need all th...
I have this code inside a class: void SendStones() { int currenthole = hole; int lastplace = 0; for(int i=0;i<stns.size();i++) { while(1) {//Calculate new currenthole if(currenthole == 13) { currenthole = 7; break;} if(currenthole == 14) { currenthole = 6; break;}...
The error message you're encountering, "invalid types `int[int]' for array subscript," suggests that you're trying to use the `hole` variable as an array or vector, but it's declared as an `int`. In C++, when you use the subscript operator `[]`, the type on the left-hand side must be an array or a container that suppor...
18,813
[ { "from": "human", "value": "I have this code inside a class:\nvoid SendStones()\n{\n int currenthole = hole;\n int lastplace = 0;\n for(int i=0;i<stns.size();i++)\n {\n while(1)\n {//Calculate new currenthole\n if(currenthole == 13) { currenthole = 7; break;}\n ...
As someone who is just starting to learn the intricacies of computer debugging, for the life of me, I can't understand how to read the Stack Text of a dump in Windbg. I've no idea of where to start on how to interpret them or how to go about it. Can anyone offer direction to this poor soul? ie (the only dump I have on ...
Debugging with WinDbg can certainly be challenging, especially when trying to interpret stack traces. Let's break down what you're seeing in the dump and how to interpret the stack entries you've provided. ### Understanding Stack Frames 1. **Stack Addresses**: The first column (`b69dd8f0`, `b69dd8f4`, etc.) represent...
18,330
[ { "from": "human", "value": "As someone who is just starting to learn the intricacies of computer debugging, for the life of me, I can't understand how to read the Stack Text of a dump in Windbg. I've no idea of where to start on how to interpret them or how to go about it. Can anyone offer direction to thi...
A lot of programming languages and frameworks do/allow/require something that I can't seem to find the name for, even though there probably is one in computer science. What they basically do is bind to a variable/object/class/function by name. Flex example ("selectAll()"): <mx:Button click="selectAll()" label="Select ...
The phenomena you're describing involve several concepts in programming that pertain to dynamic behavior and runtime resolution of names. Here are the main terms and concepts associated with them: 1. **Dynamic Binding (or Late Binding)**: This refers to the process where a method or property to be called is determined...
20,931
[ { "from": "human", "value": "A lot of programming languages and frameworks do/allow/require something that I can't seem to find the name for, even though there probably is one in computer science. What they basically do is bind to a variable/object/class/function by name. \nFlex example (\"selectAll()\"):\n...
How do I download all files in a directory and all subdirectories on an HTTP server?
To download all files in a directory and its subdirectories on an HTTP server, you can use several tools and methods. Below are a few approaches: ### 1. Using `wget` `wget` is a command-line utility for downloading files from the web. You can use it to recursively download all files from a specific directory. Here’s...
16,099
[ { "from": "human", "value": "How do I download all files in a directory and all subdirectories on an HTTP server?\n" }, { "from": "gpt", "value": "To download all files in a directory and its subdirectories on an HTTP server, you can use several tools and methods. Below are a few approaches:\n\n...
Is there a clean way of cloning a record in SQL that has an index(auto increment). I want to clone all the fields except the index. I currently have to enumerate every field, and use that in an insert select, and I would rather not explicitly list all of the fields, as they may change over time.
Cloning a record in SQL while avoiding the explicit enumeration of fields can indeed be a bit tricky, especially when dealing with auto-increment fields. However, depending on your SQL database system, there are some techniques you can use to simplify this process. ### General Approach The general approach would invo...
19,771
[ { "from": "human", "value": "Is there a clean way of cloning a record in SQL that has an index(auto increment). I want to clone all the fields except the index. I currently have to enumerate every field, and use that in an insert select, and I would rather not explicitly list all of the fields, as they ma...
We are developing automated regression tests using VMWare and NUnit. We have divided tests into steps and now I would like to see each step be examined for performance regression. Simply timing the tests, as NUnit does, does not seem reliable. I have figured in a acceptance factor of about 15% but our steps can differ ...
When developing automated regression tests, especially in a resource-dependent environment like VMWare, it's crucial to have a robust approach to measuring performance to ensure that you're catching meaningful regressions without being misled by noise in the data. Here are several strategies that may help you improve t...
16,012
[ { "from": "human", "value": "We are developing automated regression tests using VMWare and NUnit. We have divided tests into steps and now I would like to see each step be examined for performance regression. Simply timing the tests, as NUnit does, does not seem reliable. I have figured in a acceptance fact...
I have written an Excel VBA macro which imports data from a HTML file (stored locally) before performing calculations on the data. At the moment the HTML file is referred to with an absolute path: Workbooks.Open FileName:="C:\Documents and Settings\Senior Caterer\My Documents\Endurance Calculation\TRICATEndurance Summa...
To open a file with a relative path in Excel VBA when both your Excel workbook and the HTML file are in the same folder, you can use the `ThisWorkbook.Path` property. This property returns the path of the folder where the workbook is located. By appending the name of the HTML file to this path, you can create a relativ...
21,403
[ { "from": "human", "value": "I have written an Excel VBA macro which imports data from a HTML file (stored locally) before performing calculations on the data.\nAt the moment the HTML file is referred to with an absolute path:\nWorkbooks.Open FileName:=\"C:\\Documents and Settings\\Senior Caterer\\My Docume...
What is the best way to design an interface so that very long drop down values that get trucated due to size limits do not create a very bad user experience. My question is for web applications. Could you please send your suggestions. Thanks.
Designing an interface that handles very long dropdown values while maintaining a good user experience can be challenging. Here are some suggestions to consider when designing dropdown menus for web applications: ### 1. **Use a Searchable Dropdown (Typeahead)** - Implement an autocomplete or typeahead functionality...
20,192
[ { "from": "human", "value": "What is the best way to design an interface so that very long drop down values that get trucated due to size limits do not create a very bad user experience. My question is for web applications.\nCould you please send your suggestions.\nThanks.\n" }, { "from": "gpt", ...
I have a Java application that monitors a folder for incoming XML files. When a new file is detected I need to test the file that it is not currently being updated and is closed. My thought is to use File.canWrite() to test this. Is there any issue with doing this? Is this a good way to test that a file has been co...
Using `File.canWrite()` to check if a file is currently being updated is not a reliable approach. The method checks whether the file can be written to by the current process; it does not necessarily indicate whether another process is currently writing to the file. This means that the file may still be in the process o...
16,746
[ { "from": "human", "value": "I have a Java application that monitors a folder for incoming XML files. When a new file is detected I need to test the file that it is not currently being updated and is closed. My thought is to use File.canWrite() to test this. Is there any issue with doing this? Is this a...
In tcsh, I have the following script working: #!/bin/tcsh setenv X_ROOT /some/specified/path setenv XDB ${X_ROOT}/db setenv PATH ${X_ROOT}/bin:${PATH} xrun -d xdb1 -i $1 > $2 What is the equivalent to the tcsh setenv function in Bash? Is there a direct analog? The environment variables are for locating the exe...
In Bash, the equivalent of the `setenv` command in `tcsh` is to use the `export` command to set environment variables. Here's how you can convert your `tcsh` script to a `bash` script: ```bash #!/bin/bash export X_ROOT=/some/specified/path export XDB=${X_ROOT}/db export PATH=${X_ROOT}/bin:${PATH} xrun -d xdb1 -i "$1...
24,021
[ { "from": "human", "value": "In tcsh, I have the following script working:\n#!/bin/tcsh\nsetenv X_ROOT /some/specified/path\n\nsetenv XDB ${X_ROOT}/db\nsetenv PATH ${X_ROOT}/bin:${PATH}\n\nxrun -d xdb1 -i $1 > $2\n\nWhat is the equivalent to the tcsh setenv function in Bash? \nIs there a direct analog?...
I know how to draw basic objects using JOGL or LWJGL to connect to OpenGL. What I would like is something that can generate some kind of geometry for trees, similar to what SpeedTree is famous for. Obviously I don't expect the same quality as SpeedTree. I want the trees to not look repetitive. Speed is not a concern, I...
Creating procedural trees can be a fascinating project, and while there are no direct counterparts to SpeedTree in Java, there are several libraries and techniques you can explore for generating trees that don’t look repetitive. ### Java Libraries: 1. **Java 3D**: - Java 3D is a high-level API that can be used to...
15,211
[ { "from": "human", "value": "I know how to draw basic objects using JOGL or LWJGL to connect to OpenGL. What I would like is something that can generate some kind of geometry for trees, similar to what SpeedTree is famous for. Obviously I don't expect the same quality as SpeedTree.\nI want the trees to not ...
I am developing a C++ domain model class library which should provide some facilities or a framework (i.e. interface classes etc) for writing/reading class instance data to/from both a binary file and a RDBMS. The basis for this library is an application that uses a RDBMS, and there are several methods which instantiat...
The Data Access Object (DAO) pattern is a great choice for your use case, as it allows you to separate the persistence logic from your domain model, thus keeping your domain classes clean and focused solely on business logic. Here are responses to your questions and some general guidance for implementing the DAO patter...
20,251
[ { "from": "human", "value": "I am developing a C++ domain model class library which should provide some facilities or a framework (i.e. interface classes etc) for writing/reading class instance data to/from both a binary file and a RDBMS. The basis for this library is an application that uses a RDBMS, and t...
I need my code to do different things based on the operating system on which it gets compiled. I'm looking for something like this: #ifdef OSisWindows // do Windows-specific stuff #else // do Unix-specific stuff #endif Is there a way to do this? Is there a better way to do the same thing?
Yes, you can use preprocessor directives in C or C++ to conditionally compile code based on the operating system. The preprocessor defines certain macros for different platforms that you can use to check which OS you are compiling on. Here are some common predefined macros: - For Windows, you can use `_WIN32` or `_WIN...
19,336
[ { "from": "human", "value": "I need my code to do different things based on the operating system on which it gets compiled. I'm looking for something like this:\n#ifdef OSisWindows\n// do Windows-specific stuff\n#else\n// do Unix-specific stuff\n#endif\n\nIs there a way to do this? Is there a better way to ...
Has anyone seen a tool that will integrate code coverage results with SCM/VCS to attribute untested lines of code to developers? For example, is there a tool that will take NCover's Coverage.Xml, combine it with SVN blame, and produce a report that tells me things like developer who commits most untested code?
Yes, there are tools and approaches available that can help you integrate code coverage results with source control management (SCM) systems like SVN or Git, enabling you to attribute untested lines of code to specific developers. Here's a general overview of how you might achieve this: ### 1. **Combine Coverage Resul...
20,969
[ { "from": "human", "value": "Has anyone seen a tool that will integrate code coverage results with SCM/VCS to attribute untested lines of code to developers?\nFor example, is there a tool that will take NCover's Coverage.Xml, combine it with SVN blame, and produce a report that tells me things like develope...
I am working with web Dynpro java.. I have created a stateless session bean wherein I have created business methods for inserting and retrieving records from my dictionary table. My table has two fields of java.sql.Date type The web service that i have created is working fine for insertRecords(), but for showRecords(...
It looks like you're trying to retrieve records with date fields from a database using JDBC in a stateless session bean. From your provided code, it seems you are correctly fetching the `java.sql.Date` type columns `START_DATE` and `END_DATE` from the database and setting them into your `WrapperClass` object. However, ...
19,847
[ { "from": "human", "value": "I am working with web Dynpro java..\n I have created a stateless session bean wherein I have created business methods for inserting and retrieving records from my dictionary table.\nMy table has two fields of java.sql.Date type\nThe web service that i have created is working fi...
On our Dev box, our application module contains references to the file:/apps/WebSphere61/systemApps/isclite.ear/ jar files and classpath entries. On our Prod box, however, it only contains the jar file containing all of our required classes. On Dev, this is causing a problem when using apache-commons-fileuploader as ...
In WebSphere Application Server (WAS) 6.1, if your application module is referencing the classes from the `systemApps` libraries, and you want to remove those references to avoid conflicts with your application-specific classes (like when using Apache Commons FileUpload), you can do this by configuring the class loader...
20,264
[ { "from": "human", "value": "On our Dev box, our application module contains references to the file:/apps/WebSphere61/systemApps/isclite.ear/ jar files and classpath entries. On our Prod box, however, it only contains the jar file containing all of our required classes. On Dev, this is causing a problem w...
Visual Studio seems to be modifying a list of .vsmdi files in my .sln every time sometimes when I run a unit test. This is annoying because my source control client thinks the .sln file needs to be checked in even though I don't want to check it in. Is there any way to keep Visual Studio from munging the .sln file afte...
It sounds like you're experiencing a common issue where Visual Studio modifies the solution (.sln) file and related .vsmdi files during certain actions, such as running unit tests. This can indeed cause source control challenges if you want to avoid checking in those changes. Here are a few strategies you can try to p...
21,476
[ { "from": "human", "value": "Visual Studio seems to be modifying a list of .vsmdi files in my .sln every time sometimes when I run a unit test. This is annoying because my source control client thinks the .sln file needs to be checked in even though I don't want to check it in. Is there any way to keep Visu...
i've been trying to find a method in C# to measure the size of a string. The standard method to measure a string in Win32 is to use GetTextExtent. The real goal is to find the average width and height of a font character. The standard method to find the average width of a character starts from getting the width of all ...
The discrepancy you're observing in the character height when using `Graphics.MeasureString()` compared to `GetTextExtent()` might be attributed to several factors related to how both methods calculate text dimensions. Here's a breakdown of why you might be seeing differences and how you can work around them to better ...
20,025
[ { "from": "human", "value": "i've been trying to find a method in C# to measure the size of a string. The standard method to measure a string in Win32 is to use GetTextExtent. The real goal is to find the average width and height of a font character. The standard method to find the average width of a charac...
I have a table that is created in a DataList in ASP.Net. This table has three fields of text, then a field with an edit button, and a field with a delete button. When a person clicks the delete button, it posts back, deletes the items, and then binds the DataList again. The DataList is in an UpdatePanel so the item smo...
To achieve a smooth "slide out" effect on the row when the delete button is clicked while still allowing for postback to occur in ASP.NET, you can use jQuery to handle the slide effect and then trigger the postback after the animation is completed. Here’s a step-by-step approach to implement this: ### Step 1: Modify Y...
16,350
[ { "from": "human", "value": "I have a table that is created in a DataList in ASP.Net. This table has three fields of text, then a field with an edit button, and a field with a delete button. When a person clicks the delete button, it posts back, deletes the items, and then binds the DataList again. The Data...
What is the best encryption library in C/C++ In terms of: entropy quality ease of use readability portability performance What's your favorite and why do you like it?
Choosing the "best" encryption library for C/C++ can depend on the specific requirements of your project, including factors like entropy, quality, ease of use, readability, portability, and performance. Below, I will discuss several popular encryption libraries and how they stack up against the criteria you provided. ...
17,974
[ { "from": "human", "value": "What is the best encryption library in C/C++ In terms of: \n\nentropy \nquality \nease of use\nreadability\nportability \nperformance\n\nWhat's your favorite and why do you like it? \n" }, { "from": "gpt", "value": "Choosing the \"best\" encryption library for C/C++...
This is an often-asked question that has views on both side. Those in favour will argue: To design a system for coders you must understand how to code (and be coding) You can't design a system without being aware of what is happening at ground level Architecture is not just about broad stroke design but about adapting...
You've presented a well-rounded discussion of the debate between the roles of coding and architecture in software development. Both perspectives hold validity, and the balance between them can greatly impact a project's success. Here are some additional insights to consider for both sides: ### Arguments in Favor of Ar...
20,248
[ { "from": "human", "value": "This is an often-asked question that has views on both side. Those in favour will argue:\n\nTo design a system for coders you must understand how to code (and be coding)\nYou can't design a system without being aware of what is happening at ground level\nArchitecture is not just...
We have a vxWorks design which requires one task to process messages from two message queues, Q1 & Q2. We would like to wait on both Queues and whichever gets a message, process the message from the queue. We want to avoid either polling the queues or using a timeout value which could cause the other queue to fill up. ...
In VxWorks, you can achieve concurrent processing from multiple message queues without polling or using a timeout by using the `msgQReceive` function with a task that utilizes multiple message queues. However, VxWorks does not natively support waiting on multiple message queues simultaneously directly. Instead, a commo...
14,354
[ { "from": "human", "value": "We have a vxWorks design which requires one task to process messages from two message queues, Q1 & Q2.\nWe would like to wait on both Queues and whichever gets a message, process the message from the queue.\nWe want to avoid either polling the queues or using a timeout value whi...
Is it possible to code a Dojo DnD target to accept external objects, such as files or folders from a file explorer? Windows Explorer, for example.
Yes, it is possible to code a Dojo DnD (Drag and Drop) target that can accept external objects like files or folders from a file explorer such as Windows Explorer. This functionality typically leverages the HTML5 Drag and Drop API, which allows you to handle drag-and-drop interactions. ### Steps to Create a Dojo DnD T...
15,102
[ { "from": "human", "value": "Is it possible to code a Dojo DnD target to accept external objects, such as files or folders from a file explorer? Windows Explorer, for example.\n" }, { "from": "gpt", "value": "Yes, it is possible to code a Dojo DnD (Drag and Drop) target that can accept external...
Answers to a recent post (Any chances to imitate times() Ruby method in C#?) use the => operator in the usage examples. What does this operator do? I can't locate it in my C# book, and it is hard to search for symbols like this online. (I couldn't find it.)
In C#, the `=>` operator is known as the "expression-bodied member" syntax or the "lambda expression" syntax, depending on the context in which it is used. Here are the common usages of the `=>` operator: 1. **Lambda Expressions**: It is commonly used to define lambda expressions, which are anonymous functions that ca...
17,797
[ { "from": "human", "value": "Answers to a recent post (Any chances to imitate times() Ruby method in C#?) use the => operator in the usage examples. What does this operator do? I can't locate it in my C# book, and it is hard to search for symbols like this online. (I couldn't find it.)\n" }, { "f...
I have an application which behaves as a slideshow for all pictures in a folder. It is written in Borland's C++ Builder (9). It currently uses some borrowed code to throw the filenames into a listbox and save the listbox items as a text file. I want to update this so that the filenames are stored in a proper database ...
To achieve your goal of storing filenames in a database, you can use a simple SQL database like SQLite, which is lightweight and easy to integrate. Below, I'll provide you with a sample code snippet that demonstrates how to create an SQLite database, store file information, and retrieve it using Borland C++ Builder. #...
12,629
[ { "from": "human", "value": "I have an application which behaves as a slideshow for all pictures in a folder. It is written in Borland's C++ Builder (9). It currently uses some borrowed code to throw the filenames into a listbox and save the listbox items as a text file.\nI want to update this so that the ...
In a Test project in Visual Studio 2008 (Pro), I created a Test project, and I want to configure the project properties to give a command line argument to the tests. I set the properties, but then realized I have no idea how to actually use the argument. How do you get the arguments from MSTest?
In Visual Studio 2008, when you're working with unit tests using MSTest, you can pass command-line arguments to your tests through the test settings. However, directly accessing command-line arguments in your tests requires a specific approach since MSTest doesn't provide a built-in way to retrieve command-line argumen...
19,074
[ { "from": "human", "value": "In a Test project in Visual Studio 2008 (Pro), I created a Test project, and I want to configure the project properties to give a command line argument to the tests. I set the properties, but then realized I have no idea how to actually use the argument. \nHow do you get the a...
For example, how can I avoid writing the 'func_name' twice? #ifndef TEST_FUN # define TEST_FUN func_name # define TEST_FUN_NAME "func_name" #endif I'd like to follow the Single Point of Truth rule. Version of C preprocessor: cpp --version Output: cpp (GCC) 4.1.2 20070626 (Red Hat 4.1.2-14)
To adhere to the Single Point of Truth (SPOT) principle in your C preprocessor macros, you can define the function name in one location and use it consistently throughout your code. One approach is to define the function name using another macro or constant, allowing you to avoid repeating the name itself. However, sin...
21,913
[ { "from": "human", "value": "For example, how can I avoid writing the 'func_name' twice?\n#ifndef TEST_FUN\n# define TEST_FUN func_name\n# define TEST_FUN_NAME \"func_name\"\n#endif\n\nI'd like to follow the Single Point of Truth rule.\nVersion of C preprocessor:\ncpp --version\n\nOutput:\ncpp (GCC) 4.1.2...
How can I find local IP addresses (i.e. 192.168.x.x or 10.0.x.x) in Python platform independently and using only the standard library?
To find local IP addresses (specifically in the ranges of `192.168.x.x` or `10.0.x.x`) using Python's standard library, you can use the `socket` and `netifaces` modules. However, since `netifaces` is not part of the standard library, we'll focus on `socket` and `ipaddress`, which are part of the standard library. Here...
19,585
[ { "from": "human", "value": "How can I find local IP addresses (i.e. 192.168.x.x or 10.0.x.x) in Python platform independently and using only the standard library?\n" }, { "from": "gpt", "value": "To find local IP addresses (specifically in the ranges of `192.168.x.x` or `10.0.x.x`) using Python...
We need to optimize the text rendering for a C# Windows Forms application displaying a large number of small strings in an irregular grid. At any time there can be well over 5000 cells visible that update 4 times per second. The font family and size is consistent across the cells, though the color may vary from cell ...
For optimizing text rendering in your Windows Forms application, especially given the requirement to display over 5000 cells and refresh them frequently, here are some strategies you can consider: ### 1. **Use GDI (Graphics Device Interface) Directly:** - Since you are targeting Windows XP and performance is critic...
17,042
[ { "from": "human", "value": "We need to optimize the text rendering for a C# Windows Forms application displaying a large number of small strings in an irregular grid. At any time there can be well over 5000 cells visible that update 4 times per second. The font family and size is consistent across the ce...
Is there a way to configure an assembly in GAC? I want to add a custom configuration to my assembly with System.Configuration. Mher
The Global Assembly Cache (GAC) is a machine-wide store for assemblies that are intended to be shared by multiple applications. While you can install assemblies in the GAC, configuring them with custom settings is a different matter. When it comes to assembly configuration using `System.Configuration`, the configurati...
19,206
[ { "from": "human", "value": "Is there a way to configure an assembly in GAC? I want to add a custom configuration to my assembly with System.Configuration.\nMher\n" }, { "from": "gpt", "value": "The Global Assembly Cache (GAC) is a machine-wide store for assemblies that are intended to be shared...
You can limit "Check-In Policy" rules via the "Custom Paths" policy. But the "Check-in Notes" tab doesn't seem to fit in to the same system. Why isn't "Check-In notes" just another "Check-In policy"?? I'm using Team Foundation Server 2008 SP1
In Team Foundation Server (TFS) 2008, the "Check-In Policy" feature is designed to enforce certain rules or checks that must be satisfied before a user can check in their changes. These policies can include requirements for code reviews, work item associations, or other criteria that contribute to maintaining code qual...
22,765
[ { "from": "human", "value": "You can limit \"Check-In Policy\" rules via the \"Custom Paths\" policy. But the \"Check-in Notes\" tab doesn't seem to fit in to the same system. Why isn't \"Check-In notes\" just another \"Check-In policy\"??\nI'm using Team Foundation Server 2008 SP1\n" }, { "from": "...
I need to find out the time a function takes for computing the performance of the application / function. is their any open source Java APIs for doing the same ?
Yes, there are several open source Java libraries and APIs that you can use to measure the performance of a function or application. Here are a few options: 1. **Java System.nanoTime()**: - For simple performance measurement, you can use `System.nanoTime()` to get the current time in nanoseconds before and after th...
20,576
[ { "from": "human", "value": "I need to find out the time a function takes for computing the performance of the application / function.\nis their any open source Java APIs for doing the same ?\n" }, { "from": "gpt", "value": "Yes, there are several open source Java libraries and APIs that you can...
I have an XML file, which I open in F# like this: let Bookmarks(xmlFile:string) = let xml = XDocument.Load(xmlFile) Once I have the XDocument I need to navigate it using LINQ to XML and extract all specific tags. Part of my solution is: let xname (tag:string) = XName.Get(tag) let tagUrl (tag:XElement) = let attri...
To extract specific tags from your XML file using LINQ to XML in F#, you're on the right track with your `Bookmarks` function. It looks like you're trying to extract the `href` attribute from all `A` elements in the XML. Here’s how you can refine your implementation: 1. **Load the XML file** into an `XDocument`. 2. **...
20,831
[ { "from": "human", "value": "I have an XML file, which I open in F# like this:\nlet Bookmarks(xmlFile:string) = \n let xml = XDocument.Load(xmlFile)\n\nOnce I have the XDocument I need to navigate it using LINQ to XML and extract all specific tags. Part of my solution is:\nlet xname (tag:string) = XName....
How do you create a database backup of a mysql database in VB.Net?
Creating a backup of a MySQL database in VB.Net can be accomplished by using the `mysqldump` utility that comes with MySQL. This utility allows you to export the contents of a database to a file. You can execute it from your VB.Net application using the `Process` class to run command-line commands. Here’s a step-by-st...
17,361
[ { "from": "human", "value": "How do you create a database backup of a mysql database in VB.Net? \n" }, { "from": "gpt", "value": "Creating a backup of a MySQL database in VB.Net can be accomplished by using the `mysqldump` utility that comes with MySQL. This utility allows you to export the cont...
I Have an old vbs script file being kicked off by an AutoSys job. Can I, and how do I, return an int return value to indicate success or failure?
Yes, you can return an integer return value from a VBScript (VBS) script to indicate success or failure when it is invoked by an AutoSys job. The return value is usually communicated through the `WScript.Quit` method. You can use `WScript.Quit` to specify an exit code that can be interpreted by AutoSys. Here’s how to...
20,874
[ { "from": "human", "value": "I Have an old vbs script file being kicked off by an AutoSys job. Can I, and how do I, return an int return value to indicate success or failure?\n" }, { "from": "gpt", "value": "Yes, you can return an integer return value from a VBScript (VBS) script to indicate suc...
I saw a question on reverse projecting 4 2D points to derive the corners of a rectangle in 3D space. I have a kind of more general version of the same problem: Given either a focal length (which can be solved to produce arcseconds / pixel) or the intrinsic camera matrix (a 3x2 matrix that defines the properties of the...
To compute camera rays from 2D pixel coordinates using a given focal length or intrinsic camera matrix, you'll need to take into account the camera's intrinsic parameters and project those pixel coordinates into 3D rays in the camera coordinate system. Below is a step-by-step guide to derive the camera rays from pixel ...
10,977
[ { "from": "human", "value": "I saw a question on reverse projecting 4 2D points to derive the corners of a rectangle in 3D space. I have a kind of more general version of the same problem:\nGiven either a focal length (which can be solved to produce arcseconds / pixel) or the intrinsic camera matrix (a 3x2...
Im just writing a small Ajax framework for re-usability in small projects and i've hit a problem. Basically i get a 'NS_ERROR_ILLEGAL_VALUE' error while sending the request and i've no idea what is happening. The HTML Page (trimmed but shows the error) <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://ww...
The issue you're encountering with the error `NS_ERROR_ILLEGAL_VALUE` suggests that there is a problem with the values you're using when calling the `open` method on the `XMLHttpRequest` object. There are a couple of potential reasons for this error: 1. **Typo in the Request Method**: In your `AjaxRequest` constructo...
19,604
[ { "from": "human", "value": "Im just writing a small Ajax framework for re-usability in small projects and i've hit a problem. Basically i get a 'NS_ERROR_ILLEGAL_VALUE' error while sending the request and i've no idea what is happening.\nThe HTML Page\n(trimmed but shows the error)\n<!DOCTYPE html PUBLIC \...
We have a Microsoft SQL Server 2005 database that needs to be converted back to SQL Server 2000. Does anybody have any suggestions on the approach or tools I should use to perform this conversion? We don't utilise any SQL Server 2005 specific features in the database so this should not make the conversion problematic. ...
Converting a SQL Server 2005 database back to SQL Server 2000 can indeed be a challenging task, particularly since you're moving to an older version that lacks some of the features available in 2005. Here are several steps and tools you can consider for this process: ### Steps for Conversion 1. **Backup and Documenta...
19,076
[ { "from": "human", "value": "We have a Microsoft SQL Server 2005 database that needs to be converted back to SQL Server 2000. Does anybody have any suggestions on the approach or tools I should use to perform this conversion? We don't utilise any SQL Server 2005 specific features in the database so this sho...
If I am passing an object to a method, why should I use the ref keyword? Isn't this the default behaviour anyway? For example: class Program { static void Main(string[] args) { TestRef t = new TestRef(); t.Something = "Foo"; DoSomething(t); Console.WriteLine(t.Something); } ...
In C#, when you pass an object (like your `TestRef` instance) to a method, what you're actually passing is a reference to that object. However, it is important to understand the nuances of how references and the `ref` keyword work. ### Why the Output is "Bar" In your example, when you call `DoSomething(t)`, you are p...
20,229
[ { "from": "human", "value": "If I am passing an object to a method, why should I use the ref keyword? Isn't this the default behaviour anyway?\nFor example:\nclass Program\n{\n static void Main(string[] args)\n {\n TestRef t = new TestRef();\n t.Something = \"Foo\";\n\n DoSomethin...
We have a web application that passes parameters in the url along the lines of this: www.example.com/ViewCustomer?customer=3945 Reasonably often, we will see attempts to access just: www.example.com/ViewCustomer Or system logs this as invalid and sends back a "An error has occurred, contact support with trace number ...
It seems you're encountering a situation where users are accessing your web application with incomplete URLs, which leads to error messages due to missing required parameters. There are a few possible explanations and considerations for this behavior: 1. **User Behavior**: As you noted, it’s possible that some users a...
20,745
[ { "from": "human", "value": "We have a web application that passes parameters in the url along the lines of this:\nwww.example.com/ViewCustomer?customer=3945\n\nReasonably often, we will see attempts to access just:\nwww.example.com/ViewCustomer\n\nOr system logs this as invalid and sends back a \"An error ...
I want to be able to run unstrusted ruby code. I want to be able to pass variables to said untrusted code that it may use. I also want said code to return a result to me. Here is a conceptual example of what I am thinking input = "sweet" output = nil Thread.start { $SAFE = 4 #... untrusted code goes here, it uses...
Running untrusted Ruby code safely is a complex and challenging task. Ruby does have some constructs that can help, like `$SAFE` levels, but as of Ruby 2.4, `$SAFE` has been deprecated and removed in Ruby 3.0. This means you need to explore alternative approaches for handling untrusted code. Here are some recommendatio...
16,515
[ { "from": "human", "value": "I want to be able to run unstrusted ruby code. I want to be able to pass variables to said untrusted code that it may use. I also want said code to return a result to me. Here is a conceptual example of what I am thinking\ninput = \"sweet\"\noutput = nil\nThread.start {\n $SAF...
Is there a way to globally make right click also select the element that you right click on? From what I understand this has been a bug in Swing for a long time likely to never be fixed because at this point applications depend on it. Any advice on doing this on a global scale? Perhaps on the L&F?
In Swing, the default behavior of a right-click (or context menu click) does not automatically select the component that it is performed on, which can lead to confusion for users expecting this behavior. While it's true that this has been a longstanding issue, you can implement a workaround to achieve your desired beha...
19,860
[ { "from": "human", "value": "Is there a way to globally make right click also select the element that you right click on? \nFrom what I understand this has been a bug in Swing for a long time likely to never be fixed because at this point applications depend on it. \nAny advice on doing this on a global s...
I'm using the AdvancedDataGrid widget and I want two columns to be radio buttons, where each column is it's own RadioButtonGroup. I thought I had all the necessary mxxml, but I'm running into a strange behavior issue. When I scroll up and down, the button change values! The selected button becomes deselected, and un...
It looks like you've made good progress with your `AdvancedDataGrid` and radio buttons setup in MXML. The issue you encountered, where radio buttons lose their selected state upon scrolling, is a common problem with item renderers in Flex when they aren't properly bound to their data. When the `AdvancedDataGrid` scrol...
16,608
[ { "from": "human", "value": "I'm using the AdvancedDataGrid widget and I want two columns to be radio buttons, where each column is it's own RadioButtonGroup. I thought I had all the necessary mxxml, but I'm running into a strange behavior issue. When I scroll up and down, the button change values! The s...
I'm using an expander inside a Resizer (a ContentControl with a resize gripper), and it expands/collapses properly when the control initially comes up. Once I resize it, the Expander won't properly collapse, as documented below. I ran Snoop on my application, and I don't see any heights set on Expander or its constit...
It sounds like you're encountering a layout issue due to the resizing behavior of your `Resizer` control affecting the `Expander`. Here are a few suggestions you can try to ensure the `Expander` collapses correctly after resizing: 1. **Set VerticalAlignment and HorizontalAlignment:** Ensure that the `Expander` has...
18,271
[ { "from": "human", "value": "I'm using an expander inside a Resizer (a ContentControl with a resize gripper), and it expands/collapses properly when the control initially comes up. Once I resize it, the Expander won't properly collapse, as documented below. I ran Snoop on my application, and I don't see a...
I need a way to build C++ code from UML diagrams and vice versa. Should be simple too hopefully. I don't mind paying too much.
If you're looking for tools that can help you generate C++ code from UML diagrams and vice versa, there are several options available. Here are some popular tools that cater to your needs: ### 1. **Enterprise Architect** - **Description**: A powerful UML modeling tool that supports code generation and reverse engineer...
20,890
[ { "from": "human", "value": "I need a way to build C++ code from UML diagrams and vice versa. \nShould be simple too hopefully. I don't mind paying too much.\n" }, { "from": "gpt", "value": "If you're looking for tools that can help you generate C++ code from UML diagrams and vice versa, there a...
In a C++ project, compilation dependencies can make a software project difficult to maintain. What are some of the best practices for limiting dependencies, both within a module and across modules?
Managing dependencies in a C++ project is crucial for maintainability, readability, and overall software quality. Here are some best practices to limit dependencies both within a module and across modules: ### Within a Module: 1. **Use Forward Declarations**: Instead of including headers, use forward declarations whe...
16,892
[ { "from": "human", "value": "In a C++ project, compilation dependencies can make a software project difficult to maintain. What are some of the best practices for limiting dependencies, both within a module and across modules?\n" }, { "from": "gpt", "value": "Managing dependencies in a C++ proj...
In a recent project the "lead" developer designed a database schema where "larger" tables would be split across two separate databases with a view on the main database which would union the two separate database-tables together. The main database is what the application was driven off of so these tables looked and fel...
Designing a database schema that splits larger tables across two separate databases and using a view to union them can be an interesting approach, but it also comes with a set of challenges and potential performance issues. Here are some considerations to help you determine whether this approach is worth pursuing and h...
20,288
[ { "from": "human", "value": "In a recent project the \"lead\" developer designed a database schema where \"larger\" tables would be split across two separate databases with a view on the main database which would union the two separate database-tables together. The main database is what the application was...
I have a web service, that takes an input xml message, transforms it, and then forwards it to another web service. The application is deployed to two web logic app servers for performance, and resilience reasons. I would like a single website monitoring page that allows two things ability to stop/ start forwarding of ...
Hi David, Your idea of using an in-memory database like Derby or HSQLDB to store state and metrics for your web service is a reasonable approach, but there are some considerations to keep in mind regarding data consistency, scalability, and complexity of setup. Here are a few alternatives and additional considerations...
15,262
[ { "from": "human", "value": "I have a web service, that takes an input xml message, transforms it, and then forwards it to another web service.\nThe application is deployed to two web logic app servers for performance, and resilience reasons.\nI would like a single website monitoring page that allows two th...
My web page sits in a DIV that is 960px wide, I center this DIV in the middle of the page by using the code: html,body{background: url(images/INF_pageBg.gif) center top repeat-y #777777;text-align:center;} #container{background-color:#ffffff;width:960px;text-align:left;margin:0 auto 0 auto;} I need the background ...
The issue you're experiencing is likely due to how Firefox handles the alignment of the background image in conjunction with the text alignment of the `body`. When the viewport width is an odd number, the centered `DIV` will not align perfectly with the centered background. Here are a couple of workarounds to ensure t...
15,550
[ { "from": "human", "value": "My web page sits in a DIV that is 960px wide, I center this DIV in the middle of the page by using the code: \nhtml,body{background: url(images/INF_pageBg.gif) center top repeat-y #777777;text-align:center;}\n#container{background-color:#ffffff;width:960px;text-align:left;mar...
Possible Duplicate: VS2008 Setup Project: Shared (By All Users) Application Data Files? Please can someone advice what is the best place (path) to put some application data which should be accessible and editable by all users. This is considering both Windows XP and Windows Vista and i expect that change in any file...
For application data that should be accessible and editable by all users in both Windows XP and Windows Vista, you should consider using the following paths: 1. **Common Application Data Folder**: - You can use the `CommonApplicationData` folder, which is intended for application data that is shared among all users...
22,248
[ { "from": "human", "value": "\nPossible Duplicate:\nVS2008 Setup Project: Shared (By All Users) Application Data Files? \n\nPlease can someone advice what is the best place (path) to put some application data which should be accessible and editable by all users.\nThis is considering both Windows XP and Wind...
I wonder, why the hell... did the VS team consider that NOT finding a project reference as a non crucial thing? The referenced component 'X' could not be found. should be considered an error... and nothing else. Is there a way (without turning 'Treat all warnings as errors' on) to get this warning as an error in VS2008...
In Visual Studio 2008, there isn't a built-in way to treat a specific warning as an error without using the "Treat all warnings as errors" setting. However, you can achieve your goal by using some workarounds: ### 1. Modify Project Settings You can manually modify the project file (the `.csproj` file for C# projects) ...
22,146
[ { "from": "human", "value": "I wonder, why the hell... did the VS team consider that NOT finding a project reference as a non crucial thing?\nThe referenced component 'X' could not be found. should be considered an error... and nothing else.\nIs there a way (without turning 'Treat all warnings as errors' on...
Is there an easy way to get a conflict summary after running a cvs update? I work on a large project and after doing some work I need to do an update. The list of changes coming back from the cvs update command is several pages long and I'd like to see only the list of conflicts (starts with 'C') repeated at the end...
You can achieve this by using a combination of `cvs update`, `grep`, and `awk` in a shell command. Here is a simple command you can run in your terminal to get the desired output format: ```bash cvs update | tee /dev/tty | grep '^C ' > conflicts.txt && echo -e "\nConflict Summary:" && cat conflicts.txt ``` ### Explan...
16,936
[ { "from": "human", "value": "Is there an easy way to get a conflict summary after running a cvs update? \nI work on a large project and after doing some work I need to do an update. The list of changes coming back from the cvs update command is several pages long and I'd like to see only the list of confl...
This is my first Latex doc. Using Latex8.sty I'm trying to include a 5 column table. I've commented out everything but the introdution and the table. When I make the pdf it shows the introduction but no table. Any tips? \begin{tabular}{|ll||l|c|r|rr} Mass&a1&a2&Fprime1&Fprime2\\ \hline 70g&0.988m/s^2&-2.79m/s^2&467...
It seems that you may be encountering issues with your LaTeX document not rendering the table properly. Here are a few tips to ensure that your table displays correctly: 1. **Table Environment**: Enclose your tabular environment within a table environment. This will help in properly formatting the table and ensuring i...
17,489
[ { "from": "human", "value": "This is my first Latex doc. Using Latex8.sty I'm trying to include a 5 column table. I've commented out everything but the introdution and the table. When I make the pdf it shows the introduction but no table. Any tips? \n\\begin{tabular}{|ll||l|c|r|rr}\n Mass&a1&a2&Fprime1&Fpri...
I stumbled across this code and am too proud to go and ask the author what it means. Hashtable^ tempHash = gcnew Hashtable(iterators_); IDictionaryEnumerator^ enumerator = tempHash->GetEnumerator(); What is gcnew and how important is it to use that instead of simply new? (I'm also stumped by the caret; I asked about ...
In the code you've posted, `gcnew` is a keyword used in C++/CLI (a variant of C++ designed to work with the .NET framework) for creating managed objects. The caret (`^`) that you mentioned is used to represent a handle to a managed object in C++/CLI, similar to how a pointer works in standard C++. Here’s a breakdown o...
19,003
[ { "from": "human", "value": "I stumbled across this code and am too proud to go and ask the author what it means.\nHashtable^ tempHash = gcnew Hashtable(iterators_);\n\nIDictionaryEnumerator^ enumerator = tempHash->GetEnumerator();\n\nWhat is gcnew and how important is it to use that instead of simply new? ...
I need a complete Object Pascal syntax (preferably Delphi 2009). Some of the syntax is given by the help files, but not all information is provided. So I started collecting loose bits of information. Recently I added these to a more or less complete syntax description (EBNF like). Although it looks extensive, there are...
Creating a complete syntax reference for Object Pascal, particularly in the context of Delphi 2009 and its extensions, is a significant undertaking. While I can provide a general overview of key elements and structure, please note that this won't be exhaustive, but it should help address some of the gaps you might have...
15,223
[ { "from": "human", "value": "I need a complete Object Pascal syntax (preferably Delphi 2009). Some of the syntax is given by the help files, but not all information is provided. So I started collecting loose bits of information. Recently I added these to a more or less complete syntax description (EBNF like...
I'd like to show a div that has a background-color with the height and width set to 100% but no content. Is it possible to do that without putting a &nbsp; inside? Edit: Thanks to Mark Biek for pointing out that empty div with width and height styles shows how I'd expect. My div is in a table cell, where it does not sh...
Yes, it is possible to create a `<div>` that takes up the full height and width of a table cell without needing any content, including non-breaking spaces. To ensure that the `<div>` displays properly within the table cell, you can apply some CSS styles. You need to make sure the parent table cell (`<td>`) has a defin...
18,582
[ { "from": "human", "value": "I'd like to show a div that has a background-color with the height and width set to 100% but no content. Is it possible to do that without putting a &nbsp; inside?\nEdit: Thanks to Mark Biek for pointing out that empty div with width and height styles shows how I'd expect. My di...
You can use App.config; but it only supports key/value pairs. You can use .Net configuration, configuration sections; but it can be really complex. You can use Xml Serialization/Deserialization by yourself; your classes-your way. You can use some other method; what can they be? ... Which of these or other methods (if...
When it comes to configuration management in .NET applications, several methods can be employed, each with its own benefits and drawbacks. Below are some common methods, along with their advantages and potential use cases: ### 1. **App.config or Web.config** - **Pros**: Simple key/value pairs, easy to read and modi...
18,117
[ { "from": "human", "value": "\nYou can use App.config; but it only supports key/value pairs.\nYou can use .Net configuration, configuration sections; but it can be really complex.\nYou can use Xml Serialization/Deserialization by yourself; your classes-your way.\nYou can use some other method; what can they...
I've been asked to find a way to send an alert to a blackberry when certain conditions are met on an Excel 2007 spreadsheet. The alert can be an SMS (preferred) or an email. The cell values are changing throughout the day from a DDE feed. What are the typical solutions that people use to solve this?
To send alerts to a BlackBerry based on specific conditions in an Excel 2007 spreadsheet, you can utilize a few different approaches. Here are some typical solutions: ### 1. **Excel VBA (Visual Basic for Applications) with SMS Gateway:** - **Set up conditions:** Use VBA to monitor the specific cells in your Excel f...
19,053
[ { "from": "human", "value": "I've been asked to find a way to send an alert to a blackberry when certain conditions are met on an Excel 2007 spreadsheet. The alert can be an SMS (preferred) or an email. The cell values are changing throughout the day from a DDE feed.\nWhat are the typical solutions that peo...
Is there a good external merge tool for tortoisesvn (I don't particularly like the built in Merge tool). I use WinMerge for diffs, but it doesn't work with the three way merge (maybe a better question would be is there a way to force tortoisesvn to merge like tortoisecvs?) [Edit] After trying all of them, for me, the ...
If you're looking for an external merge tool for TortoiseSVN and prefer alternatives to the built-in merge tool, you have several options. Since you mentioned you like using WinMerge for diffs but it doesn't support three-way merging, let's look at some other popular tools and how you can configure them in TortoiseSVN....
19,625
[ { "from": "human", "value": "Is there a good external merge tool for tortoisesvn (I don't particularly like the built in Merge tool). I use WinMerge for diffs, but it doesn't work with the three way merge (maybe a better question would be is there a way to force tortoisesvn to merge like tortoisecvs?)\n[Ed...
I am trying to install the starling gem on my Windows machine. But, whenever I try to install it I get this error: Building native extensions. This could take a while... ERROR: Error installing starling: ERROR: Failed to build gem native extension. c:/ruby/bin/ruby.exe extconf.rb install starling -- -...
The error you're encountering when trying to install the Starling gem indicates that your system is missing the `windows.h` header file, which is part of the Windows API. This typically happens when the necessary development tools are not installed on your system. To resolve this issue, you need to install a C/C++ com...
20,661
[ { "from": "human", "value": "I am trying to install the starling gem on my Windows machine. But, whenever I try to install it I get this error:\nBuilding native extensions. This could take a while... \nERROR: Error installing starling: \n ERROR: Failed to build gem native extension. \n\nc:/ruby...
I know I can get the public static members of a class by doing something like: obj.getClass().getFields() but this doesn't get me the enums. I'd like to be able to get them from the Class object returned by the getClass method. Any ideas?
To retrieve enum constants from a class in Java, you can use the `getEnumConstants()` method provided by the `Class` class. This method will return an array of the enum constants of the specified enum type. Here's an example of how to do this: ```java public class MyClass { public enum MyEnum { CONSTANT_...
22,617
[ { "from": "human", "value": "I know I can get the public static members of a class by doing something like:\nobj.getClass().getFields()\nbut this doesn't get me the enums. I'd like to be able to get them from the Class object returned by the getClass method. Any ideas?\n" }, { "from": "gpt", "...
I'm attempting to put together some basic report screens. I've got some fairly complicated SQL queries that I'm feeding into ActiveRecord's find_by_sql method. The problem I am having here is that I am losing the order of the columns as given in the original query. I'm assuming that this is because the Hash class do...
You're correct that the behavior of the `Hash` class in Ruby prior to version 1.9 does not preserve the order of keys. However, starting from Ruby 1.9, hashes maintain the order of their keys. If you are using Ruby 1.9 or later, the order should be preserved naturally. When using ActiveRecord's `find_by_sql`, the resu...
21,574
[ { "from": "human", "value": "I'm attempting to put together some basic report screens. I've got some fairly complicated SQL queries that I'm feeding into ActiveRecord's find_by_sql method. The problem I am having here is that I am losing the order of the columns as given in the original query. I'm assumi...
I can't find a definitive answer. Since C# 2.0 you've been able to declare int? i = 125; as shorthand for Nullable<int> i = Nullable<int>(123); I recall reading somewhere that VB.NET did not allow this shortcut. But low and behold, I tried it in VS 2008 today and it works. Does anyone know whether it's been this wa...
Yes, the shorthand syntax for nullable types in VB.NET, using `Integer?`, was indeed introduced in .NET Framework 2.0, along with the addition of nullable types in C#. However, the exact syntax you mentioned (e.g., `int?` in C#) is not directly applicable to VB.NET because VB.NET uses a different syntax. In VB.NET, th...
24,143
[ { "from": "human", "value": "I can't find a definitive answer. Since C# 2.0 you've been able to declare\nint? i = 125;\n\nas shorthand for\nNullable<int> i = Nullable<int>(123);\n\nI recall reading somewhere that VB.NET did not allow this shortcut. But low and behold, I tried it in VS 2008 today and it wo...
I'm currently developing for a handheld device running Windows XP Professional (not Tablet PC edition). The device allows users to switch from the standard widescreen landscape display format to a portrait one. I would like to know if there are any VB.NET code snippets to help me along with this task.
Certainly! To change the orientation of a form or handle the display switch between landscape and portrait modes in a VB.NET application running on Windows XP Professional, you would typically need to manage the form's dimensions and the layout of controls according to the selected orientation. ### Step 1: Handling Sc...
15,124
[ { "from": "human", "value": "I'm currently developing for a handheld device running Windows XP Professional (not Tablet PC edition). The device allows users to switch from the standard widescreen landscape display format to a portrait one. I would like to know if there are any VB.NET code snippets to help m...
When accessing an object in a DataTable retrieved from a database, are there any reasons not to cast the object into your desired type, or are there reasons to use convert? I know the rule is cast when we know what data type we're working with, and convert when attempting to change the data type to something it isn't. ...
When accessing objects in a DataTable retrieved from a database, it's important to consider the following factors before deciding whether to use casting or conversion: ### Reasons to Use Casting 1. **Type Safety**: If you are certain about the data type of the column and it matches the type you are casting to, then ca...
20,970
[ { "from": "human", "value": "When accessing an object in a DataTable retrieved from a database, are there any reasons not to cast the object into your desired type, or are there reasons to use convert? I know the rule is cast when we know what data type we're working with, and convert when attempting to cha...
I would love to be able to have a common set of Classes in my root App_Code folder, which is how we are set up right now. However, it doesn't make sense to put specific code there for some application residing in a sub directory. Root Folder App_Code SubDirApp1 App_Code SubDirApp2 App_Code We currently hav...
Your current structure, with each production application in its own root folder and each having its own `App_Code` folder, is a common way to manage web applications, especially in a shared hosting environment. However, it sounds like you want to maintain a common set of classes in a single `App_Code` folder and also h...
20,788
[ { "from": "human", "value": "I would love to be able to have a common set of Classes in my root App_Code folder, which is how we are set up right now. However, it doesn't make sense to put specific code there for some application residing in a sub directory. \n\nRoot Folder\nApp_Code\n\n\nSubDirApp1\n\n\nA...
Our system dynamically generates a large report by converting many HTML pages into a single PDF. The resulting PDF is sent back (via the HTTP request) to the calling browser. When the report is sufficiently large (200+ pages) IE 7 intermittently chokes. The result issue is the calling PC locks up and must be rebooted...
When dealing with large PDFs in Internet Explorer 7, there are a few strategies you can employ to mitigate the issues, as IE 7 has known limitations with handling large files. Here are some suggestions and workarounds: 1. **Optimize PDF Generation**: - **Compress PDF**: Make sure the PDF is optimized and compressed...
19,547
[ { "from": "human", "value": "Our system dynamically generates a large report by converting many HTML pages into a single PDF. The resulting PDF is sent back (via the HTTP request) to the calling browser. When the report is sufficiently large (200+ pages) IE 7 intermittently chokes. The result issue is the...
I am trying to send my dynamically created silverlight 2 page/image to a an ASP.net web service to render it as an bitmap image. I can see many examples how to get the XAML using javascript (see here) in version 1 of silverlight but I have a few differences. a) I am using silverlight 2 RC1 b) I have dynamically add co...
In Silverlight 2, the ability to directly extract XAML from a control or page in C# is not natively supported, as the primary methods for doing so were primarily available in Silverlight 3 and later versions. However, since you are working with Silverlight 2 RC1 and are dynamically adding controls in C#, there are some...
21,240
[ { "from": "human", "value": "I am trying to send my dynamically created silverlight 2 page/image to a an ASP.net web service to render it as an bitmap image.\nI can see many examples how to get the XAML using javascript (see here) in version 1 of silverlight but I have a few differences. \na) I am using sil...
Which is better to do client side or server side validation? In our situation we are using jQuery and MVC. JSON data to pass between our View and Controller. A lot of the validation I do is validating data as users enter it. For example I use the the keypress event to prevent letters in a text box, set a max num...
When it comes to validation in web applications, both client-side and server-side validation serve important purposes, and the choice between them often depends on the specific needs of your application. Here are some benefits and considerations for each approach: ### Client-Side Validation **Benefits:** 1. **User Ex...
14,014
[ { "from": "human", "value": "Which is better to do client side or server side validation?\nIn our situation we are using \n\njQuery and MVC. \nJSON data to pass between our View and Controller. \n\nA lot of the validation I do is validating data as users enter it.\nFor example I use the the keypress event...
What is the best way to return XML from a controller's action in ASP.NET MVC? There is a nice way to return JSON, but not for XML. Do I really need to route the XML through a View, or should I do the not-best-practice way of Response.Write-ing it?
Returning XML from a controller's action in ASP.NET MVC can be achieved in several ways. While there isn't a built-in method to return XML as straightforward as `Json()` for JSON data, you can still do this effectively without routing it through a View or resorting to `Response.Write`. Here are a few recommended approa...
20,533
[ { "from": "human", "value": "What is the best way to return XML from a controller's action in ASP.NET MVC? There is a nice way to return JSON, but not for XML. Do I really need to route the XML through a View, or should I do the not-best-practice way of Response.Write-ing it?\n" }, { "from": "gpt"...
What are the best practices for modeling inheritance in databases? What are the trade-offs (e.g. queriability)? (I'm most interested in SQL Server and .NET, but I also want to understand how other platforms address this issue.)
Modeling inheritance in databases can be a complex topic, especially when considering different platforms and frameworks. Here are some best practices for modeling inheritance in relational databases, particularly with an eye on SQL Server and .NET, as well as a general overview of how other systems might approach this...
17,449
[ { "from": "human", "value": "What are the best practices for modeling inheritance in databases?\nWhat are the trade-offs (e.g. queriability)?\n(I'm most interested in SQL Server and .NET, but I also want to understand how other platforms address this issue.)\n" }, { "from": "gpt", "value": "Mode...
I'm trying to create a c++ library for use on windows/MSVC. My problem is that it seems that in order to link properly, I need to distribute a bunch of different versions, linked against different versions of MSVC's c++ runtimes - single and multi-threaded, debug and release, different compiler versions, various other ...
Creating a C++ library that is portable and can be linked to various projects without compatibility issues, especially on Windows with MSVC, can be quite a challenge due to the multiple versions and configurations of the C++ runtime. Your approach of using a custom memory management strategy is a creative solution to p...
17,204
[ { "from": "human", "value": "I'm trying to create a c++ library for use on windows/MSVC.\nMy problem is that it seems that in order to link properly, I need to distribute a bunch of different versions, linked against different versions of MSVC's c++ runtimes - single and multi-threaded, debug and release, d...
I've got a spreadsheet with plenty of graphs in it and one sheet with loads of data feeding those graphs. I've plotted the data on each graph using =Sheet1!$C5:$C$3000 This basically just plots the values in C5 to C3000 on a graph. Regularly though I just want to look at a subset of the data i.e. I might just want to...
Yes, you can simplify your graph plotting in Excel by using a reference cell to specify the last row of data. This way, you can change that reference cell instead of modifying each formula individually. Here’s how to do it: 1. **Create a Cell for Row Reference**: - Choose a cell in your spreadsheet (let's say `She...
18,527
[ { "from": "human", "value": "I've got a spreadsheet with plenty of graphs in it and one sheet with loads of data feeding those graphs.\nI've plotted the data on each graph using \n=Sheet1!$C5:$C$3000\n\nThis basically just plots the values in C5 to C3000 on a graph.\nRegularly though I just want to look at ...
I am working on an implementation for RSS feeds for a collaboration platform. Say there are several thousands of different collaboration rooms where users can share information, and each needs to publish an RSS feed with news, changes, etc... Using a plain servlet (i.e. http://www.site.com/RSSServlet/?id=roomID) is cos...
Implementing an efficient RSS feed system for a collaboration platform with potentially thousands of rooms requires a balance between performance, memory management, and scalability. Given the constraints you've mentioned, here’s an approach that could work effectively: ### 1. In-Memory Caching To reduce the overhead...
19,728
[ { "from": "human", "value": "I am working on an implementation for RSS feeds for a collaboration platform.\nSay there are several thousands of different collaboration rooms where users can share information, and each needs to publish an RSS feed with news, changes, etc...\nUsing a plain servlet (i.e. http:/...
Apple's documentation on -setPrimitiveValue:forKey: is vague in two ways when using it to manage to-many relationships. First they state: If you try to set a to-many relationship to a new NSMutableSet object, it will (eventually) fail. Eventually?! What does that even mean? Will it fail later during -[NSManagedObject...
Using `-setPrimitiveValue:forKey:` for managing to-many relationships in Core Data can indeed be tricky, and it's understandable that the documentation might not be very clear in certain areas. Let's address your questions one at a time: ### 1. When will setting a to-many relationship to a new `NSMutableSet` object fa...
20,388
[ { "from": "human", "value": "Apple's documentation on -setPrimitiveValue:forKey: is vague in two ways when using it to manage to-many relationships.\nFirst they state:\n\nIf you try to set a to-many relationship to a new NSMutableSet object, it will (eventually) fail.\n\nEventually?! What does that even mea...
Anybody know of an implementation of graph algorithms in Smalltalk? I'd like something that allows you to implement an interface on your model objects or something and provides algorithms for transitive closure, transitive reduction, topological sort, etc., etc. People end up re-implementing these widely-applicable alg...
While there may not be a widely known and comprehensive library specifically for graph algorithms in Smalltalk, there are a few options and strategies you might consider: 1. **SqueakMap and Pharo**: For Smalltalk environments like Squeak or Pharo, you might find some graph-related packages. SqueakMap is a package mana...
22,670
[ { "from": "human", "value": "Anybody know of an implementation of graph algorithms in Smalltalk?\nI'd like something that allows you to implement an interface on your model objects or something and provides algorithms for transitive closure, transitive reduction, topological sort, etc., etc.\nPeople end up ...
I need to retrieve a set of Widgets from my data access layer, grouped by widget.Manufacturer, to display in a set of nested ASP.NET ListViews. The problem is that (as far as I can tell) the nested ListView approach requires me to shape the data before using it, and I can't figure out the best approach to take. The bes...
To achieve the desired grouping and display of widgets by manufacturer using nested ASP.NET ListViews, you can indeed do this without reshaping the data too much. Since you've already adjusted your data access layer to return an `IEnumerable<IGrouping<Manufacturer, Widget>>`, you can directly bind to this structure in ...
16,246
[ { "from": "human", "value": "I need to retrieve a set of Widgets from my data access layer, grouped by widget.Manufacturer, to display in a set of nested ASP.NET ListViews.\nThe problem is that (as far as I can tell) the nested ListView approach requires me to shape the data before using it, and I can't fig...
To me the concept of "Gurevich Abstract State Machine" (formerly known as "evolving algebras") seems very promising to provide a solid fundation to systems behaviours. It could be what relational algebra is for databases: the underlying theoretic fundation. The most complete implementation, to my knowledge, is the Micr...
The concept of Gurevich Abstract State Machines (GASM) and the related ASML (Abstract State Machine Language) indeed provides a theoretical foundation for specifying and reasoning about system behaviors. GASM has gained attention for its potential to model complex systems in a mathematically rigorous way, similar to ho...
21,030
[ { "from": "human", "value": "To me the concept of \"Gurevich Abstract State Machine\" (formerly known as \"evolving algebras\") seems very promising to provide a solid fundation to systems behaviours. It could be what relational algebra is for databases: the underlying theoretic fundation.\nThe most complet...
What's the best way to add the coordinates of a circle to an array in JavaScript? So far I've only been able to do a half circle, but I need a formula that returns the whole circle to two different arrays: xValues and yValues. (I'm trying to get the coordinates so I can animate an object along a path.) Here's what I ha...
To generate the coordinates for a full circle and store them in two separate arrays (`xValues` and `yValues`), you can modify your existing function. Instead of generating points only for a half circle, you should compute points for a full revolution (0 to 2π radians). Here’s an updated version of your `circle` functi...
21,549
[ { "from": "human", "value": "What's the best way to add the coordinates of a circle to an array in JavaScript? So far I've only been able to do a half circle, but I need a formula that returns the whole circle to two different arrays: xValues and yValues. (I'm trying to get the coordinates so I can animate ...