instruction stringlengths 14 27.6k | completion stringlengths 3 38.3k | __original_row_idx int64 0 50k | conversations listlengths 2 2 |
|---|---|---|---|
What is the main difference between int.Parse() and Convert.ToInt32()?
Which one is to be preferred
| The main difference between `int.Parse()` and `Convert.ToInt32()` lies in how they handle null values and invalid input.
### `int.Parse()`
- **Usage**: Parses a string representation of a number and converts it to its integer equivalent.
- **Behavior**:
- Throws an `ArgumentNullException` if the input string is `nu... | 28,982 | [
{
"from": "human",
"value": "\nWhat is the main difference between int.Parse() and Convert.ToInt32()?\nWhich one is to be preferred\n\n"
},
{
"from": "gpt",
"value": "The main difference between `int.Parse()` and `Convert.ToInt32()` lies in how they handle null values and invalid input.\n\n### `... |
I posted a similar question on how scalable linq is. There were so many different views on what scalability actually meant in some recent conversations, so it has sparked me to ask this question as well. What does scalability mean to you?
| Scalability is a fundamental concept in computing and system design that refers to the capability of a system, network, or process to handle a growing amount of work, or its potential to accommodate growth. Here are a few dimensions to consider when discussing scalability:
1. **Performance Scaling**: This refers to th... | 30,588 | [
{
"from": "human",
"value": "I posted a similar question on how scalable linq is. There were so many different views on what scalability actually meant in some recent conversations, so it has sparked me to ask this question as well. What does scalability mean to you?\n"
},
{
"from": "gpt",
"valu... |
I had a problem discovered on another thread here, I need to access a COM component that is STA. I'll run it on a dual-core computer, a process using this component only reaches 50% of CPU. Unfortunately, the owners said they can't change the component to MTA, because the component is a hybrid system compiled at Matlab... | When dealing with a Single Threaded Apartment (STA) COM component, you can encounter limitations on parallel execution, especially if the component only allows a single thread to access its instance at a time. Here are several approaches you might consider to work around the limitations imposed by the STA component:
#... | 30,357 | [
{
"from": "human",
"value": "I had a problem discovered on another thread here, I need to access a COM component that is STA. I'll run it on a dual-core computer, a process using this component only reaches 50% of CPU. Unfortunately, the owners said they can't change the component to MTA, because the compon... |
This question is about App domains and Sessions. Is it possible to have IIS run each User Session in a seperate App Domain. If Yes, Could you please let me settings in the config file that affect this.
Regards,
Anil.
| In IIS (Internet Information Services), an Application Domain (AppDomain) is a mechanism used in the .NET Framework that provides an isolated environment for executing applications. Each AppDomain can be used to run multiple instances of an application while providing isolation between them.
However, IIS does not supp... | 32,102 | [
{
"from": "human",
"value": "This question is about App domains and Sessions. Is it possible to have IIS run each User Session in a seperate App Domain. If Yes, Could you please let me settings in the config file that affect this.\nRegards,\nAnil.\n"
},
{
"from": "gpt",
"value": "In IIS (Interne... |
I am creating a tool that will check dynamically generated XHTML and validate it against expected contents.
I need to confirm the structure is correct and that specific attributes exist/match. There may be other attributes which I'm not interested in, so a direct string comparison is not suitable.
One way of validating... | Yes, you can use a Java library called **jsoup** that allows you to parse and manipulate HTML and XHTML documents. Jsoup supports CSS selectors, making it easy to select elements in a way similar to jQuery. You can integrate jsoup with your CFML code since CFML can invoke Java libraries.
### Steps to Use jsoup in CFML... | 28,080 | [
{
"from": "human",
"value": "I am creating a tool that will check dynamically generated XHTML and validate it against expected contents.\nI need to confirm the structure is correct and that specific attributes exist/match. There may be other attributes which I'm not interested in, so a direct string compari... |
I have a php script and i'm using ajax with it. I have a textarea form connect with the ajax class
The problem when I pass a text like (&some text) the function return an empty text, I guess that I have a problem with (&).
The javascript function:
function sendFormData(idForm, dataSource, divID, ifLoading)
{
var post... | The issue you're encountering with sending text that contains special characters (like `&`) in your AJAX request is likely due to improper encoding of the URL parameters. When you pass text with special characters in URLs or POST data, you need to ensure that they are properly encoded to avoid issues.
In JavaScript, y... | 28,628 | [
{
"from": "human",
"value": "I have a php script and i'm using ajax with it. I have a textarea form connect with the ajax class\nThe problem when I pass a text like (&some text) the function return an empty text, I guess that I have a problem with (&).\nThe javascript function:\nfunction sendFormData(idForm... |
How to move a sub directory from one directory to another, given that both are inside the same SVN repository? I am using tortoise SVN.
| To move a subdirectory from one directory to another within the same SVN repository using TortoiseSVN, follow these steps:
1. **Open Windows Explorer**: Navigate to the working copy of your SVN repository where the directories are located.
2. **Select the Subdirectory**: Locate the subdirectory you want to move. Righ... | 31,658 | [
{
"from": "human",
"value": "How to move a sub directory from one directory to another, given that both are inside the same SVN repository? I am using tortoise SVN.\n"
},
{
"from": "gpt",
"value": "To move a subdirectory from one directory to another within the same SVN repository using Tortoise... |
First, a couple operating parameters:
.NET development using Visual Studio 2005/2008
TortoiseSVN client
I've only primarily worked with Visual Source Safe and SourceGear Vault source control systems. In each, I map the root of the repository to a local working directory. For example:
$/ --> C:\source
As long as ... | To achieve what you're aiming for with Subversion (SVN) without manually creating the full directory structure in your local working copy, you have a couple of options, though Subversion's design doesn't inherently support checking out part of the repository while automatically maintaining the entire directory structur... | 26,298 | [
{
"from": "human",
"value": "First, a couple operating parameters:\n\n.NET development using Visual Studio 2005/2008\nTortoiseSVN client\n\nI've only primarily worked with Visual Source Safe and SourceGear Vault source control systems. In each, I map the root of the repository to a local working directory.... |
I need to run a JNDI provider without the overhead of a J2EE container. I've tried to follow the directions in this article, which describes (on page 3) exactly what I want to do. Unfortunately, these directions fail. I had to add the jboss-common.jar to my classpath too. Once I did that, I get a stack trace:
$ jav... | It seems like you're encountering issues while trying to run a JNDI provider using JBoss's `jnp.server.Main`. The `NullPointerException` you are seeing indicates that there may be a configuration issue or missing properties that are required to initialize the naming service properly.
### Troubleshooting the JNDI Setup... | 23,761 | [
{
"from": "human",
"value": "I need to run a JNDI provider without the overhead of a J2EE container. I've tried to follow the directions in this article, which describes (on page 3) exactly what I want to do. Unfortunately, these directions fail. I had to add the jboss-common.jar to my classpath too. On... |
I'm trying to use SQL developer, but it won't connect using the proxy I specify in the preferences. I guess it's because of some kind of certificate error? Not sure. I'm getting the error:
No HTTP response received.
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building faile... | The error message you're encountering indicates that the SSL handshake is failing due to a certificate validation issue. Specifically, the Java application (SQL Developer in this case) is unable to find a valid certification path to the requested target, which likely means that the server's SSL certificate is not trust... | 27,261 | [
{
"from": "human",
"value": "I'm trying to use SQL developer, but it won't connect using the proxy I specify in the preferences. I guess it's because of some kind of certificate error? Not sure. I'm getting the error:\nNo HTTP response received.\njavax.net.ssl.SSLHandshakeException: sun.security.validator.V... |
I have a vba macro which runs a loop for about 200 iterations, using up the ram page file as it runs.
I need some kind of quick fix to clear the page file after every iteration. I know the best fix would be to clean up the code, but time is a constraint here.
| Clearing the page file itself isn't possible through a simple command, and attempting to do so while a macro is running would not be feasible or practical. However, you can manage memory usage more efficiently within your VBA macro by utilizing a few strategies to release memory and clean up objects more effectively af... | 28,162 | [
{
"from": "human",
"value": "I have a vba macro which runs a loop for about 200 iterations, using up the ram page file as it runs.\nI need some kind of quick fix to clear the page file after every iteration. I know the best fix would be to clean up the code, but time is a constraint here.\n"
},
{
"f... |
I have tried to find how to create DLL-s on linux using google, but got very confusing information.
Is it possible to write dynamic link libraries on linux? If not, are there other means by which I can call code in another module from several running programs?
| Yes, it is indeed possible to create dynamic link libraries (DLLs) on Linux, though they are typically referred to as shared libraries in the Linux environment. In Linux, shared libraries have a `.so` (shared object) file extension instead of `.dll`. Here's a brief overview of how to create and use shared libraries on ... | 29,348 | [
{
"from": "human",
"value": "I have tried to find how to create DLL-s on linux using google, but got very confusing information.\nIs it possible to write dynamic link libraries on linux? If not, are there other means by which I can call code in another module from several running programs?\n"
},
{
"... |
I have some tables that I build as a part of my report rollup. I don't need them afterwards at all. Someone mentioned to truncate them as it would be faster.
| If you have temporary tables or tables that are no longer needed after your report rollup, truncating them can indeed be a faster option than deleting the rows one by one. Here’s a brief overview of the differences and when to use `TRUNCATE`:
### TRUNCATE vs. DELETE
- **TRUNCATE**:
- Removes all rows from a table ... | 26,303 | [
{
"from": "human",
"value": "I have some tables that I build as a part of my report rollup. I don't need them afterwards at all. Someone mentioned to truncate them as it would be faster. \n"
},
{
"from": "gpt",
"value": "If you have temporary tables or tables that are no longer needed after your... |
I have implemented a SAX parser in Java by extending the default handler. The XML has a ñ in its content. When it hits this character it breaks. I print out the char array in the character method and it simply ends with the character before the ñ. The parser seems to stop after this as no other methods are called even ... | The issue you're facing is likely related to character encoding. The character `ñ` is not represented in all character encodings, and if the XML document is not properly encoded or not being read with the correct encoding in your SAX parser, you can encounter problems like the one you're experiencing.
Here are some st... | 28,977 | [
{
"from": "human",
"value": "I have implemented a SAX parser in Java by extending the default handler. The XML has a ñ in its content. When it hits this character it breaks. I print out the char array in the character method and it simply ends with the character before the ñ. The parser seems to stop after ... |
Specifically, we've got some external JavaScript tracking code on our sites that throws itself into an infinite loop each time an anchor is clicked on.
We don't maintain the tracking code, so we don't know exactly how it works. Since the code causes the browser to lock up almost immediately, I was wondering if there's... | If you're dealing with a situation where external JavaScript tracking code is causing an infinite loop, and you're unable to modify it, profiling the script can be tricky but not impossible. Unfortunately, Firebug itself does not provide a built-in feature to log profiling results directly to an external file. However,... | 29,119 | [
{
"from": "human",
"value": "Specifically, we've got some external JavaScript tracking code on our sites that throws itself into an infinite loop each time an anchor is clicked on.\nWe don't maintain the tracking code, so we don't know exactly how it works. Since the code causes the browser to lock up almo... |
Our usage case is a database responsible for accounts, sessions, licenses, etc. — it needs to be polled upon client startup, so high reliability is crucial. As such, we'd like to replicate across different servers in physically separate networks, just in case an entire datacenter happens to go down. I have successfully... | Setting up a reliable replication system between SQL Server instances across different networks can indeed be challenging. You have the right idea in trying to leverage SSH tunneling to avoid a more complex VPN setup. Below are steps and considerations for setting up an SSH tunnel to enable SQL Server replication witho... | 27,830 | [
{
"from": "human",
"value": "Our usage case is a database responsible for accounts, sessions, licenses, etc. — it needs to be polled upon client startup, so high reliability is crucial. As such, we'd like to replicate across different servers in physically separate networks, just in case an entire datacente... |
I have to integrate a large Java library in a quite large C++ application. A solution is to use JNI but this requires to hand code all the classes. Python has, for example, a wonderful solution with JPype (http://jpype.sourceforge.net/) that automatizes the process (although the same solution cannot be applied to C++ d... | Integrating a large Java library into a C++ application can indeed be challenging, especially when dealing with the complexity of JNI (Java Native Interface). While you mentioned the convenience of JPype for Python, there are a few alternative approaches you can consider for integrating Java with C++ without having to ... | 27,812 | [
{
"from": "human",
"value": "I have to integrate a large Java library in a quite large C++ application. A solution is to use JNI but this requires to hand code all the classes. Python has, for example, a wonderful solution with JPype (http://jpype.sourceforge.net/) that automatizes the process (although the... |
I am searching for a decompiler for a C program. The binary is a 32-bit x86 Linux executable. Objdump works fine, so basically I am searching for something which attempts to reconstruct the C source from the asm source.
| To decompile a C program from a 32-bit x86 Linux executable, you have several options besides `objdump`. Here are some popular tools that are capable of reconstructing C-like source code from binary executables:
1. **Ghidra**:
- A software reverse engineering framework developed by the NSA. It has a powerful decom... | 30,384 | [
{
"from": "human",
"value": "I am searching for a decompiler for a C program. The binary is a 32-bit x86 Linux executable. Objdump works fine, so basically I am searching for something which attempts to reconstruct the C source from the asm source.\n"
},
{
"from": "gpt",
"value": "To decompile a... |
I am programming Outlook 2003 add-in using Visual Studio 2008.
Add-in uses embedded user control in folder's home page, like as it was
recommended. Here is HTML code for folder's home page:
<html><head><style type="text/css">body{overflow: hidden}</style></head>
<body rightmargin = '0' leftmargin ='0' topmargin ='0... | The issue you're encountering seems to stem from the asynchronous nature of the Outlook add-in lifecycle, particularly when embedding a user control and loading it into the folder's home page.
In your case, it's possible that the `OnLoad` event of the user control is firing before the `Initialize` method has been call... | 29,933 | [
{
"from": "human",
"value": "I am programming Outlook 2003 add-in using Visual Studio 2008.\nAdd-in uses embedded user control in folder's home page, like as it was\nrecommended. Here is HTML code for folder's home page:\n<html><head><style type=\"text/css\">body{overflow: hidden}</style></head>\n <body ... |
What's the best way to write a LINQ query that inserts a record and then returns the primary key of that newly inserted record using C# ?
| To insert a record into a database using LINQ to SQL (or Entity Framework) and then return the primary key of the newly inserted record, you can follow these steps. Below is an example using Entity Framework.
### Using Entity Framework:
Here's how you can perform the operation:
1. **Define your entity** (for example... | 28,531 | [
{
"from": "human",
"value": "What's the best way to write a LINQ query that inserts a record and then returns the primary key of that newly inserted record using C# ?\n"
},
{
"from": "gpt",
"value": "To insert a record into a database using LINQ to SQL (or Entity Framework) and then return the p... |
I currently use notepad to store little notes to myself about my code.
This is usually a mixture of code and requirements.
Is there a 'scratch pad' type window in VS where i could do this.
The other alternative is to use code comment blocks in the source files, but that's not quite what I'm looking for.
| Yes, Visual Studio has a feature called "Scratch Files" or "Scratch Pads" which can serve as a good solution for your needs. While there isn't a specific dedicated scratch pad built into all versions of Visual Studio, you can utilize a couple of methods to achieve a similar result.
### Option 1: Use a Text File
You ca... | 28,868 | [
{
"from": "human",
"value": "I currently use notepad to store little notes to myself about my code.\nThis is usually a mixture of code and requirements.\nIs there a 'scratch pad' type window in VS where i could do this.\nThe other alternative is to use code comment blocks in the source files, but that's not... |
I'm working on a program that processes many requests, none of them reaching more than 50% of CPU (currently I'm working on a dual core). So I created a thread for each request, the whole process is faster. Processing 9 requests, a single thread lasts 02min08s, while with 3 threads working simultaneously the time decre... | Based on the information you provided, it seems likely that the COM method you're calling is running in a Single Threaded Apartment (STA) model, which can be a common issue when trying to fully utilize CPU resources with multi-threaded applications. Here's a brief explanation and some suggestions to help you resolve th... | 28,959 | [
{
"from": "human",
"value": "I'm working on a program that processes many requests, none of them reaching more than 50% of CPU (currently I'm working on a dual core). So I created a thread for each request, the whole process is faster. Processing 9 requests, a single thread lasts 02min08s, while with 3 thre... |
I am hosting a service within a Windows Service.
The following snippet instantiates the ServiceHost object:
Host = new ServiceHost(typeof(Services.DocumentInfoService));
The DocumentInfoService class implements a contract interface that has methods that invoke business objects requiring initialization (actually a co... | Yes, you can achieve what you want by using a factory pattern to create your `DocumentInfoService` instance and pass the necessary initialization parameters to it. While the `ServiceHost` expects a `Type`, you can use a service factory to create your service instance with the desired constructor.
Here’s a step-by-step... | 28,325 | [
{
"from": "human",
"value": "I am hosting a service within a Windows Service. \nThe following snippet instantiates the ServiceHost object:\nHost = new ServiceHost(typeof(Services.DocumentInfoService));\n\nThe DocumentInfoService class implements a contract interface that has methods that invoke business ob... |
In VS2008 I have written a C# service, an installer, and have created a setup package to install it. The service needs to load an xml file to operate. Where is the best place to put this file in the various filesystem folders offered by the VS setup project, and how do I then refer to these paths from my code?
I should... | When deploying a Windows service, it's important to consider where configuration files and data files should be stored for best practices in terms of security, accessibility, and maintenance. Here are some recommended approaches for your scenario with a C# service running as `LocalService`:
### Recommended Storage Loc... | 30,344 | [
{
"from": "human",
"value": "In VS2008 I have written a C# service, an installer, and have created a setup package to install it. The service needs to load an xml file to operate. Where is the best place to put this file in the various filesystem folders offered by the VS setup project, and how do I then re... |
I have a lot of Java source code that requires custom pre-processing. I'd like rid of it but that's not feasible right now so I'm stuck with it. Given that I have an unfortunate problem that shouldn't have existed in the first place, how do I solve it using maven?
(For the full story, I'm replacing a python-based buil... | Yes, you can use Maven to preprocess your Java source code during the compile phase. While Maven does not have built-in support for preprocessing in the same way C/C++ preprocessors do, you can achieve your goal by using Maven plugins that allow you to execute custom scripts or transformations on your source files befo... | 24,845 | [
{
"from": "human",
"value": "I have a lot of Java source code that requires custom pre-processing. I'd like rid of it but that's not feasible right now so I'm stuck with it. Given that I have an unfortunate problem that shouldn't have existed in the first place, how do I solve it using maven? \n(For the ful... |
<Grid.Triggers>
<EventTrigger RoutedEvent="Border.Loaded">
<EventTrigger.Actions >
<BeginStoryboard>
<Storyboard x:Name="MyStoryboard" AutoReverse="True" RepeatBehavior="Forever">
<ColorAnimationUsingKeyFrames BeginT... | To enable or disable an animation dynamically in WPF, you can achieve this by using a combination of a `BooleanToVisibilityConverter` (or a similar mechanism) along with `DataTriggers` or modifying the `EventTrigger` programmatically.
Since `EventTrigger` does not provide a built-in way to enable/disable it dynamicall... | 19,219 | [
{
"from": "human",
"value": "<Grid.Triggers>\n <EventTrigger RoutedEvent=\"Border.Loaded\">\n <EventTrigger.Actions >\n <BeginStoryboard>\n <Storyboard x:Name=\"MyStoryboard\" AutoReverse=\"True\" RepeatBehavior=\"Forever\">\n ... |
I have an existing library (JPhysX) that is a Java wrapper for a native C++ library (PhysX). The Java library makes use of types generated by SWIG, for example, com.jphysx.SWIGTYPE_p_NxStream, which represents a pointer to an NxStream object in the C++ code. Now I want to create my own C++ class that inherits from the ... | To achieve the desired result of reusing the existing SWIG wrapper for `SWIGTYPE_p_NxStream` in your new class and ensuring that your Java class inherits from `com.jphysx.SWIGTYPE_p_NxStream`, you will need to make some specific adjustments to your SWIG interface file.
Here’s how you can go about it:
### Step 1: Def... | 26,575 | [
{
"from": "human",
"value": "I have an existing library (JPhysX) that is a Java wrapper for a native C++ library (PhysX). The Java library makes use of types generated by SWIG, for example, com.jphysx.SWIGTYPE_p_NxStream, which represents a pointer to an NxStream object in the C++ code. Now I want to create... |
Talking from a 'best practice' point of view, what do you think is the best way to insert HTML using PHP. For the moment I use one of the following methods (mostly the latter), but I'm curious to know which you think is best.
<?php
if($a){
?>
[SOME MARKUP]
<?php
}
else{
?>
[SOME OTHER MARKUP]
<?php
}
?>
Oppose... | Both methods you've presented for inserting HTML using PHP are valid, but they each have their strengths and weaknesses depending on your use case, code readability, and maintainability. Here are some best practices and considerations for each approach:
### First Method: Using PHP Short Tags
```php
<?php
if ($a) {
?>... | 28,064 | [
{
"from": "human",
"value": "Talking from a 'best practice' point of view, what do you think is the best way to insert HTML using PHP. For the moment I use one of the following methods (mostly the latter), but I'm curious to know which you think is best.\n<?php\n if($a){\n?>\n[SOME MARKUP]\n<?php\n }\n e... |
I know that it is possible (in theory) to create a new type at run-time, but is it possible to modify a method body of an existing type at run-time? My plan (if I can get this to work) is to tag up methods with a custom attribute, and then at run-time search for methods with the attribute, and insert some of my own cod... | Modifying the body of an existing method at runtime is a complex task, and it depends on the programming language and the runtime environment you're working with. In .NET, for example, there are several approaches to achieve similar behavior, but directly altering existing methods is generally not possible in a straigh... | 26,227 | [
{
"from": "human",
"value": "I know that it is possible (in theory) to create a new type at run-time, but is it possible to modify a method body of an existing type at run-time? My plan (if I can get this to work) is to tag up methods with a custom attribute, and then at run-time search for methods with the... |
I'm currently working on a small project with OCaml; a simple mathematical expression simplifier. I'm supposed to find certain patterns inside an expression, and simplify them so the number of parenthesis inside the expression decreases. So far I've been able to implement most rules except two, for which I've decided t... | In OCaml, it is indeed possible to have nested `match` expressions, and your approach is almost correct. However, you need to ensure that the results of your `match` expressions are returned properly. Each pattern in your `match` should also handle the expressions recursively in order to apply the filtering correctly.
... | 28,011 | [
{
"from": "human",
"value": "I'm currently working on a small project with OCaml; a simple mathematical expression simplifier. I'm supposed to find certain patterns inside an expression, and simplify them so the number of parenthesis inside the expression decreases. So far I've been able to implement most r... |
For a university mid-term project I have to design a configurable processor, to write the code in VHDL and then synthesize it on a Spartan 3E FPGA board from Digilent. I'm a beginner so could you point me to some information about configurable processors, to some ideas related to the concept?
| Designing a configurable processor is a great mid-term project! It allows you to explore several key concepts in computer architecture, digital design, and VHDL. Here are some resources and ideas to help you get started.
### Concepts and Ideas for Configurable Processors
1. **Architecture Overview**:
- Understand ... | 22,758 | [
{
"from": "human",
"value": "For a university mid-term project I have to design a configurable processor, to write the code in VHDL and then synthesize it on a Spartan 3E FPGA board from Digilent. I'm a beginner so could you point me to some information about configurable processors, to some ideas related t... |
I have created a Dynamic Web Project in my Eclipse workspace. It is also a Maven project, and under SVN control. But in "Open Resource" (Ctrl+Alt+R) no file from this project appears, unless I check from the window's options (top right drop-down) "Show Derived Resources".
I have checked on some of the project's folders... | It sounds like you are facing an issue with the visibility of resources in the "Open Resource" dialog within Eclipse for your Dynamic Web Project that is also a Maven project. Here are several steps and suggestions to troubleshoot and potentially resolve the issue:
1. **Check Project Nature**:
Ensure that your Dyna... | 20,480 | [
{
"from": "human",
"value": "I have created a Dynamic Web Project in my Eclipse workspace. It is also a Maven project, and under SVN control. But in \"Open Resource\" (Ctrl+Alt+R) no file from this project appears, unless I check from the window's options (top right drop-down) \"Show Derived Resources\".\nI... |
I know I'll get a thousand "Depends on what you're trying to do" answers, but seriously, there really is no solid information about this online yet. Here are my assumptions - I think they're similar for alot of people right now:
It is now October 2008. I want to start writing an application for January 2009. I am w... | Hi Adam,
Given your criteria and requirements, let's break down the two primary choices you're considering: Django (Python) and Merb (Ruby).
### Django (Python)
1. **Developer Productivity**: Django is known for its "batteries included" philosophy, offering a wide range of built-in features like an ORM, authenticati... | 21,383 | [
{
"from": "human",
"value": "I know I'll get a thousand \"Depends on what you're trying to do\" answers, but seriously, there really is no solid information about this online yet. Here are my assumptions - I think they're similar for alot of people right now:\n\nIt is now October 2008. I want to start wri... |
I've got a little c# windows service that periodically pulls xml from a web service and stores the data in a database table.
Unfortunately it's failing because the web service has occasional bad data in it - strings instead of decimals. I don't have any control over the web service (unvalidated user input from softwar... | Given your requirements and the nature of the bad data, here's a proposed approach that combines some of the ideas you mentioned while providing a structured and maintainable solution:
### Approach
1. **Use a non-validating XML Reader**: Instead of enforcing schema validation on the input XML, use a non-validating re... | 28,500 | [
{
"from": "human",
"value": "I've got a little c# windows service that periodically pulls xml from a web service and stores the data in a database table.\nUnfortunately it's failing because the web service has occasional bad data in it - strings instead of decimals. I don't have any control over the web se... |
In my independent study of various compiler books and web sites, I am learning about many different ways that a compiler can optimize the code that is being compiled, but I am having trouble figuring out how much of a benefit each optimization will tend to give.
How do most compiler writers go about deciding which opti... | Compiler writers indeed face a significant challenge when it comes to deciding which optimizations to implement. The goal is to enhance performance while balancing complexity and maintenance costs. Here are some common considerations that compiler writers use to prioritize optimizations:
1. **Profiling and Performance... | 27,453 | [
{
"from": "human",
"value": "In my independent study of various compiler books and web sites, I am learning about many different ways that a compiler can optimize the code that is being compiled, but I am having trouble figuring out how much of a benefit each optimization will tend to give.\nHow do most com... |
When using IDbCommand, IDataReader, or DataTable, can you depend on the destructor to dispose resources, or will these objects leak resources if dispose is not called directly?
| In .NET, the classes implementing `IDbCommand`, `IDataReader`, and `DataTable` often implement the `IDisposable` interface. This means they have a `Dispose` method that should be called to release unmanaged resources, such as database connections, file handles, and other resources that the garbage collector does not au... | 28,834 | [
{
"from": "human",
"value": "When using IDbCommand, IDataReader, or DataTable, can you depend on the destructor to dispose resources, or will these objects leak resources if dispose is not called directly?\n"
},
{
"from": "gpt",
"value": "In .NET, the classes implementing `IDbCommand`, `IDataRea... |
My experience to write a plugin for Firefox is below zero. Is someone out there who could point me to sample code on how to get this accomplished in C++ with VS2005/8?
What I need to do with JavaScript in the hosting html page is something like this:
var obj = document.getElementById("MyFFPlugin");
var value = obj.Ca... | Creating a Firefox plugin (also known as a "Firefox extension") using C++ can be quite complex, especially given that Firefox primarily supports extensions written in JavaScript and web technologies (HTML/CSS). However, there are ways to integrate C++ code into Firefox, typically by creating a "native" module.
### Ove... | 28,441 | [
{
"from": "human",
"value": "My experience to write a plugin for Firefox is below zero. Is someone out there who could point me to sample code on how to get this accomplished in C++ with VS2005/8? \nWhat I need to do with JavaScript in the hosting html page is something like this:\nvar obj = document.getEle... |
I have a query that has a list of base values and a list of language values. Each value has a key that matches to the other. The base values are stored in one table and the language values in another. My problem is that I need to get all matching base values removed from the QUERY except for one. Then, I export tha... | To tackle the problem you've described, we need to implement a multi-step approach in SQL that meets your requirements. Here’s a detailed breakdown of how you can achieve your goal, including creating the necessary SQL queries for both fetching the data and updating it after user modifications.
### Step 1: Querying th... | 26,817 | [
{
"from": "human",
"value": "I have a query that has a list of base values and a list of language values. Each value has a key that matches to the other. The base values are stored in one table and the language values in another. My problem is that I need to get all matching base values removed from the ... |
We have a small 3 developer team that is currently using Subversion for our source control. We expect the team to group to 8 members within the next 6 to 12 months. We are considering changing our source control to either TFS or Mercurial for improved branching. I know TFS is overkill for just branching, but that is th... | When considering a move from Subversion (SVN) to either Team Foundation Server (TFS) or Mercurial, there are several factors to take into account, particularly in terms of branching capabilities and the overall overhead associated with managing your source control system.
### TFS (Azure DevOps Server)
**Pros:**
1. **... | 29,185 | [
{
"from": "human",
"value": "We have a small 3 developer team that is currently using Subversion for our source control. We expect the team to group to 8 members within the next 6 to 12 months. We are considering changing our source control to either TFS or Mercurial for improved branching. I know TFS is ov... |
Basically, I would like to check if I have rights to open the file before I actually try to open it; I do not want to use a try/catch for this check unless I have to. Is there a file access property I can check before hand?
| Yes, you can check for file access permissions before attempting to open a file in a way that avoids using a try/catch block in many programming languages. The method varies depending on the language and environment you're using. Below, I'll show you examples in both Python and C#.
### Python
In Python, you can use t... | 29,519 | [
{
"from": "human",
"value": "Basically, I would like to check if I have rights to open the file before I actually try to open it; I do not want to use a try/catch for this check unless I have to. Is there a file access property I can check before hand?\n"
},
{
"from": "gpt",
"value": "Yes, you c... |
An XSLT-newbie problem: I need to substitute a text value in XML-file. All other nodes must be left unchanged. Here's my input file (in.xml):
<?xml version="1.0" encoding="UTF-8"?>
<root>
<level1 attr1="val1">
<level2>in</level2>
</level1>
</root>
Here's my XSLT-transformation (subst.xsl):
<?xml versio... | The issue you're encountering is due to the fact that your current XSLT does not handle the attributes of the nodes correctly when you perform a `xsl:copy`. In your current XSLT, when you match and copy the `level2` node, you're effectively omitting any attributes of its parent `level1` because you're just copying the ... | 30,056 | [
{
"from": "human",
"value": "An XSLT-newbie problem: I need to substitute a text value in XML-file. All other nodes must be left unchanged. Here's my input file (in.xml):\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<root>\n <level1 attr1=\"val1\">\n <level2>in</level2>\n </level1>\n</root>\n\n... |
I have a Canvas where I'm drawing a bunch of shapes and other UI elements. This canvas can be very large so I want to put this in a panel which allows me to zoom in/out using the mouse and scroll by dragging the mouse, just like Google Maps. The closest thing I could find was the ScrollViewer but obviously this isn't ... | Yes, you can achieve a zoomable and draggable canvas in WPF by using a combination of a `Canvas`, `ScrollViewer`, and `TranslateTransform`. Here's a basic example that demonstrates how to set this up. This implementation allows you to zoom in and out using the mouse wheel and to drag the canvas by holding down the mous... | 18,199 | [
{
"from": "human",
"value": "I have a Canvas where I'm drawing a bunch of shapes and other UI elements. This canvas can be very large so I want to put this in a panel which allows me to zoom in/out using the mouse and scroll by dragging the mouse, just like Google Maps. The closest thing I could find was t... |
How do I get the substring " It's big \"problem " using a regular expression?
s = ' function(){ return " It\'s big \"problem "; }';
| To extract the substring `It's big "problem` from the given string using a regular expression in Python, you can use the `re` module. Below is an example of how to achieve this:
```python
import re
s = ' function(){ return " It\'s big \\"problem "; }'
# Regular expression to match the required substring
# We are ... | 31,698 | [
{
"from": "human",
"value": "How do I get the substring \" It's big \\\"problem \" using a regular expression?\ns = ' function(){ return \" It\\'s big \\\"problem \"; }'; \n\n"
},
{
"from": "gpt",
"value": "To extract the substring `It's big \"problem` from the given string using a regul... |
For example, I'm writing a multi-threaded time-critical application that processes and streams audio in real-time. Interruptions in the audio are totally unacceptable. Does this mean I cannot use the STL because of the potential slow down when an exception is thrown?
| Using the Standard Template Library (STL) in a multi-threaded, time-critical audio processing application is not inherently unacceptable, but it does require careful consideration of how you utilize it, especially regarding exceptions and potential performance bottlenecks.
### Key Considerations:
1. **Exception Handl... | 29,600 | [
{
"from": "human",
"value": "For example, I'm writing a multi-threaded time-critical application that processes and streams audio in real-time. Interruptions in the audio are totally unacceptable. Does this mean I cannot use the STL because of the potential slow down when an exception is thrown? \n"
},
... |
How do large web sites which cannot be completely stateless achieve extreme scalability at the web tier?
There are sites like eBay and Amazon, which cannot be completely stateless, as they have a shopping cart or something like that. It isn't feasible to encode every item in the shopping cart into the URL, nor is it fe... | Achieving extreme scalability for stateful web applications like those of eBay and Amazon involves a multifaceted approach that goes beyond simply relying on hardware load balancers or session cookies. Here’s an overview of some techniques and strategies that these platforms employ:
### 1. **Session Management Strateg... | 29,010 | [
{
"from": "human",
"value": "How do large web sites which cannot be completely stateless achieve extreme scalability at the web tier?\nThere are sites like eBay and Amazon, which cannot be completely stateless, as they have a shopping cart or something like that. It isn't feasible to encode every item in th... |
I have whitespace characters showing in the Visual Studio code editor, and I'd like to remove them.
| In Visual Studio Code, you can remove whitespace characters using a couple of methods. Here’s how you can do it:
### 1. Remove Whitespace Characters Manually
You can manually remove trailing whitespace or extra spaces by following these steps:
- Place your cursor at the end of a line that has unwanted whitespace.
- Pr... | 28,521 | [
{
"from": "human",
"value": "I have whitespace characters showing in the Visual Studio code editor, and I'd like to remove them.\n"
},
{
"from": "gpt",
"value": "In Visual Studio Code, you can remove whitespace characters using a couple of methods. Here’s how you can do it:\n\n### 1. Remove Whit... |
I need to display a small (15x15 pixel) animation in a Flex app. I have it FLV format, but it could be converted to somthing else. I'd prefer to have the file embedded in the app (it's only 8k in size). I've seen posts about displaying animated GIFs using third-party code which would be OK, but is there a way to do ... | In Flex, if you want to display a small animation like a GIF or an embedded video, you have a couple of options. Since you're open to converting your FLV file to another format, here are some suggestions to help you achieve your goal using native Flex libraries:
### Option 1: Convert FLV to Animated GIF
1. **Convert ... | 30,224 | [
{
"from": "human",
"value": "I need to display a small (15x15 pixel) animation in a Flex app. I have it FLV format, but it could be converted to somthing else. I'd prefer to have the file embedded in the app (it's only 8k in size). I've seen posts about displaying animated GIFs using third-party code whi... |
I have been asked to audit any/all changes in a MySQL table. Does anyone know of any tools out there to help me do this or do I need to write my own solution?
If I write my own audting, my initial thought it to make a separate table and build a string of changes in the PHP code. Something like "fieldname1 -> oldvalue |... | Auditing changes in a MySQL table is an important aspect of database management, especially for tracking changes to critical data. There are various approaches you can take, including both built-in tools and custom solutions. Here’s a breakdown of options you might consider:
### Built-in Tools and Extensions
1. **MyS... | 25,694 | [
{
"from": "human",
"value": "I have been asked to audit any/all changes in a MySQL table. Does anyone know of any tools out there to help me do this or do I need to write my own solution?\nIf I write my own audting, my initial thought it to make a separate table and build a string of changes in the PHP code... |
How can i, in a bash script, execute a command when the user stops the script (with ctrl - c)?
Currently, i have this:
afplay file.mp3
while true:
do osascript -e "set volume 10"
end
But i would like it to execute killall afplay when the user is finished with it, regardless if it is command-c or another keypress.
| To execute a command when the user stops a Bash script (e.g., with Ctrl+C), you can use the `trap` command in your script. This allows you to define a cleanup command that will run before the script exits.
Here's an example of how you can modify your script to stop `afplay` when the user interrupts it:
```bash
#!/bin... | 31,179 | [
{
"from": "human",
"value": "How can i, in a bash script, execute a command when the user stops the script (with ctrl - c)?\nCurrently, i have this:\nafplay file.mp3\n\nwhile true:\ndo osascript -e \"set volume 10\"\nend\n\nBut i would like it to execute killall afplay when the user is finished with it, reg... |
If f is a numerical function and n is a positive integer, then we can form the nth repeated application of f, which is defined to be the function whose value at x is f(f(...(f(x))...)). For example, if f is the function x + 1, then the nth repeated application of f is the function x + n. If f is the operation of squar... | To create a procedure that computes the nth repeated application of a given function \( f \), we can use the concept of function composition. The idea is to compose the function \( f \) with itself \( n \) times. This can be achieved through recursion or through iterative composition.
Here's how you can implement the ... | 29,838 | [
{
"from": "human",
"value": "\nIf f is a numerical function and n is a positive integer, then we can form the nth repeated application of f, which is defined to be the function whose value at x is f(f(...(f(x))...)). For example, if f is the function x + 1, then the nth repeated application of f is the func... |
I am working on writing a Highly Available agent for JBoss Application Server to run on Solaris Open HA Cluster. As I don't know much of the JBoss AS, can someone please tell me how can I probe the status of the application server?
I want to know the health of the application server, for example whether it is currently... | To monitor the health of a JBoss Application Server (now known as WildFly) for high availability and clustering, you can employ various strategies. Here are some common approaches to probe the status of the server:
### 1. **Use JMX (Java Management Extensions)**
JBoss exposes many operational metrics through JMX. You ... | 27,292 | [
{
"from": "human",
"value": "I am working on writing a Highly Available agent for JBoss Application Server to run on Solaris Open HA Cluster. As I don't know much of the JBoss AS, can someone please tell me how can I probe the status of the application server?\nI want to know the health of the application s... |
Is there a tool to generate WiX XML given a .reg file?
In 2.0, you were supposed to be able to run tallow to generate registry XML:
tallow -r my.reg
For what it's worth, the version of tallow I have is producing empty XML.
In 3.0, tallow has been replaced with heat, but I can't figure out how to get it to produce ou... | In WiX 3.0 and later, the tool for generating WiX XML from various sources, including registry entries, is indeed `heat`. However, `heat` does not natively support .reg files directly for conversion to WiX XML.
### Workaround to Convert .reg File to WiX XML:
1. **Convert .reg to XML Manually**:
- You could manuall... | 29,211 | [
{
"from": "human",
"value": "Is there a tool to generate WiX XML given a .reg file?\n\nIn 2.0, you were supposed to be able to run tallow to generate registry XML:\ntallow -r my.reg \n\nFor what it's worth, the version of tallow I have is producing empty XML.\nIn 3.0, tallow has been replaced with heat, but... |
We've talked about personal password management here but how do you guys manage your passwords at a company wide level?
| Managing passwords at a company-wide level involves implementing a combination of policies, technologies, and best practices to ensure security while maintaining usability. Here are some effective strategies:
1. **Password Management Tools**: Utilize enterprise-level password management solutions like LastPass, 1Passw... | 31,233 | [
{
"from": "human",
"value": "We've talked about personal password management here but how do you guys manage your passwords at a company wide level?\n"
},
{
"from": "gpt",
"value": "Managing passwords at a company-wide level involves implementing a combination of policies, technologies, and best... |
How can I create a query for a full outer join across a M2M relationchip using the django QuerySet API?
It that is not supported, some hint about creating my own manager to do this would be welcome.
Edited to add:
@S.Lott:
Thanks for the enlightenment.
The need for the OUTER JOIN comes from the application. It has to ... | In Django, handling many-to-many (M2M) relationships and performing a full outer join across those relationships requires a bit of a workaround, as Django's ORM does not directly support full outer joins out of the box. However, you can achieve similar functionality by using `Q` objects and aggregating data as necessar... | 26,956 | [
{
"from": "human",
"value": "How can I create a query for a full outer join across a M2M relationchip using the django QuerySet API?\nIt that is not supported, some hint about creating my own manager to do this would be welcome.\nEdited to add:\n@S.Lott:\nThanks for the enlightenment. \nThe need for the OUT... |
I have this code:
CCalcArchive::CCalcArchive() : m_calcMap()
{
}
m_calcMap is defined as this:
typedef CTypedPtrMap<CMapStringToPtr, CString, CCalculation*> CCalcMap;
CCalcMap& m_calcMap;
When I compile in Visual Studio 2008, I get this error:
error C2440: 'initializing' : cannot convert from 'int' to 'CCalcArchive::... | The error you are encountering is related to the initialization of the `m_calcMap` member variable. In your code, `m_calcMap` is declared as a reference (`CCalcMap& m_calcMap`), but it hasn't been initialized to reference an existing `CCalcMap` object. This is leading to the error during the member initializer list whe... | 28,704 | [
{
"from": "human",
"value": "I have this code:\nCCalcArchive::CCalcArchive() : m_calcMap()\n{\n}\n\nm_calcMap is defined as this:\ntypedef CTypedPtrMap<CMapStringToPtr, CString, CCalculation*> CCalcMap;\nCCalcMap& m_calcMap;\n\nWhen I compile in Visual Studio 2008, I get this error:\nerror C2440: 'initializ... |
I'm busy with an asignment where i have to make a graphical interface for a simple program. But i'm strugling with the layout.
This is the idea:
What is the easiest way to accomplish such a layout?
And what method do you use to make layouts in java. Just code it, or use an IDE like netbeans?
| Creating a graphical interface in Java can be done using various approaches. The layout can be accomplished using Java's Swing or JavaFX libraries. Here are some guidelines and methods for creating a layout for your program:
### Choosing the Right Library
1. **Swing**: This is the traditional GUI toolkit for Java. It ... | 25,583 | [
{
"from": "human",
"value": "I'm busy with an asignment where i have to make a graphical interface for a simple program. But i'm strugling with the layout.\nThis is the idea:\n\nWhat is the easiest way to accomplish such a layout?\nAnd what method do you use to make layouts in java. Just code it, or use an ... |
Like many SO people, I'm in front of a computer almost all day. I like having a dark theme for Visual Studio (easier on the eyes), but since the rest of Windows and apps (explorer, dialogs, Outlook), have the full white background, it's even harder to switch between nice dark VS and sunshine bright Windows.
I tried a U... | To achieve a more cohesive dark theme across your Windows environment, including Visual Studio and other applications, you can follow these steps:
### 1. Windows Dark Mode
First, enable the built-in dark mode in Windows. Here's how to do that:
- **Windows 10/11:**
1. Go to **Settings** > **Personalization** > **Co... | 28,242 | [
{
"from": "human",
"value": "Like many SO people, I'm in front of a computer almost all day. I like having a dark theme for Visual Studio (easier on the eyes), but since the rest of Windows and apps (explorer, dialogs, Outlook), have the full white background, it's even harder to switch between nice dark VS... |
I've worked on several PHP projects and always I have problems with organizing my work. Where do you develop your application - on localhost, remote server or maybe production one(!) ?
When I work on my localhost after making some major path I send new files by ftp - but sometimes it happens to forget about one file a... | Organizing your PHP development workflow is crucial for maintaining code quality, ensuring efficient collaboration, and minimizing errors. Here are some best practices to help you streamline your process:
### 1. **Local Development Environment**
- **Use a Local Development Stack**: Consider using tools like XAMPP, MA... | 27,231 | [
{
"from": "human",
"value": "I've worked on several PHP projects and always I have problems with organizing my work. Where do you develop your application - on localhost, remote server or maybe production one(!) ?\nWhen I work on my localhost after making some major path I send new files by ftp - but somet... |
I'm running a PL/SQL block that is supposed to be calling a stored procedure who's output parameters are supposed to be populating variables in the PL/SQL block.
The procedure compiles, and the PL/SQL block runs successfully. But I'd like to check the values of the variables populated by the procedure. Is there a way t... | Yes, you can output the values of the variables populated by the stored procedure in your PL/SQL block using `DBMS_OUTPUT.PUT_LINE`. This allows you to print the values to the console in TOAD, provided that you have enabled output in your session. Here's how to do it step by step:
1. **Enable DBMS Output in TOAD:**
... | 31,222 | [
{
"from": "human",
"value": "I'm running a PL/SQL block that is supposed to be calling a stored procedure who's output parameters are supposed to be populating variables in the PL/SQL block.\nThe procedure compiles, and the PL/SQL block runs successfully. But I'd like to check the values of the variables po... |
I want to start using .NET 3.5 features in an app that is currently stuck in the past - how can I write in support for selected features like JSON serialization in a forward-compatible way?
In the case of JSON serialization I need to reference System.ServiceModel.Web - is it OK to reference a .NET 3.5 dll in a VS2005 a... | Using .NET 3.5 features in a legacy application built on an earlier version (like .NET 2.0 or .NET 3.0) can be tricky, especially with compatibility and deployment considerations. Here are some recommendations for how you can approach this:
### 1. Understanding Compatibility
When you reference a .NET 3.5 assembly (li... | 29,053 | [
{
"from": "human",
"value": "I want to start using .NET 3.5 features in an app that is currently stuck in the past - how can I write in support for selected features like JSON serialization in a forward-compatible way?\nIn the case of JSON serialization I need to reference System.ServiceModel.Web - is it OK... |
In ActivePerl, "ppm" installs a package from the Internet, "ppm install x.ppd" installs from a ppd file, but most CPAN packages are distributed as .tar.gz
How do you supply modules to a machine running ActivePerl that doesn't have an Internet connection? ("make" will probably not be available.)
Update: an Internet con... | To install Perl modules on an ActivePerl setup without direct Internet access, you can follow these steps:
### Step 1: Download the Required Modules
1. **Identify the Modules**: Determine the CPAN modules you need to install. For instance, if you need `Some::Module`, note its name.
2. **Use CPAN or a Website**: On a... | 26,504 | [
{
"from": "human",
"value": "In ActivePerl, \"ppm\" installs a package from the Internet, \"ppm install x.ppd\" installs from a ppd file, but most CPAN packages are distributed as .tar.gz\nHow do you supply modules to a machine running ActivePerl that doesn't have an Internet connection? (\"make\" will pro... |
If we need to issue a bug patch that does not include current development that has been committed, or any changes from their current version, what should be done to make the process safer and with lower overhead?
We are currently using Subversion for our source control in a small (3 developers) team primarily developi... | Issuing a bug patch in a controlled manner without affecting current development can be challenging, especially in a growing team and with an evolving codebase. Here are some best practices to make the process safer and reduce overhead:
### 1. **Branching Strategy**:
- **Create a Stable Branch**:
When a relea... | 29,018 | [
{
"from": "human",
"value": "If we need to issue a bug patch that does not include current development that has been committed, or any changes from their current version, what should be done to make the process safer and with lower overhead?\nWe are currently using Subversion for our source control in a sm... |
I want to give credit to all open source libraries we use in our (commercial) application. I thought of showing a HTML page in our about dialog. Our build process uses ant and the third party libs are committed in svn.
What do you think is the best way of generating the HTML-Page?
Hard code the HTML-Page?
Switch dep... | Generating an HTML page to credit all open-source libraries used in your commercial application is a great idea, as it demonstrates transparency and appreciation for the work of the open-source community. Here's a structured way to approach this along with some best practices:
### Generating the HTML Page
1. **Switch... | 29,775 | [
{
"from": "human",
"value": "I want to give credit to all open source libraries we use in our (commercial) application. I thought of showing a HTML page in our about dialog. Our build process uses ant and the third party libs are committed in svn.\nWhat do you think is the best way of generating the HTML-Pa... |
I have a header file x.h which is included by more than one *.c source files.
This header file has some structure variables defined.
I have put multiple inclusion prevention guard at the beginning of the header file as:
#ifndef X_H
#define X_H
...
..
//header file declarations and definitons.
#endif//X_H
On buildin... | The multiple inclusion guard you have implemented (`#ifndef`, `#define`, `#endif`) is effective for preventing multiple inclusions of the same header file in a single translation unit (i.e., a single `.c` file). However, it does **not** prevent multiple definitions of global variables or functions across different tran... | 31,123 | [
{
"from": "human",
"value": "I have a header file x.h which is included by more than one *.c source files.\nThis header file has some structure variables defined.\nI have put multiple inclusion prevention guard at the beginning of the header file as:\n#ifndef X_H\n#define X_H\n...\n..\n//header file declar... |
The shop that I am working part time with is new to Microsoft CRM. I just want to survey what projects have developers done to the system to extend its capabilities.
| Extending the capabilities of Microsoft Dynamics CRM (now part of Microsoft Dynamics 365) can be achieved through various projects and customizations. Here are some common approaches and projects that developers have undertaken to enhance the system:
1. **Custom Entities and Fields**: Creating custom entities and fiel... | 26,176 | [
{
"from": "human",
"value": "The shop that I am working part time with is new to Microsoft CRM. I just want to survey what projects have developers done to the system to extend its capabilities.\n"
},
{
"from": "gpt",
"value": "Extending the capabilities of Microsoft Dynamics CRM (now part of Mi... |
I have a need to determine what security group(s) a user is a member of from within a SQL Server Reporting Services report. Access to the report will be driven by membership to one of two groups: 'report_name_summary' and 'report_name_detail'. Once the user is executing the report, we want to be able to use their membe... | In SQL Server Reporting Services (SSRS), there is no direct built-in way to query Active Directory for a user's group membership from within a report. However, you can achieve the desired outcome by leveraging stored procedures, custom data sources, or external applications.
Here are some options to consider:
### Opt... | 28,397 | [
{
"from": "human",
"value": "I have a need to determine what security group(s) a user is a member of from within a SQL Server Reporting Services report. Access to the report will be driven by membership to one of two groups: 'report_name_summary' and 'report_name_detail'. Once the user is executing the repo... |
How can I deploy an iPhone application from Xcode to real iPhone device without having a US$99 Apple certificate?
| Deploying an iPhone application to a real device without a paid Apple Developer Program subscription (which costs $99 per year) is possible, though there are some limitations. Here’s how to do it using Xcode:
### Steps to Deploy an App to a Real Device Without a Paid Apple Developer Account:
1. **Connect Your iPhone*... | 29,024 | [
{
"from": "human",
"value": "How can I deploy an iPhone application from Xcode to real iPhone device without having a US$99 Apple certificate?\n"
},
{
"from": "gpt",
"value": "Deploying an iPhone application to a real device without a paid Apple Developer Program subscription (which costs $99 pe... |
I want to make some passages of a standard tooltip bold in a WinForms application. Is this possible?
If not, is there a (free) tooltip component that allows me to style them (preferably also border and background)?
Thanks!
| In a standard WinForms application, the built-in `ToolTip` component does not support rich text formatting, such as making certain parts of the text bold or changing colors. However, you can use alternative approaches to achieve the desired styling.
### Option 1: Custom ToolTip using a Form
You can create a custom to... | 27,833 | [
{
"from": "human",
"value": "I want to make some passages of a standard tooltip bold in a WinForms application. Is this possible?\nIf not, is there a (free) tooltip component that allows me to style them (preferably also border and background)?\nThanks!\n"
},
{
"from": "gpt",
"value": "In a stan... |
What is the best method for applying drop shadows? I'm working on a site right now where we have a good deal of them, however, I've been fighting to find the best method to do it. The site is pretty animation heavy so shadows need to work well with this.
I tried a jQuery shadow pulgin. The shadows looked good and we... | Applying drop shadows effectively, especially in an animation-heavy site, can be a challenge. Here are several methods you can consider, along with their pros and cons:
### 1. **CSS Box Shadows**
Using CSS `box-shadow` is one of the simplest and most efficient ways to create drop shadows. This method does not require ... | 26,788 | [
{
"from": "human",
"value": "What is the best method for applying drop shadows? I'm working on a site right now where we have a good deal of them, however, I've been fighting to find the best method to do it. The site is pretty animation heavy so shadows need to work well with this.\nI tried a jQuery shad... |
I use Visual C++ 2008 in Visual Studio 2008. I frequently use the following command to diff an open file against its most recent checked-in version:
File | Source Control | Compare...
I can also do the same thing by clicking on an icon in the Source Control toolbar.
I'm not certain, but I believe this command is the ... | In Visual Studio 2008, if the command you're looking for (in this case, the "Compare" command for source control) is not listed in the `Tools | Customize... | Commands` dialog, it may not have an easily assignable keyboard shortcut available through the standard customization interface. However, you can still assign a ... | 30,952 | [
{
"from": "human",
"value": "I use Visual C++ 2008 in Visual Studio 2008. I frequently use the following command to diff an open file against its most recent checked-in version:\nFile | Source Control | Compare...\n\nI can also do the same thing by clicking on an icon in the Source Control toolbar.\nI'm no... |
How can I detect in C# whether two files are absolutely identical (size, content, etc.)?
| In C#, you can determine if two files are absolutely identical by checking their sizes and content. Here is a simple approach to achieve this:
1. **Compare the sizes** of the two files. If the sizes are not the same, the files are not identical.
2. **Compare the contents** of the files if the sizes match. You can use ... | 29,517 | [
{
"from": "human",
"value": "How can I detect in C# whether two files are absolutely identical (size, content, etc.)?\n"
},
{
"from": "gpt",
"value": "In C#, you can determine if two files are absolutely identical by checking their sizes and content. Here is a simple approach to achieve this:\n\... |
I'm getting the following error when my win32 (c#) app is calling web services.
The request failed with HTTP status 504: Gateway timeout server response timeout.
I understand 'I think' that this is because the upstream request does not get a response in a timely fashion.
But my question is this? How do I change the a... | The HTTP status code 504 (Gateway Timeout) indicates that an upstream server did not send a request in the time allowed by the gateway server. In your case, it seems that your Win32 application is timing out when trying to access a web service.
To adjust the timeout settings in your Win32 application, you can modify t... | 28,218 | [
{
"from": "human",
"value": "I'm getting the following error when my win32 (c#) app is calling web services.\nThe request failed with HTTP status 504: Gateway timeout server response timeout.\n\nI understand 'I think' that this is because the upstream request does not get a response in a timely fashion.\nBu... |
I am using a FormView to update an existing SQL Server record. The rows from the sqldatasource display fine in the FormView and I can edit them. When I click Update, I get the ItemUpdating event but not the ItemUpdated event and the revisions are not written to the database.
Can anyone help me in this please.
| If you are encountering an issue where the `ItemUpdating` event fires in your `FormView`, but the `ItemUpdated` event does not and the record is not being updated in your SQL Server database, there are a few common areas to check. Here are some troubleshooting steps and suggestions to help resolve the issue:
### 1. Ch... | 23,434 | [
{
"from": "human",
"value": "I am using a FormView to update an existing SQL Server record. The rows from the sqldatasource display fine in the FormView and I can edit them. When I click Update, I get the ItemUpdating event but not the ItemUpdated event and the revisions are not written to the database. \... |
I'm running zsh as the default shell on a Ubuntu box, and everything works fine using gnome-terminal (which as far as I know emulates xterm). When I login from a windows box via ssh and putty (which also emulates xterm) suddendly the home/end keys no longer work.
I've been able to solve that adding these lines to my z... | The issue you're experiencing with the Home and End keys in `zsh` when connecting via SSH using PuTTY is likely due to terminal escape sequences not matching the default bindings in `zsh`. The behavior of the Home and End keys can vary based on terminal emulation settings and configurations, leading to different escape... | 27,056 | [
{
"from": "human",
"value": "I'm running zsh as the default shell on a Ubuntu box, and everything works fine using gnome-terminal (which as far as I know emulates xterm). When I login from a windows box via ssh and putty (which also emulates xterm) suddendly the home/end keys no longer work. \nI've been abl... |
How do I get the list of open file handles by process id in C#?
I'm interested in digging down and getting the file names as well.
Looking for the programmatic equivalent of what process explorer does.
Most likely this will require interop.
Considering adding a bounty on this, the implementation is nasty complicate... | To list open file handles by process ID in C#, you will need to use some advanced techniques, including P/Invoke to interact with native Windows APIs. Since .NET does not provide a direct way to retrieve open handles, you will generally rely on methods such as `NtQuerySystemInformation` or `CreateToolhelp32Snapshot`.
... | 24,153 | [
{
"from": "human",
"value": "How do I get the list of open file handles by process id in C#? \nI'm interested in digging down and getting the file names as well. \nLooking for the programmatic equivalent of what process explorer does. \nMost likely this will require interop. \nConsidering adding a bounty on... |
I work a lot with decision makers looking to use technology better in their businesses. I have found that a picture is worth a thousand words and prototyping a system in a diagram of some sorts always lends a lot to a discussion. I have used Visio, UML (somewhat), Mind Maps, Flow Charts and Mocked Up WinForms to star... | You're absolutely right that visualizing ideas can significantly enhance understanding and communication among stakeholders, especially in the early stages of a project. The goal is to create a common language that bridges the gap between business and technology. Below are some strategies and methodologies you can use ... | 22,136 | [
{
"from": "human",
"value": "I work a lot with decision makers looking to use technology better in their businesses. I have found that a picture is worth a thousand words and prototyping a system in a diagram of some sorts always lends a lot to a discussion. I have used Visio, UML (somewhat), Mind Maps, F... |
function array_value_from_key($array,$key)
{
return !empty($array[$key]) ? $array[$key] : null;
}
The reason I ask is because I have a class function that returns an array.
Instead of having to do
$myArray = myClass::giveMeArray();
$myValue = $myArray[$myKey];
I'd like to do something along the lines of
$myValue... | You can create a function that checks for the existence of a key in the returned array and optionally returns its value. This can streamline your code, allowing you to easily access values from an array returned by a class method without needing to store the array in a separate variable.
Here's how you can implement ... | 31,269 | [
{
"from": "human",
"value": "function array_value_from_key($array,$key)\n{\n return !empty($array[$key]) ? $array[$key] : null;\n}\n\nThe reason I ask is because I have a class function that returns an array.\nInstead of having to do\n$myArray = myClass::giveMeArray();\n$myValue = $myArray[$myKey];\n\nI... |
I've been trying desperately to get my application (15 C# dlls and 1 C++/CLI dll with C++ Runtime DLL dependencies) to deploy with ClickOnce. I got it to work by just copying the Release folder, but ClickOnce refuses to copy the files (msvcm80.dll, msvcp80.dll and msvcr80.dll) and deploy them in this folder.
I did this... | Deploying applications that have C++ runtime dependencies using ClickOnce can sometimes be tricky due to the way ClickOnce handles file dependencies. It seems that you've found a workaround, but there are more robust ways to manage this scenario, and it's important to ensure you’re following best practices to avoid fut... | 28,382 | [
{
"from": "human",
"value": "I've been trying desperately to get my application (15 C# dlls and 1 C++/CLI dll with C++ Runtime DLL dependencies) to deploy with ClickOnce. I got it to work by just copying the Release folder, but ClickOnce refuses to copy the files (msvcm80.dll, msvcp80.dll and msvcr80.dll) a... |
I have recently been exposed to naked objects. It looks like a pretty decent framework. However I do not see it in widespread use like say, Spring. So why is this framework not getting any mainstream application credit. What are its shortcomings as you see?
| Naked Objects is an architectural pattern and framework that focuses on exposing the domain model directly to the user interface (UI) by making the domain objects themselves responsible for their own presentation and behavior. While this approach can simplify development and provide a straightforward mapping from domai... | 29,421 | [
{
"from": "human",
"value": "I have recently been exposed to naked objects. It looks like a pretty decent framework. However I do not see it in widespread use like say, Spring. So why is this framework not getting any mainstream application credit. What are its shortcomings as you see?\n"
},
{
"from... |
I'm using C#, .NET 3.5. I understand how to utilize events, how to declare them in my class, how to hook them from somewhere else, etc. A contrived example:
public class MyList
{
private List<string> m_Strings = new List<string>();
public EventHandler<EventArgs> ElementAddedEvent;
public void Add(string ... | To better understand events and event handling in C#, let’s break down some of the key concepts involved, particularly focusing on the example you've provided, along with how events and delegates work under the hood.
### What is an Event?
In C#, an event is a way for a class (or an object) to notify other classes or ... | 25,967 | [
{
"from": "human",
"value": "I'm using C#, .NET 3.5. I understand how to utilize events, how to declare them in my class, how to hook them from somewhere else, etc. A contrived example:\npublic class MyList\n{\n private List<string> m_Strings = new List<string>();\n public EventHandler<EventArgs> El... |
I want to convert an XML document containing many elements within a node (around 150) into another XML document with a slightly different schema but mostly with the same element names. Now do I have to manually map each element/node between the 2 documents. For that I will have to hardcode 150 lines of mapping and elem... | Yes, there are better and more maintainable ways to perform this XML transformation without hardcoding all the element names. Here are a few strategies you could consider:
### 1. **Using XML Serialization/Deserialization**
If both the old and new XML schemas are relatively consistent and you can define classes that r... | 26,254 | [
{
"from": "human",
"value": "I want to convert an XML document containing many elements within a node (around 150) into another XML document with a slightly different schema but mostly with the same element names. Now do I have to manually map each element/node between the 2 documents. For that I will have ... |
Before I start, I know using iisreset is considered bad practice, but this shouldn't happen anyway..
What we have:
Several machines with IIS6 on Windows Server 2003 R2 (both 64 and 32 bits)
Several WCF webservices (.NET runtime 2.0) deployed in several applications, each with it's own application pool, each applicatio... | What you are experiencing with IIS 6 on Windows Server 2003 R2 is not uncommon, and there are a few factors that could contribute to this behavior. While using `iisreset` is generally discouraged, especially on production servers, there are some insights regarding the specific scenario you described.
### Reasons for A... | 29,284 | [
{
"from": "human",
"value": "Before I start, I know using iisreset is considered bad practice, but this shouldn't happen anyway..\nWhat we have:\n\nSeveral machines with IIS6 on Windows Server 2003 R2 (both 64 and 32 bits)\nSeveral WCF webservices (.NET runtime 2.0) deployed in several applications, each wi... |
If I open a solution then press CTRL + F and select Quick Find, the Look in drop-down doesn't have "Entire solution" as an option (Find in files still has it).
Any idea how to fix this?
Thanks!
| If the "Entire solution" option is missing from the "Look in" drop-down when using Quick Find (CTRL + F) in Visual Studio, it could be due to a few reasons. Here are some steps you can take to troubleshoot and possibly fix the issue:
1. **Use Find in Files Instead**: While Quick Find is limited to the current document... | 32,449 | [
{
"from": "human",
"value": "If I open a solution then press CTRL + F and select Quick Find, the Look in drop-down doesn't have \"Entire solution\" as an option (Find in files still has it).\nAny idea how to fix this?\nThanks!\n"
},
{
"from": "gpt",
"value": "If the \"Entire solution\" option is... |
I'm writing a license agreement dialog box with Win32 and I'm stumped. As usual with these things I want the "accept/don't accept" buttons to become enabled when the slider of the scroll bar of the richedit control hits bottom, but I can't find a way to get notified of that event. The earliest I've been able to learn... | To enable the "Accept" and "Don't Accept" buttons when the scrollbar of a RichEdit control reaches the bottom, you can effectively handle the scrollbar movement by responding to the `WM_VSCROLL` message specifically.
Since you want to know when the user has scrolled to the bottom of the RichEdit control, you will nee... | 26,958 | [
{
"from": "human",
"value": "I'm writing a license agreement dialog box with Win32 and I'm stumped. As usual with these things I want the \"accept/don't accept\" buttons to become enabled when the slider of the scroll bar of the richedit control hits bottom, but I can't find a way to get notified of that e... |
I am currently working on an MFC application that needs to be CPU-utilization aware. It may have multiple threads at different points in time, but the bulk of the work is accomplished by the main thread.
I am trying to find a way to calculate how much percentage of the CPU this main thread utilizes. However, I am runn... | Yes, `GetThreadTimes()` can be a useful function for calculating the CPU utilization of a specific thread, such as your main thread, in a multi-core environment. This function retrieves timing information about the specified thread, which includes the amount of time that the thread has spent in user mode, kernel mode, ... | 27,617 | [
{
"from": "human",
"value": "I am currently working on an MFC application that needs to be CPU-utilization aware. It may have multiple threads at different points in time, but the bulk of the work is accomplished by the main thread. \nI am trying to find a way to calculate how much percentage of the CPU thi... |
I'm looking to build a VM into a game and was wondering if anyone knew of any really simple VM's (I was thinking RISC/PIC was close to what I wanted) that are usually used for embedded projects such as controlling robots, motors, sensors, etc. My main concern is having to write a compiler/assembler if I roll my own. I'... | It sounds like you have a fascinating project in mind! Given your requirements for a simple virtual machine (VM) suitable for simulating embedded systems in a game, here are some suggestions that could fit your needs without requiring you to reinvent the wheel:
### 1. **RISC-V**:
- **Overview**: RISC-V is an open-sour... | 28,475 | [
{
"from": "human",
"value": "I'm looking to build a VM into a game and was wondering if anyone knew of any really simple VM's (I was thinking RISC/PIC was close to what I wanted) that are usually used for embedded projects such as controlling robots, motors, sensors, etc. My main concern is having to write ... |
I have a few questions about whether or not it would be best to not use indexing.
BACKGROUND:
My records have a timestamp attribute, and the records will be inserted in order of their timestamps (i.e., inserted chronologically).
QUESTIONS:
If I DON'T use indexing is it typical for the database to insert the records in... | Great questions! Let’s break down your inquiries regarding the use of indexing in a database, particularly with records that have a timestamp attribute and are inserted in chronological order.
### 1. If I DON'T use indexing, is it typical for the database to insert the records in the order that they were inserted?
Ye... | 30,585 | [
{
"from": "human",
"value": "I have a few questions about whether or not it would be best to not use indexing.\nBACKGROUND:\nMy records have a timestamp attribute, and the records will be inserted in order of their timestamps (i.e., inserted chronologically).\nQUESTIONS:\n\nIf I DON'T use indexing is it typ... |
I'm a newbie at networking. I understand the concept of multicast, but was wondering if it's reliable on the open/public internet?
It seems like sort of an edge case that different backbones or ISPs might intentionally break to reduce router load or generally segment the network for practical high-use applications.
Is... | Your concerns about multicast reliability on the open or public internet are quite valid. Let's break this down:
### Multicast on the Public Internet
1. **Multicast Overview**: Multicast is a method of communication that allows data to be sent to multiple recipients simultaneously without needing to send multiple cop... | 26,911 | [
{
"from": "human",
"value": "I'm a newbie at networking. I understand the concept of multicast, but was wondering if it's reliable on the open/public internet?\nIt seems like sort of an edge case that different backbones or ISPs might intentionally break to reduce router load or generally segment the netwo... |
Design patterns are usually related to object oriented design.
Are there design patterns for creating and programming relational databases?
Many problems surely must have reusable solutions.
Examples would include patterns for table design, stored procedures, triggers, etc...
Is there an online repository of such patte... | Yes, there are indeed design patterns specifically for relational databases, and these patterns can help address common problems in database design, storage, and querying. While they may not be as universally recognized or codified as object-oriented design patterns, there are established practices and principles that ... | 28,386 | [
{
"from": "human",
"value": "Design patterns are usually related to object oriented design.\nAre there design patterns for creating and programming relational databases?\nMany problems surely must have reusable solutions.\nExamples would include patterns for table design, stored procedures, triggers, etc...... |
Is there some additional configuration needed before I can set thread priorities in a Windows service?
In my service, I have a few threads that each call the CreateProcess() function to launch an external application. I would like to adjust thread (or process) priorities to normal or lower, depending on some other fac... | Setting thread and process priorities in a Windows service should be straightforward, but there are a few considerations to keep in mind. The error code 6 (ERROR_INVALID_HANDLE) you are encountering indicates that the thread handle you are trying to use with `SetThreadPriority()` is invalid. Here are some steps and con... | 26,970 | [
{
"from": "human",
"value": "Is there some additional configuration needed before I can set thread priorities in a Windows service? \nIn my service, I have a few threads that each call the CreateProcess() function to launch an external application. I would like to adjust thread (or process) priorities to no... |
I'm trying to connect from my Java application to a development server that has port 8088 closed which is used for RMI. I appreciate any help on how to open that port.
| To open port 8088 on a development server, you'll need to follow several steps. The approach will depend on the operating system you're using (Windows, Linux, etc.) and how the firewall is configured (if there is one). Below are general guidelines for opening a port on common environments:
### For Linux Systems (using... | 26,720 | [
{
"from": "human",
"value": "I'm trying to connect from my Java application to a development server that has port 8088 closed which is used for RMI. I appreciate any help on how to open that port.\n"
},
{
"from": "gpt",
"value": "To open port 8088 on a development server, you'll need to follow s... |
I have the following character string:
"..1....10..20....30...40....50...80..."
and I need to extract all numbers from it into array.
What is the best way to do it in C?
| To extract numbers from a given character string in C, you can use the standard library functions like `isdigit` to identify digits and `strtol` to convert strings to long integers. Below is an example of how you can achieve this:
```c
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#define MAX_NUMBERS 100 ... | 30,084 | [
{
"from": "human",
"value": "I have the following character string: \n\"..1....10..20....30...40....50...80...\" \n\nand I need to extract all numbers from it into array. \nWhat is the best way to do it in C? \n"
},
{
"from": "gpt",
"value": "To extract numbers from a given character string in C... |
I have a DAV server (Oracle Portal in this case). If I open word and then enter the DAV URL of a document, I'm correctly prompted for username/password and the document is checked out. I can edit it and just click Save to save it back to the server. So far, so good.
What I need is a link on a web page that will open th... | To open a document for editing directly from a hyperlink in a web page, you typically need to use a specific method to ensure that the document is opened in an editable mode in Word. Here's how you might accomplish this:
1. **Use WebDAV Client Capability**: Ensure that your users have WebDAV client capabilities enable... | 29,653 | [
{
"from": "human",
"value": "I have a DAV server (Oracle Portal in this case). If I open word and then enter the DAV URL of a document, I'm correctly prompted for username/password and the document is checked out. I can edit it and just click Save to save it back to the server. So far, so good.\nWhat I need... |
When running an MSI through the command line what does passing the arguement "CHECKDB=FALSE" really do?
The MSI of course can be anything from Microsoft, to Compuware DevPartner, to a programmer compiled MSI from .NET.
| When running an MSI (Microsoft Installer) package through the command line, passing the argument `CHECKDB=FALSE` typically refers to a custom property that is being set for the installation process. This property may control whether or not the installer performs a database integrity check on the installation package.
... | 29,368 | [
{
"from": "human",
"value": "When running an MSI through the command line what does passing the arguement \"CHECKDB=FALSE\" really do?\nThe MSI of course can be anything from Microsoft, to Compuware DevPartner, to a programmer compiled MSI from .NET.\n"
},
{
"from": "gpt",
"value": "When running... |
I'm trying to use XPath to parse an XML document. One of my NSXMLElement's looks like the following, hypothetically speaking:
<foo bar="yummy">
I'm trying to get the value for the attribute bar, however any interpretation of code I use, gives me back bar="woo", which means I need to do further string processing in ord... | In order to extract just the value of an attribute using XPath in an XML document with TouchXML, you can directly access the `stringValue` property of the `CXMLElement` object that represents the attribute. You don't need to do any string parsing as the attribute value can be retrieved directly.
Here’s an example of h... | 31,085 | [
{
"from": "human",
"value": "I'm trying to use XPath to parse an XML document. One of my NSXMLElement's looks like the following, hypothetically speaking:\n<foo bar=\"yummy\">\n\nI'm trying to get the value for the attribute bar, however any interpretation of code I use, gives me back bar=\"woo\", which mea... |
Is there a way to run a one-liner in sas, or do I have to create a file? I'm looking for something like the -e flag in perl.
| In SAS, there isn't a direct equivalent to Perl's `-e` flag for executing one-liners from the command line. However, you can run SAS code interactively or use command-line options to execute a small SAS program without needing a separate file.
### Method 1: Using the SAS Interactive Interface
You can run one-liners i... | 29,057 | [
{
"from": "human",
"value": "Is there a way to run a one-liner in sas, or do I have to create a file? I'm looking for something like the -e flag in perl.\n"
},
{
"from": "gpt",
"value": "In SAS, there isn't a direct equivalent to Perl's `-e` flag for executing one-liners from the command line. ... |
I'm investigating the differences between using log4net and System.Diagnostics.Trace for logging, and I'm curious about the performance differences I've observed.
I created a test application to compare the performance of both logging methods in several scenarios, and I'm finding that log4net is significantly slower th... | The performance differences you're observing between log4net and `System.Diagnostics.Trace` are indeed not uncommon. Here are some key factors that can influence the performance of log4net compared to the Trace class, as well as some strategies to potentially improve log4net's performance:
### Factors Influencing Perf... | 24,470 | [
{
"from": "human",
"value": "I'm investigating the differences between using log4net and System.Diagnostics.Trace for logging, and I'm curious about the performance differences I've observed.\nI created a test application to compare the performance of both logging methods in several scenarios, and I'm findi... |
All of the errors are on auto-generated files, not within the files that were created by me. Here are a few of them:
'Context' is not a member of 'auth_cookies'
'ProcessRequest' cannot be declared 'Overrides' because it does not override a sub in a base class
'Server' is not a member of 'ASP.auth_cookies_aspx'
Class '... | It sounds like you've made some progress in resolving the issues with your ASP.NET Web Forms application, but you still have a remaining issue regarding the "only one 'page' directive" error. The error indicates that there are conflicting page directives in your project, likely due to the way pages are linked or declar... | 30,114 | [
{
"from": "human",
"value": "All of the errors are on auto-generated files, not within the files that were created by me. Here are a few of them:\n'Context' is not a member of 'auth_cookies'\n'ProcessRequest' cannot be declared 'Overrides' because it does not override a sub in a base class\n'Server' is not... |
In trying to port my managed c++ project from vs2003 to vs2008. I have added oldSyntax flag. But I still get error sourceanotations.h.
| Porting a managed C++ project from Visual Studio 2003 to Visual Studio 2008 can introduce several compatibility issues, especially because the managed C++ syntax and features have changed significantly between these versions. If you're encountering errors related to `sourceannotations.h`, here are a few steps you can t... | 29,756 | [
{
"from": "human",
"value": "In trying to port my managed c++ project from vs2003 to vs2008. I have added oldSyntax flag. But I still get error sourceanotations.h.\n"
},
{
"from": "gpt",
"value": "Porting a managed C++ project from Visual Studio 2003 to Visual Studio 2008 can introduce several c... |
I have a very simple jQuery Datepicker calendar:
$(document).ready(function(){
$("#date_pretty").datepicker({
});
});
and of course in the HTML...
<input type="text" size="10" value="" id="date_pretty"/>
Today's date is nicely highlighted for the user when they bring up the calendar, but how do I get jQuery ... | You can pre-populate the textbox with today's date using JavaScript. You can easily format today's date according to your desired format (for example, "mm/dd/yyyy" or "yyyy-mm-dd"). Here's an updated version of your code that includes this functionality:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charse... | 30,785 | [
{
"from": "human",
"value": "I have a very simple jQuery Datepicker calendar:\n$(document).ready(function(){\n $(\"#date_pretty\").datepicker({ \n });\n});\n\nand of course in the HTML...\n<input type=\"text\" size=\"10\" value=\"\" id=\"date_pretty\"/>\n\nToday's date is nicely highlighted for the us... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.