instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
I may just be missing this functionality, but does anyone know if there is a widget available:
I need to list the subject for all the entries that are associated with a given tag.
For example: I have 5 articles tagged with "Tutorial", I'd like to see a list as follows:
Tutorial 1: Installing the app
Tutorial 2: Custom... | Yes, WordPress has built-in functionality that can help you achieve this, though you may need to use some custom code or a plugin to format it exactly as you want.
### Option 1: Use a Custom Loop
You can create a custom loop in your theme's template files to display posts associated with a specific tag. Here’s an exa... | 2,696 | [
{
"from": "human",
"value": "I may just be missing this functionality, but does anyone know if there is a widget available:\nI need to list the subject for all the entries that are associated with a given tag.\nFor example: I have 5 articles tagged with \"Tutorial\", I'd like to see a list as follows:\n\nTu... |
Is my best be going to be a shell script which replaces symlinks with copies, or is there another way of telling Git to follow symlinks?
PS: I know it's not very secure, but I only want to do it in a few specific cases.
| In Git, by default, symlinks are treated as pointers to the files or directories they reference, not as the actual files or directories themselves. This means that when you clone or checkout a repository, Git does not dereference the symlinks to get the actual content; it simply creates the symlinks as they are in the ... | 4,199 | [
{
"from": "human",
"value": "Is my best be going to be a shell script which replaces symlinks with copies, or is there another way of telling Git to follow symlinks?\nPS: I know it's not very secure, but I only want to do it in a few specific cases.\n"
},
{
"from": "gpt",
"value": "In Git, by de... |
I'm maintaining a .NET 1.1 application and one of the things I've been tasked with is making sure the user doesn't see any unfriendly error notifications.
I've added handlers to Application.ThreadException and AppDomain.CurrentDomain.UnhandledException, which do get called. My problem is that the standard CLR error dia... | In .NET 1.1, handling uncaught exceptions and preventing the standard CLR error dialog from being displayed can be a bit tricky since the framework does not provide a direct way to suppress the dialog for unhandled exceptions. However, the following approach can help you implement a friendly error handling mechanism:
... | 3,245 | [
{
"from": "human",
"value": "I'm maintaining a .NET 1.1 application and one of the things I've been tasked with is making sure the user doesn't see any unfriendly error notifications.\nI've added handlers to Application.ThreadException and AppDomain.CurrentDomain.UnhandledException, which do get called. My ... |
Any ideas on how to implement tab completion for a .NET (C#) Console Application?
And I mean within an application that is run and then loops for user input (like if you run ftp.exe without any arguments), like this:
string line = string.Empty;
while (line != "exit")
{
//do somethin... | Implementing tab completion in a .NET console application can be a bit complex due to the limitations of the standard `Console.ReadLine` method, which doesn't support custom input handling like tab completion out of the box. However, you can achieve this by leveraging the `Console` class methods to manually read input ... | 1,432 | [
{
"from": "human",
"value": "Any ideas on how to implement tab completion for a .NET (C#) Console Application?\nAnd I mean within an application that is run and then loops for user input (like if you run ftp.exe without any arguments), like this: \n string line = string.Empty;\n while (line !=... |
I need to read from Outlook .MSG file in .NET without using COM API for Outlook (cos it will not be installed on the machines that my app will run). Are there any free 3rd party libraries to do that? I want to extract From, To, CC and BCC fields. Sent/Receive date fields would be good if they are also stored in MSG fil... | Yes, there are third-party libraries available that can help you read `.MSG` files in .NET without relying on the COM API. One of the most commonly used libraries for this purpose is **MsgReader**. It is a free, open-source library that allows you to extract information from `.MSG` files.
### MsgReader
Here’s how to ... | 5,218 | [
{
"from": "human",
"value": "I need to read from Outlook .MSG file in .NET without using COM API for Outlook (cos it will not be installed on the machines that my app will run). Are there any free 3rd party libraries to do that? I want to extract From, To, CC and BCC fields. Sent/Receive date fields would b... |
Programming in vim I often go search for something, yank it, then go back to where I was, insert it, modify it.
The problem is that after I search and find, I need to MANUALLY find my way back to where I was.
Is there an automatic way to go back to where I was when I initiated my last search?
| Yes, there is an automatic way to return to your previous position after a search in Vim. When you perform a search using the `/` or `?` commands, Vim saves the cursor position before the search. You can jump back to that position using the backtick (`) or single quote (') commands.
Here are the steps to do this:
1. ... | 6,041 | [
{
"from": "human",
"value": "Programming in vim I often go search for something, yank it, then go back to where I was, insert it, modify it.\nThe problem is that after I search and find, I need to MANUALLY find my way back to where I was.\nIs there an automatic way to go back to where I was when I initiated... |
Is there any way to use inheritance in database (Specifically in SQL Server 2005)?
Suppose I have few field like CreatedOn, CreatedBy which I want to add on all of my entities. I looking for an alternative way instead of adding these fields to every table.
| In SQL Server 2005, there is no direct support for table inheritance as you might find in object-oriented programming languages. However, you can use some design patterns to achieve similar behavior. Here are a few common approaches to implementing inheritance or shared attributes across multiple tables:
### 1. Use a ... | 3,673 | [
{
"from": "human",
"value": "Is there any way to use inheritance in database (Specifically in SQL Server 2005)?\nSuppose I have few field like CreatedOn, CreatedBy which I want to add on all of my entities. I looking for an alternative way instead of adding these fields to every table.\n"
},
{
"from... |
We have an application with a good amount of jQuery JSON calls to server side code. Because of this, we have a large amount of binding code to parse responses and bind the appropriate values to the form. This is a two part question.
What is the reccomended approach for dealing with a large number of forms that all hav... | When dealing with a large number of forms with different data, particularly in a jQuery environment, there are several best practices and approaches you can adopt to manage and organize your JavaScript code effectively. Here are some recommendations:
### 1. Modular Structure
Using a modular approach allows you to sepa... | 1,459 | [
{
"from": "human",
"value": "We have an application with a good amount of jQuery JSON calls to server side code. Because of this, we have a large amount of binding code to parse responses and bind the appropriate values to the form. This is a two part question.\n\nWhat is the reccomended approach for dealin... |
Part of my everyday work is maintaining and extending legacy VB6 applications. A common engine is written in C/C++ and VB6 uses these functions in order to improve performance.
When it comes to asynchronous programming, a C interface is not enough and we rely on COM controls to fire events to VB6.
My problem is that w... | You're experiencing a common issue when working with COM controls in VB6, particularly when those controls are custom and developed using languages like C/C++. Unfortunately, the VB6 IDE tends to load and hold onto controls for the duration of the IDE session, preventing recompilation of the DLL until VB6 is closed.
H... | 2,296 | [
{
"from": "human",
"value": "Part of my everyday work is maintaining and extending legacy VB6 applications. A common engine is written in C/C++ and VB6 uses these functions in order to improve performance. \nWhen it comes to asynchronous programming, a C interface is not enough and we rely on COM controls t... |
My dad called me today and said people going to his website were getting 168 viruses trying to download to their computers. He isn't technical at all, and built the whole thing with a WYSIWYG editor.
I popped his site open and viewed the source, and there was a line of Javascript includes at the bottom of the source ri... | I'm sorry to hear about your dad's website being compromised. Here are some steps you can take to secure the site and protect against future attacks:
### Immediate Actions
1. **Remove Malicious Code**:
- You’ve already done this by commenting out the malicious script tag. Ensure there are no other unauthorized mo... | 2,561 | [
{
"from": "human",
"value": "My dad called me today and said people going to his website were getting 168 viruses trying to download to their computers. He isn't technical at all, and built the whole thing with a WYSIWYG editor.\nI popped his site open and viewed the source, and there was a line of Javascri... |
I'm making a simple extra java app launcher for Eclipse 3.2 (JBuilder 2007-8) for internal use.
So I looked up all the documentations related, including this one The Launching Framework from eclipse.org and have managed to make everything else working with the exception of the launch shortcut.
This is the part of my ... | It sounds like you are on the right track with your Eclipse plugin, but it's not recognizing or instantiating your custom `LaunchShortcut`. Here are a few steps and things to check to help troubleshoot and resolve the issue:
### 1. Check the Bundle Manifest
Ensure that your plugin's manifest (`MANIFEST.MF`) is correct... | 2,563 | [
{
"from": "human",
"value": "I'm making a simple extra java app launcher for Eclipse 3.2 (JBuilder 2007-8) for internal use.\nSo I looked up all the documentations related, including this one The Launching Framework from eclipse.org and have managed to make everything else working with the exception of the ... |
We all know T-SQL's string manipulation capabilities sometimes leaves much to be desired...
I have a numeric field that needs to be output in T-SQL as a right-aligned text column. Example:
Value
----------
143.55
3532.13
1.75
How would you go about that? A good solution ought to be clear and compact, but rem... | To achieve right-aligned text output for a numeric field in T-SQL, you can use the `FORMAT` function along with `REPLICATE` and `LEN` to dynamically create a string with spaces for alignment. However, in older versions of SQL Server, you might rely on `STR` or `FORMAT` for formatting purposes.
Assuming you want the ou... | 5,837 | [
{
"from": "human",
"value": "We all know T-SQL's string manipulation capabilities sometimes leaves much to be desired...\nI have a numeric field that needs to be output in T-SQL as a right-aligned text column. Example:\nValue\n----------\n 143.55\n 3532.13\n 1.75\n\nHow would you go about that? A goo... |
I am working on a project management web application. The user has a variety of ways to display a list of tasks. When viewing a list page, they click on task and are redirected to the task edit page.
Since they are coming from a variety of ways, I am just curious as to the best way to redirect the user back to the ... | Redirecting users back to the calling page in a web application can enhance user experience significantly, especially in a project management context where users frequently navigate between lists and task details. Here are some common approaches to handling this, along with their advantages and potential pitfalls:
###... | 3,215 | [
{
"from": "human",
"value": "I am working on a project management web application. The user has a variety of ways to display a list of tasks. When viewing a list page, they click on task and are redirected to the task edit page. \nSince they are coming from a variety of ways, I am just curious as to the ... |
I need to pass an ID and a password to a batch file at the time of running rather than hardcoding them into the file.
Here's what the command line looks like:
test.cmd admin P@55w0rd > test-log.txt
| To create a batch file that accepts an ID and a password as command-line arguments, you can use `%1` and `%2` to refer to the first and second arguments passed to the batch file, respectively.
Here's a simple example of what your `test.cmd` file could look like:
```batch
@echo off
setlocal
rem Check if the correct n... | 5,261 | [
{
"from": "human",
"value": "I need to pass an ID and a password to a batch file at the time of running rather than hardcoding them into the file.\nHere's what the command line looks like:\ntest.cmd admin P@55w0rd > test-log.txt\n\n"
},
{
"from": "gpt",
"value": "To create a batch file that acce... |
Anyone know this compiler feature? It seems GCC support that. How does it work? What is the potential gain? In which case it's good? Inner loops?
(this question is specific, not about optimization in general, thanks)
| It sounds like you're referring to the **GCC's loop vectorization** feature. This is a specific optimization that compilers like GCC use to improve the performance of loops by transforming them into a form that can be executed on vectorized hardware instructions (like SIMD - Single Instruction, Multiple Data).
### How... | 3,677 | [
{
"from": "human",
"value": "Anyone know this compiler feature? It seems GCC support that. How does it work? What is the potential gain? In which case it's good? Inner loops?\n(this question is specific, not about optimization in general, thanks)\n"
},
{
"from": "gpt",
"value": "It sounds like y... |
What is the best available method for developing a spell check engine (for example, with aspell_python), that works with apache mod_python?
apache 2.0.59+RHEL4+mod_python+aspell_python seems to crash.
Is there any alternative to using aspell_python?
| Developing a spell check engine using `aspell_python` with Apache's `mod_python` can indeed lead to stability issues, especially with older versions of Apache and mod_python. If you are experiencing crashes, it may be due to compatibility issues or resource management problems in mod_python. Here are some alternatives ... | 3,128 | [
{
"from": "human",
"value": "What is the best available method for developing a spell check engine (for example, with aspell_python), that works with apache mod_python?\napache 2.0.59+RHEL4+mod_python+aspell_python seems to crash.\nIs there any alternative to using aspell_python?\n"
},
{
"from": "gp... |
It seems to be the general opinion that tables should not be used for layout in HTML.
Why?
I have never (or rarely to be honest) seen good arguments for this. The usual answers are:
It's good to separate content from layoutBut this is a fallacious argument; Cliche Thinking. I guess it's true that using the table elem... | The debate over using tables for layout versus using CSS and divs has several layers and can be subjective, but there are several widely accepted reasons within the web development community for why using tables for layout is generally discouraged. Here are some arguments that may address your points:
### 1. **Semanti... | 3,189 | [
{
"from": "human",
"value": "It seems to be the general opinion that tables should not be used for layout in HTML. \nWhy?\nI have never (or rarely to be honest) seen good arguments for this. The usual answers are:\n\nIt's good to separate content from layoutBut this is a fallacious argument; Cliche Thinking... |
What does the option “convert to web application” do if I select it in visual studio? If I do convert my site to a web application what are the advantages? Can I go back?
| In Visual Studio, converting a website to a web application involves restructuring your project and changing how it is built and deployed. Here’s what happens when you select "Convert to Web Application" and the implications of doing so:
### What "Convert to Web Application" Does
1. **Project Structure**: When you co... | 4,920 | [
{
"from": "human",
"value": "What does the option “convert to web application” do if I select it in visual studio? If I do convert my site to a web application what are the advantages? Can I go back?\n"
},
{
"from": "gpt",
"value": "In Visual Studio, converting a website to a web application inv... |
I'm teaching (or trying to teach) computer programming to a grad-student. Her previous experience amounts to little more than writing spreadsheet formulae. Which IDE or text editor should I recommend?
Please bear in mind that:
I only meet my student about once a week.
She uses Windows and I use Linux.
She doesn't ha... | Given your requirements and the specific languages (Perl and R) that your student is learning, I recommend the following options:
1. **RStudio**:
- While RStudio is primarily tailored for R programming, it is an excellent Integrated Development Environment (IDE) for beginners. It offers features like code highligh... | 5,045 | [
{
"from": "human",
"value": "I'm teaching (or trying to teach) computer programming to a grad-student. Her previous experience amounts to little more than writing spreadsheet formulae. Which IDE or text editor should I recommend?\nPlease bear in mind that:\n\nI only meet my student about once a week.\nShe... |
What languages and tools do you consider a youngster starting out in programming should use in the modern era?
Lots of us started with proprietary Basics and they didn't do all of us long term harm :) but given the experiences you have had since then and your knowledge of the domain now are there better options?
There ... | When it comes to introducing programming to youngsters in the modern era, there are several languages and tools that can effectively engage them and build a solid foundation. Here’s a structured overview of the best options, catering to different age groups and skill levels:
### 1. **Visual Programming Languages**
... | 1,962 | [
{
"from": "human",
"value": "What languages and tools do you consider a youngster starting out in programming should use in the modern era?\nLots of us started with proprietary Basics and they didn't do all of us long term harm :) but given the experiences you have had since then and your knowledge of the d... |
How do I setup Public-Key Authentication for SSH?
| Setting up Public-Key Authentication for SSH enhances the security of your SSH connections by allowing you to authenticate without the need for passwords. Here’s a step-by-step guide on how to set it up:
### Step 1: Generate SSH Key Pair
1. **Open a Terminal** on your local machine.
2. Run the following command to g... | 2,844 | [
{
"from": "human",
"value": "How do I setup Public-Key Authentication for SSH?\n"
},
{
"from": "gpt",
"value": "Setting up Public-Key Authentication for SSH enhances the security of your SSH connections by allowing you to authenticate without the need for passwords. Here’s a step-by-step guide o... |
Is Boost the only way for VS2005 users experience TR2? Also is there a idiot proof way of downloading only the TR2 related packages?
I was looking at the boost installer provided by BoostPro Consulting. If I select the options for all the threading options with all the packages for MSVC8 it requires 1.1GB. While I am n... | Using Boost is indeed a common way to get access to the functionality provided by the Technical Report 2 (TR2) for users of Visual Studio 2005, especially since TR2 features were included in Boost's implementation. However, it's not the only option, but it's the most straightforward one for compatibility and ease of us... | 3,801 | [
{
"from": "human",
"value": "Is Boost the only way for VS2005 users experience TR2? Also is there a idiot proof way of downloading only the TR2 related packages?\nI was looking at the boost installer provided by BoostPro Consulting. If I select the options for all the threading options with all the packages... |
Working on a little side project web app...
I'd like to have it set up so that, when users send email to a certain account, I can kick off a PHP script that reads the email, pulls out some key info, and writes it to a database.
What's the best way to do this? A cron job that checks for new email?
The app is running on ... | Hi Matt,
It sounds like a great project! Here are some strategies to consider for reading emails, extracting information, and writing it to a database using PHP and MySQL. You have a few options, and the cron job approach is one of the more common methods.
### Option 1: Use a Cron Job to Check for New Emails
1. **Se... | 373 | [
{
"from": "human",
"value": "Working on a little side project web app...\nI'd like to have it set up so that, when users send email to a certain account, I can kick off a PHP script that reads the email, pulls out some key info, and writes it to a database.\nWhat's the best way to do this? A cron job that c... |
Is it possible to convert floating point exceptions (signals) into C++ exceptions on x86 Linux?
This is for debugging purposes, so nonportability and imperfection is okay (e.g., if it isn't 100% guaranteed that all destructors are called).
| Yes, it is possible to convert floating-point exceptions (signals) into C++ exceptions on x86 Linux. However, this requires low-level handling of signals and may involve some platform-specific code. Below is a general overview of how you might approach this task, along with an example implementation:
### Steps to Conv... | 3,569 | [
{
"from": "human",
"value": "Is it possible to convert floating point exceptions (signals) into C++ exceptions on x86 Linux?\nThis is for debugging purposes, so nonportability and imperfection is okay (e.g., if it isn't 100% guaranteed that all destructors are called).\n"
},
{
"from": "gpt",
"va... |
How do I select all the columns in a table that only contain NULL values for all the rows? I'm using MS SQL Server 2005. I'm trying to find out which columns are not used in the table so I can delete them.
| To find all columns in a table that only contain `NULL` values for all rows in SQL Server 2005, you can use a combination of dynamic SQL and system catalog views. Here's a step-by-step explanation and a sample query to accomplish this.
1. **Get All Columns of the Table**: You can retrieve the column names for a specif... | 2,441 | [
{
"from": "human",
"value": "How do I select all the columns in a table that only contain NULL values for all the rows? I'm using MS SQL Server 2005. I'm trying to find out which columns are not used in the table so I can delete them.\n"
},
{
"from": "gpt",
"value": "To find all columns in a t... |
GNU sed version 4.1.5 seems to fail with International chars. Here is my input file:
Gras Och Stenar Trad - From Moja to Minneapolis DVD [G2007DVD] 7812 | X
<br>
Gras Och Stenar Trad - From Möja to Minneapolis DVD [G2007DVD] 7812 | Y
(Note the umlaut in the second line.)
And when I do
sed 's/.*| //' < in
I would expe... | The behavior you're encountering with GNU `sed` 4.1.5 suggests that it is not properly handling multibyte UTF-8 characters, such as the umlaut "ö". This is a common issue with older versions of `sed`. However, there are a few potential solutions to work around this limitation:
### Solution 1: Set Locale
Before runnin... | 5,240 | [
{
"from": "human",
"value": "GNU sed version 4.1.5 seems to fail with International chars. Here is my input file:\nGras Och Stenar Trad - From Moja to Minneapolis DVD [G2007DVD] 7812 | X\n<br>\nGras Och Stenar Trad - From Möja to Minneapolis DVD [G2007DVD] 7812 | Y\n\n(Note the umlaut in the second line.)\n... |
In the transition to newforms admin I'm having difficulty figuring out how specify core=False for ImageFields.
I get the following error:
TypeError: __init__() got an unexpected keyword argument 'core'
[Edit] However, by just removing the core argument I get a "This field is required." error in the admin interface on ... | In Django's newforms admin (Django 1.5 and above), the `core` argument is no longer available directly as it was in the oldforms. Instead, you can manage the behavior of fields in the admin interface by utilizing the `blank` and `null` options.
To make an `ImageField` optional (which is what `core=False` was intended ... | 4,174 | [
{
"from": "human",
"value": "In the transition to newforms admin I'm having difficulty figuring out how specify core=False for ImageFields.\nI get the following error:\nTypeError: __init__() got an unexpected keyword argument 'core'\n\n[Edit] However, by just removing the core argument I get a \"This field ... |
Is there any benefit in using a <blockquote> element over a <div>? I was looking at a website's markup to learn CSS and I couldn't figure out why the <blockquote> was being used.
EDIT: Yeah sorry I didn't clarify, it was used to hold the <div> tag with username as 'text' and an input tag. There was clearly no quote.
| Yes, there are benefits to using the `<blockquote>` element over a `<div>`, but it largely depends on the context of the content you are displaying.
### Benefits of Using `<blockquote>`:
1. **Semantic Meaning**: The `<blockquote>` element is specifically intended for quoted material. It conveys to both browsers and s... | 6,031 | [
{
"from": "human",
"value": "Is there any benefit in using a <blockquote> element over a <div>? I was looking at a website's markup to learn CSS and I couldn't figure out why the <blockquote> was being used.\nEDIT: Yeah sorry I didn't clarify, it was used to hold the <div> tag with username as 'text' and an... |
I have defined a custom Sharepoint list for special attributes related to a software application inventory and installed it as a feature. I also want to group these attributes in categories. How could I change the Sharepoint page that allows the user to add a column to a list, so that when the user adds a column to my ... | To add a dropdown for categorizing columns (attributes) in a custom SharePoint list, you’ll need to leverage SharePoint's capabilities, including creating a custom field type or using column formatting. Here’s a high-level overview of how you can implement this:
### Approach 1: Using Custom Field Type
1. **Create a C... | 3,627 | [
{
"from": "human",
"value": "I have defined a custom Sharepoint list for special attributes related to a software application inventory and installed it as a feature. I also want to group these attributes in categories. How could I change the Sharepoint page that allows the user to add a column to a list, s... |
We are trying to create a web-service that we plan to pass a variable amount of variables to it.
Can this be done?
Basically instead of pass all possible parameters we wish to pass only the set values and use the defaults set in the web-service.
Here is an example of the XML we are looking to send, we would sent an unk... | Yes, the XML structure you provided can work for a SOAP web service, allowing you to pass only the set values while relying on defaults for the parameters that are not specified. The SOAP protocol is designed to handle such situations, and the way you've organized the XML allows for optional parameters.
Here are some ... | 3,864 | [
{
"from": "human",
"value": "We are trying to create a web-service that we plan to pass a variable amount of variables to it.\nCan this be done?\nBasically instead of pass all possible parameters we wish to pass only the set values and use the defaults set in the web-service.\nHere is an example of the XML ... |
Is there any way to listen to an Oracle AQ using a Perl process as the listener.
| Yes, you can listen to Oracle Advanced Queuing (AQ) using a Perl script. Oracle AQ allows you to manage message queues within the Oracle database, and you can use Perl along with the appropriate database modules to interact with it. Below is a general approach to set this up.
### Prerequisites:
1. **Oracle Database** ... | 3,732 | [
{
"from": "human",
"value": "Is there any way to listen to an Oracle AQ using a Perl process as the listener.\n"
},
{
"from": "gpt",
"value": "Yes, you can listen to Oracle Advanced Queuing (AQ) using a Perl script. Oracle AQ allows you to manage message queues within the Oracle database, and yo... |
I'm creating a plugin framework, where my application loads a series of plugin DLL's, then creates a new window and pass this new window's handle to the plugin. The plugin can, then, use this handle to create their own GUI.
Everything seems to be working very well. The only problem is that when I press TAB on a plugin ... | The issue you're experiencing with the TAB key not being passed to the plugin widgets is a common scenario when dealing with custom window handles and message forwarding in Win32 applications. The TAB key is special because it is used for navigation between focusable controls, and its handling is not always straightfor... | 3,284 | [
{
"from": "human",
"value": "I'm creating a plugin framework, where my application loads a series of plugin DLL's, then creates a new window and pass this new window's handle to the plugin. The plugin can, then, use this handle to create their own GUI.\nEverything seems to be working very well. The only pro... |
I've come to love Amazon's EC2 service and I'm looking for something similar that supports the ability to save a running Windows server image and start new instances from it.
I contacted GoGrid (the feature is planned in future) and Mosso (no joy)
Anyone know of any hosting/cloud providers that can dothis?
| If you're looking for cloud providers that allow you to save running Windows server images and start new instances from them, here are some alternatives to Amazon EC2 that you might consider:
1. **Microsoft Azure**: Azure provides Virtual Machines (VMs) and allows you to create images of your running instances using t... | 5,345 | [
{
"from": "human",
"value": "I've come to love Amazon's EC2 service and I'm looking for something similar that supports the ability to save a running Windows server image and start new instances from it.\nI contacted GoGrid (the feature is planned in future) and Mosso (no joy)\nAnyone know of any hosting/cl... |
I know that tables are for tabular data, but it's so tempting to use them for layout. I can handle DIV's to get a three column layout, but when you got 4 nested DIV's, it get tricky.
Is there a tutorial/reference out there to persuade me to use DIV's for layout?
I want to use DIV's, but I refuse to spend an hour to po... | It's great to hear that you're interested in using DIVs and CSS for layout instead of tables! Modern web design practices advocate for using CSS for layout because it separates content from presentation, making your HTML cleaner and more semantically meaningful. Here are some key points and resources to help persuade y... | 2,944 | [
{
"from": "human",
"value": "I know that tables are for tabular data, but it's so tempting to use them for layout. I can handle DIV's to get a three column layout, but when you got 4 nested DIV's, it get tricky. \nIs there a tutorial/reference out there to persuade me to use DIV's for layout?\nI want to use... |
Is there anyplace where one can download a virtual machine containing a working install of some Linux distro with Globus Toolkit and some development tools (Java) for testing purposes? A real deployment of a grid is more complicated but I just need something portable, for development.
| Yes, there are several options for downloading pre-configured virtual machines that contain Linux distributions with the Globus Toolkit and development tools like Java. Here are some suggestions:
1. **Globus Toolkit Virtual Machine Images**: The Globus Project sometimes provides virtual machine images or guides for se... | 2,775 | [
{
"from": "human",
"value": "Is there anyplace where one can download a virtual machine containing a working install of some Linux distro with Globus Toolkit and some development tools (Java) for testing purposes? A real deployment of a grid is more complicated but I just need something portable, for develo... |
Occasionally while attempting to save a Crystal Report that I'm working on in VS2008, a dialog titled "File Save Failed" pops up saying "The document could not be saved in C:\Users\Phillip\AppData\Local\Temp{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}.rpt. It has been saved in C:\Users\Phillip\AppData\Local\Temp\~zzz{YYYYYY... | This issue you're experiencing with Crystal Reports in Visual Studio 2008 can be frustrating, but there are a few potential causes and solutions you can try to resolve the intermittent file save problems:
1. **Permissions Issue**: Ensure that you have the necessary permissions for the directory where you are attemptin... | 3,038 | [
{
"from": "human",
"value": "Occasionally while attempting to save a Crystal Report that I'm working on in VS2008, a dialog titled \"File Save Failed\" pops up saying \"The document could not be saved in C:\\Users\\Phillip\\AppData\\Local\\Temp{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}.rpt. It has been saved in... |
I'm not new to web publishing, BUT I am new to publishing against a web site that is frequently used. Previously, the apps on this server were not hit very often, but we're rolling out a high demand application. So, what is the best practice for publishing to a live web server?
Is it best to wait until the middle
of... | Publishing to a live web server, especially for a high-demand application, requires careful planning to minimize disruption and ensure a smooth experience for users. Here are some best practices to consider:
### 1. **Choose the Right Time for Deployment**
- **Scheduled Maintenance Windows**: If you can predict low-... | 2,794 | [
{
"from": "human",
"value": "I'm not new to web publishing, BUT I am new to publishing against a web site that is frequently used. Previously, the apps on this server were not hit very often, but we're rolling out a high demand application. So, what is the best practice for publishing to a live web server... |
What is the best way to distribute files to users in remote offices, using BITS with a UNC path or BITS with HTTP? I have a VB.NET project which currently downloads from a HTTP path, but there is added complexity involved (e.g. having a web server).
Or is there a better way to do this? Low bandwith usage is more impor... | When considering the distribution of files to users in remote offices while prioritizing low bandwidth usage, there are several options to consider, including Background Intelligent Transfer Service (BITS) with both UNC and HTTP paths. Here’s a breakdown of each approach:
### 1. **BITS with UNC Path**
Using BITS with ... | 1,746 | [
{
"from": "human",
"value": "What is the best way to distribute files to users in remote offices, using BITS with a UNC path or BITS with HTTP? I have a VB.NET project which currently downloads from a HTTP path, but there is added complexity involved (e.g. having a web server). \nOr is there a better way to... |
Perl has OOP features, but they are somewhat rarely used. How do you create and use Perl objects with methods and properties?
| In Perl, Object-Oriented Programming (OOP) is achieved through the use of packages (which can be thought of as classes) and the concept of objects, methods, and properties (attributes). Below is a basic example of how to create and use Perl objects with methods and properties.
### Step-by-step Guide to Create and Use ... | 739 | [
{
"from": "human",
"value": "Perl has OOP features, but they are somewhat rarely used. How do you create and use Perl objects with methods and properties?\n"
},
{
"from": "gpt",
"value": "In Perl, Object-Oriented Programming (OOP) is achieved through the use of packages (which can be thought of ... |
I've got the following rough structure:
Object -> Object Revisions -> Data
The Data can be shared between several Objects.
What I'm trying to do is clean out old Object Revisions. I want to keep the first, active, and a spread of revisions so that the last change for a time period is kept. The Data might be changed a ... | In SQL Server 2000, working with sequential rows in a dataset often requires using cursors and temporary tables, but there's a more set-based approach that can simplify this process, even though it may not be as efficient as newer versions of SQL Server that offer more advanced features.
### SQL Server 2000 Approach
I... | 3,222 | [
{
"from": "human",
"value": "I've got the following rough structure:\nObject -> Object Revisions -> Data\n\nThe Data can be shared between several Objects.\nWhat I'm trying to do is clean out old Object Revisions. I want to keep the first, active, and a spread of revisions so that the last change for a time... |
in XSLT processing, is there a performance difference between apply-template and call-template? In my stylesheets there are many instances where I can use either, which is the best choice?
| In XSLT, both `<xsl:apply-templates>` and `<xsl:call-template>` are used to invoke templates, but they serve different purposes and have different implications for performance and usage.
### Differences Between `apply-templates` and `call-template`
1. **Behavior**:
- `<xsl:apply-templates>`:
- This element is... | 4,151 | [
{
"from": "human",
"value": "in XSLT processing, is there a performance difference between apply-template and call-template? In my stylesheets there are many instances where I can use either, which is the best choice?\n"
},
{
"from": "gpt",
"value": "In XSLT, both `<xsl:apply-templates>` and `<x... |
My employer just asked me to run a timed batch process in a Java EE WebSphere application they have running. It's supposed to run a certain class at 11:30 pm everyday.
I'm not very familiar with Java EE nor WebSphere server (or tomcat, in the development environment), and I've been digging around but all I've found is ... | To schedule a batch process in a Java EE application deployed on a WebSphere server, you typically use a combination of the Java EE Timer Service or Quartz scheduler. Since you mentioned you're interested in running a task at a specific time (11:30 PM daily), using the EJB Timer Service might be the simplest approach i... | 3,812 | [
{
"from": "human",
"value": "My employer just asked me to run a timed batch process in a Java EE WebSphere application they have running. It's supposed to run a certain class at 11:30 pm everyday.\nI'm not very familiar with Java EE nor WebSphere server (or tomcat, in the development environment), and I've ... |
Subversion has a superb client on Windows (Tortoise, of course). Everything I've tried on Linux just - well - sucks in comparison....
| It's true that TortoiseSVN is highly regarded for its user-friendly interface and tight integration with the Windows file explorer. However, there are several SVN clients available on Linux that you might find useful, even if they differ from Tortoise in some ways. Here are a few options to consider:
1. **RabbitVCS**:... | 4,692 | [
{
"from": "human",
"value": "Subversion has a superb client on Windows (Tortoise, of course). Everything I've tried on Linux just - well - sucks in comparison....\n"
},
{
"from": "gpt",
"value": "It's true that TortoiseSVN is highly regarded for its user-friendly interface and tight integration ... |
I am overriding a lot of SAP's Portal functionality in my current project. I have to create a custom fixed width framework, custom iView trays, custom KM API functionality, and more.
With all of these custom parts, I will not be using a lot of the style functionality implemented by SAP's Theme editor. What I would li... | Integrating an external CSS stylesheet into SAP Portal can indeed be tricky, especially if you want to maintain a central location for your custom styles outside of the portal environment. Here are a few approaches you might consider to achieve this:
1. **Custom iView with JavaScript:**
Create a custom iView that u... | 3,526 | [
{
"from": "human",
"value": "I am overriding a lot of SAP's Portal functionality in my current project. I have to create a custom fixed width framework, custom iView trays, custom KM API functionality, and more.\nWith all of these custom parts, I will not be using a lot of the style functionality implement... |
Say I have three files (template_*.txt):
template_x.txt
template_y.txt
template_z.txt
I want to copy them to three new files (foo_*.txt).
foo_x.txt
foo_y.txt
foo_z.txt
Is there some simple way to do that with one command, e.g.
cp --enableAwesomeness template_*.txt foo_*.txt
| You can't achieve the desired result using a single `cp` command as you've described, since the wildcard patterns don't directly map in that way. However, you can use a combination of shell features to achieve this in one command. Here's one way to do it using a loop in the command line:
```bash
for file in template_*... | 5,054 | [
{
"from": "human",
"value": "Say I have three files (template_*.txt):\n\ntemplate_x.txt\ntemplate_y.txt\ntemplate_z.txt\n\nI want to copy them to three new files (foo_*.txt). \n\nfoo_x.txt \nfoo_y.txt \nfoo_z.txt\n\nIs there some simple way to do that with one command, e.g. \ncp --enableAwesomeness template... |
And why does gdb seem to "hit" it?
| When you're using GDB (GNU Debugger) and you mention that it "hits" something, you're likely referring to breakpoints, watchpoints, or exceptions that are triggered during the execution of your program. Here are a few common reasons why GDB might seem to "hit" or stop at a certain point:
1. **Breakpoints**: If you've ... | 5,151 | [
{
"from": "human",
"value": "And why does gdb seem to \"hit\" it?\n"
},
{
"from": "gpt",
"value": "When you're using GDB (GNU Debugger) and you mention that it \"hits\" something, you're likely referring to breakpoints, watchpoints, or exceptions that are triggered during the execution of your p... |
I have a Monthly Status database view I need to build a report based on. The data in the view looks something like this:
Category | Revenue | Yearh | Month
Bikes 10 000 2008 1
Bikes 12 000 2008 2
Bikes 12 000 2008 3
Bikes 15 000 2008 1
Bikes 1... | To achieve the desired report format while ensuring that you capture all months, even those with no sales for the given years, you need to construct your SQL query carefully. The main goal is to generate a result set that includes all months for both years and uses outer joins to get the revenue for both years.
Here’s... | 4,287 | [
{
"from": "human",
"value": "I have a Monthly Status database view I need to build a report based on. The data in the view looks something like this:\nCategory | Revenue | Yearh | Month\nBikes 10 000 2008 1\nBikes 12 000 2008 2\nBikes 12 000 2008 3\nBik... |
I'm coming from the open source world, and interested in giving ASP.NET a spin. But I'm having a little trouble separating the tools from the platform itself in regards to the licensing. I've downloaded Visual Web Developer 2008 Express, but not sure how different this is from one of the full-featured Visual Studio lic... | Welcome to the world of ASP.NET! It's great that you're looking to explore this platform. Let me clarify the licensing and feature differences between Visual Studio Express, the full versions of Visual Studio, and the components of the .NET ecosystem.
### Visual Studio Express vs. Full Visual Studio
1. **Visual Studi... | 3,301 | [
{
"from": "human",
"value": "I'm coming from the open source world, and interested in giving ASP.NET a spin. But I'm having a little trouble separating the tools from the platform itself in regards to the licensing. I've downloaded Visual Web Developer 2008 Express, but not sure how different this is from o... |
I have nUnit installed.
I have VS2008 Team Edition installed.
I have ASP.Net MVC Preview 4 (Codeplex) installed.
How do I make Visual Studio show me nUnit as a testing framework when creating a new MVC project? At this point I still only have the Microsoft Testing Framework as a choice.
Update: I installed nUnit 2... | To make NUnit available as a testing framework when creating new projects in Visual Studio 2008 with ASP.NET MVC, you need to follow a few steps. Since you have already done some research and figured out part of the process, here’s a more detailed guide that includes creating project templates and registry entries:
##... | 3,613 | [
{
"from": "human",
"value": "\nI have nUnit installed.\nI have VS2008 Team Edition installed.\nI have ASP.Net MVC Preview 4 (Codeplex) installed.\n\nHow do I make Visual Studio show me nUnit as a testing framework when creating a new MVC project? At this point I still only have the Microsoft Testing Framew... |
I am looking for a lean and well constructed open source implementation of a B-tree library written in C. It needs to be under a non-GPL license so that it can be used in a commercial application. Ideally, this library supports the B-tree index to be stored/manipulated as a disk file so that large trees can be built us... | Finding an open source B-tree library that meets your criteria can be a bit challenging, but here are a few options you might consider:
1. **libb-tree**:
- **Repository**: [libb-tree](https://github.com/mischaud/libb-tree)
- **License**: MIT License
- **Description**: This library provides a simple implementa... | 2,933 | [
{
"from": "human",
"value": "I am looking for a lean and well constructed open source implementation of a B-tree library written in C. It needs to be under a non-GPL license so that it can be used in a commercial application. Ideally, this library supports the B-tree index to be stored/manipulated as a disk... |
I've got an RMI call defined as:
public void remoteGetCustomerNameNumbers(ArrayList<String> customerNumberList, ArrayList<String> customerNameList) throws java.rmi.RemoteException;
The function does a database lookup and populates the two ArrayLists. The calling function gets nothing. I believe this works with Vector... | In Java RMI, when you pass an `ArrayList` or any other object to a remote method, the object reference is passed, but the object itself is serialized and sent over the network. The main issue you're experiencing is due to the fact that `ArrayList` isn't an RMI-serializable object. Although `ArrayList` implements `Seria... | 4,652 | [
{
"from": "human",
"value": "I've got an RMI call defined as:\npublic void remoteGetCustomerNameNumbers(ArrayList<String> customerNumberList, ArrayList<String> customerNameList) throws java.rmi.RemoteException;\n\nThe function does a database lookup and populates the two ArrayLists. The calling function ge... |
I've been developing a site using ASP.NET MVC, and have decided to use the new SQL Server 2008 FILESTREAM facility to store files 'within' the database rather than as separate entities. While initially working within VS2008 (using a trusted connection to the database), everything was fine and dandy. Issues arose, ho... | Using SQL Server FILESTREAM with SQL authentication can indeed present challenges, as FILESTREAM was designed primarily to work with Windows authentication for security reasons. However, there are a few strategies you can consider to work around these limitations and ensure that you can effectively use FILESTREAM in yo... | 2,995 | [
{
"from": "human",
"value": "\nI've been developing a site using ASP.NET MVC, and have decided to use the new SQL Server 2008 FILESTREAM facility to store files 'within' the database rather than as separate entities. While initially working within VS2008 (using a trusted connection to the database), everyt... |
I'd like to keep a "compile-counter" for one of my projects. I figured a quick and dirty way to do this would be to keep a text file with a plain number in it, and then simply call upon a small script to increment this each time I compile.
How would I go about doing this using the regular Windows command line?
I don't ... | You can definitely achieve a compile counter using a simple batch script in the Windows Command Line. Below are the steps to create a simple counter using a text file:
### Step 1: Create a Counter File
1. Open Notepad (or any text editor).
2. Type `0` (or whatever initial number you want for the counter).
3. Save the... | 4,641 | [
{
"from": "human",
"value": "I'd like to keep a \"compile-counter\" for one of my projects. I figured a quick and dirty way to do this would be to keep a text file with a plain number in it, and then simply call upon a small script to increment this each time I compile.\nHow would I go about doing this usin... |
I'm looking for a c# snippet which I can insert in a Windows service. The code must empty the recycle bin for all users on the computer.
I have previously tried using SHEmptyRecycleBin (ref http://www.codeproject.com/KB/cs/Empty_Recycle_Bin.aspx) however the code doesn't work when ran from a windows service as the serv... | To empty the recycle bin for all users from a Windows Service, you might run into issues due to the context in which the service operates, especially regarding user permissions. A common approach is to utilize the `SHEmptyRecycleBin` function from the Windows Shell API. However, since the service runs under the Local S... | 3,741 | [
{
"from": "human",
"value": "I'm looking for a c# snippet which I can insert in a Windows service. The code must empty the recycle bin for all users on the computer.\nI have previously tried using SHEmptyRecycleBin (ref http://www.codeproject.com/KB/cs/Empty_Recycle_Bin.aspx) however the code doesn't work w... |
I am working on a small webapp and I want to use Groovy to write some unit testing for my app. Most of my coding is done on Eclipse and I really want to run all the unit testing with the graphical test runner within Eclipse (I really like the green bar :) )
Sadly, after 4 hours of try-and-error, I'm still not able to s... | Certainly! It seems like you're trying to set up unit testing for your Groovy application in Eclipse using JUnit, but you're encountering issues with configuration. Here’s a step-by-step guide to ensure you have everything set up correctly:
### Step 1: Install Groovy and JUnit
Make sure you have both Groovy and JUnit ... | 4,160 | [
{
"from": "human",
"value": "I am working on a small webapp and I want to use Groovy to write some unit testing for my app. Most of my coding is done on Eclipse and I really want to run all the unit testing with the graphical test runner within Eclipse (I really like the green bar :) )\nSadly, after 4 hours... |
Excluding the Micro Framework Emulator ;)
| It seems like you're referring to the Micro Framework Emulator, which is often used for testing and development purposes in embedded systems and IoT applications. If you have specific questions or topics related to the Micro Framework or alternatives to it, please provide more details. I’d be happy to help with informa... | 8,015 | [
{
"from": "human",
"value": "Excluding the Micro Framework Emulator ;)\n"
},
{
"from": "gpt",
"value": "It seems like you're referring to the Micro Framework Emulator, which is often used for testing and development purposes in embedded systems and IoT applications. If you have specific question... |
When using Subversion (svn) for source control with multiple projects I've noticed that the revision number increases across all of my projects' directories. To illustrate my svn layout (using fictitious project names):
/NinjaProg/branches
/tags
/trunk
/StealthApp/branches
... | Using Subversion (SVN), it is indeed a common behavior for the revision number to increase across all projects when they share a single repository. This is because SVN maintains a single global revision number for the entire repository, meaning that any commit to any part of the repository—be it in `/NinjaProg`, `/Stea... | 4,112 | [
{
"from": "human",
"value": "When using Subversion (svn) for source control with multiple projects I've noticed that the revision number increases across all of my projects' directories. To illustrate my svn layout (using fictitious project names): \n\n /NinjaProg/branches\n /tags\n ... |
In Hibernate we have two classes with the following classes with JPA mapping:
package com.example.hibernate
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyTo... | You've encountered a common situation when working with Hibernate's lazy loading and proxies. The approach you have implemented checks whether the fetched object is a proxy and initializes it if necessary. While it works, there are indeed cleaner ways to handle this situation.
### Recommended Approaches
1. **Using `H... | 3,327 | [
{
"from": "human",
"value": "In Hibernate we have two classes with the following classes with JPA mapping:\npackage com.example.hibernate\n\nimport javax.persistence.Entity;\nimport javax.persistence.FetchType;\nimport javax.persistence.GeneratedValue;\nimport javax.persistence.GenerationType;\nimport javax... |
I have an iframe. The content is wider than the width I am setting so the iframe gets a horizontal scroll bar. I can't increase the width of the iframe so I want to just remove the scroll bar. I tried setting the scroll property to "no" but that kills both scroll bars and I want the vertical one. I tried setting ov... | If you want to hide the horizontal scrollbar of an iframe while keeping the vertical scrollbar visible, you can accomplish this using CSS. However, as you noticed, cross-browser compatibility can be tricky. Here’s a method you can use that should work across major browsers.
### CSS Method:
You can try applying some CS... | 5,038 | [
{
"from": "human",
"value": "I have an iframe. The content is wider than the width I am setting so the iframe gets a horizontal scroll bar. I can't increase the width of the iframe so I want to just remove the scroll bar. I tried setting the scroll property to \"no\" but that kills both scroll bars and I... |
What steps do I need to take to change an IP address for Oracle 10g? I cannot connect to the database after going from a dhcp address to a static IP and a reboot.
| Changing the IP address of a server running Oracle Database 10g can require a few steps to ensure that the database is configured properly to recognize the new IP address. Here are the steps you should follow:
### 1. Update Network Configuration
If you switched from DHCP to a static IP address, ensure that your networ... | 3,875 | [
{
"from": "human",
"value": "What steps do I need to take to change an IP address for Oracle 10g? I cannot connect to the database after going from a dhcp address to a static IP and a reboot.\n"
},
{
"from": "gpt",
"value": "Changing the IP address of a server running Oracle Database 10g can req... |
Sorry for the subject line sounding like an even nerdier Harry Potter title.
I'm trying to use AS3's Socket class to write a simple FTP program to export as an AIR app in Flex Builder 3. I'm using an FTP server on my local network to test the program. I can successfully connect to the server (the easy part) but I can... | Hi Dave,
Using ActionScript 3 (AS3) to create an FTP client with the Socket class can be a bit tricky, especially when it comes to formatting the commands and handling the FTP protocol. You're correct that you'll need to use the ByteArray class to send commands to the FTP server. Here’s a simple overview of how you ca... | 2,235 | [
{
"from": "human",
"value": "Sorry for the subject line sounding like an even nerdier Harry Potter title.\nI'm trying to use AS3's Socket class to write a simple FTP program to export as an AIR app in Flex Builder 3. I'm using an FTP server on my local network to test the program. I can successfully conne... |
We're in the process of upgrading one of our SQL Server instances from 2000 to 2005. I installed the performance dashboard (http://www.microsoft.com/downloads/details.aspx?FamilyId=1d3a4a0d-7e0c-4730-8204-e419218c1efc&displaylang=en) for access to some high level reporting. One of the reports shows missing (recommended... | Upgrading from SQL Server 2000 to 2005 is a significant step, especially with the new indexing and performance monitoring features in SQL Server 2005. When it comes to evaluating index recommendations, there are some best practices you can follow to ensure that you make informed decisions.
### Best Practices for Evalu... | 4,215 | [
{
"from": "human",
"value": "We're in the process of upgrading one of our SQL Server instances from 2000 to 2005. I installed the performance dashboard (http://www.microsoft.com/downloads/details.aspx?FamilyId=1d3a4a0d-7e0c-4730-8204-e419218c1efc&displaylang=en) for access to some high level reporting. One ... |
What is the the best JavaScript compressor available? I'm looking for a tool that:
is easy to use
has a high compression rate
Produce reliable end results (doesn't mess up the code)
| There are several excellent JavaScript compressors available that meet your criteria. Here are a few that are easy to use, offer high compression rates, and produce reliable output:
1. **Terser**:
- **Description**: Terser is a popular JavaScript compressor that is widely used in the industry. It is a fork of Uglif... | 2,278 | [
{
"from": "human",
"value": "What is the the best JavaScript compressor available? I'm looking for a tool that:\n\nis easy to use\nhas a high compression rate\nProduce reliable end results (doesn't mess up the code)\n\n"
},
{
"from": "gpt",
"value": "There are several excellent JavaScript compre... |
I'm working on a project which uses .NET Remoting for communication between the client application and an object server. For development, the client, server, and MSSQL database are all running on my local development machine.
When I'm working at the office, the responsiveness is just fine.
However, when I work from h... | It sounds like you're experiencing issues related to network latency or routing, especially when using a VPN. Here are a few strategies you can employ to improve the performance of your .NET Remoting application by ensuring that traffic remains local:
### 1. **Use Loopback Addresses**
When you are running both the cli... | 1,912 | [
{
"from": "human",
"value": "I'm working on a project which uses .NET Remoting for communication between the client application and an object server. For development, the client, server, and MSSQL database are all running on my local development machine. \nWhen I'm working at the office, the responsiveness ... |
In the ContainsIngredients method in the following code, is it possible to cache the p.Ingredients value instead of explicitly referencing it several times? This is a fairly trivial example that I just cooked up for illustrative purposes, but the code I'm working on references values deep inside p eg. p.InnerObject.Ex... | Yes, you can cache the `p.Ingredients` value in your expression to avoid repeatedly referencing it. In the case of constructing an expression with `PredicateBuilder`, you can define a local variable that holds the value of `p.Ingredients` and use that cached value in your expression logic.
Here’s how you can modify t... | 6,254 | [
{
"from": "human",
"value": "In the ContainsIngredients method in the following code, is it possible to cache the p.Ingredients value instead of explicitly referencing it several times? This is a fairly trivial example that I just cooked up for illustrative purposes, but the code I'm working on references ... |
What was the motivation for having the reintroduce keyword in the Delphi Programming Language?
If you have a child class that contains a function with the same name as a virtual function in the parent class and it is not declared with the override modifier then it is a compile error. Adding the reintroduce modifier in ... | In the Delphi programming language, the `reintroduce` keyword serves a specific purpose when dealing with method overriding in class hierarchies. Let's break down the reasoning behind this design decision and the role of the `reintroduce` modifier:
### Motivation for the Compile Error
1. **Clarity of Intent**: The co... | 5,394 | [
{
"from": "human",
"value": "What was the motivation for having the reintroduce keyword in the Delphi Programming Language?\nIf you have a child class that contains a function with the same name as a virtual function in the parent class and it is not declared with the override modifier then it is a compile ... |
How can I construct a MSBuild ItemGroup to exclude .svn directories and all files within (recursively). I've got:
<ItemGroup>
<LibraryFiles Include="$(LibrariesReleaseDir)\**\*.*" Exclude=".svn" />
</ItemGroup>
At the moment, but this does not exclude anything!
| To construct an MSBuild ItemGroup that excludes `.svn` directories and all files within them recursively, you need to specify the exclusion pattern correctly. The `Exclude` attribute can use wildcard patterns, and you need to use the `**` pattern to exclude the entire directory and its contents.
Here's how you can mod... | 6,158 | [
{
"from": "human",
"value": "How can I construct a MSBuild ItemGroup to exclude .svn directories and all files within (recursively). I've got:\n<ItemGroup> \n <LibraryFiles Include=\"$(LibrariesReleaseDir)\\**\\*.*\" Exclude=\".svn\" />\n</ItemGroup>\n\nAt the moment, but this does not exclude anything!... |
I have never worked with web services and rails, and obviously this is something I need to learn.
I have chosen to use hpricot because it looks great.
Anyway, _why's been nice enough to provide the following example on the hpricot website:
#!ruby
require 'hpricot'
require 'open-uri'
# load the RedHanded home page
... | To break this task up in a Rails application using the Model-View-Controller (MVC) pattern, you can follow a structured approach where the controller handles the logic, the model deals with any data manipulation, and the view is responsible for the presentation. Here's a step-by-step guide on how to structure your code... | 2,225 | [
{
"from": "human",
"value": "I have never worked with web services and rails, and obviously this is something I need to learn.\nI have chosen to use hpricot because it looks great.\nAnyway, _why's been nice enough to provide the following example on the hpricot website:\n #!ruby\n require 'hpricot'\n requir... |
So I have a pointer to an array of pointers. If I delete it like this:
delete [] PointerToPointers;
Will that delete all the pointed to pointers as well? If not, do I have to loop over all of the pointers and delete them as well, or is there an easier way to do it? My google-fu doesn't seem to give me any good answ... | When you use `delete[] PointerToPointers;`, it only deallocates the memory for the array of pointers itself, but it does **not** delete the memory that those pointers point to. Therefore, if each element in that array of pointers points to dynamically allocated memory, you'll need to manually delete each of those point... | 4,637 | [
{
"from": "human",
"value": "So I have a pointer to an array of pointers. If I delete it like this:\ndelete [] PointerToPointers;\n\nWill that delete all the pointed to pointers as well? If not, do I have to loop over all of the pointers and delete them as well, or is there an easier way to do it? My goo... |
How can I insert compilation timestamp information into an executable I build with Visual C++ 2005? I want to be able to output something like this when I execute the program:
This build XXXX was compiled at dd-mm-yy, hh:mm.
where date and time reflect the time when the project was built. They should not change with ... | To insert compilation timestamp information into an executable built with Visual C++ 2005, you can use predefined macros provided by the compiler. Specifically, you can use the `__DATE__` and `__TIME__` macros, which contain the date and time when the source file was compiled.
Here's how you can do it:
1. **Define th... | 1,402 | [
{
"from": "human",
"value": "How can I insert compilation timestamp information into an executable I build with Visual C++ 2005? I want to be able to output something like this when I execute the program:\n\nThis build XXXX was compiled at dd-mm-yy, hh:mm.\n\nwhere date and time reflect the time when the pr... |
I frequently find myself writing code like this:
List<int> list = new List<int> { 1, 3, 5 };
foreach (int i in list) {
Console.Write("{0}\t", i.ToString()); }
Console.WriteLine();
Better would be something like this:
List<int> list = new List<int> { 1, 3, 5 };
Console.WriteLine("{0}\t", list);
I suspect there's s... | In C#, you can create a custom method to handle the formatting of your list. This can be achieved by using LINQ and string manipulation to convert the list into a formatted string that can be printed directly. Here’s a clean way to do it:
1. Use `string.Join` to concatenate the elements of the list with a tab characte... | 5,206 | [
{
"from": "human",
"value": "I frequently find myself writing code like this:\nList<int> list = new List<int> { 1, 3, 5 };\nforeach (int i in list) {\n Console.Write(\"{0}\\t\", i.ToString()); }\nConsole.WriteLine();\n\nBetter would be something like this:\nList<int> list = new List<int> { 1, 3, 5 };\nCo... |
Which of the following is better code in c# and why?
((DateTime)g[0]["MyUntypedDateField"]).ToShortDateString()
or
DateTime.Parse(g[0]["MyUntypedDateField"].ToString()).ToShortDateString()
Ultimately, is it better to cast or to parse?
| When comparing the two pieces of code you've provided, there are some important considerations in terms of performance, safety, and clarity. Let's break down both options:
1. **Casting**:
```csharp
((DateTime)g[0]["MyUntypedDateField"]).ToShortDateString()
```
- **Performance**: Casting directly to `DateT... | 3,235 | [
{
"from": "human",
"value": "Which of the following is better code in c# and why?\n((DateTime)g[0][\"MyUntypedDateField\"]).ToShortDateString()\n\nor\nDateTime.Parse(g[0][\"MyUntypedDateField\"].ToString()).ToShortDateString()\n\nUltimately, is it better to cast or to parse?\n"
},
{
"from": "gpt",
... |
What are the private IP address ranges?
| Private IP address ranges are defined by the Internet Engineering Task Force (IETF) in the Internet Protocol (IP) standards and are used for local area networks (LANs). These addresses are not routable on the internet, which means they are meant for use within private networks only. The three main private IP address ra... | 6,291 | [
{
"from": "human",
"value": "What are the private IP address ranges?\n"
},
{
"from": "gpt",
"value": "Private IP address ranges are defined by the Internet Engineering Task Force (IETF) in the Internet Protocol (IP) standards and are used for local area networks (LANs). These addresses are not r... |
I have a C# singleton class that multiple classes use. Is access through Instance to the Toggle() method thread-safe? If yes, by what assumptions, rules, etc. If no, why and how can I fix it?
public class MyClass
{
private static readonly MyClass instance = new MyClass();
public static MyClass Instance
{
... | The `Toggle` method in your singleton class is not thread-safe due to the possibility of concurrent accesses modifying the `value` field at the same time. Let's break down why it is not thread-safe and how to fix it.
### Why It's Not Thread-Safe
In a multi-threaded environment, if two or more threads call the `Toggle... | 4,140 | [
{
"from": "human",
"value": "I have a C# singleton class that multiple classes use. Is access through Instance to the Toggle() method thread-safe? If yes, by what assumptions, rules, etc. If no, why and how can I fix it?\npublic class MyClass\n{\n private static readonly MyClass instance = new MyClass();... |
We are working with an oracle database in which the person that set it up is "long gone" and thus do not know the sysdba password, but need it. We have root access to the box (its on linux). Is there any way to recover or change the sys passwords?
| If you have root access to the Linux server where the Oracle Database is installed, you can reset the SYSDBA password. Here are the general steps to do so:
### Steps to Reset Oracle SYSDBA Password:
1. **Stop the Oracle Database**:
First, you need to stop the Oracle Database instance. You can do this using the Ora... | 2,194 | [
{
"from": "human",
"value": "We are working with an oracle database in which the person that set it up is \"long gone\" and thus do not know the sysdba password, but need it. We have root access to the box (its on linux). Is there any way to recover or change the sys passwords?\n"
},
{
"from": "gpt"... |
I'm looking for a good GUI designer for swing in eclipse. My preference is for a free/open-source plugin.
| For designing GUIs in Java Swing using Eclipse, you can consider the following free and open-source plugins:
1. **WindowBuilder**:
- **Description**: WindowBuilder is a powerful and widely used GUI designer for Java. It supports various UI toolkits, including Swing, SWT, and GWT. You can drag and drop components to... | 5,698 | [
{
"from": "human",
"value": "I'm looking for a good GUI designer for swing in eclipse. My preference is for a free/open-source plugin.\n"
},
{
"from": "gpt",
"value": "For designing GUIs in Java Swing using Eclipse, you can consider the following free and open-source plugins:\n\n1. **WindowBuild... |
I want to extend a WPF application with database functionality. Which database engine would you suggest and why? SQLite, SQL CE, other?
| When extending a WPF application with database functionality, the choice of database engine largely depends on your specific requirements such as the size of the application, complexity, deployment scenarios, and whether you need to support multi-user access. Here are some options you might consider, along with their s... | 4,157 | [
{
"from": "human",
"value": "I want to extend a WPF application with database functionality. Which database engine would you suggest and why? SQLite, SQL CE, other?\n"
},
{
"from": "gpt",
"value": "When extending a WPF application with database functionality, the choice of database engine largel... |
I am familiar with nunit for unit testing of the business layer however I am looking now to automate the test of the win forms gui layer.
I have seen watin and the watin recorder for automating tests on web application by accessing the controls and automating them. However I am struggling to find a watin equivalent f... | For automating testing on Windows Forms applications, you are correct that many tools rely on simulating mouse clicks and keyboard inputs. However, there are several libraries and frameworks that allow you to interact with Windows Forms applications programmatically and that provide a more structured way of performing ... | 4,257 | [
{
"from": "human",
"value": "I am familiar with nunit for unit testing of the business layer however I am looking now to automate the test of the win forms gui layer. \nI have seen watin and the watin recorder for automating tests on web application by accessing the controls and automating them. However I ... |
In C++ when a virtual function is called from within a constructor it doesn't behave like a virtual function.
I think everyone who encountered this behavior for the first time was surprised but on second thought it made sense:
As long as the derived constructor has not been executed the object is not yet a derived inst... | The behavior you've described in C++ regarding virtual functions being called from constructors (and destructors) is indeed a well-known quirk of the language. In C++, when a constructor of a base class is running, the object is considered to be of the base class type, and thus any virtual function calls will resolve t... | 3,892 | [
{
"from": "human",
"value": "In C++ when a virtual function is called from within a constructor it doesn't behave like a virtual function.\nI think everyone who encountered this behavior for the first time was surprised but on second thought it made sense:\nAs long as the derived constructor has not been ex... |
When creating a web application, and lets say you have a User object denoting a single user, what do you think is the best way to store that the user has logged in?
Two ways I've thought about have been:
Stored the user database id in a session variable
Stored the entire user object in a session variable
Any better s... | When it comes to storing user login information in a web application, both methods you've considered—storing the user database ID or storing the entire user object in a session variable—have their pros and cons. Let's discuss these two methods in detail, as well as some alternative approaches and considerations regardi... | 3,489 | [
{
"from": "human",
"value": "When creating a web application, and lets say you have a User object denoting a single user, what do you think is the best way to store that the user has logged in?\nTwo ways I've thought about have been:\n\nStored the user database id in a session variable\nStored the entire us... |
I have some kind of test data and want to create a unit test for each item. My first idea was to do it like this:
import unittest
l = [["foo", "a", "a",], ["bar", "a", "b"], ["lee", "b", "b"]]
class TestSequence(unittest.TestCase):
def testsample(self):
for name, a,b in l:
print "test", name
... | To create individual unit tests for each item in your test data, you can use the `setattr` function to dynamically add methods to your `TestSequence` class. This way, each item in your list `l` will correspond to its own test method. Here's how you can do that:
```python
import unittest
# Your test data
l = [["foo", ... | 5,457 | [
{
"from": "human",
"value": "I have some kind of test data and want to create a unit test for each item. My first idea was to do it like this:\nimport unittest\n\nl = [[\"foo\", \"a\", \"a\",], [\"bar\", \"a\", \"b\"], [\"lee\", \"b\", \"b\"]]\n\nclass TestSequence(unittest.TestCase):\n def testsample(se... |
I'm planning on doing more coding from home but in order to do so, I need to be able to edit files on a Samba drive on our dev server. The problem I've run into with several editors is that the network latency causes the editor to lock up for long periods of time (Eclipse, TextMate). Some editors cope with this a lot b... | To improve your experience with editing files over a Samba share on a dev server, especially considering the limitations of latency and the policy against storing company data locally, here are several strategies you can consider:
### Editor Selection
Some editors perform better over network drives due to their file h... | 1,623 | [
{
"from": "human",
"value": "I'm planning on doing more coding from home but in order to do so, I need to be able to edit files on a Samba drive on our dev server. The problem I've run into with several editors is that the network latency causes the editor to lock up for long periods of time (Eclipse, TextM... |
Given a string like this:
a,"string, with",various,"values, and some",quoted
What is a good algorithm to split this based on commas while ignoring the commas inside the quoted sections?
The output should be an array:
[ "a", "string, with", "various", "values, and some", "quoted" ]
| To split a string based on commas while ignoring the commas inside quoted sections, you can use regular expressions. Here’s a step-by-step outline of a suitable algorithm:
1. **Define a Regular Expression**: Use a regex pattern that matches:
- Non-quoted segments.
- Quoted segments (which can include commas).
... | 4,861 | [
{
"from": "human",
"value": "Given a string like this:\n\na,\"string, with\",various,\"values, and some\",quoted\n\nWhat is a good algorithm to split this based on commas while ignoring the commas inside the quoted sections?\nThe output should be an array:\n\n[ \"a\", \"string, with\", \"various\", \"values... |
I tried finding a python script in google that will generate a random terrain when the game starts (or each time a the player advances to a new scene) but all the tools I found are for creating a terrain to render it, not for the game mode.
Any idea how/where to find one?
(I'm assuming that since Blender3D has game pro... | Generating random terrain in a game can be achieved using various algorithms, such as Perlin noise, Simplex noise, or even basic random generation techniques. While there are many resources for creating visual terrains in Blender, creating terrain that can be used in a game context often involves different approaches, ... | 780 | [
{
"from": "human",
"value": "I tried finding a python script in google that will generate a random terrain when the game starts (or each time a the player advances to a new scene) but all the tools I found are for creating a terrain to render it, not for the game mode.\nAny idea how/where to find one?\n(I'm... |
This is pretty weird.
I have my Profiler open and it obviously shows that a stored procedure is called. I open the database and the SP list, but the SP doesn't exist. However, there's another SP whose name is the same except it has a prefix 'x'
Is SQL Server 2005 mapping the SP name to a different one for security purp... | It sounds like you're encountering a case where a synonym is being used in SQL Server. In SQL Server, a synonym is an alias for another database object, which allows you to refer to that object using a different name. This can be particularly useful in scenarios where you want to abstract the underlying object name or ... | 4,687 | [
{
"from": "human",
"value": "This is pretty weird.\nI have my Profiler open and it obviously shows that a stored procedure is called. I open the database and the SP list, but the SP doesn't exist. However, there's another SP whose name is the same except it has a prefix 'x'\nIs SQL Server 2005 mapping the S... |
Assume that I have a field called price for the documents in Solr and I have that field faceted. I want to get the facets as ranges of values (eg: 0-100, 100-500, 500-1000, etc). How to do it?
I can specify the ranges beforehand, but I also want to know whether it is possible to calculate the ranges (say for 5 values) ... | In Apache Solr, you can create faceted ranges for numerical fields (like your `price` field) using `facet.range`. You can specify the ranges you want manually, but you can also dynamically calculate ranges based on the data.
### Manually Specifying Ranges
To manually define the ranges for faceting on the `price` fiel... | 2,996 | [
{
"from": "human",
"value": "Assume that I have a field called price for the documents in Solr and I have that field faceted. I want to get the facets as ranges of values (eg: 0-100, 100-500, 500-1000, etc). How to do it?\nI can specify the ranges beforehand, but I also want to know whether it is possible t... |
I am calling a vendor's Java API, and on some servers it appears that the JVM goes into a low priority polling loop after logging into the API (CPU at 100% usage). The same app on other servers does not exhibit this behavior. This happens on WebSphere and Tomcat. The environment is tricky to set up so it is difficult... | I'm glad to hear that you were able to resolve the issue with the vendor's Java API by using JConsole to monitor the application! It sounds like you did a great job of troubleshooting the problem related to the jar mismatch and the performance monitoring settings.
For anyone else facing similar issues, here are a few ... | 4,944 | [
{
"from": "human",
"value": "I am calling a vendor's Java API, and on some servers it appears that the JVM goes into a low priority polling loop after logging into the API (CPU at 100% usage). The same app on other servers does not exhibit this behavior. This happens on WebSphere and Tomcat. The environme... |
For those of you in the Visual Studio environment, how do you feel about wrapping any of your code in #regions? (or if any other IDE has something similar...)
| Using `#region` directives in Visual Studio (or similar features in other IDEs) can be quite beneficial, depending on the context and the preferences of the team. Here are some points to consider:
### Advantages of Using `#region`:
1. **Improved Readability**: Regions allow you to group related code together, making i... | 4,522 | [
{
"from": "human",
"value": "For those of you in the Visual Studio environment, how do you feel about wrapping any of your code in #regions? (or if any other IDE has something similar...)\n"
},
{
"from": "gpt",
"value": "Using `#region` directives in Visual Studio (or similar features in other ... |
If I press Ctrl+B that ought to give me ASCII code 2, but Ctrl+C is going to be interpreted as a Break.
So I figure I've got to redirect a file in. How do I get these characters into a file?
| To get specific ASCII control characters into a file, you can use a few different methods depending on your operating system. Below, I'll provide methods for both Windows and Unix-like systems.
### Windows
You can use a combination of the `echo` command and redirection, but for control characters, it is often easier ... | 3,666 | [
{
"from": "human",
"value": "If I press Ctrl+B that ought to give me ASCII code 2, but Ctrl+C is going to be interpreted as a Break.\nSo I figure I've got to redirect a file in. How do I get these characters into a file?\n"
},
{
"from": "gpt",
"value": "To get specific ASCII control characters ... |
What's the best way to implement authentication over WCF?
I'd prefer to not use WS-* as it needs to be transport independent.
Should I "roll my own"? Is there any guidance for doing that (articles/blog posts)?
Or is there some way to (and should I) use the built in ASP.NET Membership and Profile providers on the server... | Implementing authentication over Windows Communication Foundation (WCF) without using WS-* standards can be achieved through several methods. Here are some recommended approaches along with guidance and considerations for each:
### 1. Basic Authentication
You can implement basic authentication over WCF by sending the ... | 3,752 | [
{
"from": "human",
"value": "What's the best way to implement authentication over WCF?\nI'd prefer to not use WS-* as it needs to be transport independent.\nShould I \"roll my own\"? Is there any guidance for doing that (articles/blog posts)?\nOr is there some way to (and should I) use the built in ASP.NET ... |
I am attempting to find xml files with large swaths of commented out xml. I would like to programmatically search for xml comments that stretch beyond a given number of lines. Is there an easy way of doing this?
| Yes, you can programmatically search for XML comments that span multiple lines using various programming languages. Below are examples in Python and regular expressions that can help you achieve this.
### Python Solution
You can use Python's built-in libraries to read XML files and search for comments. The `xml.etree... | 4,051 | [
{
"from": "human",
"value": "I am attempting to find xml files with large swaths of commented out xml. I would like to programmatically search for xml comments that stretch beyond a given number of lines. Is there an easy way of doing this?\n"
},
{
"from": "gpt",
"value": "Yes, you can program... |
I've long been a fan of Stored Procedure Keyboard Accelerators, as described in this article. When we moved from SQL 2000 to 2005, though, and from Query Analyzer to Management Studio, the handling of the arguments changed. In QA, comma-separated arguments were automatically read as two separate arguments. In SSMS -... | It sounds like you're encountering some frustrating limitations with keyboard accelerators in SQL Server Management Studio (SSMS) when compared to the old Query Analyzer. Unfortunately, the behavior you're describing—where SSMS interprets comma-separated arguments as a single string—is a known issue that some users fac... | 4,686 | [
{
"from": "human",
"value": "I've long been a fan of Stored Procedure Keyboard Accelerators, as described in this article. When we moved from SQL 2000 to 2005, though, and from Query Analyzer to Management Studio, the handling of the arguments changed. In QA, comma-separated arguments were automatically r... |
I want a data structure that will allow querying how many items in last X minutes. An item may just be a simple identifier or a more complex data structure, preferably the timestamp of the item will be in the item, rather than stored outside (as a hash or similar, wouldn't want to have problems with multiple items havi... | To achieve your goal of querying how many items have been added within the last X minutes, and efficiently managing old data, you can consider using a time-based sliding window approach with a data structure that allows for easy insertion and removal. Here’s a suggestion:
### Data Structure: Circular Queue with a Time... | 2,328 | [
{
"from": "human",
"value": "I want a data structure that will allow querying how many items in last X minutes. An item may just be a simple identifier or a more complex data structure, preferably the timestamp of the item will be in the item, rather than stored outside (as a hash or similar, wouldn't want ... |
Do you have any experience of designing a Real Shared-Nothing Architecture?
Would you have some readings to recommend me?
| Yes, I can provide an overview of designing a Real Shared-Nothing Architecture (SNA) and recommend some readings on the topic.
### Overview of Shared-Nothing Architecture
**Shared-Nothing Architecture** is a distributed computing architecture where each node (or server) in the system is independent and self-sufficien... | 3,651 | [
{
"from": "human",
"value": "Do you have any experience of designing a Real Shared-Nothing Architecture?\nWould you have some readings to recommend me?\n"
},
{
"from": "gpt",
"value": "Yes, I can provide an overview of designing a Real Shared-Nothing Architecture (SNA) and recommend some reading... |
What are in your opinion the best resources (books or web pages) describing algorithms or techniques to use for collision detection in a 2D environment?
I'm just eager to learn different techniques to make more sophisticated and efficient games.
| Collision detection is a crucial aspect of game development, particularly in 2D environments, as it helps determine interactions between objects. Here are some of the best resources, including books and web pages, that cover various algorithms and techniques for collision detection:
### Books
1. **"Real-Time Collisio... | 3,451 | [
{
"from": "human",
"value": "What are in your opinion the best resources (books or web pages) describing algorithms or techniques to use for collision detection in a 2D environment?\nI'm just eager to learn different techniques to make more sophisticated and efficient games.\n... |
I need a simple way to monitor multiple text log files distributed over a number of HP-UX servers. They are a mix of text and XML log files from several distributed legacy systems. Currently we just ssh to the servers and use tail -f and grep, but that doesn't scale when you have many logs to keep track of.
Since the l... | Your approach to monitoring multiple text log files across distributed HP-UX servers sounds feasible, but there are several factors to consider when deciding on the best log format and how to implement your system effectively.
### Log Format
1. **JSON**: Converting your logs into JSON could be beneficial as it is a s... | 3,698 | [
{
"from": "human",
"value": "I need a simple way to monitor multiple text log files distributed over a number of HP-UX servers. They are a mix of text and XML log files from several distributed legacy systems. Currently we just ssh to the servers and use tail -f and grep, but that doesn't scale when you hav... |
I keep running across this loading image
http://georgia.ubuntuforums.com/images/misc/lightbox_progress.gif
which seems to have entered into existence in the last 18 months. All of a sudden it is in every application and is on every web site. Not wanting to be left out is there somewhere I can get this logo, perhaps w... | The loading image you referenced is a common loading animation that has become widely used on various web applications and sites. The specific image URL you provided is from the Ubuntu Forums, which likely contributed to its popularity in some community circles.
### Where to Find the Image:
1. **Official Sources:** Of... | 6,569 | [
{
"from": "human",
"value": "I keep running across this loading image\nhttp://georgia.ubuntuforums.com/images/misc/lightbox_progress.gif\nwhich seems to have entered into existence in the last 18 months. All of a sudden it is in every application and is on every web site. Not wanting to be left out is the... |
I am attempting to copy a custom struct from kernel space to user space. inside user space errno returns 'bad address'. What is the usual cause of a bad address error?
if(copy_to_user(info, &kernel_info, sizeof(struct prinfo)))
| The "bad address" error in the context of using `copy_to_user()` usually indicates that the pointer provided to the function (in this case, `info`) does not point to a valid memory region in user space. There are several common causes for this error:
1. **Invalid User Pointer**: The pointer you are passing (`info`) mu... | 3,322 | [
{
"from": "human",
"value": "I am attempting to copy a custom struct from kernel space to user space. inside user space errno returns 'bad address'. What is the usual cause of a bad address error?\nif(copy_to_user(info, &kernel_info, sizeof(struct prinfo)))\n\n"
},
{
"from": "gpt",
"value": "Th... |
Can I store a database connection in the Session object?
| Storing a database connection in the session object is generally not recommended for several reasons:
1. **Resource Management**: Database connections are resources that should be managed carefully. Holding a connection open for the duration of a user's session can lead to resource exhaustion on the database server, e... | 6,071 | [
{
"from": "human",
"value": "Can I store a database connection in the Session object?\n"
},
{
"from": "gpt",
"value": "Storing a database connection in the session object is generally not recommended for several reasons:\n\n1. **Resource Management**: Database connections are resources that shou... |
SVN in Eclipse is spread into two camps. The SVN people have developed a plugin called Subclipse. The Eclipse people have a plugin called Subversive. Broadly speaking they both do the same things. What are the advantages and disadvantages of each?
| Both Subclipse and Subversive are popular SVN (Subversion) plugins for Eclipse, providing integration with Subversion version control systems. While they serve similar purposes, they have different implementations and features that may appeal to different users. Here’s a breakdown of the advantages and disadvantages of... | 2,985 | [
{
"from": "human",
"value": "SVN in Eclipse is spread into two camps. The SVN people have developed a plugin called Subclipse. The Eclipse people have a plugin called Subversive. Broadly speaking they both do the same things. What are the advantages and disadvantages of each?\n"
},
{
"from": "gpt",
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.