instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I'm looking to find alternatives to Solr from the Apache Software Foundation.
For those that don't know, Solr is an enterprise search server. A client application uses a web-services like interface to submit documents for indexing and also to perform search queries. Solr has other features built in like caching and re... | If you're looking for alternatives to Apache Solr, there are several other search servers and frameworks that you can consider, each with its own strengths and features. Here are some prominent alternatives:
1. **Elasticsearch**:
- A distributed, RESTful search and analytics engine built on top of Apache Lucene.
... | 3,590 | [
{
"from": "human",
"value": "I'm looking to find alternatives to Solr from the Apache Software Foundation. \nFor those that don't know, Solr is an enterprise search server. A client application uses a web-services like interface to submit documents for indexing and also to perform search queries. Solr has o... |
Essentially I want to know if in VB.NET 2005 if using a sqlcommand and then reusing it by using the NEW is wrong. Will it cause a memory leak.
EG:
try
dim mySQL as new sqlcommand(sSQL, cnInput)
// do a sql execute and read the data
mySQL = new sqlcommand(sSQLdifferent, cnInput)
// do sql execute and read the data... | In VB.NET (including version 2005), the use of `SqlCommand` as shown in your code will not inherently cause a memory leak, but there are some best practices and considerations to ensure resource management is handled properly.
### Understanding the Code
1. **Instantiating SqlCommand**: When you create a new instance ... | 3,250 | [
{
"from": "human",
"value": "Essentially I want to know if in VB.NET 2005 if using a sqlcommand and then reusing it by using the NEW is wrong. Will it cause a memory leak.\nEG:\ntry\n\ndim mySQL as new sqlcommand(sSQL, cnInput)\n\n// do a sql execute and read the data \n\nmySQL = new sqlcommand(sSQLdiffere... |
This query works great:
var pageObject = (from op in db.ObjectPermissions
join pg in db.Pages on op.ObjectPermissionName equals page.PageName
where pg.PageID == page.PageID
select op)
.SingleOrDefault();
I get a new type with my 'op' fields. Now I... | To retrieve fields from both the `ObjectPermissions` and `Pages` tables and combine them into a single object, you need to either create a new type that can hold both `op` and `pg` fields or use an anonymous type.
Here's how you can do it with a new type:
1. First, define a new class that contains properties for both... | 3,645 | [
{
"from": "human",
"value": "This query works great:\nvar pageObject = (from op in db.ObjectPermissions\n join pg in db.Pages on op.ObjectPermissionName equals page.PageName\n where pg.PageID == page.PageID\n select op)\n .SingleOrDefault();... |
In my example below I'm using a dijit.form.DateTextBox:
<input type="text" name="startDate" dojoType="dijit.form.DateTextBox" constraints="{datePattern:'MM/dd/yyyy'}" value='<c:out value="${sessionScope.adminMessageForm.startDate}"/>' />
So for example, if the user starts to enter "asdf" into the date the field turns... | To prevent validation in particular circumstances while still using the `dijit.form.DateTextBox` in Dojo, you can take advantage of the `onBlur` event to manually control the validation state of the date text box. You can override the default validation behavior by implementing your own logic in the event handler.
Her... | 3,659 | [
{
"from": "human",
"value": "In my example below I'm using a dijit.form.DateTextBox:\n<input type=\"text\" name=\"startDate\" dojoType=\"dijit.form.DateTextBox\" constraints=\"{datePattern:'MM/dd/yyyy'}\" value='<c:out value=\"${sessionScope.adminMessageForm.startDate}\"/>' />\n\nSo for example, if the use... |
Reading this question I found this as (note the quotation marks) "code" to solve the problem (that's perl by the way).
100,{)..3%!'Fizz'*\5%!'Buzz'*+\or}%n*
Obviously this is an intellectual example without real (I hope to never see that in real code in my life) implications but, when you have to make the choice, whe... | Your question touches on a common dilemma in software development: balancing code readability with performance. It's a nuanced issue and can vary greatly depending on the context of your project, the team you're working with, and the long-term goals for the codebase. Here are some strategies and considerations to help ... | 2,097 | [
{
"from": "human",
"value": "Reading this question I found this as (note the quotation marks) \"code\" to solve the problem (that's perl by the way). \n100,{)..3%!'Fizz'*\\5%!'Buzz'*+\\or}%n*\n\nObviously this is an intellectual example without real (I hope to never see that in real code in my life) implica... |
For a C# UserControl on Windows Mobile (though please answer if you know it for full Windows...it might work) how do you change what shows up in the Designer Properties window for one of the Control's public Properties. For example:
private Color blah = Color.Black;
public Color Blah
{
get { return this.blah; }
... | In order to control how a property appears in the Properties window of the Visual Studio designer, you can use attributes from the `System.ComponentModel` namespace. Since you are targeting Windows Mobile (which uses a limited subset of the full .NET Framework), some attributes may not be available, but many common one... | 3,983 | [
{
"from": "human",
"value": "For a C# UserControl on Windows Mobile (though please answer if you know it for full Windows...it might work) how do you change what shows up in the Designer Properties window for one of the Control's public Properties. For example:\nprivate Color blah = Color.Black;\n\npublic ... |
I'm interested in doing comparisons between the date string and the MySQL timestamp. However, I'm not seeing an easy conversion. Am I overlooking something obvious?
| When working with date strings and MySQL timestamps, you can indeed perform comparisons by converting both formats to a common format. Here's how you can handle conversions:
1. **MySQL TIMESTAMP Format**: MySQL timestamps are typically in the format `YYYY-MM-DD HH:MM:SS`.
2. **Date String Format**: If your date strin... | 2,994 | [
{
"from": "human",
"value": "I'm interested in doing comparisons between the date string and the MySQL timestamp. However, I'm not seeing an easy conversion. Am I overlooking something obvious?\n"
},
{
"from": "gpt",
"value": "When working with date strings and MySQL timestamps, you can indeed p... |
I've tried to do this several times with no luck. After reading this post, it made me interested in doing this again. So can anyone tell me why the following doesn't work?
<?php
$guest = 1;
$editor = 2;
$admin = 4;
$user = $editor;
if( $user == ($editor | $admin) ) {
echo "Test";
}
?>
| In your PHP code, you're using bitwise operations to compare user roles, which is a common technique for managing permissions using flags. Let's break down what you've written and why it doesn't work as you might expect.
### Code Explanation
1. You define three user roles using integers:
- `$guest = 1;` (binary `00... | 3,998 | [
{
"from": "human",
"value": "I've tried to do this several times with no luck. After reading this post, it made me interested in doing this again. So can anyone tell me why the following doesn't work?\n<?php\n\n$guest = 1;\n$editor = 2;\n$admin = 4;\n\n$user = $editor;\n\nif( $user == ($editor | $admin) )... |
I have a Java swing application with a panel that contains three JComboBoxes that do not draw properly.
The combox boxes just show up as the down arrow on the right side, but without the label of the currently selected value.
The boxes will redraw correctly if the window is resized either bigger or smaller by even one ... | This issue with JComboBoxes in Java Swing, where they do not display their selected item correctly until the window is resized, can often stem from how the layout is managed or how the components are painted. Here are several strategies you can try to resolve the problem:
1. **Revalidate and Repaint**: Ensure you're c... | 3,402 | [
{
"from": "human",
"value": "I have a Java swing application with a panel that contains three JComboBoxes that do not draw properly.\nThe combox boxes just show up as the down arrow on the right side, but without the label of the currently selected value.\nThe boxes will redraw correctly if the window is re... |
What do *args and **kwargs mean in these function definitions?
def foo(x, y, *args):
pass
def bar(x, y, **kwargs):
pass
See What do ** (double star/asterisk) and * (star/asterisk) mean in a function call? for the complementary question about arguments.
| In Python, `*args` and `**kwargs` are used in function definitions to allow for variable numbers of arguments. Here's a breakdown of what each of them means:
### `*args`
- The `*args` syntax allows you to pass a variable number of positional arguments to a function.
- Inside the function, `args` is treated as a tuple... | 4,189 | [
{
"from": "human",
"value": "What do *args and **kwargs mean in these function definitions?\ndef foo(x, y, *args):\n pass\n\ndef bar(x, y, **kwargs):\n pass\n\n\nSee What do ** (double star/asterisk) and * (star/asterisk) mean in a function call? for the complementary question about arguments.\n"
},... |
I'm looking for a way to visually mark or tag a window (any OS) so that it stands out.
A while back, I accidentally replaced a live production database containing thousands of records with an empty dev version, simply because the two instances of Enterprise Manager looked identical to one another. I'd like to avoid tha... | It's crucial to have a clear visual distinction between different environments, especially in cases like managing databases. Here are some strategies you can use on various operating systems to visually mark or tag a window:
### General Tips (Cross-platform):
1. **Use Different Themes**:
- Change the color theme or... | 4,273 | [
{
"from": "human",
"value": "I'm looking for a way to visually mark or tag a window (any OS) so that it stands out.\nA while back, I accidentally replaced a live production database containing thousands of records with an empty dev version, simply because the two instances of Enterprise Manager looked ident... |
Original Question
I am currently engaged in teaching my brother to program. He is a total beginner, but very smart. (And he actually wants to learn). I've noticed that some of our sessions have gotten bogged down in minor details, and I don't feel I've been very organized. (But the answers to this post have helped a ... | It's great that you're teaching your brother programming, and there are many effective ways to do this, especially with Python! Here are some tips and resources to help structure your sessions and make learning engaging:
### Teaching Tips:
1. **Start with the Basics**: Begin with fundamental concepts such as variables... | 2,621 | [
{
"from": "human",
"value": "Original Question\nI am currently engaged in teaching my brother to program. He is a total beginner, but very smart. (And he actually wants to learn). I've noticed that some of our sessions have gotten bogged down in minor details, and I don't feel I've been very organized. (B... |
I'm building an excel template (*.xlt) for a user here, and one of the things I want to do is have it insert the current date when a new document is created (ie, when they double-click the file in windows explorer). How do I do this?
Update: I should have added that I would prefer not to use any vba (macro). If that'... | If you want to automatically insert the current date into an Excel template (`*.xlt`) without using VBA (macros), you can utilize Excel's built-in formula capabilities along with some initial setup. Here’s how you can do that:
### Steps to Insert Current Date Automatically
1. **Open Excel and Create a New Template:**... | 3,746 | [
{
"from": "human",
"value": "I'm building an excel template (*.xlt) for a user here, and one of the things I want to do is have it insert the current date when a new document is created (ie, when they double-click the file in windows explorer). How do I do this?\nUpdate: I should have added that I would pr... |
I have a ASP.NET application that we've written our own logging module for.
My question is, where is the standard place to write a log file to? I.e. the website will be running as the anonymous user identity (e.g. IUSR on IIS7) and I need a place where I know it'll have permission to write to.
Cheers,
| When developing an ASP.NET application, it’s important to choose a location for your log files that both adheres to security practices and ensures that the application has the necessary permissions to write to it.
Here are some recommended locations where you can safely write log files:
1. **App_Data Directory**:
... | 1,025 | [
{
"from": "human",
"value": "I have a ASP.NET application that we've written our own logging module for.\nMy question is, where is the standard place to write a log file to? I.e. the website will be running as the anonymous user identity (e.g. IUSR on IIS7) and I need a place where I know it'll have permiss... |
I need to know about Epoll On linux System.
Could you recommend manual or guides about epoll library?
need more detailed guides. it's better to have some examples.
help me. and Thank you for reading.
| Epoll is a scalable I/O event notification mechanism available in Linux. It is particularly useful for handling large numbers of file descriptors, making it ideal for high-performance servers and applications. Here are some resources and examples that can help you understand and use `epoll` effectively.
### Documentat... | 131 | [
{
"from": "human",
"value": "I need to know about Epoll On linux System.\nCould you recommend manual or guides about epoll library?\nneed more detailed guides. it's better to have some examples.\nhelp me. and Thank you for reading.\n"
},
{
"from": "gpt",
"value": "Epoll is a scalable I/O event n... |
I see in the MATLAB help (matlab -h) that I can use the -r flag to specify an m-file to run. I notice when I do this, MATLAB seems to start the script, but immediately return. The script processes fine, but the main app has already returned.
Is there any way to get MATLAB to only return once the command is finished? If... | When you use the `-r` flag to run a MATLAB script or command, MATLAB starts the script and immediately returns to the calling process, which is why you see MATLAB exit before your script finishes executing. The main MATLAB session terminates as soon as the command associated with `-r` is complete, even if there are rem... | 3,976 | [
{
"from": "human",
"value": "I see in the MATLAB help (matlab -h) that I can use the -r flag to specify an m-file to run. I notice when I do this, MATLAB seems to start the script, but immediately return. The script processes fine, but the main app has already returned.\nIs there any way to get MATLAB to on... |
How can I call a custom action dll written in managed code (.net) from an installer without using an unmanaged intermediary?
| Calling a custom action DLL written in managed code (.NET) from an installer can be challenging because standard Windows Installer (MSI) does not directly support managed code. However, there are ways to execute managed code during the installation process without resorting to unmanaged intermediaries. Here are several... | 2,677 | [
{
"from": "human",
"value": "How can I call a custom action dll written in managed code (.net) from an installer without using an unmanaged intermediary?\n"
},
{
"from": "gpt",
"value": "Calling a custom action DLL written in managed code (.NET) from an installer can be challenging because stand... |
I was writing some ASP.NET control when I came to the scenario where I needed to remove items from a list, only when they matched a certain condition.
The RemoveAll method of the generic List class does a good job, but removes all items that match the condition, specified by the predicate.
What if I want to only remove... | To remove a specific number of items from a list based on a condition in C#, you can create a custom method that iterates through the list and removes items one by one until the specified limit is reached. The `RemoveAll` method is useful for removing all items that match a condition, but if you need to limit the numbe... | 843 | [
{
"from": "human",
"value": "I was writing some ASP.NET control when I came to the scenario where I needed to remove items from a list, only when they matched a certain condition.\nThe RemoveAll method of the generic List class does a good job, but removes all items that match the condition, specified by th... |
As a long time Microsoft developer, I find MSDN to be an invaluable resource.
However, when tinkering at home I am not able to play with the best latest technologies and the different offerings coming from Microsoft as I cannot justify paying such a hefty price for what is essentially a pastime.
The Express editions ar... | It's great to hear that you're passionate about staying up-to-date with Microsoft's technologies! There are several options you might consider to access MSDN subscriptions or similar resources at a more acceptable price for personal or non-professional use:
1. **Visual Studio Dev Essentials**: This program is free and... | 3,748 | [
{
"from": "human",
"value": "As a long time Microsoft developer, I find MSDN to be an invaluable resource.\nHowever, when tinkering at home I am not able to play with the best latest technologies and the different offerings coming from Microsoft as I cannot justify paying such a hefty price for what is esse... |
My team is currently trying to automate the deployment of our .Net and PHP web applications. We want to streamline deployments, and to avoid the hassle and many of the headaches caused by doing it manually.
We require a solution that will enable us to:
- Compile the application
- Version the application with the SV... | Certainly! There are several deployment tools and solutions that can help automate the deployment of your .NET and PHP web applications while addressing your specific requirements. Here are some options to consider:
### 1. **Octopus Deploy**
Octopus Deploy is a powerful deployment automation tool that integrates well ... | 3,787 | [
{
"from": "human",
"value": "My team is currently trying to automate the deployment of our .Net and PHP web applications. We want to streamline deployments, and to avoid the hassle and many of the headaches caused by doing it manually.\nWe require a solution that will enable us to:\n- Compile the applicatio... |
What techniques do people use to "consume" services in the REST stile on .Net ? Plain http client? Related to this: many rest services are now using JSON (its tighter and faster) - so what JSON lib is used?
| In the .NET ecosystem, developers have various techniques and libraries at their disposal for consuming RESTful services. Here are the primary methods and the commonly used JSON libraries:
### Techniques to Consume REST Services in .NET:
1. **HttpClient**:
- The most common and recommended way to consume REST serv... | 1,859 | [
{
"from": "human",
"value": "What techniques do people use to \"consume\" services in the REST stile on .Net ? Plain http client? Related to this: many rest services are now using JSON (its tighter and faster) - so what JSON lib is used? \n"
},
{
"from": "gpt",
"value": "In the .NET ecosystem, d... |
My company has tried to adopt the scrum methodology with mixed success. Theses are some areas where we've had issues. How do you handle these?
Tracking requirements from
Product Marketing through to product. We're trying out JIRA to track all requirements individually and assigning a release to each one as it is p... | Adopting Scrum can be a challenge, especially in organizations where roles and responsibilities are not well-defined or where communication between teams is not effective. Here are some suggestions on how to address the specific issues you've mentioned:
### 1. Tracking Requirements
- **Using JIRA Effectively**: It's ... | 2,610 | [
{
"from": "human",
"value": "My company has tried to adopt the scrum methodology with mixed success. Theses are some areas where we've had issues. How do you handle these? \n\nTracking requirements from\nProduct Marketing through to product. We're trying out JIRA to track all requirements individually an... |
I am wrapping existing C++ code from a BSD project in our own custom wrapper and I want to integrate it to our code with as few changes as possible. This code uses fprintf to print to stderr in order to log / report errors.
I want to redirect this to an alternative place within the same process. On Unix I have done thi... | Redirecting `stderr` within the same process on Windows can be a bit tricky, especially when you want to capture the output in real-time without creating a child process. You can achieve this using a combination of `CreatePipe`, `SetHandleInformation`, and a thread to read from the pipe. Here's how you can do it:
1. *... | 248 | [
{
"from": "human",
"value": "I am wrapping existing C++ code from a BSD project in our own custom wrapper and I want to integrate it to our code with as few changes as possible. This code uses fprintf to print to stderr in order to log / report errors.\nI want to redirect this to an alternative place within... |
I've been given a job of 'translating' one language into another. The source is too flexible (complex) for a simple line by line approach with regex. Where can I go to learn more about lexical analysis and parsers?
| To learn more about lexical analysis and parsers, you can explore a variety of resources, including books, online courses, and tutorials. Here are some recommendations to help you get started:
### Books
1. **"Compilers: Principles, Techniques, and Tools" (The Dragon Book) by Alfred V. Aho, Monica S. Lam, Ravi Sethi, a... | 3,685 | [
{
"from": "human",
"value": "I've been given a job of 'translating' one language into another. The source is too flexible (complex) for a simple line by line approach with regex. Where can I go to learn more about lexical analysis and parsers?\n"
},
{
"from": "gpt",
"value": "To learn more about... |
I have a basic CRUD form that uses PageMethods to update the user details, however the Validators don't fire off, I think I need to manually initialize the validators and check whether the validation has passed in my javascript save method. Any ideas on how to do this?
| Certainly! In ASP.NET Web Forms, when using PageMethods or AJAX to perform CRUD operations, the client-side validation might not trigger automatically unless you specifically handle it in your JavaScript.
Here's how to manually initialize the validators and check if the validation has passed before calling your PageMe... | 2,761 | [
{
"from": "human",
"value": "I have a basic CRUD form that uses PageMethods to update the user details, however the Validators don't fire off, I think I need to manually initialize the validators and check whether the validation has passed in my javascript save method. Any ideas on how to do this?\n"
},
... |
Which is better? Or use and OR mapper with SP's? If you have a system with SP's already, is an OR mapper worth it?
| The decision to use an Object-Relational Mapper (ORM) alongside stored procedures (SPs) depends on various factors, including your project's requirements, existing architecture, team expertise, and performance considerations. Below are some pros and cons of both approaches to help you determine what might be better for... | 3,032 | [
{
"from": "human",
"value": "Which is better? Or use and OR mapper with SP's? If you have a system with SP's already, is an OR mapper worth it? \n"
},
{
"from": "gpt",
"value": "The decision to use an Object-Relational Mapper (ORM) alongside stored procedures (SPs) depends on various factors,... |
Thinking about a Windows-hosted build process that will periodically drop files to disk to be replicated to several other Windows Servers in the same datacenter. The other machines would run IIS, and serve those files to the masses.
The total corpus size would be millions of files, 100's of GB of data. It'd have to d... | There are several strategies and solutions you can consider for replicating a large number of files across multiple Windows Servers. Each has its own strengths and weaknesses, and the best choice often depends on your specific requirements, such as budget, complexity, performance, and fault tolerance. Here are some add... | 4,014 | [
{
"from": "human",
"value": "Thinking about a Windows-hosted build process that will periodically drop files to disk to be replicated to several other Windows Servers in the same datacenter. The other machines would run IIS, and serve those files to the masses.\nThe total corpus size would be millions of f... |
Can anyone point me to a good resource (or throw me a clue) to show me how to do DataBinding to controls (ComboBox, ListBox, etc.) in WPF? I'm at a bit of a loss when all my WinForms niceities are taken away from me, and I'm not all that bright to start with...
| Welcome to WPF! Data binding in WPF is a powerful feature that allows you to connect your UI controls to data sources easily. Here’s a brief guide to get you started with data binding for controls like ComboBox and ListBox in WPF.
### Basic Concepts
1. **DataContext**: This is the property that sets the source of you... | 3,117 | [
{
"from": "human",
"value": "Can anyone point me to a good resource (or throw me a clue) to show me how to do DataBinding to controls (ComboBox, ListBox, etc.) in WPF? I'm at a bit of a loss when all my WinForms niceities are taken away from me, and I'm not all that bright to start with...\n"
},
{
... |
I have been using PHP and JavaScript for building my dad's website. He wants to incorporate a login system into his website, and I have the design for the system using PHP. My problem is how do I show buttons if the person is logged in?... | To achieve the desired functionality of showing different buttons based on whether a user is logged in (and possibly their role, such as dealer or distributor), you can effectively use both PHP and JavaScript together.
### Basic Concept
1. **PHP**: This will handle the backend logic to check if a user is logged in an... | 1,899 | [
{
"from": "human",
"value": "I have been using PHP and JavaScript for building my dad's website. He wants to incorporate a login system into his website, and I have the design for the system using PHP. My problem is how do I show buttons if the person is logged in?... |
I've seen this all over the place:
Download here! SHA1 =
8e1ed2ce9e7e473d38a9dc7824a384a9ac34d7d0
What does it mean? How does a hash come into play as far as downloads and... What use can I make of it? Is this a legacy item where you used to have to verify some checksum after you downloaded the whole file?
| The SHA1 value you’ve encountered is a hash, specifically a SHA-1 hash. It is often used to verify the integrity of files downloaded from the internet. Here’s a breakdown of what this means and how it can be useful:
### What is a SHA-1 Hash?
- **SHA-1**: This stands for Secure Hash Algorithm 1. It generates a 160-bit... | 3,059 | [
{
"from": "human",
"value": "I've seen this all over the place: \n\nDownload here! SHA1 =\n 8e1ed2ce9e7e473d38a9dc7824a384a9ac34d7d0\n\nWhat does it mean? How does a hash come into play as far as downloads and... What use can I make of it? Is this a legacy item where you used to have to verify some checks... |
foreach ($_GET as $field => $label)
{
$datarray[]=$_GET[$field];
echo "$_GET[$field]";
echo "<br>";
}
print_r($datarray);
This is the output I am getting. I see the data is there in datarray but when
I echo $_GET[$field]
I only get "Array"
But print_r($datarray) prints all the data. Any idea how I pull thos... | The behavior you're experiencing is related to how PHP handles nested arrays. Based on the output you provided, it seems that some of the values in the `$_GET` array are themselves arrays, which is why you're seeing "Array" when you try to echo them directly.
When you echo an array in PHP, it will output "Array" inste... | 3,860 | [
{
"from": "human",
"value": "foreach ($_GET as $field => $label)\n{\n $datarray[]=$_GET[$field];\n echo \"$_GET[$field]\";\n echo \"<br>\";\n}\nprint_r($datarray);\n\n\nThis is the output I am getting. I see the data is there in datarray but when\nI echo $_GET[$field] \nI only get \"Array\"\nBut print... |
I'm writing a Perl script and would like to use a n-ary tree data structure.
Is there a good implementation that is available as source code (rather than part of a Perl library) ?
| Certainly! Below is a simple implementation of an n-ary tree in Perl. This implementation allows you to create nodes, add children, and traverse the tree. You can easily extend or modify it according to your specific requirements.
```perl
package NaryTreeNode;
sub new {
my ($class, $value) = @_;
my $self = {
... | 2,813 | [
{
"from": "human",
"value": "I'm writing a Perl script and would like to use a n-ary tree data structure.\nIs there a good implementation that is available as source code (rather than part of a Perl library) ?\n"
},
{
"from": "gpt",
"value": "Certainly! Below is a simple implementation of an n-a... |
I've seen different program managers write specs in different format. Almost every one has had his/her own style of writing a spec.
On one hand are those wordy documents which given to a programmer are likely to cause him/her missing a few things. I personally dread the word documents spec...I think its because of my r... | Your observations about the different formats for writing specifications are quite insightful. The approach a program manager or product owner takes can indeed have a significant impact on how well the specifications are understood and implemented by developers and testers.
### Strengths of Using Excel for Specs
1. *... | 2,613 | [
{
"from": "human",
"value": "I've seen different program managers write specs in different format. Almost every one has had his/her own style of writing a spec.\nOn one hand are those wordy documents which given to a programmer are likely to cause him/her missing a few things. I personally dread the word do... |
I need to test a serial port application on Linux, however, my test machine only has one serial port.
Is there a way to add a virtual serial port to Linux and test my application by emulating a device through a shell or script?
Note: I cannot remap the port, it hard coded on ttys2 and I need to test the application as... | Yes, you can create virtual serial ports on Linux to test your application. The `pty` subsystem in Linux allows you to create pseudo-terminal devices which can function as virtual serial ports. Here's how you can do it using the `socat` utility or using the `tty` devices directly.
### Option 1: Using `socat`
`socat` ... | 2,072 | [
{
"from": "human",
"value": "I need to test a serial port application on Linux, however, my test machine only has one serial port. \nIs there a way to add a virtual serial port to Linux and test my application by emulating a device through a shell or script?\nNote: I cannot remap the port, it hard coded on ... |
I am looking for a very fast way to filter down a collection in C#. I am currently using generic List<object> collections, but am open to using other structures if they perform better.
Currently, I am just creating a new List<object> and looping thru the original list. If the filtering criteria matches, I put a copy ... | When it comes to filtering collections in C#, there are several approaches you can take to improve performance and efficiency. If you're using `List<object>`, there are indeed better methods than manually iterating over the list and creating a new one. Below are some suggestions, including ways to filter in place and a... | 2,850 | [
{
"from": "human",
"value": "I am looking for a very fast way to filter down a collection in C#. I am currently using generic List<object> collections, but am open to using other structures if they perform better.\nCurrently, I am just creating a new List<object> and looping thru the original list. If the... |
I've noticed that SQL Server 2005 x64 does not seem to lock pages into memory the same way SQL Server 2000 did. In 2000 I could easily see from task manager that SQL had locked 8GB of ram with AWE. I'm fairly certain I've got 2005 setup in an equivalent way.
Is this a normal x64 difference or am I forgetting a crucia... | The behavior you're observing with SQL Server 2005 x64 in terms of memory management and locking pages into memory (AWE) is indeed different from SQL Server 2000, and there are a few key differences and considerations that might explain what you're seeing.
### Differences Between SQL Server 2000 and SQL Server 2005
1... | 2,059 | [
{
"from": "human",
"value": "I've noticed that SQL Server 2005 x64 does not seem to lock pages into memory the same way SQL Server 2000 did. In 2000 I could easily see from task manager that SQL had locked 8GB of ram with AWE. I'm fairly certain I've got 2005 setup in an equivalent way.\nIs this a normal ... |
It's one of those things that seems to have an odd curve where the more I think about it, the more it makes sense. To a certain extent, of course. And then it doesn't make sense to me at all.
Care to enlighten me?
| It sounds like you're grappling with a complex concept that might have nuances that are both logical and paradoxical. Many topics in philosophy, psychology, or even certain scientific theories can evoke this kind of feeling—where deep analysis reveals both clarity and confusion.
Consider concepts like time, free will,... | 6,809 | [
{
"from": "human",
"value": "It's one of those things that seems to have an odd curve where the more I think about it, the more it makes sense. To a certain extent, of course. And then it doesn't make sense to me at all.\nCare to enlighten me?\n"
},
{
"from": "gpt",
"value": "It sounds like yo... |
How do I turn the following 2 queries into 1 query
$sql = "SELECT level FROM skills WHERE id = $id LIMIT 1;";
$result = $db->sql_query($sql);
$level = (int) $db->sql_fetchfield('level');
$db->sql_freeresult($result);
++$level;
$sql = "UPDATE skills SET level = $level WHERE id = $id;";
$result = $db->sql_query(... | You can combine the `SELECT` and `UPDATE` operations into a single SQL query using a subquery in the `UPDATE` statement. Here's how you can do it:
```php
$sql = "UPDATE skills SET level = level + 1 WHERE id = $id;";
$result = $db->sql_query($sql);
$db->sql_freeresult($result);
```
### Explanation:
- The `UPDATE` stat... | 4,004 | [
{
"from": "human",
"value": "How do I turn the following 2 queries into 1 query\n$sql = \"SELECT level FROM skills WHERE id = $id LIMIT 1;\";\n$result = $db->sql_query($sql);\n$level = (int) $db->sql_fetchfield('level');\n$db->sql_freeresult($result);\n\n++$level;\n\n$sql = \"UPDATE skills SET level ... |
I'm running WAMP v2.0 on WindowsXP and I've got a bunch of virtual hosts setup in the http-vhosts.conf file.
This was working, but in the last week whenever I try & start WAMP I get this error in the event logs:
VirtualHost *:80 -- mixing * ports and
non-* ports with a NameVirtualHost
address is not supported, pro... | The issues you're facing with your WAMP server configuration may be caused by a few different factors. Let's address them one by one:
1. **Mixing Virtual Hosts on Different Ports**: The error message you are seeing indicates a problem with the way virtual hosts are defined. The `NameVirtualHost *` directive specifies ... | 30 | [
{
"from": "human",
"value": "I'm running WAMP v2.0 on WindowsXP and I've got a bunch of virtual hosts setup in the http-vhosts.conf file.\nThis was working, but in the last week whenever I try & start WAMP I get this error in the event logs:\n\nVirtualHost *:80 -- mixing * ports and\n non-* ports with a Na... |
I have been sold on mod_wsgi and apache rather than mod_python.
I have all the parts installed (django, apache, mod_wsgi) but have run into a problem deploying.
I am on osx 10.5 with apache 2.2 and django 1.0b2, mod_wsgi-2.3
My application is called tred.
Here are the relevant files:
httpd-vhosts (included in httpd-con... | It looks like you have most of the configuration set up correctly, but there are a few potential issues that could be causing the directory listing instead of rendering your Django application. Let's go through some common troubleshooting steps to resolve the issue.
### 1. Check the WSGI Script Alias
Make sure that yo... | 3,699 | [
{
"from": "human",
"value": "I have been sold on mod_wsgi and apache rather than mod_python.\nI have all the parts installed (django, apache, mod_wsgi) but have run into a problem deploying.\nI am on osx 10.5 with apache 2.2 and django 1.0b2, mod_wsgi-2.3\nMy application is called tred.\nHere are the releva... |
I am currently developing a Drupal webpage using PDT. When running without XDebug, the site works fine.
When I enable XDebug, the site works fine but opens up tons of Javascript errors that I need to click through.
Example:
A Runtime Error has occurred.
Do you wish to Debug?
Line: 1
Error: Syntax error
--
It seems to o... | It sounds like you're encountering issues with JavaScript errors in Firefox when using XDebug with PDT, which don't appear when you use Internet Explorer. This is likely related to how XDebug interacts with your JavaScript execution context when debugging in Firefox.
### Potential Solutions:
1. **Check Firefox Consol... | 4,104 | [
{
"from": "human",
"value": "I am currently developing a Drupal webpage using PDT. When running without XDebug, the site works fine.\nWhen I enable XDebug, the site works fine but opens up tons of Javascript errors that I need to click through.\nExample:\nA Runtime Error has occurred.\nDo you wish to Debug?... |
What is the best way to manage a list of windows (keeping them in order) to be able to promote the next window to the top-level when the current top-level window is closed.
This is for a web application, so we're using jQuery Javascript.
We'd talked through a few simplistic solutions, such as using an array and just tr... | Managing a stack of windows in a web application can be effectively done using an array, as you’ve already discussed. However, there are various design patterns and implementations that you can consider to improve the efficiency, maintainability, and usability of your application. Here are some approaches you might fin... | 1,832 | [
{
"from": "human",
"value": "What is the best way to manage a list of windows (keeping them in order) to be able to promote the next window to the top-level when the current top-level window is closed.\nThis is for a web application, so we're using jQuery Javascript.\nWe'd talked through a few simplistic so... |
I'm currently working on an internal sales application for the company I work for, and I've got a form that allows the user to change the delivery address.
Now I think it would look much nicer, if the textarea I'm using for the main address details would just take up the area of the text in it, and automatically resize... | To achieve the desired auto-resizing behavior of the textarea for your internal sales application, you can refine your current JavaScript function while ensuring it's responsive to user input. Here’s an improved approach that also accounts for varying text lengths, while automatically adjusting the height of the textar... | 3,118 | [
{
"from": "human",
"value": "I'm currently working on an internal sales application for the company I work for, and I've got a form that allows the user to change the delivery address.\nNow I think it would look much nicer, if the textarea I'm using for the main address details would just take up the area o... |
I have a client-server app where the client is on a Windows Mobile 6 device, written in C++ and the server is on full Windows and written in C#.
Originally, I only needed it to send messages from the client to the server, with the server only ever sending back an acknowledgment that it received the message. Now, I wou... | To enable your server to send requests to the client at any time while still using a single socket for communication, you indeed have a couple of options. Here's a breakdown of the approach you mentioned, as well as some alternatives:
### Option 1: Use Non-blocking I/O with Select or WaitForMultipleObjects
If you're ... | 3,648 | [
{
"from": "human",
"value": "I have a client-server app where the client is on a Windows Mobile 6 device, written in C++ and the server is on full Windows and written in C#.\nOriginally, I only needed it to send messages from the client to the server, with the server only ever sending back an acknowledgment... |
When I am working with ASP.NET, I find that there are always unexpected things I run into that take forever to debug. I figure that having a consolidated list of these would be great for those "weird error" circumstances, plus to expand our knowledge of oddness in the platform.
So: answer with one of your "Gotcha"s!
I'... | That's a great starting point! Here's another "Gotcha" in ASP.NET that developers often encounter:
### ViewState Size and Performance
In ASP.NET Web Forms, ViewState is used to preserve page and control values between postbacks. However, an often-overlooked aspect is how the size of the ViewState can impact page perf... | 5,955 | [
{
"from": "human",
"value": "When I am working with ASP.NET, I find that there are always unexpected things I run into that take forever to debug. I figure that having a consolidated list of these would be great for those \"weird error\" circumstances, plus to expand our knowledge of oddness in the platform... |
I'm hosting Python script with Python for Delphi components inside my Delphi application. I'd like to create background tasks which keep running by script.
Is it possible to create threads which keep running even if the script execution ends (but not the host process, which keeps going on). I've noticed that the progr... | Creating background tasks in a Python script that continue running even after the script execution ends (while keeping the host Delphi process alive) is a common requirement, but it requires careful management of threading and process termination.
When you create threads in Python using the `threading` module, those t... | 2,623 | [
{
"from": "human",
"value": "I'm hosting Python script with Python for Delphi components inside my Delphi application. I'd like to create background tasks which keep running by script.\nIs it possible to create threads which keep running even if the script execution ends (but not the host process, which ke... |
I have a simple little test app written in Flex 3 (MXML and some AS3). I can compile it to a SWF just fine, but I'd like to make it into an EXE so I can give it to a couple of my coworkers who might find it useful.
With Flash 8, I could just target an EXE instead of a SWF and it would wrap the SWF in a projector, and ... | If you're using the Flex 3 SDK and want to create an executable (EXE) file from your SWF without using Adobe AIR, you have a couple of options, but they typically involve using additional tools.
One option is to use a tool called "SWF2EXE," which can package your SWF file into an EXE file. While this isn't an official... | 3,144 | [
{
"from": "human",
"value": "I have a simple little test app written in Flex 3 (MXML and some AS3). I can compile it to a SWF just fine, but I'd like to make it into an EXE so I can give it to a couple of my coworkers who might find it useful.\nWith Flash 8, I could just target an EXE instead of a SWF and ... |
In order to fully use LinqToSql in an ASP.net 3.5 application, it is necessary to create DataContext classes (which is usually done using the designer in VS 2008). From the UI perspective, the DataContext is a design of the sections of your database that you would like to expose to through LinqToSql and is integral in ... | Your considerations regarding the design of your DataContext classes in a large database are valid, and there are a few key factors to weigh when deciding whether to implement a single large DataContext or multiple smaller DataContexts.
### Pros and Cons of a Single Large DataContext
**Pros:**
1. **Ease of Navigation... | 1,092 | [
{
"from": "human",
"value": "In order to fully use LinqToSql in an ASP.net 3.5 application, it is necessary to create DataContext classes (which is usually done using the designer in VS 2008). From the UI perspective, the DataContext is a design of the sections of your database that you would like to expose... |
I've always wanted to be able to get a reasonably elegant way of getting vimdiff to work with a CVS controlled file. I've found numerous (somewhat hacky) scripts around the internet (best example here) that basically check out the file you are editing from CVS to a temp file, and vimdiff the two. None of these take int... | Creating a more elegant solution for using `vimdiff` with CVS-controlled files, especially considering branches, can indeed be a useful project. While many of the existing scripts focus on the basic task of comparing the working file with the version in the repository (often just from the main branch), a robust solutio... | 2,849 | [
{
"from": "human",
"value": "I've always wanted to be able to get a reasonably elegant way of getting vimdiff to work with a CVS controlled file. I've found numerous (somewhat hacky) scripts around the internet (best example here) that basically check out the file you are editing from CVS to a temp file, an... |
Here is my sample code:
from xml.dom.minidom import *
def make_xml():
doc = Document()
node = doc.createElement('foo')
node.innerText = 'bar'
doc.appendChild(node)
return doc
if __name__ == '__main__':
make_xml().writexml(sys.stdout)
when I run the above code I get this:
<?xml version="1.0" ?>
... | You're correct that the `innerText` property does not exist in the `xml.dom.minidom` module. Instead, you need to create a text node and append it to the element you want.
Here's how you can modify your `make_xml` function to achieve your desired output:
```python
from xml.dom.minidom import Document
import sys
def ... | 4,664 | [
{
"from": "human",
"value": "Here is my sample code:\nfrom xml.dom.minidom import *\ndef make_xml():\n doc = Document()\n node = doc.createElement('foo')\n node.innerText = 'bar'\n doc.appendChild(node)\n return doc\nif __name__ == '__main__':\n make_xml().writexml(sys.stdout)\n\nwhen I ru... |
I really need to see some honest, thoughtful debate on the merits of the currently accepted enterprise application design paradigm.
I am not convinced that entity objects should exist.
By entity objects I mean the typical things we tend to build for our applications, like "Person", "Account", "Order", etc.
My current d... | You've raised several insightful points in your critique of the entity object paradigm in enterprise application design. There are indeed merits and drawbacks to both your approach—using stored procedures for data access—and the conventional object-relational mapping (ORM) paradigm. Let's delve into the pros and cons o... | 1,221 | [
{
"from": "human",
"value": "I really need to see some honest, thoughtful debate on the merits of the currently accepted enterprise application design paradigm.\nI am not convinced that entity objects should exist.\nBy entity objects I mean the typical things we tend to build for our applications, like \"Pe... |
What would be the best way to draw a simple animation just before showing a modal JDialog? (i.e. expanding borders from the mouse click point to the dialog location). I thought it would be possible to draw on the glasspane of the parent frame on the setVisible method of the dialog.
However, since the JDialog is modal t... | To create a simple animation (like expanding borders from the mouse click point to the dialog location) before showing a modal `JDialog`, you can use a `javax.swing.Timer` for animating the drawing process on the glass pane of the parent frame. This approach allows you to perform the animation in the Event Dispatch Thr... | 44 | [
{
"from": "human",
"value": "What would be the best way to draw a simple animation just before showing a modal JDialog? (i.e. expanding borders from the mouse click point to the dialog location). I thought it would be possible to draw on the glasspane of the parent frame on the setVisible method of the dial... |
In my current environment, we have a "clean" build machine, which has an exact copy of all committed changes, nothing more, nothing less.
And of course I have my own machine, with dozens of files in an "in-progress" state.
Often I need to build my application with only one change in place. For example, I've finished t... | In environments where you need to build an application with specific changes without committing everything, there are a few strategies you can employ to isolate changes for test builds and releases:
### 1. Stashing Changes
If you're using a version control system like Git, you can use the `git stash` command. This all... | 4,528 | [
{
"from": "human",
"value": "In my current environment, we have a \"clean\" build machine, which has an exact copy of all committed changes, nothing more, nothing less.\nAnd of course I have my own machine, with dozens of files in an \"in-progress\" state.\nOften I need to build my application with only one... |
We have some really old code that calls WebServices using behaviours (webservice.htc), and we are having some strange problems... since they've been deprecated a long time ago, I want to change the call.
What's the correct way of doing it? It's ASP.NET 1.1
| If you're working with legacy ASP.NET 1.1 code that relies on behaviors (like `webservice.htc`) for calling Web Services, transitioning to a more modern approach is advisable. Since ASP.NET 1.1 is quite outdated, the newer frameworks might not be fully compatible, but you can still implement a more reliable way to inte... | 2,343 | [
{
"from": "human",
"value": "We have some really old code that calls WebServices using behaviours (webservice.htc), and we are having some strange problems... since they've been deprecated a long time ago, I want to change the call.\nWhat's the correct way of doing it? It's ASP.NET 1.1\n"
},
{
"from... |
a colleague pointed me the other day to BCEL which , as best I can tell from his explanation and a quick read, a way to modify at run time the byte code. My first thought was that it sounded dangerous, and my second thought was that it sounded cool. Then I gave it some more thought and I recalled the codinghorror pos... | You're correct in your assessment that BCEL (Byte Code Engineering Library) is a powerful tool that allows developers to manipulate Java bytecode at runtime. This can enable a variety of advanced techniques, including modifying classes, adding methods, and even implementing aspects like logging and profiling.
### BCEL... | 3,662 | [
{
"from": "human",
"value": "a colleague pointed me the other day to BCEL which , as best I can tell from his explanation and a quick read, a way to modify at run time the byte code. My first thought was that it sounded dangerous, and my second thought was that it sounded cool. Then I gave it some more th... |
I once had the task of determining the following performance parameters from inside a running application:
Total virtual memory available
Virtual memory currently used
Virtual memory currently used by my process
Total RAM available
RAM currently used
RAM currently used by my process
% CPU currently used
% CPU currentl... | That’s a great idea! Having a consolidated resource for determining system performance parameters on Windows and Linux can be incredibly useful for developers. Below, I’ll provide code snippets and explanations for each of the parameters you mentioned for both operating systems.
### For Windows
You can use the Window... | 2,396 | [
{
"from": "human",
"value": "I once had the task of determining the following performance parameters from inside a running application:\n\nTotal virtual memory available\nVirtual memory currently used\nVirtual memory currently used by my process\nTotal RAM available\nRAM currently used\nRAM currently used b... |
As an example in pseudocode:
if ((a mod 2) == 0)
{
isEven = true;
}
else
{
isEven = false;
}
| Certainly! The pseudocode you've provided checks if a number `a` is even or odd by using the modulus operator (`mod`). If `a` is divisible by 2 (i.e., the remainder when divided by 2 is 0), it sets `isEven` to `true`. Otherwise, it sets `isEven` to `false`. Here’s a concise version of that logic in pseudocode:
```pseu... | 6,196 | [
{
"from": "human",
"value": "As an example in pseudocode:\nif ((a mod 2) == 0)\n{\n isEven = true;\n}\nelse\n{\n isEven = false;\n}\n\n"
},
{
"from": "gpt",
"value": "Certainly! The pseudocode you've provided checks if a number `a` is even or odd by using the modulus operator (`mod`). If `... |
Phppgadmin comes with instructions for creating a reports database on the system for use with phppgadmin. The instructions describe how to set it up, but do not really give any indication of what its purpose is, and the phppgadmin site was not very helpful either.
It seems to allow you to store SQL queries, so is it fo... | phpPgAdmin is a web-based administration tool for managing PostgreSQL databases. The "reports database" you mentioned is typically a feature that allows users to store, manage, and execute SQL queries or reports easily within the phpPgAdmin interface. Here's a brief overview of its purpose and functionality:
1. **Stor... | 5,578 | [
{
"from": "human",
"value": "Phppgadmin comes with instructions for creating a reports database on the system for use with phppgadmin. The instructions describe how to set it up, but do not really give any indication of what its purpose is, and the phppgadmin site was not very helpful either.\nIt seems to a... |
I'm trying to figure out why the control does not honor ZIndex.
Example 1 - which works fine
<Canvas>
<Rectangle Canvas.ZIndex="1" Height="400" Width="600" Fill="Yellow"/>
<Rectangle Canvas.ZIndex="2" Height="100" Width="100" Fill="Red"/>
</Canvas>
Example 2 - which does not work
<Canvas>
... | The behavior you're experiencing is due to how certain controls handle z-index and rendering in WPF (Windows Presentation Foundation). The `WebBrowser` control is a special case because it hosts a web page, which operates in its own window and is rendered differently compared to standard WPF elements like `Rectangle`.
... | 3,418 | [
{
"from": "human",
"value": "I'm trying to figure out why the control does not honor ZIndex.\nExample 1 - which works fine\n <Canvas>\n <Rectangle Canvas.ZIndex=\"1\" Height=\"400\" Width=\"600\" Fill=\"Yellow\"/>\n <Rectangle Canvas.ZIndex=\"2\" Height=\"100\" Width=\"100\" Fill=\"Red\"/>\n ... |
I'm looking for a way to check within pageLoad() if this method is raised during load event because of a postback/async postback or because of being loaded and access the first time.
This is similar to Page.IsPostback property within code behind page.
TIA,
Ricky
| In ASP.NET, you can determine whether the `Page_Load` method is being executed due to a postback or because the page is being loaded for the first time by using the `Page.IsPostBack` property. This property is available within the `Page_Load` method and returns `true` if the page is being loaded in response to a postba... | 4,998 | [
{
"from": "human",
"value": "I'm looking for a way to check within pageLoad() if this method is raised during load event because of a postback/async postback or because of being loaded and access the first time.\nThis is similar to Page.IsPostback property within code behind page.\nTIA,\nRicky\n"
},
{
... |
When an AutoCompleteExtender is displayed in IE6 it seems to ignore z-index and renders below any select controls (like dropdownlists) in IE6.
<asp:TextBox ID="TextBox1" runat="server" />
<cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server"
TargetControlID="TextBox1" EnableCaching="true" Completion... | Rendering issues with z-index in Internet Explorer 6, especially with controls like `AutoCompleteExtender` and `DropDownList`, are quite common due to IE6's handling of stacking contexts and its CSS implementation. Here are some strategies to ensure that your autocomplete suggestions appear above dropdowns in IE6:
###... | 1,697 | [
{
"from": "human",
"value": "When an AutoCompleteExtender is displayed in IE6 it seems to ignore z-index and renders below any select controls (like dropdownlists) in IE6.\n<asp:TextBox ID=\"TextBox1\" runat=\"server\" />\n<cc1:AutoCompleteExtender ID=\"AutoCompleteExtender1\" runat=\"server\" \n Target... |
I need to implement version control, even for just the developing I do at home. I have read about how great subversion is for the past couple of years and was about to dedicate myself to learning this on the side until I heard about Git being the up and coming version control system.
Given the situation, should I hold... | It's great that you're considering implementing version control for your development projects at home! Both Subversion (SVN) and Git have their own advantages and use cases, and understanding these can help you make an informed decision.
### Git vs. Subversion: A Comparison
**1. Architecture:**
- **Git:** It is a ... | 2,416 | [
{
"from": "human",
"value": "I need to implement version control, even for just the developing I do at home. I have read about how great subversion is for the past couple of years and was about to dedicate myself to learning this on the side until I heard about Git being the up and coming version control s... |
How do you set up IIS so that you can call python scripts from asp pages?
Ok, so I found the answer to that question here: http://support.microsoft.com/kb/276494
So on to my next question: How do you call a cgi script from within classic asp (vb) code? Particularly one which is not in the web root directory.
| To call a CGI script from within a classic ASP (VBScript) page, you can use the `Server.CreateObject` method to create an instance of the `WScript.Shell` object. This allows you to execute the CGI script directly, even if it's not located in the web root directory.
Here's a step-by-step guide to achieve this:
1. **Ma... | 3,258 | [
{
"from": "human",
"value": "How do you set up IIS so that you can call python scripts from asp pages?\nOk, so I found the answer to that question here: http://support.microsoft.com/kb/276494\nSo on to my next question: How do you call a cgi script from within classic asp (vb) code? Particularly one which i... |
I'm writing C# code that uses the windows IP Helper API. One of the functions I'm trying to call is "GetBestInterface" that takes a 'uint' representation of an IP. What I need is to parse a textual representation of the IP to create the 'uint' representation.
I've found some examples via Google, like this one or this o... | Yes, you can achieve this in .NET using the `IPAddress` class, along with some built-in methods to convert the IP address to a `uint` representation. While the `IPAddress` class does not provide a direct method for obtaining a `uint`, you can convert the `IPAddress` to a byte array and then calculate the `uint` value f... | 3,733 | [
{
"from": "human",
"value": "I'm writing C# code that uses the windows IP Helper API. One of the functions I'm trying to call is \"GetBestInterface\" that takes a 'uint' representation of an IP. What I need is to parse a textual representation of the IP to create the 'uint' representation.\nI've found some ... |
What are the differences between delegates and an events? Don't both hold references to functions that can be executed?
| Yes, delegates and events in C# are closely related concepts, but they serve different purposes and have distinct characteristics. Here's a breakdown of their differences:
### 1. Definition:
- **Delegate**: A delegate is a type that represents references to methods with a particular parameter list and return type. Del... | 4,076 | [
{
"from": "human",
"value": "What are the differences between delegates and an events? Don't both hold references to functions that can be executed?\n"
},
{
"from": "gpt",
"value": "Yes, delegates and events in C# are closely related concepts, but they serve different purposes and have distinct ... |
i have a VS05 C++ (MFC) project which uses HtmlHelp (function HTMLHelpA, linked from HmleHelp.lib, which came from HTML HElp Workshop v1.4). the 32-bit version compiles and links fine.
the 64-bit version compiles fine, but gets an "unresolved external" error on HTMLHelpA, when linking.
so, my question is simple: is th... | The `HTMLHelpA` function and the associated `HtmlHelp` functionality from HTML Help Workshop were originally designed for 32-bit applications. Consequently, when working with 64-bit applications, you might encounter unresolved external symbol errors because the 64-bit versions of `HmleHelp.lib` or the necessary DLLs ma... | 3,767 | [
{
"from": "human",
"value": "i have a VS05 C++ (MFC) project which uses HtmlHelp (function HTMLHelpA, linked from HmleHelp.lib, which came from HTML HElp Workshop v1.4). the 32-bit version compiles and links fine. \nthe 64-bit version compiles fine, but gets an \"unresolved external\" error on HTMLHelpA, wh... |
I'm doing a little bit of work on a horrid piece of software built by Bangalores best.
It's written in mostly classic ASP/VbScript, but "ported" to ASP.NET, though most of the code is classic ASP style in the ASPX pages :(
I'm getting this message when it tries to connect to my local database:
Multiple-step OLE DB oper... | The error message you're encountering, "Multiple-step OLE DB operation generated errors," is a common one when working with ADO and can be caused by various underlying issues. Here are some common reasons and solutions for this error, based on the context you've provided:
### Common Causes and Solutions
1. **Connecti... | 1,625 | [
{
"from": "human",
"value": "I'm doing a little bit of work on a horrid piece of software built by Bangalores best.\nIt's written in mostly classic ASP/VbScript, but \"ported\" to ASP.NET, though most of the code is classic ASP style in the ASPX pages :(\nI'm getting this message when it tries to connect to... |
Generally when I use ClickOnce when I build a VB.NET program but it has a few downsides. I've never really used anything else, so I'm not sure
what my options are.
Downsides to ClickOnce:
Consists of multiple files - Seems easier to distribute one file than manageing a bunch of file and the downloader to download thos... | It's great to hear that you've explored other installation options beyond ClickOnce! Let’s compare ClickOnce and Windows Installer, particularly through your experiences and requirements.
### ClickOnce:
**Pros:**
1. **Ease of Use**: Integrated into Visual Studio, making deployment straightforward.
2. **Automatic Upda... | 2,073 | [
{
"from": "human",
"value": "Generally when I use ClickOnce when I build a VB.NET program but it has a few downsides. I've never really used anything else, so I'm not sure\nwhat my options are.\nDownsides to ClickOnce:\n\nConsists of multiple files - Seems easier to distribute one file than manageing a bunc... |
I get DNS records from a Python program, using DNS
Python
I can get various DNSSEC-related records:
>>> import dns.resolver
>>> myresolver = dns.resolver.Resolver()
>>> myresolver.use_edns(1, 0, 1400)
>>> print myresolver.query('sources.org', 'DNSKEY')
<dns.resolver.Answer object at 0xb78ed78c>
>>> print myresolver.que... | It looks like you are trying to retrieve DNSSEC RRSIG records using the `dns.resolver` module from the `dnspython` library, but you're encountering an issue where it raises a `NoAnswer` exception when querying for RRSIG records.
Here are a few things to check and try:
### 1. Check for a Newer Version of dnspython
You... | 2,875 | [
{
"from": "human",
"value": "I get DNS records from a Python program, using DNS\nPython\nI can get various DNSSEC-related records:\n>>> import dns.resolver\n>>> myresolver = dns.resolver.Resolver()\n>>> myresolver.use_edns(1, 0, 1400)\n>>> print myresolver.query('sources.org', 'DNSKEY')\n<dns.resolver.Answe... |
I want to import an oracle dump into a different tablespace.
I have a tablespace A used by User A. I've revoked DBA on this user and given him the grants connect and resource. Then I've dumped everything with the command
exp a/*** owner=a file=oracledump.DMP log=log.log compress=y
Now I want to import the dump into t... | When importing data into a different tablespace from the one it was originally exported from, especially when dealing with different users and privileges, there are a few considerations and steps to follow. Your issues stem from both the lack of permissions and the attempts to import into a tablespace that may not exis... | 3,351 | [
{
"from": "human",
"value": "I want to import an oracle dump into a different tablespace.\nI have a tablespace A used by User A. I've revoked DBA on this user and given him the grants connect and resource. Then I've dumped everything with the command\n\nexp a/*** owner=a file=oracledump.DMP log=log.log comp... |
I see a similar question for Ubuntu, but I'm interested in hosting my own OpenID provider through my Rails-based site that already has an identity and authentication system in place.
Note that I'm not looking for the delegate method to use the site as an OpenID.
What's the best way to do this properly?
| Hosting your own OpenID provider using a Rails-based application involves several steps, especially since you're looking to integrate it with your existing identity and authentication system. Here’s a comprehensive guide to help you set this up properly.
### 1. Understand OpenID Protocol
Before you proceed, ensure yo... | 1,698 | [
{
"from": "human",
"value": "I see a similar question for Ubuntu, but I'm interested in hosting my own OpenID provider through my Rails-based site that already has an identity and authentication system in place.\nNote that I'm not looking for the delegate method to use the site as an OpenID.\nWhat's the bes... |
We have a WinForms application written in C# that uses the AxAcroPDFLib.AxAcroPDF component to load and print a PDF file. Has been working without any problems in Windows XP. I have moved my development environment to Vista 64 bit and now the application will not run (on Vista 64) unless I remove the AxAcroPDF componen... | Unfortunately, the AxAcroPDF ActiveX control provided by Adobe does not have a 64-bit version, and there is no way to convert a 32-bit ActiveX control to a 64-bit control. The `COMException` error you are encountering is a common issue when trying to use a 32-bit ActiveX control in a 64-bit environment.
Here are a few... | 4,239 | [
{
"from": "human",
"value": "We have a WinForms application written in C# that uses the AxAcroPDFLib.AxAcroPDF component to load and print a PDF file. Has been working without any problems in Windows XP. I have moved my development environment to Vista 64 bit and now the application will not run (on Vista 6... |
In JavaScript:
encodeURIComponent("©√") == "%C2%A9%E2%88%9A"
Is there an equivalent for C# applications? For escaping HTML characters I used:
txtOut.Text = Regex.Replace(txtIn.Text, @"[\u0080-\uFFFF]",
m => @"&#" + ((int)m.Value[0]).ToString() + ";");
But I'm not sure how to convert the match to the correct hexad... | To achieve the same URI encoding in C# as `encodeURIComponent` in JavaScript, you'll need to encode the string using a method that takes into account the byte representation of characters in UTF-8. The `System.Uri` class provides a method called `EscapeDataString`, but it might not produce the exact same results as `en... | 4,300 | [
{
"from": "human",
"value": "In JavaScript:\nencodeURIComponent(\"©√\") == \"%C2%A9%E2%88%9A\"\n\nIs there an equivalent for C# applications? For escaping HTML characters I used:\ntxtOut.Text = Regex.Replace(txtIn.Text, @\"[\\u0080-\\uFFFF]\",\n m => @\"&#\" + ((int)m.Value[0]).ToString() + \";\");\n\nBu... |
We have been using CruiseControl for quite a while with NUnit and NAnt. For a recent project we decided to use the testing framework that comes with Visual Studio, which so far has been adequate.
I'm attempting to get the solution running in CruiseControl. I've finally got the build itself to work; however, I have bee... | Setting up CruiseControl.NET with Visual Studio's testing framework (MSTest) requires a few specific configurations to ensure that your tests are executed and their results are reported correctly in the CruiseControl interface. Here’s a general outline of the steps you need to follow to achieve this:
### 1. Configure ... | 146 | [
{
"from": "human",
"value": "We have been using CruiseControl for quite a while with NUnit and NAnt. For a recent project we decided to use the testing framework that comes with Visual Studio, which so far has been adequate.\nI'm attempting to get the solution running in CruiseControl. I've finally got the... |
Can somebody suggest a good free tool for analyzing .Net memory dumps other than Adplus/windbg/sos ?
| Certainly! There are several free tools you can use for analyzing .NET memory dumps besides Adplus, WinDbg, and SOS. Here are a few options:
1. **Visual Studio**: If you have Visual Studio installed, you can open memory dumps directly within it. It provides a user-friendly interface and allows you to analyze the heap,... | 4,821 | [
{
"from": "human",
"value": "Can somebody suggest a good free tool for analyzing .Net memory dumps other than Adplus/windbg/sos ?\n"
},
{
"from": "gpt",
"value": "Certainly! There are several free tools you can use for analyzing .NET memory dumps besides Adplus, WinDbg, and SOS. Here are a few o... |
Okay, so I'm running a small test webserver on my private network. I've got a machine running Windows 2000 Pro, and I'm trying to run an ASP.NET app through IIS.
I wrote it so that the webpage would use the registry to store certain settings (connection strings, potentially volatile locations of other web services, pa... | To modify the security permissions for a registry key in Windows, you'll want to follow these steps:
1. **Open Regedit**: Press `Win + R`, type `regedit`, and press Enter to open the Registry Editor.
2. **Navigate to the Key**: Locate the registry key you want to modify. For your case, it's `HKEY_LOCAL_MACHINE\Softwa... | 4,192 | [
{
"from": "human",
"value": "Okay, so I'm running a small test webserver on my private network. I've got a machine running Windows 2000 Pro, and I'm trying to run an ASP.NET app through IIS.\nI wrote it so that the webpage would use the registry to store certain settings (connection strings, potentially vo... |
What do the collective beleive to be the best platform to use as a backend to AJAX / Flex / Silverlight applications and why?
We are undergoing a technology review and I would like to know some other opinions.
Is It Java, Grails, Python, Rails, ColdFusion, something else?
| When it comes to selecting a backend platform for AJAX, Flex, or Silverlight applications, the "best" choice often depends on various factors including team expertise, project requirements, scalability needs, and development speed. Here’s a breakdown of some popular options along with their strengths and weaknesses:
#... | 2,873 | [
{
"from": "human",
"value": "What do the collective beleive to be the best platform to use as a backend to AJAX / Flex / Silverlight applications and why?\nWe are undergoing a technology review and I would like to know some other opinions.\nIs It Java, Grails, Python, Rails, ColdFusion, something else?\n"
... |
I have a view that has a list of jobs in it, with data like who they're assigned to and the stage they are in. I need to write a stored procedure that returns how many jobs each person has at each stage.
So far I have this (simplified):
DECLARE @ResultTable table
(
StaffName nvarchar(100),
Stage1Count int,
Stage... | To achieve your goal of counting jobs assigned to each staff member by stage without duplicating rows in your results, you can make use of conditional aggregation in your SQL query. This allows you to sum up counts based on conditions and return the results in a single row for each staff member.
Here’s how you can imp... | 3,304 | [
{
"from": "human",
"value": "I have a view that has a list of jobs in it, with data like who they're assigned to and the stage they are in. I need to write a stored procedure that returns how many jobs each person has at each stage.\nSo far I have this (simplified):\nDECLARE @ResultTable table \n(\n StaffN... |
How much less libraries are there for Mono than for Java?
I lack the overview over both alternatives but I have pretty much freedom of choice for my next project. I'm looking for hard technical facts in the areas of
performance (for example, I'm told Java is good for threading, and I hear the runtime code optimization... | It's great to hear that you've made a decision for your project. Choosing Java certainly comes with a wealth of libraries and established tools. However, I can provide some insights based on my experiences with both Mono (C#) and Java, particularly in the context of back-end services and your specific requirements.
##... | 3,129 | [
{
"from": "human",
"value": "How much less libraries are there for Mono than for Java?\nI lack the overview over both alternatives but I have pretty much freedom of choice for my next project. I'm looking for hard technical facts in the areas of\n\nperformance (for example, I'm told Java is good for threadi... |
What's the best way to do the semantic equivalent of the traditional sleep() system call from within an Informix SPL routine? In other words, simply "pause" for N seconds (or milliseconds or whatever, but seconds are fine). I'm looking for a solution that does not involve linking some new (perhaps written by me) C co... | In Informix SPL, achieving a sleep or pause functionality purely with SPL can be a bit tricky since there's no direct equivalent of the `sleep()` system call. However, you can use the `SYSTEM` command to invoke a sleep command from the operating system, which effectively gives you the desired pause in execution.
The g... | 3,472 | [
{
"from": "human",
"value": "What's the best way to do the semantic equivalent of the traditional sleep() system call from within an Informix SPL routine? In other words, simply \"pause\" for N seconds (or milliseconds or whatever, but seconds are fine). I'm looking for a solution that does not involve li... |
A number of forms in my project inherit from a base form. It is easy to get at the Controls collection of the derived forms, but I have not found a simple way to access the Components collection, since VS marks this as private.
I assume this could be done with reflection, but I'm not really sure how best to go about i... | To access the `Components` collection in a Windows Forms application where it is marked as private, reflection is indeed a valid approach. Below, I’ll walk you through using reflection to access the `Components` collection from the base form.
### Using Reflection to Access Components Collection
You can create a metho... | 3,379 | [
{
"from": "human",
"value": "A number of forms in my project inherit from a base form. It is easy to get at the Controls collection of the derived forms, but I have not found a simple way to access the Components collection, since VS marks this as private. \nI assume this could be done with reflection, but ... |
Visual Studio Solution files contain two GUID's per project entry. I figure one of them is from the AssemblyInfo.cs
Does anyone know for sure where these come from, and what they are used for?
| In Visual Studio Solution (.sln) files, each project entry contains two GUIDs. These GUIDs serve distinct purposes:
1. **Project Type GUID**: The first GUID identifies the type of project. It indicates what kind of project it is (e.g., C#, VB.NET, Web Application, Class Library, etc.). This GUID helps Visual Studio un... | 5,550 | [
{
"from": "human",
"value": "Visual Studio Solution files contain two GUID's per project entry. I figure one of them is from the AssemblyInfo.cs\nDoes anyone know for sure where these come from, and what they are used for?\n"
},
{
"from": "gpt",
"value": "In Visual Studio Solution (.sln) files, ... |
I've just setup a new project on SourceForge and the admins set it up with CVS as the SCM, however, I want to use SVN. There is NO code in this project yet - empty directory.
How do I change this project from using CVS to SVN?
| To change your SourceForge project from CVS to SVN, you will need to follow these steps, as SourceForge doesn't provide a direct way to switch between version control systems after the project has been created. Since your project is empty, the process will be relatively straightforward:
1. **Backup any relevant data**... | 3,657 | [
{
"from": "human",
"value": "I've just setup a new project on SourceForge and the admins set it up with CVS as the SCM, however, I want to use SVN. There is NO code in this project yet - empty directory.\nHow do I change this project from using CVS to SVN?\n"
},
{
"from": "gpt",
"value": "To cha... |
I encounter an error of the form: "The model item passed into the dictionary is of type FooViewData but this dictionary requires a model item of type bar" even though I am passing in an object of the correct type (bar) for the typed user control.
| The error message you're encountering suggests a mismatch between the type of the model that is being passed to your view (or user control) and the type that the view (or user control) is expecting. Here are some common reasons and solutions for this issue:
### Common Causes and Solutions:
1. **Ensure the Correct Typ... | 3,227 | [
{
"from": "human",
"value": "I encounter an error of the form: \"The model item passed into the dictionary is of type FooViewData but this dictionary requires a model item of type bar\" even though I am passing in an object of the correct type (bar) for the typed user control.\n"
},
{
"from": "gpt",... |
I have a List of Foo.
Foo has a string property named Bar.
I'd like to use LINQ to get a string[] of distinct values for Foo.Bar in List of Foo.
How can I do this?
| You can use LINQ to achieve this quite easily. Assuming you have a list of `Foo` objects, you can use the `Select` method to project each `Foo` to its `Bar` property, followed by the `Distinct` method to filter out duplicate values. Finally, you can convert the result to an array using the `ToArray` method.
Here’s how... | 2,834 | [
{
"from": "human",
"value": "I have a List of Foo.\nFoo has a string property named Bar.\nI'd like to use LINQ to get a string[] of distinct values for Foo.Bar in List of Foo.\nHow can I do this?\n"
},
{
"from": "gpt",
"value": "You can use LINQ to achieve this quite easily. Assuming you have a ... |
Yes, it sounds crazy....It might be.
The final updatepanel does not appear to trigger anything, it just refreshes the update panels and does not call back to the usercontrol hosting it.
Any ideas?
EDIT: I got it posting back, however the controls inside the final usercontrol have lost their data...I'm thinking its beca... | It sounds like you're dealing with some common issues related to ASP.NET Web Forms, particularly with `UpdatePanel` and user controls. Here are some ideas and approaches to help you troubleshoot and resolve the issues you're facing:
1. **ViewState**: Make sure that ViewState is enabled for your user controls and contr... | 2,130 | [
{
"from": "human",
"value": "Yes, it sounds crazy....It might be.\nThe final updatepanel does not appear to trigger anything, it just refreshes the update panels and does not call back to the usercontrol hosting it.\nAny ideas?\nEDIT: I got it posting back, however the controls inside the final usercontrol ... |
Can anyone explain this in easy to understand terms?
| Of course! Please provide the specific topic or concept you would like me to explain, and I'll do my best to break it down in easy-to-understand terms. | 7,909 | [
{
"from": "human",
"value": "Can anyone explain this in easy to understand terms?\n"
},
{
"from": "gpt",
"value": "Of course! Please provide the specific topic or concept you would like me to explain, and I'll do my best to break it down in easy-to-understand terms."
}
] |
How do I use the profiler in Visual Studio 2008?
I know theres a build option in Config Properties -> Linker -> Advanced -> Profile (/PROFILE), however I can't find anything about actauly using it, only articles I was able to find appear to only apply to older versions of Visual Studio (eg most say to goto Build->Profi... | In Visual Studio 2008, the profiling feature is a bit different than what you might find in later versions. The profiling tools are not as prominently integrated into the interface as they are in later editions. However, you can still use profiling to analyze the performance of your application.
### Here's how to use ... | 3,186 | [
{
"from": "human",
"value": "How do I use the profiler in Visual Studio 2008?\nI know theres a build option in Config Properties -> Linker -> Advanced -> Profile (/PROFILE), however I can't find anything about actauly using it, only articles I was able to find appear to only apply to older versions of Visua... |
I have a very simple problem which requires a very quick and simple solution in SQL Server 2005.
I have a table with x Columns. I want to be able to select one row from the table and then transform the columns into rows.
TableA
Column1, Column2, Column3
SQL Statement to ruturn
ResultA
Value of Column1
Value of Column2... | To achieve the transformation of columns into rows in SQL Server 2005, you can use the `UNION ALL` operator to manually create a query that selects each column as a row. Since SQL Server 2005 does not support the `UNPIVOT` function (which would be available in later versions), this is the simplest approach.
Here’s how... | 1,675 | [
{
"from": "human",
"value": "I have a very simple problem which requires a very quick and simple solution in SQL Server 2005.\nI have a table with x Columns. I want to be able to select one row from the table and then transform the columns into rows.\nTableA\nColumn1, Column2, Column3\n\nSQL Statement to ru... |
I have developed some classes with similar behavior, they all implement the same interface. I implemented a factory that creates the appropriate object and returns the interface. I am writing a unit test for the factory. All you get back is an interface to the object.
What is the best way to test that the factory ha... | To test a factory that returns objects implementing a common interface without knowing the specific concrete class, you can use a combination of techniques in Java. Here’s how you can effectively test it.
### 1. **Use the Interface's Behavior:**
Since your factory returns an object that implements a specific interface... | 520 | [
{
"from": "human",
"value": "I have developed some classes with similar behavior, they all implement the same interface. I implemented a factory that creates the appropriate object and returns the interface. I am writing a unit test for the factory. All you get back is an interface to the object.\nWhat i... |
I found this open-source library that I want to use in my Java application. The library is written in C and was developed under Unix/Linux, and my application will run on Windows. It's a library of mostly mathematical functions, so as far as I can tell it doesn't use anything that's platform-dependent, it's just very b... | It sounds like you've made good progress by translating the part of the C library you need into Java. Given the size and complexity of the library, manual translation is often the most straightforward approach, especially since you've noted that C and Java share similarities, which can make the translation process smoo... | 3,401 | [
{
"from": "human",
"value": "I found this open-source library that I want to use in my Java application. The library is written in C and was developed under Unix/Linux, and my application will run on Windows. It's a library of mostly mathematical functions, so as far as I can tell it doesn't use anything th... |
I've found it very difficult to find any existing documentation on this. What I'm trying to find out is why Imake would interpret a word such as unix, linux or i386 to a number 1 in the produced Make-file? I'm sure it is a function of indicating whether or not your on that system or not. I've not been able to find t... | Imake is a makefile generation tool that originated in the context of the X Window System. It relies on a set of predefined macros and configuration files to determine the build environment and generate appropriate makefiles for various platforms.
When you see a string such as `unix`, `linux`, or `i386` being interpre... | 3,882 | [
{
"from": "human",
"value": "I've found it very difficult to find any existing documentation on this. What I'm trying to find out is why Imake would interpret a word such as unix, linux or i386 to a number 1 in the produced Make-file? I'm sure it is a function of indicating whether or not your on that sys... |
It's big problem to convert mod_rewrite rules to lighttpd format
| Converting `mod_rewrite` rules from Apache to Lighttpd can be a bit challenging due to differences in syntax and capabilities. Here are some common patterns and their equivalent conversions:
### General Structure
Apache's `mod_rewrite` rules typically look like this:
```apache
RewriteEngine On
RewriteRule ^old-url$ ... | 3,512 | [
{
"from": "human",
"value": "It's big problem to convert mod_rewrite rules to lighttpd format\n"
},
{
"from": "gpt",
"value": "Converting `mod_rewrite` rules from Apache to Lighttpd can be a bit challenging due to differences in syntax and capabilities. Here are some common patterns and their eq... |
We're currently in the process of setting up a source control/build/and more-server for .NET development and we're thinking about either utilizing the Team Foundation Server (which costs a lot of dough) or combining several open source options, such as SourceForge Enterprise/GForge and Subversion and CruiseControl.net ... | When considering a source control/build server for .NET development, both approaches (using TFS or a combination of open source solutions) have their own advantages and disadvantages. Here's a breakdown of each option to help you make an informed decision:
### Team Foundation Server (TFS)
#### Advantages:
1. **Integr... | 3,348 | [
{
"from": "human",
"value": "We're currently in the process of setting up a source control/build/and more-server for .NET development and we're thinking about either utilizing the Team Foundation Server (which costs a lot of dough) or combining several open source options, such as SourceForge Enterprise/GFo... |
I started trying to play with Mono, mostly for fun at the moment. I first tried to use the Visual Studio plugin that will convert a csproj into a makefile, but there seemed to be no version available for Visual Studio 2005. I also read about the MonoDevelop IDE, which sounded nice. Unfortunately, there's no pre-fab Wi... | Getting started with Mono on Windows can be a bit of a challenge, especially if you're more accustomed to a Windows development environment. However, there are some relatively easy paths you can take to get up and running with Mono development:
### 1. **Install Mono for Windows**
- **Download Mono**: The simplest way ... | 2,492 | [
{
"from": "human",
"value": "I started trying to play with Mono, mostly for fun at the moment. I first tried to use the Visual Studio plugin that will convert a csproj into a makefile, but there seemed to be no version available for Visual Studio 2005. I also read about the MonoDevelop IDE, which sounded n... |
I have a large codebase that targetted Flash 7, with a lot of AS2 classes. I'm hoping that I'll be able to use Flex for any new projects, but a lot of new stuff in our roadmap is additions to the old code.
The syntax for AS2 and AS3 is generally the same, so I'm starting to wonder how hard it would be to port the curr... | Porting a large codebase from ActionScript 2 (AS2) to ActionScript 3 (AS3) can be a significant undertaking, and while there are similarities in syntax, the differences in the language features and underlying architecture can present challenges. Here are some insights and recommendations based on common experiences enc... | 820 | [
{
"from": "human",
"value": "I have a large codebase that targetted Flash 7, with a lot of AS2 classes. I'm hoping that I'll be able to use Flex for any new projects, but a lot of new stuff in our roadmap is additions to the old code.\nThe syntax for AS2 and AS3 is generally the same, so I'm starting to wo... |
I haven't been able to find an understandable explanation of how to actually use Python's itertools.groupby() function. What I'm trying to do is this:
Take a list - in this case, the children of an objectified lxml element
Divide it into groups based on some criteria
Then later iterate over each of these groups separ... | The `itertools.groupby()` function is a powerful tool for grouping items in an iterable based on a specified key function. It’s important to note that `groupby()` only works correctly when the input data is sorted based on the same criteria that you use to group them. Here’s how you can use `itertools.groupby()` step-b... | 3,062 | [
{
"from": "human",
"value": "I haven't been able to find an understandable explanation of how to actually use Python's itertools.groupby() function. What I'm trying to do is this:\n\nTake a list - in this case, the children of an objectified lxml element\nDivide it into groups based on some criteria\nThen ... |
I have a gridview that is within an updatepanel for a modal popup I have on a page.
The issue is that the entire page refreshes every time I click an imagebutton that is within my gridview. This causes my entire page to load and since I have grayed out the rest of the page so that the user cannot click on it this is ve... | When you have a GridView within an UpdatePanel and experience a full page refresh upon clicking an ImageButton inside the GridView, it usually indicates that the ImageButton is not triggering a partial postback as intended. Here are some steps and considerations to troubleshoot and resolve the issue:
### Steps to Reso... | 2,138 | [
{
"from": "human",
"value": "I have a gridview that is within an updatepanel for a modal popup I have on a page.\nThe issue is that the entire page refreshes every time I click an imagebutton that is within my gridview. This causes my entire page to load and since I have grayed out the rest of the page so t... |
I have a .NET 2.0 Windows Forms application. Where is the best place the store user settings (considering Windows guidelines)?
Some people pointed to Application.LocalUserAppDataPath. However, that creates a folder structure like:
C:\Documents and Settings\user_name\Local Settings\Application
Data\company_name\produ... | In .NET applications, user settings can indeed be stored in a variety of locations, and selecting the appropriate storage method is essential for both usability and compliance with Windows guidelines.
When you store user settings in the `Application.LocalUserAppDataPath`, you will indeed create a folder structure that... | 4,323 | [
{
"from": "human",
"value": "I have a .NET 2.0 Windows Forms application. Where is the best place the store user settings (considering Windows guidelines)?\nSome people pointed to Application.LocalUserAppDataPath. However, that creates a folder structure like:\n\nC:\\Documents and Settings\\user_name\\Local... |
So my company uses a delightfully buggy program called Rational Purify (as a plugin to Microsoft Visual Developer Studio) to manage memory leaks. The program is deigned to let you click on a memory leak after you have encountered it, and then jump to the line that the leak occurs on.
Unfortunately Purify is malfunctio... | It sounds like you’re dealing with quite a frustrating situation with Rational Purify. Here are several strategies and resources that might help you troubleshoot the issue or work around the problems you're encountering:
1. **Check for Updates**: Make sure that you have the latest version of Rational Purify. Sometimes... | 3,181 | [
{
"from": "human",
"value": "So my company uses a delightfully buggy program called Rational Purify (as a plugin to Microsoft Visual Developer Studio) to manage memory leaks. The program is deigned to let you click on a memory leak after you have encountered it, and then jump to the line that the leak occu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.