instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
Does anyone know (in c#) a way of getting the available NT4 domains (a bit like the WinXP login box dropdown)?
I know that this is fairly easy for Active Directory using the DirectoryServices namespace, but I can't find anything for the old NT4 domains. I'd rather not use API calls if at all possible (that might be as... | To retrieve available NT4 domains in C#, you may not have a direct .NET library that does this as easily as Active Directory does with `System.DirectoryServices`. However, you can use the `NetServerEnum` function from the Windows API to list available NT4 domains. While you're keen on avoiding API calls, this is essent... | 5,056 | [
{
"from": "human",
"value": "Does anyone know (in c#) a way of getting the available NT4 domains (a bit like the WinXP login box dropdown)? \nI know that this is fairly easy for Active Directory using the DirectoryServices namespace, but I can't find anything for the old NT4 domains. I'd rather not use API ... |
I've got a div that uses overflow:auto to keep the contents inside the div as it is resized and dragged around the page. I'm using some ajax to retrieve lines of text from the server, then append them to the end of the div, so the content is growing downwards. Every time this happens, I'd like to use JS to scroll the d... | To ensure that your scroll functionality works consistently, you can use the jQuery `scrollTop` method correctly. The issue with your current implementation is that you're trying to assign a value to `scrollTop` directly, instead of calling it as a method.
Here’s the correct way to set the `scrollTop` property to the ... | 6,526 | [
{
"from": "human",
"value": "I've got a div that uses overflow:auto to keep the contents inside the div as it is resized and dragged around the page. I'm using some ajax to retrieve lines of text from the server, then append them to the end of the div, so the content is growing downwards. Every time this ha... |
Obviously there are security reasons to close a wireless network and it's not fun if someone is stealing your bandwidth. That would be a serious problem?
To address the first concern: Does a device on the same wireless network have any special privileges or access that an other device on the internet has?
Assumptions ... | You've raised two important concerns regarding wireless network security and the implications of unauthorized access to your network. Let's break down each point:
### 1. Device Access and Privileges on a Wireless Network
Devices connected to the same wireless network can indeed have different privileges than those ac... | 5,561 | [
{
"from": "human",
"value": "Obviously there are security reasons to close a wireless network and it's not fun if someone is stealing your bandwidth. That would be a serious problem?\nTo address the first concern: Does a device on the same wireless network have any special privileges or access that an othe... |
The last time I took on a non-trivial .Net/C# application I used Castle Monorail and, on the whole, enjoyed the experience. Early-access/preview releases of .Net MVC were not yet available. Many "Microsoft shops" will now find the "official" solution more appealing. Has anyone gone from Monorail to .Net MVC.
How did y... | Transitioning from Castle Monorail to ASP.NET MVC can be a significant shift, especially since both frameworks have different design philosophies and features. Here’s a comparison based on common experiences and differences encountered during the switch:
### 1. **Architecture and Design Philosophy**
- **Castle Monora... | 5,144 | [
{
"from": "human",
"value": "The last time I took on a non-trivial .Net/C# application I used Castle Monorail and, on the whole, enjoyed the experience. Early-access/preview releases of .Net MVC were not yet available. Many \"Microsoft shops\" will now find the \"official\" solution more appealing. Has anyo... |
Is there a way (or shortcut) to tell VS 2008 that it cuts a line like this:
Before:
Some Text here
This gets cut
Some Code there
After:
Some Text here
Some Code there
What I want:
Some Text here
Some Code there
PS: I don't want to select the whole line or something like this... only the text I want to cut.
| In Visual Studio 2008, while there isn't a direct built-in shortcut for cutting a specific portion of a line while leaving a part intact, you can achieve your desired result by using a combination of keyboard shortcuts. Here's a step-by-step approach to cut the text you want and move the remaining text up to the next l... | 8,288 | [
{
"from": "human",
"value": "Is there a way (or shortcut) to tell VS 2008 that it cuts a line like this:\nBefore:\nSome Text here \nThis gets cut \nSome Code there\n\nAfter:\nSome Text here\n\nSome Code there\n\nWhat I want:\nSome Text here \nSome Code there \n\nPS: I don't want to select the whole line... |
I am trying to read a single file from a java.util.zip.ZipInputStream, and copy it into a java.io.ByteArrayOutputStream (so that I can then create a java.io.ByteArrayInputStream and hand that to a 3rd party library that will end up closing the stream, and I don't want my ZipInputStream getting closed).
I'm probably mis... | It looks like you're on the right track, but there are some important details to keep in mind when working with `ZipInputStream` in Java. Your approach is generally correct, but let's clarify a few points:
1. **Using getNextEntry()**: Ensure that you have successfully called `getNextEntry()` on the `ZipInputStream`. I... | 4,623 | [
{
"from": "human",
"value": "I am trying to read a single file from a java.util.zip.ZipInputStream, and copy it into a java.io.ByteArrayOutputStream (so that I can then create a java.io.ByteArrayInputStream and hand that to a 3rd party library that will end up closing the stream, and I don't want my ZipInpu... |
How do you quickly find the URL for a Win32 API on MSDN? It's easy for .NET methods -- just add the method name (for example, System.Byte.ToString) to http://msdn.microsoft.com/library/.
However, for Win32 APIs (say GetLongPathName), this doesn't work: http://msdn.microsoft.com/en-us/library/GetLongPathName.
I want to... | For Win32 APIs, the URL structure is different from that of .NET methods. While there's no straightforward formula like there is for .NET, you can use the following approach to construct URLs to Win32 API documentation on MSDN (now known as Microsoft Docs):
1. Start with the base URL: `https://learn.microsoft.com/en-u... | 6,269 | [
{
"from": "human",
"value": "How do you quickly find the URL for a Win32 API on MSDN? It's easy for .NET methods -- just add the method name (for example, System.Byte.ToString) to http://msdn.microsoft.com/library/.\nHowever, for Win32 APIs (say GetLongPathName), this doesn't work: http://msdn.microsoft.co... |
I know how to use rpm to list the contents of a package (rpm -qpil package.rpm). However, this requires knowing the location of the .rpm file on the filesystem. A more elegant solution would be to use the package manager, which in my case is YUM. How can YUM be used to achieve this?
| To list the contents of an installed package using YUM, you can utilize the `repoquery` command, which is part of the `yum-utils` package. If you don't have `yum-utils` installed, you can install it using:
```bash
sudo yum install yum-utils
```
Once you have `yum-utils` installed, you can use the following command to... | 8,864 | [
{
"from": "human",
"value": "I know how to use rpm to list the contents of a package (rpm -qpil package.rpm). However, this requires knowing the location of the .rpm file on the filesystem. A more elegant solution would be to use the package manager, which in my case is YUM. How can YUM be used to achieve t... |
I need to access a SVN repository from home, that runs under the IP 192.168.0.10 in the work network.
I can establish a SSH tunnel to my localhost.
Now I have to map 192.168.0.10 in a way, that instead 127.0.0.1 is accessed.
Does anybody know a way to do this under Windows?
| You can achieve this by using an SSH tunnel to forward the SVN repository port from your work network to your local machine. You can do this using a command line tool like PuTTY or with OpenSSH if it is available on your Windows machine.
### Using PuTTY
1. **Download and Install PuTTY**: If you haven't already, downl... | 5,506 | [
{
"from": "human",
"value": "I need to access a SVN repository from home, that runs under the IP 192.168.0.10 in the work network.\nI can establish a SSH tunnel to my localhost.\nNow I have to map 192.168.0.10 in a way, that instead 127.0.0.1 is accessed.\nDoes anybody know a way to do this under Windows?\n... |
In my web application I have a file which hold the current revision number via $Rev$. This work fine except, if I don't make any changes to that file, it doesn't get committed.
Is there anyway I can force a single file to always get committed to the SVN server?
I'm using TortoiseSVN for Windows so any code or step-by-s... | In SVN, if a file is unchanged, it typically won't be committed unless you force an update to its contents. Since you have a placeholder like `$Rev$`, this placeholder will only update when the file itself has changed and is committed. To ensure that the file is always committed with the latest revision number, you can... | 4,646 | [
{
"from": "human",
"value": "In my web application I have a file which hold the current revision number via $Rev$. This work fine except, if I don't make any changes to that file, it doesn't get committed.\nIs there anyway I can force a single file to always get committed to the SVN server?\nI'm using Torto... |
I know there's JScript.NET, but it isn't the same as the JavaScript we know from the web.
Does anyone know if there are any JavaScript based platforms/compilers for desktop development? Most specifically Windows desktop development.
| Yes, there are several JavaScript-based platforms and frameworks that allow for desktop development, specifically for Windows. Here are some popular options:
1. **Electron**: This is one of the most widely used frameworks for building cross-platform desktop applications using web technologies, including JavaScript, HT... | 7,700 | [
{
"from": "human",
"value": "I know there's JScript.NET, but it isn't the same as the JavaScript we know from the web.\nDoes anyone know if there are any JavaScript based platforms/compilers for desktop development? Most specifically Windows desktop development.\n"
},
{
"from": "gpt",
"value": "... |
How do I perform a reverse DNS lookup, that is how do I resolve an IP address to its DNS hostname in Perl?
| To perform a reverse DNS lookup in Perl, you can use the `gethostbyaddr` function from the `Socket` module. This function resolves an IP address to its corresponding hostname. Here's a simple example to demonstrate how to do this:
```perl
use strict;
use warnings;
use Socket;
# Replace with the IP address you want to... | 4,907 | [
{
"from": "human",
"value": "How do I perform a reverse DNS lookup, that is how do I resolve an IP address to its DNS hostname in Perl?\n"
},
{
"from": "gpt",
"value": "To perform a reverse DNS lookup in Perl, you can use the `gethostbyaddr` function from the `Socket` module. This function resol... |
I might be missing something really obvious. I'm trying to write a custom Panel where the contents are laid out according to a couple of dependency properties (I'm assuming they have to be DPs because I want to be able to animate them.)
However, when I try to run a storyboard to animate both of these properties, Silver... | The issue you're encountering in your Silverlight application when animating multiple dependency properties seems to stem from the fact that both `ScaleX` and `ScaleY` are custom dependency properties, and there may be some interaction or conflict when they're animated together.
Here are a few steps to help debug and ... | 3,507 | [
{
"from": "human",
"value": "I might be missing something really obvious. I'm trying to write a custom Panel where the contents are laid out according to a couple of dependency properties (I'm assuming they have to be DPs because I want to be able to animate them.)\nHowever, when I try to run a storyboard t... |
How do I get a a complete list of all the urls that my rails application could generate?
I don't want the routes that I get get form rake routes, instead I want to get the actul URLs corrosponding to all the dynmically generated pages in my application...
Is this even possible?
(Background: I'm doing this because I wa... | Generating a complete list of URLs for all the dynamically generated pages in a Ruby on Rails application can be challenging because Rails can generate URLs based on various parameters, routes, and controller actions. However, there are ways to obtain a list of URLs that correspond to the routes in your application.
H... | 4,025 | [
{
"from": "human",
"value": "How do I get a a complete list of all the urls that my rails application could generate? \nI don't want the routes that I get get form rake routes, instead I want to get the actul URLs corrosponding to all the dynmically generated pages in my application...\nIs this even possibl... |
In .NET, after this code, what mechanism stops the Thread object from being garbage collected?
new Thread(Foo).Start();
GC.Collect();
Yes, it's safe to assume something has a reference to the thread, I was just wandering what exactly. For some reason Reflector doesn't show me System.Threading, so I can't dig it myself... | When you create and start a new thread in .NET using `new Thread(Foo).Start();`, the `Thread` object cannot be immediately garbage collected for a couple of reasons related to the internal workings of the .NET Threading model.
1. **Thread Management by the Runtime**: When a `Thread` is started, the .NET runtime keeps ... | 7,551 | [
{
"from": "human",
"value": "In .NET, after this code, what mechanism stops the Thread object from being garbage collected?\nnew Thread(Foo).Start();\nGC.Collect();\n\nYes, it's safe to assume something has a reference to the thread, I was just wandering what exactly. For some reason Reflector doesn't show ... |
I was given a C++ project that was compiled using MS Visual Studio .net 2003 C++ compiler, and a .mak file that was used to compile it. I am able to build it from the command line using nmake project.mak, but the compiler complains that afxres.h was not found. I did a little searching around and the afxres.h is in th... | When you're using `nmake` to build your C++ project and the compiler cannot find a header file like `afxres.h`, it means that the include paths for your project are not set correctly. In C++ projects, you usually specify include directories either in your makefile or via environment variables.
### Here’s how you can s... | 4,929 | [
{
"from": "human",
"value": "I was given a C++ project that was compiled using MS Visual Studio .net 2003 C++ compiler, and a .mak file that was used to compile it. I am able to build it from the command line using nmake project.mak, but the compiler complains that afxres.h was not found. I did a little s... |
After cleaning a folder full of HTML files with TIDY, how can the tables content be extracted for further processing?
| After cleaning a folder full of HTML files with TIDY, you can extract table content for further processing using various methods and tools. Below are several approaches you can consider:
### 1. Using Python with BeautifulSoup
Python's BeautifulSoup library is a powerful tool for parsing HTML and extracting data. Here... | 4,963 | [
{
"from": "human",
"value": "After cleaning a folder full of HTML files with TIDY, how can the tables content be extracted for further processing?\n"
},
{
"from": "gpt",
"value": "After cleaning a folder full of HTML files with TIDY, you can extract table content for further processing using var... |
In SEO people talk a lot about Google PageRank. It's kind of a catch 22 because until your site is actually big and you don't really need search engines as much, it's unlikely that big sites will link to you and increase your PageRank!
I've been told that it's easiest to simply get a couple high quality links to point ... | You're right in observing the catch-22 situation regarding Google PageRank. It's a challenging cycle where new or smaller sites often struggle to gain traction without existing authority and backlinks. Here are several strategies and considerations that can help increase your site's PageRank and overall SEO visibility:... | 5,616 | [
{
"from": "human",
"value": "In SEO people talk a lot about Google PageRank. It's kind of a catch 22 because until your site is actually big and you don't really need search engines as much, it's unlikely that big sites will link to you and increase your PageRank!\nI've been told that it's easiest to simply... |
I'm programmatically adding ToolStripButton items to a context menu.
That part is easy.
this.tsmiDelete.DropDownItems.Add("The text on the item.");
However, I also need to wire up the events so that when the user clicks the item something actually happens!
How do I do this? The method that handles the click also needs... | To wire up events for dynamically added `ToolStripButton` items in a context menu, you can subscribe to the `Click` event for each item as you create it. You will also need to pass some sort of identifier or object along with the event handler, which can be done using a lambda expression or a closure.
Here’s an exampl... | 4,457 | [
{
"from": "human",
"value": "I'm programmatically adding ToolStripButton items to a context menu.\nThat part is easy.\nthis.tsmiDelete.DropDownItems.Add(\"The text on the item.\");\n\nHowever, I also need to wire up the events so that when the user clicks the item something actually happens!\nHow do I do th... |
Correct me if I'm wrong, but a "build" is a "compile", and not every language compiles. Continuous Integration involves building components to see if they continue to work beyond unit tests, which I might be oversimplifying. But if your project involves a language that does not compile, how do you perform nightly build... | You're correct in noting that a "build" typically refers to the process of transforming source code into an executable program, and in many contexts, this involves compiling the code. However, not all programming languages are compiled in the traditional sense. Some languages are interpreted (e.g., Python, Ruby, JavaSc... | 5,445 | [
{
"from": "human",
"value": "Correct me if I'm wrong, but a \"build\" is a \"compile\", and not every language compiles. Continuous Integration involves building components to see if they continue to work beyond unit tests, which I might be oversimplifying. But if your project involves a language that does ... |
What are some important practices to follow when creating a .NET assembly that is going to be embedded to SQL Server 2005?
I am brand new to this, and I've found that there are significant method attributes like:
[SqlFunction(FillRowMethodName = "FillRow", TableDefinition = "letter nchar(1)")]
I'm also looking for com... | When creating a .NET assembly to be embedded in SQL Server 2005, it's important to follow certain best practices and be aware of common pitfalls. Here are some key practices to ensure successful integration and performance:
### Important Practices
1. **Use the Appropriate Attributes**:
- Use `SqlFunction`, `SqlPro... | 5,860 | [
{
"from": "human",
"value": "What are some important practices to follow when creating a .NET assembly that is going to be embedded to SQL Server 2005?\nI am brand new to this, and I've found that there are significant method attributes like:\n[SqlFunction(FillRowMethodName = \"FillRow\", TableDefinition = ... |
Using the viewer control for display of SQL Reporting Services reports on web page (Microsoft.ReportViewer.WebForms), can you move the View Report button? It defaults to the very right side of the report, which means you have to scroll all the way across before the button is visible. Not a problem for reports that fit ... | In the Microsoft Report Viewer control for ASP.NET Web Forms (`Microsoft.ReportViewer.WebForms`), the default placement of the "View Report" button (and other toolbar elements) cannot be directly modified through properties or built-in settings, as the control is designed to maintain its layout for consistency and usab... | 3,299 | [
{
"from": "human",
"value": "Using the viewer control for display of SQL Reporting Services reports on web page (Microsoft.ReportViewer.WebForms), can you move the View Report button? It defaults to the very right side of the report, which means you have to scroll all the way across before the button is vis... |
In C++, what is the purpose of the scope resolution operator when used without a scope? For instance:
::foo();
| In C++, the scope resolution operator (`::`) serves several purposes, one of which is to specify the global namespace when used without a preceding scope. When you use `::foo();`, it indicates that you're referring to the function `foo()` that is defined in the global namespace, regardless of any local or class scopes ... | 6,228 | [
{
"from": "human",
"value": "In C++, what is the purpose of the scope resolution operator when used without a scope? For instance:\n::foo();\n\n"
},
{
"from": "gpt",
"value": "In C++, the scope resolution operator (`::`) serves several purposes, one of which is to specify the global namespace wh... |
As part of the publishing "best practices" I came up with my own, I tend to archive report groups and republish the "updated" reports. However, with this stratedgy, I lose users associated with each report or have to rehide reports.
Is there an automated process I can use to hide reports or add users, after deploying ... | Yes, automating the process of hiding reports and managing user permissions in a reporting environment can significantly streamline your workflow. Here's an approach you can take using SQL Server Reporting Services (SSRS) or similar tools, along with some scripting and automation.
### Automating Report Management
1. ... | 5,016 | [
{
"from": "human",
"value": "As part of the publishing \"best practices\" I came up with my own, I tend to archive report groups and republish the \"updated\" reports. However, with this stratedgy, I lose users associated with each report or have to rehide reports.\nIs there an automated process I can use ... |
My source code needs to support both .NET version 1.1 and 2.0 ... how do I test for the different versions & what is the best way to deal with this situation.
I'm wondering if I should have the two sections of code inline, in separate classes, methods etc. What do you think?
| Supporting multiple versions of .NET, especially legacy versions like 1.1 and 2.0, can be a bit challenging. Here are some strategies and best practices to consider:
### 1. Conditional Compilation
You can use preprocessor directives to include or exclude code based on the version of the .NET Framework that you're targ... | 3,639 | [
{
"from": "human",
"value": "My source code needs to support both .NET version 1.1 and 2.0 ... how do I test for the different versions & what is the best way to deal with this situation.\nI'm wondering if I should have the two sections of code inline, in separate classes, methods etc. What do you think?\n"... |
I program with Emacs on Ubuntu (Hardy Heron at the moment), and I like the default text coloration in the Emacs GUI. However, the default text coloration when Emacs is run in the terminal is different and garish.
How do I make the colors in the terminal match the colors in the GUI?
| To make the colors in Emacs running in the terminal match those of the GUI on Ubuntu, you'll need to configure the terminal's color settings and possibly adjust Emacs' configuration. Here’s a step-by-step guide on how to achieve this:
### 1. Check Terminal Colors
Ensure that your terminal supports 256 colors. You can... | 5,094 | [
{
"from": "human",
"value": "I program with Emacs on Ubuntu (Hardy Heron at the moment), and I like the default text coloration in the Emacs GUI. However, the default text coloration when Emacs is run in the terminal is different and garish.\nHow do I make the colors in the terminal match the colors in the ... |
How can you make the display frames per second be independent from the game logic? That is so the game logic runs the same speed no matter how fast the video card can render.
| To decouple your game's logic from the rendering (display) frame rate, you can implement a game loop that separates the update logic from the rendering logic. Here's a common approach:
### Fixed Time Step Update
1. **Define a Fixed Update Time Step**: Choose a fixed time step for your game logic updates. For example,... | 5,402 | [
{
"from": "human",
"value": "How can you make the display frames per second be independent from the game logic? That is so the game logic runs the same speed no matter how fast the video card can render. \n"
},
{
"from": "gpt",
"value": "To decouple your game's logic from the rendering (display)... |
What is the difference between CodeFile="file.ascx.cs" and CodeBehind="file.ascx.cs" in the declaration of a ASP.NET user control?
Is one newer or recommended? Or do they have specific usage?
| In ASP.NET, both `CodeFile` and `CodeBehind` are attributes that can be used in the declaration of user controls (and ASPX pages) to specify the code-behind file, but they have different purposes and contexts, particularly with regard to the type of compilation model used.
### CodeBehind
- **Usage:** The `CodeBehind` ... | 8,261 | [
{
"from": "human",
"value": "What is the difference between CodeFile=\"file.ascx.cs\" and CodeBehind=\"file.ascx.cs\" in the declaration of a ASP.NET user control?\nIs one newer or recommended? Or do they have specific usage?\n"
},
{
"from": "gpt",
"value": "In ASP.NET, both `CodeFile` and `Cod... |
I'm currently working on a large implementation of Class::DBI for an existing database structure, and am running into a problem with clearing the cache from Class::DBI. This is a mod_perl implementation, so an instance of a class can be quite old between times that it is accessed.
From the man pages I found two option... | It seems you're facing issues with the caching behavior of Class::DBI when working in a mod_perl environment. Here are a few suggestions to help you better manage the cache and ensure that your Class::DBI objects reflect the current state of the database:
1. **Manual Cache Management**: In addition to calling `clear_o... | 5,111 | [
{
"from": "human",
"value": "I'm currently working on a large implementation of Class::DBI for an existing database structure, and am running into a problem with clearing the cache from Class::DBI. This is a mod_perl implementation, so an instance of a class can be quite old between times that it is access... |
As far as I know, Flash has to pass info off to another external process in order to save files - POSTing to PHP or talking to an executable, right? But every once in a while I hear rumors that Flash is able to open a file, make changes, then save/write those changes, all on its own - is it possible?
| Flash, by itself, does not have the capability to directly read from or write to the local filesystem for security reasons. In general, Flash Player operates in a sandboxed environment that restricts access to the user's file system to prevent malicious activities.
The common approach for saving files in Flash involve... | 8,137 | [
{
"from": "human",
"value": "As far as I know, Flash has to pass info off to another external process in order to save files - POSTing to PHP or talking to an executable, right? But every once in a while I hear rumors that Flash is able to open a file, make changes, then save/write those changes, all on its... |
Can fogbugz track case dependencies?
| Yes, FogBugz has the capability to track case dependencies. You can link cases together to indicate that one case is dependent on another. This feature helps in managing workflows and understanding the relationships between different cases or tasks. To use this functionality, you typically add a "related case" or "depe... | 10,180 | [
{
"from": "human",
"value": "Can fogbugz track case dependencies?\n"
},
{
"from": "gpt",
"value": "Yes, FogBugz has the capability to track case dependencies. You can link cases together to indicate that one case is dependent on another. This feature helps in managing workflows and understanding... |
Using VB.NET, how do I toggle the state of Caps Lock?
| To toggle the state of Caps Lock in VB.NET, you can use the `keybd_event` function from the Windows API. This function simulates a key press, and for Caps Lock, you can send the virtual key code for Caps Lock, which is `0x14`.
Here's a sample code snippet that demonstrates how to toggle the Caps Lock state:
```vb.net... | 6,718 | [
{
"from": "human",
"value": "Using VB.NET, how do I toggle the state of Caps Lock? \n"
},
{
"from": "gpt",
"value": "To toggle the state of Caps Lock in VB.NET, you can use the `keybd_event` function from the Windows API. This function simulates a key press, and for Caps Lock, you can send the ... |
I am looking to stream a file housed in a SharePoint 2003 document library down to the browser. Basically the idea is to open the file as a stream and then to "write" the file stream to the reponse, specifying the content type and content disposition headers. Content disposition is used to preserve the file name, con... | Streaming binary files over SSL can indeed present issues, particularly with older versions of Internet Explorer such as IE6 and IE7. Here are several recommendations and adjustments to consider for your specific scenario:
### 1. Content-Disposition Header
The `Content-Disposition` header should specify the correct di... | 4,169 | [
{
"from": "human",
"value": "I am looking to stream a file housed in a SharePoint 2003 document library down to the browser. Basically the idea is to open the file as a stream and then to \"write\" the file stream to the reponse, specifying the content type and content disposition headers. Content disposi... |
I have a swf with loads text into a Sprite that resizes based on the content put into - I'd like though for the ones that are longer than the page to have the browser use its native scroll bars rather than handle it in actionscript (very much like http://www.nike.com/nikeskateboarding/v3/...)
I did have a look at the s... | To achieve native scrollbars in a browser for your SWF content, you can embed the SWF in a way that allows the browser's native scrolling to take effect when the content exceeds the visible area. Here are the steps you can follow to implement this:
### 1. Adjust the HTML Container
Instead of handling scrolling within... | 5,430 | [
{
"from": "human",
"value": "I have a swf with loads text into a Sprite that resizes based on the content put into - I'd like though for the ones that are longer than the page to have the browser use its native scroll bars rather than handle it in actionscript (very much like http://www.nike.com/nikeskatebo... |
Has anyone managed to use ItemizedOverlays in Android Beta 0.9? I can't get it to work, but I'm not sure if I've done something wrong or if this functionality isn't yet available.
I've been trying to use the ItemizedOverlay and OverlayItem classes. Their intended purpose is to simulate map markers (as seen in Google M... | It seems like you're trying to implement an `ItemizedOverlay` in an older version of Android, specifically beta 0.9, and you're experiencing issues with getting the overlay items to display on the map. While your implementation looks mostly correct, there are a couple of common issues that might be causing the overlay ... | 4,310 | [
{
"from": "human",
"value": "Has anyone managed to use ItemizedOverlays in Android Beta 0.9? I can't get it to work, but I'm not sure if I've done something wrong or if this functionality isn't yet available. \nI've been trying to use the ItemizedOverlay and OverlayItem classes. Their intended purpose is to... |
In Eclipse, I have a workspace that contains all of my projects. Each project builds and compiles separately. A project does not interact with another project.
How does this relate to Visual Studio and Projects/Solutions there?
| In both Eclipse and Visual Studio, the concepts of workspaces, projects, and organization of code are fundamental, although the terminology and structure may differ between the two environments.
### Eclipse Workspace and Projects
1. **Workspace**: In Eclipse, a workspace is a directory that contains all of your projec... | 7,386 | [
{
"from": "human",
"value": "In Eclipse, I have a workspace that contains all of my projects. Each project builds and compiles separately. A project does not interact with another project.\nHow does this relate to Visual Studio and Projects/Solutions there?\n"
},
{
"from": "gpt",
"value": "In bo... |
I am using Windows, and I have two monitors.
Some applications will always start on my primary monitor, no matter where they were when I closed them.
Others will always start on the secondary monitor, no matter where they were when I closed them.
Is there a registry setting buried somewhere, which I can manipulate to c... | On Windows, the behavior of how applications remember their last position and which monitor they launch on can be influenced by several factors, including the applications themselves and the Windows settings. Unfortunately, there is no straightforward registry setting that allows you to control the default monitor for ... | 4,445 | [
{
"from": "human",
"value": "I am using Windows, and I have two monitors.\nSome applications will always start on my primary monitor, no matter where they were when I closed them.\nOthers will always start on the secondary monitor, no matter where they were when I closed them.\nIs there a registry setting b... |
I need to get the name of the machine my .NET app is running on. What is the best way to do this?
| In a .NET application, you can easily retrieve the name of the machine (also known as the hostname) using the `Environment` class, specifically the `MachineName` property. Here's how you can do it:
### C#
```csharp
using System;
class Program
{
static void Main()
{
string machineName = Environment.Ma... | 8,084 | [
{
"from": "human",
"value": "I need to get the name of the machine my .NET app is running on. What is the best way to do this?\n"
},
{
"from": "gpt",
"value": "In a .NET application, you can easily retrieve the name of the machine (also known as the hostname) using the `Environment` class, spec... |
I'm using CVS on Windows (with the WinCVS front end), and would like to add details of the last check in to the email from our automated build process, whenever a build fails, in order to make it easier to fix.
I need to know the files that have changed, the user that changed them, and the comment.
I've been trying to ... | To retrieve details about the last check-in in CVS, including the files that changed, the user who changed them, and their comments, you can use the `cvs log` command. Specifically, you want to filter the log to get only the latest revision.
Here’s a step-by-step guide to get the required information in a Windows envi... | 4,351 | [
{
"from": "human",
"value": "I'm using CVS on Windows (with the WinCVS front end), and would like to add details of the last check in to the email from our automated build process, whenever a build fails, in order to make it easier to fix.\nI need to know the files that have changed, the user that changed t... |
I use VNC to connect to a Linux workstation at work. At work I have a 20" monitor that runs at 1600x1200, while at home I use my laptop with its resolution of 1440x900.
If I set the vncserver to run at 1440x900 I miss out on a lot of space on my monitor, whereas if I set it to run at 1600x1200 it doesn't fit on the la... | To resize a VNC session on the fly with RealVNC on Linux, you typically need to configure the VNC server and possibly use some additional tools or commands to make the resizing smoother. Here are some methods you can try:
### Method 1: Use `xrandr` for Dynamic Resizing
If your VNC server session is using an X11 serve... | 5,088 | [
{
"from": "human",
"value": "I use VNC to connect to a Linux workstation at work. At work I have a 20\" monitor that runs at 1600x1200, while at home I use my laptop with its resolution of 1440x900.\nIf I set the vncserver to run at 1440x900 I miss out on a lot of space on my monitor, whereas if I set it t... |
In the Visual Studio designer, how do you move a menu item from one menu to another?
I would assume drag and drop would work, but it seems to only work within a menu for me.
I usually resort to editing the .Designer.cs files by hand.
| In the Visual Studio Designer, moving a menu item from one menu to another directly via drag and drop is not supported. You typically cannot drag menu items between different menus; this is indeed a limitation of the Visual Studio Windows Forms Designer.
To move a menu item from one menu to another, you can follow the... | 3,363 | [
{
"from": "human",
"value": "In the Visual Studio designer, how do you move a menu item from one menu to another?\nI would assume drag and drop would work, but it seems to only work within a menu for me.\nI usually resort to editing the .Designer.cs files by hand.\n"
},
{
"from": "gpt",
"value":... |
Does the change of macs over to Intel chips mean we are done with the bit twiddling on numbers in binary resources for cross platform data distributions?
Is that the last of this problem or are there some other platforms I'm not aware of?
| The transition of Macs from PowerPC to Intel chips in 2006 significantly reduced the complexity of cross-platform compatibility issues, particularly with regard to binary resources and data representation. However, this shift did not completely eliminate these issues.
While Intel architectures (x86 and x86_64) use a m... | 6,670 | [
{
"from": "human",
"value": "Does the change of macs over to Intel chips mean we are done with the bit twiddling on numbers in binary resources for cross platform data distributions?\nIs that the last of this problem or are there some other platforms I'm not aware of?\n"
},
{
"from": "gpt",
"val... |
I have a piece of server-ish software written in Java to run on Windows and OS X. (It is not running on a server, but just a normal user's PC - something like a torrent client.) I would like the software to signal to the OS to keep the machine awake (prevent it from going into sleep mode) while it is active.
Of course ... | To prevent a machine from going to sleep while your Java application is active, you can use native C programs or system commands to signal the operating system to stay awake. Below are examples for both Windows and macOS.
### Windows
For Windows, you can use a simple C program that utilizes the Windows API to prevent... | 4,978 | [
{
"from": "human",
"value": "I have a piece of server-ish software written in Java to run on Windows and OS X. (It is not running on a server, but just a normal user's PC - something like a torrent client.) I would like the software to signal to the OS to keep the machine awake (prevent it from going into s... |
I want to make a copy of an ActiveRecord object, changing a single field in the process (in addition to the id). What is the simplest way to accomplish this?
I realize I could create a new record, and then iterate over each of the fields copying the data field-by-field - but I figured there must be an easier way to do... | To create a copy of an ActiveRecord object while changing a specific field (e.g., `id`), you can use the `dup` method, which creates a shallow copy of the object. After duplicating, you can then modify the specific fields you want. Here’s how you can achieve that in a simple and straightforward manner:
```ruby
# Assum... | 8,143 | [
{
"from": "human",
"value": "I want to make a copy of an ActiveRecord object, changing a single field in the process (in addition to the id). What is the simplest way to accomplish this?\nI realize I could create a new record, and then iterate over each of the fields copying the data field-by-field - but I... |
During a typical day programming, I implement functions in a way that I would like to remember. For instance, say I tuned a DB insert function that, when I come across the situation again, I want to find what I did to resuse.
I need a place to keep the solution(what I did), and I need to find it somehow, which may be m... | It's great that you're thinking about ways to document and reuse your programming solutions! Here are several methods and tools that can help you keep track of your solutions and make them easily accessible later on:
### 1. **Personal Wiki**
- **Tools**: Use software like TiddlyWiki, DokuWiki, or MediaWiki.
- **... | 5,992 | [
{
"from": "human",
"value": "During a typical day programming, I implement functions in a way that I would like to remember. For instance, say I tuned a DB insert function that, when I come across the situation again, I want to find what I did to resuse.\nI need a place to keep the solution(what I did), and... |
I'm looking at parsing a delimited string, something on the order of
a,b,c
But this is a very simple example, and parsing delimited data can get complex; for instance
1,"Your simple algorithm, it fails",True
would blow your naiive string.Split implementation to bits. Is there anything I can freely use/steal/copy and p... | You're correct that parsing delimited strings can get quite complex, especially when dealing with embedded delimiters, quotes, and escaping. The `TextFieldParser` from the `Microsoft.VisualBasic` namespace is indeed a robust option for parsing such data, as it takes care of many edge cases.
If you're looking for alter... | 4,896 | [
{
"from": "human",
"value": "I'm looking at parsing a delimited string, something on the order of\na,b,c\nBut this is a very simple example, and parsing delimited data can get complex; for instance\n1,\"Your simple algorithm, it fails\",True\nwould blow your naiive string.Split implementation to bits. Is t... |
Does anyone have any good starting points for me when looking at making web pages/sites/applications specifically for viewing on the iPhone?
I've looked at templates like the one Joe Hewitt has made, and also seen some templates I can purchase, which I haven't done yet.
I figured someone else had already started on thi... | Creating web applications that look and feel good on the iPhone can be an exciting project! Here are some recommendations and pointers to get you started:
### 1. **Responsive Design and Viewports**
- Ensure you set the correct viewport meta tag in your HTML for optimal rendering on mobile devices:
```html
... | 4,326 | [
{
"from": "human",
"value": "Does anyone have any good starting points for me when looking at making web pages/sites/applications specifically for viewing on the iPhone?\nI've looked at templates like the one Joe Hewitt has made, and also seen some templates I can purchase, which I haven't done yet.\nI figu... |
It seems to me that introducing an ORM tool is supposed to make your architecture cleaner, but for efficiency I've found myself bypassing it and iterating over a JDBC Result Set on occasion. This leads to an uncoordinated tangle of artifacts instead of a cleaner architecture.
Is this because I'm applying the tool in a... | It sounds like you're grappling with a common challenge when integrating ORM tools like Hibernate into a complex application, especially one with a rich history of data access layers and various architectural styles. Let's break down some of the issues and considerations when deciding how fully to embrace an ORM approa... | 4,563 | [
{
"from": "human",
"value": "It seems to me that introducing an ORM tool is supposed to make your architecture cleaner, but for efficiency I've found myself bypassing it and iterating over a JDBC Result Set on occasion. This leads to an uncoordinated tangle of artifacts instead of a cleaner architecture.\n... |
I am implementing a HttpRequestValidationException in my Application_Error Handler, and if possible, I want to display a custom message.
Now, I'm thinking about the StatusCode. In my current example, it sends a 200, which I think should not be done. I would like to send the (IMHO) more appropriate 400 Bad Request inste... | Sending a HTTP 200 status code for error pages, especially in the context of an `HttpRequestValidationException`, is not considered good practice. The HTTP status code indicates the result of the server's processing of a request, and a 200 status code should only be used when a request has been successfully processed a... | 4,493 | [
{
"from": "human",
"value": "I am implementing a HttpRequestValidationException in my Application_Error Handler, and if possible, I want to display a custom message.\nNow, I'm thinking about the StatusCode. In my current example, it sends a 200, which I think should not be done. I would like to send the (IM... |
When loading a page for the first time (!IsPostback), I am creating a button in code and adding it to my page, then adding an event handler to the click event.
However, when clicking the button, after the page reloads, my event handler does not fire.
Can anyone explain why?
| When you create a button (or any control) programmatically in ASP.NET and add it to the page's control tree, you need to ensure that this process happens in the correct page lifecycle phase. If you are creating the button and attaching the event handler only when `!IsPostBack`, the button and its event handler will not... | 4,401 | [
{
"from": "human",
"value": "When loading a page for the first time (!IsPostback), I am creating a button in code and adding it to my page, then adding an event handler to the click event.\nHowever, when clicking the button, after the page reloads, my event handler does not fire.\nCan anyone explain why?\n"... |
I'd like to offer my users correct links to an upgraded version of my program based on what platform they're running on, so I need to know whether I'm currently running on an x86 OS or an x64 OS.
The best I've found is using Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE"), but I would think there would be ... | In C#, you can indeed determine whether your application is running on an x86 (32-bit) or x64 (64-bit) operating system using the `Environment` class, but there is a more straightforward way to check this using the `Environment.Is64BitOperatingSystem` property.
Here's how you can use it:
```csharp
using System;
cla... | 9,610 | [
{
"from": "human",
"value": "I'd like to offer my users correct links to an upgraded version of my program based on what platform they're running on, so I need to know whether I'm currently running on an x86 OS or an x64 OS.\nThe best I've found is using Environment.GetEnvironmentVariable(\"PROCESSOR_ARCHIT... |
I have a directory structure like the following;
script.php
inc/include1.php
inc/include2.php
objects/object1.php
objects/object2.php
soap/soap.php
Now, I use those objects in both script.php and /soap/soap.php, I could move them, but I want the directory structure like that for a specific reason. When executing ... | Certainly! You can use PHP's `__DIR__` magic constant, which returns the directory of the current script. This allows you to create relative paths dynamically based on the script that is being executed. Here’s how you can set it up:
### Option 1: Using `__DIR__` for Relative Paths
In your `script.php` and `soap/soap.... | 5,743 | [
{
"from": "human",
"value": "I have a directory structure like the following;\n\nscript.php\ninc/include1.php\n inc/include2.php\nobjects/object1.php\n objects/object2.php\nsoap/soap.php\n\nNow, I use those objects in both script.php and /soap/soap.php, I could move them, but I want the directory structur... |
What is the correct way to get the process size on Solaris, HP-UX and AIX? Should we use top or ps -o vsz or something else?
| To get the process size on Solaris, HP-UX, and AIX, there are different ways to retrieve this information. Each of these Unix-like systems has its own set of commands and options. Here’s a brief overview for each system:
### Solaris
On Solaris, you can use the `ps` command with the `-o` option to specify the output fo... | 3,437 | [
{
"from": "human",
"value": "What is the correct way to get the process size on Solaris, HP-UX and AIX? Should we use top or ps -o vsz or something else?\n"
},
{
"from": "gpt",
"value": "To get the process size on Solaris, HP-UX, and AIX, there are different ways to retrieve this information. Ea... |
TFS2008. I'd like to track task points on a Task work item, but there isn't anywhere (other than the description) to record this. I'd like to add a dropdown with 0, 1, 2, 3, 5, 8, etc, so these task points can be exported in reports.
| In Team Foundation Server (TFS) 2008, you can customize work item types to add fields such as a dropdown for tracking task points. Here’s how you can add a dropdown field for task points to the Task work item type:
### Steps to Add a Dropdown for Task Points
1. **Install TFS Power Tools**: Ensure you have TFS Power T... | 5,253 | [
{
"from": "human",
"value": "TFS2008. I'd like to track task points on a Task work item, but there isn't anywhere (other than the description) to record this. I'd like to add a dropdown with 0, 1, 2, 3, 5, 8, etc, so these task points can be exported in reports.\n"
},
{
"from": "gpt",
"value":... |
In order for my application (.Net 1.1) to use the system configured proxy server (trough a proxy.pac script) I was using an interop calls to WinHTTP function WinHttpGetProxyForUrl, passing the proxy.pac url I got from the registry.
Unfortunately, I hit a deployment scenario, where this does not work, as the proxy.pac f... | Working with proxy.pac files in .NET 1.1 can indeed be challenging due to the limitations of the runtime and the Windows APIs available. Since you cannot use `WinHttpGetProxyForUrl` with a `file://` URL, here are some alternative approaches you can consider:
### 1. Manual PAC Parsing
You can manually parse the JavaScr... | 6,241 | [
{
"from": "human",
"value": "In order for my application (.Net 1.1) to use the system configured proxy server (trough a proxy.pac script) I was using an interop calls to WinHTTP function WinHttpGetProxyForUrl, passing the proxy.pac url I got from the registry.\nUnfortunately, I hit a deployment scenario, wh... |
I have 2 detail sections on my report (details a and details b).
Fields in both sections can grow up to 10 lines.
How do I force the Crystal Report to print both sections on one page?
Currently the report on bottom page print section "details a", but section "details b" prints on next page.
How do I prevent this behav... | In Crystal Reports, to ensure that both Detail A and Detail B sections print on the same page, you can use the "Keep Together" option. This setting helps in controlling how sections are printed, especially when they can grow. Here’s how to do it:
1. **Select the Section**: In the report design view, right-click on the... | 7,655 | [
{
"from": "human",
"value": "I have 2 detail sections on my report (details a and details b).\nFields in both sections can grow up to 10 lines.\nHow do I force the Crystal Report to print both sections on one page?\nCurrently the report on bottom page print section \"details a\", but section \"details b\" p... |
I need to get some information that is contained in the MFT on a Windows machine, and I'm hoping that there is some super-secret API for getting this information. I need to be able to get to this information programmatically, and because of legal concerns I might not be able to use the tools provided by the company for... | Accessing the Master File Table (MFT) on a Windows machine to retrieve information programmatically can be quite intricate, especially if you want to do so without using existing tools from Sysinternals or other third-party libraries. Below are some approaches and considerations that you might explore:
### 1. **Using ... | 6,189 | [
{
"from": "human",
"value": "I need to get some information that is contained in the MFT on a Windows machine, and I'm hoping that there is some super-secret API for getting this information. I need to be able to get to this information programmatically, and because of legal concerns I might not be able to ... |
I have this idea for a free backup application.
The largest problem I need to solve at the moment is how to access files which are being used or are system files. I would like the application to be able to perform a full backup of files (i.e. not on a disk sector by sector level).
I'll turn the server part of the appli... | Creating a backup application that can handle locked files and system files is certainly a challenging yet rewarding task. Below are some considerations and approaches you can take:
### 1. Administrative Privileges
To access system files and perform tasks that require elevated permissions, your application will need t... | 4,117 | [
{
"from": "human",
"value": "I have this idea for a free backup application.\nThe largest problem I need to solve at the moment is how to access files which are being used or are system files. I would like the application to be able to perform a full backup of files (i.e. not on a disk sector by sector leve... |
Does anybody know of any sample databases I could download, preferably in CSV or some similar easy to import format so that I could get more practice in working with different types of data sets?
I know that the Canadian Department of Environment has historical weather data that you can download. However, it's not i... | There are numerous free datasets available online in formats like CSV, JSON, and others that are perfect for practice with databases like MySQL and SQL Server. Here are some resources and datasets you might find interesting:
### 1. **Kaggle Datasets**
Kaggle is a platform for data science competitions but also has a v... | 6,363 | [
{
"from": "human",
"value": "Does anybody know of any sample databases I could download, preferably in CSV or some similar easy to import format so that I could get more practice in working with different types of data sets? \nI know that the Canadian Department of Environment has historical weather data t... |
I'm starting a new project here (Windows Forms). What's the best option today for a small (free as in beer) DBMS?
I've used SQL Server Express on the past projects, but time and time again I hear people saying that the product from Oracle is faster and more powerful.
It will be used in a small company (around 20 users)... | When it comes to choosing a free database management system (DBMS) for your Windows Forms project, you have a few solid options. SQL Server Express and Oracle's offerings are both popular, but the best choice for you will depend on your specific needs, such as performance, ease of use, compatibility, and community supp... | 3,650 | [
{
"from": "human",
"value": "I'm starting a new project here (Windows Forms). What's the best option today for a small (free as in beer) DBMS?\nI've used SQL Server Express on the past projects, but time and time again I hear people saying that the product from Oracle is faster and more powerful.\nIt will b... |
I know a few advanced ways, to change directories. pushd and popd (directory stack) or cd - (change to last directory).
But I am looking for quick way to achieve the following:
Say, I am in a rather deep dir:
/this/is/a/very/deep/directory/structure/with\ lot\ of\ nasty/names
and I want to switch to
/this/is/another... | Certainly! If you're looking for quick ways to navigate to a different directory without typing the full path or using the mouse, here are a few methods:
### 1. **Using Aliases**
If you frequently switch between the two directories, you can create aliases in your shell configuration file (like `.bashrc` or `.zshrc`):
... | 2,639 | [
{
"from": "human",
"value": "I know a few advanced ways, to change directories. pushd and popd (directory stack) or cd - (change to last directory).\nBut I am looking for quick way to achieve the following:\nSay, I am in a rather deep dir:\n/this/is/a/very/deep/directory/structure/with\\ lot\\ of\\ nasty/na... |
Is there any way to view the contents of the solution user options file (the .suo file that accompanies solution files)?
I know it's basically formatted as a file system within the file, but I'd like to be able to view the contents so that I can figure out which aspects of my solution and customizations are causing it ... | The `.suo` (Solution User Options) file is a binary file used by Visual Studio to store user-specific settings for a solution, such as the open documents, breakpoints, and various user preferences. Because it is a binary file, it is not meant to be directly edited or easily viewed by users. However, there are a few app... | 7,207 | [
{
"from": "human",
"value": "Is there any way to view the contents of the solution user options file (the .suo file that accompanies solution files)?\nI know it's basically formatted as a file system within the file, but I'd like to be able to view the contents so that I can figure out which aspects of my s... |
A DB Audit Trail captures the User Last Modified, Modified Date, and Created Date.
There are several possible implementations:
SQL Server Triggers
Add UserModified, ModifiedDate, CreatedDate columns to the database and include logic in Stored Procedures or Insert, Update statements accordingly.
It would be nice if yo... | Implementing a database audit trail can be achieved through various methods in SQL Server. Below, I will outline two common approaches: using SQL Server triggers and using additional columns with stored procedures. I'll provide some sample implementations for both methods.
### Method 1: SQL Server Triggers
Using trig... | 2,683 | [
{
"from": "human",
"value": "A DB Audit Trail captures the User Last Modified, Modified Date, and Created Date.\nThere are several possible implementations:\n\nSQL Server Triggers\nAdd UserModified, ModifiedDate, CreatedDate columns to the database and include logic in Stored Procedures or Insert, Update st... |
In FogBugz 6, how do I represent the concepts of a "feature" versus a "task"? As defined by Joel Spolsky, the owner of Fog Creek Software (which makes FogBugz), a feature is essentially a user-visible capability. To estimate the time to implement a feature, the developer should break the implementation into short tas... | In FogBugz 6, managing the concepts of features and tasks can be somewhat challenging due to the way cases are structured. Here’s how you might represent these concepts effectively given the limitations:
1. **Use Cases to Represent Both Features and Tasks**:
- You can create a case for each feature as well as indiv... | 7,452 | [
{
"from": "human",
"value": "In FogBugz 6, how do I represent the concepts of a \"feature\" versus a \"task\"? As defined by Joel Spolsky, the owner of Fog Creek Software (which makes FogBugz), a feature is essentially a user-visible capability. To estimate the time to implement a feature, the developer s... |
Is it possible to order results in SQL Server 2005 by the relevance of a freetext match? In MySQL you can use the (roughly equivalent) MATCH function in the ORDER BY section, but I haven't found any equivalence in SQL Server.
From the MySQL docs:
For each row in the table, MATCH() returns a relevance value; that is, a... | In SQL Server 2005, you can achieve a similar effect to the `MATCH()` function in MySQL by using Full-Text Search capabilities. SQL Server offers the `CONTAINS` function, which is used in conjunction with full-text indexing to search for words and phrases in text columns. However, it does not return a direct relevance ... | 6,981 | [
{
"from": "human",
"value": "Is it possible to order results in SQL Server 2005 by the relevance of a freetext match? In MySQL you can use the (roughly equivalent) MATCH function in the ORDER BY section, but I haven't found any equivalence in SQL Server.\nFrom the MySQL docs:\n\nFor each row in the table, M... |
In C, what is the most efficient way to convert a string of hex digits into a binary unsigned int or unsigned long?
For example, if I have 0xFFFFFFFE, I want an int with the base10 value 4294967294.
| To efficiently convert a string of hexadecimal digits into a binary `unsigned int` or `unsigned long` in C, you can use the standard library function `strtoul` (string to unsigned long). This function converts a string representation of a number in a specified base into an unsigned long integer.
Here's a simple exampl... | 5,147 | [
{
"from": "human",
"value": "In C, what is the most efficient way to convert a string of hex digits into a binary unsigned int or unsigned long?\nFor example, if I have 0xFFFFFFFE, I want an int with the base10 value 4294967294.\n"
},
{
"from": "gpt",
"value": "To efficiently convert a string of... |
What is the operator precedence order in Visual Basic 6.0 (VB6)?
In particular, for the logical operators.
| In Visual Basic 6.0 (VB6), operators have a specific precedence order that determines the sequence in which operations are evaluated in an expression. Here's the general order of operator precedence from highest to lowest, including logical operators:
1. **Parentheses** `()`
2. **Exponential** `^`
3. **Unary plus and ... | 7,061 | [
{
"from": "human",
"value": "What is the operator precedence order in Visual Basic 6.0 (VB6)?\nIn particular, for the logical operators.\n"
},
{
"from": "gpt",
"value": "In Visual Basic 6.0 (VB6), operators have a specific precedence order that determines the sequence in which operations are eva... |
In your experience, how often should Oracle database statistics be run? Our team of developers recently discovered that statistics hadn't been run our production box in over 2 1/2 months. That sounds like a long time to me, but I'm not a DBA.
| Running statistics in an Oracle database is an essential part of database maintenance. Statistics help the Oracle optimizer make informed decisions about the most efficient way to execute queries. Here are some best practices regarding how often to gather statistics:
1. **Frequency**: The frequency of gathering statis... | 5,547 | [
{
"from": "human",
"value": "In your experience, how often should Oracle database statistics be run? Our team of developers recently discovered that statistics hadn't been run our production box in over 2 1/2 months. That sounds like a long time to me, but I'm not a DBA.\n"
},
{
"from": "gpt",
"... |
I'm cleaning up some old Maildir folders, and finding messages with names like:
1095812260.M625118P61205V0300FF04I002DC537_0.redoak.cise.ufl.edu,S=2576:2,ST
They don't show up in my IMAP client, so I presume there's some semaphore indicating the message already got moved somewhere else. Is that the case, and can the fi... | Maildir folders store emails in a specific format, and each email typically consists of a file with a unique name. The naming convention you see, like `1095812260.M625118P61205V0300FF04I002DC537_0.redoak.cise.ufl.edu,S=2576:2,ST`, includes several parts:
1. **Unique identifier**: The part before the first period is a ... | 7,110 | [
{
"from": "human",
"value": "I'm cleaning up some old Maildir folders, and finding messages with names like:\n1095812260.M625118P61205V0300FF04I002DC537_0.redoak.cise.ufl.edu,S=2576:2,ST\nThey don't show up in my IMAP client, so I presume there's some semaphore indicating the message already got moved somew... |
I'm a bit confused here. Microsoft as far as I can tell claims that parametrization is the best way to protect your database from SQL injection attacks. But I find two conflicting sources of information here:
This page says to use the ADO command object. But this page says that the command object isn't safe for scri... | It's understandable to feel confused by conflicting information regarding the security measures for preventing SQL injection attacks, especially when dealing with different programming environments and object models. Let's break down the concepts and clarify the situation:
1. **Parameterized Queries**: This is indeed ... | 7,679 | [
{
"from": "human",
"value": "I'm a bit confused here. Microsoft as far as I can tell claims that parametrization is the best way to protect your database from SQL injection attacks. But I find two conflicting sources of information here:\nThis page says to use the ADO command object. But this page says t... |
Is it realistic to try and learn and code a Flex 3 application without purchasing FlexBuilder? Since the SDK and BlazeDS are open source, it seems technically possible to develop without Flex Builder, but how realistic is it.
I would like to test out Flex but don't want to get into a situation where I am dependent on t... | Yes, it is definitely possible to develop a Flex 3 application without purchasing FlexBuilder (also known as Adobe Flash Builder). Since the Flex SDK and BlazeDS are open source, you can set up your development environment and build applications without relying on proprietary software. Here are some considerations and ... | 3,735 | [
{
"from": "human",
"value": "Is it realistic to try and learn and code a Flex 3 application without purchasing FlexBuilder? Since the SDK and BlazeDS are open source, it seems technically possible to develop without Flex Builder, but how realistic is it.\nI would like to test out Flex but don't want to get ... |
If you go to a site such as:
http://www.cs.cmu.edu/~maverick/VimColorSchemeTest/index-c.html
It has a bunch of example colour themes for VI.
Does anyone know of a tool that would take those files and convert them into .vssettings files to use in Visual Studio?
If not, how about some good docs on ether of the formats.
| As of my last knowledge update, there is no widely-known tool specifically designed to convert Vim color schemes directly into Visual Studio .vssettings files. However, you can manually create a Visual Studio color theme that reflects the colors from Vim color schemes. Here's how you can proceed:
### Manual Conversion... | 5,399 | [
{
"from": "human",
"value": "If you go to a site such as:\nhttp://www.cs.cmu.edu/~maverick/VimColorSchemeTest/index-c.html\nIt has a bunch of example colour themes for VI.\nDoes anyone know of a tool that would take those files and convert them into .vssettings files to use in Visual Studio?\nIf not, how ab... |
I've heard of a few ways to implement tagging; using a mapping table between TagID and ItemID (makes sense to me, but does it scale?), adding a fixed number of possible TagID columns to ItemID (seems like a bad idea), Keeping tags in a text column that's comma separated (sounds crazy but could work). I've even heard so... | Implementing tagging in a database can be approached in several ways, each with its own pros and cons. Let’s evaluate the common methods you mentioned and highlight best practices:
### 1. **Mapping Table (Many-to-Many Relationship)**
This is often the most recommended approach for tagging systems. In this model, you w... | 3,391 | [
{
"from": "human",
"value": "I've heard of a few ways to implement tagging; using a mapping table between TagID and ItemID (makes sense to me, but does it scale?), adding a fixed number of possible TagID columns to ItemID (seems like a bad idea), Keeping tags in a text column that's comma separated (sounds ... |
I have a report with many fields that I'm trying to get down to 1 page horizontally (I don't care whether it's 2 or 200 pages vertically... just don't want to have to deal with 2 pages wide by x pages long train-wreck). That said, it deals with contact information.
My idea was to do:
Name: Address: City: S... | To achieve multi-line output in your report for the address fields, you typically need to ensure the following:
1. **Use Correct Line Break Character**: The line break character can differ based on the environment you're working in. In SQL Server, you can use `CHAR(10)` (newline) or `CHAR(13)` (carriage return) to cre... | 5,293 | [
{
"from": "human",
"value": "I have a report with many fields that I'm trying to get down to 1 page horizontally (I don't care whether it's 2 or 200 pages vertically... just don't want to have to deal with 2 pages wide by x pages long train-wreck). That said, it deals with contact information.\nMy idea was... |
How do I use PowerShell to stop and start a "Generic Service" as seen in the Microsoft "Cluster Administrator" software?
| In PowerShell, you can use the `Stop-Service` and `Start-Service` cmdlets to stop and start services. To manage a "Generic Service" in a Microsoft Cluster, you'll typically first need to ensure that you're running PowerShell with the necessary permissions and that you have the appropriate modules loaded for cluster man... | 7,953 | [
{
"from": "human",
"value": "How do I use PowerShell to stop and start a \"Generic Service\" as seen in the Microsoft \"Cluster Administrator\" software?\n"
},
{
"from": "gpt",
"value": "In PowerShell, you can use the `Stop-Service` and `Start-Service` cmdlets to stop and start services. To mana... |
I am using Java 1.4 with Log4J.
Some of my code involves serializing and deserializing value objects (POJOs).
Each of my POJOs declares a logger with
private final Logger log = Logger.getLogger(getClass());
The serializer complains of org.apache.log4j.Logger not being Serializable.
Should I use
private final transie... | Yes, you should use `private final transient Logger log = Logger.getLogger(getClass());` in your POJOs.
In Java, the `transient` keyword indicates that a field should not be serialized. Since `org.apache.log4j.Logger` is not serializable, marking it as `transient` will prevent the serialization process from attempting... | 8,803 | [
{
"from": "human",
"value": "I am using Java 1.4 with Log4J. \nSome of my code involves serializing and deserializing value objects (POJOs). \nEach of my POJOs declares a logger with\nprivate final Logger log = Logger.getLogger(getClass());\n\nThe serializer complains of org.apache.log4j.Logger not being Se... |
I've been using OpenGL extensions on Windows the painful way. Is GLEW the easier way to go? How do I get started with it?
| Yes, GLEW (OpenGL Extension Wrangler Library) is a great way to handle OpenGL extensions more easily in your Windows applications. It helps manage the complexities of loading OpenGL extensions and simplifies the process of working with the OpenGL API.
### Getting Started with GLEW
Here are the steps to get started wi... | 5,035 | [
{
"from": "human",
"value": "I've been using OpenGL extensions on Windows the painful way. Is GLEW the easier way to go? How do I get started with it?\n"
},
{
"from": "gpt",
"value": "Yes, GLEW (OpenGL Extension Wrangler Library) is a great way to handle OpenGL extensions more easily in your Win... |
I know I can programatically make the taskbar item for a particular window start flashing when something changes, but is there any way I can stop it from flashing either programatically after a certain period of time or at least is there a keyboard shortcur I can give to my users to somehow stop the flashing?
| Yes, you can programmatically stop the taskbar item from flashing in a Windows application, and there are also keyboard shortcuts available for users.
### Programmatically Stopping Flashing:
If you're programming in a language that allows you to interact with Windows APIs, such as C#, C++, or similar, you can use the... | 5,777 | [
{
"from": "human",
"value": "I know I can programatically make the taskbar item for a particular window start flashing when something changes, but is there any way I can stop it from flashing either programatically after a certain period of time or at least is there a keyboard shortcur I can give to my user... |
I'm working on a website built with pure HTML and CSS, and I need a way to restrict access to pages located within particular directories within the site. The solution I came up with was, of course, ASP.NET Forms Authorization. I created the default Visual Studio log in form and set up the users, roles, and access rest... | When working with ASP.NET Forms Authentication on an IIS server and facing issues with logging in, there are several areas you can check to resolve the problem. Here’s a step-by-step guide to troubleshoot the issue:
1. **Check Web.config Configuration:**
Make sure your `Web.config` file has the correct settings for... | 4,412 | [
{
"from": "human",
"value": "I'm working on a website built with pure HTML and CSS, and I need a way to restrict access to pages located within particular directories within the site. The solution I came up with was, of course, ASP.NET Forms Authorization. I created the default Visual Studio log in form and... |
I would like to use a component that exposes the datasource property, but instead of supplying the datasource with whole list of objects, I would like to use only simple object. Is there any way to do this ?
The mentioned component is DevExpress.XtraDataLayout.DataLayoutControl - this is fairly irrelevant to the questi... | In DevExpress's `DataLayoutControl`, the `DataSource` property typically expects a collection of objects, which it binds to the layout. If you want to use a single object instead of a collection, you can do this by creating a temporary list containing just that single object.
Here's how you can achieve this:
1. **Cre... | 6,645 | [
{
"from": "human",
"value": "I would like to use a component that exposes the datasource property, but instead of supplying the datasource with whole list of objects, I would like to use only simple object. Is there any way to do this ?\nThe mentioned component is DevExpress.XtraDataLayout.DataLayoutControl... |
Normally you create a function using cfscript like:
<cfscript>
function foo() { return "bar"; }
</cfscript>
Is there a way to declare this as a private function, available only to other methods inside the same cfc?
I know you can do it with tags:
<cffunction name="foo" access="private">
<cfreturn "bar">
</cffu... | In ColdFusion, when you're working with CFScript, you can declare the access modifier for functions directly within the function declaration. However, for a function to be marked as private, you need to include the `access` attribute right in the `function` declaration.
Unfortunately, in CFScript, there is no direct s... | 7,139 | [
{
"from": "human",
"value": "Normally you create a function using cfscript like:\n<cfscript>\n function foo() { return \"bar\"; }\n</cfscript>\n\nIs there a way to declare this as a private function, available only to other methods inside the same cfc?\nI know you can do it with tags:\n<cffunction name=\... |
Given a reference to a method, is there a way to check whether the method is bound to an object or not? Can you also access the instance that it's bound to?
| In Python, you can check whether a method is bound to an instance (i.e., whether it's a bound method) and access the instance it is bound to.
When a method is called on an instance, it is referred to as a bound method, and it has a reference to the instance it is bound to.
Here’s how you can check if a method is boun... | 6,208 | [
{
"from": "human",
"value": "Given a reference to a method, is there a way to check whether the method is bound to an object or not? Can you also access the instance that it's bound to?\n"
},
{
"from": "gpt",
"value": "In Python, you can check whether a method is bound to an instance (i.e., whe... |
I've created a custom list, and made some changes to the way the CQWP renders it on a page by modifying ItemStyle.xsl. However, I'd like to use some custom css classes and therefore I'd like to link to my own custom .css file from the head tag of the pages containing this CQWP.
So my question is, where to do put my .cs... | To include a custom CSS file in a SharePoint page that utilizes the Content Query Web Part (CQWP), you'll want to ensure that your solution is compatible with multiple SharePoint installations. Here's a general approach to help you do this.
### Step 1: Place Your Custom CSS File
1. **Upload Your CSS File**:
- Uplo... | 7,149 | [
{
"from": "human",
"value": "I've created a custom list, and made some changes to the way the CQWP renders it on a page by modifying ItemStyle.xsl. However, I'd like to use some custom css classes and therefore I'd like to link to my own custom .css file from the head tag of the pages containing this CQWP.\... |
I am creating an application for a Windows Mobile computer. The catch is that the device (Motorola MC17) does not have a touch screen or universal keys - there are only six programmable hardware keys. Fitt's law is not applicable here, most Microsoft guidelines are also moot. For now I'm mimicking Nokia's S60 keyboard ... | Designing a user interface (UI) for a constrained device like the Motorola MC17, which lacks a touch screen and has limited hardware keys, presents unique challenges. Here are several guidelines you can follow to create a simple, discoverable, and effective user interface for your application:
### 1. **Design Guidelin... | 3,680 | [
{
"from": "human",
"value": "I am creating an application for a Windows Mobile computer. The catch is that the device (Motorola MC17) does not have a touch screen or universal keys - there are only six programmable hardware keys. Fitt's law is not applicable here, most Microsoft guidelines are also moot. Fo... |
I am programming a game on the iPhone. I am currently using NSTimer to trigger my game update/render. The problem with this is that (after profiling) I appear to lose a lot of time between updates/renders and this seems to be mostly to do with the time interval that I plug into NSTimer.
So my question is what is th... | One effective alternative to using `NSTimer` for game updates is to use a `CADisplayLink`.
`CADisplayLink` is designed specifically for synchronizing your drawing to the refresh rate of the display. It allows your game to run its update and render cycles at the frame rate of the device, which is typically 60 frames p... | 9,326 | [
{
"from": "human",
"value": "I am programming a game on the iPhone. I am currently using NSTimer to trigger my game update/render. The problem with this is that (after profiling) I appear to lose a lot of time between updates/renders and this seems to be mostly to do with the time interval that I plug int... |
I was wondering if there is any good and clean object-oriented programming (OOP) implementation of Bayesian filtering for spam and text classification? This is just for learning purposes.
| Certainly! Implementing a Bayesian filter for spam and text classification can be a great way to practice object-oriented programming concepts. Below is a simple example of a clean and structured OOP implementation of a Naive Bayes classifier for spam detection.
### Overview
We'll create a `NaiveBayesClassifier` clas... | 3,441 | [
{
"from": "human",
"value": "I was wondering if there is any good and clean object-oriented programming (OOP) implementation of Bayesian filtering for spam and text classification? This is just for learning purposes.\n"
},
{
"from": "gpt",
"value": "Certainly! Implementing a Bayesian filter for ... |
The Interface Segregation Principle (ISP) says that many client specific interfaces are better than one general purpose interface. Why is this important?
| The Interface Segregation Principle (ISP) is one of the five SOLID principles of object-oriented design and programming. It emphasizes the importance of creating interfaces that are tailored to the specific needs of different clients rather than forcing clients to depend on interfaces that contain methods they do not u... | 6,928 | [
{
"from": "human",
"value": "The Interface Segregation Principle (ISP) says that many client specific interfaces are better than one general purpose interface. Why is this important?\n"
},
{
"from": "gpt",
"value": "The Interface Segregation Principle (ISP) is one of the five SOLID principles of... |
I am working on a function to establish the entropy of a distribution. It uses a copula, if any are familiar with that. I need to sum up the values in the array based on which dimensions are "cared about."
Example: Consider the following example...
Dimension 0 (across)
_ _ _ _ _ _ _ _ _ _ _ _ _
|_ 0 _|_ 0 _|_ 0 _|_... | To create a function in C++ that collapses a multidimensional array based on specified dimensions while summing along the other dimensions, we can utilize recursive programming and templates to handle the arbitrary number of dimensions. Below is a simple implementation that demonstrates how you might achieve this for a... | 3,064 | [
{
"from": "human",
"value": "I am working on a function to establish the entropy of a distribution. It uses a copula, if any are familiar with that. I need to sum up the values in the array based on which dimensions are \"cared about.\"\nExample: Consider the following example...\n\nDimension 0 (across)\... |
Im sure this has happened to folks before, something works in debug mode, you compile in release, and something breaks.
This happened to me while working on a Embedded XP environment, the best way i found to do it really was to write a log file to determine where it would go wrong.
What are your experiences/ discoverie... | Debugging release-mode bugs can indeed be challenging due to optimizations and different compiler settings that are typically applied in that mode. Here are some common experiences and strategies that developers often find helpful when tackling annoying release-mode bugs:
### 1. **Logging**:
- As you mentioned, lo... | 315 | [
{
"from": "human",
"value": "Im sure this has happened to folks before, something works in debug mode, you compile in release, and something breaks.\nThis happened to me while working on a Embedded XP environment, the best way i found to do it really was to write a log file to determine where it would go wr... |
I'm trying to determine, based on the result of this call, if it was successful. The successFunction doesn't get called, so I'm assuming it was not. How do I know what went wrong?
xmlRequest = $.post("/url/file/", { 'id' : object.id }, successFunction, 'json');
Do I use the xmlRequest object?
| Yes, you can use the `xmlRequest` object to determine what went wrong when your AJAX request does not succeed. The jQuery `$.post` method returns a `jqXHR` object, which can be used to handle success, failure, and other states of the AJAX request.
To find out what went wrong, you can use the `.fail()` method of the `x... | 8,354 | [
{
"from": "human",
"value": "I'm trying to determine, based on the result of this call, if it was successful. The successFunction doesn't get called, so I'm assuming it was not. How do I know what went wrong?\nxmlRequest = $.post(\"/url/file/\", { 'id' : object.id }, successFunction, 'json');\n\nDo I use th... |
Has anyone worked with DSLs (Domain Specific Languages) in the finance domain? I am planning to introduce some kind of DSL support in the application that I am working on and would like to share some ideas.
I am in a stage of identifying which are the most stable domain elements and selecting the features which would b... | Yes, there have been several initiatives and projects that have utilized Domain-Specific Languages (DSLs) within the finance domain. DSLs can significantly streamline processes and make systems more flexible by allowing domain experts to express business logic in a way that is more intuitive than general-purpose progra... | 3,359 | [
{
"from": "human",
"value": "Has anyone worked with DSLs (Domain Specific Languages) in the finance domain? I am planning to introduce some kind of DSL support in the application that I am working on and would like to share some ideas.\nI am in a stage of identifying which are the most stable domain element... |
Lots of people talk about writing tests for their code before they start writing their code. This practice is generally known as Test Driven Development or TDD for short. What benefits do I gain from writing software this way? How do I get started with this practice?
| Test Driven Development (TDD) is a software development practice that emphasizes writing tests before writing the actual code that implements the functionality. Here are some benefits of adopting TDD:
### Benefits of TDD
1. **Improved Code Quality**: By writing tests first, you ensure that your code is built to meet ... | 5,493 | [
{
"from": "human",
"value": "Lots of people talk about writing tests for their code before they start writing their code. This practice is generally known as Test Driven Development or TDD for short. What benefits do I gain from writing software this way? How do I get started with this practice?\n"
},
{... |
On my way through whipping up a Windows Forms application I thought it might have been a good idea to use the settings file to store miscellaneous application options (instead of the registry) and user parameters (window positions, column orderings, etc.). Out of the box, quick and simple, or so I thought.
All works as... | The `LocalFileSettingsProvider` indeed stores application settings in the user’s local application data folder by default, which can lead to the cluttered directory structure you described. If you want to store user settings in a location that is more accessible and potentially supports roaming profiles, you can consid... | 4,031 | [
{
"from": "human",
"value": "On my way through whipping up a Windows Forms application I thought it might have been a good idea to use the settings file to store miscellaneous application options (instead of the registry) and user parameters (window positions, column orderings, etc.). Out of the box, quick ... |
When running any kind of server under load there are several resources that one would like to monitor to make sure that the server is healthy. This is specifically true when testing the system under load.
Some examples for this would be CPU utilization, memory usage, and perhaps disk space.
What other resource should ... | When running a server under load, it's important to monitor a variety of resources to ensure the server remains healthy and can handle the demands being placed upon it. Here are additional resources you might want to monitor, along with tools that can assist in tracking these metrics:
### Additional Resources to Monit... | 5,543 | [
{
"from": "human",
"value": "When running any kind of server under load there are several resources that one would like to monitor to make sure that the server is healthy. This is specifically true when testing the system under load.\nSome examples for this would be CPU utilization, memory usage, and perha... |
As a base SAS programmer, you know the drill:
You submit your SAS code, which contains an unbalanced quote, so now you've got not only and unclosed quote, but also unclosed comments, macro function definitions, and a missing run; or quit; statement.
What's your best trick for not having those unbalanced quotes bother y... | Dealing with unbalanced quotes and other related issues in SAS can be tricky and time-consuming. Here are some tips to help you minimize the hassle:
1. **Use an Editor with Syntax Highlighting**: Choose a programming editor that supports SAS syntax highlighting, such as SAS Enterprise Guide, SAS Studio, or even third-... | 7,542 | [
{
"from": "human",
"value": "As a base SAS programmer, you know the drill:\nYou submit your SAS code, which contains an unbalanced quote, so now you've got not only and unclosed quote, but also unclosed comments, macro function definitions, and a missing run; or quit; statement.\nWhat's your best trick for ... |
Is it possible to delete a middle node in the single linked list when the only information available we have is the pointer to the node to be deleted and not the pointer to the previous node?After deletion the previous node should point to the node next to deleted node.
| Yes, it is possible to delete a middle node in a singly linked list when you have only the pointer to the node to be deleted and not the pointer to the previous node. However, since you cannot directly access the previous node to update its pointer, you'll have to perform a specific technique.
Here is how you can do i... | 6,452 | [
{
"from": "human",
"value": "Is it possible to delete a middle node in the single linked list when the only information available we have is the pointer to the node to be deleted and not the pointer to the previous node?After deletion the previous node should point to the node next to deleted node. \n"
},... |
I have a simple .NET 2.0 windows form app that runs off of a networked drive (e.g. \MyServer\MyShare\app.exe). It's very basic, and only loads the bare minimum .NET libraries. However, it still takes ~6-10 seconds to load. People think something must be wrong that app so small takes so long to load.
Are there any su... | Improving the startup speed of a .NET 2.0 Windows Forms application running from a network drive can be influenced by a variety of factors. Here are some suggestions to help reduce the load time:
1. **Preload Assemblies**: If the application is loading certain assemblies that are not used immediately, consider lazy-lo... | 7,545 | [
{
"from": "human",
"value": "I have a simple .NET 2.0 windows form app that runs off of a networked drive (e.g. \\MyServer\\MyShare\\app.exe). It's very basic, and only loads the bare minimum .NET libraries. However, it still takes ~6-10 seconds to load. People think something must be wrong that app so s... |
Trying to use a guid as a resource id in a rest url but cant find any resource on how to.
My best right now (not working though) is:
http://localhost:49157/PhotogalleryDS.svc/gallery('1d03beb3-6d63-498b-aad7-fab0b1480996')
(I've tried duouble/single quotes. And also {guid....} with braces. Still no luck.
i only get:
... | When using GUIDs as resource identifiers in a REST API URL, especially in an OData service, the syntax typically requires the GUID to be encapsulated in single quotes and formatted correctly. The URL you are trying to access looks like it may be an OData service based on the `.svc` extension and the query structure.
H... | 6,713 | [
{
"from": "human",
"value": "Trying to use a guid as a resource id in a rest url but cant find any resource on how to.\nMy best right now (not working though) is:\nhttp://localhost:49157/PhotogalleryDS.svc/gallery('1d03beb3-6d63-498b-aad7-fab0b1480996')\n(I've tried duouble/single quotes. And also {guid....... |
I've created a model for executing worker tasks in a server application using a thread pool associated with an IO completion port such as shown in the posts below:
http://weblogs.asp.net/kennykerr/archive/2008/01/03/parallel-programming-with-c-part-4-i-o-completion-ports.aspx
http://blogs.msdn.com/larryosterman/archive... | Yes, Boost provides several libraries that can help you implement a thread pool and manage IO operations efficiently, similar to the model you've described using IO completion ports. Here are some relevant Boost libraries you might consider:
1. **Boost.Asio**:
- This library provides a cross-platform way to perform... | 4,849 | [
{
"from": "human",
"value": "I've created a model for executing worker tasks in a server application using a thread pool associated with an IO completion port such as shown in the posts below:\nhttp://weblogs.asp.net/kennykerr/archive/2008/01/03/parallel-programming-with-c-part-4-i-o-completion-ports.aspx\n... |
I've encountered an interesting problem while developing for our legacy XWindows application.
For reasons that don't bear explaining, I am sending ClientMessage from a comand-line utility to a GUI app.Most of the messages end up having the same contents, as the message's purpose is to trigger a synchronous communicatio... | What you're experiencing with the X Windows system, particularly with ClientMessage events, may be related to the way that the X server handles event delivery, especially for events that have the same timestamp and content.
### Potential Explanations
1. **Event Deduplication**: Some X servers or window managers may h... | 5,946 | [
{
"from": "human",
"value": "I've encountered an interesting problem while developing for our legacy XWindows application.\nFor reasons that don't bear explaining, I am sending ClientMessage from a comand-line utility to a GUI app.Most of the messages end up having the same contents, as the message's purpos... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.