instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
Are we supposed to find workarounds in our web applications so that they will work in every situation? Is it time to do away with IE6 programming?
| When it comes to web application development, it's generally advisable to support modern browsers that adhere to current web standards. Internet Explorer 6 (IE6) is considered an outdated browser, released in 2001, and it has been largely phased out in favor of more modern alternatives. As of 2023, the vast majority of... | 1,185 | [
{
"from": "human",
"value": "Are we supposed to find workarounds in our web applications so that they will work in every situation? Is it time to do away with IE6 programming?\n"
},
{
"from": "gpt",
"value": "When it comes to web application development, it's generally advisable to support moder... |
I was trying to get my head around XAML and thought that I would try writing some code.
Trying to add a grid with 6 by 6 column definitions then add a text block into one of the grid cells. I don't seem to be able to reference the cell that I want. There is no method on the grid that I can add the text block too. Th... | You're on the right track with using a Grid in XAML and adding a TextBlock to it. The confusion arises because, to position an element (like your `TextBlock`) in a specific cell of a Grid, you need to set its `Grid.Row` and `Grid.Column` attached properties.
Here's how you can modify your C# code to add the `TextBloc... | 129 | [
{
"from": "human",
"value": "I was trying to get my head around XAML and thought that I would try writing some code. \nTrying to add a grid with 6 by 6 column definitions then add a text block into one of the grid cells. I don't seem to be able to reference the cell that I want. There is no method on the g... |
This most be the second most simple rollover effect, still I don't find any simple solution.
Wanted: I have a list of items and a corresponding list of slides (DIVs). After loading, the first list item should be selected (bold) and the first slide should be visible. When the user hovers over another list item, that lis... | You can simplify your code significantly using JavaScript with classes and data attributes. This will reduce redundancy and make it easier to manage your items and slides. Instead of individually manipulating each element, you can loop through them. Here's a more elegant approach:
### HTML:
```html
<ul id="switches">
... | 602 | [
{
"from": "human",
"value": "This most be the second most simple rollover effect, still I don't find any simple solution.\nWanted: I have a list of items and a corresponding list of slides (DIVs). After loading, the first list item should be selected (bold) and the first slide should be visible. When the us... |
Is it possible to use a flash document embedded in HTML as a link?
I tried just wrapping the object element with an a like this:
<a href="http://whatever.com">
<object ...>
<embed ... />
</object>
</a>
In Internet Explorer, that made it show the location in the status bar like a link, but it doesn't do... | Using a Flash document embedded in HTML as a link can be a bit tricky, especially since the Flash player doesn't respond to clicks on the object itself in the way you might expect. Wrapping the `<object>` tag with an `<a>` tag typically doesn't trigger the navigation when the Flash object is clicked, and this can vary ... | 366 | [
{
"from": "human",
"value": "Is it possible to use a flash document embedded in HTML as a link?\nI tried just wrapping the object element with an a like this:\n<a href=\"http://whatever.com\">\n <object ...>\n <embed ... />\n </object>\n</a>\n\nIn Internet Explorer, that made it show the locati... |
I'm thinking of creating a small offline blog editor for personal use and I don't know how do the APIs work. Where can I find this information?
I'm particularly looking for the most common providers: Blogger, Wordpress, MovableType, Live Spaces (not sure if this has an API) etc.
| Creating a small offline blog editor is a great project! To interact with various blogging platforms, you'll need to understand their APIs. Here’s a quick overview of where you can find information on the APIs for some of the most common blogging platforms:
### 1. **WordPress**
- **API Documentation**: The WordPress R... | 1,604 | [
{
"from": "human",
"value": "I'm thinking of creating a small offline blog editor for personal use and I don't know how do the APIs work. Where can I find this information?\nI'm particularly looking for the most common providers: Blogger, Wordpress, MovableType, Live Spaces (not sure if this has an API) etc... |
I have a flag enum below.
[Flags]
public enum FlagTest
{
None = 0x0,
Flag1 = 0x1,
Flag2 = 0x2,
Flag3 = 0x4
}
I cannot make the if statement evaluate to true.
FlagTest testItem = FlagTest.Flag1 | FlagTest.Flag2;
if (testItem == FlagTest.Flag1)
{
// Do something,
// however This is never true.
}... | The issue you're experiencing arises from the fact that the `testItem` variable is a combination of flags, specifically both `Flag1` and `Flag2`. When you perform the check `testItem == FlagTest.Flag1`, it will evaluate to `false` because `testItem` contains both `Flag1` and `Flag2`, making it equal to `FlagTest.Flag1 ... | 1,135 | [
{
"from": "human",
"value": "I have a flag enum below.\n[Flags]\npublic enum FlagTest\n{\n None = 0x0,\n Flag1 = 0x1,\n Flag2 = 0x2,\n Flag3 = 0x4\n}\n\nI cannot make the if statement evaluate to true.\nFlagTest testItem = FlagTest.Flag1 | FlagTest.Flag2;\n\nif (testItem == FlagTest.Flag1)\n{\n ... |
What is the simplest SQL query to find the second largest integer value in a specific column?
There are maybe duplicate values in the column.
| To find the second largest integer value in a specific column while considering possible duplicate values, you can use the `DISTINCT` keyword along with the `ORDER BY` clause and `LIMIT` (or `FETCH` depending on your SQL dialect). Here's a simple query that does this:
### SQL Query:
```sql
SELECT DISTINCT column_name
... | 1,202 | [
{
"from": "human",
"value": "What is the simplest SQL query to find the second largest integer value in a specific column? \nThere are maybe duplicate values in the column.\n"
},
{
"from": "gpt",
"value": "To find the second largest integer value in a specific column while considering possible d... |
I have a Simulink xPC target application that has blocks with discrete states at several different sample rates and some sections using continuous states. My intention on keeping the continuous states is for better numerical integration.
What creates the problem: One block is reading a device at a very fast rate (500 ... | In a Simulink xPC Target application, managing multiple sample rates can be challenging, particularly when you want to mix continuous states with different discrete rates. Here are a few approaches to address your requirements:
### 1. Use Discrete State Derivatives with Variable Sample Rates
One option is to modify yo... | 631 | [
{
"from": "human",
"value": "I have a Simulink xPC target application that has blocks with discrete states at several different sample rates and some sections using continuous states. My intention on keeping the continuous states is for better numerical integration. \nWhat creates the problem: One block is ... |
I'm dynamically loading user controls adding them to the Controls collection of the web form.
I'd like to hide user controls if they cause a unhandled exception while rendering.
So, I tried hooking to the Error event of each UserControl but it seems that this event never fires for the UserControls as it does for Page c... | In ASP.NET Web Forms, user controls (`UserControl`) do not have an `Error` event that you can directly hook into, unlike the `Page` class, which does have an `Error` event to handle unhandled exceptions.
However, you can achieve the desired behavior of hiding user controls that throw exceptions during rendering by imp... | 746 | [
{
"from": "human",
"value": "I'm dynamically loading user controls adding them to the Controls collection of the web form.\nI'd like to hide user controls if they cause a unhandled exception while rendering.\nSo, I tried hooking to the Error event of each UserControl but it seems that this event never fires... |
I have a VS2005 deployment & setup project, that makes use of the Tablet PC SDK 1.7 Merge Module, so users of Windows XP can make use of the managed Microsoft.Ink.DLL library. Now that we've moved over to Vista/VS2008, do I still need to install the TPC SDK (to get the merge module) or can I make use of something that ... | When transitioning from Windows XP to Windows Vista, it's important to understand how the Tablet PC SDK and its components are integrated with the operating system. Windows Vista includes built-in support for tablet functionality, which means that the core components necessary for using the `Microsoft.Ink` library are ... | 2,541 | [
{
"from": "human",
"value": "I have a VS2005 deployment & setup project, that makes use of the Tablet PC SDK 1.7 Merge Module, so users of Windows XP can make use of the managed Microsoft.Ink.DLL library. Now that we've moved over to Vista/VS2008, do I still need to install the TPC SDK (to get the merge mod... |
Is there any python module to convert PDF files into text? I tried one piece of code found in Activestate which uses pypdf but the text generated had no space between and was of no use.
| Yes, there are several Python libraries you can use to convert PDF files into text. If you're experiencing issues with `PyPDF2` (formerly known as `pypdf`), you might want to consider other libraries that may yield better results. Here are a few popular options:
1. **PyMuPDF (fitz)**:
This library often produces be... | 1,088 | [
{
"from": "human",
"value": "Is there any python module to convert PDF files into text? I tried one piece of code found in Activestate which uses pypdf but the text generated had no space between and was of no use. \n"
},
{
"from": "gpt",
"value": "Yes, there are several Python libraries you can... |
I am trying to get SpecUnit to run in a continuous integration build using Nant. At the moment the files are in the correct place but no output is generated from SpecUnit.Report.exe. Here is the relevant task from the nant build script:
<echo message="**** Starting SpecUnit report generation ****" />
<copy file="${spec... | It looks like you're trying to run the `SpecUnit.Report.exe` tool to generate a report during a continuous integration build using NAnt, but you're not seeing any output. Here are some suggestions to help troubleshoot and possibly resolve the issue:
1. **Check SpecUnit.Report.exe Execution**:
Ensure that `SpecUnit... | 1,220 | [
{
"from": "human",
"value": "I am trying to get SpecUnit to run in a continuous integration build using Nant. At the moment the files are in the correct place but no output is generated from SpecUnit.Report.exe. Here is the relevant task from the nant build script:\n<echo message=\"**** Starting SpecUnit re... |
I have a complete XML document in a string and would like a Document object. Google turns up all sorts of garbage. What is the simplest solution? (In Java 1.5)
Solution Thanks to Matt McMinn, I have settled on this implementation. It has the right level of input flexibility and exception granularity for me. (It's good ... | Your implementation for loading an XML document from a string and converting it to a `Document` object is quite good. It correctly handles the distinction between different types of exceptions and uses a `ByteArrayInputStream` to handle the input string. However, there are a few minor improvements we can make for robus... | 211 | [
{
"from": "human",
"value": "I have a complete XML document in a string and would like a Document object. Google turns up all sorts of garbage. What is the simplest solution? (In Java 1.5)\nSolution Thanks to Matt McMinn, I have settled on this implementation. It has the right level of input flexibility and... |
I've been unable to find a source for this information, short of looking through the Python source code myself to determine how the objects work. Does anyone know where I could find this online?
| To find detailed information about Python objects and their behavior, you can explore several online resources:
1. **Official Python Documentation**: The [Python documentation](https://docs.python.org/) is a comprehensive resource that covers various topics related to Python, including built-in types, data structures,... | 1,597 | [
{
"from": "human",
"value": "I've been unable to find a source for this information, short of looking through the Python source code myself to determine how the objects work. Does anyone know where I could find this online?\n"
},
{
"from": "gpt",
"value": "To find detailed information about Pyth... |
This past summer I was developing a basic ASP.NET/SQL Server CRUD app, and unit testing was one of the requirements. I ran into some trouble when I tried to test against the database. To my understanding, unit tests should be:
stateless
independent from each other
repeatable with the same results i.e. no persisting ... | You've raised a critical point in the realm of software testing, particularly when it comes to unit testing in an environment where you interact with a database. The distinction between unit tests and integration tests can often lead to confusion, especially when it comes to testing components that rely heavily on exte... | 1,044 | [
{
"from": "human",
"value": "This past summer I was developing a basic ASP.NET/SQL Server CRUD app, and unit testing was one of the requirements. I ran into some trouble when I tried to test against the database. To my understanding, unit tests should be:\n\nstateless\nindependent from each other\nrepeata... |
I'm learning objective-c and keep bumping into the @ symbol. It is used in different scenarios, for example at the start of a string or to synthesise accessor methods.
What's does the @ symbol mean in objective-c?
| In Objective-C, the `@` symbol serves as a prefix that indicates various types of literals or constructs, specifically in relation to object-oriented programming. Here are some common uses of the `@` symbol in Objective-C:
1. **String Literals**: When you prefix a string with `@`, it denotes an NSString object. For ex... | 1,188 | [
{
"from": "human",
"value": "I'm learning objective-c and keep bumping into the @ symbol. It is used in different scenarios, for example at the start of a string or to synthesise accessor methods. \nWhat's does the @ symbol mean in objective-c?\n"
},
{
"from": "gpt",
"value": "In Objective-C, th... |
I've tried using source control for a couple projects but still don't really understand it. For these projects, we've used TortoiseSVN and have only had one line of revisions. (No trunk, branch, or any of that.) If there is a recommended way to set up source control systems, what are they? What are the reasons and ... | Source control, also known as version control, is an essential tool for software development that allows you to track changes, collaborate with others, and manage different versions of your code. Here’s an overview of recommended practices for setting up a source control system, the differences between centralized and ... | 243 | [
{
"from": "human",
"value": "I've tried using source control for a couple projects but still don't really understand it. For these projects, we've used TortoiseSVN and have only had one line of revisions. (No trunk, branch, or any of that.) If there is a recommended way to set up source control systems, ... |
I would like to sort an array in ascending order using C/C++. The outcome is an array containing element indexes. Each index is corespondent to the element location in the sorted array.
Example
Input: 1, 3, 4, 9, 6
Output: 1, 2, 3, 5, 4
Edit: I am using shell sort procedure. The duplicate value indexes are arbitraril... | Based on your requirement to sort an array and return the indexes of the elements in sorted order, I see a few issues with your current implementation. You're attempting to manipulate pointers incorrectly, which is causing compilation errors.
1. **Pointer Assignment**: You need to swap the actual values at the indice... | 268 | [
{
"from": "human",
"value": "I would like to sort an array in ascending order using C/C++. The outcome is an array containing element indexes. Each index is corespondent to the element location in the sorted array.\nExample\nInput: 1, 3, 4, 9, 6\nOutput: 1, 2, 3, 5, 4\n\nEdit: I am using shell sort procedu... |
I have a column of data that contains a percentage range as a string that I'd like to convert to a number so I can do easy comparisons.
Possible values in the string:
'<5%'
'5-10%'
'10-15%'
...
'95-100%'
I'd like to convert this in my select where clause to just the first number, 5, 10, 15, etc. so that I can compare ... | To convert a percentage range string to a numeric value for comparisons in SQL, you can use a combination of string manipulation functions. Given your example values, you need to extract the first number, which could be in various formats.
Here’s a way to achieve that using T-SQL (for SQL Server). We can utilize funct... | 532 | [
{
"from": "human",
"value": "I have a column of data that contains a percentage range as a string that I'd like to convert to a number so I can do easy comparisons.\nPossible values in the string:\n'<5%'\n'5-10%'\n'10-15%'\n...\n'95-100%'\n\nI'd like to convert this in my select where clause to just the fir... |
I'm developing some cross platform software targeting Mono under Visual Studio and would like to be able to build the installers for Windows and Linux (Ubuntu specifically) with a single button click. I figure I could do it by calling cygwin from a post-build event, but I was hoping for at best a Visual Studio plugin o... | Creating a cross-platform installer for your Mono application in Visual Studio can indeed be streamlined. Below are some suggestions on how you can achieve this with a single button click, including options for both Windows and Ubuntu.
### Option 1: MSBuild Custom Target
You can create a custom MSBuild target in your... | 264 | [
{
"from": "human",
"value": "I'm developing some cross platform software targeting Mono under Visual Studio and would like to be able to build the installers for Windows and Linux (Ubuntu specifically) with a single button click. I figure I could do it by calling cygwin from a post-build event, but I was ho... |
Has anyone used Mono, the open source .NET implementation on a large or medium sized project? I'm wondering if it's ready for real world, production environments. Is it stable, fast, compatible, ... enough to use? Does it take a lot of effort to port projects to the Mono runtime, or is it really, really compatible enou... | Mono, the open-source implementation of the .NET framework, has been used in a variety of large and medium-sized projects successfully. Here are some key points to consider when assessing its readiness for production environments:
### Stability and Performance
1. **Stability**: Mono has been around for many years, and... | 606 | [
{
"from": "human",
"value": "Has anyone used Mono, the open source .NET implementation on a large or medium sized project? I'm wondering if it's ready for real world, production environments. Is it stable, fast, compatible, ... enough to use? Does it take a lot of effort to port projects to the Mono runtime... |
Of course I am aware of Ajax, but the problem with Ajax is that the browser should poll the server frequently to find whether there is new data. This increases server load.
Is there any better method (even using Ajax) other than polling the server frequently?
| Yes, there are several methods to update web applications with new data from the server without resorting to frequent polling, thus reducing server load. Here are a few techniques that can be used alongside or instead of Ajax polling:
1. **WebSockets**:
- WebSockets provide a full-duplex communication channel over ... | 1,863 | [
{
"from": "human",
"value": "Of course I am aware of Ajax, but the problem with Ajax is that the browser should poll the server frequently to find whether there is new data. This increases server load.\nIs there any better method (even using Ajax) other than polling the server frequently?\n"
},
{
"f... |
So, in your experience, whats the best way? Is there a secure way that's also scriptable/triggerable in a build automation tool?
Edit: I should mention this is windows/.net and I'll be deploying to iis6
| When deploying to IIS6 in a Windows/.NET environment, it's important to consider both security and automation. Here are some best practices that are both secure and can be integrated with build automation tools:
### 1. **Use Secure Credential Management**
#### Options for Secure Credential Storage:
- **Windows Creden... | 335 | [
{
"from": "human",
"value": "So, in your experience, whats the best way? Is there a secure way that's also scriptable/triggerable in a build automation tool?\nEdit: I should mention this is windows/.net and I'll be deploying to iis6\n"
},
{
"from": "gpt",
"value": "When deploying to IIS6 in a Wi... |
I have a small utility that I use to download an MP3 file from a website on a schedule and then builds/updates a podcast XML file which I've added to iTunes.
The text processing that creates/updates the XML file is written in Python. However, I use wget inside a Windows .bat file to download the actual MP3 file. I woul... | You can download files in Python using several libraries, with `requests` being one of the most popular and user-friendly options. Below, I'll provide you with an example of how to download an MP3 file using the `requests` library, as well as how to handle exceptions to ensure your utility is robust.
### Step 1: Insta... | 898 | [
{
"from": "human",
"value": "I have a small utility that I use to download an MP3 file from a website on a schedule and then builds/updates a podcast XML file which I've added to iTunes.\nThe text processing that creates/updates the XML file is written in Python. However, I use wget inside a Windows .bat fi... |
For example I have a situation where I have something like this (contrived) example:
<div id="outer" style="margin: auto>
<div id="inner1" style="float: left">content</div>
<div id="inner2" style="float: left">content</div>
<div id="inner3" style="float: left">content</div>
<br style="clear: both"/>
</d... | To troubleshoot the issue of why `#inner3` is wrapping to the next line instead of appearing next to `#inner1` and `#inner2`, you can follow these steps:
1. **Check Element Widths**: Since you haven't set specific widths on any of the elements, it's important to understand that the total width of `#outer` and the widt... | 97 | [
{
"from": "human",
"value": "For example I have a situation where I have something like this (contrived) example:\n<div id=\"outer\" style=\"margin: auto>\n <div id=\"inner1\" style=\"float: left\">content</div>\n <div id=\"inner2\" style=\"float: left\">content</div>\n <div id=\"inner3\" style=\"f... |
Has anyone got a working solution without some Java/COM-bridge? E.g. process the Email as a file (.msg) rather than locating the data that is referenced in the Clipboard?
| Yes, there are solutions to process .msg files directly without using a Java/COM bridge. Here are a few approaches you can consider:
### 1. **Using Python with `extract-msg` library:**
Python has libraries specifically designed to read .msg files. You can use the `extract-msg` library to extract information from .msg ... | 1,002 | [
{
"from": "human",
"value": "Has anyone got a working solution without some Java/COM-bridge? E.g. process the Email as a file (.msg) rather than locating the data that is referenced in the Clipboard?\n"
},
{
"from": "gpt",
"value": "Yes, there are solutions to process .msg files directly without... |
We've been working on an application that quite heavily relies on VirtualPathProviders in ASP.NET.
We've just come to put the thing on a live server to demonstrate it and it appears that the VirtualPathProviders simply don't work when the site is pre-compiled!!
I've been looking at the workaround which has been posted ... | The issue you're facing with `VirtualPathProvider` in pre-compiled ASP.NET applications is a known limitation, especially in versions before .NET 3.5. When you pre-compile your application, certain aspects of how ASP.NET handles file paths and resources change, leading to unexpected behavior with `VirtualPathProvider`.... | 976 | [
{
"from": "human",
"value": "We've been working on an application that quite heavily relies on VirtualPathProviders in ASP.NET.\nWe've just come to put the thing on a live server to demonstrate it and it appears that the VirtualPathProviders simply don't work when the site is pre-compiled!!\nI've been looki... |
I am looking for a more technical explanation than the OS calls the function.
Is there a website or book?
| Certainly! If you're looking for a more technical understanding of how operating systems work at a deeper level, including system calls, memory management, process scheduling, and other fundamental concepts, there are several excellent resources you can explore:
### Books:
1. **"Operating System Concepts" by Abraham ... | 507 | [
{
"from": "human",
"value": "I am looking for a more technical explanation than the OS calls the function.\nIs there a website or book?\n"
},
{
"from": "gpt",
"value": "Certainly! If you're looking for a more technical understanding of how operating systems work at a deeper level, including syst... |
...instead of using the Atom syndication format?
Atom is a well-defined, general-purpose XML syndication format. RSS is fractured into four different versions. All the major feed readers have supported Atom for as long as I can remember, so why isn't its use more prevalent?
Worst of all are sites that provide feeds in ... | There are several reasons why Atom might not be as prevalent as RSS despite its technical advantages:
1. **Historical Adoption**: RSS has been around longer than Atom, leading to greater initial adoption among content creators and feed readers. Many early adopters stuck with RSS, creating a network effect that made it... | 1,725 | [
{
"from": "human",
"value": "...instead of using the Atom syndication format?\nAtom is a well-defined, general-purpose XML syndication format. RSS is fractured into four different versions. All the major feed readers have supported Atom for as long as I can remember, so why isn't its use more prevalent?\nWo... |
I can display and select a single file in windows explorer like this:
explorer.exe /select, "c:\path\to\file.txt"
However, I can't work out how to select more than one file. None of the permutations of select I've tried work.
Note: I looked at these pages for docs, neither helped.
https://support.microsoft.com/kb/3148... | Unfortunately, the Windows `explorer.exe /select` command does not support selecting multiple files in a single command. The `/select` option is designed to open Windows Explorer and highlight only one file at a time.
However, you can achieve the effect of selecting multiple files programmatically by using a workarou... | 1,192 | [
{
"from": "human",
"value": "I can display and select a single file in windows explorer like this:\nexplorer.exe /select, \"c:\\path\\to\\file.txt\"\n\nHowever, I can't work out how to select more than one file. None of the permutations of select I've tried work.\nNote: I looked at these pages for docs, nei... |
If I use assert() and the assertion fails then assert() will call abort(), ending the running program abruptly. I can't afford that in my production code. Is there a way to assert in runtime yet be able to catch failed assertions so I have the chance to handle them gracefully?
| Yes, you can achieve runtime assertions while being able to handle assertion failures gracefully by implementing a custom assertion mechanism instead of relying on the standard `assert()` macro, which calls `abort()` when an assertion fails. Here are a couple of approaches to do this:
### 1. Custom Assertion Function
... | 1,397 | [
{
"from": "human",
"value": "If I use assert() and the assertion fails then assert() will call abort(), ending the running program abruptly. I can't afford that in my production code. Is there a way to assert in runtime yet be able to catch failed assertions so I have the chance to handle them gracefully?... |
How do I delete untracked local files from the current working tree?
| To delete untracked local files from your current working directory in a Git repository, you can use the following command:
```bash
git clean -f
```
This command will remove all untracked files in the current directory.
### Additional Options:
1. **Dry Run**: If you want to see what files would be deleted without a... | 2,923 | [
{
"from": "human",
"value": "How do I delete untracked local files from the current working tree?\n"
},
{
"from": "gpt",
"value": "To delete untracked local files from your current working directory in a Git repository, you can use the following command:\n\n```bash\ngit clean -f\n```\n\nThis com... |
We have a service that has some settings that are supported only over net.tcp. What's the best way to add another endpoint? Do I need to create an entire new host?
| To add an additional endpoint to a service that is already using `net.tcp`, you don't necessarily need to create an entirely new host. Instead, you can configure your existing service to support multiple endpoints. Here are the steps to do that:
1. **Update Service Configuration**: Modify the configuration file of you... | 1,294 | [
{
"from": "human",
"value": "We have a service that has some settings that are supported only over net.tcp. What's the best way to add another endpoint? Do I need to create an entire new host?\n"
},
{
"from": "gpt",
"value": "To add an additional endpoint to a service that is already using `net.... |
I can set the PHP include path in the php.ini:
include_path = /path/to/site/includes/
But then other websites are affected so that is no good.
I can set the PHP include in the start of every file:
$path = '/path/to/site/includes/';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
But that seems like bad... | Yes, there are several ways to manage includes in PHP without cluttering your files or relying on relative paths that can break depending on the file structure. Here are some strategies:
### 1. Use Absolute Paths
You can define a constant for your base directory in a configuration file and use it throughout your appl... | 1,287 | [
{
"from": "human",
"value": "I can set the PHP include path in the php.ini:\ninclude_path = /path/to/site/includes/\n\nBut then other websites are affected so that is no good.\nI can set the PHP include in the start of every file:\n$path = '/path/to/site/includes/';\nset_include_path(get_include_path() . PA... |
I have an XML object (loaded using XMLHTTPRequest's responseXML). I have modified the object (using jQuery) and would like to store it as text in a string.
There is apparently a simple way to do it in Firefox et al:
var xmlString = new XMLSerializer().serializeToString( doc );
(from rosettacode )
But how does one do ... | To serialize an XML document to a string in a cross-browser way, including support for IE6, you can use a combination of the `XMLSerializer` and conditional checks to handle the different approaches needed for different browsers.
Here's a function that you can use to serialize your XML object, which works across mode... | 1,708 | [
{
"from": "human",
"value": "I have an XML object (loaded using XMLHTTPRequest's responseXML). I have modified the object (using jQuery) and would like to store it as text in a string.\nThere is apparently a simple way to do it in Firefox et al:\nvar xmlString = new XMLSerializer().serializeToString( doc )... |
Ok, I asked a question earlier about Flex and ADO.NET Data Services but didn't get much response so I thought I'd rephrase. Does anyone have any experience building Adobe Flex applications with a .NET back-end? If so, what architecture did you use and what third-party tools if any did you employ. I've read a little ... | Building Adobe Flex applications with a .NET backend can be quite rewarding, and there are several architectures and tools you can use. Here are some options and considerations:
### Architecture Options
1. **Web Services (WCF or ASMX)**:
- **WCF (Windows Communication Foundation)**: This is a robust framework that... | 1,231 | [
{
"from": "human",
"value": "Ok, I asked a question earlier about Flex and ADO.NET Data Services but didn't get much response so I thought I'd rephrase. Does anyone have any experience building Adobe Flex applications with a .NET back-end? If so, what architecture did you use and what third-party tools if... |
Some web applications, like Google Docs, store data generated by the users. Data that can only be read by its owner. Or maybe not?
As far as I know, this data is stored as is in a remote database. So, if anybody with enough privileges in the remote system (a sysadmin, for instance) can lurk my data, my privacy could ge... | Storing user-generated data securely in a remote database while ensuring that only the data owner can decrypt it is a critical aspect of protecting user privacy in web applications. Here’s a broad outline of how to achieve this using encryption and best practices:
### Solution Overview
1. **Client-Side Encryption**: ... | 766 | [
{
"from": "human",
"value": "Some web applications, like Google Docs, store data generated by the users. Data that can only be read by its owner. Or maybe not?\nAs far as I know, this data is stored as is in a remote database. So, if anybody with enough privileges in the remote system (a sysadmin, for insta... |
Having worked with Classic ASP for about 2 years now by creating a few 100 simple web forms I can't see a good reason for switching to .net; however, I'm not that versed in .net so I'm sure I could be missing a few things.
Some points that I often hear around work can be found here: http://www.packtpub.com/article/Clas... | It's great to hear about your experience with Classic ASP! While it can be a very effective platform for building web applications, there are several compelling reasons to consider transitioning to ASP.NET or a newer framework. Here are some key points to consider:
1. **Modern Development Practices**: ASP.NET promotes... | 1,563 | [
{
"from": "human",
"value": "Having worked with Classic ASP for about 2 years now by creating a few 100 simple web forms I can't see a good reason for switching to .net; however, I'm not that versed in .net so I'm sure I could be missing a few things.\nSome points that I often hear around work can be found ... |
I've been strictly in a C++ environment for years (and specialized statistical languages). Visual Studio until 2001, and Borland since. Mostly specialized desktop applications for clients.
I'm not remaining willfully ignorant of it, but over the years when I've dipped into other things, I've spent my time playing arou... | You're correct in your understanding of the relationship between C# and ASP.NET. Here’s a breakdown:
### 1. **C# and ASP.NET**
- **C#**: This is a modern, object-oriented programming language developed by Microsoft. It shares similarities with other languages you may know, such as Java and C++. It’s the primary langua... | 1,612 | [
{
"from": "human",
"value": "I've been strictly in a C++ environment for years (and specialized statistical languages). Visual Studio until 2001, and Borland since. Mostly specialized desktop applications for clients. \nI'm not remaining willfully ignorant of it, but over the years when I've dipped into oth... |
I have a table of tags and want to get the highest count tags from the list.
Sample data looks like this
id (1) tag ('night')
id (2) tag ('awesome')
id (3) tag ('night')
using
SELECT COUNT(*), `Tag` from `images-tags`
GROUP BY `Tag`
gets me back the data I'm looking for perfectly. However, I would like to organize it... | The error you're encountering, "Invalid use of group function - ErrNr 1111", usually occurs because of a syntax issue in the query. However, the SQL you've provided looks correct for the functionality you described. It's possible that the issue is stemming from the way the `COUNT` function is being used in your version... | 1,573 | [
{
"from": "human",
"value": "I have a table of tags and want to get the highest count tags from the list.\nSample data looks like this\nid (1) tag ('night')\nid (2) tag ('awesome')\nid (3) tag ('night')\n\nusing\nSELECT COUNT(*), `Tag` from `images-tags`\nGROUP BY `Tag`\n\ngets me back the data I'm looking ... |
I'm experimenting with Linq and am having trouble figuring out grouping. I've gone through several tutorials but for some reason can't figure this out.
As an example, say I have a table (SiteStats) with multiple website IDs that stores a count of how many visitors by type have accessed each site in total and for the pa... | In your LINQ query, it looks like you're on the right track, but you need to properly perform the aggregation within your `select` statement to get the `SUM` of the `Last30` column. You can achieve this by using the `Sum` method after grouping the records. Here's how you can rewrite your LINQ query to get the desired r... | 2,299 | [
{
"from": "human",
"value": "I'm experimenting with Linq and am having trouble figuring out grouping. I've gone through several tutorials but for some reason can't figure this out.\nAs an example, say I have a table (SiteStats) with multiple website IDs that stores a count of how many visitors by type have ... |
(assume php5) consider
<?php
$foo = 'some words';
//case 1
print "these are $foo";
//case 2
print "these are {$foo}";
//case 3
print 'these are ' . $foo;
?>
Is there much of a difference between 1 and 2?
If not, what about between 1/2 and 3?
| In PHP, there are some subtle differences between the different cases of string interpolation you've provided.
1. **Case 1:**
```php
print "these are $foo";
```
In this case, `$foo` is being directly interpolated into the double-quoted string. This is a straightforward use of variable interpolation, and it... | 910 | [
{
"from": "human",
"value": "(assume php5) consider\n<?php\n\n $foo = 'some words';\n\n //case 1\n print \"these are $foo\";\n\n //case 2\n print \"these are {$foo}\";\n\n //case 3\n print 'these are ' . $foo;\n?>\n\nIs there much of a difference between 1 and 2?\nIf not, what about bet... |
I've seen references to curried functions in several articles and blogs but I can't find a good explanation (or at least one that makes sense!)
| Curried functions are a concept from functional programming that involves transforming a function that takes multiple arguments into a sequence of functions that each take a single argument. This allows you to partially apply arguments, making it easier to create more specialized functions from a general one.
### Expl... | 1,112 | [
{
"from": "human",
"value": "I've seen references to curried functions in several articles and blogs but I can't find a good explanation (or at least one that makes sense!)\n"
},
{
"from": "gpt",
"value": "Curried functions are a concept from functional programming that involves transforming a f... |
After lots of attempts and search I have never found a satisfactory way to do it with CSS2.
A simple way to accomplish it is to wrap it into a handy <table> as shown in the sample below. Do you know how to do it avoiding table layouts and also avoiding quirky tricks?
table {
margin: 0 auto;
}
<table>
<tr>
<td... | If you're looking to center text with line breaks in a block-level element without using a `<table>`, you can achieve this using CSS with a `<div>` or other block-level elements. The key is to use `text-align: center;` on the parent element and ensure that the parent element is a block element itself.
Here's an exampl... | 1,434 | [
{
"from": "human",
"value": "After lots of attempts and search I have never found a satisfactory way to do it with CSS2.\nA simple way to accomplish it is to wrap it into a handy <table> as shown in the sample below. Do you know how to do it avoiding table layouts and also avoiding quirky tricks?\n\n\ntable... |
One of my co-workers checked in a some files in SVN and one of the files has a password in it. The password has been removed from the file and a new version checked in but the password is obviously still in the repository if we look at the revision history and go to that revision. (We're using TortoiseSVN as the client... | To securely delete a file from an SVN repository, you need to ensure that the file is removed not just from the latest revision but also from the revision history. This process involves a few steps, and you should proceed with caution, as it involves rewriting history, which can affect other users who may have checked ... | 1,550 | [
{
"from": "human",
"value": "One of my co-workers checked in a some files in SVN and one of the files has a password in it. The password has been removed from the file and a new version checked in but the password is obviously still in the repository if we look at the revision history and go to that revisio... |
How do you OCR an tiff file using Tesseract's interface in c#?
Currently I only know how to do it using the executable.
| To perform Optical Character Recognition (OCR) on a TIFF file using Tesseract in C#, you can utilize the Tesseract .NET wrapper, which allows you to interact with Tesseract directly from your C# code. Below are the steps to set it up and perform OCR on a TIFF file.
### Step 1: Set Up Your Project
1. **Create a New C#... | 732 | [
{
"from": "human",
"value": "How do you OCR an tiff file using Tesseract's interface in c#?\nCurrently I only know how to do it using the executable.\n"
},
{
"from": "gpt",
"value": "To perform Optical Character Recognition (OCR) on a TIFF file using Tesseract in C#, you can utilize the Tesserac... |
How do you expose a LINQ query as an ASMX web service?
Usually, from the business tier, I can return a typed DataSet or a DataTable which can be serialized for transport over ASMX.
How can I do the same for a LINQ query?
Is there a way to populate a typed DataSet or a DataTable via a LINQ query?
public static MyDataT... | To expose a LINQ query as an ASMX web service, you can indeed populate a `DataSet` or `DataTable` using LINQ. Here's how to do it properly, considering that you want to execute a stored procedure and return the results as a `DataTable`.
### Using DataTable and LINQ
1. **Use `AsEnumerable`**: First, make sure that you... | 106 | [
{
"from": "human",
"value": "How do you expose a LINQ query as an ASMX web service?\n\nUsually, from the business tier, I can return a typed DataSet or a DataTable which can be serialized for transport over ASMX.\nHow can I do the same for a LINQ query? \nIs there a way to populate a typed DataSet or a Data... |
This is a follow on question to "How do I delete 1 file from a revision in SVN?" but because it probably has a very different answer and I believe that others would benefit from knowing the answer. (I don't know the answer yet.)
The previous question was answered and I discovered that it is not possible to remove a rev... | In Subversion (SVN), when you delete a file, the deletion is itself a commit, and the file's history is preserved in the repository. This means that while the file may no longer be present in the working directory or in the latest revision, you can still access its entire revision history, including its past contents.
... | 1,614 | [
{
"from": "human",
"value": "This is a follow on question to \"How do I delete 1 file from a revision in SVN?\" but because it probably has a very different answer and I believe that others would benefit from knowing the answer. (I don't know the answer yet.)\nThe previous question was answered and I discov... |
Navision is also known as Microsoft Dynamics NAV.
| Yes, that's correct! Navision, originally developed by a Danish company called Navision Software A/S, was acquired by Microsoft in 2002. After the acquisition, it was rebranded as Microsoft Dynamics NAV (Navision Attain was another name used for certain versions). Microsoft Dynamics NAV is an enterprise resource planni... | 3,257 | [
{
"from": "human",
"value": "Navision is also known as Microsoft Dynamics NAV.\n"
},
{
"from": "gpt",
"value": "Yes, that's correct! Navision, originally developed by a Danish company called Navision Software A/S, was acquired by Microsoft in 2002. After the acquisition, it was rebranded as Micr... |
When defining XSD you can either choose to define your types as nested types or global types (complexType).
I understand that global types are of much more use when it comes to morphism or reusing of elements.
However, if you have a big data model you would have to define for each level a global complexType and then... | The decision to use nested complex types versus global complex types in XML Schema Definition (XSD) largely depends on the specific requirements of your XML data model, including considerations related to maintainability, reuse, and clarity. Here are some scenarios and guidelines on when you might prefer one over the o... | 685 | [
{
"from": "human",
"value": "When defining XSD you can either choose to define your types as nested types or global types (complexType). \nI understand that global types are of much more use when it comes to morphism or reusing of elements. \nHowever, if you have a big data model you would have to define fo... |
The following PHP code snippet uses GD to resize a browser-uploaded PNG to 128x128. It works great, except that the transparent areas in the original image are being replaced with a solid color- black in my case.
Even though imagesavealpha is set, something isn't quite right.
What's the best way to preserve the transp... | To ensure that the transparency is preserved when resizing a PNG image using the GD library in PHP, you need to take a few additional steps. Specifically, you should enable transparency in the target image, fill it with a transparent color, and then use `imagesavealpha()` correctly. Here's how you can modify your code ... | 1,560 | [
{
"from": "human",
"value": "The following PHP code snippet uses GD to resize a browser-uploaded PNG to 128x128. It works great, except that the transparent areas in the original image are being replaced with a solid color- black in my case. \nEven though imagesavealpha is set, something isn't quite right.\... |
I have a project group that contains a project I'm working on as well as some related component and packages. I prefer to keep the database links active during design-time.
I know how to write the code which would change the database file location, but in this case, I'm just using ".\data" instead, for various design-... | In Delphi, the information about the current working directory during design-time is primarily based on the path where the project file (.dproj or .dpr) is located. However, if you want to change this behavior without having to use the "Save As" feature or adjusting the working directory each time, you can set the work... | 1,259 | [
{
"from": "human",
"value": "I have a project group that contains a project I'm working on as well as some related component and packages. I prefer to keep the database links active during design-time. \nI know how to write the code which would change the database file location, but in this case, I'm just u... |
Basically what I want to do it this: a pdb file contains a location of source files (e.g. C:\dev\proj1\helloworld.cs). Is it possible to modify that pdb file so that it contains a different location (e.g. \more\differenter\location\proj1\helloworld.cs)?
| Yes, it is possible to modify a PDB (Program Database) file to change the source file paths, but it requires specific tools and processes. PDB files are used by debuggers to store debugging information about a program, including the source file paths.
### Tools
1. **Debugging Tools for Windows (WinDbg)**: This is a p... | 1,499 | [
{
"from": "human",
"value": "Basically what I want to do it this: a pdb file contains a location of source files (e.g. C:\\dev\\proj1\\helloworld.cs). Is it possible to modify that pdb file so that it contains a different location (e.g. \\more\\differenter\\location\\proj1\\helloworld.cs)?\n"
},
{
"... |
How would I change the initial templates created by Xcode when creating a new Cocoa Class.
I am referring to the comments and class name created when using Xcode's new class wizard.
| To change the initial templates created by Xcode when you create a new Cocoa Class, you need to modify the built-in file templates that Xcode uses. Here’s how you can do this:
### Steps to Modify Xcode File Templates
1. **Locate the Xcode File Templates:**
- The file templates for Xcode are typically located in th... | 1,204 | [
{
"from": "human",
"value": "How would I change the initial templates created by Xcode when creating a new Cocoa Class.\nI am referring to the comments and class name created when using Xcode's new class wizard.\n"
},
{
"from": "gpt",
"value": "To change the initial templates created by Xcode wh... |
I have an information retrieval application that creates bit arrays on the order of 10s of million bits. The number of "set" bits in the array varies widely, from all clear to all set. Currently, I'm using a straight-forward bit array (java.util.BitSet), so each of my bit arrays takes several megabytes.
My plan is to l... | Based on your requirements and constraints, here are some data structures you can consider for your bit arrays based on their sparsity:
### 1. Sparse Bit Arrays (Few Set Bits)
For cases where you have a sparse array (where only a small percentage of bits are set):
#### a. **Array of Integers / Longs**
You could use a... | 181 | [
{
"from": "human",
"value": "I have an information retrieval application that creates bit arrays on the order of 10s of million bits. The number of \"set\" bits in the array varies widely, from all clear to all set. Currently, I'm using a straight-forward bit array (java.util.BitSet), so each of my bit arra... |
I using SharePoint Designer to create a workflow. I'm trying to get at a sub-folder in a document library in the "Define Workflow Lookup" dialog. There are two issues with this:
I can't look up items by URL Path. If I look up by Title, I can
output the URL Path, but selecting by path doesn't work. What
fields can/ca... | When working with SharePoint Designer to create workflows that interact with items in a document library, you may encounter some limitations, especially regarding the ability to access sub-folders and specific fields.
### Issues Encountered
1. **Field Lookups:**
- The ability to look up items in workflows is often... | 309 | [
{
"from": "human",
"value": "I using SharePoint Designer to create a workflow. I'm trying to get at a sub-folder in a document library in the \"Define Workflow Lookup\" dialog. There are two issues with this:\n\nI can't look up items by URL Path. If I look up by Title, I can\noutput the URL Path, but selec... |
In emacs, I've read the following code snippet in simple.el:
(frame-parameter frame 'buried-buffer-list)
What is the exact meaning of the 'buried-buffer-list parameter?
What it is used for?
| In Emacs, the `buried-buffer-list` frame parameter is used to keep track of buffers that are not currently displayed in the selected frame. Specifically, it helps manage the list of "buried" buffers—those that exist in the Emacs environment but are not currently visible in the frame's window.
When a buffer is "buried... | 2,804 | [
{
"from": "human",
"value": "In emacs, I've read the following code snippet in simple.el:\n(frame-parameter frame 'buried-buffer-list)\n\nWhat is the exact meaning of the 'buried-buffer-list parameter? \nWhat it is used for?\n"
},
{
"from": "gpt",
"value": "In Emacs, the `buried-buffer-list` fra... |
I am trying to figure out what exactly is Appdomain recycling?
When a aspx page is requested for the first time from a DotNet application, i understand that an appdomain for that app is created, and required assemblies are loaded into that appdomain, and the request will be served.
Now, if the web.config file or the c... | AppDomain recycling in the context of ASP.NET applications refers to the process where the application domain (AppDomain) associated with an application is unloaded and then recreated. This typically occurs when certain conditions are met, such as modifications to the `web.config` file, changes in the contents of the `... | 1,822 | [
{
"from": "human",
"value": "I am trying to figure out what exactly is Appdomain recycling?\nWhen a aspx page is requested for the first time from a DotNet application, i understand that an appdomain for that app is created, and required assemblies are loaded into that appdomain, and the request will be ser... |
After reading the Head First Design Patterns book and using a number of other design patterns, I'm trying to understand the Observer pattern. Isn't this already implemented using Events in the .NET Framework?
| Yes, you're absolutely correct! The Observer pattern is indeed a fundamental design pattern that is widely used in software design, and in .NET, it's effectively implemented through events and delegates. Here's a deeper look at how this works:
### Observer Pattern Overview
The Observer pattern involves two main compo... | 1,151 | [
{
"from": "human",
"value": "After reading the Head First Design Patterns book and using a number of other design patterns, I'm trying to understand the Observer pattern. Isn't this already implemented using Events in the .NET Framework?\n"
},
{
"from": "gpt",
"value": "Yes, you're absolutely co... |
I have a simple webform that will allow unauthenticated users to input their information, including name. I gave the name field a limit of 50 characters to coincide with my database table where the field is varchar(50), but then I started to wonder.
Is it more appropriate to use something like the Text column type or s... | When deciding whether to use `varchar(50)` or `text` for a name field in SQL Server (or any database), you should consider several factors:
### 1. **Purpose and Usage of the Field**
- **Name Field Appropriateness**: For a name field, a limit of 50 characters is generally considered reasonable. Most names, including... | 995 | [
{
"from": "human",
"value": "I have a simple webform that will allow unauthenticated users to input their information, including name. I gave the name field a limit of 50 characters to coincide with my database table where the field is varchar(50), but then I started to wonder.\nIs it more appropriate to us... |
I am trying to do some string concatenation/formatting, but it's putting all the parameters into the first placeholder.
Code
function CreateAppPoolScript([string]$AppPoolName, [string]$AppPoolUser, [string]$AppPoolPass)
{
# Command to create an IIS application pool
$AppPoolScript = "cscript adsutil.vbs CREATE "... | It looks like the issue in your PowerShell script arises from the way you're using the double quotes in the strings for concatenation. In PowerShell, when using double quotes to define a string, the variables inside the string get evaluated, and it can lead to unintended behavior if the syntax isn't handled correctly.
... | 939 | [
{
"from": "human",
"value": "I am trying to do some string concatenation/formatting, but it's putting all the parameters into the first placeholder.\nCode\nfunction CreateAppPoolScript([string]$AppPoolName, [string]$AppPoolUser, [string]$AppPoolPass)\n{\n # Command to create an IIS application pool\n ... |
Given that my client code knows everything it needs to about the remoting object, what's the simplest way to connect to it?
This is what I'm doing at the moment:
ChannelServices.RegisterChannel(new HttpChannel(), false);
RemotingConfiguration.RegisterWellKnownServiceType(
typeof(IRemoteServer), "RemoteServer.rem",... | If you already have all the information required to connect to your remoting object, and your current implementation is working but feels a bit verbose, you can simplify the connection setup while retaining the necessary components.
In your case, since you've already registered the channel and well-known service type... | 1,890 | [
{
"from": "human",
"value": "Given that my client code knows everything it needs to about the remoting object, what's the simplest way to connect to it?\nThis is what I'm doing at the moment:\nChannelServices.RegisterChannel(new HttpChannel(), false);\n\nRemotingConfiguration.RegisterWellKnownServiceType(\n... |
I want to copy a file from A to B in C#. How do I do that?
| To copy a file from one location (A) to another (B) in C#, you can use the `System.IO.File` class, which provides methods for working with files. The `File.Copy` method is specifically designed for copying files.
Here's a simple example to demonstrate how to do this:
```csharp
using System;
using System.IO;
class Pr... | 1,810 | [
{
"from": "human",
"value": "I want to copy a file from A to B in C#. How do I do that?\n"
},
{
"from": "gpt",
"value": "To copy a file from one location (A) to another (B) in C#, you can use the `System.IO.File` class, which provides methods for working with files. The `File.Copy` method is spe... |
Is there a way to make S3 default to an index.html page? E.g.: My bucket object listing:
/index.html
/favicon.ico
/images/logo.gif
A call to www.example.com/index.html works great! But if one were to call www.example.com/ we'd either get a 403 or a REST object listing XML document depending on how bucket-level ACL w... | Yes, you can configure Amazon S3 to serve a default `index.html` page when someone accesses the root URL of your S3 bucket (e.g., `www.example.com/`). This is typically done by setting up the S3 bucket as a static website and specifying `index.html` as the index document. Here’s how to do that:
### Steps to Configure ... | 1,285 | [
{
"from": "human",
"value": "Is there a way to make S3 default to an index.html page? E.g.: My bucket object listing:\n/index.html\n/favicon.ico\n/images/logo.gif\n\nA call to www.example.com/index.html works great! But if one were to call www.example.com/ we'd either get a 403 or a REST object listing XM... |
I experience that on several different machines, with plugins, without plugins, with VB.net or c# solutions of many different sizes, closing the solution in VS 2005 generally takes significantly more time than actually building the solution.
This has always been the case for me since I started using Visual Studio 2005,... | The slow closing of Visual Studio 2005 can be attributed to several factors related to how the IDE manages resources and processes when shutting down. Here are some of the common reasons and potential ways to address them:
### 1. **Solution and Project Cleanup:**
- Visual Studio performs cleanup tasks when you clos... | 1,734 | [
{
"from": "human",
"value": "I experience that on several different machines, with plugins, without plugins, with VB.net or c# solutions of many different sizes, closing the solution in VS 2005 generally takes significantly more time than actually building the solution.\nThis has always been the case for me... |
I switched to the dvorak keyboard layout about a year ago. I now use dvorak full-time at work and at home.
Recently, I went on vacation to Peru and found myself in quite a conundrum. Internet cafes were qwerty-only (and Spanish qwerty, at that). I was stuck with a hunt-and-peck routine that grew old fairly quickly.
Tha... | Yes, it is definitely possible to become "fluent" in both QWERTY and Dvorak layouts, but it requires some practice and commitment, especially if you've been using Dvorak exclusively for a long time. Here are a few tips to help you navigate both layouts effectively:
1. **Practice Switching**: Spend some time practicing... | 2,020 | [
{
"from": "human",
"value": "I switched to the dvorak keyboard layout about a year ago. I now use dvorak full-time at work and at home.\nRecently, I went on vacation to Peru and found myself in quite a conundrum. Internet cafes were qwerty-only (and Spanish qwerty, at that). I was stuck with a hunt-and-peck... |
Is it possible to remote-debug a Visual C++ 6.0 application running on a Windows NT machine from a developer workstation running Windows XP?
If so, what is the procedure for doing so?
| Yes, it is possible to remote-debug a Visual C++ 6.0 application running on a Windows NT machine from a developer workstation running Windows XP, but it can be a bit challenging due to the age of Visual C++ 6.0 and the differences between Windows NT and Windows XP. Here’s a general outline of the procedure you might fo... | 119 | [
{
"from": "human",
"value": "Is it possible to remote-debug a Visual C++ 6.0 application running on a Windows NT machine from a developer workstation running Windows XP?\nIf so, what is the procedure for doing so?\n"
},
{
"from": "gpt",
"value": "Yes, it is possible to remote-debug a Visual C++ ... |
My website was recently attacked by, what seemed to me as, an innocent code:
<?php
if ( isset( $ _GET['page'] ) ) {
include( $ _GET['page'] . ".php" );
} else {
include("home.php");
}
?>
There where no SQL calls, so I wasn't afraid for SQL Injection. But, apparently, SQL isn't the only kind of injection.... | The code you've shared is indeed vulnerable to a type of code injection known as "PHP File Inclusion" (specifically Local File Inclusion or LFI). By manipulating the `$_GET['page']` parameter, an attacker can potentially include any file on the server, including sensitive files or system files.
To protect this code fr... | 14 | [
{
"from": "human",
"value": "My website was recently attacked by, what seemed to me as, an innocent code:\n<?php\n if ( isset( $ _GET['page'] ) ) {\n include( $ _GET['page'] . \".php\" );\n } else {\n include(\"home.php\");\n }\n?>\n\nThere where no SQL calls, so I wasn't afraid for SQL Injection. ... |
Sometimes when I'm editing page or control the .designer files stop being updated with the new controls I'm putting on the page. I'm not sure what's causing this to happen, but I'm wondering if there's any way of forcing Visual Studio to regenerate the .designer file. I'm using Visual Studio 2008
EDIT: Sorry I should... | When working with Visual Studio 2008 and encountering issues with the `.designer` files not updating, there are several steps you can take to try to regenerate them. Since you've already tried some common fixes, here are additional methods you can consider:
1. **Check for Errors**: Ensure there are no compilation erro... | 1,735 | [
{
"from": "human",
"value": "Sometimes when I'm editing page or control the .designer files stop being updated with the new controls I'm putting on the page. I'm not sure what's causing this to happen, but I'm wondering if there's any way of forcing Visual Studio to regenerate the .designer file. I'm usin... |
I seem to be missing something about LINQ. To me, it looks like it's taking some of the elements of SQL that I like the least and moving them into the C# language and using them for other things.
I mean, I could see the benefit of using SQL-like statements on things other than databases. But if I wanted to write SQL,... | You raise an interesting point about LINQ (Language Integrated Query) and its design philosophy. It can seem a bit redundant or even frustrating if you prefer the traditional SQL syntax for working with databases. However, there are several key benefits and advantages to using LINQ that may help clarify its purpose and... | 654 | [
{
"from": "human",
"value": "I seem to be missing something about LINQ. To me, it looks like it's taking some of the elements of SQL that I like the least and moving them into the C# language and using them for other things.\nI mean, I could see the benefit of using SQL-like statements on things other than... |
You can use more than one css class in an HTML tag in current web browsers, e.g.:
<div class="style1 style2 style3">foo bar</div>
This hasn't always worked; with which versions did the major browsers begin correctly supporting this feature?
| Using multiple CSS classes in an HTML tag has been supported by all major browsers since the early versions of CSS. The ability to assign multiple classes to an element is defined in the HTML specification, and this feature has been available since HTML 4.01 and is fully compliant with XHTML and HTML5.
Here’s a brief ... | 2,756 | [
{
"from": "human",
"value": "You can use more than one css class in an HTML tag in current web browsers, e.g.:\n<div class=\"style1 style2 style3\">foo bar</div>\n\nThis hasn't always worked; with which versions did the major browsers begin correctly supporting this feature?\n"
},
{
"from": "gpt",
... |
I have an application which really should be installed, but does work fine when deployed using JNLP.
However, it would seem that some Java functions such as Runtime.exec don't work using the default security options.
I would like to therefore disable UI functionality that relies upon such functions.
So my question is... | To determine whether certain Java functions, such as `Runtime.exec`, are available at runtime, you can use reflection. This method allows you to check if a particular method can be accessed and executed within the security context of your application.
Here's a way to do that for `Runtime.exec`:
### Step 1: Reflectio... | 1,600 | [
{
"from": "human",
"value": "I have an application which really should be installed, but does work fine when deployed using JNLP.\nHowever, it would seem that some Java functions such as Runtime.exec don't work using the default security options.\nI would like to therefore disable UI functionality that reli... |
I shudder to ask, but my client might offer no other SQL (or SQL-like) solution. I know Access has some SQL hooks; are they enough for basic ActiveRecord?
Later:
I appreciate all the suggestions to use other databases, but trust me: I've tried convincing them. There is an "approved" list, and no SQL databases are on ... | Microsoft Access does support a subset of SQL, allowing for basic operations that you can leverage with ActiveRecord to some extent. However, you should be aware of the limitations and differences compared to more robust SQL databases.
### ActiveRecord with Access
1. **Database Adapter**: You'll need a suitable Activ... | 1,926 | [
{
"from": "human",
"value": "I shudder to ask, but my client might offer no other SQL (or SQL-like) solution. I know Access has some SQL hooks; are they enough for basic ActiveRecord?\nLater:\nI appreciate all the suggestions to use other databases, but trust me: I've tried convincing them. There is an \"... |
What's the general consensus on supporting Windows 2000 for software distribution? Are people supporting Windows XP SP2+ for new software development or is this too restrictive still?
| As of 2023, supporting Windows 2000 for software distribution is generally not recommended. Microsoft officially ended support for Windows 2000 in July 2010, meaning that there are no security updates or technical support available for that operating system. The user base for Windows 2000 has dwindled significantly, ma... | 2,862 | [
{
"from": "human",
"value": "What's the general consensus on supporting Windows 2000 for software distribution? Are people supporting Windows XP SP2+ for new software development or is this too restrictive still?\n"
},
{
"from": "gpt",
"value": "As of 2023, supporting Windows 2000 for software d... |
If I create an HTTP java.net.URL and then call openConnection() on it, does it necessarily imply that an HTTP post is going to happen? I know that openStream() implies a GET. If so, how do you perform one of the other HTTP verbs without having to work with the raw socket layer?
| When you create a `java.net.URL` and call `openConnection()` on it, it does not necessarily imply that an HTTP POST is going to happen. The `openConnection()` method creates a `URLConnection` object, which can be used to configure different types of HTTP requests, including GET, POST, PUT, DELETE, etc. The default beha... | 477 | [
{
"from": "human",
"value": "If I create an HTTP java.net.URL and then call openConnection() on it, does it necessarily imply that an HTTP post is going to happen? I know that openStream() implies a GET. If so, how do you perform one of the other HTTP verbs without having to work with the raw socket layer... |
I'm looking for an online solution for generating .ICO files. I'd like the ICO files to have the ability to have transparency as well.
What software or web site do you use to create them?
[Update]
To clarify, I have an existing image in PNG format, 32 x 32 pixels. I want to generate the icon from this existing file, ... | There are several online tools that you can use to convert your existing PNG file into an ICO file with transparency support. Here are some recommended options:
1. **ConvertICO**:
- Website: [convertico.com](https://www.convertico.com)
- This tool allows you to upload your PNG file and convert it to ICO format w... | 2,106 | [
{
"from": "human",
"value": "I'm looking for an online solution for generating .ICO files. I'd like the ICO files to have the ability to have transparency as well.\nWhat software or web site do you use to create them?\n[Update]\nTo clarify, I have an existing image in PNG format, 32 x 32 pixels. I want to... |
I would like to use something like CLR Profiles on .Net 2.0 to see what objects are taking more space in the heap at any given time (of an ASP.Net worker process).
However, the CLR Profiler only lets me START an app, not attach to an existing one. I assume this is because it tracks allocations and GC too, but i'm not v... | While CLR Profiler does not allow you to attach to an already running process, you have several options available for inspecting the heap of an ASP.NET worker process and getting information on the types of objects and their memory usage. Here are a few methods you can consider:
### 1. **Debug Diagnostic Tool (DebugDi... | 1,205 | [
{
"from": "human",
"value": "I would like to use something like CLR Profiles on .Net 2.0 to see what objects are taking more space in the heap at any given time (of an ASP.Net worker process).\nHowever, the CLR Profiler only lets me START an app, not attach to an existing one. I assume this is because it tr... |
We've implemented a CollectionConstraint for Nunit in version 2.4.3 in C#. Some of our developers have already upgraded to version 2.4.7 though, and they get project creation errors when compiling. The error is
doMatch: no suitable method found to override
Any advice on how to get this constraint so it compiles ve... | The error you're encountering, `doMatch: no suitable method found to override`, typically indicates that there has been a change in the method signatures or the class structure in the newer version of NUnit. Since NUnit 2.4.7 introduces changes that affect how custom constraints should be implemented or inherited, you ... | 2,125 | [
{
"from": "human",
"value": "We've implemented a CollectionConstraint for Nunit in version 2.4.3 in C#. Some of our developers have already upgraded to version 2.4.7 though, and they get project creation errors when compiling. The error is \n\ndoMatch: no suitable method found to override\n\nAny advice on... |
So I was listening to the latest Stackoverflow podcast (episode 19), and Jeff and Joel talked a bit about scaling server hardware as a website grows. From what Joel was saying, the first few steps are pretty standard:
One server running both the webserver and the database (the current Stackoverflow setup)
One webserv... | After reaching the initial stages of scaling that Jeff and Joel discussed, a web startup needs to consider several strategies to continue growing and handling increased traffic. Here's a breakdown of common approaches:
1. **Horizontal Scaling of Web Servers**: Once you have load-balanced web servers, the most straight... | 1,491 | [
{
"from": "human",
"value": "So I was listening to the latest Stackoverflow podcast (episode 19), and Jeff and Joel talked a bit about scaling server hardware as a website grows. From what Joel was saying, the first few steps are pretty standard:\n\nOne server running both the webserver and the database (t... |
Is there a way to call out from a TSQL stored procedure or function to a webservice?
| In T-SQL, you cannot directly call web services from a stored procedure or function. However, there are several ways to achieve this by using SQL Server features or external applications. Here are a few common approaches:
### 1. **Using CLR Integration**
You can create a SQL Server CLR (Common Language Runtime) stored... | 358 | [
{
"from": "human",
"value": "Is there a way to call out from a TSQL stored procedure or function to a webservice?\n"
},
{
"from": "gpt",
"value": "In T-SQL, you cannot directly call web services from a stored procedure or function. However, there are several ways to achieve this by using SQL Ser... |
A client of mine has asked me to integrate a 3rd party API into their Rails app. The only problem is that the API uses SOAP. Ruby has basically dropped SOAP in favor of REST. They provide a Java adapter that apparently works with the Java-Ruby bridge, but we'd like to keep it all in Ruby, if possible. I looked into... | Integrating a SOAP API into a Rails application can be challenging due to the decline in support and popularity for SOAP in the Ruby ecosystem. However, there are still some viable options for handling SOAP requests in Ruby without resorting to Java or a Java-Ruby bridge. Here are a few approaches to consider:
### 1. ... | 1,364 | [
{
"from": "human",
"value": "A client of mine has asked me to integrate a 3rd party API into their Rails app. The only problem is that the API uses SOAP. Ruby has basically dropped SOAP in favor of REST. They provide a Java adapter that apparently works with the Java-Ruby bridge, but we'd like to keep it... |
Using PyObjC, you can use Python to write Cocoa applications for OS X. Can I write native iPhone apps using Python and if so, how?
| Yes, you can write native iPhone apps using Python, though it’s not as straightforward as using Swift or Objective-C, the primary languages for iOS development. While PyObjC is specifically tailored for macOS applications, there are other frameworks that allow you to develop iOS applications using Python. Here are a fe... | 1,017 | [
{
"from": "human",
"value": "Using PyObjC, you can use Python to write Cocoa applications for OS X. Can I write native iPhone apps using Python and if so, how?\n"
},
{
"from": "gpt",
"value": "Yes, you can write native iPhone apps using Python, though it’s not as straightforward as using Swift o... |
I understand that the Ruby 1.8 AST is traversed at runtime using a big switch statement, and many things like calling a method in a class or parent module involve the interpreter looking up and down the tree as it goes. Is there a straightforward way of accessing this AST in a Ruby C extension? Does it involve the Ruby... | Accessing the Ruby Abstract Syntax Tree (AST) directly in a Ruby C extension is not straightforward and typically involves interacting with internal data structures of the Ruby interpreter. In Ruby 1.8, the AST is not designed for external access, and the Ruby C extension API does not provide a stable or documented way... | 1,658 | [
{
"from": "human",
"value": "I understand that the Ruby 1.8 AST is traversed at runtime using a big switch statement, and many things like calling a method in a class or parent module involve the interpreter looking up and down the tree as it goes. Is there a straightforward way of accessing this AST in a R... |
I am working on a web application using Python (Django) and would like to know whether MySQL or PostgreSQL would be more suitable when deploying for production.
In one podcast Joel said that he had some problems with MySQL and the data wasn't consistent.
I would like to know whether someone had any such problems. Also ... | When it comes to choosing a database for a Django web application, both MySQL and PostgreSQL have their strengths and weaknesses. Here are some factors to consider when deciding which one is more suitable for your production deployment:
### 1. **Data Consistency and Integrity**
- **PostgreSQL** is often favored for it... | 353 | [
{
"from": "human",
"value": "I am working on a web application using Python (Django) and would like to know whether MySQL or PostgreSQL would be more suitable when deploying for production.\nIn one podcast Joel said that he had some problems with MySQL and the data wasn't consistent.\nI would like to know w... |
I'd like to create a progress bar to indicate the status of an a batch job in Ruby.
I've read some tutorials / libraries on using (n)curses, none of which were particularly helpful in explaining how to create an "animated" progress bar in the terminal or using curses with Ruby.
I'm already aware of using a separate t... | It sounds like you've found a solution using the `ProgressBar` class, which is great! However, for others who might be looking to create an animated progress bar in Ruby, here’s a simple guide on how to do that using basic terminal output without (n)curses.
### Creating a Simple Animated Progress Bar in Ruby
You can ... | 115 | [
{
"from": "human",
"value": "I'd like to create a progress bar to indicate the status of an a batch job in Ruby. \nI've read some tutorials / libraries on using (n)curses, none of which were particularly helpful in explaining how to create an \"animated\" progress bar in the terminal or using curses with Ru... |
Is there a way to have a mutable static variable in F# class that is identical to a static variable in C# class ?
| In F#, you can achieve similar behavior to mutable static variables in C# by using a `static` member in a class that can be mutated. Here’s how you can do it:
In C#, a static variable can be declared as mutable and can be changed during the execution of the program. In F#, you can create a mutable static variable usin... | 1,813 | [
{
"from": "human",
"value": "Is there a way to have a mutable static variable in F# class that is identical to a static variable in C# class ? \n"
},
{
"from": "gpt",
"value": "In F#, you can achieve similar behavior to mutable static variables in C# by using a `static` member in a class that ca... |
I am writing a few extensions to mimic the map and reduce functions in Lisp.
public delegate R ReduceFunction<T,R>(T t, R previous);
public delegate void TransformFunction<T>(T t, params object[] args);
public static R Reduce<T,R>(this List<T> list, ReduceFunction<T,R> r, R initial)
{
var aggregate = initial;
... | Your implementation of the `Reduce` and `Transform` functions in C# is a good start towards mimicking the functionality of Lisp's map and reduce functions. However, there are a few potential improvements and clarifications that could enhance both usability and readability.
### Potential Improvements
1. **Use of `Acti... | 176 | [
{
"from": "human",
"value": "I am writing a few extensions to mimic the map and reduce functions in Lisp.\npublic delegate R ReduceFunction<T,R>(T t, R previous);\npublic delegate void TransformFunction<T>(T t, params object[] args);\n\npublic static R Reduce<T,R>(this List<T> list, ReduceFunction<T,R> r, R... |
Take the following string as an example:
"The quick brown fox"
Right now the q in quick is at index 4 of the string (starting at 0) and the f in fox is at index 16. Now lets say the user enters some more text into this string.
"The very quick dark brown fox"
Now the q is at index 9 and the f is at index 26.
What is... | To efficiently keep track of indices of specific characters in a string even as characters are added or removed, a combination of data structures and techniques can be employed. Here’s a general outline of how you could implement this in a language like Python, although the same principles could be applied in other lan... | 423 | [
{
"from": "human",
"value": "Take the following string as an example: \n\"The quick brown fox\" \nRight now the q in quick is at index 4 of the string (starting at 0) and the f in fox is at index 16. Now lets say the user enters some more text into this string.\n\"The very quick dark brown fox\"\nNow the ... |
I'm building a RESTful web service which has multiple URIs for one of its resources, because there is more than one unique identifier. Should the server respond to a GET request for an alternate URI by returning the resource, or should I send an HTTP 3xx redirect to the canonical URI? Is HTTP 303 (see also) the most ap... | When designing a RESTful web service, the handling of multiple URIs for a single resource can indeed present some challenges, especially with respect to how you want clients to interact with those resources.
In your case, since you have identified a "canonical" URI that is the most stable identifier for the resource,... | 776 | [
{
"from": "human",
"value": "I'm building a RESTful web service which has multiple URIs for one of its resources, because there is more than one unique identifier. Should the server respond to a GET request for an alternate URI by returning the resource, or should I send an HTTP 3xx redirect to the canonica... |
Recently, I've been dealing with an error with accessing MAPI via the .NET framework (as described in this article). I am now left with a series of memory access violation errors.
To get past the issues, I have been trying to use this 3rd party component, which has a Visual C++ core. Unfortunately - we are still having... | When you work with a C++ library (especially one compiled with Visual Studio 2005) in the context of a .NET application, it's important to understand how memory management works between the managed (.NET) environment and unmanaged (C++) environments.
1. **Managed vs Unmanaged Memory**: In .NET, memory management is ha... | 1,224 | [
{
"from": "human",
"value": "Recently, I've been dealing with an error with accessing MAPI via the .NET framework (as described in this article). I am now left with a series of memory access violation errors.\nTo get past the issues, I have been trying to use this 3rd party component, which has a Visual C++... |
I'm writing my first iPhone app, so I haven't gotten around to figuring out much in the way of debugging.
Essentially my app displays an image and when touched plays a short sound.
When compiling and building the project in XCode, everything builds successfully, but when the app is run in the iPhone simulator, it crash... | The `NSUnknownKeyException` you're encountering typically occurs when your app tries to access a property or outlet that doesn't exist in the class it's referencing. In your case, the error message indicates that there is an attempt to set a value for a key named `kramerImage`, but the class in question (`UIView`) does... | 1,215 | [
{
"from": "human",
"value": "I'm writing my first iPhone app, so I haven't gotten around to figuring out much in the way of debugging.\nEssentially my app displays an image and when touched plays a short sound.\nWhen compiling and building the project in XCode, everything builds successfully, but when the a... |
I'm trying to parse a grammar in ocamlyacc (pretty much the same as regular yacc) which supports function application with no operators (like in Ocaml or Haskell), and the normal assortment of binary and unary operators. I'm getting a reduce/reduce conflict with the '-' operator, which can be used both for subtraction ... | The conflict you're facing in your OCaml/Yacc grammar is indeed a common one, as the `-` operator can be ambiguous between binary subtraction and unary negation when used in expressions. In your current grammar, both subtraction and negation rules are defined with the same precedence and associativity, leading to a red... | 1,036 | [
{
"from": "human",
"value": "I'm trying to parse a grammar in ocamlyacc (pretty much the same as regular yacc) which supports function application with no operators (like in Ocaml or Haskell), and the normal assortment of binary and unary operators. I'm getting a reduce/reduce conflict with the '-' operator... |
I'm using the .NETCF (Windows Mobile) Graphics class and the DrawString() method to render a single character to the screen.
The problem is that I can't seem to get it centred properly. No matter what I set for the Y coordinate of the location of the string render, it always comes out lower than that and the larger the... | To properly center your text vertically within a specified rectangle when using the `Graphics.DrawString` method, you'll need to account for the height of the string itself, which can be different from the height of the rectangle you are drawing it in. The `DrawString` method does not automatically adjust the Y coordin... | 1,263 | [
{
"from": "human",
"value": "I'm using the .NETCF (Windows Mobile) Graphics class and the DrawString() method to render a single character to the screen.\nThe problem is that I can't seem to get it centred properly. No matter what I set for the Y coordinate of the location of the string render, it always co... |
Which features and services in Vista can you remove with nLite (or tool of choice) to make a Virtual PC-image of Vista as small as possible?
The VPC must work with development in Visual Studio.
A normal install of Vista today is like 12-14 GB, which is silly when I got it to work with Visual Studio at 4 GB. But with Vi... | Creating a minimal Virtual PC image of Windows Vista for development purposes can be achieved using tools like nLite, which allow you to customize and remove various features and services that are not necessary for your specific use case. Here are steps and suggestions for features and services you can consider removin... | 304 | [
{
"from": "human",
"value": "Which features and services in Vista can you remove with nLite (or tool of choice) to make a Virtual PC-image of Vista as small as possible?\nThe VPC must work with development in Visual Studio.\nA normal install of Vista today is like 12-14 GB, which is silly when I got it to w... |
I'm looking for a good method of generating an iCalendar file (*.ics) in c# (asp.net). I've found a couple resources, but one thing that has been lacking is their support for quoted-printable fields - fields that have carriage returns and line feeds.
For example, if the description field isn't encoded properly, only t... | Generating an iCalendar file (*.ics) in C# with proper support for quoted-printable encoding can be achieved by utilizing existing libraries or implementing some custom logic. Below are a couple of suggestions for libraries, as well as a brief example of how you might implement quoted-printable encoding yourself.
### ... | 692 | [
{
"from": "human",
"value": "I'm looking for a good method of generating an iCalendar file (*.ics) in c# (asp.net). I've found a couple resources, but one thing that has been lacking is their support for quoted-printable fields - fields that have carriage returns and line feeds.\nFor example, if the descri... |
I have been looking into IKVMing Apache's FOP project to use with our .NET app. It's a commercial product, and looking into licensing, IKVM runs into some sticky areas because of its use of GNU Classpath. From what I've seen, no one can say for sure if this stuff can be used in a commercial product. Has anyone used ... | Using IKVM with a commercial product can indeed raise some licensing concerns, especially when it involves code from multiple sources, each with its own licensing terms.
### Overview of IKVM Licensing
IKVM is an implementation of Java for the .NET Framework that enables Java libraries to be used within .NET applicati... | 808 | [
{
"from": "human",
"value": "I have been looking into IKVMing Apache's FOP project to use with our .NET app. It's a commercial product, and looking into licensing, IKVM runs into some sticky areas because of its use of GNU Classpath. From what I've seen, no one can say for sure if this stuff can be used i... |
I'm working on some code to paste into the currently active OpenOffice document directly from C#. I can't include any of the OpenOffice libraries, because we don't want to package them, so we're using reflection to get access to the OpenOffice API.
My question involves using a dispatcher through reflection. I can't f... | To resolve the `TargetInvocationException` you're encountering when trying to use reflection to call the `executeDispatch` method with the correct parameters, you need to ensure you're using the correct types for the parameters being passed to the method. The `executeDispatch` method in OpenOffice typically expects the... | 186 | [
{
"from": "human",
"value": "I'm working on some code to paste into the currently active OpenOffice document directly from C#. I can't include any of the OpenOffice libraries, because we don't want to package them, so we're using reflection to get access to the OpenOffice API.\nMy question involves using a... |
My goals are focused on software application development, and maybe web application development, but most likely desktop applications. I'm embarking on a path to becoming more familiar with C/C++, but should I go much lower than that, into assembly? Or would I not have a benefit for my long-term goals?
| Embarking on a journey to become proficient in software application development, especially in desktop applications, is a solid and rewarding goal. Learning C/C++ is a great choice, as these languages provide a strong foundation in systems programming, performance, and control over system resources.
As for learning as... | 1,497 | [
{
"from": "human",
"value": "My goals are focused on software application development, and maybe web application development, but most likely desktop applications. I'm embarking on a path to becoming more familiar with C/C++, but should I go much lower than that, into assembly? Or would I not have a benefit... |
Help! I have an Axis web service that is being consumed by a C# application. Everything works great, except that arrays of long values always come across as [0,0,0,0] - the right length, but the values aren't deserialized. I have tried with other primitives (ints, doubles) and the same thing happens. What do I do? ... | When dealing with Axis web services (which is a Java-based web service framework) and C# applications, you may encounter issues related to serialization and deserialization of certain data types. The problem you're experiencing—where arrays of long values or other primitives come across as `[0,0,0,0]`—is often due to a... | 86 | [
{
"from": "human",
"value": "Help! I have an Axis web service that is being consumed by a C# application. Everything works great, except that arrays of long values always come across as [0,0,0,0] - the right length, but the values aren't deserialized. I have tried with other primitives (ints, doubles) an... |
Is there a good way for displaying unicode text in opengl under Windows? For example, when you have to deal with different languages. The most common approach like
#define FONTLISTRANGE 128
GLuint list;
list = glGenLists(FONTLISTRANGE);
wglUseFontBitmapsW(hDC, 0, FONTLISTRANGE, list);
just won't do because you can't c... | Displaying Unicode text in OpenGL, especially when dealing with multiple languages, can be a bit complex since OpenGL itself does not have built-in support for text rendering or Unicode. Instead, a common approach is to use external libraries for text rendering. Below are some popular methods for rendering Unicode text... | 317 | [
{
"from": "human",
"value": "Is there a good way for displaying unicode text in opengl under Windows? For example, when you have to deal with different languages. The most common approach like\n#define FONTLISTRANGE 128\nGLuint list;\nlist = glGenLists(FONTLISTRANGE);\nwglUseFontBitmapsW(hDC, 0, FONTLISTRAN... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.