instruction
stringlengths
14
27.6k
completion
stringlengths
3
38.3k
__original_row_idx
int64
0
50k
conversations
listlengths
2
2
I'm sure this is a relatively simple question, and there must be a good sensible rails way of doing it, but I'm not sure what it is. Basically I'm adding books to a database, and I want to store the Author in a separate table. So I have a table called authors which is referenced by the table books. I want to create a r...
Hi Robin, This is a common use case in Rails applications, and you can achieve this by using nested forms or simple form objects that handle author creation or lookup. Here's a straightforward way to implement this functionality using Rails. ### Step 1: Set Up Models and Associations First, ensure you have your mode...
25,422
[ { "from": "human", "value": "I'm sure this is a relatively simple question, and there must be a good sensible rails way of doing it, but I'm not sure what it is.\nBasically I'm adding books to a database, and I want to store the Author in a separate table. So I have a table called authors which is reference...
I'm looking for a way to find references to a web method in other code that may use it. Right-click and choose find references doesn't make it through the wsdl interface to other classes in my solution that reference those web methods. This is part of a clean-up effort - I'm trying to remove outdated/old/unused metho...
Finding references to web methods defined in a WSDL interface can indeed be challenging, especially when standard IDE features like "Find References" do not follow the method calls through WSDL proxies or client interfaces. Here are some strategies you can use to effectively locate usages of your web methods within you...
26,187
[ { "from": "human", "value": "I'm looking for a way to find references to a web method in other code that may use it. Right-click and choose find references doesn't make it through the wsdl interface to other classes in my solution that reference those web methods. This is part of a clean-up effort - I'm t...
I need to open a Microsoft Word 2003 file and change its file properties. Such as changing the Subject in the Summary Tab.
To change the file properties of a Microsoft Word 2003 document, including the Subject in the Summary tab, follow these steps: 1. **Open the Document**: - Launch Microsoft Word 2003. - Open the document you want to edit by going to `File` > `Open`, and selecting your file. 2. **Access File Properties**: - On...
30,043
[ { "from": "human", "value": "I need to open a Microsoft Word 2003 file and change its file properties. Such as changing the Subject in the Summary Tab. \n\n" }, { "from": "gpt", "value": "To change the file properties of a Microsoft Word 2003 document, including the Subject in the Summary tab, ...
The build machine at work has many projects, but we are only experiencing a problem with one. Two projects are very similar, one builds in debug mode, the other in release mode. They both clear out the projects directory, and then does a full Get from source safe. The debug build gets the source fine and fairly qui...
The difference in the speed of the source control operations between your debug and release builds, particularly during the "Checking Modifications" phase, could be attributed to several factors. Here are some potential reasons and solutions you can explore: 1. **Project Size/Complexity**: If the release build project...
29,178
[ { "from": "human", "value": "The build machine at work has many projects, but we are only experiencing a problem with one. \nTwo projects are very similar, one builds in debug mode, the other in release mode. They both clear out the projects directory, and then does a full Get from source safe. The debug...
I have trouble with the following piece of code. When I go through with the debugger I get an exception when it comes to the following line: dgvCalls.Columns.Insert(1, msisnnColumn); I get an exception: Column cannot be added because its CellType property is null. Oddly, I created the same procedure for some othe...
The exception you are encountering indicates that you're trying to insert a column (`msisnnColumn`) into the `DataGridView` (`dgvCalls`) without having set its `CellTemplate` property. The `CellTemplate` property defines the type of cell that will be used for that column, and it cannot be null. From the code you provi...
29,192
[ { "from": "human", "value": "I have trouble with the following piece of code. When I go through with the debugger I get an exception when it comes to the following line:\ndgvCalls.Columns.Insert(1, msisnnColumn);\n\nI get an exception: \n\nColumn cannot be added because its\n CellType property is null.\n\n...
What are the different types of indexes, what are the benefits of each? I heard of covering and clustered indexes, are there more? Where would you use them?
Indexes are essential components in database management systems (DBMS) that improve the speed of data retrieval operations on a database table. There are various types of indexes, each with its own benefits and use cases. Here's an overview of some common types of indexes: ### 1. **Clustered Index** - **Definition**: ...
26,657
[ { "from": "human", "value": "What are the different types of indexes, what are the benefits of each?\nI heard of covering and clustered indexes, are there more? Where would you use them?\n" }, { "from": "gpt", "value": "Indexes are essential components in database management systems (DBMS) that ...
I have a library A, that I develop. When I deploy it on a machine, the corresponding libA.so and libA-X.Y.Z.so are put in /usr/lib (X.Y.Z being the version number). Now I develop a library B, which uses A. When I link B, I use the flag -lA. Then "ldd libB.so" gives me : (...) libA-X.Y.Z.so => /usr/lib/libA-X.Y.Z.so (...
To address the issue of library versioning and linking in your case, it's essential to understand how the dynamic linker and shared libraries handle versioning and sonames. ### Sonames and Versioning The "soname" (short for "shared object name") is a convention used in shared libraries to indicate the ABI (Application...
26,601
[ { "from": "human", "value": "I have a library A, that I develop. When I deploy it on a machine, the corresponding libA.so and libA-X.Y.Z.so are put in /usr/lib (X.Y.Z being the version number). \nNow I develop a library B, which uses A. When I link B, I use the flag -lA. Then \"ldd libB.so\" gives me : \n(....
Here's the sit: I have a JSF component which is basically a list of 'documents' I have any number of document viewer components on the same page. None of these components "know" about each other. In other words, they cannot be configured at design time to link to each other or anything like that. When the user clicks...
In JSF, while the event model is not as flexible as some other frameworks when it comes to publishing and subscribing to events between components, you can achieve similar functionality by leveraging the concept of an event bus or a custom event mechanism. Here’s a general approach on how you can implement this: ### S...
29,897
[ { "from": "human", "value": "Here's the sit:\n\nI have a JSF component which is basically a list of 'documents'\nI have any number of document viewer components on the same page.\nNone of these components \"know\" about each other. In other words, they cannot be configured at design time to link to each oth...
It currently is 700MB but it's conceivable that it'll grow beyond the 1GB. Normally I just copy this file to another location (for the curious, it's the database of a Zope instance, a ZODB file). This file changes little from day to day, but I understand Bacula can't do inside-the-file subdivision for incremental backu...
Setting up Bacula for your backup strategy is a great approach to ensure data safety, especially for something as important as a database file. Given your requirement to keep two daily backups and two weekly backups, you can certainly achieve this with the right configuration. Here’s a suggestion on how to set up your ...
25,245
[ { "from": "human", "value": "It currently is 700MB but it's conceivable that it'll grow beyond the 1GB. Normally I just copy this file to another location (for the curious, it's the database of a Zope instance,\na ZODB file).\nThis file changes little from day to day, but I understand Bacula can't do inside...
I have a web application at work that is similar to a ticket working system. Some users enter new issues. Other workers choose and resolve issues. All of the data is maintained in MS SQL server 2005. The users working to resolve issues go to a page where they can view open issues. Because up to twenty people can be loo...
You're facing a common challenge in applications that require real-time updates for shared resources, such as your issue tracking system. There are several strategies you can implement to improve performance and reduce the frequency of updates while still providing a responsive user experience. Here are some suggestion...
26,827
[ { "from": "human", "value": "I have a web application at work that is similar to a ticket working system. Some users enter new issues. Other workers choose and resolve issues. All of the data is maintained in MS SQL server 2005.\nThe users working to resolve issues go to a page where they can view open issu...
I'm trying to create a unit test to test the case for when the timezone changes on a machine because it has been incorrectly set and then corrected. In the test I need to be able to create DateTime objects in a none local time zone to ensure that people running the test can do so successfully irrespective of where they...
In .NET, the `DateTime` struct itself does not directly support time zones other than the local time or UTC. However, you can use the `DateTimeOffset` structure, or `DateTime` in combination with `TimeZoneInfo` to work with specific time zones like PST (Pacific Standard Time). Here’s how you can create a `DateTime` o...
29,111
[ { "from": "human", "value": "I'm trying to create a unit test to test the case for when the timezone changes on a machine because it has been incorrectly set and then corrected.\nIn the test I need to be able to create DateTime objects in a none local time zone to ensure that people running the test can do ...
I wrote a managed C++ class that has the following function: void EndPointsMappingWrapper::GetLastError(char* strErrorMessage) { strErrorMessage = (char*) Marshal::StringToHGlobalAnsi(_managedObject->GetLastError()).ToPointer(); } As you can see, this is a simple method to copy the managed string of the last error...
The issue you're encountering stems from the way you are passing the `char* strErrorMessage` parameter into your `GetLastError` method. In your current implementation, the local variable `strErrorMessage` is being reassigned to point to a new memory location (the marshaled string), but this change does not affect the o...
29,043
[ { "from": "human", "value": "I wrote a managed C++ class that has the following function:\nvoid EndPointsMappingWrapper::GetLastError(char* strErrorMessage)\n{\n strErrorMessage = (char*) Marshal::StringToHGlobalAnsi(_managedObject->GetLastError()).ToPointer();\n}\n\nAs you can see, this is a simple meth...
I need to write test cases for my application. I've chosen NUnit. Please let me know how to add NUnit to my Visual Studio IDE. where can I download them?
To add NUnit to your Visual Studio IDE, you can follow these steps: ### Step 1: Install NUnit using NuGet Package Manager 1. **Open your Visual Studio project.** 2. **Go to the "Tools" menu**, then select **"NuGet Package Manager"** and click on **"Manage NuGet Packages for Solution…"**. 3. In the **"Browse"** tab, ...
28,408
[ { "from": "human", "value": "I need to write test cases for my application. I've chosen NUnit. Please let me know how to add NUnit to my Visual Studio IDE. where can I download them?\n" }, { "from": "gpt", "value": "To add NUnit to your Visual Studio IDE, you can follow these steps:\n\n### Step ...
I have a javascript code where i am creating an XML Dom and sending (using XMLHTTP ) it to a codebehind page (server.aspx.cs).How can i read the XML there ?
To read the XML data sent from your JavaScript code to a server-side code behind (such as in an ASP.NET Web Forms application), you can access the request data in the `Page_Load` event of your `.aspx.cs` file. Here’s a step-by-step guide to accomplish this: ### 1. Sending XML from JavaScript First, ensure you are cor...
29,415
[ { "from": "human", "value": "I have a javascript code where i am creating an XML Dom and sending (using XMLHTTP ) it to a codebehind page\n(server.aspx.cs).How can i read the XML there ?\n" }, { "from": "gpt", "value": "To read the XML data sent from your JavaScript code to a server-side code be...
As far as I know there's no way to hint the c# compiler to inline a particular function and I guess it's like that by design. I also think that not letting the programmer to specify what to inline and what not is generally a good idea, as it would imply that you think you're smarter than the JIT compiler (my respects t...
Your understanding is correct: C# and the .NET runtime do not provide a way for developers to explicitly request function inlining. The Just-In-Time (JIT) compiler makes these decisions based on a variety of heuristics that aim to optimize performance generally across all applications and hardware. This design choice i...
25,998
[ { "from": "human", "value": "As far as I know there's no way to hint the c# compiler to inline a particular function and I guess it's like that by design.\nI also think that not letting the programmer to specify what to inline and what not is generally a good idea, as it would imply that you think you're sm...
I need to get a list of all documents in a site collection, which I believe I can do with either the alldocs table or the alluserdata table (MOSS 2007 SP1) but do not see how I can get the author information for the document. I do not need the contents of the document (e.g. AllDocStreams content) Something like this:...
In MOSS 2007 SP1, you can indeed retrieve documents from the `AllUserData` table, and you can also fetch the author information by joining with the `AllUserData` and `AllDocs` tables. The `AllUserData` table contains information about the items (like documents) while the `AllDocs` table contains some additional metadat...
26,983
[ { "from": "human", "value": "I need to get a list of all documents in a site collection, which I believe I can do with either the alldocs table or the alluserdata table (MOSS 2007 SP1) but do not see how I can get the author information for the document. I do not need the contents of the document (e.g. Al...
Does anyone know how to decipher a .NET Runtime Event Id 5000 error? I have run that's logged as: P1: <assembly name>,exe P2: 2.1.4.1 (assembly version) P3: 48b2b154 P4: System P5: 2.0.0.0 P6: 471ebf0d P7: 575 P8: 1d P9: n3ctrye2kn3c34sgl4zqyrbfte4m13nb P10: NIL I assume those are either the register values o...
The .NET Runtime Event ID 5000 error typically indicates a general unhandled exception that occurred in the application, which can happen for various reasons. The details you provided break down the elements of the error, so let’s analyze the parameters step by step: - **P1**: `<assembly name>.exe` - This is the name ...
25,557
[ { "from": "human", "value": "Does anyone know how to decipher a .NET Runtime Event Id 5000 error? I have run that's logged as:\nP1: <assembly name>,exe\nP2: 2.1.4.1 (assembly version)\nP3: 48b2b154\nP4: System\nP5: 2.0.0.0\nP6: 471ebf0d\nP7: 575\nP8: 1d\nP9: n3ctrye2kn3c34sgl4zqyrbfte4m13nb\nP10: N...
I want to read all thumbnails from a folder with images in Windows XP. But if I read image file to get thumbnail, it seems a bit slow, so I wish I can first read the windows image thumbnail cache:thumb.db. Is there any lib in c++ or c to read thumbnails from thumb.db.
Reading thumbnails from the `thumbs.db` file in Windows can be a bit tricky, as it's a proprietary format used by Windows to store thumbnail images. There is no direct C or C++ library specifically designed for accessing `thumbs.db`, but you can use some existing libraries that have functionality to read these files. H...
26,031
[ { "from": "human", "value": "I want to read all thumbnails from a folder with images in Windows XP.\nBut if I read image file to get thumbnail, it seems a bit slow, so I wish I can first read the windows image thumbnail cache:thumb.db.\nIs there any lib in c++ or c to read thumbnails from thumb.db.\n" }, ...
How do you process information in Java that was input from a file. For Example: suppose you have a file input.txt. The contents of this file is: abcdefghizzzzjklmnop azzbcdefghijklmnop My hope would be that the information would be put into the argument array of strings such that the following code would output "ab...
The issue you're facing stems from the way the Java program receives input via the command line when using redirection with `<`. When you run `java Test < input.txt`, it redirects the content of the file as standard input (stdin) to your program. However, your program expects command-line arguments (i.e., the `args` ar...
28,805
[ { "from": "human", "value": "How do you process information in Java that was input from a file. For Example: suppose you have a file input.txt. The contents of this file is: \nabcdefghizzzzjklmnop \nazzbcdefghijklmnop\nMy hope would be that the information would be put into the argument array of strings s...
I can't understand the concept and, first of all, where it belongs. Is it solely a Shrepoint concept or more general like of ASP.NET or IIS level? Does it only affect authentication and if so how does it affect it? Or what effect does it have on an application? I know it is a broad question, but I've googled for about ...
Your understanding is moving in the right direction, and I can clarify this concept for you. ### Zones in SharePoint 1. **General Concept**: Zones in SharePoint are a way to manage authentication and access to web applications. They are specific to SharePoint and not a general concept of ASP.NET or IIS directly, but ...
28,765
[ { "from": "human", "value": "I can't understand the concept and, first of all, where it belongs.\nIs it solely a Shrepoint concept or more general like of ASP.NET or IIS level?\nDoes it only affect authentication and if so how does it affect it? Or what effect does it have on an application?\nI know it is a...
I need to get all the cookies stored in my browser using JavaScript. How can it be done?
You can access and manipulate cookies in your browser using JavaScript via the `document.cookie` property. Here’s how you can retrieve all the cookies stored in your browser: ### Retrieving Cookies To get all the cookies in a single string: ```javascript // Get all cookies const allCookies = document.cookie; // Dis...
26,441
[ { "from": "human", "value": "I need to get all the cookies stored in my browser using JavaScript. How can it be done? \n" }, { "from": "gpt", "value": "You can access and manipulate cookies in your browser using JavaScript via the `document.cookie` property. Here’s how you can retrieve all the c...
I want to call a c# function from my javascript function. I have a link button in my ascx (please see the code below). The problem is that if you press enter in firefox is not working however it is working fine in internet explorer. <li class="clearfix border_top"> <label for="title" class="first_column bold">Search Fo...
To make your `LinkButton` trigger the `btnSearchNow_Click` method when pressing "Enter" in the textbox in both Firefox and other browsers, you will need to add some JavaScript to handle the "Enter" key event. Here is a modified version of your ASCX markup that includes a JavaScript function for this purpose. ### Updat...
29,567
[ { "from": "human", "value": "I want to call a c# function from my javascript function.\nI have a link button in my ascx (please see the code below). The problem is that if you press enter in firefox is not working however it is working fine in internet explorer.\n<li class=\"clearfix border_top\">\n<label f...
Is it possible to have a HasMany relationship of a basic type such as String, on an ActiveRecord class, without the need for creating another entity such as (TodoListItem) to hold the value. [ActiveRecord] public class TodoList { [PrimaryKey] public int Id { get { return _id; } set { _id = value; } } ...
In ActiveRecord or any ORM (Object-Relational Mapping) framework, having a `HasMany` relationship directly with a basic type like `string` is not typically supported without creating an associated entity. This is because the `HasMany` relationship implies that there is a one-to-many relationship between two entities, w...
29,114
[ { "from": "human", "value": "Is it possible to have a HasMany relationship of a basic type such as String, on an ActiveRecord class, without the need for creating another entity such as (TodoListItem) to hold the value.\n[ActiveRecord]\npublic class TodoList\n{\n\n [PrimaryKey]\n public int Id\n {\n g...
I have a 'Purchase Order' class. It contains information about a single purchase order. I have a DAO class for database methods. Where should the responsibility reside for the methods that will load and update the purchase order? Should the PurchaseOrder class have '.update', 'insert', 'delete', and '.load' methods tha...
When designing a system that involves a `PurchaseOrder` class and a Data Access Object (DAO) class, it’s important to maintain a clear separation of concerns. Given your scenario, here are two approaches, along with their pros and cons: ### Option 1: `PurchaseOrder` Class Knows About DAO In this approach, the `Purcha...
27,049
[ { "from": "human", "value": "I have a 'Purchase Order' class. It contains information about a single purchase order. I have a DAO class for database methods.\nWhere should the responsibility reside for the methods that will load and update the purchase order?\nShould the PurchaseOrder class have '.update', ...
What are the advantages and disadvantages of shrinking a database? Are there any performance implications?
Shrinking a database refers to the process of reducing the physical size of the database files, often to reclaim space that was previously occupied by deleted data. While shrinking a database can have some advantages, it also has several disadvantages and potential performance implications. Below are the key points to ...
22,821
[ { "from": "human", "value": "What are the advantages and disadvantages of shrinking a database? Are there any performance implications?\n" }, { "from": "gpt", "value": "Shrinking a database refers to the process of reducing the physical size of the database files, often to reclaim space that was...
Before anyone recommends that I do a google search on this, I have. I just need a bit more clarity around what codepages and encodings. If I use UTF8 encoding, and use an italian code page and then a french code page, does this mean ill get different characters even though the bytes havent changed?
Certainly! Let's clarify the concepts of code pages and encodings, especially in the context of UTF-8, Italian code pages, and French code pages. ### 1. **Encoding:** Encoding refers to the way characters are represented as bytes. UTF-8 is a specific encoding that represents Unicode characters. It can encode every cha...
29,965
[ { "from": "human", "value": "Before anyone recommends that I do a google search on this, I have. I just need a bit more clarity around what codepages and encodings.\nIf I use UTF8 encoding, and use an italian code page and then a french code page, does this mean ill get different characters even though the ...
I am wrestling with a php 5.2.6 problem. An api we use returns dates in this format DDMMYYYYHHMM. Exactly that format, fixed length, no delimiters. However, in my experimentation, this format seems to break strptime, which returns a false (fail) when I feed it a date in this format. It can reproduced, at least on my sy...
The behavior you're observing with `strptime` not working with your specific date format on macOS is indeed related to the underlying implementation of the C library on that platform. The standard C library's `strptime` function can behave inconsistently across different operating systems when it comes to parsing forma...
29,763
[ { "from": "human", "value": "I am wrestling with a php 5.2.6 problem. An api we use returns dates in this format DDMMYYYYHHMM. Exactly that format, fixed length, no delimiters. However, in my experimentation, this format seems to break strptime, which returns a false (fail) when I feed it a date in this for...
I'm writing an intranet application for a client and I want to give them the ability to configure through an admin interface, which users and user groups can access certain areas. What I'd like to know is the best way of storing the reference to the user or group that is assigned to an area of the intranet. Should I b...
When designing an intranet application with user and group access control, the choice of how to reference users and groups in your SQL database is critical for both functionality and maintainability. Here are some considerations for both approaches you mentioned, along with recommendations: ### Options 1. **Using `do...
27,068
[ { "from": "human", "value": "I'm writing an intranet application for a client and I want to give them the ability to configure through an admin interface, which users and user groups can access certain areas. What I'd like to know is the best way of storing the reference to the user or group that is assigne...
I don't understand it. The ids of html elements in the master page are changed by the same id but with a prefix and it's breaking the css design. In the master page I have: <div id="container" runat="server"> <asp:ContentPlaceHolder ... ... The above code is rendered <div id="ctl00_ctloo_container"> ... ...
When you use ASP.NET Web Forms, the framework automatically generates unique IDs for server controls to ensure that there are no conflicts between elements on the page, especially when you have multiple instances of the same controls (like in user controls or repeaters). This is why you're seeing the IDs prefixed with ...
25,247
[ { "from": "human", "value": "I don't understand it. \nThe ids of html elements in the master page are changed by the same id but with a prefix and it's breaking the css design.\nIn the master page I have:\n<div id=\"container\" runat=\"server\">\n\n <asp:ContentPlaceHolder ...\n\n...\n\nThe above code is...
I have a very large C project with many separate C files and headers and many dozens of contributors. Many contributors do not have a strong knowledge of makefiles and dependencies, resulting in the not uncommon problem where you almost always have to "make clean" before you can trust "make" to have produced correct o...
Hi Adam, This is indeed a common challenge in large C projects, particularly when dealing with a mix of experienced and less-experienced developers. The issues you're facing with dependencies and the build system can be quite frustrating, especially when they lead to broken builds. Here are some suggestions and tools ...
27,162
[ { "from": "human", "value": "I have a very large C project with many separate C files and headers and many dozens of contributors. Many contributors do not have a strong knowledge of makefiles and dependencies, resulting in the not uncommon problem where you almost always have to \"make clean\" before you ...
When you lock an object is that object locked throughout the whole application? For Example, this snippet from C# 3.0 in a Nutshell Section 19.6.1 "Thread Safety and .NET Framework Types": static void AddItems( ) { for (int i = 0; i < 100; i++) lock (list) list.Add ("Item " + list.Count); stri...
In C#, when you use the `lock` statement to synchronize access to an object, it prevents other threads from acquiring the same lock on that object until the lock is released. This means that if you lock on the same object (`list` in your example), then no other thread can enter the `lock` block on that object until the...
30,989
[ { "from": "human", "value": "When you lock an object is that object locked throughout the whole application?\nFor Example, this snippet from C# 3.0 in a Nutshell Section 19.6.1 \"Thread Safety and .NET Framework Types\":\nstatic void AddItems( )\n {\n for (int i = 0; i < 100; i++)\n lock (list)\n ...
i want to call a series of .sql scripts to create the initial database structure script1.sql script2.sql etc. is there any way of doing this without sqlcmd or stored procedures or any other kind of code that is not sql ? just inside a .sql file.
If you want to execute multiple SQL scripts sequentially without relying on tools like `sqlcmd` or stored procedures, you can use SQL's built-in capabilities to execute the scripts within a single `.sql` file. While standard SQL does not have a built-in mechanism for including or executing other `.sql` files directly, ...
30,341
[ { "from": "human", "value": "i want to call a series of .sql scripts to create the initial database structure\n\nscript1.sql\nscript2.sql\netc.\n\nis there any way of doing this without sqlcmd or stored procedures or any other kind of code that is not sql ? \njust inside a .sql file.\n" }, { "from":...
I have an issue where we tried to upgrade our TFS 2005 server to 2008. During the install we encountered the error that it could not configure SQL Reporting Services. The log files showed that during the creation/configuration of the virtual directories for SQL Reporting Services (the Reports directory to be exact) a F...
It sounds like you've already done a lot of troubleshooting to resolve the issue with SQL Reporting Services during the upgrade from TFS 2005 to 2008. Here are a few additional suggestions to help you further investigate and potentially resolve the FileNotFoundException you're experiencing: 1. **Check File Paths in Co...
29,953
[ { "from": "human", "value": "I have an issue where we tried to upgrade our TFS 2005 server to 2008. During the install we encountered the error that it could not configure SQL Reporting Services. The log files showed that during the creation/configuration of the virtual directories for SQL Reporting Service...
Sooo...it's only sort of programming related, but I figure it's election day, right? Is there a single good reason why they aren't, not necessarily open source in that anyone can contribute, but open source in that anyone could inspect the source?
Yes, the transparency of election systems is a significant topic of discussion, especially on election days. The idea of making voting software and systems open for inspection has multiple facets: 1. **Transparency**: Open-source software allows anyone to review the code for security vulnerabilities and bugs, which co...
29,718
[ { "from": "human", "value": "Sooo...it's only sort of programming related, but I figure it's election day, right? Is there a single good reason why they aren't, not necessarily open source in that anyone can contribute, but open source in that anyone could inspect the source?\n" }, { "from": "gpt", ...
[This question is related to but not the same as this one.] My compiler warns about implicitly converting or casting certain types to bool whereas explicit conversions do not produce a warning: long t = 0; bool b = false; b = t; // performance warning: forcing long to bool b = (bool)t; /...
The warnings you’re encountering when converting or casting types to `bool` in your C++ code relate to the way the compiler handles different types of conversions, and they often reflect potential inefficiencies or misunderstandings regarding code clarity and intent rather than strict performance implications. ### Key...
26,814
[ { "from": "human", "value": "[This question is related to but not the same as this one.]\nMy compiler warns about implicitly converting or casting certain types to bool whereas explicit conversions do not produce a warning:\nlong t = 0;\nbool b = false;\nb = t; // performance warning: for...
I have an ArrayList<String>, and I want to remove repeated strings from it. How can I do this?
You can remove repeated strings from an `ArrayList<String>` in Java by using a `HashSet`. A `HashSet` automatically eliminates duplicates since it does not allow any duplicate elements. Here’s how you can do it: 1. Create an `ArrayList<String>`. 2. Add elements to the list. 3. Create a `HashSet` from the `ArrayList`. ...
28,777
[ { "from": "human", "value": "I have an ArrayList<String>, and I want to remove repeated strings from it. How can I do this?\n" }, { "from": "gpt", "value": "You can remove repeated strings from an `ArrayList<String>` in Java by using a `HashSet`. A `HashSet` automatically eliminates duplicates s...
I am extending a class defined in a library which I cannot change: public class Parent { public void init(Map properties) { ... } } If I am defining a class 'Child' that extends Parent and I am using Java 6 with generics, what is the best way to override the init method without getting unchecked warnings? public c...
In Java, when you want to override a method that uses raw types (like the `init(Map properties)` method in your `Parent` class), you will encounter issues when you try to introduce generics in the overriding method in your subclass. This is because the method signature must match exactly in terms of type erasure, and u...
30,103
[ { "from": "human", "value": "I am extending a class defined in a library which I cannot change:\npublic class Parent\n{\n public void init(Map properties) { ... }\n}\n\nIf I am defining a class 'Child' that extends Parent and I am using Java 6 with generics, what is the best way to override the init meth...
In ASP.net 2.0, the PreviousPage property of a web page does not have a ViewState collection. I want to use this collection to transfer information between pages.
In ASP.NET 2.0, while the `PreviousPage` property does not have a `ViewState` collection, you can still transfer information between pages using other techniques. Since `ViewState` is specific to each page instance, the common method for sharing data between pages is to use `Session`, `QueryString`, `Form`, or `Server....
24,161
[ { "from": "human", "value": "In ASP.net 2.0, the PreviousPage property of a web page does not have a ViewState collection. I want to use this collection to transfer information between pages.\n" }, { "from": "gpt", "value": "In ASP.NET 2.0, while the `PreviousPage` property does not have a `View...
is there something like a Quickfix in Eclipse IDE available in VisualStudio 2008? Thanks, Okami
Yes, Visual Studio 2008 has a feature similar to Eclipse's Quick Fix, which allows you to quickly resolve issues in your code. This feature is referred to as "IntelliSense" and "Code Fixes" in Visual Studio. Here's how you can use it: 1. **IntelliSense**: While coding, if there are syntax errors or warnings, IntelliS...
28,997
[ { "from": "human", "value": "is there something like a Quickfix in Eclipse IDE available in VisualStudio 2008?\nThanks,\nOkami\n" }, { "from": "gpt", "value": "Yes, Visual Studio 2008 has a feature similar to Eclipse's Quick Fix, which allows you to quickly resolve issues in your code. This feat...
Is there a free XML formatting (indent) tool available where I can past an XML string and have it formatted so I can read the XML document correctly? Thanks Edit ~ I am using XML Notepad on Windows XP.
Yes, there are several free online XML formatting tools available that can help you format and indent XML strings for easier readability. Here are a few options: 1. **XML Formatter**: Websites like [FreeFormatter](https://www.freeformatter.com/xml-formatter.html) or [Code Beautify](https://codebeautify.org/xmlviewer) ...
29,606
[ { "from": "human", "value": "Is there a free XML formatting (indent) tool available where I can past an XML string and have it formatted so I can read the XML document correctly?\nThanks\nEdit ~ I am using XML Notepad on Windows XP.\n" }, { "from": "gpt", "value": "Yes, there are several free on...
I'm looking to write a html sanitiser, and obviously to test/prove that it works properly, I need a set of XSS examples to pitch against it to see how it performs. Here's a nice example from Coding Horror <img src=""http://www.a.com/a.jpg<script type=text/javascript src="http://1.2.3.4:81/xss.js">" /><<img src=""http...
When developing an HTML sanitizer and creating a suite of tests to ensure it effectively removes or neutralizes XSS (Cross-Site Scripting) vulnerabilities, it's important to use a variety of known XSS payloads. Below is a collection of examples you can use to test your sanitizer. These examples vary in complexity and t...
27,048
[ { "from": "human", "value": "I'm looking to write a html sanitiser, and obviously to test/prove that it works properly, I need a set of XSS examples to pitch against it to see how it performs. Here's a nice example from Coding Horror\n<img src=\"\"http://www.a.com/a.jpg<script type=text/javascript \nsrc=\"h...
I've got a series of GIFs that I need to crop on the fly, I'm using a HTTP Handler in C# so I can better encapsulate the code - provide caching for the result etc. Currently, when I draw the existing image to a new Image via the Graphics object all the transparency is lost. I've tried various techniques to try and main...
To maintain the transparency of GIFs when cropping them in C#, you need to ensure that you are handling the image and its pixel data correctly, especially if you are using the `Graphics` object to draw the image. Here’s a straightforward way to crop a GIF while preserving its transparency. ### Steps: 1. **Load the GI...
28,306
[ { "from": "human", "value": "I've got a series of GIFs that I need to crop on the fly, I'm using a HTTP Handler in C# so I can better encapsulate the code - provide caching for the result etc.\nCurrently, when I draw the existing image to a new Image via the Graphics object all the transparency is lost.\nI'...
I'm interested in learning C. I have read K & R, and I have even done some simple C extension work in R and Python. What's a worthwhile project idea for doing something more substantial with C? Any good online resources, similar to Dive Into Python? In particular, resources focused on programmers that already know ...
It's great to hear that you're interested in diving deeper into C! Given your background in programming and your familiarity with concepts in modern languages, you can leverage your existing knowledge while tackling more complex projects in C. Here are a few project ideas and resources tailored to your needs: ### Proj...
26,293
[ { "from": "human", "value": "I'm interested in learning C. I have read K & R, and I have even done some simple C extension work in R and Python. What's a worthwhile project idea for doing something more substantial with C? Any good online resources, similar to Dive Into Python? In particular, resources ...
I have a program that runs osql.exe from microsoft sql server tools directory and runs a script. The problem is that on computers that don't have an installation of sql server, this tool is missing. So my question is whether or not is possible to run it as a standalone( along with any dll that may be required ) meanin...
`osql.exe` is a command-line utility that comes with Microsoft SQL Server. As you've noted, it may not be available on computers that do not have SQL Server installed. Unfortunately, `osql.exe` is not a standalone application and depends on various components of SQL Server to function, including certain DLLs and other ...
28,740
[ { "from": "human", "value": "I have a program that runs osql.exe from microsoft sql server tools directory and runs a script. \nThe problem is that on computers that don't have an installation of sql server, this tool is missing. So my question is whether or not is possible to run it as a standalone( along ...
The Wikipedia article on Effect system is currently just a short stub and I've been wondering for a while as to what is an effect system. Are there any languages that have an effect system in addition to a type system? What would a possible (hypothetical) notation in a mainstream language, that you're familiar, wit...
An **effect system** is a formalism used in programming languages to track and control the computational effects that functions and expressions may have. These effects include things like state changes, input/output operations, exceptions, or other side effects beyond simply returning a value. Effect systems are used t...
25,456
[ { "from": "human", "value": "The Wikipedia article on Effect system is currently just a short stub and I've been wondering for a while as to what is an effect system. \n\nAre there any languages that have an effect system in addition to a type system? \nWhat would a possible (hypothetical) notation in a ma...
I have a web page with DIVs with a mouseover handler that is intended to show a pop-up information bubble. I don't want more than one info bubble to be visible at a time. But when the user moves the mouse rapidly over two items, I sometimes get two bubbles. This should not happen, because the code for showing a pop-up ...
You're correct that JavaScript is single-threaded in the sense that it has a single call stack and executes code sequentially. However, there are certain asynchronous behaviors in JavaScript that could lead to the issue you're experiencing with the pop-up bubbles. ### Potential Issues 1. **Delayed Execution with `set...
27,827
[ { "from": "human", "value": "I have a web page with DIVs with a mouseover handler that is intended to show a pop-up information bubble. I don't want more than one info bubble to be visible at a time. But when the user moves the mouse rapidly over two items, I sometimes get two bubbles. This should not happe...
I have some servers in Europe and some in Asia. I would like to be able to work out where the current server is by querying ... something. Is there some global variable I can query or sp_xxx I can execute to find out the locale of the server?
To determine the locale or geographic location of your SQL Server instance, there are a few approaches you can take, but there isn't a built-in global variable that directly tells you the physical location of the server. However, you can use certain methods to infer this information. ### 1. Using SQL Server System Fun...
29,829
[ { "from": "human", "value": "I have some servers in Europe and some in Asia.\nI would like to be able to work out where the current server is by querying ... something. \nIs there some global variable I can query or sp_xxx I can execute to find out the locale of the server? \n" }, { "from": "gpt", ...
If everything that can be accomplished in MXML can also be accomplished in ActionScript and many things are easier to accomplish in ActionScript (loops, conditionals, etc) why take the time to learn MXML? The best reasons I have at this point are that the structure of the MXML nicely matches the visual hierarchy of the...
You raise a valid point about the relationship between MXML and ActionScript in the context of developing user interfaces, especially in frameworks like Apache Flex (formerly Adobe Flex). Here are several reasons why learning MXML can still be beneficial, despite the advantages of using ActionScript: 1. **Declarative ...
28,029
[ { "from": "human", "value": "If everything that can be accomplished in MXML can also be accomplished in ActionScript and many things are easier to accomplish in ActionScript (loops, conditionals, etc) why take the time to learn MXML?\nThe best reasons I have at this point are that the structure of the MXML ...
Is anyone aware of general UI design guidelines for increasing ad revenue from web ads? Obviously many SO users use adblock, and probably find this type of question reprehensible, but I believe that it is possible to integrate advertising (and other revenue streams) into sites so that they are visually appealing, on-ta...
It's great that you're considering how to effectively integrate advertising into web design in a way that balances aesthetics, functionality, and revenue generation. Here are some general UI design guidelines that can help increase ad revenue while maintaining a positive user experience: ### 1. **Placement Matters** ...
23,392
[ { "from": "human", "value": "Is anyone aware of general UI design guidelines for increasing ad revenue from web ads? Obviously many SO users use adblock, and probably find this type of question reprehensible, but I believe that it is possible to integrate advertising (and other revenue streams) into sites s...
I am using ehCache to store larges amount of data. This cache is accessed about 3 times every second and must be kept up to date. I have a thread that runs which retrieves all the data i need for the cache from the database every minute into a different cache(different cachemanager also). What i want to do is copy the ...
When working with Ehcache, efficiently updating a frequently accessed cache with new data from another cache requires a careful approach to ensure that the updates are both quick and thread-safe. Below are some strategies you can use to achieve this: ### 1. Use a Background Thread to Update the Cache Since you alread...
27,434
[ { "from": "human", "value": "I am using ehCache to store larges amount of data.\nThis cache is accessed about 3 times every second and must be kept up to date.\nI have a thread that runs which retrieves all the data i need for the cache from the database every minute into a different cache(different cachema...
I have a project I'm working on (for school) that I'm digging into the Boost libraries for the solutions. I need some way to distribute the required Boost source code with my application so that it can be compiled without the libraries being installed on the system doing the compiling. (School computers lack just about...
To distribute the required Boost libraries with your application and ensure that it can be compiled without needing to have Boost installed on the system, you will want to use the Boost Copy (BCP) tool effectively. Here’s a step-by-step guide on how to use BCP to copy the necessary files for the Boost Regex library: ...
29,785
[ { "from": "human", "value": "I have a project I'm working on (for school) that I'm digging into the Boost libraries for the solutions. I need some way to distribute the required Boost source code with my application so that it can be compiled without the libraries being installed on the system doing the com...
I just downloaded the ASP.NET MVC beta and wanted to walk through the quickstarts locally. It didn't look like they were installed with the beta installer, and I didn't see an independent download link for them. Is there a place I can find these to save and use locally?
To find the ASP.NET MVC quickstart samples, you can follow these steps: 1. **GitHub Repository**: The official ASP.NET MVC samples and quickstarts are often hosted on GitHub. You can visit the ASP.NET repository on GitHub at [https://github.com/aspnet](https://github.com/aspnet) or directly look for the ASP.NET MVC sa...
31,672
[ { "from": "human", "value": "I just downloaded the ASP.NET MVC beta and wanted to walk through the quickstarts locally. It didn't look like they were installed with the beta installer, and I didn't see an independent download link for them. Is there a place I can find these to save and use locally?\n" }...
I mean other than using it when required for functions, classes, if, while, switch, try-catch. I didn't know that it could be done like this until I saw this SO question. In the above link, Eli mentioned that "They use it to fold up their code in logical sections that don't fall into a function, class, loop, etc. that ...
Using curly braces `{}` to create a new scope in programming (especially in languages like C, C++, Java, JavaScript, etc.) is a technique that can serve a variety of purposes beyond the typical control structures (functions, classes, loops, etc.). Here are some additional uses and considerations for this practice: ###...
26,217
[ { "from": "human", "value": "I mean other than using it when required for functions, classes, if, while, switch, try-catch.\nI didn't know that it could be done like this until I saw this SO question.\nIn the above link, Eli mentioned that \"They use it to fold up their code in logical sections that don't f...
I know a fair bit about the Windows Task Manager in XP, but I would like to understand it better in Vista. What is the difference between "Working Set (Memory)" and "Memory (Private Working Set)". What is the Paged Pool, what is the NP Pool (Non-Paged?). How do I use these to determine what is going on with memory u...
Understanding memory management in Windows Vista can provide deeper insights into how applications use memory and how you can optimize system performance. Let’s break down your questions. ### Working Set vs. Private Working Set 1. **Working Set (Memory)**: This refers to the set of memory pages that are currently bei...
28,625
[ { "from": "human", "value": "I know a fair bit about the Windows Task Manager in XP, but I would like to understand it better in Vista. What is the difference between \"Working Set (Memory)\" and \"Memory (Private Working Set)\". What is the Paged Pool, what is the NP Pool (Non-Paged?). How do I use thes...
Is there a single shortcut to start inserting in the new line at end of the file? I'm aware of G + o combo.
In Vim, the `G` followed by `o` is indeed a common way to move to the end of the file and insert a new line. However, there isn't a single built-in shortcut that directly combines these actions into one. That said, you can create a custom mapping in your `.vimrc` file to achieve this. For example, you can add the fol...
33,381
[ { "from": "human", "value": "Is there a single shortcut to start inserting in the new line at end of the file?\nI'm aware of G + o combo.\n" }, { "from": "gpt", "value": "In Vim, the `G` followed by `o` is indeed a common way to move to the end of the file and insert a new line. However, there i...
Bascially I want to know the best way to hide/show an ASP.NET control from a Javascript function. I figured I would just access the control in Javascript using: var theControl = document.getElementById("txtEditBox"); Then just set the control's Visible property to true/false. It doesn't seem to be working, I can't s...
In ASP.NET, the `Visible` property of a control is a server-side property, which means it cannot be directly manipulated from client-side JavaScript. Instead, you can hide or show an ASP.NET control using CSS properties or by manipulating the control’s style attributes in JavaScript. Here’s how you can do it: ### Ste...
29,682
[ { "from": "human", "value": "Bascially I want to know the best way to hide/show an ASP.NET control from a Javascript function. I figured I would just access the control in Javascript using:\nvar theControl = document.getElementById(\"txtEditBox\");\n\nThen just set the control's Visible property to true/fa...
one of the programs I'm developing at work is reading the registry to figure out how to open files that it is given from another application (we didn't use ShellExecute because we need to process id, and I failed to look at ShellExecuteEx closely enough to see that it gives the process handle, and it's too late now, an...
The use of `%1`, `%l`, and `%L` in the Windows registry to specify command-line arguments has some nuanced conventions, and understanding these can clarify why you see different formats. 1. **%1**: This is the standard placeholder used in Windows to represent the first argument in a command line. When you associate a ...
30,157
[ { "from": "human", "value": "one of the programs I'm developing at work is reading the registry to figure out how to open files that it is given from another application (we didn't use ShellExecute because we need to process id, and I failed to look at ShellExecuteEx closely enough to see that it gives the ...
I am investigating automated testing of an old Win32 application that used ActiveX controls. I am spiking use White (from Thougthworks) that uses Microsoft UIAutomation. I can find the AutomationElement related to the control, but how do I interact with it? Spy++ sees the grid control as a single window, so I can't ta...
Interacting with legacy Win32 applications, especially those using ActiveX controls, can be quite challenging. When dealing with complex controls like SSUltraGrid, which may not expose its internal structure through standard UI Automation interfaces, you may need to take some additional steps. Here’s a general approach...
27,808
[ { "from": "human", "value": "I am investigating automated testing of an old Win32 application that used ActiveX controls. I am spiking use White (from Thougthworks) that uses Microsoft UIAutomation. I can find the AutomationElement related to the control, but how do I interact with it? \nSpy++ sees the grid...
I've been thinking about this problem for a while and have yet to come up with any stable/elegant ideas. I know with MyISAM tables, you can get the table def update time but thats not so true with InnoDB and I've found its not even reliable to look at the .frm file for an idea of when the definition might have been mod...
Monitoring changes to database schema and data efficiently can be a complex problem, particularly with InnoDB in MySQL, where the storage engine abstracts certain details. Your concerns regarding the reliability of the .frm files and the limitations of MyISAM's metadata are valid. Here are some strategies you could con...
27,593
[ { "from": "human", "value": "I've been thinking about this problem for a while and have yet to come up with any stable/elegant ideas.\nI know with MyISAM tables, you can get the table def update time but thats not so true with InnoDB and I've found its not even reliable to look at the .frm file for an idea ...
I've just discovered that Oracle lets you do the following: SELECT foo.a, (SELECT c FROM bar WHERE foo.a = bar.a) from foo As long as only one row in bar matches any row in foo. The explain plan I get from PL/SQL developer is this: SELECT STATEMENT, GOAL = ALL_ROWS TABL...
In the SQL statement you've provided, you're using a correlated subquery within the `SELECT` clause to fetch a value from the `bar` table based on a condition that relates to the `foo` table. The statement looks like this: ```sql SELECT foo.a, (SELECT c FROM bar WHERE foo.a = bar.a) FROM foo...
27,669
[ { "from": "human", "value": "I've just discovered that Oracle lets you do the following:\nSELECT foo.a, (SELECT c \n FROM bar \n WHERE foo.a = bar.a) \nfrom foo\n\nAs long as only one row in bar matches any row in foo.\nThe explain plan I get from PL/SQL developer is this:\nSELEC...
I use screen to persist my work session and connect to the same session from multiple machines. How can I setup SSH and screen such that the XDISPLAY variable inside my persistent screen session is always set to the machine I am currently connecting from? ie. I start the screen session at work and use gvim, which uses ...
To achieve what you're looking for—automatically setting the `DISPLAY` variable in your `screen` session based on the machine you're connecting from—you can use a combination of SSH environment variables and the `screen` configuration. Below are the steps to set this up. ### Step 1: Configure SSH to Forward X11 Make ...
27,876
[ { "from": "human", "value": "I use screen to persist my work session and connect to the same session from multiple machines. How can I setup SSH and screen such that the XDISPLAY variable inside my persistent screen session is always set to the machine I am currently connecting from?\nie. I start the screen...
We primarily use an ASP.NET environment at work. Right now I'm building an application which uses "Modules", which is just a UserControl, with its' Javascript right in the control, and a link element to the stylesheet for that control. I want to keep it modular, and would like the style of this control to be independen...
It sounds like you're on the right track, and it's great that you're considering modularity and separation of concerns in your ASP.NET application. Here's a structured way to handle the styling of your UserControls while keeping the CSS and JavaScript modular and avoid potential issues with HTML validation: ### Recomm...
24,308
[ { "from": "human", "value": "We primarily use an ASP.NET environment at work. Right now I'm building an application which uses \"Modules\", which is just a UserControl, with its' Javascript right in the control, and a link element to the stylesheet for that control. I want to keep it modular, and would like...
I'm having trouble deciding if I want a project of mine to be web-based (as in a web-app), desktop-based (a desktop application), or a desktop application that can sync or connect to the cloud. I don't know if anyone else would have an interest in this application, and it's only going to be for me, so I'm leaning towar...
Choosing the right architecture for your application is a crucial decision, and there are several factors to consider that can help guide you in making the best choice for your project. ### 1. **Determine the Scope and Purpose of Your Application** Since your project is primarily for personal use, think about what yo...
26,522
[ { "from": "human", "value": "I'm having trouble deciding if I want a project of mine to be web-based (as in a web-app), desktop-based (a desktop application), or a desktop application that can sync or connect to the cloud.\nI don't know if anyone else would have an interest in this application, and it's onl...
Is there any reason something like this would not work? This is the logic I have used many times to update a record in a table with LINQ: DataClasses1DataContext db = new DataClasses1DataContext(); User updateUser = db.Users.Single(e => e.user == user); updateUser.InUse = !updateUser.InUse; db.Log = new System.IO.S...
Based on the code snippet and the description you've provided, it seems you're attempting to toggle a boolean field (`InUse`) in a user record within your database using LINQ to SQL. You've noticed that after calling `SubmitChanges()`, your log file is empty, which suggests that no changes are being detected or submitt...
26,318
[ { "from": "human", "value": "Is there any reason something like this would not work?\nThis is the logic I have used many times to update a record in a table with LINQ:\n DataClasses1DataContext db = new DataClasses1DataContext();\n User updateUser = db.Users.Single(e => e.user == user);\n updateUser.InUse =...
How can I make the command button in my VC++ 6.0 dialog visible or invisible on load?
In Visual C++ 6.0, you can make a command button (or any other control) visible or invisible when a dialog is loaded by using the `ShowWindow` method in the dialog's `OnInitDialog` function. This is where you can set the initial state of controls in your dialog. Here's a step-by-step guide: 1. **Open your dialog's hea...
30,221
[ { "from": "human", "value": "How can I make the command button in my VC++ 6.0 dialog visible or invisible on load?\n" }, { "from": "gpt", "value": "In Visual C++ 6.0, you can make a command button (or any other control) visible or invisible when a dialog is loaded by using the `ShowWindow` metho...
Lets say that I have 10,000 regexes and one string and I want to find out if the string matches any of them and get all the matches. The trivial way to do it would be to just query the string one by one against all regexes. Is there a faster,more efficient way to do it? EDIT: I have tried substituting it with DFA's (l...
To efficiently match a single string against a large set of regex patterns and retrieve all matching patterns, you can use a combination of techniques rather than just a naive approach or traditional DFA-based methods. Here are some strategies you might consider: ### 1. Aho-Corasick Algorithm The Aho-Corasick algorith...
25,428
[ { "from": "human", "value": "Lets say that I have 10,000 regexes and one string and I want to find out if the string matches any of them and get all the matches.\nThe trivial way to do it would be to just query the string one by one against all regexes. Is there a faster,more efficient way to do it? \nEDIT:...
I'm using org.w3c XML API to open an existing XML file. I'm removing some nodes , and I'm adding others instead. The problem is that the new nodes that are added are written one after the other, with no newline and no indentation what so ever. While it's true that the XML file is valid , it is very hard for a human to ...
When working with XML in Java using the `org.w3c.dom` API, the default behavior of the XML serializer (when converting a `Document` back to a string or writing it out to a file) does not include any formatting such as indentation or newlines. To achieve pretty-printing of the XML, you typically need to use a transforme...
25,431
[ { "from": "human", "value": "I'm using org.w3c XML API to open an existing XML file. I'm removing some nodes , and I'm adding others instead.\nThe problem is that the new nodes that are added are written one after the other, with no newline and no indentation what so ever. While it's true that the XML file ...
I have a situation where I need to be able to load assemblies in the GAC based on their partial names. In order to do this I have added the following to my app.config file: <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <qualifyAssembly partialName="MyAssembly" fullName...
The issue you're facing stems from the way assembly binding works with configuration files in .NET, particularly with regard to machine-level versus application-level configurations. ### Understanding Assembly Binding 1. **Application Configuration**: The `app.config` file is used for specific applications and will af...
23,332
[ { "from": "human", "value": "I have a situation where I need to be able to load assemblies in the GAC based on their partial names. In order to do this I have added the following to my app.config file:\n<runtime>\n <assemblyBinding xmlns=\"urn:schemas-microsoft-com:asm.v1\">\n <qualifyAssembly partialN...
In a fictitious web application ... The user clicks a link The server starts to prepare the response, but it takes several seconds The user cancels the page load What happens to the request? Does the server continue to prepare the response? Does the response arrive to the browser?
In a typical web application scenario: 1. **User Clicks a Link**: The browser sends an HTTP request to the server to fetch a resource. 2. **Server Prepares Response**: The server starts processing the request. This may involve querying a database, running some server-side logic, or performing other tasks that take ti...
27,728
[ { "from": "human", "value": "In a fictitious web application ...\n\nThe user clicks a link \nThe server starts to prepare the response, but it takes several seconds\nThe user cancels the page load\n\nWhat happens to the request?\nDoes the server continue to prepare the response?\nDoes the response arrive ...
How do people approach mocking out TcpClient (or things like TcpClient)? I have a service that takes in a TcpClient. Should I wrap that in something else more mockable? How should I approach this?
Mocking `TcpClient` and other similar classes can be challenging due to their non-virtual methods and lack of interfaces. However, there are several approaches you can take to facilitate mocking and testing: ### 1. **Create an Abstraction Layer** The most effective way to make `TcpClient` mockable is to create an int...
26,605
[ { "from": "human", "value": "How do people approach mocking out TcpClient (or things like TcpClient)?\nI have a service that takes in a TcpClient. Should I wrap that in something else more mockable? How should I approach this?\n" }, { "from": "gpt", "value": "Mocking `TcpClient` and other simi...
Can anyone reccomend some good tutorials for ext js and adobe air? The ones I have seen seem to start with you knowing a lot or already having a lot of code in place. What I am looking for is a simple step by step guide that takes you through the basics of Ext Js in use with adobe air, in fact i suppose just a good Ext...
Finding beginner-friendly tutorials for Ext JS, especially in combination with Adobe AIR, can be challenging due to the complexity of these technologies. Here are some resources and suggestions that may help you get started: ### Ext JS Beginner Tutorials 1. **Sencha Documentation**: - The official Sencha Ext JS do...
29,062
[ { "from": "human", "value": "Can anyone reccomend some good tutorials for ext js and adobe air? The ones I have seen seem to start with you knowing a lot or already having a lot of code in place.\nWhat I am looking for is a simple step by step guide that takes you through the basics of Ext Js in use with ad...
One problem that I come across regularly and yet don't have a solution to is to restrict or permit access to specific entities in a system. Some companies (banks, for example) have very strict policies regarding which employees may access certain information. For example, an employee at a specific branch may access acc...
Access control can indeed become complex, especially in environments with diverse requirements and a potentially high number of entities. Your scenario is a common challenge across many sectors, especially in finance, healthcare, and enterprise applications. Below is an approach that can help in modeling and developing...
23,861
[ { "from": "human", "value": "One problem that I come across regularly and yet don't have a solution to is to restrict or permit access to specific entities in a system. Some companies (banks, for example) have very strict policies regarding which employees may access certain information. For example, an emp...
I have the following code: using System; using System.Linq; using System.Linq.Expressions; public class Program { public static void Main() { Descendant d = new Descendant(); d.TestMethod(); } } public class Base { protected void FigureItOut<TClass, TMember>(Expression<Func<TClass, TMe...
To solve the problem you are facing without making the entire `Base` class generic, you can use a different approach by leveraging covariance and constraints in your method's signature. Specifically, you can use the `Base` class as is but modify the `FigureItOut` method to use the `Descendant` type constraint. Here’s ...
27,553
[ { "from": "human", "value": "I have the following code:\nusing System;\nusing System.Linq;\nusing System.Linq.Expressions;\n\npublic class Program\n{\n public static void Main()\n {\n Descendant d = new Descendant();\n d.TestMethod();\n }\n}\n\npublic class Base\n{\n protected void...
Is there a programming language "below" Assembly?
Yes, there are several concepts and levels of abstraction below Assembly language, though they might not be considered "programming languages" in the traditional sense. Here are a few of them: 1. **Machine Code**: This is the lowest level of code that a computer's processor can understand directly. It consists of bina...
30,956
[ { "from": "human", "value": "Is there a programming language \"below\" Assembly?\n" }, { "from": "gpt", "value": "Yes, there are several concepts and levels of abstraction below Assembly language, though they might not be considered \"programming languages\" in the traditional sense. Here are a ...
I have an ASP.NET 2.0 web app and part of the structure still has some legacy ASP under the folder /forum/. I haven recently moved my dev environment to a new machine and am now getting: Path '/forum/default.asp' is forbidden when trying to open a page with a .asp extension under the Cassini environment. Any ideas what...
The error message "Path '/forum/default.asp' is forbidden" suggests that there may be an issue with the way permissions are set up in your new development environment, particularly with the Cassini web server (the built-in development server used with ASP.NET). Here are a few things to check that could resolve the iss...
26,733
[ { "from": "human", "value": "I have an ASP.NET 2.0 web app and part of the structure still has some legacy ASP under the folder /forum/. I haven recently moved my dev environment to a new machine and am now getting:\nPath '/forum/default.asp' is forbidden\nwhen trying to open a page with a .asp extension un...
Java has the thread dump which is triggered by a signal 3 sent to the process (e.g. "kill -3 PID"). The equivalent I've found for .NET is to use ADPlus (http://support.microsoft.com/kb/286350). This basically attaches a debugger, takes a mini dump, and executes a few commands. I find .NET's approach to be a very brute ...
In the .NET environment, obtaining a thread dump or stack trace is indeed not as straightforward as sending a signal like in Java. However, there are several alternatives to using ADPlus that can be more efficient or user-friendly: 1. **DebugDiag**: This is a powerful tool from Microsoft that allows you to collect mem...
29,089
[ { "from": "human", "value": "Java has the thread dump which is triggered by a signal 3 sent to the process (e.g. \"kill -3 PID\"). The equivalent I've found for .NET is to use ADPlus (http://support.microsoft.com/kb/286350). This basically attaches a debugger, takes a mini dump, and executes a few commands....
It is good practice to use the main method to test a java/.net class? I've seen it reccommended in some text books, but to me it seems like using a unit testing framework would make more sense... The main method gives you one point of entry to the class and you can test one aspect of the classes functionality. You coul...
Using a `main` method for testing can be useful in certain scenarios, but it typically does not replace the advantages of using a dedicated unit testing framework like JUnit for Java or NUnit for .NET. Here are some points to consider about both approaches: ### Using the Main Method for Testing: **Pros:** 1. **Simpli...
28,426
[ { "from": "human", "value": "It is good practice to use the main method to test a java/.net class?\nI've seen it reccommended in some text books, but to me it seems like using a unit testing framework would make more sense...\nThe main method gives you one point of entry to the class and you can test one as...
My current solution for renaming the project folder is: Remove the project from the solution. Rename the folder outside Visual Studio. Re-add the project to the solution. Is there a better way?
Yes, there is a more streamlined way to rename a project folder within Visual Studio without having to remove and re-add it manually. Here’s a step-by-step guide to rename the project folder: 1. **Close Visual Studio**: It's generally a good idea to close Visual Studio before making file system changes. 2. **Rename t...
30,884
[ { "from": "human", "value": "My current solution for renaming the project folder is:\n\nRemove the project from the solution.\nRename the folder outside Visual Studio.\nRe-add the project to the solution.\n\nIs there a better way?\n" }, { "from": "gpt", "value": "Yes, there is a more streamlined...
In previous versions of VS, if you right-clicked a breakpoint's red dot and selected Disable Breakpoint, the dot would become 'hollow', and clicking it again would re-enable it. But in VS2008, disabling the breakpoint removes the red dot entirely and you need to go to the Breakpoints window to re-enable. Anyone know ho...
It sounds like you're experiencing some issues with breakpoints in Visual Studio 2008, particularly regarding how they are displayed and managed. Unfortunately, in VS2008, the behavior of breakpoints changed, and the hollow dot feature you're familiar with from previous versions was not retained in the same way. Here a...
30,623
[ { "from": "human", "value": "In previous versions of VS, if you right-clicked a breakpoint's red dot and selected Disable Breakpoint, the dot would become 'hollow', and clicking it again would re-enable it. But in VS2008, disabling the breakpoint removes the red dot entirely and you need to go to the Breakp...
My table structure looks like this: tbl.users tbl.issues +--------+-----------+ +---------+------------+-----------+ | userid | real_name | | issueid | assignedid | creatorid | +--------+-----------+ +---------+------------+-----------+ | 1 | test_1 | | 1 | 1 |...
Certainly! To achieve the desired results table, you'll need to join the `users` table twice — once for the `creatorid` and once for the `assignedid`. Here’s how you can construct the SQL query: ```sql SELECT issues.issueid, issues.assignedid, assigned_users.real_name AS assigned_name, issues.creatori...
29,627
[ { "from": "human", "value": "My table structure looks like this:\n tbl.users tbl.issues\n+--------+-----------+ +---------+------------+-----------+\n| userid | real_name | | issueid | assignedid | creatorid |\n+--------+-----------+ +---------+------------+-----------+\n| ...
With the MacPorts version of ImageMagick 6.4.4 installed, I'm getting an error installing the RMagick gem. /opt/local/bin/ruby extconf.rb update rmagick checking for Ruby version >= 1.8.2... yes checking for /usr/bin/gcc-4.0... yes checking for Magick-config... no Can't install RMagick 2.7.0. Can't find Magick-config i...
To install the RMagick gem with ImageMagick from MacPorts on macOS, you need to ensure that the `Magick-config` script, which is necessary for compiling RMagick, is available in your PATH. Here are the steps to help you resolve this issue: 1. **Install ImageMagick with MacPorts**: First, ensure that you have installed...
29,232
[ { "from": "human", "value": "With the MacPorts version of ImageMagick 6.4.4 installed, I'm getting an error installing the RMagick gem.\n/opt/local/bin/ruby extconf.rb update rmagick\nchecking for Ruby version >= 1.8.2... yes\nchecking for /usr/bin/gcc-4.0... yes\nchecking for Magick-config... no\nCan't ins...
I'm trying to design an application to hold academic reference information. The problem is that each different type of reference (eg. journal articles, books, newspaper articles etc) requires different information. For example a journal reference requires both a journal title and an article title, and also a page numb...
Designing a database to hold different types of academic references can indeed be complex, as you have already identified. You have a few common approaches to consider, and each has its pros and cons. ### 1. Single Table with Nullable Fields You could have a single `References` table with nullable fields for all possi...
26,755
[ { "from": "human", "value": "I'm trying to design an application to hold academic reference information. The problem is that each different type of reference (eg. journal articles, books, newspaper articles etc) requires different information. For example a journal reference requires both a journal title a...
I've been using Winforms since .NET 1.1 and I want to start learning WPF. I'm looking for some good resources for a beginner in WPF. What should I read, what tools do I need, and what are the best practices I should follow?
Great to hear that you're looking to transition from WinForms to WPF! WPF (Windows Presentation Foundation) is a powerful framework for building rich desktop applications in Windows. Here’s a structured approach to help you get started: ### Resources for Learning WPF 1. **Books:** - **"WPF Unleashed" by Pavan Podi...
23,733
[ { "from": "human", "value": "I've been using Winforms since .NET 1.1 and I want to start learning WPF.\nI'm looking for some good resources for a beginner in WPF. What should I read, what tools do I need, and what are the best practices I should follow?\n" }, { "from": "gpt", "value": "Great to ...
I have a program that needs to run as a normal user most of the time, but once in a while I need to stop and start a service. How do I go about making a program that runs as a normal user most of the time but elevates into administrator mode for some function?
To create a program that primarily runs as a normal user but can elevate to administrator privileges for specific functions, you can follow these steps based on the platform you are targeting. Below, I'll outline the approach for both Windows and Linux. ### For Windows 1. **Create a Separate Executable for Elevated T...
26,015
[ { "from": "human", "value": "I have a program that needs to run as a normal user most of the time, but once in a while I need to stop and start a service. How do I go about making a program that runs as a normal user most of the time but elevates into administrator mode for some function?\n" }, { "f...
I have a large amount of data I need to store, and be able to generate reports on - each one representing an event on a website (we're talking over 50 per second, so clearly older data will need to be aggregated). I'm evaluating approaches to implementing this, obviously it needs to be reliable, and should be as easy t...
For handling large volumes of event data at a rate of over 50 events per second, while ensuring reliability, scalability, and flexible reporting, you have several architecture choices. Here's a recommended approach, including technologies and considerations for deployment on AWS EC2. ### Recommended Approach 1. **Dat...
26,672
[ { "from": "human", "value": "I have a large amount of data I need to store, and be able to generate reports on - each one representing an event on a website (we're talking over 50 per second, so clearly older data will need to be aggregated).\nI'm evaluating approaches to implementing this, obviously it nee...
I hear a lot of people talking about the revolution that is coming in programming due to multi-core processors and parallelism, but I can't shake the feeling that for most of us, CPU cycles aren't the bottleneck. Pretty much all of my programs have been I/O bound in one way or another (database, filesystem, network, u...
Your assessment is quite accurate, and many developers share your sentiments regarding the current state of programming and performance bottlenecks. Indeed, many applications today tend to be I/O bound rather than CPU bound, and this is particularly true for typical web applications, data processing, and enterprise sof...
26,224
[ { "from": "human", "value": "I hear a lot of people talking about the revolution that is coming in programming due to multi-core processors and parallelism, but I can't shake the feeling that for most of us, CPU cycles aren't the bottleneck. Pretty much all of my programs have been I/O bound in one way or ...
When I type uname -a, it gives the following output. Linux mars 2.6.9-67.0.15.ELsmp #1 SMP Tue Apr 22 13:50:33 EDT 2008 i686 i686 i386 GNU/Linux How can I know from this that the given OS is 32 or 64 bit? This is useful when writing configure scripts, for example: what architecture am I building for?
The output of the `uname -a` command you provided includes several pieces of information about your system. Specifically, you want to determine whether your operating system is 32-bit or 64-bit. Here's how you can interpret the relevant parts of the output: ```plaintext Linux mars 2.6.9-67.0.15.ELsmp #1 SMP Tue Apr 22...
28,268
[ { "from": "human", "value": "When I type uname -a, it gives the following output.\nLinux mars 2.6.9-67.0.15.ELsmp #1 SMP Tue Apr 22 13:50:33 EDT 2008 i686 i686 i386 GNU/Linux\n\nHow can I know from this that the given OS is 32 or 64 bit?\nThis is useful when writing configure scripts, for example: what arch...
We are an all Unix shop (Solaris, Linux). This last product cycle I returned to a project lead capacity, and needed to produce a schedule. I asked what tools my managers would accept, and was surprised to hear "text files". My teammate and I gamely tried this, and probably worse, HTML tables, to track the tasks we want...
TaskJuggler is a powerful project management tool that is well-suited for complex projects, especially in an environment where you may need to manage multiple resources and tasks over an extended period. Here are some insights based on the general experience of users with TaskJuggler: ### Pros: 1. **Declarative Input...
25,861
[ { "from": "human", "value": "We are an all Unix shop (Solaris, Linux). This last product cycle I returned to a project lead capacity, and needed to produce a schedule. I asked what tools my managers would accept, and was surprised to hear \"text files\". My teammate and I gamely tried this, and probably wor...
The thing I've found about TDD is that its takes time to get your tests set up and being naturally lazy I always want to write as little code as possible. The first thing I seem do is test my constructor has set all the properties but is this overkill? My question is to what level of granularity do you write you unit ...
You're touching on some important concepts in Test-Driven Development (TDD) and unit testing. Finding the right level of granularity for your tests is indeed a balancing act. Here are some points to consider: ### Granularity in Unit Testing 1. **Focus on Behavior, Not Implementation**: - Tests should focus on the ...
27,357
[ { "from": "human", "value": "The thing I've found about TDD is that its takes time to get your tests set up and being naturally lazy I always want to write as little code as possible. The first thing I seem do is test my constructor has set all the properties but is this overkill?\nMy question is to what le...
I've introduced visitors as one of core architecture ideas in one of my apps. I have several visitors that operate on a same stuff. Now, how should I test it? Some tests I'm thinking of are a bit larger then a unit test should be (integration test? whatever) but I still wanna do it. How would you test code like the C+...
Testing code that employs the Visitor pattern can indeed be a bit complex, especially when you're dealing with multiple visitors that interact with a set of elements. Since you are considering both unit tests and possibly integration tests, you can adopt a strategy that combines both approaches. Here’s how you can thi...
25,616
[ { "from": "human", "value": "I've introduced visitors as one of core architecture ideas in one of my apps. I have several visitors that operate on a same stuff. Now, how should I test it? Some tests I'm thinking of are a bit larger then a unit test should be (integration test? whatever) but I still wanna d...
I have implemented a pretty simple picture viewer that will allow the user to browse through a collection of images. They are loaded from the Internet, and displayed on the device through a UIImageView object. Something like this: UIImage *image = [[UIImage alloc] initWithData:imageData]; [img setImage:image]; imageDa...
To add a smooth transition effect when changing images in your `UIImageView`, you can use the `UIView` animation methods to fade the old image out and the new image in. Here's a simple way to implement this: 1. Set the new image on a temporary `UIImageView`. 2. Animate the fade-out of the existing image. 3. After the ...
20,665
[ { "from": "human", "value": "I have implemented a pretty simple picture viewer that will allow the user to browse through a collection of images. They are loaded from the Internet, and displayed on the device through a UIImageView object. Something like this:\nUIImage *image = [[UIImage alloc] initWithData:...
A feature of C++ is the ability to create unnamed (anonymous) namespaces, like so: namespace { int cannotAccessOutsideThisFile() { ... } } // namespace You would think that such a feature would be useless -- since you can't specify the name of the namespace, it's impossible to access anything within it from outsid...
Unnamed namespaces in C++ and `static` functions serve similar purposes in controlling the visibility and linkage of variables and functions, but they do have important differences and specific use cases where one may be preferable over the other. ### Key Differences: 1. **Scope of Visibility:** - **Unnamed Namesp...
21,739
[ { "from": "human", "value": "A feature of C++ is the ability to create unnamed (anonymous) namespaces, like so:\nnamespace {\n int cannotAccessOutsideThisFile() { ... }\n} // namespace\n\nYou would think that such a feature would be useless -- since you can't specify the name of the namespace, it's impos...
In order to handle concurrency issue, is locking-- any form of locking, whether it's row, table or database locking a good solution? If not, how to handle concurrency issue?
Locking can be a viable solution to handle concurrency issues, but it has its pros and cons, and it's not always the best or only solution. Here's an overview: ### Advantages of Locking 1. **Data Integrity**: Locking ensures that only one transaction can modify a particular piece of data at a time, which helps prevent...
30,451
[ { "from": "human", "value": "In order to handle concurrency issue, is locking-- any form of locking, whether it's row, table or database locking a good solution?\nIf not, how to handle concurrency issue?\n" }, { "from": "gpt", "value": "Locking can be a viable solution to handle concurrency issu...
We've been fighting with HAProxy for a few days now in Amazon EC2; the experience has so far been great, but we're stuck on squeezing more performance out of the software load balancer. We're not exactly Linux networking whizzes (we're a .NET shop, normally), but we've so far held our own, attempting to set proper ulim...
It sounds like you’ve done quite a bit of investigation into the performance of HAProxy and identified a significant factor affecting your testing with httperf. Here are some thoughts and recommendations based on your findings and common practices to squeeze out more performance: 1. **Socket Reuse Configuration**: Giv...
27,373
[ { "from": "human", "value": "We've been fighting with HAProxy for a few days now in Amazon EC2; the experience has so far been great, but we're stuck on squeezing more performance out of the software load balancer. We're not exactly Linux networking whizzes (we're a .NET shop, normally), but we've so far he...
I'm looking for suggestions on possible IPC mechanisms that I can implement in my self-made OS for an AVR32 board. My current choice is implementing the massage passing mechanism described in the books written by Tanenbaum. Is this a good choice? Are there easier way to implement IPC? Thanks
Implementing inter-process communication (IPC) in your self-made operating system for an AVR32 board is an interesting challenge. Message passing is indeed a solid choice, especially since it's well-documented in educational literature, including Tanenbaum's works. Here are some points to consider about message passing...
27,385
[ { "from": "human", "value": "I'm looking for suggestions on possible IPC mechanisms that I can implement in my self-made OS for an AVR32 board. \nMy current choice is implementing the massage passing mechanism described in the books written by Tanenbaum. \nIs this a good choice? Are there easier way to impl...
I need a method for a user to quickly enter info using a Handheld Symbol MC9090 scanner running windows Mobile 5.0 from a power off state Currently it takes approx 1 min from power off state for user to enter data into a sharepoint list. I need to get the time down to seconds. It takes approx 30secs for handheld to es...
Creating a solution that reduces the time taken to enter data into a SharePoint list using a Handheld Symbol MC9090 scanner running Windows Mobile 5.0 can involve several approaches. Here's a method that could work for your situation: ### Developing a Custom Mobile Application 1. **Custom Application Development**: ...
21,220
[ { "from": "human", "value": "I need a method for a user to quickly enter info using a Handheld Symbol MC9090 scanner running windows Mobile 5.0 from a power off state\nCurrently it takes approx 1 min from power off state for user to enter data into a sharepoint list. I need to get the time down to seconds. ...
I'm looking at stdint.h and given that it has uint16_t and uint_fast16_t, what is the use for uint_least16_t what might you want that couldn't be done equally well with one of the other two?
In C, the `<stdint.h>` header provides fixed-width integer types like `uint16_t` and types with fast and least capabilities such as `uint_fast16_t` and `uint_least16_t`. Each of these types serves different purposes based on performance and memory requirements. ### Definitions: - **`uint16_t`**: This is an unsigned in...
29,418
[ { "from": "human", "value": "I'm looking at stdint.h and given that it has uint16_t and uint_fast16_t, what is the use for uint_least16_t what might you want that couldn't be done equally well with one of the other two?\n" }, { "from": "gpt", "value": "In C, the `<stdint.h>` header provides fixe...
I'm investigating using MSMQ for my team's new project but I need to know if I can send MSMQ messages and execute SQL commands within a System.Transactions.TransactionScope and have them commit or rollback together. I can't find a reliable source online that says "yes" with code examples. I need to send some messages ...
Yes, you can use `System.Transactions.TransactionScope` to manage both MSMQ messages and SQL commands in a single transaction. This allows you to send messages to MSMQ and perform database operations that either commit or rollback together based on the success of your operations. **Key Points:** 1. **MSMQ and SQL Ser...
30,461
[ { "from": "human", "value": "I'm investigating using MSMQ for my team's new project but I need to know if I can send MSMQ messages and execute SQL commands within a System.Transactions.TransactionScope and have them commit or rollback together. I can't find a reliable source online that says \"yes\" with co...
I have code from PowerBuilder 5 that can't be built. The compiler just stops before it is done without any error codes. I would like to upgrade the code to the recent version of PowerBuilder but there are some intermediate versions of PowerBuilder that have binary dependencies to an old Microsoft java dll that Microsof...
Upgrading legacy PowerBuilder applications can be challenging, especially when dealing with old dependencies and compatibility issues. Here are some steps you can take to address the situation: 1. **Analyze the Codebase**: Before upgrading, ensure you understand the code, especially any custom objects, external depend...
29,138
[ { "from": "human", "value": "I have code from PowerBuilder 5 that can't be built. The compiler just stops before it is done without any error codes.\nI would like to upgrade the code to the recent version of PowerBuilder but there are some intermediate versions of PowerBuilder that have binary dependencies ...
I've got a web system where users log in, and it stores a cookie of their session. When they log in as someone else or log out I want to remove that original cookie that I stored. What's the best way to do that? I'm using Python and Apache, though I suppose the answer will remain the same for most languages.
To manage session cookies properly in a web application, especially when users can log in and log out, you can follow these steps to ensure that the original session cookie is cleared appropriately when a user logs out or logs in as a different user. ### General Steps to Remove a Cookie 1. **Set the Cookie Expiratio...
25,248
[ { "from": "human", "value": "I've got a web system where users log in, and it stores a cookie of their session. When they log in as someone else or log out I want to remove that original cookie that I stored. What's the best way to do that?\nI'm using Python and Apache, though I suppose the answer will rema...